diff options
author | sebastian.sellmair <sebastian.sellmair@jetbrains.com> | 2020-08-26 16:56:39 +0200 |
---|---|---|
committer | Sebastian Sellmair <34319766+sellmair@users.noreply.github.com> | 2020-08-31 15:10:04 +0200 |
commit | 732d181e4908ed0ddc513e305addc71560c0e109 (patch) | |
tree | 740c3ebe3fa05c3702b30faf07c4f6f87c97e432 /plugins/base/src/test/kotlin/translators | |
parent | f0524ce475695be163683cd1fdda2fab58ac0161 (diff) | |
download | dokka-732d181e4908ed0ddc513e305addc71560c0e109.tar.gz dokka-732d181e4908ed0ddc513e305addc71560c0e109.tar.bz2 dokka-732d181e4908ed0ddc513e305addc71560c0e109.zip |
Let root package be represented as [root] to the user
Diffstat (limited to 'plugins/base/src/test/kotlin/translators')
-rw-r--r-- | plugins/base/src/test/kotlin/translators/utils.kt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/base/src/test/kotlin/translators/utils.kt b/plugins/base/src/test/kotlin/translators/utils.kt index 71b4a28b..cbb6efa7 100644 --- a/plugins/base/src/test/kotlin/translators/utils.kt +++ b/plugins/base/src/test/kotlin/translators/utils.kt @@ -20,7 +20,7 @@ fun DModule.descriptionOf(className: String, functionName: String? = null): Desc } fun DModule.findPackage(packageName: String? = null) = - packageName?.let { packages.firstOrNull { pkg -> pkg.name == packageName } + packageName?.let { packages.firstOrNull { pkg -> pkg.packageName == packageName } ?: throw NoSuchElementException("No packageName with name $packageName") } ?: packages.single() fun DModule.findClasslike(packageName: String? = null, className: String? = null): DClasslike { @@ -37,4 +37,4 @@ fun DModule.findFunction(packageName: String? = null, className: String, functio classlike.functions.firstOrNull { fn -> fn.name == functionName } ?: throw NoSuchElementException("No classlike with name $functionName") } ?: classlike.functions.single() -}
\ No newline at end of file +} |