Skip to content
Snippets Groups Projects
Commit 8edbcbfd authored by Matthias Urhahn's avatar Matthias Urhahn
Browse files

Merge branch 'release/1.11.x' into release/1.12.x

# Conflicts:
#	gradle.properties
parents 64201019 8158b16d
No related branches found
No related tags found
No related merge requests found
...@@ -22,7 +22,7 @@ fun formatStatisticalValue( ...@@ -22,7 +22,7 @@ fun formatStatisticalValue(
return when (decimals) { return when (decimals) {
in Int.MIN_VALUE..0 -> DecimalFormat("#,###", DecimalFormatSymbols(locale)) in Int.MIN_VALUE..0 -> DecimalFormat("#,###", DecimalFormatSymbols(locale))
1 -> DecimalFormat("#,###.#", DecimalFormatSymbols(locale)) 1 -> DecimalFormat("#,###.0", DecimalFormatSymbols(locale))
else -> DecimalFormat("#,###.##", DecimalFormatSymbols(locale)) else -> DecimalFormat("#,###.##", DecimalFormatSymbols(locale))
}.format(value) }.format(value)
} }
...@@ -55,6 +55,8 @@ internal class StatisticsNumberValueFormatterTest { ...@@ -55,6 +55,8 @@ internal class StatisticsNumberValueFormatterTest {
Arguments.of(12.3456, 1, Locale.GERMANY, "12,3"), Arguments.of(12.3456, 1, Locale.GERMANY, "12,3"),
Arguments.of(12.3456, 2, Locale.GERMANY, "12,35"), Arguments.of(12.3456, 2, Locale.GERMANY, "12,35"),
Arguments.of(1.0036, 1, Locale.GERMANY, "1,0"),
Arguments.of(12.3456, 1, Locale.UK, "12.3"), Arguments.of(12.3456, 1, Locale.UK, "12.3"),
Arguments.of(12.6543, -1, Locale.GERMANY, "13"), Arguments.of(12.6543, -1, Locale.GERMANY, "13"),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment