diff options
Diffstat (limited to 'test/compress')
-rw-r--r-- | test/compress/conditionals.js | 2 | ||||
-rw-r--r-- | test/compress/dead-code.js | 4 | ||||
-rw-r--r-- | test/compress/issue-1034.js | 30 |
3 files changed, 9 insertions, 27 deletions
diff --git a/test/compress/conditionals.js b/test/compress/conditionals.js index 8a4e3aad..64088eb2 100644 --- a/test/compress/conditionals.js +++ b/test/compress/conditionals.js @@ -83,13 +83,11 @@ ifs_3_should_warn: { "WARN: Condition left of && always false [test/compress/conditionals.js:3,12]", "WARN: Condition always false [test/compress/conditionals.js:3,12]", "WARN: Dropping unreachable code [test/compress/conditionals.js:3,34]", - "WARN: Declarations in unreachable code! [test/compress/conditionals.js:4,12]", "WARN: + in boolean context always true [test/compress/conditionals.js:10,19]", "WARN: Boolean || always true [test/compress/conditionals.js:10,12]", "WARN: Condition left of || always true [test/compress/conditionals.js:10,12]", "WARN: Condition always true [test/compress/conditionals.js:10,12]", "WARN: Dropping unreachable code [test/compress/conditionals.js:12,15]", - "WARN: Declarations in unreachable code! [test/compress/conditionals.js:13,12]", "WARN: Dropping side-effect-free statement [test/compress/conditionals.js:3,12]", "WARN: Dropping side-effect-free statement [test/compress/conditionals.js:10,12]", ] diff --git a/test/compress/dead-code.js b/test/compress/dead-code.js index 3a5a4527..62efa460 100644 --- a/test/compress/dead-code.js +++ b/test/compress/dead-code.js @@ -61,8 +61,6 @@ dead_code_2_should_warn: { expect_stdout: true expect_warnings: [ "WARN: Dropping unreachable code [test/compress/dead-code.js:8,12]", - "WARN: Declarations in unreachable code! [test/compress/dead-code.js:10,16]", - "WARN: Dropping unreachable code [test/compress/dead-code.js:10,16]", ] node_version: "<=4" } @@ -103,11 +101,9 @@ dead_code_constant_boolean_should_warn_more: { "WARN: + in boolean context always true [test/compress/dead-code.js:1,33]", "WARN: Boolean || always true [test/compress/dead-code.js:1,16]", "WARN: Dropping unreachable code [test/compress/dead-code.js:1,45]", - "WARN: Declarations in unreachable code! [test/compress/dead-code.js:3,12]", "WARN: Boolean expression always true [test/compress/dead-code.js:6,47]", "WARN: Boolean && always false [test/compress/dead-code.js:6,28]", "WARN: Dropping unreachable code [test/compress/dead-code.js:6,63]", - "WARN: Declarations in unreachable code! [test/compress/dead-code.js:9,12]", "WARN: Dropping side-effect-free statement [test/compress/dead-code.js:1,15]", "WARN: Dropping side-effect-free statement [test/compress/dead-code.js:6,28]", ] diff --git a/test/compress/issue-1034.js b/test/compress/issue-1034.js index db488d05..e1abad7c 100644 --- a/test/compress/issue-1034.js +++ b/test/compress/issue-1034.js @@ -39,7 +39,7 @@ non_hoisted_function_after_return: { "WARN: Dropping unreachable code [test/compress/issue-1034.js:4,16]", "WARN: Dropping unreachable code [test/compress/issue-1034.js:7,16]", "WARN: Dropping unreachable code [test/compress/issue-1034.js:10,12]", - "WARN: Dropping unused function UnusedFunction [test/compress/issue-1034.js:11,21]" + "WARN: Dropping unused function UnusedFunction [test/compress/issue-1034.js:11,21]", ] } @@ -84,15 +84,12 @@ non_hoisted_function_after_return_2a: { } } expect_warnings: [ - "WARN: Dropping unreachable code [test/compress/issue-1034.js:4,16]", - "WARN: Declarations in unreachable code! [test/compress/issue-1034.js:4,16]", - "WARN: Dropping unreachable code [test/compress/issue-1034.js:7,16]", - "WARN: Declarations in unreachable code! [test/compress/issue-1034.js:7,16]", + "WARN: Dropping initialization in unreachable code [test/compress/issue-1034.js:4,16]", + "WARN: Dropping initialization in unreachable code [test/compress/issue-1034.js:7,16]", "WARN: Dropping unused variable a [test/compress/issue-1034.js:4,20]", "WARN: Dropping unused function nope [test/compress/issue-1034.js:11,21]", "INFO: pass 0: last_count: Infinity, count: 35", - "WARN: Dropping unreachable code [test/compress/issue-1034.js:9,12]", - "WARN: Declarations in unreachable code! [test/compress/issue-1034.js:9,12]", + "WARN: Dropping initialization in unreachable code [test/compress/issue-1034.js:9,12]", "WARN: Dropping unreachable code [test/compress/issue-1034.js:12,12]", "INFO: Dropping unused variable b [test/compress/issue-1034.js:7,20]", "INFO: Dropping unused variable c [test/compress/issue-1034.js:9,16]", @@ -138,10 +135,7 @@ non_hoisted_function_after_return_2b: { } } expect_warnings: [ - "WARN: Dropping unreachable code [test/compress/issue-1034.js:6,16]", - "WARN: Declarations in unreachable code! [test/compress/issue-1034.js:6,16]", - "WARN: Dropping unreachable code [test/compress/issue-1034.js:8,12]", - "WARN: Declarations in unreachable code! [test/compress/issue-1034.js:8,12]", + "WARN: Dropping initialization in unreachable code [test/compress/issue-1034.js:8,12]", "WARN: Dropping unreachable code [test/compress/issue-1034.js:12,12]", ] } @@ -242,15 +236,12 @@ non_hoisted_function_after_return_2a_strict: { } expect_stdout: "5 6" expect_warnings: [ - "WARN: Dropping unreachable code [test/compress/issue-1034.js:5,16]", - "WARN: Declarations in unreachable code! [test/compress/issue-1034.js:5,16]", - "WARN: Dropping unreachable code [test/compress/issue-1034.js:8,16]", - "WARN: Declarations in unreachable code! [test/compress/issue-1034.js:8,16]", + "WARN: Dropping initialization in unreachable code [test/compress/issue-1034.js:5,16]", + "WARN: Dropping initialization in unreachable code [test/compress/issue-1034.js:8,16]", "WARN: Dropping unused variable a [test/compress/issue-1034.js:5,20]", "WARN: Dropping unused function nope [test/compress/issue-1034.js:12,21]", "INFO: pass 0: last_count: Infinity, count: 46", - "WARN: Dropping unreachable code [test/compress/issue-1034.js:10,12]", - "WARN: Declarations in unreachable code! [test/compress/issue-1034.js:10,12]", + "WARN: Dropping initialization in unreachable code [test/compress/issue-1034.js:10,12]", "WARN: Dropping unreachable code [test/compress/issue-1034.js:13,12]", "INFO: Dropping unused variable b [test/compress/issue-1034.js:8,20]", "INFO: Dropping unused variable c [test/compress/issue-1034.js:10,16]", @@ -301,10 +292,7 @@ non_hoisted_function_after_return_2b_strict: { } expect_stdout: "5 6" expect_warnings: [ - "WARN: Dropping unreachable code [test/compress/issue-1034.js:7,16]", - "WARN: Declarations in unreachable code! [test/compress/issue-1034.js:7,16]", - "WARN: Dropping unreachable code [test/compress/issue-1034.js:9,12]", - "WARN: Declarations in unreachable code! [test/compress/issue-1034.js:9,12]", + "WARN: Dropping initialization in unreachable code [test/compress/issue-1034.js:9,12]", "WARN: Dropping unreachable code [test/compress/issue-1034.js:13,12]", ] } |