Minor: Fix TODOs in stdlib tests
This commit is contained in:
@@ -483,9 +483,7 @@ class CollectionTest {
|
||||
|
||||
val hasNulls = listOf("foo", null, "bar")
|
||||
|
||||
// TODO replace with more accurate version when KT-5987 will be fixed
|
||||
// failsWith(javaClass<IllegalArgumentException>()) {
|
||||
assertFails {
|
||||
assertFailsWith<IllegalArgumentException> {
|
||||
// should throw an exception as we have a null
|
||||
hasNulls.requireNoNulls()
|
||||
}
|
||||
|
||||
@@ -50,17 +50,14 @@ fun Char.isAsciiUpperCase() = this in 'A'..'Z'
|
||||
|
||||
class StringTest {
|
||||
|
||||
// could not be local inside isEmptyAndBlank, because local declarations is not yet supported for JS
|
||||
// TODO: move inside after KT-11030 is implemented
|
||||
class IsEmptyCase(val value: String?, val isNull: Boolean = false, val isEmpty: Boolean = false, val isBlank: Boolean = false)
|
||||
|
||||
@test fun isEmptyAndBlank() = withOneCharSequenceArg { arg1 ->
|
||||
class Case(val value: String?, val isNull: Boolean = false, val isEmpty: Boolean = false, val isBlank: Boolean = false)
|
||||
|
||||
val cases = listOf(
|
||||
IsEmptyCase(null, isNull = true),
|
||||
IsEmptyCase("", isEmpty = true, isBlank = true),
|
||||
IsEmptyCase(" \r\n\t\u00A0", isBlank = true),
|
||||
IsEmptyCase(" Some ")
|
||||
Case(null, isNull = true),
|
||||
Case("", isEmpty = true, isBlank = true),
|
||||
Case(" \r\n\t\u00A0", isBlank = true),
|
||||
Case(" Some ")
|
||||
)
|
||||
|
||||
for (case in cases) {
|
||||
|
||||
@@ -23,7 +23,7 @@ import org.junit.Test as test
|
||||
class TODOTest {
|
||||
private class PartiallyImplementedClass {
|
||||
public val prop: String get() = TODO()
|
||||
// fun method1() = TODO() as String // <- doesn't compile in JS
|
||||
fun method1() = TODO() as String
|
||||
public fun method2(): Int = TODO()
|
||||
|
||||
public fun method3(switch: Boolean, value: String): String {
|
||||
@@ -56,7 +56,7 @@ class TODOTest {
|
||||
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") }
|
||||
|
||||
@@ -48,7 +48,6 @@ fun generators(): List<GenericFunction> {
|
||||
"""
|
||||
}
|
||||
|
||||
// TODO: use build scope function when available
|
||||
// TODO: use immutable sets when available
|
||||
returns("SELF", Sets, Sequences)
|
||||
doc(Sets) {
|
||||
@@ -490,7 +489,6 @@ fun generators(): List<GenericFunction> {
|
||||
while *second* list contains elements for which [predicate] yielded `false`.
|
||||
"""
|
||||
}
|
||||
// TODO: Sequence variant
|
||||
returns("Pair<List<T>, List<T>>")
|
||||
body {
|
||||
"""
|
||||
|
||||
@@ -257,7 +257,6 @@ fun specialJVM(): List<GenericFunction> {
|
||||
"""
|
||||
}
|
||||
|
||||
// TODO: Use own readonly kotlin.AbstractList
|
||||
body(ArraysOfPrimitives) {
|
||||
"""
|
||||
return object : AbstractList<T>(), RandomAccess {
|
||||
|
||||
Reference in New Issue
Block a user