diff options
author | Marcin Aman <marcin.aman@gmail.com> | 2020-12-29 14:38:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-29 14:38:19 +0100 |
commit | f5e7cffbebb66b989c64bdda61e1f7809ddc6068 (patch) | |
tree | ea0ef4b550f9a55681a915d5cb4d9f1beca22041 /plugins/base/src/test/kotlin/model | |
parent | e55f3b015faec3f62e829a2aa5984e4bd6d5037e (diff) | |
download | dokka-f5e7cffbebb66b989c64bdda61e1f7809ddc6068.tar.gz dokka-f5e7cffbebb66b989c64bdda61e1f7809ddc6068.tar.bz2 dokka-f5e7cffbebb66b989c64bdda61e1f7809ddc6068.zip |
Parsing of JvmName (#1675)
* Parsing of JvmName
* Make JvmName processor run after KaJ
Diffstat (limited to 'plugins/base/src/test/kotlin/model')
-rw-r--r-- | plugins/base/src/test/kotlin/model/ClassesTest.kt | 14 | ||||
-rw-r--r-- | plugins/base/src/test/kotlin/model/FunctionsTest.kt | 16 | ||||
-rw-r--r-- | plugins/base/src/test/kotlin/model/JavaTest.kt | 2 | ||||
-rw-r--r-- | plugins/base/src/test/kotlin/model/PropertyTest.kt | 6 |
4 files changed, 19 insertions, 19 deletions
diff --git a/plugins/base/src/test/kotlin/model/ClassesTest.kt b/plugins/base/src/test/kotlin/model/ClassesTest.kt index b6787126..2260a46f 100644 --- a/plugins/base/src/test/kotlin/model/ClassesTest.kt +++ b/plugins/base/src/test/kotlin/model/ClassesTest.kt @@ -182,12 +182,12 @@ class ClassesTest : AbstractModelTest("/src/main/kotlin/classes/Test.kt", "class """ ) { with((this / "classes" / "Foo").cast<DClass>()) { - with(extra[Annotations]!!.content.entries.single().value.assertNotNull("Annotations")) { + with(extra[Annotations]!!.directAnnotations.entries.single().value.assertNotNull("Annotations")) { this counts 1 with(first()) { dri.classNames equals "Deprecated" params.entries counts 1 - (params["message"].assertNotNull("message") as StringValue).value equals "\"should no longer be used\"" + (params["message"].assertNotNull("message") as StringValue).value equals "should no longer be used" } } } @@ -361,12 +361,12 @@ class ClassesTest : AbstractModelTest("/src/main/kotlin/classes/Test.kt", "class """ ) { with((this / "classes" / "C").cast<DClass>()) { - with(extra[Annotations]!!.content.entries.single().value.assertNotNull("Annotations")) { + with(extra[Annotations]!!.directAnnotations.entries.single().value.assertNotNull("Annotations")) { this counts 1 with(first()) { dri.classNames equals "SinceKotlin" params.entries counts 1 - (params["version"].assertNotNull("version") as StringValue).value equals "\"1.1\"" + (params["version"].assertNotNull("version") as StringValue).value equals "1.1" } } } @@ -426,9 +426,9 @@ class ClassesTest : AbstractModelTest("/src/main/kotlin/classes/Test.kt", "class """@Suppress("abc") class Foo() {}""" ) { with((this / "classes" / "Foo").cast<DClass>()) { - with(extra[Annotations]?.content?.values?.firstOrNull()?.firstOrNull().assertNotNull("annotations")) { + with(extra[Annotations]?.directAnnotations?.values?.firstOrNull()?.firstOrNull().assertNotNull("annotations")) { dri.toString() equals "kotlin/Suppress///PointingToDeclaration/" - (params["names"].assertNotNull("param") as ArrayValue).value equals listOf(StringValue("\"abc\"")) + (params["names"].assertNotNull("param") as ArrayValue).value equals listOf(StringValue("abc")) } } } @@ -446,7 +446,7 @@ class ClassesTest : AbstractModelTest("/src/main/kotlin/classes/Test.kt", "class """ ) { with((this / "classes" / "throws").cast<DAnnotation>()) { - with(extra[Annotations]!!.content.entries.single().value.assertNotNull("Annotations")) { + with(extra[Annotations]!!.directAnnotations.entries.single().value.assertNotNull("Annotations")) { this counts 1 with(first()) { dri.classNames equals "Retention" diff --git a/plugins/base/src/test/kotlin/model/FunctionsTest.kt b/plugins/base/src/test/kotlin/model/FunctionsTest.kt index 9fffb4fc..ac9b6d7d 100644 --- a/plugins/base/src/test/kotlin/model/FunctionsTest.kt +++ b/plugins/base/src/test/kotlin/model/FunctionsTest.kt @@ -141,12 +141,12 @@ class FunctionTest : AbstractModelTest("/src/main/kotlin/function/Test.kt", "fun """ ) { with((this / "function" / "f").cast<DFunction>()) { - with(extra[Annotations]!!.content.entries.single().value.assertNotNull("Annotations")) { + with(extra[Annotations]!!.directAnnotations.entries.single().value.assertNotNull("Annotations")) { this counts 1 with(first()) { dri.classNames equals "Suppress" params.entries counts 1 - (params["names"].assertNotNull("param") as ArrayValue).value equals listOf(StringValue("\"FOO\"")) + (params["names"].assertNotNull("param") as ArrayValue).value equals listOf(StringValue("FOO")) } } } @@ -226,7 +226,7 @@ class FunctionTest : AbstractModelTest("/src/main/kotlin/function/Test.kt", "fun """ ) { with((this / "function" / "Fancy").cast<DAnnotation>()) { - with(extra[Annotations]!!.content.entries.single().value.assertNotNull("Annotations")) { + with(extra[Annotations]!!.directAnnotations.entries.single().value.assertNotNull("Annotations")) { this counts 3 with(map { it.dri.classNames to it }.toMap()) { with(this["Target"].assertNotNull("Target")) { @@ -249,7 +249,7 @@ class FunctionTest : AbstractModelTest("/src/main/kotlin/function/Test.kt", "fun } with((this / "function" / "function" / "notInlined").cast<DParameter>()) { - with(this.extra[Annotations]!!.content.entries.single().value.assertNotNull("Annotations")) { + with(this.extra[Annotations]!!.directAnnotations.entries.single().value.assertNotNull("Annotations")) { this counts 1 with(first()) { dri.classNames equals "Fancy" @@ -296,7 +296,7 @@ class FunctionTest : AbstractModelTest("/src/main/kotlin/function/Test.kt", "fun } } - with(extra[Annotations]!!.content.entries.single().value.assertNotNull("Annotations")) { + with(extra[Annotations]!!.directAnnotations.entries.single().value.assertNotNull("Annotations")) { this counts 3 with(map { it.dri.classNames to it }.toMap()) { with(this["Target"].assertNotNull("Target")) { @@ -319,7 +319,7 @@ class FunctionTest : AbstractModelTest("/src/main/kotlin/function/Test.kt", "fun } with((this / "function" / "f").cast<DFunction>()) { - with(this.extra[Annotations]!!.content.entries.single().value.assertNotNull("Annotations")) { + with(this.extra[Annotations]!!.directAnnotations.entries.single().value.assertNotNull("Annotations")) { this counts 1 with(this.first()) { dri.classNames equals "Fancy" @@ -381,12 +381,12 @@ class FunctionTest : AbstractModelTest("/src/main/kotlin/function/Test.kt", "fun """ ) { with((this / "function" / "f").cast<DFunction>()) { - with(extra[Annotations]!!.content.entries.single().value.assertNotNull("Annotations")) { + with(extra[Annotations]!!.directAnnotations.entries.single().value.assertNotNull("Annotations")) { this counts 1 with(first()) { dri.classNames equals "SinceKotlin" params.entries counts 1 - (params["version"].assertNotNull("version") as StringValue).value equals "\"1.1\"" + (params["version"].assertNotNull("version") as StringValue).value equals "1.1" } } } diff --git a/plugins/base/src/test/kotlin/model/JavaTest.kt b/plugins/base/src/test/kotlin/model/JavaTest.kt index 18927218..beb7c8e4 100644 --- a/plugins/base/src/test/kotlin/model/JavaTest.kt +++ b/plugins/base/src/test/kotlin/model/JavaTest.kt @@ -274,7 +274,7 @@ class JavaTest : AbstractModelTest("/src/main/kotlin/java/Test.java", "java") { """ ) { with((this / "java" / "Attribute").cast<DAnnotation>()) { - with(extra[Annotations]!!.content.entries.single().value.assertNotNull("Annotations")) { + with(extra[Annotations]!!.directAnnotations.entries.single().value.assertNotNull("Annotations")) { with(single()) { dri.classNames equals "Target" (params["value"].assertNotNull("value") as ArrayValue).value equals listOf( diff --git a/plugins/base/src/test/kotlin/model/PropertyTest.kt b/plugins/base/src/test/kotlin/model/PropertyTest.kt index af952b43..8474116f 100644 --- a/plugins/base/src/test/kotlin/model/PropertyTest.kt +++ b/plugins/base/src/test/kotlin/model/PropertyTest.kt @@ -150,12 +150,12 @@ class PropertyTest : AbstractModelTest("/src/main/kotlin/property/Test.kt", "pro """ ) { with((this / "property" / "prop").cast<DProperty>()) { - with(extra[Annotations]!!.content.entries.single().value.assertNotNull("Annotations")) { + with(extra[Annotations]!!.directAnnotations.entries.single().value.assertNotNull("Annotations")) { this counts 1 with(first()) { dri.classNames equals "SinceKotlin" params.entries counts 1 - (params["version"].assertNotNull("version") as StringValue).value equals "\"1.1\"" + (params["version"].assertNotNull("version") as StringValue).value equals "1.1" } } } @@ -178,7 +178,7 @@ class PropertyTest : AbstractModelTest("/src/main/kotlin/property/Test.kt", "pro } ) { with((this / "property" / "property").cast<DProperty>()) { - with(extra[Annotations]!!.content.entries.single().value.assertNotNull("Annotations")) { + with(extra[Annotations]!!.directAnnotations.entries.single().value.assertNotNull("Annotations")) { this counts 1 with(first()) { dri.classNames equals "Strictfp" |