diff options
-rw-r--r-- | test/unit.asm.js | 4 | ||||
-rw-r--r-- | test/unit.fromasm | 12 | ||||
-rw-r--r-- | test/unit.fromasm.imprecise | 12 |
3 files changed, 17 insertions, 11 deletions
diff --git a/test/unit.asm.js b/test/unit.asm.js index 53e6483ef..c600f714d 100644 --- a/test/unit.asm.js +++ b/test/unit.asm.js @@ -9,6 +9,8 @@ function asm() { var Math_ceil = global.Math.ceil; var abort = env.abort; + var print = env.print; + var h = env.h; function big_negative() { var temp = 0.0; @@ -156,7 +158,7 @@ function asm() { print(1); do { print(5); - if (check()) continue; + if (0) continue; } while (0); print(2); } diff --git a/test/unit.fromasm b/test/unit.fromasm index bc77525c6..a29c38fb5 100644 --- a/test/unit.fromasm +++ b/test/unit.fromasm @@ -6,6 +6,8 @@ (type $FUNCSIG$vf (func (param f32))) (type $FUNCSIG$vi (func (param i32))) (import $abort "env" "abort" (param i32)) + (import $print "env" "print" (param i32)) + (import $h "env" "h" (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) @@ -416,7 +418,7 @@ (nop) (br $for-out$0) ) - (call $h + (call_import $h (get_local $i) ) (set_local $i @@ -461,18 +463,18 @@ ) (func $continues (loop $while-out$0 $while-in$1 - (call $print + (call_import $print (i32.const 1) ) (loop $do-once$2 $unlikely-continue$3 - (call $print + (call_import $print (i32.const 5) ) (br_if $unlikely-continue$3 - (call $check) + (i32.const 0) ) ) - (call $print + (call_import $print (i32.const 2) ) (br $while-in$1) diff --git a/test/unit.fromasm.imprecise b/test/unit.fromasm.imprecise index 94d64b797..cbc342391 100644 --- a/test/unit.fromasm.imprecise +++ b/test/unit.fromasm.imprecise @@ -5,6 +5,8 @@ (type $FUNCSIG$vf (func (param f32))) (type $FUNCSIG$vi (func (param i32))) (import $abort "env" "abort" (param i32)) + (import $print "env" "print" (param i32)) + (import $h "env" "h" (param i32)) (import $f64-rem "asm2wasm" "f64-rem" (param f64 f64) (result f64)) (export "big_negative" $big_negative) (table $z $big_negative $z $z $w $w $importedDoubles $w $z $cneg) @@ -412,7 +414,7 @@ (nop) (br $for-out$0) ) - (call $h + (call_import $h (get_local $i) ) (set_local $i @@ -457,18 +459,18 @@ ) (func $continues (loop $while-out$0 $while-in$1 - (call $print + (call_import $print (i32.const 1) ) (loop $do-once$2 $unlikely-continue$3 - (call $print + (call_import $print (i32.const 5) ) (br_if $unlikely-continue$3 - (call $check) + (i32.const 0) ) ) - (call $print + (call_import $print (i32.const 2) ) (br $while-in$1) |