aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/test/kotlin/renderers
diff options
context:
space:
mode:
authorsebastian.sellmair <sebastian.sellmair@jetbrains.com>2020-06-09 13:40:03 +0200
committerSebastian Sellmair <34319766+sellmair@users.noreply.github.com>2020-06-15 19:17:11 +0200
commitee425e0b1e39245f5e1106bbb0888e557e6fbfcd (patch)
tree4348359dc6c95129d33d2468ec3be86e4a95491e /plugins/base/src/test/kotlin/renderers
parentbae2c8de63baf0c0b627a17ae179400fbc3c5be9 (diff)
downloaddokka-ee425e0b1e39245f5e1106bbb0888e557e6fbfcd.tar.gz
dokka-ee425e0b1e39245f5e1106bbb0888e557e6fbfcd.tar.bz2
dokka-ee425e0b1e39245f5e1106bbb0888e557e6fbfcd.zip
Implement "failOnWarning" option
Diffstat (limited to 'plugins/base/src/test/kotlin/renderers')
-rw-r--r--plugins/base/src/test/kotlin/renderers/RenderingOnlyTestBase.kt14
1 files changed, 8 insertions, 6 deletions
diff --git a/plugins/base/src/test/kotlin/renderers/RenderingOnlyTestBase.kt b/plugins/base/src/test/kotlin/renderers/RenderingOnlyTestBase.kt
index a4d7bd04..452439e9 100644
--- a/plugins/base/src/test/kotlin/renderers/RenderingOnlyTestBase.kt
+++ b/plugins/base/src/test/kotlin/renderers/RenderingOnlyTestBase.kt
@@ -36,7 +36,9 @@ abstract class RenderingOnlyTestBase {
DokkaBase().externalLocationProviderFactory to { ::JavadocExternalLocationProviderFactory },
DokkaBase().externalLocationProviderFactory to { ::DokkaExternalLocationProviderFactory },
sourceSetCache = SourceSetCache(),
- testConfiguration = DokkaConfigurationImpl("", "", null, false, emptyList(), emptyList(), emptyMap(), emptyList())
+ testConfiguration = DokkaConfigurationImpl(
+ "", "", null, false, emptyList(), emptyList(), emptyMap(), emptyList(), false
+ )
)
protected val renderedContent: Element by lazy {
@@ -50,7 +52,7 @@ abstract class RenderingOnlyTestBase {
}
-class TestPage(callback: PageContentBuilder.DocumentableContentBuilder.() -> Unit): RootPageNode(), ContentPage {
+class TestPage(callback: PageContentBuilder.DocumentableContentBuilder.() -> Unit) : RootPageNode(), ContentPage {
override val dri: Set<DRI> = setOf(DRI.topLevel)
override val documentable: Documentable? = null
override val embeddedResources: List<String> = emptyList()
@@ -88,14 +90,14 @@ fun Element.match(vararg matchers: Any): Unit =
.forEach { (n, m) -> m.accepts(n) }
open class Tag(val name: String, vararg val matchers: Any)
-class Div(vararg matchers: Any): Tag("div", *matchers)
-class P(vararg matchers: Any): Tag("p", *matchers)
-class Span(vararg matchers: Any): Tag("span", *matchers)
+class Div(vararg matchers: Any) : Tag("div", *matchers)
+class P(vararg matchers: Any) : Tag("p", *matchers)
+class Span(vararg matchers: Any) : Tag("span", *matchers)
private fun Any.accepts(n: Node) {
when (this) {
is String -> assert(n is TextNode && n.text().trim() == this.trim()) { "\"$this\" expected but found: $n" }
- is Tag -> {
+ is Tag -> {
assert(n is Element && n.tagName() == name) { "Tag $name expected but found: $n" }
if (n is Element && matchers.isNotEmpty()) n.match(*matchers)
}