mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-27 09:00:28 +08:00
Fixed decimal format tests failing on some machines
This commit is contained in:
parent
0e6867ad0d
commit
dfc1b87a25
@ -141,21 +141,19 @@ public class FormatUtilsTest {
|
|||||||
@Test
|
@Test
|
||||||
public void testCutDecimalsWhichIsRoundedDown() {
|
public void testCutDecimalsWhichIsRoundedDown() {
|
||||||
double d = 0.05234;
|
double d = 0.05234;
|
||||||
String expResult = "0,05";
|
|
||||||
|
|
||||||
String result = FormatUtils.cutDecimals(d);
|
String result = FormatUtils.cutDecimals(d);
|
||||||
|
|
||||||
assertEquals(expResult, result);
|
assertTrue("0.05".equals(result) || "0,05".equals(result));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testCutDecimalsWhichIsRoundedUp() {
|
public void testCutDecimalsWhichIsRoundedUp() {
|
||||||
double d = 0.05634;
|
double d = 0.05634;
|
||||||
String expResult = "0,06";
|
|
||||||
|
|
||||||
String result = FormatUtils.cutDecimals(d);
|
String result = FormatUtils.cutDecimals(d);
|
||||||
|
|
||||||
assertEquals(expResult, result);
|
assertTrue("0.06".equals(result) || "0,06".equals(result));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Loading…
Reference in New Issue
Block a user