KTIJ-27841 [AA] Add simple test cases for the classes with same name conflicts

This commit is contained in:
Roman Golyshev
2024-01-10 21:44:32 +01:00
committed by teamcity
parent 0e244b3fbf
commit 1e2f612cbc
21 changed files with 358 additions and 0 deletions
@@ -0,0 +1,14 @@
// FILE: main.kt
package test
class MyFoo
fun constructorCall = MyFoo()
val myDepFoo = <expr>dependency.MyFoo()</expr>
// FILE: dependency.kt
package dependency
class MyFoo
@@ -0,0 +1,8 @@
Before shortening: dependency.MyFoo()
with default settings:
[qualifier] dependency.MyFoo()
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
with SHORTEN_AND_IMPORT:
[qualifier] dependency.MyFoo()
with SHORTEN_AND_STAR_IMPORT:
@@ -0,0 +1,12 @@
// FILE: main.kt
package test
class MyFoo
val myFoo = <expr>dependency.MyFoo()</expr>
// FILE: dependency.kt
package dependency
class MyFoo
@@ -0,0 +1,8 @@
Before shortening: dependency.MyFoo()
with default settings:
[qualifier] dependency.MyFoo()
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
with SHORTEN_AND_IMPORT:
[qualifier] dependency.MyFoo()
with SHORTEN_AND_STAR_IMPORT:
@@ -0,0 +1,14 @@
// FILE: main.kt
package test
class MyFoo
val typeRef: MyFoo
val myFoo = <expr>dependency.MyFoo()</expr>
// FILE: dependency.kt
package dependency
class MyFoo
@@ -0,0 +1,8 @@
Before shortening: dependency.MyFoo()
with default settings:
[qualifier] dependency.MyFoo()
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
with SHORTEN_AND_IMPORT:
[qualifier] dependency.MyFoo()
with SHORTEN_AND_STAR_IMPORT:
@@ -0,0 +1,16 @@
// FILE: main.kt
package test
class MyFoo
val constructorCall = MyFoo()
val nested = <expr>dependency.MyFoo</expr>.Nested()
// FILE: dependency.kt
package dependency
class MyFoo {
class Nested
}
@@ -0,0 +1,6 @@
Before shortening: dependency.MyFoo
with default settings:
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
with SHORTEN_AND_IMPORT:
with SHORTEN_AND_STAR_IMPORT:
@@ -0,0 +1,14 @@
// FILE: main.kt
package test
class MyFoo
val nested = <expr>dependency.MyFoo</expr>.Nested()
// FILE: dependency.kt
package dependency
class MyFoo {
class Nested
}
@@ -0,0 +1,8 @@
Before shortening: dependency.MyFoo
with default settings:
[qualifier] dependency.MyFoo
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
with SHORTEN_AND_IMPORT:
[qualifier] dependency.MyFoo
with SHORTEN_AND_STAR_IMPORT:
@@ -0,0 +1,16 @@
// FILE: main.kt
package test
class MyFoo
val typeUsage: MyFoo
val nested = <expr>dependency.MyFoo</expr>.Nested()
// FILE: dependency.kt
package dependency
class MyFoo {
class Nested
}
@@ -0,0 +1,6 @@
Before shortening: dependency.MyFoo
with default settings:
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
with SHORTEN_AND_IMPORT:
with SHORTEN_AND_STAR_IMPORT:
@@ -0,0 +1,14 @@
// FILE: main.kt
package test
class MyFoo
val constructorCall = MyFoo()
fun usage(myFoo: <expr>dependency.MyFoo</expr>) {}
// FILE: dependency.kt
package dependency
class MyFoo
@@ -0,0 +1,6 @@
Before shortening: dependency.MyFoo
with default settings:
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
with SHORTEN_AND_IMPORT:
with SHORTEN_AND_STAR_IMPORT:
@@ -0,0 +1,12 @@
// FILE: main.kt
package test
class MyFoo
fun usage(myFoo: <expr>dependency.MyFoo</expr>) {}
// FILE: dependency.kt
package dependency
class MyFoo
@@ -0,0 +1,8 @@
Before shortening: dependency.MyFoo
with default settings:
[type] dependency.MyFoo
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
with SHORTEN_AND_IMPORT:
[type] dependency.MyFoo
with SHORTEN_AND_STAR_IMPORT:
@@ -0,0 +1,14 @@
// FILE: main.kt
package test
class MyFoo
val typeUsage: MyFoo
fun usage(myFoo: <expr>dependency.MyFoo</expr>) {}
// FILE: dependency.kt
package dependency
class MyFoo
@@ -0,0 +1,6 @@
Before shortening: dependency.MyFoo
with default settings:
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
with SHORTEN_AND_IMPORT:
with SHORTEN_AND_STAR_IMPORT: