summaryrefslogtreecommitdiff
path: root/test/example/c-api-kitchen-sink.c
diff options
context:
space:
mode:
authorDaniel Wirtz <dcode@dcode.io>2017-11-13 22:26:12 +0100
committerAlon Zakai <alonzakai@gmail.com>2017-11-13 13:26:12 -0800
commitfd8e78a65ba51fbc636ac6832a0e29501b43838b (patch)
tree301e9d64ab13e4bf4d1a48bf41057fc9f75f1dfc /test/example/c-api-kitchen-sink.c
parent29963c3088ec829e9ad4f889cc13fd21e3ce45f7 (diff)
downloadbinaryen-fd8e78a65ba51fbc636ac6832a0e29501b43838b.tar.gz
binaryen-fd8e78a65ba51fbc636ac6832a0e29501b43838b.tar.bz2
binaryen-fd8e78a65ba51fbc636ac6832a0e29501b43838b.zip
Fix yet another BinaryenAddGlobal tracing issue (#1283)
Now also includes a test.
Diffstat (limited to 'test/example/c-api-kitchen-sink.c')
-rw-r--r--test/example/c-api-kitchen-sink.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/example/c-api-kitchen-sink.c b/test/example/c-api-kitchen-sink.c
index 0802d96cd..3b711d28a 100644
--- a/test/example/c-api-kitchen-sink.c
+++ b/test/example/c-api-kitchen-sink.c
@@ -234,6 +234,11 @@ void test_core() {
// Create the function
BinaryenType localTypes[] = { BinaryenInt32() };
BinaryenFunctionRef sinker = BinaryenAddFunction(module, "kitchen()sinker", iiIfF, localTypes, 1, body);
+
+ // Globals
+
+ BinaryenAddGlobal(module, "a-global", BinaryenInt32(), 0, makeInt32(module, 7));
+ BinaryenAddGlobal(module, "a-mutable-global", BinaryenFloat32(), 1, makeFloat32(module, 7.5));
// Imports