diff options
Diffstat (limited to 'test/example')
-rw-r--r-- | test/example/c-api-kitchen-sink.c | 51 | ||||
-rw-r--r-- | test/example/c-api-kitchen-sink.txt | 24 |
2 files changed, 67 insertions, 8 deletions
diff --git a/test/example/c-api-kitchen-sink.c b/test/example/c-api-kitchen-sink.c index b2b35da16..4a1f53e3c 100644 --- a/test/example/c-api-kitchen-sink.c +++ b/test/example/c-api-kitchen-sink.c @@ -1137,49 +1137,78 @@ void test_core() { makeInt32(module, 0), makeInt32(module, 0), 0, - 0), + 0, + false), + BinaryenStringNew(module, + BinaryenStringNewUTF8(), + makeInt32(module, 0), + makeInt32(module, 0), + 0, + 0, + true), BinaryenStringNew(module, BinaryenStringNewWTF8(), makeInt32(module, 0), makeInt32(module, 0), 0, - 0), + 0, + false), BinaryenStringNew(module, BinaryenStringNewReplace(), makeInt32(module, 0), makeInt32(module, 0), 0, - 0), + 0, + false), BinaryenStringNew(module, BinaryenStringNewWTF16(), makeInt32(module, 0), makeInt32(module, 0), 0, - 0), + 0, + false), BinaryenStringNew(module, BinaryenStringNewUTF8Array(), BinaryenGlobalGet(module, "i8Array-global", i8Array), 0, makeInt32(module, 0), - makeInt32(module, 0)), + makeInt32(module, 0), + false), + BinaryenStringNew(module, + BinaryenStringNewUTF8Array(), + BinaryenGlobalGet(module, "i8Array-global", i8Array), + 0, + makeInt32(module, 0), + makeInt32(module, 0), + true), BinaryenStringNew(module, BinaryenStringNewWTF8Array(), BinaryenGlobalGet(module, "i8Array-global", i8Array), 0, makeInt32(module, 0), - makeInt32(module, 0)), + makeInt32(module, 0), + false), BinaryenStringNew(module, BinaryenStringNewReplaceArray(), BinaryenGlobalGet(module, "i8Array-global", i8Array), 0, makeInt32(module, 0), - makeInt32(module, 0)), + makeInt32(module, 0), + false), BinaryenStringNew(module, BinaryenStringNewWTF16Array(), BinaryenGlobalGet(module, "i16Array-global", i8Array), 0, makeInt32(module, 0), - makeInt32(module, 0)), + makeInt32(module, 0), + false), + BinaryenStringNew(module, + BinaryenStringNewFromCodePoint(), + makeInt32(module, 1), + 0, + 0, + 0, + false), BinaryenStringConst(module, "hello world"), BinaryenStringMeasure( module, @@ -1246,6 +1275,12 @@ void test_core() { BinaryenGlobalGet(module, "string-global", BinaryenTypeStringref())), BinaryenStringEq( module, + BinaryenStringEqEqual(), + BinaryenGlobalGet(module, "string-global", BinaryenTypeStringref()), + BinaryenGlobalGet(module, "string-global", BinaryenTypeStringref())), + BinaryenStringEq( + module, + BinaryenStringEqCompare(), BinaryenGlobalGet(module, "string-global", BinaryenTypeStringref()), BinaryenGlobalGet(module, "string-global", BinaryenTypeStringref())), BinaryenStringAs( diff --git a/test/example/c-api-kitchen-sink.txt b/test/example/c-api-kitchen-sink.txt index 510060317..bd0d0e16f 100644 --- a/test/example/c-api-kitchen-sink.txt +++ b/test/example/c-api-kitchen-sink.txt @@ -2209,6 +2209,12 @@ BinaryenFeatureAll: 126975 ) ) (drop + (string.new_utf8_try + (i32.const 0) + (i32.const 0) + ) + ) + (drop (string.new_wtf8 wtf8 (i32.const 0) (i32.const 0) @@ -2234,6 +2240,13 @@ BinaryenFeatureAll: 126975 ) ) (drop + (string.new_utf8_array_try + (global.get $i8Array-global) + (i32.const 0) + (i32.const 0) + ) + ) + (drop (string.new_wtf8_array wtf8 (global.get $i8Array-global) (i32.const 0) @@ -2255,6 +2268,11 @@ BinaryenFeatureAll: 126975 ) ) (drop + (string.from_code_point + (i32.const 1) + ) + ) + (drop (string.const "hello world") ) (drop @@ -2336,6 +2354,12 @@ BinaryenFeatureAll: 126975 ) ) (drop + (string.compare + (global.get $string-global) + (global.get $string-global) + ) + ) + (drop (string.as_wtf8 (global.get $string-global) ) |