Vendor things
This commit is contained in:
parent
5deceec006
commit
977e3c17e5
19434 changed files with 10682014 additions and 0 deletions
21
third-party/vendor/wasm-bindgen/tests/headless/strings.js
vendored
Normal file
21
third-party/vendor/wasm-bindgen/tests/headless/strings.js
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
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');
|
||||
|
||||
test('\uFEFFbar');
|
||||
}
|
||||
|
||||
export function identity(s) {
|
||||
return s;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue