summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/example/c-api-kitchen-sink.c4
-rw-r--r--test/example/c-api-kitchen-sink.txt1
2 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 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));
diff --git a/test/example/c-api-kitchen-sink.txt b/test/example/c-api-kitchen-sink.txt
index e878984a3..e36e9ba14 100644
--- a/test/example/c-api-kitchen-sink.txt
+++ b/test/example/c-api-kitchen-sink.txt
@@ -12,6 +12,7 @@ BinaryenFloat64: 4
(type $iiIfF (func (param i32 i64 f32 f64) (result i32)))
(type $fiF (func (param i32 f64) (result f32)))
(type $v (func))
+ (type $3 (func))
(import $an-imported "module" "base" (param i32 f64) (result f32))
(export "kitchen_sinker" $kitchen-sinker)
(table $kitchen-sinker)