Add tests
authorAnthony Van de Gejuchte <anthonyvdgent@gmail.com>
Fri, 18 Dec 2015 13:39:48 +0000 (14:39 +0100)
committerAnthony Van de Gejuchte <anthonyvdgent@gmail.com>
Fri, 18 Dec 2015 13:39:48 +0000 (14:39 +0100)
test/compress/loops.js

index cdf1f04..b7194fe 100644 (file)
@@ -121,3 +121,25 @@ drop_if_else_break_4: {
         for (; bar() && (x(), y(), foo());) baz(), z(), k();
     }
 }
+
+parse_do_while_with_semicolon: {
+    input: {
+        do {
+            x();
+        } while (false);y()
+    }
+    expect: {
+        do x(); while (false);y();
+    }
+}
+
+parse_do_while_without_semicolon: {
+    input: {
+        do {
+            x();
+        } while (false)y()
+    }
+    expect: {
+        do x(); while (false);y();
+    }
+}
\ No newline at end of file