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

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

Issue 326913002: Make dart2js unittests async. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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
Index: tests/compiler/dart2js/switch_empty_default_test.dart
diff --git a/tests/compiler/dart2js/switch_empty_default_test.dart b/tests/compiler/dart2js/switch_empty_default_test.dart
index 8e89fad0dc6767411a8952afc3f54541e69f083f..d0d2f884c81889fda9a6300ef965429e3588bf3c 100644
--- a/tests/compiler/dart2js/switch_empty_default_test.dart
+++ b/tests/compiler/dart2js/switch_empty_default_test.dart
@@ -3,7 +3,8 @@
// BSD-style license that can be found in the LICENSE file.
// Test constant folding on numbers.
-import "package:expect/expect.dart";
+import 'dart:async';
+import 'package:async_helper/async_helper.dart';
import 'compiler_helper.dart';
const String SIMPLY_EMPTY = """
@@ -119,10 +120,12 @@ main() {
var defOrCase3 = new RegExp(r"(default:|case 3):");
var case3 = new RegExp(r"case 3:");
- compileAndDoNotMatch(SIMPLY_EMPTY, 'main', def);
- compileAndDoNotMatch(TOTAL, 'main', defOrCase3);
- compileAndDoNotMatch(OPTIMIZED, 'main', def);
- compileAndMatch(LABEL, 'main', case3);
- compileAndMatch(DEFLABEL, 'main', def);
- compileAndMatch(EMPTYDEFLABEL, 'main', def);
+ asyncTest(() => Future.wait([
+ compileAndDoNotMatch(SIMPLY_EMPTY, 'main', def),
+ compileAndDoNotMatch(TOTAL, 'main', defOrCase3),
+ compileAndDoNotMatch(OPTIMIZED, 'main', def),
+ compileAndMatch(LABEL, 'main', case3),
+ compileAndMatch(DEFLABEL, 'main', def),
+ compileAndMatch(EMPTYDEFLABEL, 'main', def),
+ ]));
}

Powered by Google App Engine
This is Rietveld 408576698