diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/unit.asm.js | 3 | ||||
-rw-r--r-- | test/unit.fromasm | 8 |
2 files changed, 10 insertions, 1 deletions
diff --git a/test/unit.asm.js b/test/unit.asm.js index b9c878613..e5673146d 100644 --- a/test/unit.asm.js +++ b/test/unit.asm.js @@ -41,8 +41,9 @@ function asm() { return !x; } function conversions() { - var i = 0, d = 0.0; + var i = 0, d = 0.0, f = Math_fround(0); i = ~~d; + i = ~~f; d = +(i | 0); d = +(i >>> 0); } diff --git a/test/unit.fromasm b/test/unit.fromasm index 67cf23f11..be62737b9 100644 --- a/test/unit.fromasm +++ b/test/unit.fromasm @@ -135,11 +135,19 @@ (func $conversions (local $i i32) (local $d f64) + (local $f f32) (set_local $i (call_import $f64-to-int (get_local $d) ) ) + (set_local $i + (call_import $f64-to-int + (f64.promote/f32 + (get_local $f) + ) + ) + ) (set_local $d (f64.convert_s/i32 (get_local $i) |