From 9be2fc9b126d937fd23911161f56e5d737548cd8 Mon Sep 17 00:00:00 2001 From: Denis Zharkov Date: Mon, 13 Apr 2020 13:24:50 +0300 Subject: [PATCH] Sort excluded dirs in generated spec tests To make the order more stable and platform-independent --- .../spec/checkers/DiagnosticsTestSpecGenerated.java | 10 +++++----- .../spec/codegen/BlackBoxCodegenTestSpecGenerated.java | 4 ++-- .../kotlin/spec/utils/tasks/GenerateSpecTests.kt | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/checkers/DiagnosticsTestSpecGenerated.java b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/checkers/DiagnosticsTestSpecGenerated.java index ff25ec633cf..771e35f4d4d 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/checkers/DiagnosticsTestSpecGenerated.java +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/checkers/DiagnosticsTestSpecGenerated.java @@ -25,7 +25,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInDiagnostics() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics"), Pattern.compile("^(.+)\\.kt$"), null, true, "helpers", "linked/type-inference/smart-casts/smart-cast-types", "linked/type-inference/local-type-inference", "linked/type-system/type-kinds/type-parameters", "linked/type-system/subtyping", "linked/control--and-data-flow-analysis.control-flow-graph.expressions-1.conditional-expressions", "linked/declarations/classifier-declaration/classifier-initialization", "linked/declarations/function-declaration", "linked/declarations/property-declaration/property-initialization", "linked/annotations", "linked/statements/assignments/simple-assignments", "linked/inheritance", "linked/expressions/function-literals", "linked/expressions/call-and-property-access-expressions", "linked/overloadable-operators", "linked/overload-resolution/c-level-partition", "linked/overload-resolution/determining-function-applicability-for-a-specific-call", "linked/control--and-data-flow-analysis/performing-analysis-on-the-control-flow-graph"); + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics"), Pattern.compile("^(.+)\\.kt$"), null, true, "helpers", "linked/annotations", "linked/control--and-data-flow-analysis.control-flow-graph.expressions-1.conditional-expressions", "linked/control--and-data-flow-analysis/performing-analysis-on-the-control-flow-graph", "linked/declarations/classifier-declaration/classifier-initialization", "linked/declarations/function-declaration", "linked/declarations/property-declaration/property-initialization", "linked/expressions/call-and-property-access-expressions", "linked/expressions/function-literals", "linked/inheritance", "linked/overload-resolution/c-level-partition", "linked/overload-resolution/determining-function-applicability-for-a-specific-call", "linked/overloadable-operators", "linked/statements/assignments/simple-assignments", "linked/type-inference/local-type-inference", "linked/type-inference/smart-casts/smart-cast-types", "linked/type-system/subtyping", "linked/type-system/type-kinds/type-parameters"); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked") @@ -37,7 +37,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInLinked() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked"), Pattern.compile("^(.+)\\.kt$"), null, true, "type-inference/smart-casts/smart-cast-types", "type-inference/local-type-inference", "type-system/type-kinds/type-parameters", "type-system/subtyping", "control--and-data-flow-analysis.control-flow-graph.expressions-1.conditional-expressions", "declarations/classifier-declaration/classifier-initialization", "declarations/function-declaration", "declarations/property-declaration/property-initialization", "annotations", "statements/assignments/simple-assignments", "inheritance", "expressions/function-literals", "expressions/call-and-property-access-expressions", "overloadable-operators", "overload-resolution/c-level-partition", "overload-resolution/determining-function-applicability-for-a-specific-call", "control--and-data-flow-analysis/performing-analysis-on-the-control-flow-graph"); + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked"), Pattern.compile("^(.+)\\.kt$"), null, true, "annotations", "control--and-data-flow-analysis.control-flow-graph.expressions-1.conditional-expressions", "control--and-data-flow-analysis/performing-analysis-on-the-control-flow-graph", "declarations/classifier-declaration/classifier-initialization", "declarations/function-declaration", "declarations/property-declaration/property-initialization", "expressions/call-and-property-access-expressions", "expressions/function-literals", "inheritance", "overload-resolution/c-level-partition", "overload-resolution/determining-function-applicability-for-a-specific-call", "overloadable-operators", "statements/assignments/simple-assignments", "type-inference/local-type-inference", "type-inference/smart-casts/smart-cast-types", "type-system/subtyping", "type-system/type-kinds/type-parameters"); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/control--and-data-flow-analysis") @@ -452,7 +452,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInExpressions() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions"), Pattern.compile("^(.+)\\.kt$"), null, true, "function-literals", "call-and-property-access-expressions"); + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions"), Pattern.compile("^(.+)\\.kt$"), null, true, "call-and-property-access-expressions", "function-literals"); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/additive-expression") @@ -4580,7 +4580,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInType_inference() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-inference"), Pattern.compile("^(.+)\\.kt$"), null, true, "smart-casts/smart-cast-types", "local-type-inference"); + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-inference"), Pattern.compile("^(.+)\\.kt$"), null, true, "local-type-inference", "smart-casts/smart-cast-types"); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-inference/smart-casts") @@ -4668,7 +4668,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInType_system() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system"), Pattern.compile("^(.+)\\.kt$"), null, true, "type-kinds/type-parameters", "subtyping"); + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system"), Pattern.compile("^(.+)\\.kt$"), null, true, "subtyping", "type-kinds/type-parameters"); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1") diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/codegen/BlackBoxCodegenTestSpecGenerated.java b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/codegen/BlackBoxCodegenTestSpecGenerated.java index e76b806f1a9..ef756023560 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/codegen/BlackBoxCodegenTestSpecGenerated.java +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/codegen/BlackBoxCodegenTestSpecGenerated.java @@ -25,7 +25,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInBox() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box"), Pattern.compile("^(.+)\\.kt$"), null, true, "helpers", "templates", "linked/exceptions", "linked/overloadable-operators", "linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver"); + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box"), Pattern.compile("^(.+)\\.kt$"), null, true, "helpers", "templates", "linked/exceptions", "linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver", "linked/overloadable-operators"); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked") @@ -37,7 +37,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInLinked() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked"), Pattern.compile("^(.+)\\.kt$"), null, true, "exceptions", "overloadable-operators", "overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver"); + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked"), Pattern.compile("^(.+)\\.kt$"), null, true, "exceptions", "overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver", "overloadable-operators"); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions") diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/tasks/GenerateSpecTests.kt b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/tasks/GenerateSpecTests.kt index 864cbf52f83..bac14e830a3 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/tasks/GenerateSpecTests.kt +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/utils/tasks/GenerateSpecTests.kt @@ -31,7 +31,7 @@ fun detectDirsWithTestsMapFileOnly(dirName: String): List { } } - return excludedDirs + return excludedDirs.sorted() } fun generateTests() {