diff options
Diffstat (limited to 'test/compress')
-rw-r--r-- | test/compress/switch.js | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/test/compress/switch.js b/test/compress/switch.js index 7c1e021c..6fde5dd3 100644 --- a/test/compress/switch.js +++ b/test/compress/switch.js @@ -176,11 +176,35 @@ constant_switch_8: { } } expect: { + OUT: { + x(); + for (;;) break OUT; + y(); + } + } +} + +constant_switch_9: { + options = { dead_code: true, evaluate: true }; + input: { OUT: switch (1) { case 1: x(); - for (;;) break OUT; + for (;;) if (foo) break OUT; y(); + case 1+1: + bar(); + default: + def(); + } + } + expect: { + OUT: { + x(); + for (;;) if (foo) break OUT; + y(); + bar(); + def(); } } } |