diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-08-23 01:03:48 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-23 01:03:48 +0800 |
commit | f2d486e771271ce03f25a50a6107cb87735a681d (patch) | |
tree | e5a274dde93d3a705626af569e90f58d2639e2c2 /test/compress/comparisons.js | |
parent | fee677786ed35faa3eea7b9cd287730550ddd7d3 (diff) | |
download | tracifyjs-f2d486e771271ce03f25a50a6107cb87735a681d.tar.gz tracifyjs-f2d486e771271ce03f25a50a6107cb87735a681d.zip |
enhance `comparisons` (#4062)
Diffstat (limited to 'test/compress/comparisons.js')
-rw-r--r-- | test/compress/comparisons.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/compress/comparisons.js b/test/compress/comparisons.js index f93ccbe1..a04498ee 100644 --- a/test/compress/comparisons.js +++ b/test/compress/comparisons.js @@ -123,6 +123,29 @@ self_comparison_3: { ] } +self_comparison_4: { + options = { + booleans: true, + comparisons: true, + reduce_vars: true, + toplevel: true, + unused: true, + } + input: { + var o = {}; + console.log(o == o, o != o); + console.log(o === o, o !== o); + } + expect: { + console.log(!0, !1); + console.log(!0, !1); + } + expect_stdout: [ + "true false", + "true false", + ] +} + issue_2857_1: { options = { comparisons: true, |