diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/data/format/htmlEscaping.html | 2 | ||||
-rw-r--r-- | test/data/format/nullability.kt | 5 | ||||
-rw-r--r-- | test/data/format/nullability.md | 20 | ||||
-rw-r--r-- | test/src/format/MarkdownFormatTest.kt | 6 |
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> / <a href="test/x">x</a><br/> <br/> <h1>x</h1> -<code><span class="keyword">fun </span><span class="symbol"><</span><span class="identifier">T</span><span class="symbol">></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"><</span><span class="identifier">T</span><span class="symbol">></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: < is "less than", > is "greater than", & 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<T>` + + + +### Constructors + + +| [<init>](test/-c/-init-) | `C()` | + + +### Functions + + +| [foo](test/-c/foo) | `fun foo(): Comparable<T>?` | + 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) + } + } } |