aboutsummaryrefslogtreecommitdiff
path: root/test/src
diff options
context:
space:
mode:
Diffstat (limited to 'test/src')
-rw-r--r--test/src/TestAPI.kt3
-rw-r--r--test/src/format/MarkdownFormatTest.kt7
2 files changed, 4 insertions, 6 deletions
diff --git a/test/src/TestAPI.kt b/test/src/TestAPI.kt
index 901e78fc..d6c7efb7 100644
--- a/test/src/TestAPI.kt
+++ b/test/src/TestAPI.kt
@@ -4,7 +4,6 @@ import org.jetbrains.kotlin.cli.common.messages.*
import com.intellij.openapi.util.*
import kotlin.test.fail
import org.jetbrains.dokka.*
-import org.jetbrains.kotlin.descriptors.DeclarationDescriptor
import java.io.File
import com.intellij.openapi.application.PathManager
import org.junit.Assert
@@ -54,7 +53,7 @@ public fun verifyOutput(path: String, outputExtension: String, outputGenerator:
verifyModel(path) {
val output = StringBuilder()
outputGenerator(it, output)
- val expectedOutput = File(path.replace(".kt", outputExtension)).readText()
+ val expectedOutput = File(path.replace(".kt", outputExtension)).readText().replace("\r\n", "\n")
Assert.assertEquals(expectedOutput, output.toString())
}
}
diff --git a/test/src/format/MarkdownFormatTest.kt b/test/src/format/MarkdownFormatTest.kt
index 1b8b1cc0..a5a62e13 100644
--- a/test/src/format/MarkdownFormatTest.kt
+++ b/test/src/format/MarkdownFormatTest.kt
@@ -2,8 +2,6 @@ package org.jetbrains.dokka.tests
import org.junit.Test
import org.jetbrains.dokka.*
-import java.io.File
-import kotlin.test.assertEquals
public class MarkdownFormatTest {
private val markdownService = MarkdownFormatService(InMemoryLocationService, KotlinLanguageService())
@@ -52,8 +50,9 @@ public class MarkdownFormatTest {
markdownService.appendNodes(tempLocation, output, model.members.single().members)
}
verifyOutput("test/data/format/enumClass.kt", ".value.md") { model, output ->
- val documentationNode = model.members.single()
- markdownService.appendNodes(tempLocation, output, listOf(documentationNode.members[0].members[1]))
+ val enumClassNode = model.members.single().members[0]
+ markdownService.appendNodes(tempLocation, output,
+ enumClassNode.members.filter { it.name == "LOCAL_CONTINUE_AND_BREAK" })
}
}
}