summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichael Bebenita <mbebenita@gmail.com>2016-05-06 11:10:46 -0700
committerAlon Zakai <alonzakai@gmail.com>2016-05-06 11:10:46 -0700
commitcff4b04d4306e0192c914c2a6281992e2610109c (patch)
treeeaaff0074c4bbb376eea233ce030c4fc70b579a0 /test
parent07f0bad2540a6023ab7b0029b9532e1d44b41c03 (diff)
downloadbinaryen-cff4b04d4306e0192c914c2a6281992e2610109c.tar.gz
binaryen-cff4b04d4306e0192c914c2a6281992e2610109c.tar.bz2
binaryen-cff4b04d4306e0192c914c2a6281992e2610109c.zip
Fix BreakSeeker for switch default targets. (#447)
Diffstat (limited to 'test')
-rw-r--r--test/reg_switch.wast13
-rw-r--r--test/reg_switch.wast.fromBinary17
2 files changed, 30 insertions, 0 deletions
diff --git a/test/reg_switch.wast b/test/reg_switch.wast
new file mode 100644
index 000000000..b53d45f54
--- /dev/null
+++ b/test/reg_switch.wast
@@ -0,0 +1,13 @@
+(module
+ (memory 0)
+ (func $0
+ (if
+ (nop)
+ (block $A
+ (br_table $A
+ (nop)
+ )
+ )
+ )
+ )
+)
diff --git a/test/reg_switch.wast.fromBinary b/test/reg_switch.wast.fromBinary
new file mode 100644
index 000000000..89a2fe061
--- /dev/null
+++ b/test/reg_switch.wast.fromBinary
@@ -0,0 +1,17 @@
+(module
+ (memory 0)
+ (type $0 (func))
+ (func $0 (type $0)
+ (if
+ (nop)
+ (block $label$0
+ (block $label$1
+ (br_table $label$1
+ (nop)
+ )
+ )
+ )
+ )
+ )
+)
+