aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJames Ahlborn <jtahlborn@yahoo.com>2019-02-07 21:28:00 +0000
committerJames Ahlborn <jtahlborn@yahoo.com>2019-02-07 21:28:00 +0000
commit79310a16fca1336ae41ab95d7eb93022e8edea4b (patch)
tree0d9642dbfac4b347d2d91f7fd9aed1c8de54d42f /src
parent92caa33ac2638c1a76d1f41cdd78b0ea654b19aa (diff)
downloadjackcess-79310a16fca1336ae41ab95d7eb93022e8edea4b.tar.gz
jackcess-79310a16fca1336ae41ab95d7eb93022e8edea4b.zip
tweak unit tests to allow for slight precision variations in different jvms
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@1283 f203690c-595d-4dc9-a70b-905162fa7fd2
Diffstat (limited to 'src')
-rw-r--r--src/test/java/com/healthmarketscience/jackcess/impl/expr/DefaultFunctionsTest.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/test/java/com/healthmarketscience/jackcess/impl/expr/DefaultFunctionsTest.java b/src/test/java/com/healthmarketscience/jackcess/impl/expr/DefaultFunctionsTest.java
index dc4cabb..e2f76b7 100644
--- a/src/test/java/com/healthmarketscience/jackcess/impl/expr/DefaultFunctionsTest.java
+++ b/src/test/java/com/healthmarketscience/jackcess/impl/expr/DefaultFunctionsTest.java
@@ -845,7 +845,11 @@ public class DefaultFunctionsTest extends TestCase
assertEval("409.090909090909", "=CStr(SYD(30000,7500,10,10))");
assertEval("-1.63048347266756E-02", "=CStr(Rate(3,200,-610,0,-20,0.1))");
- assertEval("7.70147248820165E-03", "=CStr(Rate(4*12,-200,8000))");
+ // the result of this varies slightly depending on the jvm impl, so we
+ // round it to fewer decimal places (7.70147248820165E-03 or
+ // 7.70147248820155E-03)
+ assertEval("7.701472488202E-03",
+ "=Format(CStr(Rate(4*12,-200,8000)), '#.############E+00')");
assertEval("-1.09802980531205", "=CStr(Rate(60,93.22,5000,0.1))");
}