Negative number test
This commit is contained in:
parent
ebf2bdd5bd
commit
ceeade06b4
@ -20,6 +20,16 @@ public class ExpressionParserTest {
|
|||||||
assertEquals(1.2, parser.parse("01.200"), EPS);
|
assertEquals(1.2, parser.parse("01.200"), EPS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testNegativeNumber() throws InvalidExpressionException {
|
||||||
|
assertEquals(-1.0, parser.parse("-1"), EPS);
|
||||||
|
assertEquals(-15.0, parser.parse("-15"), EPS);
|
||||||
|
assertEquals(-0.9, parser.parse("-.9"), EPS);
|
||||||
|
assertEquals(-1.0, parser.parse("-1."), EPS);
|
||||||
|
assertEquals(-1.2, parser.parse("-1.2"), EPS);
|
||||||
|
assertEquals(-1.2, parser.parse("-01.200"), EPS);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testDecimalComma() throws InvalidExpressionException {
|
public void testDecimalComma() throws InvalidExpressionException {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user