From 9485f788c8c61600f69dc5c2f40a78036f890615 Mon Sep 17 00:00:00 2001 From: Clemens Backes Date: Wed, 2 Oct 2024 16:05:13 +0200 Subject: [PATCH] Use BigInt parameter in 16gb-wasm-memory tests The JS API for Memory was updated in https://github.com/WebAssembly/memory64/issues/68 to require BigInt parameters. --- sdk/tests/conformance2/wasm/bufferdata-16gb-wasm-memory.html | 2 +- sdk/tests/conformance2/wasm/buffersubdata-16gb-wasm-memory.html | 2 +- .../conformance2/wasm/getbuffersubdata-16gb-wasm-memory.html | 2 +- sdk/tests/conformance2/wasm/readpixels-16gb-wasm-memory.html | 2 +- sdk/tests/conformance2/wasm/teximage2d-16gb-wasm-memory.html | 2 +- sdk/tests/conformance2/wasm/texsubimage2d-16gb-wasm-memory.html | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sdk/tests/conformance2/wasm/bufferdata-16gb-wasm-memory.html b/sdk/tests/conformance2/wasm/bufferdata-16gb-wasm-memory.html index ca4d494e5..92228903d 100644 --- a/sdk/tests/conformance2/wasm/bufferdata-16gb-wasm-memory.html +++ b/sdk/tests/conformance2/wasm/bufferdata-16gb-wasm-memory.html @@ -29,7 +29,7 @@ (() => { let view; try { - view = new Uint8Array(new WebAssembly.Memory({ index: 'i64', initial: SIZE / PAGE }).buffer); + view = new Uint8Array(new WebAssembly.Memory({ index: 'i64', initial: BigInt(SIZE / PAGE) }).buffer); } catch (e) { testPassed(`Allocating ${SIZE} threw: ${e}`); return; diff --git a/sdk/tests/conformance2/wasm/buffersubdata-16gb-wasm-memory.html b/sdk/tests/conformance2/wasm/buffersubdata-16gb-wasm-memory.html index 7ce95d8e3..284840e5d 100644 --- a/sdk/tests/conformance2/wasm/buffersubdata-16gb-wasm-memory.html +++ b/sdk/tests/conformance2/wasm/buffersubdata-16gb-wasm-memory.html @@ -29,7 +29,7 @@ (() => { let view; try { - view = new Uint8Array(new WebAssembly.Memory({ index: 'i64', initial: SIZE / PAGE }).buffer); + view = new Uint8Array(new WebAssembly.Memory({ index: 'i64', initial: BigInt(SIZE / PAGE) }).buffer); } catch (e) { testPassed(`Allocating ${SIZE} threw: ${e}`); return; diff --git a/sdk/tests/conformance2/wasm/getbuffersubdata-16gb-wasm-memory.html b/sdk/tests/conformance2/wasm/getbuffersubdata-16gb-wasm-memory.html index 724a9bfa1..42bfa781a 100644 --- a/sdk/tests/conformance2/wasm/getbuffersubdata-16gb-wasm-memory.html +++ b/sdk/tests/conformance2/wasm/getbuffersubdata-16gb-wasm-memory.html @@ -29,7 +29,7 @@ (() => { let view; try { - view = new Uint8Array(new WebAssembly.Memory({ index: 'i64', initial: SIZE / PAGE }).buffer); + view = new Uint8Array(new WebAssembly.Memory({ index: 'i64', initial: BigInt(SIZE / PAGE) }).buffer); } catch (e) { testPassed(`Allocating ${SIZE} threw: ${e}`); return; diff --git a/sdk/tests/conformance2/wasm/readpixels-16gb-wasm-memory.html b/sdk/tests/conformance2/wasm/readpixels-16gb-wasm-memory.html index 21c65a2c7..844e0881b 100644 --- a/sdk/tests/conformance2/wasm/readpixels-16gb-wasm-memory.html +++ b/sdk/tests/conformance2/wasm/readpixels-16gb-wasm-memory.html @@ -30,7 +30,7 @@ (() => { let view; try { - view = new Uint8Array(new WebAssembly.Memory({ index: 'i64', initial: SIZE / PAGE }).buffer); + view = new Uint8Array(new WebAssembly.Memory({ index: 'i64', initial: BigInt(SIZE / PAGE) }).buffer); } catch (e) { testPassed(`Allocating ${SIZE} threw: ${e}`); return; diff --git a/sdk/tests/conformance2/wasm/teximage2d-16gb-wasm-memory.html b/sdk/tests/conformance2/wasm/teximage2d-16gb-wasm-memory.html index 0f39e2ceb..791cc579b 100644 --- a/sdk/tests/conformance2/wasm/teximage2d-16gb-wasm-memory.html +++ b/sdk/tests/conformance2/wasm/teximage2d-16gb-wasm-memory.html @@ -29,7 +29,7 @@ (() => { let view; try { - view = new Uint8Array(new WebAssembly.Memory({ index: 'i64', initial: SIZE / PAGE }).buffer); + view = new Uint8Array(new WebAssembly.Memory({ index: 'i64', initial: BigInt(SIZE / PAGE) }).buffer); } catch (e) { testPassed(`Allocating ${SIZE} threw: ${e}`); return; diff --git a/sdk/tests/conformance2/wasm/texsubimage2d-16gb-wasm-memory.html b/sdk/tests/conformance2/wasm/texsubimage2d-16gb-wasm-memory.html index 7266e88f4..4af628139 100644 --- a/sdk/tests/conformance2/wasm/texsubimage2d-16gb-wasm-memory.html +++ b/sdk/tests/conformance2/wasm/texsubimage2d-16gb-wasm-memory.html @@ -29,7 +29,7 @@ (() => { let view; try { - view = new Uint8Array(new WebAssembly.Memory({ index: 'i64', initial: SIZE / PAGE }).buffer); + view = new Uint8Array(new WebAssembly.Memory({ index: 'i64', initial: BigInt(SIZE / PAGE) }).buffer); } catch (e) { testPassed(`Allocating ${SIZE} threw: ${e}`); return;