mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +03:00
- xpath.c result/XPath/expr/floats : clarified and cleanup
printing of abnormal floats in tests. Daniel
This commit is contained in:
15
xpath.c
15
xpath.c
@ -597,7 +597,20 @@ xmlXPathDebugDumpObject(FILE *output, xmlXPathObjectPtr cur, int depth) {
|
||||
else fprintf(output, "false\n");
|
||||
break;
|
||||
case XPATH_NUMBER:
|
||||
fprintf(output, "Object is a number : %0g\n", cur->floatval);
|
||||
switch (isinf(cur->floatval)) {
|
||||
case 1:
|
||||
fprintf(output, "Object is a number : +Infinity\n");
|
||||
break;
|
||||
case -1:
|
||||
fprintf(output, "Object is a number : -Infinity\n");
|
||||
break;
|
||||
default:
|
||||
if (isnan(cur->floatval)) {
|
||||
fprintf(output, "Object is a number : NaN\n");
|
||||
} else {
|
||||
fprintf(output, "Object is a number : %0g\n", cur->floatval);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case XPATH_STRING:
|
||||
fprintf(output, "Object is a string : ");
|
||||
|
Reference in New Issue
Block a user