aboutsummaryrefslogtreecommitdiff
path: root/test/compress
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress')
-rw-r--r--test/compress/numbers.js20
1 files changed, 19 insertions, 1 deletions
diff --git a/test/compress/numbers.js b/test/compress/numbers.js
index 7946ba8a..63a100b7 100644
--- a/test/compress/numbers.js
+++ b/test/compress/numbers.js
@@ -713,7 +713,7 @@ issue_3531_1: {
}
expect: {
var a = "1";
- console.log(typeof (a + 1 - (.2 + .1)));
+ console.log(typeof (a + 1 - .3));
}
expect_stdout: "number"
}
@@ -747,3 +747,21 @@ issue_3531_3: {
}
expect_stdout: "-22"
}
+
+issue_3536: {
+ options = {
+ evaluate: true,
+ unsafe_math: true,
+ }
+ input: {
+ var a = 100, b = 10;
+ var c = --a + ("23" - (b++, 1));
+ console.log(typeof c, a, b, c);
+ }
+ expect: {
+ var a = 100, b = 10;
+ var c = --a + ("23" - (b++, 1));
+ console.log(typeof c, a, b, c);
+ }
+ expect_stdout: "number 99 11 121"
+}