diff options
author | Ilya Ryzhenkov <orangy@jetbrains.com> | 2014-07-12 03:25:39 +0400 |
---|---|---|
committer | Ilya Ryzhenkov <orangy@jetbrains.com> | 2014-07-12 03:25:39 +0400 |
commit | d627d2cfdfebcddd63669734efb82dfc66e7c7fe (patch) | |
tree | f0c60789cc4b529b86a6ba028bb2bd8a749d9b4c | |
parent | 7bc3513935588467d4f848bbe40539664fdbdcf9 (diff) | |
download | dokka-d627d2cfdfebcddd63669734efb82dfc66e7c7fe.tar.gz dokka-d627d2cfdfebcddd63669734efb82dfc66e7c7fe.tar.bz2 dokka-d627d2cfdfebcddd63669734efb82dfc66e7c7fe.zip |
Convert string doc to structured DocumentationContent
-rw-r--r-- | src/Analysis/CommentsAPI.kt | 4 | ||||
-rw-r--r-- | src/Generation/ConsoleGenerator.kt | 2 | ||||
-rw-r--r-- | src/Model/Diagnostics.kt (renamed from src/Model/DocumentationResolver.kt) | 4 | ||||
-rw-r--r-- | src/Model/DocumentationModel.kt | 4 | ||||
-rw-r--r-- | src/Model/DocumentationNodeBuilder.kt | 16 | ||||
-rw-r--r-- | src/Model/Sections.kt | 43 | ||||
-rw-r--r-- | test/src/model/ClassTest.kt | 24 | ||||
-rw-r--r-- | test/src/model/CommentTest.kt | 17 | ||||
-rw-r--r-- | test/src/model/FunctionTest.kt | 22 | ||||
-rw-r--r-- | test/src/model/PackageTest.kt | 6 | ||||
-rw-r--r-- | test/src/model/PropertyTest.kt | 16 |
11 files changed, 99 insertions, 59 deletions
diff --git a/src/Analysis/CommentsAPI.kt b/src/Analysis/CommentsAPI.kt index 6bdc3716..c8a2ed3c 100644 --- a/src/Analysis/CommentsAPI.kt +++ b/src/Analysis/CommentsAPI.kt @@ -5,10 +5,6 @@ import org.jetbrains.jet.lang.resolve.* import org.jetbrains.jet.kdoc.psi.api.* import org.jetbrains.jet.lang.psi.* -fun BindingContext.getDocumentation(descriptor: DeclarationDescriptor): String { - return getDocumentationElements(descriptor).map { it.extractText() }.join("\n") -} - fun BindingContext.getDocumentationElements(descriptor: DeclarationDescriptor): List<KDoc> { val psiElement = DescriptorToSourceUtils.descriptorToDeclaration(descriptor) if (psiElement == null) diff --git a/src/Generation/ConsoleGenerator.kt b/src/Generation/ConsoleGenerator.kt index 90bd53be..3ba42099 100644 --- a/src/Generation/ConsoleGenerator.kt +++ b/src/Generation/ConsoleGenerator.kt @@ -12,7 +12,7 @@ public class ConsoleGenerator() { public fun generateHeader(node: DocumentationNode, indent: String = "") { println("$indent${node.kind}: ${node.name}") - println("$indent\"${node.doc.replace("\n", "\n$indent")}\"") + println("$indent\"${node.doc.summary.replace("\n", "\n$indent")}\"") println() } diff --git a/src/Model/DocumentationResolver.kt b/src/Model/Diagnostics.kt index b5b6b1a2..78d711a0 100644 --- a/src/Model/DocumentationResolver.kt +++ b/src/Model/Diagnostics.kt @@ -1,7 +1,7 @@ package org.jetbrains.dokka -import org.jetbrains.jet.lang.resolve.name.* import org.jetbrains.jet.lang.descriptors.* +import org.jetbrains.jet.lang.resolve.name.* fun DocumentationNode.checkResolve() { val parentScope = scope @@ -31,7 +31,7 @@ fun DocumentationNode.checkResolve() { } } -fun path(node: DocumentationNode) : String { +fun path(node: DocumentationNode): String { val owner = node.owner if (owner != null) return "$node in ${path(owner)}" diff --git a/src/Model/DocumentationModel.kt b/src/Model/DocumentationModel.kt index e24b3c41..55f524b3 100644 --- a/src/Model/DocumentationModel.kt +++ b/src/Model/DocumentationModel.kt @@ -36,7 +36,7 @@ public enum class DocumentationReferenceKind { } public open class DocumentationNode(val name: String, - val doc: String, + val doc: DocumentationContent, val kind: DocumentationNodeKind, val scope: JetScope) { private val references = arrayListOf<DocumentationReference>() @@ -67,7 +67,7 @@ public open class DocumentationNode(val name: String, } } -public class DocumentationModel : DocumentationNode("model", "", DocumentationNodeKind.Model, JetScope.EMPTY) { +public class DocumentationModel : DocumentationNode("model", DocumentationContent.Empty, DocumentationNodeKind.Model, JetScope.EMPTY) { fun merge(other: DocumentationModel): DocumentationModel { val model = DocumentationModel() model.addAllReferencesFrom(other) diff --git a/src/Model/DocumentationNodeBuilder.kt b/src/Model/DocumentationNodeBuilder.kt index e3307f50..103e2e89 100644 --- a/src/Model/DocumentationNodeBuilder.kt +++ b/src/Model/DocumentationNodeBuilder.kt @@ -17,10 +17,10 @@ class DocumentationNodeBuilder(val context: BindingContext) : DeclarationDescrip } override fun visitReceiverParameterDescriptor(descriptor: ReceiverParameterDescriptor?, data: DocumentationNode?): DocumentationNode? { - val node = DocumentationNode(descriptor!!.getName().asString(), "", DocumentationNodeKind.Receiver, context.getResolutionScope(descriptor)) + val node = DocumentationNode(descriptor!!.getName().asString(), DocumentationContent.Empty, DocumentationNodeKind.Receiver, context.getResolutionScope(descriptor)) data!!.addReferenceTo(node, DocumentationReferenceKind.Detail) - val typeNode = DocumentationNode(descriptor.getType().toString(), "", DocumentationNodeKind.Type, context.getResolutionScope(descriptor)) + val typeNode = DocumentationNode(descriptor.getType().toString(), DocumentationContent.Empty, DocumentationNodeKind.Type, context.getResolutionScope(descriptor)) node.addReferenceTo(typeNode, DocumentationReferenceKind.Detail) node.addReferenceTo(data, DocumentationReferenceKind.Owner) @@ -32,7 +32,7 @@ class DocumentationNodeBuilder(val context: BindingContext) : DeclarationDescrip val node = DocumentationNode(descriptor.getName().asString(), doc, DocumentationNodeKind.Parameter, context.getResolutionScope(descriptor)) data!!.addReferenceTo(node, DocumentationReferenceKind.Detail) - val typeNode = DocumentationNode(descriptor.getType().toString(), "", DocumentationNodeKind.Type, context.getResolutionScope(descriptor)) + val typeNode = DocumentationNode(descriptor.getType().toString(), DocumentationContent.Empty, DocumentationNodeKind.Type, context.getResolutionScope(descriptor)) node.addReferenceTo(typeNode, DocumentationReferenceKind.Detail) node.addReferenceTo(data, DocumentationReferenceKind.Owner) @@ -56,7 +56,7 @@ class DocumentationNodeBuilder(val context: BindingContext) : DeclarationDescrip val node = DocumentationNode(descriptor.getName().asString(), doc, DocumentationNodeKind.Function, context.getResolutionScope(descriptor)) data!!.addReferenceTo(node, DocumentationReferenceKind.Member) - val typeNode = DocumentationNode(descriptor.getReturnType().toString(), "", DocumentationNodeKind.Type, context.getResolutionScope(descriptor)) + val typeNode = DocumentationNode(descriptor.getReturnType().toString(), DocumentationContent.Empty, DocumentationNodeKind.Type, context.getResolutionScope(descriptor)) node.addReferenceTo(typeNode, DocumentationReferenceKind.Detail) node.addReferenceTo(data, DocumentationReferenceKind.Owner) @@ -71,13 +71,13 @@ class DocumentationNodeBuilder(val context: BindingContext) : DeclarationDescrip for (constraint in descriptor.getUpperBounds()) { if (constraint == builtIns.getDefaultBound()) continue - val constraintNode = DocumentationNode(constraint.toString(), "", DocumentationNodeKind.UpperBound, context.getResolutionScope(descriptor)) + val constraintNode = DocumentationNode(constraint.toString(), DocumentationContent.Empty, DocumentationNodeKind.UpperBound, context.getResolutionScope(descriptor)) node.addReferenceTo(constraintNode, DocumentationReferenceKind.Detail) } for (constraint in descriptor.getLowerBounds()) { if (builtIns.isNothing(constraint)) continue - val constraintNode = DocumentationNode(constraint.toString(), "", DocumentationNodeKind.LowerBound, context.getResolutionScope(descriptor)) + val constraintNode = DocumentationNode(constraint.toString(), DocumentationContent.Empty, DocumentationNodeKind.LowerBound, context.getResolutionScope(descriptor)) node.addReferenceTo(constraintNode, DocumentationReferenceKind.Detail) } node.addReferenceTo(data, DocumentationReferenceKind.Owner) @@ -89,7 +89,7 @@ class DocumentationNodeBuilder(val context: BindingContext) : DeclarationDescrip val node = DocumentationNode(descriptor.getName().asString(), doc, DocumentationNodeKind.Property, context.getResolutionScope(descriptor)) data!!.addReferenceTo(node, DocumentationReferenceKind.Member) - val typeNode = DocumentationNode(descriptor.getType().toString(), "", DocumentationNodeKind.Type, context.getResolutionScope(descriptor)) + val typeNode = DocumentationNode(descriptor.getType().toString(), DocumentationContent.Empty, DocumentationNodeKind.Type, context.getResolutionScope(descriptor)) node.addReferenceTo(typeNode, DocumentationReferenceKind.Detail) node.addReferenceTo(data, DocumentationReferenceKind.Owner) @@ -105,7 +105,7 @@ class DocumentationNodeBuilder(val context: BindingContext) : DeclarationDescrip } override fun visitPackageFragmentDescriptor(descriptor: PackageFragmentDescriptor?, data: DocumentationNode?): DocumentationNode? { - val node = DocumentationNode(descriptor!!.fqName.asString(), "", DocumentationNodeKind.Package, context.getResolutionScope(descriptor)) + val node = DocumentationNode(descriptor!!.fqName.asString(), DocumentationContent.Empty, DocumentationNodeKind.Package, context.getResolutionScope(descriptor)) data!!.addReferenceTo(node, DocumentationReferenceKind.Member) node.addReferenceTo(data, DocumentationReferenceKind.Owner) return node diff --git a/src/Model/Sections.kt b/src/Model/Sections.kt new file mode 100644 index 00000000..733c0d2f --- /dev/null +++ b/src/Model/Sections.kt @@ -0,0 +1,43 @@ +package org.jetbrains.dokka + +import org.jetbrains.jet.lang.descriptors.* +import org.jetbrains.jet.lang.resolve.BindingContext + +fun BindingContext.getDocumentation(descriptor: DeclarationDescriptor): DocumentationContent { + val docText = getDocumentationElements(descriptor).map { it.extractText() }.join("\n") + return DocumentationContent(docText, listOf()) +} + +class DocumentationContentSection(val label: String, val text: String) { + +} + +class DocumentationContent(val summary: String, val sections: List<DocumentationContentSection>) { + + override fun equals(other: Any?): Boolean { + if (other !is DocumentationContent) + return false + if (summary != other.summary) + return false + if (sections.size != other.sections.size) + return false + for (index in sections.indices) + if (sections[index] != other.sections[index]) + return false + + return true + } + + override fun hashCode(): Int { + return summary.hashCode() + sections.map { it.hashCode() }.sum() + } + + override fun toString(): String { + return "$summary | " + sections.joinToString() + } + + class object { + val Empty = DocumentationContent("", listOf()) + } +} + diff --git a/test/src/model/ClassTest.kt b/test/src/model/ClassTest.kt index 8032b928..d5953811 100644 --- a/test/src/model/ClassTest.kt +++ b/test/src/model/ClassTest.kt @@ -10,7 +10,7 @@ public class ClassTest { with(model.nodes.single().members.single()) { assertEquals(DocumentationNodeKind.Class, kind) assertEquals("Klass", name) - assertEquals("", doc) + assertEquals(DocumentationContent.Empty, doc) assertTrue(details.none()) assertEquals("<init>", members.single().name) assertTrue(links.none()) @@ -23,7 +23,7 @@ public class ClassTest { with(model.nodes.single().members.single()) { assertEquals(DocumentationNodeKind.Class, kind) assertEquals("Klass", name) - assertEquals("", doc) + assertEquals(DocumentationContent.Empty, doc) assertTrue(details.none()) assertEquals("<init>", members.single().name) assertTrue(links.none()) @@ -36,7 +36,7 @@ public class ClassTest { with(model.nodes.single().members.single()) { assertEquals(DocumentationNodeKind.Object, kind) assertEquals("Obj", name) - assertEquals("", doc) + assertEquals(DocumentationContent.Empty, doc) assertTrue(details.none()) assertTrue(members.none()) assertTrue(links.none()) @@ -49,20 +49,20 @@ public class ClassTest { with (model.nodes.single().members.single()) { assertEquals(DocumentationNodeKind.Class, kind) assertEquals("Klass", name) - assertEquals("", doc) + assertEquals(DocumentationContent.Empty, doc) assertTrue(details.none()) assertTrue(links.none()) assertEquals(1, members.count()) with(members.elementAt(0)) { assertEquals("<init>", name) - assertEquals("", doc) + assertEquals(DocumentationContent.Empty, doc) assertEquals(DocumentationNodeKind.Constructor, kind) assertEquals(1, details.count()) with(details.elementAt(0)) { assertEquals("name", name) assertEquals(DocumentationNodeKind.Parameter, kind) - assertEquals("", doc) + assertEquals(DocumentationContent.Empty, doc) assertEquals("String", details.single().name) assertTrue(links.none()) assertTrue(members.none()) @@ -79,14 +79,14 @@ public class ClassTest { with(model.nodes.single().members.single()) { assertEquals(DocumentationNodeKind.Class, kind) assertEquals("Klass", name) - assertEquals("", doc) + assertEquals(DocumentationContent.Empty, doc) assertTrue(details.none()) assertTrue(links.none()) assertEquals(2, members.count()) with(members.elementAt(0)) { assertEquals("<init>", name) - assertEquals("", doc) + assertEquals(DocumentationContent.Empty, doc) assertEquals(DocumentationNodeKind.Constructor, kind) assertTrue(details.none()) assertTrue(links.none()) @@ -94,7 +94,7 @@ public class ClassTest { } with(members.elementAt(1)) { assertEquals("fn", name) - assertEquals("", doc) + assertEquals(DocumentationContent.Empty, doc) assertEquals(DocumentationNodeKind.Function, kind) assertEquals("Unit", details.single().name) assertTrue(links.none()) @@ -109,14 +109,14 @@ public class ClassTest { with(model.nodes.single().members.single()) { assertEquals(DocumentationNodeKind.Class, kind) assertEquals("Klass", name) - assertEquals("", doc) + assertEquals(DocumentationContent.Empty, doc) assertTrue(details.none()) assertTrue(links.none()) assertEquals(2, members.count()) with(members.elementAt(0)) { assertEquals("<init>", name) - assertEquals("", doc) + assertEquals(DocumentationContent.Empty, doc) assertEquals(DocumentationNodeKind.Constructor, kind) assertTrue(details.none()) assertTrue(members.none()) @@ -124,7 +124,7 @@ public class ClassTest { } with(members.elementAt(1)) { assertEquals("name", name) - assertEquals("", doc) + assertEquals(DocumentationContent.Empty, doc) assertEquals(DocumentationNodeKind.Property, kind) assertEquals("String", details.single().name) assertTrue(members.none()) diff --git a/test/src/model/CommentTest.kt b/test/src/model/CommentTest.kt index 7da50c1a..f7d313fe 100644 --- a/test/src/model/CommentTest.kt +++ b/test/src/model/CommentTest.kt @@ -2,12 +2,13 @@ package org.jetbrains.dokka.tests import org.junit.Test import kotlin.test.* +import org.jetbrains.dokka.* public class CommentTest { Test fun emptyDoc() { verifyModel("test/data/comments/emptyDoc.kt") { model -> with(model.nodes.single().members.single()) { - assertEquals("", doc) + assertEquals(DocumentationContent.Empty, doc) } } } @@ -15,7 +16,7 @@ public class CommentTest { Test fun emptyDocButComment() { verifyModel("test/data/comments/emptyDocButComment.kt") { model -> with(model.nodes.single().members.single()) { - assertEquals("", doc) + assertEquals(DocumentationContent.Empty, doc) } } } @@ -25,7 +26,7 @@ public class CommentTest { with(model.nodes.single().members.single()) { assertEquals("""doc1 doc2 -doc3""", doc) +doc3""", doc.summary) } } } @@ -35,7 +36,7 @@ doc3""", doc) with(model.nodes.single().members.single()) { assertEquals("""doc1 doc2 -doc3""", doc) +doc3""", doc.summary) } } } @@ -45,7 +46,7 @@ doc3""", doc) with(model.nodes.single().members.single()) { assertEquals("""doc1 doc2 -doc3""", doc) +doc3""", doc.summary) } } } @@ -53,7 +54,7 @@ doc3""", doc) Test fun oneLineDoc() { verifyModel("test/data/comments/oneLineDoc.kt") { model -> with(model.nodes.single().members.single()) { - assertEquals("doc", doc) + assertEquals("doc", doc.summary) } } } @@ -61,7 +62,7 @@ doc3""", doc) Test fun oneLineDocWithComment() { verifyModel("test/data/comments/oneLineDocWithComment.kt") { model -> with(model.nodes.single().members.single()) { - assertEquals("doc", doc) + assertEquals("doc", doc.summary) } } } @@ -69,7 +70,7 @@ doc3""", doc) Test fun oneLineDocWithEmptyLine() { verifyModel("test/data/comments/oneLineDocWithEmptyLine.kt") { model -> with(model.nodes.single().members.single()) { - assertEquals("doc", doc) + assertEquals("doc", doc.summary) } } } diff --git a/test/src/model/FunctionTest.kt b/test/src/model/FunctionTest.kt index 641b70a7..5499b21b 100644 --- a/test/src/model/FunctionTest.kt +++ b/test/src/model/FunctionTest.kt @@ -10,7 +10,7 @@ public class FunctionTest { with(model.nodes.single().members.single()) { assertEquals("fn", name) assertEquals(DocumentationNodeKind.Function, kind) - assertEquals("Function fn", doc) + assertEquals("Function fn", doc.summary) assertEquals("Unit", details.single().name) assertTrue(members.none()) assertTrue(links.none()) @@ -23,14 +23,14 @@ public class FunctionTest { with(model.nodes.single().members.single()) { assertEquals("fn", name) assertEquals(DocumentationNodeKind.Function, kind) - assertEquals("Function with receiver", doc) + assertEquals("Function with receiver", doc.summary) assertEquals("Unit", details.elementAt(0).name) assertEquals(2, details.count()) with(details.elementAt(1)) { assertEquals("<this>", name) assertEquals(DocumentationNodeKind.Receiver, kind) - assertEquals("", doc) + assertEquals(DocumentationContent.Empty, doc) assertEquals("String", details.single().name) assertTrue(members.none()) assertTrue(links.none()) @@ -46,14 +46,14 @@ public class FunctionTest { with(model.nodes.single().members.single()) { assertEquals("generic", name) assertEquals(DocumentationNodeKind.Function, kind) - assertEquals("generic function", doc) + assertEquals("generic function", doc.summary) assertEquals(2, details.count()) assertEquals("Unit", details.elementAt(0).name) with(details.elementAt(1)) { assertEquals("T", name) assertEquals(DocumentationNodeKind.TypeParameter, kind) - assertEquals("", doc) + assertEquals(DocumentationContent.Empty, doc) assertTrue(details.none()) assertTrue(members.none()) assertTrue(links.none()) @@ -69,18 +69,18 @@ public class FunctionTest { with(model.nodes.single().members.single()) { assertEquals("generic", name) assertEquals(DocumentationNodeKind.Function, kind) - assertEquals("generic function", doc) + assertEquals("generic function", doc.summary) assertEquals(3, details.count()) assertEquals("Unit", details.elementAt(0).name) with(details.elementAt(1)) { assertEquals("T", name) assertEquals(DocumentationNodeKind.TypeParameter, kind) - assertEquals("", doc) + assertEquals(DocumentationContent.Empty, doc) with(details.single()) { assertEquals("R", name) assertEquals(DocumentationNodeKind.UpperBound, kind) - assertEquals("", doc) + assertEquals(DocumentationContent.Empty, doc) assertTrue(details.none()) assertTrue(members.none()) assertTrue(links.none()) @@ -91,7 +91,7 @@ public class FunctionTest { with(details.elementAt(2)) { assertEquals("R", name) assertEquals(DocumentationNodeKind.TypeParameter, kind) - assertEquals("", doc) + assertEquals(DocumentationContent.Empty, doc) assertTrue(members.none()) assertTrue(links.none()) } @@ -110,14 +110,14 @@ public class FunctionTest { assertEquals("""Multiline Function Documentation""" - , doc) + , doc.summary) assertEquals(2, details.count()) assertEquals("Unit", details.elementAt(0).name) with(details.elementAt(1)) { assertEquals("x", name) assertEquals(DocumentationNodeKind.Parameter, kind) - assertEquals("parameter", doc) + assertEquals("parameter", doc.summary) assertEquals("Int", details.single().name) assertTrue(members.none()) assertTrue(links.none()) diff --git a/test/src/model/PackageTest.kt b/test/src/model/PackageTest.kt index 7b376012..d95b799a 100644 --- a/test/src/model/PackageTest.kt +++ b/test/src/model/PackageTest.kt @@ -10,7 +10,7 @@ public class PackageTest { with(model.nodes.single()) { assertEquals(DocumentationNodeKind.Package, kind) assertEquals("", name) - assertEquals("", doc) + assertEquals(DocumentationContent.Empty, doc) assertTrue(details.none()) assertTrue(members.none()) assertTrue(links.none()) @@ -23,7 +23,7 @@ public class PackageTest { with(model.nodes.single()) { assertEquals(DocumentationNodeKind.Package, kind) assertEquals("simple", name) - assertEquals("", doc) + assertEquals(DocumentationContent.Empty, doc) assertTrue(details.none()) assertTrue(members.none()) assertTrue(links.none()) @@ -36,7 +36,7 @@ public class PackageTest { with(model.nodes.single()) { assertEquals(DocumentationNodeKind.Package, kind) assertEquals("dot.name", name) - assertEquals("", doc) + assertEquals(DocumentationContent.Empty, doc) assertTrue(details.none()) assertTrue(members.none()) assertTrue(links.none()) diff --git a/test/src/model/PropertyTest.kt b/test/src/model/PropertyTest.kt index ed82bfec..f005d20d 100644 --- a/test/src/model/PropertyTest.kt +++ b/test/src/model/PropertyTest.kt @@ -10,7 +10,7 @@ public class PropertyTest { with(model.nodes.single().members.single()) { assertEquals("property", name) assertEquals(DocumentationNodeKind.Property, kind) - assertEquals("", doc) + assertEquals(DocumentationContent.Empty, doc) assertEquals("String", details.single().name) assertTrue(members.none()) assertTrue(links.none()) @@ -23,7 +23,7 @@ public class PropertyTest { with(model.nodes.single().members.single()) { assertEquals("property", name) assertEquals(DocumentationNodeKind.Property, kind) - assertEquals("", doc) + assertEquals(DocumentationContent.Empty, doc) assertEquals("String", details.single().name) assertTrue(members.none()) assertTrue(links.none()) @@ -36,13 +36,13 @@ public class PropertyTest { with(model.nodes.single().members.single()) { assertEquals("property", name) assertEquals(DocumentationNodeKind.Property, kind) - assertEquals("", doc) + assertEquals(DocumentationContent.Empty, doc) assertEquals("String", details.single().name) assertTrue(links.none()) with(members.single()) { assertEquals("<get-property>", name) assertEquals(DocumentationNodeKind.Function, kind) - assertEquals("", doc) + assertEquals(DocumentationContent.Empty, doc) assertEquals("String", details.single().name) assertTrue(links.none()) assertTrue(members.none()) @@ -56,7 +56,7 @@ public class PropertyTest { with(model.nodes.single().members.single()) { assertEquals("property", name) assertEquals(DocumentationNodeKind.Property, kind) - assertEquals("", doc) + assertEquals(DocumentationContent.Empty, doc) assertEquals("String", details.single().name) assertTrue(links.none()) @@ -64,7 +64,7 @@ public class PropertyTest { with(members.elementAt(0)) { assertEquals("<get-property>", name) assertEquals(DocumentationNodeKind.Function, kind) - assertEquals("", doc) + assertEquals(DocumentationContent.Empty, doc) assertEquals("String", details.single().name) assertTrue(links.none()) assertTrue(members.none()) @@ -72,13 +72,13 @@ public class PropertyTest { with(members.elementAt(1)) { assertEquals("<set-property>", name) assertEquals(DocumentationNodeKind.Function, kind) - assertEquals("", doc) + assertEquals(DocumentationContent.Empty, doc) assertEquals(2, details.count()) assertEquals("Unit", details.elementAt(0).name) with(details.elementAt(1)) { assertEquals("value", name) assertEquals(DocumentationNodeKind.Parameter, kind) - assertEquals("", doc) + assertEquals(DocumentationContent.Empty, doc) assertEquals("String", details.single().name) assertTrue(links.none()) assertTrue(members.none()) |