[Commonizer] HierarchicalClassAndTypeAliasCommonizationTest: Remove unnecessary annotations and reformat file
This commit is contained in:
committed by
Space
parent
684e51b0be
commit
1e801e77a2
+31
-38
@@ -31,7 +31,6 @@ class HierarchicalClassAndTypeAliasCommonizationTest : AbstractInlineSourcesComm
|
|||||||
result.assertCommonized("(a, b)", "expect class X")
|
result.assertCommonized("(a, b)", "expect class X")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fun `test commonization of typeAlias and class hierarchically`() {
|
fun `test commonization of typeAlias and class hierarchically`() {
|
||||||
val result = commonize {
|
val result = commonize {
|
||||||
outputTarget("(a, b)", "(c, d)", "(a, b, c, d)")
|
outputTarget("(a, b)", "(c, d)", "(a, b, c, d)")
|
||||||
@@ -80,7 +79,6 @@ class HierarchicalClassAndTypeAliasCommonizationTest : AbstractInlineSourcesComm
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fun `test following nested typeAliases`() {
|
fun `test following nested typeAliases`() {
|
||||||
val result = commonize {
|
val result = commonize {
|
||||||
outputTarget("(a, b)")
|
outputTarget("(a, b)")
|
||||||
@@ -281,7 +279,6 @@ class HierarchicalClassAndTypeAliasCommonizationTest : AbstractInlineSourcesComm
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
fun `test return types`() {
|
fun `test return types`() {
|
||||||
val result = commonize {
|
val result = commonize {
|
||||||
outputTarget("(a, b)")
|
outputTarget("(a, b)")
|
||||||
@@ -310,7 +307,6 @@ class HierarchicalClassAndTypeAliasCommonizationTest : AbstractInlineSourcesComm
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
fun `test function parameters`() {
|
fun `test function parameters`() {
|
||||||
val result = commonize {
|
val result = commonize {
|
||||||
outputTarget("(a, b)")
|
outputTarget("(a, b)")
|
||||||
@@ -339,36 +335,6 @@ class HierarchicalClassAndTypeAliasCommonizationTest : AbstractInlineSourcesComm
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
fun `ignored KT-47433 - test parameters with non-commonized TA expanding to a commonized type`() {
|
|
||||||
val result = commonize {
|
|
||||||
outputTarget("(a, b)")
|
|
||||||
|
|
||||||
simpleSingleSourceTarget(
|
|
||||||
"a", """
|
|
||||||
class X
|
|
||||||
fun useX(x: X) = Unit
|
|
||||||
""".trimIndent()
|
|
||||||
)
|
|
||||||
|
|
||||||
simpleSingleSourceTarget(
|
|
||||||
"b", """
|
|
||||||
class X
|
|
||||||
typealias B = X
|
|
||||||
fun useX(x: B) = Unit
|
|
||||||
""".trimIndent()
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
result.assertCommonized(
|
|
||||||
"(a, b)", """
|
|
||||||
expect class X expect constructor()
|
|
||||||
expect fun useX(x: X)
|
|
||||||
""".trimIndent()
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
fun `test parameterized return type`() {
|
fun `test parameterized return type`() {
|
||||||
val result = commonize {
|
val result = commonize {
|
||||||
outputTarget("(a, b)", "(c, d)", "(a, b, c, d)")
|
outputTarget("(a, b)", "(c, d)", "(a, b, c, d)")
|
||||||
@@ -490,7 +456,6 @@ class HierarchicalClassAndTypeAliasCommonizationTest : AbstractInlineSourcesComm
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
fun `test supertype from dependency`() {
|
fun `test supertype from dependency`() {
|
||||||
val result = commonize {
|
val result = commonize {
|
||||||
outputTarget("(a, b)")
|
outputTarget("(a, b)")
|
||||||
@@ -519,7 +484,6 @@ class HierarchicalClassAndTypeAliasCommonizationTest : AbstractInlineSourcesComm
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
fun `test supertype from sources`() {
|
fun `test supertype from sources`() {
|
||||||
val result = commonize {
|
val result = commonize {
|
||||||
outputTarget("(a, b)")
|
outputTarget("(a, b)")
|
||||||
@@ -548,7 +512,6 @@ class HierarchicalClassAndTypeAliasCommonizationTest : AbstractInlineSourcesComm
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
fun `test typealias to numbers`() {
|
fun `test typealias to numbers`() {
|
||||||
val result = commonize {
|
val result = commonize {
|
||||||
outputTarget("(a, b)", "(c, d)", "(a, b, c, d)")
|
outputTarget("(a, b)", "(c, d)", "(a, b, c, d)")
|
||||||
@@ -611,7 +574,8 @@ class HierarchicalClassAndTypeAliasCommonizationTest : AbstractInlineSourcesComm
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun `todo - test boxed function using TA and expanded type`() {
|
@Suppress("unused")
|
||||||
|
fun `ignored KT-47433 - test boxed function using TA and expanded type`() {
|
||||||
val result = commonize {
|
val result = commonize {
|
||||||
outputTarget("(a, b)")
|
outputTarget("(a, b)")
|
||||||
|
|
||||||
@@ -642,4 +606,33 @@ class HierarchicalClassAndTypeAliasCommonizationTest : AbstractInlineSourcesComm
|
|||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("unused")
|
||||||
|
fun `ignored KT-47433 - test parameters with non-commonized TA expanding to a commonized type`() {
|
||||||
|
val result = commonize {
|
||||||
|
outputTarget("(a, b)")
|
||||||
|
|
||||||
|
simpleSingleSourceTarget(
|
||||||
|
"a", """
|
||||||
|
class X
|
||||||
|
fun useX(x: X) = Unit
|
||||||
|
""".trimIndent()
|
||||||
|
)
|
||||||
|
|
||||||
|
simpleSingleSourceTarget(
|
||||||
|
"b", """
|
||||||
|
class X
|
||||||
|
typealias B = X
|
||||||
|
fun useX(x: B) = Unit
|
||||||
|
""".trimIndent()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
result.assertCommonized(
|
||||||
|
"(a, b)", """
|
||||||
|
expect class X expect constructor()
|
||||||
|
expect fun useX(x: X)
|
||||||
|
""".trimIndent()
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user