diff --git a/compiler/testData/codegen/box/classes/classObjectAsStaticInitializer.kt b/compiler/testData/codegen/box/classes/classObjectAsStaticInitializer.kt index 3b25a4fc056..a28080869ad 100644 --- a/compiler/testData/codegen/box/classes/classObjectAsStaticInitializer.kt +++ b/compiler/testData/codegen/box/classes/classObjectAsStaticInitializer.kt @@ -1,5 +1,6 @@ // Enable for JS when it supports initializer of companion objects. // TARGET_BACKEND: JVM +// see https://youtrack.jetbrains.com/issue/KT-11086 var global = 0; class C { diff --git a/compiler/testData/codegen/box/classes/classObjectToString.kt b/compiler/testData/codegen/box/classes/classObjectToString.kt index 6f860e64091..752805896a3 100644 --- a/compiler/testData/codegen/box/classes/classObjectToString.kt +++ b/compiler/testData/codegen/box/classes/classObjectToString.kt @@ -1,4 +1,4 @@ -// Enable for JS when it supports Java class library. +// TODO: Enable for JS when it supports Java class library. // TARGET_BACKEND: JVM class SomeClass { companion object } diff --git a/compiler/testData/codegen/box/classes/kt1120.kt b/compiler/testData/codegen/box/classes/kt1120.kt index 1cba12a26a7..364def02f1b 100644 --- a/compiler/testData/codegen/box/classes/kt1120.kt +++ b/compiler/testData/codegen/box/classes/kt1120.kt @@ -1,5 +1,5 @@ -// Won't ever work with JS backend. Consider rewriting this test without using threads, since the issue -// is not about threads at all. +// Won't ever work with JS backend. +// TODO: Consider rewriting this test without using threads, since the issue is not about threads at all. // TARGET_BACKEND: JVM object RefreshQueue { diff --git a/compiler/testData/codegen/box/classes/kt1134.kt b/compiler/testData/codegen/box/classes/kt1134.kt index 6bf38c13bc7..9022b6c5a8e 100644 --- a/compiler/testData/codegen/box/classes/kt1134.kt +++ b/compiler/testData/codegen/box/classes/kt1134.kt @@ -1,4 +1,4 @@ -// Enable when JS backend supports Java class library +// TODO: Enable when JS backend supports Java class library // TARGET_BACKEND: JVM public class SomeClass() : java.lang.Object() { } diff --git a/compiler/testData/codegen/box/classes/kt1535.kt b/compiler/testData/codegen/box/classes/kt1535.kt index fef4033a858..1e4c47b0e56 100644 --- a/compiler/testData/codegen/box/classes/kt1535.kt +++ b/compiler/testData/codegen/box/classes/kt1535.kt @@ -1,4 +1,4 @@ -// Enable when JS backend supports Java class library, since FunctionX are required for interoperation +// TODO: Enable when JS backend supports Java class library, since FunctionX are required for interoperation // TARGET_BACKEND: JVM class Works() : Function0 { public override fun invoke():Any { diff --git a/compiler/testData/codegen/box/classes/kt1759.kt b/compiler/testData/codegen/box/classes/kt1759.kt index 75b9a673243..b34b725c39b 100644 --- a/compiler/testData/codegen/box/classes/kt1759.kt +++ b/compiler/testData/codegen/box/classes/kt1759.kt @@ -1,9 +1,6 @@ -// Enable when JS backend supports Java class library, or consider replacing System.out.println with kotlin.println -// TARGET_BACKEND: JVM class Greeter(var name : String) { fun greet() { name = name.plus("") - System.out?.println("Hello, $name"); } } diff --git a/compiler/testData/codegen/box/classes/kt2288.kt b/compiler/testData/codegen/box/classes/kt2288.kt index 5d0494033d8..7ec131fb835 100644 --- a/compiler/testData/codegen/box/classes/kt2288.kt +++ b/compiler/testData/codegen/box/classes/kt2288.kt @@ -1,4 +1,4 @@ -// Enable when JS backend supports Java class library +// TODO: Enable when JS backend supports Java class library // TARGET_BACKEND: JVM public open class Test(): java.util.RandomAccess, Cloneable, java.io.Serializable { diff --git a/compiler/testData/codegen/box/classes/kt2395.kt b/compiler/testData/codegen/box/classes/kt2395.kt index b2229371362..401f2d939b0 100644 --- a/compiler/testData/codegen/box/classes/kt2395.kt +++ b/compiler/testData/codegen/box/classes/kt2395.kt @@ -1,4 +1,4 @@ -// Enable when JS backend supports Java class library +// TODO: Enable when JS backend supports Java class library // TARGET_BACKEND: JVM import java.util.AbstractList diff --git a/compiler/testData/codegen/box/classes/kt2417.kt b/compiler/testData/codegen/box/classes/kt2417.kt index 8703286c2af..bf1fa375e2c 100644 --- a/compiler/testData/codegen/box/classes/kt2417.kt +++ b/compiler/testData/codegen/box/classes/kt2417.kt @@ -1,5 +1,3 @@ -// Enable when bug with when ... !in expression gets fixed -// TARGET_BACKEND: JVM import java.util.HashSet fun box() : String{ diff --git a/compiler/testData/codegen/box/classes/kt2607.kt b/compiler/testData/codegen/box/classes/kt2607.kt index c7e2391dc02..dfb36b942ec 100644 --- a/compiler/testData/codegen/box/classes/kt2607.kt +++ b/compiler/testData/codegen/box/classes/kt2607.kt @@ -1,4 +1,4 @@ -// Enable when JS backend supports local classes +// TODO: Enable when JS backend supports local classes // TARGET_BACKEND: JVM fun box() : String { val o = object { diff --git a/compiler/testData/codegen/box/classes/kt496.kt b/compiler/testData/codegen/box/classes/kt496.kt index 13488b7e1db..e4c31c86a27 100644 --- a/compiler/testData/codegen/box/classes/kt496.kt +++ b/compiler/testData/codegen/box/classes/kt496.kt @@ -1,5 +1,3 @@ -// Enable for JS when it supports Java class library. -// TARGET_BACKEND: JVM fun test1() : Boolean { try { return true @@ -45,9 +43,7 @@ fun test4() : Int { fun test5() : Int { var x = 0 - System.out?.println("test 5") while(true) { - System.out?.println(x) try { if(x < 10) x++ @@ -63,9 +59,7 @@ fun test5() : Int { fun test6() : Int { var x = 0 - System.out?.println("test 6") while(x < 10) { - System.out?.println(x) try { x++ continue @@ -81,7 +75,6 @@ fun box() : String { if(test1()) return "test1 failed" if(test2()) return "test2 failed" if(test3() != 2) return "test3 failed" - System.out?.println(test4()) if(test4() != 0) return "test4 failed" if(test5() != 11) return "test5 failed" if(test6() != 10) return "test6 failed" diff --git a/compiler/testData/codegen/box/classes/kt500.kt b/compiler/testData/codegen/box/classes/kt500.kt index 61aae755ea1..b9c66165f9e 100644 --- a/compiler/testData/codegen/box/classes/kt500.kt +++ b/compiler/testData/codegen/box/classes/kt500.kt @@ -21,8 +21,6 @@ val USER_ID_2 = fun getUserIdFromEnvironment() : Int = throw UnsupportedOperationException() fun box() : String { - // Probably, it's an old debugging code. JS backend still does not support this - //System.out?.println("G: " + GUEST_USER_ID + " U1:" + USER_ID + " U2: " + USER_ID_2) if(USER_ID != 4) return "test0 failed" if(USER_ID_2 != 4) return "test2 failed" if(GUEST_USER_ID != 5) return "test3 failed" diff --git a/compiler/testData/codegen/box/classes/kt501.kt b/compiler/testData/codegen/box/classes/kt501.kt index 52260ba6d94..6705704587e 100644 --- a/compiler/testData/codegen/box/classes/kt501.kt +++ b/compiler/testData/codegen/box/classes/kt501.kt @@ -4,9 +4,6 @@ class Reluctant() { } } -// Probably, it's an old debugging code. JS backend still does not support this -//fun p(o : Any?) = System.out?.println(o) - fun test1() : String { try { val b = Reluctant() diff --git a/compiler/testData/codegen/box/classes/kt504.kt b/compiler/testData/codegen/box/classes/kt504.kt index 0b1d0d8b09f..2f55f67acdd 100644 --- a/compiler/testData/codegen/box/classes/kt504.kt +++ b/compiler/testData/codegen/box/classes/kt504.kt @@ -1,18 +1,17 @@ -// Enable for JS when it supports Java class library. -// TARGET_BACKEND: JVM -// BTW, this test does not seem relevant to real descsription of issue #KT-504 -import java.util.HashMap -import java.io.* +package mult_constructors_3_bug -operator fun MutableMap.set(key : K, value : V) = put(key, value) +public open class Identifier() { + private var myNullable : Boolean = true + companion object { + open public fun init(isNullable : Boolean) : Identifier { + val id = Identifier() + id.myNullable = isNullable + return id + } + } +} fun box() : String { - - val commands : MutableMap = HashMap() - - commands["c1"] = "239" - if(commands["c1"] != "239") return "fail" - - commands["c1"] += "932" - return if(commands["c1"] == "239932") "OK" else "fail" + Identifier.init(true) + return "OK" } diff --git a/compiler/testData/codegen/box/classes/kt508.kt b/compiler/testData/codegen/box/classes/kt508.kt index 2f55f67acdd..dff70796810 100644 --- a/compiler/testData/codegen/box/classes/kt508.kt +++ b/compiler/testData/codegen/box/classes/kt508.kt @@ -1,17 +1,17 @@ -package mult_constructors_3_bug +// TODO: Enable for JS when it supports Java class library. +// TARGET_BACKEND: JVM +import java.util.HashMap +import java.io.* -public open class Identifier() { - private var myNullable : Boolean = true - companion object { - open public fun init(isNullable : Boolean) : Identifier { - val id = Identifier() - id.myNullable = isNullable - return id - } - } -} +operator fun MutableMap.set(key : K, value : V) = put(key, value) fun box() : String { - Identifier.init(true) - return "OK" + + val commands : MutableMap = HashMap() + + commands["c1"] = "239" + if(commands["c1"] != "239") return "fail" + + commands["c1"] += "932" + return if(commands["c1"] == "239932") "OK" else "fail" } diff --git a/compiler/testData/codegen/box/classes/kt5347.kt b/compiler/testData/codegen/box/classes/kt5347.kt index 360c1ec4d22..f9ac309f9de 100644 --- a/compiler/testData/codegen/box/classes/kt5347.kt +++ b/compiler/testData/codegen/box/classes/kt5347.kt @@ -1,4 +1,4 @@ -// Enable when JS backend get support of local classes +// TODO: Enable when JS backend get support of local classes // TARGET_BACKEND: JVM fun test1(str: String): String { data class A(val x: Int) { diff --git a/compiler/testData/codegen/box/classes/kt707.kt b/compiler/testData/codegen/box/classes/kt707.kt index 0918036ba9d..c398b86fcf6 100644 --- a/compiler/testData/codegen/box/classes/kt707.kt +++ b/compiler/testData/codegen/box/classes/kt707.kt @@ -1,4 +1,4 @@ -// Enable for JS when it supports Java class library. +// TODO: Enable for JS when it supports Java class library. // TARGET_BACKEND: JVM class List(val head: T, val tail: List? = null) diff --git a/compiler/testData/codegen/box/classes/kt8011a.kt b/compiler/testData/codegen/box/classes/kt8011a.kt index e011bb30341..27a1662d436 100644 --- a/compiler/testData/codegen/box/classes/kt8011a.kt +++ b/compiler/testData/codegen/box/classes/kt8011a.kt @@ -1,4 +1,4 @@ -// Enable for JS when it supports local classes. +// TODO: Enable for JS when it supports local classes. // TARGET_BACKEND: JVM fun testFun1(str: String): String { diff --git a/compiler/testData/codegen/box/innerNested/dataLocalVariable.kt b/compiler/testData/codegen/box/functions/dataLocalVariable.kt similarity index 73% rename from compiler/testData/codegen/box/innerNested/dataLocalVariable.kt rename to compiler/testData/codegen/box/functions/dataLocalVariable.kt index 35be312cf63..b5ebe37c1a7 100644 --- a/compiler/testData/codegen/box/innerNested/dataLocalVariable.kt +++ b/compiler/testData/codegen/box/functions/dataLocalVariable.kt @@ -1,3 +1,4 @@ +// TODO: Enable when JS backed gets support of Java class library // TARGET_BACKEND: JVM fun ok(b: Boolean) = if (b) "OK" else "Fail" diff --git a/compiler/testData/codegen/box/super/kt4173_3.kt b/compiler/testData/codegen/box/super/kt4173_3.kt index 08f3183fe91..997eab43efc 100644 --- a/compiler/testData/codegen/box/super/kt4173_3.kt +++ b/compiler/testData/codegen/box/super/kt4173_3.kt @@ -1,4 +1,4 @@ -// Local classes are still unsupported +// TODO: enable when JS backend gets support of local classes // TARGET_BACKEND: JVM open class C(s: Int) { diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/native/nested/nativeNestedClassProhibited.kt b/compiler/testData/diagnostics/testsWithJsStdLib/native/nested/nativeNestedClassProhibited.kt index 7462def2508..921382c01c6 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/native/nested/nativeNestedClassProhibited.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/native/nested/nativeNestedClassProhibited.kt @@ -1,5 +1,3 @@ -// !DIAGNOSTICS: -UNUSED_VARIABLE - class A { @native inner class B } diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/unsupportedFeatures/localClassifier.kt b/compiler/testData/diagnostics/testsWithJsStdLib/unsupportedFeatures/localClassifier.kt index 54b14d889bf..1ef0273bbe6 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/unsupportedFeatures/localClassifier.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/unsupportedFeatures/localClassifier.kt @@ -1,5 +1,3 @@ -// !DIAGNOSTICS: -UNUSED_VARIABLE - fun foo() { class A { inner class E { diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/ClassesTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/ClassesTestGenerated.java index 08dbb6c794b..149d42a05e7 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/ClassesTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/ClassesTestGenerated.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2015 JetBrains s.r.o. + * Copyright 2010-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -67,12 +67,6 @@ public class ClassesTestGenerated extends AbstractClassesTest { doTest(fileName); } - @TestMetadata("kt1759.kt") - public void ignoredKt1759() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1759.kt"); - doTest(fileName); - } - @TestMetadata("kt2288.kt") public void ignoredKt2288() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2288.kt"); @@ -85,27 +79,15 @@ public class ClassesTestGenerated extends AbstractClassesTest { doTest(fileName); } - @TestMetadata("kt2417.kt") - public void ignoredKt2417() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2417.kt"); - doTest(fileName); - } - @TestMetadata("kt2607.kt") public void ignoredKt2607() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2607.kt"); doTest(fileName); } - @TestMetadata("kt496.kt") - public void ignoredKt496() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt496.kt"); - doTest(fileName); - } - - @TestMetadata("kt504.kt") - public void ignoredKt504() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt504.kt"); + @TestMetadata("kt508.kt") + public void ignoredKt508() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt508.kt"); doTest(fileName); } @@ -353,6 +335,12 @@ public class ClassesTestGenerated extends AbstractClassesTest { doTest(fileName); } + @TestMetadata("kt1759.kt") + public void testKt1759() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1759.kt"); + doTest(fileName); + } + @TestMetadata("kt1891.kt") public void testKt1891() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1891.kt"); @@ -401,6 +389,12 @@ public class ClassesTestGenerated extends AbstractClassesTest { doTest(fileName); } + @TestMetadata("kt2417.kt") + public void testKt2417() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2417.kt"); + doTest(fileName); + } + @TestMetadata("kt2477.kt") public void testKt2477() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2477.kt"); @@ -515,6 +509,12 @@ public class ClassesTestGenerated extends AbstractClassesTest { doTest(fileName); } + @TestMetadata("kt496.kt") + public void testKt496() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt496.kt"); + doTest(fileName); + } + @TestMetadata("kt500.kt") public void testKt500() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt500.kt"); @@ -527,9 +527,9 @@ public class ClassesTestGenerated extends AbstractClassesTest { doTest(fileName); } - @TestMetadata("kt508.kt") - public void testKt508() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt508.kt"); + @TestMetadata("kt504.kt") + public void testKt504() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt504.kt"); doTest(fileName); } diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/InnerNestedTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/InnerNestedTestGenerated.java index 874adce44b7..b1f4fe3b21e 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/InnerNestedTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/InnerNestedTestGenerated.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2015 JetBrains s.r.o. + * Copyright 2010-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/NestedTypesTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/NestedTypesTestGenerated.java index cdfcde1f5b7..d1d22ed91f4 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/NestedTypesTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/NestedTypesTestGenerated.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2015 JetBrains s.r.o. + * Copyright 2010-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/SuperTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/SuperTestGenerated.java index 64a076803b9..e0406936bb4 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/SuperTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/SuperTestGenerated.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2015 JetBrains s.r.o. + * Copyright 2010-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.