From e1f44d6237b45ee01c32d976f9112a32a01244ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=C3=ABl=20Peltier?= Date: Wed, 7 Feb 2018 17:25:54 +0100 Subject: [PATCH] Move tests to the right place --- .../codegen/java8/box/jvm8/checkcast/kt22714.kt | 16 ---------------- .../java8/bytecodeText/checkcast/kt22714.kt | 16 ---------------- .../BlackBoxWithJava8CodegenTestGenerated.java | 15 --------------- .../codegen/BytecodeTextJava8TestGenerated.java | 15 --------------- 4 files changed, 62 deletions(-) delete mode 100644 compiler/testData/codegen/java8/box/jvm8/checkcast/kt22714.kt delete mode 100644 compiler/testData/codegen/java8/bytecodeText/checkcast/kt22714.kt diff --git a/compiler/testData/codegen/java8/box/jvm8/checkcast/kt22714.kt b/compiler/testData/codegen/java8/box/jvm8/checkcast/kt22714.kt deleted file mode 100644 index 124d0cb26bb..00000000000 --- a/compiler/testData/codegen/java8/box/jvm8/checkcast/kt22714.kt +++ /dev/null @@ -1,16 +0,0 @@ -// JVM_TARGET: 1.8 - -fun Array.getLength(): Int { - return this.size -} - -fun Any.getLength() = - if (this is Array<*>) size else -1 - -fun box(): String { - val array1: Array = arrayOf("1", "2", "3") - val array2: Any = arrayOf("1", "2", "3") - if (array1.getLength() + array2.getLength() != 6) - return "FAILURE" - return "OK" -} \ No newline at end of file diff --git a/compiler/testData/codegen/java8/bytecodeText/checkcast/kt22714.kt b/compiler/testData/codegen/java8/bytecodeText/checkcast/kt22714.kt deleted file mode 100644 index 6b8cb1fcc05..00000000000 --- a/compiler/testData/codegen/java8/bytecodeText/checkcast/kt22714.kt +++ /dev/null @@ -1,16 +0,0 @@ -// JVM_TARGET: 1.8 - -fun Array.getLength(): Int { - return this.size -} - -fun Any.getLength() = - if (this is Array<*>) size else -1 - -fun testCheckcast1(): Int { - val array1: Array = arrayOf("1", "2", "3") - val array2: Any = arrayOf("1", "2", "3") - return array1.getLength() + array2.getLength() -} - -// 1 CHECKCAST \ No newline at end of file diff --git a/compiler/tests-java8/tests/org/jetbrains/kotlin/codegen/BlackBoxWithJava8CodegenTestGenerated.java b/compiler/tests-java8/tests/org/jetbrains/kotlin/codegen/BlackBoxWithJava8CodegenTestGenerated.java index fb10685c510..fc09ec5687a 100644 --- a/compiler/tests-java8/tests/org/jetbrains/kotlin/codegen/BlackBoxWithJava8CodegenTestGenerated.java +++ b/compiler/tests-java8/tests/org/jetbrains/kotlin/codegen/BlackBoxWithJava8CodegenTestGenerated.java @@ -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) diff --git a/compiler/tests-java8/tests/org/jetbrains/kotlin/codegen/BytecodeTextJava8TestGenerated.java b/compiler/tests-java8/tests/org/jetbrains/kotlin/codegen/BytecodeTextJava8TestGenerated.java index 2dbc3d93076..32aa7415064 100644 --- a/compiler/tests-java8/tests/org/jetbrains/kotlin/codegen/BytecodeTextJava8TestGenerated.java +++ b/compiler/tests-java8/tests/org/jetbrains/kotlin/codegen/BytecodeTextJava8TestGenerated.java @@ -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)