diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/data/format/overloadsWithDescription.html | 19 | ||||
-rw-r--r-- | test/data/format/overloadsWithDescription.kt | 15 | ||||
-rw-r--r-- | test/data/format/overloadsWithDifferentDescriptions.html | 28 | ||||
-rw-r--r-- | test/data/format/overloadsWithDifferentDescriptions.kt | 15 | ||||
-rw-r--r-- | test/data/format/paramTag.md | 2 | ||||
-rw-r--r-- | test/data/format/see.html | 2 | ||||
-rw-r--r-- | test/data/format/throwsTag.md | 2 | ||||
-rw-r--r-- | test/src/format/HtmlFormatTest.kt | 12 |
8 files changed, 89 insertions, 6 deletions
diff --git a/test/data/format/overloadsWithDescription.html b/test/data/format/overloadsWithDescription.html new file mode 100644 index 00000000..6b593fcd --- /dev/null +++ b/test/data/format/overloadsWithDescription.html @@ -0,0 +1,19 @@ +<HTML> +<HEAD> +<title>test / f</title> +</HEAD> +<BODY> +<a href="out.html">test</a> / <a href="out.html"></a> / <a href="out.html">f</a><br/> +<br/> +<h1>f</h1> +<pre><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></pre><pre><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></pre><p>Performs an action on x.</p> +<br/> +<br/> +<h3>Description</h3> +<p>This is a long description.</p> +<br/> +<br/> +<h3>Parameters</h3> +<code>x</code> - the value to perform the action on.<br/> +</BODY> +</HTML> diff --git a/test/data/format/overloadsWithDescription.kt b/test/data/format/overloadsWithDescription.kt new file mode 100644 index 00000000..13c219a2 --- /dev/null +++ b/test/data/format/overloadsWithDescription.kt @@ -0,0 +1,15 @@ +/** + * Performs an action on x. + * + * This is a long description. + * @param x the value to perform the action on. + */ +fun f(x: Int) { } + +/** + * Performs an action on x. + * + * This is a long description. + * @param x the value to perform the action on. + */ +fun f(x: String) { } diff --git a/test/data/format/overloadsWithDifferentDescriptions.html b/test/data/format/overloadsWithDifferentDescriptions.html new file mode 100644 index 00000000..3ce974af --- /dev/null +++ b/test/data/format/overloadsWithDifferentDescriptions.html @@ -0,0 +1,28 @@ +<HTML> +<HEAD> +<title>test / f</title> +</HEAD> +<BODY> +<a href="out.html">test</a> / <a href="out.html"></a> / <a href="out.html">f</a><br/> +<br/> +<h1>f</h1> +<pre><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></pre><p>Performs an action on x.</p> +<br/> +<br/> +<h3>Description</h3> +<p>This is a long description.</p> +<br/> +<br/> +<h3>Parameters</h3> +<code>x</code> - the int value to perform the action on.<br/> +<pre><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></pre><p>Performs an action on x.</p> +<br/> +<br/> +<h3>Description</h3> +<p>This is a long description.</p> +<br/> +<br/> +<h3>Parameters</h3> +<code>x</code> - the string value to perform the action on.<br/> +</BODY> +</HTML> diff --git a/test/data/format/overloadsWithDifferentDescriptions.kt b/test/data/format/overloadsWithDifferentDescriptions.kt new file mode 100644 index 00000000..ad3169b0 --- /dev/null +++ b/test/data/format/overloadsWithDifferentDescriptions.kt @@ -0,0 +1,15 @@ +/** + * Performs an action on x. + * + * This is a long description. + * @param x the int value to perform the action on. + */ +fun f(x: Int) { } + +/** + * Performs an action on x. + * + * This is a long description. + * @param x the string value to perform the action on. + */ +fun f(x: String) { } diff --git a/test/data/format/paramTag.md b/test/data/format/paramTag.md index 9534deb3..02927668 100644 --- a/test/data/format/paramTag.md +++ b/test/data/format/paramTag.md @@ -11,8 +11,6 @@ fun f(x: String, y: Int): Unit - - ### Parameters `x` - A string diff --git a/test/data/format/see.html b/test/data/format/see.html index fa283363..30409eb7 100644 --- a/test/data/format/see.html +++ b/test/data/format/see.html @@ -7,8 +7,6 @@ <h1>quux</h1> <pre><code><span class="keyword">fun </span><span class="identifier">quux</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Unit</span></code></pre><br/> <br/> -<br/> -<br/> <strong>See Also</strong><br/> <p><a href="out.html">foo</a></p> <p><a href="out.html">bar</a></p> diff --git a/test/data/format/throwsTag.md b/test/data/format/throwsTag.md index d968483b..e6d0c76e 100644 --- a/test/data/format/throwsTag.md +++ b/test/data/format/throwsTag.md @@ -11,8 +11,6 @@ fun f(): Unit - - ### Exceptions `IllegalArgumentException` - on Mondays diff --git a/test/src/format/HtmlFormatTest.kt b/test/src/format/HtmlFormatTest.kt index 7dfa80be..53c1a39d 100644 --- a/test/src/format/HtmlFormatTest.kt +++ b/test/src/format/HtmlFormatTest.kt @@ -25,6 +25,18 @@ public class HtmlFormatTest { } } + Test fun overloadsWithDescription() { + verifyOutput("test/data/format/overloadsWithDescription.kt", ".html") { model, output -> + htmlService.appendNodes(tempLocation, output, model.members.single().members) + } + } + + Test fun overloadsWithDifferentDescriptions() { + verifyOutput("test/data/format/overloadsWithDifferentDescriptions.kt", ".html") { model, output -> + htmlService.appendNodes(tempLocation, output, model.members.single().members) + } + } + Test fun deprecated() { verifyOutput("test/data/format/deprecated.kt", ".package.html") { model, output -> htmlService.appendNodes(tempLocation, output, model.members) |