diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/example/c-api-kitchen-sink.c | 9 | ||||
-rw-r--r-- | test/example/c-api-kitchen-sink.txt | 6 |
2 files changed, 6 insertions, 9 deletions
diff --git a/test/example/c-api-kitchen-sink.c b/test/example/c-api-kitchen-sink.c index 4f1d839c0..ddfffb0d7 100644 --- a/test/example/c-api-kitchen-sink.c +++ b/test/example/c-api-kitchen-sink.c @@ -53,15 +53,15 @@ BinaryenExpressionRef makeSomething(BinaryenModuleRef module) { // tests -void test_core() { - - // Core types - +void test_types() { printf("BinaryenNone: %d\n", BinaryenNone()); printf("BinaryenInt32: %d\n", BinaryenInt32()); printf("BinaryenInt64: %d\n", BinaryenInt64()); printf("BinaryenFloat32: %d\n", BinaryenFloat32()); printf("BinaryenFloat64: %d\n", BinaryenFloat64()); +} + +void test_core() { // Module creation @@ -507,6 +507,7 @@ void test_tracing() { } int main() { + test_types(); test_core(); test_relooper(); test_binaries(); diff --git a/test/example/c-api-kitchen-sink.txt b/test/example/c-api-kitchen-sink.txt index e6e266f02..9aab653ac 100644 --- a/test/example/c-api-kitchen-sink.txt +++ b/test/example/c-api-kitchen-sink.txt @@ -817,11 +817,6 @@ module loaded from binary form: ) ) validation: 0 -BinaryenNone: 0 -BinaryenInt32: 1 -BinaryenInt64: 2 -BinaryenFloat32: 3 -BinaryenFloat64: 4 // beginning a Binaryen API trace #include <math.h> #include <map> @@ -834,6 +829,7 @@ int main() { std::map<size_t, RelooperBlockRef> relooperBlocks; BinaryenModuleRef the_module = BinaryenModuleCreate(); RelooperRef the_relooper = NULL; + the_module = BinaryenModuleCreate(); expressions[1] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); expressions[2] = BinaryenConst(the_module, BinaryenLiteralInt64(2)); expressions[3] = BinaryenConst(the_module, BinaryenLiteralFloat32(3.14)); |