aboutsummaryrefslogtreecommitdiff
path: root/test/data/format
diff options
context:
space:
mode:
authorDmitry Jemerov <intelliyole@gmail.com>2015-01-12 16:06:54 +0100
committerDmitry Jemerov <intelliyole@gmail.com>2015-01-12 16:06:54 +0100
commit49feb9021ca24150257caac4a62af5628f52b6b5 (patch)
treee5b53761a5338b9931bfe6969cbee988596ec28e /test/data/format
parent5f47bc17630ef1457b36054dc8b19011d9d14132 (diff)
parent23af5e2540aca25ab64deec1821a069f827d7c77 (diff)
downloaddokka-49feb9021ca24150257caac4a62af5628f52b6b5.tar.gz
dokka-49feb9021ca24150257caac4a62af5628f52b6b5.tar.bz2
dokka-49feb9021ca24150257caac4a62af5628f52b6b5.zip
Merge pull request #9 from orangy/annotations
Support annotation classes and annotations in model and rendered output
Diffstat (limited to 'test/data/format')
-rw-r--r--test/data/format/annotationClass.kt1
-rw-r--r--test/data/format/annotationClass.md18
-rw-r--r--test/data/format/annotationParams.kt1
-rw-r--r--test/data/format/annotationParams.md12
-rw-r--r--test/data/format/annotations.kt6
-rw-r--r--test/data/format/annotations.md30
-rw-r--r--test/data/format/classWithClassObject.md6
-rw-r--r--test/data/format/deprecated.class.html46
-rw-r--r--test/data/format/deprecated.kt5
-rw-r--r--test/data/format/deprecated.package.html44
-rw-r--r--test/data/format/extensions.class.md16
-rw-r--r--test/data/format/extensions.kt19
-rw-r--r--test/data/format/extensions.package.md18
13 files changed, 219 insertions, 3 deletions
diff --git a/test/data/format/annotationClass.kt b/test/data/format/annotationClass.kt
new file mode 100644
index 00000000..89d494fb
--- /dev/null
+++ b/test/data/format/annotationClass.kt
@@ -0,0 +1 @@
+annotation class fancy
diff --git a/test/data/format/annotationClass.md b/test/data/format/annotationClass.md
new file mode 100644
index 00000000..301eff08
--- /dev/null
+++ b/test/data/format/annotationClass.md
@@ -0,0 +1,18 @@
+[test](out.md) / [](out.md) / [fancy](out.md)
+
+
+# fancy
+
+
+```
+annotation class fancy
+```
+
+
+
+
+### Constructors
+
+
+| [&lt;init&gt;](out.md) | `public fancy()` |
+
diff --git a/test/data/format/annotationParams.kt b/test/data/format/annotationParams.kt
new file mode 100644
index 00000000..ee5b524a
--- /dev/null
+++ b/test/data/format/annotationParams.kt
@@ -0,0 +1 @@
+inlineOptions(InlineOption.LOCAL_CONTINUE_AND_BREAK) fun f() {}
diff --git a/test/data/format/annotationParams.md b/test/data/format/annotationParams.md
new file mode 100644
index 00000000..6bbdc0e5
--- /dev/null
+++ b/test/data/format/annotationParams.md
@@ -0,0 +1,12 @@
+[test](out.md) / [](out.md) / [f](out.md)
+
+
+# f
+
+
+```
+inlineOptions([InlineOption.LOCAL_CONTINUE_AND_BREAK]) fun f(): Unit
+```
+
+
+
diff --git a/test/data/format/annotations.kt b/test/data/format/annotations.kt
new file mode 100644
index 00000000..9356d4ca
--- /dev/null
+++ b/test/data/format/annotations.kt
@@ -0,0 +1,6 @@
+data class Foo {
+ inline fun bar([noinline] notInlined: () -> Unit) {
+ }
+
+ inline val x: Int
+}
diff --git a/test/data/format/annotations.md b/test/data/format/annotations.md
new file mode 100644
index 00000000..e745213e
--- /dev/null
+++ b/test/data/format/annotations.md
@@ -0,0 +1,30 @@
+[test](out.md) / [](out.md) / [Foo](out.md)
+
+
+# Foo
+
+
+```
+data class Foo
+```
+
+
+
+
+### Constructors
+
+
+| [&lt;init&gt;](out.md) | `public Foo()` |
+
+
+### Properties
+
+
+| [x](out.md) | `inline val x: Int` |
+
+
+### Functions
+
+
+| [bar](out.md) | `inline fun bar(noinline notInlined: () -&gt; Unit): Unit` |
+
diff --git a/test/data/format/classWithClassObject.md b/test/data/format/classWithClassObject.md
index f694a76f..796ecce2 100644
--- a/test/data/format/classWithClassObject.md
+++ b/test/data/format/classWithClassObject.md
@@ -14,17 +14,17 @@ class Klass
### Constructors
-| [&lt;init&gt;](out.md) | `public Klass()` |
+| [&lt;init&gt;](out.md) | `public Klass()` |
### Class Object Properties
-| [x](out.md) | `val x: Int` |
+| [x](out.md) | `val x: Int` |
### Class Object Functions
-| [foo](out.md) | `fun foo(): Unit` |
+| [foo](out.md) | `fun foo(): Unit` |
diff --git a/test/data/format/deprecated.class.html b/test/data/format/deprecated.class.html
new file mode 100644
index 00000000..87599082
--- /dev/null
+++ b/test/data/format/deprecated.class.html
@@ -0,0 +1,46 @@
+<HTML>
+<HEAD>
+</HEAD>
+<BODY>
+<a href="out.html">test</a>&nbsp;/&nbsp;<a href="out.html"></a>&nbsp;/&nbsp;<a href="out.html">C</a><br/>
+<br/>
+<h1>C</h1>
+<pre><code><span class="keyword">class </span><s><span class="identifier">C</span></s></code></pre><strong>Deprecated: </strong>This class sucks<br/>
+<br/>
+<br/>
+<a href="out.html">test</a>&nbsp;/&nbsp;<a href="out.html"></a>&nbsp;/&nbsp;<a href="out.html">f</a><br/>
+<br/>
+<h1>f</h1>
+<pre><code><span class="keyword">fun </span><s><span class="identifier">f</span></s><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Unit</span></code></pre><strong>Deprecated: </strong>This function sucks<br/>
+<br/>
+<br/>
+<a href="out.html">test</a>&nbsp;/&nbsp;<a href="out.html"></a>&nbsp;/&nbsp;<a href="out.html">p</a><br/>
+<br/>
+<h1>p</h1>
+<pre><code><span class="keyword">val </span><s><span class="identifier">p</span></s><span class="symbol">: </span><span class="identifier">Int</span></code></pre><strong>Deprecated: </strong>This property sucks<br/>
+<br/>
+<br/>
+<h3>Constructors</h3>
+<table>
+<tbody>
+<tr>
+<td>
+<a href="out.html">&lt;init&gt;</a></td>
+<td>
+<code><span class="keyword">public</span> <span class="identifier">C</span><span class="symbol">(</span><span class="symbol">)</span></code></td>
+</tr>
+</tbody>
+</table>
+<h3>Accessors</h3>
+<table>
+<tbody>
+<tr>
+<td>
+<a href="out.html">get</a></td>
+<td>
+<code></code></td>
+</tr>
+</tbody>
+</table>
+</BODY>
+</HTML>
diff --git a/test/data/format/deprecated.kt b/test/data/format/deprecated.kt
new file mode 100644
index 00000000..9ee2c1d6
--- /dev/null
+++ b/test/data/format/deprecated.kt
@@ -0,0 +1,5 @@
+deprecated("This class sucks") class C() { }
+
+deprecated("This function sucks") fun f() { }
+
+deprecated("This property sucks") val p: Int get() = 0
diff --git a/test/data/format/deprecated.package.html b/test/data/format/deprecated.package.html
new file mode 100644
index 00000000..cf563a8b
--- /dev/null
+++ b/test/data/format/deprecated.package.html
@@ -0,0 +1,44 @@
+<HTML>
+<HEAD>
+</HEAD>
+<BODY>
+<a href="out.html">test</a>&nbsp;/&nbsp;<a href="out.html"></a><br/>
+<br/>
+<h1></h1>
+<pre><code><span class="keyword">package</span> <span class="identifier"></span></code></pre><br/>
+<br/>
+<h3>Types</h3>
+<table>
+<tbody>
+<tr>
+<td>
+<a href="out.html">C</a></td>
+<td>
+<code><span class="keyword">class </span><s><span class="identifier">C</span></s></code></td>
+</tr>
+</tbody>
+</table>
+<h3>Properties</h3>
+<table>
+<tbody>
+<tr>
+<td>
+<a href="out.html">p</a></td>
+<td>
+<code><span class="keyword">val </span><s><span class="identifier">p</span></s><span class="symbol">: </span><span class="identifier">Int</span></code></td>
+</tr>
+</tbody>
+</table>
+<h3>Functions</h3>
+<table>
+<tbody>
+<tr>
+<td>
+<a href="out.html">f</a></td>
+<td>
+<code><span class="keyword">fun </span><s><span class="identifier">f</span></s><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Unit</span></code></td>
+</tr>
+</tbody>
+</table>
+</BODY>
+</HTML>
diff --git a/test/data/format/extensions.class.md b/test/data/format/extensions.class.md
new file mode 100644
index 00000000..a9747756
--- /dev/null
+++ b/test/data/format/extensions.class.md
@@ -0,0 +1,16 @@
+[test](out.md) / [foo](out.md) / [String](out.md)
+
+
+### Extensions for String
+
+
+| [fn](out.md) | `fun String.fn(): Unit`
+`fun String.fn(x: Int): Unit`
+Function with receiver
+
+ |
+| [foobar](out.md) | `val String.foobar: Int`
+Property with receiver.
+
+ |
+
diff --git a/test/data/format/extensions.kt b/test/data/format/extensions.kt
new file mode 100644
index 00000000..6f2eff9d
--- /dev/null
+++ b/test/data/format/extensions.kt
@@ -0,0 +1,19 @@
+package foo
+
+/**
+ * Function with receiver
+ */
+fun String.fn() {
+}
+
+/**
+ * Function with receiver
+ */
+fun String.fn(x: Int) {
+}
+
+/**
+ * Property with receiver.
+ */
+val String.foobar: Int
+ get() = size() * 2
diff --git a/test/data/format/extensions.package.md b/test/data/format/extensions.package.md
new file mode 100644
index 00000000..13f40457
--- /dev/null
+++ b/test/data/format/extensions.package.md
@@ -0,0 +1,18 @@
+[test](out.md) / [foo](out.md)
+
+
+# foo
+
+
+```
+package foo
+```
+
+
+
+
+### Extensions for External Classes
+
+
+| [String](out.md) | `` |
+