javac-wrapper: refactoring, fixes and tests
This commit is contained in:
committed by
Alexander Baratynskiy
parent
8494e54608
commit
01883a41cb
+48
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright 2010-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.checkers.javac
|
||||
|
||||
import com.intellij.openapi.util.io.FileUtil
|
||||
import org.jetbrains.kotlin.checkers.AbstractDiagnosticsTestWithStdLib
|
||||
import org.jetbrains.kotlin.config.JVMConfigurationKeys
|
||||
import org.jetbrains.kotlin.test.InTextDirectivesUtils
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils
|
||||
import org.jetbrains.kotlin.utils.PathUtil
|
||||
import java.io.File
|
||||
|
||||
abstract class AbstractDiagnosticsTestWithStdLibUsingJavac : AbstractDiagnosticsTestWithStdLib() {
|
||||
|
||||
override fun analyzeAndCheck(testDataFile: File, files: List<TestFile>) {
|
||||
if (InTextDirectivesUtils.isDirectiveDefined(testDataFile.readText(), "// JAVAC_SKIP")) {
|
||||
println("${testDataFile.name} test is skipped")
|
||||
return
|
||||
}
|
||||
val groupedByModule = files.groupBy(TestFile::module)
|
||||
val allKtFiles = groupedByModule.values.flatMap { getKtFiles(it, true) }
|
||||
val mockJdk = listOf(File(getHomeDirectory(), "compiler/testData/mockJDK/jre/lib/rt.jar"))
|
||||
|
||||
environment.registerJavac(kotlinFiles = allKtFiles, bootClasspath = mockJdk)
|
||||
environment.configuration.put(JVMConfigurationKeys.USE_JAVAC, true)
|
||||
super.analyzeAndCheck(testDataFile, files)
|
||||
}
|
||||
|
||||
private fun getHomeDirectory(): String {
|
||||
val resourceRoot = PathUtil.getResourcePathForClass(KotlinTestUtils::class.java)
|
||||
return FileUtil.toSystemIndependentName(resourceRoot.parentFile.parentFile.parent)
|
||||
}
|
||||
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Copyright 2010-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.checkers.javac
|
||||
|
||||
import org.jetbrains.kotlin.checkers.AbstractForeignAnnotationsTest
|
||||
import org.jetbrains.kotlin.config.JVMConfigurationKeys
|
||||
import java.io.File
|
||||
|
||||
abstract class AbstractJavacForeignAnnotationsTest : AbstractForeignAnnotationsTest() {
|
||||
|
||||
override fun analyzeAndCheck(testDataFile: File, files: List<TestFile>) {
|
||||
val groupedByModule = files.groupBy(TestFile::module)
|
||||
val allKtFiles = groupedByModule.values.flatMap { getKtFiles(it, true) }
|
||||
environment.registerJavac(kotlinFiles = allKtFiles)
|
||||
environment.configuration.put(JVMConfigurationKeys.USE_JAVAC, true)
|
||||
|
||||
super.analyzeAndCheck(testDataFile, files)
|
||||
}
|
||||
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Copyright 2010-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.checkers.javac
|
||||
|
||||
import org.jetbrains.kotlin.checkers.AbstractForeignJava8AnnotationsTest
|
||||
import org.jetbrains.kotlin.config.JVMConfigurationKeys
|
||||
import java.io.File
|
||||
|
||||
abstract class AbstractJavacForeignJava8AnnotationsTest : AbstractForeignJava8AnnotationsTest() {
|
||||
|
||||
override fun analyzeAndCheck(testDataFile: File, files: List<TestFile>) {
|
||||
val groupedByModule = files.groupBy(TestFile::module)
|
||||
val allKtFiles = groupedByModule.values.flatMap { getKtFiles(it, true) }
|
||||
environment.registerJavac(kotlinFiles = allKtFiles)
|
||||
environment.configuration.put(JVMConfigurationKeys.USE_JAVAC, true)
|
||||
|
||||
super.analyzeAndCheck(testDataFile, files)
|
||||
}
|
||||
|
||||
}
|
||||
+1853
File diff suppressed because it is too large
Load Diff
+24146
File diff suppressed because it is too large
Load Diff
+824
@@ -0,0 +1,824 @@
|
||||
/*
|
||||
* Copyright 2010-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.checkers.javac;
|
||||
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
||||
import org.jetbrains.kotlin.test.TargetBackend;
|
||||
import org.jetbrains.kotlin.test.TestMetadata;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
|
||||
@SuppressWarnings("all")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public class JavacDiagnosticsTestGenerated extends AbstractJavacDiagnosticsTest {
|
||||
@TestMetadata("compiler/testData/javac/diagnostics/tests")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Tests extends AbstractJavacDiagnosticsTest {
|
||||
public void testAllFilesPresentInTests() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/javac/diagnostics/tests"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("Annotations.kt")
|
||||
public void testAnnotations() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/Annotations.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ConstantValues.kt")
|
||||
public void testConstantValues() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/ConstantValues.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/javac/diagnostics/tests/imports")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Imports extends AbstractJavacDiagnosticsTest {
|
||||
public void testAllFilesPresentInImports() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/javac/diagnostics/tests/imports"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("AllUnderImportsAmbiguity.kt")
|
||||
public void testAllUnderImportsAmbiguity() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/AllUnderImportsAmbiguity.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("AllUnderImportsLessPriority.kt")
|
||||
public void testAllUnderImportsLessPriority() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/AllUnderImportsLessPriority.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ClassImportsConflicting.kt")
|
||||
public void testClassImportsConflicting() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/ClassImportsConflicting.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("CurrentPackageAndAllUnderImport.kt")
|
||||
public void testCurrentPackageAndAllUnderImport() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/CurrentPackageAndAllUnderImport.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("CurrentPackageAndExplicitImport.kt")
|
||||
public void testCurrentPackageAndExplicitImport() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/CurrentPackageAndExplicitImport.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("CurrentPackageAndExplicitNestedImport.kt")
|
||||
public void testCurrentPackageAndExplicitNestedImport() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/CurrentPackageAndExplicitNestedImport.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("CurrentPackageAndNestedAsteriskImport.kt")
|
||||
public void testCurrentPackageAndNestedAsteriskImport() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/CurrentPackageAndNestedAsteriskImport.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ImportGenericVsPackage.kt")
|
||||
public void testImportGenericVsPackage() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/ImportGenericVsPackage.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ImportProtectedClass.kt")
|
||||
public void testImportProtectedClass() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/ImportProtectedClass.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ImportTwoTimes.kt")
|
||||
public void testImportTwoTimes() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/ImportTwoTimes.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ImportTwoTimesStar.kt")
|
||||
public void testImportTwoTimesStar() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/ImportTwoTimesStar.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("NestedAndTopLevelClassClash.kt")
|
||||
public void testNestedAndTopLevelClassClash() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/NestedAndTopLevelClassClash.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("NestedClassClash.kt")
|
||||
public void testNestedClassClash() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/NestedClassClash.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("PackageExplicitAndStartImport.kt")
|
||||
public void testPackageExplicitAndStartImport() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/PackageExplicitAndStartImport.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("PackagePrivateAndPublicNested.kt")
|
||||
public void testPackagePrivateAndPublicNested() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/PackagePrivateAndPublicNested.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("TopLevelClassVsPackage.kt")
|
||||
public void testTopLevelClassVsPackage() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/TopLevelClassVsPackage.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("TopLevelClassVsPackage2.kt")
|
||||
public void testTopLevelClassVsPackage2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/TopLevelClassVsPackage2.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/javac/diagnostics/tests/inheritance")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Inheritance extends AbstractJavacDiagnosticsTest {
|
||||
public void testAllFilesPresentInInheritance() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/javac/diagnostics/tests/inheritance"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("IheritanceOfInner.kt")
|
||||
public void testIheritanceOfInner() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/IheritanceOfInner.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InheritanceAmbiguity.kt")
|
||||
public void testInheritanceAmbiguity() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InheritanceAmbiguity.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InheritanceAmbiguity2.kt")
|
||||
public void testInheritanceAmbiguity2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InheritanceAmbiguity2.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InheritanceAmbiguity3.kt")
|
||||
public void testInheritanceAmbiguity3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InheritanceAmbiguity3.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InheritanceAmbiguity4.kt")
|
||||
public void testInheritanceAmbiguity4() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InheritanceAmbiguity4.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InheritanceWithKotlin.kt")
|
||||
public void testInheritanceWithKotlin() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InheritanceWithKotlin.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InheritanceWithKotlinClasses.kt")
|
||||
public void testInheritanceWithKotlinClasses() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InheritanceWithKotlinClasses.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InheritedInner.kt")
|
||||
public void testInheritedInner() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InheritedInner.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InheritedInner2.kt")
|
||||
public void testInheritedInner2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InheritedInner2.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InheritedInnerAndSupertypeWithSameName.kt")
|
||||
public void testInheritedInnerAndSupertypeWithSameName() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InheritedInnerAndSupertypeWithSameName.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InheritedInnerUsageInInner.kt")
|
||||
public void testInheritedInnerUsageInInner() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InheritedInnerUsageInInner.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InheritedKotlinInner.kt")
|
||||
public void testInheritedKotlinInner() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InheritedKotlinInner.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InnerAndInheritedInner.kt")
|
||||
public void testInnerAndInheritedInner() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InnerAndInheritedInner.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ManyInheritedClasses.kt")
|
||||
public void testManyInheritedClasses() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/ManyInheritedClasses.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("NoAmbiguity.kt")
|
||||
public void testNoAmbiguity() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/NoAmbiguity.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("NoAmbiguity2.kt")
|
||||
public void testNoAmbiguity2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/NoAmbiguity2.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("SameInnersInSupertypeAndSupertypesSupertype.kt")
|
||||
public void testSameInnersInSupertypeAndSupertypesSupertype() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/SameInnersInSupertypeAndSupertypesSupertype.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("SuperTypeWithSameInner.kt")
|
||||
public void testSuperTypeWithSameInner() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/SuperTypeWithSameInner.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("SupertypeInnerAndTypeParameterWithSameNames.kt")
|
||||
public void testSupertypeInnerAndTypeParameterWithSameNames() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/SupertypeInnerAndTypeParameterWithSameNames.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/javac/diagnostics/tests/inners")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Inners extends AbstractJavacDiagnosticsTest {
|
||||
public void testAllFilesPresentInInners() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/javac/diagnostics/tests/inners"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("ComplexCase.kt")
|
||||
public void testComplexCase() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inners/ComplexCase.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ComplexCase2.kt")
|
||||
public void testComplexCase2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inners/ComplexCase2.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("CurrentPackageAndInner.kt")
|
||||
public void testCurrentPackageAndInner() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inners/CurrentPackageAndInner.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ImportThriceNestedClass.kt")
|
||||
public void testImportThriceNestedClass() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inners/ImportThriceNestedClass.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InnerInInner.kt")
|
||||
public void testInnerInInner() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inners/InnerInInner.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("Nested.kt")
|
||||
public void testNested() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inners/Nested.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ThriceNestedClass.kt")
|
||||
public void testThriceNestedClass() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inners/ThriceNestedClass.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/javac/diagnostics/tests/qualifiedExpression")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class QualifiedExpression extends AbstractJavacDiagnosticsTest {
|
||||
public void testAllFilesPresentInQualifiedExpression() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/javac/diagnostics/tests/qualifiedExpression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("GenericClassVsPackage.kt")
|
||||
public void testGenericClassVsPackage() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/qualifiedExpression/GenericClassVsPackage.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("PackageVsClass.kt")
|
||||
public void testPackageVsClass() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/qualifiedExpression/PackageVsClass.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("PackageVsClass2.kt")
|
||||
public void testPackageVsClass2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/qualifiedExpression/PackageVsClass2.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("PackageVsRootClass.kt")
|
||||
public void testPackageVsRootClass() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/qualifiedExpression/PackageVsRootClass.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("visibleClassVsQualifiedClass.kt")
|
||||
public void testVisibleClassVsQualifiedClass() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/qualifiedExpression/visibleClassVsQualifiedClass.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/javac/diagnostics/tests/typeParameters")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class TypeParameters extends AbstractJavacDiagnosticsTest {
|
||||
public void testAllFilesPresentInTypeParameters() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/javac/diagnostics/tests/typeParameters"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("Clash.kt")
|
||||
public void testClash() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/typeParameters/Clash.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ComplexCase.kt")
|
||||
public void testComplexCase() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/typeParameters/ComplexCase.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InheritedInnerAndTypeParameterWithSameNames.kt")
|
||||
public void testInheritedInnerAndTypeParameterWithSameNames() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/typeParameters/InheritedInnerAndTypeParameterWithSameNames.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InnerWithTypeParameter.kt")
|
||||
public void testInnerWithTypeParameter() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/typeParameters/InnerWithTypeParameter.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("NestedWithInner.kt")
|
||||
public void testNestedWithInner() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/typeParameters/NestedWithInner.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("SeveralInnersWithTypeParameters.kt")
|
||||
public void testSeveralInnersWithTypeParameters() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/typeParameters/SeveralInnersWithTypeParameters.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("TypeParametersInInnerAndOuterWithSameNames.kt")
|
||||
public void testTypeParametersInInnerAndOuterWithSameNames() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/typeParameters/TypeParametersInInnerAndOuterWithSameNames.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/javac/diagnostics/tests")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class TestsWithoutJavac extends AbstractJavacDiagnosticsTest {
|
||||
public void testAllFilesPresentInTestsWithoutJavac() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/javac/diagnostics/tests"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("Annotations.kt")
|
||||
public void testAnnotations() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/Annotations.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ConstantValues.kt")
|
||||
public void testConstantValues() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/ConstantValues.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/javac/diagnostics/tests/imports")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Imports extends AbstractJavacDiagnosticsTest {
|
||||
public void testAllFilesPresentInImports() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/javac/diagnostics/tests/imports"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("AllUnderImportsAmbiguity.kt")
|
||||
public void testAllUnderImportsAmbiguity() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/AllUnderImportsAmbiguity.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("AllUnderImportsLessPriority.kt")
|
||||
public void testAllUnderImportsLessPriority() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/AllUnderImportsLessPriority.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ClassImportsConflicting.kt")
|
||||
public void testClassImportsConflicting() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/ClassImportsConflicting.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("CurrentPackageAndAllUnderImport.kt")
|
||||
public void testCurrentPackageAndAllUnderImport() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/CurrentPackageAndAllUnderImport.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("CurrentPackageAndExplicitImport.kt")
|
||||
public void testCurrentPackageAndExplicitImport() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/CurrentPackageAndExplicitImport.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("CurrentPackageAndExplicitNestedImport.kt")
|
||||
public void testCurrentPackageAndExplicitNestedImport() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/CurrentPackageAndExplicitNestedImport.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("CurrentPackageAndNestedAsteriskImport.kt")
|
||||
public void testCurrentPackageAndNestedAsteriskImport() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/CurrentPackageAndNestedAsteriskImport.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ImportGenericVsPackage.kt")
|
||||
public void testImportGenericVsPackage() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/ImportGenericVsPackage.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ImportProtectedClass.kt")
|
||||
public void testImportProtectedClass() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/ImportProtectedClass.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ImportTwoTimes.kt")
|
||||
public void testImportTwoTimes() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/ImportTwoTimes.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ImportTwoTimesStar.kt")
|
||||
public void testImportTwoTimesStar() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/ImportTwoTimesStar.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("NestedAndTopLevelClassClash.kt")
|
||||
public void testNestedAndTopLevelClassClash() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/NestedAndTopLevelClassClash.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("NestedClassClash.kt")
|
||||
public void testNestedClassClash() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/NestedClassClash.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("PackageExplicitAndStartImport.kt")
|
||||
public void testPackageExplicitAndStartImport() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/PackageExplicitAndStartImport.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("PackagePrivateAndPublicNested.kt")
|
||||
public void testPackagePrivateAndPublicNested() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/PackagePrivateAndPublicNested.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("TopLevelClassVsPackage.kt")
|
||||
public void testTopLevelClassVsPackage() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/TopLevelClassVsPackage.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("TopLevelClassVsPackage2.kt")
|
||||
public void testTopLevelClassVsPackage2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/TopLevelClassVsPackage2.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/javac/diagnostics/tests/inheritance")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Inheritance extends AbstractJavacDiagnosticsTest {
|
||||
public void testAllFilesPresentInInheritance() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/javac/diagnostics/tests/inheritance"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("IheritanceOfInner.kt")
|
||||
public void testIheritanceOfInner() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/IheritanceOfInner.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InheritanceAmbiguity.kt")
|
||||
public void testInheritanceAmbiguity() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InheritanceAmbiguity.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InheritanceAmbiguity2.kt")
|
||||
public void testInheritanceAmbiguity2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InheritanceAmbiguity2.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InheritanceAmbiguity3.kt")
|
||||
public void testInheritanceAmbiguity3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InheritanceAmbiguity3.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InheritanceAmbiguity4.kt")
|
||||
public void testInheritanceAmbiguity4() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InheritanceAmbiguity4.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InheritanceWithKotlin.kt")
|
||||
public void testInheritanceWithKotlin() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InheritanceWithKotlin.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InheritanceWithKotlinClasses.kt")
|
||||
public void testInheritanceWithKotlinClasses() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InheritanceWithKotlinClasses.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InheritedInner.kt")
|
||||
public void testInheritedInner() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InheritedInner.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InheritedInner2.kt")
|
||||
public void testInheritedInner2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InheritedInner2.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InheritedInnerAndSupertypeWithSameName.kt")
|
||||
public void testInheritedInnerAndSupertypeWithSameName() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InheritedInnerAndSupertypeWithSameName.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InheritedInnerUsageInInner.kt")
|
||||
public void testInheritedInnerUsageInInner() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InheritedInnerUsageInInner.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InheritedKotlinInner.kt")
|
||||
public void testInheritedKotlinInner() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InheritedKotlinInner.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InnerAndInheritedInner.kt")
|
||||
public void testInnerAndInheritedInner() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InnerAndInheritedInner.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ManyInheritedClasses.kt")
|
||||
public void testManyInheritedClasses() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/ManyInheritedClasses.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("NoAmbiguity.kt")
|
||||
public void testNoAmbiguity() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/NoAmbiguity.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("NoAmbiguity2.kt")
|
||||
public void testNoAmbiguity2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/NoAmbiguity2.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("SameInnersInSupertypeAndSupertypesSupertype.kt")
|
||||
public void testSameInnersInSupertypeAndSupertypesSupertype() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/SameInnersInSupertypeAndSupertypesSupertype.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("SuperTypeWithSameInner.kt")
|
||||
public void testSuperTypeWithSameInner() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/SuperTypeWithSameInner.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("SupertypeInnerAndTypeParameterWithSameNames.kt")
|
||||
public void testSupertypeInnerAndTypeParameterWithSameNames() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/SupertypeInnerAndTypeParameterWithSameNames.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/javac/diagnostics/tests/inners")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Inners extends AbstractJavacDiagnosticsTest {
|
||||
public void testAllFilesPresentInInners() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/javac/diagnostics/tests/inners"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("ComplexCase.kt")
|
||||
public void testComplexCase() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inners/ComplexCase.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ComplexCase2.kt")
|
||||
public void testComplexCase2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inners/ComplexCase2.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("CurrentPackageAndInner.kt")
|
||||
public void testCurrentPackageAndInner() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inners/CurrentPackageAndInner.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ImportThriceNestedClass.kt")
|
||||
public void testImportThriceNestedClass() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inners/ImportThriceNestedClass.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InnerInInner.kt")
|
||||
public void testInnerInInner() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inners/InnerInInner.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("Nested.kt")
|
||||
public void testNested() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inners/Nested.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ThriceNestedClass.kt")
|
||||
public void testThriceNestedClass() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inners/ThriceNestedClass.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/javac/diagnostics/tests/qualifiedExpression")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class QualifiedExpression extends AbstractJavacDiagnosticsTest {
|
||||
public void testAllFilesPresentInQualifiedExpression() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/javac/diagnostics/tests/qualifiedExpression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("GenericClassVsPackage.kt")
|
||||
public void testGenericClassVsPackage() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/qualifiedExpression/GenericClassVsPackage.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("PackageVsClass.kt")
|
||||
public void testPackageVsClass() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/qualifiedExpression/PackageVsClass.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("PackageVsClass2.kt")
|
||||
public void testPackageVsClass2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/qualifiedExpression/PackageVsClass2.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("PackageVsRootClass.kt")
|
||||
public void testPackageVsRootClass() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/qualifiedExpression/PackageVsRootClass.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("visibleClassVsQualifiedClass.kt")
|
||||
public void testVisibleClassVsQualifiedClass() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/qualifiedExpression/visibleClassVsQualifiedClass.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/javac/diagnostics/tests/typeParameters")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class TypeParameters extends AbstractJavacDiagnosticsTest {
|
||||
public void testAllFilesPresentInTypeParameters() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/javac/diagnostics/tests/typeParameters"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("Clash.kt")
|
||||
public void testClash() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/typeParameters/Clash.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ComplexCase.kt")
|
||||
public void testComplexCase() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/typeParameters/ComplexCase.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InheritedInnerAndTypeParameterWithSameNames.kt")
|
||||
public void testInheritedInnerAndTypeParameterWithSameNames() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/typeParameters/InheritedInnerAndTypeParameterWithSameNames.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InnerWithTypeParameter.kt")
|
||||
public void testInnerWithTypeParameter() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/typeParameters/InnerWithTypeParameter.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("NestedWithInner.kt")
|
||||
public void testNestedWithInner() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/typeParameters/NestedWithInner.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("SeveralInnersWithTypeParameters.kt")
|
||||
public void testSeveralInnersWithTypeParameters() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/typeParameters/SeveralInnersWithTypeParameters.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("TypeParametersInInnerAndOuterWithSameNames.kt")
|
||||
public void testTypeParametersInInnerAndOuterWithSameNames() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/typeParameters/TypeParametersInInnerAndOuterWithSameNames.kt");
|
||||
doTestWithoutJavacWrapper(fileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+143
@@ -0,0 +1,143 @@
|
||||
/*
|
||||
* Copyright 2010-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.checkers.javac;
|
||||
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
||||
import org.jetbrains.kotlin.test.TargetBackend;
|
||||
import org.jetbrains.kotlin.test.TestMetadata;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
|
||||
@SuppressWarnings("all")
|
||||
@TestMetadata("compiler/testData/foreignAnnotations/tests")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public class JavacForeignAnnotationsTestGenerated extends AbstractJavacForeignAnnotationsTest {
|
||||
public void testAllFilesPresentInTests() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotations/tests"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("android.kt")
|
||||
public void testAndroid() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/android.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("aosp.kt")
|
||||
public void testAosp() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/aosp.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("eclipse.kt")
|
||||
public void testEclipse() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/eclipse.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("findBugsSimple.kt")
|
||||
public void testFindBugsSimple() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/findBugsSimple.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("jsr305NullabilityNicknames.kt")
|
||||
public void testJsr305NullabilityNicknames() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityNicknames.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("jsr305Simple.kt")
|
||||
public void testJsr305Simple() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305Simple.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("jsr305Strange.kt")
|
||||
public void testJsr305Strange() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305Strange.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("lombokSimple.kt")
|
||||
public void testLombokSimple() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/lombokSimple.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("rxjava.kt")
|
||||
public void testRxjava() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/rxjava.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/foreignAnnotations/tests/typeQualifierDefault")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class TypeQualifierDefault extends AbstractJavacForeignAnnotationsTest {
|
||||
public void testAllFilesPresentInTypeQualifierDefault() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/typeQualifierDefault"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("fieldsAreNullable.kt")
|
||||
public void testFieldsAreNullable() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/typeQualifierDefault/fieldsAreNullable.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("nullabilityFromOverridden.kt")
|
||||
public void testNullabilityFromOverridden() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/typeQualifierDefault/nullabilityFromOverridden.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("overridingDefaultQualifier.kt")
|
||||
public void testOverridingDefaultQualifier() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/typeQualifierDefault/overridingDefaultQualifier.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("parametersAreNonnullByDefault.kt")
|
||||
public void testParametersAreNonnullByDefault() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/typeQualifierDefault/parametersAreNonnullByDefault.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("parametersAreNonnullByDefaultPackage.kt")
|
||||
public void testParametersAreNonnullByDefaultPackage() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/typeQualifierDefault/parametersAreNonnullByDefaultPackage.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("springNullable.kt")
|
||||
public void testSpringNullable() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/typeQualifierDefault/springNullable.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("springNullablePackage.kt")
|
||||
public void testSpringNullablePackage() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/typeQualifierDefault/springNullablePackage.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -96,11 +96,11 @@ abstract class AbstractCompileJavaAgainstKotlinTest : TestCaseWithTmpdir() {
|
||||
): Boolean {
|
||||
val environment = createEnvironmentWithMockJdkAndIdeaAnnotations(disposable)
|
||||
environment.configuration.put(JVMConfigurationKeys.USE_JAVAC, true)
|
||||
environment.configuration.put(JVMConfigurationKeys.COMPILE_JAVA, true)
|
||||
environment.configuration.put(JVMConfigurationKeys.OUTPUT_DIRECTORY, outDir)
|
||||
environment.configuration.put(CLIConfigurationKeys.MESSAGE_COLLECTOR_KEY, MessageCollector.NONE)
|
||||
environment.registerJavac(javaFiles = javaFiles,
|
||||
kotlinFiles = listOf(KotlinTestUtils.loadJetFile(environment.project, ktFiles.first())),
|
||||
compileJava = true)
|
||||
kotlinFiles = listOf(KotlinTestUtils.loadJetFile(environment.project, ktFiles.first())))
|
||||
if (!ktFiles.isEmpty()) {
|
||||
LoadDescriptorUtil.compileKotlinToDirAndGetModule(ktFiles, outDir, environment)
|
||||
}
|
||||
|
||||
+2
-2
@@ -78,10 +78,10 @@ abstract class AbstractCompileKotlinAgainstJavaTest : TestCaseWithTmpdir() {
|
||||
): Boolean {
|
||||
val environment = createEnvironmentWithMockJdkAndIdeaAnnotations(disposable)
|
||||
environment.configuration.put(JVMConfigurationKeys.USE_JAVAC, true)
|
||||
environment.configuration.put(JVMConfigurationKeys.COMPILE_JAVA, true)
|
||||
environment.configuration.put(JVMConfigurationKeys.OUTPUT_DIRECTORY, outDir)
|
||||
environment.registerJavac(javaFiles = javaFiles,
|
||||
kotlinFiles = listOf(KotlinTestUtils.loadJetFile(environment.project, ktFiles.first())),
|
||||
compileJava = true)
|
||||
kotlinFiles = listOf(KotlinTestUtils.loadJetFile(environment.project, ktFiles.first())))
|
||||
if (!ktFiles.isEmpty()) {
|
||||
LoadDescriptorUtil.compileKotlinToDirAndGetModule(ktFiles, outDir, environment)
|
||||
}
|
||||
|
||||
+18
-6
@@ -126,6 +126,12 @@ public class CompileKotlinAgainstJavaTestGenerated extends AbstractCompileKotlin
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("EnumValues.kt")
|
||||
public void testEnumValues() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/EnumValues.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("Inheritance.kt")
|
||||
public void testInheritance() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/Inheritance.kt");
|
||||
@@ -162,6 +168,12 @@ public class CompileKotlinAgainstJavaTestGenerated extends AbstractCompileKotlin
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InnerWithGenericOuter.kt")
|
||||
public void testInnerWithGenericOuter() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/InnerWithGenericOuter.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("Interface.kt")
|
||||
public void testInterface() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/Interface.kt");
|
||||
@@ -186,6 +198,12 @@ public class CompileKotlinAgainstJavaTestGenerated extends AbstractCompileKotlin
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("JavaLangClass.kt")
|
||||
public void testJavaLangClass() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/JavaLangClass.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ListImpl.kt")
|
||||
public void testListImpl() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/ListImpl.kt");
|
||||
@@ -330,12 +348,6 @@ public class CompileKotlinAgainstJavaTestGenerated extends AbstractCompileKotlin
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("UseKotlinInner.kt")
|
||||
public void testUseKotlinInner() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/UseKotlinInner.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("UseKtClass.kt")
|
||||
public void testUseKtClass() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/UseKtClass.kt");
|
||||
|
||||
+5213
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user