summaryrefslogtreecommitdiff
path: root/deps/v8/test/mjsunit/wasm/globals.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/mjsunit/wasm/globals.js')
-rw-r--r--deps/v8/test/mjsunit/wasm/globals.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/deps/v8/test/mjsunit/wasm/globals.js b/deps/v8/test/mjsunit/wasm/globals.js
index 21f73ebe7e..7b2ffee7ef 100644
--- a/deps/v8/test/mjsunit/wasm/globals.js
+++ b/deps/v8/test/mjsunit/wasm/globals.js
@@ -102,7 +102,7 @@ function TestExported(type, val, expected) {
builder.addGlobal(kWasmI32); // pad
var instance = builder.instantiate();
- assertEquals(expected, instance.exports.foo);
+ assertEquals(expected, instance.exports.foo.value);
}
TestExported(kWasmI32, 455.5, 455);
@@ -118,7 +118,9 @@ TestExported(kWasmF64, 87347.66666, 87347.66666);
g.init = 1234;
builder.addGlobal(kWasmI32); // pad
- assertThrows(()=> {builder.instantiate()}, WebAssembly.LinkError);
+ var instance = builder.instantiate();
+ assertTrue(instance.exports.foo instanceof WebAssembly.Global);
+ assertThrows(() => {instance.exports.foo.value}, TypeError);
})();
function TestImportedExported(type, val, expected) {
@@ -133,7 +135,7 @@ function TestImportedExported(type, val, expected) {
builder.addGlobal(kWasmI32); // pad
var instance = builder.instantiate({ttt: {foo: val}});
- assertEquals(expected, instance.exports.bar);
+ assertEquals(expected, instance.exports.bar.value);
}
TestImportedExported(kWasmI32, 415.5, 415);