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

Unified Diff: tests/compiler/dart2js/simple_function_subtype_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 | « tests/compiler/dart2js/resolver_test.dart ('k') | tests/compiler/dart2js/size_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/simple_function_subtype_test.dart
diff --git a/tests/compiler/dart2js/simple_function_subtype_test.dart b/tests/compiler/dart2js/simple_function_subtype_test.dart
index 73295987c3ec5c8e033e50820ff4b830f9cf5c50..3997deaeee7a5676359449a6217bcb3bddad0a74 100644
--- a/tests/compiler/dart2js/simple_function_subtype_test.dart
+++ b/tests/compiler/dart2js/simple_function_subtype_test.dart
@@ -5,7 +5,9 @@
// Test that simple function subtype checks use predicates.
library simple_function_subtype_test;
-import "package:expect/expect.dart";
+
+import 'package:expect/expect.dart';
+import 'package:async_helper/async_helper.dart';
import 'compiler_helper.dart';
const String TEST = r"""
@@ -49,12 +51,13 @@ foo() {
""";
main() {
- String generated = compile(TEST, entry: 'foo');
- for (int i = 0 ; i <= 15 ; i++) {
- String predicateCheck = '.\$is_args$i';
- Expect.isTrue(generated.contains(predicateCheck),
- 'Expected predicate check $predicateCheck');
- }
- Expect.isFalse(generated.contains('checkFunctionSubtype'),
- 'Unexpected use of checkFunctionSubtype');
+ asyncTest(() => compile(TEST, entry: 'foo', check: (String generated) {
+ for (int i = 0 ; i <= 15 ; i++) {
+ String predicateCheck = '.\$is_args$i';
+ Expect.isTrue(generated.contains(predicateCheck),
+ 'Expected predicate check $predicateCheck');
+ }
+ Expect.isFalse(generated.contains('checkFunctionSubtype'),
+ 'Unexpected use of checkFunctionSubtype');
+ }));
}
« no previous file with comments | « tests/compiler/dart2js/resolver_test.dart ('k') | tests/compiler/dart2js/size_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698