diff options
author | Dmitry Jemerov <yole@jetbrains.com> | 2015-03-02 12:25:00 +0100 |
---|---|---|
committer | Dmitry Jemerov <yole@jetbrains.com> | 2015-03-02 12:25:00 +0100 |
commit | cad221f454adceb12d74fc563788b3d8247e44f6 (patch) | |
tree | 6e0ec083098476cc284b51bc19e03e8f4c5e1216 /test | |
parent | f9172b3a632181ee9b7ab5d674e537f4a71874eb (diff) | |
download | dokka-cad221f454adceb12d74fc563788b3d8247e44f6.tar.gz dokka-cad221f454adceb12d74fc563788b3d8247e44f6.tar.bz2 dokka-cad221f454adceb12d74fc563788b3d8247e44f6.zip |
represent nullability in doc model instead of appending ? to type name
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) + } + } } |