diff options
author | James Ahlborn <jtahlborn@yahoo.com> | 2017-10-14 19:11:26 +0000 |
---|---|---|
committer | James Ahlborn <jtahlborn@yahoo.com> | 2017-10-14 19:11:26 +0000 |
commit | c84a6dd569f527b26e8f6a6398d3d5972d04b450 (patch) | |
tree | 631d48c69d6cdccc3d532a4c7337db35bfc3b1aa /src | |
parent | 389a37297d6a75052c8852002ba6288c3b02f26c (diff) | |
download | jackcess-c84a6dd569f527b26e8f6a6398d3d5972d04b450.tar.gz jackcess-c84a6dd569f527b26e8f6a6398d3d5972d04b450.zip |
more math unit tests
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/branches/exprs@1128 f203690c-595d-4dc9-a70b-905162fa7fd2
Diffstat (limited to 'src')
-rw-r--r-- | src/test/java/com/healthmarketscience/jackcess/impl/expr/ExpressionatorTest.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/java/com/healthmarketscience/jackcess/impl/expr/ExpressionatorTest.java b/src/test/java/com/healthmarketscience/jackcess/impl/expr/ExpressionatorTest.java index 6463106..c6bda5b 100644 --- a/src/test/java/com/healthmarketscience/jackcess/impl/expr/ExpressionatorTest.java +++ b/src/test/java/com/healthmarketscience/jackcess/impl/expr/ExpressionatorTest.java @@ -263,11 +263,22 @@ public class ExpressionatorTest extends TestCase } } } + } + public void testTrickyMathExpressions() throws Exception + { assertEquals(37, eval("=30+7")); assertEquals(23, eval("=30+-7")); assertEquals(23, eval("=30-+7")); + assertEquals(37, eval("=30--7")); assertEquals(23, eval("=30-7")); + + assertEquals(100, eval("=-10^2")); + assertEquals(-100, eval("=-(10)^2")); + assertEquals(-100, eval("=-\"10\"^2")); + + assertEquals(99d, eval("=-10E-1+10e+1")); + assertEquals(-101d, eval("=-10E-1-10e+1")); } public void testTypeCoercion() throws Exception |