diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/unit.asm.js | 11 | ||||
-rw-r--r-- | test/unit.wast | 14 |
2 files changed, 25 insertions, 0 deletions
diff --git a/test/unit.asm.js b/test/unit.asm.js index 77e2c5585..5695c3059 100644 --- a/test/unit.asm.js +++ b/test/unit.asm.js @@ -4,6 +4,7 @@ function () { var t = global.NaN, u = global.Infinity; var Int = 0; var Double = 0.0; + var Math_fround = global.Math.fround; function big_negative() { var temp = 0.0; @@ -64,6 +65,16 @@ function () { x = (4294967295 / 2)&-1; return x | 0; } + function fr(x) { + x = Math_fround(x); + var y = Math_fround(0), z = 0.0; + Math_fround(z); + Math_fround(y); + Math_fround(5); + Math_fround(0); + Math_fround(5.0); + Math_fround(0.0); + } function z() { } diff --git a/test/unit.wast b/test/unit.wast index 34dea557f..24692ba1c 100644 --- a/test/unit.wast +++ b/test/unit.wast @@ -233,6 +233,20 @@ (get_local $x) ) ) + (func $fr (param $x f32) + (local $y f32) + (local $z f64) + (block + (f32.demote/f64 + (get_local $z) + ) + (get_local $y) + (f32.const 5) + (f32.const 0) + (f32.const 5) + (f32.const 0) + ) + ) (func $z (nop) ) |