diff options
author | Dmitry Jemerov <yole@jetbrains.com> | 2015-02-13 12:17:47 +0100 |
---|---|---|
committer | Dmitry Jemerov <yole@jetbrains.com> | 2015-02-13 12:17:47 +0100 |
commit | f2fd617b921f7a9bee826a271213e17586e6949c (patch) | |
tree | 28ddb97c1c5ef040da3415ff85c03519cfa0b53c /test/src | |
parent | f3bed4012efe860f02dfdb7c73c0a7fe2d6bcbfa (diff) | |
download | dokka-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.kt | 14 |
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) } |