StdLib deprecations cleanup: *array -> *arrayOf, copyToArray -> toTypedArray.
This commit is contained in:
@@ -16,7 +16,7 @@ class HtmlTemplateTest : TestCase() {
|
||||
|
||||
// TODO will use a tuple soon
|
||||
//val actual = StringTemplate(Tuple3<String,String,String>("<h1>", foo, "</h1> <p>hey ", bar, "</p>")).toHtml()
|
||||
val actual = StringTemplate(array("<h1>", foo, "</h1> <p>hey ", bar, "</p>")).toHtml()
|
||||
val actual = StringTemplate(arrayOf("<h1>", foo, "</h1> <p>hey ", bar, "</p>")).toHtml()
|
||||
|
||||
assertEquals("<h1>James</h1> <p>hey x > 1</p>", actual)
|
||||
}
|
||||
|
||||
@@ -32,9 +32,9 @@ class LocaleTemplateTest : TestCase() {
|
||||
|
||||
// TODO will use a tuple soon
|
||||
//val actual = formatter.format(StringTemplate(Tuple2<String,String>("hello ", name))
|
||||
val actual = StringTemplate(array("hello ", name,
|
||||
" price ", price,
|
||||
" data ", now)).toString(formatter)
|
||||
val actual = StringTemplate(arrayOf("hello ", name,
|
||||
" price ", price,
|
||||
" data ", now)).toString(formatter)
|
||||
|
||||
println("Got text: $actual")
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ class StringTemplateTest : TestCase() {
|
||||
|
||||
// TODO will use a tuple soon
|
||||
//val actual = StringTemplate(Tuple3<String,String,String>("hello ", name, "!"))).toString()
|
||||
val actual = StringTemplate(array("hello ", name, "!")).toString()
|
||||
val actual = StringTemplate(arrayOf("hello ", name, "!")).toString()
|
||||
|
||||
assertEquals("hello James!", actual)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user