summaryrefslogtreecommitdiff
path: root/tests/test_dom_modify.cpp
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2015-01-16 20:54:58 -0800
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2015-01-16 20:54:58 -0800
commit550ab4b6356ba203acb6aaebcd3d41acb9e1fa4a (patch)
treeff9bdb4553d7c7c23ecf3e6822d5bd92fdae15fc /tests/test_dom_modify.cpp
parentf3e42969a5118247de548c059e9bed69cdf208bb (diff)
parentcf72c20ca173bbad227e8f70bd68a2dbfb5b2890 (diff)
Merge pull request #27 from sdoiel61/master
Make float/double round-trip This change also adds xml_text::set and xml_attribute::set_value overloads for float so that float is only printed using just enough digits to represent float, instead of enough digits to represent double.
Diffstat (limited to 'tests/test_dom_modify.cpp')
-rw-r--r--tests/test_dom_modify.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_dom_modify.cpp b/tests/test_dom_modify.cpp
index 7863718..85c381e 100644
--- a/tests/test_dom_modify.cpp
+++ b/tests/test_dom_modify.cpp
@@ -753,8 +753,8 @@ TEST_XML(dom_attr_assign_large_number, "<node attr1='' attr2='' />")
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));
+ CHECK(test_node(node, STR("<node attr1=\"3.40282347e+038\" attr2=\"1.7976931348623157ee+308\" />"), STR(""), pugi::format_raw) ||
+ test_node(node, STR("<node attr1=\"3.40282347e+38\" attr2=\"1.7976931348623157e+308\" />"), STR(""), pugi::format_raw));
}
TEST(dom_node_declaration_name)