diff options
author | aleksZubakov <aleks.zubakov@gmail.com> | 2018-07-12 20:23:02 +0300 |
---|---|---|
committer | aleksZubakov <aleks.zubakov@gmail.com> | 2018-07-12 20:23:02 +0300 |
commit | 742be4ef7c024a5ea6023fb684cd24d1898f37e4 (patch) | |
tree | 34fc44ef7ee5afdb7a153367d80872f74ace4937 /core/src/test/kotlin/model/FunctionTest.kt | |
parent | b4fcc57ab7f335459131ce105924eeaa5fa77375 (diff) | |
download | dokka-742be4ef7c024a5ea6023fb684cd24d1898f37e4.tar.gz dokka-742be4ef7c024a5ea6023fb684cd24d1898f37e4.tar.bz2 dokka-742be4ef7c024a5ea6023fb684cd24d1898f37e4.zip |
Test refactoring, add common platform tests
Diffstat (limited to 'core/src/test/kotlin/model/FunctionTest.kt')
-rw-r--r-- | core/src/test/kotlin/model/FunctionTest.kt | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/core/src/test/kotlin/model/FunctionTest.kt b/core/src/test/kotlin/model/FunctionTest.kt index 2704bf65..47685df2 100644 --- a/core/src/test/kotlin/model/FunctionTest.kt +++ b/core/src/test/kotlin/model/FunctionTest.kt @@ -4,6 +4,7 @@ import org.jetbrains.dokka.Content import org.jetbrains.dokka.NodeKind import org.jetbrains.dokka.Platform import org.jetbrains.kotlin.analyzer.PlatformAnalysisParameters +import org.junit.Assert import org.junit.Assert.assertEquals import org.junit.Assert.assertTrue import org.junit.Test @@ -229,3 +230,25 @@ Documentation""", content.description.toTestString()) } } } + +class JSFunctionTest: BaseFunctionTest(Platform.js) + +class JVMFunctionTest: BaseFunctionTest(Platform.jvm) { + @Test + fun annotatedFunction() { + verifyPackageMember("testdata/functions/annotatedFunction.kt", ModelConfig( + analysisPlatform = Platform.jvm, + withKotlinRuntime = true + )) { func -> + Assert.assertEquals(1, func.annotations.count()) + with(func.annotations[0]) { + Assert.assertEquals("Strictfp", name) + Assert.assertEquals(Content.Empty, content) + Assert.assertEquals(NodeKind.Annotation, kind) + } + } + } + +} + +class CommonFunctionTest: BaseFunctionTest(Platform.common)
\ No newline at end of file |