From 090a58ccc43773c04050020a7a26ddb3bd7bff34 Mon Sep 17 00:00:00 2001 From: "Aleksei.Cherepanov" Date: Wed, 30 Nov 2022 15:21:11 +0100 Subject: [PATCH] Change allConstants test Currently, FIR compilation of `const val b: Byte = 50 + 50` shows an error, but old compiler doesn't (it shows only warning). Since this is an incremental test, it should not be affected by compiler errors, but should only test for .kt usage without recompilation. #KT-54991 In Progress --- ...ghtTreeJvmCompilerRunnerTestGenerated.java | 10 +- ...ntalFirJvmCompilerRunnerTestGenerated.java | 10 +- ...ghtTreeJvmCompilerRunnerTestGenerated.java | 10 +- ...rementalJsCompilerRunnerTestGenerated.java | 10 +- ...erRunnerWithMetadataOnlyTestGenerated.java | 10 +- ...ntalJsKlibCompilerRunnerTestGenerated.java | 10 +- ...WithScopeExpansionRunnerTestGenerated.java | 10 +- ...ementalJvmCompilerRunnerTestGenerated.java | 10 +- .../build/IncrementalJvmJpsTestGenerated.java | 10 +- ...alK2FirICLightTreeJvmJpsTestGenerated.java | 10 +- .../IncrementalK2JvmJpsTestGenerated.java | 10 +- ...ementalK2LightTreeJvmJpsTestGenerated.java | 10 +- .../pureKotlin/allConstants/build.log | 34 ------- .../pureKotlin/allConstants/fir-build.log | 19 ---- .../pureKotlin/allConstants/usage.kt | 4 - .../{allConstants => checkConstants}/args.txt | 0 .../pureKotlin/checkConstants/build.log | 94 +++++++++++++++++++ .../{allConstants => checkConstants}/const.kt | 4 - .../pureKotlin/checkConstants/const.kt.new.1 | 8 ++ .../pureKotlin/checkConstants/const.kt.new.2 | 8 ++ .../pureKotlin/checkConstants/const.kt.new.3 | 8 ++ .../pureKotlin/checkConstants/const.kt.new.4 | 8 ++ .../const.kt.new.5} | 5 +- .../pureKotlin/checkConstants/const.kt.new.6 | 8 ++ .../const.kt.new.7} | 6 +- .../pureKotlin/checkConstants/usage.kt | 4 + 26 files changed, 200 insertions(+), 130 deletions(-) delete mode 100644 jps/jps-plugin/testData/incremental/pureKotlin/allConstants/build.log delete mode 100644 jps/jps-plugin/testData/incremental/pureKotlin/allConstants/fir-build.log delete mode 100644 jps/jps-plugin/testData/incremental/pureKotlin/allConstants/usage.kt rename jps/jps-plugin/testData/incremental/pureKotlin/{allConstants => checkConstants}/args.txt (100%) create mode 100644 jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/build.log rename jps/jps-plugin/testData/incremental/pureKotlin/{allConstants => checkConstants}/const.kt (66%) create mode 100644 jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/const.kt.new.1 create mode 100644 jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/const.kt.new.2 create mode 100644 jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/const.kt.new.3 create mode 100644 jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/const.kt.new.4 rename jps/jps-plugin/testData/incremental/pureKotlin/{allConstants/const.kt.new.1 => checkConstants/const.kt.new.5} (68%) create mode 100644 jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/const.kt.new.6 rename jps/jps-plugin/testData/incremental/pureKotlin/{allConstants/const.kt.new.2 => checkConstants/const.kt.new.7} (58%) create mode 100644 jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/usage.kt diff --git a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalFirICLightTreeJvmCompilerRunnerTestGenerated.java b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalFirICLightTreeJvmCompilerRunnerTestGenerated.java index 0f202d68758..f85d11b1f74 100644 --- a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalFirICLightTreeJvmCompilerRunnerTestGenerated.java +++ b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalFirICLightTreeJvmCompilerRunnerTestGenerated.java @@ -58,11 +58,6 @@ public class IncrementalFirICLightTreeJvmCompilerRunnerTestGenerated extends Abs runTest("jps/jps-plugin/testData/incremental/pureKotlin/addTopLevelTypeAlias/"); } - @TestMetadata("allConstants") - public void testAllConstants() throws Exception { - runTest("jps/jps-plugin/testData/incremental/pureKotlin/allConstants/"); - } - public void testAllFilesPresentInPureKotlin() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("jps/jps-plugin/testData/incremental/pureKotlin"), Pattern.compile("^([^\\.]+)$"), Pattern.compile("^.*Expect.*"), TargetBackend.JVM_IR, false); } @@ -92,6 +87,11 @@ public class IncrementalFirICLightTreeJvmCompilerRunnerTestGenerated extends Abs runTest("jps/jps-plugin/testData/incremental/pureKotlin/changeWithRemovingUsage/"); } + @TestMetadata("checkConstants") + public void testCheckConstants() throws Exception { + runTest("jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/"); + } + @TestMetadata("classInlineFunctionChanged") public void testClassInlineFunctionChanged() throws Exception { runTest("jps/jps-plugin/testData/incremental/pureKotlin/classInlineFunctionChanged/"); diff --git a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalFirJvmCompilerRunnerTestGenerated.java b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalFirJvmCompilerRunnerTestGenerated.java index 912339b2db2..8a6db682921 100644 --- a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalFirJvmCompilerRunnerTestGenerated.java +++ b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalFirJvmCompilerRunnerTestGenerated.java @@ -58,11 +58,6 @@ public class IncrementalFirJvmCompilerRunnerTestGenerated extends AbstractIncrem runTest("jps/jps-plugin/testData/incremental/pureKotlin/addTopLevelTypeAlias/"); } - @TestMetadata("allConstants") - public void testAllConstants() throws Exception { - runTest("jps/jps-plugin/testData/incremental/pureKotlin/allConstants/"); - } - public void testAllFilesPresentInPureKotlin() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("jps/jps-plugin/testData/incremental/pureKotlin"), Pattern.compile("^([^\\.]+)$"), Pattern.compile("^.*Expect.*"), TargetBackend.JVM_IR, false); } @@ -92,6 +87,11 @@ public class IncrementalFirJvmCompilerRunnerTestGenerated extends AbstractIncrem runTest("jps/jps-plugin/testData/incremental/pureKotlin/changeWithRemovingUsage/"); } + @TestMetadata("checkConstants") + public void testCheckConstants() throws Exception { + runTest("jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/"); + } + @TestMetadata("classInlineFunctionChanged") public void testClassInlineFunctionChanged() throws Exception { runTest("jps/jps-plugin/testData/incremental/pureKotlin/classInlineFunctionChanged/"); diff --git a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalFirLightTreeJvmCompilerRunnerTestGenerated.java b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalFirLightTreeJvmCompilerRunnerTestGenerated.java index 6f8435ffa7a..3c104aa8234 100644 --- a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalFirLightTreeJvmCompilerRunnerTestGenerated.java +++ b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalFirLightTreeJvmCompilerRunnerTestGenerated.java @@ -58,11 +58,6 @@ public class IncrementalFirLightTreeJvmCompilerRunnerTestGenerated extends Abstr runTest("jps/jps-plugin/testData/incremental/pureKotlin/addTopLevelTypeAlias/"); } - @TestMetadata("allConstants") - public void testAllConstants() throws Exception { - runTest("jps/jps-plugin/testData/incremental/pureKotlin/allConstants/"); - } - public void testAllFilesPresentInPureKotlin() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("jps/jps-plugin/testData/incremental/pureKotlin"), Pattern.compile("^([^\\.]+)$"), Pattern.compile("^.*Expect.*"), TargetBackend.JVM_IR, false); } @@ -92,6 +87,11 @@ public class IncrementalFirLightTreeJvmCompilerRunnerTestGenerated extends Abstr runTest("jps/jps-plugin/testData/incremental/pureKotlin/changeWithRemovingUsage/"); } + @TestMetadata("checkConstants") + public void testCheckConstants() throws Exception { + runTest("jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/"); + } + @TestMetadata("classInlineFunctionChanged") public void testClassInlineFunctionChanged() throws Exception { runTest("jps/jps-plugin/testData/incremental/pureKotlin/classInlineFunctionChanged/"); diff --git a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJsCompilerRunnerTestGenerated.java b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJsCompilerRunnerTestGenerated.java index 4cb4d42f931..85bd40cbacf 100644 --- a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJsCompilerRunnerTestGenerated.java +++ b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJsCompilerRunnerTestGenerated.java @@ -57,11 +57,6 @@ public class IncrementalJsCompilerRunnerTestGenerated extends AbstractIncrementa runTest("jps/jps-plugin/testData/incremental/pureKotlin/addTopLevelTypeAlias/"); } - @TestMetadata("allConstants") - public void testAllConstants() throws Exception { - runTest("jps/jps-plugin/testData/incremental/pureKotlin/allConstants/"); - } - public void testAllFilesPresentInPureKotlin() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("jps/jps-plugin/testData/incremental/pureKotlin"), Pattern.compile("^([^\\.]+)$"), Pattern.compile(".*SinceK2"), false); } @@ -86,6 +81,11 @@ public class IncrementalJsCompilerRunnerTestGenerated extends AbstractIncrementa runTest("jps/jps-plugin/testData/incremental/pureKotlin/changeWithRemovingUsage/"); } + @TestMetadata("checkConstants") + public void testCheckConstants() throws Exception { + runTest("jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/"); + } + @TestMetadata("classInlineFunctionChanged") public void testClassInlineFunctionChanged() throws Exception { runTest("jps/jps-plugin/testData/incremental/pureKotlin/classInlineFunctionChanged/"); diff --git a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJsCompilerRunnerWithMetadataOnlyTestGenerated.java b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJsCompilerRunnerWithMetadataOnlyTestGenerated.java index 21241bae214..6e2374e00a8 100644 --- a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJsCompilerRunnerWithMetadataOnlyTestGenerated.java +++ b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJsCompilerRunnerWithMetadataOnlyTestGenerated.java @@ -57,11 +57,6 @@ public class IncrementalJsCompilerRunnerWithMetadataOnlyTestGenerated extends Ab runTest("jps/jps-plugin/testData/incremental/pureKotlin/addTopLevelTypeAlias/"); } - @TestMetadata("allConstants") - public void testAllConstants() throws Exception { - runTest("jps/jps-plugin/testData/incremental/pureKotlin/allConstants/"); - } - public void testAllFilesPresentInPureKotlin() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("jps/jps-plugin/testData/incremental/pureKotlin"), Pattern.compile("^([^\\.]+)$"), Pattern.compile(".*SinceK2"), false); } @@ -86,6 +81,11 @@ public class IncrementalJsCompilerRunnerWithMetadataOnlyTestGenerated extends Ab runTest("jps/jps-plugin/testData/incremental/pureKotlin/changeWithRemovingUsage/"); } + @TestMetadata("checkConstants") + public void testCheckConstants() throws Exception { + runTest("jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/"); + } + @TestMetadata("classInlineFunctionChanged") public void testClassInlineFunctionChanged() throws Exception { runTest("jps/jps-plugin/testData/incremental/pureKotlin/classInlineFunctionChanged/"); diff --git a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJsKlibCompilerRunnerTestGenerated.java b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJsKlibCompilerRunnerTestGenerated.java index 68eda34ab95..3f5ff192df0 100644 --- a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJsKlibCompilerRunnerTestGenerated.java +++ b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJsKlibCompilerRunnerTestGenerated.java @@ -57,11 +57,6 @@ public class IncrementalJsKlibCompilerRunnerTestGenerated extends AbstractIncrem runTest("jps/jps-plugin/testData/incremental/pureKotlin/addTopLevelTypeAlias/"); } - @TestMetadata("allConstants") - public void testAllConstants() throws Exception { - runTest("jps/jps-plugin/testData/incremental/pureKotlin/allConstants/"); - } - public void testAllFilesPresentInPureKotlin() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("jps/jps-plugin/testData/incremental/pureKotlin"), Pattern.compile("^([^\\.]+)$"), Pattern.compile("(^sealed.*)|(.*SinceK2)"), false); } @@ -86,6 +81,11 @@ public class IncrementalJsKlibCompilerRunnerTestGenerated extends AbstractIncrem runTest("jps/jps-plugin/testData/incremental/pureKotlin/changeWithRemovingUsage/"); } + @TestMetadata("checkConstants") + public void testCheckConstants() throws Exception { + runTest("jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/"); + } + @TestMetadata("classInlineFunctionChanged") public void testClassInlineFunctionChanged() throws Exception { runTest("jps/jps-plugin/testData/incremental/pureKotlin/classInlineFunctionChanged/"); diff --git a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJsKlibCompilerWithScopeExpansionRunnerTestGenerated.java b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJsKlibCompilerWithScopeExpansionRunnerTestGenerated.java index fbd047926dc..96011f390f5 100644 --- a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJsKlibCompilerWithScopeExpansionRunnerTestGenerated.java +++ b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJsKlibCompilerWithScopeExpansionRunnerTestGenerated.java @@ -57,11 +57,6 @@ public class IncrementalJsKlibCompilerWithScopeExpansionRunnerTestGenerated exte runTest("jps/jps-plugin/testData/incremental/pureKotlin/addTopLevelTypeAlias/"); } - @TestMetadata("allConstants") - public void testAllConstants() throws Exception { - runTest("jps/jps-plugin/testData/incremental/pureKotlin/allConstants/"); - } - public void testAllFilesPresentInPureKotlin() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("jps/jps-plugin/testData/incremental/pureKotlin"), Pattern.compile("^([^\\.]+)$"), Pattern.compile("^sealed.*"), false); } @@ -91,6 +86,11 @@ public class IncrementalJsKlibCompilerWithScopeExpansionRunnerTestGenerated exte runTest("jps/jps-plugin/testData/incremental/pureKotlin/changeWithRemovingUsage/"); } + @TestMetadata("checkConstants") + public void testCheckConstants() throws Exception { + runTest("jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/"); + } + @TestMetadata("classInlineFunctionChanged") public void testClassInlineFunctionChanged() throws Exception { runTest("jps/jps-plugin/testData/incremental/pureKotlin/classInlineFunctionChanged/"); diff --git a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJvmCompilerRunnerTestGenerated.java b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJvmCompilerRunnerTestGenerated.java index 94a91542daf..9de62c7331b 100644 --- a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJvmCompilerRunnerTestGenerated.java +++ b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJvmCompilerRunnerTestGenerated.java @@ -58,11 +58,6 @@ public class IncrementalJvmCompilerRunnerTestGenerated extends AbstractIncrement runTest("jps/jps-plugin/testData/incremental/pureKotlin/addTopLevelTypeAlias/"); } - @TestMetadata("allConstants") - public void testAllConstants() throws Exception { - runTest("jps/jps-plugin/testData/incremental/pureKotlin/allConstants/"); - } - public void testAllFilesPresentInPureKotlin() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("jps/jps-plugin/testData/incremental/pureKotlin"), Pattern.compile("^([^\\.]+)$"), Pattern.compile(".*SinceK2"), TargetBackend.JVM_IR, false); } @@ -87,6 +82,11 @@ public class IncrementalJvmCompilerRunnerTestGenerated extends AbstractIncrement runTest("jps/jps-plugin/testData/incremental/pureKotlin/changeWithRemovingUsage/"); } + @TestMetadata("checkConstants") + public void testCheckConstants() throws Exception { + runTest("jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/"); + } + @TestMetadata("classInlineFunctionChanged") public void testClassInlineFunctionChanged() throws Exception { runTest("jps/jps-plugin/testData/incremental/pureKotlin/classInlineFunctionChanged/"); diff --git a/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalJvmJpsTestGenerated.java b/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalJvmJpsTestGenerated.java index 54a2f9678e7..ad5aabde0b9 100644 --- a/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalJvmJpsTestGenerated.java +++ b/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalJvmJpsTestGenerated.java @@ -727,11 +727,6 @@ public class IncrementalJvmJpsTestGenerated extends AbstractIncrementalJvmJpsTes runTest("jps/jps-plugin/testData/incremental/pureKotlin/addTopLevelTypeAlias/"); } - @TestMetadata("allConstants") - public void testAllConstants() throws Exception { - runTest("jps/jps-plugin/testData/incremental/pureKotlin/allConstants/"); - } - public void testAllFilesPresentInPureKotlin() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("jps/jps-plugin/testData/incremental/pureKotlin"), Pattern.compile("^([^\\.]+)$"), Pattern.compile(".*SinceK2"), TargetBackend.JVM_IR, false); } @@ -756,6 +751,11 @@ public class IncrementalJvmJpsTestGenerated extends AbstractIncrementalJvmJpsTes runTest("jps/jps-plugin/testData/incremental/pureKotlin/changeWithRemovingUsage/"); } + @TestMetadata("checkConstants") + public void testCheckConstants() throws Exception { + runTest("jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/"); + } + @TestMetadata("classInlineFunctionChanged") public void testClassInlineFunctionChanged() throws Exception { runTest("jps/jps-plugin/testData/incremental/pureKotlin/classInlineFunctionChanged/"); diff --git a/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalK2FirICLightTreeJvmJpsTestGenerated.java b/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalK2FirICLightTreeJvmJpsTestGenerated.java index 16a7c70a62b..edaf6171f3a 100644 --- a/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalK2FirICLightTreeJvmJpsTestGenerated.java +++ b/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalK2FirICLightTreeJvmJpsTestGenerated.java @@ -58,11 +58,6 @@ public class IncrementalK2FirICLightTreeJvmJpsTestGenerated extends AbstractIncr runTest("jps/jps-plugin/testData/incremental/pureKotlin/addTopLevelTypeAlias/"); } - @TestMetadata("allConstants") - public void testAllConstants() throws Exception { - runTest("jps/jps-plugin/testData/incremental/pureKotlin/allConstants/"); - } - public void testAllFilesPresentInPureKotlin() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("jps/jps-plugin/testData/incremental/pureKotlin"), Pattern.compile("^([^\\.]+)$"), Pattern.compile("(^.*Expect.*)|(^companionConstantChanged)"), TargetBackend.JVM_IR, false); } @@ -92,6 +87,11 @@ public class IncrementalK2FirICLightTreeJvmJpsTestGenerated extends AbstractIncr runTest("jps/jps-plugin/testData/incremental/pureKotlin/changeWithRemovingUsage/"); } + @TestMetadata("checkConstants") + public void testCheckConstants() throws Exception { + runTest("jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/"); + } + @TestMetadata("classInlineFunctionChanged") public void testClassInlineFunctionChanged() throws Exception { runTest("jps/jps-plugin/testData/incremental/pureKotlin/classInlineFunctionChanged/"); diff --git a/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalK2JvmJpsTestGenerated.java b/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalK2JvmJpsTestGenerated.java index 5c41622d979..1112bfd6535 100644 --- a/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalK2JvmJpsTestGenerated.java +++ b/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalK2JvmJpsTestGenerated.java @@ -58,11 +58,6 @@ public class IncrementalK2JvmJpsTestGenerated extends AbstractIncrementalK2JvmJp runTest("jps/jps-plugin/testData/incremental/pureKotlin/addTopLevelTypeAlias/"); } - @TestMetadata("allConstants") - public void testAllConstants() throws Exception { - runTest("jps/jps-plugin/testData/incremental/pureKotlin/allConstants/"); - } - public void testAllFilesPresentInPureKotlin() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("jps/jps-plugin/testData/incremental/pureKotlin"), Pattern.compile("^([^\\.]+)$"), Pattern.compile("(^.*Expect.*)|(^companionConstantChanged)"), TargetBackend.JVM_IR, false); } @@ -92,6 +87,11 @@ public class IncrementalK2JvmJpsTestGenerated extends AbstractIncrementalK2JvmJp runTest("jps/jps-plugin/testData/incremental/pureKotlin/changeWithRemovingUsage/"); } + @TestMetadata("checkConstants") + public void testCheckConstants() throws Exception { + runTest("jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/"); + } + @TestMetadata("classInlineFunctionChanged") public void testClassInlineFunctionChanged() throws Exception { runTest("jps/jps-plugin/testData/incremental/pureKotlin/classInlineFunctionChanged/"); diff --git a/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalK2LightTreeJvmJpsTestGenerated.java b/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalK2LightTreeJvmJpsTestGenerated.java index 58b7ec38524..aca982ca100 100644 --- a/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalK2LightTreeJvmJpsTestGenerated.java +++ b/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalK2LightTreeJvmJpsTestGenerated.java @@ -58,11 +58,6 @@ public class IncrementalK2LightTreeJvmJpsTestGenerated extends AbstractIncrement runTest("jps/jps-plugin/testData/incremental/pureKotlin/addTopLevelTypeAlias/"); } - @TestMetadata("allConstants") - public void testAllConstants() throws Exception { - runTest("jps/jps-plugin/testData/incremental/pureKotlin/allConstants/"); - } - public void testAllFilesPresentInPureKotlin() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("jps/jps-plugin/testData/incremental/pureKotlin"), Pattern.compile("^([^\\.]+)$"), Pattern.compile("(^.*Expect.*)|(^companionConstantChanged)"), TargetBackend.JVM_IR, false); } @@ -92,6 +87,11 @@ public class IncrementalK2LightTreeJvmJpsTestGenerated extends AbstractIncrement runTest("jps/jps-plugin/testData/incremental/pureKotlin/changeWithRemovingUsage/"); } + @TestMetadata("checkConstants") + public void testCheckConstants() throws Exception { + runTest("jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/"); + } + @TestMetadata("classInlineFunctionChanged") public void testClassInlineFunctionChanged() throws Exception { runTest("jps/jps-plugin/testData/incremental/pureKotlin/classInlineFunctionChanged/"); diff --git a/jps/jps-plugin/testData/incremental/pureKotlin/allConstants/build.log b/jps/jps-plugin/testData/incremental/pureKotlin/allConstants/build.log deleted file mode 100644 index 665accc9a0f..00000000000 --- a/jps/jps-plugin/testData/incremental/pureKotlin/allConstants/build.log +++ /dev/null @@ -1,34 +0,0 @@ -================ Step #1 ================= - -Cleaning output files: - out/production/module/META-INF/module.kotlin_module - out/production/module/test/ConstKt.class -End of files -Compiling files: - src/const.kt -End of files -Exit code: OK ------------------------------------------- - -================ Step #2 ================= - -Cleaning output files: - out/production/module/META-INF/module.kotlin_module - out/production/module/test/ConstKt.class -End of files -Compiling files: - src/const.kt -End of files -After build round. Marked as dirty by Kotlin: - src/usage.kt -Exit code: ADDITIONAL_PASS_REQUIRED ------------------------------------------- -Cleaning output files: - out/production/module/META-INF/module.kotlin_module - out/production/module/test/Usage.class -End of files -Compiling files: - src/usage.kt -End of files -Exit code: OK ------------------------------------------- \ No newline at end of file diff --git a/jps/jps-plugin/testData/incremental/pureKotlin/allConstants/fir-build.log b/jps/jps-plugin/testData/incremental/pureKotlin/allConstants/fir-build.log deleted file mode 100644 index d9b0d1123e4..00000000000 --- a/jps/jps-plugin/testData/incremental/pureKotlin/allConstants/fir-build.log +++ /dev/null @@ -1,19 +0,0 @@ -================ Step #1 ================= - -Compiling files: - src/const.kt -End of files -Exit code: ABORT ------------------------------------------- -COMPILATION FAILED -Type mismatch: inferred type is kotlin/Int but kotlin/Byte was expected -Type mismatch: inferred type is kotlin/Int but kotlin/Short was expected - -================ Step #2 ================= - -Compiling files: - src/const.kt - src/usage.kt -End of files -Exit code: OK - diff --git a/jps/jps-plugin/testData/incremental/pureKotlin/allConstants/usage.kt b/jps/jps-plugin/testData/incremental/pureKotlin/allConstants/usage.kt deleted file mode 100644 index afb25dfcf37..00000000000 --- a/jps/jps-plugin/testData/incremental/pureKotlin/allConstants/usage.kt +++ /dev/null @@ -1,4 +0,0 @@ -package test - -@Deprecated("$b $s $i $l $f $d $bb $c $str") -class Usage diff --git a/jps/jps-plugin/testData/incremental/pureKotlin/allConstants/args.txt b/jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/args.txt similarity index 100% rename from jps/jps-plugin/testData/incremental/pureKotlin/allConstants/args.txt rename to jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/args.txt diff --git a/jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/build.log b/jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/build.log new file mode 100644 index 00000000000..2365d8c08c4 --- /dev/null +++ b/jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/build.log @@ -0,0 +1,94 @@ +================ Step #1 ================= + +Cleaning output files: + out/production/module/META-INF/module.kotlin_module + out/production/module/test/ConstKt.class +End of files +Compiling files: + src/const.kt +End of files +Exit code: OK +------------------------------------------ + +================ Step #2 ================= + +Cleaning output files: + out/production/module/META-INF/module.kotlin_module + out/production/module/test/ConstKt.class +End of files +Compiling files: + src/const.kt +End of files +Exit code: OK +------------------------------------------ + +================ Step #3 ================= + +Cleaning output files: + out/production/module/META-INF/module.kotlin_module + out/production/module/test/ConstKt.class +End of files +Compiling files: + src/const.kt +End of files +Exit code: OK +------------------------------------------ + +================ Step #4 ================= + +Cleaning output files: + out/production/module/META-INF/module.kotlin_module + out/production/module/test/ConstKt.class +End of files +Compiling files: + src/const.kt +End of files +Exit code: OK +------------------------------------------ + +================ Step #5 ================= + +Cleaning output files: + out/production/module/META-INF/module.kotlin_module + out/production/module/test/ConstKt.class +End of files +Compiling files: + src/const.kt +End of files +Exit code: OK +------------------------------------------ + +================ Step #6 ================= + +Cleaning output files: + out/production/module/META-INF/module.kotlin_module + out/production/module/test/ConstKt.class +End of files +Compiling files: + src/const.kt +End of files +Exit code: OK +------------------------------------------ + +================ Step #7 ================= + +Cleaning output files: + out/production/module/META-INF/module.kotlin_module + out/production/module/test/ConstKt.class +End of files +Compiling files: + src/const.kt +End of files +After build round. Marked as dirty by Kotlin: + src/usage.kt +Exit code: ADDITIONAL_PASS_REQUIRED +------------------------------------------ +Cleaning output files: + out/production/module/META-INF/module.kotlin_module + out/production/module/test/Usage.class +End of files +Compiling files: + src/usage.kt +End of files +Exit code: OK +------------------------------------------ \ No newline at end of file diff --git a/jps/jps-plugin/testData/incremental/pureKotlin/allConstants/const.kt b/jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/const.kt similarity index 66% rename from jps/jps-plugin/testData/incremental/pureKotlin/allConstants/const.kt rename to jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/const.kt index 73047748dac..ff0a9a26ff5 100644 --- a/jps/jps-plugin/testData/incremental/pureKotlin/allConstants/const.kt +++ b/jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/const.kt @@ -1,12 +1,8 @@ package test -const val b: Byte = 100 -const val s: Short = 20000 const val i: Int = 2000000 const val l: Long = 2000000000000L const val f: Float = 3.14f const val d: Double = 3.14 const val bb: Boolean = true -const val c: Char = '\u03c0' // pi symbol - const val str: String = ":)" diff --git a/jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/const.kt.new.1 b/jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/const.kt.new.1 new file mode 100644 index 00000000000..d69df5e822a --- /dev/null +++ b/jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/const.kt.new.1 @@ -0,0 +1,8 @@ +package test + +const val i: Int = 1000000 + 1000000 +const val l: Long = 2000000000000L +const val f: Float = 3.14f +const val d: Double = 3.14 +const val bb: Boolean = true +const val str: String = ":)" diff --git a/jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/const.kt.new.2 b/jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/const.kt.new.2 new file mode 100644 index 00000000000..2aeed57c779 --- /dev/null +++ b/jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/const.kt.new.2 @@ -0,0 +1,8 @@ +package test + +const val i: Int = 1000000 + 1000000 +const val l: Long = 1000000000000L + 1000000000000L +const val f: Float = 3.14f +const val d: Double = 3.14 +const val bb: Boolean = true +const val str: String = ":)" diff --git a/jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/const.kt.new.3 b/jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/const.kt.new.3 new file mode 100644 index 00000000000..c63caf07b49 --- /dev/null +++ b/jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/const.kt.new.3 @@ -0,0 +1,8 @@ +package test + +const val i: Int = 1000000 + 1000000 +const val l: Long = 1000000000000L + 1000000000000L +const val f: Float = 0.0f + 3.14f +const val d: Double = 3.14 +const val bb: Boolean = true +const val str: String = ":)" diff --git a/jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/const.kt.new.4 b/jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/const.kt.new.4 new file mode 100644 index 00000000000..2e1840cce28 --- /dev/null +++ b/jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/const.kt.new.4 @@ -0,0 +1,8 @@ +package test + +const val i: Int = 1000000 + 1000000 +const val l: Long = 1000000000000L + 1000000000000L +const val f: Float = 0.0f + 3.14f +const val d: Double = 0.0 + 3.14 +const val bb: Boolean = true +const val str: String = ":)" diff --git a/jps/jps-plugin/testData/incremental/pureKotlin/allConstants/const.kt.new.1 b/jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/const.kt.new.5 similarity index 68% rename from jps/jps-plugin/testData/incremental/pureKotlin/allConstants/const.kt.new.1 rename to jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/const.kt.new.5 index 9fe38e75928..7d1e7e80bd6 100644 --- a/jps/jps-plugin/testData/incremental/pureKotlin/allConstants/const.kt.new.1 +++ b/jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/const.kt.new.5 @@ -1,12 +1,9 @@ package test -const val b: Byte = 50 + 50 -const val s: Short = 10000 + 10000 const val i: Int = 1000000 + 1000000 const val l: Long = 1000000000000L + 1000000000000L const val f: Float = 0.0f + 3.14f const val d: Double = 0.0 + 3.14 const val bb: Boolean = !false -const val c: Char = '\u03c0' // pi symbol - const val str: String = ":)" + diff --git a/jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/const.kt.new.6 b/jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/const.kt.new.6 new file mode 100644 index 00000000000..f0920b86e8b --- /dev/null +++ b/jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/const.kt.new.6 @@ -0,0 +1,8 @@ +package test + +const val i: Int = 1000000 + 1000000 +const val l: Long = 1000000000000L + 1000000000000L +const val f: Float = 0.0f + 3.14f +const val d: Double = 0.0 + 3.14 +const val bb: Boolean = !false +const val str: String = ":" + ")" diff --git a/jps/jps-plugin/testData/incremental/pureKotlin/allConstants/const.kt.new.2 b/jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/const.kt.new.7 similarity index 58% rename from jps/jps-plugin/testData/incremental/pureKotlin/allConstants/const.kt.new.2 rename to jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/const.kt.new.7 index d0df4060261..d8062f1ff21 100644 --- a/jps/jps-plugin/testData/incremental/pureKotlin/allConstants/const.kt.new.2 +++ b/jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/const.kt.new.7 @@ -1,12 +1,8 @@ package test -const val b: Byte = 0 -const val s: Short = 0 const val i: Int = 0 const val l: Long = 0 const val f: Float = 0.0f const val d: Double = 0.0 const val bb: Boolean = false -const val c: Char = 'x' - -const val str: String = ":(" +const val str: String = "" diff --git a/jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/usage.kt b/jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/usage.kt new file mode 100644 index 00000000000..9d62e56b120 --- /dev/null +++ b/jps/jps-plugin/testData/incremental/pureKotlin/checkConstants/usage.kt @@ -0,0 +1,4 @@ +package test + +@Deprecated("$i $l $f $d $bb $str") +class Usage