Index: test/mjsunit/asm/asm-validation.js |
diff --git a/test/mjsunit/asm/asm-validation.js b/test/mjsunit/asm/asm-validation.js |
index 0925d103ea9c391ff6cb8e8f018a1742cef616fa..5f5ddcfcfc72d770c2bfa45b0dc3b8e234e082a4 100644 |
--- a/test/mjsunit/asm/asm-validation.js |
+++ b/test/mjsunit/asm/asm-validation.js |
@@ -339,6 +339,23 @@ |
assertFalse(%IsAsmWasmCode(Module)); |
})(); |
+(function TestBadishBooleanExprAnnotation() { |
+ function Module() { |
+ "use asm"; |
+ function foo(x) { |
+ x = x | 0; |
+ x = (x + 1) | false; |
+ return x | 0; |
+ } |
+ return { foo: foo }; |
+ } |
+ var m = Module(); |
+ // We all false here because the parser optimizes expressons like: |
+ // !123 to false. |
+ assertTrue(%IsAsmWasmCode(Module)); |
+ assertEquals(4, m.foo(3)); |
+})(); |
+ |
(function TestBadFroundTrue() { |
function Module(stdlib) { |
"use asm"; |