Bug 1450310: Move WebAssembly.Global test to the right section; r=lth

--HG--
extra : rebase_source : c4babd1c24de230a7edbf163d18901ea6dbea502
This commit is contained in:
Benjamin Bouvier 2018-04-03 16:18:44 +02:00
parent d8a712a705
commit 67c8163156

View File

@ -130,11 +130,6 @@ if (typeof WebAssembly.Global === "function")
else
assertEq(module.value, 42);
assertEq(wasmEvalText(`(module
(global (import "a" "b") (mut i32))
(func (export "get") (result i32) get_global 0)
)`, { a: { b: 42 } }).exports.get(), 42);
// Can only import numbers (no implicit coercions).
module = new WebAssembly.Module(wasmTextToBinary(`(module
(global (import "globs" "i32") i32)
@ -522,6 +517,14 @@ if (typeof WebAssembly.Global === "function") {
assertEq(j.exports.getter(), 197);
}
// Providing a primitive value to an imported global should internally
// promote it to a Webassembly.Global object.
assertEq(wasmEvalText(`(module
(global (import "a" "b") (mut i32))
(func (export "get") (result i32) get_global 0)
)`, { a: { b: 42 } }).exports.get(), 42);
// TEST THIS LAST
// "value" is deletable