From f5027ec1fc67d6daeb51714eeddd06350cae00d6 Mon Sep 17 00:00:00 2001 From: Mihai Bazon Date: Wed, 12 Sep 2012 16:29:20 +0300 Subject: minor --- test/compress/conditionals.js | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'test/compress') 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() + } + } + } +} -- cgit v1.2.3