diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2001-05-03 10:49:20 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2001-05-03 10:49:20 +0000 |
commit | 357c960e4035ee2fb40d0072bb7bde4533be76f8 (patch) | |
tree | 8e1879ec1611151ba8219f9a09b3a1200e54d940 | |
parent | a2bc368bc9bbca85ad63dca60984ae79ddc4f8c8 (diff) | |
download | libxml2-357c960e4035ee2fb40d0072bb7bde4533be76f8.tar.gz |
- xpath.c result/XPath/expr/floats : clarified and cleanup
printing of abnormal floats in tests.
Daniel
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Makefile.am | 17 | ||||
-rw-r--r-- | configure.in | 3 | ||||
-rw-r--r-- | result/XPath/expr/floats | 6 | ||||
-rw-r--r-- | xpath.c | 15 |
5 files changed, 32 insertions, 14 deletions
@@ -1,3 +1,8 @@ +Thu May 3 12:47:46 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr> + + * xpath.c result/XPath/expr/floats : clarified and cleanup + printing of abnormal floats in tests. + Thu May 3 10:25:19 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr> * HTMLparser.c: trying to fix the problem reported by Jonas Borgström diff --git a/Makefile.am b/Makefile.am index 84858bd2..c0823f25 100644 --- a/Makefile.am +++ b/Makefile.am @@ -83,7 +83,7 @@ testall : tests SVGtests SAXtests tests: XMLtests XMLenttests HTMLtests Validtests URItests XPathtests XPtrtests XIncludetests HTMLtests : testHTML - @(rm -f .memdump ; touch .memdump) + @(echo > .memdump) @echo "##" @echo "## HTML regression tests" @echo "##" @@ -159,7 +159,7 @@ HTMLtests : testHTML XMLtests : xmllint - @(rm -f .memdump ; touch .memdump) + @(echo > .memdump) @echo "##" @echo "## XML regression tests" @echo "##" @@ -201,7 +201,7 @@ XMLtests : xmllint fi ; fi ; done) XMLenttests : xmllint - @(rm -f .memdump ; touch .memdump) + @(echo > .memdump) @echo "##" @echo "## XML entity subst regression tests" @echo "##" @@ -221,7 +221,7 @@ XMLenttests : xmllint fi ; fi ; done) URItests : testURI - @(rm -f .memdump ; touch .memdump) + @(echo > .memdump) @echo "##" @echo "## URI module regression tests" @echo "##" @@ -253,7 +253,7 @@ URItests : testURI fi ; fi ; done) XPathtests : testXPath - @(rm -f .memdump ; touch .memdump) + @(echo > .memdump) @echo "##" @echo "## XPath regression tests" @echo "##" @@ -291,7 +291,7 @@ XPathtests : testXPath fi ; fi ; done ; fi ; done) XPtrtests : testXPath - @(rm -f .memdump ; touch .memdump) + @(echo > .memdump) @echo "##" @echo "## XPointer regression tests" @echo "##" @@ -314,7 +314,7 @@ XPtrtests : testXPath fi ; fi ; done ; fi ; done) XIncludetests : xmllint - @(rm -f .memdump ; touch .memdump) + @(echo > .memdump) @echo "##" @echo "## XInclude regression tests" @echo "##" @@ -352,6 +352,7 @@ SVGtests : xmllint fi ; fi ; done) SAXtests : testSAX + @(echo > .memdump) @echo "##" @echo "## SAX callbacks regression tests" @echo "##" @@ -370,7 +371,7 @@ SAXtests : testSAX Validtests : xmllint - @(rm -f .memdump ; touch .memdump) + @(echo > .memdump) @echo "##" @echo "## Valid documents regression tests" @echo "##" diff --git a/configure.in b/configure.in index bc90bbc3..64775d2c 100644 --- a/configure.in +++ b/configure.in @@ -155,6 +155,7 @@ dnl dnl Extra flags dnl XML_CFLAGS="" +RDL_LIBS="" dnl dnl Workaround for native compilers @@ -230,8 +231,6 @@ else fi LDFLAGS=${_ldflags} -AC_SUBST(RDL_LIBS) - dnl dnl specific tests to setup DV's devel environment with debug etc ... dnl diff --git a/result/XPath/expr/floats b/result/XPath/expr/floats index 7d1e750b..c121b8e9 100644 --- a/result/XPath/expr/floats +++ b/result/XPath/expr/floats @@ -25,15 +25,15 @@ Object is a number : 0.00123 ======================== Expression: 1 div 0 -Object is a number : inf +Object is a number : +Infinity ======================== Expression: -1 div 0 -Object is a number : -inf +Object is a number : -Infinity ======================== Expression: 0 div 0 -Object is a number : nan +Object is a number : NaN ======================== Expression: (1 div 0) > 0 @@ -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 : "); |