mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-21 05:50:18 +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
|
||||
public void testCutDecimalsWhichIsRoundedDown() {
|
||||
double d = 0.05234;
|
||||
String expResult = "0,05";
|
||||
|
||||
String result = FormatUtils.cutDecimals(d);
|
||||
|
||||
assertEquals(expResult, result);
|
||||
assertTrue("0.05".equals(result) || "0,05".equals(result));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCutDecimalsWhichIsRoundedUp() {
|
||||
double d = 0.05634;
|
||||
String expResult = "0,06";
|
||||
|
||||
String result = FormatUtils.cutDecimals(d);
|
||||
|
||||
assertEquals(expResult, result);
|
||||
assertTrue("0.06".equals(result) || "0,06".equals(result));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Loading…
Reference in New Issue
Block a user