From e455a0dd6af736e46cf83a893f2290aa9440ca71 Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Mon, 28 Sep 2015 12:27:05 +0200 Subject: update Dokka to M14 --- lib/kotlin-for-upsource.jar | Bin 15836518 -> 16069326 bytes src/Model/Content.kt | 20 +++++++++----------- test/data/format/deprecated.kt | 6 +++--- .../annotatedFunctionWithAnnotationParameters.kt | 8 +++++++- test/src/model/FunctionTest.kt | 6 +++--- 5 files changed, 22 insertions(+), 18 deletions(-) diff --git a/lib/kotlin-for-upsource.jar b/lib/kotlin-for-upsource.jar index 9e2833e2..79e08854 100644 Binary files a/lib/kotlin-for-upsource.jar and b/lib/kotlin-for-upsource.jar differ diff --git a/src/Model/Content.kt b/src/Model/Content.kt index 032de268..709dff2b 100644 --- a/src/Model/Content.kt +++ b/src/Model/Content.kt @@ -1,12 +1,10 @@ package org.jetbrains.dokka -import kotlin.properties.Delegates +public interface ContentNode -public abstract class ContentNode +public object ContentEmpty : ContentNode -public object ContentEmpty : ContentNode() - -public open class ContentBlock() : ContentNode() { +public open class ContentBlock() : ContentNode { val children = arrayListOf() fun append(node : ContentNode) { @@ -29,12 +27,12 @@ enum class IdentifierKind { Other } -public data class ContentText(val text: String) : ContentNode() -public data class ContentKeyword(val text: String) : ContentNode() -public data class ContentIdentifier(val text: String, val kind: IdentifierKind = IdentifierKind.Other) : ContentNode() -public data class ContentSymbol(val text: String) : ContentNode() -public data class ContentEntity(val text: String) : ContentNode() -public object ContentNonBreakingSpace: ContentNode() +public data class ContentText(val text: String) : ContentNode +public data class ContentKeyword(val text: String) : ContentNode +public data class ContentIdentifier(val text: String, val kind: IdentifierKind = IdentifierKind.Other) : ContentNode +public data class ContentSymbol(val text: String) : ContentNode +public data class ContentEntity(val text: String) : ContentNode +public object ContentNonBreakingSpace: ContentNode public class ContentParagraph() : ContentBlock() public class ContentEmphasis() : ContentBlock() diff --git a/test/data/format/deprecated.kt b/test/data/format/deprecated.kt index 9ee2c1d6..4fc568c2 100644 --- a/test/data/format/deprecated.kt +++ b/test/data/format/deprecated.kt @@ -1,5 +1,5 @@ -deprecated("This class sucks") class C() { } +@Deprecated("This class sucks") class C() { } -deprecated("This function sucks") fun f() { } +@Deprecated("This function sucks") fun f() { } -deprecated("This property sucks") val p: Int get() = 0 +@Deprecated("This property sucks") val p: Int get() = 0 diff --git a/test/data/functions/annotatedFunctionWithAnnotationParameters.kt b/test/data/functions/annotatedFunctionWithAnnotationParameters.kt index ee5b524a..e3bc45c9 100644 --- a/test/data/functions/annotatedFunctionWithAnnotationParameters.kt +++ b/test/data/functions/annotatedFunctionWithAnnotationParameters.kt @@ -1 +1,7 @@ -inlineOptions(InlineOption.LOCAL_CONTINUE_AND_BREAK) fun f() {} +@Target(AnnotationTarget.VALUE_PARAMETER) +@Retention(AnnotationRetention.SOURCE) +@MustBeDocumented +public annotation class Fancy(val size: Int) + + +Fancy(1) fun f() {} diff --git a/test/src/model/FunctionTest.kt b/test/src/model/FunctionTest.kt index fc3ebae5..9a5a67b4 100644 --- a/test/src/model/FunctionTest.kt +++ b/test/src/model/FunctionTest.kt @@ -191,10 +191,10 @@ Documentation""", content.description.toTestString()) @Test fun annotatedFunctionWithAnnotationParameters() { verifyModel("test/data/functions/annotatedFunctionWithAnnotationParameters.kt") { model -> - with(model.members.single().members.single()) { + with(model.members.single().members.single { it.name == "f"}) { assertEquals(1, annotations.count()) with(annotations[0]) { - assertEquals("inlineOptions", name) + assertEquals("Fancy", name) assertEquals(Content.Empty, content) assertEquals(DocumentationNode.Kind.Annotation, kind) assertEquals(1, details.count()) @@ -203,7 +203,7 @@ Documentation""", content.description.toTestString()) assertEquals(1, details.count()) with(details[0]) { assertEquals(DocumentationNode.Kind.Value, kind) - assertEquals("[InlineOption.LOCAL_CONTINUE_AND_BREAK]", name) + assertEquals("1", name) } } } -- cgit