Minor. Moved test data to subdirectory.
This commit is contained in:
@@ -27,9 +27,11 @@ import com.intellij.psi.PsiDocumentManager;
|
|||||||
import com.intellij.psi.PsiElement;
|
import com.intellij.psi.PsiElement;
|
||||||
import com.intellij.rt.execution.junit.FileComparisonFailure;
|
import com.intellij.rt.execution.junit.FileComparisonFailure;
|
||||||
import com.intellij.testFramework.ExpectedHighlightingData;
|
import com.intellij.testFramework.ExpectedHighlightingData;
|
||||||
|
import com.intellij.testFramework.LightProjectDescriptor;
|
||||||
import com.intellij.util.containers.ContainerUtil;
|
import com.intellij.util.containers.ContainerUtil;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.kotlin.idea.JetLightCodeInsightFixtureTestCase;
|
import org.jetbrains.kotlin.idea.JetLightCodeInsightFixtureTestCase;
|
||||||
|
import org.jetbrains.kotlin.idea.JetWithJdkAndRuntimeLightProjectDescriptor;
|
||||||
import org.jetbrains.kotlin.idea.PluginTestCaseBase;
|
import org.jetbrains.kotlin.idea.PluginTestCaseBase;
|
||||||
import org.jetbrains.kotlin.idea.highlighter.markers.SuperDeclarationMarkerNavigationHandler;
|
import org.jetbrains.kotlin.idea.highlighter.markers.SuperDeclarationMarkerNavigationHandler;
|
||||||
import org.jetbrains.kotlin.idea.navigation.NavigationTestUtils;
|
import org.jetbrains.kotlin.idea.navigation.NavigationTestUtils;
|
||||||
@@ -54,6 +56,12 @@ public abstract class AbstractLineMarkersTest extends JetLightCodeInsightFixture
|
|||||||
return PluginTestCaseBase.TEST_DATA_PROJECT_RELATIVE + "/codeInsight/lineMarker";
|
return PluginTestCaseBase.TEST_DATA_PROJECT_RELATIVE + "/codeInsight/lineMarker";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
@Override
|
||||||
|
protected LightProjectDescriptor getProjectDescriptor() {
|
||||||
|
return JetWithJdkAndRuntimeLightProjectDescriptor.INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
public void doTest(String path) {
|
public void doTest(String path) {
|
||||||
try {
|
try {
|
||||||
myFixture.configureByFile(path);
|
myFixture.configureByFile(path);
|
||||||
@@ -76,7 +84,7 @@ public abstract class AbstractLineMarkersTest extends JetLightCodeInsightFixture
|
|||||||
catch (AssertionError error) {
|
catch (AssertionError error) {
|
||||||
try {
|
try {
|
||||||
String actualTextWithTestData = TagsTestDataUtil.insertInfoTags(markers, true, myFixture.getFile().getText());
|
String actualTextWithTestData = TagsTestDataUtil.insertInfoTags(markers, true, myFixture.getFile().getText());
|
||||||
JetTestUtils.assertEqualsToFile(new File(getTestDataPath(), fileName()), actualTextWithTestData);
|
JetTestUtils.assertEqualsToFile(new File(path), actualTextWithTestData);
|
||||||
}
|
}
|
||||||
catch (FileComparisonFailure failure) {
|
catch (FileComparisonFailure failure) {
|
||||||
throw new FileComparisonFailure(error.getMessage() + "\n" + failure.getMessage(),
|
throw new FileComparisonFailure(error.getMessage() + "\n" + failure.getMessage(),
|
||||||
|
|||||||
@@ -30,141 +30,153 @@ import java.util.regex.Pattern;
|
|||||||
@SuppressWarnings("all")
|
@SuppressWarnings("all")
|
||||||
@TestMetadata("idea/testData/codeInsight/lineMarker")
|
@TestMetadata("idea/testData/codeInsight/lineMarker")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@InnerTestClasses({
|
||||||
|
LineMarkersTestGenerated.OverrideImplement.class,
|
||||||
|
})
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public class LineMarkersTestGenerated extends AbstractLineMarkersTest {
|
public class LineMarkersTestGenerated extends AbstractLineMarkersTest {
|
||||||
public void testAllFilesPresentInLineMarker() throws Exception {
|
public void testAllFilesPresentInLineMarker() throws Exception {
|
||||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/lineMarker"), Pattern.compile("^(.+)\\.kt$"), true);
|
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/lineMarker"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("BadCodeNoExceptions.kt")
|
@TestMetadata("idea/testData/codeInsight/lineMarker/overrideImplement")
|
||||||
public void testBadCodeNoExceptions() throws Exception {
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/BadCodeNoExceptions.kt");
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
doTest(fileName);
|
public static class OverrideImplement extends AbstractLineMarkersTest {
|
||||||
}
|
public void testAllFilesPresentInOverrideImplement() throws Exception {
|
||||||
|
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/lineMarker/overrideImplement"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("Class.kt")
|
@TestMetadata("BadCodeNoExceptions.kt")
|
||||||
public void testClass() throws Exception {
|
public void testBadCodeNoExceptions() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/Class.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/BadCodeNoExceptions.kt");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("ClassObjectInStaticNestedClass.kt")
|
@TestMetadata("Class.kt")
|
||||||
public void testClassObjectInStaticNestedClass() throws Exception {
|
public void testClass() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/ClassObjectInStaticNestedClass.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/Class.kt");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("DelegatedFun.kt")
|
@TestMetadata("ClassObjectInStaticNestedClass.kt")
|
||||||
public void testDelegatedFun() throws Exception {
|
public void testClassObjectInStaticNestedClass() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/DelegatedFun.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/ClassObjectInStaticNestedClass.kt");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("DelegatedProperty.kt")
|
@TestMetadata("DelegatedFun.kt")
|
||||||
public void testDelegatedProperty() throws Exception {
|
public void testDelegatedFun() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/DelegatedProperty.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/DelegatedFun.kt");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("FakeOverrideForClasses.kt")
|
@TestMetadata("DelegatedProperty.kt")
|
||||||
public void testFakeOverrideForClasses() throws Exception {
|
public void testDelegatedProperty() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/FakeOverrideForClasses.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/DelegatedProperty.kt");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("FakeOverrideFun.kt")
|
@TestMetadata("FakeOverrideForClasses.kt")
|
||||||
public void testFakeOverrideFun() throws Exception {
|
public void testFakeOverrideForClasses() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/FakeOverrideFun.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/FakeOverrideForClasses.kt");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("FakeOverrideFunWithMostRelevantImplementation.kt")
|
@TestMetadata("FakeOverrideFun.kt")
|
||||||
public void testFakeOverrideFunWithMostRelevantImplementation() throws Exception {
|
public void testFakeOverrideFun() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/FakeOverrideFunWithMostRelevantImplementation.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/FakeOverrideFun.kt");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("FakeOverrideProperty.kt")
|
@TestMetadata("FakeOverrideFunWithMostRelevantImplementation.kt")
|
||||||
public void testFakeOverrideProperty() throws Exception {
|
public void testFakeOverrideFunWithMostRelevantImplementation() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/FakeOverrideProperty.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/FakeOverrideFunWithMostRelevantImplementation.kt");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("FakeOverrideToStringInTrait.kt")
|
@TestMetadata("FakeOverrideProperty.kt")
|
||||||
public void testFakeOverrideToStringInTrait() throws Exception {
|
public void testFakeOverrideProperty() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/FakeOverrideToStringInTrait.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/FakeOverrideProperty.kt");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("FakeOverridesForTraitFunWithImpl.kt")
|
@TestMetadata("FakeOverrideToStringInTrait.kt")
|
||||||
public void testFakeOverridesForTraitFunWithImpl() throws Exception {
|
public void testFakeOverrideToStringInTrait() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/FakeOverridesForTraitFunWithImpl.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/FakeOverrideToStringInTrait.kt");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("NavigateToSeveralSuperElements.kt")
|
@TestMetadata("FakeOverridesForTraitFunWithImpl.kt")
|
||||||
public void testNavigateToSeveralSuperElements() throws Exception {
|
public void testFakeOverridesForTraitFunWithImpl() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/NavigateToSeveralSuperElements.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/FakeOverridesForTraitFunWithImpl.kt");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("NoOverridingMarkerOnDefaultTraitImpl.kt")
|
@TestMetadata("NavigateToSeveralSuperElements.kt")
|
||||||
public void testNoOverridingMarkerOnDefaultTraitImpl() throws Exception {
|
public void testNavigateToSeveralSuperElements() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/NoOverridingMarkerOnDefaultTraitImpl.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/NavigateToSeveralSuperElements.kt");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("Overloads.kt")
|
@TestMetadata("NoOverridingMarkerOnDefaultTraitImpl.kt")
|
||||||
public void testOverloads() throws Exception {
|
public void testNoOverridingMarkerOnDefaultTraitImpl() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/Overloads.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/NoOverridingMarkerOnDefaultTraitImpl.kt");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("OverrideFunction.kt")
|
@TestMetadata("Overloads.kt")
|
||||||
public void testOverrideFunction() throws Exception {
|
public void testOverloads() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/OverrideFunction.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/Overloads.kt");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("OverrideIconForOverloadMethodBug.kt")
|
@TestMetadata("OverrideFunction.kt")
|
||||||
public void testOverrideIconForOverloadMethodBug() throws Exception {
|
public void testOverrideFunction() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/OverrideIconForOverloadMethodBug.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/OverrideFunction.kt");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("OverrideMemberOfAbstractClass.kt")
|
@TestMetadata("OverrideIconForOverloadMethodBug.kt")
|
||||||
public void testOverrideMemberOfAbstractClass() throws Exception {
|
public void testOverrideIconForOverloadMethodBug() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/OverrideMemberOfAbstractClass.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/OverrideIconForOverloadMethodBug.kt");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("OverridenTraitDeclarations.kt")
|
@TestMetadata("OverrideMemberOfAbstractClass.kt")
|
||||||
public void testOverridenTraitDeclarations() throws Exception {
|
public void testOverrideMemberOfAbstractClass() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/OverridenTraitDeclarations.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/OverrideMemberOfAbstractClass.kt");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("OverridingTooltipOnDefaultTraitImpl.kt")
|
@TestMetadata("OverridenTraitDeclarations.kt")
|
||||||
public void testOverridingTooltipOnDefaultTraitImpl() throws Exception {
|
public void testOverridenTraitDeclarations() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/OverridingTooltipOnDefaultTraitImpl.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/OverridenTraitDeclarations.kt");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("PropertyOverride.kt")
|
@TestMetadata("OverridingTooltipOnDefaultTraitImpl.kt")
|
||||||
public void testPropertyOverride() throws Exception {
|
public void testOverridingTooltipOnDefaultTraitImpl() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/PropertyOverride.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/OverridingTooltipOnDefaultTraitImpl.kt");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("ToStringInTrait.kt")
|
@TestMetadata("PropertyOverride.kt")
|
||||||
public void testToStringInTrait() throws Exception {
|
public void testPropertyOverride() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/ToStringInTrait.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/PropertyOverride.kt");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("Trait.kt")
|
@TestMetadata("ToStringInTrait.kt")
|
||||||
public void testTrait() throws Exception {
|
public void testToStringInTrait() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/Trait.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/ToStringInTrait.kt");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("Trait.kt")
|
||||||
|
public void testTrait() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/Trait.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user