Rewrite AbstractNavigateToLibraryTest with light fixture tests
This commit is contained in:
@@ -80,6 +80,7 @@ import org.jetbrains.kotlin.idea.debugger.evaluate.*
|
||||
import org.jetbrains.kotlin.idea.debugger.sequence.exec.AbstractSequenceTraceTestCase
|
||||
import org.jetbrains.kotlin.idea.decompiler.navigation.AbstractNavigateToDecompiledLibraryTest
|
||||
import org.jetbrains.kotlin.idea.decompiler.navigation.AbstractNavigateToLibrarySourceTest
|
||||
import org.jetbrains.kotlin.idea.decompiler.navigation.AbstractNavigateToLibrarySourceTestWithJS
|
||||
import org.jetbrains.kotlin.idea.decompiler.stubBuilder.AbstractClsStubBuilderTest
|
||||
import org.jetbrains.kotlin.idea.decompiler.stubBuilder.AbstractLoadJavaClsStubTest
|
||||
import org.jetbrains.kotlin.idea.decompiler.textBuilder.AbstractCommonDecompiledTextFromJsMetadataTest
|
||||
@@ -248,7 +249,10 @@ fun main(args: Array<String>) {
|
||||
|
||||
testClass<AbstractNavigateToLibrarySourceTest> {
|
||||
model("decompiler/navigation/usercode")
|
||||
model("decompiler/navigation/usercode", testClassName ="UsercodeWithJSModule", testMethod = "doWithJSModuleTest")
|
||||
}
|
||||
|
||||
testClass<AbstractNavigateToLibrarySourceTestWithJS> {
|
||||
model("decompiler/navigation/usercode", testClassName ="UsercodeWithJSModule")
|
||||
}
|
||||
|
||||
testClass<AbstractNavigateToDecompiledLibraryTest> {
|
||||
|
||||
@@ -82,6 +82,7 @@ import org.jetbrains.kotlin.idea.debugger.AbstractSmartStepIntoTest
|
||||
import org.jetbrains.kotlin.idea.debugger.evaluate.*
|
||||
import org.jetbrains.kotlin.idea.decompiler.navigation.AbstractNavigateToDecompiledLibraryTest
|
||||
import org.jetbrains.kotlin.idea.decompiler.navigation.AbstractNavigateToLibrarySourceTest
|
||||
import org.jetbrains.kotlin.idea.decompiler.navigation.AbstractNavigateToLibrarySourceTestWithJS
|
||||
import org.jetbrains.kotlin.idea.decompiler.stubBuilder.AbstractClsStubBuilderTest
|
||||
import org.jetbrains.kotlin.idea.decompiler.stubBuilder.AbstractLoadJavaClsStubTest
|
||||
import org.jetbrains.kotlin.idea.decompiler.textBuilder.AbstractCommonDecompiledTextFromJsMetadataTest
|
||||
@@ -242,7 +243,10 @@ fun main(args: Array<String>) {
|
||||
|
||||
testClass<AbstractNavigateToLibrarySourceTest> {
|
||||
model("decompiler/navigation/usercode")
|
||||
model("decompiler/navigation/usercode", testClassName ="UsercodeWithJSModule", testMethod = "doWithJSModuleTest")
|
||||
}
|
||||
|
||||
testClass<AbstractNavigateToLibrarySourceTestWithJS> {
|
||||
model("decompiler/navigation/usercode", testClassName ="UsercodeWithJSModule")
|
||||
}
|
||||
|
||||
testClass<AbstractNavigateToDecompiledLibraryTest> {
|
||||
|
||||
@@ -82,6 +82,7 @@ import org.jetbrains.kotlin.idea.debugger.AbstractSmartStepIntoTest
|
||||
import org.jetbrains.kotlin.idea.debugger.evaluate.*
|
||||
import org.jetbrains.kotlin.idea.decompiler.navigation.AbstractNavigateToDecompiledLibraryTest
|
||||
import org.jetbrains.kotlin.idea.decompiler.navigation.AbstractNavigateToLibrarySourceTest
|
||||
import org.jetbrains.kotlin.idea.decompiler.navigation.AbstractNavigateToLibrarySourceTestWithJS
|
||||
import org.jetbrains.kotlin.idea.decompiler.stubBuilder.AbstractClsStubBuilderTest
|
||||
import org.jetbrains.kotlin.idea.decompiler.stubBuilder.AbstractLoadJavaClsStubTest
|
||||
import org.jetbrains.kotlin.idea.decompiler.textBuilder.AbstractCommonDecompiledTextFromJsMetadataTest
|
||||
@@ -242,7 +243,10 @@ fun main(args: Array<String>) {
|
||||
|
||||
testClass<AbstractNavigateToLibrarySourceTest> {
|
||||
model("decompiler/navigation/usercode")
|
||||
model("decompiler/navigation/usercode", testClassName ="UsercodeWithJSModule", testMethod = "doWithJSModuleTest")
|
||||
}
|
||||
|
||||
testClass<AbstractNavigateToLibrarySourceTestWithJS> {
|
||||
model("decompiler/navigation/usercode", testClassName ="UsercodeWithJSModule")
|
||||
}
|
||||
|
||||
testClass<AbstractNavigateToDecompiledLibraryTest> {
|
||||
|
||||
@@ -74,6 +74,7 @@ import org.jetbrains.kotlin.idea.debugger.AbstractSmartStepIntoTest
|
||||
import org.jetbrains.kotlin.idea.debugger.evaluate.*
|
||||
import org.jetbrains.kotlin.idea.decompiler.navigation.AbstractNavigateToDecompiledLibraryTest
|
||||
import org.jetbrains.kotlin.idea.decompiler.navigation.AbstractNavigateToLibrarySourceTest
|
||||
import org.jetbrains.kotlin.idea.decompiler.navigation.AbstractNavigateToLibrarySourceTestWithJS
|
||||
import org.jetbrains.kotlin.idea.decompiler.stubBuilder.AbstractClsStubBuilderTest
|
||||
import org.jetbrains.kotlin.idea.decompiler.stubBuilder.AbstractLoadJavaClsStubTest
|
||||
import org.jetbrains.kotlin.idea.decompiler.textBuilder.AbstractCommonDecompiledTextFromJsMetadataTest
|
||||
@@ -234,7 +235,10 @@ fun main(args: Array<String>) {
|
||||
|
||||
testClass<AbstractNavigateToLibrarySourceTest> {
|
||||
model("decompiler/navigation/usercode")
|
||||
model("decompiler/navigation/usercode", testClassName ="UsercodeWithJSModule", testMethod = "doWithJSModuleTest")
|
||||
}
|
||||
|
||||
testClass<AbstractNavigateToLibrarySourceTestWithJS> {
|
||||
model("decompiler/navigation/usercode", testClassName ="UsercodeWithJSModule")
|
||||
}
|
||||
|
||||
testClass<AbstractNavigateToDecompiledLibraryTest> {
|
||||
|
||||
@@ -74,6 +74,7 @@ import org.jetbrains.kotlin.idea.debugger.AbstractSmartStepIntoTest
|
||||
import org.jetbrains.kotlin.idea.debugger.evaluate.*
|
||||
import org.jetbrains.kotlin.idea.decompiler.navigation.AbstractNavigateToDecompiledLibraryTest
|
||||
import org.jetbrains.kotlin.idea.decompiler.navigation.AbstractNavigateToLibrarySourceTest
|
||||
import org.jetbrains.kotlin.idea.decompiler.navigation.AbstractNavigateToLibrarySourceTestWithJS
|
||||
import org.jetbrains.kotlin.idea.decompiler.stubBuilder.AbstractClsStubBuilderTest
|
||||
import org.jetbrains.kotlin.idea.decompiler.stubBuilder.AbstractLoadJavaClsStubTest
|
||||
import org.jetbrains.kotlin.idea.decompiler.textBuilder.AbstractCommonDecompiledTextFromJsMetadataTest
|
||||
@@ -234,7 +235,10 @@ fun main(args: Array<String>) {
|
||||
|
||||
testClass<AbstractNavigateToLibrarySourceTest> {
|
||||
model("decompiler/navigation/usercode")
|
||||
model("decompiler/navigation/usercode", testClassName ="UsercodeWithJSModule", testMethod = "doWithJSModuleTest")
|
||||
}
|
||||
|
||||
testClass<AbstractNavigateToLibrarySourceTestWithJS> {
|
||||
model("decompiler/navigation/usercode", testClassName ="UsercodeWithJSModule")
|
||||
}
|
||||
|
||||
testClass<AbstractNavigateToDecompiledLibraryTest> {
|
||||
|
||||
+28
-28
@@ -28,26 +28,11 @@ import org.jetbrains.kotlin.test.KotlinTestUtils
|
||||
import java.io.File
|
||||
import java.util.*
|
||||
|
||||
abstract class AbstractNavigateToLibraryTest : KotlinCodeInsightTestCase() {
|
||||
|
||||
protected fun doTest(path: String): Unit = doTestEx(path)
|
||||
|
||||
protected fun doWithJSModuleTest(path: String): Unit = doTestEx(path) {
|
||||
val jsModule = this.createModule("js-module")
|
||||
jsModule.configureAs(ModuleKind.KOTLIN_JAVASCRIPT)
|
||||
}
|
||||
|
||||
abstract val withSource: Boolean
|
||||
abstract class AbstractNavigateToLibraryTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
abstract val expectedFileExt: String
|
||||
|
||||
protected fun doTestEx(path: String, additionalConfig: (() -> Unit)? = null) {
|
||||
module.configureAs(getProjectDescriptor())
|
||||
|
||||
if (additionalConfig != null) {
|
||||
additionalConfig()
|
||||
}
|
||||
|
||||
configureByFile(path)
|
||||
protected fun doTest(path: String) {
|
||||
myFixture.configureByFile(path)
|
||||
NavigationChecker.checkAnnotatedCode(file, File(path.replace(".kt", expectedFileExt)))
|
||||
}
|
||||
|
||||
@@ -57,24 +42,39 @@ abstract class AbstractNavigateToLibraryTest : KotlinCodeInsightTestCase() {
|
||||
}
|
||||
|
||||
override fun getTestDataPath(): String =
|
||||
KotlinTestUtils.getHomeDirectory() + File.separator
|
||||
|
||||
|
||||
open fun getProjectDescriptor(): KotlinLightProjectDescriptor =
|
||||
SdkAndMockLibraryProjectDescriptor(
|
||||
PluginTestCaseBase.getTestDataPathBase() + "/decompiler/navigation/library",
|
||||
withSource
|
||||
)
|
||||
KotlinTestUtils.getHomeDirectory() + File.separator
|
||||
}
|
||||
|
||||
abstract class AbstractNavigateToDecompiledLibraryTest : AbstractNavigateToLibraryTest() {
|
||||
override val withSource: Boolean get() = false
|
||||
override val expectedFileExt: String get() = ".decompiled.expected"
|
||||
|
||||
override fun getProjectDescriptor(): KotlinLightProjectDescriptor = PROJECT_DESCRIPTOR
|
||||
|
||||
companion object {
|
||||
private val PROJECT_DESCRIPTOR = SdkAndMockLibraryProjectDescriptor(
|
||||
PluginTestCaseBase.getTestDataPathBase() + "/decompiler/navigation/library", false
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
abstract class AbstractNavigateToLibrarySourceTest : AbstractNavigateToLibraryTest() {
|
||||
override val withSource: Boolean get() = true
|
||||
override val expectedFileExt: String get() = ".source.expected"
|
||||
|
||||
override fun getProjectDescriptor(): KotlinLightProjectDescriptor = PROJECT_DESCRIPTOR
|
||||
|
||||
protected companion object {
|
||||
val PROJECT_DESCRIPTOR = SdkAndMockLibraryProjectDescriptor(
|
||||
PluginTestCaseBase.getTestDataPathBase() + "/decompiler/navigation/library", true
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
abstract class AbstractNavigateToLibrarySourceTestWithJS : AbstractNavigateToLibrarySourceTest() {
|
||||
override fun getProjectDescriptor(): KotlinLightProjectDescriptor = KotlinMultiModuleProjectDescriptor(
|
||||
"AbstractNavigateToLibrarySourceTestWithJS",
|
||||
AbstractNavigateToLibrarySourceTest.PROJECT_DESCRIPTOR,
|
||||
KotlinStdJSProjectDescriptor
|
||||
)
|
||||
}
|
||||
|
||||
class NavigationChecker(val file: PsiFile, val referenceTargetChecker: (PsiElement) -> Unit) {
|
||||
|
||||
idea/tests/org/jetbrains/kotlin/idea/decompiler/navigation/NavigateToLibrarySourceTestGenerated.java
Generated
+66
-157
@@ -17,181 +17,90 @@ 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/decompiler/navigation/usercode")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public class NavigateToLibrarySourceTestGenerated extends AbstractNavigateToLibrarySourceTest {
|
||||
@TestMetadata("idea/testData/decompiler/navigation/usercode")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Usercode extends AbstractNavigateToLibrarySourceTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInUsercode() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/navigation/usercode"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("ClassObject.kt")
|
||||
public void testClassObject() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/ClassObject.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("Constructor.kt")
|
||||
public void testConstructor() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/Constructor.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("Enum.kt")
|
||||
public void testEnum() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/Enum.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ExtensionFunction.kt")
|
||||
public void testExtensionFunction() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/ExtensionFunction.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ExtensionProperty.kt")
|
||||
public void testExtensionProperty() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/ExtensionProperty.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("GenericFunctionWithExplicitlyDeclaredTypeArguments.kt")
|
||||
public void testGenericFunctionWithExplicitlyDeclaredTypeArguments() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/GenericFunctionWithExplicitlyDeclaredTypeArguments.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("GenericFunctionWithInferredTypeArguments.kt")
|
||||
public void testGenericFunctionWithInferredTypeArguments() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/GenericFunctionWithInferredTypeArguments.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("GlobalFunction.kt")
|
||||
public void testGlobalFunction() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/GlobalFunction.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("GlobalProperty.kt")
|
||||
public void testGlobalProperty() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/GlobalProperty.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("NamedObject.kt")
|
||||
public void testNamedObject() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/NamedObject.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("OverloadedFunWithTypeParam.kt")
|
||||
public void testOverloadedFunWithTypeParam() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/OverloadedFunWithTypeParam.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("Property.kt")
|
||||
public void testProperty() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/Property.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("SameNameInDifferentSources.kt")
|
||||
public void testSameNameInDifferentSources() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/SameNameInDifferentSources.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("TypeAlias.kt")
|
||||
public void testTypeAlias() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/TypeAlias.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("TypeWithSameShortName.kt")
|
||||
public void testTypeWithSameShortName() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/TypeWithSameShortName.kt");
|
||||
}
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
|
||||
}
|
||||
|
||||
@TestMetadata("idea/testData/decompiler/navigation/usercode")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class UsercodeWithJSModule extends AbstractNavigateToLibrarySourceTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doWithJSModuleTest, TargetBackend.ANY, testDataFilePath);
|
||||
}
|
||||
public void testAllFilesPresentInUsercode() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/navigation/usercode"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInUsercodeWithJSModule() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/navigation/usercode"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
@TestMetadata("ClassObject.kt")
|
||||
public void testClassObject() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/ClassObject.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ClassObject.kt")
|
||||
public void testClassObject() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/ClassObject.kt");
|
||||
}
|
||||
@TestMetadata("Constructor.kt")
|
||||
public void testConstructor() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/Constructor.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("Constructor.kt")
|
||||
public void testConstructor() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/Constructor.kt");
|
||||
}
|
||||
@TestMetadata("Enum.kt")
|
||||
public void testEnum() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/Enum.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("Enum.kt")
|
||||
public void testEnum() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/Enum.kt");
|
||||
}
|
||||
@TestMetadata("ExtensionFunction.kt")
|
||||
public void testExtensionFunction() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/ExtensionFunction.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ExtensionFunction.kt")
|
||||
public void testExtensionFunction() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/ExtensionFunction.kt");
|
||||
}
|
||||
@TestMetadata("ExtensionProperty.kt")
|
||||
public void testExtensionProperty() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/ExtensionProperty.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ExtensionProperty.kt")
|
||||
public void testExtensionProperty() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/ExtensionProperty.kt");
|
||||
}
|
||||
@TestMetadata("GenericFunctionWithExplicitlyDeclaredTypeArguments.kt")
|
||||
public void testGenericFunctionWithExplicitlyDeclaredTypeArguments() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/GenericFunctionWithExplicitlyDeclaredTypeArguments.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("GenericFunctionWithExplicitlyDeclaredTypeArguments.kt")
|
||||
public void testGenericFunctionWithExplicitlyDeclaredTypeArguments() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/GenericFunctionWithExplicitlyDeclaredTypeArguments.kt");
|
||||
}
|
||||
@TestMetadata("GenericFunctionWithInferredTypeArguments.kt")
|
||||
public void testGenericFunctionWithInferredTypeArguments() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/GenericFunctionWithInferredTypeArguments.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("GenericFunctionWithInferredTypeArguments.kt")
|
||||
public void testGenericFunctionWithInferredTypeArguments() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/GenericFunctionWithInferredTypeArguments.kt");
|
||||
}
|
||||
@TestMetadata("GlobalFunction.kt")
|
||||
public void testGlobalFunction() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/GlobalFunction.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("GlobalFunction.kt")
|
||||
public void testGlobalFunction() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/GlobalFunction.kt");
|
||||
}
|
||||
@TestMetadata("GlobalProperty.kt")
|
||||
public void testGlobalProperty() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/GlobalProperty.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("GlobalProperty.kt")
|
||||
public void testGlobalProperty() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/GlobalProperty.kt");
|
||||
}
|
||||
@TestMetadata("NamedObject.kt")
|
||||
public void testNamedObject() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/NamedObject.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("NamedObject.kt")
|
||||
public void testNamedObject() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/NamedObject.kt");
|
||||
}
|
||||
@TestMetadata("OverloadedFunWithTypeParam.kt")
|
||||
public void testOverloadedFunWithTypeParam() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/OverloadedFunWithTypeParam.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("OverloadedFunWithTypeParam.kt")
|
||||
public void testOverloadedFunWithTypeParam() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/OverloadedFunWithTypeParam.kt");
|
||||
}
|
||||
@TestMetadata("Property.kt")
|
||||
public void testProperty() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/Property.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("Property.kt")
|
||||
public void testProperty() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/Property.kt");
|
||||
}
|
||||
@TestMetadata("SameNameInDifferentSources.kt")
|
||||
public void testSameNameInDifferentSources() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/SameNameInDifferentSources.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("SameNameInDifferentSources.kt")
|
||||
public void testSameNameInDifferentSources() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/SameNameInDifferentSources.kt");
|
||||
}
|
||||
@TestMetadata("TypeAlias.kt")
|
||||
public void testTypeAlias() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/TypeAlias.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("TypeAlias.kt")
|
||||
public void testTypeAlias() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/TypeAlias.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("TypeWithSameShortName.kt")
|
||||
public void testTypeWithSameShortName() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/TypeWithSameShortName.kt");
|
||||
}
|
||||
@TestMetadata("TypeWithSameShortName.kt")
|
||||
public void testTypeWithSameShortName() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/TypeWithSameShortName.kt");
|
||||
}
|
||||
}
|
||||
|
||||
+106
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||
* that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.idea.decompiler.navigation;
|
||||
|
||||
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("idea/testData/decompiler/navigation/usercode")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public class NavigateToLibrarySourceTestWithJSGenerated extends AbstractNavigateToLibrarySourceTestWithJS {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInUsercodeWithJSModule() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/navigation/usercode"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("ClassObject.kt")
|
||||
public void testClassObject() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/ClassObject.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("Constructor.kt")
|
||||
public void testConstructor() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/Constructor.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("Enum.kt")
|
||||
public void testEnum() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/Enum.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ExtensionFunction.kt")
|
||||
public void testExtensionFunction() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/ExtensionFunction.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ExtensionProperty.kt")
|
||||
public void testExtensionProperty() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/ExtensionProperty.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("GenericFunctionWithExplicitlyDeclaredTypeArguments.kt")
|
||||
public void testGenericFunctionWithExplicitlyDeclaredTypeArguments() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/GenericFunctionWithExplicitlyDeclaredTypeArguments.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("GenericFunctionWithInferredTypeArguments.kt")
|
||||
public void testGenericFunctionWithInferredTypeArguments() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/GenericFunctionWithInferredTypeArguments.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("GlobalFunction.kt")
|
||||
public void testGlobalFunction() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/GlobalFunction.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("GlobalProperty.kt")
|
||||
public void testGlobalProperty() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/GlobalProperty.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("NamedObject.kt")
|
||||
public void testNamedObject() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/NamedObject.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("OverloadedFunWithTypeParam.kt")
|
||||
public void testOverloadedFunWithTypeParam() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/OverloadedFunWithTypeParam.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("Property.kt")
|
||||
public void testProperty() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/Property.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("SameNameInDifferentSources.kt")
|
||||
public void testSameNameInDifferentSources() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/SameNameInDifferentSources.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("TypeAlias.kt")
|
||||
public void testTypeAlias() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/TypeAlias.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("TypeWithSameShortName.kt")
|
||||
public void testTypeWithSameShortName() throws Exception {
|
||||
runTest("idea/testData/decompiler/navigation/usercode/TypeWithSameShortName.kt");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user