Add tests for incremental compilation of sealed interfaces

Original commit: 2e607335db
This commit is contained in:
Andrey Uskov
2020-12-09 17:33:51 +03:00
committed by Andrey Uskov
parent c1a9eb9d21
commit 780696565d
53 changed files with 317 additions and 15 deletions
@@ -1239,6 +1239,31 @@ public class IncrementalJvmJpsTestGenerated extends AbstractIncrementalJvmJpsTes
runTest("jps-plugin/testData/incremental/pureKotlin/returnTypeChanged/");
}
@TestMetadata("sealedClassesAddImplements")
public void testSealedClassesAddImplements() throws Exception {
runTest("jps-plugin/testData/incremental/pureKotlin/sealedClassesAddImplements/");
}
@TestMetadata("sealedClassesAddInheritor")
public void testSealedClassesAddInheritor() throws Exception {
runTest("jps-plugin/testData/incremental/pureKotlin/sealedClassesAddInheritor/");
}
@TestMetadata("sealedClassesRemoveImplements")
public void testSealedClassesRemoveImplements() throws Exception {
runTest("jps-plugin/testData/incremental/pureKotlin/sealedClassesRemoveImplements/");
}
@TestMetadata("sealedClassesRemoveInheritor")
public void testSealedClassesRemoveInheritor() throws Exception {
runTest("jps-plugin/testData/incremental/pureKotlin/sealedClassesRemoveInheritor/");
}
@TestMetadata("sealedClassesUseSwitch")
public void testSealedClassesUseSwitch() throws Exception {
runTest("jps-plugin/testData/incremental/pureKotlin/sealedClassesUseSwitch/");
}
@TestMetadata("secondaryConstructorInlined")
public void testSecondaryConstructorInlined() throws Exception {
runTest("jps-plugin/testData/incremental/pureKotlin/secondaryConstructorInlined/");
@@ -3,9 +3,11 @@ CHANGES in test/AbstractFlagAdded: CLASS_SIGNATURE
PROTO DIFFERENCE in test/AbstractFlagRemoved: FLAGS
CHANGES in test/AbstractFlagRemoved: CLASS_SIGNATURE
PROTO DIFFERENCE in test/AnnotationFlagAdded: FLAGS, SUPERTYPE_LIST
CHANGES in test/AnnotationFlagAdded: CLASS_SIGNATURE
CHANGES in test/AnnotationFlagAdded: CLASS_SIGNATURE, PARENTS
[kotlin.Annotation, kotlin.Any]
PROTO DIFFERENCE in test/AnnotationFlagRemoved: FLAGS, SUPERTYPE_LIST
CHANGES in test/AnnotationFlagRemoved: CLASS_SIGNATURE
CHANGES in test/AnnotationFlagRemoved: CLASS_SIGNATURE, PARENTS
[kotlin.Annotation, kotlin.Any]
PROTO DIFFERENCE in test/DataFlagAdded: FLAGS, FUNCTION_LIST
CHANGES in test/DataFlagAdded: CLASS_SIGNATURE, MEMBERS
[component1, copy, equals, hashCode, toString]
@@ -13,9 +15,11 @@ PROTO DIFFERENCE in test/DataFlagRemoved: FLAGS, FUNCTION_LIST
CHANGES in test/DataFlagRemoved: CLASS_SIGNATURE, MEMBERS
[component1, copy, equals, hashCode, toString]
PROTO DIFFERENCE in test/EnumFlagAdded: CONSTRUCTOR_LIST, FLAGS, SUPERTYPE_LIST
CHANGES in test/EnumFlagAdded: CLASS_SIGNATURE
CHANGES in test/EnumFlagAdded: CLASS_SIGNATURE, PARENTS
[kotlin.Any, kotlin.Enum]
PROTO DIFFERENCE in test/EnumFlagRemoved: CONSTRUCTOR_LIST, FLAGS, SUPERTYPE_LIST
CHANGES in test/EnumFlagRemoved: CLASS_SIGNATURE
CHANGES in test/EnumFlagRemoved: CLASS_SIGNATURE, PARENTS
[kotlin.Any, kotlin.Enum]
PROTO DIFFERENCE in test/InnerClassHolder.InnerFlagAdded: FLAGS
CHANGES in test/InnerClassHolder.InnerFlagAdded: CLASS_SIGNATURE
PROTO DIFFERENCE in test/InnerClassHolder.InnerFlagRemoved: FLAGS
@@ -3,9 +3,11 @@ CHANGES in test/AbstractFlagAdded: CLASS_SIGNATURE
PROTO DIFFERENCE in test/AbstractFlagRemoved: FLAGS
CHANGES in test/AbstractFlagRemoved: CLASS_SIGNATURE
PROTO DIFFERENCE in test/AnnotationFlagAdded: CONSTRUCTOR_LIST, FLAGS, SUPERTYPE_LIST
CHANGES in test/AnnotationFlagAdded: CLASS_SIGNATURE
CHANGES in test/AnnotationFlagAdded: CLASS_SIGNATURE, PARENTS
[kotlin.Annotation, kotlin.Any]
PROTO DIFFERENCE in test/AnnotationFlagRemoved: CONSTRUCTOR_LIST, FLAGS, SUPERTYPE_LIST
CHANGES in test/AnnotationFlagRemoved: CLASS_SIGNATURE
CHANGES in test/AnnotationFlagRemoved: CLASS_SIGNATURE, PARENTS
[kotlin.Annotation, kotlin.Any]
PROTO DIFFERENCE in test/DataFlagAdded: FLAGS, FUNCTION_LIST
CHANGES in test/DataFlagAdded: CLASS_SIGNATURE, MEMBERS
[component1, copy, equals, hashCode, toString]
@@ -13,9 +15,11 @@ PROTO DIFFERENCE in test/DataFlagRemoved: FLAGS, FUNCTION_LIST
CHANGES in test/DataFlagRemoved: CLASS_SIGNATURE, MEMBERS
[component1, copy, equals, hashCode, toString]
PROTO DIFFERENCE in test/EnumFlagAdded: CONSTRUCTOR_LIST, FLAGS, SUPERTYPE_LIST
CHANGES in test/EnumFlagAdded: CLASS_SIGNATURE
CHANGES in test/EnumFlagAdded: CLASS_SIGNATURE, PARENTS
[kotlin.Any, kotlin.Enum]
PROTO DIFFERENCE in test/EnumFlagRemoved: CONSTRUCTOR_LIST, FLAGS, SUPERTYPE_LIST
CHANGES in test/EnumFlagRemoved: CLASS_SIGNATURE
CHANGES in test/EnumFlagRemoved: CLASS_SIGNATURE, PARENTS
[kotlin.Any, kotlin.Enum]
PROTO DIFFERENCE in test/InnerClassHolder.InnerFlagAdded: CONSTRUCTOR_LIST, FLAGS
CHANGES in test/InnerClassHolder.InnerFlagAdded: CLASS_SIGNATURE
PROTO DIFFERENCE in test/InnerClassHolder.InnerFlagRemoved: CONSTRUCTOR_LIST, FLAGS
@@ -1,2 +1,3 @@
PROTO DIFFERENCE in test/ClassWithSuperTypeListChanged: SUPERTYPE_LIST
CHANGES in test/ClassWithSuperTypeListChanged: CLASS_SIGNATURE
CHANGES in test/ClassWithSuperTypeListChanged: CLASS_SIGNATURE, PARENTS
[kotlin.Any, kotlin.Throwable]
@@ -1,2 +1,3 @@
PROTO DIFFERENCE in test/Base.Nested1.Nested2: SUPERTYPE_LIST
CHANGES in test/Base.Nested1.Nested2: CLASS_SIGNATURE
CHANGES in test/Base.Nested1.Nested2: CLASS_SIGNATURE, PARENTS
[kotlin.Any, test.Base]
@@ -4,4 +4,5 @@ CHANGES in test/Base1: CLASS_SIGNATURE
PROTO DIFFERENCE in test/Base2: SEALED_SUBCLASS_FQ_NAME_LIST
CHANGES in test/Base2: CLASS_SIGNATURE
PROTO DIFFERENCE in test/Impl22: SUPERTYPE_LIST
CHANGES in test/Impl22: CLASS_SIGNATURE
CHANGES in test/Impl22: CLASS_SIGNATURE, PARENTS
[kotlin.Any, test.Base2]
@@ -4,4 +4,5 @@ CHANGES in test/Base1: CLASS_SIGNATURE
PROTO DIFFERENCE in test/Base2: SEALED_SUBCLASS_FQ_NAME_LIST
CHANGES in test/Base2: CLASS_SIGNATURE
PROTO DIFFERENCE in test/Impl22: SUPERTYPE_LIST
CHANGES in test/Impl22: CLASS_SIGNATURE
CHANGES in test/Impl22: CLASS_SIGNATURE, PARENTS
[kotlin.Any, test.Base2]
@@ -5,4 +5,5 @@ CHANGES in test/Base1: CLASS_SIGNATURE, MEMBERS
PROTO DIFFERENCE in test/Base2: SEALED_SUBCLASS_FQ_NAME_LIST
CHANGES in test/Base2: CLASS_SIGNATURE
PROTO DIFFERENCE in test/Base2.Nested2: SUPERTYPE_LIST
CHANGES in test/Base2.Nested2: CLASS_SIGNATURE
CHANGES in test/Base2.Nested2: CLASS_SIGNATURE, PARENTS
[kotlin.Any, test.Base2]
@@ -9,4 +9,5 @@ CHANGES in test/Base2.Nested1: CLASS_SIGNATURE, MEMBERS
PROTO DIFFERENCE in test/Base3.Nested1: SEALED_SUBCLASS_FQ_NAME_LIST
CHANGES in test/Base3.Nested1: CLASS_SIGNATURE
PROTO DIFFERENCE in test/Base3.Nested1.Nested2: SUPERTYPE_LIST
CHANGES in test/Base3.Nested1.Nested2: CLASS_SIGNATURE
CHANGES in test/Base3.Nested1.Nested2: CLASS_SIGNATURE, PARENTS
[kotlin.Any, test.Base3.Nested1]
@@ -5,4 +5,5 @@ CHANGES in test/Base1: CLASS_SIGNATURE, MEMBERS
PROTO DIFFERENCE in test/Base2: SEALED_SUBCLASS_FQ_NAME_LIST
CHANGES in test/Base2: CLASS_SIGNATURE
PROTO DIFFERENCE in test/Base2.Nested2: SUPERTYPE_LIST
CHANGES in test/Base2.Nested2: CLASS_SIGNATURE
CHANGES in test/Base2.Nested2: CLASS_SIGNATURE, PARENTS
[kotlin.Any, test.Base2]
@@ -7,6 +7,7 @@ kotlin-data-container
Module 'module1' production
format-version.txt
jvm-build-meta-info.txt
class-attributes.tab
class-fq-name-to-source.tab
internal-name-to-source.tab
proto.tab
@@ -24,6 +25,7 @@ Module 'module2' tests
Module 'module3' production
format-version.txt
jvm-build-meta-info.txt
class-attributes.tab
class-fq-name-to-source.tab
internal-name-to-source.tab
proto.tab
@@ -32,6 +34,7 @@ Module 'module3' tests
Module 'module4' production
format-version.txt
jvm-build-meta-info.txt
class-attributes.tab
class-fq-name-to-source.tab
internal-name-to-source.tab
proto.tab
@@ -7,6 +7,7 @@ kotlin-data-container
Module 'module' production
format-version.txt
jvm-build-meta-info.txt
class-attributes.tab
class-fq-name-to-source.tab
internal-name-to-source.tab
proto.tab
@@ -7,6 +7,7 @@ kotlin-data-container
Module 'module' production
format-version.txt
jvm-build-meta-info.txt
class-attributes.tab
class-fq-name-to-source.tab
internal-name-to-source.tab
proto.tab
@@ -0,0 +1,3 @@
package test
interface A : Base
@@ -0,0 +1,3 @@
package test
interface B
@@ -0,0 +1,3 @@
package test
interface B : Base
@@ -0,0 +1,3 @@
package test
sealed interface Base
@@ -0,0 +1 @@
-XXLanguage:+FreedomForSealedClasses -XXLanguage:+SealedInterfaces
@@ -0,0 +1,28 @@
================ Step #1 =================
Cleaning output files:
out/production/module/META-INF/module.kotlin_module
out/production/module/test/B.class
End of files
Compiling files:
src/B.kt
End of files
Marked as dirty by Kotlin:
src/A.kt
src/B.kt
src/Base.kt
Exit code: ADDITIONAL_PASS_REQUIRED
------------------------------------------
Cleaning output files:
out/production/module/META-INF/module.kotlin_module
out/production/module/test/A.class
out/production/module/test/B.class
out/production/module/test/Base.class
End of files
Compiling files:
src/A.kt
src/B.kt
src/Base.kt
End of files
Exit code: OK
------------------------------------------
@@ -0,0 +1 @@
IC of sealed interfaces are not supported in JS
@@ -0,0 +1,3 @@
package test
interface С
@@ -0,0 +1,3 @@
package test
interface A : Base
@@ -0,0 +1,3 @@
package test
interface B : Base
@@ -0,0 +1,3 @@
package test
sealed interface Base
@@ -0,0 +1,3 @@
package test
interface C : Base
@@ -0,0 +1 @@
-XXLanguage:+FreedomForSealedClasses -XXLanguage:+SealedInterfaces
@@ -0,0 +1,27 @@
================ Step #1 =================
Compiling files:
src/C.kt
End of files
Marked as dirty by Kotlin:
src/A.kt
src/B.kt
src/Base.kt
src/C.kt
Exit code: ADDITIONAL_PASS_REQUIRED
------------------------------------------
Cleaning output files:
out/production/module/META-INF/module.kotlin_module
out/production/module/test/A.class
out/production/module/test/B.class
out/production/module/test/Base.class
out/production/module/test/C.class
End of files
Compiling files:
src/A.kt
src/B.kt
src/Base.kt
src/C.kt
End of files
Exit code: OK
------------------------------------------
@@ -0,0 +1 @@
IC of sealed interfaces are not supported in JS
@@ -0,0 +1,3 @@
package test
interface A : Base
@@ -0,0 +1,3 @@
package test
interface B : Base
@@ -0,0 +1,4 @@
package test
interface B
@@ -0,0 +1,3 @@
package test
sealed interface Base
@@ -0,0 +1,5 @@
package test
class C {
lateinit var base: Base
}
@@ -0,0 +1 @@
-XXLanguage:+FreedomForSealedClasses -XXLanguage:+SealedInterfaces
@@ -0,0 +1,39 @@
================ Step #1 =================
Cleaning output files:
out/production/module/META-INF/module.kotlin_module
out/production/module/test/B.class
End of files
Compiling files:
src/B.kt
End of files
Marked as dirty by Kotlin:
src/A.kt
src/B.kt
src/Base.kt
Exit code: ADDITIONAL_PASS_REQUIRED
------------------------------------------
Cleaning output files:
out/production/module/META-INF/module.kotlin_module
out/production/module/test/A.class
out/production/module/test/B.class
out/production/module/test/Base.class
End of files
Compiling files:
src/A.kt
src/B.kt
src/Base.kt
End of files
Marked as dirty by Kotlin:
src/BaseUsage.kt
Exit code: ADDITIONAL_PASS_REQUIRED
------------------------------------------
Cleaning output files:
out/production/module/META-INF/module.kotlin_module
out/production/module/test/C.class
End of files
Compiling files:
src/BaseUsage.kt
End of files
Exit code: OK
------------------------------------------
@@ -0,0 +1 @@
IC of sealed interfaces are not supported in JS
@@ -0,0 +1,3 @@
package test
interface A : Base
@@ -0,0 +1,3 @@
package test
interface B : Base
@@ -0,0 +1,3 @@
package test
sealed interface Base
@@ -0,0 +1,5 @@
package test
class C {
lateinit var base: Base
}
@@ -0,0 +1 @@
-XXLanguage:+FreedomForSealedClasses -XXLanguage:+SealedInterfaces
@@ -0,0 +1,35 @@
================ Step #1 =================
Cleaning output files:
out/production/module/META-INF/module.kotlin_module
out/production/module/test/B.class
End of files
Compiling files:
End of files
Marked as dirty by Kotlin:
src/A.kt
src/Base.kt
Exit code: ADDITIONAL_PASS_REQUIRED
------------------------------------------
Cleaning output files:
out/production/module/META-INF/module.kotlin_module
out/production/module/test/A.class
out/production/module/test/Base.class
End of files
Compiling files:
src/A.kt
src/Base.kt
End of files
Marked as dirty by Kotlin:
src/BaseUsage.kt
Exit code: ADDITIONAL_PASS_REQUIRED
------------------------------------------
Cleaning output files:
out/production/module/META-INF/module.kotlin_module
out/production/module/test/C.class
End of files
Compiling files:
src/BaseUsage.kt
End of files
Exit code: OK
------------------------------------------
@@ -0,0 +1 @@
IC of sealed interfaces are not supported in JS
@@ -0,0 +1,3 @@
package test
interface A : Base
@@ -0,0 +1,3 @@
package test
interface B : Base
@@ -0,0 +1,3 @@
package test
sealed interface Base
@@ -0,0 +1,3 @@
package test
interface C : Base
@@ -0,0 +1,5 @@
package test
class D {
lateinit var x: Base
}
@@ -0,0 +1,4 @@
package test
class E {
}
@@ -0,0 +1 @@
-XXLanguage:+FreedomForSealedClasses -XXLanguage:+SealedInterfaces
@@ -0,0 +1,38 @@
================ Step #1 =================
Compiling files:
src/C.kt
End of files
Marked as dirty by Kotlin:
src/A.kt
src/B.kt
src/Base.kt
src/C.kt
Exit code: ADDITIONAL_PASS_REQUIRED
------------------------------------------
Cleaning output files:
out/production/module/META-INF/module.kotlin_module
out/production/module/test/A.class
out/production/module/test/B.class
out/production/module/test/Base.class
out/production/module/test/C.class
End of files
Compiling files:
src/A.kt
src/B.kt
src/Base.kt
src/C.kt
End of files
Marked as dirty by Kotlin:
src/D.kt
Exit code: ADDITIONAL_PASS_REQUIRED
------------------------------------------
Cleaning output files:
out/production/module/META-INF/module.kotlin_module
out/production/module/test/D.class
End of files
Compiling files:
src/D.kt
End of files
Exit code: OK
------------------------------------------
@@ -0,0 +1 @@
IC of sealed interfaces are not supported in JS