From 0e439263ce79af1210f203316eb0659a5e36e9eb Mon Sep 17 00:00:00 2001 From: "victor.petukhov" Date: Mon, 12 Aug 2019 11:45:36 +0300 Subject: [PATCH] Group spec tests and accompanying functionality into to packages: org.jetbrains.kotlin.spec (tests only) and org.jetbrains.kotlin.spec.utils (accompanying functionality) --- compiler/tests-spec/build.gradle.kts | 10 +- .../parsing/ParsingTestSpecGenerated.java | 1496 ----------------- .../checkers/AbstractDiagnosticsTestSpec.kt | 18 +- .../DiagnosticsTestSpecGenerated.java | 859 +++++----- .../AbstractBlackBoxCodegenTestSpec.kt | 0 .../BlackBoxCodegenTestSpecGenerated.java | 906 +++++----- .../parsing/AbstractParsingTestSpec.kt | 12 +- .../parsing/ParsingTestSpecGenerated.java | 1187 +++++++++++++ .../kotlin/spec/tasks/GenerateJsonTestsMap.kt | 33 - .../kotlin/spec/tasks/GenerateSpecTests.kt | 136 -- .../kotlin/spec/{ => utils}/Common.kt | 18 +- .../kotlin/spec/utils/GeneralConfiguration.kt | 4 +- .../spec/utils/TestsStatisticCollector.kt | 13 +- .../generators/templates/Feature.kt | 6 +- .../FeatureInteractionTestDataGenerator.kt | 6 +- .../templates/FeatureTemplatesConfig.kt | 12 +- .../generators/templates/GenerationConfig.kt | 24 +- .../generators/templates/GenerationUtils.kt | 8 +- .../TemplateSubstitutionTransformers.kt | 6 +- .../{ => utils}/models/AbstractSpecTest.kt | 16 +- .../spec/{ => utils}/models/LinkedSpecTest.kt | 28 +- .../{ => utils}/models/NotLinkedSpecTest.kt | 24 +- .../spec/{ => utils}/parsers/CommonParser.kt | 28 +- .../spec/{ => utils}/parsers/Patterns.kt | 42 +- .../{ => utils}/parsers/TestCasesParser.kt | 30 +- .../{ => utils}/parsers/TestInfoParser.kt | 21 +- .../GenerateFeatureInteractionSpecTestData.kt | 22 +- .../spec/utils/tasks/GenerateSpecTests.kt | 102 ++ .../tasks/PrintSpecTestsStatistic.kt | 8 +- .../validators/AbstractTestValidator.kt | 14 +- .../validators/BlackBoxTestTypeValidator.kt | 16 + .../validators/DiagnosticTestTypeValidator.kt | 12 +- .../validators/ParsingTestTypeValidator.kt | 10 +- .../validators/BlackBoxTestTypeValidator.kt | 16 - 34 files changed, 2372 insertions(+), 2771 deletions(-) delete mode 100644 compiler/tests-spec/tests/org/jetbrains/kotlin/parsing/ParsingTestSpecGenerated.java rename compiler/tests-spec/tests/org/jetbrains/kotlin/{ => spec}/checkers/AbstractDiagnosticsTestSpec.kt (87%) rename compiler/tests-spec/tests/org/jetbrains/kotlin/{ => spec}/checkers/DiagnosticsTestSpecGenerated.java (90%) rename compiler/tests-spec/tests/org/jetbrains/kotlin/{ => spec}/codegen/AbstractBlackBoxCodegenTestSpec.kt (100%) rename compiler/tests-spec/tests/org/jetbrains/kotlin/{ => spec}/codegen/BlackBoxCodegenTestSpecGenerated.java (55%) rename compiler/tests-spec/tests/org/jetbrains/kotlin/{ => spec}/parsing/AbstractParsingTestSpec.kt (70%) create mode 100644 compiler/tests-spec/tests/org/jetbrains/kotlin/spec/parsing/ParsingTestSpecGenerated.java delete mode 100644 compiler/tests-spec/tests/org/jetbrains/kotlin/spec/tasks/GenerateJsonTestsMap.kt delete mode 100644 compiler/tests-spec/tests/org/jetbrains/kotlin/spec/tasks/GenerateSpecTests.kt rename compiler/tests-spec/tests/org/jetbrains/kotlin/spec/{ => utils}/Common.kt (75%) rename compiler/tests-spec/tests/org/jetbrains/kotlin/spec/{ => utils}/generators/templates/Feature.kt (73%) rename compiler/tests-spec/tests/org/jetbrains/kotlin/spec/{ => utils}/generators/templates/FeatureInteractionTestDataGenerator.kt (93%) rename compiler/tests-spec/tests/org/jetbrains/kotlin/spec/{ => utils}/generators/templates/FeatureTemplatesConfig.kt (79%) rename compiler/tests-spec/tests/org/jetbrains/kotlin/spec/{ => utils}/generators/templates/GenerationConfig.kt (83%) rename compiler/tests-spec/tests/org/jetbrains/kotlin/spec/{ => utils}/generators/templates/GenerationUtils.kt (66%) rename compiler/tests-spec/tests/org/jetbrains/kotlin/spec/{ => utils}/generators/templates/TemplateSubstitutionTransformers.kt (51%) rename compiler/tests-spec/tests/org/jetbrains/kotlin/spec/{ => utils}/models/AbstractSpecTest.kt (81%) rename compiler/tests-spec/tests/org/jetbrains/kotlin/spec/{ => utils}/models/LinkedSpecTest.kt (78%) rename compiler/tests-spec/tests/org/jetbrains/kotlin/spec/{ => utils}/models/NotLinkedSpecTest.kt (68%) rename compiler/tests-spec/tests/org/jetbrains/kotlin/spec/{ => utils}/parsers/CommonParser.kt (85%) rename compiler/tests-spec/tests/org/jetbrains/kotlin/spec/{ => utils}/parsers/Patterns.kt (73%) rename compiler/tests-spec/tests/org/jetbrains/kotlin/spec/{ => utils}/parsers/TestCasesParser.kt (75%) rename compiler/tests-spec/tests/org/jetbrains/kotlin/spec/{ => utils}/parsers/TestInfoParser.kt (75%) rename compiler/tests-spec/tests/org/jetbrains/kotlin/spec/{ => utils}/tasks/GenerateFeatureInteractionSpecTestData.kt (66%) create mode 100644 compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/tasks/GenerateSpecTests.kt rename compiler/tests-spec/tests/org/jetbrains/kotlin/spec/{ => utils}/tasks/PrintSpecTestsStatistic.kt (87%) rename compiler/tests-spec/tests/org/jetbrains/kotlin/spec/{ => utils}/validators/AbstractTestValidator.kt (88%) create mode 100644 compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/validators/BlackBoxTestTypeValidator.kt rename compiler/tests-spec/tests/org/jetbrains/kotlin/spec/{ => utils}/validators/DiagnosticTestTypeValidator.kt (85%) rename compiler/tests-spec/tests/org/jetbrains/kotlin/spec/{ => utils}/validators/ParsingTestTypeValidator.kt (62%) delete mode 100644 compiler/tests-spec/tests/org/jetbrains/kotlin/spec/validators/BlackBoxTestTypeValidator.kt diff --git a/compiler/tests-spec/build.gradle.kts b/compiler/tests-spec/build.gradle.kts index 60727afe66f..d5826f491e9 100644 --- a/compiler/tests-spec/build.gradle.kts +++ b/compiler/tests-spec/build.gradle.kts @@ -20,16 +20,16 @@ projectTest(parallel = true) { workingDir = rootDir } -val generateSpecTests by generator("org.jetbrains.kotlin.spec.tasks.GenerateSpecTestsKt") +val generateSpecTests by generator("org.jetbrains.kotlin.spec.utils.tasks.GenerateSpecTestsKt") -val generateFeatureInteractionSpecTestData by generator("org.jetbrains.kotlin.spec.tasks.GenerateFeatureInteractionSpecTestDataKt") +val generateFeatureInteractionSpecTestData by generator("org.jetbrains.kotlin.spec.utils.tasks.GenerateFeatureInteractionSpecTestDataKt") -val printSpecTestsStatistic by generator("org.jetbrains.kotlin.spec.tasks.PrintSpecTestsStatisticKt") +val printSpecTestsStatistic by generator("org.jetbrains.kotlin.spec.utils.tasks.PrintSpecTestsStatisticKt") -val generateJsonTestsMap by generator("org.jetbrains.kotlin.spec.tasks.GenerateJsonTestsMapKt") +val generateJsonTestsMap by generator("org.jetbrains.kotlin.spec.utils.tasks.GenerateJsonTestsMapKt") val remoteRunTests by task { - val packagePrefix = "org.jetbrains.kotlin." + val packagePrefix = "org.jetbrains.kotlin.spec." val includeTests = setOf( "checkers.DiagnosticsTestSpecGenerated\$NotLinked\$Contracts*", "checkers.DiagnosticsTestSpecGenerated\$NotLinked\$Annotations*", diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/parsing/ParsingTestSpecGenerated.java b/compiler/tests-spec/tests/org/jetbrains/kotlin/parsing/ParsingTestSpecGenerated.java deleted file mode 100644 index cb2c7e15350..00000000000 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/parsing/ParsingTestSpecGenerated.java +++ /dev/null @@ -1,1496 +0,0 @@ -/* - * Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license - * that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.parsing; - -import com.intellij.testFramework.TestDataPath; -import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; -import org.jetbrains.kotlin.test.KotlinTestUtils; -import org.jetbrains.kotlin.test.TargetBackend; -import org.jetbrains.kotlin.test.TestMetadata; -import org.junit.runner.RunWith; - -import java.io.File; -import java.util.regex.Pattern; - -/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ -@SuppressWarnings("all") -@TestMetadata("compiler/tests-spec/testData/psi") -@TestDataPath("$PROJECT_ROOT") -@RunWith(JUnit3RunnerWithInners.class) -public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInPsi() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true, "helpers", "templates"); - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Linked extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInLinked() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Constant_literals extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInConstant_literals() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Boolean_literals extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInBoolean_literals() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class P_1 extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInP_1() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/neg") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Neg extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("2.1.kt") - public void test2_1() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/neg/2.1.kt"); - } - - @TestMetadata("2.10.kt") - public void test2_10() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/neg/2.10.kt"); - } - - @TestMetadata("2.11.kt") - public void test2_11() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/neg/2.11.kt"); - } - - @TestMetadata("2.12.kt") - public void test2_12() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/neg/2.12.kt"); - } - - @TestMetadata("2.13.kt") - public void test2_13() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/neg/2.13.kt"); - } - - @TestMetadata("2.14.kt") - public void test2_14() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/neg/2.14.kt"); - } - - @TestMetadata("2.15.kt") - public void test2_15() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/neg/2.15.kt"); - } - - @TestMetadata("2.16.kt") - public void test2_16() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/neg/2.16.kt"); - } - - @TestMetadata("2.17.kt") - public void test2_17() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/neg/2.17.kt"); - } - - @TestMetadata("2.18.kt") - public void test2_18() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/neg/2.18.kt"); - } - - @TestMetadata("2.19.kt") - public void test2_19() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/neg/2.19.kt"); - } - - @TestMetadata("2.2.kt") - public void test2_2() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/neg/2.2.kt"); - } - - @TestMetadata("2.20.kt") - public void test2_20() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/neg/2.20.kt"); - } - - @TestMetadata("2.21.kt") - public void test2_21() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/neg/2.21.kt"); - } - - @TestMetadata("2.22.kt") - public void test2_22() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/neg/2.22.kt"); - } - - @TestMetadata("2.23.kt") - public void test2_23() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/neg/2.23.kt"); - } - - @TestMetadata("2.24.kt") - public void test2_24() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/neg/2.24.kt"); - } - - @TestMetadata("2.25.kt") - public void test2_25() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/neg/2.25.kt"); - } - - @TestMetadata("2.26.kt") - public void test2_26() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/neg/2.26.kt"); - } - - @TestMetadata("2.3.kt") - public void test2_3() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/neg/2.3.kt"); - } - - @TestMetadata("2.4.kt") - public void test2_4() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/neg/2.4.kt"); - } - - @TestMetadata("2.5.kt") - public void test2_5() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/neg/2.5.kt"); - } - - @TestMetadata("2.6.kt") - public void test2_6() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/neg/2.6.kt"); - } - - @TestMetadata("2.7.kt") - public void test2_7() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/neg/2.7.kt"); - } - - @TestMetadata("2.8.kt") - public void test2_8() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/neg/2.8.kt"); - } - - @TestMetadata("2.9.kt") - public void test2_9() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/neg/2.9.kt"); - } - - public void testAllFilesPresentInNeg() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/pos") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Pos extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("2.1.kt") - public void test2_1() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/pos/2.1.kt"); - } - - @TestMetadata("2.10.kt") - public void test2_10() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/pos/2.10.kt"); - } - - @TestMetadata("2.11.kt") - public void test2_11() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/pos/2.11.kt"); - } - - @TestMetadata("2.12.kt") - public void test2_12() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/pos/2.12.kt"); - } - - @TestMetadata("2.13.kt") - public void test2_13() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/pos/2.13.kt"); - } - - @TestMetadata("2.14.kt") - public void test2_14() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/pos/2.14.kt"); - } - - @TestMetadata("2.15.kt") - public void test2_15() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/pos/2.15.kt"); - } - - @TestMetadata("2.16.kt") - public void test2_16() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/pos/2.16.kt"); - } - - @TestMetadata("2.17.kt") - public void test2_17() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/pos/2.17.kt"); - } - - @TestMetadata("2.18.kt") - public void test2_18() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/pos/2.18.kt"); - } - - @TestMetadata("2.19.kt") - public void test2_19() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/pos/2.19.kt"); - } - - @TestMetadata("2.2.kt") - public void test2_2() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/pos/2.2.kt"); - } - - @TestMetadata("2.20.kt") - public void test2_20() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/pos/2.20.kt"); - } - - @TestMetadata("2.21.kt") - public void test2_21() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/pos/2.21.kt"); - } - - @TestMetadata("2.22.kt") - public void test2_22() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/pos/2.22.kt"); - } - - @TestMetadata("2.23.kt") - public void test2_23() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/pos/2.23.kt"); - } - - @TestMetadata("2.24.kt") - public void test2_24() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/pos/2.24.kt"); - } - - @TestMetadata("2.25.kt") - public void test2_25() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/pos/2.25.kt"); - } - - @TestMetadata("2.26.kt") - public void test2_26() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/pos/2.26.kt"); - } - - @TestMetadata("2.3.kt") - public void test2_3() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/pos/2.3.kt"); - } - - @TestMetadata("2.4.kt") - public void test2_4() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/pos/2.4.kt"); - } - - @TestMetadata("2.5.kt") - public void test2_5() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/pos/2.5.kt"); - } - - @TestMetadata("2.6.kt") - public void test2_6() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/pos/2.6.kt"); - } - - @TestMetadata("2.7.kt") - public void test2_7() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/pos/2.7.kt"); - } - - @TestMetadata("2.8.kt") - public void test2_8() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/pos/2.8.kt"); - } - - @TestMetadata("2.9.kt") - public void test2_9() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/pos/2.9.kt"); - } - - public void testAllFilesPresentInPos() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - } - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Integer_literals extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInInteger_literals() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/binary-integer-literals") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Binary_integer_literals extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInBinary_integer_literals() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/binary-integer-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/binary-integer-literals/p-1") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class P_1 extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInP_1() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/binary-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/binary-integer-literals/p-1/neg") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Neg extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/binary-integer-literals/p-1/neg/1.1.kt"); - } - - @TestMetadata("1.2.kt") - public void test1_2() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/binary-integer-literals/p-1/neg/1.2.kt"); - } - - @TestMetadata("2.1.kt") - public void test2_1() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/binary-integer-literals/p-1/neg/2.1.kt"); - } - - public void testAllFilesPresentInNeg() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/binary-integer-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/binary-integer-literals/p-1/pos") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Pos extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/binary-integer-literals/p-1/pos/1.1.kt"); - } - - @TestMetadata("1.2.kt") - public void test1_2() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/binary-integer-literals/p-1/pos/1.2.kt"); - } - - @TestMetadata("1.3.kt") - public void test1_3() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/binary-integer-literals/p-1/pos/1.3.kt"); - } - - @TestMetadata("2.1.kt") - public void test2_1() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/binary-integer-literals/p-1/pos/2.1.kt"); - } - - @TestMetadata("2.2.kt") - public void test2_2() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/binary-integer-literals/p-1/pos/2.2.kt"); - } - - @TestMetadata("2.3.kt") - public void test2_3() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/binary-integer-literals/p-1/pos/2.3.kt"); - } - - @TestMetadata("2.4.kt") - public void test2_4() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/binary-integer-literals/p-1/pos/2.4.kt"); - } - - public void testAllFilesPresentInPos() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/binary-integer-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - } - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/decimal-integer-literals") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Decimal_integer_literals extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInDecimal_integer_literals() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/decimal-integer-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/decimal-integer-literals/p-1") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class P_1 extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInP_1() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/decimal-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/decimal-integer-literals/p-1/neg") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Neg extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/decimal-integer-literals/p-1/neg/1.1.kt"); - } - - public void testAllFilesPresentInNeg() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/decimal-integer-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/decimal-integer-literals/p-1/pos") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Pos extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/decimal-integer-literals/p-1/pos/1.1.kt"); - } - - @TestMetadata("2.1.kt") - public void test2_1() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/decimal-integer-literals/p-1/pos/2.1.kt"); - } - - @TestMetadata("2.2.kt") - public void test2_2() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/decimal-integer-literals/p-1/pos/2.2.kt"); - } - - @TestMetadata("2.3.kt") - public void test2_3() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/decimal-integer-literals/p-1/pos/2.3.kt"); - } - - public void testAllFilesPresentInPos() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/decimal-integer-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/decimal-integer-literals/p-2") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class P_2 extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInP_2() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/decimal-integer-literals/p-2"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/decimal-integer-literals/p-2/neg") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Neg extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/decimal-integer-literals/p-2/neg/1.1.kt"); - } - - @TestMetadata("1.2.kt") - public void test1_2() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/decimal-integer-literals/p-2/neg/1.2.kt"); - } - - public void testAllFilesPresentInNeg() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/decimal-integer-literals/p-2/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - } - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/hexadecimal-integer-literals") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Hexadecimal_integer_literals extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInHexadecimal_integer_literals() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/hexadecimal-integer-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class P_1 extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInP_1() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Neg extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/1.1.kt"); - } - - @TestMetadata("1.2.kt") - public void test1_2() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/1.2.kt"); - } - - @TestMetadata("2.1.kt") - public void test2_1() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.1.kt"); - } - - public void testAllFilesPresentInNeg() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/pos") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Pos extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/pos/1.1.kt"); - } - - @TestMetadata("1.2.kt") - public void test1_2() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/pos/1.2.kt"); - } - - @TestMetadata("2.1.kt") - public void test2_1() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/pos/2.1.kt"); - } - - @TestMetadata("2.2.kt") - public void test2_2() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/pos/2.2.kt"); - } - - @TestMetadata("2.3.kt") - public void test2_3() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/pos/2.3.kt"); - } - - @TestMetadata("2.4.kt") - public void test2_4() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/pos/2.4.kt"); - } - - public void testAllFilesPresentInPos() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - } - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/long-integer-literals") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Long_integer_literals extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInLong_integer_literals() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/long-integer-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/long-integer-literals/p-1") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class P_1 extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInP_1() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/long-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Neg extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.1.kt"); - } - - @TestMetadata("1.2.kt") - public void test1_2() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.2.kt"); - } - - @TestMetadata("1.3.kt") - public void test1_3() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.3.kt"); - } - - @TestMetadata("1.4.kt") - public void test1_4() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.4.kt"); - } - - public void testAllFilesPresentInNeg() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/long-integer-literals/p-1/pos") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Pos extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/long-integer-literals/p-1/pos/1.1.kt"); - } - - @TestMetadata("1.10.kt") - public void test1_10() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/long-integer-literals/p-1/pos/1.10.kt"); - } - - @TestMetadata("1.2.kt") - public void test1_2() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/long-integer-literals/p-1/pos/1.2.kt"); - } - - @TestMetadata("1.3.kt") - public void test1_3() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/long-integer-literals/p-1/pos/1.3.kt"); - } - - @TestMetadata("1.4.kt") - public void test1_4() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/long-integer-literals/p-1/pos/1.4.kt"); - } - - @TestMetadata("1.5.kt") - public void test1_5() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/long-integer-literals/p-1/pos/1.5.kt"); - } - - @TestMetadata("1.6.kt") - public void test1_6() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/long-integer-literals/p-1/pos/1.6.kt"); - } - - @TestMetadata("1.7.kt") - public void test1_7() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/long-integer-literals/p-1/pos/1.7.kt"); - } - - @TestMetadata("1.8.kt") - public void test1_8() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/long-integer-literals/p-1/pos/1.8.kt"); - } - - @TestMetadata("1.9.kt") - public void test1_9() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/long-integer-literals/p-1/pos/1.9.kt"); - } - - public void testAllFilesPresentInPos() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/long-integer-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - } - } - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Real_literals extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInReal_literals() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-1") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class P_1 extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInP_1() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-1/neg") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Neg extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-1/neg/1.1.kt"); - } - - @TestMetadata("1.2.kt") - public void test1_2() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-1/neg/1.2.kt"); - } - - @TestMetadata("1.3.kt") - public void test1_3() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-1/neg/1.3.kt"); - } - - @TestMetadata("2.1.kt") - public void test2_1() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-1/neg/2.1.kt"); - } - - @TestMetadata("2.2.kt") - public void test2_2() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-1/neg/2.2.kt"); - } - - @TestMetadata("2.3.kt") - public void test2_3() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-1/neg/2.3.kt"); - } - - @TestMetadata("3.1.kt") - public void test3_1() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-1/neg/3.1.kt"); - } - - @TestMetadata("3.2.kt") - public void test3_2() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-1/neg/3.2.kt"); - } - - @TestMetadata("3.3.kt") - public void test3_3() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-1/neg/3.3.kt"); - } - - public void testAllFilesPresentInNeg() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-1/pos") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Pos extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-1/pos/1.1.kt"); - } - - @TestMetadata("1.2.kt") - public void test1_2() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-1/pos/1.2.kt"); - } - - @TestMetadata("3.1.kt") - public void test3_1() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-1/pos/3.1.kt"); - } - - @TestMetadata("3.2.kt") - public void test3_2() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-1/pos/3.2.kt"); - } - - public void testAllFilesPresentInPos() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-2") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class P_2 extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInP_2() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-2"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-2/neg") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Neg extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-2/neg/1.1.kt"); - } - - @TestMetadata("1.2.kt") - public void test1_2() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-2/neg/1.2.kt"); - } - - @TestMetadata("1.3.kt") - public void test1_3() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-2/neg/1.3.kt"); - } - - @TestMetadata("1.4.kt") - public void test1_4() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-2/neg/1.4.kt"); - } - - public void testAllFilesPresentInNeg() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-2/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-2/pos") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Pos extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-2/pos/1.1.kt"); - } - - @TestMetadata("1.2.kt") - public void test1_2() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-2/pos/1.2.kt"); - } - - @TestMetadata("1.3.kt") - public void test1_3() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-2/pos/1.3.kt"); - } - - @TestMetadata("1.4.kt") - public void test1_4() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-2/pos/1.4.kt"); - } - - @TestMetadata("1.5.kt") - public void test1_5() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-2/pos/1.5.kt"); - } - - @TestMetadata("1.6.kt") - public void test1_6() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-2/pos/1.6.kt"); - } - - public void testAllFilesPresentInPos() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-3") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class P_3 extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInP_3() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-3"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-3/neg") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Neg extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-3/neg/1.1.kt"); - } - - @TestMetadata("1.2.kt") - public void test1_2() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-3/neg/1.2.kt"); - } - - @TestMetadata("1.3.kt") - public void test1_3() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-3/neg/1.3.kt"); - } - - @TestMetadata("1.4.kt") - public void test1_4() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-3/neg/1.4.kt"); - } - - @TestMetadata("1.5.kt") - public void test1_5() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-3/neg/1.5.kt"); - } - - @TestMetadata("2.1.kt") - public void test2_1() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-3/neg/2.1.kt"); - } - - @TestMetadata("3.1.kt") - public void test3_1() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-3/neg/3.1.kt"); - } - - public void testAllFilesPresentInNeg() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-3/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-3/pos") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Pos extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-3/pos/1.1.kt"); - } - - @TestMetadata("1.2.kt") - public void test1_2() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-3/pos/1.2.kt"); - } - - @TestMetadata("1.3.kt") - public void test1_3() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-3/pos/1.3.kt"); - } - - @TestMetadata("1.4.kt") - public void test1_4() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-3/pos/1.4.kt"); - } - - @TestMetadata("1.5.kt") - public void test1_5() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-3/pos/1.5.kt"); - } - - @TestMetadata("1.6.kt") - public void test1_6() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-3/pos/1.6.kt"); - } - - @TestMetadata("2.1.kt") - public void test2_1() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-3/pos/2.1.kt"); - } - - @TestMetadata("2.2.kt") - public void test2_2() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-3/pos/2.2.kt"); - } - - @TestMetadata("2.3.kt") - public void test2_3() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-3/pos/2.3.kt"); - } - - @TestMetadata("2.4.kt") - public void test2_4() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-3/pos/2.4.kt"); - } - - public void testAllFilesPresentInPos() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-4") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class P_4 extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInP_4() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-4"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-4/neg") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Neg extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-4/neg/1.1.kt"); - } - - @TestMetadata("1.2.kt") - public void test1_2() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-4/neg/1.2.kt"); - } - - @TestMetadata("1.3.kt") - public void test1_3() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-4/neg/1.3.kt"); - } - - @TestMetadata("1.4.kt") - public void test1_4() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-4/neg/1.4.kt"); - } - - public void testAllFilesPresentInNeg() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-4/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-4/pos") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Pos extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-4/pos/1.1.kt"); - } - - @TestMetadata("1.2.kt") - public void test1_2() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-4/pos/1.2.kt"); - } - - @TestMetadata("1.3.kt") - public void test1_3() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-4/pos/1.3.kt"); - } - - @TestMetadata("1.4.kt") - public void test1_4() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-4/pos/1.4.kt"); - } - - @TestMetadata("1.5.kt") - public void test1_5() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-4/pos/1.5.kt"); - } - - @TestMetadata("1.6.kt") - public void test1_6() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-4/pos/1.6.kt"); - } - - @TestMetadata("1.7.kt") - public void test1_7() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-4/pos/1.7.kt"); - } - - @TestMetadata("2.1.kt") - public void test2_1() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-4/pos/2.1.kt"); - } - - @TestMetadata("2.2.kt") - public void test2_2() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-4/pos/2.2.kt"); - } - - @TestMetadata("2.3.kt") - public void test2_3() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-4/pos/2.3.kt"); - } - - public void testAllFilesPresentInPos() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-4/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-6") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class P_6 extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInP_6() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-6"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-6/neg") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Neg extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-6/neg/1.1.kt"); - } - - public void testAllFilesPresentInNeg() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-6/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - } - } - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/when-expression") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class When_expression extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInWhen_expression() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/when-expression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/when-expression/p-2") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class P_2 extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInP_2() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/when-expression/p-2"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/when-expression/p-2/neg") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Neg extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("3.1.kt") - public void test3_1() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/when-expression/p-2/neg/3.1.kt"); - } - - @TestMetadata("3.2.kt") - public void test3_2() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/when-expression/p-2/neg/3.2.kt"); - } - - public void testAllFilesPresentInNeg() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/when-expression/p-2/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/when-expression/p-2/pos") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Pos extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("3.1.kt") - public void test3_1() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/when-expression/p-2/pos/3.1.kt"); - } - - @TestMetadata("3.2.kt") - public void test3_2() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/when-expression/p-2/pos/3.2.kt"); - } - - public void testAllFilesPresentInPos() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/when-expression/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/when-expression/p-3") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class P_3 extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInP_3() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/when-expression/p-3"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/when-expression/p-3/neg") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Neg extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/when-expression/p-3/neg/1.1.kt"); - } - - @TestMetadata("1.2.kt") - public void test1_2() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/when-expression/p-3/neg/1.2.kt"); - } - - @TestMetadata("2.1.kt") - public void test2_1() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/when-expression/p-3/neg/2.1.kt"); - } - - @TestMetadata("2.2.kt") - public void test2_2() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/when-expression/p-3/neg/2.2.kt"); - } - - public void testAllFilesPresentInNeg() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/when-expression/p-3/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/when-expression/p-6") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class P_6 extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInP_6() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/when-expression/p-6"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/when-expression/p-6/neg") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Neg extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/when-expression/p-6/neg/1.1.kt"); - } - - @TestMetadata("1.2.kt") - public void test1_2() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/when-expression/p-6/neg/1.2.kt"); - } - - @TestMetadata("1.3.kt") - public void test1_3() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/when-expression/p-6/neg/1.3.kt"); - } - - public void testAllFilesPresentInNeg() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/when-expression/p-6/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/when-expression/p-7") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class P_7 extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInP_7() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/when-expression/p-7"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/psi/linked/when-expression/p-7/neg") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Neg extends AbstractParsingTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/when-expression/p-7/neg/1.1.kt"); - } - - @TestMetadata("1.2.kt") - public void test1_2() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/when-expression/p-7/neg/1.2.kt"); - } - - @TestMetadata("3.1.kt") - public void test3_1() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/when-expression/p-7/neg/3.1.kt"); - } - - @TestMetadata("5.1.kt") - public void test5_1() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/when-expression/p-7/neg/5.1.kt"); - } - - @TestMetadata("7.1.kt") - public void test7_1() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/when-expression/p-7/neg/7.1.kt"); - } - - public void testAllFilesPresentInNeg() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/when-expression/p-7/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - } - } - } -} diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/checkers/AbstractDiagnosticsTestSpec.kt b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/checkers/AbstractDiagnosticsTestSpec.kt similarity index 87% rename from compiler/tests-spec/tests/org/jetbrains/kotlin/checkers/AbstractDiagnosticsTestSpec.kt rename to compiler/tests-spec/tests/org/jetbrains/kotlin/spec/checkers/AbstractDiagnosticsTestSpec.kt index c5c4bbce776..91e257ce7ec 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/checkers/AbstractDiagnosticsTestSpec.kt +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/checkers/AbstractDiagnosticsTestSpec.kt @@ -1,27 +1,27 @@ /* - * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + * Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. */ -package org.jetbrains.kotlin.checkers +package org.jetbrains.kotlin.spec.checkers import com.intellij.openapi.util.io.FileUtil import org.jetbrains.kotlin.TestExceptionsComparator -import org.jetbrains.kotlin.TestsExceptionType import org.jetbrains.kotlin.config.LanguageVersionSettings import org.jetbrains.kotlin.descriptors.impl.ModuleDescriptorImpl import org.jetbrains.kotlin.psi.KtFile import org.jetbrains.kotlin.resolve.BindingContext -import org.jetbrains.kotlin.spec.models.AbstractSpecTest -import org.jetbrains.kotlin.spec.SpecTestLinkedType -import org.jetbrains.kotlin.spec.parsers.CommonParser -import org.jetbrains.kotlin.spec.validators.* +import org.jetbrains.kotlin.spec.utils.SpecTestLinkedType +import org.jetbrains.kotlin.spec.utils.models.AbstractSpecTest +import org.jetbrains.kotlin.spec.utils.parsers.CommonParser +import org.jetbrains.kotlin.spec.utils.validators.DiagnosticTestTypeValidator +import org.jetbrains.kotlin.spec.utils.validators.SpecTestValidationException import org.jetbrains.kotlin.test.* import org.junit.Assert import java.io.File import java.util.regex.Matcher -abstract class AbstractDiagnosticsTestSpec : AbstractDiagnosticsTest() { +abstract class AbstractDiagnosticsTestSpec : org.jetbrains.kotlin.checkers.AbstractDiagnosticsTest() { companion object { private val withoutDescriptorsTestGroups = listOf( "linked/when-expression" diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestSpecGenerated.java b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/checkers/DiagnosticsTestSpecGenerated.java similarity index 90% rename from compiler/tests-spec/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestSpecGenerated.java rename to compiler/tests-spec/tests/org/jetbrains/kotlin/spec/checkers/DiagnosticsTestSpecGenerated.java index be7cf3821e3..12df59cec65 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestSpecGenerated.java +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/checkers/DiagnosticsTestSpecGenerated.java @@ -3,7 +3,7 @@ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ -package org.jetbrains.kotlin.checkers; +package org.jetbrains.kotlin.spec.checkers; import com.intellij.testFramework.TestDataPath; import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; @@ -53,6 +53,19 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/conditional-expression") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Conditional_expression extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInConditional_expression() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/conditional-expression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -245,6 +258,11 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1/neg/2.2.kt"); } + @TestMetadata("2.3.kt") + public void test2_3() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1/neg/2.3.kt"); + } + public void testAllFilesPresentInNeg() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -304,125 +322,13 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.3.kt"); } - public void testAllFilesPresentInNeg() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - } - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Long_integer_literals extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInLong_integer_literals() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class P_1 extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInP_1() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Neg extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.1.kt"); - } - - @TestMetadata("1.2.kt") - public void test1_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.2.kt"); - } - - @TestMetadata("1.3.kt") - public void test1_3() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.3.kt"); - } - - @TestMetadata("2.1.kt") - public void test2_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.1.kt"); - } - - @TestMetadata("2.2.kt") - public void test2_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.2.kt"); - } - - @TestMetadata("2.3.kt") - public void test2_3() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.3.kt"); - } - @TestMetadata("2.4.kt") public void test2_4() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.4.kt"); - } - - @TestMetadata("2.5.kt") - public void test2_5() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.5.kt"); + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.4.kt"); } public void testAllFilesPresentInNeg() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/pos") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Pos extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("2.1.kt") - public void test2_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.1.kt"); - } - - @TestMetadata("2.2.kt") - public void test2_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.2.kt"); - } - - @TestMetadata("2.3.kt") - public void test2_3() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.3.kt"); - } - - @TestMetadata("2.4.kt") - public void test2_4() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.4.kt"); - } - - @TestMetadata("2.5.kt") - public void test2_5() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.5.kt"); - } - - public void testAllFilesPresentInPos() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } } } @@ -813,6 +719,123 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } } } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class The_types_for_integer_literals extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInThe_types_for_integer_literals() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class P_1 extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInP_1() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/neg") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Neg extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/neg/1.1.kt"); + } + + @TestMetadata("1.2.kt") + public void test1_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/neg/1.2.kt"); + } + + @TestMetadata("1.3.kt") + public void test1_3() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/neg/1.3.kt"); + } + + @TestMetadata("2.1.kt") + public void test2_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/neg/2.1.kt"); + } + + @TestMetadata("2.2.kt") + public void test2_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/neg/2.2.kt"); + } + + @TestMetadata("2.3.kt") + public void test2_3() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/neg/2.3.kt"); + } + + @TestMetadata("2.4.kt") + public void test2_4() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/neg/2.4.kt"); + } + + @TestMetadata("2.5.kt") + public void test2_5() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/neg/2.5.kt"); + } + + public void testAllFilesPresentInNeg() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/pos") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Pos extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("2.1.kt") + public void test2_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/pos/2.1.kt"); + } + + @TestMetadata("2.2.kt") + public void test2_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/pos/2.2.kt"); + } + + @TestMetadata("2.3.kt") + public void test2_3() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/pos/2.3.kt"); + } + + @TestMetadata("2.4.kt") + public void test2_4() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/pos/2.4.kt"); + } + + @TestMetadata("2.5.kt") + public void test2_5() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/pos/2.5.kt"); + } + + public void testAllFilesPresentInPos() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + } + } } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression") @@ -859,6 +882,21 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } + @TestMetadata("10.1.kt") + public void test10_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/10.1.kt"); + } + + @TestMetadata("10.2.kt") + public void test10_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/10.2.kt"); + } + + @TestMetadata("10.3.kt") + public void test10_3() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/10.3.kt"); + } + @TestMetadata("1.1.kt") public void test1_1() throws Exception { runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/1.1.kt"); @@ -879,26 +917,6 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/6.1.kt"); } - @TestMetadata("7.1.kt") - public void test7_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/7.1.kt"); - } - - @TestMetadata("8.1.kt") - public void test8_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/8.1.kt"); - } - - @TestMetadata("8.2.kt") - public void test8_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/8.2.kt"); - } - - @TestMetadata("8.3.kt") - public void test8_3() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/8.3.kt"); - } - public void testAllFilesPresentInNeg() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -912,6 +930,21 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } + @TestMetadata("10.1.kt") + public void test10_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/10.1.kt"); + } + + @TestMetadata("10.2.kt") + public void test10_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/10.2.kt"); + } + + @TestMetadata("10.3.kt") + public void test10_3() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/10.3.kt"); + } + @TestMetadata("1.1.kt") public void test1_1() throws Exception { runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/1.1.kt"); @@ -937,26 +970,11 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/6.1.kt"); } - @TestMetadata("7.1.kt") - public void test7_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/7.1.kt"); - } - @TestMetadata("8.1.kt") public void test8_1() throws Exception { runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/8.1.kt"); } - @TestMetadata("8.2.kt") - public void test8_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/8.2.kt"); - } - - @TestMetadata("8.3.kt") - public void test8_3() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/8.3.kt"); - } - public void testAllFilesPresentInPos() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -964,6 +982,42 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } } + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-1") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class P_1 extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInP_1() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-1/pos") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Pos extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("3.1.kt") + public void test3_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-1/pos/3.1.kt"); + } + + @TestMetadata("3.2.kt") + public void test3_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-1/pos/3.2.kt"); + } + + public void testAllFilesPresentInPos() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + } + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-2") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -976,43 +1030,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-2"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-2/pos") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Pos extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("3.1.kt") - public void test3_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-2/pos/3.1.kt"); - } - - @TestMetadata("3.2.kt") - public void test3_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-2/pos/3.2.kt"); - } - - public void testAllFilesPresentInPos() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class P_3 extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInP_3() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/neg") + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-2/neg") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Neg extends AbstractDiagnosticsTestSpec { @@ -1022,25 +1040,25 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { @TestMetadata("1.1.kt") public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/neg/1.1.kt"); + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-2/neg/1.1.kt"); } @TestMetadata("2.1.kt") public void test2_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/neg/2.1.kt"); + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-2/neg/2.1.kt"); } @TestMetadata("2.2.kt") public void test2_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/neg/2.2.kt"); + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-2/neg/2.2.kt"); } public void testAllFilesPresentInNeg() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-2/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } } - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/pos") + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-2/pos") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Pos extends AbstractDiagnosticsTestSpec { @@ -1050,26 +1068,26 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { @TestMetadata("1.1.kt") public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/pos/1.1.kt"); + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-2/pos/1.1.kt"); } @TestMetadata("2.1.kt") public void test2_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/pos/2.1.kt"); + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-2/pos/2.1.kt"); } @TestMetadata("2.2.kt") public void test2_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/pos/2.2.kt"); + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-2/pos/2.2.kt"); } @TestMetadata("2.3.kt") public void test2_3() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/pos/2.3.kt"); + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-2/pos/2.3.kt"); } public void testAllFilesPresentInPos() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } } } @@ -1143,11 +1161,46 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } + @TestMetadata("11.1.kt") + public void test11_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/11.1.kt"); + } + @TestMetadata("1.1.kt") public void test1_1() throws Exception { runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/1.1.kt"); } + @TestMetadata("1.2.kt") + public void test1_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/1.2.kt"); + } + + @TestMetadata("3.1.kt") + public void test3_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/3.1.kt"); + } + + @TestMetadata("3.2.kt") + public void test3_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/3.2.kt"); + } + + @TestMetadata("6.1.kt") + public void test6_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/6.1.kt"); + } + + @TestMetadata("9.1.kt") + public void test9_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/9.1.kt"); + } + + @TestMetadata("9.2.kt") + public void test9_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/9.2.kt"); + } + public void testAllFilesPresentInNeg() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -1161,266 +1214,61 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } + @TestMetadata("11.1.kt") + public void test11_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/11.1.kt"); + } + @TestMetadata("1.1.kt") public void test1_1() throws Exception { runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/1.1.kt"); } + @TestMetadata("1.2.kt") + public void test1_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/1.2.kt"); + } + + @TestMetadata("1.3.kt") + public void test1_3() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/1.3.kt"); + } + + @TestMetadata("1.4.kt") + public void test1_4() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/1.4.kt"); + } + + @TestMetadata("3.1.kt") + public void test3_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/3.1.kt"); + } + + @TestMetadata("3.2.kt") + public void test3_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/3.2.kt"); + } + + @TestMetadata("6.1.kt") + public void test6_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/6.1.kt"); + } + + @TestMetadata("9.1.kt") + public void test9_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/9.1.kt"); + } + + @TestMetadata("9.2.kt") + public void test9_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/9.2.kt"); + } + public void testAllFilesPresentInPos() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } } } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class P_7 extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInP_7() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/neg") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Neg extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/neg/1.1.kt"); - } - - @TestMetadata("1.2.kt") - public void test1_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/neg/1.2.kt"); - } - - @TestMetadata("3.1.kt") - public void test3_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/neg/3.1.kt"); - } - - @TestMetadata("3.2.kt") - public void test3_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/neg/3.2.kt"); - } - - @TestMetadata("5.1.kt") - public void test5_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/neg/5.1.kt"); - } - - @TestMetadata("5.2.kt") - public void test5_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/neg/5.2.kt"); - } - - @TestMetadata("7.1.kt") - public void test7_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/neg/7.1.kt"); - } - - public void testAllFilesPresentInNeg() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Pos extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos/1.1.kt"); - } - - @TestMetadata("1.2.kt") - public void test1_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos/1.2.kt"); - } - - @TestMetadata("1.3.kt") - public void test1_3() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos/1.3.kt"); - } - - @TestMetadata("1.4.kt") - public void test1_4() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos/1.4.kt"); - } - - @TestMetadata("3.1.kt") - public void test3_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos/3.1.kt"); - } - - @TestMetadata("3.2.kt") - public void test3_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos/3.2.kt"); - } - - @TestMetadata("5.1.kt") - public void test5_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos/5.1.kt"); - } - - @TestMetadata("5.2.kt") - public void test5_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos/5.2.kt"); - } - - @TestMetadata("7.1.kt") - public void test7_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos/7.1.kt"); - } - - public void testAllFilesPresentInPos() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class P_9 extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInP_9() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/neg") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Neg extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/neg/1.1.kt"); - } - - @TestMetadata("1.2.kt") - public void test1_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/neg/1.2.kt"); - } - - @TestMetadata("1.3.kt") - public void test1_3() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/neg/1.3.kt"); - } - - @TestMetadata("1.4.kt") - public void test1_4() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/neg/1.4.kt"); - } - - public void testAllFilesPresentInNeg() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/pos") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Pos extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/pos/1.1.kt"); - } - - @TestMetadata("1.2.kt") - public void test1_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/pos/1.2.kt"); - } - - @TestMetadata("1.3.kt") - public void test1_3() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/pos/1.3.kt"); - } - - @TestMetadata("1.4.kt") - public void test1_4() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/pos/1.4.kt"); - } - - public void testAllFilesPresentInPos() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - } - } - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-inference") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Type_inference extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInType_inference() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-inference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-inference/smart-casts") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Smart_casts extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInSmart_casts() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-inference/smart-casts"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-inference/smart-casts/smart-casts-sources") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Smart_casts_sources extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInSmart_casts_sources() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-inference/smart-casts/smart-casts-sources"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-inference/smart-casts/smart-casts-sources/p-4") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class P_4 extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInP_4() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-inference/smart-casts/smart-casts-sources/p-4"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - } } } @@ -1436,31 +1284,31 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction") + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Introduction extends AbstractDiagnosticsTestSpec { + public static class Introduction_1 extends AbstractDiagnosticsTestSpec { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - public void testAllFilesPresentInIntroduction() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + public void testAllFilesPresentInIntroduction_1() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction/p-5") + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-6") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class P_5 extends AbstractDiagnosticsTestSpec { + public static class P_6 extends AbstractDiagnosticsTestSpec { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - public void testAllFilesPresentInP_5() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction/p-5"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + public void testAllFilesPresentInP_6() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-6"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction/p-5/neg") + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-6/neg") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Neg extends AbstractDiagnosticsTestSpec { @@ -1470,38 +1318,38 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { @TestMetadata("2.1.kt") public void test2_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction/p-5/neg/2.1.kt"); + runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-6/neg/2.1.kt"); } @TestMetadata("2.2.kt") public void test2_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction/p-5/neg/2.2.kt"); + runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-6/neg/2.2.kt"); } @TestMetadata("2.3.kt") public void test2_3() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction/p-5/neg/2.3.kt"); + runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-6/neg/2.3.kt"); } public void testAllFilesPresentInNeg() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction/p-5/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-6/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } } } - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction/p-7") + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-8") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class P_7 extends AbstractDiagnosticsTestSpec { + public static class P_8 extends AbstractDiagnosticsTestSpec { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - public void testAllFilesPresentInP_7() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction/p-7"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + public void testAllFilesPresentInP_8() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-8"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction/p-7/pos") + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-8/pos") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Pos extends AbstractDiagnosticsTestSpec { @@ -1511,16 +1359,91 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { @TestMetadata("1.1.kt") public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction/p-7/pos/1.1.kt"); + runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-8/pos/1.1.kt"); } @TestMetadata("2.1.kt") public void test2_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction/p-7/pos/2.1.kt"); + runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-8/pos/2.1.kt"); } public void testAllFilesPresentInPos() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction/p-7/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-8/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + } + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Type_kinds extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInType_kinds() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Built_in_types extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInBuilt_in_types() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.Any") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Kotlin_Any extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInKotlin_Any() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.Any"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.Any/p-1") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class P_1 extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInP_1() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.Any/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.Any/p-1/pos") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Pos extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.Any/p-1/pos/1.1.kt"); + } + + @TestMetadata("1.2.kt") + public void test1_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.Any/p-1/pos/1.2.kt"); + } + + public void testAllFilesPresentInPos() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.Any/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } } } } diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/codegen/AbstractBlackBoxCodegenTestSpec.kt b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/codegen/AbstractBlackBoxCodegenTestSpec.kt similarity index 100% rename from compiler/tests-spec/tests/org/jetbrains/kotlin/codegen/AbstractBlackBoxCodegenTestSpec.kt rename to compiler/tests-spec/tests/org/jetbrains/kotlin/spec/codegen/AbstractBlackBoxCodegenTestSpec.kt diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestSpecGenerated.java b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/codegen/BlackBoxCodegenTestSpecGenerated.java similarity index 55% rename from compiler/tests-spec/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestSpecGenerated.java rename to compiler/tests-spec/tests/org/jetbrains/kotlin/spec/codegen/BlackBoxCodegenTestSpecGenerated.java index 441cb210cf7..1baac63cecb 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestSpecGenerated.java +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/codegen/BlackBoxCodegenTestSpecGenerated.java @@ -3,7 +3,7 @@ * that can be found in the license/LICENSE.txt file. */ -package org.jetbrains.kotlin.codegen; +package org.jetbrains.kotlin.spec.codegen; import com.intellij.testFramework.TestDataPath; import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; @@ -76,177 +76,47 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes public void testAllFilesPresentInP_1() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } - - @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Pos extends AbstractBlackBoxCodegenTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("2.1.kt") - public void test2_1() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.1.kt"); - } - - @TestMetadata("2.10.kt") - public void test2_10() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.10.kt"); - } - - @TestMetadata("2.11.kt") - public void test2_11() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.11.kt"); - } - - @TestMetadata("2.12.kt") - public void test2_12() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.12.kt"); - } - - @TestMetadata("2.13.kt") - public void test2_13() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.13.kt"); - } - - @TestMetadata("2.14.kt") - public void test2_14() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.14.kt"); - } - - @TestMetadata("2.15.kt") - public void test2_15() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.15.kt"); - } - - @TestMetadata("2.16.kt") - public void test2_16() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.16.kt"); - } - - @TestMetadata("2.17.kt") - public void test2_17() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.17.kt"); - } - - @TestMetadata("2.18.kt") - public void test2_18() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.18.kt"); - } - - @TestMetadata("2.19.kt") - public void test2_19() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.19.kt"); - } - - @TestMetadata("2.2.kt") - public void test2_2() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.2.kt"); - } - - @TestMetadata("2.20.kt") - public void test2_20() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.20.kt"); - } - - @TestMetadata("2.21.kt") - public void test2_21() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.21.kt"); - } - - @TestMetadata("2.22.kt") - public void test2_22() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.22.kt"); - } - - @TestMetadata("2.23.kt") - public void test2_23() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.23.kt"); - } - - @TestMetadata("2.24.kt") - public void test2_24() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.24.kt"); - } - - @TestMetadata("2.25.kt") - public void test2_25() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.25.kt"); - } - - @TestMetadata("2.26.kt") - public void test2_26() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.26.kt"); - } - - @TestMetadata("2.3.kt") - public void test2_3() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.3.kt"); - } - - @TestMetadata("2.4.kt") - public void test2_4() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.4.kt"); - } - - @TestMetadata("2.5.kt") - public void test2_5() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.5.kt"); - } - - @TestMetadata("2.6.kt") - public void test2_6() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.6.kt"); - } - - @TestMetadata("2.7.kt") - public void test2_7() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.7.kt"); - } - - @TestMetadata("2.8.kt") - public void test2_8() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.8.kt"); - } - - @TestMetadata("2.9.kt") - public void test2_9() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.9.kt"); - } - - public void testAllFilesPresentInPos() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } } } + } - @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/constant-literals/integer-literals") + @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Expressions extends AbstractBlackBoxCodegenTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInExpressions() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Integer_literals extends AbstractBlackBoxCodegenTestSpec { + public static class Constant_literals extends AbstractBlackBoxCodegenTestSpec { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - public void testAllFilesPresentInInteger_literals() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/constant-literals/integer-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + public void testAllFilesPresentInConstant_literals() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } - @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/constant-literals/integer-literals/binary-integer-literals") + @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Binary_integer_literals extends AbstractBlackBoxCodegenTestSpec { + public static class Boolean_literals extends AbstractBlackBoxCodegenTestSpec { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - public void testAllFilesPresentInBinary_integer_literals() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/constant-literals/integer-literals/binary-integer-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + public void testAllFilesPresentInBoolean_literals() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } - @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/constant-literals/integer-literals/binary-integer-literals/p-1") + @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class P_1 extends AbstractBlackBoxCodegenTestSpec { @@ -255,10 +125,10 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_1() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/constant-literals/integer-literals/binary-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } - @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/constant-literals/integer-literals/binary-integer-literals/p-1/pos") + @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Pos extends AbstractBlackBoxCodegenTestSpec { @@ -266,36 +136,316 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/integer-literals/binary-integer-literals/p-1/pos/1.1.kt"); - } - @TestMetadata("2.1.kt") public void test2_1() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/integer-literals/binary-integer-literals/p-1/pos/2.1.kt"); + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.1.kt"); + } + + @TestMetadata("2.10.kt") + public void test2_10() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.10.kt"); + } + + @TestMetadata("2.11.kt") + public void test2_11() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.11.kt"); + } + + @TestMetadata("2.12.kt") + public void test2_12() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.12.kt"); + } + + @TestMetadata("2.13.kt") + public void test2_13() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.13.kt"); + } + + @TestMetadata("2.14.kt") + public void test2_14() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.14.kt"); + } + + @TestMetadata("2.15.kt") + public void test2_15() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.15.kt"); + } + + @TestMetadata("2.16.kt") + public void test2_16() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.16.kt"); + } + + @TestMetadata("2.17.kt") + public void test2_17() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.17.kt"); + } + + @TestMetadata("2.18.kt") + public void test2_18() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.18.kt"); + } + + @TestMetadata("2.19.kt") + public void test2_19() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.19.kt"); + } + + @TestMetadata("2.2.kt") + public void test2_2() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.2.kt"); + } + + @TestMetadata("2.20.kt") + public void test2_20() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.20.kt"); + } + + @TestMetadata("2.21.kt") + public void test2_21() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.21.kt"); + } + + @TestMetadata("2.22.kt") + public void test2_22() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.22.kt"); + } + + @TestMetadata("2.23.kt") + public void test2_23() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.23.kt"); + } + + @TestMetadata("2.24.kt") + public void test2_24() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.24.kt"); + } + + @TestMetadata("2.25.kt") + public void test2_25() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.25.kt"); + } + + @TestMetadata("2.26.kt") + public void test2_26() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.26.kt"); + } + + @TestMetadata("2.3.kt") + public void test2_3() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.3.kt"); + } + + @TestMetadata("2.4.kt") + public void test2_4() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.4.kt"); + } + + @TestMetadata("2.5.kt") + public void test2_5() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.5.kt"); + } + + @TestMetadata("2.6.kt") + public void test2_6() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.6.kt"); + } + + @TestMetadata("2.7.kt") + public void test2_7() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.7.kt"); + } + + @TestMetadata("2.8.kt") + public void test2_8() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.8.kt"); + } + + @TestMetadata("2.9.kt") + public void test2_9() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.9.kt"); } public void testAllFilesPresentInPos() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/constant-literals/integer-literals/binary-integer-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } } } } - @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/constant-literals/integer-literals/decimal-integer-literals") + @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Decimal_integer_literals extends AbstractBlackBoxCodegenTestSpec { + public static class Integer_literals extends AbstractBlackBoxCodegenTestSpec { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - public void testAllFilesPresentInDecimal_integer_literals() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/constant-literals/integer-literals/decimal-integer-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + public void testAllFilesPresentInInteger_literals() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } - @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/constant-literals/integer-literals/decimal-integer-literals/p-1") + @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/binary-integer-literals") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Binary_integer_literals extends AbstractBlackBoxCodegenTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInBinary_integer_literals() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/binary-integer-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class P_1 extends AbstractBlackBoxCodegenTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInP_1() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/pos") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Pos extends AbstractBlackBoxCodegenTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/pos/1.1.kt"); + } + + @TestMetadata("2.1.kt") + public void test2_1() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/pos/2.1.kt"); + } + + public void testAllFilesPresentInPos() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + } + } + + @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/decimal-integer-literals") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Decimal_integer_literals extends AbstractBlackBoxCodegenTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInDecimal_integer_literals() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/decimal-integer-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class P_1 extends AbstractBlackBoxCodegenTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInP_1() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1/pos") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Pos extends AbstractBlackBoxCodegenTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1/pos/1.1.kt"); + } + + @TestMetadata("2.1.kt") + public void test2_1() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1/pos/2.1.kt"); + } + + public void testAllFilesPresentInPos() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + } + } + + @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Hexadecimal_integer_literals extends AbstractBlackBoxCodegenTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInHexadecimal_integer_literals() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class P_1 extends AbstractBlackBoxCodegenTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInP_1() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/pos") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Pos extends AbstractBlackBoxCodegenTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/pos/1.1.kt"); + } + + @TestMetadata("2.1.kt") + public void test2_1() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/pos/2.1.kt"); + } + + public void testAllFilesPresentInPos() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + } + } + } + + @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Real_literals extends AbstractBlackBoxCodegenTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInReal_literals() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-1") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class P_1 extends AbstractBlackBoxCodegenTestSpec { @@ -304,10 +454,10 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_1() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/constant-literals/integer-literals/decimal-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } - @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/constant-literals/integer-literals/decimal-integer-literals/p-1/pos") + @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-1/pos") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Pos extends AbstractBlackBoxCodegenTestSpec { @@ -317,46 +467,33 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes @TestMetadata("1.1.kt") public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/integer-literals/decimal-integer-literals/p-1/pos/1.1.kt"); + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-1/pos/1.1.kt"); } - @TestMetadata("2.1.kt") - public void test2_1() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/integer-literals/decimal-integer-literals/p-1/pos/2.1.kt"); + @TestMetadata("3.1.kt") + public void test3_1() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-1/pos/3.1.kt"); } public void testAllFilesPresentInPos() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/constant-literals/integer-literals/decimal-integer-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } } } - } - @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/constant-literals/integer-literals/hexadecimal-integer-literals") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Hexadecimal_integer_literals extends AbstractBlackBoxCodegenTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInHexadecimal_integer_literals() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/constant-literals/integer-literals/hexadecimal-integer-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1") + @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-2") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class P_1 extends AbstractBlackBoxCodegenTestSpec { + public static class P_2 extends AbstractBlackBoxCodegenTestSpec { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - public void testAllFilesPresentInP_1() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + public void testAllFilesPresentInP_2() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-2"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } - @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/pos") + @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-2/pos") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Pos extends AbstractBlackBoxCodegenTestSpec { @@ -366,268 +503,183 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes @TestMetadata("1.1.kt") public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/pos/1.1.kt"); - } - - @TestMetadata("2.1.kt") - public void test2_1() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/pos/2.1.kt"); - } - - public void testAllFilesPresentInPos() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - } - } - - @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/constant-literals/integer-literals/long-integer-literals") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Long_integer_literals extends AbstractBlackBoxCodegenTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInLong_integer_literals() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/constant-literals/integer-literals/long-integer-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/constant-literals/integer-literals/long-integer-literals/p-1") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class P_1 extends AbstractBlackBoxCodegenTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInP_1() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/constant-literals/integer-literals/long-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/constant-literals/integer-literals/long-integer-literals/p-1/pos") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Pos extends AbstractBlackBoxCodegenTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/integer-literals/long-integer-literals/p-1/pos/1.1.kt"); + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-2/pos/1.1.kt"); } @TestMetadata("1.2.kt") public void test1_2() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/integer-literals/long-integer-literals/p-1/pos/1.2.kt"); + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-2/pos/1.2.kt"); + } + + public void testAllFilesPresentInPos() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + } + + @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-3") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class P_3 extends AbstractBlackBoxCodegenTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInP_3() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-3"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-3/pos") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Pos extends AbstractBlackBoxCodegenTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-3/pos/1.1.kt"); + } + + @TestMetadata("1.2.kt") + public void test1_2() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-3/pos/1.2.kt"); } @TestMetadata("1.3.kt") public void test1_3() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/integer-literals/long-integer-literals/p-1/pos/1.3.kt"); + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-3/pos/1.3.kt"); + } + + @TestMetadata("1.4.kt") + public void test1_4() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-3/pos/1.4.kt"); + } + + @TestMetadata("2.1.kt") + public void test2_1() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-3/pos/2.1.kt"); + } + + @TestMetadata("2.2.kt") + public void test2_2() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-3/pos/2.2.kt"); + } + + @TestMetadata("2.3.kt") + public void test2_3() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-3/pos/2.3.kt"); } public void testAllFilesPresentInPos() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/constant-literals/integer-literals/long-integer-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + } + + @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-4") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class P_4 extends AbstractBlackBoxCodegenTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInP_4() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-4"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-4/pos") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Pos extends AbstractBlackBoxCodegenTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-4/pos/1.1.kt"); + } + + @TestMetadata("1.2.kt") + public void test1_2() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-4/pos/1.2.kt"); + } + + @TestMetadata("1.3.kt") + public void test1_3() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-4/pos/1.3.kt"); + } + + @TestMetadata("1.4.kt") + public void test1_4() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-4/pos/1.4.kt"); + } + + @TestMetadata("1.5.kt") + public void test1_5() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-4/pos/1.5.kt"); + } + + public void testAllFilesPresentInPos() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-4/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } } } } - } - @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Real_literals extends AbstractBlackBoxCodegenTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInReal_literals() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-1") + @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/the-types-for-integer-literals") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class P_1 extends AbstractBlackBoxCodegenTestSpec { + public static class The_types_for_integer_literals extends AbstractBlackBoxCodegenTestSpec { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - public void testAllFilesPresentInP_1() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + public void testAllFilesPresentInThe_types_for_integer_literals() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/the-types-for-integer-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } - @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-1/pos") + @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/the-types-for-integer-literals/p-1") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Pos extends AbstractBlackBoxCodegenTestSpec { + public static class P_1 extends AbstractBlackBoxCodegenTestSpec { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-1/pos/1.1.kt"); + public void testAllFilesPresentInP_1() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/the-types-for-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } - @TestMetadata("3.1.kt") - public void test3_1() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-1/pos/3.1.kt"); - } + @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/pos") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Pos extends AbstractBlackBoxCodegenTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } - public void testAllFilesPresentInPos() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - } + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/pos/1.1.kt"); + } - @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-2") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class P_2 extends AbstractBlackBoxCodegenTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } + @TestMetadata("1.2.kt") + public void test1_2() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/pos/1.2.kt"); + } - public void testAllFilesPresentInP_2() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-2"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } + @TestMetadata("1.3.kt") + public void test1_3() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/pos/1.3.kt"); + } - @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-2/pos") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Pos extends AbstractBlackBoxCodegenTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-2/pos/1.1.kt"); - } - - @TestMetadata("1.2.kt") - public void test1_2() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-2/pos/1.2.kt"); - } - - public void testAllFilesPresentInPos() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - } - - @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-3") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class P_3 extends AbstractBlackBoxCodegenTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInP_3() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-3"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-3/pos") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Pos extends AbstractBlackBoxCodegenTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-3/pos/1.1.kt"); - } - - @TestMetadata("1.2.kt") - public void test1_2() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-3/pos/1.2.kt"); - } - - @TestMetadata("1.3.kt") - public void test1_3() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-3/pos/1.3.kt"); - } - - @TestMetadata("1.4.kt") - public void test1_4() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-3/pos/1.4.kt"); - } - - @TestMetadata("2.1.kt") - public void test2_1() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-3/pos/2.1.kt"); - } - - @TestMetadata("2.2.kt") - public void test2_2() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-3/pos/2.2.kt"); - } - - @TestMetadata("2.3.kt") - public void test2_3() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-3/pos/2.3.kt"); - } - - public void testAllFilesPresentInPos() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - } - - @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-4") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class P_4 extends AbstractBlackBoxCodegenTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInP_4() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-4"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-4/pos") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Pos extends AbstractBlackBoxCodegenTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-4/pos/1.1.kt"); - } - - @TestMetadata("1.2.kt") - public void test1_2() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-4/pos/1.2.kt"); - } - - @TestMetadata("1.3.kt") - public void test1_3() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-4/pos/1.3.kt"); - } - - @TestMetadata("1.4.kt") - public void test1_4() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-4/pos/1.4.kt"); - } - - @TestMetadata("1.5.kt") - public void test1_5() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-4/pos/1.5.kt"); - } - - public void testAllFilesPresentInPos() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-4/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + public void testAllFilesPresentInPos() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } } } } @@ -646,19 +698,19 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/type-system"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } - @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/type-system/introduction") + @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/type-system/introduction-1") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Introduction extends AbstractBlackBoxCodegenTestSpec { + public static class Introduction_1 extends AbstractBlackBoxCodegenTestSpec { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - public void testAllFilesPresentInIntroduction() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/type-system/introduction"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + public void testAllFilesPresentInIntroduction_1() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/type-system/introduction-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } - @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/type-system/introduction/p-5") + @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/type-system/introduction-1/p-5") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class P_5 extends AbstractBlackBoxCodegenTestSpec { @@ -667,10 +719,10 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_5() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/type-system/introduction/p-5"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/type-system/introduction-1/p-5"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } - @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/type-system/introduction/p-5/pos") + @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/type-system/introduction-1/p-5/pos") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Pos extends AbstractBlackBoxCodegenTestSpec { @@ -680,11 +732,11 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes @TestMetadata("2.1.kt") public void test2_1() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/type-system/introduction/p-5/pos/2.1.kt"); + runTest("compiler/tests-spec/testData/codegen/box/linked/type-system/introduction-1/p-5/pos/2.1.kt"); } public void testAllFilesPresentInPos() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/type-system/introduction/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/type-system/introduction-1/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } } } diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/parsing/AbstractParsingTestSpec.kt b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/parsing/AbstractParsingTestSpec.kt similarity index 70% rename from compiler/tests-spec/tests/org/jetbrains/kotlin/parsing/AbstractParsingTestSpec.kt rename to compiler/tests-spec/tests/org/jetbrains/kotlin/spec/parsing/AbstractParsingTestSpec.kt index fba4149367e..a47cf438e7d 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/parsing/AbstractParsingTestSpec.kt +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/parsing/AbstractParsingTestSpec.kt @@ -1,14 +1,16 @@ /* - * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + * Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. */ -package org.jetbrains.kotlin.parsing +package org.jetbrains.kotlin.spec.parsing import com.intellij.openapi.util.io.FileUtil import org.jetbrains.kotlin.TestExceptionsComparator -import org.jetbrains.kotlin.spec.parsers.CommonParser -import org.jetbrains.kotlin.spec.validators.* +import org.jetbrains.kotlin.parsing.AbstractParsingTest +import org.jetbrains.kotlin.spec.utils.parsers.CommonParser +import org.jetbrains.kotlin.spec.utils.validators.ParsingTestTypeValidator +import org.jetbrains.kotlin.spec.utils.validators.SpecTestValidationException import org.junit.Assert import java.io.File diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/parsing/ParsingTestSpecGenerated.java b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/parsing/ParsingTestSpecGenerated.java new file mode 100644 index 00000000000..33fd54923ed --- /dev/null +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/parsing/ParsingTestSpecGenerated.java @@ -0,0 +1,1187 @@ +/* + * Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.spec.parsing; + +import com.intellij.testFramework.TestDataPath; +import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; +import org.jetbrains.kotlin.test.KotlinTestUtils; +import org.jetbrains.kotlin.test.TargetBackend; +import org.jetbrains.kotlin.test.TestMetadata; +import org.junit.runner.RunWith; + +import java.io.File; +import java.util.regex.Pattern; + +/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ +@SuppressWarnings("all") +@TestMetadata("compiler/tests-spec/testData/psi") +@TestDataPath("$PROJECT_ROOT") +@RunWith(JUnit3RunnerWithInners.class) +public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInPsi() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true, "helpers", "templates"); + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Linked extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInLinked() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Expressions extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInExpressions() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Constant_literals extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInConstant_literals() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Integer_literals extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInInteger_literals() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/binary-integer-literals") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Binary_integer_literals extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInBinary_integer_literals() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/binary-integer-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class P_1 extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInP_1() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/neg") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Neg extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/neg/1.1.kt"); + } + + @TestMetadata("1.2.kt") + public void test1_2() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/neg/1.2.kt"); + } + + @TestMetadata("2.1.kt") + public void test2_1() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/neg/2.1.kt"); + } + + public void testAllFilesPresentInNeg() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/pos") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Pos extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/pos/1.1.kt"); + } + + @TestMetadata("1.2.kt") + public void test1_2() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/pos/1.2.kt"); + } + + @TestMetadata("1.3.kt") + public void test1_3() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/pos/1.3.kt"); + } + + @TestMetadata("2.1.kt") + public void test2_1() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/pos/2.1.kt"); + } + + @TestMetadata("2.2.kt") + public void test2_2() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/pos/2.2.kt"); + } + + @TestMetadata("2.3.kt") + public void test2_3() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/pos/2.3.kt"); + } + + @TestMetadata("2.4.kt") + public void test2_4() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/pos/2.4.kt"); + } + + public void testAllFilesPresentInPos() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + } + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/decimal-integer-literals") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Decimal_integer_literals extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInDecimal_integer_literals() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/decimal-integer-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class P_1 extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInP_1() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1/neg") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Neg extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1/neg/1.1.kt"); + } + + public void testAllFilesPresentInNeg() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1/pos") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Pos extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1/pos/1.1.kt"); + } + + @TestMetadata("2.1.kt") + public void test2_1() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1/pos/2.1.kt"); + } + + @TestMetadata("2.2.kt") + public void test2_2() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1/pos/2.2.kt"); + } + + @TestMetadata("2.3.kt") + public void test2_3() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1/pos/2.3.kt"); + } + + public void testAllFilesPresentInPos() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-2") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class P_2 extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInP_2() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-2"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-2/neg") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Neg extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInNeg() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-2/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + } + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Hexadecimal_integer_literals extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInHexadecimal_integer_literals() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class P_1 extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInP_1() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Neg extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/1.1.kt"); + } + + @TestMetadata("1.2.kt") + public void test1_2() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/1.2.kt"); + } + + @TestMetadata("2.1.kt") + public void test2_1() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.1.kt"); + } + + public void testAllFilesPresentInNeg() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/pos") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Pos extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/pos/1.1.kt"); + } + + @TestMetadata("1.2.kt") + public void test1_2() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/pos/1.2.kt"); + } + + @TestMetadata("2.1.kt") + public void test2_1() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/pos/2.1.kt"); + } + + @TestMetadata("2.2.kt") + public void test2_2() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/pos/2.2.kt"); + } + + @TestMetadata("2.3.kt") + public void test2_3() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/pos/2.3.kt"); + } + + @TestMetadata("2.4.kt") + public void test2_4() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/pos/2.4.kt"); + } + + public void testAllFilesPresentInPos() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + } + } + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Real_literals extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInReal_literals() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-1") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class P_1 extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInP_1() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-1/neg") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Neg extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-1/neg/1.1.kt"); + } + + @TestMetadata("1.2.kt") + public void test1_2() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-1/neg/1.2.kt"); + } + + @TestMetadata("1.3.kt") + public void test1_3() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-1/neg/1.3.kt"); + } + + @TestMetadata("2.1.kt") + public void test2_1() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-1/neg/2.1.kt"); + } + + @TestMetadata("2.2.kt") + public void test2_2() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-1/neg/2.2.kt"); + } + + @TestMetadata("2.3.kt") + public void test2_3() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-1/neg/2.3.kt"); + } + + @TestMetadata("3.1.kt") + public void test3_1() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-1/neg/3.1.kt"); + } + + @TestMetadata("3.2.kt") + public void test3_2() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-1/neg/3.2.kt"); + } + + @TestMetadata("3.3.kt") + public void test3_3() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-1/neg/3.3.kt"); + } + + public void testAllFilesPresentInNeg() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-1/pos") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Pos extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-1/pos/1.1.kt"); + } + + @TestMetadata("1.2.kt") + public void test1_2() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-1/pos/1.2.kt"); + } + + @TestMetadata("3.1.kt") + public void test3_1() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-1/pos/3.1.kt"); + } + + @TestMetadata("3.2.kt") + public void test3_2() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-1/pos/3.2.kt"); + } + + public void testAllFilesPresentInPos() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class P_2 extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInP_2() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/neg") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Neg extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/neg/1.1.kt"); + } + + @TestMetadata("1.2.kt") + public void test1_2() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/neg/1.2.kt"); + } + + @TestMetadata("1.3.kt") + public void test1_3() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/neg/1.3.kt"); + } + + @TestMetadata("1.4.kt") + public void test1_4() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/neg/1.4.kt"); + } + + public void testAllFilesPresentInNeg() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/pos") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Pos extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/pos/1.1.kt"); + } + + @TestMetadata("1.2.kt") + public void test1_2() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/pos/1.2.kt"); + } + + @TestMetadata("1.3.kt") + public void test1_3() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/pos/1.3.kt"); + } + + @TestMetadata("1.4.kt") + public void test1_4() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/pos/1.4.kt"); + } + + @TestMetadata("1.5.kt") + public void test1_5() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/pos/1.5.kt"); + } + + @TestMetadata("1.6.kt") + public void test1_6() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/pos/1.6.kt"); + } + + public void testAllFilesPresentInPos() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-3") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class P_3 extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInP_3() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-3"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-3/neg") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Neg extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-3/neg/1.1.kt"); + } + + @TestMetadata("1.2.kt") + public void test1_2() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-3/neg/1.2.kt"); + } + + @TestMetadata("1.3.kt") + public void test1_3() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-3/neg/1.3.kt"); + } + + @TestMetadata("1.4.kt") + public void test1_4() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-3/neg/1.4.kt"); + } + + @TestMetadata("1.5.kt") + public void test1_5() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-3/neg/1.5.kt"); + } + + @TestMetadata("2.1.kt") + public void test2_1() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-3/neg/2.1.kt"); + } + + @TestMetadata("3.1.kt") + public void test3_1() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-3/neg/3.1.kt"); + } + + public void testAllFilesPresentInNeg() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-3/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-3/pos") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Pos extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-3/pos/1.1.kt"); + } + + @TestMetadata("1.2.kt") + public void test1_2() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-3/pos/1.2.kt"); + } + + @TestMetadata("1.3.kt") + public void test1_3() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-3/pos/1.3.kt"); + } + + @TestMetadata("1.4.kt") + public void test1_4() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-3/pos/1.4.kt"); + } + + @TestMetadata("1.5.kt") + public void test1_5() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-3/pos/1.5.kt"); + } + + @TestMetadata("1.6.kt") + public void test1_6() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-3/pos/1.6.kt"); + } + + @TestMetadata("2.1.kt") + public void test2_1() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-3/pos/2.1.kt"); + } + + @TestMetadata("2.2.kt") + public void test2_2() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-3/pos/2.2.kt"); + } + + @TestMetadata("2.3.kt") + public void test2_3() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-3/pos/2.3.kt"); + } + + @TestMetadata("2.4.kt") + public void test2_4() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-3/pos/2.4.kt"); + } + + public void testAllFilesPresentInPos() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-4") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class P_4 extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInP_4() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-4"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-4/neg") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Neg extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-4/neg/1.1.kt"); + } + + @TestMetadata("1.2.kt") + public void test1_2() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-4/neg/1.2.kt"); + } + + @TestMetadata("1.3.kt") + public void test1_3() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-4/neg/1.3.kt"); + } + + @TestMetadata("1.4.kt") + public void test1_4() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-4/neg/1.4.kt"); + } + + public void testAllFilesPresentInNeg() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-4/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-4/pos") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Pos extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-4/pos/1.1.kt"); + } + + @TestMetadata("1.2.kt") + public void test1_2() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-4/pos/1.2.kt"); + } + + @TestMetadata("1.3.kt") + public void test1_3() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-4/pos/1.3.kt"); + } + + @TestMetadata("1.4.kt") + public void test1_4() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-4/pos/1.4.kt"); + } + + @TestMetadata("1.5.kt") + public void test1_5() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-4/pos/1.5.kt"); + } + + @TestMetadata("1.6.kt") + public void test1_6() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-4/pos/1.6.kt"); + } + + @TestMetadata("1.7.kt") + public void test1_7() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-4/pos/1.7.kt"); + } + + @TestMetadata("2.1.kt") + public void test2_1() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-4/pos/2.1.kt"); + } + + @TestMetadata("2.2.kt") + public void test2_2() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-4/pos/2.2.kt"); + } + + @TestMetadata("2.3.kt") + public void test2_3() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-4/pos/2.3.kt"); + } + + public void testAllFilesPresentInPos() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-4/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-6") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class P_6 extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInP_6() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-6"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-6/neg") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Neg extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-6/neg/1.1.kt"); + } + + public void testAllFilesPresentInNeg() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-6/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + } + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/the-types-for-integer-literals") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class The_types_for_integer_literals extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInThe_types_for_integer_literals() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/the-types-for-integer-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/the-types-for-integer-literals/p-1") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class P_1 extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInP_1() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/the-types-for-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/neg") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Neg extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/neg/1.1.kt"); + } + + @TestMetadata("1.2.kt") + public void test1_2() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/neg/1.2.kt"); + } + + @TestMetadata("1.3.kt") + public void test1_3() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/neg/1.3.kt"); + } + + @TestMetadata("1.4.kt") + public void test1_4() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/neg/1.4.kt"); + } + + public void testAllFilesPresentInNeg() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/pos") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Pos extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/pos/1.1.kt"); + } + + @TestMetadata("1.10.kt") + public void test1_10() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/pos/1.10.kt"); + } + + @TestMetadata("1.2.kt") + public void test1_2() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/pos/1.2.kt"); + } + + @TestMetadata("1.3.kt") + public void test1_3() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/pos/1.3.kt"); + } + + @TestMetadata("1.4.kt") + public void test1_4() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/pos/1.4.kt"); + } + + @TestMetadata("1.5.kt") + public void test1_5() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/pos/1.5.kt"); + } + + @TestMetadata("1.6.kt") + public void test1_6() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/pos/1.6.kt"); + } + + @TestMetadata("1.7.kt") + public void test1_7() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/pos/1.7.kt"); + } + + @TestMetadata("1.8.kt") + public void test1_8() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/pos/1.8.kt"); + } + + @TestMetadata("1.9.kt") + public void test1_9() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/pos/1.9.kt"); + } + + public void testAllFilesPresentInPos() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + } + } + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/when-expression") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class When_expression extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInWhen_expression() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/when-expression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-1") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class P_1 extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInP_1() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-1/neg") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Neg extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("3.1.kt") + public void test3_1() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-1/neg/3.1.kt"); + } + + @TestMetadata("3.2.kt") + public void test3_2() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-1/neg/3.2.kt"); + } + + public void testAllFilesPresentInNeg() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-1/pos") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Pos extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("3.1.kt") + public void test3_1() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-1/pos/3.1.kt"); + } + + @TestMetadata("3.2.kt") + public void test3_2() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-1/pos/3.2.kt"); + } + + public void testAllFilesPresentInPos() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-2") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class P_2 extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInP_2() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-2"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-2/neg") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Neg extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-2/neg/1.1.kt"); + } + + @TestMetadata("1.2.kt") + public void test1_2() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-2/neg/1.2.kt"); + } + + @TestMetadata("2.1.kt") + public void test2_1() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-2/neg/2.1.kt"); + } + + @TestMetadata("2.2.kt") + public void test2_2() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-2/neg/2.2.kt"); + } + + public void testAllFilesPresentInNeg() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-2/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-5") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class P_5 extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInP_5() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-5"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-5/neg") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Neg extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-5/neg/1.1.kt"); + } + + @TestMetadata("1.2.kt") + public void test1_2() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-5/neg/1.2.kt"); + } + + @TestMetadata("1.3.kt") + public void test1_3() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-5/neg/1.3.kt"); + } + + public void testAllFilesPresentInNeg() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-5/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class P_6 extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInP_6() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Neg extends AbstractParsingTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("11.1.kt") + public void test11_1() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/11.1.kt"); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/1.1.kt"); + } + + @TestMetadata("1.2.kt") + public void test1_2() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/1.2.kt"); + } + + @TestMetadata("3.1.kt") + public void test3_1() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/3.1.kt"); + } + + @TestMetadata("8.1.kt") + public void test8_1() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/8.1.kt"); + } + + public void testAllFilesPresentInNeg() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + } + } + } + } +} diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/tasks/GenerateJsonTestsMap.kt b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/tasks/GenerateJsonTestsMap.kt deleted file mode 100644 index ff69d6aed85..00000000000 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/tasks/GenerateJsonTestsMap.kt +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.spec.tasks - -import com.google.gson.JsonObject -import org.jetbrains.kotlin.spec.models.LinkedSpecTest -import org.jetbrains.kotlin.spec.parsers.CommonParser -import org.jetbrains.kotlin.spec.utils.GeneralConfiguration.MODULE_PATH -import org.jetbrains.kotlin.spec.utils.GeneralConfiguration.TESTDATA_PATH -import org.jetbrains.kotlin.spec.utils.TestsJsonMapBuilder -import java.io.File - -private const val OUT_DIR = "out" -private const val OUT_FILENAME = "testsMap.json" - -fun main() { - val testsMap = JsonObject() - - File(TESTDATA_PATH).walkTopDown().forEach { - val (specTest, _) = CommonParser.parseSpecTest(it.canonicalPath, mapOf("main.kt" to it.readText())) - - if (specTest is LinkedSpecTest) - TestsJsonMapBuilder.buildJsonElement(specTest, testsMap) - } - - val outDir = "$MODULE_PATH/$OUT_DIR" - - File(outDir).mkdir() - File("$outDir/$OUT_FILENAME").writeText(testsMap.toString()) -} \ No newline at end of file diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/tasks/GenerateSpecTests.kt b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/tasks/GenerateSpecTests.kt deleted file mode 100644 index 756c10721c0..00000000000 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/tasks/GenerateSpecTests.kt +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.spec.tasks - -import org.jetbrains.kotlin.checkers.AbstractDiagnosticsTestSpec -import org.jetbrains.kotlin.codegen.AbstractBlackBoxCodegenTestSpec -import org.jetbrains.kotlin.generators.tests.generator.testGroup -import org.jetbrains.kotlin.parsing.AbstractParsingTestSpec -import org.jetbrains.kotlin.spec.models.LinkedSpecTest -import org.jetbrains.kotlin.spec.parsers.CommonParser -import org.jetbrains.kotlin.spec.utils.GeneralConfiguration.TESTDATA_PATH -import org.jetbrains.kotlin.spec.utils.GeneralConfiguration.TEST_PATH -import java.io.File -import java.lang.StringBuilder - -private data class TestReferences(var testsRelevant: MutableSet? = null, var testNumber: Int = 0) - -private typealias TestsBySections = MutableMap -private typealias TestsByParagraph = MutableMap -private typealias TestsByType = MutableMap -private typealias TestsBySentence = MutableMap - -private object TestsMapGenerator { - private const val TESTS_MAP_FILE_HEADER = """/* - * This file is generated by {@link org.jetbrains.kotlin.spec.tasks.generateTests}. DO NOT MODIFY MANUALLY. - * This file is used in the HTML version of the Kotlin Specification (https://kotlin.github.io/kotlin-spec) to show tests coverage for sentences. - * - * Content format: - * - * {paragraphNumber} - * {testType: neg|pos}: {sentenceNumber}-{numberOfTests|testPathToAnotherSection}, ... - */ -""" - private const val LINKED_TESTS_PATH = "$TESTDATA_PATH/diagnostics/linked" - private const val TESTS_MAP_FILENAME = "testsMap.txt" - private val lineBreak = System.lineSeparator() - - private fun createObjectsPath(specTest: LinkedSpecTest, testsMap: TestsBySections): TestReferences { - val sections = specTest.place.sections.joinToString("/") - val testsBySection = testsMap.getOrPut(sections) { mutableMapOf() } - val testsByParagraph = testsBySection.getOrPut(specTest.place.paragraphNumber) { mutableMapOf() } - val testsByType = testsByParagraph.getOrPut(specTest.testType.type) { mutableMapOf() } - - return testsByType.getOrPut(specTest.place.sentenceNumber) { TestReferences() } - } - - private fun appendRelevantTests(specTest: LinkedSpecTest, testsMap: TestsBySections) { - if (specTest.relevantPlaces == null) return - - specTest.relevantPlaces.forEach { - val sections = it.sections.joinToString("/") - val testsBySection = testsMap.getOrPut(sections) { mutableMapOf() } - val testsByParagraph = testsBySection.getOrPut(it.paragraphNumber) { mutableMapOf() } - val testsByType = testsByParagraph.getOrPut(specTest.testType.type) { mutableMapOf() } - val testReferences = testsByType.getOrPut(it.sentenceNumber) { TestReferences() } - - if (testReferences.testsRelevant == null) { - testReferences.testsRelevant = mutableSetOf() - } - testReferences.testsRelevant!!.add( - "${specTest.sections.joinToString("/")}/${specTest.place.paragraphNumber}/${specTest.testType.type}/${specTest.place.sentenceNumber}.${specTest.testNumber}.kt" - ) - } - } - - private fun buildTestsMapAsText(testsMap: TestsByParagraph): String { - val testsMapAsText = StringBuilder() - - testsMap.forEach { (paragraphNumber, testsByType) -> - testsMapAsText.append("$paragraphNumber$lineBreak") - - testsByType.forEach { (testType, testsBySentence) -> - val sentenceTests = mutableListOf() - - testsMapAsText.append(" $testType: ") - testsBySentence.forEach { (sentenceNumber, tests) -> - if (tests.testNumber != 0) { - sentenceTests.add("$sentenceNumber-${tests.testNumber}") - } - if (tests.testsRelevant != null) { - tests.testsRelevant!!.forEach { - sentenceTests.add("$sentenceNumber-$it") - } - } - } - testsMapAsText.append(sentenceTests.joinToString(", ") + lineBreak) - } - } - - return testsMapAsText.toString() - } - - fun buildTestsMapPerSection() { - val testsMap: TestsBySections = mutableMapOf() - - File(LINKED_TESTS_PATH).walkTopDown().forEach { - if (!it.isFile || it.extension != "kt") return@forEach - - val (specTest, _) = CommonParser.parseSpecTest(it.canonicalPath, mapOf("main.kt" to it.readText())) - - if (specTest is LinkedSpecTest) { - val testReferences = createObjectsPath(specTest, testsMap) - testReferences.testNumber++ - appendRelevantTests(specTest, testsMap) - } - } - testsMap.forEach { (sections, testsByParagraph) -> - val testsMapFile = File("$LINKED_TESTS_PATH/$sections/$TESTS_MAP_FILENAME") - val testsMapAsText = buildTestsMapAsText(testsByParagraph) - - testsMapFile.writeText(TESTS_MAP_FILE_HEADER + lineBreak + testsMapAsText) - } - } -} - -private fun generateTests() { - testGroup(TEST_PATH, TESTDATA_PATH) { - testClass { - model("diagnostics", excludeDirs = listOf("helpers")) - } - testClass { - model("psi", testMethod = "doParsingTest", excludeDirs = listOf("helpers", "templates")) - } - testClass { - model("codegen/box", excludeDirs = listOf("helpers", "templates")) - } - } -} - -fun main() { - TestsMapGenerator.buildTestsMapPerSection() - generateTests() -} diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/Common.kt b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/Common.kt similarity index 75% rename from compiler/tests-spec/tests/org/jetbrains/kotlin/spec/Common.kt rename to compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/Common.kt index ad7539385ed..9ab040fb493 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/Common.kt +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/Common.kt @@ -1,17 +1,17 @@ /* - * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + * Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. */ -package org.jetbrains.kotlin.spec +package org.jetbrains.kotlin.spec.utils import org.jetbrains.kotlin.TestsExceptionType -import org.jetbrains.kotlin.spec.models.LinkedSpecTestFileInfoElementType -import org.jetbrains.kotlin.spec.models.NotLinkedSpecTestFileInfoElementType -import org.jetbrains.kotlin.spec.parsers.BasePatterns -import org.jetbrains.kotlin.spec.parsers.LinkedSpecTestPatterns -import org.jetbrains.kotlin.spec.parsers.NotLinkedSpecTestPatterns -import org.jetbrains.kotlin.spec.parsers.CommonParser.withSpaces +import org.jetbrains.kotlin.spec.utils.models.LinkedSpecTestFileInfoElementType +import org.jetbrains.kotlin.spec.utils.models.NotLinkedSpecTestFileInfoElementType +import org.jetbrains.kotlin.spec.utils.parsers.BasePatterns +import org.jetbrains.kotlin.spec.utils.parsers.LinkedSpecTestPatterns +import org.jetbrains.kotlin.spec.utils.parsers.NotLinkedSpecTestPatterns +import org.jetbrains.kotlin.spec.utils.parsers.CommonParser.withSpaces import java.util.* import java.util.regex.Matcher import java.util.regex.Pattern diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/GeneralConfiguration.kt b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/GeneralConfiguration.kt index 064941bbf90..0a1459f5a4b 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/GeneralConfiguration.kt +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/GeneralConfiguration.kt @@ -1,6 +1,6 @@ /* - * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + * Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. */ package org.jetbrains.kotlin.spec.utils diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/TestsStatisticCollector.kt b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/TestsStatisticCollector.kt index 98cb2b4a8c7..b16faef2be4 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/TestsStatisticCollector.kt +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/TestsStatisticCollector.kt @@ -1,15 +1,13 @@ /* - * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + * Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. */ package org.jetbrains.kotlin.spec.utils -import org.jetbrains.kotlin.spec.SpecTestLinkedType -import org.jetbrains.kotlin.spec.TestArea -import org.jetbrains.kotlin.spec.models.AbstractSpecTest -import org.jetbrains.kotlin.spec.parsers.CommonParser import org.jetbrains.kotlin.spec.utils.GeneralConfiguration.TESTDATA_PATH +import org.jetbrains.kotlin.spec.utils.models.AbstractSpecTest +import org.jetbrains.kotlin.spec.utils.parsers.CommonParser import java.io.File open class SpecTestsStatElement(val type: SpecTestsStatElementType) { @@ -47,7 +45,8 @@ object TestsStatisticCollector { for (specTestArea in TestArea.values()) { val specTestsPath = "$TESTDATA_PATH/${specTestArea.name.toLowerCase().replace("_", "/")}/${testLinkedType.testDataPath}" - statistic[specTestArea] = SpecTestsStatElement(SpecTestsStatElementType.AREA) + statistic[specTestArea] = + SpecTestsStatElement(SpecTestsStatElementType.AREA) File(specTestsPath).walkTopDown().forEach areaTests@{ if (!it.isFile || it.extension != "kt") return@areaTests diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/generators/templates/Feature.kt b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/generators/templates/Feature.kt similarity index 73% rename from compiler/tests-spec/tests/org/jetbrains/kotlin/spec/generators/templates/Feature.kt rename to compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/generators/templates/Feature.kt index aa423986ee7..43227ae9f18 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/generators/templates/Feature.kt +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/generators/templates/Feature.kt @@ -1,9 +1,9 @@ /* - * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + * Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. */ -package org.jetbrains.kotlin.spec.generators.templates +package org.jetbrains.kotlin.spec.utils.generators.templates enum class Feature(val config: FeatureTemplatesConfig) { IDENTIFIERS( diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/generators/templates/FeatureInteractionTestDataGenerator.kt b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/generators/templates/FeatureInteractionTestDataGenerator.kt similarity index 93% rename from compiler/tests-spec/tests/org/jetbrains/kotlin/spec/generators/templates/FeatureInteractionTestDataGenerator.kt rename to compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/generators/templates/FeatureInteractionTestDataGenerator.kt index 854967aed8c..3fd8785596d 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/generators/templates/FeatureInteractionTestDataGenerator.kt +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/generators/templates/FeatureInteractionTestDataGenerator.kt @@ -1,9 +1,9 @@ /* - * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + * Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. */ -package org.jetbrains.kotlin.spec.generators.templates +package org.jetbrains.kotlin.spec.utils.generators.templates import org.jetbrains.kotlin.spec.utils.GeneralConfiguration.TESTDATA_PATH import java.io.File diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/generators/templates/FeatureTemplatesConfig.kt b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/generators/templates/FeatureTemplatesConfig.kt similarity index 79% rename from compiler/tests-spec/tests/org/jetbrains/kotlin/spec/generators/templates/FeatureTemplatesConfig.kt rename to compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/generators/templates/FeatureTemplatesConfig.kt index a14a4c6f92b..7f254e88d0b 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/generators/templates/FeatureTemplatesConfig.kt +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/generators/templates/FeatureTemplatesConfig.kt @@ -1,12 +1,12 @@ /* - * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + * Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. */ -package org.jetbrains.kotlin.spec.generators.templates +package org.jetbrains.kotlin.spec.utils.generators.templates -import org.jetbrains.kotlin.spec.TestArea import org.jetbrains.kotlin.spec.utils.GeneralConfiguration.TESTDATA_PATH +import org.jetbrains.kotlin.spec.utils.TestArea import java.io.File enum class FeatureTemplatesType { @@ -43,7 +43,9 @@ class FeatureTemplatesConfig( private fun getTemplatesIterator() = lazy { getTemplates(testArea).value.iterator() } - fun resetTemplatesIterator() { currentTemplatesIterator = getTemplatesIterator() } + fun resetTemplatesIterator() { + currentTemplatesIterator = getTemplatesIterator() + } fun getNextWithRepeat() = let { takeUnless { it.currentTemplatesIterator.value.hasNext() }?.resetTemplatesIterator() diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/generators/templates/GenerationConfig.kt b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/generators/templates/GenerationConfig.kt similarity index 83% rename from compiler/tests-spec/tests/org/jetbrains/kotlin/spec/generators/templates/GenerationConfig.kt rename to compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/generators/templates/GenerationConfig.kt index df7c9040a61..c5aeae105fb 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/generators/templates/GenerationConfig.kt +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/generators/templates/GenerationConfig.kt @@ -1,13 +1,13 @@ /* - * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + * Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. */ -package org.jetbrains.kotlin.spec.generators.templates +package org.jetbrains.kotlin.spec.utils.generators.templates -import org.jetbrains.kotlin.spec.SpecTestLinkedType -import org.jetbrains.kotlin.spec.TestArea -import org.jetbrains.kotlin.spec.TestType +import org.jetbrains.kotlin.spec.utils.SpecTestLinkedType +import org.jetbrains.kotlin.spec.utils.TestArea +import org.jetbrains.kotlin.spec.utils.TestType enum class SubstitutionTag(val passType: SubstitutionPassType = SubstitutionPassType.FIRST) { DIRECTIVES, @@ -40,7 +40,7 @@ abstract class GenerationSpecTestDataConfig { lateinit var testArea: TestArea protected val baseSubstitutions = mapOf String>( - SubstitutionTag.TEST_TYPE to { _ -> testType.toString() }, + SubstitutionTag.TEST_TYPE to { testType.toString() }, SubstitutionTag.TEST_NUMBER to { rule -> rule.testNumber.toString() }, SubstitutionTag.TEST_DESCRIPTION to { rule -> testDescription.format(rule.filename) }, SubstitutionTag.ELEMENT to { rule -> @@ -104,10 +104,10 @@ class GenerationLinkedSpecTestDataConfig : GenerationSpecTestDataConfig() { override val layoutFilename = "linkedTestsLayout.kt" override val substitutions = mutableMapOf String>( - SubstitutionTag.SECTIONS to { _ -> sections.joinToString(", ") }, - SubstitutionTag.PARAGRAPH_NUMBER to { _ -> paragraphNumber.toString() }, - SubstitutionTag.SENTENCE_NUMBER to { _ -> sentenceNumber.toString() }, - SubstitutionTag.SENTENCE to { _ -> sentence }, + SubstitutionTag.SECTIONS to { sections.joinToString(", ") }, + SubstitutionTag.PARAGRAPH_NUMBER to { paragraphNumber.toString() }, + SubstitutionTag.SENTENCE_NUMBER to { sentenceNumber.toString() }, + SubstitutionTag.SENTENCE to { sentence }, SubstitutionTag.CLASS_OF_FILE to { rule -> "_${sentenceNumber}_${rule.testNumber}Kt" } ).apply { putAll(baseSubstitutions) } @@ -120,7 +120,7 @@ class GenerationNotLinkedSpecTestDataConfig : GenerationSpecTestDataConfig() { override val layoutFilename = "notLinkedTestsLayout.kt" override val substitutions = mutableMapOf String>( - SubstitutionTag.CATEGORIES to { _ -> categories.joinToString(", ") }, + SubstitutionTag.CATEGORIES to { categories.joinToString(", ") }, SubstitutionTag.CLASS_OF_FILE to { rule -> "_${rule.testNumber}Kt" } ).apply { putAll(baseSubstitutions) } diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/generators/templates/GenerationUtils.kt b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/generators/templates/GenerationUtils.kt similarity index 66% rename from compiler/tests-spec/tests/org/jetbrains/kotlin/spec/generators/templates/GenerationUtils.kt rename to compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/generators/templates/GenerationUtils.kt index bf0730c8361..a1871e75a65 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/generators/templates/GenerationUtils.kt +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/generators/templates/GenerationUtils.kt @@ -1,11 +1,11 @@ /* - * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + * Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. */ -package org.jetbrains.kotlin.spec.generators.templates +package org.jetbrains.kotlin.spec.utils.generators.templates -import org.jetbrains.kotlin.spec.tasks.generateTests +import org.jetbrains.kotlin.spec.utils.tasks.generateTests fun generationSpecTestDataConfigGroup(regenerateTests: Boolean = false, body: () -> Unit) { body() diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/generators/templates/TemplateSubstitutionTransformers.kt b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/generators/templates/TemplateSubstitutionTransformers.kt similarity index 51% rename from compiler/tests-spec/tests/org/jetbrains/kotlin/spec/generators/templates/TemplateSubstitutionTransformers.kt rename to compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/generators/templates/TemplateSubstitutionTransformers.kt index 3f2f5950077..029d75f5bd0 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/generators/templates/TemplateSubstitutionTransformers.kt +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/generators/templates/TemplateSubstitutionTransformers.kt @@ -1,9 +1,9 @@ /* - * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + * Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. */ -package org.jetbrains.kotlin.spec.generators.templates +package org.jetbrains.kotlin.spec.utils.generators.templates enum class TemplateValidationTransformerType { TRIM_BACKTICKS diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/models/AbstractSpecTest.kt b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/models/AbstractSpecTest.kt similarity index 81% rename from compiler/tests-spec/tests/org/jetbrains/kotlin/spec/models/AbstractSpecTest.kt rename to compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/models/AbstractSpecTest.kt index ca1331ffdf9..83cb03900ff 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/models/AbstractSpecTest.kt +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/models/AbstractSpecTest.kt @@ -1,16 +1,16 @@ /* - * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + * Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. */ -package org.jetbrains.kotlin.spec.models +package org.jetbrains.kotlin.spec.utils.models import org.jetbrains.kotlin.TestsExceptionType -import org.jetbrains.kotlin.spec.* -import org.jetbrains.kotlin.spec.parsers.CommonPatterns -import org.jetbrains.kotlin.spec.parsers.CommonPatterns.issuesPattern -import org.jetbrains.kotlin.spec.parsers.LinkedSpecTestPatterns.relevantPlacesPattern -import org.jetbrains.kotlin.spec.parsers.TestCasePatterns.testCaseNumberPattern +import org.jetbrains.kotlin.spec.utils.* +import org.jetbrains.kotlin.spec.utils.parsers.CommonPatterns +import org.jetbrains.kotlin.spec.utils.parsers.CommonPatterns.issuesPattern +import org.jetbrains.kotlin.spec.utils.parsers.LinkedSpecTestPatterns.relevantPlacesPattern +import org.jetbrains.kotlin.spec.utils.parsers.TestCasePatterns.testCaseNumberPattern import java.util.regex.Matcher import java.util.regex.Pattern diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/models/LinkedSpecTest.kt b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/models/LinkedSpecTest.kt similarity index 78% rename from compiler/tests-spec/tests/org/jetbrains/kotlin/spec/models/LinkedSpecTest.kt rename to compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/models/LinkedSpecTest.kt index 0ce29285e76..314b05e299d 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/models/LinkedSpecTest.kt +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/models/LinkedSpecTest.kt @@ -1,21 +1,21 @@ /* - * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + * Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. */ -package org.jetbrains.kotlin.spec.models +package org.jetbrains.kotlin.spec.utils.models import org.jetbrains.kotlin.TestsExceptionType -import org.jetbrains.kotlin.spec.SpecTestCasesSet -import org.jetbrains.kotlin.spec.SpecTestInfoElementType -import org.jetbrains.kotlin.spec.TestArea -import org.jetbrains.kotlin.spec.TestType -import org.jetbrains.kotlin.spec.parsers.CommonPatterns.ls -import org.jetbrains.kotlin.spec.parsers.CommonParser.withUnderscores -import org.jetbrains.kotlin.spec.parsers.CommonParser.splitByPathSeparator -import org.jetbrains.kotlin.spec.parsers.CommonParser.withSpaces -import org.jetbrains.kotlin.spec.parsers.LinkedSpecTestPatterns.placePattern -import org.jetbrains.kotlin.spec.parsers.LinkedSpecTestPatterns.relevantPlacesPattern +import org.jetbrains.kotlin.spec.utils.SpecTestCasesSet +import org.jetbrains.kotlin.spec.utils.SpecTestInfoElementType +import org.jetbrains.kotlin.spec.utils.TestArea +import org.jetbrains.kotlin.spec.utils.TestType +import org.jetbrains.kotlin.spec.utils.parsers.LinkedSpecTestPatterns.placePattern +import org.jetbrains.kotlin.spec.utils.parsers.LinkedSpecTestPatterns.relevantPlacesPattern +import org.jetbrains.kotlin.spec.utils.parsers.CommonParser.withSpaces +import org.jetbrains.kotlin.spec.utils.parsers.CommonParser.withUnderscores +import org.jetbrains.kotlin.spec.utils.parsers.CommonParser.splitByPathSeparator +import org.jetbrains.kotlin.spec.utils.parsers.CommonPatterns.ls import java.util.regex.Matcher import java.util.regex.Pattern @@ -36,7 +36,7 @@ data class SpecPlace( ) class LinkedSpecTest( - private val specVersion: String, + val specVersion: String, testArea: TestArea, testType: TestType, val place: SpecPlace, diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/models/NotLinkedSpecTest.kt b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/models/NotLinkedSpecTest.kt similarity index 68% rename from compiler/tests-spec/tests/org/jetbrains/kotlin/spec/models/NotLinkedSpecTest.kt rename to compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/models/NotLinkedSpecTest.kt index 37611b2ff06..95861c57730 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/models/NotLinkedSpecTest.kt +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/models/NotLinkedSpecTest.kt @@ -1,20 +1,20 @@ /* - * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + * Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. */ -package org.jetbrains.kotlin.spec.models +package org.jetbrains.kotlin.spec.utils.models import org.jetbrains.kotlin.TestsExceptionType -import org.jetbrains.kotlin.spec.SpecTestCasesSet -import org.jetbrains.kotlin.spec.SpecTestInfoElementType -import org.jetbrains.kotlin.spec.TestArea -import org.jetbrains.kotlin.spec.TestType -import org.jetbrains.kotlin.spec.parsers.CommonParser.splitByPathSeparator -import org.jetbrains.kotlin.spec.parsers.CommonParser.withUnderscores -import org.jetbrains.kotlin.spec.parsers.CommonParser.withSpaces -import org.jetbrains.kotlin.spec.parsers.CommonPatterns.ls -import org.jetbrains.kotlin.spec.parsers.CommonPatterns.sectionsInFilePattern +import org.jetbrains.kotlin.spec.utils.SpecTestCasesSet +import org.jetbrains.kotlin.spec.utils.SpecTestInfoElementType +import org.jetbrains.kotlin.spec.utils.TestArea +import org.jetbrains.kotlin.spec.utils.TestType +import org.jetbrains.kotlin.spec.utils.parsers.CommonPatterns.sectionsInFilePattern +import org.jetbrains.kotlin.spec.utils.parsers.CommonParser.withSpaces +import org.jetbrains.kotlin.spec.utils.parsers.CommonParser.withUnderscores +import org.jetbrains.kotlin.spec.utils.parsers.CommonParser.splitByPathSeparator +import org.jetbrains.kotlin.spec.utils.parsers.CommonPatterns.ls import java.util.regex.Matcher import java.util.regex.Pattern diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/parsers/CommonParser.kt b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/parsers/CommonParser.kt similarity index 85% rename from compiler/tests-spec/tests/org/jetbrains/kotlin/spec/parsers/CommonParser.kt rename to compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/parsers/CommonParser.kt index d82f30e1a56..914f149228f 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/parsers/CommonParser.kt +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/parsers/CommonParser.kt @@ -1,19 +1,21 @@ /* - * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + * Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. */ -package org.jetbrains.kotlin.spec.parsers +package org.jetbrains.kotlin.spec.utils.parsers -import org.jetbrains.kotlin.spec.* -import org.jetbrains.kotlin.spec.SpecTestInfoElementContent -import org.jetbrains.kotlin.spec.SpecTestLinkedType -import org.jetbrains.kotlin.spec.models.* -import org.jetbrains.kotlin.spec.parsers.CommonPatterns.testInfoElementPattern -import org.jetbrains.kotlin.spec.parsers.CommonPatterns.testPathBaseRegexTemplate -import org.jetbrains.kotlin.spec.parsers.LinkedSpecTestPatterns.testInfoPattern -import org.jetbrains.kotlin.spec.parsers.TestCasePatterns.testCaseInfoPattern -import org.jetbrains.kotlin.spec.validators.* +import org.jetbrains.kotlin.spec.utils.SpecTestInfoElementContent +import org.jetbrains.kotlin.spec.utils.SpecTestInfoElementType +import org.jetbrains.kotlin.spec.utils.SpecTestLinkedType +import org.jetbrains.kotlin.spec.utils.TestFiles +import org.jetbrains.kotlin.spec.utils.models.* +import org.jetbrains.kotlin.spec.utils.parsers.CommonPatterns.testInfoElementPattern +import org.jetbrains.kotlin.spec.utils.parsers.CommonPatterns.testPathBaseRegexTemplate +import org.jetbrains.kotlin.spec.utils.parsers.LinkedSpecTestPatterns.testInfoPattern +import org.jetbrains.kotlin.spec.utils.parsers.TestCasePatterns.testCaseInfoPattern +import org.jetbrains.kotlin.spec.utils.validators.SpecTestValidationException +import org.jetbrains.kotlin.spec.utils.validators.SpecTestValidationFailedReason import java.io.File import java.util.regex.Matcher import java.util.regex.Pattern @@ -52,7 +54,7 @@ object CommonParser { placeMatcher.group("sentenceNumber").toInt() ) - private fun parseLinkedSpecTest(testFilePath: String, testFiles: TestFiles): LinkedSpecTest { + fun parseLinkedSpecTest(testFilePath: String, testFiles: TestFiles): LinkedSpecTest { val parsedTestFile = parseTestInfo(testFilePath, testFiles, SpecTestLinkedType.LINKED) val testInfoElements = parsedTestFile.testInfoElements val placeMatcher = testInfoElements[LinkedSpecTestFileInfoElementType.PLACE]!!.additionalMatcher!! diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/parsers/Patterns.kt b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/parsers/Patterns.kt similarity index 73% rename from compiler/tests-spec/tests/org/jetbrains/kotlin/spec/parsers/Patterns.kt rename to compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/parsers/Patterns.kt index 2bd90f6188e..188d300f9af 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/parsers/Patterns.kt +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/parsers/Patterns.kt @@ -1,26 +1,26 @@ /* - * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + * Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. */ -package org.jetbrains.kotlin.spec.parsers +package org.jetbrains.kotlin.spec.utils.parsers -import org.jetbrains.kotlin.spec.models.SpecTestCaseInfoElementType -import org.jetbrains.kotlin.spec.SpecTestLinkedType -import org.jetbrains.kotlin.spec.TestArea -import org.jetbrains.kotlin.spec.TestType -import org.jetbrains.kotlin.spec.parsers.CommonPatterns.INTEGER_REGEX -import org.jetbrains.kotlin.spec.parsers.CommonPatterns.SINGLE_LINE_COMMENT_REGEX -import org.jetbrains.kotlin.spec.parsers.CommonPatterns.ASTERISK_REGEX -import org.jetbrains.kotlin.spec.parsers.CommonPatterns.directiveRegex -import org.jetbrains.kotlin.spec.parsers.CommonPatterns.MULTILINE_COMMENT_REGEX -import org.jetbrains.kotlin.spec.parsers.CommonPatterns.ps -import org.jetbrains.kotlin.spec.parsers.CommonPatterns.testAreaRegex -import org.jetbrains.kotlin.spec.parsers.CommonPatterns.testPathRegexTemplate -import org.jetbrains.kotlin.spec.parsers.CommonPatterns.testTypeRegex -import org.jetbrains.kotlin.spec.parsers.CommonParser.withSpaces -import org.jetbrains.kotlin.spec.parsers.CommonPatterns.SECTIONS_IN_FILE_REGEX -import org.jetbrains.kotlin.spec.parsers.CommonPatterns.sectionsInPathRegex +import org.jetbrains.kotlin.spec.utils.SpecTestLinkedType +import org.jetbrains.kotlin.spec.utils.TestArea +import org.jetbrains.kotlin.spec.utils.TestType +import org.jetbrains.kotlin.spec.utils.models.SpecTestCaseInfoElementType +import org.jetbrains.kotlin.spec.utils.parsers.CommonPatterns.ASTERISK_REGEX +import org.jetbrains.kotlin.spec.utils.parsers.CommonPatterns.INTEGER_REGEX +import org.jetbrains.kotlin.spec.utils.parsers.CommonPatterns.MULTILINE_COMMENT_REGEX +import org.jetbrains.kotlin.spec.utils.parsers.CommonPatterns.SECTIONS_IN_FILE_REGEX +import org.jetbrains.kotlin.spec.utils.parsers.CommonPatterns.SINGLE_LINE_COMMENT_REGEX +import org.jetbrains.kotlin.spec.utils.parsers.CommonPatterns.directiveRegex +import org.jetbrains.kotlin.spec.utils.parsers.CommonPatterns.ps +import org.jetbrains.kotlin.spec.utils.parsers.CommonPatterns.sectionsInPathRegex +import org.jetbrains.kotlin.spec.utils.parsers.CommonPatterns.testAreaRegex +import org.jetbrains.kotlin.spec.utils.parsers.CommonParser.withSpaces +import org.jetbrains.kotlin.spec.utils.parsers.CommonPatterns.testPathRegexTemplate +import org.jetbrains.kotlin.spec.utils.parsers.CommonPatterns.testTypeRegex import java.io.File import java.util.regex.Pattern @@ -29,7 +29,7 @@ object CommonPatterns { const val INTEGER_REGEX = """[1-9]\d*""" const val SINGLE_LINE_COMMENT_REGEX = """\/\/\s*%s""" const val ASTERISK_REGEX = """\*""" - const val SECTIONS_IN_FILE_REGEX = """[\w-]+(,\s+[\w-]+)*""" + const val SECTIONS_IN_FILE_REGEX = """[\w-\.]+(,\s+[\w-\.]+)*""" const val MULTILINE_COMMENT_REGEX = """\/\*\s+?%s\s+\*\/(?:\n)*""" val ls: String = System.lineSeparator() @@ -44,7 +44,7 @@ object CommonPatterns { val testPathRegexTemplate = """$testPathBaseRegexTemplate$ps(?pos|neg)$ps%s$""" val issuesPattern: Pattern = Pattern.compile("""(KT-[1-9]\d*)(,\s*KT-[1-9]\d*)*""") val sectionsInFilePattern: Pattern = Pattern.compile("""(?$SECTIONS_IN_FILE_REGEX)""") - val sectionsInPathRegex = """(?(?:[\w-]+)(?:$ps[\w-]+)*?)""" + val sectionsInPathRegex = """(?(?:[\w-\.]+)(?:$ps[\w-\.]+)*?)""" val packagePattern: Pattern = Pattern.compile("""(?:^|\n)package (?.*?)(?:;|\n)""") } diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/parsers/TestCasesParser.kt b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/parsers/TestCasesParser.kt similarity index 75% rename from compiler/tests-spec/tests/org/jetbrains/kotlin/spec/parsers/TestCasesParser.kt rename to compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/parsers/TestCasesParser.kt index c7f5667b82f..19d73cc07af 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/parsers/TestCasesParser.kt +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/parsers/TestCasesParser.kt @@ -1,18 +1,18 @@ /* - * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + * Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. */ -package org.jetbrains.kotlin.spec.parsers +package org.jetbrains.kotlin.spec.utils.parsers import org.jetbrains.kotlin.TestsExceptionType -import org.jetbrains.kotlin.spec.* -import org.jetbrains.kotlin.spec.models.CommonInfoElementType -import org.jetbrains.kotlin.spec.models.LinkedSpecTestFileInfoElementType -import org.jetbrains.kotlin.spec.models.SpecTestCaseInfoElementType -import org.jetbrains.kotlin.spec.models.SpecTestInfoElements -import org.jetbrains.kotlin.spec.parsers.CommonParser.splitByComma -import org.jetbrains.kotlin.spec.parsers.TestCasePatterns.testCaseInfoPattern +import org.jetbrains.kotlin.spec.utils.* +import org.jetbrains.kotlin.spec.utils.models.CommonInfoElementType +import org.jetbrains.kotlin.spec.utils.models.LinkedSpecTestFileInfoElementType +import org.jetbrains.kotlin.spec.utils.models.SpecTestCaseInfoElementType +import org.jetbrains.kotlin.spec.utils.models.SpecTestInfoElements +import org.jetbrains.kotlin.spec.utils.parsers.TestCasePatterns.testCaseInfoPattern +import org.jetbrains.kotlin.spec.utils.parsers.CommonParser.splitByComma import java.util.* private operator fun SpecTestCase.plusAssign(addTestCase: SpecTestCase) { @@ -47,11 +47,7 @@ private fun SpecTestCase.save( } fun parseTestCases(testFiles: TestFiles): SpecTestCasesSet { - val testCasesSet = SpecTestCasesSet( - mutableMapOf(), - mutableMapOf>(), - mutableMapOf() - ) + val testCasesSet = SpecTestCasesSet(mutableMapOf(), mutableMapOf(), mutableMapOf()) var rangeOffset = 0 for ((filename, fileContent) in testFiles) { @@ -59,8 +55,8 @@ fun parseTestCases(testFiles: TestFiles): SpecTestCasesSet { var startFind = 0 if (!testCasesSet.byFiles.contains(filename)) { - testCasesSet.byFiles[filename] = mutableMapOf() - testCasesSet.byRanges[filename] = TreeMap() + testCasesSet.byFiles[filename] = mutableMapOf() + testCasesSet.byRanges[filename] = TreeMap() } val testCasesOfFile = testCasesSet.byFiles[filename]!! diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/parsers/TestInfoParser.kt b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/parsers/TestInfoParser.kt similarity index 75% rename from compiler/tests-spec/tests/org/jetbrains/kotlin/spec/parsers/TestInfoParser.kt rename to compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/parsers/TestInfoParser.kt index f8d61ec875b..e7ca6f5ff2f 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/parsers/TestInfoParser.kt +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/parsers/TestInfoParser.kt @@ -1,19 +1,20 @@ /* - * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + * Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. */ -package org.jetbrains.kotlin.spec.parsers +package org.jetbrains.kotlin.spec.utils.parsers import com.intellij.openapi.util.io.FileUtil import org.jetbrains.kotlin.TestsExceptionType -import org.jetbrains.kotlin.spec.* -import org.jetbrains.kotlin.spec.models.CommonInfoElementType -import org.jetbrains.kotlin.spec.models.CommonSpecTestFileInfoElementType -import org.jetbrains.kotlin.spec.models.SpecTestInfoElements -import org.jetbrains.kotlin.spec.parsers.CommonParser.withUnderscores -import org.jetbrains.kotlin.spec.parsers.CommonParser.splitByComma -import org.jetbrains.kotlin.spec.validators.* +import org.jetbrains.kotlin.spec.utils.* +import org.jetbrains.kotlin.spec.utils.models.CommonInfoElementType +import org.jetbrains.kotlin.spec.utils.models.CommonSpecTestFileInfoElementType +import org.jetbrains.kotlin.spec.utils.models.SpecTestInfoElements +import org.jetbrains.kotlin.spec.utils.validators.SpecTestValidationException +import org.jetbrains.kotlin.spec.utils.validators.SpecTestValidationFailedReason +import org.jetbrains.kotlin.spec.utils.parsers.CommonParser.splitByComma +import org.jetbrains.kotlin.spec.utils.parsers.CommonParser.withUnderscores import java.io.File data class ParsedTestFile( diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/tasks/GenerateFeatureInteractionSpecTestData.kt b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/tasks/GenerateFeatureInteractionSpecTestData.kt similarity index 66% rename from compiler/tests-spec/tests/org/jetbrains/kotlin/spec/tasks/GenerateFeatureInteractionSpecTestData.kt rename to compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/tasks/GenerateFeatureInteractionSpecTestData.kt index 210ec244eec..e624a92a657 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/tasks/GenerateFeatureInteractionSpecTestData.kt +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/tasks/GenerateFeatureInteractionSpecTestData.kt @@ -1,22 +1,22 @@ /* - * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + * Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. */ -package org.jetbrains.kotlin.spec.tasks +package org.jetbrains.kotlin.spec.utils.tasks -import org.jetbrains.kotlin.spec.TestArea -import org.jetbrains.kotlin.spec.TestType -import org.jetbrains.kotlin.spec.generators.templates.Feature -import org.jetbrains.kotlin.spec.generators.templates.generationLinkedSpecTestDataConfig -import org.jetbrains.kotlin.spec.generators.templates.generationSpecTestDataConfigGroup +import org.jetbrains.kotlin.spec.utils.TestArea +import org.jetbrains.kotlin.spec.utils.TestType +import org.jetbrains.kotlin.spec.utils.generators.templates.Feature +import org.jetbrains.kotlin.spec.utils.generators.templates.generationLinkedSpecTestDataConfig +import org.jetbrains.kotlin.spec.utils.generators.templates.generationSpecTestDataConfigGroup fun main() { generationSpecTestDataConfigGroup(regenerateTests = true) { generationLinkedSpecTestDataConfig { testArea = TestArea.PSI testType = TestType.NEGATIVE - sections = listOf("constant-literals", "boolean-literals") + sections = listOf("expressions", "constant-literals", "boolean-literals") paragraphNumber = 1 sentenceNumber = 2 sentence = "These are strong keywords which cannot be used as identifiers unless escaped." @@ -27,7 +27,7 @@ fun main() { generationLinkedSpecTestDataConfig { testArea = TestArea.PSI testType = TestType.POSITIVE - sections = listOf("constant-literals", "boolean-literals") + sections = listOf("expressions", "constant-literals", "boolean-literals") paragraphNumber = 1 sentenceNumber = 2 sentence = "These are strong keywords which cannot be used as identifiers unless escaped." @@ -38,7 +38,7 @@ fun main() { generationLinkedSpecTestDataConfig { testArea = TestArea.CODEGEN_BOX testType = TestType.POSITIVE - sections = listOf("constant-literals", "boolean-literals") + sections = listOf("expressions", "constant-literals", "boolean-literals") paragraphNumber = 1 sentenceNumber = 2 sentence = "These are strong keywords which cannot be used as identifiers unless escaped." diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/tasks/GenerateSpecTests.kt b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/tasks/GenerateSpecTests.kt new file mode 100644 index 00000000000..95bed21ffcb --- /dev/null +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/tasks/GenerateSpecTests.kt @@ -0,0 +1,102 @@ +/* + * Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.spec.utils.tasks + +import com.google.gson.GsonBuilder +import com.google.gson.JsonArray +import com.google.gson.JsonElement +import com.google.gson.JsonObject +import org.jetbrains.kotlin.generators.tests.generator.testGroup +import org.jetbrains.kotlin.spec.checkers.AbstractDiagnosticsTestSpec +import org.jetbrains.kotlin.spec.codegen.AbstractBlackBoxCodegenTestSpec +import org.jetbrains.kotlin.spec.parsing.AbstractParsingTestSpec +import org.jetbrains.kotlin.spec.utils.GeneralConfiguration.TESTDATA_PATH +import org.jetbrains.kotlin.spec.utils.GeneralConfiguration.TEST_PATH +import org.jetbrains.kotlin.spec.utils.TestArea +import org.jetbrains.kotlin.spec.utils.TestType +import org.jetbrains.kotlin.spec.utils.models.LinkedSpecTest +import org.jetbrains.kotlin.spec.utils.models.SpecPlace +import org.jetbrains.kotlin.spec.utils.parsers.CommonParser +import java.io.File + +private object TestsMapGenerator { + private const val LINKED_TESTS_PATH = "linked" + private const val TESTS_MAP_FILENAME = "testsMap.json" + + private inline fun JsonObject.getOrCreate(key: String): T { + if (!has(key)) { + add(key, T::class.java.newInstance()) + } + return get(key) as T + } + + private fun JsonObject.getOrCreateSpecTestObject(specPlace: SpecPlace, testArea: TestArea, testType: TestType): JsonArray { + val sections = "${testArea.testDataPath}/$LINKED_TESTS_PATH/${specPlace.sections.joinToString("/")}" + val testsBySection = getOrCreate(sections) + val testsByParagraph = testsBySection.getOrCreate(specPlace.paragraphNumber.toString()) + val testsByType = testsByParagraph.getOrCreate(testType.type) + + return testsByType.getOrCreate(specPlace.sentenceNumber.toString()) + } + + private fun getTestInfo(test: LinkedSpecTest) = + JsonObject().apply { + addProperty("specVersion", test.specVersion) + addProperty("casesNumber", test.cases.byNumbers.size) + addProperty("description", test.description) + addProperty( + "unexpectedBehaviour", + test.unexpectedBehavior || test.cases.byNumbers.any { it.value.unexpectedBehavior } + ) + } + + fun buildTestsMapPerSection() { + val testsMap = JsonObject() + + TestArea.values().forEach { testArea -> + File("$TESTDATA_PATH/${testArea.testDataPath}/$LINKED_TESTS_PATH").walkTopDown().forEach testFiles@ { file -> + if (!file.isFile || file.extension != "kt") return@testFiles + + val (specTest, _) = CommonParser.parseSpecTest(file.canonicalPath, mapOf("main.kt" to file.readText())) + + if (specTest is LinkedSpecTest) { + val testInfo = getTestInfo(specTest) + + testsMap.getOrCreateSpecTestObject(specTest.place, specTest.testArea, specTest.testType).add(testInfo) + + specTest.relevantPlaces?.forEach { + testsMap.getOrCreateSpecTestObject(it, specTest.testArea, specTest.testType).add(testInfo) + } + } + } + } + + val gson = GsonBuilder().setPrettyPrinting().create() + + testsMap.keySet().forEach { testPath -> + File("$TESTDATA_PATH/$testPath/$TESTS_MAP_FILENAME").writeText(gson.toJson(testsMap.get(testPath))) + } + } +} + +fun generateTests() { + testGroup(TEST_PATH, TESTDATA_PATH) { + testClass { + model("diagnostics", excludeDirs = listOf("helpers")) + } + testClass { + model("psi", testMethod = "doParsingTest", excludeDirs = listOf("helpers", "templates")) + } + testClass { + model("codegen/box", excludeDirs = listOf("helpers", "templates")) + } + } +} + +fun main() { + TestsMapGenerator.buildTestsMapPerSection() + generateTests() +} diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/tasks/PrintSpecTestsStatistic.kt b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/tasks/PrintSpecTestsStatistic.kt similarity index 87% rename from compiler/tests-spec/tests/org/jetbrains/kotlin/spec/tasks/PrintSpecTestsStatistic.kt rename to compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/tasks/PrintSpecTestsStatistic.kt index c304a7cf428..45a1f583a7d 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/tasks/PrintSpecTestsStatistic.kt +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/tasks/PrintSpecTestsStatistic.kt @@ -1,11 +1,11 @@ /* - * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + * Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. */ -package org.jetbrains.kotlin.spec.tasks +package org.jetbrains.kotlin.spec.utils.tasks -import org.jetbrains.kotlin.spec.SpecTestLinkedType +import org.jetbrains.kotlin.spec.utils.SpecTestLinkedType import org.jetbrains.kotlin.spec.utils.SpecTestsStatElement import org.jetbrains.kotlin.spec.utils.SpecTestsStatElementType import org.jetbrains.kotlin.spec.utils.TestsStatisticCollector diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/validators/AbstractTestValidator.kt b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/validators/AbstractTestValidator.kt similarity index 88% rename from compiler/tests-spec/tests/org/jetbrains/kotlin/spec/validators/AbstractTestValidator.kt rename to compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/validators/AbstractTestValidator.kt index ec32e56c1fc..15b56b8f187 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/validators/AbstractTestValidator.kt +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/validators/AbstractTestValidator.kt @@ -1,14 +1,14 @@ /* - * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + * Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. */ -package org.jetbrains.kotlin.spec.validators +package org.jetbrains.kotlin.spec.utils.validators -import org.jetbrains.kotlin.spec.models.AbstractSpecTest -import org.jetbrains.kotlin.spec.SpecTestLinkedType -import org.jetbrains.kotlin.spec.TestType -import org.jetbrains.kotlin.spec.parsers.CommonPatterns +import org.jetbrains.kotlin.spec.utils.SpecTestLinkedType +import org.jetbrains.kotlin.spec.utils.TestType +import org.jetbrains.kotlin.spec.utils.models.AbstractSpecTest +import org.jetbrains.kotlin.spec.utils.parsers.CommonPatterns import java.io.File enum class SpecTestValidationFailedReason(val description: String) { diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/validators/BlackBoxTestTypeValidator.kt b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/validators/BlackBoxTestTypeValidator.kt new file mode 100644 index 00000000000..a204458accc --- /dev/null +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/validators/BlackBoxTestTypeValidator.kt @@ -0,0 +1,16 @@ +/* + * Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.spec.utils.validators + +import org.jetbrains.kotlin.spec.utils.models.AbstractSpecTest +import java.io.File + +class BlackBoxTestTypeValidator( + testDataFile: File, + private val testInfo: AbstractSpecTest +) : AbstractTestValidator(testInfo, testDataFile) { + override fun computeTestTypes() = mapOf(1 to testInfo.testType) +} diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/validators/DiagnosticTestTypeValidator.kt b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/validators/DiagnosticTestTypeValidator.kt similarity index 85% rename from compiler/tests-spec/tests/org/jetbrains/kotlin/spec/validators/DiagnosticTestTypeValidator.kt rename to compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/validators/DiagnosticTestTypeValidator.kt index b183aba61a2..390c4492f83 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/validators/DiagnosticTestTypeValidator.kt +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/validators/DiagnosticTestTypeValidator.kt @@ -1,16 +1,16 @@ /* - * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + * Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. */ -package org.jetbrains.kotlin.spec.validators +package org.jetbrains.kotlin.spec.utils.validators import org.jetbrains.kotlin.checkers.BaseDiagnosticsTest import org.jetbrains.kotlin.diagnostics.Diagnostic import org.jetbrains.kotlin.diagnostics.Severity -import org.jetbrains.kotlin.spec.models.AbstractSpecTest -import org.jetbrains.kotlin.spec.TestCasesByNumbers -import org.jetbrains.kotlin.spec.TestType +import org.jetbrains.kotlin.spec.utils.TestCasesByNumbers +import org.jetbrains.kotlin.spec.utils.TestType +import org.jetbrains.kotlin.spec.utils.models.AbstractSpecTest import java.io.File class DiagnosticTestTypeValidator( diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/validators/ParsingTestTypeValidator.kt b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/validators/ParsingTestTypeValidator.kt similarity index 62% rename from compiler/tests-spec/tests/org/jetbrains/kotlin/spec/validators/ParsingTestTypeValidator.kt rename to compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/validators/ParsingTestTypeValidator.kt index f8edffe7d27..dd2a38c82bc 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/validators/ParsingTestTypeValidator.kt +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/validators/ParsingTestTypeValidator.kt @@ -1,15 +1,15 @@ /* - * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + * Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. */ -package org.jetbrains.kotlin.spec.validators +package org.jetbrains.kotlin.spec.utils.validators import com.intellij.psi.PsiElement import com.intellij.psi.PsiErrorElement import com.intellij.psi.PsiFile -import org.jetbrains.kotlin.spec.TestType -import org.jetbrains.kotlin.spec.models.AbstractSpecTest +import org.jetbrains.kotlin.spec.utils.TestType +import org.jetbrains.kotlin.spec.utils.models.AbstractSpecTest import java.io.File class ParsingTestTypeValidator( diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/validators/BlackBoxTestTypeValidator.kt b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/validators/BlackBoxTestTypeValidator.kt deleted file mode 100644 index bbc8b209514..00000000000 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/validators/BlackBoxTestTypeValidator.kt +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.spec.validators - -import org.jetbrains.kotlin.spec.models.AbstractSpecTest -import java.io.File - -class BlackBoxTestTypeValidator( - testDataFile: File, - private val testInfo: AbstractSpecTest -) : AbstractTestValidator(testInfo, testDataFile) { - override fun computeTestTypes() = mapOf(1 to testInfo.testType) -}