diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/compress/loops.js | 16 | ||||
-rw-r--r-- | test/compress/pure_getters.js | 26 |
2 files changed, 42 insertions, 0 deletions
diff --git a/test/compress/loops.js b/test/compress/loops.js index 137fd9da..d835080d 100644 --- a/test/compress/loops.js +++ b/test/compress/loops.js @@ -673,3 +673,19 @@ issue_3371: { } expect_stdout: "PASS" } + +step: { + options = { + loops: true, + side_effects: true, + } + input: { + for (var i = 0; i < 42; "foo", i++, "bar"); + console.log(i); + } + expect: { + for (var i = 0; i < 42; i++); + console.log(i); + } + expect_stdout: "42" +} diff --git a/test/compress/pure_getters.js b/test/compress/pure_getters.js index 61ce8a92..b6e42f9d 100644 --- a/test/compress/pure_getters.js +++ b/test/compress/pure_getters.js @@ -1161,3 +1161,29 @@ collapse_rhs_lhs: { } expect_stdout: "1 3" } + +drop_arguments: { + options = { + pure_getters: "strict", + side_effects: true, + } + input: { + (function() { + arguments.slice = function() { + console.log("PASS"); + }; + arguments[42]; + arguments.length; + arguments.slice(); + })(); + } + expect: { + (function() { + arguments.slice = function() { + console.log("PASS"); + }; + arguments.slice(); + })(); + } + expect_stdout: "PASS" +} |