Refactored tests using Array constructor:
Some moved to tests with stdlib Some changed to use arrayOfNulls
This commit is contained in:
committed by
Alexander Udalov
parent
abbcf61183
commit
654411a0b0
@@ -5,7 +5,7 @@ fun t1 () {
|
||||
}
|
||||
|
||||
fun t2 () {
|
||||
val a2 = Array<Int>(1,{0})
|
||||
val a2 = arrayOfNulls<Int>(1) as Array<Int>
|
||||
a2[0] = 0 //ok
|
||||
var i = a2[0] //ok
|
||||
}
|
||||
|
||||
@@ -67,10 +67,10 @@ fun box(): String {
|
||||
if (foo(boolA) != 1) return "fail boolean[]"
|
||||
val cA = CharArray(1)
|
||||
if (foo(cA) != 1) return "fail char[]"
|
||||
val oA = Array<Any>(1) { 1 }
|
||||
val oA = arrayOfNulls<Int>(1)
|
||||
if (foo(oA) != 1) return "fail Any[]"
|
||||
|
||||
val sArray = Array<String>(0) { "" }
|
||||
val sArray = arrayOfNulls<String>(0)
|
||||
if (foo(sArray) != 0) return "fail String[]"
|
||||
|
||||
return "OK"
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
val <T> Array<T>.length : Int get() = this.size()
|
||||
|
||||
fun box() = if(Array(10, {1}).length == 10) "OK" else "fail"
|
||||
fun box() = if(arrayOfNulls<Int>(10).length == 10) "OK" else "fail"
|
||||
|
||||
@@ -90,7 +90,7 @@ fun for_object_list(): Int {
|
||||
}
|
||||
|
||||
fun for_str_array(): Int {
|
||||
val a = Array<String>(10) {i -> "$i"}
|
||||
val a = arrayOfNulls<String>(10)
|
||||
var c = 0
|
||||
for (i in a) {
|
||||
if (c >= 5) continue
|
||||
|
||||
@@ -90,7 +90,7 @@ fun for_object_list(): Int {
|
||||
}
|
||||
|
||||
fun for_str_array(): Int {
|
||||
val a = Array<String>(10) {i -> "$i"}
|
||||
val a = arrayOfNulls<String>(10)
|
||||
var c = 0
|
||||
@loop for (i in a) {
|
||||
if (c >= 5) continue @loop
|
||||
|
||||
@@ -7,4 +7,8 @@ fun f(x: Any?): String {
|
||||
return "FAIL"
|
||||
}
|
||||
|
||||
fun box(): String = f(Array<String>(1, {"OK"}))
|
||||
fun box(): String {
|
||||
val a = arrayOfNulls<String>(1) as Array<String>
|
||||
a[0] = "OK"
|
||||
return f(a)
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
fun box() : String {
|
||||
val a = Array<Int> (5, {0})
|
||||
val a = arrayOfNulls<Int>(5)
|
||||
var i = 0
|
||||
var sum = 0
|
||||
for(el in 0..4) {
|
||||
a[i] = i++
|
||||
}
|
||||
for (el in a) {
|
||||
for (el in (a as Array<Int>)) {
|
||||
sum = sum + el
|
||||
}
|
||||
if(sum != 10) return "a failed"
|
||||
|
||||
@@ -44,7 +44,7 @@ fun box() : String {
|
||||
}
|
||||
if(sum != 15) return "c4 failed"
|
||||
|
||||
val a : Array<Int> = Array<Int> (5, {0})
|
||||
val a : Array<Int> = arrayOfNulls<Int>(5) as Array<Int>
|
||||
for(el in 0..4) {
|
||||
a[i] = i++
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ fun main(args: Array<String>?) {
|
||||
//do not compile
|
||||
System.out?.println(fff<Unit>(Unit)) //do not compile
|
||||
System.out?.println(id<Unit>(y)) //do not compile
|
||||
System.out?.println(fff<Unit>(id<Unit>(y)) == id<Unit>(foreach(Array<Int>(0,{0}),{(e : Int) : Unit -> }))) //do not compile
|
||||
System.out?.println(fff<Unit>(id<Unit>(y)) == id<Unit>(foreach(arrayOfNulls<Int>(0) as Array<Int>,{(e : Int) : Unit -> }))) //do not compile
|
||||
}
|
||||
class A<T>()
|
||||
|
||||
@@ -30,7 +30,7 @@ fun almostFilter(array: Array<Int>, action: (Int)-> Int) {
|
||||
}
|
||||
|
||||
fun box() : String {
|
||||
val a = Array<Int> (3,{-1})
|
||||
val a = arrayOfNulls<Int>(3) as Array<Int>
|
||||
a[0] = 0
|
||||
a[1] = 1
|
||||
a[2] = 2
|
||||
|
||||
@@ -7,6 +7,6 @@ object Obj {
|
||||
fun box() : String {
|
||||
val klass = Class.forName("Obj\$Inner")!!
|
||||
val cons = klass.getConstructors()!![0]
|
||||
val inner = cons.newInstance(* Array(0){""})
|
||||
val inner = cons.newInstance(*(arrayOfNulls<String>(0) as Array<String>))
|
||||
return "OK"
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ fun checkLess(x: Array<Int>, y: Array<Int>) = when {
|
||||
fun Array<Int>.compareTo(other: Array<Int>) = size() - other.size()
|
||||
|
||||
fun box(): String {
|
||||
val a = Array<Int>(0, {0})
|
||||
val b = Array<Int>(1, {0})
|
||||
val a = arrayOfNulls<Int>(0) as Array<Int>
|
||||
val b = arrayOfNulls<Int>(1) as Array<Int>
|
||||
return checkLess(a, b)
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ fun box(): String {
|
||||
val collection = MyCollection(Arrays.asList(2, 3, 9)) as java.util.Collection<*>
|
||||
|
||||
val array1 = collection.toArray()
|
||||
val array2 = collection.toArray(Array<Int>(3, { 0 }))
|
||||
val array2 = collection.toArray(arrayOfNulls<Int>(3) as Array<Int>)
|
||||
|
||||
if (array1 !is Array<Any>) return (array1 as Object).getClass().toString()
|
||||
if (array2 !is Array<Int>) return (array2 as Object).getClass().toString()
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
import java.util.Arrays
|
||||
|
||||
class MyCollection<T>(val delegate: Collection<T>): Collection<T> by delegate {
|
||||
public fun toArray(): Array<Any?> = Array<Any?>(3, { it })
|
||||
public fun toArray(): Array<Any?> {
|
||||
val a = arrayOfNulls<Any?>(3)
|
||||
a[0] = 0
|
||||
a[1] = 1
|
||||
a[2] = 2
|
||||
return a
|
||||
}
|
||||
public fun <E> toArray(array: Array<E>): Array<E> {
|
||||
val asIntArray = array as Array<Int>
|
||||
asIntArray[0] = 0
|
||||
@@ -15,7 +21,7 @@ fun box(): String {
|
||||
val collection = MyCollection(Arrays.asList(2, 3, 9)) as java.util.Collection<*>
|
||||
|
||||
val array1 = collection.toArray()
|
||||
val array2 = collection.toArray(Array<Int>(3, { 0 }))
|
||||
val array2 = collection.toArray(arrayOfNulls<Int>(3) as Array<Int>)
|
||||
|
||||
if (array1 !is Array<Any>) return (array1 as Object).getClass().toString()
|
||||
if (array2 !is Array<Int>) return (array2 as Object).getClass().toString()
|
||||
|
||||
@@ -10,7 +10,7 @@ fun foo() {
|
||||
val a = A()
|
||||
a.x = 3
|
||||
|
||||
val b = Array<Int?>(4, { null })
|
||||
val b = arrayOfNulls<Int>(4)
|
||||
b[100] = 5
|
||||
|
||||
val x = 6 : Int?
|
||||
@@ -24,5 +24,5 @@ fun foo() {
|
||||
val c2: Any = if (1 != 1) 0 else "abc"
|
||||
}
|
||||
|
||||
// 10 java/lang/Integer.valueOf
|
||||
// 1 intValue
|
||||
// 9 java/lang/Integer.valueOf
|
||||
// 0 intValue
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Foo(vararg val a: String = Array<String>(1) {"default"})
|
||||
class Foo(vararg val a: String = arrayOfNulls<String>(1) as Array<String>)
|
||||
|
||||
// CLASS: Foo
|
||||
// HAS_DEFAULT_CONSTRUCTOR: true
|
||||
|
||||
@@ -15,7 +15,7 @@ fun main(args: Array<String>) {
|
||||
val l: Inv<List<String>> = inv(list())
|
||||
val l1: Inv<MutableList<String>?> = inv(list())
|
||||
|
||||
val a = array(Array<Int>(1){0})
|
||||
val a = array(arrayOfNulls<Int>(1) as Array<Int>)
|
||||
a[0] = 1
|
||||
val a1: Inv<Array<Int>> = inv(a)
|
||||
val a2: Inv<Array<out Int>?> = inv(a)
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
public inline fun <reified T> Array(n: Int, block: (Int) -> T): Array<T> = null!!
|
||||
|
||||
fun bar(x: Int): Int = x + 1
|
||||
|
||||
fun foo() {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package
|
||||
|
||||
kotlin.inline() public fun </*0*/ reified T> Array(/*0*/ n: kotlin.Int, /*1*/ block: (kotlin.Int) -> T): kotlin.Array<T>
|
||||
internal fun bar(/*0*/ x: kotlin.Int): kotlin.Int
|
||||
internal fun foo(): kotlin.Unit
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
public inline fun <reified T> Array(n: Int, block: (Int) -> T): Array<T> = null!!
|
||||
|
||||
fun bar(x: Int): Int = x + 1
|
||||
|
||||
fun foo() {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package
|
||||
|
||||
kotlin.inline() public fun </*0*/ reified T> Array(/*0*/ n: kotlin.Int, /*1*/ block: (kotlin.Int) -> T): kotlin.Array<T>
|
||||
internal fun bar(/*0*/ x: kotlin.Int): kotlin.Int
|
||||
internal fun foo(): kotlin.Unit
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
package kotlin1
|
||||
|
||||
import java.util.*
|
||||
|
||||
public inline fun <reified T> Array(n: Int, block: (Int) -> T): Array<T> = null!!
|
||||
|
||||
|
||||
fun main(args : Array<String>) {
|
||||
val al : ArrayList<Int> = ArrayList<Int>()
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package
|
||||
|
||||
package kotlin1 {
|
||||
kotlin.inline() public fun </*0*/ reified T> Array(/*0*/ n: kotlin.Int, /*1*/ block: (kotlin.Int) -> T): kotlin.Array<T>
|
||||
internal fun main(/*0*/ args: kotlin.Array<kotlin.String>): kotlin.Unit
|
||||
}
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
public inline fun <reified T> Array(n: Int, block: (Int) -> T): Array<T> = null!!
|
||||
|
||||
//KT-1703 Reference to label is unresolved
|
||||
|
||||
fun test() {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package
|
||||
|
||||
kotlin.inline() public fun </*0*/ reified T> Array(/*0*/ n: kotlin.Int, /*1*/ block: (kotlin.Int) -> T): kotlin.Array<T>
|
||||
internal fun test(): kotlin.Unit
|
||||
internal fun use(/*0*/ a: kotlin.Any?): kotlin.Any?
|
||||
internal fun </*0*/ T> kotlin.Array<out T>.forEach(/*0*/ operation: (T) -> kotlin.Unit): kotlin.Unit
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
public inline fun <reified T> Array(n: Int, block: (Int) -> T): Array<T> = null!!
|
||||
|
||||
// KT-312 Nullability problem when a nullable version of a generic type is returned
|
||||
|
||||
fun <T> Array<out T>.safeGet(index : Int) : T<!BASE_WITH_NULLABLE_UPPER_BOUND!>?<!> {
|
||||
|
||||
@@ -3,4 +3,5 @@ package
|
||||
internal val args: kotlin.Array<kotlin.String>
|
||||
internal val name: kotlin.String
|
||||
internal val name1: kotlin.String?
|
||||
kotlin.inline() public fun </*0*/ reified T> Array(/*0*/ n: kotlin.Int, /*1*/ block: (kotlin.Int) -> T): kotlin.Array<T>
|
||||
internal fun </*0*/ T> kotlin.Array<out T>.safeGet(/*0*/ index: kotlin.Int): T?
|
||||
|
||||
+3
@@ -1,3 +1,6 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
public inline fun <reified T> Array(n: Int, block: (Int) -> T): Array<T> = null!!
|
||||
|
||||
class A {
|
||||
fun component1() = 42
|
||||
fun component2() = 42
|
||||
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
package
|
||||
|
||||
kotlin.inline() public fun </*0*/ reified T> Array(/*0*/ n: kotlin.Int, /*1*/ block: (kotlin.Int) -> T): kotlin.Array<T>
|
||||
internal fun foo(/*0*/ a: A, /*1*/ c: kotlin.Int): kotlin.Unit
|
||||
|
||||
internal final class A {
|
||||
|
||||
@@ -4906,12 +4906,6 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/inference"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("arrayConstructor.kt")
|
||||
public void testArrayConstructor() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/arrayConstructor.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("cannotCompleteResolveAmbiguity.kt")
|
||||
public void testCannotCompleteResolveAmbiguity() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/cannotCompleteResolveAmbiguity.kt");
|
||||
@@ -5256,12 +5250,6 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt1558.kt")
|
||||
public void testKt1558() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt1558.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt1718.kt")
|
||||
public void testKt1718() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt1718.kt");
|
||||
|
||||
+22
-1
@@ -30,7 +30,7 @@ import java.util.regex.Pattern;
|
||||
@SuppressWarnings("all")
|
||||
@TestMetadata("compiler/testData/diagnostics/testsWithStdLib")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@InnerTestClasses({JetDiagnosticsTestWithStdLibGenerated.Annotations.class, JetDiagnosticsTestWithStdLibGenerated.CallableReference.class, JetDiagnosticsTestWithStdLibGenerated.DuplicateJvmSignature.class, JetDiagnosticsTestWithStdLibGenerated.FunctionLiterals.class, JetDiagnosticsTestWithStdLibGenerated.KotlinSignature.class, JetDiagnosticsTestWithStdLibGenerated.Reified.class, JetDiagnosticsTestWithStdLibGenerated.Resolve.class})
|
||||
@InnerTestClasses({JetDiagnosticsTestWithStdLibGenerated.Annotations.class, JetDiagnosticsTestWithStdLibGenerated.CallableReference.class, JetDiagnosticsTestWithStdLibGenerated.DuplicateJvmSignature.class, JetDiagnosticsTestWithStdLibGenerated.FunctionLiterals.class, JetDiagnosticsTestWithStdLibGenerated.Inference.class, JetDiagnosticsTestWithStdLibGenerated.KotlinSignature.class, JetDiagnosticsTestWithStdLibGenerated.Reified.class, JetDiagnosticsTestWithStdLibGenerated.Resolve.class})
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public class JetDiagnosticsTestWithStdLibGenerated extends AbstractJetDiagnosticsTestWithStdLib {
|
||||
public void testAllFilesPresentInTestsWithStdLib() throws Exception {
|
||||
@@ -606,6 +606,27 @@ public class JetDiagnosticsTestWithStdLibGenerated extends AbstractJetDiagnostic
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/diagnostics/testsWithStdLib/inference")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Inference extends AbstractJetDiagnosticsTestWithStdLib {
|
||||
public void testAllFilesPresentInInference() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/inference"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("arrayConstructor.kt")
|
||||
public void testArrayConstructor() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/arrayConstructor.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt1558.kt")
|
||||
public void testKt1558() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/kt1558.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/diagnostics/testsWithStdLib/kotlinSignature")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
@@ -27,30 +27,6 @@ public class ArrayGenTest extends CodegenTestCase {
|
||||
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
|
||||
}
|
||||
|
||||
public void testCreateMultiInt() throws Exception {
|
||||
loadText("fun foo() = Array<Array<Int>> (5, { Array<Int>(it, {239}) })");
|
||||
Method foo = generateFunction();
|
||||
Integer[][] invoke = (Integer[][]) foo.invoke(null);
|
||||
assertEquals(invoke[2].length, 2);
|
||||
assertEquals(invoke[4].length, 4);
|
||||
assertEquals(invoke[4][2].intValue(), 239);
|
||||
}
|
||||
|
||||
public void testCreateMultiIntNullable() throws Exception {
|
||||
loadText("fun foo() = Array<Array<Int?>> (5, { arrayOfNulls<Int>(it) })");
|
||||
Method foo = generateFunction();
|
||||
Integer[][] invoke = (Integer[][]) foo.invoke(null);
|
||||
assertEquals(invoke[2].length, 2);
|
||||
assertEquals(invoke[4].length, 4);
|
||||
}
|
||||
|
||||
public void testCreateMultiString() throws Exception {
|
||||
loadText("fun foo() = Array<Array<String>> (5, { Array<String>(0,{\"\"}) })");
|
||||
Method foo = generateFunction();
|
||||
Object invoke = foo.invoke(null);
|
||||
assertTrue(invoke instanceof Object[]);
|
||||
}
|
||||
|
||||
public void testIntGenerics() throws Exception {
|
||||
loadText("class L<T>(var a : T) {} fun foo() = L<Int>(5).a");
|
||||
Method foo = generateFunction();
|
||||
|
||||
@@ -363,17 +363,6 @@ public class PackageGenTest extends CodegenTestCase {
|
||||
assertEquals(10L, data[0]);
|
||||
}
|
||||
|
||||
public void testArrayNew() throws Exception {
|
||||
loadText("fun foo() = Array<Int>(4, { it })");
|
||||
Method main = generateFunction();
|
||||
Integer[] result = (Integer[]) main.invoke(null);
|
||||
assertEquals(4, result.length);
|
||||
assertEquals(0, result[0].intValue());
|
||||
assertEquals(1, result[1].intValue());
|
||||
assertEquals(2, result[2].intValue());
|
||||
assertEquals(3, result[3].intValue());
|
||||
}
|
||||
|
||||
public void testArrayNewNullable() throws Exception {
|
||||
loadText("fun foo() = arrayOfNulls<Int>(4)");
|
||||
Method main = generateFunction();
|
||||
@@ -387,14 +376,6 @@ public class PackageGenTest extends CodegenTestCase {
|
||||
assertEquals(4, result.length);
|
||||
}
|
||||
|
||||
public void testFloatArrayArrayNew() throws Exception {
|
||||
loadText("fun foo() = Array<FloatArray>(4, { FloatArray(5-it) })");
|
||||
Method main = generateFunction();
|
||||
float[][] result = (float[][]) main.invoke(null);
|
||||
assertEquals(4, result.length);
|
||||
assertEquals(2, result[3].length);
|
||||
}
|
||||
|
||||
public void testArraySize() throws Exception {
|
||||
loadText("fun foo(a: Array<Int>) = a.size()");
|
||||
Method main = generateFunction();
|
||||
|
||||
+1
-167
@@ -45,18 +45,6 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/arrays"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("arrayGetAssignMultiIndex.kt")
|
||||
public void testArrayGetAssignMultiIndex() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arrayGetAssignMultiIndex.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("arrayGetMultiIndex.kt")
|
||||
public void testArrayGetMultiIndex() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arrayGetMultiIndex.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("arrayPlusAssign.kt")
|
||||
public void testArrayPlusAssign() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arrayPlusAssign.kt");
|
||||
@@ -129,12 +117,6 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("iterator.kt")
|
||||
public void testIterator() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iterator.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("iteratorBooleanArray.kt")
|
||||
public void testIteratorBooleanArray() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorBooleanArray.kt");
|
||||
@@ -254,12 +236,6 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/longAsIndex.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("nonNullArray.kt")
|
||||
public void testNonNullArray() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/nonNullArray.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/binaryOp")
|
||||
@@ -1340,12 +1316,6 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt471.kt")
|
||||
public void testKt471() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt471.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt48.kt")
|
||||
public void testKt48() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt48.kt");
|
||||
@@ -1382,12 +1352,6 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt633.kt")
|
||||
public void testKt633() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt633.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt707.kt")
|
||||
public void testKt707() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt707.kt");
|
||||
@@ -3236,12 +3200,6 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt4118.kt")
|
||||
public void testKt4118() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt4118.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt475.kt")
|
||||
public void testKt475() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt475.kt");
|
||||
@@ -3612,12 +3570,6 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt1291.kt")
|
||||
public void testKt1291() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt1291.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt1413.kt")
|
||||
public void testKt1413() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt1413.kt");
|
||||
@@ -4376,7 +4328,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/multiDecl")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@InnerTestClasses({MultiDecl.ForArray.class, MultiDecl.ForIterator.class, MultiDecl.ForRange.class})
|
||||
@InnerTestClasses({MultiDecl.ForIterator.class, MultiDecl.ForRange.class})
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class MultiDecl extends AbstractBlackBoxCodegenTest {
|
||||
public void testAllFilesPresentInMultiDecl() throws Exception {
|
||||
@@ -4449,112 +4401,6 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/multiDecl/forArray")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@InnerTestClasses({ForArray.Int.class, ForArray.Long.class})
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class ForArray extends AbstractBlackBoxCodegenTest {
|
||||
public void testAllFilesPresentInForArray() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forArray"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("MultiDeclFor.kt")
|
||||
public void testMultiDeclFor() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forArray/MultiDeclFor.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("MultiDeclForComponentExtensions.kt")
|
||||
public void testMultiDeclForComponentExtensions() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forArray/MultiDeclForComponentExtensions.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("MultiDeclForComponentMemberExtensions.kt")
|
||||
public void testMultiDeclForComponentMemberExtensions() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forArray/MultiDeclForComponentMemberExtensions.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt")
|
||||
public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forArray/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("MultiDeclForValCaptured.kt")
|
||||
public void testMultiDeclForValCaptured() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forArray/MultiDeclForValCaptured.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/multiDecl/forArray/int")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Int extends AbstractBlackBoxCodegenTest {
|
||||
public void testAllFilesPresentInInt() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forArray/int"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("MultiDeclForComponentExtensions.kt")
|
||||
public void testMultiDeclForComponentExtensions() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forArray/int/MultiDeclForComponentExtensions.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt")
|
||||
public void testMultiDeclForComponentExtensionsValCaptured() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forArray/int/MultiDeclForComponentExtensionsValCaptured.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("MultiDeclForComponentMemberExtensions.kt")
|
||||
public void testMultiDeclForComponentMemberExtensions() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forArray/int/MultiDeclForComponentMemberExtensions.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt")
|
||||
public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forArray/int/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/multiDecl/forArray/long")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Long extends AbstractBlackBoxCodegenTest {
|
||||
public void testAllFilesPresentInLong() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forArray/long"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("MultiDeclForComponentExtensions.kt")
|
||||
public void testMultiDeclForComponentExtensions() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forArray/long/MultiDeclForComponentExtensions.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt")
|
||||
public void testMultiDeclForComponentExtensionsValCaptured() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forArray/long/MultiDeclForComponentExtensionsValCaptured.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("MultiDeclForComponentMemberExtensions.kt")
|
||||
public void testMultiDeclForComponentMemberExtensions() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forArray/long/MultiDeclForComponentMemberExtensions.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt")
|
||||
public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forArray/long/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/multiDecl/forIterator")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@InnerTestClasses({ForIterator.LongIterator.class})
|
||||
@@ -5755,12 +5601,6 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt945.kt")
|
||||
public void testKt945() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt945.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("nullAsNullableIntIsNull.kt")
|
||||
public void testNullAsNullableIntIsNull() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/nullAsNullableIntIsNull.kt");
|
||||
@@ -6689,12 +6529,6 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("stdlib.kt")
|
||||
public void testStdlib() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/stdlib.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("traitWithPrivateExtension.kt")
|
||||
public void testTraitWithPrivateExtension() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/traitWithPrivateExtension.kt");
|
||||
|
||||
+176
-1
@@ -30,7 +30,7 @@ import java.util.regex.Pattern;
|
||||
@SuppressWarnings("all")
|
||||
@TestMetadata("compiler/testData/codegen/boxWithStdlib")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@InnerTestClasses({BlackBoxWithStdlibCodegenTestGenerated.Annotations.class, BlackBoxWithStdlibCodegenTestGenerated.Arrays.class, BlackBoxWithStdlibCodegenTestGenerated.BoxingOptimization.class, BlackBoxWithStdlibCodegenTestGenerated.CallableReference.class, BlackBoxWithStdlibCodegenTestGenerated.Casts.class, BlackBoxWithStdlibCodegenTestGenerated.DataClasses.class, BlackBoxWithStdlibCodegenTestGenerated.DefaultArguments.class, BlackBoxWithStdlibCodegenTestGenerated.Enum.class, BlackBoxWithStdlibCodegenTestGenerated.Evaluate.class, BlackBoxWithStdlibCodegenTestGenerated.FullJdk.class, BlackBoxWithStdlibCodegenTestGenerated.HashPMap.class, BlackBoxWithStdlibCodegenTestGenerated.Intrinsics.class, BlackBoxWithStdlibCodegenTestGenerated.JdkAnnotations.class, BlackBoxWithStdlibCodegenTestGenerated.LazyCodegen.class, BlackBoxWithStdlibCodegenTestGenerated.LocalFunInLambda.class, BlackBoxWithStdlibCodegenTestGenerated.NonLocalReturns.class, BlackBoxWithStdlibCodegenTestGenerated.PlatformNames.class, BlackBoxWithStdlibCodegenTestGenerated.PlatformStatic.class, BlackBoxWithStdlibCodegenTestGenerated.PlatformTypes.class, BlackBoxWithStdlibCodegenTestGenerated.Ranges.class, BlackBoxWithStdlibCodegenTestGenerated.Reflection.class, BlackBoxWithStdlibCodegenTestGenerated.Regressions.class, BlackBoxWithStdlibCodegenTestGenerated.Reified.class, BlackBoxWithStdlibCodegenTestGenerated.StoreStackBeforeInline.class, BlackBoxWithStdlibCodegenTestGenerated.Strings.class, BlackBoxWithStdlibCodegenTestGenerated.ToArray.class, BlackBoxWithStdlibCodegenTestGenerated.Vararg.class, BlackBoxWithStdlibCodegenTestGenerated.When.class, BlackBoxWithStdlibCodegenTestGenerated.WhenEnumOptimization.class, BlackBoxWithStdlibCodegenTestGenerated.WhenStringOptimization.class})
|
||||
@InnerTestClasses({BlackBoxWithStdlibCodegenTestGenerated.Annotations.class, BlackBoxWithStdlibCodegenTestGenerated.Arrays.class, BlackBoxWithStdlibCodegenTestGenerated.BoxingOptimization.class, BlackBoxWithStdlibCodegenTestGenerated.CallableReference.class, BlackBoxWithStdlibCodegenTestGenerated.Casts.class, BlackBoxWithStdlibCodegenTestGenerated.Classes.class, BlackBoxWithStdlibCodegenTestGenerated.DataClasses.class, BlackBoxWithStdlibCodegenTestGenerated.DefaultArguments.class, BlackBoxWithStdlibCodegenTestGenerated.Enum.class, BlackBoxWithStdlibCodegenTestGenerated.Evaluate.class, BlackBoxWithStdlibCodegenTestGenerated.FullJdk.class, BlackBoxWithStdlibCodegenTestGenerated.HashPMap.class, BlackBoxWithStdlibCodegenTestGenerated.Intrinsics.class, BlackBoxWithStdlibCodegenTestGenerated.JdkAnnotations.class, BlackBoxWithStdlibCodegenTestGenerated.LazyCodegen.class, BlackBoxWithStdlibCodegenTestGenerated.LocalFunInLambda.class, BlackBoxWithStdlibCodegenTestGenerated.MultiDeclForArray.class, BlackBoxWithStdlibCodegenTestGenerated.NonLocalReturns.class, BlackBoxWithStdlibCodegenTestGenerated.PlatformNames.class, BlackBoxWithStdlibCodegenTestGenerated.PlatformStatic.class, BlackBoxWithStdlibCodegenTestGenerated.PlatformTypes.class, BlackBoxWithStdlibCodegenTestGenerated.Ranges.class, BlackBoxWithStdlibCodegenTestGenerated.Reflection.class, BlackBoxWithStdlibCodegenTestGenerated.Regressions.class, BlackBoxWithStdlibCodegenTestGenerated.Reified.class, BlackBoxWithStdlibCodegenTestGenerated.StoreStackBeforeInline.class, BlackBoxWithStdlibCodegenTestGenerated.Strings.class, BlackBoxWithStdlibCodegenTestGenerated.ToArray.class, BlackBoxWithStdlibCodegenTestGenerated.Vararg.class, BlackBoxWithStdlibCodegenTestGenerated.When.class, BlackBoxWithStdlibCodegenTestGenerated.WhenEnumOptimization.class, BlackBoxWithStdlibCodegenTestGenerated.WhenStringOptimization.class})
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public class BlackBoxWithStdlibCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
public void testAllFilesPresentInBoxWithStdlib() throws Exception {
|
||||
@@ -108,6 +108,18 @@ public class BlackBoxWithStdlibCodegenTestGenerated extends AbstractBlackBoxCode
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithStdlib/arrays"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("arrayGetAssignMultiIndex.kt")
|
||||
public void testArrayGetAssignMultiIndex() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/arrays/arrayGetAssignMultiIndex.kt");
|
||||
doTestWithStdlib(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("arrayGetMultiIndex.kt")
|
||||
public void testArrayGetMultiIndex() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/arrays/arrayGetMultiIndex.kt");
|
||||
doTestWithStdlib(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("cloneArray.kt")
|
||||
public void testCloneArray() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/arrays/cloneArray.kt");
|
||||
@@ -132,17 +144,53 @@ public class BlackBoxWithStdlibCodegenTestGenerated extends AbstractBlackBoxCode
|
||||
doTestWithStdlib(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("iterator.kt")
|
||||
public void testIterator() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/arrays/iterator.kt");
|
||||
doTestWithStdlib(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt1291.kt")
|
||||
public void testKt1291() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/arrays/kt1291.kt");
|
||||
doTestWithStdlib(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt3771.kt")
|
||||
public void testKt3771() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/arrays/kt3771.kt");
|
||||
doTestWithStdlib(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt4118.kt")
|
||||
public void testKt4118() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/arrays/kt4118.kt");
|
||||
doTestWithStdlib(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt4357.kt")
|
||||
public void testKt4357() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/arrays/kt4357.kt");
|
||||
doTestWithStdlib(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt945.kt")
|
||||
public void testKt945() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/arrays/kt945.kt");
|
||||
doTestWithStdlib(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("nonNullArray.kt")
|
||||
public void testNonNullArray() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/arrays/nonNullArray.kt");
|
||||
doTestWithStdlib(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("stdlib.kt")
|
||||
public void testStdlib() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/arrays/stdlib.kt");
|
||||
doTestWithStdlib(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/boxWithStdlib/boxingOptimization")
|
||||
@@ -753,6 +801,27 @@ public class BlackBoxWithStdlibCodegenTestGenerated extends AbstractBlackBoxCode
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/boxWithStdlib/classes")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Classes extends AbstractBlackBoxCodegenTest {
|
||||
public void testAllFilesPresentInClasses() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithStdlib/classes"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("kt471.kt")
|
||||
public void testKt471() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/classes/kt471.kt");
|
||||
doTestWithStdlib(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt633.kt")
|
||||
public void testKt633() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/classes/kt633.kt");
|
||||
doTestWithStdlib(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/boxWithStdlib/dataClasses")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@InnerTestClasses({DataClasses.Copy.class, DataClasses.Equals.class, DataClasses.Hashcode.class, DataClasses.Tostring.class})
|
||||
@@ -1624,6 +1693,112 @@ public class BlackBoxWithStdlibCodegenTestGenerated extends AbstractBlackBoxCode
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/boxWithStdlib/multiDeclForArray")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@InnerTestClasses({MultiDeclForArray.Int.class, MultiDeclForArray.Long.class})
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class MultiDeclForArray extends AbstractBlackBoxCodegenTest {
|
||||
public void testAllFilesPresentInMultiDeclForArray() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithStdlib/multiDeclForArray"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("MultiDeclFor.kt")
|
||||
public void testMultiDeclFor() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/multiDeclForArray/MultiDeclFor.kt");
|
||||
doTestWithStdlib(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("MultiDeclForComponentExtensions.kt")
|
||||
public void testMultiDeclForComponentExtensions() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/multiDeclForArray/MultiDeclForComponentExtensions.kt");
|
||||
doTestWithStdlib(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("MultiDeclForComponentMemberExtensions.kt")
|
||||
public void testMultiDeclForComponentMemberExtensions() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/multiDeclForArray/MultiDeclForComponentMemberExtensions.kt");
|
||||
doTestWithStdlib(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt")
|
||||
public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/multiDeclForArray/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt");
|
||||
doTestWithStdlib(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("MultiDeclForValCaptured.kt")
|
||||
public void testMultiDeclForValCaptured() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/multiDeclForArray/MultiDeclForValCaptured.kt");
|
||||
doTestWithStdlib(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/boxWithStdlib/multiDeclForArray/int")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Int extends AbstractBlackBoxCodegenTest {
|
||||
public void testAllFilesPresentInInt() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithStdlib/multiDeclForArray/int"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("MultiDeclForComponentExtensions.kt")
|
||||
public void testMultiDeclForComponentExtensions() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/multiDeclForArray/int/MultiDeclForComponentExtensions.kt");
|
||||
doTestWithStdlib(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt")
|
||||
public void testMultiDeclForComponentExtensionsValCaptured() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/multiDeclForArray/int/MultiDeclForComponentExtensionsValCaptured.kt");
|
||||
doTestWithStdlib(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("MultiDeclForComponentMemberExtensions.kt")
|
||||
public void testMultiDeclForComponentMemberExtensions() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/multiDeclForArray/int/MultiDeclForComponentMemberExtensions.kt");
|
||||
doTestWithStdlib(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt")
|
||||
public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/multiDeclForArray/int/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt");
|
||||
doTestWithStdlib(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/boxWithStdlib/multiDeclForArray/long")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Long extends AbstractBlackBoxCodegenTest {
|
||||
public void testAllFilesPresentInLong() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithStdlib/multiDeclForArray/long"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("MultiDeclForComponentExtensions.kt")
|
||||
public void testMultiDeclForComponentExtensions() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/multiDeclForArray/long/MultiDeclForComponentExtensions.kt");
|
||||
doTestWithStdlib(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt")
|
||||
public void testMultiDeclForComponentExtensionsValCaptured() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/multiDeclForArray/long/MultiDeclForComponentExtensionsValCaptured.kt");
|
||||
doTestWithStdlib(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("MultiDeclForComponentMemberExtensions.kt")
|
||||
public void testMultiDeclForComponentMemberExtensions() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/multiDeclForArray/long/MultiDeclForComponentMemberExtensions.kt");
|
||||
doTestWithStdlib(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt")
|
||||
public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/multiDeclForArray/long/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt");
|
||||
doTestWithStdlib(fileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/boxWithStdlib/nonLocalReturns")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
@@ -3,9 +3,11 @@ class A {
|
||||
fun component2() = 42
|
||||
}
|
||||
|
||||
fun arrayA(): Array<A> = null!!
|
||||
|
||||
fun foo(a: A, <warning>c</warning>: Int) {
|
||||
val (<warning descr="[NAME_SHADOWING] Name shadowed: a"><warning descr="[UNUSED_VARIABLE] Variable 'a' is never used">a</warning></warning>, <warning>b</warning>) = a
|
||||
val arr = Array(2) { A() }
|
||||
val arr = arrayA()
|
||||
for ((<warning descr="[NAME_SHADOWING] Name shadowed: c">c</warning>, d) in arr) {
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
fun test(n: Int): Array<String> {
|
||||
var x: Array<String> = Array<String>(1, {""})
|
||||
var x: Array<String> = arrayOfNulls<String>(1) as Array<String>
|
||||
|
||||
x[0] = <caret>if (n > 5) "A" else "B"
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
fun test(n: Int): Array<String> {
|
||||
var x: Array<String> = Array<String>(1, {""})
|
||||
var x: Array<String> = arrayOfNulls<String>(1) as Array<String>
|
||||
|
||||
<caret>if (n > 5) x[0] = "A" else x[0] = "B"
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
fun test(n: Int): Array<String> {
|
||||
var x: Array<String> = Array<String>(1, {""})
|
||||
var x: Array<String> = arrayOfNulls<String>(1) as Array<String>
|
||||
|
||||
x[0] = <caret>when(n) {
|
||||
in 0..10 -> "small"
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
fun test(n: Int): Array<String> {
|
||||
var x: Array<String> = Array<String>(1, {""})
|
||||
var x: Array<String> = arrayOfNulls<String>(1) as Array<String>
|
||||
|
||||
<caret>when(n) {
|
||||
in 0..10 -> x[0] = "small"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
public inline fun <reified T> Array(n: Int, block: (Int) -> T): Array<T> = null!!
|
||||
fun foo(i: Int) {
|
||||
Array(1, { 42 })[(i + i<caret>)]
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
public inline fun <reified T> Array(n: Int, block: (Int) -> T): Array<T> = null!!
|
||||
fun foo(i: Int) {
|
||||
Array(1, { 42 })[i + i]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user