diff options
author | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2016-11-30 18:25:57 +0300 |
---|---|---|
committer | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2016-11-30 18:25:57 +0300 |
commit | 039bb97123fd8a74b9954598d7a102e235fd108d (patch) | |
tree | 2cf4a8a8c7beddb46ec6f6d34f4b1299dd053f5a /core/testdata | |
parent | 0e3fe9f50cb52a783666291c2f2d618706617bc3 (diff) | |
download | dokka-039bb97123fd8a74b9954598d7a102e235fd108d.tar.gz dokka-039bb97123fd8a74b9954598d7a102e235fd108d.tar.bz2 dokka-039bb97123fd8a74b9954598d7a102e235fd108d.zip |
Fixed tests for sample formats
Diffstat (limited to 'core/testdata')
-rw-r--r-- | core/testdata/format/website-samples/sample.kt | 16 | ||||
-rw-r--r-- | core/testdata/format/website-samples/sample.md | 38 | ||||
-rw-r--r-- | core/testdata/format/website-samples/sampleWithAsserts.kt (renamed from core/testdata/format/website/sampleWithAsserts.kt) | 0 | ||||
-rw-r--r-- | core/testdata/format/website-samples/sampleWithAsserts.md (renamed from core/testdata/format/website/sampleWithAsserts.md) | 0 | ||||
-rw-r--r-- | core/testdata/format/website/sample.md | 9 |
5 files changed, 54 insertions, 9 deletions
diff --git a/core/testdata/format/website-samples/sample.kt b/core/testdata/format/website-samples/sample.kt new file mode 100644 index 00000000..a664c2f5 --- /dev/null +++ b/core/testdata/format/website-samples/sample.kt @@ -0,0 +1,16 @@ +/** + * Groups elements of the original sequence by the key returned by the given [keySelector] function + * applied to each element and returns a map where each group key is associated with a list of corresponding elements. + * @sample example1 + */ +fun foo(): Int { + return 0 +} + +fun foo(i: Int): Int { + return 1 +} + +fun example1(node: String) = if (true) { + println(property) +} diff --git a/core/testdata/format/website-samples/sample.md b/core/testdata/format/website-samples/sample.md new file mode 100644 index 00000000..203f1b02 --- /dev/null +++ b/core/testdata/format/website-samples/sample.md @@ -0,0 +1,38 @@ +--- +title: foo - test +layout: api +--- + +<div class='api-docs-breadcrumbs'><a href="test/index">test</a> / <a href="test/foo">foo</a></div> + +# foo + +<div class="overload-group" markdown="1"> + +<div class="signature"><code><span class="keyword">fun </span><span class="identifier">foo</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Int</span></code></div> + +Groups elements of the original sequence by the key returned by the given <a href="#">keySelector</a> function +applied to each element and returns a map where each group key is associated with a list of corresponding elements. + +<div class="sample" markdown="1"> + +``` kotlin + +fun main(args: Array<String>) { +//sampleStart +if (true) { + println(property) +} +//sampleEnd +} +``` + +</div> + +</div> + +<div class="overload-group" markdown="1"> + +<div class="signature"><code><span class="keyword">fun </span><span class="identifier">foo</span><span class="symbol">(</span><span class="parameterName" id="$foo(kotlin.Int)/i">i</span><span class="symbol">:</span> <span class="identifier">Int</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Int</span></code></div> + +</div> diff --git a/core/testdata/format/website/sampleWithAsserts.kt b/core/testdata/format/website-samples/sampleWithAsserts.kt index bb9732d5..bb9732d5 100644 --- a/core/testdata/format/website/sampleWithAsserts.kt +++ b/core/testdata/format/website-samples/sampleWithAsserts.kt diff --git a/core/testdata/format/website/sampleWithAsserts.md b/core/testdata/format/website-samples/sampleWithAsserts.md index 98d7df33..98d7df33 100644 --- a/core/testdata/format/website/sampleWithAsserts.md +++ b/core/testdata/format/website-samples/sampleWithAsserts.md diff --git a/core/testdata/format/website/sample.md b/core/testdata/format/website/sample.md index 203f1b02..7c11790f 100644 --- a/core/testdata/format/website/sample.md +++ b/core/testdata/format/website/sample.md @@ -14,23 +14,14 @@ layout: api Groups elements of the original sequence by the key returned by the given <a href="#">keySelector</a> function applied to each element and returns a map where each group key is associated with a list of corresponding elements. -<div class="sample" markdown="1"> - ``` kotlin - -fun main(args: Array<String>) { -//sampleStart if (true) { println(property) } -//sampleEnd -} ``` </div> -</div> - <div class="overload-group" markdown="1"> <div class="signature"><code><span class="keyword">fun </span><span class="identifier">foo</span><span class="symbol">(</span><span class="parameterName" id="$foo(kotlin.Int)/i">i</span><span class="symbol">:</span> <span class="identifier">Int</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Int</span></code></div> |