Files
kotlin/compiler/testData/codegen/box/strings/rawStringsWithManyQuotes.kt
Alexander Udalov 128c938965 Make Array.size() a function instead of a property
Also add a deprecated extension property to help migration. This is done to
unify getting size of arrays and collections
2014-11-17 15:02:38 +03:00

29 lines
683 B
Kotlin

class P(val actual: String, val expected: String)
fun array(vararg s: P) = s
fun box() : String {
val data = array(
P("""""", ""),
P(""""""", "\""),
P("""""""", "\"\""),
P(""""""""", "\"\"\""),
P("""""""""", "\"\"\"\""),
P("""" """, "\" "),
P(""""" """, "\"\" "),
P(""" """", " \""),
P(""" """"", " \"\""),
P(""" """""", " \"\"\""),
P(""" """"""", " \"\"\"\""),
P(""" """""""", " \"\"\"\"\""),
P("""" """", "\" \""),
P(""""" """"", "\"\" \"\"")
)
for (i in 0..data.size()-1) {
val p = data[i]
if (p.actual != p.expected) return "Fail at #$i. actual='${p.actual}', expected='${p.expected}'"
}
return "OK"
}