From 2c01749e5213e030ca32dd04058d478a65951fed Mon Sep 17 00:00:00 2001 From: Vadim Mishenev Date: Wed, 26 Jul 2023 16:18:35 +0300 Subject: Fix some tests to be compatible with K2 (#3086) --- .../content/annotations/ContentForAnnotationsTest.kt | 2 +- .../content/annotations/KotlinDeprecatedTest.kt | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'plugins/base/src/test/kotlin/content') diff --git a/plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt b/plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt index 2659fd86..46239baa 100644 --- a/plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt +++ b/plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt @@ -180,7 +180,7 @@ class ContentForAnnotationsTest : BaseAbstractTest() { | |@MustBeDocumented |@Retention(AnnotationRetention.SOURCE) - |@Target(AnnotationTarget.FIELD) + |@Target(AnnotationTarget.PROPERTY) |annotation class BugReport( | val assignedTo: String = "[none]", | val testCase: KClass = ABC::class, diff --git a/plugins/base/src/test/kotlin/content/annotations/KotlinDeprecatedTest.kt b/plugins/base/src/test/kotlin/content/annotations/KotlinDeprecatedTest.kt index 83517254..417843e2 100644 --- a/plugins/base/src/test/kotlin/content/annotations/KotlinDeprecatedTest.kt +++ b/plugins/base/src/test/kotlin/content/annotations/KotlinDeprecatedTest.kt @@ -33,7 +33,7 @@ class KotlinDeprecatedTest : BaseAbstractTest() { testInline( """ |/src/main/kotlin/kotlin/KotlinFile.kt - |package kotlin + |package deprecated | |@Deprecated( | message = "Fancy message" @@ -44,7 +44,7 @@ class KotlinDeprecatedTest : BaseAbstractTest() { ) { documentablesTransformationStage = { module -> val deprecatedFunction = module.children - .single { it.name == "kotlin" }.children + .single { it.name == "deprecated" }.children .single { it.name == "simpleFunction" } val isDeprecated = (deprecatedFunction as WithExtraProperties).isDeprecated() @@ -65,7 +65,7 @@ class KotlinDeprecatedTest : BaseAbstractTest() { testInline( """ |/src/main/kotlin/kotlin/DeprecatedKotlin.kt - |package kotlin + |package deprecated | |/** | * Average function description @@ -84,7 +84,7 @@ class KotlinDeprecatedTest : BaseAbstractTest() { ) { pagesTransformationStage = { module -> val functionWithDeprecatedFunction = module.children - .single { it.name == "kotlin" }.children + .single { it.name == "deprecated" }.children .single { it.name == "oldLegacyFunction" } as ContentPage functionWithDeprecatedFunction.content.assertNode { @@ -130,7 +130,7 @@ class KotlinDeprecatedTest : BaseAbstractTest() { testInline( """ |/src/main/kotlin/kotlin/DeprecatedKotlin.kt - |package kotlin + |package deprecated | |/** | * Average function description @@ -156,7 +156,7 @@ class KotlinDeprecatedTest : BaseAbstractTest() { ) { pagesTransformationStage = { module -> val functionWithDeprecatedFunction = module.children - .single { it.name == "kotlin" }.children + .single { it.name == "deprecated" }.children .single { it.name == "oldLegacyFunction" } as ContentPage functionWithDeprecatedFunction.content.assertNode { @@ -217,7 +217,7 @@ class KotlinDeprecatedTest : BaseAbstractTest() { testInline( """ |/src/main/kotlin/kotlin/DeprecatedKotlin.kt - |package kotlin + |package deprecated | |/** | * Average function description @@ -240,7 +240,7 @@ class KotlinDeprecatedTest : BaseAbstractTest() { ) { pagesTransformationStage = { module -> val functionWithDeprecatedFunction = module.children - .single { it.name == "kotlin" }.children + .single { it.name == "deprecated" }.children .single { it.name == "oldLegacyFunction" } as ContentPage functionWithDeprecatedFunction.content.assertNode { @@ -298,7 +298,7 @@ class KotlinDeprecatedTest : BaseAbstractTest() { testInline( """ |/src/main/kotlin/kotlin/DeprecatedKotlin.kt - |package kotlin + |package deprecated | |/** | * Average function description @@ -330,7 +330,7 @@ class KotlinDeprecatedTest : BaseAbstractTest() { ) { pagesTransformationStage = { module -> val functionWithDeprecatedFunction = module.children - .single { it.name == "kotlin" }.children + .single { it.name == "deprecated" }.children .single { it.name == "oldLegacyFunction" } as ContentPage functionWithDeprecatedFunction.content.assertNode { -- cgit