diff options
Diffstat (limited to 'test/compress/sequences.js')
-rw-r--r-- | test/compress/sequences.js | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/test/compress/sequences.js b/test/compress/sequences.js index 513bc84b..d48eced2 100644 --- a/test/compress/sequences.js +++ b/test/compress/sequences.js @@ -87,3 +87,43 @@ make_sequences_4: { with (x = 5, obj); } } + +lift_sequences_1: { + options = { sequences: true }; + input: { + foo = !(x(), y(), bar()); + } + expect: { + x(), y(), foo = !bar(); + } +} + +lift_sequences_2: { + options = { sequences: true, evaluate: true }; + input: { + q = 1 + (foo(), bar(), 5) + 7 * (5 / (3 - (a(), (QW=ER), c(), 2))) - (x(), y(), 5); + } + expect: { + foo(), bar(), a(), QW = ER, c(), x(), y(), q = 36 + } +} + +lift_sequences_3: { + options = { sequences: true, conditionals: true }; + input: { + x = (foo(), bar(), baz()) ? 10 : 20; + } + expect: { + foo(), bar(), x = baz() ? 10 : 20; + } +} + +lift_sequences_4: { + options = { side_effects: true }; + input: { + x = (foo, bar, baz); + } + expect: { + x = baz; + } +} |