From 36f4b916bc956d8f5c9f6b55d295ea9a69c9f0bc Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Wed, 28 Oct 2015 15:23:50 +0100 Subject: show inherited members in the list of class members --- .../crossLanguage/kotlinExtendsJava/Bar.html | 11 +++++++ test/data/format/inheritedMembers.kt | 12 +++++++ test/data/format/inheritedMembers.md | 38 ++++++++++++++++++++++ test/src/format/MarkdownFormatTest.kt | 6 ++++ 4 files changed, 67 insertions(+) create mode 100644 test/data/format/inheritedMembers.kt create mode 100644 test/data/format/inheritedMembers.md (limited to 'test') diff --git a/test/data/format/crossLanguage/kotlinExtendsJava/Bar.html b/test/data/format/crossLanguage/kotlinExtendsJava/Bar.html index 5b93d837..e7b139d8 100644 --- a/test/data/format/crossLanguage/kotlinExtendsJava/Bar.html +++ b/test/data/format/crossLanguage/kotlinExtendsJava/Bar.html @@ -22,5 +22,16 @@ +

Inherited Functions

+ + + + + + + +
+xyzzy +open fun xyzzy(): Unit
diff --git a/test/data/format/inheritedMembers.kt b/test/data/format/inheritedMembers.kt new file mode 100644 index 00000000..2d0c4ca1 --- /dev/null +++ b/test/data/format/inheritedMembers.kt @@ -0,0 +1,12 @@ +open class Foo { + fun first() { + } + + val firstProp: Int = 0 +} + +class Bar : Foo() { + fun second() + + val secondProp: Int = 1 +} diff --git a/test/data/format/inheritedMembers.md b/test/data/format/inheritedMembers.md new file mode 100644 index 00000000..d58d3974 --- /dev/null +++ b/test/data/format/inheritedMembers.md @@ -0,0 +1,38 @@ +[test](test/index) / [Bar](test/-bar/index) + + +# Bar + +`class Bar : [Foo](test/-foo/index)` + + + +### Constructors + + +| [<init>](test/-bar/-init-) | `Bar()` | + + +### Properties + + +| [secondProp](test/-bar/second-prop) | `val secondProp: Int` | + + +### Inherited Properties + + +| [firstProp](test/-foo/first-prop) | `val firstProp: Int` | + + +### Functions + + +| [second](test/-bar/second) | `fun second(): Unit` | + + +### Inherited Functions + + +| [first](test/-foo/first) | `fun first(): Unit` | + diff --git a/test/src/format/MarkdownFormatTest.kt b/test/src/format/MarkdownFormatTest.kt index ab905c18..728ce20f 100644 --- a/test/src/format/MarkdownFormatTest.kt +++ b/test/src/format/MarkdownFormatTest.kt @@ -203,4 +203,10 @@ public class MarkdownFormatTest { markdownService.appendNodes(tempLocation, output, model.members.single().members) } } + + @Test fun inheritedMembers() { + verifyOutput("test/data/format/inheritedMembers.kt", ".md") { model, output -> + markdownService.appendNodes(tempLocation, output, model.members.single().members.filter { it.name == "Bar" }) + } + } } -- cgit