[Test] TestGen: Use canonical class names for generated imports
This is needed to have correct class names for inner/nested classes. For example, to have `import java.util.AbstractMap.SimpleEntry` instead of `import java.util.AbstractMap$SimpleEntry`.
This commit is contained in:
+1
-1
@@ -127,7 +127,7 @@ private class TestGeneratorImplInstance(
|
||||
val realName = when (clazz) {
|
||||
TransformingTestMethodModel.TransformerFunctionsClassPlaceHolder::class.java ->
|
||||
"org.jetbrains.kotlin.test.utils.TransformersFunctions"
|
||||
else -> clazz.name
|
||||
else -> clazz.canonicalName
|
||||
}
|
||||
p.println("import $realName;")
|
||||
}
|
||||
|
||||
+1
-1
@@ -132,7 +132,7 @@ object NewTestGeneratorImpl : TestGenerator(METHOD_GENERATORS) {
|
||||
val realName = when (clazz) {
|
||||
TransformingTestMethodModel.TransformerFunctionsClassPlaceHolder::class.java ->
|
||||
"org.jetbrains.kotlin.test.utils.TransformersFunctions"
|
||||
else -> clazz.name
|
||||
else -> clazz.canonicalName
|
||||
}
|
||||
p.println("import $realName;")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user