Search in sources :

Example 1 with CompatibilityOption

use of com.github.anba.es6draft.runtime.internal.CompatibilityOption in project es6draft by anba.

the class TestGlobals method before.

@Override
protected void before() throws Throwable {
    if (!Resources.isEnabled(configuration)) {
        // skip initialization if test suite not enabled
        return;
    }
    scriptCache = new ScriptCache();
    // read options ...
    EnumSet<CompatibilityOption> compatibilityOptions = EnumSet.noneOf(CompatibilityOption.class);
    optionsFromMode(compatibilityOptions, configuration.getString("mode", DEFAULT_MODE));
    optionsFromVersion(compatibilityOptions, configuration.getString("version", DEFAULT_VERSION));
    optionsFromStage(compatibilityOptions, configuration.getString("stage", DEFAULT_STAGE));
    optionsFromFeatures(compatibilityOptions, configuration.getList("features", DEFAULT_FEATURES));
    options = compatibilityOptions;
    // pre-compile initialization scripts and modules
    scripts = compileScripts();
    modules = compileModules();
}
Also used : CompatibilityOption(com.github.anba.es6draft.runtime.internal.CompatibilityOption) ScriptCache(com.github.anba.es6draft.runtime.internal.ScriptCache)

Aggregations

CompatibilityOption (com.github.anba.es6draft.runtime.internal.CompatibilityOption)1 ScriptCache (com.github.anba.es6draft.runtime.internal.ScriptCache)1