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

Unified Diff: tests/compiler/dart2js/jumps/data/switch.dart

Issue 3007783004: Handle switch continue (Closed)
Patch Set: Updated cf. comment Created 3 years, 4 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/inference/inference_test.dart ('k') | tests/compiler/dart2js/jumps/jump_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/jumps/data/switch.dart
diff --git a/tests/compiler/dart2js/jumps/data/switch.dart b/tests/compiler/dart2js/jumps/data/switch.dart
index c07ad1849a921bb5945551449b48325309c80d77..ec716cd1861dc17d25634bb8de28d52f0c1325a3 100644
--- a/tests/compiler/dart2js/jumps/data/switch.dart
+++ b/tests/compiler/dart2js/jumps/data/switch.dart
@@ -9,7 +9,7 @@ void simpleSwitch(e) {
}
}
-void simpleLabelledSwitch(e) {
+void labelledSwitch(e) {
target:
/*0@break*/
switch (e) {
@@ -18,7 +18,7 @@ void simpleLabelledSwitch(e) {
}
}
-void simpleNestedSwitch(l) {
+void switchNestedInLoop(l) {
for (var e in l) {
target:
/*0@break*/
@@ -29,7 +29,7 @@ void simpleNestedSwitch(l) {
}
}
-void simpleNestedLabelledSwitch(l) {
+void labelledSwitchNestedInLoop(l) {
target:
/*0@break*/
for (var e in l) {
@@ -42,9 +42,20 @@ void simpleNestedLabelledSwitch(l) {
}
}
+void switchWithContinue(e) {
+ /*0@break*/ switch (e) {
+ target:
+ case /*1@continue*/ 0:
+ /*target=0*/ break;
+ case 1:
+ /*target=1*/ continue target;
+ }
+}
+
void main() {
simpleSwitch(0);
- simpleLabelledSwitch(0);
- simpleNestedSwitch([]);
- simpleNestedLabelledSwitch([]);
+ labelledSwitch(0);
+ switchNestedInLoop([]);
+ labelledSwitchNestedInLoop([]);
+ switchWithContinue(0);
}
« no previous file with comments | « tests/compiler/dart2js/inference/inference_test.dart ('k') | tests/compiler/dart2js/jumps/jump_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698