aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/data/format/overloads.html24
-rw-r--r--test/data/format/overloads.kt5
-rw-r--r--test/src/format/HtmlFormatTest.kt6
3 files changed, 35 insertions, 0 deletions
diff --git a/test/data/format/overloads.html b/test/data/format/overloads.html
new file mode 100644
index 00000000..9ea88869
--- /dev/null
+++ b/test/data/format/overloads.html
@@ -0,0 +1,24 @@
+<HTML>
+<HEAD>
+</HEAD>
+<BODY>
+<a href="out.html">test</a>&nbsp;/&nbsp;<a href="out.html"></a><br/>
+<br/>
+<h1></h1>
+<pre><code><span class="keyword">package</span> <span class="identifier"></span></code></pre><br/>
+<br/>
+<h3>Functions</h3>
+<table>
+<tbody>
+<tr>
+<td>
+<a href="out.html">f</a></td>
+<td>
+<code><span class="keyword">fun </span><span class="identifier">f</span><span class="symbol">(</span><span class="identifier">x</span><span class="symbol">: </span><span class="identifier">Int</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Unit</span></code><br/>
+<code><span class="keyword">fun </span><span class="identifier">f</span><span class="symbol">(</span><span class="identifier">x</span><span class="symbol">: </span><span class="identifier">String</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Unit</span></code><p>Performs an action on x.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</BODY>
+</HTML>
diff --git a/test/data/format/overloads.kt b/test/data/format/overloads.kt
new file mode 100644
index 00000000..dcd2d097
--- /dev/null
+++ b/test/data/format/overloads.kt
@@ -0,0 +1,5 @@
+/** Performs an action on x. */
+fun f(x: Int) { }
+
+/** Performs an action on x. */
+fun f(x: String) { }
diff --git a/test/src/format/HtmlFormatTest.kt b/test/src/format/HtmlFormatTest.kt
index a47b5774..881a7828 100644
--- a/test/src/format/HtmlFormatTest.kt
+++ b/test/src/format/HtmlFormatTest.kt
@@ -18,4 +18,10 @@ public class HtmlFormatTest {
htmlService.appendNodes(tempLocation, output, model.members.single().members)
}
}
+
+ Test fun overloads() {
+ verifyOutput("test/data/format/overloads.kt", ".html") { model, output ->
+ htmlService.appendNodes(tempLocation, output, model.members)
+ }
+ }
}