Search in sources :

Example 1 with NullConsole

use of com.github.anba.es6draft.util.NullConsole in project es6draft by anba.

the class MozillaJitTest method setUp.

@Before
public void setUp() throws Throwable {
    assumeTrue("Test disabled", moztest.isEnabled());
    global = globals.newGlobal(new NullConsole(), moztest);
    exceptionHandler.setExecutionContext(global.getRealm().defaultContext());
    global.createGlobalProperties(new TestEnvironment(), TestEnvironment.class);
    if (moztest.error == null) {
        errorHandler.match(StandardErrorHandler.defaultMatcher());
        exceptionHandler.match(ScriptExceptionHandler.defaultMatcher());
    } else {
        ExecutionContext cx = global.getRealm().defaultContext();
        expected.expect(Matchers.either(StandardErrorHandler.defaultMatcher()).or(ScriptExceptionHandler.defaultMatcher()));
        expected.expect(hasErrorMessage(cx, containsString(moztest.error)));
    }
}
Also used : ExecutionContext(com.github.anba.es6draft.runtime.ExecutionContext) NullConsole(com.github.anba.es6draft.util.NullConsole) Before(org.junit.Before)

Aggregations

ExecutionContext (com.github.anba.es6draft.runtime.ExecutionContext)1 NullConsole (com.github.anba.es6draft.util.NullConsole)1 Before (org.junit.Before)1