summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/example/c-api-multiple-tables.c6
-rw-r--r--test/example/c-api-multiple-tables.txt4
2 files changed, 8 insertions, 2 deletions
diff --git a/test/example/c-api-multiple-tables.c b/test/example/c-api-multiple-tables.c
index 9d0c9ebfd..625af444c 100644
--- a/test/example/c-api-multiple-tables.c
+++ b/test/example/c-api-multiple-tables.c
@@ -51,9 +51,15 @@ int main() {
assert(t2 != NULL);
assert(strcmp(BinaryenTableGetName(t2), "t2") == 0);
+ BinaryenTableSetName(t2, "table2");
+ assert(strcmp(BinaryenTableGetName(t2), "table2") == 0);
assert(BinaryenTableGetInitial(t2) == 1);
+ BinaryenTableSetInitial(t2, 2);
+ assert(BinaryenTableGetInitial(t2) == 2);
assert(BinaryenTableHasMax(t2) == 1);
assert(BinaryenTableGetMax(t2) == 1);
+ BinaryenTableSetMax(t2, 2);
+ assert(BinaryenTableGetMax(t2) == 2);
assert(strcmp(BinaryenTableImportGetModule(t2), "") == 0);
assert(strcmp(BinaryenTableImportGetBase(t2), "") == 0);
diff --git a/test/example/c-api-multiple-tables.txt b/test/example/c-api-multiple-tables.txt
index c0f2da53b..5b2858e91 100644
--- a/test/example/c-api-multiple-tables.txt
+++ b/test/example/c-api-multiple-tables.txt
@@ -2,8 +2,8 @@
(type $i32_i32_=>_i32 (func (param i32 i32) (result i32)))
(table $tab 1 1 funcref)
(elem (table $tab) (i32.const 0) func $adder)
- (table $t2 1 1 funcref)
- (elem (table $t2) (i32.const 0) func $adder)
+ (table $table2 2 2 funcref)
+ (elem (table $table2) (i32.const 0) func $adder)
(func $adder (param $0 i32) (param $1 i32) (result i32)
(i32.add
(local.get $0)