From 545237530a19c60791c2d5c7c93dfe72cba66774 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Mon, 2 May 2022 11:04:51 +0200 Subject: [PATCH] [wasm] Add test for Global constructor with v128. --- wasm/jsapi/global/constructor.any.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wasm/jsapi/global/constructor.any.js b/wasm/jsapi/global/constructor.any.js index f536f5d7b5df6c..c7b82d6b55fe85 100644 --- a/wasm/jsapi/global/constructor.any.js +++ b/wasm/jsapi/global/constructor.any.js @@ -87,6 +87,11 @@ test(() => { } }, "Invalid type argument"); +test(() => { + const argument = { "value": "v128" }; + assert_throws_js(WebAssembly.LinkError, () => new WebAssembly.Global(argument)); +}, "Construct v128 global"); + test(() => { const argument = { "value": "i64" }; const global = new WebAssembly.Global(argument);