0
0
mirror of https://github.com/zeux/pugixml.git synced 2024-12-26 21:04:25 +08:00

tests: More decimal digits are tested

git-svn-id: http://pugixml.googlecode.com/svn/trunk@177 99668b35-9821-0410-8761-19e4c4f06640
This commit is contained in:
arseny.kapoulkine 2009-10-27 20:16:08 +00:00
parent 45298c730b
commit fb689fed2b
2 changed files with 2 additions and 1 deletions

View File

@ -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)

View File

@ -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)