diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/unit.asm.js | 7 | ||||
-rw-r--r-- | test/unit.fromasm | 12 |
2 files changed, 19 insertions, 0 deletions
diff --git a/test/unit.asm.js b/test/unit.asm.js index 491f90835..b9c878613 100644 --- a/test/unit.asm.js +++ b/test/unit.asm.js @@ -8,6 +8,8 @@ function asm() { var Math_abs = global.Math.abs; var Math_ceil = global.Math.ceil; + var abort = env.abort; + function big_negative() { var temp = 0.0; temp = +-2147483648; @@ -143,6 +145,11 @@ function asm() { temp = Math_fround(Math_ceil(B)); temp = Math_fround(u * Math_fround(Math_ceil(Math_fround(B)))); } + function aborts() { + abort(); + abort(55); + abort(); + } function z() { } diff --git a/test/unit.fromasm b/test/unit.fromasm index 83376be39..67cf23f11 100644 --- a/test/unit.fromasm +++ b/test/unit.fromasm @@ -4,6 +4,7 @@ (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) (type $FUNCSIG$vf (func (param f32))) (type $FUNCSIG$vi (func (param i32))) + (import $abort "env" "abort" (param i32)) (import $f64-to-int "asm2wasm" "f64-to-int" (param f64) (result i32)) (import $f64-rem "asm2wasm" "f64-rem" (param f64 f64) (result f64)) (export "big_negative" $big_negative) @@ -446,6 +447,17 @@ ) ) ) + (func $aborts + (call_import $abort + (i32.const 0) + ) + (call_import $abort + (i32.const 55) + ) + (call_import $abort + (i32.const 0) + ) + ) (func $z (nop) ) |