From 879d4f2652d528f20c95d5bb17899d6cb10c5e85 Mon Sep 17 00:00:00 2001 From: Ignat Beresnev Date: Wed, 21 Sep 2022 13:14:51 +0200 Subject: Wrap long signatures dynamically based on client width (#2659) --- .../src/test/kotlin/KotlinAsJavaPluginTest.kt | 47 ---------------------- 1 file changed, 47 deletions(-) (limited to 'plugins/kotlin-as-java/src') diff --git a/plugins/kotlin-as-java/src/test/kotlin/KotlinAsJavaPluginTest.kt b/plugins/kotlin-as-java/src/test/kotlin/KotlinAsJavaPluginTest.kt index 6b7a2ae0..b43cea05 100644 --- a/plugins/kotlin-as-java/src/test/kotlin/KotlinAsJavaPluginTest.kt +++ b/plugins/kotlin-as-java/src/test/kotlin/KotlinAsJavaPluginTest.kt @@ -489,53 +489,6 @@ class KotlinAsJavaPluginTest : BaseAbstractTest() { } } - @Test - fun `should add wrapping and indent to parameters if too many`() { - val writerPlugin = TestOutputWriterPlugin() - val configuration = dokkaConfiguration { - sourceSets { - sourceSet { - sourceRoots = listOf("src/") - externalDocumentationLinks = listOf( - DokkaConfiguration.ExternalDocumentationLink.jdk(8), - stdlibExternalDocumentationLink - ) - } - } - } - testInline( - """ - |/src/main/kotlin/kotlinAsJavaPlugin/Wrapped.kt - |package kotlinAsJavaPlugin - | - |class Wrapped(val xd: Int, val l: Long, val s: String) - """.trimMargin(), - configuration, - pluginOverrides = listOf(writerPlugin), - cleanupOutput = true - ) { - pagesGenerationStage = { root -> - val content = root.children - .flatMap { it.children() } - .map { it.content }.single().mainContents - - val text = content.single { it is ContentHeader }.children - .single() as ContentText - - assertEquals("Constructors", text.text) - } - renderingStage = { _, _ -> - writerPlugin.writer.renderedContent("root/kotlinAsJavaPlugin/-wrapped/-wrapped.html").firstSignature().match( - A("Wrapped"), A("Wrapped"), "(", Parameters( - Parameter(A("Integer"), "xd,").withClasses("indented"), - Parameter(A("Long"), "l,").withClasses("indented"), - Parameter(A("String"), "s").withClasses("indented"), - ).withClasses("wrapped"), ")", ignoreSpanWithTokenStyle = true - ) - } - } - } - /** * Kotlin Int becomes java int. Java int cannot be annotated in source, but Kotlin Int can be. * This is paired with DefaultDescriptorToDocumentableTranslatorTest.`Java primitive annotations work`() -- cgit