summaryrefslogtreecommitdiff
path: root/test/binaryen.js/kitchen-sink.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/binaryen.js/kitchen-sink.js')
-rw-r--r--test/binaryen.js/kitchen-sink.js33
1 files changed, 18 insertions, 15 deletions
diff --git a/test/binaryen.js/kitchen-sink.js b/test/binaryen.js/kitchen-sink.js
index 93ed27334..e82090858 100644
--- a/test/binaryen.js/kitchen-sink.js
+++ b/test/binaryen.js/kitchen-sink.js
@@ -48,44 +48,47 @@ function makeDroppedInt32(x) {
function test_types() {
console.log(" // BinaryenTypeNone: " + binaryen.none);
- console.log(" //", binaryen.expandType(binaryen.none));
+ console.log(" //", binaryen.expandType(binaryen.none).join(","));
console.log(" // BinaryenTypeUnreachable: " + binaryen.unreachable);
- console.log(" //", binaryen.expandType(binaryen.unreachable));
+ console.log(" //", binaryen.expandType(binaryen.unreachable).join(","));
console.log(" // BinaryenTypeInt32: " + binaryen.i32);
- console.log(" //", binaryen.expandType(binaryen.i32));
+ console.log(" //", binaryen.expandType(binaryen.i32).join(","));
console.log(" // BinaryenTypeInt64: " + binaryen.i64);
- console.log(" //", binaryen.expandType(binaryen.i64));
+ console.log(" //", binaryen.expandType(binaryen.i64).join(","));
console.log(" // BinaryenTypeFloat32: " + binaryen.f32);
- console.log(" //", binaryen.expandType(binaryen.f32));
+ console.log(" //", binaryen.expandType(binaryen.f32).join(","));
console.log(" // BinaryenTypeFloat64: " + binaryen.f64);
- console.log(" //", binaryen.expandType(binaryen.f64));
+ console.log(" //", binaryen.expandType(binaryen.f64).join(","));
console.log(" // BinaryenTypeVec128: " + binaryen.v128);
- console.log(" //", binaryen.expandType(binaryen.v128));
+ console.log(" //", binaryen.expandType(binaryen.v128).join(","));
+
+ console.log(" // BinaryenTypeFuncref: " + binaryen.funcref);
+ console.log(" //", binaryen.expandType(binaryen.funcref).join(","));
console.log(" // BinaryenTypeExternref: " + binaryen.externref);
- console.log(" //", binaryen.expandType(binaryen.externref));
+ console.log(" //", binaryen.expandType(binaryen.externref).join(","));
console.log(" // BinaryenTypeExnref: " + binaryen.exnref);
- console.log(" //", binaryen.expandType(binaryen.exnref));
+ console.log(" //", binaryen.expandType(binaryen.exnref).join(","));
console.log(" // BinaryenTypeAuto: " + binaryen.auto);
var i32_pair = binaryen.createType([binaryen.i32, binaryen.i32]);
- console.log(" //", binaryen.expandType(i32_pair));
+ console.log(" //", binaryen.expandType(i32_pair).join(","));
var duplicate_pair = binaryen.createType([binaryen.i32, binaryen.i32]);
- console.log(" //", binaryen.expandType(duplicate_pair));
+ console.log(" //", binaryen.expandType(duplicate_pair).join(","));
assert(i32_pair == duplicate_pair);
var f32_pair = binaryen.createType([binaryen.f32, binaryen.f32]);
- console.log(" //", binaryen.expandType(f32_pair));
+ console.log(" //", binaryen.expandType(f32_pair).join(","));
}
function test_features() {
@@ -502,9 +505,10 @@ function test_core() {
module.return_call_indirect(makeInt32(2449), [ makeInt32(13), makeInt64(37, 0), makeFloat32(1.3), makeFloat64(3.7) ], iIfF, binaryen.i32),
// Reference types
- module.ref.is_null(module.ref.null()),
+ module.ref.is_null(module.ref.null(binaryen.externref)),
+ module.ref.is_null(module.ref.null(binaryen.funcref)),
module.ref.is_null(module.ref.func("kitchen()sinker")),
- module.select(temp10, module.ref.null(), module.ref.func("kitchen()sinker"), binaryen.funcref),
+ module.select(temp10, module.ref.null(binaryen.funcref), module.ref.func("kitchen()sinker"), binaryen.funcref),
// Exception handling
module.try(
@@ -563,7 +567,6 @@ function test_core() {
module.v128.pop(),
module.externref.pop(),
module.funcref.pop(),
- module.nullref.pop(),
module.exnref.pop(),
// TODO: Host
module.nop(),