diff options
author | Kamil Doległo <kamilok1965@interia.pl> | 2020-02-26 13:41:31 +0100 |
---|---|---|
committer | Paweł Marks <Kordyjan@users.noreply.github.com> | 2020-03-04 13:39:48 +0100 |
commit | 5a02fd66982b92984f76eaaca16ba6045f55ff31 (patch) | |
tree | d2e8820cf4066aef813ec74b1aeb14cbe264e7e8 /plugins/base/src/test/kotlin/model | |
parent | bc55869d707e5abafbf8544b5f519e003a504ac6 (diff) | |
download | dokka-5a02fd66982b92984f76eaaca16ba6045f55ff31.tar.gz dokka-5a02fd66982b92984f76eaaca16ba6045f55ff31.tar.bz2 dokka-5a02fd66982b92984f76eaaca16ba6045f55ff31.zip |
Replace Visibility used in Documentables with custom classes
Diffstat (limited to 'plugins/base/src/test/kotlin/model')
-rw-r--r-- | plugins/base/src/test/kotlin/model/ClassesTest.kt | 12 | ||||
-rw-r--r-- | plugins/base/src/test/kotlin/model/PropertyTest.kt | 6 |
2 files changed, 8 insertions, 10 deletions
diff --git a/plugins/base/src/test/kotlin/model/ClassesTest.kt b/plugins/base/src/test/kotlin/model/ClassesTest.kt index 18288442..a22bd775 100644 --- a/plugins/base/src/test/kotlin/model/ClassesTest.kt +++ b/plugins/base/src/test/kotlin/model/ClassesTest.kt @@ -2,9 +2,7 @@ package model import org.jetbrains.dokka.model.* import org.jetbrains.dokka.model.Function -import org.jetbrains.dokka.model.Object import org.jetbrains.dokka.model.WithAbstraction.Modifier -import org.jetbrains.kotlin.descriptors.Visibilities import org.junit.Test import utils.AbstractModelTest import utils.assertNotNull @@ -52,7 +50,7 @@ class ClassesTest : AbstractModelTest("/src/main/kotlin/classes/Test.kt", "class children counts 4 with(constructors.firstOrNull().assertNotNull("Constructor")) { - visibility.values allEquals Visibilities.PUBLIC + visibility.values allEquals KotlinVisibility.Public parameters counts 1 with(parameters.firstOrNull().assertNotNull("Constructor parameter")) { name equals "name" @@ -80,7 +78,7 @@ class ClassesTest : AbstractModelTest("/src/main/kotlin/classes/Test.kt", "class with((this / "fn").cast<Function>()) { type.constructorFqName equals "kotlin.Unit" parameters counts 0 - visibility.values allEquals Visibilities.PUBLIC + visibility.values allEquals KotlinVisibility.Public } } } @@ -150,7 +148,7 @@ class ClassesTest : AbstractModelTest("/src/main/kotlin/classes/Test.kt", "class ) { with((this / "classes" / "Klass").cast<Class>()) { name equals "Klass" - visibility.values allEquals Visibilities.PUBLIC + visibility.values allEquals KotlinVisibility.Public with(extra[AdditionalModifiers.AdditionalKey].assertNotNull("Extras")) { content.find{it == ExtraModifiers.DATA}.assertNotNull("data modifier") } @@ -174,7 +172,7 @@ class ClassesTest : AbstractModelTest("/src/main/kotlin/classes/Test.kt", "class ) { with((this / "classes" / "Klass").cast<Class>()) { name equals "Klass" - modifier equals WithAbstraction.Modifier.Sealed + modifier equals Modifier.Sealed } } } @@ -391,7 +389,7 @@ class ClassesTest : AbstractModelTest("/src/main/kotlin/classes/Test.kt", "class with((this / "Companion").cast<Object>()) { name equals "Companion" - visibility.values allEquals Visibilities.PRIVATE + visibility.values allEquals KotlinVisibility.Private with((this / "fn").cast<Function>()) { name equals "fn" diff --git a/plugins/base/src/test/kotlin/model/PropertyTest.kt b/plugins/base/src/test/kotlin/model/PropertyTest.kt index 633796e7..e4ef0aec 100644 --- a/plugins/base/src/test/kotlin/model/PropertyTest.kt +++ b/plugins/base/src/test/kotlin/model/PropertyTest.kt @@ -1,8 +1,8 @@ package model +import org.jetbrains.dokka.model.KotlinVisibility import org.jetbrains.dokka.model.Package import org.jetbrains.dokka.model.Property -import org.jetbrains.kotlin.descriptors.Visibilities import org.junit.Test import utils.AbstractModelTest import utils.assertNotNull @@ -80,7 +80,7 @@ class PropertyTest : AbstractModelTest("/src/main/kotlin/property/Test.kt", "pro with(getter.assertNotNull("Getter")) { type.constructorFqName equals "kotlin.String" } - visibility.values allEquals Visibilities.PUBLIC + visibility.values allEquals KotlinVisibility.Public } } } @@ -103,7 +103,7 @@ class PropertyTest : AbstractModelTest("/src/main/kotlin/property/Test.kt", "pro with(getter.assertNotNull("Getter")) { type.constructorFqName equals "kotlin.Int" } - visibility.values allEquals Visibilities.PUBLIC + visibility.values allEquals KotlinVisibility.Public } } } |