javac-wrapper: identifier resolver

This commit is contained in:
baratynskiy
2017-08-03 11:22:32 +03:00
committed by Alexander Baratynskiy
parent 01883a41cb
commit 4f180e1292
30 changed files with 1256 additions and 192 deletions
@@ -44,12 +44,6 @@ public class JavacDiagnosticsTestGenerated extends AbstractJavacDiagnosticsTest
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)
@@ -440,12 +434,6 @@ public class JavacDiagnosticsTestGenerated extends AbstractJavacDiagnosticsTest
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)
@@ -0,0 +1,146 @@
/*
* 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 JavacFieldResolutionTestGenerated extends AbstractJavacFieldResolutionTest {
@TestMetadata("compiler/testData/javac/fieldsResolution/tests")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Tests extends AbstractJavacFieldResolutionTest {
public void testAllFilesPresentInTests() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/javac/fieldsResolution/tests"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
}
@TestMetadata("AsteriskStaticImportsAmbiguity.kt")
public void testAsteriskStaticImportsAmbiguity() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/fieldsResolution/tests/AsteriskStaticImportsAmbiguity.kt");
doTest(fileName);
}
@TestMetadata("ConstantValues.kt")
public void testConstantValues() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/fieldsResolution/tests/ConstantValues.kt");
doTest(fileName);
}
@TestMetadata("FieldFromOuterClass.kt")
public void testFieldFromOuterClass() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/fieldsResolution/tests/FieldFromOuterClass.kt");
doTest(fileName);
}
@TestMetadata("InheritedField.kt")
public void testInheritedField() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/fieldsResolution/tests/InheritedField.kt");
doTest(fileName);
}
@TestMetadata("ResolutionPriority.kt")
public void testResolutionPriority() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/fieldsResolution/tests/ResolutionPriority.kt");
doTest(fileName);
}
@TestMetadata("SameFieldInSupertypes.kt")
public void testSameFieldInSupertypes() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/fieldsResolution/tests/SameFieldInSupertypes.kt");
doTest(fileName);
}
@TestMetadata("StaticImport.kt")
public void testStaticImport() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/fieldsResolution/tests/StaticImport.kt");
doTest(fileName);
}
@TestMetadata("StaticImportsAmbiguity.kt")
public void testStaticImportsAmbiguity() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/fieldsResolution/tests/StaticImportsAmbiguity.kt");
doTest(fileName);
}
}
@TestMetadata("compiler/testData/javac/fieldsResolution/tests")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class TestsWithoutJavac extends AbstractJavacFieldResolutionTest {
public void testAllFilesPresentInTestsWithoutJavac() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/javac/fieldsResolution/tests"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
}
@TestMetadata("AsteriskStaticImportsAmbiguity.kt")
public void testAsteriskStaticImportsAmbiguity() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/fieldsResolution/tests/AsteriskStaticImportsAmbiguity.kt");
doTestWithoutJavacWrapper(fileName);
}
@TestMetadata("ConstantValues.kt")
public void testConstantValues() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/fieldsResolution/tests/ConstantValues.kt");
doTestWithoutJavacWrapper(fileName);
}
@TestMetadata("FieldFromOuterClass.kt")
public void testFieldFromOuterClass() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/fieldsResolution/tests/FieldFromOuterClass.kt");
doTestWithoutJavacWrapper(fileName);
}
@TestMetadata("InheritedField.kt")
public void testInheritedField() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/fieldsResolution/tests/InheritedField.kt");
doTestWithoutJavacWrapper(fileName);
}
@TestMetadata("ResolutionPriority.kt")
public void testResolutionPriority() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/fieldsResolution/tests/ResolutionPriority.kt");
doTestWithoutJavacWrapper(fileName);
}
@TestMetadata("SameFieldInSupertypes.kt")
public void testSameFieldInSupertypes() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/fieldsResolution/tests/SameFieldInSupertypes.kt");
doTestWithoutJavacWrapper(fileName);
}
@TestMetadata("StaticImport.kt")
public void testStaticImport() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/fieldsResolution/tests/StaticImport.kt");
doTestWithoutJavacWrapper(fileName);
}
@TestMetadata("StaticImportsAmbiguity.kt")
public void testStaticImportsAmbiguity() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/fieldsResolution/tests/StaticImportsAmbiguity.kt");
doTestWithoutJavacWrapper(fileName);
}
}
}