From 04809a6b3b70e5a341953bf29bae630190da1071 Mon Sep 17 00:00:00 2001 From: Alexander Korepanov Date: Thu, 12 Oct 2023 13:14:17 +0200 Subject: [PATCH] [JS IR] Move tests for JS code diagnostics ^KT-62425 --- .../jsCode/argumentIsLiteral.fir.kt | 0 .../jsCode/argumentIsLiteral.kt | 0 .../jsCode/argumentIsLiteral.txt | 0 .../jsCode/badAssignment.fir.kt | 0 .../jsCode/badAssignment.kt | 0 .../jsCode/badAssignment.txt | 0 .../jsCode/deleteOperation.fir.kt | 0 .../jsCode/deleteOperation.kt | 0 .../jsCode/deleteOperation.txt | 0 .../jsCode/error.fir.kt | 0 .../jsCode/error.kt | 0 .../jsCode/error.txt | 0 .../jsCode/noJavaScriptProduced.fir.kt | 0 .../jsCode/noJavaScriptProduced.kt | 0 .../jsCode/noJavaScriptProduced.txt | 0 .../jsCode/warning.fir.kt | 0 .../jsCode/warning.kt | 0 .../jsCode/warning.txt | 0 ...JsOldFrontendDiagnosticsTestGenerated.java | 46 ------------------- ...ndDiagnosticsWithBackendTestGenerated.java | 46 +++++++++++++++++++ ...csWithJsStdLibAndBackendTestGenerated.java | 46 +++++++++++++++++++ .../DiagnosticsWithJsStdLibTestGenerated.java | 46 ------------------- 22 files changed, 92 insertions(+), 92 deletions(-) rename compiler/testData/diagnostics/{testsWithJsStdLib => testsWithJsStdLibAndBackendCompilation}/jsCode/argumentIsLiteral.fir.kt (100%) rename compiler/testData/diagnostics/{testsWithJsStdLib => testsWithJsStdLibAndBackendCompilation}/jsCode/argumentIsLiteral.kt (100%) rename compiler/testData/diagnostics/{testsWithJsStdLib => testsWithJsStdLibAndBackendCompilation}/jsCode/argumentIsLiteral.txt (100%) rename compiler/testData/diagnostics/{testsWithJsStdLib => testsWithJsStdLibAndBackendCompilation}/jsCode/badAssignment.fir.kt (100%) rename compiler/testData/diagnostics/{testsWithJsStdLib => testsWithJsStdLibAndBackendCompilation}/jsCode/badAssignment.kt (100%) rename compiler/testData/diagnostics/{testsWithJsStdLib => testsWithJsStdLibAndBackendCompilation}/jsCode/badAssignment.txt (100%) rename compiler/testData/diagnostics/{testsWithJsStdLib => testsWithJsStdLibAndBackendCompilation}/jsCode/deleteOperation.fir.kt (100%) rename compiler/testData/diagnostics/{testsWithJsStdLib => testsWithJsStdLibAndBackendCompilation}/jsCode/deleteOperation.kt (100%) rename compiler/testData/diagnostics/{testsWithJsStdLib => testsWithJsStdLibAndBackendCompilation}/jsCode/deleteOperation.txt (100%) rename compiler/testData/diagnostics/{testsWithJsStdLib => testsWithJsStdLibAndBackendCompilation}/jsCode/error.fir.kt (100%) rename compiler/testData/diagnostics/{testsWithJsStdLib => testsWithJsStdLibAndBackendCompilation}/jsCode/error.kt (100%) rename compiler/testData/diagnostics/{testsWithJsStdLib => testsWithJsStdLibAndBackendCompilation}/jsCode/error.txt (100%) rename compiler/testData/diagnostics/{testsWithJsStdLib => testsWithJsStdLibAndBackendCompilation}/jsCode/noJavaScriptProduced.fir.kt (100%) rename compiler/testData/diagnostics/{testsWithJsStdLib => testsWithJsStdLibAndBackendCompilation}/jsCode/noJavaScriptProduced.kt (100%) rename compiler/testData/diagnostics/{testsWithJsStdLib => testsWithJsStdLibAndBackendCompilation}/jsCode/noJavaScriptProduced.txt (100%) rename compiler/testData/diagnostics/{testsWithJsStdLib => testsWithJsStdLibAndBackendCompilation}/jsCode/warning.fir.kt (100%) rename compiler/testData/diagnostics/{testsWithJsStdLib => testsWithJsStdLibAndBackendCompilation}/jsCode/warning.kt (100%) rename compiler/testData/diagnostics/{testsWithJsStdLib => testsWithJsStdLibAndBackendCompilation}/jsCode/warning.txt (100%) diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/jsCode/argumentIsLiteral.fir.kt b/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/argumentIsLiteral.fir.kt similarity index 100% rename from compiler/testData/diagnostics/testsWithJsStdLib/jsCode/argumentIsLiteral.fir.kt rename to compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/argumentIsLiteral.fir.kt diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/jsCode/argumentIsLiteral.kt b/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/argumentIsLiteral.kt similarity index 100% rename from compiler/testData/diagnostics/testsWithJsStdLib/jsCode/argumentIsLiteral.kt rename to compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/argumentIsLiteral.kt diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/jsCode/argumentIsLiteral.txt b/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/argumentIsLiteral.txt similarity index 100% rename from compiler/testData/diagnostics/testsWithJsStdLib/jsCode/argumentIsLiteral.txt rename to compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/argumentIsLiteral.txt diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/jsCode/badAssignment.fir.kt b/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/badAssignment.fir.kt similarity index 100% rename from compiler/testData/diagnostics/testsWithJsStdLib/jsCode/badAssignment.fir.kt rename to compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/badAssignment.fir.kt diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/jsCode/badAssignment.kt b/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/badAssignment.kt similarity index 100% rename from compiler/testData/diagnostics/testsWithJsStdLib/jsCode/badAssignment.kt rename to compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/badAssignment.kt diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/jsCode/badAssignment.txt b/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/badAssignment.txt similarity index 100% rename from compiler/testData/diagnostics/testsWithJsStdLib/jsCode/badAssignment.txt rename to compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/badAssignment.txt diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/jsCode/deleteOperation.fir.kt b/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/deleteOperation.fir.kt similarity index 100% rename from compiler/testData/diagnostics/testsWithJsStdLib/jsCode/deleteOperation.fir.kt rename to compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/deleteOperation.fir.kt diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/jsCode/deleteOperation.kt b/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/deleteOperation.kt similarity index 100% rename from compiler/testData/diagnostics/testsWithJsStdLib/jsCode/deleteOperation.kt rename to compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/deleteOperation.kt diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/jsCode/deleteOperation.txt b/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/deleteOperation.txt similarity index 100% rename from compiler/testData/diagnostics/testsWithJsStdLib/jsCode/deleteOperation.txt rename to compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/deleteOperation.txt diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/jsCode/error.fir.kt b/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/error.fir.kt similarity index 100% rename from compiler/testData/diagnostics/testsWithJsStdLib/jsCode/error.fir.kt rename to compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/error.fir.kt diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/jsCode/error.kt b/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/error.kt similarity index 100% rename from compiler/testData/diagnostics/testsWithJsStdLib/jsCode/error.kt rename to compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/error.kt diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/jsCode/error.txt b/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/error.txt similarity index 100% rename from compiler/testData/diagnostics/testsWithJsStdLib/jsCode/error.txt rename to compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/error.txt diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/jsCode/noJavaScriptProduced.fir.kt b/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/noJavaScriptProduced.fir.kt similarity index 100% rename from compiler/testData/diagnostics/testsWithJsStdLib/jsCode/noJavaScriptProduced.fir.kt rename to compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/noJavaScriptProduced.fir.kt diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/jsCode/noJavaScriptProduced.kt b/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/noJavaScriptProduced.kt similarity index 100% rename from compiler/testData/diagnostics/testsWithJsStdLib/jsCode/noJavaScriptProduced.kt rename to compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/noJavaScriptProduced.kt diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/jsCode/noJavaScriptProduced.txt b/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/noJavaScriptProduced.txt similarity index 100% rename from compiler/testData/diagnostics/testsWithJsStdLib/jsCode/noJavaScriptProduced.txt rename to compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/noJavaScriptProduced.txt diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/jsCode/warning.fir.kt b/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/warning.fir.kt similarity index 100% rename from compiler/testData/diagnostics/testsWithJsStdLib/jsCode/warning.fir.kt rename to compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/warning.fir.kt diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/jsCode/warning.kt b/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/warning.kt similarity index 100% rename from compiler/testData/diagnostics/testsWithJsStdLib/jsCode/warning.kt rename to compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/warning.kt diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/jsCode/warning.txt b/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/warning.txt similarity index 100% rename from compiler/testData/diagnostics/testsWithJsStdLib/jsCode/warning.txt rename to compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/warning.txt diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirPsiJsOldFrontendDiagnosticsTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirPsiJsOldFrontendDiagnosticsTestGenerated.java index e8b99696315..f1a8aa85d21 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirPsiJsOldFrontendDiagnosticsTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirPsiJsOldFrontendDiagnosticsTestGenerated.java @@ -539,52 +539,6 @@ public class FirPsiJsOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiJ } } - @Nested - @TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib/jsCode") - @TestDataPath("$PROJECT_ROOT") - public class JsCode { - @Test - public void testAllFilesPresentInJsCode() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/jsCode"), Pattern.compile("^([^_](.+))\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), TargetBackend.JS_IR, true); - } - - @Test - @TestMetadata("argumentIsLiteral.kt") - public void testArgumentIsLiteral() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJsStdLib/jsCode/argumentIsLiteral.kt"); - } - - @Test - @TestMetadata("badAssignment.kt") - public void testBadAssignment() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJsStdLib/jsCode/badAssignment.kt"); - } - - @Test - @TestMetadata("deleteOperation.kt") - public void testDeleteOperation() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJsStdLib/jsCode/deleteOperation.kt"); - } - - @Test - @TestMetadata("error.kt") - public void testError() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJsStdLib/jsCode/error.kt"); - } - - @Test - @TestMetadata("noJavaScriptProduced.kt") - public void testNoJavaScriptProduced() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJsStdLib/jsCode/noJavaScriptProduced.kt"); - } - - @Test - @TestMetadata("warning.kt") - public void testWarning() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJsStdLib/jsCode/warning.kt"); - } - } - @Nested @TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib/jvmDeclarations") @TestDataPath("$PROJECT_ROOT") diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirPsiJsOldFrontendDiagnosticsWithBackendTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirPsiJsOldFrontendDiagnosticsWithBackendTestGenerated.java index d26f1caf48e..b023efceca2 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirPsiJsOldFrontendDiagnosticsWithBackendTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirPsiJsOldFrontendDiagnosticsWithBackendTestGenerated.java @@ -123,6 +123,52 @@ public class FirPsiJsOldFrontendDiagnosticsWithBackendTestGenerated extends Abst } } + @Nested + @TestMetadata("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode") + @TestDataPath("$PROJECT_ROOT") + public class JsCode { + @Test + public void testAllFilesPresentInJsCode() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode"), Pattern.compile("^([^_](.+))\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), TargetBackend.JS_IR, true); + } + + @Test + @TestMetadata("argumentIsLiteral.kt") + public void testArgumentIsLiteral() throws Exception { + runTest("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/argumentIsLiteral.kt"); + } + + @Test + @TestMetadata("badAssignment.kt") + public void testBadAssignment() throws Exception { + runTest("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/badAssignment.kt"); + } + + @Test + @TestMetadata("deleteOperation.kt") + public void testDeleteOperation() throws Exception { + runTest("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/deleteOperation.kt"); + } + + @Test + @TestMetadata("error.kt") + public void testError() throws Exception { + runTest("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/error.kt"); + } + + @Test + @TestMetadata("noJavaScriptProduced.kt") + public void testNoJavaScriptProduced() throws Exception { + runTest("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/noJavaScriptProduced.kt"); + } + + @Test + @TestMetadata("warning.kt") + public void testWarning() throws Exception { + runTest("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/warning.kt"); + } + } + @Nested @TestMetadata("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/unsupportedFeatures") @TestDataPath("$PROJECT_ROOT") diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/DiagnosticsWithJsStdLibAndBackendTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/DiagnosticsWithJsStdLibAndBackendTestGenerated.java index 3ebe8330e88..64f44a2dc5a 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/DiagnosticsWithJsStdLibAndBackendTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/DiagnosticsWithJsStdLibAndBackendTestGenerated.java @@ -123,6 +123,52 @@ public class DiagnosticsWithJsStdLibAndBackendTestGenerated extends AbstractDiag } } + @Nested + @TestMetadata("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode") + @TestDataPath("$PROJECT_ROOT") + public class JsCode { + @Test + public void testAllFilesPresentInJsCode() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode"), Pattern.compile("^([^_](.+))\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), TargetBackend.JS_IR, true); + } + + @Test + @TestMetadata("argumentIsLiteral.kt") + public void testArgumentIsLiteral() throws Exception { + runTest("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/argumentIsLiteral.kt"); + } + + @Test + @TestMetadata("badAssignment.kt") + public void testBadAssignment() throws Exception { + runTest("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/badAssignment.kt"); + } + + @Test + @TestMetadata("deleteOperation.kt") + public void testDeleteOperation() throws Exception { + runTest("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/deleteOperation.kt"); + } + + @Test + @TestMetadata("error.kt") + public void testError() throws Exception { + runTest("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/error.kt"); + } + + @Test + @TestMetadata("noJavaScriptProduced.kt") + public void testNoJavaScriptProduced() throws Exception { + runTest("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/noJavaScriptProduced.kt"); + } + + @Test + @TestMetadata("warning.kt") + public void testWarning() throws Exception { + runTest("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/jsCode/warning.kt"); + } + } + @Nested @TestMetadata("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/unsupportedFeatures") @TestDataPath("$PROJECT_ROOT") diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/DiagnosticsWithJsStdLibTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/DiagnosticsWithJsStdLibTestGenerated.java index 6d0de8a16c2..41f2597bd4c 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/DiagnosticsWithJsStdLibTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/DiagnosticsWithJsStdLibTestGenerated.java @@ -539,52 +539,6 @@ public class DiagnosticsWithJsStdLibTestGenerated extends AbstractDiagnosticsTes } } - @Nested - @TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib/jsCode") - @TestDataPath("$PROJECT_ROOT") - public class JsCode { - @Test - public void testAllFilesPresentInJsCode() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/jsCode"), Pattern.compile("^([^_](.+))\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), TargetBackend.JS_IR, true); - } - - @Test - @TestMetadata("argumentIsLiteral.kt") - public void testArgumentIsLiteral() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJsStdLib/jsCode/argumentIsLiteral.kt"); - } - - @Test - @TestMetadata("badAssignment.kt") - public void testBadAssignment() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJsStdLib/jsCode/badAssignment.kt"); - } - - @Test - @TestMetadata("deleteOperation.kt") - public void testDeleteOperation() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJsStdLib/jsCode/deleteOperation.kt"); - } - - @Test - @TestMetadata("error.kt") - public void testError() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJsStdLib/jsCode/error.kt"); - } - - @Test - @TestMetadata("noJavaScriptProduced.kt") - public void testNoJavaScriptProduced() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJsStdLib/jsCode/noJavaScriptProduced.kt"); - } - - @Test - @TestMetadata("warning.kt") - public void testWarning() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJsStdLib/jsCode/warning.kt"); - } - } - @Nested @TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib/jvmDeclarations") @TestDataPath("$PROJECT_ROOT")