summaryrefslogtreecommitdiff
path: root/tests/test_xpath.cpp
diff options
context:
space:
mode:
authorarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-12-19 10:16:37 +0000
committerarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-12-19 10:16:37 +0000
commitd99745be21ad9affc7e127944556c74da07440c4 (patch)
treeb892303531af3f3775aeaa01799f2cb691a6d0f4 /tests/test_xpath.cpp
parent5720761685a1abc8ae0b5840a62359d35838ac3b (diff)
Enabled many additional GCC warnings (most notably -Wshadow and -Wold-style-cast), fixed the code accordingly
git-svn-id: http://pugixml.googlecode.com/svn/trunk@800 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'tests/test_xpath.cpp')
-rw-r--r--tests/test_xpath.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/test_xpath.cpp b/tests/test_xpath.cpp
index 30ff8a1..0416841 100644
--- a/tests/test_xpath.cpp
+++ b/tests/test_xpath.cpp
@@ -2,13 +2,13 @@
#include "common.hpp"
-#include <float.h>
#include <string.h>
#include <wchar.h>
#include <string>
#include <vector>
#include <algorithm>
+#include <limits>
static void load_document_copy(xml_document& doc, const char_t* text)
{
@@ -162,10 +162,10 @@ TEST(xpath_long_numbers_parse)
xml_node c;
// check parsing
- CHECK_XPATH_NUMBER(c, str_flt_max, FLT_MAX);
- CHECK_XPATH_NUMBER(c, str_flt_max_dec, FLT_MAX);
- CHECK_XPATH_NUMBER(c, str_dbl_max, DBL_MAX);
- CHECK_XPATH_NUMBER(c, str_dbl_max_dec, DBL_MAX);
+ CHECK_XPATH_NUMBER(c, str_flt_max, std::numeric_limits<float>::max());
+ CHECK_XPATH_NUMBER(c, str_flt_max_dec, std::numeric_limits<float>::max());
+ CHECK_XPATH_NUMBER(c, str_dbl_max, std::numeric_limits<double>::max());
+ CHECK_XPATH_NUMBER(c, str_dbl_max_dec, std::numeric_limits<double>::max());
}
static bool test_xpath_string_prefix(const pugi::xml_node& node, const pugi::char_t* query, const pugi::char_t* expected, size_t match_length)