split FunctionGenTest.defaultArgs

This commit is contained in:
Stepan Koltsov
2012-02-09 22:25:19 +04:00
parent 6a8f2e14fb
commit 5c8fb3febf
7 changed files with 104 additions and 52 deletions
@@ -0,0 +1,19 @@
fun reformat(
str : String,
normalizeCase : Boolean = true,
uppercaseFirstLetter : Boolean = true,
divideByCamelHumps : Boolean = true,
wordSeparator : String = " "
) =
#(normalizeCase, uppercaseFirstLetter, divideByCamelHumps, wordSeparator)
fun box() : String {
val expected = #(true, true, true, " ")
if(reformat("", true, true, true, " ") != expected) return "fail"
if(reformat("", true, true, true) != expected) return "fail"
if(reformat("", true, true) != expected) return "fail"
if(reformat("", true) != expected) return "fail"
if(reformat("") != expected) return "fail"
return "OK"
}