aboutsummaryrefslogtreecommitdiff
path: root/core/src/test
diff options
context:
space:
mode:
authorSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2016-11-14 18:08:17 +0300
committerSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2016-11-14 18:08:17 +0300
commit47790d166100dc50d797fc0312b9b3fe0e7e9d7f (patch)
tree15750d4e238692305b089b4a9969b005868aaaf6 /core/src/test
parentdc99d1fd5c066ac6083f09e23e52cf6c592768e4 (diff)
downloaddokka-47790d166100dc50d797fc0312b9b3fe0e7e9d7f.tar.gz
dokka-47790d166100dc50d797fc0312b9b3fe0e7e9d7f.tar.bz2
dokka-47790d166100dc50d797fc0312b9b3fe0e7e9d7f.zip
Replacing assertPrints, assertTrue to println for kotlin-website samples, Added SampleProcessingService to FormatDescriptor
Diffstat (limited to 'core/src/test')
-rw-r--r--core/src/test/kotlin/TestAPI.kt6
-rw-r--r--core/src/test/kotlin/format/KotlinWebSiteFormatTest.kt6
2 files changed, 9 insertions, 3 deletions
diff --git a/core/src/test/kotlin/TestAPI.kt b/core/src/test/kotlin/TestAPI.kt
index 508d28fc..7197d2c4 100644
--- a/core/src/test/kotlin/TestAPI.kt
+++ b/core/src/test/kotlin/TestAPI.kt
@@ -125,8 +125,9 @@ fun verifyOutput(roots: Array<ContentRoot>,
outputExtension: String,
withJdk: Boolean = false,
withKotlinRuntime: Boolean = false,
+ format: String = "html",
outputGenerator: (DocumentationModule, StringBuilder) -> Unit) {
- verifyModel(*roots, withJdk = withJdk, withKotlinRuntime = withKotlinRuntime) {
+ verifyModel(*roots, withJdk = withJdk, withKotlinRuntime = withKotlinRuntime, format = format) {
verifyModelOutput(it, outputExtension, outputGenerator, roots.first().path)
}
}
@@ -147,8 +148,9 @@ fun verifyOutput(path: String,
outputExtension: String,
withJdk: Boolean = false,
withKotlinRuntime: Boolean = false,
+ format: String = "html",
outputGenerator: (DocumentationModule, StringBuilder) -> Unit) {
- verifyOutput(arrayOf(contentRootFromPath(path)), outputExtension, withJdk, withKotlinRuntime, outputGenerator)
+ verifyOutput(arrayOf(contentRootFromPath(path)), outputExtension, withJdk, withKotlinRuntime, format, outputGenerator)
}
fun verifyJavaOutput(path: String,
diff --git a/core/src/test/kotlin/format/KotlinWebSiteFormatTest.kt b/core/src/test/kotlin/format/KotlinWebSiteFormatTest.kt
index e7419ec8..e7677862 100644
--- a/core/src/test/kotlin/format/KotlinWebSiteFormatTest.kt
+++ b/core/src/test/kotlin/format/KotlinWebSiteFormatTest.kt
@@ -19,8 +19,12 @@ class KotlinWebSiteFormatTest {
verifyKWSNodeByName("overloadGroup", "magic")
}
+ @Test fun sampleWithAsserts() {
+ verifyKWSNodeByName("sampleWithAsserts", "a")
+ }
+
private fun verifyKWSNodeByName(fileName: String, name: String) {
- verifyOutput("testdata/format/website/$fileName.kt", ".md") { model, output ->
+ verifyOutput("testdata/format/website/$fileName.kt", ".md", format = "kotlin-website") { model, output ->
kwsService.createOutputBuilder(output, tempLocation).appendNodes(model.members.single().members.filter { it.name == name })
}
}