From 24742589f5471a5e72755d8fe1da9e49923a35ff Mon Sep 17 00:00:00 2001 From: KinderGartenKiller <33396195+mobsceneZ@users.noreply.github.com> Date: Thu, 30 Nov 2023 08:28:11 +0800 Subject: C API: Add BinaryenTableGetType and BinaryenTableSetType (#6137) Fixes #6136 --- test/example/c-api-multiple-tables.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/example/c-api-multiple-tables.c') 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); -- cgit v1.2.3