1
0
mirror of https://github.com/fluencelabs/wasm-bindgen synced 2025-04-02 10:21:07 +00:00
2019-05-13 08:12:32 -07:00

16 lines
326 B
JavaScript

export function test_string_roundtrip(f) {
const test = expected => {
const actual = f(expected);
if (actual === expected)
return;
throw new Error(`string roundtrip "${actual}" != "${expected}"`);
};
test('');
test('a');
test('💖');
test('a longer string');
test('a longer 💖 string');
}