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/format/website') 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 +--- + +
test / a
+ +# a + +
fun a(): String
+
+ +``` kotlin + +fun main(args: Array) { +//sampleStart +println(a()) //Hello, Work +println("a() == b() is ${a() == b()}") //true +//sampleEnd +} +``` + +
-- cgit