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

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

Issue 326913002: Make dart2js unittests async. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. 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
« no previous file with comments | « no previous file | tests/compiler/dart2js/array_static_intercept_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/arithmetic_simplification_test.dart
diff --git a/tests/compiler/dart2js/arithmetic_simplification_test.dart b/tests/compiler/dart2js/arithmetic_simplification_test.dart
index 5350a330e0ec2137034f7eeabefa43600e277909..8b69d50a15c65dfc68cfc2dbd8357646c227ec48 100644
--- a/tests/compiler/dart2js/arithmetic_simplification_test.dart
+++ b/tests/compiler/dart2js/arithmetic_simplification_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 INT_PLUS_ZERO = """
@@ -74,15 +75,17 @@ void main() {
main() {
var plusZero = new RegExp(r"\+ 0");
var zeroPlus = new RegExp(r"0 \+");
- compileAndDoNotMatch(INT_PLUS_ZERO, 'main', plusZero);
- compileAndDoNotMatch(ZERO_PLUS_INT, 'main', zeroPlus);
- compileAndMatch(NUM_PLUS_ZERO, 'main', plusZero);
- compileAndMatch(ZERO_PLUS_NUM, 'main', zeroPlus);
-
var timesOne = new RegExp(r"\* 1");
var oneTimes = new RegExp(r"1 \*");
- compileAndDoNotMatch(INT_TIMES_ONE, 'main', timesOne);
- compileAndDoNotMatch(ONE_TIMES_INT, 'main', oneTimes);
- compileAndDoNotMatch(NUM_TIMES_ONE, 'main', timesOne);
- compileAndDoNotMatch(ONE_TIMES_NUM, 'main', oneTimes);
+
+ asyncTest(() => Future.wait([
+ compileAndDoNotMatch(INT_PLUS_ZERO, 'main', plusZero),
+ compileAndDoNotMatch(ZERO_PLUS_INT, 'main', zeroPlus),
+ compileAndMatch(NUM_PLUS_ZERO, 'main', plusZero),
+ compileAndMatch(ZERO_PLUS_NUM, 'main', zeroPlus),
+ compileAndDoNotMatch(INT_TIMES_ONE, 'main', timesOne),
+ compileAndDoNotMatch(ONE_TIMES_INT, 'main', oneTimes),
+ compileAndDoNotMatch(NUM_TIMES_ONE, 'main', timesOne),
+ compileAndDoNotMatch(ONE_TIMES_NUM, 'main', oneTimes),
+ ]));
}
« no previous file with comments | « no previous file | tests/compiler/dart2js/array_static_intercept_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698