summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/unit.asm.js4
-rw-r--r--test/unit.wast8
2 files changed, 12 insertions, 0 deletions
diff --git a/test/unit.asm.js b/test/unit.asm.js
index 790678f41..0a664ca3f 100644
--- a/test/unit.asm.js
+++ b/test/unit.asm.js
@@ -106,6 +106,10 @@ function () {
y = +Math_abs(0.0);
z = Math_fround(Math_abs(Math_fround(0)));
}
+ function neg() {
+ var x = Math_fround(0);
+ x = -x;
+ }
function z() {
}
diff --git a/test/unit.wast b/test/unit.wast
index b8823d34f..dd1f59d2d 100644
--- a/test/unit.wast
+++ b/test/unit.wast
@@ -327,6 +327,14 @@
)
)
)
+ (func $neg
+ (local $x f32)
+ (set_local $x
+ (f32.neg
+ (get_local $x)
+ )
+ )
+ )
(func $z
(nop)
)