From d1177b3e3ca5935329c36fb5617861dabbd0cd3a Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Wed, 28 Oct 2015 17:28:38 +0100 Subject: show extensions applicable to superclasses in the list of class members --- test/data/format/inheritedExtensions.kt | 11 +++++++++++ test/data/format/inheritedExtensions.md | 21 +++++++++++++++++++++ test/src/format/MarkdownFormatTest.kt | 6 ++++++ 3 files changed, 38 insertions(+) create mode 100644 test/data/format/inheritedExtensions.kt create mode 100644 test/data/format/inheritedExtensions.md (limited to 'test') diff --git a/test/data/format/inheritedExtensions.kt b/test/data/format/inheritedExtensions.kt new file mode 100644 index 00000000..e38fe00d --- /dev/null +++ b/test/data/format/inheritedExtensions.kt @@ -0,0 +1,11 @@ +open class Foo + +class Bar : Foo() + +fun Foo.first() { + +} + +fun Bar.second() { + +} diff --git a/test/data/format/inheritedExtensions.md b/test/data/format/inheritedExtensions.md new file mode 100644 index 00000000..79137eac --- /dev/null +++ b/test/data/format/inheritedExtensions.md @@ -0,0 +1,21 @@ +[test](test/index) / [Bar](test/-bar/index) + + +# Bar + +`class Bar : [Foo](test/-foo/index)` + + + +### Constructors + + +| [<init>](test/-bar/-init-) | `Bar()` | + + +### Extension Functions + + +| [first](test/first) | `fun [Foo](test/-foo/index).first(): Unit` | +| [second](test/second) | `fun [Bar](test/-bar/index).second(): Unit` | + diff --git a/test/src/format/MarkdownFormatTest.kt b/test/src/format/MarkdownFormatTest.kt index 728ce20f..bb61fa1c 100644 --- a/test/src/format/MarkdownFormatTest.kt +++ b/test/src/format/MarkdownFormatTest.kt @@ -209,4 +209,10 @@ public class MarkdownFormatTest { markdownService.appendNodes(tempLocation, output, model.members.single().members.filter { it.name == "Bar" }) } } + + @Test fun inheritedExtensions() { + verifyOutput("test/data/format/inheritedExtensions.kt", ".md") { model, output -> + markdownService.appendNodes(tempLocation, output, model.members.single().members.filter { it.name == "Bar" }) + } + } } -- cgit