From af81d5a311125fc30dcf9c14fc9bd9c8680e532b Mon Sep 17 00:00:00 2001 From: Simon Ogorodnik Date: Tue, 8 Nov 2016 20:21:15 +0300 Subject: Now all sample blocks in kotlin-website wrapped in
...
And small refactoring --- core/testdata/format/website/overloadGroup.md | 2 +- core/testdata/format/website/sample.md | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'core/testdata') 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 - \ No newline at end of file + diff --git a/core/testdata/format/website/sample.md b/core/testdata/format/website/sample.md index 1a683da7..374303c0 100644 --- a/core/testdata/format/website/sample.md +++ b/core/testdata/format/website/sample.md @@ -14,6 +14,8 @@ layout: api 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. +
+ ``` kotlin if (true) { println(property) @@ -22,8 +24,10 @@ if (true) {
+ +
fun foo(i: Int): Int
-
\ No newline at end of file + -- cgit From dc99d1fd5c066ac6083f09e23e52cf6c592768e4 Mon Sep 17 00:00:00 2001 From: Simon Ogorodnik Date: Thu, 10 Nov 2016 18:55:14 +0300 Subject: Added //sampleStart //sampleEnd to samples on kotlin website --- core/testdata/format/website/sample.md | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'core/testdata') diff --git a/core/testdata/format/website/sample.md b/core/testdata/format/website/sample.md index 374303c0..203f1b02 100644 --- a/core/testdata/format/website/sample.md +++ b/core/testdata/format/website/sample.md @@ -17,9 +17,14 @@ applied to each element and returns a map where each group key is associated wit
``` kotlin + +fun main(args: Array) { +//sampleStart if (true) { println(property) } +//sampleEnd +} ```
-- cgit From 47790d166100dc50d797fc0312b9b3fe0e7e9d7f Mon Sep 17 00:00:00 2001 From: Simon Ogorodnik Date: Mon, 14 Nov 2016 18:08:17 +0300 Subject: Replacing assertPrints, assertTrue to println for kotlin-website samples, Added SampleProcessingService to FormatDescriptor --- core/testdata/format/website/sampleWithAsserts.kt | 15 +++++++++++++++ core/testdata/format/website/sampleWithAsserts.md | 23 +++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 core/testdata/format/website/sampleWithAsserts.kt create mode 100644 core/testdata/format/website/sampleWithAsserts.md (limited to 'core/testdata') 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 +--- + + + +# a + +
fun a(): String
+
+ +``` kotlin + +fun main(args: Array) { +//sampleStart +println(a()) //Hello, Work +println("a() == b() is ${a() == b()}") //true +//sampleEnd +} +``` + +
-- cgit From 875e7e5e39c6c1668729685bbc7f51bc07aed4b6 Mon Sep 17 00:00:00 2001 From: Simon Ogorodnik Date: Mon, 14 Nov 2016 20:52:19 +0300 Subject: Post review fixes, now building text in single pass. --- core/testdata/format/website/sampleWithAsserts.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/testdata') diff --git a/core/testdata/format/website/sampleWithAsserts.md b/core/testdata/format/website/sampleWithAsserts.md index 3353ce46..98d7df33 100644 --- a/core/testdata/format/website/sampleWithAsserts.md +++ b/core/testdata/format/website/sampleWithAsserts.md @@ -14,8 +14,8 @@ layout: api fun main(args: Array) { //sampleStart -println(a()) //Hello, Work -println("a() == b() is ${a() == b()}") //true +println(a()) // Hello, Work +println("a() == b() is ${a() == b()}") // true //sampleEnd } ``` -- cgit