diff --git a/nj2k/testData/newJ2k/arrayInitializerExpression/javaLangDoubleArray.kt b/nj2k/testData/newJ2k/arrayInitializerExpression/javaLangDoubleArray.kt index 06e6879f5de..97a14696c35 100644 --- a/nj2k/testData/newJ2k/arrayInitializerExpression/javaLangDoubleArray.kt +++ b/nj2k/testData/newJ2k/arrayInitializerExpression/javaLangDoubleArray.kt @@ -1 +1 @@ -val a: Array = arrayOf(1.0, 2.0, 3.0) \ No newline at end of file +val a = arrayOf(1.0, 2.0, 3.0) \ No newline at end of file diff --git a/nj2k/testData/newJ2k/arrayInitializerExpression/javaLangFloatArray.kt b/nj2k/testData/newJ2k/arrayInitializerExpression/javaLangFloatArray.kt index 3013b3fd83b..bc1c6f066b3 100644 --- a/nj2k/testData/newJ2k/arrayInitializerExpression/javaLangFloatArray.kt +++ b/nj2k/testData/newJ2k/arrayInitializerExpression/javaLangFloatArray.kt @@ -1 +1 @@ -val a: Array = arrayOf(1.0f, 2f, 3f) \ No newline at end of file +val a = arrayOf(1.0f, 2f, 3f) \ No newline at end of file diff --git a/nj2k/testData/newJ2k/arrayType/arrayInitializationStatement.kt b/nj2k/testData/newJ2k/arrayType/arrayInitializationStatement.kt index 77debe93a02..f3d373d93a6 100644 --- a/nj2k/testData/newJ2k/arrayType/arrayInitializationStatement.kt +++ b/nj2k/testData/newJ2k/arrayType/arrayInitializationStatement.kt @@ -1 +1 @@ -val d2: Array = arrayOf() \ No newline at end of file +val d2: Array = arrayOf() \ No newline at end of file diff --git a/nj2k/testData/newJ2k/arrayType/newStringArray.kt b/nj2k/testData/newJ2k/arrayType/newStringArray.kt index 272212183d5..d52a83f784a 100644 --- a/nj2k/testData/newJ2k/arrayType/newStringArray.kt +++ b/nj2k/testData/newJ2k/arrayType/newStringArray.kt @@ -1 +1 @@ -val a: Array = arrayOf("abc") \ No newline at end of file +val a = arrayOf("abc") \ No newline at end of file diff --git a/nj2k/testData/newJ2k/assignmentExpression/bitOperationPriority.kt b/nj2k/testData/newJ2k/assignmentExpression/bitOperationPriority.kt index 4c988d94351..e1a78268701 100644 --- a/nj2k/testData/newJ2k/assignmentExpression/bitOperationPriority.kt +++ b/nj2k/testData/newJ2k/assignmentExpression/bitOperationPriority.kt @@ -1 +1 @@ -5 shl 16 or (0 shr 8 or 1) \ No newline at end of file +5 shl 16 or (0 shr 8) or 1 \ No newline at end of file diff --git a/nj2k/testData/newJ2k/assignmentExpression/bitOperationPriorityComments.kt b/nj2k/testData/newJ2k/assignmentExpression/bitOperationPriorityComments.kt index a9f5f8dbd95..93e179fdaed 100644 --- a/nj2k/testData/newJ2k/assignmentExpression/bitOperationPriorityComments.kt +++ b/nj2k/testData/newJ2k/assignmentExpression/bitOperationPriorityComments.kt @@ -1 +1 @@ -5 /*operand '5'*/ shl /*left shift*/ 16 /*operand '16'*/ or ( /*or*/ 1 /*operand '1'*/ shr /*right shift*/ 8 /*operand '8'*/ or /*or*/ 0) /*operand '0'*/ /*post comment*/ \ No newline at end of file +5 /*operand '5'*/ shl /*left shift*/ 16 /*operand '16'*/ or (/*or*/ 1 /*operand '1'*/ shr /*right shift*/ 8 /*operand '8'*/) or /*or*/ 0 /*operand '0'*/ /*post comment*/ \ No newline at end of file diff --git a/nj2k/testData/newJ2k/class/ClassShadowing.kt b/nj2k/testData/newJ2k/class/ClassShadowing.kt index d6007b27148..adffbe38d8f 100644 --- a/nj2k/testData/newJ2k/class/ClassShadowing.kt +++ b/nj2k/testData/newJ2k/class/ClassShadowing.kt @@ -11,7 +11,7 @@ class Short(s: String?) { internal object Test { fun test() { Short.valueOf("1") - test.Short.valueOf("1") + Short.valueOf("1") java.lang.Short.valueOf("1") } } \ No newline at end of file diff --git a/nj2k/testData/newJ2k/classExpression/complexExample.kt b/nj2k/testData/newJ2k/classExpression/complexExample.kt index ecc805c709d..a556e00ed2e 100644 --- a/nj2k/testData/newJ2k/classExpression/complexExample.kt +++ b/nj2k/testData/newJ2k/classExpression/complexExample.kt @@ -1 +1 @@ -val constrArgTypes: Array?> = arrayOf(Array::class.java, String::class.java, Int::class.java, Double::class.java) \ No newline at end of file +val constrArgTypes: Array> = arrayOf(Array::class.java, String::class.java, Int::class.java, Double::class.java) \ No newline at end of file diff --git a/nj2k/testData/newJ2k/comments/fieldsInitializedFromParams.kt b/nj2k/testData/newJ2k/comments/fieldsInitializedFromParams.kt index c2fb444e878..1f5217e6a2a 100644 --- a/nj2k/testData/newJ2k/comments/fieldsInitializedFromParams.kt +++ b/nj2k/testData/newJ2k/comments/fieldsInitializedFromParams.kt @@ -1,6 +1,6 @@ -internal class C(private val p1: Int /* parameter p1 */ // field p1 - , +internal class C(private val p1 // field p1 + : Int /* parameter p1 */, /** * Field myP2 */ - private val myP2: Int, /* Field p3 */ var p3: Int) + private val myP2: Int, /* Field p3 */ var p3: Int) \ No newline at end of file diff --git a/nj2k/testData/newJ2k/constructors/nestedClassNameInSuperParameters.kt b/nj2k/testData/newJ2k/constructors/nestedClassNameInSuperParameters.kt index e5dbe31e498..d8143794497 100644 --- a/nj2k/testData/newJ2k/constructors/nestedClassNameInSuperParameters.kt +++ b/nj2k/testData/newJ2k/constructors/nestedClassNameInSuperParameters.kt @@ -6,4 +6,4 @@ internal open class Base(nested: Nested?) { } } -internal class Derived : Base(Base.Nested(Base.Nested.FIELD)) \ No newline at end of file +internal class Derived : Base(Nested(Nested.FIELD)) \ No newline at end of file diff --git a/nj2k/testData/newJ2k/constructors/secondaryConstructorsInNestedClass.kt b/nj2k/testData/newJ2k/constructors/secondaryConstructorsInNestedClass.kt index bbc9badc9b7..01d5a9b070c 100644 --- a/nj2k/testData/newJ2k/constructors/secondaryConstructorsInNestedClass.kt +++ b/nj2k/testData/newJ2k/constructors/secondaryConstructorsInNestedClass.kt @@ -1,5 +1,12 @@ // ERROR: Modifier 'protected' is not applicable inside 'object' internal object Outer { + fun foo() { + val nested1 = Nested1(1) + val nested2 = Nested2(2) + val nested3 = Nested3(3) + val nested4 = Nested4(4) + } + private class Nested1() { constructor(a: Int) : this() {} @@ -36,11 +43,4 @@ internal object Outer { private constructor(b: Boolean) : this() {} } - - fun foo() { - val nested1 = Nested1(1) - val nested2 = Nested2(2) - val nested3 = Nested3(3) - val nested4 = Nested4(4) - } } diff --git a/nj2k/testData/newJ2k/function/java8Lambdas.java b/nj2k/testData/newJ2k/function/java8Lambdas.java index d5fa5874fb6..dea1143955c 100644 --- a/nj2k/testData/newJ2k/function/java8Lambdas.java +++ b/nj2k/testData/newJ2k/function/java8Lambdas.java @@ -28,7 +28,7 @@ public class Java8Class { foo1((Integer i) -> { helper(); if (i > 1) { - return "42"; + return null; } return "43"; diff --git a/nj2k/testData/newJ2k/function/java8Lambdas.kt b/nj2k/testData/newJ2k/function/java8Lambdas.kt index dcb002dad32..ee4b932e2d5 100644 --- a/nj2k/testData/newJ2k/function/java8Lambdas.kt +++ b/nj2k/testData/newJ2k/function/java8Lambdas.kt @@ -7,7 +7,7 @@ class Java8Class { fun foo0(r: Function0) {} - fun foo1(r: Function1) {} + fun foo1(r: Function1) {} fun foo2(r: Function2) {} diff --git a/nj2k/testData/newJ2k/function/varVararg.kt b/nj2k/testData/newJ2k/function/varVararg.kt index e223f6a9064..3c9c25ec025 100644 --- a/nj2k/testData/newJ2k/function/varVararg.kt +++ b/nj2k/testData/newJ2k/function/varVararg.kt @@ -2,7 +2,7 @@ package demo internal class Test { fun test(vararg args: Any?) { - var argsx = args + var args = args args = arrayOf(1, 2, 3) } } \ No newline at end of file diff --git a/nj2k/testData/newJ2k/issues/kt-5400.kt b/nj2k/testData/newJ2k/issues/kt-5400.kt index 95fce88b4cf..3451c2817a0 100644 --- a/nj2k/testData/newJ2k/issues/kt-5400.kt +++ b/nj2k/testData/newJ2k/issues/kt-5400.kt @@ -3,5 +3,5 @@ internal open class Base { } internal class Derived : Base() { - var field: Base.Nested? = null + var field: Nested? = null } \ No newline at end of file diff --git a/nj2k/testData/newJ2k/issues/kt-807.java b/nj2k/testData/newJ2k/issues/kt-807.java index 26773a5ca14..78dcfc4dd3c 100644 --- a/nj2k/testData/newJ2k/issues/kt-807.java +++ b/nj2k/testData/newJ2k/issues/kt-807.java @@ -1,10 +1,9 @@ import java.io.*; -import java.io.*; class FileRead { public static void main(String args[]) { try { - FileInputStream fstream = new FileInputStream(); + FileInputStream fstream = new FileInputStream(new File("file.txt")); DataInputStream in = new DataInputStream(fstream); BufferedReader br = new BufferedReader(new InputStreamReader(in)); String strLine; diff --git a/nj2k/testData/newJ2k/issues/kt-807.kt b/nj2k/testData/newJ2k/issues/kt-807.kt index 8dc57ec2a2e..c3d1b1e4a75 100644 --- a/nj2k/testData/newJ2k/issues/kt-807.kt +++ b/nj2k/testData/newJ2k/issues/kt-807.kt @@ -1,18 +1,17 @@ -// ERROR: None of the following functions can be called with the arguments supplied: public constructor FileInputStream(file: File!) defined in java.io.FileInputStream public constructor FileInputStream(fdObj: FileDescriptor!) defined in java.io.FileInputStream public constructor FileInputStream(name: String!) defined in java.io.FileInputStream // ERROR: Type mismatch: inferred type is DataInputStream but InputStream! was expected -// ERROR: Assignments are not expressions, and only expressions are allowed in this context // ERROR: Unresolved reference: close import java.io.* +import java.lang.Exception internal object FileRead { @JvmStatic fun main(args: Array) { try { - val fstream = FileInputStream() + val fstream = FileInputStream(File("file.txt")) val `in` = DataInputStream(fstream) val br = BufferedReader(InputStreamReader(`in`)) - var strLine: String - while ((strLine = br.readLine()) != null) { + var strLine: String? + while (br.readLine().also { strLine = it } != null) { println(strLine) } `in`.close() diff --git a/nj2k/testData/newJ2k/issues/kt-836.kt b/nj2k/testData/newJ2k/issues/kt-836.kt index ac04dbdf3d0..f1f1dd30fb5 100644 --- a/nj2k/testData/newJ2k/issues/kt-836.kt +++ b/nj2k/testData/newJ2k/issues/kt-836.kt @@ -3,13 +3,11 @@ package com.voltvoodoo.saplo4j.model import java.io.Serializable class Language(protected var code: String) : Serializable { - override fun toString(): String { - return this.code + return code } } - internal open class Base { internal open fun test() {} override fun toString(): String { diff --git a/nj2k/testData/newJ2k/issues/kt-837.kt b/nj2k/testData/newJ2k/issues/kt-837.kt index ffd78ee1c08..9a1b8dcb8b0 100644 --- a/nj2k/testData/newJ2k/issues/kt-837.kt +++ b/nj2k/testData/newJ2k/issues/kt-837.kt @@ -2,15 +2,14 @@ package com.voltvoodoo.saplo4j.model import java.io.Serializable -class Language(protected var code: String?) : Serializable { - +class Language(protected var code: String) : Serializable { fun equals(other: Language): Boolean { return other.toString() == this.toString() } companion object { - var ENGLISH: Language? = Language("en") - var SWEDISH: Language? = Language("sv") + var ENGLISH = Language("en") + var SWEDISH = Language("sv") private const val serialVersionUID = -2442762969929206780L } } \ No newline at end of file diff --git a/nj2k/testData/newJ2k/issues/qualifyStatic.kt b/nj2k/testData/newJ2k/issues/qualifyStatic.kt index fdbf6b728a2..68ca5102ca1 100644 --- a/nj2k/testData/newJ2k/issues/qualifyStatic.kt +++ b/nj2k/testData/newJ2k/issues/qualifyStatic.kt @@ -2,6 +2,6 @@ import java.util.Calendar internal abstract class MyCalendar : Calendar() { fun foo() { - val i = Calendar.ALL_STYLES + val i = ALL_STYLES } } \ No newline at end of file diff --git a/nj2k/testData/newJ2k/kotlinApiAccess/ClassObjectMembers.java b/nj2k/testData/newJ2k/kotlinApiAccess/ClassObjectMembers.java index 1d4f0db2473..3b6c015e9e7 100644 --- a/nj2k/testData/newJ2k/kotlinApiAccess/ClassObjectMembers.java +++ b/nj2k/testData/newJ2k/kotlinApiAccess/ClassObjectMembers.java @@ -4,6 +4,8 @@ import kotlinApi.KotlinClass; class C { int foo() { - KotlinClass.Companion.getStaticVar() + KotlinClass.staticVar = KotlinClass.staticVar * 2; + KotlinClass.Companion.setStaticProperty(KotlinClass.Companion.getStaticVar() + KotlinClass.Companion.getStaticProperty()); + return KotlinClass.Companion.staticFun(1); } } diff --git a/nj2k/testData/newJ2k/kotlinApiAccess/ClassObjectMembers.kt b/nj2k/testData/newJ2k/kotlinApiAccess/ClassObjectMembers.kt index fde5ce169c6..52e347a5123 100644 --- a/nj2k/testData/newJ2k/kotlinApiAccess/ClassObjectMembers.kt +++ b/nj2k/testData/newJ2k/kotlinApiAccess/ClassObjectMembers.kt @@ -1,9 +1,13 @@ import kotlinApi.KotlinClass +import kotlinApi.KotlinClass.Companion +import kotlinApi.KotlinClass.Companion.staticFun +import kotlinApi.KotlinClass.Companion.staticProperty +import kotlinApi.KotlinClass.Companion.staticVar internal class C { fun foo(): Int { - KotlinClass.staticVar = KotlinClass.staticVar * 2 - KotlinClass.staticProperty = KotlinClass.staticVar + KotlinClass.staticProperty - return KotlinClass.staticFun(1) + staticVar = staticVar * 2 + staticProperty = staticVar + staticProperty + return staticFun(1) } } \ No newline at end of file diff --git a/nj2k/testData/newJ2k/kotlinApiAccess/CorrectNullabilityDetected.kt b/nj2k/testData/newJ2k/kotlinApiAccess/CorrectNullabilityDetected.kt index aa33e0b63b1..76b5ef3ce96 100644 --- a/nj2k/testData/newJ2k/kotlinApiAccess/CorrectNullabilityDetected.kt +++ b/nj2k/testData/newJ2k/kotlinApiAccess/CorrectNullabilityDetected.kt @@ -1,13 +1,16 @@ import kotlinApi.* +import kotlinApi.KotlinClass.Companion +import kotlinApi.KotlinClass.Companion.nullableStaticFun +import kotlinApi.KotlinClass.Companion.nullableStaticVar +import kotlinApi.KotlinClass.Companion.staticFun +import kotlinApi.KotlinClass.Companion.staticVar internal class A { fun foo(c: KotlinClass): Int { return (c.nullableProperty!!.length + c.property.length - + KotlinClass.nullableStaticVar!! - + KotlinClass.staticVar - + KotlinClass.nullableStaticFun(1)!! - + KotlinClass.staticFun(1) + + nullableStaticVar!! + staticVar + + nullableStaticFun(1)!! + staticFun(1) + nullableGlobalFunction("")!!.length + globalFunction("").length) } diff --git a/nj2k/testData/newJ2k/kotlinApiAccess/ObjectMembers.kt b/nj2k/testData/newJ2k/kotlinApiAccess/ObjectMembers.kt index 7b7799b9928..3b2db1ba83b 100644 --- a/nj2k/testData/newJ2k/kotlinApiAccess/ObjectMembers.kt +++ b/nj2k/testData/newJ2k/kotlinApiAccess/ObjectMembers.kt @@ -1,11 +1,14 @@ import kotlinApi.KotlinObject +import kotlinApi.KotlinObject.foo +import kotlinApi.KotlinObject.property1 +import kotlinApi.KotlinObject.property2 internal class C { fun foo(): Int { - KotlinObject.property1 = 1 - KotlinObject.property2 = 2 + property1 = 1 + property2 = 2 return KotlinObject.foo() + - KotlinObject.property1 + - KotlinObject.property2 + property1 + + property2 } -} +} \ No newline at end of file diff --git a/nj2k/testData/newJ2k/kotlinApiAccess/StaticImportFromCompanionObject3.kt b/nj2k/testData/newJ2k/kotlinApiAccess/StaticImportFromCompanionObject3.kt index 720b7013061..b287d2509ac 100644 --- a/nj2k/testData/newJ2k/kotlinApiAccess/StaticImportFromCompanionObject3.kt +++ b/nj2k/testData/newJ2k/kotlinApiAccess/StaticImportFromCompanionObject3.kt @@ -1,7 +1,8 @@ import kotlinApi.KotlinClass +import kotlinApi.KotlinClass.Companion.staticProperty internal class C { fun foo(): Int { - return KotlinClass.staticProperty + return staticProperty } } \ No newline at end of file diff --git a/nj2k/testData/newJ2k/list/ForEach.kt b/nj2k/testData/newJ2k/list/ForEach.kt index 845190fb702..0f9a3761851 100644 --- a/nj2k/testData/newJ2k/list/ForEach.kt +++ b/nj2k/testData/newJ2k/list/ForEach.kt @@ -3,8 +3,8 @@ import java.util.* class ForEach { fun test() { - val xs: ArrayList = ArrayList() - val ys: MutableList = LinkedList() + val xs: ArrayList = ArrayList() + val ys: MutableList = LinkedList() for (x in xs) { ys.add(x) } diff --git a/nj2k/testData/newJ2k/methodCallExpression/specialBuiltinMembers.java b/nj2k/testData/newJ2k/methodCallExpression/specialBuiltinMembers.java index c83d04f42e6..8411fc716d1 100644 --- a/nj2k/testData/newJ2k/methodCallExpression/specialBuiltinMembers.java +++ b/nj2k/testData/newJ2k/methodCallExpression/specialBuiltinMembers.java @@ -34,9 +34,10 @@ class A { } for (Map.Entry entry : map.entrySet()) { - String key = entry.getKey(); Integer value = entry.getValue(); - entry.setValue(value + 1); + if (entry.getKey() != null) { + println(value + 1) + } } } } diff --git a/nj2k/testData/newJ2k/methodCallExpression/specialBuiltinMembers.kt b/nj2k/testData/newJ2k/methodCallExpression/specialBuiltinMembers.kt index a5bf95b01fe..3bddfc73295 100644 --- a/nj2k/testData/newJ2k/methodCallExpression/specialBuiltinMembers.kt +++ b/nj2k/testData/newJ2k/methodCallExpression/specialBuiltinMembers.kt @@ -1,9 +1,9 @@ -import java.util.HashMap - -internal enum class E { - A, B, C -} +import java.lang.Exception +import java.lang.RuntimeException +import java.util.* +import kotlin.collections.Map.Entry +internal enum class E { A, B, C } internal class A { fun foo(list: List, collection: Collection, map: Map) { val a = "".length @@ -16,14 +16,13 @@ internal class A { val h = map.entries.size } - fun bar(list: MutableList, map: HashMap) { + fun bar(list: MutableList, map: HashMap) { val c = "a"[0] val b = 10.toByte() val i = 10.1.toInt() val f = 10.1.toFloat() val l = 10.1.toLong() val s = 10.1.toShort() - try { val removed = list.removeAt(10) val isRemoved = list.remove("a") @@ -31,11 +30,10 @@ internal class A { System.err.println(e.message) throw RuntimeException(e.cause) } - - for (entry in map.entries) { - val key = entry.key - val value = entry.value - entry.setValue(value!! + 1) + for ((key, value) in map) { + if (key != null) { + println(value + 1) + } } } -} +} \ No newline at end of file diff --git a/nj2k/testData/newJ2k/methodCallExpression/vararg2.kt b/nj2k/testData/newJ2k/methodCallExpression/vararg2.kt index f54d6de59e2..ab0ce04239f 100644 --- a/nj2k/testData/newJ2k/methodCallExpression/vararg2.kt +++ b/nj2k/testData/newJ2k/methodCallExpression/vararg2.kt @@ -2,8 +2,8 @@ import javaApi.WithVarargConstructor internal class X { fun foo() { - val o1 = WithVarargConstructor(1, *arrayOf("a")) - val o2 = WithVarargConstructor(2, arrayOf("a"), arrayOf("b")) + val o1 = WithVarargConstructor(1, *arrayOf("a")) + val o2 = WithVarargConstructor(2, arrayOf("a"), arrayOf("b")) val o3 = WithVarargConstructor(2, "a") } } \ No newline at end of file diff --git a/nj2k/testData/newJ2k/mutableCollections/FunctionParameters.kt b/nj2k/testData/newJ2k/mutableCollections/FunctionParameters.kt index 75d142c0c65..c19b7c11252 100644 --- a/nj2k/testData/newJ2k/mutableCollections/FunctionParameters.kt +++ b/nj2k/testData/newJ2k/mutableCollections/FunctionParameters.kt @@ -1,12 +1,11 @@ -// ERROR: Type mismatch: inferred type is T? but T was expected import java.util.* internal class A { fun foo(nonMutableCollection: Collection, mutableCollection: MutableCollection, - mutableSet: MutableSet, - mutableMap: MutableMap) { + mutableSet: MutableSet, + mutableMap: MutableMap) { mutableCollection.addAll(nonMutableCollection) mutableSet.add(mutableMap.remove("a")) } -} +} \ No newline at end of file diff --git a/nj2k/testData/newJ2k/mutableCollections/Iterator.java b/nj2k/testData/newJ2k/mutableCollections/Iterator.java index 8a601663ad7..dcd7307eae9 100644 --- a/nj2k/testData/newJ2k/mutableCollections/Iterator.java +++ b/nj2k/testData/newJ2k/mutableCollections/Iterator.java @@ -1,6 +1,6 @@ import java.util.*; -class Iterator { +class IteratorTest { Map mutableMap1 = new HashMap<>(); Map mutableMap2 = new HashMap<>(); diff --git a/nj2k/testData/newJ2k/mutableCollections/Iterator.kt b/nj2k/testData/newJ2k/mutableCollections/Iterator.kt index 2071a3904d3..890c98d46d7 100644 --- a/nj2k/testData/newJ2k/mutableCollections/Iterator.kt +++ b/nj2k/testData/newJ2k/mutableCollections/Iterator.kt @@ -1,7 +1,6 @@ import java.util.* -internal class Iterator { - +internal class IteratorTest { var mutableMap1: MutableMap = HashMap() var mutableMap2: MutableMap = HashMap() diff --git a/nj2k/testData/newJ2k/objectLiteral/MyFrame.kt b/nj2k/testData/newJ2k/objectLiteral/MyFrame.kt index 06516bb87ca..6cdfb27fd24 100644 --- a/nj2k/testData/newJ2k/objectLiteral/MyFrame.kt +++ b/nj2k/testData/newJ2k/objectLiteral/MyFrame.kt @@ -5,34 +5,24 @@ internal interface WindowListener { } internal interface EmptyWindowListener - internal open class EmptyWindowAdapter : EmptyWindowListener - internal open class WindowAdapter : WindowListener { override fun windowClosing() {} } internal open class Frame { - fun addWindowListener(listener: WindowListener?) {} + fun addWindowListener(listener: WindowListener) {} } -internal class Client : Frame() { - init { - val a: WindowAdapter = object : WindowAdapter() { - override fun windowClosing() {} - } - - addWindowListener(a) - - addWindowListener(object : WindowAdapter() { - override fun windowClosing() {} - }) - - val b: EmptyWindowListener = object : EmptyWindowListener { - - } - val c: EmptyWindowAdapter = object : EmptyWindowAdapter() { - - } +internal class Client : Frame() {init { + val a: WindowAdapter = object : WindowAdapter() { + override fun windowClosing() {} } + addWindowListener(a) + addWindowListener(object : WindowAdapter() { + override fun windowClosing() {} + }) + val b: EmptyWindowListener = object : EmptyWindowListener {} + val c: EmptyWindowAdapter = object : EmptyWindowAdapter() {} +} } \ No newline at end of file diff --git a/nj2k/testData/newJ2k/postProcessing/GetOperator.kt b/nj2k/testData/newJ2k/postProcessing/GetOperator.kt index f30abaad1d7..54a7305db4b 100644 --- a/nj2k/testData/newJ2k/postProcessing/GetOperator.kt +++ b/nj2k/testData/newJ2k/postProcessing/GetOperator.kt @@ -8,7 +8,7 @@ internal class X { } internal class C { - fun foo(map: HashMap): String { + fun foo(map: HashMap): String? { return map["a"] } diff --git a/nj2k/testData/newJ2k/toArray/toArray.kt b/nj2k/testData/newJ2k/toArray/toArray.kt index 8de8b3b9eb9..a26c08e2770 100644 --- a/nj2k/testData/newJ2k/toArray/toArray.kt +++ b/nj2k/testData/newJ2k/toArray/toArray.kt @@ -3,7 +3,7 @@ import java.util.Arrays class Foo { fun test() { val list: List = Arrays.asList("a", "b") - val array1: Array = list.toTypedArray() - val array2: Array = list.toTypedArray() + val array1: Array = list.toTypedArray() + val array2: Array = list.toTypedArray() } } \ No newline at end of file diff --git a/nj2k/tests/org/jetbrains/kotlin/nj2k/NewJavaToKotlinConverterSingleFileTestGenerated.java b/nj2k/tests/org/jetbrains/kotlin/nj2k/NewJavaToKotlinConverterSingleFileTestGenerated.java index 682c00652f8..fed7b3819fb 100644 --- a/nj2k/tests/org/jetbrains/kotlin/nj2k/NewJavaToKotlinConverterSingleFileTestGenerated.java +++ b/nj2k/tests/org/jetbrains/kotlin/nj2k/NewJavaToKotlinConverterSingleFileTestGenerated.java @@ -15,9 +15,7 @@ import org.junit.runner.RunWith; import java.io.File; import java.util.regex.Pattern; -/** - * This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY - */ +/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ @SuppressWarnings("all") @TestMetadata("nj2k/testData/newJ2k") @TestDataPath("$PROJECT_ROOT") @@ -27,9 +25,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - //public void testAllFilesPresentInFileOrElement() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - //} + public void testAllFilesPresentInFileOrElement() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("nj2k/testData/newJ2k/annotations") @TestDataPath("$PROJECT_ROOT") @@ -39,9 +37,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInAnnotations() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/annotations"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInAnnotations() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/annotations"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("annotationArrayArgument.java") public void testAnnotationArrayArgument() throws Exception { @@ -58,20 +56,20 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew runTest("nj2k/testData/newJ2k/annotations/annotationFromConstructorParamToProperty.java"); } - // @TestMetadata("annotationInterface1.java") - // public void testAnnotationInterface1() throws Exception { - // runTest("nj2k/testData/newJ2k/annotations/annotationInterface1.java"); - // } + @TestMetadata("annotationInterface1.java") + public void testAnnotationInterface1() throws Exception { + runTest("nj2k/testData/newJ2k/annotations/annotationInterface1.java"); + } @TestMetadata("annotationInterface2.java") public void testAnnotationInterface2() throws Exception { runTest("nj2k/testData/newJ2k/annotations/annotationInterface2.java"); } - // @TestMetadata("annotationInterface3.java") - // public void testAnnotationInterface3() throws Exception { - // runTest("nj2k/testData/newJ2k/annotations/annotationInterface3.java"); - // } + @TestMetadata("annotationInterface3.java") + public void ignoreTestAnnotationInterface3() throws Exception { + runTest("nj2k/testData/newJ2k/annotations/annotationInterface3.java"); + } @TestMetadata("annotationInterface4.java") public void testAnnotationInterface4() throws Exception { @@ -108,10 +106,10 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew runTest("nj2k/testData/newJ2k/annotations/jetbrainsNotNullChainExpr.java"); } - // @TestMetadata("jetbrainsNullable.java") - // public void testJetbrainsNullable() throws Exception { - // runTest("nj2k/testData/newJ2k/annotations/jetbrainsNullable.java"); - // } + @TestMetadata("jetbrainsNullable.java") + public void ignoreTestJetbrainsNullable() throws Exception { + runTest("nj2k/testData/newJ2k/annotations/jetbrainsNullable.java"); + } @TestMetadata("modifiersToAnnotationsFromPropertyAccessors.java") public void testModifiersToAnnotationsFromPropertyAccessors() throws Exception { @@ -128,10 +126,10 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew runTest("nj2k/testData/newJ2k/annotations/serialVersionUID.java"); } - // @TestMetadata("suppressWarnings.java") - // public void testSuppressWarnings() throws Exception { - // runTest("nj2k/testData/newJ2k/annotations/suppressWarnings.java"); - // } + @TestMetadata("suppressWarnings.java") + public void testSuppressWarnings() throws Exception { + runTest("nj2k/testData/newJ2k/annotations/suppressWarnings.java"); + } } @TestMetadata("nj2k/testData/newJ2k/anonymousBlock") @@ -142,19 +140,19 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInAnonymousBlock() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/anonymousBlock"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInAnonymousBlock() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/anonymousBlock"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("oneAnonBlock.java") public void testOneAnonBlock() throws Exception { runTest("nj2k/testData/newJ2k/anonymousBlock/oneAnonBlock.java"); } - // @TestMetadata("oneStaticAnonBlock.java") - // public void testOneStaticAnonBlock() throws Exception { - // runTest("nj2k/testData/newJ2k/anonymousBlock/oneStaticAnonBlock.java"); - // } + @TestMetadata("oneStaticAnonBlock.java") + public void ignoreTestOneStaticAnonBlock() throws Exception { + runTest("nj2k/testData/newJ2k/anonymousBlock/oneStaticAnonBlock.java"); + } } @TestMetadata("nj2k/testData/newJ2k/anonymousClass") @@ -165,9 +163,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInAnonymousClass() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/anonymousClass"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInAnonymousClass() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/anonymousClass"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("kt-13146.java") public void testKt_13146() throws Exception { @@ -188,9 +186,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInArrayAccessExpression() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/arrayAccessExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInArrayAccessExpression() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/arrayAccessExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("expressionIndex.java") public void testExpressionIndex() throws Exception { @@ -216,9 +214,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInArrayInitializerExpression() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/arrayInitializerExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInArrayInitializerExpression() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/arrayInitializerExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("doubleArray.java") public void testDoubleArray() throws Exception { @@ -275,10 +273,10 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew runTest("nj2k/testData/newJ2k/arrayInitializerExpression/oneDimWithVariables.java"); } - // @TestMetadata("twoDim.java") - // public void testTwoDim() throws Exception { - // runTest("nj2k/testData/newJ2k/arrayInitializerExpression/twoDim.java"); - // } + @TestMetadata("twoDim.java") + public void testTwoDim() throws Exception { + runTest("nj2k/testData/newJ2k/arrayInitializerExpression/twoDim.java"); + } } @TestMetadata("nj2k/testData/newJ2k/arrayType") @@ -289,9 +287,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInArrayType() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/arrayType"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInArrayType() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/arrayType"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("arrayInitializationStatement.java") public void testArrayInitializationStatement() throws Exception { @@ -352,9 +350,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInAssertStatement() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/assertStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInAssertStatement() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/assertStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("assertNotNull.java") public void testAssertNotNull() throws Exception { @@ -390,9 +388,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInAssignmentExpression() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/assignmentExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInAssignmentExpression() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/assignmentExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("and.java") public void testAnd() throws Exception { @@ -409,15 +407,15 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew runTest("nj2k/testData/newJ2k/assignmentExpression/assignmentAsExpression.java"); } - // @TestMetadata("bitOperationPriority.java") - // public void testBitOperationPriority() throws Exception { - // runTest("nj2k/testData/newJ2k/assignmentExpression/bitOperationPriority.java"); - // } + @TestMetadata("bitOperationPriority.java") + public void testBitOperationPriority() throws Exception { + runTest("nj2k/testData/newJ2k/assignmentExpression/bitOperationPriority.java"); + } - // @TestMetadata("bitOperationPriorityComments.java") - // public void testBitOperationPriorityComments() throws Exception { - // runTest("nj2k/testData/newJ2k/assignmentExpression/bitOperationPriorityComments.java"); - // } + @TestMetadata("bitOperationPriorityComments.java") + public void testBitOperationPriorityComments() throws Exception { + runTest("nj2k/testData/newJ2k/assignmentExpression/bitOperationPriorityComments.java"); + } @TestMetadata("divideAssign.java") public void testDivideAssign() throws Exception { @@ -493,9 +491,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInBinaryExpression() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/binaryExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInBinaryExpression() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/binaryExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("and.java") public void testAnd() throws Exception { @@ -606,9 +604,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInBlocks() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/blocks"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInBlocks() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/blocks"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("Blocks.java") public void testBlocks() throws Exception { @@ -624,19 +622,19 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInBoxedType() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/boxedType"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInBoxedType() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/boxedType"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("boolean.java") public void testBoolean() throws Exception { runTest("nj2k/testData/newJ2k/boxedType/boolean.java"); } - // @TestMetadata("Boxing.java") - // public void testBoxing() throws Exception { - // runTest("nj2k/testData/newJ2k/boxedType/Boxing.java"); - // } + @TestMetadata("Boxing.java") + public void ignoreTestBoxing() throws Exception { + runTest("nj2k/testData/newJ2k/boxedType/Boxing.java"); + } @TestMetadata("byte.java") public void testByte() throws Exception { @@ -663,10 +661,10 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew runTest("nj2k/testData/newJ2k/boxedType/integer.java"); } - // @TestMetadata("kt-671.java") - // public void testKt_671() throws Exception { - // runTest("nj2k/testData/newJ2k/boxedType/kt-671.java"); - // } + @TestMetadata("kt-671.java") + public void ignoreTestKt_671() throws Exception { + runTest("nj2k/testData/newJ2k/boxedType/kt-671.java"); + } @TestMetadata("long.java") public void testLong() throws Exception { @@ -692,9 +690,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInBreakStatement() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/breakStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInBreakStatement() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/breakStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("breakWithLabel.java") public void testBreakWithLabel() throws Exception { @@ -715,9 +713,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInCallChainExpression() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/callChainExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInCallChainExpression() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/callChainExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("libraryFieldCall.java") public void testLibraryFieldCall() throws Exception { @@ -768,9 +766,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew runTest("nj2k/testData/newJ2k/class/abstractClassShape.java"); } - // public void testAllFilesPresentInClass() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/class"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInClass() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/class"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("anonymousClass.java") public void testAnonymousClass() throws Exception { @@ -946,9 +944,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInClassExpression() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/classExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInClassExpression() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/classExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("complexExample.java") public void testComplexExample() throws Exception { @@ -979,14 +977,14 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInComments() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/comments"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInComments() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/comments"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } - // @TestMetadata("commentInsideCall.java") - // public void testCommentInsideCall() throws Exception { - // runTest("nj2k/testData/newJ2k/comments/commentInsideCall.java"); - // } + @TestMetadata("commentInsideCall.java") + public void ignoreTestCommentInsideCall() throws Exception { + runTest("nj2k/testData/newJ2k/comments/commentInsideCall.java"); + } @TestMetadata("comments.java") public void testComments() throws Exception { @@ -998,25 +996,25 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew runTest("nj2k/testData/newJ2k/comments/comments2.java"); } - // @TestMetadata("commentsForConstructors.java") - // public void testCommentsForConstructors() throws Exception { - // runTest("nj2k/testData/newJ2k/comments/commentsForConstructors.java"); - // } + @TestMetadata("commentsForConstructors.java") + public void ignoreTestCommentsForConstructors() throws Exception { + runTest("nj2k/testData/newJ2k/comments/commentsForConstructors.java"); + } @TestMetadata("fieldWithEndOfLineComment.java") public void testFieldWithEndOfLineComment() throws Exception { runTest("nj2k/testData/newJ2k/comments/fieldWithEndOfLineComment.java"); } - // @TestMetadata("fieldsInitializedFromParams.java") - // public void testFieldsInitializedFromParams() throws Exception { - // runTest("nj2k/testData/newJ2k/comments/fieldsInitializedFromParams.java"); - // } + @TestMetadata("fieldsInitializedFromParams.java") + public void testFieldsInitializedFromParams() throws Exception { + runTest("nj2k/testData/newJ2k/comments/fieldsInitializedFromParams.java"); + } - // @TestMetadata("removeNoInspectionComment.java") - // public void testRemoveNoInspectionComment() throws Exception { - // runTest("nj2k/testData/newJ2k/comments/removeNoInspectionComment.java"); - // } + @TestMetadata("removeNoInspectionComment.java") + public void ignoreTestRemoveNoInspectionComment() throws Exception { + runTest("nj2k/testData/newJ2k/comments/removeNoInspectionComment.java"); + } } @TestMetadata("nj2k/testData/newJ2k/conditionalExpression") @@ -1027,9 +1025,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInConditionalExpression() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/conditionalExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInConditionalExpression() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/conditionalExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("multiline.java") public void testMultiline() throws Exception { @@ -1060,9 +1058,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew runTest("nj2k/testData/newJ2k/constructors/allCallsPrimary2.java"); } - // public void testAllFilesPresentInConstructors() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/constructors"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInConstructors() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/constructors"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("artificialPrimary.java") public void testArtificialPrimary() throws Exception { @@ -1074,10 +1072,10 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew runTest("nj2k/testData/newJ2k/constructors/chain.java"); } - // @TestMetadata("constructorAnnotations.java") - // public void testConstructorAnnotations() throws Exception { - // runTest("nj2k/testData/newJ2k/constructors/constructorAnnotations.java"); - // } + @TestMetadata("constructorAnnotations.java") + public void testConstructorAnnotations() throws Exception { + runTest("nj2k/testData/newJ2k/constructors/constructorAnnotations.java"); + } @TestMetadata("customerBuilder.java") public void testCustomerBuilder() throws Exception { @@ -1129,10 +1127,10 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew runTest("nj2k/testData/newJ2k/constructors/fieldsInitializedFromParams9.java"); } - // @TestMetadata("fieldsInitializedFromParamsAnnotations.java") - // public void testFieldsInitializedFromParamsAnnotations() throws Exception { - // runTest("nj2k/testData/newJ2k/constructors/fieldsInitializedFromParamsAnnotations.java"); - // } + @TestMetadata("fieldsInitializedFromParamsAnnotations.java") + public void ignoreTestFieldsInitializedFromParamsAnnotations() throws Exception { + runTest("nj2k/testData/newJ2k/constructors/fieldsInitializedFromParamsAnnotations.java"); + } @TestMetadata("genericIdentifier.java") public void testGenericIdentifier() throws Exception { @@ -1179,15 +1177,15 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew runTest("nj2k/testData/newJ2k/constructors/nestedClassNameInSuperParameters.java"); } - // @TestMetadata("noPrimary.java") - // public void testNoPrimary() throws Exception { - // runTest("nj2k/testData/newJ2k/constructors/noPrimary.java"); - // } + @TestMetadata("noPrimary.java") + public void testNoPrimary() throws Exception { + runTest("nj2k/testData/newJ2k/constructors/noPrimary.java"); + } - // @TestMetadata("parameterDefaults1.java") - // public void testParameterDefaults1() throws Exception { - // runTest("nj2k/testData/newJ2k/constructors/parameterDefaults1.java"); - // } + @TestMetadata("parameterDefaults1.java") + public void testParameterDefaults1() throws Exception { + runTest("nj2k/testData/newJ2k/constructors/parameterDefaults1.java"); + } @TestMetadata("parameterDefaults2.java") public void testParameterDefaults2() throws Exception { @@ -1199,15 +1197,15 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew runTest("nj2k/testData/newJ2k/constructors/parameterDefaults3.java"); } - // @TestMetadata("parameterDefaults4.java") - // public void testParameterDefaults4() throws Exception { - // runTest("nj2k/testData/newJ2k/constructors/parameterDefaults4.java"); - // } + @TestMetadata("parameterDefaults4.java") + public void testParameterDefaults4() throws Exception { + runTest("nj2k/testData/newJ2k/constructors/parameterDefaults4.java"); + } - // @TestMetadata("parameterDefaults5.java") - // public void testParameterDefaults5() throws Exception { - // runTest("nj2k/testData/newJ2k/constructors/parameterDefaults5.java"); - // } + @TestMetadata("parameterDefaults5.java") + public void testParameterDefaults5() throws Exception { + runTest("nj2k/testData/newJ2k/constructors/parameterDefaults5.java"); + } @TestMetadata("parameterModification.java") public void testParameterModification() throws Exception { @@ -1239,10 +1237,10 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew runTest("nj2k/testData/newJ2k/constructors/secondaryConstructorsInInnerClass.java"); } - // @TestMetadata("secondaryConstructorsInNestedClass.java") - // public void testSecondaryConstructorsInNestedClass() throws Exception { - // runTest("nj2k/testData/newJ2k/constructors/secondaryConstructorsInNestedClass.java"); - // } + @TestMetadata("secondaryConstructorsInNestedClass.java") + public void testSecondaryConstructorsInNestedClass() throws Exception { + runTest("nj2k/testData/newJ2k/constructors/secondaryConstructorsInNestedClass.java"); + } @TestMetadata("secondaryConstructorsVisibility.java") public void testSecondaryConstructorsVisibility() throws Exception { @@ -1268,9 +1266,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInContinueStatement() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/continueStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInContinueStatement() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/continueStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("continueWithLabel.java") public void testContinueWithLabel() throws Exception { @@ -1291,9 +1289,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInDeclarationStatement() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/declarationStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInDeclarationStatement() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/declarationStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("multiplyFinalIntDeclaration.java") public void testMultiplyFinalIntDeclaration() throws Exception { @@ -1349,9 +1347,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew runTest("nj2k/testData/newJ2k/detectProperties/AccessorsImplementInterface.java"); } - // public void testAllFilesPresentInDetectProperties() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/detectProperties"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInDetectProperties() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/detectProperties"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("AnonymousClass.java") public void testAnonymousClass() throws Exception { @@ -1373,10 +1371,10 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew runTest("nj2k/testData/newJ2k/detectProperties/CannotDropOnlySetter.java"); } - // @TestMetadata("Comments.java") - // public void testComments() throws Exception { - // runTest("nj2k/testData/newJ2k/detectProperties/Comments.java"); - // } + @TestMetadata("Comments.java") + public void ignoreTestComments() throws Exception { + runTest("nj2k/testData/newJ2k/detectProperties/Comments.java"); + } @TestMetadata("DataClass.java") public void testDataClass() throws Exception { @@ -1483,25 +1481,25 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew runTest("nj2k/testData/newJ2k/detectProperties/GetterWithSideEffect5.java"); } - // @TestMetadata("InCompanionObject.java") - // public void testInCompanionObject() throws Exception { - // runTest("nj2k/testData/newJ2k/detectProperties/InCompanionObject.java"); - // } + @TestMetadata("InCompanionObject.java") + public void testInCompanionObject() throws Exception { + runTest("nj2k/testData/newJ2k/detectProperties/InCompanionObject.java"); + } @TestMetadata("InInterface.java") public void testInInterface() throws Exception { runTest("nj2k/testData/newJ2k/detectProperties/InInterface.java"); } - // @TestMetadata("InObject.java") - // public void testInObject() throws Exception { - // runTest("nj2k/testData/newJ2k/detectProperties/InObject.java"); - // } + @TestMetadata("InObject.java") + public void testInObject() throws Exception { + runTest("nj2k/testData/newJ2k/detectProperties/InObject.java"); + } - // @TestMetadata("IsPrefix.java") - // public void testIsPrefix() throws Exception { - // runTest("nj2k/testData/newJ2k/detectProperties/IsPrefix.java"); - // } + @TestMetadata("IsPrefix.java") + public void ignoreTestIsPrefix() throws Exception { + runTest("nj2k/testData/newJ2k/detectProperties/IsPrefix.java"); + } @TestMetadata("JavaKeywordPropertyName.java") public void testJavaKeywordPropertyName() throws Exception { @@ -1513,15 +1511,15 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew runTest("nj2k/testData/newJ2k/detectProperties/KeywordPropertyName.java"); } - // @TestMetadata("Overrides.java") - // public void testOverrides() throws Exception { - // runTest("nj2k/testData/newJ2k/detectProperties/Overrides.java"); - // } + @TestMetadata("Overrides.java") + public void ignoreTestOverrides() throws Exception { + runTest("nj2k/testData/newJ2k/detectProperties/Overrides.java"); + } - // @TestMetadata("OverridesOfExternalCode.java") - // public void testOverridesOfExternalCode() throws Exception { - // runTest("nj2k/testData/newJ2k/detectProperties/OverridesOfExternalCode.java"); - // } + @TestMetadata("OverridesOfExternalCode.java") + public void ignoreTestOverridesOfExternalCode() throws Exception { + runTest("nj2k/testData/newJ2k/detectProperties/OverridesOfExternalCode.java"); + } @TestMetadata("PropertyAndFieldConflicts.java") public void testPropertyAndFieldConflicts() throws Exception { @@ -1548,10 +1546,10 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew runTest("nj2k/testData/newJ2k/detectProperties/SetterWithSideEffect2.java"); } - // @TestMetadata("SetterWithSideEffect3.java") - // public void testSetterWithSideEffect3() throws Exception { - // runTest("nj2k/testData/newJ2k/detectProperties/SetterWithSideEffect3.java"); - // } + @TestMetadata("SetterWithSideEffect3.java") + public void ignoreTestSetterWithSideEffect3() throws Exception { + runTest("nj2k/testData/newJ2k/detectProperties/SetterWithSideEffect3.java"); + } @TestMetadata("SetterWithSideEffect4.java") public void testSetterWithSideEffect4() throws Exception { @@ -1577,9 +1575,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInDoWhileStatement() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/doWhileStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInDoWhileStatement() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/doWhileStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("whileWithAssignmentAsExpression.java") public void testWhileWithAssignmentAsExpression() throws Exception { @@ -1620,9 +1618,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew runTest("nj2k/testData/newJ2k/docComments/aWithoutHref.java"); } - // public void testAllFilesPresentInDocComments() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/docComments"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInDocComments() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/docComments"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("deprecatedDocTag.java") public void testDeprecatedDocTag() throws Exception { @@ -1703,9 +1701,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInEnum() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/enum"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInEnum() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/enum"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("colorEnum.java") public void testColorEnum() throws Exception { @@ -1733,7 +1731,7 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew } @TestMetadata("enumConstantIsNotNull.java") - public void testEnumConstantIsNotNull() throws Exception { + public void ignoreTestEnumConstantIsNotNull() throws Exception { runTest("nj2k/testData/newJ2k/enum/enumConstantIsNotNull.java"); } @@ -1806,9 +1804,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInEquals() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/equals"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInEquals() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/equals"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("EqOperator.java") public void testEqOperator() throws Exception { @@ -1849,9 +1847,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInField() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/field"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInField() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/field"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("classChildExtendsBase.java") public void testClassChildExtendsBase() throws Exception { @@ -1893,10 +1891,10 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew runTest("nj2k/testData/newJ2k/field/specifyType.java"); } - // @TestMetadata("valOrVar.java") - // public void testValOrVar() throws Exception { - // runTest("nj2k/testData/newJ2k/field/valOrVar.java"); - // } + @TestMetadata("valOrVar.java") + public void ignoreTestValOrVar() throws Exception { + runTest("nj2k/testData/newJ2k/field/valOrVar.java"); + } @TestMetadata("valWithInit.java") public void testValWithInit() throws Exception { @@ -1927,9 +1925,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInFor() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/for"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInFor() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/for"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("arrayIndicesReversed.java") public void testArrayIndicesReversed() throws Exception { @@ -2160,9 +2158,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInForeachStatement() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/foreachStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInForeachStatement() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/foreachStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("enhancedForWithBlock.java") public void testEnhancedForWithBlock() throws Exception { @@ -2203,9 +2201,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInFormatting() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/formatting"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInFormatting() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/formatting"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("chainedCall.java") public void testChainedCall() throws Exception { @@ -2222,20 +2220,20 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew runTest("nj2k/testData/newJ2k/formatting/nonStaticMembers.java"); } - // @TestMetadata("nonStaticMembersWithComments.java") - // public void testNonStaticMembersWithComments() throws Exception { - // runTest("nj2k/testData/newJ2k/formatting/nonStaticMembersWithComments.java"); - // } + @TestMetadata("nonStaticMembersWithComments.java") + public void ignoreTestNonStaticMembersWithComments() throws Exception { + runTest("nj2k/testData/newJ2k/formatting/nonStaticMembersWithComments.java"); + } @TestMetadata("parameterList.java") public void testParameterList() throws Exception { runTest("nj2k/testData/newJ2k/formatting/parameterList.java"); } - // @TestMetadata("staticAndNonStaticMembersWithComments.java") - // public void testStaticAndNonStaticMembersWithComments() throws Exception { - // runTest("nj2k/testData/newJ2k/formatting/staticAndNonStaticMembersWithComments.java"); - // } + @TestMetadata("staticAndNonStaticMembersWithComments.java") + public void ignoreTestStaticAndNonStaticMembersWithComments() throws Exception { + runTest("nj2k/testData/newJ2k/formatting/staticAndNonStaticMembersWithComments.java"); + } @TestMetadata("staticMembersWithComments.java") public void testStaticMembersWithComments() throws Exception { @@ -2251,14 +2249,14 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // @TestMetadata("abstractMethod.java") - // public void testAbstractMethod() throws Exception { - // runTest("nj2k/testData/newJ2k/function/abstractMethod.java"); - // } + @TestMetadata("abstractMethod.java") + public void ignoreTestAbstractMethod() throws Exception { + runTest("nj2k/testData/newJ2k/function/abstractMethod.java"); + } - // public void testAllFilesPresentInFunction() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/function"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInFunction() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/function"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("classGenericParam.java") public void testClassGenericParam() throws Exception { @@ -2270,10 +2268,10 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew runTest("nj2k/testData/newJ2k/function/emptyVoidMethod.java"); } - // @TestMetadata("extendsBaseWhichExtendsObject.java") - // public void testExtendsBaseWhichExtendsObject() throws Exception { - // runTest("nj2k/testData/newJ2k/function/extendsBaseWhichExtendsObject.java"); - // } + @TestMetadata("extendsBaseWhichExtendsObject.java") + public void ignoreTestExtendsBaseWhichExtendsObject() throws Exception { + runTest("nj2k/testData/newJ2k/function/extendsBaseWhichExtendsObject.java"); + } @TestMetadata("final.java") public void testFinal() throws Exception { @@ -2290,20 +2288,20 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew runTest("nj2k/testData/newJ2k/function/internal.java"); } - // @TestMetadata("java8Lambdas.java") - // public void testJava8Lambdas() throws Exception { - // runTest("nj2k/testData/newJ2k/function/java8Lambdas.java"); - // } + @TestMetadata("java8Lambdas.java") + public void ignoreTestJava8Lambdas() throws Exception { + runTest("nj2k/testData/newJ2k/function/java8Lambdas.java"); + } - // @TestMetadata("java8MRKFunctionExpectedType.java") - // public void testJava8MRKFunctionExpectedType() throws Exception { - // runTest("nj2k/testData/newJ2k/function/java8MRKFunctionExpectedType.java"); - // } + @TestMetadata("java8MRKFunctionExpectedType.java") + public void ignoreTestJava8MRKFunctionExpectedType() throws Exception { + runTest("nj2k/testData/newJ2k/function/java8MRKFunctionExpectedType.java"); + } - // @TestMetadata("java8MRSamConstructor.java") - // public void testJava8MRSamConstructor() throws Exception { - // runTest("nj2k/testData/newJ2k/function/java8MRSamConstructor.java"); - // } + @TestMetadata("java8MRSamConstructor.java") + public void ignoreTestJava8MRSamConstructor() throws Exception { + runTest("nj2k/testData/newJ2k/function/java8MRSamConstructor.java"); + } @TestMetadata("lineBreaksBetweenParameters.java") public void testLineBreaksBetweenParameters() throws Exception { @@ -2345,10 +2343,10 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew runTest("nj2k/testData/newJ2k/function/methodWithReturnStatement.java"); } - //@TestMetadata("nativeMethods.java") - //public void testNativeMethods() throws Exception { - // runTest("nj2k/testData/newJ2k/function/nativeMethods.java"); - //} + @TestMetadata("nativeMethods.java") + public void ignoreTestNativeMethods() throws Exception { + runTest("nj2k/testData/newJ2k/function/nativeMethods.java"); + } @TestMetadata("open.java") public void testOpen() throws Exception { @@ -2425,10 +2423,10 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew runTest("nj2k/testData/newJ2k/function/throws.java"); } - // @TestMetadata("varVararg.java") - // public void testVarVararg() throws Exception { - // runTest("nj2k/testData/newJ2k/function/varVararg.java"); - // } + @TestMetadata("varVararg.java") + public void ignoreTestVarVararg() throws Exception { + runTest("nj2k/testData/newJ2k/function/varVararg.java"); + } } @TestMetadata("nj2k/testData/newJ2k/identifier") @@ -2439,9 +2437,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInIdentifier() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/identifier"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInIdentifier() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/identifier"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("finalFieldReference.java") public void testFinalFieldReference() throws Exception { @@ -2467,9 +2465,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInIfStatement() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/ifStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInIfStatement() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/ifStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("assignmentAsExpressionInIf.java") public void testAssignmentAsExpressionInIf() throws Exception { @@ -2520,9 +2518,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInImportStatement() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/importStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInImportStatement() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/importStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("importWithKeywords.java") public void testImportWithKeywords() throws Exception { @@ -2558,9 +2556,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInInheritance() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/inheritance"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInInheritance() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/inheritance"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("classOneExtendsBaseGeneric.java") public void testClassOneExtendsBaseGeneric() throws Exception { @@ -2596,9 +2594,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInIsOperator() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/isOperator"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInIsOperator() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/isOperator"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("complicatedExpression.java") public void testComplicatedExpression() throws Exception { @@ -2624,19 +2622,19 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInIssues() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/issues"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInIssues() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/issues"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("arrayLength.java") public void testArrayLength() throws Exception { runTest("nj2k/testData/newJ2k/issues/arrayLength.java"); } - // @TestMetadata("comments.java") - // public void testComments() throws Exception { - // runTest("nj2k/testData/newJ2k/issues/comments.java"); - // } + @TestMetadata("comments.java") + public void ignoreTestComments() throws Exception { + runTest("nj2k/testData/newJ2k/issues/comments.java"); + } @TestMetadata("doNotQualifyStatic.java") public void testDoNotQualifyStatic() throws Exception { @@ -2648,10 +2646,10 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew runTest("nj2k/testData/newJ2k/issues/kt-1016.java"); } - // @TestMetadata("kt-1048.java") - // public void testKt_1048() throws Exception { - // runTest("nj2k/testData/newJ2k/issues/kt-1048.java"); - // } + @TestMetadata("kt-1048.java") + public void ignoreTestKt_1048() throws Exception { + runTest("nj2k/testData/newJ2k/issues/kt-1048.java"); + } @TestMetadata("kt-1074.java") public void testKt_1074() throws Exception { @@ -2718,30 +2716,30 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew runTest("nj2k/testData/newJ2k/issues/kt-696.java"); } - // @TestMetadata("kt-792.java") - // public void testKt_792() throws Exception { - // runTest("nj2k/testData/newJ2k/issues/kt-792.java"); - // } + @TestMetadata("kt-792.java") + public void ignoreTestKt_792() throws Exception { + runTest("nj2k/testData/newJ2k/issues/kt-792.java"); + } @TestMetadata("kt-792-mixed.java") public void testKt_792_mixed() throws Exception { runTest("nj2k/testData/newJ2k/issues/kt-792-mixed.java"); } - // @TestMetadata("kt-794.java") - // public void testKt_794() throws Exception { - // runTest("nj2k/testData/newJ2k/issues/kt-794.java"); - // } + @TestMetadata("kt-794.java") + public void ignoreTestKt_794() throws Exception { + runTest("nj2k/testData/newJ2k/issues/kt-794.java"); + } @TestMetadata("kt-794-mixed.java") public void testKt_794_mixed() throws Exception { runTest("nj2k/testData/newJ2k/issues/kt-794-mixed.java"); } - // @TestMetadata("kt-807.java") - // public void testKt_807() throws Exception { - // runTest("nj2k/testData/newJ2k/issues/kt-807.java"); - // } + @TestMetadata("kt-807.java") + public void testKt_807() throws Exception { + runTest("nj2k/testData/newJ2k/issues/kt-807.java"); + } @TestMetadata("kt-809.java") public void testKt_809() throws Exception { @@ -2783,15 +2781,15 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew runTest("nj2k/testData/newJ2k/issues/kt-828.java"); } - // @TestMetadata("kt-836.java") - // public void testKt_836() throws Exception { - // runTest("nj2k/testData/newJ2k/issues/kt-836.java"); - // } + @TestMetadata("kt-836.java") + public void testKt_836() throws Exception { + runTest("nj2k/testData/newJ2k/issues/kt-836.java"); + } - // @TestMetadata("kt-837.java") - // public void testKt_837() throws Exception { - // runTest("nj2k/testData/newJ2k/issues/kt-837.java"); - // } + @TestMetadata("kt-837.java") + public void testKt_837() throws Exception { + runTest("nj2k/testData/newJ2k/issues/kt-837.java"); + } @TestMetadata("kt-851.java") public void testKt_851() throws Exception { @@ -2848,10 +2846,10 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew runTest("nj2k/testData/newJ2k/issues/spaceBeforeAssignment.java"); } - // @TestMetadata("unfinishedReferenceExpression.java") - // public void testUnfinishedReferenceExpression() throws Exception { - // runTest("nj2k/testData/newJ2k/issues/unfinishedReferenceExpression.java"); - // } + @TestMetadata("unfinishedReferenceExpression.java") + public void ignoreTestUnfinishedReferenceExpression() throws Exception { + runTest("nj2k/testData/newJ2k/issues/unfinishedReferenceExpression.java"); + } } @TestMetadata("nj2k/testData/newJ2k/kotlinApiAccess") @@ -2862,24 +2860,24 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInKotlinApiAccess() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/kotlinApiAccess"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInKotlinApiAccess() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/kotlinApiAccess"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } - // @TestMetadata("ClassObjectMembers.java") - // public void testClassObjectMembers() throws Exception { - // runTest("nj2k/testData/newJ2k/kotlinApiAccess/ClassObjectMembers.java"); - // } + @TestMetadata("ClassObjectMembers.java") + public void testClassObjectMembers() throws Exception { + runTest("nj2k/testData/newJ2k/kotlinApiAccess/ClassObjectMembers.java"); + } @TestMetadata("CorrectFunNullabilityDetected.java") public void testCorrectFunNullabilityDetected() throws Exception { runTest("nj2k/testData/newJ2k/kotlinApiAccess/CorrectFunNullabilityDetected.java"); } - // @TestMetadata("CorrectNullabilityDetected.java") - // public void testCorrectNullabilityDetected() throws Exception { - // runTest("nj2k/testData/newJ2k/kotlinApiAccess/CorrectNullabilityDetected.java"); - // } + @TestMetadata("CorrectNullabilityDetected.java") + public void testCorrectNullabilityDetected() throws Exception { + runTest("nj2k/testData/newJ2k/kotlinApiAccess/CorrectNullabilityDetected.java"); + } @TestMetadata("ExtensionFunction.java") public void testExtensionFunction() throws Exception { @@ -2970,9 +2968,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInLabelStatement() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/labelStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInLabelStatement() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/labelStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("complicatedExampleFromJavaTutorial.java") public void testComplicatedExampleFromJavaTutorial() throws Exception { @@ -2988,9 +2986,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInList() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/list"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInList() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/list"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("ForEach.java") public void testForEach() throws Exception { @@ -3011,9 +3009,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInLiteralExpression() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/literalExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInLiteralExpression() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/literalExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("char.java") public void testChar() throws Exception { @@ -3075,10 +3073,10 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew runTest("nj2k/testData/newJ2k/literalExpression/long.java"); } - // @TestMetadata("octal.java") - // public void testOctal() throws Exception { - // runTest("nj2k/testData/newJ2k/literalExpression/octal.java"); - // } + @TestMetadata("octal.java") + public void ignoreTestOctal() throws Exception { + runTest("nj2k/testData/newJ2k/literalExpression/octal.java"); + } @TestMetadata("stringOctalChars.java") public void testStringOctalChars() throws Exception { @@ -3099,9 +3097,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInLocalVariable() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/localVariable"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInLocalVariable() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/localVariable"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("autoBangBang.java") public void testAutoBangBang() throws Exception { @@ -3157,9 +3155,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInMethodCallExpression() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/methodCallExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInMethodCallExpression() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/methodCallExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("callWithKeywords.java") public void testCallWithKeywords() throws Exception { @@ -3201,25 +3199,25 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew runTest("nj2k/testData/newJ2k/methodCallExpression/simpleCall.java"); } - // @TestMetadata("specialBuiltinMembers.java") - // public void testSpecialBuiltinMembers() throws Exception { - // runTest("nj2k/testData/newJ2k/methodCallExpression/specialBuiltinMembers.java"); - // } + @TestMetadata("specialBuiltinMembers.java") + public void testSpecialBuiltinMembers() throws Exception { + runTest("nj2k/testData/newJ2k/methodCallExpression/specialBuiltinMembers.java"); + } - // @TestMetadata("stringMethods.java") - // public void testStringMethods() throws Exception { - // runTest("nj2k/testData/newJ2k/methodCallExpression/stringMethods.java"); - // } + @TestMetadata("stringMethods.java") + public void ignoreTestStringMethods() throws Exception { + runTest("nj2k/testData/newJ2k/methodCallExpression/stringMethods.java"); + } @TestMetadata("systemOut.java") public void testSystemOut() throws Exception { runTest("nj2k/testData/newJ2k/methodCallExpression/systemOut.java"); } - // @TestMetadata("vararg1.java") - // public void testVararg1() throws Exception { - // runTest("nj2k/testData/newJ2k/methodCallExpression/vararg1.java"); - // } + @TestMetadata("vararg1.java") + public void testVararg1() throws Exception { + runTest("nj2k/testData/newJ2k/methodCallExpression/vararg1.java"); + } @TestMetadata("vararg2.java") public void testVararg2() throws Exception { @@ -3235,9 +3233,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInMisc() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/misc"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInMisc() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/misc"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("packageWithClass.java") public void testPackageWithClass() throws Exception { @@ -3278,9 +3276,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInMutableCollections() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/mutableCollections"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInMutableCollections() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/mutableCollections"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("FunctionParameters.java") public void testFunctionParameters() throws Exception { @@ -3302,20 +3300,20 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew runTest("nj2k/testData/newJ2k/mutableCollections/FunctionReturnValue2.java"); } - // @TestMetadata("Iterator.java") - // public void testIterator() throws Exception { - // runTest("nj2k/testData/newJ2k/mutableCollections/Iterator.java"); - // } + @TestMetadata("Iterator.java") + public void testIterator() throws Exception { + runTest("nj2k/testData/newJ2k/mutableCollections/Iterator.java"); + } @TestMetadata("Iterator2.java") public void testIterator2() throws Exception { runTest("nj2k/testData/newJ2k/mutableCollections/Iterator2.java"); } - // @TestMetadata("Overrides.java") - // public void testOverrides() throws Exception { - // runTest("nj2k/testData/newJ2k/mutableCollections/Overrides.java"); - // } + @TestMetadata("Overrides.java") + public void ignoreTestOverrides() throws Exception { + runTest("nj2k/testData/newJ2k/mutableCollections/Overrides.java"); + } @TestMetadata("Recursion.java") public void testRecursion() throws Exception { @@ -3331,9 +3329,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInNewClassExpression() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/newClassExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInNewClassExpression() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/newClassExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("classWithParam.java") public void testClassWithParam() throws Exception { @@ -3395,10 +3393,10 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew runTest("nj2k/testData/newJ2k/newClassExpression/newClassByFullName.java"); } - // @TestMetadata("newInnerClass.java") - // public void testNewInnerClass() throws Exception { - // runTest("nj2k/testData/newJ2k/newClassExpression/newInnerClass.java"); - // } + @TestMetadata("newInnerClass.java") + public void testNewInnerClass() throws Exception { + runTest("nj2k/testData/newJ2k/newClassExpression/newInnerClass.java"); + } @TestMetadata("newListAndNewMember.java") public void testNewListAndNewMember() throws Exception { @@ -3419,9 +3417,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInNullability() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/nullability"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInNullability() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/nullability"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("autoNotNull.java") public void testAutoNotNull() throws Exception { @@ -3503,10 +3501,10 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew runTest("nj2k/testData/newJ2k/nullability/MethodResultComparedWithNull4.java"); } - // @TestMetadata("MethodResultInitializesNullableField.java") - // public void testMethodResultInitializesNullableField() throws Exception { - // runTest("nj2k/testData/newJ2k/nullability/MethodResultInitializesNullableField.java"); - // } + @TestMetadata("MethodResultInitializesNullableField.java") + public void ignoreTestMethodResultInitializesNullableField() throws Exception { + runTest("nj2k/testData/newJ2k/nullability/MethodResultInitializesNullableField.java"); + } @TestMetadata("MethodReturnsNull.java") public void testMethodReturnsNull() throws Exception { @@ -3578,10 +3576,10 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew runTest("nj2k/testData/newJ2k/nullability/OverrideWithInheritanceLoop.java"); } - // @TestMetadata("Overrides.java") - // public void testOverrides() throws Exception { - // runTest("nj2k/testData/newJ2k/nullability/Overrides.java"); - // } + @TestMetadata("Overrides.java") + public void ignoreTestOverrides() throws Exception { + runTest("nj2k/testData/newJ2k/nullability/Overrides.java"); + } @TestMetadata("ParameterComparedWithNull.java") public void testParameterComparedWithNull() throws Exception { @@ -3609,23 +3607,23 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew } } - //@TestMetadata("nj2k/testData/newJ2k/objectLiteral") - //@TestDataPath("$PROJECT_ROOT") - //@RunWith(JUnit3RunnerWithInners.class) - //public static class ObjectLiteral extends AbstractNewJavaToKotlinConverterSingleFileTest { - // private void runTest(String testDataFilePath) throws Exception { - // KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - // } - // - // public void testAllFilesPresentInObjectLiteral() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/objectLiteral"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } - // - // @TestMetadata("MyFrame.java") - // public void testMyFrame() throws Exception { - // runTest("nj2k/testData/newJ2k/objectLiteral/MyFrame.java"); - // } - //} + @TestMetadata("nj2k/testData/newJ2k/objectLiteral") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ObjectLiteral extends AbstractNewJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInObjectLiteral() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/objectLiteral"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } + + @TestMetadata("MyFrame.java") + public void testMyFrame() throws Exception { + runTest("nj2k/testData/newJ2k/objectLiteral/MyFrame.java"); + } + } @TestMetadata("nj2k/testData/newJ2k/overloads") @TestDataPath("$PROJECT_ROOT") @@ -3640,14 +3638,14 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew runTest("nj2k/testData/newJ2k/overloads/Abstract.java"); } - // @TestMetadata("AccessorToDrop.java") - // public void testAccessorToDrop() throws Exception { - // runTest("nj2k/testData/newJ2k/overloads/AccessorToDrop.java"); - // } + @TestMetadata("AccessorToDrop.java") + public void ignoreTestAccessorToDrop() throws Exception { + runTest("nj2k/testData/newJ2k/overloads/AccessorToDrop.java"); + } - // public void testAllFilesPresentInOverloads() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/overloads"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInOverloads() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/overloads"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("Annotations.java") public void testAnnotations() throws Exception { @@ -3683,9 +3681,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInPackageStatement() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/packageStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInPackageStatement() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/packageStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("keywordInPackageName.java") public void testKeywordInPackageName() throws Exception { @@ -3701,9 +3699,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInParenthesizedExpression() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/parenthesizedExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInParenthesizedExpression() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/parenthesizedExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("parenthesized.java") public void testParenthesized() throws Exception { @@ -3724,9 +3722,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInPolyadicExpression() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/polyadicExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInPolyadicExpression() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/polyadicExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("divide.java") public void testDivide() throws Exception { @@ -3767,35 +3765,40 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInPostProcessing() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/postProcessing"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInPostProcessing() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/postProcessing"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("AnonymousObject.java") public void testAnonymousObject() throws Exception { runTest("nj2k/testData/newJ2k/postProcessing/AnonymousObject.java"); } - // @TestMetadata("GetOperator.java") - // public void testGetOperator() throws Exception { - // runTest("nj2k/testData/newJ2k/postProcessing/GetOperator.java"); - // } + @TestMetadata("GetOperator.java") + public void testGetOperator() throws Exception { + runTest("nj2k/testData/newJ2k/postProcessing/GetOperator.java"); + } - // @TestMetadata("IfNullReturnToElvis.java") - // public void testIfNullReturnToElvis() throws Exception { - // runTest("nj2k/testData/newJ2k/postProcessing/IfNullReturnToElvis.java"); - // } + @TestMetadata("IfNullReturnToElvis.java") + public void ignoreTestIfNullReturnToElvis() throws Exception { + runTest("nj2k/testData/newJ2k/postProcessing/IfNullReturnToElvis.java"); + } - // @TestMetadata("IfToElvis.java") - // public void testIfToElvis() throws Exception { - // runTest("nj2k/testData/newJ2k/postProcessing/IfToElvis.java"); - // } + @TestMetadata("IfToElvis.java") + public void ignoreTestIfToElvis() throws Exception { + runTest("nj2k/testData/newJ2k/postProcessing/IfToElvis.java"); + } @TestMetadata("IfToSafeCall.java") public void testIfToSafeCall() throws Exception { runTest("nj2k/testData/newJ2k/postProcessing/IfToSafeCall.java"); } + @TestMetadata("java8MapForEachWithFullJdk.java") + public void ignoreTestJava8MapForEachWithFullJdk() throws Exception { + runTest("j2k/testData/fileOrElement/postProcessing/java8MapForEachWithFullJdk.java"); + } + @TestMetadata("NotIs.java") public void testNotIs() throws Exception { runTest("nj2k/testData/newJ2k/postProcessing/NotIs.java"); @@ -3830,9 +3833,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInPostfixOperator() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/postfixOperator"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInPostfixOperator() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/postfixOperator"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("decrement.java") public void testDecrement() throws Exception { @@ -3853,9 +3856,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInPrefixOperator() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/prefixOperator"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInPrefixOperator() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/prefixOperator"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("decrement.java") public void testDecrement() throws Exception { @@ -3896,9 +3899,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInProjections() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/projections"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInProjections() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/projections"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("projections.java") public void testProjections() throws Exception { @@ -3914,9 +3917,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInProtected() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/protected"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInProtected() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/protected"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("constructorProperty.java") public void testConstructorProperty() throws Exception { @@ -3962,9 +3965,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInRawGenerics() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/rawGenerics"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInRawGenerics() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/rawGenerics"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("kt-540.java") public void testKt_540() throws Exception { @@ -3981,10 +3984,10 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew runTest("nj2k/testData/newJ2k/rawGenerics/kt-540-rawGenericClass.java"); } - // @TestMetadata("rawGenericMethod.java") - // public void testRawGenericMethod() throws Exception { - // runTest("nj2k/testData/newJ2k/rawGenerics/rawGenericMethod.java"); - // } + @TestMetadata("rawGenericMethod.java") + public void ignoreTestRawGenericMethod() throws Exception { + runTest("nj2k/testData/newJ2k/rawGenerics/rawGenericMethod.java"); + } } @TestMetadata("nj2k/testData/newJ2k/returnStatement") @@ -3995,9 +3998,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInReturnStatement() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/returnStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInReturnStatement() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/returnStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("currentMethodBug.java") public void testCurrentMethodBug() throws Exception { @@ -4033,9 +4036,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInSettings() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/settings"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInSettings() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/settings"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("openByDefault.java") public void testOpenByDefault() throws Exception { @@ -4066,9 +4069,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInStaticMembers() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/staticMembers"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInStaticMembers() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/staticMembers"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("PrivateStaticMembers.java") public void testPrivateStaticMembers() throws Exception { @@ -4104,9 +4107,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInStrings() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/strings"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInStrings() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/strings"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("escapedBackslash.java") public void testEscapedBackslash() throws Exception { @@ -4132,9 +4135,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInSuperExpression() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/superExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInSuperExpression() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/superExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("classAdotSuperFoo.java") public void testClassAdotSuperFoo() throws Exception { @@ -4160,9 +4163,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInSwitch() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/switch"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInSwitch() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/switch"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("caseWithBlock.java") public void testCaseWithBlock() throws Exception { @@ -4199,10 +4202,10 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew runTest("nj2k/testData/newJ2k/switch/fallDownWithBlocks.java"); } - // @TestMetadata("invalidSwitch.java") - // public void testInvalidSwitch() throws Exception { - // runTest("nj2k/testData/newJ2k/switch/invalidSwitch.java"); - // } + @TestMetadata("invalidSwitch.java") + public void testInvalidSwitch() throws Exception { + runTest("nj2k/testData/newJ2k/switch/invalidSwitch.java"); + } @TestMetadata("KT-13552.java") public void testKT_13552() throws Exception { @@ -4253,9 +4256,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInSynchronizedStatement() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/synchronizedStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInSynchronizedStatement() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/synchronizedStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("singleLineExample.java") public void testSingleLineExample() throws Exception { @@ -4271,9 +4274,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInThisExpression() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/thisExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInThisExpression() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/thisExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("classAdotThisFoo.java") public void testClassAdotThisFoo() throws Exception { @@ -4294,9 +4297,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInThrowStatement() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/throwStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInThrowStatement() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/throwStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("simpleThrowStatement.java") public void testSimpleThrowStatement() throws Exception { @@ -4304,23 +4307,23 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew } } - //@TestMetadata("nj2k/testData/newJ2k/toArray") - //@TestDataPath("$PROJECT_ROOT") - //@RunWith(JUnit3RunnerWithInners.class) - //public static class ToArray extends AbstractNewJavaToKotlinConverterSingleFileTest { - // private void runTest(String testDataFilePath) throws Exception { - // KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - // } - // - // public void testAllFilesPresentInToArray() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/toArray"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } - // - // @TestMetadata("toArray.java") - // public void testToArray() throws Exception { - // runTest("nj2k/testData/newJ2k/toArray/toArray.java"); - // } - //} + @TestMetadata("nj2k/testData/newJ2k/toArray") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ToArray extends AbstractNewJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInToArray() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/toArray"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } + + @TestMetadata("toArray.java") + public void ignoreTestToArray() throws Exception { + runTest("nj2k/testData/newJ2k/toArray/toArray.java"); + } + } @TestMetadata("nj2k/testData/newJ2k/toKotlinClasses") @TestDataPath("$PROJECT_ROOT") @@ -4330,9 +4333,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInToKotlinClasses() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/toKotlinClasses"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInToKotlinClasses() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/toKotlinClasses"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("iterableAndIterator.java") public void testIterableAndIterator() throws Exception { @@ -4373,9 +4376,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew runTest("nj2k/testData/newJ2k/trait/abstactInterface.java"); } - // public void testAllFilesPresentInTrait() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/trait"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInTrait() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/trait"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("emptyInterface.java") public void testEmptyInterface() throws Exception { @@ -4436,9 +4439,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInTryStatement() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/tryStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInTryStatement() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/tryStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("commonCaseForTryStatement.java") public void testCommonCaseForTryStatement() throws Exception { @@ -4474,9 +4477,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInTryWithResource() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/tryWithResource"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInTryWithResource() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/tryWithResource"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("Multiline.java") public void testMultiline() throws Exception { @@ -4537,9 +4540,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInTypeCastExpression() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/typeCastExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInTypeCastExpression() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/typeCastExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("beforeDot.java") public void testBeforeDot() throws Exception { @@ -4605,9 +4608,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInTypeParameters() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/typeParameters"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInTypeParameters() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/typeParameters"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("classDoubleParametrizationWithTwoBoundsWithExtending.java") public void testClassDoubleParametrizationWithTwoBoundsWithExtending() throws Exception { @@ -4664,20 +4667,20 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew runTest("nj2k/testData/newJ2k/typeParameters/needTypeArgs.java"); } - // @TestMetadata("rawTypeCast.java") - // public void testRawTypeCast() throws Exception { - // runTest("nj2k/testData/newJ2k/typeParameters/rawTypeCast.java"); - // } + @TestMetadata("rawTypeCast.java") + public void ignoreTestRawTypeCast() throws Exception { + runTest("nj2k/testData/newJ2k/typeParameters/rawTypeCast.java"); + } @TestMetadata("traitDoubleParametrizationWithTwoBoundsWithExtending.java") public void testTraitDoubleParametrizationWithTwoBoundsWithExtending() throws Exception { runTest("nj2k/testData/newJ2k/typeParameters/traitDoubleParametrizationWithTwoBoundsWithExtending.java"); } - // @TestMetadata("typeFromOtherFile.java") - // public void testTypeFromOtherFile() throws Exception { - // runTest("nj2k/testData/newJ2k/typeParameters/typeFromOtherFile.java"); - // } + @TestMetadata("typeFromOtherFile.java") + public void ignoreTestTypeFromOtherFile() throws Exception { + runTest("nj2k/testData/newJ2k/typeParameters/typeFromOtherFile.java"); + } @TestMetadata("where.java") public void testWhere() throws Exception { @@ -4693,9 +4696,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInVarArg() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/varArg"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInVarArg() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/varArg"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("ellipsisTypeSeveralParams.java") public void testEllipsisTypeSeveralParams() throws Exception { @@ -4716,9 +4719,9 @@ public class NewJavaToKotlinConverterSingleFileTestGenerated extends AbstractNew KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - // public void testAllFilesPresentInWhileStatement() throws Exception { - // KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/whileStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); - // } + public void testAllFilesPresentInWhileStatement() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("nj2k/testData/newJ2k/whileStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); + } @TestMetadata("whileWithAssignmentAsExpression.java") public void testWhileWithAssignmentAsExpression() throws Exception {