summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2015-05-20 08:05:43 -0700
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2015-05-20 08:05:43 -0700
commite2358e5e3b617801492c54caa192216e12b91a24 (patch)
treeefd117863e10179e112a981d9b80987d63d7dd0f
parentf828eae3eaca02c9659d63cbcab65c9dd8e13869 (diff)
tests: Split fp roundtrip test into float and double
-rw-r--r--tests/test_dom_modify.cpp9
1 files changed, 8 insertions, 1 deletions
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 <typename T> 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<float>::max());
CHECK(fp_equal(attr.as_float(), std::numeric_limits<float>::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<double>::min());
CHECK(fp_equal(attr.as_double(), std::numeric_limits<double>::min()));