mirror of
https://github.com/servo/servo.git
synced 2025-08-23 22:35:33 +01:00
Update web-platform-tests to revision 386d27678c48bf468b8d374e2ba718e32185a5b7
This commit is contained in:
parent
c24420ddbe
commit
dd79cdc697
32 changed files with 336 additions and 167 deletions
|
@ -1,3 +1,15 @@
|
|||
/**
|
||||
* `t` should be a function that takes at least three arguments:
|
||||
*
|
||||
* - the name of the test;
|
||||
* - the expected error (to be passed to `assert_throws` or similar);
|
||||
* - a function that takes a `WasmModuleBuilder` and initializes it;
|
||||
* - (optionally) an options object.
|
||||
*
|
||||
* The function is expected to create a test that checks if instantiating a
|
||||
* module with the result of the `WasmModuleBuilder` and the options object
|
||||
* (if any) yields the correct error.
|
||||
*/
|
||||
function test_bad_imports(t) {
|
||||
for (const value of [null, true, "", Symbol(), 1, 0.1, NaN]) {
|
||||
t(`Non-object imports argument: ${format_value(value)}`,
|
||||
|
@ -15,7 +27,7 @@ function test_bad_imports(t) {
|
|||
builder => {
|
||||
builder.addImport("module", "fn", kSig_v_v);
|
||||
},
|
||||
value);
|
||||
imports);
|
||||
}
|
||||
|
||||
t(`Missing imports argument`,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue