aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/data/format/htmlEscaping.html2
-rw-r--r--test/data/format/nullability.kt5
-rw-r--r--test/data/format/nullability.md20
-rw-r--r--test/src/format/MarkdownFormatTest.kt6
4 files changed, 32 insertions, 1 deletions
diff --git a/test/data/format/htmlEscaping.html b/test/data/format/htmlEscaping.html
index 52c69239..a485c08f 100644
--- a/test/data/format/htmlEscaping.html
+++ b/test/data/format/htmlEscaping.html
@@ -6,7 +6,7 @@
<a href="test/index">test</a>&nbsp;/&nbsp;<a href="test/x">x</a><br/>
<br/>
<h1>x</h1>
-<code><span class="keyword">fun </span><span class="symbol">&lt;</span><span class="identifier">T</span><span class="symbol">&gt;</span> <span class="identifier">x</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">T?</span></code><br/>
+<code><span class="keyword">fun </span><span class="symbol">&lt;</span><span class="identifier">T</span><span class="symbol">&gt;</span> <span class="identifier">x</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">T</span><span class="symbol">?</span></code><br/>
<p>Special characters: &lt; is "less than", &gt; is "greater than", &amp; is "ampersand"</p>
<br/>
<br/>
diff --git a/test/data/format/nullability.kt b/test/data/format/nullability.kt
new file mode 100644
index 00000000..d1d4545b
--- /dev/null
+++ b/test/data/format/nullability.kt
@@ -0,0 +1,5 @@
+class C<T> {
+ fun foo(): Comparable<T>? {
+ return null
+ }
+}
diff --git a/test/data/format/nullability.md b/test/data/format/nullability.md
new file mode 100644
index 00000000..ee50a0a5
--- /dev/null
+++ b/test/data/format/nullability.md
@@ -0,0 +1,20 @@
+[test](test/index) / [C](test/-c/index)
+
+
+# C
+
+`class C&lt;T&gt;`
+
+
+
+### Constructors
+
+
+| [&lt;init&gt;](test/-c/-init-) | `C()` |
+
+
+### Functions
+
+
+| [foo](test/-c/foo) | `fun foo(): Comparable&lt;T&gt;?` |
+
diff --git a/test/src/format/MarkdownFormatTest.kt b/test/src/format/MarkdownFormatTest.kt
index 0452645a..7164fdee 100644
--- a/test/src/format/MarkdownFormatTest.kt
+++ b/test/src/format/MarkdownFormatTest.kt
@@ -142,4 +142,10 @@ public class MarkdownFormatTest {
markdownService.appendNodes(tempLocation, output, model.members.single().members)
}
}
+
+ Test fun nullability() {
+ verifyOutput("test/data/format/nullability.kt", ".md") { model, output ->
+ markdownService.appendNodes(tempLocation, output, model.members.single().members)
+ }
+ }
}