diff options
Diffstat (limited to 'dokka-subprojects/plugin-base/src/test/resources')
26 files changed, 651 insertions, 0 deletions
diff --git a/dokka-subprojects/plugin-base/src/test/resources/content/samples/samples.kt b/dokka-subprojects/plugin-base/src/test/resources/content/samples/samples.kt new file mode 100644 index 00000000..4c9f38dc --- /dev/null +++ b/dokka-subprojects/plugin-base/src/test/resources/content/samples/samples.kt @@ -0,0 +1,9 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package test + +fun sampleForClassDescription() { + print("Hello") +} diff --git a/dokka-subprojects/plugin-base/src/test/resources/linkable/includes/include1.md b/dokka-subprojects/plugin-base/src/test/resources/linkable/includes/include1.md new file mode 100644 index 00000000..09882ec1 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/test/resources/linkable/includes/include1.md @@ -0,0 +1,14 @@ +# Module example + +This is JVM documentation for module example + +# Package example + +This is JVM documentation for package example + +## Example + +```kotlin +\@SqlTable(People::class) +class Person(val name: String, uuid: UUID = UUID.randomUUID()) : Entity(uuid) +``` diff --git a/dokka-subprojects/plugin-base/src/test/resources/linkable/includes/include11.md b/dokka-subprojects/plugin-base/src/test/resources/linkable/includes/include11.md new file mode 100644 index 00000000..fa27b23d --- /dev/null +++ b/dokka-subprojects/plugin-base/src/test/resources/linkable/includes/include11.md @@ -0,0 +1,3 @@ +# Module example + +This is second JVM documentation for module example diff --git a/dokka-subprojects/plugin-base/src/test/resources/linkable/includes/include2.md b/dokka-subprojects/plugin-base/src/test/resources/linkable/includes/include2.md new file mode 100644 index 00000000..1574003d --- /dev/null +++ b/dokka-subprojects/plugin-base/src/test/resources/linkable/includes/include2.md @@ -0,0 +1,7 @@ +# Module example + +This is JS documentation for module example + +# Package greeteer + +This is JS documentation for package greeteer
\ No newline at end of file diff --git a/dokka-subprojects/plugin-base/src/test/resources/linkable/samples/jsMain/kotlin/JsClass.kt b/dokka-subprojects/plugin-base/src/test/resources/linkable/samples/jsMain/kotlin/JsClass.kt new file mode 100644 index 00000000..62a961c1 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/test/resources/linkable/samples/jsMain/kotlin/JsClass.kt @@ -0,0 +1,13 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package p2 + +class JsClass { + + /** + * @sample samples.SamplesJs.exampleUsage + */ + fun printWithExclamation(msg: String) = println("$msg!") +} diff --git a/dokka-subprojects/plugin-base/src/test/resources/linkable/samples/jsMain/resources/Samples.kt b/dokka-subprojects/plugin-base/src/test/resources/linkable/samples/jsMain/resources/Samples.kt new file mode 100644 index 00000000..5dc791d7 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/test/resources/linkable/samples/jsMain/resources/Samples.kt @@ -0,0 +1,14 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package samples + +import p2.JsClass + +class SamplesJs { + + fun exampleUsage() { + JsClass().printWithExclamation("Hi, Js") + } +} diff --git a/dokka-subprojects/plugin-base/src/test/resources/linkable/samples/jvmMain/kotlin/JvmClass.kt b/dokka-subprojects/plugin-base/src/test/resources/linkable/samples/jvmMain/kotlin/JvmClass.kt new file mode 100644 index 00000000..0014cdb7 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/test/resources/linkable/samples/jvmMain/kotlin/JvmClass.kt @@ -0,0 +1,13 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package p2 + +class JvmClass { + + /** + * @sample samples.SamplesJvm.exampleUsage + */ + fun printWithExclamation(msg: String) = println("$msg!") +} diff --git a/dokka-subprojects/plugin-base/src/test/resources/linkable/samples/jvmMain/resources/Samples.kt b/dokka-subprojects/plugin-base/src/test/resources/linkable/samples/jvmMain/resources/Samples.kt new file mode 100644 index 00000000..f32538cc --- /dev/null +++ b/dokka-subprojects/plugin-base/src/test/resources/linkable/samples/jvmMain/resources/Samples.kt @@ -0,0 +1,14 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package samples + +import p2.JvmClass + +class SamplesJvm { + + fun exampleUsage() { + JvmClass().printWithExclamation("Hi, Jvm") + } +} diff --git a/dokka-subprojects/plugin-base/src/test/resources/linkable/sources/jsMain/kotlin/JsClass.kt b/dokka-subprojects/plugin-base/src/test/resources/linkable/sources/jsMain/kotlin/JsClass.kt new file mode 100644 index 00000000..180d9519 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/test/resources/linkable/sources/jsMain/kotlin/JsClass.kt @@ -0,0 +1,7 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package p1 + +class JsClass diff --git a/dokka-subprojects/plugin-base/src/test/resources/linkable/sources/jvmMain/kotlin/JvmClass.kt b/dokka-subprojects/plugin-base/src/test/resources/linkable/sources/jvmMain/kotlin/JvmClass.kt new file mode 100644 index 00000000..3adf9520 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/test/resources/linkable/sources/jvmMain/kotlin/JvmClass.kt @@ -0,0 +1,7 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package p1 + +class JvmClass diff --git a/dokka-subprojects/plugin-base/src/test/resources/linking/jvmMain/kotlin/linking/source/JavaEnum.java b/dokka-subprojects/plugin-base/src/test/resources/linking/jvmMain/kotlin/linking/source/JavaEnum.java new file mode 100644 index 00000000..016365a7 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/test/resources/linking/jvmMain/kotlin/linking/source/JavaEnum.java @@ -0,0 +1,5 @@ +package linking.source; + +public enum JavaEnum { + ON_DECEIT, ON_DESTROY; +} diff --git a/dokka-subprojects/plugin-base/src/test/resources/linking/jvmMain/kotlin/linking/source/JavaLinker.java b/dokka-subprojects/plugin-base/src/test/resources/linking/jvmMain/kotlin/linking/source/JavaLinker.java new file mode 100644 index 00000000..ac416530 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/test/resources/linking/jvmMain/kotlin/linking/source/JavaLinker.java @@ -0,0 +1,8 @@ +package linking.source; + +/** + * Reference link {@link linking.source.KotlinEnum} should resolve <p> + * sjuff sjuff {@link linking.source.KotlinEnum#ON_CREATE} should resolve <p> + * sjujj sjujj {@link linking.source.JavaEnum#ON_DECEIT} should resolve + */ +public class JavaLinker {} diff --git a/dokka-subprojects/plugin-base/src/test/resources/linking/jvmMain/kotlin/linking/source/KotlinEnum.kt b/dokka-subprojects/plugin-base/src/test/resources/linking/jvmMain/kotlin/linking/source/KotlinEnum.kt new file mode 100644 index 00000000..2d5498c1 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/test/resources/linking/jvmMain/kotlin/linking/source/KotlinEnum.kt @@ -0,0 +1,9 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package linking.source + +enum class KotlinEnum { + ON_CREATE, ON_CATASTROPHE +} diff --git a/dokka-subprojects/plugin-base/src/test/resources/linking/jvmMain/kotlin/linking/source/KotlinLinker.kt b/dokka-subprojects/plugin-base/src/test/resources/linking/jvmMain/kotlin/linking/source/KotlinLinker.kt new file mode 100644 index 00000000..ca6e233d --- /dev/null +++ b/dokka-subprojects/plugin-base/src/test/resources/linking/jvmMain/kotlin/linking/source/KotlinLinker.kt @@ -0,0 +1,12 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package linking.source + +/** + * Reference link [KotlinEnum] should resolve <p> + * stuff stuff [KotlinEnum.ON_CREATE] should resolve <p> + * stuff stuff [JavaEnum.ON_DECEIT] should resolve + */ +class KotlinLinker {} diff --git a/dokka-subprojects/plugin-base/src/test/resources/locationProvider/jdk8-package-list b/dokka-subprojects/plugin-base/src/test/resources/locationProvider/jdk8-package-list new file mode 100644 index 00000000..351c1868 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/test/resources/locationProvider/jdk8-package-list @@ -0,0 +1,217 @@ +java.applet +java.awt +java.awt.color +java.awt.datatransfer +java.awt.dnd +java.awt.event +java.awt.font +java.awt.geom +java.awt.im +java.awt.im.spi +java.awt.image +java.awt.image.renderable +java.awt.print +java.beans +java.beans.beancontext +java.io +java.lang +java.lang.annotation +java.lang.instrument +java.lang.invoke +java.lang.management +java.lang.ref +java.lang.reflect +java.math +java.net +java.nio +java.nio.channels +java.nio.channels.spi +java.nio.charset +java.nio.charset.spi +java.nio.file +java.nio.file.attribute +java.nio.file.spi +java.rmi +java.rmi.activation +java.rmi.dgc +java.rmi.registry +java.rmi.server +java.security +java.security.acl +java.security.cert +java.security.interfaces +java.security.spec +java.sql +java.text +java.text.spi +java.time +java.time.chrono +java.time.format +java.time.temporal +java.time.zone +java.util +java.util.concurrent +java.util.concurrent.atomic +java.util.concurrent.locks +java.util.function +java.util.jar +java.util.logging +java.util.prefs +java.util.regex +java.util.spi +java.util.stream +java.util.zip +javax.accessibility +javax.activation +javax.activity +javax.annotation +javax.annotation.processing +javax.crypto +javax.crypto.interfaces +javax.crypto.spec +javax.imageio +javax.imageio.event +javax.imageio.metadata +javax.imageio.plugins.bmp +javax.imageio.plugins.jpeg +javax.imageio.spi +javax.imageio.stream +javax.jws +javax.jws.soap +javax.lang.model +javax.lang.model.element +javax.lang.model.type +javax.lang.model.util +javax.management +javax.management.loading +javax.management.modelmbean +javax.management.monitor +javax.management.openmbean +javax.management.relation +javax.management.remote +javax.management.remote.rmi +javax.management.timer +javax.naming +javax.naming.directory +javax.naming.event +javax.naming.ldap +javax.naming.spi +javax.net +javax.net.ssl +javax.print +javax.print.attribute +javax.print.attribute.standard +javax.print.event +javax.rmi +javax.rmi.CORBA +javax.rmi.ssl +javax.script +javax.security.auth +javax.security.auth.callback +javax.security.auth.kerberos +javax.security.auth.login +javax.security.auth.spi +javax.security.auth.x500 +javax.security.cert +javax.security.sasl +javax.sound.midi +javax.sound.midi.spi +javax.sound.sampled +javax.sound.sampled.spi +javax.sql +javax.sql.rowset +javax.sql.rowset.serial +javax.sql.rowset.spi +javax.swing +javax.swing.border +javax.swing.colorchooser +javax.swing.event +javax.swing.filechooser +javax.swing.plaf +javax.swing.plaf.basic +javax.swing.plaf.metal +javax.swing.plaf.multi +javax.swing.plaf.nimbus +javax.swing.plaf.synth +javax.swing.table +javax.swing.text +javax.swing.text.html +javax.swing.text.html.parser +javax.swing.text.rtf +javax.swing.tree +javax.swing.undo +javax.tools +javax.transaction +javax.transaction.xa +javax.xml +javax.xml.bind +javax.xml.bind.annotation +javax.xml.bind.annotation.adapters +javax.xml.bind.attachment +javax.xml.bind.helpers +javax.xml.bind.util +javax.xml.crypto +javax.xml.crypto.dom +javax.xml.crypto.dsig +javax.xml.crypto.dsig.dom +javax.xml.crypto.dsig.keyinfo +javax.xml.crypto.dsig.spec +javax.xml.datatype +javax.xml.namespace +javax.xml.parsers +javax.xml.soap +javax.xml.stream +javax.xml.stream.events +javax.xml.stream.util +javax.xml.transform +javax.xml.transform.dom +javax.xml.transform.sax +javax.xml.transform.stax +javax.xml.transform.stream +javax.xml.validation +javax.xml.ws +javax.xml.ws.handler +javax.xml.ws.handler.soap +javax.xml.ws.http +javax.xml.ws.soap +javax.xml.ws.spi +javax.xml.ws.spi.http +javax.xml.ws.wsaddressing +javax.xml.xpath +org.ietf.jgss +org.omg.CORBA +org.omg.CORBA.DynAnyPackage +org.omg.CORBA.ORBPackage +org.omg.CORBA.TypeCodePackage +org.omg.CORBA.portable +org.omg.CORBA_2_3 +org.omg.CORBA_2_3.portable +org.omg.CosNaming +org.omg.CosNaming.NamingContextExtPackage +org.omg.CosNaming.NamingContextPackage +org.omg.Dynamic +org.omg.DynamicAny +org.omg.DynamicAny.DynAnyFactoryPackage +org.omg.DynamicAny.DynAnyPackage +org.omg.IOP +org.omg.IOP.CodecFactoryPackage +org.omg.IOP.CodecPackage +org.omg.Messaging +org.omg.PortableInterceptor +org.omg.PortableInterceptor.ORBInitInfoPackage +org.omg.PortableServer +org.omg.PortableServer.CurrentPackage +org.omg.PortableServer.POAManagerPackage +org.omg.PortableServer.POAPackage +org.omg.PortableServer.ServantLocatorPackage +org.omg.PortableServer.portable +org.omg.SendingContext +org.omg.stub.java.rmi +org.w3c.dom +org.w3c.dom.bootstrap +org.w3c.dom.events +org.w3c.dom.ls +org.w3c.dom.views +org.xml.sax +org.xml.sax.ext +org.xml.sax.helpers diff --git a/dokka-subprojects/plugin-base/src/test/resources/locationProvider/multi-module-package-list b/dokka-subprojects/plugin-base/src/test/resources/locationProvider/multi-module-package-list new file mode 100644 index 00000000..03f33d9a --- /dev/null +++ b/dokka-subprojects/plugin-base/src/test/resources/locationProvider/multi-module-package-list @@ -0,0 +1,8 @@ +$dokka.format:html-v1 +$dokka.linkExtension:html +$dokka.location:/NoPackageClass///PointingToDeclaration/moduleB/[root]/-no-package-class/index.html +module:moduleA +foo +bar +module:moduleB +baz diff --git a/dokka-subprojects/plugin-base/src/test/resources/locationProvider/old-package-list b/dokka-subprojects/plugin-base/src/test/resources/locationProvider/old-package-list new file mode 100644 index 00000000..d05b4535 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/test/resources/locationProvider/old-package-list @@ -0,0 +1,9 @@ +$dokka.format:kotlin-website-html +$dokka.linkExtension:html +$dokka.location:kotlin.text.StringBuilderkotlin.relocated.text/-string-builder/index.html +$dokka.location:kotlin$minus(java.math.BigDecimal, java.math.BigDecimal)kotlin/java.math.-big-decimal/minus.html +$dokka.location:kotlin.Int$MAX_VALUE()kotlin/-int/max-value.html +kotlin +kotlin.text +kotlin.reflect + diff --git a/dokka-subprojects/plugin-base/src/test/resources/locationProvider/stdlib-package-list b/dokka-subprojects/plugin-base/src/test/resources/locationProvider/stdlib-package-list new file mode 100644 index 00000000..298321aa --- /dev/null +++ b/dokka-subprojects/plugin-base/src/test/resources/locationProvider/stdlib-package-list @@ -0,0 +1,67 @@ +$dokka.format:html-v1 +$dokka.linkExtension:html +$dokka.location://arrayWithFun/#kotlin.Int#kotlin.Function1[kotlin.Int,TypeParam(bounds=[kotlin.Any?])]/PointingToDeclaration/kotlin-stdlib/[JS root]/array-with-fun.html +$dokka.location://booleanArray/#kotlin.Int#kotlin.Any/PointingToDeclaration/kotlin-stdlib/[JS root]/boolean-array.html +$dokka.location://booleanArrayWithFun/#kotlin.Int#kotlin.Function1[kotlin.Int,kotlin.Boolean]/PointingToDeclaration/kotlin-stdlib/[JS root]/boolean-array-with-fun.html +$dokka.location://charArray/#kotlin.Int#kotlin.Any/PointingToDeclaration/kotlin-stdlib/[JS root]/char-array.html +$dokka.location://charArrayWithFun/#kotlin.Int#kotlin.Function1[kotlin.Int,kotlin.Char]/PointingToDeclaration/kotlin-stdlib/[JS root]/char-array-with-fun.html +$dokka.location://fillArrayFun/#kotlin.Array[TypeParam(bounds=[kotlin.Any?])]#kotlin.Function1[kotlin.Int,TypeParam(bounds=[kotlin.Any?])]/PointingToDeclaration/kotlin-stdlib/[JS root]/fill-array-fun.html +$dokka.location://longArray/#kotlin.Int#kotlin.Any/PointingToDeclaration/kotlin-stdlib/[JS root]/long-array.html +$dokka.location://longArrayWithFun/#kotlin.Int#kotlin.Function1[kotlin.Int,kotlin.Long]/PointingToDeclaration/kotlin-stdlib/[JS root]/long-array-with-fun.html +$dokka.location://newArray/#kotlin.Int#TypeParam(bounds=[kotlin.Any?])/PointingToDeclaration/kotlin-stdlib/[JS root]/new-array.html +$dokka.location://untypedCharArrayWithFun/#kotlin.Int#kotlin.Function1[kotlin.Int,kotlin.Char]/PointingToDeclaration/kotlin-stdlib/[JS root]/untyped-char-array-with-fun.html +kotlin +kotlin.annotation +kotlin.browser +kotlin.collections +kotlin.comparisons +kotlin.concurrent +kotlin.contracts +kotlin.coroutines +kotlin.coroutines.cancellation +kotlin.coroutines.intrinsics +kotlin.dom +kotlin.experimental +kotlin.io +kotlin.js +kotlin.jvm +kotlin.math +kotlin.native +kotlin.native.concurrent +kotlin.native.ref +kotlin.properties +kotlin.random +kotlin.ranges +kotlin.reflect +kotlin.reflect.full +kotlin.reflect.jvm +kotlin.sequences +kotlin.streams +kotlin.system +kotlin.text +kotlin.time +kotlinx.browser +kotlinx.cinterop +kotlinx.cinterop.internal +kotlinx.dom +kotlinx.wasm.jsinterop +org.khronos.webgl +org.w3c.css.masking +org.w3c.dom +org.w3c.dom.clipboard +org.w3c.dom.css +org.w3c.dom.encryptedmedia +org.w3c.dom.events +org.w3c.dom.mediacapture +org.w3c.dom.mediasource +org.w3c.dom.parsing +org.w3c.dom.pointerevents +org.w3c.dom.svg +org.w3c.dom.url +org.w3c.fetch +org.w3c.files +org.w3c.notifications +org.w3c.performance +org.w3c.workers +org.w3c.xhr + diff --git a/dokka-subprojects/plugin-base/src/test/resources/multiplatform/basicMultiplatformTest/commonMain/kotlin/Clock.kt b/dokka-subprojects/plugin-base/src/test/resources/multiplatform/basicMultiplatformTest/commonMain/kotlin/Clock.kt new file mode 100644 index 00000000..5459b2d7 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/test/resources/multiplatform/basicMultiplatformTest/commonMain/kotlin/Clock.kt @@ -0,0 +1,19 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package example + +/** + * Documentation for expected class Clock + * in common module + */ +expect open class Clock() { + fun getTime(): String + /** + * Time in minis + */ + fun getTimesInMillis(): String + fun getYear(): String +} + diff --git a/dokka-subprojects/plugin-base/src/test/resources/multiplatform/basicMultiplatformTest/commonMain/kotlin/House.kt b/dokka-subprojects/plugin-base/src/test/resources/multiplatform/basicMultiplatformTest/commonMain/kotlin/House.kt new file mode 100644 index 00000000..e79e2904 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/test/resources/multiplatform/basicMultiplatformTest/commonMain/kotlin/House.kt @@ -0,0 +1,28 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package example + +class House(val street: String, val number: Int) { + + /** + * The owner of the house + */ + var owner: String = "" + + /** + * The owner of the house + */ + val differentOwner: String = "" + + fun addFloor() {} + + class Basement { + val pickles : List<Any> = mutableListOf() + } + + companion object { + val DEFAULT = House("",0) + } +} diff --git a/dokka-subprojects/plugin-base/src/test/resources/multiplatform/basicMultiplatformTest/jsMain/kotlin/Clock.kt b/dokka-subprojects/plugin-base/src/test/resources/multiplatform/basicMultiplatformTest/jsMain/kotlin/Clock.kt new file mode 100644 index 00000000..aad5787d --- /dev/null +++ b/dokka-subprojects/plugin-base/src/test/resources/multiplatform/basicMultiplatformTest/jsMain/kotlin/Clock.kt @@ -0,0 +1,32 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package example + +import greeteer.Greeter +import kotlin.js.Date + +/** + * Documentation for actual class Clock in JS + */ +actual open class Clock { + actual fun getTime() = Date.now().toString() + fun onlyJsFunction(): Int = 42 + + /** + * JS implementation of getTimeInMillis + */ + actual fun getTimesInMillis(): String = Date.now().toString() + + /** + * JS custom kdoc + */ + actual fun getYear(): String { + TODO("not implemented") //To change body of created functions use File | Settings | File Templates. + } +} + +fun main() { + Greeter().greet().also { println(it) } +} diff --git a/dokka-subprojects/plugin-base/src/test/resources/multiplatform/basicMultiplatformTest/jvmAndJsSecondCommonMain/kotlin/Greeter.kt b/dokka-subprojects/plugin-base/src/test/resources/multiplatform/basicMultiplatformTest/jvmAndJsSecondCommonMain/kotlin/Greeter.kt new file mode 100644 index 00000000..e9e15d0b --- /dev/null +++ b/dokka-subprojects/plugin-base/src/test/resources/multiplatform/basicMultiplatformTest/jvmAndJsSecondCommonMain/kotlin/Greeter.kt @@ -0,0 +1,14 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package greeteer + +import example.Clock + +class Greeter { + /** + * Some docs for the [greet] function + */ + fun greet() = Clock().let{ "Hello there! THe time is ${it.getTime()}" } +} diff --git a/dokka-subprojects/plugin-base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/Clock.kt b/dokka-subprojects/plugin-base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/Clock.kt new file mode 100644 index 00000000..f38ff749 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/Clock.kt @@ -0,0 +1,43 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package example + +import greeteer.Greeter + +/** + * Documentation for actual class Clock in JVM + */ +actual open class Clock { + actual fun getTime(): String = System.currentTimeMillis().toString() + + /** + * Time in minis + */ + actual fun getTimesInMillis(): String = System.currentTimeMillis().toString() + + /** + * Documentation for onlyJVMFunction on... + * wait for it... + * ...JVM! + */ + fun onlyJVMFunction(): Double = 2.5 + + open fun getDayOfTheWeek(): String { + TODO("not implemented") + } + + /** + * JVM custom kdoc + */ + actual fun getYear(): String { + TODO("not implemented") + } +} + +fun clockList() = listOf(Clock()) + +fun main() { + Greeter().greet().also { println(it) } +} diff --git a/dokka-subprojects/plugin-base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/ClockDays.kt b/dokka-subprojects/plugin-base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/ClockDays.kt new file mode 100644 index 00000000..e96acf1c --- /dev/null +++ b/dokka-subprojects/plugin-base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/ClockDays.kt @@ -0,0 +1,19 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package example + +/** + * frgergergrthe + * */ +enum class ClockDays { + /** + * dfsdfsdfds + * */ + FIRST, + SECOND, // test2 + THIRD, // test3 + FOURTH, // test4 + FIFTH // test5 +} diff --git a/dokka-subprojects/plugin-base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/HtmlTest.kt b/dokka-subprojects/plugin-base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/HtmlTest.kt new file mode 100644 index 00000000..2fa3622b --- /dev/null +++ b/dokka-subprojects/plugin-base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/HtmlTest.kt @@ -0,0 +1,24 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package example + +/** + * <!-- this shouldn't be visible --> + */ +class HtmlTest { + /** + * This is an example <!-- not visible --> of html + */ + fun test(){ + + } + + /** + * This is an <b> documentation </b> + */ + fun testP(){ + + } +} diff --git a/dokka-subprojects/plugin-base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/ParticularClock.kt b/dokka-subprojects/plugin-base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/ParticularClock.kt new file mode 100644 index 00000000..3b7a403d --- /dev/null +++ b/dokka-subprojects/plugin-base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/ParticularClock.kt @@ -0,0 +1,36 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package example + +import greeteer.Greeter + +class ParticularClock(private val clockDay: ClockDays) : Clock() { + + /** + * Rings bell [times] + */ + fun ringBell(times: Int) {} + + /** + * Uses provider [greeter] + */ + fun useGreeter(greeter: Greeter) { + + } + + /** + * Day of the week + */ + override fun getDayOfTheWeek() = clockDay.name +} + +/** + * A sample extension function + * When $a \ne 0$, there are two solutions to \(ax^2 + bx + c = 0\) and they are $$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$ + * @usesMathJax + */ +fun Clock.extensionFun() { + +} |