aboutsummaryrefslogtreecommitdiff
path: root/test/src/model
diff options
context:
space:
mode:
Diffstat (limited to 'test/src/model')
-rw-r--r--test/src/model/ClassTest.kt4
-rw-r--r--test/src/model/FunctionTest.kt2
-rw-r--r--test/src/model/JavaTest.kt15
-rw-r--r--test/src/model/PropertyTest.kt2
4 files changed, 13 insertions, 10 deletions
diff --git a/test/src/model/ClassTest.kt b/test/src/model/ClassTest.kt
index 0e2323c1..ce4b4683 100644
--- a/test/src/model/ClassTest.kt
+++ b/test/src/model/ClassTest.kt
@@ -152,7 +152,7 @@ public class ClassTest {
}
@Test fun annotatedClass() {
- verifyPackageMember("test/data/classes/annotatedClass.kt") { cls ->
+ verifyPackageMember("test/data/classes/annotatedClass.kt", withKotlinRuntime = true) { cls ->
assertEquals(1, cls.annotations.count())
with(cls.annotations[0]) {
assertEquals("Strictfp", name)
@@ -198,7 +198,7 @@ public class ClassTest {
}
@Test fun javaAnnotationClass() {
- verifyModel("test/data/classes/javaAnnotationClass.kt") { model ->
+ verifyModel("test/data/classes/javaAnnotationClass.kt", withJdk = true) { model ->
with(model.members.single().members.single()) {
assertEquals(1, annotations.count())
with(annotations[0]) {
diff --git a/test/src/model/FunctionTest.kt b/test/src/model/FunctionTest.kt
index 9a5a67b4..b185e71a 100644
--- a/test/src/model/FunctionTest.kt
+++ b/test/src/model/FunctionTest.kt
@@ -142,7 +142,7 @@ Documentation""", content.description.toTestString())
}
@Test fun annotatedFunction() {
- verifyPackageMember("test/data/functions/annotatedFunction.kt") { func ->
+ verifyPackageMember("test/data/functions/annotatedFunction.kt", withKotlinRuntime = true) { func ->
assertEquals(1, func.annotations.count())
with(func.annotations[0]) {
assertEquals("Strictfp", name)
diff --git a/test/src/model/JavaTest.kt b/test/src/model/JavaTest.kt
index 688cc8d9..5ec29b25 100644
--- a/test/src/model/JavaTest.kt
+++ b/test/src/model/JavaTest.kt
@@ -1,8 +1,11 @@
package org.jetbrains.dokka.tests
-import kotlin.test.*
-import org.jetbrains.dokka.*
-import org.junit.*
+import org.jetbrains.dokka.DocumentationNode
+import org.jetbrains.dokka.DocumentationReference
+import org.junit.Test
+import kotlin.test.assertEquals
+import kotlin.test.assertFalse
+import kotlin.test.assertTrue
public class JavaTest {
@Test fun function() {
@@ -162,7 +165,7 @@ public class JavaTest {
}
@Test fun deprecation() {
- verifyPackageMember("test/data/java/deprecation.java") { cls ->
+ verifyPackageMember("test/data/java/deprecation.java", withJdk = true) { cls ->
val fn = cls.members(DocumentationNode.Kind.Function).single()
with(fn.deprecation!!) {
assertEquals(1, details.count())
@@ -179,14 +182,14 @@ public class JavaTest {
}
@Test fun javaLangObject() {
- verifyPackageMember("test/data/java/javaLangObject.java") { cls ->
+ verifyPackageMember("test/data/java/javaLangObject.java", withJdk = true) { cls ->
val fn = cls.members(DocumentationNode.Kind.Function).single()
assertEquals("Any", fn.detail(DocumentationNode.Kind.Type).name)
}
}
@Test fun enumValues() {
- verifyPackageMember("test/data/java/enumValues.java") { cls ->
+ verifyPackageMember("test/data/java/enumValues.java", withJdk = true) { cls ->
val superTypes = cls.details(DocumentationNode.Kind.Supertype)
assertEquals(0, superTypes.size)
assertEquals(1, cls.members(DocumentationNode.Kind.EnumItem).size)
diff --git a/test/src/model/PropertyTest.kt b/test/src/model/PropertyTest.kt
index 0da510ed..310bc0ae 100644
--- a/test/src/model/PropertyTest.kt
+++ b/test/src/model/PropertyTest.kt
@@ -65,7 +65,7 @@ public class PropertyTest {
}
@Test fun annotatedProperty() {
- verifyModel("test/data/properties/annotatedProperty.kt") { model ->
+ verifyModel("test/data/properties/annotatedProperty.kt", withKotlinRuntime = true) { model ->
with(model.members.single().members.single()) {
assertEquals(1, annotations.count())
with(annotations[0]) {