diff options
author | Ben Smith <binji@chromium.org> | 2016-09-26 17:03:05 -0700 |
---|---|---|
committer | Ben Smith <binji@chromium.org> | 2016-09-29 11:37:27 -0700 |
commit | 1133575d48958ef6cd483e7ecef0ed1001d3ae57 (patch) | |
tree | 3189025965fec901ffb4ee4ae44c17fac8c51e63 /test/interp/br.txt | |
parent | c92a909563d12f81d382df8428d5e4e0e2ee91fc (diff) | |
download | wabt-1133575d48958ef6cd483e7ecef0ed1001d3ae57.tar.gz wabt-1133575d48958ef6cd483e7ecef0ed1001d3ae57.tar.bz2 wabt-1133575d48958ef6cd483e7ecef0ed1001d3ae57.zip |
fix most of the interp tests
Still need to do imports
Diffstat (limited to 'test/interp/br.txt')
-rw-r--r-- | test/interp/br.txt | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/test/interp/br.txt b/test/interp/br.txt index 9de4001d..f62c0bbd 100644 --- a/test/interp/br.txt +++ b/test/interp/br.txt @@ -1,8 +1,7 @@ ;;; TOOL: run-interp (module ;; basic br test - (export "br0" $br0) - (func $br0 (result i32) + (func (export "br0") (result i32) (local i32 i32) (block $exit (if (i32.const 1) (br 1)) ;; if branches introduce blocks @@ -13,8 +12,7 @@ (i32.eq (get_local 1) (i32.const 1))))) ;; test br-ing with a depth > 0 - (export "br1" $br1) - (func $br1 (result i32) + (func (export "br1") (result i32) (local i32 i32 i32) (block $outer (block $inner @@ -28,8 +26,7 @@ (i32.eq (get_local 2) (i32.const 1))))) ;; test br-ing to a label - (export "br2" $br2) - (func $br2 (result i32) + (func (export "br2") (result i32) (block $exit (block (if (i32.const 1) @@ -38,17 +35,17 @@ (return (i32.const 2))) ;; test br-ing in a loop with an exit and continue continuation - (export "br3" $br3) - (func $br3 (result i32) + (func (export "br3") (result i32) (local i32 i32) - (loop $exit $cont - (set_local 0 (i32.add (get_local 0) (i32.const 1))) - (if (i32.ge_s (get_local 0) (i32.const 5)) - (br $exit)) - (if (i32.eq (get_local 0) (i32.const 4)) - (br $cont)) - (set_local 1 (get_local 0)) - (br $cont)) + (block $exit + (loop $cont + (set_local 0 (i32.add (get_local 0) (i32.const 1))) + (if (i32.ge_s (get_local 0) (i32.const 5)) + (br $exit)) + (if (i32.eq (get_local 0) (i32.const 4)) + (br $cont)) + (set_local 1 (get_local 0)) + (br $cont))) (return (get_local 1))) ) (;; STDOUT ;;; |