1 import java.io.FileNotFoundException
2 import java.io.File
3 
4 /**
5  * @sample sample
6  */
anull7 fun a(): String {
8     return "Hello, Work"
9 }
10 
bnull11 fun b(): String {
12     return "Hello, Rest"
13 }
14 
15 /**
16  * @throws FileNotFoundException every time
17  */
readSomeFilenull18 fun readSomeFile(f: File) {
19     throw FileNotFoundException("BOOM")
20 }
21 
samplenull22 fun sample() {
23     assertPrints(a(), "Hello, Work")
24     assertTrue(a() == b())
25     assertTrue(a() == b(), "A eq B")
26     assertFails("reading file now") { readSomeFile(File("some.txt")) }
27     assertFailsWith<FileNotFoundException> { readSomeFile(File("some.txt")) }
28 
29     fun indented() {
30         assertFalse(a() != b(), "A neq B")
31     }
32 }