mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-12-14 20:11:37 +03:00
15 lines
255 B
JavaScript
15 lines
255 B
JavaScript
|
const wasm = require('wasm-bindgen-test.js');
|
||
|
const assert = require('assert');
|
||
|
|
||
|
exports.call_throw_one = function() {
|
||
|
try {
|
||
|
wasm.throw_one();
|
||
|
} catch (e) {
|
||
|
assert.strictEqual(e, 1);
|
||
|
}
|
||
|
};
|
||
|
|
||
|
exports.call_ok = function() {
|
||
|
wasm.nothrow();
|
||
|
};
|