Skip to content

Commit

Permalink
get decimal separator from system locale
Browse files Browse the repository at this point in the history
  • Loading branch information
erilong committed Nov 2, 2011
1 parent 1f0e7c1 commit 2b5c6d6
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -200,8 +200,9 @@ protected void assertEquals(String[] name, String[] expected, Map<String, Object
Assert.assertNotNull("Expected non-empty results. " + printDatabase(), results);
for (int i = 0; i < expected.length; i++) {
Object resultObj = results.get(name[i]);
String resultValue = null;
if (resultObj instanceof BigDecimal && expected[i].indexOf(".") != -1) {
String resultValue = null;
char decimal = ((DecimalFormat) DecimalFormat.getInstance()).getDecimalFormatSymbols().getDecimalSeparator();
if (resultObj instanceof BigDecimal && expected[i].indexOf(decimal) != -1) {
DecimalFormat df = new DecimalFormat("0.00####################################");
resultValue = df.format(resultObj);
} else if (resultObj instanceof Date) {
Expand Down

0 comments on commit 2b5c6d6

Please sign in to comment.