summaryrefslogtreecommitdiff
path: root/test/wasm2js/indirect-select.wast
diff options
context:
space:
mode:
Diffstat (limited to 'test/wasm2js/indirect-select.wast')
-rw-r--r--test/wasm2js/indirect-select.wast22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/wasm2js/indirect-select.wast b/test/wasm2js/indirect-select.wast
new file mode 100644
index 000000000..fc6f4c470
--- /dev/null
+++ b/test/wasm2js/indirect-select.wast
@@ -0,0 +1,22 @@
+(module
+ (type $none_=>_i32 (func (result i32)))
+ (import "env" "table" (table $timport 6 funcref))
+ (func "foo-true" (param $x i32) (result i32)
+ (call_indirect (type $none_=>_i32)
+ (select
+ (i32.const 1)
+ (i32.const 0)
+ (local.get $x)
+ )
+ )
+ )
+ (func "foo-false" (param $x i32) (result i32)
+ (call_indirect (type $none_=>_i32)
+ (select
+ (i32.const 0)
+ (i32.const 1)
+ (local.get $x)
+ )
+ )
+ )
+)