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

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

Issue 11788016: Update dart2js unit tests to new library API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 11 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: dart/tests/compiler/dart2js/loop_test.dart
diff --git a/dart/tests/compiler/dart2js/loop_test.dart b/dart/tests/compiler/dart2js/loop_test.dart
index ee499754edc3835be1cb9163d31f11f9a0de1b8b..0412b109b24b00f72d2f5e7b113d732a53e03a68 100644
--- a/dart/tests/compiler/dart2js/loop_test.dart
+++ b/dart/tests/compiler/dart2js/loop_test.dart
@@ -29,17 +29,6 @@ foo(a) {
const String TEST_THREE = r"""
foo(a) {
int x = 0;
- for (int i in a) {
- x += i;
- }
- return x;
-}
-""";
-
-
-const String TEST_FOUR = r"""
-foo(a) {
- int x = 0;
for (int i = 0; i < 10; i++) {
if (i == 5) continue;
x += i;
@@ -48,7 +37,7 @@ foo(a) {
}
""";
-const String TEST_FIVE = r"""
+const String TEST_FOUR = r"""
foo(a) {
int x = 0;
int i = 0;
@@ -61,29 +50,13 @@ foo(a) {
}
""";
-const String TEST_SIX = r"""
-foo(a) {
- int x = 0;
- for (int i in a) {
- if (i == 5) continue;
- x += i;
- }
- return x;
-}
-""";
-
-
main() {
String generated = compile(TEST_ONE, entry: 'foo');
Expect.isTrue(generated.contains(r'for ('));
generated = compile(TEST_TWO, entry: 'foo');
Expect.isTrue(!generated.contains(r'break'));
generated = compile(TEST_THREE, entry: 'foo');
- Expect.isTrue(!generated.contains(r'break'));
- generated = compile(TEST_FOUR, entry: 'foo');
- Expect.isTrue(generated.contains(r'continue'));
- generated = compile(TEST_FIVE, entry: 'foo');
Expect.isTrue(generated.contains(r'continue'));
- generated = compile(TEST_SIX, entry: 'foo');
+ generated = compile(TEST_FOUR, entry: 'foo');
Expect.isTrue(generated.contains(r'continue'));
}

Powered by Google App Engine
This is Rietveld 408576698