diff options
Diffstat (limited to 'core/testdata')
-rw-r--r-- | core/testdata/format/website-html/sampleWithAsserts.html | 7 | ||||
-rw-r--r-- | core/testdata/format/website-html/sampleWithAsserts.kt | 5 |
2 files changed, 12 insertions, 0 deletions
diff --git a/core/testdata/format/website-html/sampleWithAsserts.html b/core/testdata/format/website-html/sampleWithAsserts.html index e70d37c9..11a3a626 100644 --- a/core/testdata/format/website-html/sampleWithAsserts.html +++ b/core/testdata/format/website-html/sampleWithAsserts.html @@ -9,7 +9,14 @@ fun main(args: Array<String>) { //sampleStart println(a()) // Hello, Work println("a() == b() is ${a() == b()}") // true +// A eq B +println("a() == b() is ${a() == b()}") // true // readSomeFile(File("some.txt")) // reading file now will fail // readSomeFile(File("some.txt")) // will fail with FileNotFoundException + +fun indented() { + // A neq B + println("a() != b() is ${a() != b()}") // false +} //sampleEnd }</code></pre></div> diff --git a/core/testdata/format/website-html/sampleWithAsserts.kt b/core/testdata/format/website-html/sampleWithAsserts.kt index f5b03eb8..b3bce11d 100644 --- a/core/testdata/format/website-html/sampleWithAsserts.kt +++ b/core/testdata/format/website-html/sampleWithAsserts.kt @@ -22,6 +22,11 @@ fun readSomeFile(f: File) { fun sample() { assertPrints(a(), "Hello, Work") assertTrue(a() == b()) + assertTrue(a() == b(), "A eq B") assertFails("reading file now") { readSomeFile(File("some.txt")) } assertFailsWith<FileNotFoundException> { readSomeFile(File("some.txt")) } + + fun indented() { + assertFalse(a() != b(), "A neq B") + } }
\ No newline at end of file |