diff options
author | Tal Ater <tal@talater.com> | 2014-09-03 01:35:30 +0300 |
---|---|---|
committer | Tal Ater <tal@talater.com> | 2014-09-03 01:35:30 +0300 |
commit | 7971ed33d13d33ad2b1ebf1ddcc57c466b819514 (patch) | |
tree | 8e11002e9c94488bf3792251c59176fd487c008c | |
parent | 885835a655b4c1b3a0a9cb0f78edaa6ac446a0e7 (diff) | |
download | tracifyjs-7971ed33d13d33ad2b1ebf1ddcc57c466b819514.tar.gz tracifyjs-7971ed33d13d33ad2b1ebf1ddcc57c466b819514.zip |
Added a test for else if
-rw-r--r-- | test/compress/conditionals.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/compress/conditionals.js b/test/compress/conditionals.js index b0234031..c244dc84 100644 --- a/test/compress/conditionals.js +++ b/test/compress/conditionals.js @@ -246,6 +246,14 @@ cond_7: { x = 2; } + if (y) { + x = 1+1; + } else if (z) { + x = 2; + } else { + x = 3-1; + } + x = y ? 'foo' : 'fo'+'o'; x = y ? 'foo' : y ? 'foo' : 'fo'+'o'; @@ -267,6 +275,7 @@ cond_7: { } expect: { x = 2; + x = 2; x = 'foo'; x = 'foo'; x = y ? a : b; |