diff options
Diffstat (limited to 'test/compress')
-rw-r--r-- | test/compress/collapse_vars.js | 7 | ||||
-rw-r--r-- | test/compress/drop-unused.js | 10 | ||||
-rw-r--r-- | test/compress/keep_fargs.js | 1 | ||||
-rw-r--r-- | test/compress/reduce_vars.js | 4 |
4 files changed, 10 insertions, 12 deletions
diff --git a/test/compress/collapse_vars.js b/test/compress/collapse_vars.js index 709fc6b7..24fadceb 100644 --- a/test/compress/collapse_vars.js +++ b/test/compress/collapse_vars.js @@ -62,18 +62,18 @@ collapse_vars_side_effects_1: { expect: { function f1() { var s = "abcdef", i = 2; - console.log.bind(console)(s.charAt(i++), s.charAt(i++), s.charAt(4), 7); + console.log.bind(console)(s.charAt(i++), s.charAt(+i), s.charAt(4), 7); } function f2() { var s = "abcdef", i = 2; - console.log.bind(console)(s.charAt(i++), 5, s.charAt(i++), s.charAt(i++), 7); + console.log.bind(console)(s.charAt(i++), 5, s.charAt(i++), s.charAt(+i), 7); } function f3() { var s = "abcdef", i = 2, log = console.log.bind(console), x = s.charAt(i++), - y = s.charAt(i++); + y = s.charAt(+i); log(x, s.charAt(4), y, 7); } function f4() { @@ -3073,7 +3073,6 @@ issue_2298: { expect: { !function() { (function() { - 0; try { !function(b) { (void 0)[1] = "foo"; diff --git a/test/compress/drop-unused.js b/test/compress/drop-unused.js index 3e2b54f2..46f273e9 100644 --- a/test/compress/drop-unused.js +++ b/test/compress/drop-unused.js @@ -1730,7 +1730,7 @@ chained_3: { expect: { console.log(function(a, b) { var c = b; - b++; + +b; return c; }(0, 2)); } @@ -2737,7 +2737,7 @@ issue_3962_1: { 0..toString(); } while (0); if (c) console.log("PASS"); - }((a--, 1)), 0); + }(1), 0); void 0; } expect_stdout: "PASS" @@ -2770,7 +2770,7 @@ issue_3962_2: { 0..toString(); } while (0); if (c) console.log("PASS"); - }((a--, 1)), 0); + }(1), 0); } expect_stdout: "PASS" } @@ -2853,11 +2853,11 @@ issue_4025: { console.log(a, b, d); } expect: { - var d, c = 0; + var c = 0; try { console.log(c); } finally { - d = c + 1; + var d = c + 1; c = 0; } console.log(1, 1, d); diff --git a/test/compress/keep_fargs.js b/test/compress/keep_fargs.js index e42b3978..e1737081 100644 --- a/test/compress/keep_fargs.js +++ b/test/compress/keep_fargs.js @@ -306,7 +306,6 @@ issue_2298: { expect: { !function() { (function() { - 0; try { !function() { (void 0)[1] = "foo"; diff --git a/test/compress/reduce_vars.js b/test/compress/reduce_vars.js index c911efe0..153ac5d4 100644 --- a/test/compress/reduce_vars.js +++ b/test/compress/reduce_vars.js @@ -120,7 +120,7 @@ modified: { expect: { function f0() { var b = 2; - b++; + +b; console.log(2); console.log(4); } @@ -5590,7 +5590,7 @@ lvalues_def_1: { } expect: { var b = 1; - var a = b++, b = NaN; + var a = +b, b = NaN; console.log(a, b); } expect_stdout: "1 NaN" |