New J2K: Split old j2k and new j2k tests

This commit is contained in:
Ilya Kirillov
2019-03-28 14:20:17 +03:00
committed by Ilya Kirillov
parent 02a206bf7c
commit b411e8e18e
1631 changed files with 14067 additions and 1513 deletions
@@ -1,9 +0,0 @@
internal class A {
fun foo(): Map<String?, String?> {
val list1: List<String?> = emptyList()
val list2: List<Int?> = listOf(1)
val set1: Set<String?> = emptySet()
val set2: Set<String?> = setOf("a")
return emptyMap()
}
}
@@ -1,6 +0,0 @@
internal class A {
fun foo() {
val list: List<String?> = listOf(null)
val set: Set<String?> = setOf(null)
}
}
@@ -1,12 +0,0 @@
package demo
internal class Map {
fun <K, V> put(k: K?, v: V) {}
}
internal class U {
fun test() {
val m = Map()
m.put<String, Int>(null, 10)
}
}
@@ -1,7 +0,0 @@
import kotlinApi.extensionFunction
fun adjust(name: String?, maxLen: Int) {
(1 + 1).toString()
"a".split(("\\s+" + "\\s+").toRegex(), 2).toTypedArray()
(1 + 1).extensionFunction()
}
@@ -1,41 +0,0 @@
import java.util.HashMap
internal enum class E {
A, B, C
}
internal class A {
fun foo(list: List<String?>, collection: Collection<Int?>, map: Map<Int?, Int?>) {
val a = "".length
val b = E.A.name
val c = E.A.ordinal
val d = list.size + collection.size
val e = map.size
val f = map.keys.size
val g = map.values.size
val h = map.entries.size
}
fun bar(list: MutableList<String?>, map: HashMap<String?, Int?>) {
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")
} catch (e: Exception) {
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)
}
}
}
@@ -132,3 +132,4 @@ class A {
}
void useSplit(String[] result) {}
}
@@ -1,9 +0,0 @@
import java.lang.reflect.Constructor
internal object X {
@Throws(Exception::class)
fun <T> foo(constructor: Constructor<T?>, args1: Array<Any?>, args2: Array<Any?>?) {
constructor.newInstance(*args1)
constructor.newInstance(args1, args2)
}
}
@@ -1,9 +0,0 @@
import javaApi.WithVarargConstructor
internal class X {
fun foo() {
val o1 = WithVarargConstructor(1, *arrayOf("a"))
val o2 = WithVarargConstructor(2, arrayOf("a"), arrayOf("b"))
val o3 = WithVarargConstructor(2, "a")
}
}