aboutsummaryrefslogtreecommitdiff
path: root/plugins/javadoc8/testdata/javadoc
diff options
context:
space:
mode:
authorKamil Doległo <kamilok1965@interia.pl>2019-09-11 15:34:55 +0200
committerKamil Doległo <kamilok1965@interia.pl>2019-10-10 12:21:16 +0200
commitf4920fc9d067e59a5d843a185e07c5d321c91c6d (patch)
tree9e55f99f5f612cd3e716f07b08aa309206096743 /plugins/javadoc8/testdata/javadoc
parentb536699655e40c62cd603e1f98869786566604bd (diff)
downloaddokka-f4920fc9d067e59a5d843a185e07c5d321c91c6d.tar.gz
dokka-f4920fc9d067e59a5d843a185e07c5d321c91c6d.tar.bz2
dokka-f4920fc9d067e59a5d843a185e07c5d321c91c6d.zip
Extract testApi from core
Diffstat (limited to 'plugins/javadoc8/testdata/javadoc')
-rw-r--r--plugins/javadoc8/testdata/javadoc/argumentReference.kt4
-rw-r--r--plugins/javadoc8/testdata/javadoc/blankLineInsideCodeBlock.kt12
-rw-r--r--plugins/javadoc8/testdata/javadoc/bytearr.kt7
-rw-r--r--plugins/javadoc8/testdata/javadoc/companionMethodReference.kt13
-rw-r--r--plugins/javadoc8/testdata/javadoc/constructorParameters.kt14
-rw-r--r--plugins/javadoc8/testdata/javadoc/defaultNoArgConstructor.kt12
-rw-r--r--plugins/javadoc8/testdata/javadoc/deprecated.java28
-rw-r--r--plugins/javadoc8/testdata/javadoc/exception.kt5
-rw-r--r--plugins/javadoc8/testdata/javadoc/functionParameters.java17
-rw-r--r--plugins/javadoc8/testdata/javadoc/internal.kt8
-rw-r--r--plugins/javadoc8/testdata/javadoc/jvmname.kt6
-rw-r--r--plugins/javadoc8/testdata/javadoc/kdocKeywordsOnMethod.kt12
-rw-r--r--plugins/javadoc8/testdata/javadoc/noArgConstructor.kt12
-rw-r--r--plugins/javadoc8/testdata/javadoc/obj.kt7
-rw-r--r--plugins/javadoc8/testdata/javadoc/paramlink.kt10
-rw-r--r--plugins/javadoc8/testdata/javadoc/stringarr.kt8
-rw-r--r--plugins/javadoc8/testdata/javadoc/suppress.kt37
-rw-r--r--plugins/javadoc8/testdata/javadoc/typealiases.kt11
-rw-r--r--plugins/javadoc8/testdata/javadoc/types.kt4
-rw-r--r--plugins/javadoc8/testdata/javadoc/vararg.kt3
-rw-r--r--plugins/javadoc8/testdata/javadoc/visibilityModifiers.kt15
21 files changed, 245 insertions, 0 deletions
diff --git a/plugins/javadoc8/testdata/javadoc/argumentReference.kt b/plugins/javadoc8/testdata/javadoc/argumentReference.kt
new file mode 100644
index 00000000..ac3104e9
--- /dev/null
+++ b/plugins/javadoc8/testdata/javadoc/argumentReference.kt
@@ -0,0 +1,4 @@
+/**
+ * [error]
+ */
+fun argNamedError(error: String) {} \ No newline at end of file
diff --git a/plugins/javadoc8/testdata/javadoc/blankLineInsideCodeBlock.kt b/plugins/javadoc8/testdata/javadoc/blankLineInsideCodeBlock.kt
new file mode 100644
index 00000000..9430f4d5
--- /dev/null
+++ b/plugins/javadoc8/testdata/javadoc/blankLineInsideCodeBlock.kt
@@ -0,0 +1,12 @@
+/**
+ * ```
+ * This is a test
+ * of Dokka's code blocks.
+ * Here is a blank line.
+ *
+ * The previous line was blank.
+ * ```
+ */
+fun u() {
+
+} \ No newline at end of file
diff --git a/plugins/javadoc8/testdata/javadoc/bytearr.kt b/plugins/javadoc8/testdata/javadoc/bytearr.kt
new file mode 100644
index 00000000..84be1a70
--- /dev/null
+++ b/plugins/javadoc8/testdata/javadoc/bytearr.kt
@@ -0,0 +1,7 @@
+package foo
+
+class ByteArray {
+ fun foo(): IntArray {
+ return intArrayOf()
+ }
+} \ No newline at end of file
diff --git a/plugins/javadoc8/testdata/javadoc/companionMethodReference.kt b/plugins/javadoc8/testdata/javadoc/companionMethodReference.kt
new file mode 100644
index 00000000..499e4492
--- /dev/null
+++ b/plugins/javadoc8/testdata/javadoc/companionMethodReference.kt
@@ -0,0 +1,13 @@
+package foo
+
+
+/**
+ * Linking to [test]
+ */
+class TestClass {
+
+ companion object {
+
+ @JvmStatic fun test(arg: String) {}
+ }
+} \ No newline at end of file
diff --git a/plugins/javadoc8/testdata/javadoc/constructorParameters.kt b/plugins/javadoc8/testdata/javadoc/constructorParameters.kt
new file mode 100644
index 00000000..c29ae912
--- /dev/null
+++ b/plugins/javadoc8/testdata/javadoc/constructorParameters.kt
@@ -0,0 +1,14 @@
+package bar
+
+/**
+ * Just a fruit
+ *
+ * @param weight in grams
+ * @param ranking quality from 0 to 10, where 10 is best
+ * @param color yellow is default
+ */
+class Banana (
+ private val weight: Double,
+ private val ranking: Int,
+ color: String = "yellow"
+) \ No newline at end of file
diff --git a/plugins/javadoc8/testdata/javadoc/defaultNoArgConstructor.kt b/plugins/javadoc8/testdata/javadoc/defaultNoArgConstructor.kt
new file mode 100644
index 00000000..3a6d04a5
--- /dev/null
+++ b/plugins/javadoc8/testdata/javadoc/defaultNoArgConstructor.kt
@@ -0,0 +1,12 @@
+package foo
+
+/**
+ * Description
+ *
+ * @constructor print peach
+ */
+class Peach {
+ init {
+ println("peach")
+ }
+} \ No newline at end of file
diff --git a/plugins/javadoc8/testdata/javadoc/deprecated.java b/plugins/javadoc8/testdata/javadoc/deprecated.java
new file mode 100644
index 00000000..5a6cdd77
--- /dev/null
+++ b/plugins/javadoc8/testdata/javadoc/deprecated.java
@@ -0,0 +1,28 @@
+package bar;
+
+/**
+ * Just a fruit
+ */
+public class Banana {
+ private Double weight;
+
+ /**
+ * Returns weight
+ *
+ * @return weight
+ * @deprecated
+ */
+ public Double getWeight() {
+ return weight;
+ }
+
+ /**
+ * Sets weight
+ *
+ * @param weight in grams
+ * @deprecated with message
+ */
+ public void setWeight(Double weight) {
+ this.weight = weight;
+ }
+} \ No newline at end of file
diff --git a/plugins/javadoc8/testdata/javadoc/exception.kt b/plugins/javadoc8/testdata/javadoc/exception.kt
new file mode 100644
index 00000000..ec0a5bbb
--- /dev/null
+++ b/plugins/javadoc8/testdata/javadoc/exception.kt
@@ -0,0 +1,5 @@
+package foo
+
+class MyException : Exception {
+ fun foo() = ""
+}
diff --git a/plugins/javadoc8/testdata/javadoc/functionParameters.java b/plugins/javadoc8/testdata/javadoc/functionParameters.java
new file mode 100644
index 00000000..8d5f5143
--- /dev/null
+++ b/plugins/javadoc8/testdata/javadoc/functionParameters.java
@@ -0,0 +1,17 @@
+package bar;
+
+/**
+ * Foo
+ */
+
+public class Foo {
+
+ /** perfom request
+ *
+ * @param name user name
+ * @param password user password
+ */
+ public void request(String name, String password) {
+
+ }
+} \ No newline at end of file
diff --git a/plugins/javadoc8/testdata/javadoc/internal.kt b/plugins/javadoc8/testdata/javadoc/internal.kt
new file mode 100644
index 00000000..a57ea3b4
--- /dev/null
+++ b/plugins/javadoc8/testdata/javadoc/internal.kt
@@ -0,0 +1,8 @@
+package foo
+
+data class Person internal constructor(
+ val name: String = "",
+ val age: Int = 0
+) {
+ constructor(age: Int): this("", age)
+}
diff --git a/plugins/javadoc8/testdata/javadoc/jvmname.kt b/plugins/javadoc8/testdata/javadoc/jvmname.kt
new file mode 100644
index 00000000..e4774cd6
--- /dev/null
+++ b/plugins/javadoc8/testdata/javadoc/jvmname.kt
@@ -0,0 +1,6 @@
+package foo
+
+class Apple {
+ @get:JvmName("_tree")
+ internal val source: Tree
+}
diff --git a/plugins/javadoc8/testdata/javadoc/kdocKeywordsOnMethod.kt b/plugins/javadoc8/testdata/javadoc/kdocKeywordsOnMethod.kt
new file mode 100644
index 00000000..df5bbbe0
--- /dev/null
+++ b/plugins/javadoc8/testdata/javadoc/kdocKeywordsOnMethod.kt
@@ -0,0 +1,12 @@
+class FireException : Exception
+
+
+/**
+ * COMM
+ * @param a Some string
+ * @return value of a
+ * @throws FireException in case of fire
+ */
+@Throws(FireException::class)
+fun my(a: String): String = a
+
diff --git a/plugins/javadoc8/testdata/javadoc/noArgConstructor.kt b/plugins/javadoc8/testdata/javadoc/noArgConstructor.kt
new file mode 100644
index 00000000..25e5548c
--- /dev/null
+++ b/plugins/javadoc8/testdata/javadoc/noArgConstructor.kt
@@ -0,0 +1,12 @@
+package foo
+
+/**
+ * Description
+ *
+ * @constructor print plum
+ */
+class Plum() {
+ init {
+ println("plum")
+ }
+} \ No newline at end of file
diff --git a/plugins/javadoc8/testdata/javadoc/obj.kt b/plugins/javadoc8/testdata/javadoc/obj.kt
new file mode 100644
index 00000000..1d10a422
--- /dev/null
+++ b/plugins/javadoc8/testdata/javadoc/obj.kt
@@ -0,0 +1,7 @@
+package foo
+
+class O {
+ companion object {
+
+ }
+}
diff --git a/plugins/javadoc8/testdata/javadoc/paramlink.kt b/plugins/javadoc8/testdata/javadoc/paramlink.kt
new file mode 100644
index 00000000..48972a22
--- /dev/null
+++ b/plugins/javadoc8/testdata/javadoc/paramlink.kt
@@ -0,0 +1,10 @@
+package demo
+
+/**
+ * You can [eat] it or cut it into slices using [cutIntoPieces]
+ */
+interface Apple {
+ fun eat()
+
+ fun cutIntoPieces(pieces: Int)
+}
diff --git a/plugins/javadoc8/testdata/javadoc/stringarr.kt b/plugins/javadoc8/testdata/javadoc/stringarr.kt
new file mode 100644
index 00000000..d6cd9dea
--- /dev/null
+++ b/plugins/javadoc8/testdata/javadoc/stringarr.kt
@@ -0,0 +1,8 @@
+package foo
+
+class Foo {
+ companion object {
+ @JvmStatic fun main(args: Array<String>) {
+ }
+ }
+} \ No newline at end of file
diff --git a/plugins/javadoc8/testdata/javadoc/suppress.kt b/plugins/javadoc8/testdata/javadoc/suppress.kt
new file mode 100644
index 00000000..90f6c131
--- /dev/null
+++ b/plugins/javadoc8/testdata/javadoc/suppress.kt
@@ -0,0 +1,37 @@
+/**
+ * @suppress
+ */
+class Some {
+
+}
+
+
+/**
+ * @suppress
+ * @author me
+ * @see other
+ */
+class SomeAgain {
+
+}
+
+class Same {
+ /**
+ * @suppress
+ */
+ fun privateApi() {
+
+ }
+
+ /**
+ * @suppress
+ */
+ val privateForSomeReason = ""
+}
+
+/**
+ * @suppress
+ */
+interface Interface {
+
+} \ No newline at end of file
diff --git a/plugins/javadoc8/testdata/javadoc/typealiases.kt b/plugins/javadoc8/testdata/javadoc/typealiases.kt
new file mode 100644
index 00000000..bb09bfad
--- /dev/null
+++ b/plugins/javadoc8/testdata/javadoc/typealiases.kt
@@ -0,0 +1,11 @@
+class A
+
+typealias B = A
+
+class C : B
+
+typealias D = (A) -> C
+
+fun some(d: D) {
+
+} \ No newline at end of file
diff --git a/plugins/javadoc8/testdata/javadoc/types.kt b/plugins/javadoc8/testdata/javadoc/types.kt
new file mode 100644
index 00000000..55be6058
--- /dev/null
+++ b/plugins/javadoc8/testdata/javadoc/types.kt
@@ -0,0 +1,4 @@
+package foo
+
+fun foo(x: Int, o: Any): String {
+}
diff --git a/plugins/javadoc8/testdata/javadoc/vararg.kt b/plugins/javadoc8/testdata/javadoc/vararg.kt
new file mode 100644
index 00000000..aa6c26d7
--- /dev/null
+++ b/plugins/javadoc8/testdata/javadoc/vararg.kt
@@ -0,0 +1,3 @@
+fun vararg(a: String, vararg b: Int) {}
+
+fun varargInMiddle(a: String, vararg b: Int, c: Short) {} \ No newline at end of file
diff --git a/plugins/javadoc8/testdata/javadoc/visibilityModifiers.kt b/plugins/javadoc8/testdata/javadoc/visibilityModifiers.kt
new file mode 100644
index 00000000..e48e7f62
--- /dev/null
+++ b/plugins/javadoc8/testdata/javadoc/visibilityModifiers.kt
@@ -0,0 +1,15 @@
+package foo
+
+abstract class Apple {
+ protected var name: String = "foo"
+ internal var weight: Int = 180
+ var rating: Int = 10
+ private var color: String = "red"
+
+ companion object {
+ @JvmStatic
+ val code : Int = 123456
+ }
+
+
+} \ No newline at end of file