aboutsummaryrefslogtreecommitdiff
path: root/test/src
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2015-02-13 12:17:47 +0100
committerDmitry Jemerov <yole@jetbrains.com>2015-02-13 12:17:47 +0100
commitf2fd617b921f7a9bee826a271213e17586e6949c (patch)
tree28ddb97c1c5ef040da3415ff85c03519cfa0b53c /test/src
parentf3bed4012efe860f02dfdb7c73c0a7fe2d6bcbfa (diff)
downloaddokka-f2fd617b921f7a9bee826a271213e17586e6949c.tar.gz
dokka-f2fd617b921f7a9bee826a271213e17586e6949c.tar.bz2
dokka-f2fd617b921f7a9bee826a271213e17586e6949c.zip
tests use the same implementation of DocumentationModule building logic as production code
Diffstat (limited to 'test/src')
-rw-r--r--test/src/TestAPI.kt14
1 files changed, 1 insertions, 13 deletions
diff --git a/test/src/TestAPI.kt b/test/src/TestAPI.kt
index 7db42980..5ba685f6 100644
--- a/test/src/TestAPI.kt
+++ b/test/src/TestAPI.kt
@@ -31,20 +31,8 @@ public fun verifyModel(vararg files: String, verifier: (DocumentationModule) ->
addClasspath(File(stringRoot))
addSources(files.toList())
}
-
val options = DocumentationOptions(includeNonPublic = true, sourceLinks = listOf<SourceLinkDefinition>())
-
- val documentation = environment.withContext { environment, session ->
- val fragments = environment.getSourceFiles().map { session.getPackageFragment(it.getPackageFqName()) }.filterNotNull().distinct()
-
- val documentationModule = DocumentationModule("test")
- val documentationBuilder = DocumentationBuilder(session, options, DokkaConsoleLogger)
- with(documentationBuilder) {
- documentationModule.appendFragments(fragments)
- }
- documentationBuilder.resolveReferences(documentationModule)
- documentationModule
- }
+ val documentation = buildDocumentationModule(environment, "test", options, logger = DokkaConsoleLogger)
verifier(documentation)
Disposer.dispose(environment)
}