summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2015-10-30 17:02:56 -0700
committerAlon Zakai <alonzakai@gmail.com>2015-10-30 17:02:56 -0700
commitb8b69e896b18efbe553bf1c01e4eb3acbfb909f1 (patch)
tree9f52ca49356d939e40a2c4e3809ed309d5d5dc4e /test
parentdce3791b402cc1e49da000cfe918bb21e81b4a6a (diff)
downloadbinaryen-b8b69e896b18efbe553bf1c01e4eb3acbfb909f1.tar.gz
binaryen-b8b69e896b18efbe553bf1c01e4eb3acbfb909f1.tar.bz2
binaryen-b8b69e896b18efbe553bf1c01e4eb3acbfb909f1.zip
fix logical not
Diffstat (limited to 'test')
-rw-r--r--test/unit.asm.js5
-rw-r--r--test/unit.wast16
2 files changed, 21 insertions, 0 deletions
diff --git a/test/unit.asm.js b/test/unit.asm.js
index 2b599d99a..db14f721b 100644
--- a/test/unit.asm.js
+++ b/test/unit.asm.js
@@ -18,9 +18,14 @@ function () {
function doubleCompares(x, y) {
x = +x;
y = +y;
+ if (x > 0.0) return 0.0;
if (x < y) return +x;
return +y;
}
+ function intOps() {
+ var x = 0;
+ return !x;
+ }
function z() {
}
diff --git a/test/unit.wast b/test/unit.wast
index 9e4b19eb4..72e124b41 100644
--- a/test/unit.wast
+++ b/test/unit.wast
@@ -54,6 +54,15 @@
(func $doubleCompares (param $x f64) (param $y f64) (result f64)
(block $topmost
(if
+ (f64.gt
+ (get_local $x)
+ (f64.const 0)
+ )
+ (break $topmost
+ (f64.const 0)
+ )
+ )
+ (if
(f64.lt
(get_local $x)
(get_local $y)
@@ -67,6 +76,13 @@
)
)
)
+ (func $intOps (result i32)
+ (local $x i32)
+ (i32.eq
+ (get_local $x)
+ (i32.const 0)
+ )
+ )
(func $z
(nop)
)