diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/data/format/accessor.get.md | 12 | ||||
-rw-r--r-- | test/data/format/accessor.kt | 5 | ||||
-rw-r--r-- | test/data/format/accessor.set.md | 12 | ||||
-rw-r--r-- | test/data/format/deprecated.class.html | 2 | ||||
-rw-r--r-- | test/src/format/MarkdownFormatTest.kt | 11 |
5 files changed, 41 insertions, 1 deletions
diff --git a/test/data/format/accessor.get.md b/test/data/format/accessor.get.md new file mode 100644 index 00000000..b4da2a03 --- /dev/null +++ b/test/data/format/accessor.get.md @@ -0,0 +1,12 @@ +[test](out.md) / [](out.md) / [C](out.md) / [x](out.md) / [get](out.md) + + +# get + + +``` +get(): String +``` + + + diff --git a/test/data/format/accessor.kt b/test/data/format/accessor.kt new file mode 100644 index 00000000..b6ed9624 --- /dev/null +++ b/test/data/format/accessor.kt @@ -0,0 +1,5 @@ +class C() { + var x: String + get() = "" + set(value) { } +} diff --git a/test/data/format/accessor.set.md b/test/data/format/accessor.set.md new file mode 100644 index 00000000..8b9db263 --- /dev/null +++ b/test/data/format/accessor.set.md @@ -0,0 +1,12 @@ +[test](out.md) / [](out.md) / [C](out.md) / [x](out.md) / [set](out.md) + + +# set + + +``` +set(value: String) +``` + + + diff --git a/test/data/format/deprecated.class.html b/test/data/format/deprecated.class.html index 87599082..1442026c 100644 --- a/test/data/format/deprecated.class.html +++ b/test/data/format/deprecated.class.html @@ -38,7 +38,7 @@ <td> <a href="out.html">get</a></td> <td> -<code></code></td> +<code><span class="identifier">get</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Int</span></code></td> </tr> </tbody> </table> diff --git a/test/src/format/MarkdownFormatTest.kt b/test/src/format/MarkdownFormatTest.kt index 5a4bacb2..efde3139 100644 --- a/test/src/format/MarkdownFormatTest.kt +++ b/test/src/format/MarkdownFormatTest.kt @@ -81,4 +81,15 @@ public class MarkdownFormatTest { markdownService.appendNodes(tempLocation, output, model.members.single().members) } } + + Test fun accessor() { + verifyOutput("test/data/format/accessor.kt", ".get.md") { model, output -> + val propertyNode = model.members.single().members.first { it.name == "C" }.members.first { it.name == "x" } + markdownService.appendNodes(tempLocation, output, listOf(propertyNode.members[0])) + } + verifyOutput("test/data/format/accessor.kt", ".set.md") { model, output -> + val propertyNode = model.members.single().members.first { it.name == "C" }.members.first { it.name == "x" } + markdownService.appendNodes(tempLocation, output, listOf(propertyNode.members[1])) + } + } } |