From a41e6cfabb0befc0b71c95aa55ac0568cce36518 Mon Sep 17 00:00:00 2001 From: Mihai Bazon Date: Mon, 10 Sep 2012 15:54:17 +0300 Subject: more progress on the compressor (WIP) --- test/compress/conditionals.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'test/compress') 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(); + } +} -- cgit v1.2.3