Index: tests/compiler/dart2js_extra/switch_test.dart |
diff --git a/tests/compiler/dart2js_extra/switch_test.dart b/tests/compiler/dart2js_extra/switch_test.dart |
index 7acade2f3fe8551c601dc191610cd3a9c108b811..5eb51c0db4172f3dae7f4e887d4e30a1514c672d 100644 |
--- a/tests/compiler/dart2js_extra/switch_test.dart |
+++ b/tests/compiler/dart2js_extra/switch_test.dart |
@@ -58,6 +58,21 @@ switcher2(val) { |
return x; |
} |
+var x = 0; |
+ |
+@NoInline() |
+switcher3(val) { |
+ switch(val) { |
+ case 1: |
+ default: |
+ incrementX(); |
+ } |
+} |
+ |
+incrementX() { |
+ x++; |
+} |
+ |
badswitches(val) { |
// Test some badly formed switch bodies. |
// 01 - a label/statement without a following case/default. |
@@ -81,5 +96,8 @@ main() { |
Expect.equals(200, switcher2(4)); |
Expect.equals(200, switcher2(5)); |
+ switcher3(1); |
+ Expect.equals(1, x); |
+ |
badswitches(42); |
} |