diff options
author | Daniel Wirtz <dcode@dcode.io> | 2017-11-13 22:26:12 +0100 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2017-11-13 13:26:12 -0800 |
commit | fd8e78a65ba51fbc636ac6832a0e29501b43838b (patch) | |
tree | 301e9d64ab13e4bf4d1a48bf41057fc9f75f1dfc /test/example/c-api-kitchen-sink.c | |
parent | 29963c3088ec829e9ad4f889cc13fd21e3ce45f7 (diff) | |
download | binaryen-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.c | 5 |
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 |