diff options
author | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2017-11-27 16:05:59 +0300 |
---|---|---|
committer | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2017-11-27 16:05:59 +0300 |
commit | 13c4cb93f55693f3bfa396ccad9549d8654ec3f9 (patch) | |
tree | d0af242a455f14d051251eeabb2b1dcc6d6db700 /core/src/test/kotlin | |
parent | cc2a478ff0f1831be2333bf97712e1ffe9d764fe (diff) | |
download | dokka-13c4cb93f55693f3bfa396ccad9549d8654ec3f9.tar.gz dokka-13c4cb93f55693f3bfa396ccad9549d8654ec3f9.tar.bz2 dokka-13c4cb93f55693f3bfa396ccad9549d8654ec3f9.zip |
Add language version arguments
Diffstat (limited to 'core/src/test/kotlin')
-rw-r--r-- | core/src/test/kotlin/TestAPI.kt | 13 | ||||
-rw-r--r-- | core/src/test/kotlin/format/KotlinWebSiteFormatTest.kt | 9 | ||||
-rw-r--r-- | core/src/test/kotlin/format/KotlinWebSiteHtmlFormatTest.kt | 9 | ||||
-rw-r--r-- | core/src/test/kotlin/format/MarkdownFormatTest.kt | 18 |
4 files changed, 42 insertions, 7 deletions
diff --git a/core/src/test/kotlin/TestAPI.kt b/core/src/test/kotlin/TestAPI.kt index 8bbeb2f2..ff8a5260 100644 --- a/core/src/test/kotlin/TestAPI.kt +++ b/core/src/test/kotlin/TestAPI.kt @@ -28,15 +28,20 @@ fun verifyModel(vararg roots: ContentRoot, verifier: (DocumentationModule) -> Unit) { val documentation = DocumentationModule("test") - val options = DocumentationOptions("", format, + val options = DocumentationOptions( + "", + format, includeNonPublic = includeNonPublic, skipEmptyPackages = false, includeRootPackage = true, - sourceLinks = listOf<SourceLinkDefinition>(), + sourceLinks = listOf(), perPackageOptions = perPackageOptions, generateIndexPages = false, noStdlibLink = true, - cacheRoot = "default") + cacheRoot = "default", + languageVersion = null, + apiVersion = null + ) appendDocumentation(documentation, *roots, withJdk = withJdk, @@ -88,6 +93,8 @@ fun appendDocumentation(documentation: DocumentationModule, addClasspath(File(kotlinStrictfpRoot)) } addRoots(roots.toList()) + + loadLanguageVersionSettings(options.languageVersion, options.apiVersion) } val defaultPlatformsProvider = object : DefaultPlatformsProvider { override fun getDefaultPlatforms(descriptor: DeclarationDescriptor) = defaultPlatforms diff --git a/core/src/test/kotlin/format/KotlinWebSiteFormatTest.kt b/core/src/test/kotlin/format/KotlinWebSiteFormatTest.kt index f4ca2982..af44b048 100644 --- a/core/src/test/kotlin/format/KotlinWebSiteFormatTest.kt +++ b/core/src/test/kotlin/format/KotlinWebSiteFormatTest.kt @@ -42,7 +42,14 @@ class KotlinWebSiteFormatTest { private fun buildMultiplePlatforms(path: String): DocumentationModule { val module = DocumentationModule("test") - val options = DocumentationOptions("", "html", generateIndexPages = false, noStdlibLink = true) + val options = DocumentationOptions( + outputDir = "", + outputFormat = "html", + generateIndexPages = false, + noStdlibLink = true, + languageVersion = null, + apiVersion = null + ) appendDocumentation(module, contentRootFromPath("testdata/format/website/$path/jvm.kt"), defaultPlatforms = listOf("JVM"), options = options) appendDocumentation(module, contentRootFromPath("testdata/format/website/$path/jre7.kt"), defaultPlatforms = listOf("JVM", "JRE7"), options = options) appendDocumentation(module, contentRootFromPath("testdata/format/website/$path/js.kt"), defaultPlatforms = listOf("JS"), options = options) diff --git a/core/src/test/kotlin/format/KotlinWebSiteHtmlFormatTest.kt b/core/src/test/kotlin/format/KotlinWebSiteHtmlFormatTest.kt index b4b133f4..433c9c13 100644 --- a/core/src/test/kotlin/format/KotlinWebSiteHtmlFormatTest.kt +++ b/core/src/test/kotlin/format/KotlinWebSiteHtmlFormatTest.kt @@ -57,7 +57,14 @@ class KotlinWebSiteHtmlFormatTest { private fun buildMultiplePlatforms(path: String): DocumentationModule { val module = DocumentationModule("test") - val options = DocumentationOptions("", "html", generateIndexPages = false, noStdlibLink = true) + val options = DocumentationOptions( + outputDir = "", + outputFormat = "kotlin-website-html", + generateIndexPages = false, + noStdlibLink = true, + languageVersion = null, + apiVersion = null + ) appendDocumentation(module, contentRootFromPath("testdata/format/website-html/$path/jvm.kt"), defaultPlatforms = listOf("JVM"), options = options) appendDocumentation(module, contentRootFromPath("testdata/format/website-html/$path/jre7.kt"), defaultPlatforms = listOf("JVM", "JRE7"), options = options) appendDocumentation(module, contentRootFromPath("testdata/format/website-html/$path/js.kt"), defaultPlatforms = listOf("JS"), options = options) diff --git a/core/src/test/kotlin/format/MarkdownFormatTest.kt b/core/src/test/kotlin/format/MarkdownFormatTest.kt index d2ab5b5c..2c5422c5 100644 --- a/core/src/test/kotlin/format/MarkdownFormatTest.kt +++ b/core/src/test/kotlin/format/MarkdownFormatTest.kt @@ -300,7 +300,14 @@ class MarkdownFormatTest { @Test fun packagePlatformsWithExtExtensions() { val path = "multiplatform/packagePlatformsWithExtExtensions" val module = DocumentationModule("test") - val options = DocumentationOptions("", "html", generateIndexPages = false, noStdlibLink = true) + val options = DocumentationOptions( + outputDir = "", + outputFormat = "html", + generateIndexPages = false, + noStdlibLink = true, + languageVersion = null, + apiVersion = null + ) appendDocumentation(module, contentRootFromPath("testdata/format/$path/jvm.kt"), defaultPlatforms = listOf("JVM"), withKotlinRuntime = true, options = options) verifyMultiplatformIndex(module, path) verifyMultiplatformPackage(module, path) @@ -402,7 +409,14 @@ class MarkdownFormatTest { private fun buildMultiplePlatforms(path: String): DocumentationModule { val module = DocumentationModule("test") - val options = DocumentationOptions("", "html", generateIndexPages = false, noStdlibLink = true) + val options = DocumentationOptions( + outputDir = "", + outputFormat = "html", + generateIndexPages = false, + noStdlibLink = true, + languageVersion = null, + apiVersion = null + ) appendDocumentation(module, contentRootFromPath("testdata/format/$path/jvm.kt"), defaultPlatforms = listOf("JVM"), options = options) appendDocumentation(module, contentRootFromPath("testdata/format/$path/js.kt"), defaultPlatforms = listOf("JS"), options = options) return module |