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

Unified Diff: tests/compiler/dart2js/kernel/compile_from_dill_test_helper.dart

Issue 2965763002: Support break in switch and break/continue in do statements (Closed)
Patch Set: Created 3 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/kernel/compile_from_dill_test_helper.dart
diff --git a/tests/compiler/dart2js/kernel/compile_from_dill_test_helper.dart b/tests/compiler/dart2js/kernel/compile_from_dill_test_helper.dart
index 0b0001891ede4a31d3cf549653c7566250f07328..b4e731d4a3ab073baa88fa97eb60daa182191a1e 100644
--- a/tests/compiler/dart2js/kernel/compile_from_dill_test_helper.dart
+++ b/tests/compiler/dart2js/kernel/compile_from_dill_test_helper.dart
@@ -78,12 +78,32 @@ main() {
while (i < 10) {
if (i == 5) continue;
x = i;
- if (i == 5) break;
+ if (i == 7) break;
+ i++;
}
for (var v in [3, 5]) {
if (v == 5) continue;
x = v;
- if (v == 5) break;
+ if (v == 7) break;
+ }
+ do {
+ // TODO(johnniwinther): Support js ast equivalence to handle label name
+ // mismatches. Enable the continue test:
+ //if (i == 5) continue;
+ x = i;
+ if (i == 7) break;
+ i++;
+ } while (i < 10);
+ switch (x) {
+ case 0:
+ x = 7;
+ break;
+ case 1:
+ x = 9;
+ break;
+ default:
+ x = 11;
+ break;
}
x = toplevel;
print(x);
« pkg/compiler/lib/src/js_model/locals.dart ('K') | « pkg/compiler/lib/src/js_model/locals.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698