diff options
author | Daniel Wirtz <dcode@dcode.io> | 2021-02-26 09:05:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-26 09:05:00 +0100 |
commit | 856c70b5985da942ffea82a613fc8357055020f2 (patch) | |
tree | 8780de464948eb4d4e0dc4f622289b4f950a77aa /test/binaryen.js | |
parent | 3bc8c3b348699f45131f823b49024138f1992368 (diff) | |
download | binaryen-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.js | 5 |
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; |