[Liblas-commits] hg-main-tree: do an epsilon compare for testing
doubles
liblas-commits at liblas.org
liblas-commits at liblas.org
Wed Mar 16 09:46:16 EDT 2011
details: http://hg.libpc.orghg-main-tree/rev/0bf21fe2ba32
changeset: 259:0bf21fe2ba32
user: Howard Butler <hobu.inc at gmail.com>
date: Wed Mar 16 08:46:11 2011 -0500
description:
do an epsilon compare for testing doubles
diffstat:
test/unit/UtilsTest.cpp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r 161feb02282f -r 0bf21fe2ba32 test/unit/UtilsTest.cpp
--- a/test/unit/UtilsTest.cpp Wed Mar 16 02:35:32 2011 -0400
+++ b/test/unit/UtilsTest.cpp Wed Mar 16 08:46:11 2011 -0500
@@ -138,7 +138,7 @@
double y = Utils::read_field<double>(p);
BOOST_CHECK(x==one);
- BOOST_CHECK(y==two);
+ BOOST_CHECK(Utils::compare_approx(y, two, (double) 0.00001) == true);
return;
}
More information about the Liblas-commits
mailing list