diff options
author | Ignat Beresnev <ignat.beresnev@jetbrains.com> | 2022-09-21 13:14:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-21 13:14:51 +0200 |
commit | 879d4f2652d528f20c95d5bb17899d6cb10c5e85 (patch) | |
tree | 27b2ee08207aeba43a58bb7dd9a26315f4470d4d /plugins/kotlin-as-java/src/test/kotlin | |
parent | e49726f2b9a61278ba3ced9eb2438d925f5d364c (diff) | |
download | dokka-879d4f2652d528f20c95d5bb17899d6cb10c5e85.tar.gz dokka-879d4f2652d528f20c95d5bb17899d6cb10c5e85.tar.bz2 dokka-879d4f2652d528f20c95d5bb17899d6cb10c5e85.zip |
Wrap long signatures dynamically based on client width (#2659)
Diffstat (limited to 'plugins/kotlin-as-java/src/test/kotlin')
-rw-r--r-- | plugins/kotlin-as-java/src/test/kotlin/KotlinAsJavaPluginTest.kt | 47 |
1 files changed, 0 insertions, 47 deletions
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<ContentPage>() } - .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`() |