[kotlin] k2 extract function: additional test data

^KTIJ-23318 fixed

GitOrigin-RevId: 7e8b8a21e1a5051ae8ab7b7b07ec1ef3370d018e
This commit is contained in:
Anna Kozlova
2024-03-27 19:30:40 +00:00
committed by intellij-monorepo-bot
parent bcf544ad48
commit be5bf8b03b
4 changed files with 30 additions and 0 deletions
@@ -2681,6 +2681,11 @@ public abstract class ExtractionTestGenerated extends AbstractExtractionTest {
runTest("testData/refactoring/extractFunction/stringTemplates/multipleEntriesWithSuffix.kt");
}
@TestMetadata("propertyFromReceiver.kt")
public void testPropertyFromReceiver() throws Exception {
runTest("testData/refactoring/extractFunction/stringTemplates/propertyFromReceiver.kt");
}
@TestMetadata("rawTemplateWithSubstring.kt")
public void testRawTemplateWithSubstring() throws Exception {
runTest("testData/refactoring/extractFunction/stringTemplates/rawTemplateWithSubstring.kt");
@@ -0,0 +1,9 @@
import kotlin.reflect.KClass
internal fun KClass<*>.serializerNotRegistered(): Nothing {
throw IllegalStateException(
<selection>"Serializer for class '${simpleName}' is not found.\n" +
"Mark the class as @Serializable or provide the serializer explicitly."</selection>
)
}
// IGNORE_K1
@@ -0,0 +1,11 @@
import kotlin.reflect.KClass
internal fun KClass<*>.serializerNotRegistered(): Nothing {
throw IllegalStateException(
string()
)
}
private fun KClass<*>.string(): String = "Serializer for class '${simpleName}' is not found.\n" +
"Mark the class as @Serializable or provide the serializer explicitly."
// IGNORE_K1
@@ -1816,6 +1816,11 @@ public abstract class K2IntroduceFunctionTestGenerated extends AbstractK2Introdu
runTest("../../idea/tests/testData/refactoring/extractFunction/stringTemplates/multipleEntriesWithSuffix.kt");
}
@TestMetadata("propertyFromReceiver.kt")
public void testPropertyFromReceiver() throws Exception {
runTest("../../idea/tests/testData/refactoring/extractFunction/stringTemplates/propertyFromReceiver.kt");
}
@TestMetadata("rawTemplateWithSubstring.kt")
public void testRawTemplateWithSubstring() throws Exception {
runTest("../../idea/tests/testData/refactoring/extractFunction/stringTemplates/rawTemplateWithSubstring.kt");