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:
parent
45298c730b
commit
fb689fed2b
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user