summaryrefslogtreecommitdiff
path: root/test/binaryen.js
diff options
context:
space:
mode:
authorDaniel Wirtz <dcode@dcode.io>2021-02-26 09:05:00 +0100
committerGitHub <noreply@github.com>2021-02-26 09:05:00 +0100
commit856c70b5985da942ffea82a613fc8357055020f2 (patch)
tree8780de464948eb4d4e0dc4f622289b4f950a77aa /test/binaryen.js
parent3bc8c3b348699f45131f823b49024138f1992368 (diff)
downloadbinaryen-856c70b5985da942ffea82a613fc8357055020f2.tar.gz
binaryen-856c70b5985da942ffea82a613fc8357055020f2.tar.bz2
binaryen-856c70b5985da942ffea82a613fc8357055020f2.zip
Add RefIsGetOp/SetOp in C and JS API (#3605)
Diffstat (limited to 'test/binaryen.js')
-rw-r--r--test/binaryen.js/expressions.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/binaryen.js/expressions.js b/test/binaryen.js/expressions.js
index 1ffd45362..69081f0e6 100644
--- a/test/binaryen.js/expressions.js
+++ b/test/binaryen.js/expressions.js
@@ -1359,13 +1359,18 @@ console.log("# RefIs");
(function testRefIs() {
const module = new binaryen.Module();
+ var op = binaryen.Operations.RefIsNull;
var value = module.local.get(1, binaryen.externref);
const theRefIs = binaryen.RefIs(module.ref.is_null(value));
assert(theRefIs instanceof binaryen.RefIs);
assert(theRefIs instanceof binaryen.Expression);
+ assert(theRefIs.op === op);
assert(theRefIs.value === value);
assert(theRefIs.type === binaryen.i32);
+ theRefIs.op = op = binaryen.Operations.RefIsFunc;
+ assert(theRefIs.op === op);
+ theRefIs.op = op = binaryen.Operations.RefIsNull;
theRefIs.value = value = module.local.get(2, binaryen.externref);
assert(theRefIs.value === value);
theRefIs.type = binaryen.f64;