aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTal Ater <tal@talater.com>2014-09-03 01:35:30 +0300
committerTal Ater <tal@talater.com>2014-09-03 01:35:30 +0300
commit7971ed33d13d33ad2b1ebf1ddcc57c466b819514 (patch)
tree8e11002e9c94488bf3792251c59176fd487c008c
parent885835a655b4c1b3a0a9cb0f78edaa6ac446a0e7 (diff)
downloadtracifyjs-7971ed33d13d33ad2b1ebf1ddcc57c466b819514.tar.gz
tracifyjs-7971ed33d13d33ad2b1ebf1ddcc57c466b819514.zip
Added a test for else if
-rw-r--r--test/compress/conditionals.js9
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;