This code tests that UTF16 strings can be marshalled between C++ and JS.
| 57 | |
| 58 | // This code tests that UTF16 strings can be marshalled between C++ and JS. |
| 59 | int 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 | } |
nothing calls this directly
no test coverage detected