From dd1fffae405cf677ebd64d39e7b4fc12eb92121c Mon Sep 17 00:00:00 2001 From: Zalim Bashorov Date: Wed, 1 Oct 2014 14:34:15 +0400 Subject: [PATCH] Minor in JS tests: load and cache kotlin_lib_compiled.js --- .../test/org/jetbrains/k2js/test/rhino/RhinoUtils.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/js/js.tests/test/org/jetbrains/k2js/test/rhino/RhinoUtils.java b/js/js.tests/test/org/jetbrains/k2js/test/rhino/RhinoUtils.java index 3ea872ec29b..65856297287 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/rhino/RhinoUtils.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/rhino/RhinoUtils.java @@ -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);