diff options
-rw-r--r-- | tests/test_xpath.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/test_xpath.cpp b/tests/test_xpath.cpp index 635593e..1a2c477 100644 --- a/tests/test_xpath.cpp +++ b/tests/test_xpath.cpp @@ -251,7 +251,13 @@ TEST(xpath_denorm_numbers) query += STR("0.001"); } - CHECK_XPATH_STRING(xml_node(), query.c_str(), STR("0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009999987484955998")); + // check if current fpu setup supports denormals + double denorm = xpath_query(query.c_str()).evaluate_number(xml_node()); + + if (denorm != 0.0) + { + CHECK_XPATH_STRING(xml_node(), query.c_str(), STR("0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009999987484955998")); + } } TEST_XML(xpath_rexml_1, "<a><b><c id='a'/></b><c id='b'/></a>") |