Reformat stdlib tests and samples

#KT-5558
This commit is contained in:
Ilya Gorbunov
2018-04-23 16:18:24 +03:00
parent add09e0f2e
commit ecf0d7ec0d
39 changed files with 389 additions and 284 deletions
@@ -29,8 +29,7 @@ class KotlinVersionTest {
val (major, minor, patch) = IntArray(3) { index -> if (index == place) component else 0 }
if (component in 0..KotlinVersion.MAX_COMPONENT_VALUE) {
KotlinVersion(major, minor, patch)
}
else {
} else {
assertFailsWith<IllegalArgumentException>("Expected $major.$minor.$patch to be invalid version") {
KotlinVersion(major, minor, patch)
}
+4 -2
View File
@@ -13,6 +13,7 @@ class TODOTest {
public val prop: String get() = TODO()
@Suppress("UNREACHABLE_CODE", "CAST_NEVER_SUCCEEDS")
fun method1() = TODO() as String
public fun method2(): Int = TODO()
public fun method3(switch: Boolean, value: String): String {
@@ -41,11 +42,12 @@ class TODOTest {
}
@Test fun usage() {
@Test
fun usage() {
val inst = PartiallyImplementedClass()
assertNotImplemented { inst.prop }
assertNotImplemented{ inst.method1() }
assertNotImplemented { inst.method1() }
assertNotImplemented { inst.method2() }
assertNotImplemented { inst.method4() }
assertNotImplementedWithMessage("what if false") { inst.method3(false, "test") }