test262-automation e9a5a7f918 [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) (#1620)
* [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)
2018-07-03 15:59:58 -04:00

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");