aboutsummaryrefslogtreecommitdiff
path: root/core/testdata
diff options
context:
space:
mode:
Diffstat (limited to 'core/testdata')
-rw-r--r--core/testdata/format/website/sampleWithAsserts.kt15
-rw-r--r--core/testdata/format/website/sampleWithAsserts.md23
2 files changed, 38 insertions, 0 deletions
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..3353ce46
--- /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>