diff options
author | Michael <mbebenita@Michaels-MacBook-Pro-4.local> | 2016-02-22 15:11:09 -0800 |
---|---|---|
committer | Michael <mbebenita@Michaels-MacBook-Pro-4.local> | 2016-02-22 15:20:23 -0800 |
commit | af0f6ef999e8ddf9c168b697710fd313883e8807 (patch) | |
tree | 5790caa589d90349a0913f1322a6e42d7db8a043 /test/print | |
parent | 75a6357e2b57a908f955e4cc7b3e9e627524f385 (diff) | |
download | binaryen-af0f6ef999e8ddf9c168b697710fd313883e8807.tar.gz binaryen-af0f6ef999e8ddf9c168b697710fd313883e8807.tar.bz2 binaryen-af0f6ef999e8ddf9c168b697710fd313883e8807.zip |
Bug fix and adds printing / parsing tests.
Diffstat (limited to 'test/print')
-rw-r--r-- | test/print/min.minified.txt | 54 | ||||
-rw-r--r-- | test/print/min.minified.wast | 1 |
2 files changed, 55 insertions, 0 deletions
diff --git a/test/print/min.minified.txt b/test/print/min.minified.txt new file mode 100644 index 000000000..b66f98c30 --- /dev/null +++ b/test/print/min.minified.txt @@ -0,0 +1,54 @@ +(module + (memory 16777216 16777216) + (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) + (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) + ) + ) +) diff --git a/test/print/min.minified.wast b/test/print/min.minified.wast new file mode 100644 index 000000000..35ea01ace --- /dev/null +++ b/test/print/min.minified.wast @@ -0,0 +1 @@ +(module(memory 16777216 16777216)(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)(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)))) |