diff options
author | Dmitry Jemerov <yole@jetbrains.com> | 2015-10-28 12:15:40 +0100 |
---|---|---|
committer | Dmitry Jemerov <yole@jetbrains.com> | 2015-10-29 11:57:22 +0100 |
commit | 47ccfb0937fa70d727a540d3d9a0bbbc6f1bfc6d (patch) | |
tree | 51cff592a4c5d63f69e2a4328fdf9d8bce444025 /test/src/model | |
parent | cdeca8f3ba28c1b974ae81ef1ae1e80b007b1111 (diff) | |
download | dokka-47ccfb0937fa70d727a540d3d9a0bbbc6f1bfc6d.tar.gz dokka-47ccfb0937fa70d727a540d3d9a0bbbc6f1bfc6d.tar.bz2 dokka-47ccfb0937fa70d727a540d3d9a0bbbc6f1bfc6d.zip |
loading the JDK and the Kotlin runtime in tests is now optional
Diffstat (limited to 'test/src/model')
-rw-r--r-- | test/src/model/ClassTest.kt | 4 | ||||
-rw-r--r-- | test/src/model/FunctionTest.kt | 2 | ||||
-rw-r--r-- | test/src/model/JavaTest.kt | 15 | ||||
-rw-r--r-- | test/src/model/PropertyTest.kt | 2 |
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]) { |