aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/test/resources
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/base/src/test/resources')
-rw-r--r--plugins/base/src/test/resources/linkable/includes/include1.md7
-rw-r--r--plugins/base/src/test/resources/linkable/includes/include2.md7
-rw-r--r--plugins/base/src/test/resources/linkable/samples/jsMain/kotlin/JsClass.kt9
-rw-r--r--plugins/base/src/test/resources/linkable/samples/jsMain/resources/Samples.kt10
-rw-r--r--plugins/base/src/test/resources/linkable/samples/jvmMain/kotlin/JvmClass.kt9
-rw-r--r--plugins/base/src/test/resources/linkable/samples/jvmMain/resources/Samples.kt10
-rw-r--r--plugins/base/src/test/resources/linkable/sources/jsMain/kotlin/JsClass.kt3
-rw-r--r--plugins/base/src/test/resources/linkable/sources/jvmMain/kotlin/JvmClass.kt3
-rw-r--r--plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/commonMain/kotlin/Clock.kt15
-rw-r--r--plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/commonMain/kotlin/House.kt24
-rw-r--r--plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jsMain/kotlin/Clock.kt28
-rw-r--r--plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmAndJsSecondCommonMain/kotlin/Greeter.kt10
-rw-r--r--plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/Clock.kt41
-rw-r--r--plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/ClockDays.kt15
-rw-r--r--plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/ParticularClock.kt32
15 files changed, 223 insertions, 0 deletions
diff --git a/plugins/base/src/test/resources/linkable/includes/include1.md b/plugins/base/src/test/resources/linkable/includes/include1.md
new file mode 100644
index 00000000..03d9037d
--- /dev/null
+++ b/plugins/base/src/test/resources/linkable/includes/include1.md
@@ -0,0 +1,7 @@
+# Module example
+
+This is JVM documentation for module example
+
+# Package example
+
+This is JVM documentation for package example \ No newline at end of file
diff --git a/plugins/base/src/test/resources/linkable/includes/include2.md b/plugins/base/src/test/resources/linkable/includes/include2.md
new file mode 100644
index 00000000..1574003d
--- /dev/null
+++ b/plugins/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/plugins/base/src/test/resources/linkable/samples/jsMain/kotlin/JsClass.kt b/plugins/base/src/test/resources/linkable/samples/jsMain/kotlin/JsClass.kt
new file mode 100644
index 00000000..b61ce704
--- /dev/null
+++ b/plugins/base/src/test/resources/linkable/samples/jsMain/kotlin/JsClass.kt
@@ -0,0 +1,9 @@
+package p2
+
+class JsClass {
+
+ /**
+ * @sample samples.SamplesJs.exampleUsage
+ */
+ fun printWithExclamation(msg: String) = println(msg + "!")
+} \ No newline at end of file
diff --git a/plugins/base/src/test/resources/linkable/samples/jsMain/resources/Samples.kt b/plugins/base/src/test/resources/linkable/samples/jsMain/resources/Samples.kt
new file mode 100644
index 00000000..55be0ad8
--- /dev/null
+++ b/plugins/base/src/test/resources/linkable/samples/jsMain/resources/Samples.kt
@@ -0,0 +1,10 @@
+package samples
+
+import p2.JsClass
+
+class SamplesJs {
+
+ fun exampleUsage() {
+ JsClass().printWithExclamation("Hi, Js")
+ }
+} \ No newline at end of file
diff --git a/plugins/base/src/test/resources/linkable/samples/jvmMain/kotlin/JvmClass.kt b/plugins/base/src/test/resources/linkable/samples/jvmMain/kotlin/JvmClass.kt
new file mode 100644
index 00000000..960184e6
--- /dev/null
+++ b/plugins/base/src/test/resources/linkable/samples/jvmMain/kotlin/JvmClass.kt
@@ -0,0 +1,9 @@
+package p2
+
+class JvmClass {
+
+ /**
+ * @sample samples.SamplesJvm.exampleUsage
+ */
+ fun printWithExclamation(msg: String) = println(msg + "!")
+} \ No newline at end of file
diff --git a/plugins/base/src/test/resources/linkable/samples/jvmMain/resources/Samples.kt b/plugins/base/src/test/resources/linkable/samples/jvmMain/resources/Samples.kt
new file mode 100644
index 00000000..69418fa9
--- /dev/null
+++ b/plugins/base/src/test/resources/linkable/samples/jvmMain/resources/Samples.kt
@@ -0,0 +1,10 @@
+package samples
+
+import p2.JvmClass
+
+class SamplesJvm {
+
+ fun exampleUsage() {
+ JvmClass().printWithExclamation("Hi, Jvm")
+ }
+} \ No newline at end of file
diff --git a/plugins/base/src/test/resources/linkable/sources/jsMain/kotlin/JsClass.kt b/plugins/base/src/test/resources/linkable/sources/jsMain/kotlin/JsClass.kt
new file mode 100644
index 00000000..00dd009b
--- /dev/null
+++ b/plugins/base/src/test/resources/linkable/sources/jsMain/kotlin/JsClass.kt
@@ -0,0 +1,3 @@
+package p1
+
+class JsClass \ No newline at end of file
diff --git a/plugins/base/src/test/resources/linkable/sources/jvmMain/kotlin/JvmClass.kt b/plugins/base/src/test/resources/linkable/sources/jvmMain/kotlin/JvmClass.kt
new file mode 100644
index 00000000..2113c589
--- /dev/null
+++ b/plugins/base/src/test/resources/linkable/sources/jvmMain/kotlin/JvmClass.kt
@@ -0,0 +1,3 @@
+package p1
+
+class JvmClass \ No newline at end of file
diff --git a/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/commonMain/kotlin/Clock.kt b/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/commonMain/kotlin/Clock.kt
new file mode 100644
index 00000000..4753cb32
--- /dev/null
+++ b/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/commonMain/kotlin/Clock.kt
@@ -0,0 +1,15 @@
+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/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/commonMain/kotlin/House.kt b/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/commonMain/kotlin/House.kt
new file mode 100644
index 00000000..c879dee7
--- /dev/null
+++ b/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/commonMain/kotlin/House.kt
@@ -0,0 +1,24 @@
+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)
+ }
+} \ No newline at end of file
diff --git a/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jsMain/kotlin/Clock.kt b/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jsMain/kotlin/Clock.kt
new file mode 100644
index 00000000..51b8fdc6
--- /dev/null
+++ b/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jsMain/kotlin/Clock.kt
@@ -0,0 +1,28 @@
+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) }
+} \ No newline at end of file
diff --git a/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmAndJsSecondCommonMain/kotlin/Greeter.kt b/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmAndJsSecondCommonMain/kotlin/Greeter.kt
new file mode 100644
index 00000000..8a52e2f3
--- /dev/null
+++ b/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmAndJsSecondCommonMain/kotlin/Greeter.kt
@@ -0,0 +1,10 @@
+package greeteer
+
+import example.Clock
+
+class Greeter {
+ /**
+ * Some docs for the [greet] function
+ */
+ fun greet() = Clock().let{ "Hello there! THe time is ${it.getTime()}" }
+} \ No newline at end of file
diff --git a/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/Clock.kt b/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/Clock.kt
new file mode 100644
index 00000000..fec06207
--- /dev/null
+++ b/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/Clock.kt
@@ -0,0 +1,41 @@
+package example
+
+import greeteer.Greeter
+
+/**
+ * Documentation for actual class Clock in JVM
+ */
+actual open class Clock {
+ actual fun getTime(): String = System.currentTimeMillis().toString()
+ actual fun getTimesInMillis(): String = System.currentTimeMillis().toString()
+
+ /**
+ * Documentation for onlyJVMFunction on...
+ * wait for it...
+ * ...JVM!
+ */
+ fun onlyJVMFunction(): Double = 2.5
+ /**
+ * Custom equals function
+ */
+ override fun equals(other: Any?): Boolean {
+ return super.equals(other)
+ }
+
+ 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) }
+} \ No newline at end of file
diff --git a/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/ClockDays.kt b/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/ClockDays.kt
new file mode 100644
index 00000000..136ae5c8
--- /dev/null
+++ b/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/ClockDays.kt
@@ -0,0 +1,15 @@
+package example
+
+/**
+ * frgergergrthe
+ * */
+enum class ClockDays {
+ /**
+ * dfsdfsdfds
+ * */
+ FIRST,
+ SECOND, // test2
+ THIRD, // test3
+ FOURTH, // test4
+ FIFTH // test5
+} \ No newline at end of file
diff --git a/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/ParticularClock.kt b/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/ParticularClock.kt
new file mode 100644
index 00000000..40813b50
--- /dev/null
+++ b/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/ParticularClock.kt
@@ -0,0 +1,32 @@
+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() {
+
+} \ No newline at end of file