From e2358e5e3b617801492c54caa192216e12b91a24 Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Wed, 20 May 2015 08:05:43 -0700 Subject: tests: Split fp roundtrip test into float and double --- tests/test_dom_modify.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/test_dom_modify.cpp b/tests/test_dom_modify.cpp index 365561f..c4ee024 100644 --- a/tests/test_dom_modify.cpp +++ b/tests/test_dom_modify.cpp @@ -1603,7 +1603,7 @@ template bool fp_equal(T lhs, T rhs) #endif } -TEST(dom_fp_roundtrip_min_max) +TEST(dom_fp_roundtrip_min_max_float) { xml_document doc; xml_node node = doc.append_child(STR("node")); @@ -1614,6 +1614,13 @@ TEST(dom_fp_roundtrip_min_max) attr.set_value(std::numeric_limits::max()); CHECK(fp_equal(attr.as_float(), std::numeric_limits::max())); +} + +TEST(dom_fp_roundtrip_min_max_double) +{ + xml_document doc; + xml_node node = doc.append_child(STR("node")); + xml_attribute attr = node.append_attribute(STR("attr")); attr.set_value(std::numeric_limits::min()); CHECK(fp_equal(attr.as_double(), std::numeric_limits::min())); -- cgit v1.2.3