summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/binaryen.js/reloc.js2
-rw-r--r--test/example/c-api-kitchen-sink.c6
-rw-r--r--test/example/c-api-multiple-tables.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/test/binaryen.js/reloc.js b/test/binaryen.js/reloc.js
index 2b7cc9f90..0235ea413 100644
--- a/test/binaryen.js/reloc.js
+++ b/test/binaryen.js/reloc.js
@@ -15,7 +15,7 @@ module.setMemory(1, -1, null, [
var func = module.addFunction("func", binaryen.none, binaryen.none, [], module.nop());
module.addGlobalImport("table_base", "env", "table_base", binaryen.i32, false);
-module.addTable("0", 1, -1);
+module.addTable("0", 1, -1, binaryen.funcref);
module.addActiveElementSegment("0", "0", [ "func", "func" ], module.global.get("table_base", binaryen.i32));
assert(module.validate());
console.log(module.emitText());
diff --git a/test/example/c-api-kitchen-sink.c b/test/example/c-api-kitchen-sink.c
index a13d71cdb..633f4f1ff 100644
--- a/test/example/c-api-kitchen-sink.c
+++ b/test/example/c-api-kitchen-sink.c
@@ -319,7 +319,7 @@ void test_core() {
// Tags
BinaryenAddTag(module, "a-tag", BinaryenTypeInt32(), BinaryenTypeNone());
- BinaryenAddTable(module, "tab", 0, 100);
+ BinaryenAddTable(module, "tab", 0, 100, BinaryenTypeFuncref());
// Exception handling
@@ -930,7 +930,7 @@ void test_core() {
// Function table. One per module
const char* funcNames[] = { BinaryenFunctionGetName(sinker) };
- BinaryenAddTable(module, "0", 1, 1);
+ BinaryenAddTable(module, "0", 1, 1, BinaryenTypeFuncref());
BinaryenAddActiveElementSegment(
module,
"0",
@@ -1467,7 +1467,7 @@ void test_for_each() {
BinaryenFunctionGetName(fns[2])
};
BinaryenExpressionRef constExprRef = BinaryenConst(module, BinaryenLiteralInt32(0));
- BinaryenAddTable(module, "0", 1, 1);
+ BinaryenAddTable(module, "0", 1, 1, BinaryenTypeFuncref());
BinaryenAddActiveElementSegment(
module, "0", "0", funcNames, 3, constExprRef);
assert(1 == BinaryenGetNumElementSegments(module));
diff --git a/test/example/c-api-multiple-tables.c b/test/example/c-api-multiple-tables.c
index d9d812d3d..f3a9ba8dd 100644
--- a/test/example/c-api-multiple-tables.c
+++ b/test/example/c-api-multiple-tables.c
@@ -31,7 +31,7 @@ int main() {
BinaryenAddFunction(module, "adder", params, results, NULL, 0, add);
const char* funcNames[] = {"adder"};
- BinaryenAddTable(module, "tab", 1, 1);
+ BinaryenAddTable(module, "tab", 1, 1, BinaryenTypeFuncref());
assert(BinaryenGetTable(module, "tab") != NULL);
BinaryenAddActiveElementSegment(
module,
@@ -41,7 +41,7 @@ int main() {
1,
BinaryenConst(module, BinaryenLiteralInt32(0)));
- BinaryenAddTable(module, "t2", 1, 1);
+ BinaryenAddTable(module, "t2", 1, 1, BinaryenTypeFuncref());
BinaryenAddActiveElementSegment(
module,
"t2",