diff --git a/.idea/libraries/js_libs.xml b/.idea/libraries/js_libs.xml index 634e8f6caa6..359f923eeb7 100644 --- a/.idea/libraries/js_libs.xml +++ b/.idea/libraries/js_libs.xml @@ -4,11 +4,9 @@ + - - - - + \ No newline at end of file diff --git a/js/js.tests/js.tests.iml b/js/js.tests/js.tests.iml index aa9f0a6aab3..c6c55dda3aa 100644 --- a/js/js.tests/js.tests.iml +++ b/js/js.tests/js.tests.iml @@ -9,10 +9,11 @@ - - + + + diff --git a/js/js.tests/test/org/jetbrains/k2js/test/ArrayListTest.java b/js/js.tests/test/org/jetbrains/k2js/test/ArrayListTest.java index 78cab15898c..85d4a4706cc 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/ArrayListTest.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/ArrayListTest.java @@ -16,7 +16,7 @@ package org.jetbrains.k2js.test; -import sun.org.mozilla.javascript.internal.JavaScriptException; +import org.mozilla.javascript.JavaScriptException; /** * @author Pavel Talanov diff --git a/js/js.tests/test/org/jetbrains/k2js/test/ClassInheritanceTest.java b/js/js.tests/test/org/jetbrains/k2js/test/ClassInheritanceTest.java index bc1c96ffa65..b9535cb062e 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/ClassInheritanceTest.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/ClassInheritanceTest.java @@ -29,7 +29,7 @@ public final class ClassInheritanceTest extends TranslationTest { } public void testInitializersOfBasicClassExecute() throws Exception { - testFunctionOutput("initializersOfBasicClassExecute.kt", "foo", "box", 3.0); + testFunctionOutput("initializersOfBasicClassExecute.kt", "foo", "box", 3); } public void testMethodOverride() throws Exception { diff --git a/js/js.tests/test/org/jetbrains/k2js/test/ConditionalTest.java b/js/js.tests/test/org/jetbrains/k2js/test/ConditionalTest.java index 3768f1b3270..01bc150435f 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/ConditionalTest.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/ConditionalTest.java @@ -16,7 +16,7 @@ package org.jetbrains.k2js.test; -import sun.org.mozilla.javascript.internal.JavaScriptException; +import org.mozilla.javascript.JavaScriptException; /** * @author Pavel Talanov diff --git a/js/js.tests/test/org/jetbrains/k2js/test/FunctionTest.java b/js/js.tests/test/org/jetbrains/k2js/test/FunctionTest.java index ac001d86a4c..f819c841a4d 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/FunctionTest.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/FunctionTest.java @@ -95,7 +95,6 @@ public class FunctionTest extends AbstractExpressionTest { } - //TODO: this test passes even if does nothing public void testkt921() throws Exception { try { checkOutput("KT-921.kt", ""); diff --git a/js/js.tests/test/org/jetbrains/k2js/test/KotlinLibTest.java b/js/js.tests/test/org/jetbrains/k2js/test/KotlinLibTest.java index 3cdfdc879ef..2fb1afd4e19 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/KotlinLibTest.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/KotlinLibTest.java @@ -16,8 +16,8 @@ package org.jetbrains.k2js.test; -import sun.org.mozilla.javascript.internal.Context; -import sun.org.mozilla.javascript.internal.Scriptable; +import org.mozilla.javascript.Context; +import org.mozilla.javascript.Scriptable; import java.util.Arrays; import java.util.HashMap; diff --git a/js/js.tests/test/org/jetbrains/k2js/test/MiscTest.java b/js/js.tests/test/org/jetbrains/k2js/test/MiscTest.java index 96e2b1a9d6c..b34076ddce0 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/MiscTest.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/MiscTest.java @@ -31,7 +31,7 @@ public final class MiscTest extends AbstractExpressionTest { } public void testLocalPropertys() throws Exception { - testFunctionOutput("localProperty.jet", "foo", "box", 50.0); + testFunctionOutput("localProperty.jet", "foo", "box", 50); } public void testIntRange() throws Exception { diff --git a/js/js.tests/test/org/jetbrains/k2js/test/PatternMatchingTest.java b/js/js.tests/test/org/jetbrains/k2js/test/PatternMatchingTest.java index 552d4ed2731..7bb03d3fd06 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/PatternMatchingTest.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/PatternMatchingTest.java @@ -16,7 +16,7 @@ package org.jetbrains.k2js.test; -import sun.org.mozilla.javascript.internal.JavaScriptException; +import org.mozilla.javascript.JavaScriptException; /** * @author Pavel Talanov @@ -80,7 +80,6 @@ public final class PatternMatchingTest extends TranslationTest { checkFooBoxIsTrue("whenAsExpression.kt"); } - //TODO: public void whenAsExpressionWithThrow() throws Exception { try { checkFooBoxIsTrue("whenAsExpressionWithThrow.kt"); diff --git a/js/js.tests/test/org/jetbrains/k2js/test/RhinoFunctionResultChecker.java b/js/js.tests/test/org/jetbrains/k2js/test/RhinoFunctionResultChecker.java index d10f2b0edc9..947a5f49062 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/RhinoFunctionResultChecker.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/RhinoFunctionResultChecker.java @@ -17,8 +17,8 @@ package org.jetbrains.k2js.test; import org.jetbrains.annotations.Nullable; -import sun.org.mozilla.javascript.internal.Context; -import sun.org.mozilla.javascript.internal.Scriptable; +import org.mozilla.javascript.Context; +import org.mozilla.javascript.Scriptable; import static org.junit.Assert.assertTrue; diff --git a/js/js.tests/test/org/jetbrains/k2js/test/RhinoPropertyTypesChecker.java b/js/js.tests/test/org/jetbrains/k2js/test/RhinoPropertyTypesChecker.java index 18fc0588afe..03ac0a4b841 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/RhinoPropertyTypesChecker.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/RhinoPropertyTypesChecker.java @@ -16,10 +16,10 @@ package org.jetbrains.k2js.test; -import sun.org.mozilla.javascript.internal.Context; -import sun.org.mozilla.javascript.internal.NativeObject; -import sun.org.mozilla.javascript.internal.Scriptable; -import sun.org.mozilla.javascript.internal.ScriptableObject; +import org.mozilla.javascript.Context; +import org.mozilla.javascript.NativeObject; +import org.mozilla.javascript.Scriptable; +import org.mozilla.javascript.ScriptableObject; import java.util.Map; @@ -44,7 +44,7 @@ public final class RhinoPropertyTypesChecker implements RhinoResultChecker { verifyObjectHasExpectedPropertiesOfExpectedTypes(object, propertyToType); } - private void verifyObjectHasExpectedPropertiesOfExpectedTypes + private static void verifyObjectHasExpectedPropertiesOfExpectedTypes (NativeObject object, Map> nameToClassMap) { for (Map.Entry> entry : nameToClassMap.entrySet()) { String name = entry.getKey(); diff --git a/js/js.tests/test/org/jetbrains/k2js/test/RhinoResultChecker.java b/js/js.tests/test/org/jetbrains/k2js/test/RhinoResultChecker.java index 467e29c94e7..273895ed8a8 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/RhinoResultChecker.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/RhinoResultChecker.java @@ -16,12 +16,12 @@ package org.jetbrains.k2js.test; -import sun.org.mozilla.javascript.internal.Context; -import sun.org.mozilla.javascript.internal.Scriptable; +import org.mozilla.javascript.Context; +import org.mozilla.javascript.Scriptable; /** * @author Pavel Talanov */ public interface RhinoResultChecker { - void runChecks(Context context, Scriptable scope) throws Exception; + public void runChecks(Context context, Scriptable scope) throws Exception; } diff --git a/js/js.tests/test/org/jetbrains/k2js/test/RhinoSystemOutputChecker.java b/js/js.tests/test/org/jetbrains/k2js/test/RhinoSystemOutputChecker.java index 53741442a07..2e8a3e38e5f 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/RhinoSystemOutputChecker.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/RhinoSystemOutputChecker.java @@ -18,8 +18,8 @@ package org.jetbrains.k2js.test; import org.jetbrains.annotations.NotNull; import org.jetbrains.k2js.utils.GenerationUtils; -import sun.org.mozilla.javascript.internal.Context; -import sun.org.mozilla.javascript.internal.Scriptable; +import org.mozilla.javascript.Context; +import org.mozilla.javascript.Scriptable; import java.util.List; diff --git a/js/js.tests/test/org/jetbrains/k2js/test/RhinoUtils.java b/js/js.tests/test/org/jetbrains/k2js/test/RhinoUtils.java index ff0fba950d2..6ddf610539d 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/RhinoUtils.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/RhinoUtils.java @@ -16,8 +16,8 @@ package org.jetbrains.k2js.test; -import sun.org.mozilla.javascript.internal.NativeObject; -import sun.org.mozilla.javascript.internal.Scriptable; +import org.mozilla.javascript.NativeObject; +import org.mozilla.javascript.Scriptable; import static org.junit.Assert.assertTrue; diff --git a/js/js.tests/test/org/jetbrains/k2js/test/TranslationTest.java b/js/js.tests/test/org/jetbrains/k2js/test/TranslationTest.java index 4a0013b9771..a3ddd42b756 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/TranslationTest.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/TranslationTest.java @@ -22,8 +22,8 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.jet.lang.psi.JetFile; import org.jetbrains.k2js.config.TestConfig; import org.jetbrains.k2js.facade.K2JSTranslator; -import sun.org.mozilla.javascript.internal.Context; -import sun.org.mozilla.javascript.internal.Scriptable; +import org.mozilla.javascript.Context; +import org.mozilla.javascript.Scriptable; import java.io.File; import java.io.FileInputStream; diff --git a/js/js.translator/lib/js-1.7R2.jar b/js/js.translator/lib/js-1.7R2.jar new file mode 100644 index 00000000000..2369f99a9ed Binary files /dev/null and b/js/js.translator/lib/js-1.7R2.jar differ