summaryrefslogtreecommitdiff
path: root/test/example/c-api-kitchen-sink.c
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-05-13 18:05:01 -0700
committerAlon Zakai <alonzakai@gmail.com>2016-05-13 18:05:01 -0700
commitec15c34698d91a3e8d315ee853ca4a9b75ca1373 (patch)
treed799ac21755ee8bfba4cf7d02f4c79cc97284b07 /test/example/c-api-kitchen-sink.c
parent63bac0a2ec0b22feadf9652a2292ce66ea6174d7 (diff)
downloadbinaryen-ec15c34698d91a3e8d315ee853ca4a9b75ca1373.tar.gz
binaryen-ec15c34698d91a3e8d315ee853ca4a9b75ca1373.tar.bz2
binaryen-ec15c34698d91a3e8d315ee853ca4a9b75ca1373.zip
allow not providing a name for function types in c api (#501)
Diffstat (limited to 'test/example/c-api-kitchen-sink.c')
-rw-r--r--test/example/c-api-kitchen-sink.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/example/c-api-kitchen-sink.c b/test/example/c-api-kitchen-sink.c
index 8de127340..5276314b1 100644
--- a/test/example/c-api-kitchen-sink.c
+++ b/test/example/c-api-kitchen-sink.c
@@ -225,6 +225,10 @@ void test_core() {
BinaryenFunctionRef starter = BinaryenAddFunction(module, "starter", v, NULL, 0, BinaryenNop(module));
BinaryenSetStart(module, starter);
+ // Unnamed function type
+
+ BinaryenFunctionTypeRef noname = BinaryenAddFunctionType(module, NULL, BinaryenNone(), NULL, 0);
+
// Verify it validates
assert(BinaryenModuleValidate(module));