aboutsummaryrefslogtreecommitdiff
path: root/core/testdata/javadoc
diff options
context:
space:
mode:
Diffstat (limited to 'core/testdata/javadoc')
-rw-r--r--core/testdata/javadoc/blankLineInsideCodeBlock.kt12
-rw-r--r--core/testdata/javadoc/bytearr.kt7
-rw-r--r--core/testdata/javadoc/companionMethodReference.kt13
-rw-r--r--core/testdata/javadoc/deprecated.java28
-rw-r--r--core/testdata/javadoc/exception.kt5
-rw-r--r--core/testdata/javadoc/internal.kt8
-rw-r--r--core/testdata/javadoc/jvmname.kt6
-rw-r--r--core/testdata/javadoc/kdocKeywordsOnMethod.kt12
-rw-r--r--core/testdata/javadoc/obj.kt7
-rw-r--r--core/testdata/javadoc/paramlink.kt10
-rw-r--r--core/testdata/javadoc/stringarr.kt8
-rw-r--r--core/testdata/javadoc/suppress.kt37
-rw-r--r--core/testdata/javadoc/typealiases.kt11
-rw-r--r--core/testdata/javadoc/types.kt4
14 files changed, 168 insertions, 0 deletions
diff --git a/core/testdata/javadoc/blankLineInsideCodeBlock.kt b/core/testdata/javadoc/blankLineInsideCodeBlock.kt
new file mode 100644
index 000000000..9430f4d58
--- /dev/null
+++ b/core/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/core/testdata/javadoc/bytearr.kt b/core/testdata/javadoc/bytearr.kt
new file mode 100644
index 000000000..84be1a706
--- /dev/null
+++ b/core/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/core/testdata/javadoc/companionMethodReference.kt b/core/testdata/javadoc/companionMethodReference.kt
new file mode 100644
index 000000000..499e4492f
--- /dev/null
+++ b/core/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/core/testdata/javadoc/deprecated.java b/core/testdata/javadoc/deprecated.java
new file mode 100644
index 000000000..5a6cdd77c
--- /dev/null
+++ b/core/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/core/testdata/javadoc/exception.kt b/core/testdata/javadoc/exception.kt
new file mode 100644
index 000000000..ec0a5bbb6
--- /dev/null
+++ b/core/testdata/javadoc/exception.kt
@@ -0,0 +1,5 @@
+package foo
+
+class MyException : Exception {
+ fun foo() = ""
+}
diff --git a/core/testdata/javadoc/internal.kt b/core/testdata/javadoc/internal.kt
new file mode 100644
index 000000000..a57ea3b41
--- /dev/null
+++ b/core/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/core/testdata/javadoc/jvmname.kt b/core/testdata/javadoc/jvmname.kt
new file mode 100644
index 000000000..e4774cd67
--- /dev/null
+++ b/core/testdata/javadoc/jvmname.kt
@@ -0,0 +1,6 @@
+package foo
+
+class Apple {
+ @get:JvmName("_tree")
+ internal val source: Tree
+}
diff --git a/core/testdata/javadoc/kdocKeywordsOnMethod.kt b/core/testdata/javadoc/kdocKeywordsOnMethod.kt
new file mode 100644
index 000000000..df5bbbe0f
--- /dev/null
+++ b/core/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/core/testdata/javadoc/obj.kt b/core/testdata/javadoc/obj.kt
new file mode 100644
index 000000000..1d10a4228
--- /dev/null
+++ b/core/testdata/javadoc/obj.kt
@@ -0,0 +1,7 @@
+package foo
+
+class O {
+ companion object {
+
+ }
+}
diff --git a/core/testdata/javadoc/paramlink.kt b/core/testdata/javadoc/paramlink.kt
new file mode 100644
index 000000000..48972a22d
--- /dev/null
+++ b/core/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/core/testdata/javadoc/stringarr.kt b/core/testdata/javadoc/stringarr.kt
new file mode 100644
index 000000000..d6cd9dea3
--- /dev/null
+++ b/core/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/core/testdata/javadoc/suppress.kt b/core/testdata/javadoc/suppress.kt
new file mode 100644
index 000000000..90f6c131d
--- /dev/null
+++ b/core/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/core/testdata/javadoc/typealiases.kt b/core/testdata/javadoc/typealiases.kt
new file mode 100644
index 000000000..bb09bfada
--- /dev/null
+++ b/core/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/core/testdata/javadoc/types.kt b/core/testdata/javadoc/types.kt
new file mode 100644
index 000000000..55be60587
--- /dev/null
+++ b/core/testdata/javadoc/types.kt
@@ -0,0 +1,4 @@
+package foo
+
+fun foo(x: Int, o: Any): String {
+}