summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/example/c-api-kitchen-sink.c8
-rw-r--r--test/example/c-api-kitchen-sink.txt2
2 files changed, 10 insertions, 0 deletions
diff --git a/test/example/c-api-kitchen-sink.c b/test/example/c-api-kitchen-sink.c
index d5681097c..bf80833a0 100644
--- a/test/example/c-api-kitchen-sink.c
+++ b/test/example/c-api-kitchen-sink.c
@@ -549,6 +549,14 @@ void test_core() {
1,
0,
"0");
+ BinaryenAddDataSegment(module, NULL, NULL, true, NULL, "data segment 2", 14);
+ BinaryenAddDataSegment(module,
+ "seg",
+ "0",
+ false,
+ BinaryenConst(module, BinaryenLiteralInt32(0)),
+ "data segment 3",
+ 14);
BinaryenExpressionRef valueList[] = {
// Unary
diff --git a/test/example/c-api-kitchen-sink.txt b/test/example/c-api-kitchen-sink.txt
index 850028a07..469267a4d 100644
--- a/test/example/c-api-kitchen-sink.txt
+++ b/test/example/c-api-kitchen-sink.txt
@@ -91,6 +91,8 @@ BinaryenFeatureAll: 131071
(memory $0 1 256 shared)
(data $0 (i32.const 10) "hello, world")
(data $1 "I am passive")
+ (data $2 "data segment 2")
+ (data $seg (i32.const 0) "data segment 3")
(table $tab 0 100 funcref)
(table $0 1 1 funcref)
(elem $0 (table $0) (i32.const 0) func $"kitchen()sinker")