Sign in
pigweed
/
third_party
/
github
/
JetBrains
/
kotlin
/
534b00eff856e0e4dcaf105df9a043d9b1263ff7
/
.
/
compiler
/
testData
/
codegen
/
box
/
contracts
/
isNullString.kt
blob: e463f0658ab72b60ce7a84bd1037b257b4560c79 [
file
]
// WITH_STDLIB
import
kotlin
.
test
.*
fun box
():
String
{
assertEquals
(
"STR"
,
nullableString
(
"str"
))
assertEquals
(
""
,
nullableString
(
null
))
return
"OK"
}
private
fun nullableString
(
string
:
String
?):
String
=
if
(
string
.
isNullOrBlank
())
""
else
"STR"