Adjust testData to CharSequence.length transformation

This commit is contained in:
Denis Zharkov
2015-10-12 20:29:01 +03:00
committed by Mikhail Glukhikh
parent cb562e7ea5
commit f0e3fd617d
348 changed files with 524 additions and 540 deletions
+1 -1
View File
@@ -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
View File
@@ -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"