MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / main

Function main

test/core/test_utf16.cpp:59–69  ·  view source on GitHub ↗

This code tests that UTF16 strings can be marshalled between C++ and JS.

Source from the content-addressed store, hash-verified

57
58// This code tests that UTF16 strings can be marshalled between C++ and JS.
59int main() {
60 // For the conversion of long strings (more than 32 bytes), TextDecoder can be used.
61 testString(u"abc\u2603\u20AC\U0002007C123 --- abc\u2603\u20AC\U0002007C123");
62
63 // But for shorter strings it's never used.
64 testString(u"short\u2603\u20AC\U0002007C123");
65 testString(u"a");
66 testString(u"");
67
68 printf("done\n");
69}

Callers

nothing calls this directly

Calls 2

testStringFunction · 0.85
printfFunction · 0.85

Tested by

no test coverage detected