Skip to content

Commit

Permalink
add one more test
Browse files Browse the repository at this point in the history
  • Loading branch information
whyoleg committed Nov 1, 2023
1 parent b68bd8c commit 0598517
Showing 1 changed file with 29 additions and 3 deletions.
32 changes: 29 additions & 3 deletions plugins/base/src/test/kotlin/content/AllTypesPageTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class AllTypesPageTest : BaseAbstractTest() {
children.singleOrNull { it is AllTypesPageNode } as? AllTypesPageNode

@Test
fun `all types page generated when there are types`() = withAllTypesPage {
fun `all types page generated when there are types`() = withAllTypesPage {
testInline(
"""
|/src/Test.kt
Expand Down Expand Up @@ -75,7 +75,33 @@ class AllTypesPageTest : BaseAbstractTest() {
}

@Test
fun `all types page isn't generated when there are NO types`() = withAllTypesPage {
fun `all types isn't generated when not enabled by property`() {
testInline(
"""
|/src/Test.kt
|package sample
|/**
| * Hello World!
| *
| * Some other comment which should not be on All Types page
| */
|public class Test
|
|/**
| * Hello type
| */
|public typealias Alias = Int
""".trimIndent(),
configuration
) {
pagesTransformationStage = { rootPage ->
assertNull(rootPage.allTypesPageNode())
}
}
}

@Test
fun `all types page isn't generated when there are NO types`() = withAllTypesPage {
testInline(
"""
|/src/Test.kt
Expand All @@ -94,7 +120,7 @@ class AllTypesPageTest : BaseAbstractTest() {
}

@Test
fun `all types sorting depends only on simple name`() = withAllTypesPage {
fun `all types sorting depends only on simple name`() = withAllTypesPage {
testInline(
"""
|/src/A.kt
Expand Down

0 comments on commit 0598517

Please sign in to comment.