aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/test/kotlin/transformers/MergeImplicitExpectActualDeclarationsTest.kt
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/base/src/test/kotlin/transformers/MergeImplicitExpectActualDeclarationsTest.kt')
-rw-r--r--plugins/base/src/test/kotlin/transformers/MergeImplicitExpectActualDeclarationsTest.kt32
1 files changed, 32 insertions, 0 deletions
diff --git a/plugins/base/src/test/kotlin/transformers/MergeImplicitExpectActualDeclarationsTest.kt b/plugins/base/src/test/kotlin/transformers/MergeImplicitExpectActualDeclarationsTest.kt
index 5e335209..241fb481 100644
--- a/plugins/base/src/test/kotlin/transformers/MergeImplicitExpectActualDeclarationsTest.kt
+++ b/plugins/base/src/test/kotlin/transformers/MergeImplicitExpectActualDeclarationsTest.kt
@@ -114,6 +114,38 @@ class MergeImplicitExpectActualDeclarationsTest : BaseAbstractTest() {
}
@Test
+ fun `should merge class and typealias`() {
+ testInline(
+ """
+ |/src/jvmMain/kotlin/pageMerger/Test.kt
+ |package pageMerger
+ |
+ |class A {
+ | fun method1(): String
+ |}
+ |
+ |/src/jsMain/kotlin/pageMerger/Test.kt
+ |package pageMerger
+ |
+ |typealias A = String
+ |
+ """.trimMargin(),
+ configuration(true),
+ cleanupOutput = true
+ ) {
+ pagesTransformationStage = { root ->
+ val classPage = root.dfs { it.name == "A" } as? ClasslikePageNode
+ assertNotNull(classPage, "Tested class not found!")
+
+ val platformHintedContent = classPage.content.dfs { it is PlatformHintedContent }.assertNotNull("platformHintedContent")
+ assertEquals(2, platformHintedContent.sourceSets.size)
+
+ platformHintedContent.dfs { it is ContentText && it.text == "class " }.assertNotNull("class keyword")
+ platformHintedContent.dfs { it is ContentText && it.text == "typealias " }.assertNotNull("typealias keyword")
+ }
+ }
+ }
+ @Test
fun `should merge method and prop`() {
testInline(
"""