aboutsummaryrefslogtreecommitdiff
path: root/test/compress/reduce_vars.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2018-02-12 23:28:28 +0800
committerGitHub <noreply@github.com>2018-02-12 23:28:28 +0800
commit0809699bdc7b1c249c7bbe02924a4a861aff8bea (patch)
treecf442345213f3c85a659ae84db6f82575c3ba2e8 /test/compress/reduce_vars.js
parent2088e1c19d97955b5582e08396fca8c7b7dadd83 (diff)
downloadtracifyjs-0809699bdc7b1c249c7bbe02924a4a861aff8bea.tar.gz
tracifyjs-0809699bdc7b1c249c7bbe02924a4a861aff8bea.zip
simplify `do-while` into `for` (#2907)
fixes #2904
Diffstat (limited to 'test/compress/reduce_vars.js')
-rw-r--r--test/compress/reduce_vars.js12
1 files changed, 3 insertions, 9 deletions
diff --git a/test/compress/reduce_vars.js b/test/compress/reduce_vars.js
index c0148204..f916e54b 100644
--- a/test/compress/reduce_vars.js
+++ b/test/compress/reduce_vars.js
@@ -1178,9 +1178,7 @@ toplevel_on_loops_1: {
console.log("bar:", --x);
}
var x = 3;
- do
- bar();
- while (x);
+ for (;bar(), x;);
}
expect_stdout: true
}
@@ -1208,9 +1206,7 @@ toplevel_off_loops_1: {
console.log("bar:", --x);
}
var x = 3;
- do
- bar();
- while (x);
+ for (;bar(), x;);
}
expect_stdout: true
}
@@ -1265,9 +1261,7 @@ toplevel_off_loops_2: {
console.log("bar:");
}
var x = 3;
- do
- bar();
- while (x);
+ for (;bar(), x;);
}
}