summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/binaryen.js/kitchen-sink.js1
-rw-r--r--test/binaryen.js/kitchen-sink.js.txt3
-rw-r--r--test/example/c-api-kitchen-sink.c1
-rw-r--r--test/example/c-api-kitchen-sink.txt3
-rw-r--r--test/exception-handling.wast6
-rw-r--r--test/exception-handling.wast.from-wast7
-rw-r--r--test/exception-handling.wast.fromBinary8
-rw-r--r--test/exception-handling.wast.fromBinary.noDebugInfo8
8 files changed, 35 insertions, 2 deletions
diff --git a/test/binaryen.js/kitchen-sink.js b/test/binaryen.js/kitchen-sink.js
index 1efccfd97..8b80e52ef 100644
--- a/test/binaryen.js/kitchen-sink.js
+++ b/test/binaryen.js/kitchen-sink.js
@@ -57,6 +57,7 @@ function test_types() {
console.log("BinaryenTypeFloat32: " + Binaryen.f32);
console.log("BinaryenTypeFloat64: " + Binaryen.f64);
console.log("BinaryenTypeVec128: " + Binaryen.v128);
+ console.log("BinaryenTypeExceptRef: " + Binaryen.except_ref);
console.log("BinaryenTypeUnreachable: " + Binaryen.unreachable);
console.log("BinaryenTypeAuto: " + Binaryen.auto);
}
diff --git a/test/binaryen.js/kitchen-sink.js.txt b/test/binaryen.js/kitchen-sink.js.txt
index 0955fa515..d13519f09 100644
--- a/test/binaryen.js/kitchen-sink.js.txt
+++ b/test/binaryen.js/kitchen-sink.js.txt
@@ -4,7 +4,8 @@ BinaryenTypeInt64: 2
BinaryenTypeFloat32: 3
BinaryenTypeFloat64: 4
BinaryenTypeVec128: 5
-BinaryenTypeUnreachable: 6
+BinaryenTypeExceptRef: 6
+BinaryenTypeUnreachable: 7
BinaryenTypeAuto: -1
BinaryenInvalidId: 0
BinaryenBlockId: 1
diff --git a/test/example/c-api-kitchen-sink.c b/test/example/c-api-kitchen-sink.c
index 66d7bee06..9e996a881 100644
--- a/test/example/c-api-kitchen-sink.c
+++ b/test/example/c-api-kitchen-sink.c
@@ -155,6 +155,7 @@ void test_types() {
printf("BinaryenTypeFloat32: %d\n", BinaryenTypeFloat32());
printf("BinaryenTypeFloat64: %d\n", BinaryenTypeFloat64());
printf("BinaryenTypeVec128: %d\n", BinaryenTypeVec128());
+ printf("BinaryenTypeExceptRef: %d\n", BinaryenTypeExceptRef());
printf("BinaryenTypeUnreachable: %d\n", BinaryenTypeUnreachable());
printf("BinaryenTypeAuto: %d\n", BinaryenTypeAuto());
}
diff --git a/test/example/c-api-kitchen-sink.txt b/test/example/c-api-kitchen-sink.txt
index df193c379..3ac03367b 100644
--- a/test/example/c-api-kitchen-sink.txt
+++ b/test/example/c-api-kitchen-sink.txt
@@ -4,7 +4,8 @@ BinaryenTypeInt64: 2
BinaryenTypeFloat32: 3
BinaryenTypeFloat64: 4
BinaryenTypeVec128: 5
-BinaryenTypeUnreachable: 6
+BinaryenTypeExceptRef: 6
+BinaryenTypeUnreachable: 7
BinaryenTypeAuto: -1
(f32.neg
(f32.const -33.61199951171875)
diff --git a/test/exception-handling.wast b/test/exception-handling.wast
new file mode 100644
index 000000000..ec5c294fc
--- /dev/null
+++ b/test/exception-handling.wast
@@ -0,0 +1,6 @@
+(module
+ (memory 1 1)
+ (func $except_ref_test (param $0 except_ref) (result except_ref)
+ (local.get $0)
+ )
+)
diff --git a/test/exception-handling.wast.from-wast b/test/exception-handling.wast.from-wast
new file mode 100644
index 000000000..3866a3561
--- /dev/null
+++ b/test/exception-handling.wast.from-wast
@@ -0,0 +1,7 @@
+(module
+ (type $0 (func (param except_ref) (result except_ref)))
+ (memory $0 1 1)
+ (func $except_ref_test (; 0 ;) (type $0) (param $0 except_ref) (result except_ref)
+ (local.get $0)
+ )
+)
diff --git a/test/exception-handling.wast.fromBinary b/test/exception-handling.wast.fromBinary
new file mode 100644
index 000000000..9ee5ee175
--- /dev/null
+++ b/test/exception-handling.wast.fromBinary
@@ -0,0 +1,8 @@
+(module
+ (type $0 (func (param except_ref) (result except_ref)))
+ (memory $0 1 1)
+ (func $except_ref_test (; 0 ;) (type $0) (param $0 except_ref) (result except_ref)
+ (local.get $0)
+ )
+)
+
diff --git a/test/exception-handling.wast.fromBinary.noDebugInfo b/test/exception-handling.wast.fromBinary.noDebugInfo
new file mode 100644
index 000000000..0f2c6e467
--- /dev/null
+++ b/test/exception-handling.wast.fromBinary.noDebugInfo
@@ -0,0 +1,8 @@
+(module
+ (type $0 (func (param except_ref) (result except_ref)))
+ (memory $0 1 1)
+ (func $0 (; 0 ;) (type $0) (param $0 except_ref) (result except_ref)
+ (local.get $0)
+ )
+)
+