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

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: 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/dart_backend_test.dart ('k') | tests/compiler/dart2js/dead_code_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..5c369b2e16bbbfd67e7548e8def5fdb34f0c8eb1 100644
--- a/tests/compiler/dart2js/dead_bailout_target_test.dart
+++ b/tests/compiler/dart2js/dead_bailout_target_test.dart
@@ -6,6 +6,7 @@
// instruction gets removed from the graph when it's not used.
import "package:expect/expect.dart";
+import "package:async_helper/async_helper.dart";
import 'compiler_helper.dart';
String TEST = r'''
@@ -32,7 +33,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 +49,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);
+ asyncTest(() => 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'));
+ }));
}
« no previous file with comments | « tests/compiler/dart2js/dart_backend_test.dart ('k') | tests/compiler/dart2js/dead_code_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698