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

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: Remove withCurrentElementAsync Created 7 years, 5 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/class_codegen_test.dart
diff --git a/tests/compiler/dart2js/class_codegen_test.dart b/tests/compiler/dart2js/class_codegen_test.dart
index b4e72c1996424bdc3a07ae9bbe0c5ac6071e8aa4..2cff73b3f850d23c943015a0fd5167ac179cc054 100644
--- a/tests/compiler/dart2js/class_codegen_test.dart
+++ b/tests/compiler/dart2js/class_codegen_test.dart
@@ -3,6 +3,7 @@
// 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 'compiler_helper.dart';
import 'parser_helper.dart';
@@ -64,9 +65,10 @@ main() {
""";
twoClasses() {
- String generated = compileAll(TEST_ONE);
- Expect.isTrue(generated.contains('A: {"": "Object;"'));
- Expect.isTrue(generated.contains('B: {"": "Object;"'));
+ return compileAll(TEST_ONE).then((generated) {
+ Expect.isTrue(generated.contains('A: {"": "Object;"'));
+ Expect.isTrue(generated.contains('B: {"": "Object;"'));
+ });
}
subClass() {
@@ -75,18 +77,20 @@ subClass() {
Expect.isTrue(generated.contains('B: {"": "A;"'));
}
- checkOutput(compileAll(TEST_TWO));
- checkOutput(compileAll(TEST_THREE));
+ compileAll(TEST_TWO).then(checkOutput);
+ compileAll(TEST_THREE).then(checkOutput);
}
fieldTest() {
- String generated = compileAll(TEST_FOUR);
- Expect.isTrue(generated.contains(r"""B: {"": "A;y,z,x", static:"""));
+ return 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\);")));
+ return compileAll(TEST_FIVE).then((generated) {
+ Expect.isTrue(generated.contains(new RegExp(r"new [$a-z]+\.A\(a\);")));
+ });
}
main() {

Powered by Google App Engine
This is Rietveld 408576698