aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/data/format/summarizeSignatures.kt20
-rw-r--r--test/data/format/summarizeSignatures.md22
-rw-r--r--test/src/format/MarkdownFormatTest.kt6
3 files changed, 48 insertions, 0 deletions
diff --git a/test/data/format/summarizeSignatures.kt b/test/data/format/summarizeSignatures.kt
new file mode 100644
index 00000000..1d875a50
--- /dev/null
+++ b/test/data/format/summarizeSignatures.kt
@@ -0,0 +1,20 @@
+package kotlin
+
+class Array<T>
+class IntArray
+class CharArray
+
+/**
+ * Returns true if foo.
+ */
+fun IntArray.foo(predicate: (Int) -> Boolean): Boolean = false
+
+/**
+ * Returns true if foo.
+ */
+fun CharArray.foo(predicate: (Char) -> Boolean): Boolean = false
+
+/**
+ * Returns true if foo.
+ */
+fun <T> Array<T>.foo(predicate: (T) -> Boolean): Boolean = false
diff --git a/test/data/format/summarizeSignatures.md b/test/data/format/summarizeSignatures.md
new file mode 100644
index 00000000..2dcb31a2
--- /dev/null
+++ b/test/data/format/summarizeSignatures.md
@@ -0,0 +1,22 @@
+[test](test/index) / [kotlin](test/kotlin/index)
+
+
+## Package kotlin
+
+
+### Types
+
+
+| [Array](test/kotlin/-array/index) | `class Array&lt;T&gt;` |
+| [CharArray](test/kotlin/-char-array/index) | `class CharArray` |
+| [IntArray](test/kotlin/-int-array/index) | `class IntArray` |
+
+
+### Functions
+
+
+| [foo](test/kotlin/foo) | `fun &lt;T&gt; *any_array*&lt;T&gt;.foo(predicate:&nbsp;(T)&nbsp;-&gt;&nbsp;Boolean): Boolean`
+Returns true if foo.
+
+ |
+
diff --git a/test/src/format/MarkdownFormatTest.kt b/test/src/format/MarkdownFormatTest.kt
index 76ead835..d981561f 100644
--- a/test/src/format/MarkdownFormatTest.kt
+++ b/test/src/format/MarkdownFormatTest.kt
@@ -179,4 +179,10 @@ public class MarkdownFormatTest {
markdownService.appendNodes(tempLocation, output, model.members.single().members)
}
}
+
+ @Test fun summarizeSignatures() {
+ verifyOutput("test/data/format/summarizeSignatures.kt", ".md") { model, output ->
+ markdownService.appendNodes(tempLocation, output, model.members)
+ }
+ }
}