diff options
author | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2009-10-27 20:16:08 +0000 |
---|---|---|
committer | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2009-10-27 20:16:08 +0000 |
commit | fb689fed2ba7034d91227bd4663870469bd2f612 (patch) | |
tree | 3a70f5090e8ff47dcd204d684bfee0759f8835e1 | |
parent | 45298c730b74f7779305ecc96da7beb6572438de (diff) |
tests: More decimal digits are tested
git-svn-id: http://pugixml.googlecode.com/svn/trunk@177 99668b35-9821-0410-8761-19e4c4f06640
-rw-r--r-- | tests/test.hpp | 2 | ||||
-rw-r--r-- | tests/test_xpath_parse.cpp | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/tests/test.hpp b/tests/test.hpp index 028da62..f2d6266 100644 --- a/tests/test.hpp +++ b/tests/test.hpp @@ -43,7 +43,7 @@ inline bool test_xpath_number(const pugi::xml_node& node, const char* query, dou {
pugi::xpath_query q(query);
- return fabs(q.evaluate_number(node) - expected) < 1e-8f;
+ return fabs(q.evaluate_number(node) - expected) < 1e-16f;
}
inline bool test_xpath_number_nan(const pugi::xml_node& node, const char* query)
diff --git a/tests/test_xpath_parse.cpp b/tests/test_xpath_parse.cpp index b7604f5..d9595c8 100644 --- a/tests/test_xpath_parse.cpp +++ b/tests/test_xpath_parse.cpp @@ -22,6 +22,7 @@ TEST(xpath_number_parse) CHECK_XPATH_NUMBER(c, "123", 123);
CHECK_XPATH_NUMBER(c, "123.456", 123.456);
CHECK_XPATH_NUMBER(c, ".123", 0.123);
+ CHECK_XPATH_NUMBER(c, "123.4567890123456789012345", 123.4567890123456789012345);
}
TEST(xpath_number_error)
|