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

Side by Side Diff: tests/compiler/dart2js/gvn_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, 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import "package:expect/expect.dart"; 5 import "package:expect/expect.dart";
6 import 'compiler_helper.dart'; 6 import 'compiler_helper.dart';
7 7
8 const String TEST_ONE = r""" 8 const String TEST_ONE = r"""
9 void foo(bar) { 9 void foo(bar) {
10 for (int i = 0; i < 1; i++) { 10 for (int i = 0; i < 1; i++) {
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 111
112 generated = compile(TEST_TWO, entry: 'foo'); 112 generated = compile(TEST_TWO, entry: 'foo');
113 checkNumberOfMatches(new RegExp("length").allMatches(generated).iterator, 1); 113 checkNumberOfMatches(new RegExp("length").allMatches(generated).iterator, 1);
114 114
115 generated = compile(TEST_THREE, entry: 'foo'); 115 generated = compile(TEST_THREE, entry: 'foo');
116 checkNumberOfMatches(new RegExp("number").allMatches(generated).iterator, 1); 116 checkNumberOfMatches(new RegExp("number").allMatches(generated).iterator, 1);
117 117
118 generated = compile(TEST_FOUR, entry: 'foo'); 118 generated = compile(TEST_FOUR, entry: 'foo');
119 checkNumberOfMatches(new RegExp("shr").allMatches(generated).iterator, 1); 119 checkNumberOfMatches(new RegExp("shr").allMatches(generated).iterator, 1);
120 120
121 generated = compileAll(TEST_FIVE); 121 compileAll(TEST_FIVE).then((generated) {
122 checkNumberOfMatches( 122 checkNumberOfMatches(
123 new RegExp("get\\\$foo").allMatches(generated).iterator, 1); 123 new RegExp("get\\\$foo").allMatches(generated).iterator, 1);
124 });
124 125
125 generated = compileAll(TEST_SIX); 126 compileAll(TEST_SIX).then((generated) {
126 Expect.isTrue(generated.contains('for (t1 = a.field === 54; t1;)')); 127 Expect.isTrue(generated.contains('for (t1 = a.field === 54; t1;)'));
128 });
127 129
128 generated = compileAll(TEST_SEVEN); 130 compileAll(TEST_SEVEN).then((generated) {
129 Expect.isTrue(generated.contains('for (t1 = a.field === 54; t1;)')); 131 Expect.isTrue(generated.contains('for (t1 = a.field === 54; t1;)'));
132 });
130 133
131 generated = compileAll(TEST_EIGHT); 134 compileAll(TEST_EIGHT).then((generated) {
132 Expect.isTrue(generated.contains('for (; i < t1; ++i)')); 135 Expect.isTrue(generated.contains('for (; i < t1; ++i)'));
136 });
133 } 137 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698