aboutsummaryrefslogtreecommitdiff
path: root/core/testdata/format/website-html/sampleWithAsserts.kt
diff options
context:
space:
mode:
Diffstat (limited to 'core/testdata/format/website-html/sampleWithAsserts.kt')
-rw-r--r--core/testdata/format/website-html/sampleWithAsserts.kt34
1 files changed, 0 insertions, 34 deletions
diff --git a/core/testdata/format/website-html/sampleWithAsserts.kt b/core/testdata/format/website-html/sampleWithAsserts.kt
deleted file mode 100644
index bb5848e6..00000000
--- a/core/testdata/format/website-html/sampleWithAsserts.kt
+++ /dev/null
@@ -1,34 +0,0 @@
-import java.io.FileNotFoundException
-import java.io.File
-
-/**
- * @sample sample
- */
-fun a(): String {
- return "Hello, Work"
-}
-
-fun b(): String {
- return "Hello, Rest"
-}
-
-/**
- * @throws FileNotFoundException every time
- */
-fun readSomeFile(f: File) {
- throw FileNotFoundException("BOOM")
-}
-
-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")) }
-
- assertFails { readSomeFile(File("some.txt")) }
-
- fun indented() {
- assertFalse(a() != b(), "A neq B")
- }
-} \ No newline at end of file