mirror of
https://github.com/zeux/pugixml.git
synced 2024-12-27 13:33:17 +08:00
tests: Fix XPath denorm tests on Intel compiler
Intel compiler by default sets flush-to-zero flags which causes our denorm test to produce 0.0. So make sure that denorms work on FPU before testing the string output. Fixes #218.
This commit is contained in:
parent
cb4a74d5e5
commit
1a96777b11
@ -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>")
|
||||
|
Loading…
x
Reference in New Issue
Block a user