aboutsummaryrefslogtreecommitdiff
path: root/core/testdata
diff options
context:
space:
mode:
Diffstat (limited to 'core/testdata')
-rw-r--r--core/testdata/format/website/overloadGroup.md2
-rw-r--r--core/testdata/format/website/sample.md11
-rw-r--r--core/testdata/format/website/sampleWithAsserts.kt15
-rw-r--r--core/testdata/format/website/sampleWithAsserts.md23
4 files changed, 49 insertions, 2 deletions
diff --git a/core/testdata/format/website/overloadGroup.md b/core/testdata/format/website/overloadGroup.md
index 81cb7822..d81f86bf 100644
--- a/core/testdata/format/website/overloadGroup.md
+++ b/core/testdata/format/website/overloadGroup.md
@@ -31,4 +31,4 @@ Spell ID for future casts
**Return**
Spell ID for future casts
-</div> \ No newline at end of file
+</div>
diff --git a/core/testdata/format/website/sample.md b/core/testdata/format/website/sample.md
index 1a683da7..203f1b02 100644
--- a/core/testdata/format/website/sample.md
+++ b/core/testdata/format/website/sample.md
@@ -14,16 +14,25 @@ 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>&nbsp;<span class="identifier">Int</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Int</span></code></div>
-</div> \ No newline at end of file
+</div>
diff --git a/core/testdata/format/website/sampleWithAsserts.kt b/core/testdata/format/website/sampleWithAsserts.kt
new file mode 100644
index 00000000..bb9732d5
--- /dev/null
+++ b/core/testdata/format/website/sampleWithAsserts.kt
@@ -0,0 +1,15 @@
+/**
+ * @sample sample
+ */
+fun a(): String {
+ return "Hello, Work"
+}
+
+fun b(): String {
+ return "Hello, Rest"
+}
+
+fun sample() {
+ assertPrints(a(), "Hello, Work")
+ assertTrue(a() == b())
+} \ No newline at end of file
diff --git a/core/testdata/format/website/sampleWithAsserts.md b/core/testdata/format/website/sampleWithAsserts.md
new file mode 100644
index 00000000..98d7df33
--- /dev/null
+++ b/core/testdata/format/website/sampleWithAsserts.md
@@ -0,0 +1,23 @@
+---
+title: a - test
+layout: api
+---
+
+<div class='api-docs-breadcrumbs'><a href="test/index">test</a> / <a href="test/a">a</a></div>
+
+# a
+
+<div class="signature"><code><span class="keyword">fun </span><span class="identifier">a</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">String</span></code></div>
+<div class="sample" markdown="1">
+
+``` kotlin
+
+fun main(args: Array<String>) {
+//sampleStart
+println(a()) // Hello, Work
+println("a() == b() is ${a() == b()}") // true
+//sampleEnd
+}
+```
+
+</div>