mirror of
https://github.com/tc39/test262.git
synced 2025-05-03 14:30:27 +02:00
* [javascriptcore-test262-automation] changes from git@github.com:WebKit/webkit.git at sha 949e26452cfa153a7f4afe593da97e2fe9e1b706 on Tue Jul 03 2018 14:35:15 GMT-0400 (Eastern Daylight Time)
34 lines
779 B
JavaScript
34 lines
779 B
JavaScript
"use strict";
|
|
|
|
// This is our nifty way to make modules synchronous.
|
|
let assert;
|
|
import('assert.js').then((module) => {
|
|
assert = module;
|
|
});
|
|
drainMicrotasks();
|
|
|
|
function test(func, description) {
|
|
try {
|
|
func();
|
|
} catch (e) {
|
|
print("Unexpected exception:", description);
|
|
throw e;
|
|
}
|
|
}
|
|
|
|
function promise_test(func, description) {
|
|
assert.asyncTest(func());
|
|
};
|
|
|
|
let assert_equals = assert.eq;
|
|
let assert_true = (x) => assert.eq(x,true);
|
|
let assert_false = (x) => assert.eq(x,false);
|
|
let assert_unreached = () => {
|
|
throw new Error("Should have been unreachable");
|
|
};
|
|
|
|
// This is run from the spec-tests directory
|
|
load("../spec-harness/index.js");
|
|
load("../spec-harness/wasm-constants.js");
|
|
load("../spec-harness/wasm-module-builder.js");
|