Group spec tests and accompanying functionality into to packages: org.jetbrains.kotlin.spec (tests only) and org.jetbrains.kotlin.spec.utils (accompanying functionality)
This commit is contained in:
@@ -20,16 +20,16 @@ projectTest(parallel = true) {
|
|||||||
workingDir = rootDir
|
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<Test> {
|
val remoteRunTests by task<Test> {
|
||||||
val packagePrefix = "org.jetbrains.kotlin."
|
val packagePrefix = "org.jetbrains.kotlin.spec."
|
||||||
val includeTests = setOf(
|
val includeTests = setOf(
|
||||||
"checkers.DiagnosticsTestSpecGenerated\$NotLinked\$Contracts*",
|
"checkers.DiagnosticsTestSpecGenerated\$NotLinked\$Contracts*",
|
||||||
"checkers.DiagnosticsTestSpecGenerated\$NotLinked\$Annotations*",
|
"checkers.DiagnosticsTestSpecGenerated\$NotLinked\$Annotations*",
|
||||||
|
|||||||
-1496
File diff suppressed because it is too large
Load Diff
+9
-9
@@ -1,27 +1,27 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* 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 com.intellij.openapi.util.io.FileUtil
|
||||||
import org.jetbrains.kotlin.TestExceptionsComparator
|
import org.jetbrains.kotlin.TestExceptionsComparator
|
||||||
import org.jetbrains.kotlin.TestsExceptionType
|
|
||||||
import org.jetbrains.kotlin.config.LanguageVersionSettings
|
import org.jetbrains.kotlin.config.LanguageVersionSettings
|
||||||
import org.jetbrains.kotlin.descriptors.impl.ModuleDescriptorImpl
|
import org.jetbrains.kotlin.descriptors.impl.ModuleDescriptorImpl
|
||||||
import org.jetbrains.kotlin.psi.KtFile
|
import org.jetbrains.kotlin.psi.KtFile
|
||||||
import org.jetbrains.kotlin.resolve.BindingContext
|
import org.jetbrains.kotlin.resolve.BindingContext
|
||||||
import org.jetbrains.kotlin.spec.models.AbstractSpecTest
|
import org.jetbrains.kotlin.spec.utils.SpecTestLinkedType
|
||||||
import org.jetbrains.kotlin.spec.SpecTestLinkedType
|
import org.jetbrains.kotlin.spec.utils.models.AbstractSpecTest
|
||||||
import org.jetbrains.kotlin.spec.parsers.CommonParser
|
import org.jetbrains.kotlin.spec.utils.parsers.CommonParser
|
||||||
import org.jetbrains.kotlin.spec.validators.*
|
import org.jetbrains.kotlin.spec.utils.validators.DiagnosticTestTypeValidator
|
||||||
|
import org.jetbrains.kotlin.spec.utils.validators.SpecTestValidationException
|
||||||
import org.jetbrains.kotlin.test.*
|
import org.jetbrains.kotlin.test.*
|
||||||
import org.junit.Assert
|
import org.junit.Assert
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.util.regex.Matcher
|
import java.util.regex.Matcher
|
||||||
|
|
||||||
abstract class AbstractDiagnosticsTestSpec : AbstractDiagnosticsTest() {
|
abstract class AbstractDiagnosticsTestSpec : org.jetbrains.kotlin.checkers.AbstractDiagnosticsTest() {
|
||||||
companion object {
|
companion object {
|
||||||
private val withoutDescriptorsTestGroups = listOf(
|
private val withoutDescriptorsTestGroups = listOf(
|
||||||
"linked/when-expression"
|
"linked/when-expression"
|
||||||
+391
-468
File diff suppressed because it is too large
Load Diff
+204
-152
@@ -3,7 +3,7 @@
|
|||||||
* that can be found in the license/LICENSE.txt file.
|
* 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 com.intellij.testFramework.TestDataPath;
|
||||||
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
|
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
|
||||||
@@ -76,8 +76,59 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes
|
|||||||
public void testAllFilesPresentInP_1() throws Exception {
|
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);
|
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")
|
@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 Constant_literals extends AbstractBlackBoxCodegenTestSpec {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
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/expressions/constant-literals/boolean-literals")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class Boolean_literals extends AbstractBlackBoxCodegenTestSpec {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
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/expressions/constant-literals/boolean-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/boolean-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Pos extends AbstractBlackBoxCodegenTestSpec {
|
public static class Pos extends AbstractBlackBoxCodegenTestSpec {
|
||||||
@@ -87,142 +138,142 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes
|
|||||||
|
|
||||||
@TestMetadata("2.1.kt")
|
@TestMetadata("2.1.kt")
|
||||||
public void test2_1() throws Exception {
|
public void test2_1() throws Exception {
|
||||||
runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-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")
|
@TestMetadata("2.10.kt")
|
||||||
public void test2_10() throws Exception {
|
public void test2_10() throws Exception {
|
||||||
runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.10.kt");
|
runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.10.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("2.11.kt")
|
@TestMetadata("2.11.kt")
|
||||||
public void test2_11() throws Exception {
|
public void test2_11() throws Exception {
|
||||||
runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.11.kt");
|
runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.11.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("2.12.kt")
|
@TestMetadata("2.12.kt")
|
||||||
public void test2_12() throws Exception {
|
public void test2_12() throws Exception {
|
||||||
runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.12.kt");
|
runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.12.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("2.13.kt")
|
@TestMetadata("2.13.kt")
|
||||||
public void test2_13() throws Exception {
|
public void test2_13() throws Exception {
|
||||||
runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.13.kt");
|
runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.13.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("2.14.kt")
|
@TestMetadata("2.14.kt")
|
||||||
public void test2_14() throws Exception {
|
public void test2_14() throws Exception {
|
||||||
runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.14.kt");
|
runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.14.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("2.15.kt")
|
@TestMetadata("2.15.kt")
|
||||||
public void test2_15() throws Exception {
|
public void test2_15() throws Exception {
|
||||||
runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.15.kt");
|
runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.15.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("2.16.kt")
|
@TestMetadata("2.16.kt")
|
||||||
public void test2_16() throws Exception {
|
public void test2_16() throws Exception {
|
||||||
runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.16.kt");
|
runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.16.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("2.17.kt")
|
@TestMetadata("2.17.kt")
|
||||||
public void test2_17() throws Exception {
|
public void test2_17() throws Exception {
|
||||||
runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.17.kt");
|
runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.17.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("2.18.kt")
|
@TestMetadata("2.18.kt")
|
||||||
public void test2_18() throws Exception {
|
public void test2_18() throws Exception {
|
||||||
runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.18.kt");
|
runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.18.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("2.19.kt")
|
@TestMetadata("2.19.kt")
|
||||||
public void test2_19() throws Exception {
|
public void test2_19() throws Exception {
|
||||||
runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.19.kt");
|
runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.19.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("2.2.kt")
|
@TestMetadata("2.2.kt")
|
||||||
public void test2_2() throws Exception {
|
public void test2_2() throws Exception {
|
||||||
runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.2.kt");
|
runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.2.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("2.20.kt")
|
@TestMetadata("2.20.kt")
|
||||||
public void test2_20() throws Exception {
|
public void test2_20() throws Exception {
|
||||||
runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.20.kt");
|
runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.20.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("2.21.kt")
|
@TestMetadata("2.21.kt")
|
||||||
public void test2_21() throws Exception {
|
public void test2_21() throws Exception {
|
||||||
runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.21.kt");
|
runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.21.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("2.22.kt")
|
@TestMetadata("2.22.kt")
|
||||||
public void test2_22() throws Exception {
|
public void test2_22() throws Exception {
|
||||||
runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.22.kt");
|
runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.22.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("2.23.kt")
|
@TestMetadata("2.23.kt")
|
||||||
public void test2_23() throws Exception {
|
public void test2_23() throws Exception {
|
||||||
runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.23.kt");
|
runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.23.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("2.24.kt")
|
@TestMetadata("2.24.kt")
|
||||||
public void test2_24() throws Exception {
|
public void test2_24() throws Exception {
|
||||||
runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.24.kt");
|
runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.24.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("2.25.kt")
|
@TestMetadata("2.25.kt")
|
||||||
public void test2_25() throws Exception {
|
public void test2_25() throws Exception {
|
||||||
runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.25.kt");
|
runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.25.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("2.26.kt")
|
@TestMetadata("2.26.kt")
|
||||||
public void test2_26() throws Exception {
|
public void test2_26() throws Exception {
|
||||||
runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.26.kt");
|
runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.26.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("2.3.kt")
|
@TestMetadata("2.3.kt")
|
||||||
public void test2_3() throws Exception {
|
public void test2_3() throws Exception {
|
||||||
runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.3.kt");
|
runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.3.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("2.4.kt")
|
@TestMetadata("2.4.kt")
|
||||||
public void test2_4() throws Exception {
|
public void test2_4() throws Exception {
|
||||||
runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.4.kt");
|
runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.4.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("2.5.kt")
|
@TestMetadata("2.5.kt")
|
||||||
public void test2_5() throws Exception {
|
public void test2_5() throws Exception {
|
||||||
runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.5.kt");
|
runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.5.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("2.6.kt")
|
@TestMetadata("2.6.kt")
|
||||||
public void test2_6() throws Exception {
|
public void test2_6() throws Exception {
|
||||||
runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.6.kt");
|
runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.6.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("2.7.kt")
|
@TestMetadata("2.7.kt")
|
||||||
public void test2_7() throws Exception {
|
public void test2_7() throws Exception {
|
||||||
runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.7.kt");
|
runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.7.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("2.8.kt")
|
@TestMetadata("2.8.kt")
|
||||||
public void test2_8() throws Exception {
|
public void test2_8() throws Exception {
|
||||||
runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.8.kt");
|
runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.8.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("2.9.kt")
|
@TestMetadata("2.9.kt")
|
||||||
public void test2_9() throws Exception {
|
public void test2_9() throws Exception {
|
||||||
runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/boolean-literals/p-1/pos/2.9.kt");
|
runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos/2.9.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInPos() throws Exception {
|
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);
|
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")
|
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Integer_literals extends AbstractBlackBoxCodegenTestSpec {
|
public static class Integer_literals extends AbstractBlackBoxCodegenTestSpec {
|
||||||
@@ -231,10 +282,10 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInInteger_literals() throws Exception {
|
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);
|
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/binary-integer-literals")
|
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/binary-integer-literals")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Binary_integer_literals extends AbstractBlackBoxCodegenTestSpec {
|
public static class Binary_integer_literals extends AbstractBlackBoxCodegenTestSpec {
|
||||||
@@ -243,10 +294,10 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInBinary_integer_literals() throws Exception {
|
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);
|
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/constant-literals/integer-literals/binary-integer-literals/p-1")
|
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class P_1 extends AbstractBlackBoxCodegenTestSpec {
|
public static class P_1 extends AbstractBlackBoxCodegenTestSpec {
|
||||||
@@ -255,10 +306,10 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInP_1() throws Exception {
|
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/integer-literals/binary-integer-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/integer-literals/binary-integer-literals/p-1/pos")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Pos extends AbstractBlackBoxCodegenTestSpec {
|
public static class Pos extends AbstractBlackBoxCodegenTestSpec {
|
||||||
@@ -268,22 +319,22 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes
|
|||||||
|
|
||||||
@TestMetadata("1.1.kt")
|
@TestMetadata("1.1.kt")
|
||||||
public void test1_1() throws Exception {
|
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");
|
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")
|
@TestMetadata("2.1.kt")
|
||||||
public void test2_1() throws Exception {
|
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/integer-literals/binary-integer-literals/p-1/pos/2.1.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInPos() throws Exception {
|
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/integer-literals/binary-integer-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/decimal-integer-literals")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Decimal_integer_literals extends AbstractBlackBoxCodegenTestSpec {
|
public static class Decimal_integer_literals extends AbstractBlackBoxCodegenTestSpec {
|
||||||
@@ -292,10 +343,10 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInDecimal_integer_literals() throws Exception {
|
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);
|
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/constant-literals/integer-literals/decimal-integer-literals/p-1")
|
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class P_1 extends AbstractBlackBoxCodegenTestSpec {
|
public static class P_1 extends AbstractBlackBoxCodegenTestSpec {
|
||||||
@@ -304,10 +355,10 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInP_1() throws Exception {
|
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/integer-literals/decimal-integer-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/integer-literals/decimal-integer-literals/p-1/pos")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Pos extends AbstractBlackBoxCodegenTestSpec {
|
public static class Pos extends AbstractBlackBoxCodegenTestSpec {
|
||||||
@@ -317,22 +368,22 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes
|
|||||||
|
|
||||||
@TestMetadata("1.1.kt")
|
@TestMetadata("1.1.kt")
|
||||||
public void test1_1() throws Exception {
|
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/integer-literals/decimal-integer-literals/p-1/pos/1.1.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("2.1.kt")
|
@TestMetadata("2.1.kt")
|
||||||
public void test2_1() throws Exception {
|
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");
|
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 {
|
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/integer-literals/decimal-integer-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")
|
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Hexadecimal_integer_literals extends AbstractBlackBoxCodegenTestSpec {
|
public static class Hexadecimal_integer_literals extends AbstractBlackBoxCodegenTestSpec {
|
||||||
@@ -341,10 +392,10 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInHexadecimal_integer_literals() throws Exception {
|
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);
|
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/constant-literals/integer-literals/hexadecimal-integer-literals/p-1")
|
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class P_1 extends AbstractBlackBoxCodegenTestSpec {
|
public static class P_1 extends AbstractBlackBoxCodegenTestSpec {
|
||||||
@@ -353,10 +404,10 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInP_1() throws Exception {
|
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);
|
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/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/pos")
|
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/pos")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Pos extends AbstractBlackBoxCodegenTestSpec {
|
public static class Pos extends AbstractBlackBoxCodegenTestSpec {
|
||||||
@@ -366,77 +417,23 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes
|
|||||||
|
|
||||||
@TestMetadata("1.1.kt")
|
@TestMetadata("1.1.kt")
|
||||||
public void test1_1() throws Exception {
|
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");
|
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")
|
@TestMetadata("2.1.kt")
|
||||||
public void test2_1() throws Exception {
|
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");
|
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 {
|
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);
|
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/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");
|
|
||||||
}
|
|
||||||
|
|
||||||
@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");
|
|
||||||
}
|
|
||||||
|
|
||||||
@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");
|
|
||||||
}
|
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals")
|
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Real_literals extends AbstractBlackBoxCodegenTestSpec {
|
public static class Real_literals extends AbstractBlackBoxCodegenTestSpec {
|
||||||
@@ -445,10 +442,10 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInReal_literals() throws Exception {
|
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);
|
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/constant-literals/real-literals/p-1")
|
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-1")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class P_1 extends AbstractBlackBoxCodegenTestSpec {
|
public static class P_1 extends AbstractBlackBoxCodegenTestSpec {
|
||||||
@@ -457,10 +454,10 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInP_1() throws Exception {
|
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);
|
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/real-literals/p-1/pos")
|
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-1/pos")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Pos extends AbstractBlackBoxCodegenTestSpec {
|
public static class Pos extends AbstractBlackBoxCodegenTestSpec {
|
||||||
@@ -470,21 +467,21 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes
|
|||||||
|
|
||||||
@TestMetadata("1.1.kt")
|
@TestMetadata("1.1.kt")
|
||||||
public void test1_1() throws Exception {
|
public void test1_1() throws Exception {
|
||||||
runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-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("3.1.kt")
|
@TestMetadata("3.1.kt")
|
||||||
public void test3_1() throws Exception {
|
public void test3_1() throws Exception {
|
||||||
runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-1/pos/3.1.kt");
|
runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-1/pos/3.1.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInPos() throws Exception {
|
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);
|
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/real-literals/p-2")
|
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-2")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class P_2 extends AbstractBlackBoxCodegenTestSpec {
|
public static class P_2 extends AbstractBlackBoxCodegenTestSpec {
|
||||||
@@ -493,10 +490,10 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInP_2() throws Exception {
|
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);
|
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/real-literals/p-2/pos")
|
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-2/pos")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Pos extends AbstractBlackBoxCodegenTestSpec {
|
public static class Pos extends AbstractBlackBoxCodegenTestSpec {
|
||||||
@@ -506,21 +503,21 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes
|
|||||||
|
|
||||||
@TestMetadata("1.1.kt")
|
@TestMetadata("1.1.kt")
|
||||||
public void test1_1() throws Exception {
|
public void test1_1() throws Exception {
|
||||||
runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-2/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")
|
@TestMetadata("1.2.kt")
|
||||||
public void test1_2() throws Exception {
|
public void test1_2() throws Exception {
|
||||||
runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-2/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 {
|
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);
|
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/constant-literals/real-literals/p-3")
|
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-3")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class P_3 extends AbstractBlackBoxCodegenTestSpec {
|
public static class P_3 extends AbstractBlackBoxCodegenTestSpec {
|
||||||
@@ -529,10 +526,10 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInP_3() throws Exception {
|
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);
|
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/constant-literals/real-literals/p-3/pos")
|
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-3/pos")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Pos extends AbstractBlackBoxCodegenTestSpec {
|
public static class Pos extends AbstractBlackBoxCodegenTestSpec {
|
||||||
@@ -542,46 +539,46 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes
|
|||||||
|
|
||||||
@TestMetadata("1.1.kt")
|
@TestMetadata("1.1.kt")
|
||||||
public void test1_1() throws Exception {
|
public void test1_1() throws Exception {
|
||||||
runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-3/pos/1.1.kt");
|
runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-3/pos/1.1.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("1.2.kt")
|
@TestMetadata("1.2.kt")
|
||||||
public void test1_2() throws Exception {
|
public void test1_2() throws Exception {
|
||||||
runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-3/pos/1.2.kt");
|
runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-3/pos/1.2.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("1.3.kt")
|
@TestMetadata("1.3.kt")
|
||||||
public void test1_3() throws Exception {
|
public void test1_3() throws Exception {
|
||||||
runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-3/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")
|
@TestMetadata("1.4.kt")
|
||||||
public void test1_4() throws Exception {
|
public void test1_4() throws Exception {
|
||||||
runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-3/pos/1.4.kt");
|
runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-3/pos/1.4.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("2.1.kt")
|
@TestMetadata("2.1.kt")
|
||||||
public void test2_1() throws Exception {
|
public void test2_1() throws Exception {
|
||||||
runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-3/pos/2.1.kt");
|
runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-3/pos/2.1.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("2.2.kt")
|
@TestMetadata("2.2.kt")
|
||||||
public void test2_2() throws Exception {
|
public void test2_2() throws Exception {
|
||||||
runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-3/pos/2.2.kt");
|
runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-3/pos/2.2.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("2.3.kt")
|
@TestMetadata("2.3.kt")
|
||||||
public void test2_3() throws Exception {
|
public void test2_3() throws Exception {
|
||||||
runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-3/pos/2.3.kt");
|
runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-3/pos/2.3.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInPos() throws Exception {
|
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);
|
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/constant-literals/real-literals/p-4")
|
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-4")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class P_4 extends AbstractBlackBoxCodegenTestSpec {
|
public static class P_4 extends AbstractBlackBoxCodegenTestSpec {
|
||||||
@@ -590,10 +587,10 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInP_4() throws Exception {
|
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);
|
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/constant-literals/real-literals/p-4/pos")
|
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-4/pos")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Pos extends AbstractBlackBoxCodegenTestSpec {
|
public static class Pos extends AbstractBlackBoxCodegenTestSpec {
|
||||||
@@ -603,31 +600,86 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes
|
|||||||
|
|
||||||
@TestMetadata("1.1.kt")
|
@TestMetadata("1.1.kt")
|
||||||
public void test1_1() throws Exception {
|
public void test1_1() throws Exception {
|
||||||
runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-4/pos/1.1.kt");
|
runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-4/pos/1.1.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("1.2.kt")
|
@TestMetadata("1.2.kt")
|
||||||
public void test1_2() throws Exception {
|
public void test1_2() throws Exception {
|
||||||
runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-4/pos/1.2.kt");
|
runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-4/pos/1.2.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("1.3.kt")
|
@TestMetadata("1.3.kt")
|
||||||
public void test1_3() throws Exception {
|
public void test1_3() throws Exception {
|
||||||
runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-4/pos/1.3.kt");
|
runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-4/pos/1.3.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("1.4.kt")
|
@TestMetadata("1.4.kt")
|
||||||
public void test1_4() throws Exception {
|
public void test1_4() throws Exception {
|
||||||
runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-4/pos/1.4.kt");
|
runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-4/pos/1.4.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("1.5.kt")
|
@TestMetadata("1.5.kt")
|
||||||
public void test1_5() throws Exception {
|
public void test1_5() throws Exception {
|
||||||
runTest("compiler/tests-spec/testData/codegen/box/linked/constant-literals/real-literals/p-4/pos/1.5.kt");
|
runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-4/pos/1.5.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInPos() throws Exception {
|
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);
|
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/expressions/constant-literals/the-types-for-integer-literals")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
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 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/expressions/constant-literals/the-types-for-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/the-types-for-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@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);
|
||||||
|
}
|
||||||
|
|
||||||
|
@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("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");
|
||||||
|
}
|
||||||
|
|
||||||
|
@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");
|
||||||
|
}
|
||||||
|
|
||||||
|
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);
|
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")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Introduction extends AbstractBlackBoxCodegenTestSpec {
|
public static class Introduction_1 extends AbstractBlackBoxCodegenTestSpec {
|
||||||
private void runTest(String testDataFilePath) throws Exception {
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
|
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInIntroduction() throws Exception {
|
public void testAllFilesPresentInIntroduction_1() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/type-system/introduction"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
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")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class P_5 extends AbstractBlackBoxCodegenTestSpec {
|
public static class P_5 extends AbstractBlackBoxCodegenTestSpec {
|
||||||
@@ -667,10 +719,10 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInP_5() throws Exception {
|
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")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Pos extends AbstractBlackBoxCodegenTestSpec {
|
public static class Pos extends AbstractBlackBoxCodegenTestSpec {
|
||||||
@@ -680,11 +732,11 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes
|
|||||||
|
|
||||||
@TestMetadata("2.1.kt")
|
@TestMetadata("2.1.kt")
|
||||||
public void test2_1() throws Exception {
|
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 {
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+7
-5
@@ -1,14 +1,16 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* 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 com.intellij.openapi.util.io.FileUtil
|
||||||
import org.jetbrains.kotlin.TestExceptionsComparator
|
import org.jetbrains.kotlin.TestExceptionsComparator
|
||||||
import org.jetbrains.kotlin.spec.parsers.CommonParser
|
import org.jetbrains.kotlin.parsing.AbstractParsingTest
|
||||||
import org.jetbrains.kotlin.spec.validators.*
|
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 org.junit.Assert
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
+1187
File diff suppressed because it is too large
Load Diff
@@ -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())
|
|
||||||
}
|
|
||||||
@@ -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<String>? = null, var testNumber: Int = 0)
|
|
||||||
|
|
||||||
private typealias TestsBySections = MutableMap<String, TestsByParagraph>
|
|
||||||
private typealias TestsByParagraph = MutableMap<Int, TestsByType>
|
|
||||||
private typealias TestsByType = MutableMap<String, TestsBySentence>
|
|
||||||
private typealias TestsBySentence = MutableMap<Int, TestReferences>
|
|
||||||
|
|
||||||
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<String>()
|
|
||||||
|
|
||||||
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<AbstractDiagnosticsTestSpec> {
|
|
||||||
model("diagnostics", excludeDirs = listOf("helpers"))
|
|
||||||
}
|
|
||||||
testClass<AbstractParsingTestSpec> {
|
|
||||||
model("psi", testMethod = "doParsingTest", excludeDirs = listOf("helpers", "templates"))
|
|
||||||
}
|
|
||||||
testClass<AbstractBlackBoxCodegenTestSpec> {
|
|
||||||
model("codegen/box", excludeDirs = listOf("helpers", "templates"))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun main() {
|
|
||||||
TestsMapGenerator.buildTestsMapPerSection()
|
|
||||||
generateTests()
|
|
||||||
}
|
|
||||||
+9
-9
@@ -1,17 +1,17 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* 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.TestsExceptionType
|
||||||
import org.jetbrains.kotlin.spec.models.LinkedSpecTestFileInfoElementType
|
import org.jetbrains.kotlin.spec.utils.models.LinkedSpecTestFileInfoElementType
|
||||||
import org.jetbrains.kotlin.spec.models.NotLinkedSpecTestFileInfoElementType
|
import org.jetbrains.kotlin.spec.utils.models.NotLinkedSpecTestFileInfoElementType
|
||||||
import org.jetbrains.kotlin.spec.parsers.BasePatterns
|
import org.jetbrains.kotlin.spec.utils.parsers.BasePatterns
|
||||||
import org.jetbrains.kotlin.spec.parsers.LinkedSpecTestPatterns
|
import org.jetbrains.kotlin.spec.utils.parsers.LinkedSpecTestPatterns
|
||||||
import org.jetbrains.kotlin.spec.parsers.NotLinkedSpecTestPatterns
|
import org.jetbrains.kotlin.spec.utils.parsers.NotLinkedSpecTestPatterns
|
||||||
import org.jetbrains.kotlin.spec.parsers.CommonParser.withSpaces
|
import org.jetbrains.kotlin.spec.utils.parsers.CommonParser.withSpaces
|
||||||
import java.util.*
|
import java.util.*
|
||||||
import java.util.regex.Matcher
|
import java.util.regex.Matcher
|
||||||
import java.util.regex.Pattern
|
import java.util.regex.Pattern
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jetbrains.kotlin.spec.utils
|
package org.jetbrains.kotlin.spec.utils
|
||||||
|
|||||||
+6
-7
@@ -1,15 +1,13 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jetbrains.kotlin.spec.utils
|
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.GeneralConfiguration.TESTDATA_PATH
|
||||||
|
import org.jetbrains.kotlin.spec.utils.models.AbstractSpecTest
|
||||||
|
import org.jetbrains.kotlin.spec.utils.parsers.CommonParser
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
open class SpecTestsStatElement(val type: SpecTestsStatElementType) {
|
open class SpecTestsStatElement(val type: SpecTestsStatElementType) {
|
||||||
@@ -47,7 +45,8 @@ object TestsStatisticCollector {
|
|||||||
for (specTestArea in TestArea.values()) {
|
for (specTestArea in TestArea.values()) {
|
||||||
val specTestsPath = "$TESTDATA_PATH/${specTestArea.name.toLowerCase().replace("_", "/")}/${testLinkedType.testDataPath}"
|
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@{
|
File(specTestsPath).walkTopDown().forEach areaTests@{
|
||||||
if (!it.isFile || it.extension != "kt") return@areaTests
|
if (!it.isFile || it.extension != "kt") return@areaTests
|
||||||
|
|||||||
+3
-3
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* 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) {
|
enum class Feature(val config: FeatureTemplatesConfig) {
|
||||||
IDENTIFIERS(
|
IDENTIFIERS(
|
||||||
+3
-3
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* 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 org.jetbrains.kotlin.spec.utils.GeneralConfiguration.TESTDATA_PATH
|
||||||
import java.io.File
|
import java.io.File
|
||||||
+7
-5
@@ -1,12 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* 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.GeneralConfiguration.TESTDATA_PATH
|
||||||
|
import org.jetbrains.kotlin.spec.utils.TestArea
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
enum class FeatureTemplatesType {
|
enum class FeatureTemplatesType {
|
||||||
@@ -43,7 +43,9 @@ class FeatureTemplatesConfig(
|
|||||||
|
|
||||||
private fun getTemplatesIterator() = lazy { getTemplates(testArea).value.iterator() }
|
private fun getTemplatesIterator() = lazy { getTemplates(testArea).value.iterator() }
|
||||||
|
|
||||||
fun resetTemplatesIterator() { currentTemplatesIterator = getTemplatesIterator() }
|
fun resetTemplatesIterator() {
|
||||||
|
currentTemplatesIterator = getTemplatesIterator()
|
||||||
|
}
|
||||||
|
|
||||||
fun getNextWithRepeat() = let {
|
fun getNextWithRepeat() = let {
|
||||||
takeUnless { it.currentTemplatesIterator.value.hasNext() }?.resetTemplatesIterator()
|
takeUnless { it.currentTemplatesIterator.value.hasNext() }?.resetTemplatesIterator()
|
||||||
+12
-12
@@ -1,13 +1,13 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* 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.utils.SpecTestLinkedType
|
||||||
import org.jetbrains.kotlin.spec.TestArea
|
import org.jetbrains.kotlin.spec.utils.TestArea
|
||||||
import org.jetbrains.kotlin.spec.TestType
|
import org.jetbrains.kotlin.spec.utils.TestType
|
||||||
|
|
||||||
enum class SubstitutionTag(val passType: SubstitutionPassType = SubstitutionPassType.FIRST) {
|
enum class SubstitutionTag(val passType: SubstitutionPassType = SubstitutionPassType.FIRST) {
|
||||||
DIRECTIVES,
|
DIRECTIVES,
|
||||||
@@ -40,7 +40,7 @@ abstract class GenerationSpecTestDataConfig {
|
|||||||
lateinit var testArea: TestArea
|
lateinit var testArea: TestArea
|
||||||
|
|
||||||
protected val baseSubstitutions = mapOf<SubstitutionTag, (SubstitutionRule) -> String>(
|
protected val baseSubstitutions = mapOf<SubstitutionTag, (SubstitutionRule) -> String>(
|
||||||
SubstitutionTag.TEST_TYPE to { _ -> testType.toString() },
|
SubstitutionTag.TEST_TYPE to { testType.toString() },
|
||||||
SubstitutionTag.TEST_NUMBER to { rule -> rule.testNumber.toString() },
|
SubstitutionTag.TEST_NUMBER to { rule -> rule.testNumber.toString() },
|
||||||
SubstitutionTag.TEST_DESCRIPTION to { rule -> testDescription.format(rule.filename) },
|
SubstitutionTag.TEST_DESCRIPTION to { rule -> testDescription.format(rule.filename) },
|
||||||
SubstitutionTag.ELEMENT to { rule ->
|
SubstitutionTag.ELEMENT to { rule ->
|
||||||
@@ -104,10 +104,10 @@ class GenerationLinkedSpecTestDataConfig : GenerationSpecTestDataConfig() {
|
|||||||
|
|
||||||
override val layoutFilename = "linkedTestsLayout.kt"
|
override val layoutFilename = "linkedTestsLayout.kt"
|
||||||
override val substitutions = mutableMapOf<SubstitutionTag, (SubstitutionRule) -> String>(
|
override val substitutions = mutableMapOf<SubstitutionTag, (SubstitutionRule) -> String>(
|
||||||
SubstitutionTag.SECTIONS to { _ -> sections.joinToString(", ") },
|
SubstitutionTag.SECTIONS to { sections.joinToString(", ") },
|
||||||
SubstitutionTag.PARAGRAPH_NUMBER to { _ -> paragraphNumber.toString() },
|
SubstitutionTag.PARAGRAPH_NUMBER to { paragraphNumber.toString() },
|
||||||
SubstitutionTag.SENTENCE_NUMBER to { _ -> sentenceNumber.toString() },
|
SubstitutionTag.SENTENCE_NUMBER to { sentenceNumber.toString() },
|
||||||
SubstitutionTag.SENTENCE to { _ -> sentence },
|
SubstitutionTag.SENTENCE to { sentence },
|
||||||
SubstitutionTag.CLASS_OF_FILE to { rule -> "_${sentenceNumber}_${rule.testNumber}Kt" }
|
SubstitutionTag.CLASS_OF_FILE to { rule -> "_${sentenceNumber}_${rule.testNumber}Kt" }
|
||||||
).apply { putAll(baseSubstitutions) }
|
).apply { putAll(baseSubstitutions) }
|
||||||
|
|
||||||
@@ -120,7 +120,7 @@ class GenerationNotLinkedSpecTestDataConfig : GenerationSpecTestDataConfig() {
|
|||||||
|
|
||||||
override val layoutFilename = "notLinkedTestsLayout.kt"
|
override val layoutFilename = "notLinkedTestsLayout.kt"
|
||||||
override val substitutions = mutableMapOf<SubstitutionTag, (SubstitutionRule) -> String>(
|
override val substitutions = mutableMapOf<SubstitutionTag, (SubstitutionRule) -> String>(
|
||||||
SubstitutionTag.CATEGORIES to { _ -> categories.joinToString(", ") },
|
SubstitutionTag.CATEGORIES to { categories.joinToString(", ") },
|
||||||
SubstitutionTag.CLASS_OF_FILE to { rule -> "_${rule.testNumber}Kt" }
|
SubstitutionTag.CLASS_OF_FILE to { rule -> "_${rule.testNumber}Kt" }
|
||||||
).apply { putAll(baseSubstitutions) }
|
).apply { putAll(baseSubstitutions) }
|
||||||
|
|
||||||
+4
-4
@@ -1,11 +1,11 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* 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) {
|
fun generationSpecTestDataConfigGroup(regenerateTests: Boolean = false, body: () -> Unit) {
|
||||||
body()
|
body()
|
||||||
+3
-3
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* 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 {
|
enum class TemplateValidationTransformerType {
|
||||||
TRIM_BACKTICKS
|
TRIM_BACKTICKS
|
||||||
+8
-8
@@ -1,16 +1,16 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* 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.TestsExceptionType
|
||||||
import org.jetbrains.kotlin.spec.*
|
import org.jetbrains.kotlin.spec.utils.*
|
||||||
import org.jetbrains.kotlin.spec.parsers.CommonPatterns
|
import org.jetbrains.kotlin.spec.utils.parsers.CommonPatterns
|
||||||
import org.jetbrains.kotlin.spec.parsers.CommonPatterns.issuesPattern
|
import org.jetbrains.kotlin.spec.utils.parsers.CommonPatterns.issuesPattern
|
||||||
import org.jetbrains.kotlin.spec.parsers.LinkedSpecTestPatterns.relevantPlacesPattern
|
import org.jetbrains.kotlin.spec.utils.parsers.LinkedSpecTestPatterns.relevantPlacesPattern
|
||||||
import org.jetbrains.kotlin.spec.parsers.TestCasePatterns.testCaseNumberPattern
|
import org.jetbrains.kotlin.spec.utils.parsers.TestCasePatterns.testCaseNumberPattern
|
||||||
import java.util.regex.Matcher
|
import java.util.regex.Matcher
|
||||||
import java.util.regex.Pattern
|
import java.util.regex.Pattern
|
||||||
|
|
||||||
+14
-14
@@ -1,21 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* 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.TestsExceptionType
|
||||||
import org.jetbrains.kotlin.spec.SpecTestCasesSet
|
import org.jetbrains.kotlin.spec.utils.SpecTestCasesSet
|
||||||
import org.jetbrains.kotlin.spec.SpecTestInfoElementType
|
import org.jetbrains.kotlin.spec.utils.SpecTestInfoElementType
|
||||||
import org.jetbrains.kotlin.spec.TestArea
|
import org.jetbrains.kotlin.spec.utils.TestArea
|
||||||
import org.jetbrains.kotlin.spec.TestType
|
import org.jetbrains.kotlin.spec.utils.TestType
|
||||||
import org.jetbrains.kotlin.spec.parsers.CommonPatterns.ls
|
import org.jetbrains.kotlin.spec.utils.parsers.LinkedSpecTestPatterns.placePattern
|
||||||
import org.jetbrains.kotlin.spec.parsers.CommonParser.withUnderscores
|
import org.jetbrains.kotlin.spec.utils.parsers.LinkedSpecTestPatterns.relevantPlacesPattern
|
||||||
import org.jetbrains.kotlin.spec.parsers.CommonParser.splitByPathSeparator
|
import org.jetbrains.kotlin.spec.utils.parsers.CommonParser.withSpaces
|
||||||
import org.jetbrains.kotlin.spec.parsers.CommonParser.withSpaces
|
import org.jetbrains.kotlin.spec.utils.parsers.CommonParser.withUnderscores
|
||||||
import org.jetbrains.kotlin.spec.parsers.LinkedSpecTestPatterns.placePattern
|
import org.jetbrains.kotlin.spec.utils.parsers.CommonParser.splitByPathSeparator
|
||||||
import org.jetbrains.kotlin.spec.parsers.LinkedSpecTestPatterns.relevantPlacesPattern
|
import org.jetbrains.kotlin.spec.utils.parsers.CommonPatterns.ls
|
||||||
import java.util.regex.Matcher
|
import java.util.regex.Matcher
|
||||||
import java.util.regex.Pattern
|
import java.util.regex.Pattern
|
||||||
|
|
||||||
@@ -36,7 +36,7 @@ data class SpecPlace(
|
|||||||
)
|
)
|
||||||
|
|
||||||
class LinkedSpecTest(
|
class LinkedSpecTest(
|
||||||
private val specVersion: String,
|
val specVersion: String,
|
||||||
testArea: TestArea,
|
testArea: TestArea,
|
||||||
testType: TestType,
|
testType: TestType,
|
||||||
val place: SpecPlace,
|
val place: SpecPlace,
|
||||||
+12
-12
@@ -1,20 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* 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.TestsExceptionType
|
||||||
import org.jetbrains.kotlin.spec.SpecTestCasesSet
|
import org.jetbrains.kotlin.spec.utils.SpecTestCasesSet
|
||||||
import org.jetbrains.kotlin.spec.SpecTestInfoElementType
|
import org.jetbrains.kotlin.spec.utils.SpecTestInfoElementType
|
||||||
import org.jetbrains.kotlin.spec.TestArea
|
import org.jetbrains.kotlin.spec.utils.TestArea
|
||||||
import org.jetbrains.kotlin.spec.TestType
|
import org.jetbrains.kotlin.spec.utils.TestType
|
||||||
import org.jetbrains.kotlin.spec.parsers.CommonParser.splitByPathSeparator
|
import org.jetbrains.kotlin.spec.utils.parsers.CommonPatterns.sectionsInFilePattern
|
||||||
import org.jetbrains.kotlin.spec.parsers.CommonParser.withUnderscores
|
import org.jetbrains.kotlin.spec.utils.parsers.CommonParser.withSpaces
|
||||||
import org.jetbrains.kotlin.spec.parsers.CommonParser.withSpaces
|
import org.jetbrains.kotlin.spec.utils.parsers.CommonParser.withUnderscores
|
||||||
import org.jetbrains.kotlin.spec.parsers.CommonPatterns.ls
|
import org.jetbrains.kotlin.spec.utils.parsers.CommonParser.splitByPathSeparator
|
||||||
import org.jetbrains.kotlin.spec.parsers.CommonPatterns.sectionsInFilePattern
|
import org.jetbrains.kotlin.spec.utils.parsers.CommonPatterns.ls
|
||||||
import java.util.regex.Matcher
|
import java.util.regex.Matcher
|
||||||
import java.util.regex.Pattern
|
import java.util.regex.Pattern
|
||||||
|
|
||||||
+15
-13
@@ -1,19 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* 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.utils.SpecTestInfoElementContent
|
||||||
import org.jetbrains.kotlin.spec.SpecTestInfoElementContent
|
import org.jetbrains.kotlin.spec.utils.SpecTestInfoElementType
|
||||||
import org.jetbrains.kotlin.spec.SpecTestLinkedType
|
import org.jetbrains.kotlin.spec.utils.SpecTestLinkedType
|
||||||
import org.jetbrains.kotlin.spec.models.*
|
import org.jetbrains.kotlin.spec.utils.TestFiles
|
||||||
import org.jetbrains.kotlin.spec.parsers.CommonPatterns.testInfoElementPattern
|
import org.jetbrains.kotlin.spec.utils.models.*
|
||||||
import org.jetbrains.kotlin.spec.parsers.CommonPatterns.testPathBaseRegexTemplate
|
import org.jetbrains.kotlin.spec.utils.parsers.CommonPatterns.testInfoElementPattern
|
||||||
import org.jetbrains.kotlin.spec.parsers.LinkedSpecTestPatterns.testInfoPattern
|
import org.jetbrains.kotlin.spec.utils.parsers.CommonPatterns.testPathBaseRegexTemplate
|
||||||
import org.jetbrains.kotlin.spec.parsers.TestCasePatterns.testCaseInfoPattern
|
import org.jetbrains.kotlin.spec.utils.parsers.LinkedSpecTestPatterns.testInfoPattern
|
||||||
import org.jetbrains.kotlin.spec.validators.*
|
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.io.File
|
||||||
import java.util.regex.Matcher
|
import java.util.regex.Matcher
|
||||||
import java.util.regex.Pattern
|
import java.util.regex.Pattern
|
||||||
@@ -52,7 +54,7 @@ object CommonParser {
|
|||||||
placeMatcher.group("sentenceNumber").toInt()
|
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 parsedTestFile = parseTestInfo(testFilePath, testFiles, SpecTestLinkedType.LINKED)
|
||||||
val testInfoElements = parsedTestFile.testInfoElements
|
val testInfoElements = parsedTestFile.testInfoElements
|
||||||
val placeMatcher = testInfoElements[LinkedSpecTestFileInfoElementType.PLACE]!!.additionalMatcher!!
|
val placeMatcher = testInfoElements[LinkedSpecTestFileInfoElementType.PLACE]!!.additionalMatcher!!
|
||||||
+21
-21
@@ -1,26 +1,26 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* 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.utils.SpecTestLinkedType
|
||||||
import org.jetbrains.kotlin.spec.SpecTestLinkedType
|
import org.jetbrains.kotlin.spec.utils.TestArea
|
||||||
import org.jetbrains.kotlin.spec.TestArea
|
import org.jetbrains.kotlin.spec.utils.TestType
|
||||||
import org.jetbrains.kotlin.spec.TestType
|
import org.jetbrains.kotlin.spec.utils.models.SpecTestCaseInfoElementType
|
||||||
import org.jetbrains.kotlin.spec.parsers.CommonPatterns.INTEGER_REGEX
|
import org.jetbrains.kotlin.spec.utils.parsers.CommonPatterns.ASTERISK_REGEX
|
||||||
import org.jetbrains.kotlin.spec.parsers.CommonPatterns.SINGLE_LINE_COMMENT_REGEX
|
import org.jetbrains.kotlin.spec.utils.parsers.CommonPatterns.INTEGER_REGEX
|
||||||
import org.jetbrains.kotlin.spec.parsers.CommonPatterns.ASTERISK_REGEX
|
import org.jetbrains.kotlin.spec.utils.parsers.CommonPatterns.MULTILINE_COMMENT_REGEX
|
||||||
import org.jetbrains.kotlin.spec.parsers.CommonPatterns.directiveRegex
|
import org.jetbrains.kotlin.spec.utils.parsers.CommonPatterns.SECTIONS_IN_FILE_REGEX
|
||||||
import org.jetbrains.kotlin.spec.parsers.CommonPatterns.MULTILINE_COMMENT_REGEX
|
import org.jetbrains.kotlin.spec.utils.parsers.CommonPatterns.SINGLE_LINE_COMMENT_REGEX
|
||||||
import org.jetbrains.kotlin.spec.parsers.CommonPatterns.ps
|
import org.jetbrains.kotlin.spec.utils.parsers.CommonPatterns.directiveRegex
|
||||||
import org.jetbrains.kotlin.spec.parsers.CommonPatterns.testAreaRegex
|
import org.jetbrains.kotlin.spec.utils.parsers.CommonPatterns.ps
|
||||||
import org.jetbrains.kotlin.spec.parsers.CommonPatterns.testPathRegexTemplate
|
import org.jetbrains.kotlin.spec.utils.parsers.CommonPatterns.sectionsInPathRegex
|
||||||
import org.jetbrains.kotlin.spec.parsers.CommonPatterns.testTypeRegex
|
import org.jetbrains.kotlin.spec.utils.parsers.CommonPatterns.testAreaRegex
|
||||||
import org.jetbrains.kotlin.spec.parsers.CommonParser.withSpaces
|
import org.jetbrains.kotlin.spec.utils.parsers.CommonParser.withSpaces
|
||||||
import org.jetbrains.kotlin.spec.parsers.CommonPatterns.SECTIONS_IN_FILE_REGEX
|
import org.jetbrains.kotlin.spec.utils.parsers.CommonPatterns.testPathRegexTemplate
|
||||||
import org.jetbrains.kotlin.spec.parsers.CommonPatterns.sectionsInPathRegex
|
import org.jetbrains.kotlin.spec.utils.parsers.CommonPatterns.testTypeRegex
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.util.regex.Pattern
|
import java.util.regex.Pattern
|
||||||
|
|
||||||
@@ -29,7 +29,7 @@ object CommonPatterns {
|
|||||||
const val INTEGER_REGEX = """[1-9]\d*"""
|
const val INTEGER_REGEX = """[1-9]\d*"""
|
||||||
const val SINGLE_LINE_COMMENT_REGEX = """\/\/\s*%s"""
|
const val SINGLE_LINE_COMMENT_REGEX = """\/\/\s*%s"""
|
||||||
const val ASTERISK_REGEX = """\*"""
|
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)*"""
|
const val MULTILINE_COMMENT_REGEX = """\/\*\s+?%s\s+\*\/(?:\n)*"""
|
||||||
|
|
||||||
val ls: String = System.lineSeparator()
|
val ls: String = System.lineSeparator()
|
||||||
@@ -44,7 +44,7 @@ object CommonPatterns {
|
|||||||
val testPathRegexTemplate = """$testPathBaseRegexTemplate$ps(?<testType>pos|neg)$ps%s$"""
|
val testPathRegexTemplate = """$testPathBaseRegexTemplate$ps(?<testType>pos|neg)$ps%s$"""
|
||||||
val issuesPattern: Pattern = Pattern.compile("""(KT-[1-9]\d*)(,\s*KT-[1-9]\d*)*""")
|
val issuesPattern: Pattern = Pattern.compile("""(KT-[1-9]\d*)(,\s*KT-[1-9]\d*)*""")
|
||||||
val sectionsInFilePattern: Pattern = Pattern.compile("""(?<sections>$SECTIONS_IN_FILE_REGEX)""")
|
val sectionsInFilePattern: Pattern = Pattern.compile("""(?<sections>$SECTIONS_IN_FILE_REGEX)""")
|
||||||
val sectionsInPathRegex = """(?<sections>(?:[\w-]+)(?:$ps[\w-]+)*?)"""
|
val sectionsInPathRegex = """(?<sections>(?:[\w-\.]+)(?:$ps[\w-\.]+)*?)"""
|
||||||
val packagePattern: Pattern = Pattern.compile("""(?:^|\n)package (?<packageName>.*?)(?:;|\n)""")
|
val packagePattern: Pattern = Pattern.compile("""(?:^|\n)package (?<packageName>.*?)(?:;|\n)""")
|
||||||
}
|
}
|
||||||
|
|
||||||
+13
-17
@@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* 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.TestsExceptionType
|
||||||
import org.jetbrains.kotlin.spec.*
|
import org.jetbrains.kotlin.spec.utils.*
|
||||||
import org.jetbrains.kotlin.spec.models.CommonInfoElementType
|
import org.jetbrains.kotlin.spec.utils.models.CommonInfoElementType
|
||||||
import org.jetbrains.kotlin.spec.models.LinkedSpecTestFileInfoElementType
|
import org.jetbrains.kotlin.spec.utils.models.LinkedSpecTestFileInfoElementType
|
||||||
import org.jetbrains.kotlin.spec.models.SpecTestCaseInfoElementType
|
import org.jetbrains.kotlin.spec.utils.models.SpecTestCaseInfoElementType
|
||||||
import org.jetbrains.kotlin.spec.models.SpecTestInfoElements
|
import org.jetbrains.kotlin.spec.utils.models.SpecTestInfoElements
|
||||||
import org.jetbrains.kotlin.spec.parsers.CommonParser.splitByComma
|
import org.jetbrains.kotlin.spec.utils.parsers.TestCasePatterns.testCaseInfoPattern
|
||||||
import org.jetbrains.kotlin.spec.parsers.TestCasePatterns.testCaseInfoPattern
|
import org.jetbrains.kotlin.spec.utils.parsers.CommonParser.splitByComma
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
private operator fun SpecTestCase.plusAssign(addTestCase: SpecTestCase) {
|
private operator fun SpecTestCase.plusAssign(addTestCase: SpecTestCase) {
|
||||||
@@ -47,11 +47,7 @@ private fun SpecTestCase.save(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun parseTestCases(testFiles: TestFiles): SpecTestCasesSet {
|
fun parseTestCases(testFiles: TestFiles): SpecTestCasesSet {
|
||||||
val testCasesSet = SpecTestCasesSet(
|
val testCasesSet = SpecTestCasesSet(mutableMapOf(), mutableMapOf(), mutableMapOf())
|
||||||
mutableMapOf<String, TestCasesByNumbers>(),
|
|
||||||
mutableMapOf<String, NavigableMap<Int, TestCasesByNumbers>>(),
|
|
||||||
mutableMapOf<Int, SpecTestCase>()
|
|
||||||
)
|
|
||||||
var rangeOffset = 0
|
var rangeOffset = 0
|
||||||
|
|
||||||
for ((filename, fileContent) in testFiles) {
|
for ((filename, fileContent) in testFiles) {
|
||||||
@@ -59,8 +55,8 @@ fun parseTestCases(testFiles: TestFiles): SpecTestCasesSet {
|
|||||||
var startFind = 0
|
var startFind = 0
|
||||||
|
|
||||||
if (!testCasesSet.byFiles.contains(filename)) {
|
if (!testCasesSet.byFiles.contains(filename)) {
|
||||||
testCasesSet.byFiles[filename] = mutableMapOf<Int, SpecTestCase>()
|
testCasesSet.byFiles[filename] = mutableMapOf()
|
||||||
testCasesSet.byRanges[filename] = TreeMap<Int, TestCasesByNumbers>()
|
testCasesSet.byRanges[filename] = TreeMap()
|
||||||
}
|
}
|
||||||
|
|
||||||
val testCasesOfFile = testCasesSet.byFiles[filename]!!
|
val testCasesOfFile = testCasesSet.byFiles[filename]!!
|
||||||
+11
-10
@@ -1,19 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* 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 com.intellij.openapi.util.io.FileUtil
|
||||||
import org.jetbrains.kotlin.TestsExceptionType
|
import org.jetbrains.kotlin.TestsExceptionType
|
||||||
import org.jetbrains.kotlin.spec.*
|
import org.jetbrains.kotlin.spec.utils.*
|
||||||
import org.jetbrains.kotlin.spec.models.CommonInfoElementType
|
import org.jetbrains.kotlin.spec.utils.models.CommonInfoElementType
|
||||||
import org.jetbrains.kotlin.spec.models.CommonSpecTestFileInfoElementType
|
import org.jetbrains.kotlin.spec.utils.models.CommonSpecTestFileInfoElementType
|
||||||
import org.jetbrains.kotlin.spec.models.SpecTestInfoElements
|
import org.jetbrains.kotlin.spec.utils.models.SpecTestInfoElements
|
||||||
import org.jetbrains.kotlin.spec.parsers.CommonParser.withUnderscores
|
import org.jetbrains.kotlin.spec.utils.validators.SpecTestValidationException
|
||||||
import org.jetbrains.kotlin.spec.parsers.CommonParser.splitByComma
|
import org.jetbrains.kotlin.spec.utils.validators.SpecTestValidationFailedReason
|
||||||
import org.jetbrains.kotlin.spec.validators.*
|
import org.jetbrains.kotlin.spec.utils.parsers.CommonParser.splitByComma
|
||||||
|
import org.jetbrains.kotlin.spec.utils.parsers.CommonParser.withUnderscores
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
data class ParsedTestFile(
|
data class ParsedTestFile(
|
||||||
+11
-11
@@ -1,22 +1,22 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* 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.utils.TestArea
|
||||||
import org.jetbrains.kotlin.spec.TestType
|
import org.jetbrains.kotlin.spec.utils.TestType
|
||||||
import org.jetbrains.kotlin.spec.generators.templates.Feature
|
import org.jetbrains.kotlin.spec.utils.generators.templates.Feature
|
||||||
import org.jetbrains.kotlin.spec.generators.templates.generationLinkedSpecTestDataConfig
|
import org.jetbrains.kotlin.spec.utils.generators.templates.generationLinkedSpecTestDataConfig
|
||||||
import org.jetbrains.kotlin.spec.generators.templates.generationSpecTestDataConfigGroup
|
import org.jetbrains.kotlin.spec.utils.generators.templates.generationSpecTestDataConfigGroup
|
||||||
|
|
||||||
fun main() {
|
fun main() {
|
||||||
generationSpecTestDataConfigGroup(regenerateTests = true) {
|
generationSpecTestDataConfigGroup(regenerateTests = true) {
|
||||||
generationLinkedSpecTestDataConfig {
|
generationLinkedSpecTestDataConfig {
|
||||||
testArea = TestArea.PSI
|
testArea = TestArea.PSI
|
||||||
testType = TestType.NEGATIVE
|
testType = TestType.NEGATIVE
|
||||||
sections = listOf("constant-literals", "boolean-literals")
|
sections = listOf("expressions", "constant-literals", "boolean-literals")
|
||||||
paragraphNumber = 1
|
paragraphNumber = 1
|
||||||
sentenceNumber = 2
|
sentenceNumber = 2
|
||||||
sentence = "These are strong keywords which cannot be used as identifiers unless escaped."
|
sentence = "These are strong keywords which cannot be used as identifiers unless escaped."
|
||||||
@@ -27,7 +27,7 @@ fun main() {
|
|||||||
generationLinkedSpecTestDataConfig {
|
generationLinkedSpecTestDataConfig {
|
||||||
testArea = TestArea.PSI
|
testArea = TestArea.PSI
|
||||||
testType = TestType.POSITIVE
|
testType = TestType.POSITIVE
|
||||||
sections = listOf("constant-literals", "boolean-literals")
|
sections = listOf("expressions", "constant-literals", "boolean-literals")
|
||||||
paragraphNumber = 1
|
paragraphNumber = 1
|
||||||
sentenceNumber = 2
|
sentenceNumber = 2
|
||||||
sentence = "These are strong keywords which cannot be used as identifiers unless escaped."
|
sentence = "These are strong keywords which cannot be used as identifiers unless escaped."
|
||||||
@@ -38,7 +38,7 @@ fun main() {
|
|||||||
generationLinkedSpecTestDataConfig {
|
generationLinkedSpecTestDataConfig {
|
||||||
testArea = TestArea.CODEGEN_BOX
|
testArea = TestArea.CODEGEN_BOX
|
||||||
testType = TestType.POSITIVE
|
testType = TestType.POSITIVE
|
||||||
sections = listOf("constant-literals", "boolean-literals")
|
sections = listOf("expressions", "constant-literals", "boolean-literals")
|
||||||
paragraphNumber = 1
|
paragraphNumber = 1
|
||||||
sentenceNumber = 2
|
sentenceNumber = 2
|
||||||
sentence = "These are strong keywords which cannot be used as identifiers unless escaped."
|
sentence = "These are strong keywords which cannot be used as identifiers unless escaped."
|
||||||
@@ -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 <reified T : JsonElement> 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<JsonObject>(sections)
|
||||||
|
val testsByParagraph = testsBySection.getOrCreate<JsonObject>(specPlace.paragraphNumber.toString())
|
||||||
|
val testsByType = testsByParagraph.getOrCreate<JsonObject>(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<AbstractDiagnosticsTestSpec> {
|
||||||
|
model("diagnostics", excludeDirs = listOf("helpers"))
|
||||||
|
}
|
||||||
|
testClass<AbstractParsingTestSpec> {
|
||||||
|
model("psi", testMethod = "doParsingTest", excludeDirs = listOf("helpers", "templates"))
|
||||||
|
}
|
||||||
|
testClass<AbstractBlackBoxCodegenTestSpec> {
|
||||||
|
model("codegen/box", excludeDirs = listOf("helpers", "templates"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun main() {
|
||||||
|
TestsMapGenerator.buildTestsMapPerSection()
|
||||||
|
generateTests()
|
||||||
|
}
|
||||||
+4
-4
@@ -1,11 +1,11 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* 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.SpecTestsStatElement
|
||||||
import org.jetbrains.kotlin.spec.utils.SpecTestsStatElementType
|
import org.jetbrains.kotlin.spec.utils.SpecTestsStatElementType
|
||||||
import org.jetbrains.kotlin.spec.utils.TestsStatisticCollector
|
import org.jetbrains.kotlin.spec.utils.TestsStatisticCollector
|
||||||
+7
-7
@@ -1,14 +1,14 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* 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.utils.SpecTestLinkedType
|
||||||
import org.jetbrains.kotlin.spec.SpecTestLinkedType
|
import org.jetbrains.kotlin.spec.utils.TestType
|
||||||
import org.jetbrains.kotlin.spec.TestType
|
import org.jetbrains.kotlin.spec.utils.models.AbstractSpecTest
|
||||||
import org.jetbrains.kotlin.spec.parsers.CommonPatterns
|
import org.jetbrains.kotlin.spec.utils.parsers.CommonPatterns
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
enum class SpecTestValidationFailedReason(val description: String) {
|
enum class SpecTestValidationFailedReason(val description: String) {
|
||||||
+16
@@ -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)
|
||||||
|
}
|
||||||
+6
-6
@@ -1,16 +1,16 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* 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.checkers.BaseDiagnosticsTest
|
||||||
import org.jetbrains.kotlin.diagnostics.Diagnostic
|
import org.jetbrains.kotlin.diagnostics.Diagnostic
|
||||||
import org.jetbrains.kotlin.diagnostics.Severity
|
import org.jetbrains.kotlin.diagnostics.Severity
|
||||||
import org.jetbrains.kotlin.spec.models.AbstractSpecTest
|
import org.jetbrains.kotlin.spec.utils.TestCasesByNumbers
|
||||||
import org.jetbrains.kotlin.spec.TestCasesByNumbers
|
import org.jetbrains.kotlin.spec.utils.TestType
|
||||||
import org.jetbrains.kotlin.spec.TestType
|
import org.jetbrains.kotlin.spec.utils.models.AbstractSpecTest
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
class DiagnosticTestTypeValidator(
|
class DiagnosticTestTypeValidator(
|
||||||
+5
-5
@@ -1,15 +1,15 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* 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.PsiElement
|
||||||
import com.intellij.psi.PsiErrorElement
|
import com.intellij.psi.PsiErrorElement
|
||||||
import com.intellij.psi.PsiFile
|
import com.intellij.psi.PsiFile
|
||||||
import org.jetbrains.kotlin.spec.TestType
|
import org.jetbrains.kotlin.spec.utils.TestType
|
||||||
import org.jetbrains.kotlin.spec.models.AbstractSpecTest
|
import org.jetbrains.kotlin.spec.utils.models.AbstractSpecTest
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
class ParsingTestTypeValidator(
|
class ParsingTestTypeValidator(
|
||||||
-16
@@ -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)
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user