diff options
author | Mihai Bazon <mihai@bazon.net> | 2012-09-10 15:54:17 +0300 |
---|---|---|
committer | Mihai Bazon <mihai@bazon.net> | 2012-09-10 16:37:05 +0300 |
commit | a41e6cfabb0befc0b71c95aa55ac0568cce36518 (patch) | |
tree | 624739e319634a11553b1b928206200fbde8fb8f /test | |
parent | 16b12c62875c67a7ca50f6ee184dcb6f476ea350 (diff) | |
download | tracifyjs-a41e6cfabb0befc0b71c95aa55ac0568cce36518.tar.gz tracifyjs-a41e6cfabb0befc0b71c95aa55ac0568cce36518.zip |
more progress on the compressor (WIP)
Diffstat (limited to 'test')
-rw-r--r-- | test/compress/conditionals.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/compress/conditionals.js b/test/compress/conditionals.js index ba5e674d..b9c348a0 100644 --- a/test/compress/conditionals.js +++ b/test/compress/conditionals.js @@ -72,3 +72,18 @@ ifs_3_should_warn: { var jj; foo(); // 2 } } + +ifs_4: { + options = { + conditionals: true + }; + input: { + if (foo && bar) { + x(foo)[10].bar.baz = something(); + } else + x(foo)[10].bar.baz = something_else(); + } + expect: { + x(foo)[10].bar.baz = (foo && bar) ? something() : something_else(); + } +} |