diff options
| author | David Sherret <dsherret@users.noreply.github.com> | 2021-08-11 10:20:47 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-11 10:20:47 -0400 |
| commit | 15a763152f9d392cb80692262f8de5ef8ae15495 (patch) | |
| tree | fcd1a59777f95920bf3502519983d6cc0d882a9a /cli/tests/testdata/wasm_unreachable.js | |
| parent | a0285e2eb88f6254f6494b0ecd1878db3a3b2a58 (diff) | |
chore: move test files to testdata directory (#11601)
Diffstat (limited to 'cli/tests/testdata/wasm_unreachable.js')
| -rw-r--r-- | cli/tests/testdata/wasm_unreachable.js | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/cli/tests/testdata/wasm_unreachable.js b/cli/tests/testdata/wasm_unreachable.js new file mode 100644 index 000000000..991ebcec8 --- /dev/null +++ b/cli/tests/testdata/wasm_unreachable.js @@ -0,0 +1,50 @@ +// WebAssembly module containing a single function with an unreachable instruction +const binary = Uint8Array.from([ + 0x00, + 0x61, + 0x73, + 0x6d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x01, + 0x04, + 0x01, + 0x60, + 0x00, + 0x00, + 0x03, + 0x02, + 0x01, + 0x00, + 0x07, + 0x0f, + 0x01, + 0x0b, + 0x75, + 0x6e, + 0x72, + 0x65, + 0x61, + 0x63, + 0x68, + 0x61, + 0x62, + 0x6c, + 0x65, + 0x00, + 0x00, + 0x0a, + 0x05, + 0x01, + 0x03, + 0x00, + 0x00, + 0x0b, +]); + +const module = new WebAssembly.Module(binary); +const instance = new WebAssembly.Instance(module); + +instance.exports.unreachable(); |
