Vendor things
This commit is contained in:
parent
5deceec006
commit
977e3c17e5
19434 changed files with 10682014 additions and 0 deletions
27
third-party/vendor/wasm-bindgen/tests/wasm/char.js
vendored
Normal file
27
third-party/vendor/wasm-bindgen/tests/wasm/char.js
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
const wasm = require('wasm-bindgen-test.js');
|
||||
const assert = require('assert');
|
||||
|
||||
exports.js_identity = a => a;
|
||||
|
||||
exports.js_works = () => {
|
||||
assert.strictEqual(wasm.letter(), 'a');
|
||||
assert.strictEqual(wasm.face(), '😀');
|
||||
assert.strictEqual(wasm.rust_identity(''), '\u0000');
|
||||
assert.strictEqual(wasm.rust_identity('Ղ'), 'Ղ');
|
||||
assert.strictEqual(wasm.rust_identity('ҝ'), 'ҝ');
|
||||
assert.strictEqual(wasm.rust_identity('Δ'), 'Δ');
|
||||
assert.strictEqual(wasm.rust_identity('䉨'), '䉨');
|
||||
assert.strictEqual(wasm.rust_js_identity('a'), 'a');
|
||||
assert.strictEqual(wasm.rust_js_identity('㊻'), '㊻');
|
||||
wasm.rust_letter('a');
|
||||
wasm.rust_face('😀');
|
||||
|
||||
assert.strictEqual(wasm.rust_option_identity(undefined), undefined);
|
||||
assert.strictEqual(wasm.rust_option_identity(null), undefined);
|
||||
assert.strictEqual(wasm.rust_option_identity(''), '\u0000');
|
||||
assert.strictEqual(wasm.rust_option_identity('\u0000'), '\u0000');
|
||||
|
||||
assert.throws(() => wasm.rust_identity(55357), /c.codePointAt is not a function/);
|
||||
assert.throws(() => wasm.rust_identity('\uD83D'), /expected a valid Unicode scalar value, found 55357/);
|
||||
assert.throws(() => wasm.rust_option_identity('\uD83D'), /expected a valid Unicode scalar value, found 55357/);
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue