Added new string tests
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
fun test(p: String?): String {
|
||||
return "${p ?: "Default"} test"
|
||||
}
|
||||
fun box(): String {
|
||||
if (test(null) != "Default test") return "fail 1: ${test(null)}"
|
||||
if (test("Good") != "Good test") return "fail 1: ${test("OK")}"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user