added an extra test to check for bad kdoc results
This commit is contained in:
@@ -25,6 +25,10 @@ class GenerateSiteTest : TestCase() {
|
||||
|
||||
copyDocResources(outDir)
|
||||
copyRecursive(apidocDir, outDir)
|
||||
|
||||
// now lets assert that the API docs generated everything
|
||||
assertFilesExist(outDir, "Expected generate API docs are missing - API doc generation failure",
|
||||
"kotlin/package.html", "kotlin/dom/package.html")
|
||||
}
|
||||
|
||||
fun testCopyJSApiDocs(): Unit {
|
||||
@@ -61,6 +65,14 @@ class GenerateSiteTest : TestCase() {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO this could make a handy test function
|
||||
fun assertFilesExist(dir: File, message: String, vararg names: String): Unit {
|
||||
for (name in names) {
|
||||
val file = File(dir, name)
|
||||
assertTrue(file.exists(), "${file.getPath()} does not exist. $message")
|
||||
}
|
||||
}
|
||||
|
||||
fun findTemplateDir(): File {
|
||||
val path = "src/main/templates"
|
||||
for (p in arrayList(".", "website", "library/website")) {
|
||||
|
||||
Reference in New Issue
Block a user