aboutsummaryrefslogtreecommitdiff
path: root/core/src/test/kotlin/TestAPI.kt
diff options
context:
space:
mode:
authorSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2017-12-02 05:59:01 +0300
committerSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2017-12-02 05:59:01 +0300
commite126ff625eba33d91b3242a4e6e951d1e9f94080 (patch)
tree35b5887c94aa79b26cf8c8f0c40758f0e34c7eab /core/src/test/kotlin/TestAPI.kt
parentd6d5df5bc04be5274446e9f37a3e52672083da36 (diff)
downloaddokka-e126ff625eba33d91b3242a4e6e951d1e9f94080.tar.gz
dokka-e126ff625eba33d91b3242a4e6e951d1e9f94080.tar.bz2
dokka-e126ff625eba33d91b3242a4e6e951d1e9f94080.zip
Update tests to new reality
Diffstat (limited to 'core/src/test/kotlin/TestAPI.kt')
-rw-r--r--core/src/test/kotlin/TestAPI.kt11
1 files changed, 11 insertions, 0 deletions
diff --git a/core/src/test/kotlin/TestAPI.kt b/core/src/test/kotlin/TestAPI.kt
index aa3eff48..4cd11390 100644
--- a/core/src/test/kotlin/TestAPI.kt
+++ b/core/src/test/kotlin/TestAPI.kt
@@ -276,3 +276,14 @@ val ContentRoot.path: String
is JavaSourceRoot -> file.path
else -> throw UnsupportedOperationException()
}
+
+
+val TestFileGenerator = FileGenerator(createTempDir())
+
+fun FileGenerator.buildPagesAndReadInto(nodes: List<DocumentationNode>, sb: StringBuilder) {
+ buildPages(nodes)
+ nodes.forEach {
+ val fileForNode = TestFileGenerator.location(it).file
+ sb.append(fileForNode.readText())
+ }
+} \ No newline at end of file