diff options
Diffstat (limited to 'test/example')
-rw-r--r-- | test/example/c-api-kitchen-sink.c | 2 | ||||
-rw-r--r-- | test/example/c-api-unused-mem.cpp | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/test/example/c-api-kitchen-sink.c b/test/example/c-api-kitchen-sink.c index bb7a95209..8c41ea124 100644 --- a/test/example/c-api-kitchen-sink.c +++ b/test/example/c-api-kitchen-sink.c @@ -514,7 +514,9 @@ void test_binaries() { y = BinaryenGetLocal(module, 1, BinaryenTypeInt32()); BinaryenExpressionRef add = BinaryenBinary(module, BinaryenAddInt32(), x, y); BinaryenFunctionRef adder = BinaryenAddFunction(module, "adder", iii, NULL, 0, add); + BinaryenSetDebugInfo(1); // include names section size = BinaryenModuleWrite(module, buffer, 1024); // write out the module + BinaryenSetDebugInfo(0); BinaryenModuleDispose(module); } diff --git a/test/example/c-api-unused-mem.cpp b/test/example/c-api-unused-mem.cpp index 852e53b94..dd8fb2e8f 100644 --- a/test/example/c-api-unused-mem.cpp +++ b/test/example/c-api-unused-mem.cpp @@ -81,6 +81,7 @@ int main() { // check that binary read-write works { char buffer[1024]; + BinaryenSetDebugInfo(1); size_t size = BinaryenModuleWrite(the_module, buffer, 1024); printf("%d\n", size); BinaryenModuleRef copy = BinaryenModuleRead(buffer, size); |