Move tests to the right place
This commit is contained in:
committed by
Dmitry Petrov
parent
9274241c0e
commit
e1f44d6237
@@ -1,16 +0,0 @@
|
||||
// JVM_TARGET: 1.8
|
||||
|
||||
fun <T> Array<T>.getLength(): Int {
|
||||
return this.size
|
||||
}
|
||||
|
||||
fun Any.getLength() =
|
||||
if (this is Array<*>) size else -1
|
||||
|
||||
fun box(): String {
|
||||
val array1: Array<String> = arrayOf("1", "2", "3")
|
||||
val array2: Any = arrayOf("1", "2", "3")
|
||||
if (array1.getLength() + array2.getLength() != 6)
|
||||
return "FAILURE"
|
||||
return "OK"
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
// JVM_TARGET: 1.8
|
||||
|
||||
fun <T> Array<T>.getLength(): Int {
|
||||
return this.size
|
||||
}
|
||||
|
||||
fun Any.getLength() =
|
||||
if (this is Array<*>) size else -1
|
||||
|
||||
fun testCheckcast1(): Int {
|
||||
val array1: Array<String> = arrayOf("1", "2", "3")
|
||||
val array2: Any = arrayOf("1", "2", "3")
|
||||
return array1.getLength() + array2.getLength()
|
||||
}
|
||||
|
||||
// 1 CHECKCAST
|
||||
Generated
-15
@@ -333,21 +333,6 @@ public class BlackBoxWithJava8CodegenTestGenerated extends AbstractBlackBoxCodeg
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/java8/box/jvm8/checkcast")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Checkcast extends AbstractBlackBoxCodegenTest {
|
||||
public void testAllFilesPresentInCheckcast() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/box/jvm8/checkcast"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("kt22714.kt")
|
||||
public void testKt22714() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/checkcast/kt22714.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/java8/box/jvm8/defaults")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Generated
-15
@@ -25,21 +25,6 @@ public class BytecodeTextJava8TestGenerated extends AbstractBytecodeTextTest {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/bytecodeText"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/java8/bytecodeText/checkcast")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Checkcast extends AbstractBytecodeTextTest {
|
||||
public void testAllFilesPresentInCheckcast() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/bytecodeText/checkcast"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("kt22714.kt")
|
||||
public void testKt22714() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/bytecodeText/checkcast/kt22714.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/java8/bytecodeText/hashCode")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Reference in New Issue
Block a user