Search in sources :

Example 6 with SystemConsole

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

the class NativesMozillaTest method setUp.

@Before
public void setUp() throws Throwable {
    assumeTrue("Test disabled", test.isEnabled());
    realm.initialize(new SystemConsole(), test);
    exceptionHandler.setExecutionContext(realm.get().defaultContext());
}
Also used : SystemConsole(com.github.anba.es6draft.util.SystemConsole) Before(org.junit.Before)

Example 7 with SystemConsole

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

the class NativesV8Test method setUp.

@Before
public void setUp() throws Throwable {
    assumeTrue("Test disabled", test.isEnabled());
    realm.initialize(new SystemConsole(), test);
    exceptionHandler.setExecutionContext(realm.get().defaultContext());
}
Also used : SystemConsole(com.github.anba.es6draft.util.SystemConsole) Before(org.junit.Before)

Example 8 with SystemConsole

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

the class NodeLoaderTest method setUp.

@Before
public void setUp() throws Throwable {
    assumeTrue("Test disabled", test.isEnabled());
    realm.initialize(new SystemConsole(), test);
    exceptionHandler.setExecutionContext(realm.get().defaultContext());
}
Also used : SystemConsole(com.github.anba.es6draft.util.SystemConsole) Before(org.junit.Before)

Example 9 with SystemConsole

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

the class ScriptTest method setUp.

@Before
public void setUp() throws Throwable {
    assumeTrue("Test disabled", test.isEnabled());
    realm.initialize(new SystemConsole(), test);
    exceptionHandler.setExecutionContext(realm.get().defaultContext());
}
Also used : SystemConsole(com.github.anba.es6draft.util.SystemConsole) Before(org.junit.Before)

Example 10 with SystemConsole

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

the class UnhandledRejectionTest method setUp.

@Before
public void setUp() throws Throwable {
    assumeTrue("Test disabled", test.isEnabled());
    realm.initialize(new SystemConsole(), test);
    exceptionHandler.setExecutionContext(realm.get().defaultContext());
    timers = realm.get().createGlobalProperties(new Timers(), Timers.class);
    if (test.negative) {
        expected.expect(Matchers.either(Matchers.instanceOf(UnhandledRejectionException.class)).or(Matchers.instanceOf(MissingRejectionException.class)));
    } else {
        errorHandler.match(StandardErrorHandler.defaultMatcher());
        exceptionHandler.match(ScriptExceptionHandler.defaultMatcher());
    }
}
Also used : UnhandledRejectionException(com.github.anba.es6draft.runtime.internal.UnhandledRejectionException) SystemConsole(com.github.anba.es6draft.util.SystemConsole) Timers(com.github.anba.es6draft.runtime.extensions.timer.Timers) Before(org.junit.Before)

Aggregations

SystemConsole (com.github.anba.es6draft.util.SystemConsole)11 Before (org.junit.Before)10 Timers (com.github.anba.es6draft.runtime.extensions.timer.Timers)3 RuntimeContext (com.github.anba.es6draft.runtime.internal.RuntimeContext)1 ScriptLoader (com.github.anba.es6draft.runtime.internal.ScriptLoader)1 Source (com.github.anba.es6draft.runtime.internal.Source)1 UnhandledRejectionException (com.github.anba.es6draft.runtime.internal.UnhandledRejectionException)1 Test (org.junit.Test)1