summaryrefslogtreecommitdiff
path: root/test/example/c-api-multiple-tables.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/example/c-api-multiple-tables.c')
-rw-r--r--test/example/c-api-multiple-tables.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/example/c-api-multiple-tables.c b/test/example/c-api-multiple-tables.c
index 7cd215bf9..4d1eefcfc 100644
--- a/test/example/c-api-multiple-tables.c
+++ b/test/example/c-api-multiple-tables.c
@@ -62,6 +62,11 @@ int main() {
assert(BinaryenElementSegmentGetLength(elem1) == 1);
assert(strcmp(BinaryenElementSegmentGetData(elem1, 0), funcNames[0]) == 0);
+ assert(BinaryenTableGetType(t2) == BinaryenTypeFuncref());
+ BinaryenTableSetType(t2, BinaryenTypeExternref());
+ assert(BinaryenTableGetType(t2) == BinaryenTypeExternref());
+ BinaryenTableSetType(t2, BinaryenTypeFuncref());
+
assert(strcmp(BinaryenTableGetName(t2), "t2") == 0);
BinaryenTableSetName(t2, "table2");
BinaryenModuleUpdateMaps(module);