Add missing enum entry added/removed tests
#KT-6200 fixed
Original commit: 9523a8b88d
This commit is contained in:
+18
@@ -807,6 +807,18 @@ public class ExperimentalIncrementalJpsTestGenerated extends AbstractExperimenta
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("enumEntryAdded")
|
||||||
|
public void testEnumEntryAdded() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/enumEntryAdded/");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("enumEntryRemoved")
|
||||||
|
public void testEnumEntryRemoved() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/enumEntryRemoved/");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("javaAndKotlinChangedSimultaneously")
|
@TestMetadata("javaAndKotlinChangedSimultaneously")
|
||||||
public void testJavaAndKotlinChangedSimultaneously() throws Exception {
|
public void testJavaAndKotlinChangedSimultaneously() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/javaAndKotlinChangedSimultaneously/");
|
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/javaAndKotlinChangedSimultaneously/");
|
||||||
@@ -1123,6 +1135,12 @@ public class ExperimentalIncrementalJpsTestGenerated extends AbstractExperimenta
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("enumEntryRemoved")
|
||||||
|
public void testEnumEntryRemoved() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/enumEntryRemoved/");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("enumMemberChanged")
|
@TestMetadata("enumMemberChanged")
|
||||||
public void testEnumMemberChanged() throws Exception {
|
public void testEnumMemberChanged() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/enumMemberChanged/");
|
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/enumMemberChanged/");
|
||||||
|
|||||||
@@ -807,6 +807,18 @@ public class IncrementalJpsTestGenerated extends AbstractIncrementalJpsTest {
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("enumEntryAdded")
|
||||||
|
public void testEnumEntryAdded() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/enumEntryAdded/");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("enumEntryRemoved")
|
||||||
|
public void testEnumEntryRemoved() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/enumEntryRemoved/");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("javaAndKotlinChangedSimultaneously")
|
@TestMetadata("javaAndKotlinChangedSimultaneously")
|
||||||
public void testJavaAndKotlinChangedSimultaneously() throws Exception {
|
public void testJavaAndKotlinChangedSimultaneously() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/javaAndKotlinChangedSimultaneously/");
|
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/javaAndKotlinChangedSimultaneously/");
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
enum class Enum {
|
||||||
|
A,
|
||||||
|
B,
|
||||||
|
C
|
||||||
|
}
|
||||||
+4
@@ -0,0 +1,4 @@
|
|||||||
|
enum class Enum {
|
||||||
|
A,
|
||||||
|
B
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
================ Step #1 =================
|
||||||
|
|
||||||
|
Cleaning output files:
|
||||||
|
out/production/module/Enum.class
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/Enum.kt
|
||||||
|
End of files
|
||||||
|
Marked as dirty by Kotlin:
|
||||||
|
src/getRandomEnumEntry.kt
|
||||||
|
src/use.kt
|
||||||
|
src/useEnumImplicitly.kt
|
||||||
|
Exit code: ADDITIONAL_PASS_REQUIRED
|
||||||
|
------------------------------------------
|
||||||
|
Cleaning output files:
|
||||||
|
out/production/module/GetRandomEnumEntryKt.class
|
||||||
|
out/production/module/META-INF/module.kotlin_module
|
||||||
|
out/production/module/UseEnumImplicitlyKt.class
|
||||||
|
out/production/module/UseKt.class
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/getRandomEnumEntry.kt
|
||||||
|
src/use.kt
|
||||||
|
src/useEnumImplicitly.kt
|
||||||
|
End of files
|
||||||
|
Exit code: ABORT
|
||||||
|
------------------------------------------
|
||||||
|
COMPILATION FAILED
|
||||||
|
Unresolved reference: C
|
||||||
|
|
||||||
|
================ Step #2 =================
|
||||||
|
|
||||||
|
Cleaning output files:
|
||||||
|
out/production/module/Enum.class
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/Enum.kt
|
||||||
|
src/getRandomEnumEntry.kt
|
||||||
|
src/use.kt
|
||||||
|
src/useEnumImplicitly.kt
|
||||||
|
End of files
|
||||||
|
Exit code: OK
|
||||||
|
------------------------------------------
|
||||||
+6
@@ -0,0 +1,6 @@
|
|||||||
|
import java.util.Random
|
||||||
|
|
||||||
|
fun getRandomEnumEntry() =
|
||||||
|
with (Enum.values()) {
|
||||||
|
get(Random().nextInt(size))
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
import Enum.*
|
||||||
|
|
||||||
|
fun use(e: Enum): String =
|
||||||
|
when (e) {
|
||||||
|
A -> "A"
|
||||||
|
B -> "B"
|
||||||
|
C -> "C"
|
||||||
|
}
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
import Enum.*
|
||||||
|
|
||||||
|
fun use(e: Enum): String =
|
||||||
|
when (e) {
|
||||||
|
A -> "A"
|
||||||
|
B -> "B"
|
||||||
|
}
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
fun useImplicit() {
|
||||||
|
println(use(getRandomEnumEntry()))
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
public enum Enum {
|
||||||
|
A,
|
||||||
|
B
|
||||||
|
}
|
||||||
+5
@@ -0,0 +1,5 @@
|
|||||||
|
public enum Enum {
|
||||||
|
A,
|
||||||
|
B,
|
||||||
|
C
|
||||||
|
}
|
||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
================ Step #1 =================
|
||||||
|
|
||||||
|
Cleaning output files:
|
||||||
|
out/production/module/Enum.class
|
||||||
|
End of files
|
||||||
|
Exit code: NOTHING_DONE
|
||||||
|
------------------------------------------
|
||||||
|
Compiling files:
|
||||||
|
src/Enum.java
|
||||||
|
End of files
|
||||||
|
|
||||||
|
================ Step #2 =================
|
||||||
|
|
||||||
|
Cleaning output files:
|
||||||
|
out/production/module/META-INF/module.kotlin_module
|
||||||
|
out/production/module/UseKt.class
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/use.kt
|
||||||
|
End of files
|
||||||
|
Exit code: OK
|
||||||
|
------------------------------------------
|
||||||
+6
@@ -0,0 +1,6 @@
|
|||||||
|
import java.util.Random
|
||||||
|
|
||||||
|
fun getRandomEnumEntry() =
|
||||||
|
with (Enum.values()) {
|
||||||
|
get(Random().nextInt(size))
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
import Enum.*
|
||||||
|
|
||||||
|
fun use(e: Enum): String =
|
||||||
|
when (e) {
|
||||||
|
A -> "A"
|
||||||
|
B -> "B"
|
||||||
|
}
|
||||||
+8
@@ -0,0 +1,8 @@
|
|||||||
|
import Enum.*
|
||||||
|
|
||||||
|
fun use(e: Enum): String =
|
||||||
|
when (e) {
|
||||||
|
A -> "A"
|
||||||
|
B -> "B"
|
||||||
|
C -> "C"
|
||||||
|
}
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
fun useImplicit() {
|
||||||
|
println(use(getRandomEnumEntry()))
|
||||||
|
}
|
||||||
+5
@@ -0,0 +1,5 @@
|
|||||||
|
public enum Enum {
|
||||||
|
A,
|
||||||
|
B,
|
||||||
|
C
|
||||||
|
}
|
||||||
+4
@@ -0,0 +1,4 @@
|
|||||||
|
public enum Enum {
|
||||||
|
A,
|
||||||
|
B
|
||||||
|
}
|
||||||
+35
@@ -0,0 +1,35 @@
|
|||||||
|
================ Step #1 =================
|
||||||
|
|
||||||
|
Cleaning output files:
|
||||||
|
out/production/module/Enum.class
|
||||||
|
End of files
|
||||||
|
Exit code: NOTHING_DONE
|
||||||
|
------------------------------------------
|
||||||
|
Compiling files:
|
||||||
|
src/Enum.java
|
||||||
|
End of files
|
||||||
|
Cleaning output files:
|
||||||
|
out/production/module/META-INF/module.kotlin_module
|
||||||
|
out/production/module/UseKt.class
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/use.kt
|
||||||
|
End of files
|
||||||
|
Exit code: ABORT
|
||||||
|
------------------------------------------
|
||||||
|
COMPILATION FAILED
|
||||||
|
Unresolved reference: C
|
||||||
|
|
||||||
|
================ Step #2 =================
|
||||||
|
|
||||||
|
Cleaning output files:
|
||||||
|
out/production/module/Enum.class
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/use.kt
|
||||||
|
End of files
|
||||||
|
Exit code: OK
|
||||||
|
------------------------------------------
|
||||||
|
Compiling files:
|
||||||
|
src/Enum.java
|
||||||
|
End of files
|
||||||
+6
@@ -0,0 +1,6 @@
|
|||||||
|
import java.util.Random
|
||||||
|
|
||||||
|
fun getRandomEnumEntry() =
|
||||||
|
with (Enum.values()) {
|
||||||
|
get(Random().nextInt(size))
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
import Enum.*
|
||||||
|
|
||||||
|
fun use(e: Enum): String =
|
||||||
|
when (e) {
|
||||||
|
A -> "A"
|
||||||
|
B -> "B"
|
||||||
|
C -> "C"
|
||||||
|
}
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
import Enum.*
|
||||||
|
|
||||||
|
fun use(e: Enum): String =
|
||||||
|
when (e) {
|
||||||
|
A -> "A"
|
||||||
|
B -> "B"
|
||||||
|
}
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
fun useImplicit() {
|
||||||
|
println(use(getRandomEnumEntry()))
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user