aboutsummaryrefslogtreecommitdiffstats
path: root/tests/wpt/web-platform-tests/wasm/jsapi/table/assertions.js
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2023-06-26 10:48:30 +0200
committerMartin Robinson <mrobinson@igalia.com>2023-06-26 10:48:30 +0200
commit1359e8e4624d10ceb0bf55bcb1cb2903141c6d38 (patch)
tree131f289fd18efb5b28653f6b5d83953f8e6c820b /tests/wpt/web-platform-tests/wasm/jsapi/table/assertions.js
parentf017169ae482effc446384050e79b752bd9ddfe5 (diff)
downloadservo-1359e8e4624d10ceb0bf55bcb1cb2903141c6d38.tar.gz
servo-1359e8e4624d10ceb0bf55bcb1cb2903141c6d38.zip
Move `tests/wpt/web-platform-tests` to `tests/wpt/tests`
Diffstat (limited to 'tests/wpt/web-platform-tests/wasm/jsapi/table/assertions.js')
-rw-r--r--tests/wpt/web-platform-tests/wasm/jsapi/table/assertions.js24
1 files changed, 0 insertions, 24 deletions
diff --git a/tests/wpt/web-platform-tests/wasm/jsapi/table/assertions.js b/tests/wpt/web-platform-tests/wasm/jsapi/table/assertions.js
deleted file mode 100644
index 19cc5c3b92d..00000000000
--- a/tests/wpt/web-platform-tests/wasm/jsapi/table/assertions.js
+++ /dev/null
@@ -1,24 +0,0 @@
-function assert_equal_to_array(table, expected, message) {
- assert_equals(table.length, expected.length, `${message}: length`);
- // The argument check in get() happens before the range check, and negative numbers
- // are illegal, hence will throw TypeError per spec.
- assert_throws_js(TypeError, () => table.get(-1), `${message}: table.get(-1)`);
- for (let i = 0; i < expected.length; ++i) {
- assert_equals(table.get(i), expected[i], `${message}: table.get(${i} of ${expected.length})`);
- }
- assert_throws_js(RangeError, () => table.get(expected.length),
- `${message}: table.get(${expected.length} of ${expected.length})`);
- assert_throws_js(RangeError, () => table.get(expected.length + 1),
- `${message}: table.get(${expected.length + 1} of ${expected.length})`);
-}
-
-function assert_Table(actual, expected) {
- assert_equals(Object.getPrototypeOf(actual), WebAssembly.Table.prototype,
- "prototype");
- assert_true(Object.isExtensible(actual), "extensible");
-
- assert_equals(actual.length, expected.length, "length");
- for (let i = 0; i < expected.length; ++i) {
- assert_equals(actual.get(i), null, `actual.get(${i})`);
- }
-}