aboutsummaryrefslogtreecommitdiff
path: root/test/src
diff options
context:
space:
mode:
authorIlya Ryzhenkov <orangy@jetbrains.com>2014-10-13 20:14:45 +0400
committerIlya Ryzhenkov <orangy@jetbrains.com>2014-10-13 20:14:45 +0400
commit1cb3af902c8f2e3f73e7c78781373f1ab5788772 (patch)
tree88aaa6a10f0da26d28e9c2792313a2a11cf28356 /test/src
parentefd1947722587d15bf1c81a0fd7ca722a7bc6fa8 (diff)
downloaddokka-1cb3af902c8f2e3f73e7c78781373f1ab5788772.tar.gz
dokka-1cb3af902c8f2e3f73e7c78781373f1ab5788772.tar.bz2
dokka-1cb3af902c8f2e3f73e7c78781373f1ab5788772.zip
Remove BindingContext and migrate to ResolveSession, discover symbols for {code ...} directive.
Diffstat (limited to 'test/src')
-rw-r--r--test/src/TestAPI.kt6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/src/TestAPI.kt b/test/src/TestAPI.kt
index b885a15f..ccef8919 100644
--- a/test/src/TestAPI.kt
+++ b/test/src/TestAPI.kt
@@ -30,15 +30,15 @@ public fun verifyModel(vararg files: String, verifier: (DocumentationModule) ->
val options = DocumentationOptions(includeNonPublic = true)
- val documentation = environment.withContext { environment, module, context ->
- val fragments = environment.getSourceFiles().map { context.getPackageFragment(it) }.filterNotNull().distinct()
+ val documentation = environment.withContext { environment, session ->
+ val fragments = environment.getSourceFiles().map { session.getPackageFragment(it.getPackageFqName()) }.filterNotNull().distinct()
val descriptors = hashMapOf<String, List<DeclarationDescriptor>>()
for ((name, parts) in fragments.groupBy { it.fqName }) {
descriptors.put(name.asString(), parts.flatMap { it.getMemberScope().getAllDescriptors() })
}
val documentationModule = DocumentationModule("test")
- val documentationBuilder = DocumentationBuilder(context, options)
+ val documentationBuilder = DocumentationBuilder(session, options)
with(documentationBuilder) {
documentationModule.appendFragments(fragments)
}