Adjust testData to CharSequence.length transformation
This commit is contained in:
committed by
Mikhail Glukhikh
parent
cb562e7ea5
commit
f0e3fd617d
+1
-1
@@ -1,6 +1,6 @@
|
||||
class Thing(delegate: CharSequence) : CharSequence by delegate
|
||||
|
||||
fun box(): String {
|
||||
val l = Thing("hello there").length()
|
||||
val l = Thing("hello there").length
|
||||
return if (l == 11) "OK" else "Fail $l"
|
||||
}
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ class Thing(val delegate: CharSequence) : CharSequence {
|
||||
override fun get(index: Int): Char {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
override fun length(): Int = 0
|
||||
override val length: Int get() = 0
|
||||
override fun subSequence(start: Int, end: Int) = delegate.subSequence(start, end)
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ fun box() : String {
|
||||
|
||||
val test5 =
|
||||
"""
|
||||
${s.length()}
|
||||
${s.length}
|
||||
"""
|
||||
if (test5 != "\n 3\n") return "Fail 5: $test5"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user