diff options
author | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2017-12-02 05:59:01 +0300 |
---|---|---|
committer | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2017-12-02 05:59:01 +0300 |
commit | e126ff625eba33d91b3242a4e6e951d1e9f94080 (patch) | |
tree | 35b5887c94aa79b26cf8c8f0c40758f0e34c7eab /core/src/test/kotlin/TestAPI.kt | |
parent | d6d5df5bc04be5274446e9f37a3e52672083da36 (diff) | |
download | dokka-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.kt | 11 |
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 |