summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2017-12-08 11:26:28 -0800
committerGitHub <noreply@github.com>2017-12-08 11:26:28 -0800
commit1d0fa771b97a39ce487a202db4785c78a4c5ba29 (patch)
tree7796a1dc2530b2c9634e567cfde792e8635c23b6 /test
parent9c51f2b51ecc57dfad1478bbc6932ec2795b1374 (diff)
downloadbinaryen-1d0fa771b97a39ce487a202db4785c78a4c5ba29.tar.gz
binaryen-1d0fa771b97a39ce487a202db4785c78a4c5ba29.tar.bz2
binaryen-1d0fa771b97a39ce487a202db4785c78a4c5ba29.zip
allow exporting an import (#1326)
Diffstat (limited to 'test')
-rw-r--r--test/export-import.wast8
-rw-r--r--test/export-import.wast.from-wast9
-rw-r--r--test/export-import.wast.fromBinary10
-rw-r--r--test/export-import.wast.fromBinary.noDebugInfo10
4 files changed, 37 insertions, 0 deletions
diff --git a/test/export-import.wast b/test/export-import.wast
new file mode 100644
index 000000000..5dc2185c6
--- /dev/null
+++ b/test/export-import.wast
@@ -0,0 +1,8 @@
+(module
+ (type $v (func))
+ (import "env" "test1" (func $test1))
+ (import "env" "test2" (global $test2 i32))
+ (export "test1" (func $test1))
+ (export "test2" (global $test2))
+)
+
diff --git a/test/export-import.wast.from-wast b/test/export-import.wast.from-wast
new file mode 100644
index 000000000..3675ae243
--- /dev/null
+++ b/test/export-import.wast.from-wast
@@ -0,0 +1,9 @@
+(module
+ (type $v (func))
+ (type $FUNCSIG$v (func))
+ (import "env" "test1" (func $test1))
+ (import "env" "test2" (global $test2 i32))
+ (memory $0 0)
+ (export "test1" (func $test1))
+ (export "test2" (global $test2))
+)
diff --git a/test/export-import.wast.fromBinary b/test/export-import.wast.fromBinary
new file mode 100644
index 000000000..468498a94
--- /dev/null
+++ b/test/export-import.wast.fromBinary
@@ -0,0 +1,10 @@
+(module
+ (type $0 (func))
+ (type $1 (func))
+ (import "env" "test2" (global $import$1 i32))
+ (import "env" "test1" (func $test1))
+ (memory $0 0)
+ (export "test1" (func $test1))
+ (export "test2" (global $import$1))
+)
+
diff --git a/test/export-import.wast.fromBinary.noDebugInfo b/test/export-import.wast.fromBinary.noDebugInfo
new file mode 100644
index 000000000..562a51cc6
--- /dev/null
+++ b/test/export-import.wast.fromBinary.noDebugInfo
@@ -0,0 +1,10 @@
+(module
+ (type $0 (func))
+ (type $1 (func))
+ (import "env" "test2" (global $import$1 i32))
+ (import "env" "test1" (func $import$0))
+ (memory $0 0)
+ (export "test1" (func $import$0))
+ (export "test2" (global $import$1))
+)
+