mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[kotlin] k2 extract function: test data for fixed return type approximation
^KTIJ-29779 fixed GitOrigin-RevId: d468599b4b5052f906634038d5ff2b86d115a631
This commit is contained in:
committed by
intellij-monorepo-bot
parent
a1814a7434
commit
2eaf22b89a
+5
@@ -868,6 +868,11 @@ public abstract class ExtractionTestGenerated extends AbstractExtractionTest {
|
||||
KotlinTestUtils.runTest(this::doExtractFunctionTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
@TestMetadata("approximatedReturnType.kt")
|
||||
public void testApproximatedReturnType() throws Exception {
|
||||
runTest("testData/refactoring/extractFunction/basic/approximatedReturnType.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("callWithLambdaArgument.kt")
|
||||
public void testCallWithLambdaArgument() throws Exception {
|
||||
runTest("testData/refactoring/extractFunction/basic/callWithLambdaArgument.kt");
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
class SimpleClass
|
||||
|
||||
fun findClasses() {
|
||||
val classloader = Alias::class.java.classLoader
|
||||
val obj = <selection>classloader?.loadClass("")?.kotlin</selection>
|
||||
}
|
||||
|
||||
// IGNORE_K1
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
class SimpleClass
|
||||
|
||||
fun findClasses() {
|
||||
val classloader = Alias::class.java.classLoader
|
||||
val obj = klass(classloader)
|
||||
}
|
||||
|
||||
private fun klass(classloader: ClassLoader?): KClass<out Any>? = classloader?.loadClass("")?.kotlin
|
||||
|
||||
// IGNORE_K1
|
||||
+5
@@ -26,6 +26,11 @@ public abstract class K2IntroduceFunctionTestGenerated extends AbstractK2Introdu
|
||||
KotlinTestUtils.runTest(this::doExtractFunctionTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
@TestMetadata("approximatedReturnType.kt")
|
||||
public void testApproximatedReturnType() throws Exception {
|
||||
runTest("../../idea/tests/testData/refactoring/extractFunction/basic/approximatedReturnType.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("callWithLambdaArgument.kt")
|
||||
public void testCallWithLambdaArgument() throws Exception {
|
||||
runTest("../../idea/tests/testData/refactoring/extractFunction/basic/callWithLambdaArgument.kt");
|
||||
|
||||
Reference in New Issue
Block a user