Chromium Code Reviews| Index: tests/compiler/dart2js/analyze_all_test.dart |
| diff --git a/tests/compiler/dart2js/analyze_all_test.dart b/tests/compiler/dart2js/analyze_all_test.dart |
| index 2a7fcc701279c10b384e30e5970a6979e1589920..fb09e221add3f530bfebf85d13710f705930eb06 100644 |
| --- a/tests/compiler/dart2js/analyze_all_test.dart |
| +++ b/tests/compiler/dart2js/analyze_all_test.dart |
| @@ -28,24 +28,27 @@ main() { |
| main() { |
| Uri uri = Uri.parse('test:code'); |
|
ahe
2013/08/06 16:29:17
Needs to use dart/tests/async_helper.dart.
Johnni Winther
2013/08/27 11:05:00
Done.
|
| - var compiler = compilerFor(SOURCE, uri, analyzeAll: false); |
| - compiler.runCompiler(uri); |
| - Expect.isFalse(compiler.compilationFailed); |
| - print(compiler.warnings); |
| - Expect.isTrue(compiler.warnings.isEmpty, 'unexpected warnings'); |
| - Expect.isTrue(compiler.errors.isEmpty, 'unexpected errors'); |
| - compiler = compilerFor(SOURCE, uri, analyzeAll: true); |
| - compiler.runCompiler(uri); |
| - Expect.isTrue(compiler.compilationFailed); |
| - Expect.isTrue(compiler.warnings.isEmpty, 'unexpected warnings'); |
| - Expect.equals(2, compiler.errors.length, |
| - 'expected exactly two errors, but got ${compiler.errors}'); |
| - |
| - Expect.equals(MessageKind.CONSTRUCTOR_IS_NOT_CONST, |
| - compiler.errors[0].message.kind); |
| - Expect.equals("Foo", compiler.errors[0].node.toString()); |
| - |
| - Expect.equals(MessageKind.CONSTRUCTOR_IS_NOT_CONST, |
| - compiler.errors[1].message.kind); |
| - Expect.equals("Foo", compiler.errors[1].node.toString()); |
| + var compiler1 = compilerFor(SOURCE, uri, analyzeAll: false); |
| + compiler1.runCompiler(uri).then((_) { |
| + Expect.isFalse(compiler1.compilationFailed); |
| + print(compiler1.warnings); |
| + Expect.isTrue(compiler1.warnings.isEmpty, 'unexpected warnings'); |
| + Expect.isTrue(compiler1.errors.isEmpty, 'unexpected errors'); |
| + }); |
| + |
| + var compiler2 = compilerFor(SOURCE, uri, analyzeAll: true); |
| + compiler2.runCompiler(uri).then((_) { |
| + Expect.isTrue(compiler2.compilationFailed); |
| + Expect.isTrue(compiler2.warnings.isEmpty, 'unexpected warnings'); |
| + Expect.equals(2, compiler2.errors.length, |
| + 'expected exactly two errors, but got ${compiler2.errors}'); |
| + |
| + Expect.equals(MessageKind.CONSTRUCTOR_IS_NOT_CONST, |
| + compiler2.errors[0].message.kind); |
| + Expect.equals("Foo", compiler2.errors[0].node.toString()); |
| + |
| + Expect.equals(MessageKind.CONSTRUCTOR_IS_NOT_CONST, |
| + compiler2.errors[1].message.kind); |
| + Expect.equals("Foo", compiler2.errors[1].node.toString()); |
| + }); |
| } |