diff options
author | Mihai Bazon <mihai@bazon.net> | 2012-09-12 16:29:20 +0300 |
---|---|---|
committer | Mihai Bazon <mihai@bazon.net> | 2012-09-12 16:29:20 +0300 |
commit | f5027ec1fc67d6daeb51714eeddd06350cae00d6 (patch) | |
tree | 62a05c30c8c5107e92b9c28e8fe0794ccc77bd26 /test | |
parent | a132841fb920f6815eb6d153f4329242354f1cae (diff) | |
download | tracifyjs-f5027ec1fc67d6daeb51714eeddd06350cae00d6.tar.gz tracifyjs-f5027ec1fc67d6daeb51714eeddd06350cae00d6.zip |
minor
Diffstat (limited to 'test')
-rw-r--r-- | test/compress/conditionals.js | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/test/compress/conditionals.js b/test/compress/conditionals.js index b9c348a0..54c0751d 100644 --- a/test/compress/conditionals.js +++ b/test/compress/conditionals.js @@ -87,3 +87,38 @@ ifs_4: { x(foo)[10].bar.baz = (foo && bar) ? something() : something_else(); } } + +ifs_5: { + options = { + conditionals: true + }; + input: { + function f() { + if (foo) return; + bar(); + baz(); + } + function g() { + if (foo) return; + if (bar) return; + if (baz) return; + if (baa) return; + a(); + b() + } + } + expect: { + function f() { + if (!foo) { + bar(); + baz(); + } + } + function g() { + if (!(foo || bar || baz || baa)) { + a(); + b() + } + } + } +} |