summaryrefslogtreecommitdiff
path: root/tests/test_dom_modify.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_dom_modify.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_dom_modify.cpp')
-rw-r--r--tests/test_dom_modify.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_dom_modify.cpp b/tests/test_dom_modify.cpp
index 70a01cc..a63435c 100644
--- a/tests/test_dom_modify.cpp
+++ b/tests/test_dom_modify.cpp
@@ -1,6 +1,6 @@
#include "common.hpp"
-#include <float.h>
+#include <limits>
TEST_XML(dom_attr_assign, "<node/>")
{
@@ -707,8 +707,8 @@ TEST_XML(dom_attr_assign_large_number, "<node attr1='' attr2='' />")
{
xml_node node = doc.child(STR("node"));
- node.attribute(STR("attr1")) = FLT_MAX;
- node.attribute(STR("attr2")) = DBL_MAX;
+ node.attribute(STR("attr1")) = std::numeric_limits<float>::max();
+ node.attribute(STR("attr2")) = std::numeric_limits<double>::max();
CHECK(test_node(node, STR("<node attr1=\"3.40282e+038\" attr2=\"1.79769e+308\" />"), STR(""), pugi::format_raw) ||
test_node(node, STR("<node attr1=\"3.40282e+38\" attr2=\"1.79769e+308\" />"), STR(""), pugi::format_raw));