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

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

Issue 17759007: First pass at asynchronous input loading in dart2js. (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 | « tests/compiler/dart2js/class_codegen2_test.dart ('k') | tests/compiler/dart2js/class_order_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/class_codegen_test.dart
diff --git a/tests/compiler/dart2js/class_codegen_test.dart b/tests/compiler/dart2js/class_codegen_test.dart
index b4e72c1996424bdc3a07ae9bbe0c5ac6071e8aa4..ed7c90c27a6c5d8d288bf33618bec3760aa3ed87 100644
--- a/tests/compiler/dart2js/class_codegen_test.dart
+++ b/tests/compiler/dart2js/class_codegen_test.dart
@@ -3,7 +3,9 @@
// BSD-style license that can be found in the LICENSE file.
// Test that parameters keep their names in the output.
+import 'dart:async';
import "package:expect/expect.dart";
+import "package:async_helper/async_helper.dart";
import 'compiler_helper.dart';
import 'parser_helper.dart';
@@ -64,9 +66,10 @@ main() {
""";
twoClasses() {
- String generated = compileAll(TEST_ONE);
- Expect.isTrue(generated.contains('A: {"": "Object;"'));
- Expect.isTrue(generated.contains('B: {"": "Object;"'));
+ asyncTest(() => compileAll(TEST_ONE).then((generated) {
+ Expect.isTrue(generated.contains('A: {"": "Object;"'));
+ Expect.isTrue(generated.contains('B: {"": "Object;"'));
+ }));
}
subClass() {
@@ -75,18 +78,20 @@ subClass() {
Expect.isTrue(generated.contains('B: {"": "A;"'));
}
- checkOutput(compileAll(TEST_TWO));
- checkOutput(compileAll(TEST_THREE));
+ asyncTest(() => compileAll(TEST_TWO).then(checkOutput));
+ asyncTest(() => compileAll(TEST_THREE).then(checkOutput));
}
fieldTest() {
- String generated = compileAll(TEST_FOUR);
- Expect.isTrue(generated.contains(r"""B: {"": "A;y,z,x", static:"""));
+ asyncTest(() => compileAll(TEST_FOUR).then((generated) {
+ Expect.isTrue(generated.contains(r"""B: {"": "A;y,z,x", static:"""));
+ }));
}
constructor1() {
- String generated = compileAll(TEST_FIVE);
- Expect.isTrue(generated.contains(new RegExp(r"new [$a-z]+\.A\(a\);")));
+ asyncTest(() => compileAll(TEST_FIVE).then((generated) {
+ Expect.isTrue(generated.contains(new RegExp(r"new [$a-z]+\.A\(a\);")));
+ }));
}
main() {
« no previous file with comments | « tests/compiler/dart2js/class_codegen2_test.dart ('k') | tests/compiler/dart2js/class_order_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698