diff options
Diffstat (limited to 'js/mock_runtime.js')
-rw-r--r-- | js/mock_runtime.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/js/mock_runtime.js b/js/mock_runtime.js index b4f353cdc..9fe59ae06 100644 --- a/js/mock_runtime.js +++ b/js/mock_runtime.js @@ -134,3 +134,14 @@ global.ErrorHandling = () => { }; eval("\n\n notdefined()\n//# sourceURL=helloworld.js"); }; + +global.SendNullAllocPtr = () => { + deno.recv(msg => { + assert(msg instanceof Uint8Array); + assert(msg.byteLength === 4); + assert(msg[0] === "a".charCodeAt(0)); + assert(msg[1] === "b".charCodeAt(0)); + assert(msg[2] === "c".charCodeAt(0)); + assert(msg[3] === "d".charCodeAt(0)); + }); +}; |