Minor in JS tests: load and cache kotlin_lib_compiled.js

This commit is contained in:
Zalim Bashorov
2014-10-01 14:34:15 +04:00
parent ce4bbb906b
commit dd1fffae40
@@ -171,8 +171,12 @@ public final class RhinoUtils {
versionToScope.put(version, parentScope);
}
else {
// reset declared modules
NativeObject kotlin = (NativeObject) parentScope.get("Kotlin");
kotlin.put("modules", kotlin, new NativeObject());
NativeObject modules = (NativeObject) kotlin.get("modules");
modules.setAttributes("JS_TESTS", 0);
modules.remove("JS_TESTS");
}
return parentScope;
}
@@ -183,6 +187,7 @@ public final class RhinoUtils {
try {
runFileWithRhino(getKotlinLibFile(version), context, scope);
runFileWithRhino(pathToTestFilesRoot() + "kotlin_lib.js", context, scope);
runFileWithRhino(pathToTestFilesRoot() + "kotlin_lib_compiled.js", context, scope);
runFileWithRhino(pathToTestFilesRoot() + "maps.js", context, scope);
runFileWithRhino(pathToTestFilesRoot() + "long.js", context, scope);
//runFileWithRhino(pathToTestFilesRoot() + "jshint.js", context, scope);