aboutsummaryrefslogtreecommitdiff
path: root/test/compress
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress')
-rw-r--r--test/compress/issue-1770.js2
-rw-r--r--test/compress/numbers.js18
2 files changed, 19 insertions, 1 deletions
diff --git a/test/compress/issue-1770.js b/test/compress/issue-1770.js
index 7a529b2c..cd86d9d5 100644
--- a/test/compress/issue-1770.js
+++ b/test/compress/issue-1770.js
@@ -46,7 +46,7 @@ mangle_props: {
obj[1/0],
obj["Infinity"],
obj[-1/0],
- obj[-1/0],
+ obj[-(1/0)],
obj["-Infinity"],
obj[null],
obj["null"]
diff --git a/test/compress/numbers.js b/test/compress/numbers.js
index e6f6ce23..9fca46f3 100644
--- a/test/compress/numbers.js
+++ b/test/compress/numbers.js
@@ -669,6 +669,9 @@ issue_1710: {
}
unary_binary_parenthesis: {
+ options = {
+ evaluate: true,
+ }
input: {
var v = [ 0, 1, NaN, Infinity, null, undefined, true, false, "", "foo", /foo/ ];
v.forEach(function(x) {
@@ -1233,3 +1236,18 @@ issue_3684: {
"Infinity",
]
}
+
+issue_3695: {
+ options = {
+ evaluate: true,
+ }
+ input: {
+ var a = [];
+ console.log(+(a * (a[0] = false)));
+ }
+ expect: {
+ var a = [];
+ console.log(+(a * (a[0] = false)));
+ }
+ expect_stdout: "NaN"
+}