From f2fd617b921f7a9bee826a271213e17586e6949c Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Fri, 13 Feb 2015 12:17:47 +0100 Subject: tests use the same implementation of DocumentationModule building logic as production code --- test/src/TestAPI.kt | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'test/src') 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()) - - 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) } -- cgit