JetCotoImplementationTest -> KotlinGotoImplementationTestGenerated
This commit is contained in:
@@ -72,6 +72,7 @@ import org.jetbrains.kotlin.idea.intentions.AbstractIntentionTest
|
|||||||
import org.jetbrains.kotlin.idea.intentions.declarations.AbstractJoinLinesTest
|
import org.jetbrains.kotlin.idea.intentions.declarations.AbstractJoinLinesTest
|
||||||
import org.jetbrains.kotlin.idea.kdoc.AbstractKDocHighlightingTest
|
import org.jetbrains.kotlin.idea.kdoc.AbstractKDocHighlightingTest
|
||||||
import org.jetbrains.kotlin.idea.navigation.AbstractGotoSuperTest
|
import org.jetbrains.kotlin.idea.navigation.AbstractGotoSuperTest
|
||||||
|
import org.jetbrains.kotlin.idea.navigation.AbstractKotlinGotoImplementationTest
|
||||||
import org.jetbrains.kotlin.idea.navigation.AbstractKotlinGotoTest
|
import org.jetbrains.kotlin.idea.navigation.AbstractKotlinGotoTest
|
||||||
import org.jetbrains.kotlin.idea.parameterInfo.AbstractFunctionParameterInfoTest
|
import org.jetbrains.kotlin.idea.parameterInfo.AbstractFunctionParameterInfoTest
|
||||||
import org.jetbrains.kotlin.idea.quickfix.AbstractQuickFixMultiFileTest
|
import org.jetbrains.kotlin.idea.quickfix.AbstractQuickFixMultiFileTest
|
||||||
@@ -407,6 +408,10 @@ fun main(args: Array<String>) {
|
|||||||
model("navigation/gotoSymbol", testMethod = "doSymbolTest")
|
model("navigation/gotoSymbol", testMethod = "doSymbolTest")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
testClass(javaClass<AbstractKotlinGotoImplementationTest>()) {
|
||||||
|
model("navigation/implementations", recursive = false)
|
||||||
|
}
|
||||||
|
|
||||||
testClass(javaClass<AbstractQuickFixMultiFileTest>()) {
|
testClass(javaClass<AbstractQuickFixMultiFileTest>()) {
|
||||||
model("quickfix", pattern = """^(\w+)\.before\.Main\.kt$""", testMethod = "doTestWithExtraFile")
|
model("quickfix", pattern = """^(\w+)\.before\.Main\.kt$""", testMethod = "doTestWithExtraFile")
|
||||||
}
|
}
|
||||||
|
|||||||
+37
@@ -0,0 +1,37 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2010-2015 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.idea.navigation
|
||||||
|
|
||||||
|
import com.intellij.openapi.projectRoots.Sdk
|
||||||
|
import com.intellij.testFramework.LightCodeInsightTestCase
|
||||||
|
import com.intellij.testFramework.LightPlatformCodeInsightTestCase
|
||||||
|
import org.jetbrains.kotlin.idea.PluginTestCaseBase
|
||||||
|
import org.jetbrains.kotlin.test.JetTestUtils
|
||||||
|
import java.io.File
|
||||||
|
|
||||||
|
public abstract class AbstractKotlinGotoImplementationTest : LightCodeInsightTestCase() {
|
||||||
|
|
||||||
|
override fun getTestDataPath(): String = JetTestUtils.getHomeDirectory() + File.separator
|
||||||
|
|
||||||
|
override fun getProjectJDK(): Sdk = PluginTestCaseBase.mockJdk()
|
||||||
|
|
||||||
|
protected fun doTest(path: String) {
|
||||||
|
configureByFile(path)
|
||||||
|
val gotoData = NavigationTestUtils.invokeGotoImplementations(LightPlatformCodeInsightTestCase.getEditor(), LightPlatformCodeInsightTestCase.getFile())
|
||||||
|
NavigationTestUtils.assertGotoImplementations(LightPlatformCodeInsightTestCase.getEditor(), gotoData)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2010-2015 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.idea.navigation;
|
|
||||||
|
|
||||||
import com.intellij.codeInsight.navigation.GotoTargetHandler;
|
|
||||||
import com.intellij.openapi.projectRoots.Sdk;
|
|
||||||
import com.intellij.testFramework.LightCodeInsightTestCase;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
import org.jetbrains.kotlin.idea.PluginTestCaseBase;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
|
|
||||||
public class JetGotoImplementationTest extends LightCodeInsightTestCase {
|
|
||||||
public void testClassNavigation() {
|
|
||||||
doTest();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testClassImplementorsWithDeclaration() {
|
|
||||||
doTest();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testAbstractClassImplementorsWithDeclaration() {
|
|
||||||
doTest();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testTraitImplementorsWithDeclaration() {
|
|
||||||
doTest();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testFunctionOverrideNavigation() {
|
|
||||||
doTest();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testPropertyOverriddenNavigation() {
|
|
||||||
doTest();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testConstructorPropertyOverriddenNavigation() {
|
|
||||||
doTest();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testOverridesInEnumEntries() {
|
|
||||||
doTest();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testEnumEntriesInheritance() {
|
|
||||||
doTest();
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
protected String getTestDataPath() {
|
|
||||||
return new File(PluginTestCaseBase.getTestDataPathBase(), "/navigation/implementations").getPath() +
|
|
||||||
File.separator;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected Sdk getProjectJDK() {
|
|
||||||
return PluginTestCaseBase.mockJdk();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void doTest() {
|
|
||||||
configureByFile(getTestName(false) + ".kt");
|
|
||||||
GotoTargetHandler.GotoData gotoData = NavigationTestUtils.invokeGotoImplementations(getEditor(), getFile());
|
|
||||||
NavigationTestUtils.assertGotoImplementations(getEditor(), gotoData);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+92
@@ -0,0 +1,92 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2010-2015 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.idea.navigation;
|
||||||
|
|
||||||
|
import com.intellij.testFramework.TestDataPath;
|
||||||
|
import org.jetbrains.kotlin.test.InnerTestClasses;
|
||||||
|
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
|
||||||
|
import org.jetbrains.kotlin.test.JetTestUtils;
|
||||||
|
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("idea/testData/navigation/implementations")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public class KotlinGotoImplementationTestGenerated extends AbstractKotlinGotoImplementationTest {
|
||||||
|
@TestMetadata("AbstractClassImplementorsWithDeclaration.kt")
|
||||||
|
public void testAbstractClassImplementorsWithDeclaration() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/navigation/implementations/AbstractClassImplementorsWithDeclaration.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInImplementations() throws Exception {
|
||||||
|
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/navigation/implementations"), Pattern.compile("^(.+)\\.kt$"), false);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("ClassImplementorsWithDeclaration.kt")
|
||||||
|
public void testClassImplementorsWithDeclaration() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/navigation/implementations/ClassImplementorsWithDeclaration.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("ClassNavigation.kt")
|
||||||
|
public void testClassNavigation() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/navigation/implementations/ClassNavigation.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("ConstructorPropertyOverriddenNavigation.kt")
|
||||||
|
public void testConstructorPropertyOverriddenNavigation() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/navigation/implementations/ConstructorPropertyOverriddenNavigation.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("EnumEntriesInheritance.kt")
|
||||||
|
public void testEnumEntriesInheritance() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/navigation/implementations/EnumEntriesInheritance.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("FunctionOverrideNavigation.kt")
|
||||||
|
public void testFunctionOverrideNavigation() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/navigation/implementations/FunctionOverrideNavigation.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("OverridesInEnumEntries.kt")
|
||||||
|
public void testOverridesInEnumEntries() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/navigation/implementations/OverridesInEnumEntries.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("PropertyOverriddenNavigation.kt")
|
||||||
|
public void testPropertyOverriddenNavigation() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/navigation/implementations/PropertyOverriddenNavigation.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("TraitImplementorsWithDeclaration.kt")
|
||||||
|
public void testTraitImplementorsWithDeclaration() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/navigation/implementations/TraitImplementorsWithDeclaration.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user