Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1071)

Unified Diff: tests/compiler/dart2js/analyze_all_test.dart

Issue 23512008: Call asyncEnd only on success. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/async_helper/lib/async_helper.dart ('k') | tests/compiler/dart2js/analyze_only_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 58a313c50b663260eb2c277593fea38337914c8b..5f6a8ab816559549495a149ea4456d565f790332 100644
--- a/tests/compiler/dart2js/analyze_all_test.dart
+++ b/tests/compiler/dart2js/analyze_all_test.dart
@@ -29,18 +29,16 @@ main() {
main() {
Uri uri = Uri.parse('test:code');
- asyncStart();
var compiler1 = compilerFor(SOURCE, uri, analyzeAll: false);
- compiler1.runCompiler(uri).then((_) {
+ asyncTest(() => 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');
- }).whenComplete(() => asyncEnd());
+ }));
- asyncStart();
var compiler2 = compilerFor(SOURCE, uri, analyzeAll: true);
- compiler2.runCompiler(uri).then((_) {
+ asyncTest(() => compiler2.runCompiler(uri).then((_) {
Expect.isTrue(compiler2.compilationFailed);
Expect.isTrue(compiler2.warnings.isEmpty, 'unexpected warnings');
Expect.equals(2, compiler2.errors.length,
@@ -53,5 +51,5 @@ main() {
Expect.equals(MessageKind.CONSTRUCTOR_IS_NOT_CONST,
compiler2.errors[1].message.kind);
Expect.equals("Foo", compiler2.errors[1].node.toString());
- }).whenComplete(() => asyncEnd());
+ }));
}
« no previous file with comments | « pkg/async_helper/lib/async_helper.dart ('k') | tests/compiler/dart2js/analyze_only_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698