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

Unified Diff: tests/compiler/dart2js/dead_bailout_target_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: Created 7 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/dead_bailout_target_test.dart
diff --git a/tests/compiler/dart2js/dead_bailout_target_test.dart b/tests/compiler/dart2js/dead_bailout_target_test.dart
index 5e7cb9118850604c5f9be9636daa6fd00a964af6..18cfc0b83e630566203fd952819c055a4012e039 100644
--- a/tests/compiler/dart2js/dead_bailout_target_test.dart
+++ b/tests/compiler/dart2js/dead_bailout_target_test.dart
@@ -32,7 +32,6 @@ foo(a) {
main() {
String generated = compile(TEST, entry: 'foo');
-
// Check that we only have one bailout call. The second bailout call
// is dead code because we know [:a.length:] is an int.
checkNumberOfMatches(new RegExp('bailout').allMatches(generated).iterator, 1);
@@ -49,20 +48,20 @@ main() {
Expect.isTrue(!generated.contains('getInterceptor'));
}
- generated = compileAll(TEST);
-
- // Check that the foo bailout method is generated.
- checkNumberOfMatches(
- new RegExp('foo\\\$bailout').allMatches(generated).iterator, 2);
+ compileAll(TEST).then((generated) {
+ // Check that the foo bailout method is generated.
+ checkNumberOfMatches(
+ new RegExp('foo\\\$bailout').allMatches(generated).iterator, 2);
- // Check that it's the only bailout method.
- checkNumberOfMatches(new RegExp('bailout').allMatches(generated).iterator, 2);
+ // Check that it's the only bailout method.
+ checkNumberOfMatches(new RegExp('bailout').allMatches(generated).iterator, 2);
- // Check that the bailout method has a case 2 for the state, which
- // is the second bailout in foo.
- Expect.isTrue(generated.contains('case 2:'));
+ // Check that the bailout method has a case 2 for the state, which
+ // is the second bailout in foo.
+ Expect.isTrue(generated.contains('case 2:'));
- // Finally, make sure that the reason foo does not contain
- // 'getInterceptor' is not because the compiler renamed it.
- Expect.isTrue(generated.contains('getInterceptor'));
+ // Finally, make sure that the reason foo does not contain
+ // 'getInterceptor' is not because the compiler renamed it.
+ Expect.isTrue(generated.contains('getInterceptor'));
+ });
}

Powered by Google App Engine
This is Rietveld 408576698