diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/passes/duplicate-import-elimination.txt | 17 | ||||
-rw-r--r-- | test/passes/duplicate-import-elimination.wast | 14 |
2 files changed, 31 insertions, 0 deletions
diff --git a/test/passes/duplicate-import-elimination.txt b/test/passes/duplicate-import-elimination.txt new file mode 100644 index 000000000..ee90ebfba --- /dev/null +++ b/test/passes/duplicate-import-elimination.txt @@ -0,0 +1,17 @@ +(module + (type $FUNCSIG$v (func)) + (type $FUNCSIG$vi (func (param i32))) + (import "env" "waka" (func $foo)) + (import "env" "waka" (func $wrong (param i32))) + (table $0 2 2 funcref) + (elem (i32.const 0) $foo $foo) + (export "baz" (func $0)) + (start $foo) + (func $0 (; 2 ;) (type $FUNCSIG$v) + (call $foo) + (call $foo) + (call $wrong + (i32.const 1) + ) + ) +) diff --git a/test/passes/duplicate-import-elimination.wast b/test/passes/duplicate-import-elimination.wast new file mode 100644 index 000000000..cd0c9dbf7 --- /dev/null +++ b/test/passes/duplicate-import-elimination.wast @@ -0,0 +1,14 @@ +(module + (import "env" "waka" (func $foo)) + (import "env" "waka" (func $bar)) + (import "env" "waka" (func $wrong (param i32))) + (table 2 2 funcref) + (elem (i32.const 0) $foo $bar) + (start $bar) + (func "baz" + (call $foo) + (call $bar) + (call $wrong (i32.const 1)) + ) +) + |