aboutsummaryrefslogtreecommitdiff
path: root/runners/gradle-plugin/src/test/kotlin
diff options
context:
space:
mode:
Diffstat (limited to 'runners/gradle-plugin/src/test/kotlin')
-rw-r--r--runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationJsonTest.kt1
-rw-r--r--runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationSerializableTest.kt1
-rw-r--r--runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderTest.kt17
3 files changed, 19 insertions, 0 deletions
diff --git a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationJsonTest.kt b/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationJsonTest.kt
index 68506876..877d3b37 100644
--- a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationJsonTest.kt
+++ b/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationJsonTest.kt
@@ -39,6 +39,7 @@ class DokkaConfigurationJsonTest {
packageOption.includeNonPublic by true
packageOption.reportUndocumented by true
packageOption.skipDeprecated by true
+ packageOption.documentedVisibilities by setOf(DokkaConfiguration.Visibility.PRIVATE)
}
}
}
diff --git a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationSerializableTest.kt b/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationSerializableTest.kt
index 2887f957..811f7736 100644
--- a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationSerializableTest.kt
+++ b/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationSerializableTest.kt
@@ -48,6 +48,7 @@ class DokkaConfigurationSerializableTest {
packageOption.includeNonPublic by true
packageOption.reportUndocumented by true
packageOption.skipDeprecated by true
+ packageOption.documentedVisibilities by setOf(DokkaConfiguration.Visibility.PRIVATE)
}
}
}
diff --git a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderTest.kt b/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderTest.kt
index 6216b5d7..949e4949 100644
--- a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderTest.kt
+++ b/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderTest.kt
@@ -163,6 +163,22 @@ class GradleDokkaSourceSetBuilderTest {
}
@Test
+ fun documentedVisibilities() {
+ val sourceSet = GradleDokkaSourceSetBuilder("", project)
+ assertEquals(
+ DokkaDefaults.documentedVisibilities, sourceSet.build().documentedVisibilities,
+ "Expected default value for ${GradleDokkaSourceSetBuilder::documentedVisibilities.name}"
+ )
+
+ val visibilities = setOf(DokkaConfiguration.Visibility.PRIVATE, DokkaConfiguration.Visibility.INTERNAL)
+ sourceSet.documentedVisibilities.set(visibilities)
+ assertEquals(
+ visibilities, sourceSet.build().documentedVisibilities,
+ "Expected to see previously set value for ${GradleDokkaSourceSetBuilder::includeNonPublic.name}"
+ )
+ }
+
+ @Test
fun reportUndocumented() {
val sourceSet = GradleDokkaSourceSetBuilder("", project)
assertEquals(
@@ -261,6 +277,7 @@ class GradleDokkaSourceSetBuilderTest {
PackageOptionsImpl(
matchingRegex = matchingRegex,
includeNonPublic = DokkaDefaults.includeNonPublic,
+ documentedVisibilities = DokkaDefaults.documentedVisibilities,
reportUndocumented = DokkaDefaults.reportUndocumented,
skipDeprecated = DokkaDefaults.skipDeprecated,
suppress = DokkaDefaults.suppress