diff options
author | Ben Smith <binji@chromium.org> | 2016-05-09 17:24:01 -0700 |
---|---|---|
committer | Ben Smith <binji@chromium.org> | 2016-05-10 11:38:41 -0700 |
commit | 7805eab628a666979f2f95b0bcc93ab4c60da818 (patch) | |
tree | 656d147f173d4181e5c37b50ce1ada4f11870f17 /test/spec.js | |
parent | 52223631265a9436e3751f0a037d68e16fcbd9fc (diff) | |
download | wabt-7805eab628a666979f2f95b0bcc93ab4c60da818.tar.gz wabt-7805eab628a666979f2f95b0bcc93ab4c60da818.tar.bz2 wabt-7805eab628a666979f2f95b0bcc93ab4c60da818.zip |
update run-tests.py/other scripts for SM support
Diffstat (limited to 'test/spec.js')
-rw-r--r-- | test/spec.js | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/test/spec.js b/test/spec.js index e6a4e7b1..68e56332 100644 --- a/test/spec.js +++ b/test/spec.js @@ -14,8 +14,17 @@ * limitations under the License. */ +/* polyfill from SM to D8 */ +if (typeof arguments == 'undefined') { + arguments = scriptArgs; +} + +if (typeof readbuffer == 'undefined') { + readbuffer = function(path) { return read(path, 'binary'); }; +} + if (arguments.length != 1) { - print('usage: d8 spec.js -- <filename.json>'); + print('usage: <exe> spec.js -- <filename.json>'); quit(0); } @@ -64,7 +73,7 @@ function createModule(a) { var memory = null; var u8a = new Uint8Array(a); var ffi = {spectest: {print: print}}; - var module = Wasm.instantiateModule(u8a.buffer, ffi); + var module = Wasm.instantiateModule(u8a, ffi); memory = module.memory; return module; } |