From 26ac87d9bed0120f1c4bdc125671b54724245695 Mon Sep 17 00:00:00 2001 From: "anastasiia.spaseeva" Date: Tue, 28 Jul 2020 11:09:06 +0300 Subject: [PATCH] [Spec tests] Update spec testData --- .../linked/expressions/try-expression/testsMap.json | 4 ++-- .../spec/checkers/DiagnosticsTestSpecGenerated.java | 13 +++++++++++++ .../checkers/FirDiagnosticsTestSpecGenerated.java | 13 +++++++++++++ 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/testsMap.json b/compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/testsMap.json index 9340b4349ab..30dc6425e9f 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/testsMap.json +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/testsMap.json @@ -185,7 +185,7 @@ "casesNumber": 3, "description": "The type of the try-expression is the least upper bound of the types of the last expressions of the try body and the last expressions of all the catch blocks", "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/p-8/neg/1.1.kt", - "unexpectedBehaviour": true, + "unexpectedBehaviour": false, "linkType": "main" } ] @@ -212,7 +212,7 @@ "casesNumber": 3, "description": "The type of the try-expression is the least upper bound of the types of the last expressions of the try body and the last expressions of all the catch blocks", "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/p-8/neg/1.1.kt", - "unexpectedBehaviour": true, + "unexpectedBehaviour": false, "linkType": "primary" } ] 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 838e18991be..124a724ae07 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 @@ -382,6 +382,19 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } } } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/constructor-declaration") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Constructor_declaration extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInConstructor_declaration() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/constructor-declaration"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + } + } } } diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/checkers/FirDiagnosticsTestSpecGenerated.java b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/checkers/FirDiagnosticsTestSpecGenerated.java index d22a6061e82..93d8604e8d6 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/checkers/FirDiagnosticsTestSpecGenerated.java +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/checkers/FirDiagnosticsTestSpecGenerated.java @@ -382,6 +382,19 @@ public class FirDiagnosticsTestSpecGenerated extends AbstractFirDiagnosticsTestS } } } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/constructor-declaration") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Constructor_declaration extends AbstractFirDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInConstructor_declaration() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/constructor-declaration"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + } + } } }