aboutsummaryrefslogtreecommitdiff
path: root/test/compress/loops.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2020-10-11 18:18:57 +0100
committerGitHub <noreply@github.com>2020-10-12 01:18:57 +0800
commit55451e7b78c1765c6c3011d880c7980c10b7330f (patch)
tree8e63243cf2c73dd25867e2cb1ba3c8d7cf0ed1e9 /test/compress/loops.js
parentffcce28ce15afe9f0b8d8a4a83b901508eb866de (diff)
downloadtracifyjs-55451e7b78c1765c6c3011d880c7980c10b7330f.tar.gz
tracifyjs-55451e7b78c1765c6c3011d880c7980c10b7330f.zip
support `const` (#4190)
Diffstat (limited to 'test/compress/loops.js')
-rw-r--r--test/compress/loops.js27
1 files changed, 26 insertions, 1 deletions
diff --git a/test/compress/loops.js b/test/compress/loops.js
index 1fa3d00c..cfabe6fd 100644
--- a/test/compress/loops.js
+++ b/test/compress/loops.js
@@ -547,8 +547,8 @@ dead_code_condition: {
console.log(a);
}
expect: {
- var c;
var a = 0, b = 5;
+ var c;
a += 1, 0,
console.log(a);
}
@@ -1197,3 +1197,28 @@ issue_4182_2: {
}
expect_stdout: "PASS"
}
+
+do_continue: {
+ options = {
+ loops: true,
+ }
+ input: {
+ try {
+ do {
+ continue;
+ } while ([ A ]);
+ } catch (e) {
+ console.log("PASS");
+ }
+ }
+ expect: {
+ try {
+ do {
+ continue;
+ } while ([ A ]);
+ } catch (e) {
+ console.log("PASS");
+ }
+ }
+ expect_stdout: "PASS"
+}