From fb689fed2ba7034d91227bd4663870469bd2f612 Mon Sep 17 00:00:00 2001 From: "arseny.kapoulkine" Date: Tue, 27 Oct 2009 20:16:08 +0000 Subject: tests: More decimal digits are tested git-svn-id: http://pugixml.googlecode.com/svn/trunk@177 99668b35-9821-0410-8761-19e4c4f06640 --- tests/test.hpp | 2 +- tests/test_xpath_parse.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'tests') 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) -- cgit v1.2.3