From 742be4ef7c024a5ea6023fb684cd24d1898f37e4 Mon Sep 17 00:00:00 2001 From: aleksZubakov Date: Thu, 12 Jul 2018 20:23:02 +0300 Subject: Test refactoring, add common platform tests --- core/src/test/kotlin/model/FunctionTest.kt | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'core/src/test/kotlin/model/FunctionTest.kt') 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 -- cgit