enabled number formatting in LocaleFormatter tests now that issue KT-1583 is fixed
This commit is contained in:
@@ -130,12 +130,9 @@ open class LocaleFormatter(val locale : Locale = defaultLocale) : ToStringFormat
|
||||
public var dateFormat : DateFormat = DateFormat.getDateTimeInstance(DateFormat.DEFAULT, DateFormat.DEFAULT, locale).sure()
|
||||
|
||||
override fun format(out : Appendable, value : Any?) {
|
||||
/* TODO KT-1583 - uncomment when its fixed
|
||||
if (value is Number) {
|
||||
format(out, format(value))
|
||||
} else
|
||||
*/
|
||||
if (value is Date) {
|
||||
} else if (value is Date) {
|
||||
format(out, format(value))
|
||||
} else {
|
||||
super.format(out, value)
|
||||
|
||||
@@ -22,8 +22,7 @@ class LocaleTemplateTest : TestCase() {
|
||||
|
||||
fun format(formatter: LocaleFormatter): Unit {
|
||||
val name = "James"
|
||||
// TODO currently numbers cause: java.lang.ClassNotFoundException: jet.Number
|
||||
//val price: Double = 1.99
|
||||
val price: Double = 1.99
|
||||
val now = Date()
|
||||
|
||||
|
||||
@@ -34,8 +33,7 @@ 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,
|
||||
// TODO currently numbers cause: java.lang.ClassNotFoundException: jet.Number
|
||||
// " price ", price,
|
||||
" price ", price,
|
||||
" data ", now)).toString(formatter)
|
||||
|
||||
println("Got text: $actual")
|
||||
|
||||
Reference in New Issue
Block a user