diff options
author | Derek Schuff <dschuff@chromium.org> | 2017-06-27 13:51:39 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-27 13:51:39 -0700 |
commit | bf37733de319b5e0f0b6b0205c1745c5214fea1e (patch) | |
tree | 32418afa8a19f0e3df9b6e91daac1ac35f7eda67 /test/print | |
parent | bc46556496b8086941076ff61bfa481344c1f0d1 (diff) | |
download | binaryen-bf37733de319b5e0f0b6b0205c1745c5214fea1e.tar.gz binaryen-bf37733de319b5e0f0b6b0205c1745c5214fea1e.tar.bz2 binaryen-bf37733de319b5e0f0b6b0205c1745c5214fea1e.zip |
Fix auto_update_tests for printing/minifier tests (#1071)
It was using wasm-shell instead of wasm-opt to print. This was
emitting an error and empty output. Also this means that the min.wast
test input didn't get updated along with the spec, so I fixed that as well.
Diffstat (limited to 'test/print')
-rw-r--r-- | test/print/min.minified.txt | 4 | ||||
-rw-r--r-- | test/print/min.txt | 57 | ||||
-rw-r--r-- | test/print/min.wast | 58 |
3 files changed, 118 insertions, 1 deletions
diff --git a/test/print/min.minified.txt b/test/print/min.minified.txt index e69de29bb..2a3b8a654 100644 --- a/test/print/min.minified.txt +++ b/test/print/min.minified.txt @@ -0,0 +1,4 @@ +(module(type $0 (func(param f32)(result f32)))(type $1 (func(param i32 i32)(result f32)))(type $2 (func(param i32)(result i32)))(type $3 (func(param i32 i32 i32)(result i32)))(memory $0 256 256) +(export "floats" (func $floats))(func $floats(type $0)(param $f f32)(result f32)(local $t f32)(f32.add(get_local $t)(get_local $f)))(func $neg(type $1)(param $k i32)(param $p i32)(result f32)(local $n f32)(tee_local $n(f32.neg(block $block0 (result f32)(i32.store(get_local $k)(get_local $p))(f32.load(get_local $k))))))(func $littleswitch(type $2)(param $x i32)(result i32)(block $topmost (result i32)(block $switch-case$2(block $switch-case$1(br_table $switch-case$1 $switch-case$2 $switch-case$1(i32.sub(get_local $x)(i32.const 1)))) +(br $topmost(i32.const 1))) +(br $topmost(i32.const 2))(i32.const 0)))(func $f1(type $3)(param $i1 i32)(param $i2 i32)(param $i3 i32)(result i32)(block $topmost (result i32)(get_local $i3))))
\ No newline at end of file diff --git a/test/print/min.txt b/test/print/min.txt index e69de29bb..8942f2ff4 100644 --- a/test/print/min.txt +++ b/test/print/min.txt @@ -0,0 +1,57 @@ +(module + (type $0 (func (param f32) (result f32))) + (type $1 (func (param i32 i32) (result f32))) + (type $2 (func (param i32) (result i32))) + (type $3 (func (param i32 i32 i32) (result i32))) + (memory $0 256 256) + (export "floats" (func $floats)) + (func $floats (type $0) (param $f f32) (result f32) + (local $t f32) + (f32.add + (get_local $t) + (get_local $f) + ) + ) + (func $neg (type $1) (param $k i32) (param $p i32) (result f32) + (local $n f32) + (tee_local $n + (f32.neg + (block $block0 (result f32) + (i32.store + (get_local $k) + (get_local $p) + ) + (f32.load + (get_local $k) + ) + ) + ) + ) + ) + (func $littleswitch (type $2) (param $x i32) (result i32) + (block $topmost (result i32) + (block $switch-case$2 + (block $switch-case$1 + (br_table $switch-case$1 $switch-case$2 $switch-case$1 + (i32.sub + (get_local $x) + (i32.const 1) + ) + ) + ) + (br $topmost + (i32.const 1) + ) + ) + (br $topmost + (i32.const 2) + ) + (i32.const 0) + ) + ) + (func $f1 (type $3) (param $i1 i32) (param $i2 i32) (param $i3 i32) (result i32) + (block $topmost (result i32) + (get_local $i3) + ) + ) +) diff --git a/test/print/min.wast b/test/print/min.wast index 1d1f87be6..8ef35a49d 100644 --- a/test/print/min.wast +++ b/test/print/min.wast @@ -1 +1,57 @@ -(module(memory 256 256)(export "floats" $floats)(func $floats(param $f f32)(result f32)(local $t f32)(f32.add(get_local $t)(get_local $f)))(func $neg(param $k i32)(param $p i32)(result f32)(local $n f32)(set_local $n(f32.neg(block $block0(i32.store(get_local $k)(get_local $p))(f32.load(get_local $k))))))(func $littleswitch(param $x i32)(result i32)(block $topmost(tableswitch $switch$0(i32.sub(get_local $x)(i32.const 1))(table(case $switch-case$1)(case $switch-case$2)) (case $switch-case$1)(case $switch-case$1(br $topmost(i32.const 1)))(case $switch-case$2(br $topmost(i32.const 2))))(i32.const 0)))(func $f1(param $i1 i32)(param $i2 i32)(param $i3 i32)(result i32)(block $topmost(get_local $i3)))) +(module + (type $0 (func (param f32) (result f32))) + (type $1 (func (param i32 i32) (result f32))) + (type $2 (func (param i32) (result i32))) + (type $3 (func (param i32 i32 i32) (result i32))) + (memory $0 256 256) + (export "floats" (func $floats)) + (func $floats (type $0) (param $f f32) (result f32) + (local $t f32) + (f32.add + (get_local $t) + (get_local $f) + ) + ) + (func $neg (type $1) (param $k i32) (param $p i32) (result f32) + (local $n f32) + (tee_local $n + (f32.neg + (block $block0 (result f32) + (i32.store + (get_local $k) + (get_local $p) + ) + (f32.load + (get_local $k) + ) + ) + ) + ) + ) + (func $littleswitch (type $2) (param $x i32) (result i32) + (block $topmost (result i32) + (block $switch-case$2 + (block $switch-case$1 + (br_table $switch-case$1 $switch-case$2 $switch-case$1 + (i32.sub + (get_local $x) + (i32.const 1) + ) + ) + ) + (br $topmost + (i32.const 1) + ) + ) + (br $topmost + (i32.const 2) + ) + (i32.const 0) + ) + ) + (func $f1 (type $3) (param $i1 i32) (param $i2 i32) (param $i3 i32) (result i32) + (block $topmost (result i32) + (get_local $i3) + ) + ) +) |