enabled number formatting in LocaleFormatter tests now that issue KT-1583 is fixed

This commit is contained in:
James Strachan
2012-03-17 16:32:31 +00:00
parent e58e3cc02f
commit f4beb7261f
2 changed files with 3 additions and 8 deletions
@@ -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")