Sha256: d247be675cc73540fea4b2e50bb2b7fcedb2b0d511d85be6fb646876d3025562

Contents?: true

Size: 692 Bytes

Versions: 30

Compression:

Stored size: 692 Bytes

Contents

const wasm = require("wasm-bindgen-test.js");
const assert = require("assert");

exports.js_keywords_compile = () => {
  assert.strictEqual(wasm._throw(1), 1);
  assert.strictEqual(wasm._class(1, 2), false);
  assert.strictEqual(wasm.classy(3), 3);
  let obj = new wasm.Class("class");
  assert.strictEqual(wasm.Class.void("string"), "string");
  assert.strictEqual(obj.catch, "class");
  assert.strictEqual(obj.instanceof("Class"), "class is instance of Class");
};

exports.test_keyword_1_as_fn_name = (x) => {
  return wasm._throw(x);
};

exports.test_keyword_2_as_fn_name = (x, y) => {
  return wasm._class(x, y);
};

exports.test_keyword_as_fn_arg = (x) => {
  return wasm.classy(x);
};

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
wasmtime-23.0.2 ./ext/cargo-vendor/wasm-bindgen-0.2.89/tests/wasm/js_keywords.js
wasmtime-22.0.0 ./ext/cargo-vendor/wasm-bindgen-0.2.89/tests/wasm/js_keywords.js
wasmtime-21.0.1 ./ext/cargo-vendor/wasm-bindgen-0.2.89/tests/wasm/js_keywords.js
wasmtime-20.0.2 ./ext/cargo-vendor/wasm-bindgen-0.2.89/tests/wasm/js_keywords.js
wasmtime-20.0.0 ./ext/cargo-vendor/wasm-bindgen-0.2.89/tests/wasm/js_keywords.js
wasmtime-18.0.3 ./ext/cargo-vendor/wasm-bindgen-0.2.89/tests/wasm/js_keywords.js
wasmtime-17.0.1 ./ext/cargo-vendor/wasm-bindgen-0.2.89/tests/wasm/js_keywords.js
wasmtime-17.0.0 ./ext/cargo-vendor/wasm-bindgen-0.2.89/tests/wasm/js_keywords.js
wasmtime-16.0.0 ./ext/cargo-vendor/wasm-bindgen-0.2.89/tests/wasm/js_keywords.js
wasmtime-15.0.1 ./ext/cargo-vendor/wasm-bindgen-0.2.89/tests/wasm/js_keywords.js
wasmtime-15.0.0 ./ext/cargo-vendor/wasm-bindgen-0.2.89/tests/wasm/js_keywords.js
wasmtime-14.0.4 ./ext/cargo-vendor/wasm-bindgen-0.2.87/tests/wasm/js_keywords.js
wasmtime-14.0.3 ./ext/cargo-vendor/wasm-bindgen-0.2.87/tests/wasm/js_keywords.js
wasmtime-14.0.1 ./ext/cargo-vendor/wasm-bindgen-0.2.87/tests/wasm/js_keywords.js
wasmtime-14.0.0 ./ext/cargo-vendor/wasm-bindgen-0.2.87/tests/wasm/js_keywords.js
wasmtime-13.0.0 ./ext/cargo-vendor/wasm-bindgen-0.2.87/tests/wasm/js_keywords.js
wasmtime-12.0.1 ./ext/cargo-vendor/wasm-bindgen-0.2.87/tests/wasm/js_keywords.js
wasmtime-12.0.0 ./ext/cargo-vendor/wasm-bindgen-0.2.87/tests/wasm/js_keywords.js
wasmtime-11.0.0 ./ext/cargo-vendor/wasm-bindgen-0.2.87/tests/wasm/js_keywords.js
wasmtime-10.0.1 ./ext/cargo-vendor/wasm-bindgen-0.2.87/tests/wasm/js_keywords.js