2 * testapi.c: libxml2 API tester program.
4 * Automatically generated by gentest.py from libxml2-api.xml
6 * See Copyright for the status of this software.
14 #include <stdlib.h> /* for putenv() */
16 #include <libxml/xmlerror.h>
17 #include <libxml/relaxng.h>
20 static int testlibxml2(void);
21 static int test_module(const char *module);
23 static int generic_errors = 0;
24 static int call_tests = 0;
25 static int function_tests = 0;
27 static xmlChar chartab[1024];
28 static int inttab[1024];
29 static unsigned long longtab[1024];
31 static xmlDocPtr api_doc = NULL;
32 static xmlDtdPtr api_dtd = NULL;
33 static xmlNodePtr api_root = NULL;
34 static xmlAttrPtr api_attr = NULL;
35 static xmlNsPtr api_ns = NULL;
38 structured_errors(void *userData ATTRIBUTE_UNUSED,
39 xmlErrorPtr error ATTRIBUTE_UNUSED) {
55 if (api_doc == NULL) {
56 api_doc = xmlReadMemory("<!DOCTYPE root [<!ELEMENT root EMPTY>]><root xmlns:h='http://example.com/' h:foo='bar'/>", 88, "root_test", NULL, 0);
65 if ((api_dtd == NULL) || (api_dtd->type != XML_DTD_NODE)) {
67 if ((api_doc != NULL) && (api_doc->children != NULL) &&
68 (api_doc->children->type == XML_DTD_NODE))
69 api_dtd = (xmlDtdPtr) api_doc->children;
76 if ((api_root == NULL) || (api_root->type != XML_ELEMENT_NODE)) {
78 if ((api_doc != NULL) && (api_doc->children != NULL) &&
79 (api_doc->children->next != NULL) &&
80 (api_doc->children->next->type == XML_ELEMENT_NODE))
81 api_root = api_doc->children->next;
90 api_ns = api_root->nsDef;
96 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)
101 if ((api_root == NULL) || (api_root->type != XML_ELEMENT_NODE)) {
104 if (api_root == NULL)
106 if (api_root->properties != NULL) {
107 api_attr = api_root->properties;
108 return(api_root->properties);
111 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)
112 snprintf((char *) name, 20, "foo%d", nr++);
113 api_attr = xmlSetProp(api_root, name, (const xmlChar *) "bar");
118 static int quiet = 0;
120 int main(int argc, char **argv) {
125 /* access to the proxy can slow up regression tests a lot */
126 putenv((char *) "http_proxy=");
129 memset(chartab, 0, sizeof(chartab));
130 strncpy((char *) chartab, " chartab\n", 20);
131 memset(inttab, 0, sizeof(inttab));
132 memset(longtab, 0, sizeof(longtab));
135 #ifdef LIBXML_SCHEMAS_ENABLED
136 xmlRelaxNGInitTypes();
141 xmlSetStructuredErrorFunc(NULL, structured_errors);
144 if (!strcmp(argv[1], "-q")) {
147 ret = test_module(argv[2]);
151 ret = test_module(argv[1]);
157 blocks = xmlMemBlocks();
159 if ((blocks != 0) || (mem != 0)) {
160 printf("testapi leaked %d bytes in %d blocks\n", mem, blocks);
167 #include <libxml/HTMLparser.h>
168 #include <libxml/HTMLtree.h>
169 #include <libxml/catalog.h>
170 #include <libxml/chvalid.h>
171 #include <libxml/dict.h>
172 #include <libxml/encoding.h>
173 #include <libxml/entities.h>
174 #include <libxml/hash.h>
175 #include <libxml/list.h>
176 #include <libxml/nanoftp.h>
177 #include <libxml/nanohttp.h>
178 #include <libxml/parser.h>
179 #include <libxml/parserInternals.h>
180 #include <libxml/pattern.h>
181 #include <libxml/relaxng.h>
182 #include <libxml/schemasInternals.h>
183 #include <libxml/schematron.h>
184 #include <libxml/tree.h>
185 #include <libxml/uri.h>
186 #include <libxml/valid.h>
187 #include <libxml/xinclude.h>
188 #include <libxml/xmlIO.h>
189 #include <libxml/xmlerror.h>
190 #include <libxml/xmlreader.h>
191 #include <libxml/xmlsave.h>
192 #include <libxml/xmlschemas.h>
193 #include <libxml/xmlschemastypes.h>
194 #include <libxml/xmlstring.h>
195 #include <libxml/xmlwriter.h>
196 #include <libxml/xpath.h>
197 #include <libxml/xpointer.h>
198 #include <libxml/debugXML.h>
201 We manually define xmlErrMemory because it's normal declaration
202 is "hidden" by #ifdef IN_LIBXML
204 void xmlErrMemory(xmlParserCtxtPtr ctxt, const char *extra);
207 We need some "remote" addresses, but want to avoid getting into
208 name resolution delays, so we use these
210 #define REMOTE1GOOD "http://localhost/"
211 #define REMOTE1BAD "http:http://http"
212 #define REMOTE2GOOD "ftp://localhost/foo"
214 #define gen_nb_void_ptr 2
216 static void *gen_void_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
219 static void des_void_ptr(int no ATTRIBUTE_UNUSED, void *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
223 #define gen_nb_const_void_ptr 2
225 static const void *gen_const_void_ptr(int no, int nr ATTRIBUTE_UNUSED) {
226 if (no == 0) return((const void *) "immutable string");
229 static void des_const_void_ptr(int no ATTRIBUTE_UNUSED, const void *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
233 #define gen_nb_userdata 3
235 static void *gen_userdata(int no, int nr ATTRIBUTE_UNUSED) {
236 if (no == 0) return((void *) &call_tests);
237 if (no == 1) return((void *) -1);
240 static void des_userdata(int no ATTRIBUTE_UNUSED, void *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
246 static int gen_int(int no, int nr ATTRIBUTE_UNUSED) {
247 if (no == 0) return(0);
248 if (no == 1) return(1);
249 if (no == 2) return(-1);
250 if (no == 3) return(122);
254 static void des_int(int no ATTRIBUTE_UNUSED, int val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
257 #define gen_nb_parseroptions 5
259 static int gen_parseroptions(int no, int nr ATTRIBUTE_UNUSED) {
260 if (no == 0) return(XML_PARSE_NOBLANKS | XML_PARSE_RECOVER);
261 if (no == 1) return(XML_PARSE_NOENT | XML_PARSE_DTDLOAD | XML_PARSE_DTDATTR | XML_PARSE_DTDVALID | XML_PARSE_NOCDATA);
262 if (no == 2) return(XML_PARSE_XINCLUDE | XML_PARSE_NOXINCNODE | XML_PARSE_NSCLEAN);
263 if (no == 3) return(XML_PARSE_XINCLUDE | XML_PARSE_NODICT);
264 return(XML_PARSE_SAX1);
267 static void des_parseroptions(int no ATTRIBUTE_UNUSED, int val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
271 #define gen_nb_long 5
273 static long gen_long(int no, int nr ATTRIBUTE_UNUSED) {
274 if (no == 0) return(0);
275 if (no == 1) return(1);
276 if (no == 2) return(-1);
277 if (no == 3) return(122);
281 static void des_long(int no ATTRIBUTE_UNUSED, long val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
285 #define gen_nb_xmlChar 4
287 static xmlChar gen_xmlChar(int no, int nr ATTRIBUTE_UNUSED) {
288 if (no == 0) return('a');
289 if (no == 1) return(' ');
290 if (no == 2) return((xmlChar) '\xf8');
294 static void des_xmlChar(int no ATTRIBUTE_UNUSED, xmlChar val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
297 #define gen_nb_unsigned_int 3
299 static unsigned int gen_unsigned_int(int no, int nr ATTRIBUTE_UNUSED) {
300 if (no == 0) return(0);
301 if (no == 1) return(1);
302 if (no == 2) return(122);
303 return((unsigned int) -1);
306 static void des_unsigned_int(int no ATTRIBUTE_UNUSED, unsigned int val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
309 #define gen_nb_unsigned_long 4
311 static unsigned long gen_unsigned_long(int no, int nr ATTRIBUTE_UNUSED) {
312 if (no == 0) return(0);
313 if (no == 1) return(1);
314 if (no == 2) return(122);
315 return((unsigned long) -1);
318 static void des_unsigned_long(int no ATTRIBUTE_UNUSED, unsigned long val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
321 #define gen_nb_double 4
323 static double gen_double(int no, int nr ATTRIBUTE_UNUSED) {
324 if (no == 0) return(0);
325 if (no == 1) return(-1.1);
326 #if defined(LIBXML_XPATH_ENABLED)
327 if (no == 2) return(xmlXPathNAN);
332 static void des_double(int no ATTRIBUTE_UNUSED, double val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
335 #define gen_nb_unsigned_long_ptr 2
337 static unsigned long *gen_unsigned_long_ptr(int no, int nr) {
338 if (no == 0) return(&longtab[nr]);
342 static void des_unsigned_long_ptr(int no ATTRIBUTE_UNUSED, unsigned long *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
345 #define gen_nb_int_ptr 2
347 static int *gen_int_ptr(int no, int nr) {
348 if (no == 0) return(&inttab[nr]);
352 static void des_int_ptr(int no ATTRIBUTE_UNUSED, int *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
355 #define gen_nb_const_char_ptr 4
357 static char *gen_const_char_ptr(int no, int nr ATTRIBUTE_UNUSED) {
358 if (no == 0) return((char *) "foo");
359 if (no == 1) return((char *) "<foo/>");
360 if (no == 2) return((char *) "test/ent2");
363 static void des_const_char_ptr(int no ATTRIBUTE_UNUSED, const char *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
366 #define gen_nb_xmlChar_ptr 2
368 static xmlChar *gen_xmlChar_ptr(int no, int nr ATTRIBUTE_UNUSED) {
369 if (no == 0) return(&chartab[0]);
372 static void des_xmlChar_ptr(int no ATTRIBUTE_UNUSED, xmlChar *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
375 #define gen_nb_FILE_ptr 2
377 static FILE *gen_FILE_ptr(int no, int nr ATTRIBUTE_UNUSED) {
378 if (no == 0) return(fopen("test.out", "a+"));
381 static void des_FILE_ptr(int no ATTRIBUTE_UNUSED, FILE *val, int nr ATTRIBUTE_UNUSED) {
382 if (val != NULL) fclose(val);
385 #define gen_nb_debug_FILE_ptr 2
386 static FILE *gen_debug_FILE_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
387 return(fopen("test.out", "a+"));
389 static void des_debug_FILE_ptr(int no ATTRIBUTE_UNUSED, FILE *val, int nr ATTRIBUTE_UNUSED) {
390 if (val != NULL) fclose(val);
393 #define gen_nb_const_xmlChar_ptr 5
395 static xmlChar *gen_const_xmlChar_ptr(int no, int nr ATTRIBUTE_UNUSED) {
396 if (no == 0) return((xmlChar *) "foo");
397 if (no == 1) return((xmlChar *) "<foo/>");
398 if (no == 2) return((xmlChar *) "n" "\xf8" "ne");
399 if (no == 3) return((xmlChar *) " 2ab ");
402 static void des_const_xmlChar_ptr(int no ATTRIBUTE_UNUSED, const xmlChar *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
405 #define gen_nb_filepath 8
407 static const char *gen_filepath(int no, int nr ATTRIBUTE_UNUSED) {
408 if (no == 0) return("missing.xml");
409 if (no == 1) return("<foo/>");
410 if (no == 2) return("test/ent2");
411 if (no == 3) return("test/valid/REC-xml-19980210.xml");
412 if (no == 4) return("test/valid/dtds/xhtml1-strict.dtd");
413 if (no == 5) return(REMOTE1GOOD);
414 if (no == 6) return(REMOTE1BAD);
417 static void des_filepath(int no ATTRIBUTE_UNUSED, const char *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
420 #define gen_nb_eaten_name 2
422 static xmlChar *gen_eaten_name(int no, int nr ATTRIBUTE_UNUSED) {
423 if (no == 0) return(xmlStrdup(BAD_CAST "eaten"));
426 static void des_eaten_name(int no ATTRIBUTE_UNUSED, xmlChar *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
429 #define gen_nb_fileoutput 6
431 static const char *gen_fileoutput(int no, int nr ATTRIBUTE_UNUSED) {
432 if (no == 0) return("/missing.xml");
433 if (no == 1) return("<foo/>");
434 if (no == 2) return(REMOTE2GOOD);
435 if (no == 3) return(REMOTE1GOOD);
436 if (no == 4) return(REMOTE1BAD);
439 static void des_fileoutput(int no ATTRIBUTE_UNUSED, const char *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
442 #define gen_nb_xmlParserCtxtPtr 3
443 static xmlParserCtxtPtr gen_xmlParserCtxtPtr(int no, int nr ATTRIBUTE_UNUSED) {
444 if (no == 0) return(xmlNewParserCtxt());
445 if (no == 1) return(xmlCreateMemoryParserCtxt("<doc/>", 6));
448 static void des_xmlParserCtxtPtr(int no ATTRIBUTE_UNUSED, xmlParserCtxtPtr val, int nr ATTRIBUTE_UNUSED) {
450 xmlFreeParserCtxt(val);
453 #define gen_nb_xmlSAXHandlerPtr 2
454 static xmlSAXHandlerPtr gen_xmlSAXHandlerPtr(int no, int nr ATTRIBUTE_UNUSED) {
455 #ifdef LIBXML_SAX1_ENABLED
456 if (no == 0) return((xmlSAXHandlerPtr) &xmlDefaultSAXHandler);
460 static void des_xmlSAXHandlerPtr(int no ATTRIBUTE_UNUSED, xmlSAXHandlerPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
463 #define gen_nb_xmlValidCtxtPtr 2
464 static xmlValidCtxtPtr gen_xmlValidCtxtPtr(int no, int nr ATTRIBUTE_UNUSED) {
465 #ifdef LIBXML_VALID_ENABLED
466 if (no == 0) return(xmlNewValidCtxt());
470 static void des_xmlValidCtxtPtr(int no ATTRIBUTE_UNUSED, xmlValidCtxtPtr val, int nr ATTRIBUTE_UNUSED) {
471 #ifdef LIBXML_VALID_ENABLED
473 xmlFreeValidCtxt(val);
477 #define gen_nb_xmlParserInputBufferPtr 8
479 static xmlParserInputBufferPtr gen_xmlParserInputBufferPtr(int no, int nr ATTRIBUTE_UNUSED) {
480 if (no == 0) return(xmlParserInputBufferCreateFilename("missing.xml", XML_CHAR_ENCODING_NONE));
481 if (no == 1) return(xmlParserInputBufferCreateFilename("<foo/>", XML_CHAR_ENCODING_NONE));
482 if (no == 2) return(xmlParserInputBufferCreateFilename("test/ent2", XML_CHAR_ENCODING_NONE));
483 if (no == 3) return(xmlParserInputBufferCreateFilename("test/valid/REC-xml-19980210.xml", XML_CHAR_ENCODING_NONE));
484 if (no == 4) return(xmlParserInputBufferCreateFilename("test/valid/dtds/xhtml1-strict.dtd", XML_CHAR_ENCODING_NONE));
485 if (no == 5) return(xmlParserInputBufferCreateFilename(REMOTE1GOOD, XML_CHAR_ENCODING_NONE));
486 if (no == 6) return(xmlParserInputBufferCreateFilename(REMOTE1BAD, XML_CHAR_ENCODING_NONE));
489 static void des_xmlParserInputBufferPtr(int no ATTRIBUTE_UNUSED, xmlParserInputBufferPtr val, int nr ATTRIBUTE_UNUSED) {
490 xmlFreeParserInputBuffer(val);
493 #define gen_nb_xmlDocPtr 4
494 static xmlDocPtr gen_xmlDocPtr(int no, int nr ATTRIBUTE_UNUSED) {
495 if (no == 0) return(xmlNewDoc(BAD_CAST "1.0"));
496 if (no == 1) return(xmlReadMemory("<foo/>", 6, "test", NULL, 0));
497 if (no == 2) return(xmlReadMemory("<!DOCTYPE foo []> <foo/>", 24, "test", NULL, 0));
500 static void des_xmlDocPtr(int no ATTRIBUTE_UNUSED, xmlDocPtr val, int nr ATTRIBUTE_UNUSED) {
501 if ((val != NULL) && (val != api_doc) && (val->doc != api_doc))
505 #define gen_nb_xmlAttrPtr 2
506 static xmlAttrPtr gen_xmlAttrPtr(int no, int nr ATTRIBUTE_UNUSED) {
507 if (no == 0) return(get_api_attr());
510 static void des_xmlAttrPtr(int no, xmlAttrPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
511 if (no == 0) free_api_doc();
514 #define gen_nb_xmlDictPtr 2
515 static xmlDictPtr gen_xmlDictPtr(int no, int nr ATTRIBUTE_UNUSED) {
516 if (no == 0) return(xmlDictCreate());
519 static void des_xmlDictPtr(int no ATTRIBUTE_UNUSED, xmlDictPtr val, int nr ATTRIBUTE_UNUSED) {
524 #define gen_nb_xmlNodePtr 3
525 static xmlNodePtr gen_xmlNodePtr(int no, int nr ATTRIBUTE_UNUSED) {
526 if (no == 0) return(xmlNewPI(BAD_CAST "test", NULL));
527 if (no == 1) return(get_api_root());
529 /* if (no == 2) return((xmlNodePtr) get_api_doc()); */
531 static void des_xmlNodePtr(int no, xmlNodePtr val, int nr ATTRIBUTE_UNUSED) {
534 } else if (val != NULL) {
540 #define gen_nb_xmlDtdPtr 3
541 static xmlDtdPtr gen_xmlDtdPtr(int no, int nr ATTRIBUTE_UNUSED) {
543 return(xmlNewDtd(NULL, BAD_CAST "dtd", BAD_CAST"foo", BAD_CAST"bar"));
544 if (no == 1) return(get_api_dtd());
547 static void des_xmlDtdPtr(int no, xmlDtdPtr val, int nr ATTRIBUTE_UNUSED) {
548 if (no == 1) free_api_doc();
549 else if (val != NULL) {
550 xmlUnlinkNode((xmlNodePtr) val);
551 xmlFreeNode((xmlNodePtr) val);
555 #define gen_nb_xmlNsPtr 2
556 static xmlNsPtr gen_xmlNsPtr(int no, int nr ATTRIBUTE_UNUSED) {
557 if (no == 0) return(get_api_ns());
560 static void des_xmlNsPtr(int no, xmlNsPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
561 if (no == 0) free_api_doc();
564 #define gen_nb_xmlNodePtr_in 3
565 static xmlNodePtr gen_xmlNodePtr_in(int no, int nr ATTRIBUTE_UNUSED) {
566 if (no == 0) return(xmlNewPI(BAD_CAST "test", NULL));
567 if (no == 0) return(xmlNewText(BAD_CAST "text"));
570 static void des_xmlNodePtr_in(int no ATTRIBUTE_UNUSED, xmlNodePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
573 #ifdef LIBXML_WRITER_ENABLED
574 #define gen_nb_xmlTextWriterPtr 2
575 static xmlTextWriterPtr gen_xmlTextWriterPtr(int no, int nr ATTRIBUTE_UNUSED) {
576 if (no == 0) return(xmlNewTextWriterFilename("test.out", 0));
579 static void des_xmlTextWriterPtr(int no ATTRIBUTE_UNUSED, xmlTextWriterPtr val, int nr ATTRIBUTE_UNUSED) {
580 if (val != NULL) xmlFreeTextWriter(val);
584 #ifdef LIBXML_READER_ENABLED
585 #define gen_nb_xmlTextReaderPtr 4
586 static xmlTextReaderPtr gen_xmlTextReaderPtr(int no, int nr ATTRIBUTE_UNUSED) {
587 if (no == 0) return(xmlNewTextReaderFilename("test/ent2"));
588 if (no == 1) return(xmlNewTextReaderFilename("test/valid/REC-xml-19980210.xml"));
589 if (no == 2) return(xmlNewTextReaderFilename("test/valid/dtds/xhtml1-strict.dtd"));
592 static void des_xmlTextReaderPtr(int no ATTRIBUTE_UNUSED, xmlTextReaderPtr val, int nr ATTRIBUTE_UNUSED) {
593 if (val != NULL) xmlFreeTextReader(val);
597 #define gen_nb_xmlBufferPtr 3
598 static const xmlChar *static_buf_content = (xmlChar *)"a static buffer";
599 static xmlBufferPtr gen_xmlBufferPtr(int no, int nr ATTRIBUTE_UNUSED) {
600 if (no == 0) return(xmlBufferCreate());
601 if (no == 1) return(xmlBufferCreateStatic((void *)static_buf_content, 13));
604 static void des_xmlBufferPtr(int no ATTRIBUTE_UNUSED, xmlBufferPtr val, int nr ATTRIBUTE_UNUSED) {
610 #define gen_nb_xmlListPtr 2
611 static xmlListPtr gen_xmlListPtr(int no, int nr ATTRIBUTE_UNUSED) {
612 if (no == 0) return(xmlListCreate(NULL, NULL));
615 static void des_xmlListPtr(int no ATTRIBUTE_UNUSED, xmlListPtr val, int nr ATTRIBUTE_UNUSED) {
621 #define gen_nb_xmlHashTablePtr 2
622 static xmlHashTablePtr gen_xmlHashTablePtr(int no, int nr ATTRIBUTE_UNUSED) {
623 if (no == 0) return(xmlHashCreate(10));
626 static void des_xmlHashTablePtr(int no ATTRIBUTE_UNUSED, xmlHashTablePtr val, int nr ATTRIBUTE_UNUSED) {
628 xmlHashFree(val, NULL);
632 #include <libxml/xpathInternals.h>
634 #ifdef LIBXML_XPATH_ENABLED
635 #define gen_nb_xmlXPathObjectPtr 5
636 static xmlXPathObjectPtr gen_xmlXPathObjectPtr(int no, int nr ATTRIBUTE_UNUSED) {
637 if (no == 0) return(xmlXPathNewString(BAD_CAST "string object"));
638 if (no == 1) return(xmlXPathNewFloat(1.1));
639 if (no == 2) return(xmlXPathNewBoolean(1));
640 if (no == 3) return(xmlXPathNewNodeSet(NULL));
643 static void des_xmlXPathObjectPtr(int no ATTRIBUTE_UNUSED, xmlXPathObjectPtr val, int nr ATTRIBUTE_UNUSED) {
645 xmlXPathFreeObject(val);
650 #ifdef LIBXML_OUTPUT_ENABLED
651 #define gen_nb_xmlOutputBufferPtr 2
652 static xmlOutputBufferPtr gen_xmlOutputBufferPtr(int no, int nr ATTRIBUTE_UNUSED) {
653 if (no == 0) return(xmlOutputBufferCreateFilename("test.out", NULL, 0));
656 static void des_xmlOutputBufferPtr(int no ATTRIBUTE_UNUSED, xmlOutputBufferPtr val, int nr ATTRIBUTE_UNUSED) {
658 xmlOutputBufferClose(val);
663 #ifdef LIBXML_FTP_ENABLED
664 #define gen_nb_xmlNanoFTPCtxtPtr 4
665 static void *gen_xmlNanoFTPCtxtPtr(int no, int nr ATTRIBUTE_UNUSED) {
666 if (no == 0) return(xmlNanoFTPNewCtxt(REMOTE2GOOD));
667 if (no == 1) return(xmlNanoFTPNewCtxt(REMOTE1GOOD));
668 if (no == 2) return(xmlNanoFTPNewCtxt("foo"));
671 static void des_xmlNanoFTPCtxtPtr(int no ATTRIBUTE_UNUSED, void *val, int nr ATTRIBUTE_UNUSED) {
673 xmlNanoFTPFreeCtxt(val);
678 #ifdef LIBXML_HTTP_ENABLED
679 #define gen_nb_xmlNanoHTTPCtxtPtr 1
680 static void *gen_xmlNanoHTTPCtxtPtr(int no, int nr ATTRIBUTE_UNUSED) {
681 if (no == 0) return(xmlNanoHTTPOpen(REMOTE1GOOD, NULL));
682 if (no == 1) return(xmlNanoHTTPOpen(REMOTE2GOOD, NULL));
683 if (no == 2) return(xmlNanoHTTPOpen(REMOTE1BAD, NULL));
686 static void des_xmlNanoHTTPCtxtPtr(int no ATTRIBUTE_UNUSED, void *val, int nr ATTRIBUTE_UNUSED) {
688 xmlNanoHTTPClose(val);
693 #define gen_nb_xmlCharEncoding 4
694 static xmlCharEncoding gen_xmlCharEncoding(int no, int nr ATTRIBUTE_UNUSED) {
695 if (no == 0) return(XML_CHAR_ENCODING_UTF8);
696 if (no == 1) return(XML_CHAR_ENCODING_NONE);
697 if (no == 2) return(XML_CHAR_ENCODING_8859_1);
698 return(XML_CHAR_ENCODING_ERROR);
700 static void des_xmlCharEncoding(int no ATTRIBUTE_UNUSED, xmlCharEncoding val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
703 #if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
705 #define gen_nb_xmlExpCtxtPtr 1
706 static xmlExpCtxtPtr gen_xmlExpCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
709 static void des_xmlExpCtxtPtr(int no ATTRIBUTE_UNUSED, xmlExpCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
712 #define gen_nb_xmlExpNodePtr 1
713 static xmlExpNodePtr gen_xmlExpNodePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
716 static void des_xmlExpNodePtr(int no ATTRIBUTE_UNUSED, xmlExpNodePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
721 #if defined(LIBXML_SCHEMAS_ENABLED)
722 #define gen_nb_xmlSchemaPtr 1
723 static xmlSchemaPtr gen_xmlSchemaPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
726 static void des_xmlSchemaPtr(int no ATTRIBUTE_UNUSED, xmlSchemaPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
729 #define gen_nb_xmlSchemaValidCtxtPtr 1
730 static xmlSchemaValidCtxtPtr gen_xmlSchemaValidCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
733 static void des_xmlSchemaValidCtxtPtr(int no ATTRIBUTE_UNUSED, xmlSchemaValidCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
736 #endif /* LIBXML_SCHEMAS_ENABLED */
738 #define gen_nb_xmlHashDeallocator 2
740 test_xmlHashDeallocator(void *payload ATTRIBUTE_UNUSED, xmlChar *name ATTRIBUTE_UNUSED) {
743 static xmlHashDeallocator gen_xmlHashDeallocator(int no, int nr ATTRIBUTE_UNUSED) {
744 if (no == 0) return(test_xmlHashDeallocator);
747 static void des_xmlHashDeallocator(int no ATTRIBUTE_UNUSED, xmlHashDeallocator val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
751 static void desret_int(int val ATTRIBUTE_UNUSED) {
753 static void desret_xmlChar(xmlChar val ATTRIBUTE_UNUSED) {
755 static void desret_long(long val ATTRIBUTE_UNUSED) {
757 static void desret_unsigned_long(unsigned long val ATTRIBUTE_UNUSED) {
759 static void desret_double(double val ATTRIBUTE_UNUSED) {
761 static void desret_xmlCharEncoding(xmlCharEncoding val ATTRIBUTE_UNUSED) {
764 static void desret_const_void_ptr(void *val ATTRIBUTE_UNUSED) {
767 static void desret_void_ptr(void *val ATTRIBUTE_UNUSED) {
769 static void desret_const_char_ptr(const char *val ATTRIBUTE_UNUSED) {
771 static void desret_const_xmlChar_ptr(const xmlChar *val ATTRIBUTE_UNUSED) {
773 static void desret_xmlChar_ptr(xmlChar *val) {
777 static void desret_xmlDocPtr(xmlDocPtr val) {
781 static void desret_xmlDictPtr(xmlDictPtr val) {
784 #ifdef LIBXML_OUTPUT_ENABLED
785 static void desret_xmlOutputBufferPtr(xmlOutputBufferPtr val) {
786 xmlOutputBufferClose(val);
789 #ifdef LIBXML_READER_ENABLED
790 static void desret_xmlTextReaderPtr(xmlTextReaderPtr val) {
791 xmlFreeTextReader(val);
794 static void desret_xmlNodePtr(xmlNodePtr val) {
795 if ((val != NULL) && (val != api_root) && (val != (xmlNodePtr) api_doc)) {
800 static void desret_xmlAttrPtr(xmlAttrPtr val) {
802 xmlUnlinkNode((xmlNodePtr) val);
803 xmlFreeNode((xmlNodePtr) val);
806 static void desret_xmlEntityPtr(xmlEntityPtr val) {
808 xmlUnlinkNode((xmlNodePtr) val);
809 xmlFreeNode((xmlNodePtr) val);
812 static void desret_xmlElementPtr(xmlElementPtr val) {
814 xmlUnlinkNode((xmlNodePtr) val);
817 static void desret_xmlAttributePtr(xmlAttributePtr val) {
819 xmlUnlinkNode((xmlNodePtr) val);
822 static void desret_xmlNsPtr(xmlNsPtr val ATTRIBUTE_UNUSED) {
824 static void desret_xmlDtdPtr(xmlDtdPtr val) {
825 desret_xmlNodePtr((xmlNodePtr)val);
827 #ifdef LIBXML_XPATH_ENABLED
828 static void desret_xmlXPathObjectPtr(xmlXPathObjectPtr val) {
829 xmlXPathFreeObject(val);
831 static void desret_xmlNodeSetPtr(xmlNodeSetPtr val) {
832 xmlXPathFreeNodeSet(val);
835 static void desret_xmlParserCtxtPtr(xmlParserCtxtPtr val) {
836 xmlFreeParserCtxt(val);
838 static void desret_xmlParserInputBufferPtr(xmlParserInputBufferPtr val) {
839 xmlFreeParserInputBuffer(val);
841 static void desret_xmlParserInputPtr(xmlParserInputPtr val) {
842 xmlFreeInputStream(val);
844 #ifdef LIBXML_WRITER_ENABLED
845 static void desret_xmlTextWriterPtr(xmlTextWriterPtr val) {
846 xmlFreeTextWriter(val);
849 static void desret_xmlBufferPtr(xmlBufferPtr val) {
852 #ifdef LIBXML_SCHEMAS_ENABLED
853 static void desret_xmlSchemaParserCtxtPtr(xmlSchemaParserCtxtPtr val) {
854 xmlSchemaFreeParserCtxt(val);
856 static void desret_xmlSchemaTypePtr(xmlSchemaTypePtr val ATTRIBUTE_UNUSED) {
858 static void desret_xmlRelaxNGParserCtxtPtr(xmlRelaxNGParserCtxtPtr val) {
859 xmlRelaxNGFreeParserCtxt(val);
862 #ifdef LIBXML_HTML_ENABLED
863 static void desret_const_htmlEntityDesc_ptr(const htmlEntityDesc * val ATTRIBUTE_UNUSED) {
866 #ifdef LIBXML_HTTP_ENABLED
867 static void desret_xmlNanoHTTPCtxtPtr(void *val) {
868 xmlNanoHTTPClose(val);
871 #ifdef LIBXML_FTP_ENABLED
872 static void desret_xmlNanoFTPCtxtPtr(void *val) {
873 xmlNanoFTPClose(val);
876 /* cut and pasted from autogenerated to avoid troubles */
877 #define gen_nb_const_xmlChar_ptr_ptr 1
878 static xmlChar ** gen_const_xmlChar_ptr_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
881 static void des_const_xmlChar_ptr_ptr(int no ATTRIBUTE_UNUSED, const xmlChar ** val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
884 #define gen_nb_unsigned_char_ptr 1
885 static unsigned char * gen_unsigned_char_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
888 static void des_unsigned_char_ptr(int no ATTRIBUTE_UNUSED, unsigned char * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
891 #define gen_nb_const_unsigned_char_ptr 1
892 static unsigned char * gen_const_unsigned_char_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
895 static void des_const_unsigned_char_ptr(int no ATTRIBUTE_UNUSED, const unsigned char * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
898 #ifdef LIBXML_HTML_ENABLED
899 #define gen_nb_const_htmlNodePtr 1
900 static htmlNodePtr gen_const_htmlNodePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
903 static void des_const_htmlNodePtr(int no ATTRIBUTE_UNUSED, const htmlNodePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
907 #ifdef LIBXML_HTML_ENABLED
908 #define gen_nb_htmlDocPtr 3
909 static htmlDocPtr gen_htmlDocPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
910 if (no == 0) return(htmlNewDoc(NULL, NULL));
911 if (no == 1) return(htmlReadMemory("<html/>", 7, "test", NULL, 0));
914 static void des_htmlDocPtr(int no ATTRIBUTE_UNUSED, htmlDocPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
915 if ((val != NULL) && (val != api_doc) && (val->doc != api_doc))
918 static void desret_htmlDocPtr(htmlDocPtr val) {
919 if ((val != NULL) && (val != api_doc) && (val->doc != api_doc))
922 #define gen_nb_htmlParserCtxtPtr 3
923 static htmlParserCtxtPtr gen_htmlParserCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
924 if (no == 0) return(xmlNewParserCtxt());
925 if (no == 1) return(htmlCreateMemoryParserCtxt("<html/>", 7));
928 static void des_htmlParserCtxtPtr(int no ATTRIBUTE_UNUSED, htmlParserCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
930 htmlFreeParserCtxt(val);
932 static void desret_htmlParserCtxtPtr(htmlParserCtxtPtr val) {
934 htmlFreeParserCtxt(val);
938 #ifdef LIBXML_XPATH_ENABLED
939 #define gen_nb_xmlNodeSetPtr 1
940 static xmlNodeSetPtr gen_xmlNodeSetPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
943 static void des_xmlNodeSetPtr(int no ATTRIBUTE_UNUSED, xmlNodeSetPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
947 #ifdef LIBXML_DEBUG_ENABLED
948 #ifdef LIBXML_XPATH_ENABLED
949 #define gen_nb_xmlShellCtxtPtr 1
950 static xmlShellCtxtPtr gen_xmlShellCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
953 static void des_xmlShellCtxtPtr(int no ATTRIBUTE_UNUSED, xmlShellCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
958 #ifdef LIBXML_PATTERN_ENABLED
959 #define gen_nb_xmlPatternPtr 1
960 static xmlPatternPtr gen_xmlPatternPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
963 static void des_xmlPatternPtr(int no ATTRIBUTE_UNUSED, xmlPatternPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
967 #define gen_nb_xmlElementContentPtr 1
968 static xmlElementContentPtr gen_xmlElementContentPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
971 static void des_xmlElementContentPtr(int no ATTRIBUTE_UNUSED, xmlElementContentPtr val, int nr ATTRIBUTE_UNUSED) {
973 xmlFreeElementContent(val);
975 static void desret_xmlElementContentPtr(xmlElementContentPtr val) {
977 xmlFreeElementContent(val);
980 #define gen_nb_xmlParserNodeInfoSeqPtr 1
981 static xmlParserNodeInfoSeqPtr gen_xmlParserNodeInfoSeqPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
984 static void des_xmlParserNodeInfoSeqPtr(int no ATTRIBUTE_UNUSED, xmlParserNodeInfoSeqPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
987 static void desret_const_xmlParserNodeInfo_ptr(const xmlParserNodeInfo *val ATTRIBUTE_UNUSED) {
990 #define gen_nb_void_ptr_ptr 1
991 static void ** gen_void_ptr_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
994 static void des_void_ptr_ptr(int no ATTRIBUTE_UNUSED, void ** val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
997 /************************************************************************
999 * WARNING: end of the manually maintained part of the test code *
1000 * do not remove or alter the CUT HERE line *
1002 ************************************************************************/
1004 /* CUT HERE: everything below that line is generated */
1005 #ifdef LIBXML_HTML_ENABLED
1006 static void desret_htmlStatus(htmlStatus val ATTRIBUTE_UNUSED) {
1011 #define gen_nb_xmlAttributeDefault 4
1012 static xmlAttributeDefault gen_xmlAttributeDefault(int no, int nr ATTRIBUTE_UNUSED) {
1013 if (no == 1) return(XML_ATTRIBUTE_FIXED);
1014 if (no == 2) return(XML_ATTRIBUTE_IMPLIED);
1015 if (no == 3) return(XML_ATTRIBUTE_NONE);
1016 if (no == 4) return(XML_ATTRIBUTE_REQUIRED);
1020 static void des_xmlAttributeDefault(int no ATTRIBUTE_UNUSED, xmlAttributeDefault val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
1023 #define gen_nb_xmlAttributeType 4
1024 static xmlAttributeType gen_xmlAttributeType(int no, int nr ATTRIBUTE_UNUSED) {
1025 if (no == 1) return(XML_ATTRIBUTE_CDATA);
1026 if (no == 2) return(XML_ATTRIBUTE_ENTITIES);
1027 if (no == 3) return(XML_ATTRIBUTE_ENTITY);
1028 if (no == 4) return(XML_ATTRIBUTE_ENUMERATION);
1032 static void des_xmlAttributeType(int no ATTRIBUTE_UNUSED, xmlAttributeType val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
1035 #define gen_nb_xmlBufferAllocationScheme 4
1036 static xmlBufferAllocationScheme gen_xmlBufferAllocationScheme(int no, int nr ATTRIBUTE_UNUSED) {
1037 if (no == 1) return(XML_BUFFER_ALLOC_BOUNDED);
1038 if (no == 2) return(XML_BUFFER_ALLOC_DOUBLEIT);
1039 if (no == 3) return(XML_BUFFER_ALLOC_EXACT);
1040 if (no == 4) return(XML_BUFFER_ALLOC_HYBRID);
1044 static void des_xmlBufferAllocationScheme(int no ATTRIBUTE_UNUSED, xmlBufferAllocationScheme val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
1047 static void desret_xmlBufferAllocationScheme(xmlBufferAllocationScheme val ATTRIBUTE_UNUSED) {
1050 #ifdef LIBXML_CATALOG_ENABLED
1051 #define gen_nb_xmlCatalogAllow 4
1052 static xmlCatalogAllow gen_xmlCatalogAllow(int no, int nr ATTRIBUTE_UNUSED) {
1053 if (no == 1) return(XML_CATA_ALLOW_ALL);
1054 if (no == 2) return(XML_CATA_ALLOW_DOCUMENT);
1055 if (no == 3) return(XML_CATA_ALLOW_GLOBAL);
1056 if (no == 4) return(XML_CATA_ALLOW_NONE);
1060 static void des_xmlCatalogAllow(int no ATTRIBUTE_UNUSED, xmlCatalogAllow val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
1063 static void desret_xmlCatalogAllow(xmlCatalogAllow val ATTRIBUTE_UNUSED) {
1068 #ifdef LIBXML_CATALOG_ENABLED
1069 #define gen_nb_xmlCatalogPrefer 3
1070 static xmlCatalogPrefer gen_xmlCatalogPrefer(int no, int nr ATTRIBUTE_UNUSED) {
1071 if (no == 1) return(XML_CATA_PREFER_NONE);
1072 if (no == 2) return(XML_CATA_PREFER_PUBLIC);
1073 if (no == 3) return(XML_CATA_PREFER_SYSTEM);
1077 static void des_xmlCatalogPrefer(int no ATTRIBUTE_UNUSED, xmlCatalogPrefer val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
1080 static void desret_xmlCatalogPrefer(xmlCatalogPrefer val ATTRIBUTE_UNUSED) {
1085 #define gen_nb_xmlElementContentType 4
1086 static xmlElementContentType gen_xmlElementContentType(int no, int nr ATTRIBUTE_UNUSED) {
1087 if (no == 1) return(XML_ELEMENT_CONTENT_ELEMENT);
1088 if (no == 2) return(XML_ELEMENT_CONTENT_OR);
1089 if (no == 3) return(XML_ELEMENT_CONTENT_PCDATA);
1090 if (no == 4) return(XML_ELEMENT_CONTENT_SEQ);
1094 static void des_xmlElementContentType(int no ATTRIBUTE_UNUSED, xmlElementContentType val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
1097 #define gen_nb_xmlElementTypeVal 4
1098 static xmlElementTypeVal gen_xmlElementTypeVal(int no, int nr ATTRIBUTE_UNUSED) {
1099 if (no == 1) return(XML_ELEMENT_TYPE_ANY);
1100 if (no == 2) return(XML_ELEMENT_TYPE_ELEMENT);
1101 if (no == 3) return(XML_ELEMENT_TYPE_EMPTY);
1102 if (no == 4) return(XML_ELEMENT_TYPE_MIXED);
1106 static void des_xmlElementTypeVal(int no ATTRIBUTE_UNUSED, xmlElementTypeVal val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
1109 #define gen_nb_xmlFeature 4
1110 static xmlFeature gen_xmlFeature(int no, int nr ATTRIBUTE_UNUSED) {
1111 if (no == 1) return(XML_WITH_AUTOMATA);
1112 if (no == 2) return(XML_WITH_C14N);
1113 if (no == 3) return(XML_WITH_CATALOG);
1114 if (no == 4) return(XML_WITH_DEBUG);
1118 static void des_xmlFeature(int no ATTRIBUTE_UNUSED, xmlFeature val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
1121 static void desret_xmlParserErrors(xmlParserErrors val ATTRIBUTE_UNUSED) {
1124 #ifdef LIBXML_SCHEMAS_ENABLED
1125 #define gen_nb_xmlSchemaValType 4
1126 static xmlSchemaValType gen_xmlSchemaValType(int no, int nr ATTRIBUTE_UNUSED) {
1127 if (no == 1) return(XML_SCHEMAS_ANYSIMPLETYPE);
1128 if (no == 2) return(XML_SCHEMAS_ANYTYPE);
1129 if (no == 3) return(XML_SCHEMAS_ANYURI);
1130 if (no == 4) return(XML_SCHEMAS_BASE64BINARY);
1134 static void des_xmlSchemaValType(int no ATTRIBUTE_UNUSED, xmlSchemaValType val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
1137 static void desret_xmlSchemaValType(xmlSchemaValType val ATTRIBUTE_UNUSED) {
1142 #ifdef LIBXML_SCHEMAS_ENABLED
1143 #define gen_nb_xmlSchemaWhitespaceValueType 4
1144 static xmlSchemaWhitespaceValueType gen_xmlSchemaWhitespaceValueType(int no, int nr ATTRIBUTE_UNUSED) {
1145 if (no == 1) return(XML_SCHEMA_WHITESPACE_COLLAPSE);
1146 if (no == 2) return(XML_SCHEMA_WHITESPACE_PRESERVE);
1147 if (no == 3) return(XML_SCHEMA_WHITESPACE_REPLACE);
1148 if (no == 4) return(XML_SCHEMA_WHITESPACE_UNKNOWN);
1152 static void des_xmlSchemaWhitespaceValueType(int no ATTRIBUTE_UNUSED, xmlSchemaWhitespaceValueType val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
1157 #include <libxml/HTMLparser.h>
1158 #include <libxml/HTMLtree.h>
1159 #include <libxml/SAX2.h>
1160 #include <libxml/c14n.h>
1161 #include <libxml/catalog.h>
1162 #include <libxml/chvalid.h>
1163 #include <libxml/debugXML.h>
1164 #include <libxml/dict.h>
1165 #include <libxml/encoding.h>
1166 #include <libxml/entities.h>
1167 #include <libxml/hash.h>
1168 #include <libxml/list.h>
1169 #include <libxml/nanoftp.h>
1170 #include <libxml/nanohttp.h>
1171 #include <libxml/parser.h>
1172 #include <libxml/parserInternals.h>
1173 #include <libxml/pattern.h>
1174 #include <libxml/relaxng.h>
1175 #include <libxml/schemasInternals.h>
1176 #include <libxml/schematron.h>
1177 #include <libxml/tree.h>
1178 #include <libxml/uri.h>
1179 #include <libxml/valid.h>
1180 #include <libxml/xinclude.h>
1181 #include <libxml/xmlIO.h>
1182 #include <libxml/xmlautomata.h>
1183 #include <libxml/xmlerror.h>
1184 #include <libxml/xmlmodule.h>
1185 #include <libxml/xmlreader.h>
1186 #include <libxml/xmlregexp.h>
1187 #include <libxml/xmlsave.h>
1188 #include <libxml/xmlschemas.h>
1189 #include <libxml/xmlschemastypes.h>
1190 #include <libxml/xmlstring.h>
1191 #include <libxml/xmlunicode.h>
1192 #include <libxml/xmlwriter.h>
1193 #include <libxml/xpath.h>
1194 #include <libxml/xpathInternals.h>
1195 #include <libxml/xpointer.h>
1196 static int test_HTMLparser(void);
1197 static int test_HTMLtree(void);
1198 static int test_SAX2(void);
1199 static int test_c14n(void);
1200 static int test_catalog(void);
1201 static int test_chvalid(void);
1202 static int test_debugXML(void);
1203 static int test_dict(void);
1204 static int test_encoding(void);
1205 static int test_entities(void);
1206 static int test_hash(void);
1207 static int test_list(void);
1208 static int test_nanoftp(void);
1209 static int test_nanohttp(void);
1210 static int test_parser(void);
1211 static int test_parserInternals(void);
1212 static int test_pattern(void);
1213 static int test_relaxng(void);
1214 static int test_schemasInternals(void);
1215 static int test_schematron(void);
1216 static int test_tree(void);
1217 static int test_uri(void);
1218 static int test_valid(void);
1219 static int test_xinclude(void);
1220 static int test_xmlIO(void);
1221 static int test_xmlautomata(void);
1222 static int test_xmlerror(void);
1223 static int test_xmlmodule(void);
1224 static int test_xmlreader(void);
1225 static int test_xmlregexp(void);
1226 static int test_xmlsave(void);
1227 static int test_xmlschemas(void);
1228 static int test_xmlschemastypes(void);
1229 static int test_xmlstring(void);
1230 static int test_xmlunicode(void);
1231 static int test_xmlwriter(void);
1232 static int test_xpath(void);
1233 static int test_xpathInternals(void);
1234 static int test_xpointer(void);
1239 * Main entry point of the tester for the full libxml2 module,
1240 * it calls all the tester entry point for each module.
1242 * Returns the number of error found
1249 test_ret += test_HTMLparser();
1250 test_ret += test_HTMLtree();
1251 test_ret += test_SAX2();
1252 test_ret += test_c14n();
1253 test_ret += test_catalog();
1254 test_ret += test_chvalid();
1255 test_ret += test_debugXML();
1256 test_ret += test_dict();
1257 test_ret += test_encoding();
1258 test_ret += test_entities();
1259 test_ret += test_hash();
1260 test_ret += test_list();
1261 test_ret += test_nanoftp();
1262 test_ret += test_nanohttp();
1263 test_ret += test_parser();
1264 test_ret += test_parserInternals();
1265 test_ret += test_pattern();
1266 test_ret += test_relaxng();
1267 test_ret += test_schemasInternals();
1268 test_ret += test_schematron();
1269 test_ret += test_tree();
1270 test_ret += test_uri();
1271 test_ret += test_valid();
1272 test_ret += test_xinclude();
1273 test_ret += test_xmlIO();
1274 test_ret += test_xmlautomata();
1275 test_ret += test_xmlerror();
1276 test_ret += test_xmlmodule();
1277 test_ret += test_xmlreader();
1278 test_ret += test_xmlregexp();
1279 test_ret += test_xmlsave();
1280 test_ret += test_xmlschemas();
1281 test_ret += test_xmlschemastypes();
1282 test_ret += test_xmlstring();
1283 test_ret += test_xmlunicode();
1284 test_ret += test_xmlwriter();
1285 test_ret += test_xpath();
1286 test_ret += test_xpathInternals();
1287 test_ret += test_xpointer();
1289 printf("Total: %d functions, %d tests, %d errors\n",
1290 function_tests, call_tests, test_ret);
1296 test_UTF8ToHtml(void) {
1299 #if defined(LIBXML_HTML_ENABLED)
1302 unsigned char * out; /* a pointer to an array of bytes to store the result */
1304 int * outlen; /* the length of @out */
1306 unsigned char * in; /* a pointer to an array of UTF-8 chars */
1308 int * inlen; /* the length of @in */
1311 for (n_out = 0;n_out < gen_nb_unsigned_char_ptr;n_out++) {
1312 for (n_outlen = 0;n_outlen < gen_nb_int_ptr;n_outlen++) {
1313 for (n_in = 0;n_in < gen_nb_const_unsigned_char_ptr;n_in++) {
1314 for (n_inlen = 0;n_inlen < gen_nb_int_ptr;n_inlen++) {
1315 mem_base = xmlMemBlocks();
1316 out = gen_unsigned_char_ptr(n_out, 0);
1317 outlen = gen_int_ptr(n_outlen, 1);
1318 in = gen_const_unsigned_char_ptr(n_in, 2);
1319 inlen = gen_int_ptr(n_inlen, 3);
1321 ret_val = UTF8ToHtml(out, outlen, (const unsigned char *)in, inlen);
1322 desret_int(ret_val);
1324 des_unsigned_char_ptr(n_out, out, 0);
1325 des_int_ptr(n_outlen, outlen, 1);
1326 des_const_unsigned_char_ptr(n_in, (const unsigned char *)in, 2);
1327 des_int_ptr(n_inlen, inlen, 3);
1328 xmlResetLastError();
1329 if (mem_base != xmlMemBlocks()) {
1330 printf("Leak of %d blocks found in UTF8ToHtml",
1331 xmlMemBlocks() - mem_base);
1333 printf(" %d", n_out);
1334 printf(" %d", n_outlen);
1335 printf(" %d", n_in);
1336 printf(" %d", n_inlen);
1349 #ifdef LIBXML_HTML_ENABLED
1351 #define gen_nb_const_htmlElemDesc_ptr 1
1352 static htmlElemDesc * gen_const_htmlElemDesc_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
1355 static void des_const_htmlElemDesc_ptr(int no ATTRIBUTE_UNUSED, const htmlElemDesc * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
1361 test_htmlAttrAllowed(void) {
1364 #if defined(LIBXML_HTML_ENABLED)
1367 htmlElemDesc * elt; /* HTML element */
1369 xmlChar * attr; /* HTML attribute */
1371 int legacy; /* whether to allow deprecated attributes */
1374 for (n_elt = 0;n_elt < gen_nb_const_htmlElemDesc_ptr;n_elt++) {
1375 for (n_attr = 0;n_attr < gen_nb_const_xmlChar_ptr;n_attr++) {
1376 for (n_legacy = 0;n_legacy < gen_nb_int;n_legacy++) {
1377 mem_base = xmlMemBlocks();
1378 elt = gen_const_htmlElemDesc_ptr(n_elt, 0);
1379 attr = gen_const_xmlChar_ptr(n_attr, 1);
1380 legacy = gen_int(n_legacy, 2);
1382 ret_val = htmlAttrAllowed((const htmlElemDesc *)elt, (const xmlChar *)attr, legacy);
1383 desret_htmlStatus(ret_val);
1385 des_const_htmlElemDesc_ptr(n_elt, (const htmlElemDesc *)elt, 0);
1386 des_const_xmlChar_ptr(n_attr, (const xmlChar *)attr, 1);
1387 des_int(n_legacy, legacy, 2);
1388 xmlResetLastError();
1389 if (mem_base != xmlMemBlocks()) {
1390 printf("Leak of %d blocks found in htmlAttrAllowed",
1391 xmlMemBlocks() - mem_base);
1393 printf(" %d", n_elt);
1394 printf(" %d", n_attr);
1395 printf(" %d", n_legacy);
1407 #ifdef LIBXML_HTML_ENABLED
1409 #define gen_nb_htmlNodePtr 1
1410 static htmlNodePtr gen_htmlNodePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
1413 static void des_htmlNodePtr(int no ATTRIBUTE_UNUSED, htmlNodePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
1419 test_htmlAutoCloseTag(void) {
1422 #if defined(LIBXML_HTML_ENABLED)
1425 htmlDocPtr doc; /* the HTML document */
1427 xmlChar * name; /* The tag name */
1429 htmlNodePtr elem; /* the HTML element */
1432 for (n_doc = 0;n_doc < gen_nb_htmlDocPtr;n_doc++) {
1433 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
1434 for (n_elem = 0;n_elem < gen_nb_htmlNodePtr;n_elem++) {
1435 mem_base = xmlMemBlocks();
1436 doc = gen_htmlDocPtr(n_doc, 0);
1437 name = gen_const_xmlChar_ptr(n_name, 1);
1438 elem = gen_htmlNodePtr(n_elem, 2);
1440 ret_val = htmlAutoCloseTag(doc, (const xmlChar *)name, elem);
1441 desret_int(ret_val);
1443 des_htmlDocPtr(n_doc, doc, 0);
1444 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
1445 des_htmlNodePtr(n_elem, elem, 2);
1446 xmlResetLastError();
1447 if (mem_base != xmlMemBlocks()) {
1448 printf("Leak of %d blocks found in htmlAutoCloseTag",
1449 xmlMemBlocks() - mem_base);
1451 printf(" %d", n_doc);
1452 printf(" %d", n_name);
1453 printf(" %d", n_elem);
1467 test_htmlCreateMemoryParserCtxt(void) {
1470 #if defined(LIBXML_HTML_ENABLED)
1472 htmlParserCtxtPtr ret_val;
1473 char * buffer; /* a pointer to a char array */
1475 int size; /* the size of the array */
1478 for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
1479 for (n_size = 0;n_size < gen_nb_int;n_size++) {
1480 mem_base = xmlMemBlocks();
1481 buffer = gen_const_char_ptr(n_buffer, 0);
1482 size = gen_int(n_size, 1);
1483 if ((buffer != NULL) &&
1484 (size > (int) strlen((const char *) buffer) + 1))
1487 ret_val = htmlCreateMemoryParserCtxt((const char *)buffer, size);
1488 desret_htmlParserCtxtPtr(ret_val);
1490 des_const_char_ptr(n_buffer, (const char *)buffer, 0);
1491 des_int(n_size, size, 1);
1492 xmlResetLastError();
1493 if (mem_base != xmlMemBlocks()) {
1494 printf("Leak of %d blocks found in htmlCreateMemoryParserCtxt",
1495 xmlMemBlocks() - mem_base);
1497 printf(" %d", n_buffer);
1498 printf(" %d", n_size);
1509 #ifdef LIBXML_HTML_ENABLED
1511 #define gen_nb_htmlSAXHandlerPtr 1
1512 static htmlSAXHandlerPtr gen_htmlSAXHandlerPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
1515 static void des_htmlSAXHandlerPtr(int no ATTRIBUTE_UNUSED, htmlSAXHandlerPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
1521 test_htmlCreatePushParserCtxt(void) {
1524 #if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_PUSH_ENABLED)
1526 htmlParserCtxtPtr ret_val;
1527 htmlSAXHandlerPtr sax; /* a SAX handler */
1529 void * user_data; /* The user data returned on SAX callbacks */
1531 char * chunk; /* a pointer to an array of chars */
1533 int size; /* number of chars in the array */
1535 const char * filename; /* an optional file name or URI */
1537 xmlCharEncoding enc; /* an optional encoding */
1540 for (n_sax = 0;n_sax < gen_nb_htmlSAXHandlerPtr;n_sax++) {
1541 for (n_user_data = 0;n_user_data < gen_nb_userdata;n_user_data++) {
1542 for (n_chunk = 0;n_chunk < gen_nb_const_char_ptr;n_chunk++) {
1543 for (n_size = 0;n_size < gen_nb_int;n_size++) {
1544 for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
1545 for (n_enc = 0;n_enc < gen_nb_xmlCharEncoding;n_enc++) {
1546 mem_base = xmlMemBlocks();
1547 sax = gen_htmlSAXHandlerPtr(n_sax, 0);
1548 user_data = gen_userdata(n_user_data, 1);
1549 chunk = gen_const_char_ptr(n_chunk, 2);
1550 size = gen_int(n_size, 3);
1551 filename = gen_fileoutput(n_filename, 4);
1552 enc = gen_xmlCharEncoding(n_enc, 5);
1553 if ((chunk != NULL) &&
1554 (size > (int) strlen((const char *) chunk) + 1))
1557 ret_val = htmlCreatePushParserCtxt(sax, user_data, (const char *)chunk, size, filename, enc);
1558 desret_htmlParserCtxtPtr(ret_val);
1560 des_htmlSAXHandlerPtr(n_sax, sax, 0);
1561 des_userdata(n_user_data, user_data, 1);
1562 des_const_char_ptr(n_chunk, (const char *)chunk, 2);
1563 des_int(n_size, size, 3);
1564 des_fileoutput(n_filename, filename, 4);
1565 des_xmlCharEncoding(n_enc, enc, 5);
1566 xmlResetLastError();
1567 if (mem_base != xmlMemBlocks()) {
1568 printf("Leak of %d blocks found in htmlCreatePushParserCtxt",
1569 xmlMemBlocks() - mem_base);
1571 printf(" %d", n_sax);
1572 printf(" %d", n_user_data);
1573 printf(" %d", n_chunk);
1574 printf(" %d", n_size);
1575 printf(" %d", n_filename);
1576 printf(" %d", n_enc);
1593 test_htmlCtxtReadDoc(void) {
1596 #if defined(LIBXML_HTML_ENABLED)
1599 htmlParserCtxtPtr ctxt; /* an HTML parser context */
1601 xmlChar * cur; /* a pointer to a zero terminated string */
1603 const char * URL; /* the base URL to use for the document */
1605 char * encoding; /* the document encoding, or NULL */
1607 int options; /* a combination of htmlParserOption(s) */
1610 for (n_ctxt = 0;n_ctxt < gen_nb_htmlParserCtxtPtr;n_ctxt++) {
1611 for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
1612 for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
1613 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
1614 for (n_options = 0;n_options < gen_nb_int;n_options++) {
1615 mem_base = xmlMemBlocks();
1616 ctxt = gen_htmlParserCtxtPtr(n_ctxt, 0);
1617 cur = gen_const_xmlChar_ptr(n_cur, 1);
1618 URL = gen_filepath(n_URL, 2);
1619 encoding = gen_const_char_ptr(n_encoding, 3);
1620 options = gen_int(n_options, 4);
1622 ret_val = htmlCtxtReadDoc(ctxt, (const xmlChar *)cur, URL, (const char *)encoding, options);
1623 desret_htmlDocPtr(ret_val);
1625 des_htmlParserCtxtPtr(n_ctxt, ctxt, 0);
1626 des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 1);
1627 des_filepath(n_URL, URL, 2);
1628 des_const_char_ptr(n_encoding, (const char *)encoding, 3);
1629 des_int(n_options, options, 4);
1630 xmlResetLastError();
1631 if (mem_base != xmlMemBlocks()) {
1632 printf("Leak of %d blocks found in htmlCtxtReadDoc",
1633 xmlMemBlocks() - mem_base);
1635 printf(" %d", n_ctxt);
1636 printf(" %d", n_cur);
1637 printf(" %d", n_URL);
1638 printf(" %d", n_encoding);
1639 printf(" %d", n_options);
1655 test_htmlCtxtReadFile(void) {
1658 #if defined(LIBXML_HTML_ENABLED)
1660 htmlParserCtxtPtr ctxt; /* an HTML parser context */
1662 const char * filename; /* a file or URL */
1664 char * encoding; /* the document encoding, or NULL */
1666 int options; /* a combination of htmlParserOption(s) */
1669 for (n_ctxt = 0;n_ctxt < gen_nb_htmlParserCtxtPtr;n_ctxt++) {
1670 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
1671 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
1672 for (n_options = 0;n_options < gen_nb_int;n_options++) {
1673 ctxt = gen_htmlParserCtxtPtr(n_ctxt, 0);
1674 filename = gen_filepath(n_filename, 1);
1675 encoding = gen_const_char_ptr(n_encoding, 2);
1676 options = gen_int(n_options, 3);
1678 ret_val = htmlCtxtReadFile(ctxt, filename, (const char *)encoding, options);
1679 desret_htmlDocPtr(ret_val);
1681 des_htmlParserCtxtPtr(n_ctxt, ctxt, 0);
1682 des_filepath(n_filename, filename, 1);
1683 des_const_char_ptr(n_encoding, (const char *)encoding, 2);
1684 des_int(n_options, options, 3);
1685 xmlResetLastError();
1698 test_htmlCtxtReadMemory(void) {
1701 #if defined(LIBXML_HTML_ENABLED)
1704 htmlParserCtxtPtr ctxt; /* an HTML parser context */
1706 char * buffer; /* a pointer to a char array */
1708 int size; /* the size of the array */
1710 const char * URL; /* the base URL to use for the document */
1712 char * encoding; /* the document encoding, or NULL */
1714 int options; /* a combination of htmlParserOption(s) */
1717 for (n_ctxt = 0;n_ctxt < gen_nb_htmlParserCtxtPtr;n_ctxt++) {
1718 for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
1719 for (n_size = 0;n_size < gen_nb_int;n_size++) {
1720 for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
1721 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
1722 for (n_options = 0;n_options < gen_nb_int;n_options++) {
1723 mem_base = xmlMemBlocks();
1724 ctxt = gen_htmlParserCtxtPtr(n_ctxt, 0);
1725 buffer = gen_const_char_ptr(n_buffer, 1);
1726 size = gen_int(n_size, 2);
1727 URL = gen_filepath(n_URL, 3);
1728 encoding = gen_const_char_ptr(n_encoding, 4);
1729 options = gen_int(n_options, 5);
1730 if ((buffer != NULL) &&
1731 (size > (int) strlen((const char *) buffer) + 1))
1734 ret_val = htmlCtxtReadMemory(ctxt, (const char *)buffer, size, URL, (const char *)encoding, options);
1735 desret_htmlDocPtr(ret_val);
1737 des_htmlParserCtxtPtr(n_ctxt, ctxt, 0);
1738 des_const_char_ptr(n_buffer, (const char *)buffer, 1);
1739 des_int(n_size, size, 2);
1740 des_filepath(n_URL, URL, 3);
1741 des_const_char_ptr(n_encoding, (const char *)encoding, 4);
1742 des_int(n_options, options, 5);
1743 xmlResetLastError();
1744 if (mem_base != xmlMemBlocks()) {
1745 printf("Leak of %d blocks found in htmlCtxtReadMemory",
1746 xmlMemBlocks() - mem_base);
1748 printf(" %d", n_ctxt);
1749 printf(" %d", n_buffer);
1750 printf(" %d", n_size);
1751 printf(" %d", n_URL);
1752 printf(" %d", n_encoding);
1753 printf(" %d", n_options);
1770 test_htmlCtxtReset(void) {
1773 #if defined(LIBXML_HTML_ENABLED)
1775 htmlParserCtxtPtr ctxt; /* an HTML parser context */
1778 for (n_ctxt = 0;n_ctxt < gen_nb_htmlParserCtxtPtr;n_ctxt++) {
1779 mem_base = xmlMemBlocks();
1780 ctxt = gen_htmlParserCtxtPtr(n_ctxt, 0);
1782 htmlCtxtReset(ctxt);
1784 des_htmlParserCtxtPtr(n_ctxt, ctxt, 0);
1785 xmlResetLastError();
1786 if (mem_base != xmlMemBlocks()) {
1787 printf("Leak of %d blocks found in htmlCtxtReset",
1788 xmlMemBlocks() - mem_base);
1790 printf(" %d", n_ctxt);
1802 test_htmlCtxtUseOptions(void) {
1805 #if defined(LIBXML_HTML_ENABLED)
1808 htmlParserCtxtPtr ctxt; /* an HTML parser context */
1810 int options; /* a combination of htmlParserOption(s) */
1813 for (n_ctxt = 0;n_ctxt < gen_nb_htmlParserCtxtPtr;n_ctxt++) {
1814 for (n_options = 0;n_options < gen_nb_int;n_options++) {
1815 mem_base = xmlMemBlocks();
1816 ctxt = gen_htmlParserCtxtPtr(n_ctxt, 0);
1817 options = gen_int(n_options, 1);
1819 ret_val = htmlCtxtUseOptions(ctxt, options);
1820 desret_int(ret_val);
1822 des_htmlParserCtxtPtr(n_ctxt, ctxt, 0);
1823 des_int(n_options, options, 1);
1824 xmlResetLastError();
1825 if (mem_base != xmlMemBlocks()) {
1826 printf("Leak of %d blocks found in htmlCtxtUseOptions",
1827 xmlMemBlocks() - mem_base);
1829 printf(" %d", n_ctxt);
1830 printf(" %d", n_options);
1843 test_htmlElementAllowedHere(void) {
1846 #if defined(LIBXML_HTML_ENABLED)
1849 htmlElemDesc * parent; /* HTML parent element */
1851 xmlChar * elt; /* HTML element */
1854 for (n_parent = 0;n_parent < gen_nb_const_htmlElemDesc_ptr;n_parent++) {
1855 for (n_elt = 0;n_elt < gen_nb_const_xmlChar_ptr;n_elt++) {
1856 mem_base = xmlMemBlocks();
1857 parent = gen_const_htmlElemDesc_ptr(n_parent, 0);
1858 elt = gen_const_xmlChar_ptr(n_elt, 1);
1860 ret_val = htmlElementAllowedHere((const htmlElemDesc *)parent, (const xmlChar *)elt);
1861 desret_int(ret_val);
1863 des_const_htmlElemDesc_ptr(n_parent, (const htmlElemDesc *)parent, 0);
1864 des_const_xmlChar_ptr(n_elt, (const xmlChar *)elt, 1);
1865 xmlResetLastError();
1866 if (mem_base != xmlMemBlocks()) {
1867 printf("Leak of %d blocks found in htmlElementAllowedHere",
1868 xmlMemBlocks() - mem_base);
1870 printf(" %d", n_parent);
1871 printf(" %d", n_elt);
1884 test_htmlElementStatusHere(void) {
1887 #if defined(LIBXML_HTML_ENABLED)
1890 htmlElemDesc * parent; /* HTML parent element */
1892 htmlElemDesc * elt; /* HTML element */
1895 for (n_parent = 0;n_parent < gen_nb_const_htmlElemDesc_ptr;n_parent++) {
1896 for (n_elt = 0;n_elt < gen_nb_const_htmlElemDesc_ptr;n_elt++) {
1897 mem_base = xmlMemBlocks();
1898 parent = gen_const_htmlElemDesc_ptr(n_parent, 0);
1899 elt = gen_const_htmlElemDesc_ptr(n_elt, 1);
1901 ret_val = htmlElementStatusHere((const htmlElemDesc *)parent, (const htmlElemDesc *)elt);
1902 desret_htmlStatus(ret_val);
1904 des_const_htmlElemDesc_ptr(n_parent, (const htmlElemDesc *)parent, 0);
1905 des_const_htmlElemDesc_ptr(n_elt, (const htmlElemDesc *)elt, 1);
1906 xmlResetLastError();
1907 if (mem_base != xmlMemBlocks()) {
1908 printf("Leak of %d blocks found in htmlElementStatusHere",
1909 xmlMemBlocks() - mem_base);
1911 printf(" %d", n_parent);
1912 printf(" %d", n_elt);
1925 test_htmlEncodeEntities(void) {
1928 #if defined(LIBXML_HTML_ENABLED)
1931 unsigned char * out; /* a pointer to an array of bytes to store the result */
1933 int * outlen; /* the length of @out */
1935 unsigned char * in; /* a pointer to an array of UTF-8 chars */
1937 int * inlen; /* the length of @in */
1939 int quoteChar; /* the quote character to escape (' or ") or zero. */
1942 for (n_out = 0;n_out < gen_nb_unsigned_char_ptr;n_out++) {
1943 for (n_outlen = 0;n_outlen < gen_nb_int_ptr;n_outlen++) {
1944 for (n_in = 0;n_in < gen_nb_const_unsigned_char_ptr;n_in++) {
1945 for (n_inlen = 0;n_inlen < gen_nb_int_ptr;n_inlen++) {
1946 for (n_quoteChar = 0;n_quoteChar < gen_nb_int;n_quoteChar++) {
1947 mem_base = xmlMemBlocks();
1948 out = gen_unsigned_char_ptr(n_out, 0);
1949 outlen = gen_int_ptr(n_outlen, 1);
1950 in = gen_const_unsigned_char_ptr(n_in, 2);
1951 inlen = gen_int_ptr(n_inlen, 3);
1952 quoteChar = gen_int(n_quoteChar, 4);
1954 ret_val = htmlEncodeEntities(out, outlen, (const unsigned char *)in, inlen, quoteChar);
1955 desret_int(ret_val);
1957 des_unsigned_char_ptr(n_out, out, 0);
1958 des_int_ptr(n_outlen, outlen, 1);
1959 des_const_unsigned_char_ptr(n_in, (const unsigned char *)in, 2);
1960 des_int_ptr(n_inlen, inlen, 3);
1961 des_int(n_quoteChar, quoteChar, 4);
1962 xmlResetLastError();
1963 if (mem_base != xmlMemBlocks()) {
1964 printf("Leak of %d blocks found in htmlEncodeEntities",
1965 xmlMemBlocks() - mem_base);
1967 printf(" %d", n_out);
1968 printf(" %d", n_outlen);
1969 printf(" %d", n_in);
1970 printf(" %d", n_inlen);
1971 printf(" %d", n_quoteChar);
1987 test_htmlEntityLookup(void) {
1990 #if defined(LIBXML_HTML_ENABLED)
1992 const htmlEntityDesc * ret_val;
1993 xmlChar * name; /* the entity name */
1996 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
1997 mem_base = xmlMemBlocks();
1998 name = gen_const_xmlChar_ptr(n_name, 0);
2000 ret_val = htmlEntityLookup((const xmlChar *)name);
2001 desret_const_htmlEntityDesc_ptr(ret_val);
2003 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 0);
2004 xmlResetLastError();
2005 if (mem_base != xmlMemBlocks()) {
2006 printf("Leak of %d blocks found in htmlEntityLookup",
2007 xmlMemBlocks() - mem_base);
2009 printf(" %d", n_name);
2021 test_htmlEntityValueLookup(void) {
2024 #if defined(LIBXML_HTML_ENABLED)
2026 const htmlEntityDesc * ret_val;
2027 unsigned int value; /* the entity's unicode value */
2030 for (n_value = 0;n_value < gen_nb_unsigned_int;n_value++) {
2031 mem_base = xmlMemBlocks();
2032 value = gen_unsigned_int(n_value, 0);
2034 ret_val = htmlEntityValueLookup(value);
2035 desret_const_htmlEntityDesc_ptr(ret_val);
2037 des_unsigned_int(n_value, value, 0);
2038 xmlResetLastError();
2039 if (mem_base != xmlMemBlocks()) {
2040 printf("Leak of %d blocks found in htmlEntityValueLookup",
2041 xmlMemBlocks() - mem_base);
2043 printf(" %d", n_value);
2055 test_htmlHandleOmittedElem(void) {
2058 #if defined(LIBXML_HTML_ENABLED)
2061 int val; /* int 0 or 1 */
2064 for (n_val = 0;n_val < gen_nb_int;n_val++) {
2065 mem_base = xmlMemBlocks();
2066 val = gen_int(n_val, 0);
2068 ret_val = htmlHandleOmittedElem(val);
2069 desret_int(ret_val);
2071 des_int(n_val, val, 0);
2072 xmlResetLastError();
2073 if (mem_base != xmlMemBlocks()) {
2074 printf("Leak of %d blocks found in htmlHandleOmittedElem",
2075 xmlMemBlocks() - mem_base);
2077 printf(" %d", n_val);
2089 test_htmlIsAutoClosed(void) {
2092 #if defined(LIBXML_HTML_ENABLED)
2095 htmlDocPtr doc; /* the HTML document */
2097 htmlNodePtr elem; /* the HTML element */
2100 for (n_doc = 0;n_doc < gen_nb_htmlDocPtr;n_doc++) {
2101 for (n_elem = 0;n_elem < gen_nb_htmlNodePtr;n_elem++) {
2102 mem_base = xmlMemBlocks();
2103 doc = gen_htmlDocPtr(n_doc, 0);
2104 elem = gen_htmlNodePtr(n_elem, 1);
2106 ret_val = htmlIsAutoClosed(doc, elem);
2107 desret_int(ret_val);
2109 des_htmlDocPtr(n_doc, doc, 0);
2110 des_htmlNodePtr(n_elem, elem, 1);
2111 xmlResetLastError();
2112 if (mem_base != xmlMemBlocks()) {
2113 printf("Leak of %d blocks found in htmlIsAutoClosed",
2114 xmlMemBlocks() - mem_base);
2116 printf(" %d", n_doc);
2117 printf(" %d", n_elem);
2130 test_htmlIsScriptAttribute(void) {
2133 #if defined(LIBXML_HTML_ENABLED)
2136 xmlChar * name; /* an attribute name */
2139 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
2140 mem_base = xmlMemBlocks();
2141 name = gen_const_xmlChar_ptr(n_name, 0);
2143 ret_val = htmlIsScriptAttribute((const xmlChar *)name);
2144 desret_int(ret_val);
2146 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 0);
2147 xmlResetLastError();
2148 if (mem_base != xmlMemBlocks()) {
2149 printf("Leak of %d blocks found in htmlIsScriptAttribute",
2150 xmlMemBlocks() - mem_base);
2152 printf(" %d", n_name);
2164 test_htmlNewParserCtxt(void) {
2167 #if defined(LIBXML_HTML_ENABLED)
2169 htmlParserCtxtPtr ret_val;
2171 mem_base = xmlMemBlocks();
2173 ret_val = htmlNewParserCtxt();
2174 desret_htmlParserCtxtPtr(ret_val);
2176 xmlResetLastError();
2177 if (mem_base != xmlMemBlocks()) {
2178 printf("Leak of %d blocks found in htmlNewParserCtxt",
2179 xmlMemBlocks() - mem_base);
2191 test_htmlNodeStatus(void) {
2194 #if defined(LIBXML_HTML_ENABLED)
2197 htmlNodePtr node; /* an htmlNodePtr in a tree */
2199 int legacy; /* whether to allow deprecated elements (YES is faster here for Element nodes) */
2202 for (n_node = 0;n_node < gen_nb_const_htmlNodePtr;n_node++) {
2203 for (n_legacy = 0;n_legacy < gen_nb_int;n_legacy++) {
2204 mem_base = xmlMemBlocks();
2205 node = gen_const_htmlNodePtr(n_node, 0);
2206 legacy = gen_int(n_legacy, 1);
2208 ret_val = htmlNodeStatus((const htmlNodePtr)node, legacy);
2209 desret_htmlStatus(ret_val);
2211 des_const_htmlNodePtr(n_node, (const htmlNodePtr)node, 0);
2212 des_int(n_legacy, legacy, 1);
2213 xmlResetLastError();
2214 if (mem_base != xmlMemBlocks()) {
2215 printf("Leak of %d blocks found in htmlNodeStatus",
2216 xmlMemBlocks() - mem_base);
2218 printf(" %d", n_node);
2219 printf(" %d", n_legacy);
2232 test_htmlParseCharRef(void) {
2235 #if defined(LIBXML_HTML_ENABLED)
2238 htmlParserCtxtPtr ctxt; /* an HTML parser context */
2241 for (n_ctxt = 0;n_ctxt < gen_nb_htmlParserCtxtPtr;n_ctxt++) {
2242 mem_base = xmlMemBlocks();
2243 ctxt = gen_htmlParserCtxtPtr(n_ctxt, 0);
2245 ret_val = htmlParseCharRef(ctxt);
2246 desret_int(ret_val);
2248 des_htmlParserCtxtPtr(n_ctxt, ctxt, 0);
2249 xmlResetLastError();
2250 if (mem_base != xmlMemBlocks()) {
2251 printf("Leak of %d blocks found in htmlParseCharRef",
2252 xmlMemBlocks() - mem_base);
2254 printf(" %d", n_ctxt);
2266 test_htmlParseChunk(void) {
2269 #if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_PUSH_ENABLED)
2272 htmlParserCtxtPtr ctxt; /* an HTML parser context */
2274 char * chunk; /* an char array */
2276 int size; /* the size in byte of the chunk */
2278 int terminate; /* last chunk indicator */
2281 for (n_ctxt = 0;n_ctxt < gen_nb_htmlParserCtxtPtr;n_ctxt++) {
2282 for (n_chunk = 0;n_chunk < gen_nb_const_char_ptr;n_chunk++) {
2283 for (n_size = 0;n_size < gen_nb_int;n_size++) {
2284 for (n_terminate = 0;n_terminate < gen_nb_int;n_terminate++) {
2285 mem_base = xmlMemBlocks();
2286 ctxt = gen_htmlParserCtxtPtr(n_ctxt, 0);
2287 chunk = gen_const_char_ptr(n_chunk, 1);
2288 size = gen_int(n_size, 2);
2289 terminate = gen_int(n_terminate, 3);
2290 if ((chunk != NULL) &&
2291 (size > (int) strlen((const char *) chunk) + 1))
2294 ret_val = htmlParseChunk(ctxt, (const char *)chunk, size, terminate);
2295 if (ctxt != NULL) {xmlFreeDoc(ctxt->myDoc); ctxt->myDoc = NULL;}
2296 desret_int(ret_val);
2298 des_htmlParserCtxtPtr(n_ctxt, ctxt, 0);
2299 des_const_char_ptr(n_chunk, (const char *)chunk, 1);
2300 des_int(n_size, size, 2);
2301 des_int(n_terminate, terminate, 3);
2302 xmlResetLastError();
2303 if (mem_base != xmlMemBlocks()) {
2304 printf("Leak of %d blocks found in htmlParseChunk",
2305 xmlMemBlocks() - mem_base);
2307 printf(" %d", n_ctxt);
2308 printf(" %d", n_chunk);
2309 printf(" %d", n_size);
2310 printf(" %d", n_terminate);
2325 test_htmlParseDoc(void) {
2328 #if defined(LIBXML_HTML_ENABLED)
2331 xmlChar * cur; /* a pointer to an array of xmlChar */
2333 char * encoding; /* a free form C string describing the HTML document encoding, or NULL */
2336 for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
2337 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
2338 mem_base = xmlMemBlocks();
2339 cur = gen_const_xmlChar_ptr(n_cur, 0);
2340 encoding = gen_const_char_ptr(n_encoding, 1);
2342 ret_val = htmlParseDoc((const xmlChar *)cur, (const char *)encoding);
2343 desret_htmlDocPtr(ret_val);
2345 des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 0);
2346 des_const_char_ptr(n_encoding, (const char *)encoding, 1);
2347 xmlResetLastError();
2348 if (mem_base != xmlMemBlocks()) {
2349 printf("Leak of %d blocks found in htmlParseDoc",
2350 xmlMemBlocks() - mem_base);
2352 printf(" %d", n_cur);
2353 printf(" %d", n_encoding);
2366 test_htmlParseDocument(void) {
2369 #if defined(LIBXML_HTML_ENABLED)
2372 htmlParserCtxtPtr ctxt; /* an HTML parser context */
2375 for (n_ctxt = 0;n_ctxt < gen_nb_htmlParserCtxtPtr;n_ctxt++) {
2376 mem_base = xmlMemBlocks();
2377 ctxt = gen_htmlParserCtxtPtr(n_ctxt, 0);
2379 ret_val = htmlParseDocument(ctxt);
2380 if (ctxt != NULL) {xmlFreeDoc(ctxt->myDoc); ctxt->myDoc = NULL;}
2381 desret_int(ret_val);
2383 des_htmlParserCtxtPtr(n_ctxt, ctxt, 0);
2384 xmlResetLastError();
2385 if (mem_base != xmlMemBlocks()) {
2386 printf("Leak of %d blocks found in htmlParseDocument",
2387 xmlMemBlocks() - mem_base);
2389 printf(" %d", n_ctxt);
2401 test_htmlParseElement(void) {
2404 #if defined(LIBXML_HTML_ENABLED)
2406 htmlParserCtxtPtr ctxt; /* an HTML parser context */
2409 for (n_ctxt = 0;n_ctxt < gen_nb_htmlParserCtxtPtr;n_ctxt++) {
2410 mem_base = xmlMemBlocks();
2411 ctxt = gen_htmlParserCtxtPtr(n_ctxt, 0);
2413 htmlParseElement(ctxt);
2415 des_htmlParserCtxtPtr(n_ctxt, ctxt, 0);
2416 xmlResetLastError();
2417 if (mem_base != xmlMemBlocks()) {
2418 printf("Leak of %d blocks found in htmlParseElement",
2419 xmlMemBlocks() - mem_base);
2421 printf(" %d", n_ctxt);
2433 test_htmlParseEntityRef(void) {
2436 #if defined(LIBXML_HTML_ENABLED)
2438 const htmlEntityDesc * ret_val;
2439 htmlParserCtxtPtr ctxt; /* an HTML parser context */
2441 xmlChar ** str; /* location to store the entity name */
2444 for (n_ctxt = 0;n_ctxt < gen_nb_htmlParserCtxtPtr;n_ctxt++) {
2445 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr_ptr;n_str++) {
2446 mem_base = xmlMemBlocks();
2447 ctxt = gen_htmlParserCtxtPtr(n_ctxt, 0);
2448 str = gen_const_xmlChar_ptr_ptr(n_str, 1);
2450 ret_val = htmlParseEntityRef(ctxt, (const xmlChar **)str);
2451 desret_const_htmlEntityDesc_ptr(ret_val);
2453 des_htmlParserCtxtPtr(n_ctxt, ctxt, 0);
2454 des_const_xmlChar_ptr_ptr(n_str, (const xmlChar **)str, 1);
2455 xmlResetLastError();
2456 if (mem_base != xmlMemBlocks()) {
2457 printf("Leak of %d blocks found in htmlParseEntityRef",
2458 xmlMemBlocks() - mem_base);
2460 printf(" %d", n_ctxt);
2461 printf(" %d", n_str);
2474 test_htmlParseFile(void) {
2477 #if defined(LIBXML_HTML_ENABLED)
2479 const char * filename; /* the filename */
2481 char * encoding; /* a free form C string describing the HTML document encoding, or NULL */
2484 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
2485 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
2486 filename = gen_filepath(n_filename, 0);
2487 encoding = gen_const_char_ptr(n_encoding, 1);
2489 ret_val = htmlParseFile(filename, (const char *)encoding);
2490 desret_htmlDocPtr(ret_val);
2492 des_filepath(n_filename, filename, 0);
2493 des_const_char_ptr(n_encoding, (const char *)encoding, 1);
2494 xmlResetLastError();
2505 test_htmlReadDoc(void) {
2508 #if defined(LIBXML_HTML_ENABLED)
2511 xmlChar * cur; /* a pointer to a zero terminated string */
2513 const char * URL; /* the base URL to use for the document */
2515 char * encoding; /* the document encoding, or NULL */
2517 int options; /* a combination of htmlParserOption(s) */
2520 for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
2521 for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
2522 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
2523 for (n_options = 0;n_options < gen_nb_int;n_options++) {
2524 mem_base = xmlMemBlocks();
2525 cur = gen_const_xmlChar_ptr(n_cur, 0);
2526 URL = gen_filepath(n_URL, 1);
2527 encoding = gen_const_char_ptr(n_encoding, 2);
2528 options = gen_int(n_options, 3);
2530 ret_val = htmlReadDoc((const xmlChar *)cur, URL, (const char *)encoding, options);
2531 desret_htmlDocPtr(ret_val);
2533 des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 0);
2534 des_filepath(n_URL, URL, 1);
2535 des_const_char_ptr(n_encoding, (const char *)encoding, 2);
2536 des_int(n_options, options, 3);
2537 xmlResetLastError();
2538 if (mem_base != xmlMemBlocks()) {
2539 printf("Leak of %d blocks found in htmlReadDoc",
2540 xmlMemBlocks() - mem_base);
2542 printf(" %d", n_cur);
2543 printf(" %d", n_URL);
2544 printf(" %d", n_encoding);
2545 printf(" %d", n_options);
2560 test_htmlReadFile(void) {
2563 #if defined(LIBXML_HTML_ENABLED)
2566 const char * filename; /* a file or URL */
2568 char * encoding; /* the document encoding, or NULL */
2570 int options; /* a combination of htmlParserOption(s) */
2573 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
2574 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
2575 for (n_options = 0;n_options < gen_nb_int;n_options++) {
2576 mem_base = xmlMemBlocks();
2577 filename = gen_filepath(n_filename, 0);
2578 encoding = gen_const_char_ptr(n_encoding, 1);
2579 options = gen_int(n_options, 2);
2581 ret_val = htmlReadFile(filename, (const char *)encoding, options);
2582 desret_htmlDocPtr(ret_val);
2584 des_filepath(n_filename, filename, 0);
2585 des_const_char_ptr(n_encoding, (const char *)encoding, 1);
2586 des_int(n_options, options, 2);
2587 xmlResetLastError();
2588 if (mem_base != xmlMemBlocks()) {
2589 printf("Leak of %d blocks found in htmlReadFile",
2590 xmlMemBlocks() - mem_base);
2592 printf(" %d", n_filename);
2593 printf(" %d", n_encoding);
2594 printf(" %d", n_options);
2608 test_htmlReadMemory(void) {
2611 #if defined(LIBXML_HTML_ENABLED)
2614 char * buffer; /* a pointer to a char array */
2616 int size; /* the size of the array */
2618 const char * URL; /* the base URL to use for the document */
2620 char * encoding; /* the document encoding, or NULL */
2622 int options; /* a combination of htmlParserOption(s) */
2625 for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
2626 for (n_size = 0;n_size < gen_nb_int;n_size++) {
2627 for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
2628 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
2629 for (n_options = 0;n_options < gen_nb_int;n_options++) {
2630 mem_base = xmlMemBlocks();
2631 buffer = gen_const_char_ptr(n_buffer, 0);
2632 size = gen_int(n_size, 1);
2633 URL = gen_filepath(n_URL, 2);
2634 encoding = gen_const_char_ptr(n_encoding, 3);
2635 options = gen_int(n_options, 4);
2636 if ((buffer != NULL) &&
2637 (size > (int) strlen((const char *) buffer) + 1))
2640 ret_val = htmlReadMemory((const char *)buffer, size, URL, (const char *)encoding, options);
2641 desret_htmlDocPtr(ret_val);
2643 des_const_char_ptr(n_buffer, (const char *)buffer, 0);
2644 des_int(n_size, size, 1);
2645 des_filepath(n_URL, URL, 2);
2646 des_const_char_ptr(n_encoding, (const char *)encoding, 3);
2647 des_int(n_options, options, 4);
2648 xmlResetLastError();
2649 if (mem_base != xmlMemBlocks()) {
2650 printf("Leak of %d blocks found in htmlReadMemory",
2651 xmlMemBlocks() - mem_base);
2653 printf(" %d", n_buffer);
2654 printf(" %d", n_size);
2655 printf(" %d", n_URL);
2656 printf(" %d", n_encoding);
2657 printf(" %d", n_options);
2673 test_htmlSAXParseDoc(void) {
2676 #if defined(LIBXML_HTML_ENABLED)
2679 xmlChar * cur; /* a pointer to an array of xmlChar */
2681 char * encoding; /* a free form C string describing the HTML document encoding, or NULL */
2683 htmlSAXHandlerPtr sax; /* the SAX handler block */
2685 void * userData; /* if using SAX, this pointer will be provided on callbacks. */
2688 for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
2689 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
2690 for (n_sax = 0;n_sax < gen_nb_htmlSAXHandlerPtr;n_sax++) {
2691 for (n_userData = 0;n_userData < gen_nb_userdata;n_userData++) {
2692 mem_base = xmlMemBlocks();
2693 cur = gen_const_xmlChar_ptr(n_cur, 0);
2694 encoding = gen_const_char_ptr(n_encoding, 1);
2695 sax = gen_htmlSAXHandlerPtr(n_sax, 2);
2696 userData = gen_userdata(n_userData, 3);
2698 ret_val = htmlSAXParseDoc((const xmlChar *)cur, (const char *)encoding, sax, userData);
2699 desret_htmlDocPtr(ret_val);
2701 des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 0);
2702 des_const_char_ptr(n_encoding, (const char *)encoding, 1);
2703 des_htmlSAXHandlerPtr(n_sax, sax, 2);
2704 des_userdata(n_userData, userData, 3);
2705 xmlResetLastError();
2706 if (mem_base != xmlMemBlocks()) {
2707 printf("Leak of %d blocks found in htmlSAXParseDoc",
2708 xmlMemBlocks() - mem_base);
2710 printf(" %d", n_cur);
2711 printf(" %d", n_encoding);
2712 printf(" %d", n_sax);
2713 printf(" %d", n_userData);
2728 test_htmlSAXParseFile(void) {
2731 #if defined(LIBXML_HTML_ENABLED)
2734 const char * filename; /* the filename */
2736 char * encoding; /* a free form C string describing the HTML document encoding, or NULL */
2738 htmlSAXHandlerPtr sax; /* the SAX handler block */
2740 void * userData; /* if using SAX, this pointer will be provided on callbacks. */
2743 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
2744 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
2745 for (n_sax = 0;n_sax < gen_nb_htmlSAXHandlerPtr;n_sax++) {
2746 for (n_userData = 0;n_userData < gen_nb_userdata;n_userData++) {
2747 mem_base = xmlMemBlocks();
2748 filename = gen_filepath(n_filename, 0);
2749 encoding = gen_const_char_ptr(n_encoding, 1);
2750 sax = gen_htmlSAXHandlerPtr(n_sax, 2);
2751 userData = gen_userdata(n_userData, 3);
2753 ret_val = htmlSAXParseFile(filename, (const char *)encoding, sax, userData);
2754 desret_htmlDocPtr(ret_val);
2756 des_filepath(n_filename, filename, 0);
2757 des_const_char_ptr(n_encoding, (const char *)encoding, 1);
2758 des_htmlSAXHandlerPtr(n_sax, sax, 2);
2759 des_userdata(n_userData, userData, 3);
2760 xmlResetLastError();
2761 if (mem_base != xmlMemBlocks()) {
2762 printf("Leak of %d blocks found in htmlSAXParseFile",
2763 xmlMemBlocks() - mem_base);
2765 printf(" %d", n_filename);
2766 printf(" %d", n_encoding);
2767 printf(" %d", n_sax);
2768 printf(" %d", n_userData);
2783 test_htmlTagLookup(void) {
2787 /* missing type support */
2792 test_HTMLparser(void) {
2796 if (quiet == 0) printf("Testing HTMLparser : 32 of 38 functions ...\n");
2797 rc = test_UTF8ToHtml();
2798 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2799 rc = test_htmlAttrAllowed();
2800 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2801 rc = test_htmlAutoCloseTag();
2802 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2803 rc = test_htmlCreateMemoryParserCtxt();
2804 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2805 rc = test_htmlCreatePushParserCtxt();
2806 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2807 rc = test_htmlCtxtReadDoc();
2808 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2809 rc = test_htmlCtxtReadFile();
2810 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2811 rc = test_htmlCtxtReadMemory();
2812 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2813 rc = test_htmlCtxtReset();
2814 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2815 rc = test_htmlCtxtUseOptions();
2816 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2817 rc = test_htmlElementAllowedHere();
2818 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2819 rc = test_htmlElementStatusHere();
2820 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2821 rc = test_htmlEncodeEntities();
2822 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2823 rc = test_htmlEntityLookup();
2824 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2825 rc = test_htmlEntityValueLookup();
2826 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2827 rc = test_htmlHandleOmittedElem();
2828 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2829 rc = test_htmlIsAutoClosed();
2830 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2831 rc = test_htmlIsScriptAttribute();
2832 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2833 rc = test_htmlNewParserCtxt();
2834 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2835 rc = test_htmlNodeStatus();
2836 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2837 rc = test_htmlParseCharRef();
2838 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2839 rc = test_htmlParseChunk();
2840 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2841 rc = test_htmlParseDoc();
2842 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2843 rc = test_htmlParseDocument();
2844 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2845 rc = test_htmlParseElement();
2846 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2847 rc = test_htmlParseEntityRef();
2848 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2849 rc = test_htmlParseFile();
2850 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2851 rc = test_htmlReadDoc();
2852 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2853 rc = test_htmlReadFile();
2854 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2855 rc = test_htmlReadMemory();
2856 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2857 rc = test_htmlSAXParseDoc();
2858 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2859 rc = test_htmlSAXParseFile();
2860 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2861 rc = test_htmlTagLookup();
2862 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2865 printf("Module HTMLparser: %d errors\n", test_ret);
2870 test_htmlDocContentDumpFormatOutput(void) {
2873 #if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
2875 xmlOutputBufferPtr buf; /* the HTML buffer output */
2877 xmlDocPtr cur; /* the document */
2879 char * encoding; /* the encoding string */
2881 int format; /* should formatting spaces been added */
2884 for (n_buf = 0;n_buf < gen_nb_xmlOutputBufferPtr;n_buf++) {
2885 for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
2886 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
2887 for (n_format = 0;n_format < gen_nb_int;n_format++) {
2888 mem_base = xmlMemBlocks();
2889 buf = gen_xmlOutputBufferPtr(n_buf, 0);
2890 cur = gen_xmlDocPtr(n_cur, 1);
2891 encoding = gen_const_char_ptr(n_encoding, 2);
2892 format = gen_int(n_format, 3);
2894 htmlDocContentDumpFormatOutput(buf, cur, (const char *)encoding, format);
2896 des_xmlOutputBufferPtr(n_buf, buf, 0);
2897 des_xmlDocPtr(n_cur, cur, 1);
2898 des_const_char_ptr(n_encoding, (const char *)encoding, 2);
2899 des_int(n_format, format, 3);
2900 xmlResetLastError();
2901 if (mem_base != xmlMemBlocks()) {
2902 printf("Leak of %d blocks found in htmlDocContentDumpFormatOutput",
2903 xmlMemBlocks() - mem_base);
2905 printf(" %d", n_buf);
2906 printf(" %d", n_cur);
2907 printf(" %d", n_encoding);
2908 printf(" %d", n_format);
2923 test_htmlDocContentDumpOutput(void) {
2926 #if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
2928 xmlOutputBufferPtr buf; /* the HTML buffer output */
2930 xmlDocPtr cur; /* the document */
2932 char * encoding; /* the encoding string */
2935 for (n_buf = 0;n_buf < gen_nb_xmlOutputBufferPtr;n_buf++) {
2936 for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
2937 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
2938 mem_base = xmlMemBlocks();
2939 buf = gen_xmlOutputBufferPtr(n_buf, 0);
2940 cur = gen_xmlDocPtr(n_cur, 1);
2941 encoding = gen_const_char_ptr(n_encoding, 2);
2943 htmlDocContentDumpOutput(buf, cur, (const char *)encoding);
2945 des_xmlOutputBufferPtr(n_buf, buf, 0);
2946 des_xmlDocPtr(n_cur, cur, 1);
2947 des_const_char_ptr(n_encoding, (const char *)encoding, 2);
2948 xmlResetLastError();
2949 if (mem_base != xmlMemBlocks()) {
2950 printf("Leak of %d blocks found in htmlDocContentDumpOutput",
2951 xmlMemBlocks() - mem_base);
2953 printf(" %d", n_buf);
2954 printf(" %d", n_cur);
2955 printf(" %d", n_encoding);
2969 test_htmlDocDump(void) {
2972 #if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
2975 FILE * f; /* the FILE* */
2977 xmlDocPtr cur; /* the document */
2980 for (n_f = 0;n_f < gen_nb_FILE_ptr;n_f++) {
2981 for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
2982 mem_base = xmlMemBlocks();
2983 f = gen_FILE_ptr(n_f, 0);
2984 cur = gen_xmlDocPtr(n_cur, 1);
2986 ret_val = htmlDocDump(f, cur);
2987 desret_int(ret_val);
2989 des_FILE_ptr(n_f, f, 0);
2990 des_xmlDocPtr(n_cur, cur, 1);
2991 xmlResetLastError();
2992 if (mem_base != xmlMemBlocks()) {
2993 printf("Leak of %d blocks found in htmlDocDump",
2994 xmlMemBlocks() - mem_base);
2997 printf(" %d", n_cur);
3009 #define gen_nb_xmlChar_ptr_ptr 1
3010 static xmlChar ** gen_xmlChar_ptr_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
3013 static void des_xmlChar_ptr_ptr(int no ATTRIBUTE_UNUSED, xmlChar ** val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
3017 test_htmlDocDumpMemory(void) {
3020 #if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
3022 xmlDocPtr cur; /* the document */
3024 xmlChar ** mem; /* OUT: the memory pointer */
3026 int * size; /* OUT: the memory length */
3029 for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
3030 for (n_mem = 0;n_mem < gen_nb_xmlChar_ptr_ptr;n_mem++) {
3031 for (n_size = 0;n_size < gen_nb_int_ptr;n_size++) {
3032 mem_base = xmlMemBlocks();
3033 cur = gen_xmlDocPtr(n_cur, 0);
3034 mem = gen_xmlChar_ptr_ptr(n_mem, 1);
3035 size = gen_int_ptr(n_size, 2);
3037 htmlDocDumpMemory(cur, mem, size);
3039 des_xmlDocPtr(n_cur, cur, 0);
3040 des_xmlChar_ptr_ptr(n_mem, mem, 1);
3041 des_int_ptr(n_size, size, 2);
3042 xmlResetLastError();
3043 if (mem_base != xmlMemBlocks()) {
3044 printf("Leak of %d blocks found in htmlDocDumpMemory",
3045 xmlMemBlocks() - mem_base);
3047 printf(" %d", n_cur);
3048 printf(" %d", n_mem);
3049 printf(" %d", n_size);
3063 test_htmlDocDumpMemoryFormat(void) {
3066 #if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
3068 xmlDocPtr cur; /* the document */
3070 xmlChar ** mem; /* OUT: the memory pointer */
3072 int * size; /* OUT: the memory length */
3074 int format; /* should formatting spaces been added */
3077 for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
3078 for (n_mem = 0;n_mem < gen_nb_xmlChar_ptr_ptr;n_mem++) {
3079 for (n_size = 0;n_size < gen_nb_int_ptr;n_size++) {
3080 for (n_format = 0;n_format < gen_nb_int;n_format++) {
3081 mem_base = xmlMemBlocks();
3082 cur = gen_xmlDocPtr(n_cur, 0);
3083 mem = gen_xmlChar_ptr_ptr(n_mem, 1);
3084 size = gen_int_ptr(n_size, 2);
3085 format = gen_int(n_format, 3);
3087 htmlDocDumpMemoryFormat(cur, mem, size, format);
3089 des_xmlDocPtr(n_cur, cur, 0);
3090 des_xmlChar_ptr_ptr(n_mem, mem, 1);
3091 des_int_ptr(n_size, size, 2);
3092 des_int(n_format, format, 3);
3093 xmlResetLastError();
3094 if (mem_base != xmlMemBlocks()) {
3095 printf("Leak of %d blocks found in htmlDocDumpMemoryFormat",
3096 xmlMemBlocks() - mem_base);
3098 printf(" %d", n_cur);
3099 printf(" %d", n_mem);
3100 printf(" %d", n_size);
3101 printf(" %d", n_format);
3116 test_htmlGetMetaEncoding(void) {
3119 #if defined(LIBXML_HTML_ENABLED)
3121 const xmlChar * ret_val;
3122 htmlDocPtr doc; /* the document */
3125 for (n_doc = 0;n_doc < gen_nb_htmlDocPtr;n_doc++) {
3126 mem_base = xmlMemBlocks();
3127 doc = gen_htmlDocPtr(n_doc, 0);
3129 ret_val = htmlGetMetaEncoding(doc);
3130 desret_const_xmlChar_ptr(ret_val);
3132 des_htmlDocPtr(n_doc, doc, 0);
3133 xmlResetLastError();
3134 if (mem_base != xmlMemBlocks()) {
3135 printf("Leak of %d blocks found in htmlGetMetaEncoding",
3136 xmlMemBlocks() - mem_base);
3138 printf(" %d", n_doc);
3150 test_htmlIsBooleanAttr(void) {
3153 #if defined(LIBXML_HTML_ENABLED)
3156 xmlChar * name; /* the name of the attribute to check */
3159 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
3160 mem_base = xmlMemBlocks();
3161 name = gen_const_xmlChar_ptr(n_name, 0);
3163 ret_val = htmlIsBooleanAttr((const xmlChar *)name);
3164 desret_int(ret_val);
3166 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 0);
3167 xmlResetLastError();
3168 if (mem_base != xmlMemBlocks()) {
3169 printf("Leak of %d blocks found in htmlIsBooleanAttr",
3170 xmlMemBlocks() - mem_base);
3172 printf(" %d", n_name);
3184 test_htmlNewDoc(void) {
3187 #if defined(LIBXML_HTML_ENABLED)
3190 xmlChar * URI; /* URI for the dtd, or NULL */
3192 xmlChar * ExternalID; /* the external ID of the DTD, or NULL */
3195 for (n_URI = 0;n_URI < gen_nb_const_xmlChar_ptr;n_URI++) {
3196 for (n_ExternalID = 0;n_ExternalID < gen_nb_const_xmlChar_ptr;n_ExternalID++) {
3197 mem_base = xmlMemBlocks();
3198 URI = gen_const_xmlChar_ptr(n_URI, 0);
3199 ExternalID = gen_const_xmlChar_ptr(n_ExternalID, 1);
3201 ret_val = htmlNewDoc((const xmlChar *)URI, (const xmlChar *)ExternalID);
3202 desret_htmlDocPtr(ret_val);
3204 des_const_xmlChar_ptr(n_URI, (const xmlChar *)URI, 0);
3205 des_const_xmlChar_ptr(n_ExternalID, (const xmlChar *)ExternalID, 1);
3206 xmlResetLastError();
3207 if (mem_base != xmlMemBlocks()) {
3208 printf("Leak of %d blocks found in htmlNewDoc",
3209 xmlMemBlocks() - mem_base);
3211 printf(" %d", n_URI);
3212 printf(" %d", n_ExternalID);
3225 test_htmlNewDocNoDtD(void) {
3228 #if defined(LIBXML_HTML_ENABLED)
3231 xmlChar * URI; /* URI for the dtd, or NULL */
3233 xmlChar * ExternalID; /* the external ID of the DTD, or NULL */
3236 for (n_URI = 0;n_URI < gen_nb_const_xmlChar_ptr;n_URI++) {
3237 for (n_ExternalID = 0;n_ExternalID < gen_nb_const_xmlChar_ptr;n_ExternalID++) {
3238 mem_base = xmlMemBlocks();
3239 URI = gen_const_xmlChar_ptr(n_URI, 0);
3240 ExternalID = gen_const_xmlChar_ptr(n_ExternalID, 1);
3242 ret_val = htmlNewDocNoDtD((const xmlChar *)URI, (const xmlChar *)ExternalID);
3243 desret_htmlDocPtr(ret_val);
3245 des_const_xmlChar_ptr(n_URI, (const xmlChar *)URI, 0);
3246 des_const_xmlChar_ptr(n_ExternalID, (const xmlChar *)ExternalID, 1);
3247 xmlResetLastError();
3248 if (mem_base != xmlMemBlocks()) {
3249 printf("Leak of %d blocks found in htmlNewDocNoDtD",
3250 xmlMemBlocks() - mem_base);
3252 printf(" %d", n_URI);
3253 printf(" %d", n_ExternalID);
3266 test_htmlNodeDump(void) {
3269 #if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
3272 xmlBufferPtr buf; /* the HTML buffer output */
3274 xmlDocPtr doc; /* the document */
3276 xmlNodePtr cur; /* the current node */
3279 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
3280 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
3281 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
3282 mem_base = xmlMemBlocks();
3283 buf = gen_xmlBufferPtr(n_buf, 0);
3284 doc = gen_xmlDocPtr(n_doc, 1);
3285 cur = gen_xmlNodePtr(n_cur, 2);
3287 ret_val = htmlNodeDump(buf, doc, cur);
3288 desret_int(ret_val);
3290 des_xmlBufferPtr(n_buf, buf, 0);
3291 des_xmlDocPtr(n_doc, doc, 1);
3292 des_xmlNodePtr(n_cur, cur, 2);
3293 xmlResetLastError();
3294 if (mem_base != xmlMemBlocks()) {
3295 printf("Leak of %d blocks found in htmlNodeDump",
3296 xmlMemBlocks() - mem_base);
3298 printf(" %d", n_buf);
3299 printf(" %d", n_doc);
3300 printf(" %d", n_cur);
3314 test_htmlNodeDumpFile(void) {
3317 #if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
3319 FILE * out; /* the FILE pointer */
3321 xmlDocPtr doc; /* the document */
3323 xmlNodePtr cur; /* the current node */
3326 for (n_out = 0;n_out < gen_nb_FILE_ptr;n_out++) {
3327 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
3328 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
3329 mem_base = xmlMemBlocks();
3330 out = gen_FILE_ptr(n_out, 0);
3331 doc = gen_xmlDocPtr(n_doc, 1);
3332 cur = gen_xmlNodePtr(n_cur, 2);
3334 htmlNodeDumpFile(out, doc, cur);
3336 des_FILE_ptr(n_out, out, 0);
3337 des_xmlDocPtr(n_doc, doc, 1);
3338 des_xmlNodePtr(n_cur, cur, 2);
3339 xmlResetLastError();
3340 if (mem_base != xmlMemBlocks()) {
3341 printf("Leak of %d blocks found in htmlNodeDumpFile",
3342 xmlMemBlocks() - mem_base);
3344 printf(" %d", n_out);
3345 printf(" %d", n_doc);
3346 printf(" %d", n_cur);
3360 test_htmlNodeDumpFileFormat(void) {
3363 #if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
3366 FILE * out; /* the FILE pointer */
3368 xmlDocPtr doc; /* the document */
3370 xmlNodePtr cur; /* the current node */
3372 char * encoding; /* the document encoding */
3374 int format; /* should formatting spaces been added */
3377 for (n_out = 0;n_out < gen_nb_FILE_ptr;n_out++) {
3378 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
3379 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
3380 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
3381 for (n_format = 0;n_format < gen_nb_int;n_format++) {
3382 mem_base = xmlMemBlocks();
3383 out = gen_FILE_ptr(n_out, 0);
3384 doc = gen_xmlDocPtr(n_doc, 1);
3385 cur = gen_xmlNodePtr(n_cur, 2);
3386 encoding = gen_const_char_ptr(n_encoding, 3);
3387 format = gen_int(n_format, 4);
3389 ret_val = htmlNodeDumpFileFormat(out, doc, cur, (const char *)encoding, format);
3390 desret_int(ret_val);
3392 des_FILE_ptr(n_out, out, 0);
3393 des_xmlDocPtr(n_doc, doc, 1);
3394 des_xmlNodePtr(n_cur, cur, 2);
3395 des_const_char_ptr(n_encoding, (const char *)encoding, 3);
3396 des_int(n_format, format, 4);
3397 xmlResetLastError();
3398 if (mem_base != xmlMemBlocks()) {
3399 printf("Leak of %d blocks found in htmlNodeDumpFileFormat",
3400 xmlMemBlocks() - mem_base);
3402 printf(" %d", n_out);
3403 printf(" %d", n_doc);
3404 printf(" %d", n_cur);
3405 printf(" %d", n_encoding);
3406 printf(" %d", n_format);
3422 test_htmlNodeDumpFormatOutput(void) {
3425 #if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
3427 xmlOutputBufferPtr buf; /* the HTML buffer output */
3429 xmlDocPtr doc; /* the document */
3431 xmlNodePtr cur; /* the current node */
3433 char * encoding; /* the encoding string */
3435 int format; /* should formatting spaces been added */
3438 for (n_buf = 0;n_buf < gen_nb_xmlOutputBufferPtr;n_buf++) {
3439 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
3440 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
3441 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
3442 for (n_format = 0;n_format < gen_nb_int;n_format++) {
3443 mem_base = xmlMemBlocks();
3444 buf = gen_xmlOutputBufferPtr(n_buf, 0);
3445 doc = gen_xmlDocPtr(n_doc, 1);
3446 cur = gen_xmlNodePtr(n_cur, 2);
3447 encoding = gen_const_char_ptr(n_encoding, 3);
3448 format = gen_int(n_format, 4);
3450 htmlNodeDumpFormatOutput(buf, doc, cur, (const char *)encoding, format);
3452 des_xmlOutputBufferPtr(n_buf, buf, 0);
3453 des_xmlDocPtr(n_doc, doc, 1);
3454 des_xmlNodePtr(n_cur, cur, 2);
3455 des_const_char_ptr(n_encoding, (const char *)encoding, 3);
3456 des_int(n_format, format, 4);
3457 xmlResetLastError();
3458 if (mem_base != xmlMemBlocks()) {
3459 printf("Leak of %d blocks found in htmlNodeDumpFormatOutput",
3460 xmlMemBlocks() - mem_base);
3462 printf(" %d", n_buf);
3463 printf(" %d", n_doc);
3464 printf(" %d", n_cur);
3465 printf(" %d", n_encoding);
3466 printf(" %d", n_format);
3482 test_htmlNodeDumpOutput(void) {
3485 #if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
3487 xmlOutputBufferPtr buf; /* the HTML buffer output */
3489 xmlDocPtr doc; /* the document */
3491 xmlNodePtr cur; /* the current node */
3493 char * encoding; /* the encoding string */
3496 for (n_buf = 0;n_buf < gen_nb_xmlOutputBufferPtr;n_buf++) {
3497 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
3498 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
3499 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
3500 mem_base = xmlMemBlocks();
3501 buf = gen_xmlOutputBufferPtr(n_buf, 0);
3502 doc = gen_xmlDocPtr(n_doc, 1);
3503 cur = gen_xmlNodePtr(n_cur, 2);
3504 encoding = gen_const_char_ptr(n_encoding, 3);
3506 htmlNodeDumpOutput(buf, doc, cur, (const char *)encoding);
3508 des_xmlOutputBufferPtr(n_buf, buf, 0);
3509 des_xmlDocPtr(n_doc, doc, 1);
3510 des_xmlNodePtr(n_cur, cur, 2);
3511 des_const_char_ptr(n_encoding, (const char *)encoding, 3);
3512 xmlResetLastError();
3513 if (mem_base != xmlMemBlocks()) {
3514 printf("Leak of %d blocks found in htmlNodeDumpOutput",
3515 xmlMemBlocks() - mem_base);
3517 printf(" %d", n_buf);
3518 printf(" %d", n_doc);
3519 printf(" %d", n_cur);
3520 printf(" %d", n_encoding);
3535 test_htmlSaveFile(void) {
3538 #if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
3541 const char * filename; /* the filename (or URL) */
3543 xmlDocPtr cur; /* the document */
3546 for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
3547 for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
3548 mem_base = xmlMemBlocks();
3549 filename = gen_fileoutput(n_filename, 0);
3550 cur = gen_xmlDocPtr(n_cur, 1);
3552 ret_val = htmlSaveFile(filename, cur);
3553 desret_int(ret_val);
3555 des_fileoutput(n_filename, filename, 0);
3556 des_xmlDocPtr(n_cur, cur, 1);
3557 xmlResetLastError();
3558 if (mem_base != xmlMemBlocks()) {
3559 printf("Leak of %d blocks found in htmlSaveFile",
3560 xmlMemBlocks() - mem_base);
3562 printf(" %d", n_filename);
3563 printf(" %d", n_cur);
3576 test_htmlSaveFileEnc(void) {
3579 #if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
3582 const char * filename; /* the filename */
3584 xmlDocPtr cur; /* the document */
3586 char * encoding; /* the document encoding */
3589 for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
3590 for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
3591 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
3592 mem_base = xmlMemBlocks();
3593 filename = gen_fileoutput(n_filename, 0);
3594 cur = gen_xmlDocPtr(n_cur, 1);
3595 encoding = gen_const_char_ptr(n_encoding, 2);
3597 ret_val = htmlSaveFileEnc(filename, cur, (const char *)encoding);
3598 desret_int(ret_val);
3600 des_fileoutput(n_filename, filename, 0);
3601 des_xmlDocPtr(n_cur, cur, 1);
3602 des_const_char_ptr(n_encoding, (const char *)encoding, 2);
3603 xmlResetLastError();
3604 if (mem_base != xmlMemBlocks()) {
3605 printf("Leak of %d blocks found in htmlSaveFileEnc",
3606 xmlMemBlocks() - mem_base);
3608 printf(" %d", n_filename);
3609 printf(" %d", n_cur);
3610 printf(" %d", n_encoding);
3624 test_htmlSaveFileFormat(void) {
3627 #if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
3630 const char * filename; /* the filename */
3632 xmlDocPtr cur; /* the document */
3634 char * encoding; /* the document encoding */
3636 int format; /* should formatting spaces been added */
3639 for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
3640 for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
3641 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
3642 for (n_format = 0;n_format < gen_nb_int;n_format++) {
3643 mem_base = xmlMemBlocks();
3644 filename = gen_fileoutput(n_filename, 0);
3645 cur = gen_xmlDocPtr(n_cur, 1);
3646 encoding = gen_const_char_ptr(n_encoding, 2);
3647 format = gen_int(n_format, 3);
3649 ret_val = htmlSaveFileFormat(filename, cur, (const char *)encoding, format);
3650 desret_int(ret_val);
3652 des_fileoutput(n_filename, filename, 0);
3653 des_xmlDocPtr(n_cur, cur, 1);
3654 des_const_char_ptr(n_encoding, (const char *)encoding, 2);
3655 des_int(n_format, format, 3);
3656 xmlResetLastError();
3657 if (mem_base != xmlMemBlocks()) {
3658 printf("Leak of %d blocks found in htmlSaveFileFormat",
3659 xmlMemBlocks() - mem_base);
3661 printf(" %d", n_filename);
3662 printf(" %d", n_cur);
3663 printf(" %d", n_encoding);
3664 printf(" %d", n_format);
3679 test_htmlSetMetaEncoding(void) {
3682 #if defined(LIBXML_HTML_ENABLED)
3685 htmlDocPtr doc; /* the document */
3687 xmlChar * encoding; /* the encoding string */
3690 for (n_doc = 0;n_doc < gen_nb_htmlDocPtr;n_doc++) {
3691 for (n_encoding = 0;n_encoding < gen_nb_const_xmlChar_ptr;n_encoding++) {
3692 mem_base = xmlMemBlocks();
3693 doc = gen_htmlDocPtr(n_doc, 0);
3694 encoding = gen_const_xmlChar_ptr(n_encoding, 1);
3696 ret_val = htmlSetMetaEncoding(doc, (const xmlChar *)encoding);
3697 desret_int(ret_val);
3699 des_htmlDocPtr(n_doc, doc, 0);
3700 des_const_xmlChar_ptr(n_encoding, (const xmlChar *)encoding, 1);
3701 xmlResetLastError();
3702 if (mem_base != xmlMemBlocks()) {
3703 printf("Leak of %d blocks found in htmlSetMetaEncoding",
3704 xmlMemBlocks() - mem_base);
3706 printf(" %d", n_doc);
3707 printf(" %d", n_encoding);
3719 test_HTMLtree(void) {
3723 if (quiet == 0) printf("Testing HTMLtree : 18 of 18 functions ...\n");
3724 rc = test_htmlDocContentDumpFormatOutput();
3725 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
3726 rc = test_htmlDocContentDumpOutput();
3727 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
3728 rc = test_htmlDocDump();
3729 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
3730 rc = test_htmlDocDumpMemory();
3731 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
3732 rc = test_htmlDocDumpMemoryFormat();
3733 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
3734 rc = test_htmlGetMetaEncoding();
3735 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
3736 rc = test_htmlIsBooleanAttr();
3737 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
3738 rc = test_htmlNewDoc();
3739 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
3740 rc = test_htmlNewDocNoDtD();
3741 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
3742 rc = test_htmlNodeDump();
3743 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
3744 rc = test_htmlNodeDumpFile();
3745 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
3746 rc = test_htmlNodeDumpFileFormat();
3747 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
3748 rc = test_htmlNodeDumpFormatOutput();
3749 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
3750 rc = test_htmlNodeDumpOutput();
3751 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
3752 rc = test_htmlSaveFile();
3753 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
3754 rc = test_htmlSaveFileEnc();
3755 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
3756 rc = test_htmlSaveFileFormat();
3757 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
3758 rc = test_htmlSetMetaEncoding();
3759 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
3762 printf("Module HTMLtree: %d errors\n", test_ret);
3767 test_docbDefaultSAXHandlerInit(void) {
3770 #if defined(LIBXML_DOCB_ENABLED)
3771 #ifdef LIBXML_DOCB_ENABLED
3774 mem_base = xmlMemBlocks();
3776 docbDefaultSAXHandlerInit();
3778 xmlResetLastError();
3779 if (mem_base != xmlMemBlocks()) {
3780 printf("Leak of %d blocks found in docbDefaultSAXHandlerInit",
3781 xmlMemBlocks() - mem_base);
3794 test_htmlDefaultSAXHandlerInit(void) {
3797 #if defined(LIBXML_HTML_ENABLED)
3798 #ifdef LIBXML_HTML_ENABLED
3801 mem_base = xmlMemBlocks();
3803 htmlDefaultSAXHandlerInit();
3805 xmlResetLastError();
3806 if (mem_base != xmlMemBlocks()) {
3807 printf("Leak of %d blocks found in htmlDefaultSAXHandlerInit",
3808 xmlMemBlocks() - mem_base);
3821 test_xmlDefaultSAXHandlerInit(void) {
3826 mem_base = xmlMemBlocks();
3828 xmlDefaultSAXHandlerInit();
3830 xmlResetLastError();
3831 if (mem_base != xmlMemBlocks()) {
3832 printf("Leak of %d blocks found in xmlDefaultSAXHandlerInit",
3833 xmlMemBlocks() - mem_base);
3843 #define gen_nb_xmlEnumerationPtr 1
3844 static xmlEnumerationPtr gen_xmlEnumerationPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
3847 static void des_xmlEnumerationPtr(int no ATTRIBUTE_UNUSED, xmlEnumerationPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
3851 test_xmlSAX2AttributeDecl(void) {
3855 void * ctx; /* the user data (XML parser context) */
3857 xmlChar * elem; /* the name of the element */
3859 xmlChar * fullname; /* the attribute name */
3861 int type; /* the attribute type */
3863 int def; /* the type of default value */
3865 xmlChar * defaultValue; /* the attribute default value */
3867 xmlEnumerationPtr tree; /* the tree of enumerated value set */
3870 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
3871 for (n_elem = 0;n_elem < gen_nb_const_xmlChar_ptr;n_elem++) {
3872 for (n_fullname = 0;n_fullname < gen_nb_const_xmlChar_ptr;n_fullname++) {
3873 for (n_type = 0;n_type < gen_nb_int;n_type++) {
3874 for (n_def = 0;n_def < gen_nb_int;n_def++) {
3875 for (n_defaultValue = 0;n_defaultValue < gen_nb_const_xmlChar_ptr;n_defaultValue++) {
3876 for (n_tree = 0;n_tree < gen_nb_xmlEnumerationPtr;n_tree++) {
3877 mem_base = xmlMemBlocks();
3878 ctx = gen_void_ptr(n_ctx, 0);
3879 elem = gen_const_xmlChar_ptr(n_elem, 1);
3880 fullname = gen_const_xmlChar_ptr(n_fullname, 2);
3881 type = gen_int(n_type, 3);
3882 def = gen_int(n_def, 4);
3883 defaultValue = gen_const_xmlChar_ptr(n_defaultValue, 5);
3884 tree = gen_xmlEnumerationPtr(n_tree, 6);
3886 xmlSAX2AttributeDecl(ctx, (const xmlChar *)elem, (const xmlChar *)fullname, type, def, (const xmlChar *)defaultValue, tree);
3888 des_void_ptr(n_ctx, ctx, 0);
3889 des_const_xmlChar_ptr(n_elem, (const xmlChar *)elem, 1);
3890 des_const_xmlChar_ptr(n_fullname, (const xmlChar *)fullname, 2);
3891 des_int(n_type, type, 3);
3892 des_int(n_def, def, 4);
3893 des_const_xmlChar_ptr(n_defaultValue, (const xmlChar *)defaultValue, 5);
3894 des_xmlEnumerationPtr(n_tree, tree, 6);
3895 xmlResetLastError();
3896 if (mem_base != xmlMemBlocks()) {
3897 printf("Leak of %d blocks found in xmlSAX2AttributeDecl",
3898 xmlMemBlocks() - mem_base);
3900 printf(" %d", n_ctx);
3901 printf(" %d", n_elem);
3902 printf(" %d", n_fullname);
3903 printf(" %d", n_type);
3904 printf(" %d", n_def);
3905 printf(" %d", n_defaultValue);
3906 printf(" %d", n_tree);
3923 test_xmlSAX2CDataBlock(void) {
3927 void * ctx; /* the user data (XML parser context) */
3929 xmlChar * value; /* The pcdata content */
3931 int len; /* the block length */
3934 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
3935 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
3936 for (n_len = 0;n_len < gen_nb_int;n_len++) {
3937 mem_base = xmlMemBlocks();
3938 ctx = gen_void_ptr(n_ctx, 0);
3939 value = gen_const_xmlChar_ptr(n_value, 1);
3940 len = gen_int(n_len, 2);
3941 if ((value != NULL) &&
3942 (len > (int) strlen((const char *) value) + 1))
3945 xmlSAX2CDataBlock(ctx, (const xmlChar *)value, len);
3947 des_void_ptr(n_ctx, ctx, 0);
3948 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 1);
3949 des_int(n_len, len, 2);
3950 xmlResetLastError();
3951 if (mem_base != xmlMemBlocks()) {
3952 printf("Leak of %d blocks found in xmlSAX2CDataBlock",
3953 xmlMemBlocks() - mem_base);
3955 printf(" %d", n_ctx);
3956 printf(" %d", n_value);
3957 printf(" %d", n_len);
3970 test_xmlSAX2Characters(void) {
3974 void * ctx; /* the user data (XML parser context) */
3976 xmlChar * ch; /* a xmlChar string */
3978 int len; /* the number of xmlChar */
3981 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
3982 for (n_ch = 0;n_ch < gen_nb_const_xmlChar_ptr;n_ch++) {
3983 for (n_len = 0;n_len < gen_nb_int;n_len++) {
3984 mem_base = xmlMemBlocks();
3985 ctx = gen_void_ptr(n_ctx, 0);
3986 ch = gen_const_xmlChar_ptr(n_ch, 1);
3987 len = gen_int(n_len, 2);
3989 (len > (int) strlen((const char *) ch) + 1))
3992 xmlSAX2Characters(ctx, (const xmlChar *)ch, len);
3994 des_void_ptr(n_ctx, ctx, 0);
3995 des_const_xmlChar_ptr(n_ch, (const xmlChar *)ch, 1);
3996 des_int(n_len, len, 2);
3997 xmlResetLastError();
3998 if (mem_base != xmlMemBlocks()) {
3999 printf("Leak of %d blocks found in xmlSAX2Characters",
4000 xmlMemBlocks() - mem_base);
4002 printf(" %d", n_ctx);
4003 printf(" %d", n_ch);
4004 printf(" %d", n_len);
4017 test_xmlSAX2Comment(void) {
4021 void * ctx; /* the user data (XML parser context) */
4023 xmlChar * value; /* the xmlSAX2Comment content */
4026 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
4027 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
4028 mem_base = xmlMemBlocks();
4029 ctx = gen_void_ptr(n_ctx, 0);
4030 value = gen_const_xmlChar_ptr(n_value, 1);
4032 xmlSAX2Comment(ctx, (const xmlChar *)value);
4034 des_void_ptr(n_ctx, ctx, 0);
4035 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 1);
4036 xmlResetLastError();
4037 if (mem_base != xmlMemBlocks()) {
4038 printf("Leak of %d blocks found in xmlSAX2Comment",
4039 xmlMemBlocks() - mem_base);
4041 printf(" %d", n_ctx);
4042 printf(" %d", n_value);
4054 test_xmlSAX2ElementDecl(void) {
4058 void * ctx; /* the user data (XML parser context) */
4060 xmlChar * name; /* the element name */
4062 int type; /* the element type */
4064 xmlElementContentPtr content; /* the element value tree */
4067 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
4068 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
4069 for (n_type = 0;n_type < gen_nb_int;n_type++) {
4070 for (n_content = 0;n_content < gen_nb_xmlElementContentPtr;n_content++) {
4071 mem_base = xmlMemBlocks();
4072 ctx = gen_void_ptr(n_ctx, 0);
4073 name = gen_const_xmlChar_ptr(n_name, 1);
4074 type = gen_int(n_type, 2);
4075 content = gen_xmlElementContentPtr(n_content, 3);
4077 xmlSAX2ElementDecl(ctx, (const xmlChar *)name, type, content);
4079 des_void_ptr(n_ctx, ctx, 0);
4080 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
4081 des_int(n_type, type, 2);
4082 des_xmlElementContentPtr(n_content, content, 3);
4083 xmlResetLastError();
4084 if (mem_base != xmlMemBlocks()) {
4085 printf("Leak of %d blocks found in xmlSAX2ElementDecl",
4086 xmlMemBlocks() - mem_base);
4088 printf(" %d", n_ctx);
4089 printf(" %d", n_name);
4090 printf(" %d", n_type);
4091 printf(" %d", n_content);
4105 test_xmlSAX2EndDocument(void) {
4109 void * ctx; /* the user data (XML parser context) */
4112 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
4113 mem_base = xmlMemBlocks();
4114 ctx = gen_void_ptr(n_ctx, 0);
4116 xmlSAX2EndDocument(ctx);
4118 des_void_ptr(n_ctx, ctx, 0);
4119 xmlResetLastError();
4120 if (mem_base != xmlMemBlocks()) {
4121 printf("Leak of %d blocks found in xmlSAX2EndDocument",
4122 xmlMemBlocks() - mem_base);
4124 printf(" %d", n_ctx);
4135 test_xmlSAX2EndElement(void) {
4138 #if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
4139 #ifdef LIBXML_SAX1_ENABLED
4141 void * ctx; /* the user data (XML parser context) */
4143 xmlChar * name; /* The element name */
4146 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
4147 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
4148 mem_base = xmlMemBlocks();
4149 ctx = gen_void_ptr(n_ctx, 0);
4150 name = gen_const_xmlChar_ptr(n_name, 1);
4152 xmlSAX2EndElement(ctx, (const xmlChar *)name);
4154 des_void_ptr(n_ctx, ctx, 0);
4155 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
4156 xmlResetLastError();
4157 if (mem_base != xmlMemBlocks()) {
4158 printf("Leak of %d blocks found in xmlSAX2EndElement",
4159 xmlMemBlocks() - mem_base);
4161 printf(" %d", n_ctx);
4162 printf(" %d", n_name);
4176 test_xmlSAX2EndElementNs(void) {
4180 void * ctx; /* the user data (XML parser context) */
4182 xmlChar * localname; /* the local name of the element */
4184 xmlChar * prefix; /* the element namespace prefix if available */
4186 xmlChar * URI; /* the element namespace name if available */
4189 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
4190 for (n_localname = 0;n_localname < gen_nb_const_xmlChar_ptr;n_localname++) {
4191 for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
4192 for (n_URI = 0;n_URI < gen_nb_const_xmlChar_ptr;n_URI++) {
4193 mem_base = xmlMemBlocks();
4194 ctx = gen_void_ptr(n_ctx, 0);
4195 localname = gen_const_xmlChar_ptr(n_localname, 1);
4196 prefix = gen_const_xmlChar_ptr(n_prefix, 2);
4197 URI = gen_const_xmlChar_ptr(n_URI, 3);
4199 xmlSAX2EndElementNs(ctx, (const xmlChar *)localname, (const xmlChar *)prefix, (const xmlChar *)URI);
4201 des_void_ptr(n_ctx, ctx, 0);
4202 des_const_xmlChar_ptr(n_localname, (const xmlChar *)localname, 1);
4203 des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 2);
4204 des_const_xmlChar_ptr(n_URI, (const xmlChar *)URI, 3);
4205 xmlResetLastError();
4206 if (mem_base != xmlMemBlocks()) {
4207 printf("Leak of %d blocks found in xmlSAX2EndElementNs",
4208 xmlMemBlocks() - mem_base);
4210 printf(" %d", n_ctx);
4211 printf(" %d", n_localname);
4212 printf(" %d", n_prefix);
4213 printf(" %d", n_URI);
4227 test_xmlSAX2EntityDecl(void) {
4231 void * ctx; /* the user data (XML parser context) */
4233 xmlChar * name; /* the entity name */
4235 int type; /* the entity type */
4237 xmlChar * publicId; /* The public ID of the entity */
4239 xmlChar * systemId; /* The system ID of the entity */
4241 xmlChar * content; /* the entity value (without processing). */
4244 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
4245 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
4246 for (n_type = 0;n_type < gen_nb_int;n_type++) {
4247 for (n_publicId = 0;n_publicId < gen_nb_const_xmlChar_ptr;n_publicId++) {
4248 for (n_systemId = 0;n_systemId < gen_nb_const_xmlChar_ptr;n_systemId++) {
4249 for (n_content = 0;n_content < gen_nb_xmlChar_ptr;n_content++) {
4250 mem_base = xmlMemBlocks();
4251 ctx = gen_void_ptr(n_ctx, 0);
4252 name = gen_const_xmlChar_ptr(n_name, 1);
4253 type = gen_int(n_type, 2);
4254 publicId = gen_const_xmlChar_ptr(n_publicId, 3);
4255 systemId = gen_const_xmlChar_ptr(n_systemId, 4);
4256 content = gen_xmlChar_ptr(n_content, 5);
4258 xmlSAX2EntityDecl(ctx, (const xmlChar *)name, type, (const xmlChar *)publicId, (const xmlChar *)systemId, content);
4260 des_void_ptr(n_ctx, ctx, 0);
4261 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
4262 des_int(n_type, type, 2);
4263 des_const_xmlChar_ptr(n_publicId, (const xmlChar *)publicId, 3);
4264 des_const_xmlChar_ptr(n_systemId, (const xmlChar *)systemId, 4);
4265 des_xmlChar_ptr(n_content, content, 5);
4266 xmlResetLastError();
4267 if (mem_base != xmlMemBlocks()) {
4268 printf("Leak of %d blocks found in xmlSAX2EntityDecl",
4269 xmlMemBlocks() - mem_base);
4271 printf(" %d", n_ctx);
4272 printf(" %d", n_name);
4273 printf(" %d", n_type);
4274 printf(" %d", n_publicId);
4275 printf(" %d", n_systemId);
4276 printf(" %d", n_content);
4292 test_xmlSAX2ExternalSubset(void) {
4296 void * ctx; /* the user data (XML parser context) */
4298 xmlChar * name; /* the root element name */
4300 xmlChar * ExternalID; /* the external ID */
4302 xmlChar * SystemID; /* the SYSTEM ID (e.g. filename or URL) */
4305 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
4306 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
4307 for (n_ExternalID = 0;n_ExternalID < gen_nb_const_xmlChar_ptr;n_ExternalID++) {
4308 for (n_SystemID = 0;n_SystemID < gen_nb_const_xmlChar_ptr;n_SystemID++) {
4309 mem_base = xmlMemBlocks();
4310 ctx = gen_void_ptr(n_ctx, 0);
4311 name = gen_const_xmlChar_ptr(n_name, 1);
4312 ExternalID = gen_const_xmlChar_ptr(n_ExternalID, 2);
4313 SystemID = gen_const_xmlChar_ptr(n_SystemID, 3);
4315 xmlSAX2ExternalSubset(ctx, (const xmlChar *)name, (const xmlChar *)ExternalID, (const xmlChar *)SystemID);
4317 des_void_ptr(n_ctx, ctx, 0);
4318 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
4319 des_const_xmlChar_ptr(n_ExternalID, (const xmlChar *)ExternalID, 2);
4320 des_const_xmlChar_ptr(n_SystemID, (const xmlChar *)SystemID, 3);
4321 xmlResetLastError();
4322 if (mem_base != xmlMemBlocks()) {
4323 printf("Leak of %d blocks found in xmlSAX2ExternalSubset",
4324 xmlMemBlocks() - mem_base);
4326 printf(" %d", n_ctx);
4327 printf(" %d", n_name);
4328 printf(" %d", n_ExternalID);
4329 printf(" %d", n_SystemID);
4343 test_xmlSAX2GetColumnNumber(void) {
4348 void * ctx; /* the user data (XML parser context) */
4351 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
4352 mem_base = xmlMemBlocks();
4353 ctx = gen_void_ptr(n_ctx, 0);
4355 ret_val = xmlSAX2GetColumnNumber(ctx);
4356 desret_int(ret_val);
4358 des_void_ptr(n_ctx, ctx, 0);
4359 xmlResetLastError();
4360 if (mem_base != xmlMemBlocks()) {
4361 printf("Leak of %d blocks found in xmlSAX2GetColumnNumber",
4362 xmlMemBlocks() - mem_base);
4364 printf(" %d", n_ctx);
4375 test_xmlSAX2GetEntity(void) {
4379 xmlEntityPtr ret_val;
4380 void * ctx; /* the user data (XML parser context) */
4382 xmlChar * name; /* The entity name */
4385 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
4386 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
4387 mem_base = xmlMemBlocks();
4388 ctx = gen_void_ptr(n_ctx, 0);
4389 name = gen_const_xmlChar_ptr(n_name, 1);
4391 ret_val = xmlSAX2GetEntity(ctx, (const xmlChar *)name);
4392 desret_xmlEntityPtr(ret_val);
4394 des_void_ptr(n_ctx, ctx, 0);
4395 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
4396 xmlResetLastError();
4397 if (mem_base != xmlMemBlocks()) {
4398 printf("Leak of %d blocks found in xmlSAX2GetEntity",
4399 xmlMemBlocks() - mem_base);
4401 printf(" %d", n_ctx);
4402 printf(" %d", n_name);
4414 test_xmlSAX2GetLineNumber(void) {
4419 void * ctx; /* the user data (XML parser context) */
4422 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
4423 mem_base = xmlMemBlocks();
4424 ctx = gen_void_ptr(n_ctx, 0);
4426 ret_val = xmlSAX2GetLineNumber(ctx);
4427 desret_int(ret_val);
4429 des_void_ptr(n_ctx, ctx, 0);
4430 xmlResetLastError();
4431 if (mem_base != xmlMemBlocks()) {
4432 printf("Leak of %d blocks found in xmlSAX2GetLineNumber",
4433 xmlMemBlocks() - mem_base);
4435 printf(" %d", n_ctx);
4446 test_xmlSAX2GetParameterEntity(void) {
4450 xmlEntityPtr ret_val;
4451 void * ctx; /* the user data (XML parser context) */
4453 xmlChar * name; /* The entity name */
4456 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
4457 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
4458 mem_base = xmlMemBlocks();
4459 ctx = gen_void_ptr(n_ctx, 0);
4460 name = gen_const_xmlChar_ptr(n_name, 1);
4462 ret_val = xmlSAX2GetParameterEntity(ctx, (const xmlChar *)name);
4463 desret_xmlEntityPtr(ret_val);
4465 des_void_ptr(n_ctx, ctx, 0);
4466 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
4467 xmlResetLastError();
4468 if (mem_base != xmlMemBlocks()) {
4469 printf("Leak of %d blocks found in xmlSAX2GetParameterEntity",
4470 xmlMemBlocks() - mem_base);
4472 printf(" %d", n_ctx);
4473 printf(" %d", n_name);
4485 test_xmlSAX2GetPublicId(void) {
4489 const xmlChar * ret_val;
4490 void * ctx; /* the user data (XML parser context) */
4493 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
4494 mem_base = xmlMemBlocks();
4495 ctx = gen_void_ptr(n_ctx, 0);
4497 ret_val = xmlSAX2GetPublicId(ctx);
4498 desret_const_xmlChar_ptr(ret_val);
4500 des_void_ptr(n_ctx, ctx, 0);
4501 xmlResetLastError();
4502 if (mem_base != xmlMemBlocks()) {
4503 printf("Leak of %d blocks found in xmlSAX2GetPublicId",
4504 xmlMemBlocks() - mem_base);
4506 printf(" %d", n_ctx);
4517 test_xmlSAX2GetSystemId(void) {
4521 const xmlChar * ret_val;
4522 void * ctx; /* the user data (XML parser context) */
4525 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
4526 mem_base = xmlMemBlocks();
4527 ctx = gen_void_ptr(n_ctx, 0);
4529 ret_val = xmlSAX2GetSystemId(ctx);
4530 desret_const_xmlChar_ptr(ret_val);
4532 des_void_ptr(n_ctx, ctx, 0);
4533 xmlResetLastError();
4534 if (mem_base != xmlMemBlocks()) {
4535 printf("Leak of %d blocks found in xmlSAX2GetSystemId",
4536 xmlMemBlocks() - mem_base);
4538 printf(" %d", n_ctx);
4549 test_xmlSAX2HasExternalSubset(void) {
4554 void * ctx; /* the user data (XML parser context) */
4557 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
4558 mem_base = xmlMemBlocks();
4559 ctx = gen_void_ptr(n_ctx, 0);
4561 ret_val = xmlSAX2HasExternalSubset(ctx);
4562 desret_int(ret_val);
4564 des_void_ptr(n_ctx, ctx, 0);
4565 xmlResetLastError();
4566 if (mem_base != xmlMemBlocks()) {
4567 printf("Leak of %d blocks found in xmlSAX2HasExternalSubset",
4568 xmlMemBlocks() - mem_base);
4570 printf(" %d", n_ctx);
4581 test_xmlSAX2HasInternalSubset(void) {
4586 void * ctx; /* the user data (XML parser context) */
4589 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
4590 mem_base = xmlMemBlocks();
4591 ctx = gen_void_ptr(n_ctx, 0);
4593 ret_val = xmlSAX2HasInternalSubset(ctx);
4594 desret_int(ret_val);
4596 des_void_ptr(n_ctx, ctx, 0);
4597 xmlResetLastError();
4598 if (mem_base != xmlMemBlocks()) {
4599 printf("Leak of %d blocks found in xmlSAX2HasInternalSubset",
4600 xmlMemBlocks() - mem_base);
4602 printf(" %d", n_ctx);
4613 test_xmlSAX2IgnorableWhitespace(void) {
4617 void * ctx; /* the user data (XML parser context) */
4619 xmlChar * ch; /* a xmlChar string */
4621 int len; /* the number of xmlChar */
4624 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
4625 for (n_ch = 0;n_ch < gen_nb_const_xmlChar_ptr;n_ch++) {
4626 for (n_len = 0;n_len < gen_nb_int;n_len++) {
4627 mem_base = xmlMemBlocks();
4628 ctx = gen_void_ptr(n_ctx, 0);
4629 ch = gen_const_xmlChar_ptr(n_ch, 1);
4630 len = gen_int(n_len, 2);
4632 (len > (int) strlen((const char *) ch) + 1))
4635 xmlSAX2IgnorableWhitespace(ctx, (const xmlChar *)ch, len);
4637 des_void_ptr(n_ctx, ctx, 0);
4638 des_const_xmlChar_ptr(n_ch, (const xmlChar *)ch, 1);
4639 des_int(n_len, len, 2);
4640 xmlResetLastError();
4641 if (mem_base != xmlMemBlocks()) {
4642 printf("Leak of %d blocks found in xmlSAX2IgnorableWhitespace",
4643 xmlMemBlocks() - mem_base);
4645 printf(" %d", n_ctx);
4646 printf(" %d", n_ch);
4647 printf(" %d", n_len);
4659 #define gen_nb_xmlSAXHandler_ptr 1
4660 static xmlSAXHandler * gen_xmlSAXHandler_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
4663 static void des_xmlSAXHandler_ptr(int no ATTRIBUTE_UNUSED, xmlSAXHandler * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
4667 test_xmlSAX2InitDefaultSAXHandler(void) {
4671 xmlSAXHandler * hdlr; /* the SAX handler */
4673 int warning; /* flag if non-zero sets the handler warning procedure */
4676 for (n_hdlr = 0;n_hdlr < gen_nb_xmlSAXHandler_ptr;n_hdlr++) {
4677 for (n_warning = 0;n_warning < gen_nb_int;n_warning++) {
4678 mem_base = xmlMemBlocks();
4679 hdlr = gen_xmlSAXHandler_ptr(n_hdlr, 0);
4680 warning = gen_int(n_warning, 1);
4682 xmlSAX2InitDefaultSAXHandler(hdlr, warning);
4684 des_xmlSAXHandler_ptr(n_hdlr, hdlr, 0);
4685 des_int(n_warning, warning, 1);
4686 xmlResetLastError();
4687 if (mem_base != xmlMemBlocks()) {
4688 printf("Leak of %d blocks found in xmlSAX2InitDefaultSAXHandler",
4689 xmlMemBlocks() - mem_base);
4691 printf(" %d", n_hdlr);
4692 printf(" %d", n_warning);
4704 test_xmlSAX2InitDocbDefaultSAXHandler(void) {
4707 #if defined(LIBXML_DOCB_ENABLED)
4709 xmlSAXHandler * hdlr; /* the SAX handler */
4712 for (n_hdlr = 0;n_hdlr < gen_nb_xmlSAXHandler_ptr;n_hdlr++) {
4713 mem_base = xmlMemBlocks();
4714 hdlr = gen_xmlSAXHandler_ptr(n_hdlr, 0);
4716 xmlSAX2InitDocbDefaultSAXHandler(hdlr);
4718 des_xmlSAXHandler_ptr(n_hdlr, hdlr, 0);
4719 xmlResetLastError();
4720 if (mem_base != xmlMemBlocks()) {
4721 printf("Leak of %d blocks found in xmlSAX2InitDocbDefaultSAXHandler",
4722 xmlMemBlocks() - mem_base);
4724 printf(" %d", n_hdlr);
4736 test_xmlSAX2InitHtmlDefaultSAXHandler(void) {
4739 #if defined(LIBXML_HTML_ENABLED)
4741 xmlSAXHandler * hdlr; /* the SAX handler */
4744 for (n_hdlr = 0;n_hdlr < gen_nb_xmlSAXHandler_ptr;n_hdlr++) {
4745 mem_base = xmlMemBlocks();
4746 hdlr = gen_xmlSAXHandler_ptr(n_hdlr, 0);
4748 xmlSAX2InitHtmlDefaultSAXHandler(hdlr);
4750 des_xmlSAXHandler_ptr(n_hdlr, hdlr, 0);
4751 xmlResetLastError();
4752 if (mem_base != xmlMemBlocks()) {
4753 printf("Leak of %d blocks found in xmlSAX2InitHtmlDefaultSAXHandler",
4754 xmlMemBlocks() - mem_base);
4756 printf(" %d", n_hdlr);
4768 test_xmlSAX2InternalSubset(void) {
4772 void * ctx; /* the user data (XML parser context) */
4774 xmlChar * name; /* the root element name */
4776 xmlChar * ExternalID; /* the external ID */
4778 xmlChar * SystemID; /* the SYSTEM ID (e.g. filename or URL) */
4781 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
4782 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
4783 for (n_ExternalID = 0;n_ExternalID < gen_nb_const_xmlChar_ptr;n_ExternalID++) {
4784 for (n_SystemID = 0;n_SystemID < gen_nb_const_xmlChar_ptr;n_SystemID++) {
4785 mem_base = xmlMemBlocks();
4786 ctx = gen_void_ptr(n_ctx, 0);
4787 name = gen_const_xmlChar_ptr(n_name, 1);
4788 ExternalID = gen_const_xmlChar_ptr(n_ExternalID, 2);
4789 SystemID = gen_const_xmlChar_ptr(n_SystemID, 3);
4791 xmlSAX2InternalSubset(ctx, (const xmlChar *)name, (const xmlChar *)ExternalID, (const xmlChar *)SystemID);
4793 des_void_ptr(n_ctx, ctx, 0);
4794 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
4795 des_const_xmlChar_ptr(n_ExternalID, (const xmlChar *)ExternalID, 2);
4796 des_const_xmlChar_ptr(n_SystemID, (const xmlChar *)SystemID, 3);
4797 xmlResetLastError();
4798 if (mem_base != xmlMemBlocks()) {
4799 printf("Leak of %d blocks found in xmlSAX2InternalSubset",
4800 xmlMemBlocks() - mem_base);
4802 printf(" %d", n_ctx);
4803 printf(" %d", n_name);
4804 printf(" %d", n_ExternalID);
4805 printf(" %d", n_SystemID);
4819 test_xmlSAX2IsStandalone(void) {
4824 void * ctx; /* the user data (XML parser context) */
4827 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
4828 mem_base = xmlMemBlocks();
4829 ctx = gen_void_ptr(n_ctx, 0);
4831 ret_val = xmlSAX2IsStandalone(ctx);
4832 desret_int(ret_val);
4834 des_void_ptr(n_ctx, ctx, 0);
4835 xmlResetLastError();
4836 if (mem_base != xmlMemBlocks()) {
4837 printf("Leak of %d blocks found in xmlSAX2IsStandalone",
4838 xmlMemBlocks() - mem_base);
4840 printf(" %d", n_ctx);
4851 test_xmlSAX2NotationDecl(void) {
4855 void * ctx; /* the user data (XML parser context) */
4857 xmlChar * name; /* The name of the notation */
4859 xmlChar * publicId; /* The public ID of the entity */
4861 xmlChar * systemId; /* The system ID of the entity */
4864 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
4865 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
4866 for (n_publicId = 0;n_publicId < gen_nb_const_xmlChar_ptr;n_publicId++) {
4867 for (n_systemId = 0;n_systemId < gen_nb_const_xmlChar_ptr;n_systemId++) {
4868 mem_base = xmlMemBlocks();
4869 ctx = gen_void_ptr(n_ctx, 0);
4870 name = gen_const_xmlChar_ptr(n_name, 1);
4871 publicId = gen_const_xmlChar_ptr(n_publicId, 2);
4872 systemId = gen_const_xmlChar_ptr(n_systemId, 3);
4874 xmlSAX2NotationDecl(ctx, (const xmlChar *)name, (const xmlChar *)publicId, (const xmlChar *)systemId);
4876 des_void_ptr(n_ctx, ctx, 0);
4877 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
4878 des_const_xmlChar_ptr(n_publicId, (const xmlChar *)publicId, 2);
4879 des_const_xmlChar_ptr(n_systemId, (const xmlChar *)systemId, 3);
4880 xmlResetLastError();
4881 if (mem_base != xmlMemBlocks()) {
4882 printf("Leak of %d blocks found in xmlSAX2NotationDecl",
4883 xmlMemBlocks() - mem_base);
4885 printf(" %d", n_ctx);
4886 printf(" %d", n_name);
4887 printf(" %d", n_publicId);
4888 printf(" %d", n_systemId);
4902 test_xmlSAX2ProcessingInstruction(void) {
4906 void * ctx; /* the user data (XML parser context) */
4908 xmlChar * target; /* the target name */
4910 xmlChar * data; /* the PI data's */
4913 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
4914 for (n_target = 0;n_target < gen_nb_const_xmlChar_ptr;n_target++) {
4915 for (n_data = 0;n_data < gen_nb_const_xmlChar_ptr;n_data++) {
4916 mem_base = xmlMemBlocks();
4917 ctx = gen_void_ptr(n_ctx, 0);
4918 target = gen_const_xmlChar_ptr(n_target, 1);
4919 data = gen_const_xmlChar_ptr(n_data, 2);
4921 xmlSAX2ProcessingInstruction(ctx, (const xmlChar *)target, (const xmlChar *)data);
4923 des_void_ptr(n_ctx, ctx, 0);
4924 des_const_xmlChar_ptr(n_target, (const xmlChar *)target, 1);
4925 des_const_xmlChar_ptr(n_data, (const xmlChar *)data, 2);
4926 xmlResetLastError();
4927 if (mem_base != xmlMemBlocks()) {
4928 printf("Leak of %d blocks found in xmlSAX2ProcessingInstruction",
4929 xmlMemBlocks() - mem_base);
4931 printf(" %d", n_ctx);
4932 printf(" %d", n_target);
4933 printf(" %d", n_data);
4946 test_xmlSAX2Reference(void) {
4950 void * ctx; /* the user data (XML parser context) */
4952 xmlChar * name; /* The entity name */
4955 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
4956 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
4957 mem_base = xmlMemBlocks();
4958 ctx = gen_void_ptr(n_ctx, 0);
4959 name = gen_const_xmlChar_ptr(n_name, 1);
4961 xmlSAX2Reference(ctx, (const xmlChar *)name);
4963 des_void_ptr(n_ctx, ctx, 0);
4964 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
4965 xmlResetLastError();
4966 if (mem_base != xmlMemBlocks()) {
4967 printf("Leak of %d blocks found in xmlSAX2Reference",
4968 xmlMemBlocks() - mem_base);
4970 printf(" %d", n_ctx);
4971 printf(" %d", n_name);
4983 test_xmlSAX2ResolveEntity(void) {
4987 xmlParserInputPtr ret_val;
4988 void * ctx; /* the user data (XML parser context) */
4990 xmlChar * publicId; /* The public ID of the entity */
4992 xmlChar * systemId; /* The system ID of the entity */
4995 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
4996 for (n_publicId = 0;n_publicId < gen_nb_const_xmlChar_ptr;n_publicId++) {
4997 for (n_systemId = 0;n_systemId < gen_nb_const_xmlChar_ptr;n_systemId++) {
4998 mem_base = xmlMemBlocks();
4999 ctx = gen_void_ptr(n_ctx, 0);
5000 publicId = gen_const_xmlChar_ptr(n_publicId, 1);
5001 systemId = gen_const_xmlChar_ptr(n_systemId, 2);
5003 ret_val = xmlSAX2ResolveEntity(ctx, (const xmlChar *)publicId, (const xmlChar *)systemId);
5004 desret_xmlParserInputPtr(ret_val);
5006 des_void_ptr(n_ctx, ctx, 0);
5007 des_const_xmlChar_ptr(n_publicId, (const xmlChar *)publicId, 1);
5008 des_const_xmlChar_ptr(n_systemId, (const xmlChar *)systemId, 2);
5009 xmlResetLastError();
5010 if (mem_base != xmlMemBlocks()) {
5011 printf("Leak of %d blocks found in xmlSAX2ResolveEntity",
5012 xmlMemBlocks() - mem_base);
5014 printf(" %d", n_ctx);
5015 printf(" %d", n_publicId);
5016 printf(" %d", n_systemId);
5028 #define gen_nb_xmlSAXLocatorPtr 1
5029 static xmlSAXLocatorPtr gen_xmlSAXLocatorPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
5032 static void des_xmlSAXLocatorPtr(int no ATTRIBUTE_UNUSED, xmlSAXLocatorPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
5036 test_xmlSAX2SetDocumentLocator(void) {
5040 void * ctx; /* the user data (XML parser context) */
5042 xmlSAXLocatorPtr loc; /* A SAX Locator */
5045 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
5046 for (n_loc = 0;n_loc < gen_nb_xmlSAXLocatorPtr;n_loc++) {
5047 mem_base = xmlMemBlocks();
5048 ctx = gen_void_ptr(n_ctx, 0);
5049 loc = gen_xmlSAXLocatorPtr(n_loc, 1);
5051 xmlSAX2SetDocumentLocator(ctx, loc);
5053 des_void_ptr(n_ctx, ctx, 0);
5054 des_xmlSAXLocatorPtr(n_loc, loc, 1);
5055 xmlResetLastError();
5056 if (mem_base != xmlMemBlocks()) {
5057 printf("Leak of %d blocks found in xmlSAX2SetDocumentLocator",
5058 xmlMemBlocks() - mem_base);
5060 printf(" %d", n_ctx);
5061 printf(" %d", n_loc);
5073 test_xmlSAX2StartDocument(void) {
5077 void * ctx; /* the user data (XML parser context) */
5080 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
5081 mem_base = xmlMemBlocks();
5082 ctx = gen_void_ptr(n_ctx, 0);
5084 xmlSAX2StartDocument(ctx);
5086 des_void_ptr(n_ctx, ctx, 0);
5087 xmlResetLastError();
5088 if (mem_base != xmlMemBlocks()) {
5089 printf("Leak of %d blocks found in xmlSAX2StartDocument",
5090 xmlMemBlocks() - mem_base);
5092 printf(" %d", n_ctx);
5103 test_xmlSAX2StartElement(void) {
5106 #if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
5107 #ifdef LIBXML_SAX1_ENABLED
5109 void * ctx; /* the user data (XML parser context) */
5111 xmlChar * fullname; /* The element name, including namespace prefix */
5113 xmlChar ** atts; /* An array of name/value attributes pairs, NULL terminated */
5116 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
5117 for (n_fullname = 0;n_fullname < gen_nb_const_xmlChar_ptr;n_fullname++) {
5118 for (n_atts = 0;n_atts < gen_nb_const_xmlChar_ptr_ptr;n_atts++) {
5119 mem_base = xmlMemBlocks();
5120 ctx = gen_void_ptr(n_ctx, 0);
5121 fullname = gen_const_xmlChar_ptr(n_fullname, 1);
5122 atts = gen_const_xmlChar_ptr_ptr(n_atts, 2);
5124 xmlSAX2StartElement(ctx, (const xmlChar *)fullname, (const xmlChar **)atts);
5126 des_void_ptr(n_ctx, ctx, 0);
5127 des_const_xmlChar_ptr(n_fullname, (const xmlChar *)fullname, 1);
5128 des_const_xmlChar_ptr_ptr(n_atts, (const xmlChar **)atts, 2);
5129 xmlResetLastError();
5130 if (mem_base != xmlMemBlocks()) {
5131 printf("Leak of %d blocks found in xmlSAX2StartElement",
5132 xmlMemBlocks() - mem_base);
5134 printf(" %d", n_ctx);
5135 printf(" %d", n_fullname);
5136 printf(" %d", n_atts);
5151 test_xmlSAX2StartElementNs(void) {
5155 void * ctx; /* the user data (XML parser context) */
5157 xmlChar * localname; /* the local name of the element */
5159 xmlChar * prefix; /* the element namespace prefix if available */
5161 xmlChar * URI; /* the element namespace name if available */
5163 int nb_namespaces; /* number of namespace definitions on that node */
5164 int n_nb_namespaces;
5165 xmlChar ** namespaces; /* pointer to the array of prefix/URI pairs namespace definitions */
5167 int nb_attributes; /* the number of attributes on that node */
5168 int n_nb_attributes;
5169 int nb_defaulted; /* the number of defaulted attributes. */
5171 xmlChar ** attributes; /* pointer to the array of (localname/prefix/URI/value/end) attribute values. */
5174 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
5175 for (n_localname = 0;n_localname < gen_nb_const_xmlChar_ptr;n_localname++) {
5176 for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
5177 for (n_URI = 0;n_URI < gen_nb_const_xmlChar_ptr;n_URI++) {
5178 for (n_nb_namespaces = 0;n_nb_namespaces < gen_nb_int;n_nb_namespaces++) {
5179 for (n_namespaces = 0;n_namespaces < gen_nb_const_xmlChar_ptr_ptr;n_namespaces++) {
5180 for (n_nb_attributes = 0;n_nb_attributes < gen_nb_int;n_nb_attributes++) {
5181 for (n_nb_defaulted = 0;n_nb_defaulted < gen_nb_int;n_nb_defaulted++) {
5182 for (n_attributes = 0;n_attributes < gen_nb_const_xmlChar_ptr_ptr;n_attributes++) {
5183 mem_base = xmlMemBlocks();
5184 ctx = gen_void_ptr(n_ctx, 0);
5185 localname = gen_const_xmlChar_ptr(n_localname, 1);
5186 prefix = gen_const_xmlChar_ptr(n_prefix, 2);
5187 URI = gen_const_xmlChar_ptr(n_URI, 3);
5188 nb_namespaces = gen_int(n_nb_namespaces, 4);
5189 namespaces = gen_const_xmlChar_ptr_ptr(n_namespaces, 5);
5190 nb_attributes = gen_int(n_nb_attributes, 6);
5191 nb_defaulted = gen_int(n_nb_defaulted, 7);
5192 attributes = gen_const_xmlChar_ptr_ptr(n_attributes, 8);
5194 xmlSAX2StartElementNs(ctx, (const xmlChar *)localname, (const xmlChar *)prefix, (const xmlChar *)URI, nb_namespaces, (const xmlChar **)namespaces, nb_attributes, nb_defaulted, (const xmlChar **)attributes);
5196 des_void_ptr(n_ctx, ctx, 0);
5197 des_const_xmlChar_ptr(n_localname, (const xmlChar *)localname, 1);
5198 des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 2);
5199 des_const_xmlChar_ptr(n_URI, (const xmlChar *)URI, 3);
5200 des_int(n_nb_namespaces, nb_namespaces, 4);
5201 des_const_xmlChar_ptr_ptr(n_namespaces, (const xmlChar **)namespaces, 5);
5202 des_int(n_nb_attributes, nb_attributes, 6);
5203 des_int(n_nb_defaulted, nb_defaulted, 7);
5204 des_const_xmlChar_ptr_ptr(n_attributes, (const xmlChar **)attributes, 8);
5205 xmlResetLastError();
5206 if (mem_base != xmlMemBlocks()) {
5207 printf("Leak of %d blocks found in xmlSAX2StartElementNs",
5208 xmlMemBlocks() - mem_base);
5210 printf(" %d", n_ctx);
5211 printf(" %d", n_localname);
5212 printf(" %d", n_prefix);
5213 printf(" %d", n_URI);
5214 printf(" %d", n_nb_namespaces);
5215 printf(" %d", n_namespaces);
5216 printf(" %d", n_nb_attributes);
5217 printf(" %d", n_nb_defaulted);
5218 printf(" %d", n_attributes);
5237 test_xmlSAX2UnparsedEntityDecl(void) {
5241 void * ctx; /* the user data (XML parser context) */
5243 xmlChar * name; /* The name of the entity */
5245 xmlChar * publicId; /* The public ID of the entity */
5247 xmlChar * systemId; /* The system ID of the entity */
5249 xmlChar * notationName; /* the name of the notation */
5252 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
5253 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
5254 for (n_publicId = 0;n_publicId < gen_nb_const_xmlChar_ptr;n_publicId++) {
5255 for (n_systemId = 0;n_systemId < gen_nb_const_xmlChar_ptr;n_systemId++) {
5256 for (n_notationName = 0;n_notationName < gen_nb_const_xmlChar_ptr;n_notationName++) {
5257 mem_base = xmlMemBlocks();
5258 ctx = gen_void_ptr(n_ctx, 0);
5259 name = gen_const_xmlChar_ptr(n_name, 1);
5260 publicId = gen_const_xmlChar_ptr(n_publicId, 2);
5261 systemId = gen_const_xmlChar_ptr(n_systemId, 3);
5262 notationName = gen_const_xmlChar_ptr(n_notationName, 4);
5264 xmlSAX2UnparsedEntityDecl(ctx, (const xmlChar *)name, (const xmlChar *)publicId, (const xmlChar *)systemId, (const xmlChar *)notationName);
5266 des_void_ptr(n_ctx, ctx, 0);
5267 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
5268 des_const_xmlChar_ptr(n_publicId, (const xmlChar *)publicId, 2);
5269 des_const_xmlChar_ptr(n_systemId, (const xmlChar *)systemId, 3);
5270 des_const_xmlChar_ptr(n_notationName, (const xmlChar *)notationName, 4);
5271 xmlResetLastError();
5272 if (mem_base != xmlMemBlocks()) {
5273 printf("Leak of %d blocks found in xmlSAX2UnparsedEntityDecl",
5274 xmlMemBlocks() - mem_base);
5276 printf(" %d", n_ctx);
5277 printf(" %d", n_name);
5278 printf(" %d", n_publicId);
5279 printf(" %d", n_systemId);
5280 printf(" %d", n_notationName);
5295 test_xmlSAXDefaultVersion(void) {
5298 #if defined(LIBXML_SAX1_ENABLED)
5299 #ifdef LIBXML_SAX1_ENABLED
5302 int version; /* the version, 1 or 2 */
5305 for (n_version = 0;n_version < gen_nb_int;n_version++) {
5306 mem_base = xmlMemBlocks();
5307 version = gen_int(n_version, 0);
5309 ret_val = xmlSAXDefaultVersion(version);
5310 desret_int(ret_val);
5312 des_int(n_version, version, 0);
5313 xmlResetLastError();
5314 if (mem_base != xmlMemBlocks()) {
5315 printf("Leak of %d blocks found in xmlSAXDefaultVersion",
5316 xmlMemBlocks() - mem_base);
5318 printf(" %d", n_version);
5331 test_xmlSAXVersion(void) {
5336 xmlSAXHandler * hdlr; /* the SAX handler */
5338 int version; /* the version, 1 or 2 */
5341 for (n_hdlr = 0;n_hdlr < gen_nb_xmlSAXHandler_ptr;n_hdlr++) {
5342 for (n_version = 0;n_version < gen_nb_int;n_version++) {
5343 mem_base = xmlMemBlocks();
5344 hdlr = gen_xmlSAXHandler_ptr(n_hdlr, 0);
5345 version = gen_int(n_version, 1);
5347 ret_val = xmlSAXVersion(hdlr, version);
5348 desret_int(ret_val);
5350 des_xmlSAXHandler_ptr(n_hdlr, hdlr, 0);
5351 des_int(n_version, version, 1);
5352 xmlResetLastError();
5353 if (mem_base != xmlMemBlocks()) {
5354 printf("Leak of %d blocks found in xmlSAXVersion",
5355 xmlMemBlocks() - mem_base);
5357 printf(" %d", n_hdlr);
5358 printf(" %d", n_version);
5373 if (quiet == 0) printf("Testing SAX2 : 38 of 38 functions ...\n");
5374 rc = test_docbDefaultSAXHandlerInit();
5375 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5376 rc = test_htmlDefaultSAXHandlerInit();
5377 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5378 rc = test_xmlDefaultSAXHandlerInit();
5379 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5380 rc = test_xmlSAX2AttributeDecl();
5381 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5382 rc = test_xmlSAX2CDataBlock();
5383 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5384 rc = test_xmlSAX2Characters();
5385 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5386 rc = test_xmlSAX2Comment();
5387 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5388 rc = test_xmlSAX2ElementDecl();
5389 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5390 rc = test_xmlSAX2EndDocument();
5391 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5392 rc = test_xmlSAX2EndElement();
5393 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5394 rc = test_xmlSAX2EndElementNs();
5395 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5396 rc = test_xmlSAX2EntityDecl();
5397 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5398 rc = test_xmlSAX2ExternalSubset();
5399 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5400 rc = test_xmlSAX2GetColumnNumber();
5401 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5402 rc = test_xmlSAX2GetEntity();
5403 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5404 rc = test_xmlSAX2GetLineNumber();
5405 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5406 rc = test_xmlSAX2GetParameterEntity();
5407 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5408 rc = test_xmlSAX2GetPublicId();
5409 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5410 rc = test_xmlSAX2GetSystemId();
5411 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5412 rc = test_xmlSAX2HasExternalSubset();
5413 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5414 rc = test_xmlSAX2HasInternalSubset();
5415 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5416 rc = test_xmlSAX2IgnorableWhitespace();
5417 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5418 rc = test_xmlSAX2InitDefaultSAXHandler();
5419 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5420 rc = test_xmlSAX2InitDocbDefaultSAXHandler();
5421 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5422 rc = test_xmlSAX2InitHtmlDefaultSAXHandler();
5423 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5424 rc = test_xmlSAX2InternalSubset();
5425 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5426 rc = test_xmlSAX2IsStandalone();
5427 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5428 rc = test_xmlSAX2NotationDecl();
5429 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5430 rc = test_xmlSAX2ProcessingInstruction();
5431 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5432 rc = test_xmlSAX2Reference();
5433 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5434 rc = test_xmlSAX2ResolveEntity();
5435 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5436 rc = test_xmlSAX2SetDocumentLocator();
5437 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5438 rc = test_xmlSAX2StartDocument();
5439 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5440 rc = test_xmlSAX2StartElement();
5441 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5442 rc = test_xmlSAX2StartElementNs();
5443 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5444 rc = test_xmlSAX2UnparsedEntityDecl();
5445 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5446 rc = test_xmlSAXDefaultVersion();
5447 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5448 rc = test_xmlSAXVersion();
5451 printf("Module SAX2: %d errors\n", test_ret);
5456 test_xmlC14NDocDumpMemory(void) {
5459 #if defined(LIBXML_C14N_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
5462 xmlDocPtr doc; /* the XML document for canonization */
5464 xmlNodeSetPtr nodes; /* the nodes set to be included in the canonized image or NULL if all document nodes should be included */
5466 int mode; /* the c14n mode (see @xmlC14NMode) */
5468 xmlChar ** inclusive_ns_prefixes; /* the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise) */
5469 int n_inclusive_ns_prefixes;
5470 int with_comments; /* include comments in the result (!=0) or not (==0) */
5471 int n_with_comments;
5472 xmlChar ** doc_txt_ptr; /* the memory pointer for allocated canonical XML text; the caller of this functions is responsible for calling xmlFree() to free allocated memory */
5475 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
5476 for (n_nodes = 0;n_nodes < gen_nb_xmlNodeSetPtr;n_nodes++) {
5477 for (n_mode = 0;n_mode < gen_nb_int;n_mode++) {
5478 for (n_inclusive_ns_prefixes = 0;n_inclusive_ns_prefixes < gen_nb_xmlChar_ptr_ptr;n_inclusive_ns_prefixes++) {
5479 for (n_with_comments = 0;n_with_comments < gen_nb_int;n_with_comments++) {
5480 for (n_doc_txt_ptr = 0;n_doc_txt_ptr < gen_nb_xmlChar_ptr_ptr;n_doc_txt_ptr++) {
5481 mem_base = xmlMemBlocks();
5482 doc = gen_xmlDocPtr(n_doc, 0);
5483 nodes = gen_xmlNodeSetPtr(n_nodes, 1);
5484 mode = gen_int(n_mode, 2);
5485 inclusive_ns_prefixes = gen_xmlChar_ptr_ptr(n_inclusive_ns_prefixes, 3);
5486 with_comments = gen_int(n_with_comments, 4);
5487 doc_txt_ptr = gen_xmlChar_ptr_ptr(n_doc_txt_ptr, 5);
5489 ret_val = xmlC14NDocDumpMemory(doc, nodes, mode, inclusive_ns_prefixes, with_comments, doc_txt_ptr);
5490 desret_int(ret_val);
5492 des_xmlDocPtr(n_doc, doc, 0);
5493 des_xmlNodeSetPtr(n_nodes, nodes, 1);
5494 des_int(n_mode, mode, 2);
5495 des_xmlChar_ptr_ptr(n_inclusive_ns_prefixes, inclusive_ns_prefixes, 3);
5496 des_int(n_with_comments, with_comments, 4);
5497 des_xmlChar_ptr_ptr(n_doc_txt_ptr, doc_txt_ptr, 5);
5498 xmlResetLastError();
5499 if (mem_base != xmlMemBlocks()) {
5500 printf("Leak of %d blocks found in xmlC14NDocDumpMemory",
5501 xmlMemBlocks() - mem_base);
5503 printf(" %d", n_doc);
5504 printf(" %d", n_nodes);
5505 printf(" %d", n_mode);
5506 printf(" %d", n_inclusive_ns_prefixes);
5507 printf(" %d", n_with_comments);
5508 printf(" %d", n_doc_txt_ptr);
5525 test_xmlC14NDocSave(void) {
5528 #if defined(LIBXML_C14N_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
5531 xmlDocPtr doc; /* the XML document for canonization */
5533 xmlNodeSetPtr nodes; /* the nodes set to be included in the canonized image or NULL if all document nodes should be included */
5535 int mode; /* the c14n mode (see @xmlC14NMode) */
5537 xmlChar ** inclusive_ns_prefixes; /* the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise) */
5538 int n_inclusive_ns_prefixes;
5539 int with_comments; /* include comments in the result (!=0) or not (==0) */
5540 int n_with_comments;
5541 const char * filename; /* the filename to store canonical XML image */
5543 int compression; /* the compression level (zlib requred): -1 - libxml default, 0 - uncompressed, >0 - compression level */
5546 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
5547 for (n_nodes = 0;n_nodes < gen_nb_xmlNodeSetPtr;n_nodes++) {
5548 for (n_mode = 0;n_mode < gen_nb_int;n_mode++) {
5549 for (n_inclusive_ns_prefixes = 0;n_inclusive_ns_prefixes < gen_nb_xmlChar_ptr_ptr;n_inclusive_ns_prefixes++) {
5550 for (n_with_comments = 0;n_with_comments < gen_nb_int;n_with_comments++) {
5551 for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
5552 for (n_compression = 0;n_compression < gen_nb_int;n_compression++) {
5553 mem_base = xmlMemBlocks();
5554 doc = gen_xmlDocPtr(n_doc, 0);
5555 nodes = gen_xmlNodeSetPtr(n_nodes, 1);
5556 mode = gen_int(n_mode, 2);
5557 inclusive_ns_prefixes = gen_xmlChar_ptr_ptr(n_inclusive_ns_prefixes, 3);
5558 with_comments = gen_int(n_with_comments, 4);
5559 filename = gen_fileoutput(n_filename, 5);
5560 compression = gen_int(n_compression, 6);
5562 ret_val = xmlC14NDocSave(doc, nodes, mode, inclusive_ns_prefixes, with_comments, filename, compression);
5563 desret_int(ret_val);
5565 des_xmlDocPtr(n_doc, doc, 0);
5566 des_xmlNodeSetPtr(n_nodes, nodes, 1);
5567 des_int(n_mode, mode, 2);
5568 des_xmlChar_ptr_ptr(n_inclusive_ns_prefixes, inclusive_ns_prefixes, 3);
5569 des_int(n_with_comments, with_comments, 4);
5570 des_fileoutput(n_filename, filename, 5);
5571 des_int(n_compression, compression, 6);
5572 xmlResetLastError();
5573 if (mem_base != xmlMemBlocks()) {
5574 printf("Leak of %d blocks found in xmlC14NDocSave",
5575 xmlMemBlocks() - mem_base);
5577 printf(" %d", n_doc);
5578 printf(" %d", n_nodes);
5579 printf(" %d", n_mode);
5580 printf(" %d", n_inclusive_ns_prefixes);
5581 printf(" %d", n_with_comments);
5582 printf(" %d", n_filename);
5583 printf(" %d", n_compression);
5601 test_xmlC14NDocSaveTo(void) {
5604 #if defined(LIBXML_C14N_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
5607 xmlDocPtr doc; /* the XML document for canonization */
5609 xmlNodeSetPtr nodes; /* the nodes set to be included in the canonized image or NULL if all document nodes should be included */
5611 int mode; /* the c14n mode (see @xmlC14NMode) */
5613 xmlChar ** inclusive_ns_prefixes; /* the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise) */
5614 int n_inclusive_ns_prefixes;
5615 int with_comments; /* include comments in the result (!=0) or not (==0) */
5616 int n_with_comments;
5617 xmlOutputBufferPtr buf; /* the output buffer to store canonical XML; this buffer MUST have encoder==NULL because C14N requires UTF-8 output */
5620 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
5621 for (n_nodes = 0;n_nodes < gen_nb_xmlNodeSetPtr;n_nodes++) {
5622 for (n_mode = 0;n_mode < gen_nb_int;n_mode++) {
5623 for (n_inclusive_ns_prefixes = 0;n_inclusive_ns_prefixes < gen_nb_xmlChar_ptr_ptr;n_inclusive_ns_prefixes++) {
5624 for (n_with_comments = 0;n_with_comments < gen_nb_int;n_with_comments++) {
5625 for (n_buf = 0;n_buf < gen_nb_xmlOutputBufferPtr;n_buf++) {
5626 mem_base = xmlMemBlocks();
5627 doc = gen_xmlDocPtr(n_doc, 0);
5628 nodes = gen_xmlNodeSetPtr(n_nodes, 1);
5629 mode = gen_int(n_mode, 2);
5630 inclusive_ns_prefixes = gen_xmlChar_ptr_ptr(n_inclusive_ns_prefixes, 3);
5631 with_comments = gen_int(n_with_comments, 4);
5632 buf = gen_xmlOutputBufferPtr(n_buf, 5);
5634 ret_val = xmlC14NDocSaveTo(doc, nodes, mode, inclusive_ns_prefixes, with_comments, buf);
5635 desret_int(ret_val);
5637 des_xmlDocPtr(n_doc, doc, 0);
5638 des_xmlNodeSetPtr(n_nodes, nodes, 1);
5639 des_int(n_mode, mode, 2);
5640 des_xmlChar_ptr_ptr(n_inclusive_ns_prefixes, inclusive_ns_prefixes, 3);
5641 des_int(n_with_comments, with_comments, 4);
5642 des_xmlOutputBufferPtr(n_buf, buf, 5);
5643 xmlResetLastError();
5644 if (mem_base != xmlMemBlocks()) {
5645 printf("Leak of %d blocks found in xmlC14NDocSaveTo",
5646 xmlMemBlocks() - mem_base);
5648 printf(" %d", n_doc);
5649 printf(" %d", n_nodes);
5650 printf(" %d", n_mode);
5651 printf(" %d", n_inclusive_ns_prefixes);
5652 printf(" %d", n_with_comments);
5653 printf(" %d", n_buf);
5670 test_xmlC14NExecute(void) {
5674 /* missing type support */
5683 if (quiet == 0) printf("Testing c14n : 3 of 4 functions ...\n");
5684 rc = test_xmlC14NDocDumpMemory();
5685 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5686 rc = test_xmlC14NDocSave();
5687 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5688 rc = test_xmlC14NDocSaveTo();
5689 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5690 rc = test_xmlC14NExecute();
5691 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5694 printf("Module c14n: %d errors\n", test_ret);
5697 #ifdef LIBXML_CATALOG_ENABLED
5699 #define gen_nb_xmlCatalogPtr 1
5700 static xmlCatalogPtr gen_xmlCatalogPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
5703 static void des_xmlCatalogPtr(int no ATTRIBUTE_UNUSED, xmlCatalogPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
5709 test_xmlACatalogAdd(void) {
5712 #if defined(LIBXML_CATALOG_ENABLED)
5715 xmlCatalogPtr catal; /* a Catalog */
5717 xmlChar * type; /* the type of record to add to the catalog */
5719 xmlChar * orig; /* the system, public or prefix to match */
5721 xmlChar * replace; /* the replacement value for the match */
5724 for (n_catal = 0;n_catal < gen_nb_xmlCatalogPtr;n_catal++) {
5725 for (n_type = 0;n_type < gen_nb_const_xmlChar_ptr;n_type++) {
5726 for (n_orig = 0;n_orig < gen_nb_const_xmlChar_ptr;n_orig++) {
5727 for (n_replace = 0;n_replace < gen_nb_const_xmlChar_ptr;n_replace++) {
5728 mem_base = xmlMemBlocks();
5729 catal = gen_xmlCatalogPtr(n_catal, 0);
5730 type = gen_const_xmlChar_ptr(n_type, 1);
5731 orig = gen_const_xmlChar_ptr(n_orig, 2);
5732 replace = gen_const_xmlChar_ptr(n_replace, 3);
5734 ret_val = xmlACatalogAdd(catal, (const xmlChar *)type, (const xmlChar *)orig, (const xmlChar *)replace);
5735 desret_int(ret_val);
5737 des_xmlCatalogPtr(n_catal, catal, 0);
5738 des_const_xmlChar_ptr(n_type, (const xmlChar *)type, 1);
5739 des_const_xmlChar_ptr(n_orig, (const xmlChar *)orig, 2);
5740 des_const_xmlChar_ptr(n_replace, (const xmlChar *)replace, 3);
5741 xmlResetLastError();
5742 if (mem_base != xmlMemBlocks()) {
5743 printf("Leak of %d blocks found in xmlACatalogAdd",
5744 xmlMemBlocks() - mem_base);
5746 printf(" %d", n_catal);
5747 printf(" %d", n_type);
5748 printf(" %d", n_orig);
5749 printf(" %d", n_replace);
5764 test_xmlACatalogDump(void) {
5767 #if defined(LIBXML_CATALOG_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
5769 xmlCatalogPtr catal; /* a Catalog */
5771 FILE * out; /* the file. */
5774 for (n_catal = 0;n_catal < gen_nb_xmlCatalogPtr;n_catal++) {
5775 for (n_out = 0;n_out < gen_nb_FILE_ptr;n_out++) {
5776 mem_base = xmlMemBlocks();
5777 catal = gen_xmlCatalogPtr(n_catal, 0);
5778 out = gen_FILE_ptr(n_out, 1);
5780 xmlACatalogDump(catal, out);
5782 des_xmlCatalogPtr(n_catal, catal, 0);
5783 des_FILE_ptr(n_out, out, 1);
5784 xmlResetLastError();
5785 if (mem_base != xmlMemBlocks()) {
5786 printf("Leak of %d blocks found in xmlACatalogDump",
5787 xmlMemBlocks() - mem_base);
5789 printf(" %d", n_catal);
5790 printf(" %d", n_out);
5803 test_xmlACatalogRemove(void) {
5806 #if defined(LIBXML_CATALOG_ENABLED)
5809 xmlCatalogPtr catal; /* a Catalog */
5811 xmlChar * value; /* the value to remove */
5814 for (n_catal = 0;n_catal < gen_nb_xmlCatalogPtr;n_catal++) {
5815 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
5816 mem_base = xmlMemBlocks();
5817 catal = gen_xmlCatalogPtr(n_catal, 0);
5818 value = gen_const_xmlChar_ptr(n_value, 1);
5820 ret_val = xmlACatalogRemove(catal, (const xmlChar *)value);
5821 desret_int(ret_val);
5823 des_xmlCatalogPtr(n_catal, catal, 0);
5824 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 1);
5825 xmlResetLastError();
5826 if (mem_base != xmlMemBlocks()) {
5827 printf("Leak of %d blocks found in xmlACatalogRemove",
5828 xmlMemBlocks() - mem_base);
5830 printf(" %d", n_catal);
5831 printf(" %d", n_value);
5844 test_xmlACatalogResolve(void) {
5847 #if defined(LIBXML_CATALOG_ENABLED)
5850 xmlCatalogPtr catal; /* a Catalog */
5852 xmlChar * pubID; /* the public ID string */
5854 xmlChar * sysID; /* the system ID string */
5857 for (n_catal = 0;n_catal < gen_nb_xmlCatalogPtr;n_catal++) {
5858 for (n_pubID = 0;n_pubID < gen_nb_const_xmlChar_ptr;n_pubID++) {
5859 for (n_sysID = 0;n_sysID < gen_nb_const_xmlChar_ptr;n_sysID++) {
5860 mem_base = xmlMemBlocks();
5861 catal = gen_xmlCatalogPtr(n_catal, 0);
5862 pubID = gen_const_xmlChar_ptr(n_pubID, 1);
5863 sysID = gen_const_xmlChar_ptr(n_sysID, 2);
5865 ret_val = xmlACatalogResolve(catal, (const xmlChar *)pubID, (const xmlChar *)sysID);
5866 desret_xmlChar_ptr(ret_val);
5868 des_xmlCatalogPtr(n_catal, catal, 0);
5869 des_const_xmlChar_ptr(n_pubID, (const xmlChar *)pubID, 1);
5870 des_const_xmlChar_ptr(n_sysID, (const xmlChar *)sysID, 2);
5871 xmlResetLastError();
5872 if (mem_base != xmlMemBlocks()) {
5873 printf("Leak of %d blocks found in xmlACatalogResolve",
5874 xmlMemBlocks() - mem_base);
5876 printf(" %d", n_catal);
5877 printf(" %d", n_pubID);
5878 printf(" %d", n_sysID);
5892 test_xmlACatalogResolvePublic(void) {
5895 #if defined(LIBXML_CATALOG_ENABLED)
5898 xmlCatalogPtr catal; /* a Catalog */
5900 xmlChar * pubID; /* the public ID string */
5903 for (n_catal = 0;n_catal < gen_nb_xmlCatalogPtr;n_catal++) {
5904 for (n_pubID = 0;n_pubID < gen_nb_const_xmlChar_ptr;n_pubID++) {
5905 mem_base = xmlMemBlocks();
5906 catal = gen_xmlCatalogPtr(n_catal, 0);
5907 pubID = gen_const_xmlChar_ptr(n_pubID, 1);
5909 ret_val = xmlACatalogResolvePublic(catal, (const xmlChar *)pubID);
5910 desret_xmlChar_ptr(ret_val);
5912 des_xmlCatalogPtr(n_catal, catal, 0);
5913 des_const_xmlChar_ptr(n_pubID, (const xmlChar *)pubID, 1);
5914 xmlResetLastError();
5915 if (mem_base != xmlMemBlocks()) {
5916 printf("Leak of %d blocks found in xmlACatalogResolvePublic",
5917 xmlMemBlocks() - mem_base);
5919 printf(" %d", n_catal);
5920 printf(" %d", n_pubID);
5933 test_xmlACatalogResolveSystem(void) {
5936 #if defined(LIBXML_CATALOG_ENABLED)
5939 xmlCatalogPtr catal; /* a Catalog */
5941 xmlChar * sysID; /* the system ID string */
5944 for (n_catal = 0;n_catal < gen_nb_xmlCatalogPtr;n_catal++) {
5945 for (n_sysID = 0;n_sysID < gen_nb_const_xmlChar_ptr;n_sysID++) {
5946 mem_base = xmlMemBlocks();
5947 catal = gen_xmlCatalogPtr(n_catal, 0);
5948 sysID = gen_const_xmlChar_ptr(n_sysID, 1);
5950 ret_val = xmlACatalogResolveSystem(catal, (const xmlChar *)sysID);
5951 desret_xmlChar_ptr(ret_val);
5953 des_xmlCatalogPtr(n_catal, catal, 0);
5954 des_const_xmlChar_ptr(n_sysID, (const xmlChar *)sysID, 1);
5955 xmlResetLastError();
5956 if (mem_base != xmlMemBlocks()) {
5957 printf("Leak of %d blocks found in xmlACatalogResolveSystem",
5958 xmlMemBlocks() - mem_base);
5960 printf(" %d", n_catal);
5961 printf(" %d", n_sysID);
5974 test_xmlACatalogResolveURI(void) {
5977 #if defined(LIBXML_CATALOG_ENABLED)
5980 xmlCatalogPtr catal; /* a Catalog */
5982 xmlChar * URI; /* the URI */
5985 for (n_catal = 0;n_catal < gen_nb_xmlCatalogPtr;n_catal++) {
5986 for (n_URI = 0;n_URI < gen_nb_const_xmlChar_ptr;n_URI++) {
5987 mem_base = xmlMemBlocks();
5988 catal = gen_xmlCatalogPtr(n_catal, 0);
5989 URI = gen_const_xmlChar_ptr(n_URI, 1);
5991 ret_val = xmlACatalogResolveURI(catal, (const xmlChar *)URI);
5992 desret_xmlChar_ptr(ret_val);
5994 des_xmlCatalogPtr(n_catal, catal, 0);
5995 des_const_xmlChar_ptr(n_URI, (const xmlChar *)URI, 1);
5996 xmlResetLastError();
5997 if (mem_base != xmlMemBlocks()) {
5998 printf("Leak of %d blocks found in xmlACatalogResolveURI",
5999 xmlMemBlocks() - mem_base);
6001 printf(" %d", n_catal);
6002 printf(" %d", n_URI);
6015 test_xmlCatalogAdd(void) {
6018 #if defined(LIBXML_CATALOG_ENABLED)
6021 xmlChar * type; /* the type of record to add to the catalog */
6023 xmlChar * orig; /* the system, public or prefix to match */
6025 xmlChar * replace; /* the replacement value for the match */
6028 for (n_type = 0;n_type < gen_nb_const_xmlChar_ptr;n_type++) {
6029 for (n_orig = 0;n_orig < gen_nb_const_xmlChar_ptr;n_orig++) {
6030 for (n_replace = 0;n_replace < gen_nb_const_xmlChar_ptr;n_replace++) {
6031 mem_base = xmlMemBlocks();
6032 type = gen_const_xmlChar_ptr(n_type, 0);
6033 orig = gen_const_xmlChar_ptr(n_orig, 1);
6034 replace = gen_const_xmlChar_ptr(n_replace, 2);
6036 ret_val = xmlCatalogAdd((const xmlChar *)type, (const xmlChar *)orig, (const xmlChar *)replace);
6037 desret_int(ret_val);
6039 des_const_xmlChar_ptr(n_type, (const xmlChar *)type, 0);
6040 des_const_xmlChar_ptr(n_orig, (const xmlChar *)orig, 1);
6041 des_const_xmlChar_ptr(n_replace, (const xmlChar *)replace, 2);
6042 xmlResetLastError();
6043 if (mem_base != xmlMemBlocks()) {
6044 printf("Leak of %d blocks found in xmlCatalogAdd",
6045 xmlMemBlocks() - mem_base);
6047 printf(" %d", n_type);
6048 printf(" %d", n_orig);
6049 printf(" %d", n_replace);
6063 test_xmlCatalogCleanup(void) {
6066 #if defined(LIBXML_CATALOG_ENABLED)
6069 xmlCatalogCleanup();
6071 xmlResetLastError();
6080 test_xmlCatalogConvert(void) {
6083 #if defined(LIBXML_CATALOG_ENABLED)
6087 ret_val = xmlCatalogConvert();
6088 desret_int(ret_val);
6090 xmlResetLastError();
6099 test_xmlCatalogDump(void) {
6102 #if defined(LIBXML_CATALOG_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
6104 FILE * out; /* the file. */
6107 for (n_out = 0;n_out < gen_nb_FILE_ptr;n_out++) {
6108 mem_base = xmlMemBlocks();
6109 out = gen_FILE_ptr(n_out, 0);
6111 xmlCatalogDump(out);
6113 des_FILE_ptr(n_out, out, 0);
6114 xmlResetLastError();
6115 if (mem_base != xmlMemBlocks()) {
6116 printf("Leak of %d blocks found in xmlCatalogDump",
6117 xmlMemBlocks() - mem_base);
6119 printf(" %d", n_out);
6131 test_xmlCatalogGetDefaults(void) {
6134 #if defined(LIBXML_CATALOG_ENABLED)
6136 xmlCatalogAllow ret_val;
6138 mem_base = xmlMemBlocks();
6140 ret_val = xmlCatalogGetDefaults();
6141 desret_xmlCatalogAllow(ret_val);
6143 xmlResetLastError();
6144 if (mem_base != xmlMemBlocks()) {
6145 printf("Leak of %d blocks found in xmlCatalogGetDefaults",
6146 xmlMemBlocks() - mem_base);
6158 test_xmlCatalogIsEmpty(void) {
6161 #if defined(LIBXML_CATALOG_ENABLED)
6164 xmlCatalogPtr catal; /* should this create an SGML catalog */
6167 for (n_catal = 0;n_catal < gen_nb_xmlCatalogPtr;n_catal++) {
6168 mem_base = xmlMemBlocks();
6169 catal = gen_xmlCatalogPtr(n_catal, 0);
6171 ret_val = xmlCatalogIsEmpty(catal);
6172 desret_int(ret_val);
6174 des_xmlCatalogPtr(n_catal, catal, 0);
6175 xmlResetLastError();
6176 if (mem_base != xmlMemBlocks()) {
6177 printf("Leak of %d blocks found in xmlCatalogIsEmpty",
6178 xmlMemBlocks() - mem_base);
6180 printf(" %d", n_catal);
6192 test_xmlCatalogLocalResolve(void) {
6195 #if defined(LIBXML_CATALOG_ENABLED)
6198 void * catalogs; /* a document's list of catalogs */
6200 xmlChar * pubID; /* the public ID string */
6202 xmlChar * sysID; /* the system ID string */
6205 for (n_catalogs = 0;n_catalogs < gen_nb_void_ptr;n_catalogs++) {
6206 for (n_pubID = 0;n_pubID < gen_nb_const_xmlChar_ptr;n_pubID++) {
6207 for (n_sysID = 0;n_sysID < gen_nb_const_xmlChar_ptr;n_sysID++) {
6208 mem_base = xmlMemBlocks();
6209 catalogs = gen_void_ptr(n_catalogs, 0);
6210 pubID = gen_const_xmlChar_ptr(n_pubID, 1);
6211 sysID = gen_const_xmlChar_ptr(n_sysID, 2);
6213 ret_val = xmlCatalogLocalResolve(catalogs, (const xmlChar *)pubID, (const xmlChar *)sysID);
6214 desret_xmlChar_ptr(ret_val);
6216 des_void_ptr(n_catalogs, catalogs, 0);
6217 des_const_xmlChar_ptr(n_pubID, (const xmlChar *)pubID, 1);
6218 des_const_xmlChar_ptr(n_sysID, (const xmlChar *)sysID, 2);
6219 xmlResetLastError();
6220 if (mem_base != xmlMemBlocks()) {
6221 printf("Leak of %d blocks found in xmlCatalogLocalResolve",
6222 xmlMemBlocks() - mem_base);
6224 printf(" %d", n_catalogs);
6225 printf(" %d", n_pubID);
6226 printf(" %d", n_sysID);
6240 test_xmlCatalogLocalResolveURI(void) {
6243 #if defined(LIBXML_CATALOG_ENABLED)
6246 void * catalogs; /* a document's list of catalogs */
6248 xmlChar * URI; /* the URI */
6251 for (n_catalogs = 0;n_catalogs < gen_nb_void_ptr;n_catalogs++) {
6252 for (n_URI = 0;n_URI < gen_nb_const_xmlChar_ptr;n_URI++) {
6253 mem_base = xmlMemBlocks();
6254 catalogs = gen_void_ptr(n_catalogs, 0);
6255 URI = gen_const_xmlChar_ptr(n_URI, 1);
6257 ret_val = xmlCatalogLocalResolveURI(catalogs, (const xmlChar *)URI);
6258 desret_xmlChar_ptr(ret_val);
6260 des_void_ptr(n_catalogs, catalogs, 0);
6261 des_const_xmlChar_ptr(n_URI, (const xmlChar *)URI, 1);
6262 xmlResetLastError();
6263 if (mem_base != xmlMemBlocks()) {
6264 printf("Leak of %d blocks found in xmlCatalogLocalResolveURI",
6265 xmlMemBlocks() - mem_base);
6267 printf(" %d", n_catalogs);
6268 printf(" %d", n_URI);
6281 test_xmlCatalogRemove(void) {
6284 #if defined(LIBXML_CATALOG_ENABLED)
6286 xmlChar * value; /* the value to remove */
6289 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
6290 value = gen_const_xmlChar_ptr(n_value, 0);
6292 ret_val = xmlCatalogRemove((const xmlChar *)value);
6293 desret_int(ret_val);
6295 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 0);
6296 xmlResetLastError();
6306 test_xmlCatalogResolve(void) {
6309 #if defined(LIBXML_CATALOG_ENABLED)
6311 xmlChar * pubID; /* the public ID string */
6313 xmlChar * sysID; /* the system ID string */
6316 for (n_pubID = 0;n_pubID < gen_nb_const_xmlChar_ptr;n_pubID++) {
6317 for (n_sysID = 0;n_sysID < gen_nb_const_xmlChar_ptr;n_sysID++) {
6318 pubID = gen_const_xmlChar_ptr(n_pubID, 0);
6319 sysID = gen_const_xmlChar_ptr(n_sysID, 1);
6321 ret_val = xmlCatalogResolve((const xmlChar *)pubID, (const xmlChar *)sysID);
6322 desret_xmlChar_ptr(ret_val);
6324 des_const_xmlChar_ptr(n_pubID, (const xmlChar *)pubID, 0);
6325 des_const_xmlChar_ptr(n_sysID, (const xmlChar *)sysID, 1);
6326 xmlResetLastError();
6337 test_xmlCatalogResolvePublic(void) {
6340 #if defined(LIBXML_CATALOG_ENABLED)
6343 xmlChar * pubID; /* the public ID string */
6346 for (n_pubID = 0;n_pubID < gen_nb_const_xmlChar_ptr;n_pubID++) {
6347 mem_base = xmlMemBlocks();
6348 pubID = gen_const_xmlChar_ptr(n_pubID, 0);
6350 ret_val = xmlCatalogResolvePublic((const xmlChar *)pubID);
6351 desret_xmlChar_ptr(ret_val);
6353 des_const_xmlChar_ptr(n_pubID, (const xmlChar *)pubID, 0);
6354 xmlResetLastError();
6355 if (mem_base != xmlMemBlocks()) {
6356 printf("Leak of %d blocks found in xmlCatalogResolvePublic",
6357 xmlMemBlocks() - mem_base);
6359 printf(" %d", n_pubID);
6371 test_xmlCatalogResolveSystem(void) {
6374 #if defined(LIBXML_CATALOG_ENABLED)
6377 xmlChar * sysID; /* the system ID string */
6380 for (n_sysID = 0;n_sysID < gen_nb_const_xmlChar_ptr;n_sysID++) {
6381 mem_base = xmlMemBlocks();
6382 sysID = gen_const_xmlChar_ptr(n_sysID, 0);
6384 ret_val = xmlCatalogResolveSystem((const xmlChar *)sysID);
6385 desret_xmlChar_ptr(ret_val);
6387 des_const_xmlChar_ptr(n_sysID, (const xmlChar *)sysID, 0);
6388 xmlResetLastError();
6389 if (mem_base != xmlMemBlocks()) {
6390 printf("Leak of %d blocks found in xmlCatalogResolveSystem",
6391 xmlMemBlocks() - mem_base);
6393 printf(" %d", n_sysID);
6405 test_xmlCatalogResolveURI(void) {
6408 #if defined(LIBXML_CATALOG_ENABLED)
6411 xmlChar * URI; /* the URI */
6414 for (n_URI = 0;n_URI < gen_nb_const_xmlChar_ptr;n_URI++) {
6415 mem_base = xmlMemBlocks();
6416 URI = gen_const_xmlChar_ptr(n_URI, 0);
6418 ret_val = xmlCatalogResolveURI((const xmlChar *)URI);
6419 desret_xmlChar_ptr(ret_val);
6421 des_const_xmlChar_ptr(n_URI, (const xmlChar *)URI, 0);
6422 xmlResetLastError();
6423 if (mem_base != xmlMemBlocks()) {
6424 printf("Leak of %d blocks found in xmlCatalogResolveURI",
6425 xmlMemBlocks() - mem_base);
6427 printf(" %d", n_URI);
6439 test_xmlCatalogSetDefaultPrefer(void) {
6442 #if defined(LIBXML_CATALOG_ENABLED)
6444 xmlCatalogPrefer ret_val;
6445 xmlCatalogPrefer prefer; /* the default preference for delegation */
6448 for (n_prefer = 0;n_prefer < gen_nb_xmlCatalogPrefer;n_prefer++) {
6449 mem_base = xmlMemBlocks();
6450 prefer = gen_xmlCatalogPrefer(n_prefer, 0);
6452 ret_val = xmlCatalogSetDefaultPrefer(prefer);
6453 desret_xmlCatalogPrefer(ret_val);
6455 des_xmlCatalogPrefer(n_prefer, prefer, 0);
6456 xmlResetLastError();
6457 if (mem_base != xmlMemBlocks()) {
6458 printf("Leak of %d blocks found in xmlCatalogSetDefaultPrefer",
6459 xmlMemBlocks() - mem_base);
6461 printf(" %d", n_prefer);
6473 test_xmlCatalogSetDefaults(void) {
6476 #if defined(LIBXML_CATALOG_ENABLED)
6478 xmlCatalogAllow allow; /* what catalogs should be accepted */
6481 for (n_allow = 0;n_allow < gen_nb_xmlCatalogAllow;n_allow++) {
6482 mem_base = xmlMemBlocks();
6483 allow = gen_xmlCatalogAllow(n_allow, 0);
6485 xmlCatalogSetDefaults(allow);
6487 des_xmlCatalogAllow(n_allow, allow, 0);
6488 xmlResetLastError();
6489 if (mem_base != xmlMemBlocks()) {
6490 printf("Leak of %d blocks found in xmlCatalogSetDefaults",
6491 xmlMemBlocks() - mem_base);
6493 printf(" %d", n_allow);
6505 test_xmlConvertSGMLCatalog(void) {
6508 #if defined(LIBXML_CATALOG_ENABLED)
6511 xmlCatalogPtr catal; /* the catalog */
6514 for (n_catal = 0;n_catal < gen_nb_xmlCatalogPtr;n_catal++) {
6515 mem_base = xmlMemBlocks();
6516 catal = gen_xmlCatalogPtr(n_catal, 0);
6518 ret_val = xmlConvertSGMLCatalog(catal);
6519 desret_int(ret_val);
6521 des_xmlCatalogPtr(n_catal, catal, 0);
6522 xmlResetLastError();
6523 if (mem_base != xmlMemBlocks()) {
6524 printf("Leak of %d blocks found in xmlConvertSGMLCatalog",
6525 xmlMemBlocks() - mem_base);
6527 printf(" %d", n_catal);
6539 test_xmlInitializeCatalog(void) {
6542 #if defined(LIBXML_CATALOG_ENABLED)
6545 mem_base = xmlMemBlocks();
6547 xmlInitializeCatalog();
6549 xmlResetLastError();
6550 if (mem_base != xmlMemBlocks()) {
6551 printf("Leak of %d blocks found in xmlInitializeCatalog",
6552 xmlMemBlocks() - mem_base);
6564 test_xmlLoadACatalog(void) {
6568 /* missing type support */
6574 test_xmlLoadCatalog(void) {
6577 #if defined(LIBXML_CATALOG_ENABLED)
6579 const char * filename; /* a file path */
6582 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
6583 filename = gen_filepath(n_filename, 0);
6585 ret_val = xmlLoadCatalog(filename);
6586 desret_int(ret_val);
6588 des_filepath(n_filename, filename, 0);
6589 xmlResetLastError();
6599 test_xmlLoadCatalogs(void) {
6602 #if defined(LIBXML_CATALOG_ENABLED)
6603 char * pathss; /* a list of directories separated by a colon or a space. */
6606 for (n_pathss = 0;n_pathss < gen_nb_const_char_ptr;n_pathss++) {
6607 pathss = gen_const_char_ptr(n_pathss, 0);
6609 xmlLoadCatalogs((const char *)pathss);
6611 des_const_char_ptr(n_pathss, (const char *)pathss, 0);
6612 xmlResetLastError();
6622 test_xmlLoadSGMLSuperCatalog(void) {
6626 /* missing type support */
6632 test_xmlNewCatalog(void) {
6636 /* missing type support */
6642 test_xmlParseCatalogFile(void) {
6645 #if defined(LIBXML_CATALOG_ENABLED)
6648 const char * filename; /* the filename */
6651 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
6652 mem_base = xmlMemBlocks();
6653 filename = gen_filepath(n_filename, 0);
6655 ret_val = xmlParseCatalogFile(filename);
6656 desret_xmlDocPtr(ret_val);
6658 des_filepath(n_filename, filename, 0);
6659 xmlResetLastError();
6660 if (mem_base != xmlMemBlocks()) {
6661 printf("Leak of %d blocks found in xmlParseCatalogFile",
6662 xmlMemBlocks() - mem_base);
6664 printf(" %d", n_filename);
6675 test_catalog(void) {
6679 if (quiet == 0) printf("Testing catalog : 27 of 36 functions ...\n");
6680 rc = test_xmlACatalogAdd();
6681 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6682 rc = test_xmlACatalogDump();
6683 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6684 rc = test_xmlACatalogRemove();
6685 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6686 rc = test_xmlACatalogResolve();
6687 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6688 rc = test_xmlACatalogResolvePublic();
6689 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6690 rc = test_xmlACatalogResolveSystem();
6691 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6692 rc = test_xmlACatalogResolveURI();
6693 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6694 rc = test_xmlCatalogAdd();
6695 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6696 rc = test_xmlCatalogCleanup();
6697 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6698 rc = test_xmlCatalogConvert();
6699 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6700 rc = test_xmlCatalogDump();
6701 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6702 rc = test_xmlCatalogGetDefaults();
6703 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6704 rc = test_xmlCatalogIsEmpty();
6705 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6706 rc = test_xmlCatalogLocalResolve();
6707 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6708 rc = test_xmlCatalogLocalResolveURI();
6709 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6710 rc = test_xmlCatalogRemove();
6711 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6712 rc = test_xmlCatalogResolve();
6713 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6714 rc = test_xmlCatalogResolvePublic();
6715 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6716 rc = test_xmlCatalogResolveSystem();
6717 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6718 rc = test_xmlCatalogResolveURI();
6719 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6720 rc = test_xmlCatalogSetDefaultPrefer();
6721 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6722 rc = test_xmlCatalogSetDefaults();
6723 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6724 rc = test_xmlConvertSGMLCatalog();
6725 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6726 rc = test_xmlInitializeCatalog();
6727 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6728 rc = test_xmlLoadACatalog();
6729 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6730 rc = test_xmlLoadCatalog();
6731 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6732 rc = test_xmlLoadCatalogs();
6733 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6734 rc = test_xmlLoadSGMLSuperCatalog();
6735 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6736 rc = test_xmlNewCatalog();
6737 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6738 rc = test_xmlParseCatalogFile();
6739 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6742 printf("Module catalog: %d errors\n", test_ret);
6746 #define gen_nb_const_xmlChRangeGroup_ptr 1
6747 static xmlChRangeGroup * gen_const_xmlChRangeGroup_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
6750 static void des_const_xmlChRangeGroup_ptr(int no ATTRIBUTE_UNUSED, const xmlChRangeGroup * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
6754 test_xmlCharInRange(void) {
6759 unsigned int val; /* character to be validated */
6761 xmlChRangeGroup * rptr; /* pointer to range to be used to validate */
6764 for (n_val = 0;n_val < gen_nb_unsigned_int;n_val++) {
6765 for (n_rptr = 0;n_rptr < gen_nb_const_xmlChRangeGroup_ptr;n_rptr++) {
6766 mem_base = xmlMemBlocks();
6767 val = gen_unsigned_int(n_val, 0);
6768 rptr = gen_const_xmlChRangeGroup_ptr(n_rptr, 1);
6770 ret_val = xmlCharInRange(val, (const xmlChRangeGroup *)rptr);
6771 desret_int(ret_val);
6773 des_unsigned_int(n_val, val, 0);
6774 des_const_xmlChRangeGroup_ptr(n_rptr, (const xmlChRangeGroup *)rptr, 1);
6775 xmlResetLastError();
6776 if (mem_base != xmlMemBlocks()) {
6777 printf("Leak of %d blocks found in xmlCharInRange",
6778 xmlMemBlocks() - mem_base);
6780 printf(" %d", n_val);
6781 printf(" %d", n_rptr);
6793 test_xmlIsBaseChar(void) {
6798 unsigned int ch; /* character to validate */
6801 for (n_ch = 0;n_ch < gen_nb_unsigned_int;n_ch++) {
6802 mem_base = xmlMemBlocks();
6803 ch = gen_unsigned_int(n_ch, 0);
6805 ret_val = xmlIsBaseChar(ch);
6806 desret_int(ret_val);
6808 des_unsigned_int(n_ch, ch, 0);
6809 xmlResetLastError();
6810 if (mem_base != xmlMemBlocks()) {
6811 printf("Leak of %d blocks found in xmlIsBaseChar",
6812 xmlMemBlocks() - mem_base);
6814 printf(" %d", n_ch);
6825 test_xmlIsBlank(void) {
6830 unsigned int ch; /* character to validate */
6833 for (n_ch = 0;n_ch < gen_nb_unsigned_int;n_ch++) {
6834 mem_base = xmlMemBlocks();
6835 ch = gen_unsigned_int(n_ch, 0);
6837 ret_val = xmlIsBlank(ch);
6838 desret_int(ret_val);
6840 des_unsigned_int(n_ch, ch, 0);
6841 xmlResetLastError();
6842 if (mem_base != xmlMemBlocks()) {
6843 printf("Leak of %d blocks found in xmlIsBlank",
6844 xmlMemBlocks() - mem_base);
6846 printf(" %d", n_ch);
6857 test_xmlIsChar(void) {
6862 unsigned int ch; /* character to validate */
6865 for (n_ch = 0;n_ch < gen_nb_unsigned_int;n_ch++) {
6866 mem_base = xmlMemBlocks();
6867 ch = gen_unsigned_int(n_ch, 0);
6869 ret_val = xmlIsChar(ch);
6870 desret_int(ret_val);
6872 des_unsigned_int(n_ch, ch, 0);
6873 xmlResetLastError();
6874 if (mem_base != xmlMemBlocks()) {
6875 printf("Leak of %d blocks found in xmlIsChar",
6876 xmlMemBlocks() - mem_base);
6878 printf(" %d", n_ch);
6889 test_xmlIsCombining(void) {
6894 unsigned int ch; /* character to validate */
6897 for (n_ch = 0;n_ch < gen_nb_unsigned_int;n_ch++) {
6898 mem_base = xmlMemBlocks();
6899 ch = gen_unsigned_int(n_ch, 0);
6901 ret_val = xmlIsCombining(ch);
6902 desret_int(ret_val);
6904 des_unsigned_int(n_ch, ch, 0);
6905 xmlResetLastError();
6906 if (mem_base != xmlMemBlocks()) {
6907 printf("Leak of %d blocks found in xmlIsCombining",
6908 xmlMemBlocks() - mem_base);
6910 printf(" %d", n_ch);
6921 test_xmlIsDigit(void) {
6926 unsigned int ch; /* character to validate */
6929 for (n_ch = 0;n_ch < gen_nb_unsigned_int;n_ch++) {
6930 mem_base = xmlMemBlocks();
6931 ch = gen_unsigned_int(n_ch, 0);
6933 ret_val = xmlIsDigit(ch);
6934 desret_int(ret_val);
6936 des_unsigned_int(n_ch, ch, 0);
6937 xmlResetLastError();
6938 if (mem_base != xmlMemBlocks()) {
6939 printf("Leak of %d blocks found in xmlIsDigit",
6940 xmlMemBlocks() - mem_base);
6942 printf(" %d", n_ch);
6953 test_xmlIsExtender(void) {
6958 unsigned int ch; /* character to validate */
6961 for (n_ch = 0;n_ch < gen_nb_unsigned_int;n_ch++) {
6962 mem_base = xmlMemBlocks();
6963 ch = gen_unsigned_int(n_ch, 0);
6965 ret_val = xmlIsExtender(ch);
6966 desret_int(ret_val);
6968 des_unsigned_int(n_ch, ch, 0);
6969 xmlResetLastError();
6970 if (mem_base != xmlMemBlocks()) {
6971 printf("Leak of %d blocks found in xmlIsExtender",
6972 xmlMemBlocks() - mem_base);
6974 printf(" %d", n_ch);
6985 test_xmlIsIdeographic(void) {
6990 unsigned int ch; /* character to validate */
6993 for (n_ch = 0;n_ch < gen_nb_unsigned_int;n_ch++) {
6994 mem_base = xmlMemBlocks();
6995 ch = gen_unsigned_int(n_ch, 0);
6997 ret_val = xmlIsIdeographic(ch);
6998 desret_int(ret_val);
7000 des_unsigned_int(n_ch, ch, 0);
7001 xmlResetLastError();
7002 if (mem_base != xmlMemBlocks()) {
7003 printf("Leak of %d blocks found in xmlIsIdeographic",
7004 xmlMemBlocks() - mem_base);
7006 printf(" %d", n_ch);
7017 test_xmlIsPubidChar(void) {
7022 unsigned int ch; /* character to validate */
7025 for (n_ch = 0;n_ch < gen_nb_unsigned_int;n_ch++) {
7026 mem_base = xmlMemBlocks();
7027 ch = gen_unsigned_int(n_ch, 0);
7029 ret_val = xmlIsPubidChar(ch);
7030 desret_int(ret_val);
7032 des_unsigned_int(n_ch, ch, 0);
7033 xmlResetLastError();
7034 if (mem_base != xmlMemBlocks()) {
7035 printf("Leak of %d blocks found in xmlIsPubidChar",
7036 xmlMemBlocks() - mem_base);
7038 printf(" %d", n_ch);
7048 test_chvalid(void) {
7052 if (quiet == 0) printf("Testing chvalid : 9 of 9 functions ...\n");
7053 rc = test_xmlCharInRange();
7054 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
7055 rc = test_xmlIsBaseChar();
7056 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
7057 rc = test_xmlIsBlank();
7058 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
7059 rc = test_xmlIsChar();
7060 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
7061 rc = test_xmlIsCombining();
7062 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
7063 rc = test_xmlIsDigit();
7064 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
7065 rc = test_xmlIsExtender();
7066 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
7067 rc = test_xmlIsIdeographic();
7068 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
7069 rc = test_xmlIsPubidChar();
7070 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
7073 printf("Module chvalid: %d errors\n", test_ret);
7078 test_xmlBoolToText(void) {
7081 #if defined(LIBXML_DEBUG_ENABLED)
7083 const char * ret_val;
7084 int boolval; /* a bool to turn into text */
7087 for (n_boolval = 0;n_boolval < gen_nb_int;n_boolval++) {
7088 mem_base = xmlMemBlocks();
7089 boolval = gen_int(n_boolval, 0);
7091 ret_val = xmlBoolToText(boolval);
7092 desret_const_char_ptr(ret_val);
7094 des_int(n_boolval, boolval, 0);
7095 xmlResetLastError();
7096 if (mem_base != xmlMemBlocks()) {
7097 printf("Leak of %d blocks found in xmlBoolToText",
7098 xmlMemBlocks() - mem_base);
7100 printf(" %d", n_boolval);
7112 test_xmlDebugCheckDocument(void) {
7115 #if defined(LIBXML_DEBUG_ENABLED)
7118 FILE * output; /* the FILE * for the output */
7120 xmlDocPtr doc; /* the document */
7123 for (n_output = 0;n_output < gen_nb_debug_FILE_ptr;n_output++) {
7124 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
7125 mem_base = xmlMemBlocks();
7126 output = gen_debug_FILE_ptr(n_output, 0);
7127 doc = gen_xmlDocPtr(n_doc, 1);
7129 ret_val = xmlDebugCheckDocument(output, doc);
7130 desret_int(ret_val);
7132 des_debug_FILE_ptr(n_output, output, 0);
7133 des_xmlDocPtr(n_doc, doc, 1);
7134 xmlResetLastError();
7135 if (mem_base != xmlMemBlocks()) {
7136 printf("Leak of %d blocks found in xmlDebugCheckDocument",
7137 xmlMemBlocks() - mem_base);
7139 printf(" %d", n_output);
7140 printf(" %d", n_doc);
7153 test_xmlDebugDumpAttr(void) {
7156 #if defined(LIBXML_DEBUG_ENABLED)
7158 FILE * output; /* the FILE * for the output */
7160 xmlAttrPtr attr; /* the attribute */
7162 int depth; /* the indentation level. */
7165 for (n_output = 0;n_output < gen_nb_debug_FILE_ptr;n_output++) {
7166 for (n_attr = 0;n_attr < gen_nb_xmlAttrPtr;n_attr++) {
7167 for (n_depth = 0;n_depth < gen_nb_int;n_depth++) {
7168 mem_base = xmlMemBlocks();
7169 output = gen_debug_FILE_ptr(n_output, 0);
7170 attr = gen_xmlAttrPtr(n_attr, 1);
7171 depth = gen_int(n_depth, 2);
7173 xmlDebugDumpAttr(output, attr, depth);
7175 des_debug_FILE_ptr(n_output, output, 0);
7176 des_xmlAttrPtr(n_attr, attr, 1);
7177 des_int(n_depth, depth, 2);
7178 xmlResetLastError();
7179 if (mem_base != xmlMemBlocks()) {
7180 printf("Leak of %d blocks found in xmlDebugDumpAttr",
7181 xmlMemBlocks() - mem_base);
7183 printf(" %d", n_output);
7184 printf(" %d", n_attr);
7185 printf(" %d", n_depth);
7199 test_xmlDebugDumpAttrList(void) {
7202 #if defined(LIBXML_DEBUG_ENABLED)
7204 FILE * output; /* the FILE * for the output */
7206 xmlAttrPtr attr; /* the attribute list */
7208 int depth; /* the indentation level. */
7211 for (n_output = 0;n_output < gen_nb_debug_FILE_ptr;n_output++) {
7212 for (n_attr = 0;n_attr < gen_nb_xmlAttrPtr;n_attr++) {
7213 for (n_depth = 0;n_depth < gen_nb_int;n_depth++) {
7214 mem_base = xmlMemBlocks();
7215 output = gen_debug_FILE_ptr(n_output, 0);
7216 attr = gen_xmlAttrPtr(n_attr, 1);
7217 depth = gen_int(n_depth, 2);
7219 xmlDebugDumpAttrList(output, attr, depth);
7221 des_debug_FILE_ptr(n_output, output, 0);
7222 des_xmlAttrPtr(n_attr, attr, 1);
7223 des_int(n_depth, depth, 2);
7224 xmlResetLastError();
7225 if (mem_base != xmlMemBlocks()) {
7226 printf("Leak of %d blocks found in xmlDebugDumpAttrList",
7227 xmlMemBlocks() - mem_base);
7229 printf(" %d", n_output);
7230 printf(" %d", n_attr);
7231 printf(" %d", n_depth);
7245 test_xmlDebugDumpDTD(void) {
7248 #if defined(LIBXML_DEBUG_ENABLED)
7250 FILE * output; /* the FILE * for the output */
7252 xmlDtdPtr dtd; /* the DTD */
7255 for (n_output = 0;n_output < gen_nb_debug_FILE_ptr;n_output++) {
7256 for (n_dtd = 0;n_dtd < gen_nb_xmlDtdPtr;n_dtd++) {
7257 mem_base = xmlMemBlocks();
7258 output = gen_debug_FILE_ptr(n_output, 0);
7259 dtd = gen_xmlDtdPtr(n_dtd, 1);
7261 xmlDebugDumpDTD(output, dtd);
7263 des_debug_FILE_ptr(n_output, output, 0);
7264 des_xmlDtdPtr(n_dtd, dtd, 1);
7265 xmlResetLastError();
7266 if (mem_base != xmlMemBlocks()) {
7267 printf("Leak of %d blocks found in xmlDebugDumpDTD",
7268 xmlMemBlocks() - mem_base);
7270 printf(" %d", n_output);
7271 printf(" %d", n_dtd);
7284 test_xmlDebugDumpDocument(void) {
7287 #if defined(LIBXML_DEBUG_ENABLED)
7289 FILE * output; /* the FILE * for the output */
7291 xmlDocPtr doc; /* the document */
7294 for (n_output = 0;n_output < gen_nb_debug_FILE_ptr;n_output++) {
7295 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
7296 mem_base = xmlMemBlocks();
7297 output = gen_debug_FILE_ptr(n_output, 0);
7298 doc = gen_xmlDocPtr(n_doc, 1);
7300 xmlDebugDumpDocument(output, doc);
7302 des_debug_FILE_ptr(n_output, output, 0);
7303 des_xmlDocPtr(n_doc, doc, 1);
7304 xmlResetLastError();
7305 if (mem_base != xmlMemBlocks()) {
7306 printf("Leak of %d blocks found in xmlDebugDumpDocument",
7307 xmlMemBlocks() - mem_base);
7309 printf(" %d", n_output);
7310 printf(" %d", n_doc);
7323 test_xmlDebugDumpDocumentHead(void) {
7326 #if defined(LIBXML_DEBUG_ENABLED)
7328 FILE * output; /* the FILE * for the output */
7330 xmlDocPtr doc; /* the document */
7333 for (n_output = 0;n_output < gen_nb_debug_FILE_ptr;n_output++) {
7334 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
7335 mem_base = xmlMemBlocks();
7336 output = gen_debug_FILE_ptr(n_output, 0);
7337 doc = gen_xmlDocPtr(n_doc, 1);
7339 xmlDebugDumpDocumentHead(output, doc);
7341 des_debug_FILE_ptr(n_output, output, 0);
7342 des_xmlDocPtr(n_doc, doc, 1);
7343 xmlResetLastError();
7344 if (mem_base != xmlMemBlocks()) {
7345 printf("Leak of %d blocks found in xmlDebugDumpDocumentHead",
7346 xmlMemBlocks() - mem_base);
7348 printf(" %d", n_output);
7349 printf(" %d", n_doc);
7362 test_xmlDebugDumpEntities(void) {
7365 #if defined(LIBXML_DEBUG_ENABLED)
7367 FILE * output; /* the FILE * for the output */
7369 xmlDocPtr doc; /* the document */
7372 for (n_output = 0;n_output < gen_nb_debug_FILE_ptr;n_output++) {
7373 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
7374 mem_base = xmlMemBlocks();
7375 output = gen_debug_FILE_ptr(n_output, 0);
7376 doc = gen_xmlDocPtr(n_doc, 1);
7378 xmlDebugDumpEntities(output, doc);
7380 des_debug_FILE_ptr(n_output, output, 0);
7381 des_xmlDocPtr(n_doc, doc, 1);
7382 xmlResetLastError();
7383 if (mem_base != xmlMemBlocks()) {
7384 printf("Leak of %d blocks found in xmlDebugDumpEntities",
7385 xmlMemBlocks() - mem_base);
7387 printf(" %d", n_output);
7388 printf(" %d", n_doc);
7401 test_xmlDebugDumpNode(void) {
7404 #if defined(LIBXML_DEBUG_ENABLED)
7406 FILE * output; /* the FILE * for the output */
7408 xmlNodePtr node; /* the node */
7410 int depth; /* the indentation level. */
7413 for (n_output = 0;n_output < gen_nb_debug_FILE_ptr;n_output++) {
7414 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
7415 for (n_depth = 0;n_depth < gen_nb_int;n_depth++) {
7416 mem_base = xmlMemBlocks();
7417 output = gen_debug_FILE_ptr(n_output, 0);
7418 node = gen_xmlNodePtr(n_node, 1);
7419 depth = gen_int(n_depth, 2);
7421 xmlDebugDumpNode(output, node, depth);
7423 des_debug_FILE_ptr(n_output, output, 0);
7424 des_xmlNodePtr(n_node, node, 1);
7425 des_int(n_depth, depth, 2);
7426 xmlResetLastError();
7427 if (mem_base != xmlMemBlocks()) {
7428 printf("Leak of %d blocks found in xmlDebugDumpNode",
7429 xmlMemBlocks() - mem_base);
7431 printf(" %d", n_output);
7432 printf(" %d", n_node);
7433 printf(" %d", n_depth);
7447 test_xmlDebugDumpNodeList(void) {
7450 #if defined(LIBXML_DEBUG_ENABLED)
7452 FILE * output; /* the FILE * for the output */
7454 xmlNodePtr node; /* the node list */
7456 int depth; /* the indentation level. */
7459 for (n_output = 0;n_output < gen_nb_debug_FILE_ptr;n_output++) {
7460 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
7461 for (n_depth = 0;n_depth < gen_nb_int;n_depth++) {
7462 mem_base = xmlMemBlocks();
7463 output = gen_debug_FILE_ptr(n_output, 0);
7464 node = gen_xmlNodePtr(n_node, 1);
7465 depth = gen_int(n_depth, 2);
7467 xmlDebugDumpNodeList(output, node, depth);
7469 des_debug_FILE_ptr(n_output, output, 0);
7470 des_xmlNodePtr(n_node, node, 1);
7471 des_int(n_depth, depth, 2);
7472 xmlResetLastError();
7473 if (mem_base != xmlMemBlocks()) {
7474 printf("Leak of %d blocks found in xmlDebugDumpNodeList",
7475 xmlMemBlocks() - mem_base);
7477 printf(" %d", n_output);
7478 printf(" %d", n_node);
7479 printf(" %d", n_depth);
7493 test_xmlDebugDumpOneNode(void) {
7496 #if defined(LIBXML_DEBUG_ENABLED)
7498 FILE * output; /* the FILE * for the output */
7500 xmlNodePtr node; /* the node */
7502 int depth; /* the indentation level. */
7505 for (n_output = 0;n_output < gen_nb_debug_FILE_ptr;n_output++) {
7506 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
7507 for (n_depth = 0;n_depth < gen_nb_int;n_depth++) {
7508 mem_base = xmlMemBlocks();
7509 output = gen_debug_FILE_ptr(n_output, 0);
7510 node = gen_xmlNodePtr(n_node, 1);
7511 depth = gen_int(n_depth, 2);
7513 xmlDebugDumpOneNode(output, node, depth);
7515 des_debug_FILE_ptr(n_output, output, 0);
7516 des_xmlNodePtr(n_node, node, 1);
7517 des_int(n_depth, depth, 2);
7518 xmlResetLastError();
7519 if (mem_base != xmlMemBlocks()) {
7520 printf("Leak of %d blocks found in xmlDebugDumpOneNode",
7521 xmlMemBlocks() - mem_base);
7523 printf(" %d", n_output);
7524 printf(" %d", n_node);
7525 printf(" %d", n_depth);
7539 test_xmlDebugDumpString(void) {
7542 #if defined(LIBXML_DEBUG_ENABLED)
7544 FILE * output; /* the FILE * for the output */
7546 xmlChar * str; /* the string */
7549 for (n_output = 0;n_output < gen_nb_debug_FILE_ptr;n_output++) {
7550 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
7551 mem_base = xmlMemBlocks();
7552 output = gen_debug_FILE_ptr(n_output, 0);
7553 str = gen_const_xmlChar_ptr(n_str, 1);
7555 xmlDebugDumpString(output, (const xmlChar *)str);
7557 des_debug_FILE_ptr(n_output, output, 0);
7558 des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 1);
7559 xmlResetLastError();
7560 if (mem_base != xmlMemBlocks()) {
7561 printf("Leak of %d blocks found in xmlDebugDumpString",
7562 xmlMemBlocks() - mem_base);
7564 printf(" %d", n_output);
7565 printf(" %d", n_str);
7578 test_xmlLsCountNode(void) {
7581 #if defined(LIBXML_DEBUG_ENABLED)
7584 xmlNodePtr node; /* the node to count */
7587 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
7588 mem_base = xmlMemBlocks();
7589 node = gen_xmlNodePtr(n_node, 0);
7591 ret_val = xmlLsCountNode(node);
7592 desret_int(ret_val);
7594 des_xmlNodePtr(n_node, node, 0);
7595 xmlResetLastError();
7596 if (mem_base != xmlMemBlocks()) {
7597 printf("Leak of %d blocks found in xmlLsCountNode",
7598 xmlMemBlocks() - mem_base);
7600 printf(" %d", n_node);
7612 test_xmlLsOneNode(void) {
7615 #if defined(LIBXML_DEBUG_ENABLED)
7617 FILE * output; /* the FILE * for the output */
7619 xmlNodePtr node; /* the node to dump */
7622 for (n_output = 0;n_output < gen_nb_debug_FILE_ptr;n_output++) {
7623 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
7624 mem_base = xmlMemBlocks();
7625 output = gen_debug_FILE_ptr(n_output, 0);
7626 node = gen_xmlNodePtr(n_node, 1);
7628 xmlLsOneNode(output, node);
7630 des_debug_FILE_ptr(n_output, output, 0);
7631 des_xmlNodePtr(n_node, node, 1);
7632 xmlResetLastError();
7633 if (mem_base != xmlMemBlocks()) {
7634 printf("Leak of %d blocks found in xmlLsOneNode",
7635 xmlMemBlocks() - mem_base);
7637 printf(" %d", n_output);
7638 printf(" %d", n_node);
7650 #define gen_nb_char_ptr 1
7651 static char * gen_char_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
7654 static void des_char_ptr(int no ATTRIBUTE_UNUSED, char * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
7658 test_xmlShell(void) {
7662 /* missing type support */
7668 test_xmlShellBase(void) {
7671 #if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED)
7674 xmlShellCtxtPtr ctxt; /* the shell context */
7676 char * arg; /* unused */
7678 xmlNodePtr node; /* a node */
7680 xmlNodePtr node2; /* unused */
7683 for (n_ctxt = 0;n_ctxt < gen_nb_xmlShellCtxtPtr;n_ctxt++) {
7684 for (n_arg = 0;n_arg < gen_nb_char_ptr;n_arg++) {
7685 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
7686 for (n_node2 = 0;n_node2 < gen_nb_xmlNodePtr;n_node2++) {
7687 mem_base = xmlMemBlocks();
7688 ctxt = gen_xmlShellCtxtPtr(n_ctxt, 0);
7689 arg = gen_char_ptr(n_arg, 1);
7690 node = gen_xmlNodePtr(n_node, 2);
7691 node2 = gen_xmlNodePtr(n_node2, 3);
7693 ret_val = xmlShellBase(ctxt, arg, node, node2);
7694 desret_int(ret_val);
7696 des_xmlShellCtxtPtr(n_ctxt, ctxt, 0);
7697 des_char_ptr(n_arg, arg, 1);
7698 des_xmlNodePtr(n_node, node, 2);
7699 des_xmlNodePtr(n_node2, node2, 3);
7700 xmlResetLastError();
7701 if (mem_base != xmlMemBlocks()) {
7702 printf("Leak of %d blocks found in xmlShellBase",
7703 xmlMemBlocks() - mem_base);
7705 printf(" %d", n_ctxt);
7706 printf(" %d", n_arg);
7707 printf(" %d", n_node);
7708 printf(" %d", n_node2);
7723 test_xmlShellCat(void) {
7726 #if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
7729 xmlShellCtxtPtr ctxt; /* the shell context */
7731 char * arg; /* unused */
7733 xmlNodePtr node; /* a node */
7735 xmlNodePtr node2; /* unused */
7738 for (n_ctxt = 0;n_ctxt < gen_nb_xmlShellCtxtPtr;n_ctxt++) {
7739 for (n_arg = 0;n_arg < gen_nb_char_ptr;n_arg++) {
7740 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
7741 for (n_node2 = 0;n_node2 < gen_nb_xmlNodePtr;n_node2++) {
7742 mem_base = xmlMemBlocks();
7743 ctxt = gen_xmlShellCtxtPtr(n_ctxt, 0);
7744 arg = gen_char_ptr(n_arg, 1);
7745 node = gen_xmlNodePtr(n_node, 2);
7746 node2 = gen_xmlNodePtr(n_node2, 3);
7748 ret_val = xmlShellCat(ctxt, arg, node, node2);
7749 desret_int(ret_val);
7751 des_xmlShellCtxtPtr(n_ctxt, ctxt, 0);
7752 des_char_ptr(n_arg, arg, 1);
7753 des_xmlNodePtr(n_node, node, 2);
7754 des_xmlNodePtr(n_node2, node2, 3);
7755 xmlResetLastError();
7756 if (mem_base != xmlMemBlocks()) {
7757 printf("Leak of %d blocks found in xmlShellCat",
7758 xmlMemBlocks() - mem_base);
7760 printf(" %d", n_ctxt);
7761 printf(" %d", n_arg);
7762 printf(" %d", n_node);
7763 printf(" %d", n_node2);
7778 test_xmlShellDir(void) {
7781 #if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED)
7784 xmlShellCtxtPtr ctxt; /* the shell context */
7786 char * arg; /* unused */
7788 xmlNodePtr node; /* a node */
7790 xmlNodePtr node2; /* unused */
7793 for (n_ctxt = 0;n_ctxt < gen_nb_xmlShellCtxtPtr;n_ctxt++) {
7794 for (n_arg = 0;n_arg < gen_nb_char_ptr;n_arg++) {
7795 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
7796 for (n_node2 = 0;n_node2 < gen_nb_xmlNodePtr;n_node2++) {
7797 mem_base = xmlMemBlocks();
7798 ctxt = gen_xmlShellCtxtPtr(n_ctxt, 0);
7799 arg = gen_char_ptr(n_arg, 1);
7800 node = gen_xmlNodePtr(n_node, 2);
7801 node2 = gen_xmlNodePtr(n_node2, 3);
7803 ret_val = xmlShellDir(ctxt, arg, node, node2);
7804 desret_int(ret_val);
7806 des_xmlShellCtxtPtr(n_ctxt, ctxt, 0);
7807 des_char_ptr(n_arg, arg, 1);
7808 des_xmlNodePtr(n_node, node, 2);
7809 des_xmlNodePtr(n_node2, node2, 3);
7810 xmlResetLastError();
7811 if (mem_base != xmlMemBlocks()) {
7812 printf("Leak of %d blocks found in xmlShellDir",
7813 xmlMemBlocks() - mem_base);
7815 printf(" %d", n_ctxt);
7816 printf(" %d", n_arg);
7817 printf(" %d", n_node);
7818 printf(" %d", n_node2);
7833 test_xmlShellDu(void) {
7836 #if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED)
7839 xmlShellCtxtPtr ctxt; /* the shell context */
7841 char * arg; /* unused */
7843 xmlNodePtr tree; /* a node defining a subtree */
7845 xmlNodePtr node2; /* unused */
7848 for (n_ctxt = 0;n_ctxt < gen_nb_xmlShellCtxtPtr;n_ctxt++) {
7849 for (n_arg = 0;n_arg < gen_nb_char_ptr;n_arg++) {
7850 for (n_tree = 0;n_tree < gen_nb_xmlNodePtr;n_tree++) {
7851 for (n_node2 = 0;n_node2 < gen_nb_xmlNodePtr;n_node2++) {
7852 mem_base = xmlMemBlocks();
7853 ctxt = gen_xmlShellCtxtPtr(n_ctxt, 0);
7854 arg = gen_char_ptr(n_arg, 1);
7855 tree = gen_xmlNodePtr(n_tree, 2);
7856 node2 = gen_xmlNodePtr(n_node2, 3);
7858 ret_val = xmlShellDu(ctxt, arg, tree, node2);
7859 desret_int(ret_val);
7861 des_xmlShellCtxtPtr(n_ctxt, ctxt, 0);
7862 des_char_ptr(n_arg, arg, 1);
7863 des_xmlNodePtr(n_tree, tree, 2);
7864 des_xmlNodePtr(n_node2, node2, 3);
7865 xmlResetLastError();
7866 if (mem_base != xmlMemBlocks()) {
7867 printf("Leak of %d blocks found in xmlShellDu",
7868 xmlMemBlocks() - mem_base);
7870 printf(" %d", n_ctxt);
7871 printf(" %d", n_arg);
7872 printf(" %d", n_tree);
7873 printf(" %d", n_node2);
7888 test_xmlShellList(void) {
7891 #if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED)
7894 xmlShellCtxtPtr ctxt; /* the shell context */
7896 char * arg; /* unused */
7898 xmlNodePtr node; /* a node */
7900 xmlNodePtr node2; /* unused */
7903 for (n_ctxt = 0;n_ctxt < gen_nb_xmlShellCtxtPtr;n_ctxt++) {
7904 for (n_arg = 0;n_arg < gen_nb_char_ptr;n_arg++) {
7905 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
7906 for (n_node2 = 0;n_node2 < gen_nb_xmlNodePtr;n_node2++) {
7907 mem_base = xmlMemBlocks();
7908 ctxt = gen_xmlShellCtxtPtr(n_ctxt, 0);
7909 arg = gen_char_ptr(n_arg, 1);
7910 node = gen_xmlNodePtr(n_node, 2);
7911 node2 = gen_xmlNodePtr(n_node2, 3);
7913 ret_val = xmlShellList(ctxt, arg, node, node2);
7914 desret_int(ret_val);
7916 des_xmlShellCtxtPtr(n_ctxt, ctxt, 0);
7917 des_char_ptr(n_arg, arg, 1);
7918 des_xmlNodePtr(n_node, node, 2);
7919 des_xmlNodePtr(n_node2, node2, 3);
7920 xmlResetLastError();
7921 if (mem_base != xmlMemBlocks()) {
7922 printf("Leak of %d blocks found in xmlShellList",
7923 xmlMemBlocks() - mem_base);
7925 printf(" %d", n_ctxt);
7926 printf(" %d", n_arg);
7927 printf(" %d", n_node);
7928 printf(" %d", n_node2);
7943 test_xmlShellLoad(void) {
7946 #if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED)
7949 xmlShellCtxtPtr ctxt; /* the shell context */
7951 char * filename; /* the file name */
7953 xmlNodePtr node; /* unused */
7955 xmlNodePtr node2; /* unused */
7958 for (n_ctxt = 0;n_ctxt < gen_nb_xmlShellCtxtPtr;n_ctxt++) {
7959 for (n_filename = 0;n_filename < gen_nb_char_ptr;n_filename++) {
7960 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
7961 for (n_node2 = 0;n_node2 < gen_nb_xmlNodePtr;n_node2++) {
7962 mem_base = xmlMemBlocks();
7963 ctxt = gen_xmlShellCtxtPtr(n_ctxt, 0);
7964 filename = gen_char_ptr(n_filename, 1);
7965 node = gen_xmlNodePtr(n_node, 2);
7966 node2 = gen_xmlNodePtr(n_node2, 3);
7968 ret_val = xmlShellLoad(ctxt, filename, node, node2);
7969 desret_int(ret_val);
7971 des_xmlShellCtxtPtr(n_ctxt, ctxt, 0);
7972 des_char_ptr(n_filename, filename, 1);
7973 des_xmlNodePtr(n_node, node, 2);
7974 des_xmlNodePtr(n_node2, node2, 3);
7975 xmlResetLastError();
7976 if (mem_base != xmlMemBlocks()) {
7977 printf("Leak of %d blocks found in xmlShellLoad",
7978 xmlMemBlocks() - mem_base);
7980 printf(" %d", n_ctxt);
7981 printf(" %d", n_filename);
7982 printf(" %d", n_node);
7983 printf(" %d", n_node2);
7998 test_xmlShellPrintXPathResult(void) {
8001 #if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED)
8003 xmlXPathObjectPtr list; /* a valid result generated by an xpath evaluation */
8006 for (n_list = 0;n_list < gen_nb_xmlXPathObjectPtr;n_list++) {
8007 mem_base = xmlMemBlocks();
8008 list = gen_xmlXPathObjectPtr(n_list, 0);
8010 xmlShellPrintXPathResult(list);
8012 des_xmlXPathObjectPtr(n_list, list, 0);
8013 xmlResetLastError();
8014 if (mem_base != xmlMemBlocks()) {
8015 printf("Leak of %d blocks found in xmlShellPrintXPathResult",
8016 xmlMemBlocks() - mem_base);
8018 printf(" %d", n_list);
8030 test_xmlShellPwd(void) {
8033 #if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED)
8036 xmlShellCtxtPtr ctxt; /* the shell context */
8038 char * buffer; /* the output buffer */
8040 xmlNodePtr node; /* a node */
8042 xmlNodePtr node2; /* unused */
8045 for (n_ctxt = 0;n_ctxt < gen_nb_xmlShellCtxtPtr;n_ctxt++) {
8046 for (n_buffer = 0;n_buffer < gen_nb_char_ptr;n_buffer++) {
8047 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
8048 for (n_node2 = 0;n_node2 < gen_nb_xmlNodePtr;n_node2++) {
8049 mem_base = xmlMemBlocks();
8050 ctxt = gen_xmlShellCtxtPtr(n_ctxt, 0);
8051 buffer = gen_char_ptr(n_buffer, 1);
8052 node = gen_xmlNodePtr(n_node, 2);
8053 node2 = gen_xmlNodePtr(n_node2, 3);
8055 ret_val = xmlShellPwd(ctxt, buffer, node, node2);
8056 desret_int(ret_val);
8058 des_xmlShellCtxtPtr(n_ctxt, ctxt, 0);
8059 des_char_ptr(n_buffer, buffer, 1);
8060 des_xmlNodePtr(n_node, node, 2);
8061 des_xmlNodePtr(n_node2, node2, 3);
8062 xmlResetLastError();
8063 if (mem_base != xmlMemBlocks()) {
8064 printf("Leak of %d blocks found in xmlShellPwd",
8065 xmlMemBlocks() - mem_base);
8067 printf(" %d", n_ctxt);
8068 printf(" %d", n_buffer);
8069 printf(" %d", n_node);
8070 printf(" %d", n_node2);
8085 test_xmlShellSave(void) {
8088 #if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
8091 xmlShellCtxtPtr ctxt; /* the shell context */
8093 char * filename; /* the file name (optional) */
8095 xmlNodePtr node; /* unused */
8097 xmlNodePtr node2; /* unused */
8100 for (n_ctxt = 0;n_ctxt < gen_nb_xmlShellCtxtPtr;n_ctxt++) {
8101 for (n_filename = 0;n_filename < gen_nb_char_ptr;n_filename++) {
8102 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
8103 for (n_node2 = 0;n_node2 < gen_nb_xmlNodePtr;n_node2++) {
8104 mem_base = xmlMemBlocks();
8105 ctxt = gen_xmlShellCtxtPtr(n_ctxt, 0);
8106 filename = gen_char_ptr(n_filename, 1);
8107 node = gen_xmlNodePtr(n_node, 2);
8108 node2 = gen_xmlNodePtr(n_node2, 3);
8110 ret_val = xmlShellSave(ctxt, filename, node, node2);
8111 desret_int(ret_val);
8113 des_xmlShellCtxtPtr(n_ctxt, ctxt, 0);
8114 des_char_ptr(n_filename, filename, 1);
8115 des_xmlNodePtr(n_node, node, 2);
8116 des_xmlNodePtr(n_node2, node2, 3);
8117 xmlResetLastError();
8118 if (mem_base != xmlMemBlocks()) {
8119 printf("Leak of %d blocks found in xmlShellSave",
8120 xmlMemBlocks() - mem_base);
8122 printf(" %d", n_ctxt);
8123 printf(" %d", n_filename);
8124 printf(" %d", n_node);
8125 printf(" %d", n_node2);
8140 test_xmlShellValidate(void) {
8143 #if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_VALID_ENABLED)
8146 xmlShellCtxtPtr ctxt; /* the shell context */
8148 char * dtd; /* the DTD URI (optional) */
8150 xmlNodePtr node; /* unused */
8152 xmlNodePtr node2; /* unused */
8155 for (n_ctxt = 0;n_ctxt < gen_nb_xmlShellCtxtPtr;n_ctxt++) {
8156 for (n_dtd = 0;n_dtd < gen_nb_char_ptr;n_dtd++) {
8157 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
8158 for (n_node2 = 0;n_node2 < gen_nb_xmlNodePtr;n_node2++) {
8159 mem_base = xmlMemBlocks();
8160 ctxt = gen_xmlShellCtxtPtr(n_ctxt, 0);
8161 dtd = gen_char_ptr(n_dtd, 1);
8162 node = gen_xmlNodePtr(n_node, 2);
8163 node2 = gen_xmlNodePtr(n_node2, 3);
8165 ret_val = xmlShellValidate(ctxt, dtd, node, node2);
8166 desret_int(ret_val);
8168 des_xmlShellCtxtPtr(n_ctxt, ctxt, 0);
8169 des_char_ptr(n_dtd, dtd, 1);
8170 des_xmlNodePtr(n_node, node, 2);
8171 des_xmlNodePtr(n_node2, node2, 3);
8172 xmlResetLastError();
8173 if (mem_base != xmlMemBlocks()) {
8174 printf("Leak of %d blocks found in xmlShellValidate",
8175 xmlMemBlocks() - mem_base);
8177 printf(" %d", n_ctxt);
8178 printf(" %d", n_dtd);
8179 printf(" %d", n_node);
8180 printf(" %d", n_node2);
8195 test_xmlShellWrite(void) {
8198 #if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
8201 xmlShellCtxtPtr ctxt; /* the shell context */
8203 char * filename; /* the file name */
8205 xmlNodePtr node; /* a node in the tree */
8207 xmlNodePtr node2; /* unused */
8210 for (n_ctxt = 0;n_ctxt < gen_nb_xmlShellCtxtPtr;n_ctxt++) {
8211 for (n_filename = 0;n_filename < gen_nb_char_ptr;n_filename++) {
8212 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
8213 for (n_node2 = 0;n_node2 < gen_nb_xmlNodePtr;n_node2++) {
8214 mem_base = xmlMemBlocks();
8215 ctxt = gen_xmlShellCtxtPtr(n_ctxt, 0);
8216 filename = gen_char_ptr(n_filename, 1);
8217 node = gen_xmlNodePtr(n_node, 2);
8218 node2 = gen_xmlNodePtr(n_node2, 3);
8220 ret_val = xmlShellWrite(ctxt, filename, node, node2);
8221 desret_int(ret_val);
8223 des_xmlShellCtxtPtr(n_ctxt, ctxt, 0);
8224 des_char_ptr(n_filename, filename, 1);
8225 des_xmlNodePtr(n_node, node, 2);
8226 des_xmlNodePtr(n_node2, node2, 3);
8227 xmlResetLastError();
8228 if (mem_base != xmlMemBlocks()) {
8229 printf("Leak of %d blocks found in xmlShellWrite",
8230 xmlMemBlocks() - mem_base);
8232 printf(" %d", n_ctxt);
8233 printf(" %d", n_filename);
8234 printf(" %d", n_node);
8235 printf(" %d", n_node2);
8249 test_debugXML(void) {
8253 if (quiet == 0) printf("Testing debugXML : 25 of 28 functions ...\n");
8254 rc = test_xmlBoolToText();
8255 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8256 rc = test_xmlDebugCheckDocument();
8257 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8258 rc = test_xmlDebugDumpAttr();
8259 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8260 rc = test_xmlDebugDumpAttrList();
8261 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8262 rc = test_xmlDebugDumpDTD();
8263 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8264 rc = test_xmlDebugDumpDocument();
8265 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8266 rc = test_xmlDebugDumpDocumentHead();
8267 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8268 rc = test_xmlDebugDumpEntities();
8269 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8270 rc = test_xmlDebugDumpNode();
8271 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8272 rc = test_xmlDebugDumpNodeList();
8273 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8274 rc = test_xmlDebugDumpOneNode();
8275 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8276 rc = test_xmlDebugDumpString();
8277 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8278 rc = test_xmlLsCountNode();
8279 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8280 rc = test_xmlLsOneNode();
8281 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8282 rc = test_xmlShell();
8283 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8284 rc = test_xmlShellBase();
8285 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8286 rc = test_xmlShellCat();
8287 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8288 rc = test_xmlShellDir();
8289 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8290 rc = test_xmlShellDu();
8291 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8292 rc = test_xmlShellList();
8293 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8294 rc = test_xmlShellLoad();
8295 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8296 rc = test_xmlShellPrintXPathResult();
8297 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8298 rc = test_xmlShellPwd();
8299 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8300 rc = test_xmlShellSave();
8301 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8302 rc = test_xmlShellValidate();
8303 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8304 rc = test_xmlShellWrite();
8305 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8308 printf("Module debugXML: %d errors\n", test_ret);
8313 test_xmlDictCleanup(void) {
8318 mem_base = xmlMemBlocks();
8322 xmlResetLastError();
8323 if (mem_base != xmlMemBlocks()) {
8324 printf("Leak of %d blocks found in xmlDictCleanup",
8325 xmlMemBlocks() - mem_base);
8336 test_xmlDictCreate(void) {
8342 mem_base = xmlMemBlocks();
8344 ret_val = xmlDictCreate();
8345 desret_xmlDictPtr(ret_val);
8347 xmlResetLastError();
8348 if (mem_base != xmlMemBlocks()) {
8349 printf("Leak of %d blocks found in xmlDictCreate",
8350 xmlMemBlocks() - mem_base);
8361 test_xmlDictCreateSub(void) {
8366 xmlDictPtr sub; /* an existing dictionary */
8369 for (n_sub = 0;n_sub < gen_nb_xmlDictPtr;n_sub++) {
8370 mem_base = xmlMemBlocks();
8371 sub = gen_xmlDictPtr(n_sub, 0);
8373 ret_val = xmlDictCreateSub(sub);
8374 desret_xmlDictPtr(ret_val);
8376 des_xmlDictPtr(n_sub, sub, 0);
8377 xmlResetLastError();
8378 if (mem_base != xmlMemBlocks()) {
8379 printf("Leak of %d blocks found in xmlDictCreateSub",
8380 xmlMemBlocks() - mem_base);
8382 printf(" %d", n_sub);
8393 test_xmlDictExists(void) {
8397 const xmlChar * ret_val;
8398 xmlDictPtr dict; /* the dictionary */
8400 xmlChar * name; /* the name of the userdata */
8402 int len; /* the length of the name, if -1 it is recomputed */
8405 for (n_dict = 0;n_dict < gen_nb_xmlDictPtr;n_dict++) {
8406 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
8407 for (n_len = 0;n_len < gen_nb_int;n_len++) {
8408 mem_base = xmlMemBlocks();
8409 dict = gen_xmlDictPtr(n_dict, 0);
8410 name = gen_const_xmlChar_ptr(n_name, 1);
8411 len = gen_int(n_len, 2);
8412 if ((name != NULL) &&
8413 (len > (int) strlen((const char *) name) + 1))
8416 ret_val = xmlDictExists(dict, (const xmlChar *)name, len);
8417 desret_const_xmlChar_ptr(ret_val);
8419 des_xmlDictPtr(n_dict, dict, 0);
8420 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
8421 des_int(n_len, len, 2);
8422 xmlResetLastError();
8423 if (mem_base != xmlMemBlocks()) {
8424 printf("Leak of %d blocks found in xmlDictExists",
8425 xmlMemBlocks() - mem_base);
8427 printf(" %d", n_dict);
8428 printf(" %d", n_name);
8429 printf(" %d", n_len);
8442 test_xmlDictGetUsage(void) {
8446 /* missing type support */
8452 test_xmlDictLookup(void) {
8456 const xmlChar * ret_val;
8457 xmlDictPtr dict; /* the dictionary */
8459 xmlChar * name; /* the name of the userdata */
8461 int len; /* the length of the name, if -1 it is recomputed */
8464 for (n_dict = 0;n_dict < gen_nb_xmlDictPtr;n_dict++) {
8465 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
8466 for (n_len = 0;n_len < gen_nb_int;n_len++) {
8467 mem_base = xmlMemBlocks();
8468 dict = gen_xmlDictPtr(n_dict, 0);
8469 name = gen_const_xmlChar_ptr(n_name, 1);
8470 len = gen_int(n_len, 2);
8471 if ((name != NULL) &&
8472 (len > (int) strlen((const char *) name) + 1))
8475 ret_val = xmlDictLookup(dict, (const xmlChar *)name, len);
8476 desret_const_xmlChar_ptr(ret_val);
8478 des_xmlDictPtr(n_dict, dict, 0);
8479 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
8480 des_int(n_len, len, 2);
8481 xmlResetLastError();
8482 if (mem_base != xmlMemBlocks()) {
8483 printf("Leak of %d blocks found in xmlDictLookup",
8484 xmlMemBlocks() - mem_base);
8486 printf(" %d", n_dict);
8487 printf(" %d", n_name);
8488 printf(" %d", n_len);
8501 test_xmlDictOwns(void) {
8506 xmlDictPtr dict; /* the dictionary */
8508 xmlChar * str; /* the string */
8511 for (n_dict = 0;n_dict < gen_nb_xmlDictPtr;n_dict++) {
8512 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
8513 mem_base = xmlMemBlocks();
8514 dict = gen_xmlDictPtr(n_dict, 0);
8515 str = gen_const_xmlChar_ptr(n_str, 1);
8517 ret_val = xmlDictOwns(dict, (const xmlChar *)str);
8518 desret_int(ret_val);
8520 des_xmlDictPtr(n_dict, dict, 0);
8521 des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 1);
8522 xmlResetLastError();
8523 if (mem_base != xmlMemBlocks()) {
8524 printf("Leak of %d blocks found in xmlDictOwns",
8525 xmlMemBlocks() - mem_base);
8527 printf(" %d", n_dict);
8528 printf(" %d", n_str);
8540 test_xmlDictQLookup(void) {
8544 const xmlChar * ret_val;
8545 xmlDictPtr dict; /* the dictionary */
8547 xmlChar * prefix; /* the prefix */
8549 xmlChar * name; /* the name */
8552 for (n_dict = 0;n_dict < gen_nb_xmlDictPtr;n_dict++) {
8553 for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
8554 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
8555 mem_base = xmlMemBlocks();
8556 dict = gen_xmlDictPtr(n_dict, 0);
8557 prefix = gen_const_xmlChar_ptr(n_prefix, 1);
8558 name = gen_const_xmlChar_ptr(n_name, 2);
8560 ret_val = xmlDictQLookup(dict, (const xmlChar *)prefix, (const xmlChar *)name);
8561 desret_const_xmlChar_ptr(ret_val);
8563 des_xmlDictPtr(n_dict, dict, 0);
8564 des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 1);
8565 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
8566 xmlResetLastError();
8567 if (mem_base != xmlMemBlocks()) {
8568 printf("Leak of %d blocks found in xmlDictQLookup",
8569 xmlMemBlocks() - mem_base);
8571 printf(" %d", n_dict);
8572 printf(" %d", n_prefix);
8573 printf(" %d", n_name);
8586 test_xmlDictReference(void) {
8591 xmlDictPtr dict; /* the dictionary */
8594 for (n_dict = 0;n_dict < gen_nb_xmlDictPtr;n_dict++) {
8595 mem_base = xmlMemBlocks();
8596 dict = gen_xmlDictPtr(n_dict, 0);
8598 ret_val = xmlDictReference(dict);
8600 desret_int(ret_val);
8602 des_xmlDictPtr(n_dict, dict, 0);
8603 xmlResetLastError();
8604 if (mem_base != xmlMemBlocks()) {
8605 printf("Leak of %d blocks found in xmlDictReference",
8606 xmlMemBlocks() - mem_base);
8608 printf(" %d", n_dict);
8619 test_xmlDictSetLimit(void) {
8623 /* missing type support */
8629 test_xmlDictSize(void) {
8634 xmlDictPtr dict; /* the dictionary */
8637 for (n_dict = 0;n_dict < gen_nb_xmlDictPtr;n_dict++) {
8638 mem_base = xmlMemBlocks();
8639 dict = gen_xmlDictPtr(n_dict, 0);
8641 ret_val = xmlDictSize(dict);
8642 desret_int(ret_val);
8644 des_xmlDictPtr(n_dict, dict, 0);
8645 xmlResetLastError();
8646 if (mem_base != xmlMemBlocks()) {
8647 printf("Leak of %d blocks found in xmlDictSize",
8648 xmlMemBlocks() - mem_base);
8650 printf(" %d", n_dict);
8661 test_xmlInitializeDict(void) {
8667 mem_base = xmlMemBlocks();
8669 ret_val = xmlInitializeDict();
8670 desret_int(ret_val);
8672 xmlResetLastError();
8673 if (mem_base != xmlMemBlocks()) {
8674 printf("Leak of %d blocks found in xmlInitializeDict",
8675 xmlMemBlocks() - mem_base);
8689 if (quiet == 0) printf("Testing dict : 10 of 13 functions ...\n");
8690 rc = test_xmlDictCleanup();
8691 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8692 rc = test_xmlDictCreate();
8693 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8694 rc = test_xmlDictCreateSub();
8695 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8696 rc = test_xmlDictExists();
8697 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8698 rc = test_xmlDictGetUsage();
8699 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8700 rc = test_xmlDictLookup();
8701 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8702 rc = test_xmlDictOwns();
8703 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8704 rc = test_xmlDictQLookup();
8705 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8706 rc = test_xmlDictReference();
8707 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8708 rc = test_xmlDictSetLimit();
8709 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8710 rc = test_xmlDictSize();
8711 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8712 rc = test_xmlInitializeDict();
8713 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8716 printf("Module dict: %d errors\n", test_ret);
8721 test_UTF8Toisolat1(void) {
8724 #if defined(LIBXML_OUTPUT_ENABLED)
8725 #ifdef LIBXML_OUTPUT_ENABLED
8728 unsigned char * out; /* a pointer to an array of bytes to store the result */
8730 int * outlen; /* the length of @out */
8732 unsigned char * in; /* a pointer to an array of UTF-8 chars */
8734 int * inlen; /* the length of @in */
8737 for (n_out = 0;n_out < gen_nb_unsigned_char_ptr;n_out++) {
8738 for (n_outlen = 0;n_outlen < gen_nb_int_ptr;n_outlen++) {
8739 for (n_in = 0;n_in < gen_nb_const_unsigned_char_ptr;n_in++) {
8740 for (n_inlen = 0;n_inlen < gen_nb_int_ptr;n_inlen++) {
8741 mem_base = xmlMemBlocks();
8742 out = gen_unsigned_char_ptr(n_out, 0);
8743 outlen = gen_int_ptr(n_outlen, 1);
8744 in = gen_const_unsigned_char_ptr(n_in, 2);
8745 inlen = gen_int_ptr(n_inlen, 3);
8747 ret_val = UTF8Toisolat1(out, outlen, (const unsigned char *)in, inlen);
8748 desret_int(ret_val);
8750 des_unsigned_char_ptr(n_out, out, 0);
8751 des_int_ptr(n_outlen, outlen, 1);
8752 des_const_unsigned_char_ptr(n_in, (const unsigned char *)in, 2);
8753 des_int_ptr(n_inlen, inlen, 3);
8754 xmlResetLastError();
8755 if (mem_base != xmlMemBlocks()) {
8756 printf("Leak of %d blocks found in UTF8Toisolat1",
8757 xmlMemBlocks() - mem_base);
8759 printf(" %d", n_out);
8760 printf(" %d", n_outlen);
8761 printf(" %d", n_in);
8762 printf(" %d", n_inlen);
8778 test_isolat1ToUTF8(void) {
8783 unsigned char * out; /* a pointer to an array of bytes to store the result */
8785 int * outlen; /* the length of @out */
8787 unsigned char * in; /* a pointer to an array of ISO Latin 1 chars */
8789 int * inlen; /* the length of @in */
8792 for (n_out = 0;n_out < gen_nb_unsigned_char_ptr;n_out++) {
8793 for (n_outlen = 0;n_outlen < gen_nb_int_ptr;n_outlen++) {
8794 for (n_in = 0;n_in < gen_nb_const_unsigned_char_ptr;n_in++) {
8795 for (n_inlen = 0;n_inlen < gen_nb_int_ptr;n_inlen++) {
8796 mem_base = xmlMemBlocks();
8797 out = gen_unsigned_char_ptr(n_out, 0);
8798 outlen = gen_int_ptr(n_outlen, 1);
8799 in = gen_const_unsigned_char_ptr(n_in, 2);
8800 inlen = gen_int_ptr(n_inlen, 3);
8802 ret_val = isolat1ToUTF8(out, outlen, (const unsigned char *)in, inlen);
8803 desret_int(ret_val);
8805 des_unsigned_char_ptr(n_out, out, 0);
8806 des_int_ptr(n_outlen, outlen, 1);
8807 des_const_unsigned_char_ptr(n_in, (const unsigned char *)in, 2);
8808 des_int_ptr(n_inlen, inlen, 3);
8809 xmlResetLastError();
8810 if (mem_base != xmlMemBlocks()) {
8811 printf("Leak of %d blocks found in isolat1ToUTF8",
8812 xmlMemBlocks() - mem_base);
8814 printf(" %d", n_out);
8815 printf(" %d", n_outlen);
8816 printf(" %d", n_in);
8817 printf(" %d", n_inlen);
8831 test_xmlAddEncodingAlias(void) {
8835 char * name; /* the encoding name as parsed, in UTF-8 format (ASCII actually) */
8837 char * alias; /* the alias name as parsed, in UTF-8 format (ASCII actually) */
8840 for (n_name = 0;n_name < gen_nb_const_char_ptr;n_name++) {
8841 for (n_alias = 0;n_alias < gen_nb_const_char_ptr;n_alias++) {
8842 name = gen_const_char_ptr(n_name, 0);
8843 alias = gen_const_char_ptr(n_alias, 1);
8845 ret_val = xmlAddEncodingAlias((const char *)name, (const char *)alias);
8846 desret_int(ret_val);
8848 des_const_char_ptr(n_name, (const char *)name, 0);
8849 des_const_char_ptr(n_alias, (const char *)alias, 1);
8850 xmlResetLastError();
8859 #define gen_nb_xmlCharEncodingHandler_ptr 1
8860 static xmlCharEncodingHandler * gen_xmlCharEncodingHandler_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
8863 static void des_xmlCharEncodingHandler_ptr(int no ATTRIBUTE_UNUSED, xmlCharEncodingHandler * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
8867 test_xmlCharEncCloseFunc(void) {
8872 xmlCharEncodingHandler * handler; /* char enconding transformation data structure */
8875 for (n_handler = 0;n_handler < gen_nb_xmlCharEncodingHandler_ptr;n_handler++) {
8876 mem_base = xmlMemBlocks();
8877 handler = gen_xmlCharEncodingHandler_ptr(n_handler, 0);
8879 ret_val = xmlCharEncCloseFunc(handler);
8880 desret_int(ret_val);
8882 des_xmlCharEncodingHandler_ptr(n_handler, handler, 0);
8883 xmlResetLastError();
8884 if (mem_base != xmlMemBlocks()) {
8885 printf("Leak of %d blocks found in xmlCharEncCloseFunc",
8886 xmlMemBlocks() - mem_base);
8888 printf(" %d", n_handler);
8899 test_xmlCharEncFirstLine(void) {
8904 xmlCharEncodingHandler * handler; /* char enconding transformation data structure */
8906 xmlBufferPtr out; /* an xmlBuffer for the output. */
8908 xmlBufferPtr in; /* an xmlBuffer for the input */
8911 for (n_handler = 0;n_handler < gen_nb_xmlCharEncodingHandler_ptr;n_handler++) {
8912 for (n_out = 0;n_out < gen_nb_xmlBufferPtr;n_out++) {
8913 for (n_in = 0;n_in < gen_nb_xmlBufferPtr;n_in++) {
8914 mem_base = xmlMemBlocks();
8915 handler = gen_xmlCharEncodingHandler_ptr(n_handler, 0);
8916 out = gen_xmlBufferPtr(n_out, 1);
8917 in = gen_xmlBufferPtr(n_in, 2);
8919 ret_val = xmlCharEncFirstLine(handler, out, in);
8920 desret_int(ret_val);
8922 des_xmlCharEncodingHandler_ptr(n_handler, handler, 0);
8923 des_xmlBufferPtr(n_out, out, 1);
8924 des_xmlBufferPtr(n_in, in, 2);
8925 xmlResetLastError();
8926 if (mem_base != xmlMemBlocks()) {
8927 printf("Leak of %d blocks found in xmlCharEncFirstLine",
8928 xmlMemBlocks() - mem_base);
8930 printf(" %d", n_handler);
8931 printf(" %d", n_out);
8932 printf(" %d", n_in);
8945 test_xmlCharEncInFunc(void) {
8950 xmlCharEncodingHandler * handler; /* char encoding transformation data structure */
8952 xmlBufferPtr out; /* an xmlBuffer for the output. */
8954 xmlBufferPtr in; /* an xmlBuffer for the input */
8957 for (n_handler = 0;n_handler < gen_nb_xmlCharEncodingHandler_ptr;n_handler++) {
8958 for (n_out = 0;n_out < gen_nb_xmlBufferPtr;n_out++) {
8959 for (n_in = 0;n_in < gen_nb_xmlBufferPtr;n_in++) {
8960 mem_base = xmlMemBlocks();
8961 handler = gen_xmlCharEncodingHandler_ptr(n_handler, 0);
8962 out = gen_xmlBufferPtr(n_out, 1);
8963 in = gen_xmlBufferPtr(n_in, 2);
8965 ret_val = xmlCharEncInFunc(handler, out, in);
8966 desret_int(ret_val);
8968 des_xmlCharEncodingHandler_ptr(n_handler, handler, 0);
8969 des_xmlBufferPtr(n_out, out, 1);
8970 des_xmlBufferPtr(n_in, in, 2);
8971 xmlResetLastError();
8972 if (mem_base != xmlMemBlocks()) {
8973 printf("Leak of %d blocks found in xmlCharEncInFunc",
8974 xmlMemBlocks() - mem_base);
8976 printf(" %d", n_handler);
8977 printf(" %d", n_out);
8978 printf(" %d", n_in);
8991 test_xmlCharEncOutFunc(void) {
8996 xmlCharEncodingHandler * handler; /* char enconding transformation data structure */
8998 xmlBufferPtr out; /* an xmlBuffer for the output. */
9000 xmlBufferPtr in; /* an xmlBuffer for the input */
9003 for (n_handler = 0;n_handler < gen_nb_xmlCharEncodingHandler_ptr;n_handler++) {
9004 for (n_out = 0;n_out < gen_nb_xmlBufferPtr;n_out++) {
9005 for (n_in = 0;n_in < gen_nb_xmlBufferPtr;n_in++) {
9006 mem_base = xmlMemBlocks();
9007 handler = gen_xmlCharEncodingHandler_ptr(n_handler, 0);
9008 out = gen_xmlBufferPtr(n_out, 1);
9009 in = gen_xmlBufferPtr(n_in, 2);
9011 ret_val = xmlCharEncOutFunc(handler, out, in);
9012 desret_int(ret_val);
9014 des_xmlCharEncodingHandler_ptr(n_handler, handler, 0);
9015 des_xmlBufferPtr(n_out, out, 1);
9016 des_xmlBufferPtr(n_in, in, 2);
9017 xmlResetLastError();
9018 if (mem_base != xmlMemBlocks()) {
9019 printf("Leak of %d blocks found in xmlCharEncOutFunc",
9020 xmlMemBlocks() - mem_base);
9022 printf(" %d", n_handler);
9023 printf(" %d", n_out);
9024 printf(" %d", n_in);
9037 test_xmlCleanupCharEncodingHandlers(void) {
9042 xmlCleanupCharEncodingHandlers();
9044 xmlResetLastError();
9052 test_xmlCleanupEncodingAliases(void) {
9057 mem_base = xmlMemBlocks();
9059 xmlCleanupEncodingAliases();
9061 xmlResetLastError();
9062 if (mem_base != xmlMemBlocks()) {
9063 printf("Leak of %d blocks found in xmlCleanupEncodingAliases",
9064 xmlMemBlocks() - mem_base);
9075 test_xmlDelEncodingAlias(void) {
9080 char * alias; /* the alias name as parsed, in UTF-8 format (ASCII actually) */
9083 for (n_alias = 0;n_alias < gen_nb_const_char_ptr;n_alias++) {
9084 mem_base = xmlMemBlocks();
9085 alias = gen_const_char_ptr(n_alias, 0);
9087 ret_val = xmlDelEncodingAlias((const char *)alias);
9088 desret_int(ret_val);
9090 des_const_char_ptr(n_alias, (const char *)alias, 0);
9091 xmlResetLastError();
9092 if (mem_base != xmlMemBlocks()) {
9093 printf("Leak of %d blocks found in xmlDelEncodingAlias",
9094 xmlMemBlocks() - mem_base);
9096 printf(" %d", n_alias);
9107 test_xmlDetectCharEncoding(void) {
9111 xmlCharEncoding ret_val;
9112 unsigned char * in; /* a pointer to the first bytes of the XML entity, must be at least 2 bytes long (at least 4 if encoding is UTF4 variant). */
9114 int len; /* pointer to the length of the buffer */
9117 for (n_in = 0;n_in < gen_nb_const_unsigned_char_ptr;n_in++) {
9118 for (n_len = 0;n_len < gen_nb_int;n_len++) {
9119 mem_base = xmlMemBlocks();
9120 in = gen_const_unsigned_char_ptr(n_in, 0);
9121 len = gen_int(n_len, 1);
9123 ret_val = xmlDetectCharEncoding((const unsigned char *)in, len);
9124 desret_xmlCharEncoding(ret_val);
9126 des_const_unsigned_char_ptr(n_in, (const unsigned char *)in, 0);
9127 des_int(n_len, len, 1);
9128 xmlResetLastError();
9129 if (mem_base != xmlMemBlocks()) {
9130 printf("Leak of %d blocks found in xmlDetectCharEncoding",
9131 xmlMemBlocks() - mem_base);
9133 printf(" %d", n_in);
9134 printf(" %d", n_len);
9146 test_xmlFindCharEncodingHandler(void) {
9150 /* missing type support */
9156 test_xmlGetCharEncodingHandler(void) {
9160 /* missing type support */
9166 test_xmlGetCharEncodingName(void) {
9170 const char * ret_val;
9171 xmlCharEncoding enc; /* the encoding */
9174 for (n_enc = 0;n_enc < gen_nb_xmlCharEncoding;n_enc++) {
9175 mem_base = xmlMemBlocks();
9176 enc = gen_xmlCharEncoding(n_enc, 0);
9178 ret_val = xmlGetCharEncodingName(enc);
9179 desret_const_char_ptr(ret_val);
9181 des_xmlCharEncoding(n_enc, enc, 0);
9182 xmlResetLastError();
9183 if (mem_base != xmlMemBlocks()) {
9184 printf("Leak of %d blocks found in xmlGetCharEncodingName",
9185 xmlMemBlocks() - mem_base);
9187 printf(" %d", n_enc);
9198 test_xmlGetEncodingAlias(void) {
9202 const char * ret_val;
9203 char * alias; /* the alias name as parsed, in UTF-8 format (ASCII actually) */
9206 for (n_alias = 0;n_alias < gen_nb_const_char_ptr;n_alias++) {
9207 mem_base = xmlMemBlocks();
9208 alias = gen_const_char_ptr(n_alias, 0);
9210 ret_val = xmlGetEncodingAlias((const char *)alias);
9211 desret_const_char_ptr(ret_val);
9213 des_const_char_ptr(n_alias, (const char *)alias, 0);
9214 xmlResetLastError();
9215 if (mem_base != xmlMemBlocks()) {
9216 printf("Leak of %d blocks found in xmlGetEncodingAlias",
9217 xmlMemBlocks() - mem_base);
9219 printf(" %d", n_alias);
9230 test_xmlInitCharEncodingHandlers(void) {
9235 xmlInitCharEncodingHandlers();
9237 xmlResetLastError();
9245 test_xmlNewCharEncodingHandler(void) {
9249 /* missing type support */
9255 test_xmlParseCharEncoding(void) {
9259 xmlCharEncoding ret_val;
9260 char * name; /* the encoding name as parsed, in UTF-8 format (ASCII actually) */
9263 for (n_name = 0;n_name < gen_nb_const_char_ptr;n_name++) {
9264 mem_base = xmlMemBlocks();
9265 name = gen_const_char_ptr(n_name, 0);
9267 ret_val = xmlParseCharEncoding((const char *)name);
9268 desret_xmlCharEncoding(ret_val);
9270 des_const_char_ptr(n_name, (const char *)name, 0);
9271 xmlResetLastError();
9272 if (mem_base != xmlMemBlocks()) {
9273 printf("Leak of %d blocks found in xmlParseCharEncoding",
9274 xmlMemBlocks() - mem_base);
9276 printf(" %d", n_name);
9286 #define gen_nb_xmlCharEncodingHandlerPtr 1
9287 static xmlCharEncodingHandlerPtr gen_xmlCharEncodingHandlerPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
9290 static void des_xmlCharEncodingHandlerPtr(int no ATTRIBUTE_UNUSED, xmlCharEncodingHandlerPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
9294 test_xmlRegisterCharEncodingHandler(void) {
9298 xmlCharEncodingHandlerPtr handler; /* the xmlCharEncodingHandlerPtr handler block */
9301 for (n_handler = 0;n_handler < gen_nb_xmlCharEncodingHandlerPtr;n_handler++) {
9302 mem_base = xmlMemBlocks();
9303 handler = gen_xmlCharEncodingHandlerPtr(n_handler, 0);
9305 xmlRegisterCharEncodingHandler(handler);
9307 des_xmlCharEncodingHandlerPtr(n_handler, handler, 0);
9308 xmlResetLastError();
9309 if (mem_base != xmlMemBlocks()) {
9310 printf("Leak of %d blocks found in xmlRegisterCharEncodingHandler",
9311 xmlMemBlocks() - mem_base);
9313 printf(" %d", n_handler);
9323 test_encoding(void) {
9327 if (quiet == 0) printf("Testing encoding : 16 of 19 functions ...\n");
9328 rc = test_UTF8Toisolat1();
9329 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9330 rc = test_isolat1ToUTF8();
9331 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9332 rc = test_xmlAddEncodingAlias();
9333 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9334 rc = test_xmlCharEncCloseFunc();
9335 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9336 rc = test_xmlCharEncFirstLine();
9337 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9338 rc = test_xmlCharEncInFunc();
9339 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9340 rc = test_xmlCharEncOutFunc();
9341 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9342 rc = test_xmlCleanupCharEncodingHandlers();
9343 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9344 rc = test_xmlCleanupEncodingAliases();
9345 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9346 rc = test_xmlDelEncodingAlias();
9347 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9348 rc = test_xmlDetectCharEncoding();
9349 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9350 rc = test_xmlFindCharEncodingHandler();
9351 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9352 rc = test_xmlGetCharEncodingHandler();
9353 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9354 rc = test_xmlGetCharEncodingName();
9355 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9356 rc = test_xmlGetEncodingAlias();
9357 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9358 rc = test_xmlInitCharEncodingHandlers();
9359 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9360 rc = test_xmlNewCharEncodingHandler();
9361 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9362 rc = test_xmlParseCharEncoding();
9363 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9364 rc = test_xmlRegisterCharEncodingHandler();
9365 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9368 printf("Module encoding: %d errors\n", test_ret);
9373 test_xmlAddDocEntity(void) {
9377 xmlEntityPtr ret_val;
9378 xmlDocPtr doc; /* the document */
9380 xmlChar * name; /* the entity name */
9382 int type; /* the entity type XML_xxx_yyy_ENTITY */
9384 xmlChar * ExternalID; /* the entity external ID if available */
9386 xmlChar * SystemID; /* the entity system ID if available */
9388 xmlChar * content; /* the entity content */
9391 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
9392 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
9393 for (n_type = 0;n_type < gen_nb_int;n_type++) {
9394 for (n_ExternalID = 0;n_ExternalID < gen_nb_const_xmlChar_ptr;n_ExternalID++) {
9395 for (n_SystemID = 0;n_SystemID < gen_nb_const_xmlChar_ptr;n_SystemID++) {
9396 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
9397 mem_base = xmlMemBlocks();
9398 doc = gen_xmlDocPtr(n_doc, 0);
9399 name = gen_const_xmlChar_ptr(n_name, 1);
9400 type = gen_int(n_type, 2);
9401 ExternalID = gen_const_xmlChar_ptr(n_ExternalID, 3);
9402 SystemID = gen_const_xmlChar_ptr(n_SystemID, 4);
9403 content = gen_const_xmlChar_ptr(n_content, 5);
9405 ret_val = xmlAddDocEntity(doc, (const xmlChar *)name, type, (const xmlChar *)ExternalID, (const xmlChar *)SystemID, (const xmlChar *)content);
9406 desret_xmlEntityPtr(ret_val);
9408 des_xmlDocPtr(n_doc, doc, 0);
9409 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
9410 des_int(n_type, type, 2);
9411 des_const_xmlChar_ptr(n_ExternalID, (const xmlChar *)ExternalID, 3);
9412 des_const_xmlChar_ptr(n_SystemID, (const xmlChar *)SystemID, 4);
9413 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 5);
9414 xmlResetLastError();
9415 if (mem_base != xmlMemBlocks()) {
9416 printf("Leak of %d blocks found in xmlAddDocEntity",
9417 xmlMemBlocks() - mem_base);
9419 printf(" %d", n_doc);
9420 printf(" %d", n_name);
9421 printf(" %d", n_type);
9422 printf(" %d", n_ExternalID);
9423 printf(" %d", n_SystemID);
9424 printf(" %d", n_content);
9440 test_xmlAddDtdEntity(void) {
9444 xmlEntityPtr ret_val;
9445 xmlDocPtr doc; /* the document */
9447 xmlChar * name; /* the entity name */
9449 int type; /* the entity type XML_xxx_yyy_ENTITY */
9451 xmlChar * ExternalID; /* the entity external ID if available */
9453 xmlChar * SystemID; /* the entity system ID if available */
9455 xmlChar * content; /* the entity content */
9458 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
9459 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
9460 for (n_type = 0;n_type < gen_nb_int;n_type++) {
9461 for (n_ExternalID = 0;n_ExternalID < gen_nb_const_xmlChar_ptr;n_ExternalID++) {
9462 for (n_SystemID = 0;n_SystemID < gen_nb_const_xmlChar_ptr;n_SystemID++) {
9463 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
9464 mem_base = xmlMemBlocks();
9465 doc = gen_xmlDocPtr(n_doc, 0);
9466 name = gen_const_xmlChar_ptr(n_name, 1);
9467 type = gen_int(n_type, 2);
9468 ExternalID = gen_const_xmlChar_ptr(n_ExternalID, 3);
9469 SystemID = gen_const_xmlChar_ptr(n_SystemID, 4);
9470 content = gen_const_xmlChar_ptr(n_content, 5);
9472 ret_val = xmlAddDtdEntity(doc, (const xmlChar *)name, type, (const xmlChar *)ExternalID, (const xmlChar *)SystemID, (const xmlChar *)content);
9473 desret_xmlEntityPtr(ret_val);
9475 des_xmlDocPtr(n_doc, doc, 0);
9476 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
9477 des_int(n_type, type, 2);
9478 des_const_xmlChar_ptr(n_ExternalID, (const xmlChar *)ExternalID, 3);
9479 des_const_xmlChar_ptr(n_SystemID, (const xmlChar *)SystemID, 4);
9480 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 5);
9481 xmlResetLastError();
9482 if (mem_base != xmlMemBlocks()) {
9483 printf("Leak of %d blocks found in xmlAddDtdEntity",
9484 xmlMemBlocks() - mem_base);
9486 printf(" %d", n_doc);
9487 printf(" %d", n_name);
9488 printf(" %d", n_type);
9489 printf(" %d", n_ExternalID);
9490 printf(" %d", n_SystemID);
9491 printf(" %d", n_content);
9507 test_xmlCleanupPredefinedEntities(void) {
9510 #if defined(LIBXML_LEGACY_ENABLED)
9511 #ifdef LIBXML_LEGACY_ENABLED
9514 mem_base = xmlMemBlocks();
9516 xmlCleanupPredefinedEntities();
9518 xmlResetLastError();
9519 if (mem_base != xmlMemBlocks()) {
9520 printf("Leak of %d blocks found in xmlCleanupPredefinedEntities",
9521 xmlMemBlocks() - mem_base);
9533 #define gen_nb_xmlEntitiesTablePtr 1
9534 static xmlEntitiesTablePtr gen_xmlEntitiesTablePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
9537 static void des_xmlEntitiesTablePtr(int no ATTRIBUTE_UNUSED, xmlEntitiesTablePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
9541 test_xmlCopyEntitiesTable(void) {
9545 /* missing type support */
9551 test_xmlCreateEntitiesTable(void) {
9555 /* missing type support */
9561 test_xmlDumpEntitiesTable(void) {
9564 #if defined(LIBXML_OUTPUT_ENABLED)
9566 xmlBufferPtr buf; /* An XML buffer. */
9568 xmlEntitiesTablePtr table; /* An entity table */
9571 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
9572 for (n_table = 0;n_table < gen_nb_xmlEntitiesTablePtr;n_table++) {
9573 mem_base = xmlMemBlocks();
9574 buf = gen_xmlBufferPtr(n_buf, 0);
9575 table = gen_xmlEntitiesTablePtr(n_table, 1);
9577 xmlDumpEntitiesTable(buf, table);
9579 des_xmlBufferPtr(n_buf, buf, 0);
9580 des_xmlEntitiesTablePtr(n_table, table, 1);
9581 xmlResetLastError();
9582 if (mem_base != xmlMemBlocks()) {
9583 printf("Leak of %d blocks found in xmlDumpEntitiesTable",
9584 xmlMemBlocks() - mem_base);
9586 printf(" %d", n_buf);
9587 printf(" %d", n_table);
9599 #define gen_nb_xmlEntityPtr 1
9600 static xmlEntityPtr gen_xmlEntityPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
9603 static void des_xmlEntityPtr(int no ATTRIBUTE_UNUSED, xmlEntityPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
9607 test_xmlDumpEntityDecl(void) {
9610 #if defined(LIBXML_OUTPUT_ENABLED)
9612 xmlBufferPtr buf; /* An XML buffer. */
9614 xmlEntityPtr ent; /* An entity table */
9617 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
9618 for (n_ent = 0;n_ent < gen_nb_xmlEntityPtr;n_ent++) {
9619 mem_base = xmlMemBlocks();
9620 buf = gen_xmlBufferPtr(n_buf, 0);
9621 ent = gen_xmlEntityPtr(n_ent, 1);
9623 xmlDumpEntityDecl(buf, ent);
9625 des_xmlBufferPtr(n_buf, buf, 0);
9626 des_xmlEntityPtr(n_ent, ent, 1);
9627 xmlResetLastError();
9628 if (mem_base != xmlMemBlocks()) {
9629 printf("Leak of %d blocks found in xmlDumpEntityDecl",
9630 xmlMemBlocks() - mem_base);
9632 printf(" %d", n_buf);
9633 printf(" %d", n_ent);
9646 test_xmlEncodeEntitiesReentrant(void) {
9651 xmlDocPtr doc; /* the document containing the string */
9653 xmlChar * input; /* A string to convert to XML. */
9656 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
9657 for (n_input = 0;n_input < gen_nb_const_xmlChar_ptr;n_input++) {
9658 mem_base = xmlMemBlocks();
9659 doc = gen_xmlDocPtr(n_doc, 0);
9660 input = gen_const_xmlChar_ptr(n_input, 1);
9662 ret_val = xmlEncodeEntitiesReentrant(doc, (const xmlChar *)input);
9663 desret_xmlChar_ptr(ret_val);
9665 des_xmlDocPtr(n_doc, doc, 0);
9666 des_const_xmlChar_ptr(n_input, (const xmlChar *)input, 1);
9667 xmlResetLastError();
9668 if (mem_base != xmlMemBlocks()) {
9669 printf("Leak of %d blocks found in xmlEncodeEntitiesReentrant",
9670 xmlMemBlocks() - mem_base);
9672 printf(" %d", n_doc);
9673 printf(" %d", n_input);
9684 #define gen_nb_const_xmlDoc_ptr 1
9685 static xmlDoc * gen_const_xmlDoc_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
9688 static void des_const_xmlDoc_ptr(int no ATTRIBUTE_UNUSED, const xmlDoc * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
9692 test_xmlEncodeSpecialChars(void) {
9697 xmlDoc * doc; /* the document containing the string */
9699 xmlChar * input; /* A string to convert to XML. */
9702 for (n_doc = 0;n_doc < gen_nb_const_xmlDoc_ptr;n_doc++) {
9703 for (n_input = 0;n_input < gen_nb_const_xmlChar_ptr;n_input++) {
9704 mem_base = xmlMemBlocks();
9705 doc = gen_const_xmlDoc_ptr(n_doc, 0);
9706 input = gen_const_xmlChar_ptr(n_input, 1);
9708 ret_val = xmlEncodeSpecialChars((const xmlDoc *)doc, (const xmlChar *)input);
9709 desret_xmlChar_ptr(ret_val);
9711 des_const_xmlDoc_ptr(n_doc, (const xmlDoc *)doc, 0);
9712 des_const_xmlChar_ptr(n_input, (const xmlChar *)input, 1);
9713 xmlResetLastError();
9714 if (mem_base != xmlMemBlocks()) {
9715 printf("Leak of %d blocks found in xmlEncodeSpecialChars",
9716 xmlMemBlocks() - mem_base);
9718 printf(" %d", n_doc);
9719 printf(" %d", n_input);
9731 test_xmlGetDocEntity(void) {
9735 xmlEntityPtr ret_val;
9736 xmlDoc * doc; /* the document referencing the entity */
9738 xmlChar * name; /* the entity name */
9741 for (n_doc = 0;n_doc < gen_nb_const_xmlDoc_ptr;n_doc++) {
9742 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
9743 mem_base = xmlMemBlocks();
9744 doc = gen_const_xmlDoc_ptr(n_doc, 0);
9745 name = gen_const_xmlChar_ptr(n_name, 1);
9747 ret_val = xmlGetDocEntity((const xmlDoc *)doc, (const xmlChar *)name);
9748 desret_xmlEntityPtr(ret_val);
9750 des_const_xmlDoc_ptr(n_doc, (const xmlDoc *)doc, 0);
9751 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
9752 xmlResetLastError();
9753 if (mem_base != xmlMemBlocks()) {
9754 printf("Leak of %d blocks found in xmlGetDocEntity",
9755 xmlMemBlocks() - mem_base);
9757 printf(" %d", n_doc);
9758 printf(" %d", n_name);
9770 test_xmlGetDtdEntity(void) {
9774 xmlEntityPtr ret_val;
9775 xmlDocPtr doc; /* the document referencing the entity */
9777 xmlChar * name; /* the entity name */
9780 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
9781 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
9782 mem_base = xmlMemBlocks();
9783 doc = gen_xmlDocPtr(n_doc, 0);
9784 name = gen_const_xmlChar_ptr(n_name, 1);
9786 ret_val = xmlGetDtdEntity(doc, (const xmlChar *)name);
9787 desret_xmlEntityPtr(ret_val);
9789 des_xmlDocPtr(n_doc, doc, 0);
9790 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
9791 xmlResetLastError();
9792 if (mem_base != xmlMemBlocks()) {
9793 printf("Leak of %d blocks found in xmlGetDtdEntity",
9794 xmlMemBlocks() - mem_base);
9796 printf(" %d", n_doc);
9797 printf(" %d", n_name);
9809 test_xmlGetParameterEntity(void) {
9813 xmlEntityPtr ret_val;
9814 xmlDocPtr doc; /* the document referencing the entity */
9816 xmlChar * name; /* the entity name */
9819 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
9820 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
9821 mem_base = xmlMemBlocks();
9822 doc = gen_xmlDocPtr(n_doc, 0);
9823 name = gen_const_xmlChar_ptr(n_name, 1);
9825 ret_val = xmlGetParameterEntity(doc, (const xmlChar *)name);
9826 desret_xmlEntityPtr(ret_val);
9828 des_xmlDocPtr(n_doc, doc, 0);
9829 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
9830 xmlResetLastError();
9831 if (mem_base != xmlMemBlocks()) {
9832 printf("Leak of %d blocks found in xmlGetParameterEntity",
9833 xmlMemBlocks() - mem_base);
9835 printf(" %d", n_doc);
9836 printf(" %d", n_name);
9848 test_xmlGetPredefinedEntity(void) {
9852 xmlEntityPtr ret_val;
9853 xmlChar * name; /* the entity name */
9856 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
9857 mem_base = xmlMemBlocks();
9858 name = gen_const_xmlChar_ptr(n_name, 0);
9860 ret_val = xmlGetPredefinedEntity((const xmlChar *)name);
9861 desret_xmlEntityPtr(ret_val);
9863 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 0);
9864 xmlResetLastError();
9865 if (mem_base != xmlMemBlocks()) {
9866 printf("Leak of %d blocks found in xmlGetPredefinedEntity",
9867 xmlMemBlocks() - mem_base);
9869 printf(" %d", n_name);
9880 test_xmlInitializePredefinedEntities(void) {
9883 #if defined(LIBXML_LEGACY_ENABLED)
9884 #ifdef LIBXML_LEGACY_ENABLED
9887 mem_base = xmlMemBlocks();
9889 xmlInitializePredefinedEntities();
9891 xmlResetLastError();
9892 if (mem_base != xmlMemBlocks()) {
9893 printf("Leak of %d blocks found in xmlInitializePredefinedEntities",
9894 xmlMemBlocks() - mem_base);
9907 test_xmlNewEntity(void) {
9911 xmlEntityPtr ret_val;
9912 xmlDocPtr doc; /* the document */
9914 xmlChar * name; /* the entity name */
9916 int type; /* the entity type XML_xxx_yyy_ENTITY */
9918 xmlChar * ExternalID; /* the entity external ID if available */
9920 xmlChar * SystemID; /* the entity system ID if available */
9922 xmlChar * content; /* the entity content */
9925 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
9926 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
9927 for (n_type = 0;n_type < gen_nb_int;n_type++) {
9928 for (n_ExternalID = 0;n_ExternalID < gen_nb_const_xmlChar_ptr;n_ExternalID++) {
9929 for (n_SystemID = 0;n_SystemID < gen_nb_const_xmlChar_ptr;n_SystemID++) {
9930 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
9931 mem_base = xmlMemBlocks();
9932 doc = gen_xmlDocPtr(n_doc, 0);
9933 name = gen_const_xmlChar_ptr(n_name, 1);
9934 type = gen_int(n_type, 2);
9935 ExternalID = gen_const_xmlChar_ptr(n_ExternalID, 3);
9936 SystemID = gen_const_xmlChar_ptr(n_SystemID, 4);
9937 content = gen_const_xmlChar_ptr(n_content, 5);
9939 ret_val = xmlNewEntity(doc, (const xmlChar *)name, type, (const xmlChar *)ExternalID, (const xmlChar *)SystemID, (const xmlChar *)content);
9940 desret_xmlEntityPtr(ret_val);
9942 des_xmlDocPtr(n_doc, doc, 0);
9943 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
9944 des_int(n_type, type, 2);
9945 des_const_xmlChar_ptr(n_ExternalID, (const xmlChar *)ExternalID, 3);
9946 des_const_xmlChar_ptr(n_SystemID, (const xmlChar *)SystemID, 4);
9947 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 5);
9948 xmlResetLastError();
9949 if (mem_base != xmlMemBlocks()) {
9950 printf("Leak of %d blocks found in xmlNewEntity",
9951 xmlMemBlocks() - mem_base);
9953 printf(" %d", n_doc);
9954 printf(" %d", n_name);
9955 printf(" %d", n_type);
9956 printf(" %d", n_ExternalID);
9957 printf(" %d", n_SystemID);
9958 printf(" %d", n_content);
9973 test_entities(void) {
9977 if (quiet == 0) printf("Testing entities : 13 of 17 functions ...\n");
9978 rc = test_xmlAddDocEntity();
9979 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9980 rc = test_xmlAddDtdEntity();
9981 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9982 rc = test_xmlCleanupPredefinedEntities();
9983 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9984 rc = test_xmlCopyEntitiesTable();
9985 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9986 rc = test_xmlCreateEntitiesTable();
9987 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9988 rc = test_xmlDumpEntitiesTable();
9989 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9990 rc = test_xmlDumpEntityDecl();
9991 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9992 rc = test_xmlEncodeEntitiesReentrant();
9993 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9994 rc = test_xmlEncodeSpecialChars();
9995 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9996 rc = test_xmlGetDocEntity();
9997 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9998 rc = test_xmlGetDtdEntity();
9999 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10000 rc = test_xmlGetParameterEntity();
10001 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10002 rc = test_xmlGetPredefinedEntity();
10003 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10004 rc = test_xmlInitializePredefinedEntities();
10005 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10006 rc = test_xmlNewEntity();
10007 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10010 printf("Module entities: %d errors\n", test_ret);
10015 test_xmlHashAddEntry(void) {
10020 xmlHashTablePtr table; /* the hash table */
10022 xmlChar * name; /* the name of the userdata */
10024 void * userdata; /* a pointer to the userdata */
10027 for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
10028 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
10029 for (n_userdata = 0;n_userdata < gen_nb_userdata;n_userdata++) {
10030 mem_base = xmlMemBlocks();
10031 table = gen_xmlHashTablePtr(n_table, 0);
10032 name = gen_const_xmlChar_ptr(n_name, 1);
10033 userdata = gen_userdata(n_userdata, 2);
10035 ret_val = xmlHashAddEntry(table, (const xmlChar *)name, userdata);
10036 desret_int(ret_val);
10038 des_xmlHashTablePtr(n_table, table, 0);
10039 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
10040 des_userdata(n_userdata, userdata, 2);
10041 xmlResetLastError();
10042 if (mem_base != xmlMemBlocks()) {
10043 printf("Leak of %d blocks found in xmlHashAddEntry",
10044 xmlMemBlocks() - mem_base);
10046 printf(" %d", n_table);
10047 printf(" %d", n_name);
10048 printf(" %d", n_userdata);
10061 test_xmlHashAddEntry2(void) {
10066 xmlHashTablePtr table; /* the hash table */
10068 xmlChar * name; /* the name of the userdata */
10070 xmlChar * name2; /* a second name of the userdata */
10072 void * userdata; /* a pointer to the userdata */
10075 for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
10076 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
10077 for (n_name2 = 0;n_name2 < gen_nb_const_xmlChar_ptr;n_name2++) {
10078 for (n_userdata = 0;n_userdata < gen_nb_userdata;n_userdata++) {
10079 mem_base = xmlMemBlocks();
10080 table = gen_xmlHashTablePtr(n_table, 0);
10081 name = gen_const_xmlChar_ptr(n_name, 1);
10082 name2 = gen_const_xmlChar_ptr(n_name2, 2);
10083 userdata = gen_userdata(n_userdata, 3);
10085 ret_val = xmlHashAddEntry2(table, (const xmlChar *)name, (const xmlChar *)name2, userdata);
10086 desret_int(ret_val);
10088 des_xmlHashTablePtr(n_table, table, 0);
10089 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
10090 des_const_xmlChar_ptr(n_name2, (const xmlChar *)name2, 2);
10091 des_userdata(n_userdata, userdata, 3);
10092 xmlResetLastError();
10093 if (mem_base != xmlMemBlocks()) {
10094 printf("Leak of %d blocks found in xmlHashAddEntry2",
10095 xmlMemBlocks() - mem_base);
10097 printf(" %d", n_table);
10098 printf(" %d", n_name);
10099 printf(" %d", n_name2);
10100 printf(" %d", n_userdata);
10114 test_xmlHashAddEntry3(void) {
10119 xmlHashTablePtr table; /* the hash table */
10121 xmlChar * name; /* the name of the userdata */
10123 xmlChar * name2; /* a second name of the userdata */
10125 xmlChar * name3; /* a third name of the userdata */
10127 void * userdata; /* a pointer to the userdata */
10130 for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
10131 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
10132 for (n_name2 = 0;n_name2 < gen_nb_const_xmlChar_ptr;n_name2++) {
10133 for (n_name3 = 0;n_name3 < gen_nb_const_xmlChar_ptr;n_name3++) {
10134 for (n_userdata = 0;n_userdata < gen_nb_userdata;n_userdata++) {
10135 mem_base = xmlMemBlocks();
10136 table = gen_xmlHashTablePtr(n_table, 0);
10137 name = gen_const_xmlChar_ptr(n_name, 1);
10138 name2 = gen_const_xmlChar_ptr(n_name2, 2);
10139 name3 = gen_const_xmlChar_ptr(n_name3, 3);
10140 userdata = gen_userdata(n_userdata, 4);
10142 ret_val = xmlHashAddEntry3(table, (const xmlChar *)name, (const xmlChar *)name2, (const xmlChar *)name3, userdata);
10143 desret_int(ret_val);
10145 des_xmlHashTablePtr(n_table, table, 0);
10146 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
10147 des_const_xmlChar_ptr(n_name2, (const xmlChar *)name2, 2);
10148 des_const_xmlChar_ptr(n_name3, (const xmlChar *)name3, 3);
10149 des_userdata(n_userdata, userdata, 4);
10150 xmlResetLastError();
10151 if (mem_base != xmlMemBlocks()) {
10152 printf("Leak of %d blocks found in xmlHashAddEntry3",
10153 xmlMemBlocks() - mem_base);
10155 printf(" %d", n_table);
10156 printf(" %d", n_name);
10157 printf(" %d", n_name2);
10158 printf(" %d", n_name3);
10159 printf(" %d", n_userdata);
10174 test_xmlHashCopy(void) {
10178 /* missing type support */
10184 test_xmlHashCreate(void) {
10188 /* missing type support */
10194 test_xmlHashCreateDict(void) {
10198 /* missing type support */
10204 test_xmlHashLookup(void) {
10209 xmlHashTablePtr table; /* the hash table */
10211 xmlChar * name; /* the name of the userdata */
10214 for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
10215 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
10216 mem_base = xmlMemBlocks();
10217 table = gen_xmlHashTablePtr(n_table, 0);
10218 name = gen_const_xmlChar_ptr(n_name, 1);
10220 ret_val = xmlHashLookup(table, (const xmlChar *)name);
10221 desret_void_ptr(ret_val);
10223 des_xmlHashTablePtr(n_table, table, 0);
10224 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
10225 xmlResetLastError();
10226 if (mem_base != xmlMemBlocks()) {
10227 printf("Leak of %d blocks found in xmlHashLookup",
10228 xmlMemBlocks() - mem_base);
10230 printf(" %d", n_table);
10231 printf(" %d", n_name);
10243 test_xmlHashLookup2(void) {
10248 xmlHashTablePtr table; /* the hash table */
10250 xmlChar * name; /* the name of the userdata */
10252 xmlChar * name2; /* a second name of the userdata */
10255 for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
10256 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
10257 for (n_name2 = 0;n_name2 < gen_nb_const_xmlChar_ptr;n_name2++) {
10258 mem_base = xmlMemBlocks();
10259 table = gen_xmlHashTablePtr(n_table, 0);
10260 name = gen_const_xmlChar_ptr(n_name, 1);
10261 name2 = gen_const_xmlChar_ptr(n_name2, 2);
10263 ret_val = xmlHashLookup2(table, (const xmlChar *)name, (const xmlChar *)name2);
10264 desret_void_ptr(ret_val);
10266 des_xmlHashTablePtr(n_table, table, 0);
10267 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
10268 des_const_xmlChar_ptr(n_name2, (const xmlChar *)name2, 2);
10269 xmlResetLastError();
10270 if (mem_base != xmlMemBlocks()) {
10271 printf("Leak of %d blocks found in xmlHashLookup2",
10272 xmlMemBlocks() - mem_base);
10274 printf(" %d", n_table);
10275 printf(" %d", n_name);
10276 printf(" %d", n_name2);
10289 test_xmlHashLookup3(void) {
10294 xmlHashTablePtr table; /* the hash table */
10296 xmlChar * name; /* the name of the userdata */
10298 xmlChar * name2; /* a second name of the userdata */
10300 xmlChar * name3; /* a third name of the userdata */
10303 for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
10304 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
10305 for (n_name2 = 0;n_name2 < gen_nb_const_xmlChar_ptr;n_name2++) {
10306 for (n_name3 = 0;n_name3 < gen_nb_const_xmlChar_ptr;n_name3++) {
10307 mem_base = xmlMemBlocks();
10308 table = gen_xmlHashTablePtr(n_table, 0);
10309 name = gen_const_xmlChar_ptr(n_name, 1);
10310 name2 = gen_const_xmlChar_ptr(n_name2, 2);
10311 name3 = gen_const_xmlChar_ptr(n_name3, 3);
10313 ret_val = xmlHashLookup3(table, (const xmlChar *)name, (const xmlChar *)name2, (const xmlChar *)name3);
10314 desret_void_ptr(ret_val);
10316 des_xmlHashTablePtr(n_table, table, 0);
10317 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
10318 des_const_xmlChar_ptr(n_name2, (const xmlChar *)name2, 2);
10319 des_const_xmlChar_ptr(n_name3, (const xmlChar *)name3, 3);
10320 xmlResetLastError();
10321 if (mem_base != xmlMemBlocks()) {
10322 printf("Leak of %d blocks found in xmlHashLookup3",
10323 xmlMemBlocks() - mem_base);
10325 printf(" %d", n_table);
10326 printf(" %d", n_name);
10327 printf(" %d", n_name2);
10328 printf(" %d", n_name3);
10342 test_xmlHashQLookup(void) {
10347 xmlHashTablePtr table; /* the hash table */
10349 xmlChar * prefix; /* the prefix of the userdata */
10351 xmlChar * name; /* the name of the userdata */
10354 for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
10355 for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
10356 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
10357 mem_base = xmlMemBlocks();
10358 table = gen_xmlHashTablePtr(n_table, 0);
10359 prefix = gen_const_xmlChar_ptr(n_prefix, 1);
10360 name = gen_const_xmlChar_ptr(n_name, 2);
10362 ret_val = xmlHashQLookup(table, (const xmlChar *)prefix, (const xmlChar *)name);
10363 desret_void_ptr(ret_val);
10365 des_xmlHashTablePtr(n_table, table, 0);
10366 des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 1);
10367 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
10368 xmlResetLastError();
10369 if (mem_base != xmlMemBlocks()) {
10370 printf("Leak of %d blocks found in xmlHashQLookup",
10371 xmlMemBlocks() - mem_base);
10373 printf(" %d", n_table);
10374 printf(" %d", n_prefix);
10375 printf(" %d", n_name);
10388 test_xmlHashQLookup2(void) {
10393 xmlHashTablePtr table; /* the hash table */
10395 xmlChar * prefix; /* the prefix of the userdata */
10397 xmlChar * name; /* the name of the userdata */
10399 xmlChar * prefix2; /* the second prefix of the userdata */
10401 xmlChar * name2; /* a second name of the userdata */
10404 for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
10405 for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
10406 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
10407 for (n_prefix2 = 0;n_prefix2 < gen_nb_const_xmlChar_ptr;n_prefix2++) {
10408 for (n_name2 = 0;n_name2 < gen_nb_const_xmlChar_ptr;n_name2++) {
10409 mem_base = xmlMemBlocks();
10410 table = gen_xmlHashTablePtr(n_table, 0);
10411 prefix = gen_const_xmlChar_ptr(n_prefix, 1);
10412 name = gen_const_xmlChar_ptr(n_name, 2);
10413 prefix2 = gen_const_xmlChar_ptr(n_prefix2, 3);
10414 name2 = gen_const_xmlChar_ptr(n_name2, 4);
10416 ret_val = xmlHashQLookup2(table, (const xmlChar *)prefix, (const xmlChar *)name, (const xmlChar *)prefix2, (const xmlChar *)name2);
10417 desret_void_ptr(ret_val);
10419 des_xmlHashTablePtr(n_table, table, 0);
10420 des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 1);
10421 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
10422 des_const_xmlChar_ptr(n_prefix2, (const xmlChar *)prefix2, 3);
10423 des_const_xmlChar_ptr(n_name2, (const xmlChar *)name2, 4);
10424 xmlResetLastError();
10425 if (mem_base != xmlMemBlocks()) {
10426 printf("Leak of %d blocks found in xmlHashQLookup2",
10427 xmlMemBlocks() - mem_base);
10429 printf(" %d", n_table);
10430 printf(" %d", n_prefix);
10431 printf(" %d", n_name);
10432 printf(" %d", n_prefix2);
10433 printf(" %d", n_name2);
10448 test_xmlHashQLookup3(void) {
10453 xmlHashTablePtr table; /* the hash table */
10455 xmlChar * prefix; /* the prefix of the userdata */
10457 xmlChar * name; /* the name of the userdata */
10459 xmlChar * prefix2; /* the second prefix of the userdata */
10461 xmlChar * name2; /* a second name of the userdata */
10463 xmlChar * prefix3; /* the third prefix of the userdata */
10465 xmlChar * name3; /* a third name of the userdata */
10468 for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
10469 for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
10470 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
10471 for (n_prefix2 = 0;n_prefix2 < gen_nb_const_xmlChar_ptr;n_prefix2++) {
10472 for (n_name2 = 0;n_name2 < gen_nb_const_xmlChar_ptr;n_name2++) {
10473 for (n_prefix3 = 0;n_prefix3 < gen_nb_const_xmlChar_ptr;n_prefix3++) {
10474 for (n_name3 = 0;n_name3 < gen_nb_const_xmlChar_ptr;n_name3++) {
10475 mem_base = xmlMemBlocks();
10476 table = gen_xmlHashTablePtr(n_table, 0);
10477 prefix = gen_const_xmlChar_ptr(n_prefix, 1);
10478 name = gen_const_xmlChar_ptr(n_name, 2);
10479 prefix2 = gen_const_xmlChar_ptr(n_prefix2, 3);
10480 name2 = gen_const_xmlChar_ptr(n_name2, 4);
10481 prefix3 = gen_const_xmlChar_ptr(n_prefix3, 5);
10482 name3 = gen_const_xmlChar_ptr(n_name3, 6);
10484 ret_val = xmlHashQLookup3(table, (const xmlChar *)prefix, (const xmlChar *)name, (const xmlChar *)prefix2, (const xmlChar *)name2, (const xmlChar *)prefix3, (const xmlChar *)name3);
10485 desret_void_ptr(ret_val);
10487 des_xmlHashTablePtr(n_table, table, 0);
10488 des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 1);
10489 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
10490 des_const_xmlChar_ptr(n_prefix2, (const xmlChar *)prefix2, 3);
10491 des_const_xmlChar_ptr(n_name2, (const xmlChar *)name2, 4);
10492 des_const_xmlChar_ptr(n_prefix3, (const xmlChar *)prefix3, 5);
10493 des_const_xmlChar_ptr(n_name3, (const xmlChar *)name3, 6);
10494 xmlResetLastError();
10495 if (mem_base != xmlMemBlocks()) {
10496 printf("Leak of %d blocks found in xmlHashQLookup3",
10497 xmlMemBlocks() - mem_base);
10499 printf(" %d", n_table);
10500 printf(" %d", n_prefix);
10501 printf(" %d", n_name);
10502 printf(" %d", n_prefix2);
10503 printf(" %d", n_name2);
10504 printf(" %d", n_prefix3);
10505 printf(" %d", n_name3);
10522 test_xmlHashRemoveEntry(void) {
10527 xmlHashTablePtr table; /* the hash table */
10529 xmlChar * name; /* the name of the userdata */
10531 xmlHashDeallocator f; /* the deallocator function for removed item (if any) */
10534 for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
10535 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
10536 for (n_f = 0;n_f < gen_nb_xmlHashDeallocator;n_f++) {
10537 mem_base = xmlMemBlocks();
10538 table = gen_xmlHashTablePtr(n_table, 0);
10539 name = gen_const_xmlChar_ptr(n_name, 1);
10540 f = gen_xmlHashDeallocator(n_f, 2);
10542 ret_val = xmlHashRemoveEntry(table, (const xmlChar *)name, f);
10543 desret_int(ret_val);
10545 des_xmlHashTablePtr(n_table, table, 0);
10546 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
10547 des_xmlHashDeallocator(n_f, f, 2);
10548 xmlResetLastError();
10549 if (mem_base != xmlMemBlocks()) {
10550 printf("Leak of %d blocks found in xmlHashRemoveEntry",
10551 xmlMemBlocks() - mem_base);
10553 printf(" %d", n_table);
10554 printf(" %d", n_name);
10555 printf(" %d", n_f);
10568 test_xmlHashRemoveEntry2(void) {
10573 xmlHashTablePtr table; /* the hash table */
10575 xmlChar * name; /* the name of the userdata */
10577 xmlChar * name2; /* a second name of the userdata */
10579 xmlHashDeallocator f; /* the deallocator function for removed item (if any) */
10582 for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
10583 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
10584 for (n_name2 = 0;n_name2 < gen_nb_const_xmlChar_ptr;n_name2++) {
10585 for (n_f = 0;n_f < gen_nb_xmlHashDeallocator;n_f++) {
10586 mem_base = xmlMemBlocks();
10587 table = gen_xmlHashTablePtr(n_table, 0);
10588 name = gen_const_xmlChar_ptr(n_name, 1);
10589 name2 = gen_const_xmlChar_ptr(n_name2, 2);
10590 f = gen_xmlHashDeallocator(n_f, 3);
10592 ret_val = xmlHashRemoveEntry2(table, (const xmlChar *)name, (const xmlChar *)name2, f);
10593 desret_int(ret_val);
10595 des_xmlHashTablePtr(n_table, table, 0);
10596 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
10597 des_const_xmlChar_ptr(n_name2, (const xmlChar *)name2, 2);
10598 des_xmlHashDeallocator(n_f, f, 3);
10599 xmlResetLastError();
10600 if (mem_base != xmlMemBlocks()) {
10601 printf("Leak of %d blocks found in xmlHashRemoveEntry2",
10602 xmlMemBlocks() - mem_base);
10604 printf(" %d", n_table);
10605 printf(" %d", n_name);
10606 printf(" %d", n_name2);
10607 printf(" %d", n_f);
10621 test_xmlHashRemoveEntry3(void) {
10626 xmlHashTablePtr table; /* the hash table */
10628 xmlChar * name; /* the name of the userdata */
10630 xmlChar * name2; /* a second name of the userdata */
10632 xmlChar * name3; /* a third name of the userdata */
10634 xmlHashDeallocator f; /* the deallocator function for removed item (if any) */
10637 for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
10638 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
10639 for (n_name2 = 0;n_name2 < gen_nb_const_xmlChar_ptr;n_name2++) {
10640 for (n_name3 = 0;n_name3 < gen_nb_const_xmlChar_ptr;n_name3++) {
10641 for (n_f = 0;n_f < gen_nb_xmlHashDeallocator;n_f++) {
10642 mem_base = xmlMemBlocks();
10643 table = gen_xmlHashTablePtr(n_table, 0);
10644 name = gen_const_xmlChar_ptr(n_name, 1);
10645 name2 = gen_const_xmlChar_ptr(n_name2, 2);
10646 name3 = gen_const_xmlChar_ptr(n_name3, 3);
10647 f = gen_xmlHashDeallocator(n_f, 4);
10649 ret_val = xmlHashRemoveEntry3(table, (const xmlChar *)name, (const xmlChar *)name2, (const xmlChar *)name3, f);
10650 desret_int(ret_val);
10652 des_xmlHashTablePtr(n_table, table, 0);
10653 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
10654 des_const_xmlChar_ptr(n_name2, (const xmlChar *)name2, 2);
10655 des_const_xmlChar_ptr(n_name3, (const xmlChar *)name3, 3);
10656 des_xmlHashDeallocator(n_f, f, 4);
10657 xmlResetLastError();
10658 if (mem_base != xmlMemBlocks()) {
10659 printf("Leak of %d blocks found in xmlHashRemoveEntry3",
10660 xmlMemBlocks() - mem_base);
10662 printf(" %d", n_table);
10663 printf(" %d", n_name);
10664 printf(" %d", n_name2);
10665 printf(" %d", n_name3);
10666 printf(" %d", n_f);
10681 test_xmlHashScan(void) {
10685 /* missing type support */
10691 test_xmlHashScan3(void) {
10695 /* missing type support */
10701 test_xmlHashScanFull(void) {
10705 /* missing type support */
10711 test_xmlHashScanFull3(void) {
10715 /* missing type support */
10721 test_xmlHashSize(void) {
10726 xmlHashTablePtr table; /* the hash table */
10729 for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
10730 mem_base = xmlMemBlocks();
10731 table = gen_xmlHashTablePtr(n_table, 0);
10733 ret_val = xmlHashSize(table);
10734 desret_int(ret_val);
10736 des_xmlHashTablePtr(n_table, table, 0);
10737 xmlResetLastError();
10738 if (mem_base != xmlMemBlocks()) {
10739 printf("Leak of %d blocks found in xmlHashSize",
10740 xmlMemBlocks() - mem_base);
10742 printf(" %d", n_table);
10753 test_xmlHashUpdateEntry(void) {
10758 xmlHashTablePtr table; /* the hash table */
10760 xmlChar * name; /* the name of the userdata */
10762 void * userdata; /* a pointer to the userdata */
10764 xmlHashDeallocator f; /* the deallocator function for replaced item (if any) */
10767 for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
10768 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
10769 for (n_userdata = 0;n_userdata < gen_nb_userdata;n_userdata++) {
10770 for (n_f = 0;n_f < gen_nb_xmlHashDeallocator;n_f++) {
10771 mem_base = xmlMemBlocks();
10772 table = gen_xmlHashTablePtr(n_table, 0);
10773 name = gen_const_xmlChar_ptr(n_name, 1);
10774 userdata = gen_userdata(n_userdata, 2);
10775 f = gen_xmlHashDeallocator(n_f, 3);
10777 ret_val = xmlHashUpdateEntry(table, (const xmlChar *)name, userdata, f);
10778 desret_int(ret_val);
10780 des_xmlHashTablePtr(n_table, table, 0);
10781 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
10782 des_userdata(n_userdata, userdata, 2);
10783 des_xmlHashDeallocator(n_f, f, 3);
10784 xmlResetLastError();
10785 if (mem_base != xmlMemBlocks()) {
10786 printf("Leak of %d blocks found in xmlHashUpdateEntry",
10787 xmlMemBlocks() - mem_base);
10789 printf(" %d", n_table);
10790 printf(" %d", n_name);
10791 printf(" %d", n_userdata);
10792 printf(" %d", n_f);
10806 test_xmlHashUpdateEntry2(void) {
10811 xmlHashTablePtr table; /* the hash table */
10813 xmlChar * name; /* the name of the userdata */
10815 xmlChar * name2; /* a second name of the userdata */
10817 void * userdata; /* a pointer to the userdata */
10819 xmlHashDeallocator f; /* the deallocator function for replaced item (if any) */
10822 for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
10823 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
10824 for (n_name2 = 0;n_name2 < gen_nb_const_xmlChar_ptr;n_name2++) {
10825 for (n_userdata = 0;n_userdata < gen_nb_userdata;n_userdata++) {
10826 for (n_f = 0;n_f < gen_nb_xmlHashDeallocator;n_f++) {
10827 mem_base = xmlMemBlocks();
10828 table = gen_xmlHashTablePtr(n_table, 0);
10829 name = gen_const_xmlChar_ptr(n_name, 1);
10830 name2 = gen_const_xmlChar_ptr(n_name2, 2);
10831 userdata = gen_userdata(n_userdata, 3);
10832 f = gen_xmlHashDeallocator(n_f, 4);
10834 ret_val = xmlHashUpdateEntry2(table, (const xmlChar *)name, (const xmlChar *)name2, userdata, f);
10835 desret_int(ret_val);
10837 des_xmlHashTablePtr(n_table, table, 0);
10838 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
10839 des_const_xmlChar_ptr(n_name2, (const xmlChar *)name2, 2);
10840 des_userdata(n_userdata, userdata, 3);
10841 des_xmlHashDeallocator(n_f, f, 4);
10842 xmlResetLastError();
10843 if (mem_base != xmlMemBlocks()) {
10844 printf("Leak of %d blocks found in xmlHashUpdateEntry2",
10845 xmlMemBlocks() - mem_base);
10847 printf(" %d", n_table);
10848 printf(" %d", n_name);
10849 printf(" %d", n_name2);
10850 printf(" %d", n_userdata);
10851 printf(" %d", n_f);
10866 test_xmlHashUpdateEntry3(void) {
10871 xmlHashTablePtr table; /* the hash table */
10873 xmlChar * name; /* the name of the userdata */
10875 xmlChar * name2; /* a second name of the userdata */
10877 xmlChar * name3; /* a third name of the userdata */
10879 void * userdata; /* a pointer to the userdata */
10881 xmlHashDeallocator f; /* the deallocator function for replaced item (if any) */
10884 for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
10885 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
10886 for (n_name2 = 0;n_name2 < gen_nb_const_xmlChar_ptr;n_name2++) {
10887 for (n_name3 = 0;n_name3 < gen_nb_const_xmlChar_ptr;n_name3++) {
10888 for (n_userdata = 0;n_userdata < gen_nb_userdata;n_userdata++) {
10889 for (n_f = 0;n_f < gen_nb_xmlHashDeallocator;n_f++) {
10890 mem_base = xmlMemBlocks();
10891 table = gen_xmlHashTablePtr(n_table, 0);
10892 name = gen_const_xmlChar_ptr(n_name, 1);
10893 name2 = gen_const_xmlChar_ptr(n_name2, 2);
10894 name3 = gen_const_xmlChar_ptr(n_name3, 3);
10895 userdata = gen_userdata(n_userdata, 4);
10896 f = gen_xmlHashDeallocator(n_f, 5);
10898 ret_val = xmlHashUpdateEntry3(table, (const xmlChar *)name, (const xmlChar *)name2, (const xmlChar *)name3, userdata, f);
10899 desret_int(ret_val);
10901 des_xmlHashTablePtr(n_table, table, 0);
10902 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
10903 des_const_xmlChar_ptr(n_name2, (const xmlChar *)name2, 2);
10904 des_const_xmlChar_ptr(n_name3, (const xmlChar *)name3, 3);
10905 des_userdata(n_userdata, userdata, 4);
10906 des_xmlHashDeallocator(n_f, f, 5);
10907 xmlResetLastError();
10908 if (mem_base != xmlMemBlocks()) {
10909 printf("Leak of %d blocks found in xmlHashUpdateEntry3",
10910 xmlMemBlocks() - mem_base);
10912 printf(" %d", n_table);
10913 printf(" %d", n_name);
10914 printf(" %d", n_name2);
10915 printf(" %d", n_name3);
10916 printf(" %d", n_userdata);
10917 printf(" %d", n_f);
10936 if (quiet == 0) printf("Testing hash : 16 of 24 functions ...\n");
10937 rc = test_xmlHashAddEntry();
10938 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10939 rc = test_xmlHashAddEntry2();
10940 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10941 rc = test_xmlHashAddEntry3();
10942 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10943 rc = test_xmlHashCopy();
10944 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10945 rc = test_xmlHashCreate();
10946 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10947 rc = test_xmlHashCreateDict();
10948 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10949 rc = test_xmlHashLookup();
10950 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10951 rc = test_xmlHashLookup2();
10952 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10953 rc = test_xmlHashLookup3();
10954 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10955 rc = test_xmlHashQLookup();
10956 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10957 rc = test_xmlHashQLookup2();
10958 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10959 rc = test_xmlHashQLookup3();
10960 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10961 rc = test_xmlHashRemoveEntry();
10962 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10963 rc = test_xmlHashRemoveEntry2();
10964 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10965 rc = test_xmlHashRemoveEntry3();
10966 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10967 rc = test_xmlHashScan();
10968 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10969 rc = test_xmlHashScan3();
10970 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10971 rc = test_xmlHashScanFull();
10972 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10973 rc = test_xmlHashScanFull3();
10974 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10975 rc = test_xmlHashSize();
10976 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10977 rc = test_xmlHashUpdateEntry();
10978 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10979 rc = test_xmlHashUpdateEntry2();
10980 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10981 rc = test_xmlHashUpdateEntry3();
10982 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10985 printf("Module hash: %d errors\n", test_ret);
10989 #define gen_nb_xmlLinkPtr 1
10990 static xmlLinkPtr gen_xmlLinkPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
10993 static void des_xmlLinkPtr(int no ATTRIBUTE_UNUSED, xmlLinkPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
10997 test_xmlLinkGetData(void) {
11002 xmlLinkPtr lk; /* a link */
11005 for (n_lk = 0;n_lk < gen_nb_xmlLinkPtr;n_lk++) {
11006 mem_base = xmlMemBlocks();
11007 lk = gen_xmlLinkPtr(n_lk, 0);
11009 ret_val = xmlLinkGetData(lk);
11010 desret_void_ptr(ret_val);
11012 des_xmlLinkPtr(n_lk, lk, 0);
11013 xmlResetLastError();
11014 if (mem_base != xmlMemBlocks()) {
11015 printf("Leak of %d blocks found in xmlLinkGetData",
11016 xmlMemBlocks() - mem_base);
11018 printf(" %d", n_lk);
11029 test_xmlListAppend(void) {
11034 xmlListPtr l; /* a list */
11036 void * data; /* the data */
11039 for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
11040 for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
11041 mem_base = xmlMemBlocks();
11042 l = gen_xmlListPtr(n_l, 0);
11043 data = gen_userdata(n_data, 1);
11045 ret_val = xmlListAppend(l, data);
11046 desret_int(ret_val);
11048 des_xmlListPtr(n_l, l, 0);
11049 des_userdata(n_data, data, 1);
11050 xmlResetLastError();
11051 if (mem_base != xmlMemBlocks()) {
11052 printf("Leak of %d blocks found in xmlListAppend",
11053 xmlMemBlocks() - mem_base);
11055 printf(" %d", n_l);
11056 printf(" %d", n_data);
11068 test_xmlListClear(void) {
11072 xmlListPtr l; /* a list */
11075 for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
11076 mem_base = xmlMemBlocks();
11077 l = gen_xmlListPtr(n_l, 0);
11081 des_xmlListPtr(n_l, l, 0);
11082 xmlResetLastError();
11083 if (mem_base != xmlMemBlocks()) {
11084 printf("Leak of %d blocks found in xmlListClear",
11085 xmlMemBlocks() - mem_base);
11087 printf(" %d", n_l);
11097 #define gen_nb_const_xmlListPtr 1
11098 static xmlListPtr gen_const_xmlListPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
11101 static void des_const_xmlListPtr(int no ATTRIBUTE_UNUSED, const xmlListPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
11105 test_xmlListCopy(void) {
11110 xmlListPtr cur; /* the new list */
11112 xmlListPtr old; /* the old list */
11115 for (n_cur = 0;n_cur < gen_nb_xmlListPtr;n_cur++) {
11116 for (n_old = 0;n_old < gen_nb_const_xmlListPtr;n_old++) {
11117 mem_base = xmlMemBlocks();
11118 cur = gen_xmlListPtr(n_cur, 0);
11119 old = gen_const_xmlListPtr(n_old, 1);
11121 ret_val = xmlListCopy(cur, (const xmlListPtr)old);
11122 desret_int(ret_val);
11124 des_xmlListPtr(n_cur, cur, 0);
11125 des_const_xmlListPtr(n_old, (const xmlListPtr)old, 1);
11126 xmlResetLastError();
11127 if (mem_base != xmlMemBlocks()) {
11128 printf("Leak of %d blocks found in xmlListCopy",
11129 xmlMemBlocks() - mem_base);
11131 printf(" %d", n_cur);
11132 printf(" %d", n_old);
11144 test_xmlListCreate(void) {
11148 /* missing type support */
11154 test_xmlListDup(void) {
11158 /* missing type support */
11164 test_xmlListEmpty(void) {
11169 xmlListPtr l; /* a list */
11172 for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
11173 mem_base = xmlMemBlocks();
11174 l = gen_xmlListPtr(n_l, 0);
11176 ret_val = xmlListEmpty(l);
11177 desret_int(ret_val);
11179 des_xmlListPtr(n_l, l, 0);
11180 xmlResetLastError();
11181 if (mem_base != xmlMemBlocks()) {
11182 printf("Leak of %d blocks found in xmlListEmpty",
11183 xmlMemBlocks() - mem_base);
11185 printf(" %d", n_l);
11196 test_xmlListEnd(void) {
11200 /* missing type support */
11206 test_xmlListFront(void) {
11210 /* missing type support */
11216 test_xmlListInsert(void) {
11221 xmlListPtr l; /* a list */
11223 void * data; /* the data */
11226 for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
11227 for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
11228 mem_base = xmlMemBlocks();
11229 l = gen_xmlListPtr(n_l, 0);
11230 data = gen_userdata(n_data, 1);
11232 ret_val = xmlListInsert(l, data);
11233 desret_int(ret_val);
11235 des_xmlListPtr(n_l, l, 0);
11236 des_userdata(n_data, data, 1);
11237 xmlResetLastError();
11238 if (mem_base != xmlMemBlocks()) {
11239 printf("Leak of %d blocks found in xmlListInsert",
11240 xmlMemBlocks() - mem_base);
11242 printf(" %d", n_l);
11243 printf(" %d", n_data);
11255 test_xmlListMerge(void) {
11259 xmlListPtr l1; /* the original list */
11261 xmlListPtr l2; /* the new list */
11264 for (n_l1 = 0;n_l1 < gen_nb_xmlListPtr;n_l1++) {
11265 for (n_l2 = 0;n_l2 < gen_nb_xmlListPtr;n_l2++) {
11266 mem_base = xmlMemBlocks();
11267 l1 = gen_xmlListPtr(n_l1, 0);
11268 l2 = gen_xmlListPtr(n_l2, 1);
11270 xmlListMerge(l1, l2);
11272 des_xmlListPtr(n_l1, l1, 0);
11273 des_xmlListPtr(n_l2, l2, 1);
11274 xmlResetLastError();
11275 if (mem_base != xmlMemBlocks()) {
11276 printf("Leak of %d blocks found in xmlListMerge",
11277 xmlMemBlocks() - mem_base);
11279 printf(" %d", n_l1);
11280 printf(" %d", n_l2);
11292 test_xmlListPopBack(void) {
11296 xmlListPtr l; /* a list */
11299 for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
11300 mem_base = xmlMemBlocks();
11301 l = gen_xmlListPtr(n_l, 0);
11305 des_xmlListPtr(n_l, l, 0);
11306 xmlResetLastError();
11307 if (mem_base != xmlMemBlocks()) {
11308 printf("Leak of %d blocks found in xmlListPopBack",
11309 xmlMemBlocks() - mem_base);
11311 printf(" %d", n_l);
11322 test_xmlListPopFront(void) {
11326 xmlListPtr l; /* a list */
11329 for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
11330 mem_base = xmlMemBlocks();
11331 l = gen_xmlListPtr(n_l, 0);
11333 xmlListPopFront(l);
11335 des_xmlListPtr(n_l, l, 0);
11336 xmlResetLastError();
11337 if (mem_base != xmlMemBlocks()) {
11338 printf("Leak of %d blocks found in xmlListPopFront",
11339 xmlMemBlocks() - mem_base);
11341 printf(" %d", n_l);
11352 test_xmlListPushBack(void) {
11357 xmlListPtr l; /* a list */
11359 void * data; /* new data */
11362 for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
11363 for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
11364 mem_base = xmlMemBlocks();
11365 l = gen_xmlListPtr(n_l, 0);
11366 data = gen_userdata(n_data, 1);
11368 ret_val = xmlListPushBack(l, data);
11369 desret_int(ret_val);
11371 des_xmlListPtr(n_l, l, 0);
11372 des_userdata(n_data, data, 1);
11373 xmlResetLastError();
11374 if (mem_base != xmlMemBlocks()) {
11375 printf("Leak of %d blocks found in xmlListPushBack",
11376 xmlMemBlocks() - mem_base);
11378 printf(" %d", n_l);
11379 printf(" %d", n_data);
11391 test_xmlListPushFront(void) {
11396 xmlListPtr l; /* a list */
11398 void * data; /* new data */
11401 for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
11402 for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
11403 mem_base = xmlMemBlocks();
11404 l = gen_xmlListPtr(n_l, 0);
11405 data = gen_userdata(n_data, 1);
11407 ret_val = xmlListPushFront(l, data);
11408 desret_int(ret_val);
11410 des_xmlListPtr(n_l, l, 0);
11411 des_userdata(n_data, data, 1);
11412 xmlResetLastError();
11413 if (mem_base != xmlMemBlocks()) {
11414 printf("Leak of %d blocks found in xmlListPushFront",
11415 xmlMemBlocks() - mem_base);
11417 printf(" %d", n_l);
11418 printf(" %d", n_data);
11430 test_xmlListRemoveAll(void) {
11435 xmlListPtr l; /* a list */
11437 void * data; /* list data */
11440 for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
11441 for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
11442 mem_base = xmlMemBlocks();
11443 l = gen_xmlListPtr(n_l, 0);
11444 data = gen_userdata(n_data, 1);
11446 ret_val = xmlListRemoveAll(l, data);
11447 desret_int(ret_val);
11449 des_xmlListPtr(n_l, l, 0);
11450 des_userdata(n_data, data, 1);
11451 xmlResetLastError();
11452 if (mem_base != xmlMemBlocks()) {
11453 printf("Leak of %d blocks found in xmlListRemoveAll",
11454 xmlMemBlocks() - mem_base);
11456 printf(" %d", n_l);
11457 printf(" %d", n_data);
11469 test_xmlListRemoveFirst(void) {
11474 xmlListPtr l; /* a list */
11476 void * data; /* list data */
11479 for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
11480 for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
11481 mem_base = xmlMemBlocks();
11482 l = gen_xmlListPtr(n_l, 0);
11483 data = gen_userdata(n_data, 1);
11485 ret_val = xmlListRemoveFirst(l, data);
11486 desret_int(ret_val);
11488 des_xmlListPtr(n_l, l, 0);
11489 des_userdata(n_data, data, 1);
11490 xmlResetLastError();
11491 if (mem_base != xmlMemBlocks()) {
11492 printf("Leak of %d blocks found in xmlListRemoveFirst",
11493 xmlMemBlocks() - mem_base);
11495 printf(" %d", n_l);
11496 printf(" %d", n_data);
11508 test_xmlListRemoveLast(void) {
11513 xmlListPtr l; /* a list */
11515 void * data; /* list data */
11518 for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
11519 for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
11520 mem_base = xmlMemBlocks();
11521 l = gen_xmlListPtr(n_l, 0);
11522 data = gen_userdata(n_data, 1);
11524 ret_val = xmlListRemoveLast(l, data);
11525 desret_int(ret_val);
11527 des_xmlListPtr(n_l, l, 0);
11528 des_userdata(n_data, data, 1);
11529 xmlResetLastError();
11530 if (mem_base != xmlMemBlocks()) {
11531 printf("Leak of %d blocks found in xmlListRemoveLast",
11532 xmlMemBlocks() - mem_base);
11534 printf(" %d", n_l);
11535 printf(" %d", n_data);
11547 test_xmlListReverse(void) {
11551 xmlListPtr l; /* a list */
11554 for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
11555 mem_base = xmlMemBlocks();
11556 l = gen_xmlListPtr(n_l, 0);
11560 des_xmlListPtr(n_l, l, 0);
11561 xmlResetLastError();
11562 if (mem_base != xmlMemBlocks()) {
11563 printf("Leak of %d blocks found in xmlListReverse",
11564 xmlMemBlocks() - mem_base);
11566 printf(" %d", n_l);
11577 test_xmlListReverseSearch(void) {
11582 xmlListPtr l; /* a list */
11584 void * data; /* a search value */
11587 for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
11588 for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
11589 mem_base = xmlMemBlocks();
11590 l = gen_xmlListPtr(n_l, 0);
11591 data = gen_userdata(n_data, 1);
11593 ret_val = xmlListReverseSearch(l, data);
11594 desret_void_ptr(ret_val);
11596 des_xmlListPtr(n_l, l, 0);
11597 des_userdata(n_data, data, 1);
11598 xmlResetLastError();
11599 if (mem_base != xmlMemBlocks()) {
11600 printf("Leak of %d blocks found in xmlListReverseSearch",
11601 xmlMemBlocks() - mem_base);
11603 printf(" %d", n_l);
11604 printf(" %d", n_data);
11616 test_xmlListReverseWalk(void) {
11620 /* missing type support */
11626 test_xmlListSearch(void) {
11631 xmlListPtr l; /* a list */
11633 void * data; /* a search value */
11636 for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
11637 for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
11638 mem_base = xmlMemBlocks();
11639 l = gen_xmlListPtr(n_l, 0);
11640 data = gen_userdata(n_data, 1);
11642 ret_val = xmlListSearch(l, data);
11643 desret_void_ptr(ret_val);
11645 des_xmlListPtr(n_l, l, 0);
11646 des_userdata(n_data, data, 1);
11647 xmlResetLastError();
11648 if (mem_base != xmlMemBlocks()) {
11649 printf("Leak of %d blocks found in xmlListSearch",
11650 xmlMemBlocks() - mem_base);
11652 printf(" %d", n_l);
11653 printf(" %d", n_data);
11665 test_xmlListSize(void) {
11670 xmlListPtr l; /* a list */
11673 for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
11674 mem_base = xmlMemBlocks();
11675 l = gen_xmlListPtr(n_l, 0);
11677 ret_val = xmlListSize(l);
11678 desret_int(ret_val);
11680 des_xmlListPtr(n_l, l, 0);
11681 xmlResetLastError();
11682 if (mem_base != xmlMemBlocks()) {
11683 printf("Leak of %d blocks found in xmlListSize",
11684 xmlMemBlocks() - mem_base);
11686 printf(" %d", n_l);
11697 test_xmlListSort(void) {
11701 xmlListPtr l; /* a list */
11704 for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
11705 mem_base = xmlMemBlocks();
11706 l = gen_xmlListPtr(n_l, 0);
11710 des_xmlListPtr(n_l, l, 0);
11711 xmlResetLastError();
11712 if (mem_base != xmlMemBlocks()) {
11713 printf("Leak of %d blocks found in xmlListSort",
11714 xmlMemBlocks() - mem_base);
11716 printf(" %d", n_l);
11727 test_xmlListWalk(void) {
11731 /* missing type support */
11740 if (quiet == 0) printf("Testing list : 19 of 26 functions ...\n");
11741 rc = test_xmlLinkGetData();
11742 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11743 rc = test_xmlListAppend();
11744 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11745 rc = test_xmlListClear();
11746 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11747 rc = test_xmlListCopy();
11748 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11749 rc = test_xmlListCreate();
11750 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11751 rc = test_xmlListDup();
11752 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11753 rc = test_xmlListEmpty();
11754 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11755 rc = test_xmlListEnd();
11756 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11757 rc = test_xmlListFront();
11758 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11759 rc = test_xmlListInsert();
11760 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11761 rc = test_xmlListMerge();
11762 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11763 rc = test_xmlListPopBack();
11764 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11765 rc = test_xmlListPopFront();
11766 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11767 rc = test_xmlListPushBack();
11768 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11769 rc = test_xmlListPushFront();
11770 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11771 rc = test_xmlListRemoveAll();
11772 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11773 rc = test_xmlListRemoveFirst();
11774 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11775 rc = test_xmlListRemoveLast();
11776 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11777 rc = test_xmlListReverse();
11778 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11779 rc = test_xmlListReverseSearch();
11780 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11781 rc = test_xmlListReverseWalk();
11782 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11783 rc = test_xmlListSearch();
11784 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11785 rc = test_xmlListSize();
11786 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11787 rc = test_xmlListSort();
11788 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11789 rc = test_xmlListWalk();
11790 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11793 printf("Module list: %d errors\n", test_ret);
11798 test_xmlNanoFTPCheckResponse(void) {
11801 #if defined(LIBXML_FTP_ENABLED)
11804 void * ctx; /* an FTP context */
11807 for (n_ctx = 0;n_ctx < gen_nb_xmlNanoFTPCtxtPtr;n_ctx++) {
11808 mem_base = xmlMemBlocks();
11809 ctx = gen_xmlNanoFTPCtxtPtr(n_ctx, 0);
11811 ret_val = xmlNanoFTPCheckResponse(ctx);
11812 desret_int(ret_val);
11814 des_xmlNanoFTPCtxtPtr(n_ctx, ctx, 0);
11815 xmlResetLastError();
11816 if (mem_base != xmlMemBlocks()) {
11817 printf("Leak of %d blocks found in xmlNanoFTPCheckResponse",
11818 xmlMemBlocks() - mem_base);
11820 printf(" %d", n_ctx);
11832 test_xmlNanoFTPCleanup(void) {
11835 #if defined(LIBXML_FTP_ENABLED)
11838 mem_base = xmlMemBlocks();
11840 xmlNanoFTPCleanup();
11842 xmlResetLastError();
11843 if (mem_base != xmlMemBlocks()) {
11844 printf("Leak of %d blocks found in xmlNanoFTPCleanup",
11845 xmlMemBlocks() - mem_base);
11857 test_xmlNanoFTPCloseConnection(void) {
11860 #if defined(LIBXML_FTP_ENABLED)
11863 void * ctx; /* an FTP context */
11866 for (n_ctx = 0;n_ctx < gen_nb_xmlNanoFTPCtxtPtr;n_ctx++) {
11867 mem_base = xmlMemBlocks();
11868 ctx = gen_xmlNanoFTPCtxtPtr(n_ctx, 0);
11870 ret_val = xmlNanoFTPCloseConnection(ctx);
11871 desret_int(ret_val);
11873 des_xmlNanoFTPCtxtPtr(n_ctx, ctx, 0);
11874 xmlResetLastError();
11875 if (mem_base != xmlMemBlocks()) {
11876 printf("Leak of %d blocks found in xmlNanoFTPCloseConnection",
11877 xmlMemBlocks() - mem_base);
11879 printf(" %d", n_ctx);
11891 test_xmlNanoFTPCwd(void) {
11894 #if defined(LIBXML_FTP_ENABLED)
11897 void * ctx; /* an FTP context */
11899 char * directory; /* a directory on the server */
11902 for (n_ctx = 0;n_ctx < gen_nb_xmlNanoFTPCtxtPtr;n_ctx++) {
11903 for (n_directory = 0;n_directory < gen_nb_const_char_ptr;n_directory++) {
11904 mem_base = xmlMemBlocks();
11905 ctx = gen_xmlNanoFTPCtxtPtr(n_ctx, 0);
11906 directory = gen_const_char_ptr(n_directory, 1);
11908 ret_val = xmlNanoFTPCwd(ctx, (const char *)directory);
11909 desret_int(ret_val);
11911 des_xmlNanoFTPCtxtPtr(n_ctx, ctx, 0);
11912 des_const_char_ptr(n_directory, (const char *)directory, 1);
11913 xmlResetLastError();
11914 if (mem_base != xmlMemBlocks()) {
11915 printf("Leak of %d blocks found in xmlNanoFTPCwd",
11916 xmlMemBlocks() - mem_base);
11918 printf(" %d", n_ctx);
11919 printf(" %d", n_directory);
11932 test_xmlNanoFTPDele(void) {
11935 #if defined(LIBXML_FTP_ENABLED)
11938 void * ctx; /* an FTP context */
11940 const char * file; /* a file or directory on the server */
11943 for (n_ctx = 0;n_ctx < gen_nb_xmlNanoFTPCtxtPtr;n_ctx++) {
11944 for (n_file = 0;n_file < gen_nb_filepath;n_file++) {
11945 mem_base = xmlMemBlocks();
11946 ctx = gen_xmlNanoFTPCtxtPtr(n_ctx, 0);
11947 file = gen_filepath(n_file, 1);
11949 ret_val = xmlNanoFTPDele(ctx, file);
11950 desret_int(ret_val);
11952 des_xmlNanoFTPCtxtPtr(n_ctx, ctx, 0);
11953 des_filepath(n_file, file, 1);
11954 xmlResetLastError();
11955 if (mem_base != xmlMemBlocks()) {
11956 printf("Leak of %d blocks found in xmlNanoFTPDele",
11957 xmlMemBlocks() - mem_base);
11959 printf(" %d", n_ctx);
11960 printf(" %d", n_file);
11973 test_xmlNanoFTPGet(void) {
11977 /* missing type support */
11983 test_xmlNanoFTPGetConnection(void) {
11987 /* missing type support */
11993 test_xmlNanoFTPGetResponse(void) {
11996 #if defined(LIBXML_FTP_ENABLED)
11999 void * ctx; /* an FTP context */
12002 for (n_ctx = 0;n_ctx < gen_nb_xmlNanoFTPCtxtPtr;n_ctx++) {
12003 mem_base = xmlMemBlocks();
12004 ctx = gen_xmlNanoFTPCtxtPtr(n_ctx, 0);
12006 ret_val = xmlNanoFTPGetResponse(ctx);
12007 desret_int(ret_val);
12009 des_xmlNanoFTPCtxtPtr(n_ctx, ctx, 0);
12010 xmlResetLastError();
12011 if (mem_base != xmlMemBlocks()) {
12012 printf("Leak of %d blocks found in xmlNanoFTPGetResponse",
12013 xmlMemBlocks() - mem_base);
12015 printf(" %d", n_ctx);
12027 test_xmlNanoFTPGetSocket(void) {
12031 /* missing type support */
12037 test_xmlNanoFTPInit(void) {
12040 #if defined(LIBXML_FTP_ENABLED)
12043 mem_base = xmlMemBlocks();
12047 xmlResetLastError();
12048 if (mem_base != xmlMemBlocks()) {
12049 printf("Leak of %d blocks found in xmlNanoFTPInit",
12050 xmlMemBlocks() - mem_base);
12062 test_xmlNanoFTPList(void) {
12066 /* missing type support */
12072 test_xmlNanoFTPNewCtxt(void) {
12075 #if defined(LIBXML_FTP_ENABLED)
12078 const char * URL; /* The URL used to initialize the context */
12081 for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
12082 mem_base = xmlMemBlocks();
12083 URL = gen_filepath(n_URL, 0);
12085 ret_val = xmlNanoFTPNewCtxt(URL);
12086 desret_xmlNanoFTPCtxtPtr(ret_val);
12088 des_filepath(n_URL, URL, 0);
12089 xmlResetLastError();
12090 if (mem_base != xmlMemBlocks()) {
12091 printf("Leak of %d blocks found in xmlNanoFTPNewCtxt",
12092 xmlMemBlocks() - mem_base);
12094 printf(" %d", n_URL);
12106 test_xmlNanoFTPOpen(void) {
12109 #if defined(LIBXML_FTP_ENABLED)
12112 const char * URL; /* the URL to the resource */
12115 for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
12116 mem_base = xmlMemBlocks();
12117 URL = gen_filepath(n_URL, 0);
12119 ret_val = xmlNanoFTPOpen(URL);
12120 desret_xmlNanoFTPCtxtPtr(ret_val);
12122 des_filepath(n_URL, URL, 0);
12123 xmlResetLastError();
12124 if (mem_base != xmlMemBlocks()) {
12125 printf("Leak of %d blocks found in xmlNanoFTPOpen",
12126 xmlMemBlocks() - mem_base);
12128 printf(" %d", n_URL);
12140 test_xmlNanoFTPProxy(void) {
12143 #if defined(LIBXML_FTP_ENABLED)
12144 char * host; /* the proxy host name */
12146 int port; /* the proxy port */
12148 char * user; /* the proxy user name */
12150 char * passwd; /* the proxy password */
12152 int type; /* the type of proxy 1 for using SITE, 2 for USER a@b */
12155 for (n_host = 0;n_host < gen_nb_const_char_ptr;n_host++) {
12156 for (n_port = 0;n_port < gen_nb_int;n_port++) {
12157 for (n_user = 0;n_user < gen_nb_const_char_ptr;n_user++) {
12158 for (n_passwd = 0;n_passwd < gen_nb_const_char_ptr;n_passwd++) {
12159 for (n_type = 0;n_type < gen_nb_int;n_type++) {
12160 host = gen_const_char_ptr(n_host, 0);
12161 port = gen_int(n_port, 1);
12162 user = gen_const_char_ptr(n_user, 2);
12163 passwd = gen_const_char_ptr(n_passwd, 3);
12164 type = gen_int(n_type, 4);
12166 xmlNanoFTPProxy((const char *)host, port, (const char *)user, (const char *)passwd, type);
12168 des_const_char_ptr(n_host, (const char *)host, 0);
12169 des_int(n_port, port, 1);
12170 des_const_char_ptr(n_user, (const char *)user, 2);
12171 des_const_char_ptr(n_passwd, (const char *)passwd, 3);
12172 des_int(n_type, type, 4);
12173 xmlResetLastError();
12187 test_xmlNanoFTPQuit(void) {
12190 #if defined(LIBXML_FTP_ENABLED)
12193 void * ctx; /* an FTP context */
12196 for (n_ctx = 0;n_ctx < gen_nb_xmlNanoFTPCtxtPtr;n_ctx++) {
12197 mem_base = xmlMemBlocks();
12198 ctx = gen_xmlNanoFTPCtxtPtr(n_ctx, 0);
12200 ret_val = xmlNanoFTPQuit(ctx);
12201 desret_int(ret_val);
12203 des_xmlNanoFTPCtxtPtr(n_ctx, ctx, 0);
12204 xmlResetLastError();
12205 if (mem_base != xmlMemBlocks()) {
12206 printf("Leak of %d blocks found in xmlNanoFTPQuit",
12207 xmlMemBlocks() - mem_base);
12209 printf(" %d", n_ctx);
12221 test_xmlNanoFTPRead(void) {
12224 #if defined(LIBXML_FTP_ENABLED)
12227 void * ctx; /* the FTP context */
12229 void * dest; /* a buffer */
12231 int len; /* the buffer length */
12234 for (n_ctx = 0;n_ctx < gen_nb_xmlNanoFTPCtxtPtr;n_ctx++) {
12235 for (n_dest = 0;n_dest < gen_nb_void_ptr;n_dest++) {
12236 for (n_len = 0;n_len < gen_nb_int;n_len++) {
12237 mem_base = xmlMemBlocks();
12238 ctx = gen_xmlNanoFTPCtxtPtr(n_ctx, 0);
12239 dest = gen_void_ptr(n_dest, 1);
12240 len = gen_int(n_len, 2);
12242 ret_val = xmlNanoFTPRead(ctx, dest, len);
12243 desret_int(ret_val);
12245 des_xmlNanoFTPCtxtPtr(n_ctx, ctx, 0);
12246 des_void_ptr(n_dest, dest, 1);
12247 des_int(n_len, len, 2);
12248 xmlResetLastError();
12249 if (mem_base != xmlMemBlocks()) {
12250 printf("Leak of %d blocks found in xmlNanoFTPRead",
12251 xmlMemBlocks() - mem_base);
12253 printf(" %d", n_ctx);
12254 printf(" %d", n_dest);
12255 printf(" %d", n_len);
12269 test_xmlNanoFTPScanProxy(void) {
12272 #if defined(LIBXML_FTP_ENABLED)
12273 const char * URL; /* The proxy URL used to initialize the proxy context */
12276 for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
12277 URL = gen_filepath(n_URL, 0);
12279 xmlNanoFTPScanProxy(URL);
12281 des_filepath(n_URL, URL, 0);
12282 xmlResetLastError();
12292 test_xmlNanoFTPUpdateURL(void) {
12295 #if defined(LIBXML_FTP_ENABLED)
12298 void * ctx; /* an FTP context */
12300 const char * URL; /* The URL used to update the context */
12303 for (n_ctx = 0;n_ctx < gen_nb_xmlNanoFTPCtxtPtr;n_ctx++) {
12304 for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
12305 mem_base = xmlMemBlocks();
12306 ctx = gen_xmlNanoFTPCtxtPtr(n_ctx, 0);
12307 URL = gen_filepath(n_URL, 1);
12309 ret_val = xmlNanoFTPUpdateURL(ctx, URL);
12310 desret_int(ret_val);
12312 des_xmlNanoFTPCtxtPtr(n_ctx, ctx, 0);
12313 des_filepath(n_URL, URL, 1);
12314 xmlResetLastError();
12315 if (mem_base != xmlMemBlocks()) {
12316 printf("Leak of %d blocks found in xmlNanoFTPUpdateURL",
12317 xmlMemBlocks() - mem_base);
12319 printf(" %d", n_ctx);
12320 printf(" %d", n_URL);
12332 test_nanoftp(void) {
12336 if (quiet == 0) printf("Testing nanoftp : 14 of 22 functions ...\n");
12337 rc = test_xmlNanoFTPCheckResponse();
12338 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12339 rc = test_xmlNanoFTPCleanup();
12340 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12341 rc = test_xmlNanoFTPCloseConnection();
12342 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12343 rc = test_xmlNanoFTPCwd();
12344 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12345 rc = test_xmlNanoFTPDele();
12346 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12347 rc = test_xmlNanoFTPGet();
12348 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12349 rc = test_xmlNanoFTPGetConnection();
12350 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12351 rc = test_xmlNanoFTPGetResponse();
12352 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12353 rc = test_xmlNanoFTPGetSocket();
12354 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12355 rc = test_xmlNanoFTPInit();
12356 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12357 rc = test_xmlNanoFTPList();
12358 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12359 rc = test_xmlNanoFTPNewCtxt();
12360 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12361 rc = test_xmlNanoFTPOpen();
12362 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12363 rc = test_xmlNanoFTPProxy();
12364 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12365 rc = test_xmlNanoFTPQuit();
12366 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12367 rc = test_xmlNanoFTPRead();
12368 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12369 rc = test_xmlNanoFTPScanProxy();
12370 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12371 rc = test_xmlNanoFTPUpdateURL();
12372 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12375 printf("Module nanoftp: %d errors\n", test_ret);
12380 test_xmlNanoHTTPAuthHeader(void) {
12383 #if defined(LIBXML_HTTP_ENABLED)
12385 const char * ret_val;
12386 void * ctx; /* the HTTP context */
12389 for (n_ctx = 0;n_ctx < gen_nb_xmlNanoHTTPCtxtPtr;n_ctx++) {
12390 mem_base = xmlMemBlocks();
12391 ctx = gen_xmlNanoHTTPCtxtPtr(n_ctx, 0);
12393 ret_val = xmlNanoHTTPAuthHeader(ctx);
12394 desret_const_char_ptr(ret_val);
12396 des_xmlNanoHTTPCtxtPtr(n_ctx, ctx, 0);
12397 xmlResetLastError();
12398 if (mem_base != xmlMemBlocks()) {
12399 printf("Leak of %d blocks found in xmlNanoHTTPAuthHeader",
12400 xmlMemBlocks() - mem_base);
12402 printf(" %d", n_ctx);
12414 test_xmlNanoHTTPCleanup(void) {
12417 #if defined(LIBXML_HTTP_ENABLED)
12420 mem_base = xmlMemBlocks();
12422 xmlNanoHTTPCleanup();
12424 xmlResetLastError();
12425 if (mem_base != xmlMemBlocks()) {
12426 printf("Leak of %d blocks found in xmlNanoHTTPCleanup",
12427 xmlMemBlocks() - mem_base);
12439 test_xmlNanoHTTPContentLength(void) {
12442 #if defined(LIBXML_HTTP_ENABLED)
12445 void * ctx; /* the HTTP context */
12448 for (n_ctx = 0;n_ctx < gen_nb_xmlNanoHTTPCtxtPtr;n_ctx++) {
12449 mem_base = xmlMemBlocks();
12450 ctx = gen_xmlNanoHTTPCtxtPtr(n_ctx, 0);
12452 ret_val = xmlNanoHTTPContentLength(ctx);
12453 desret_int(ret_val);
12455 des_xmlNanoHTTPCtxtPtr(n_ctx, ctx, 0);
12456 xmlResetLastError();
12457 if (mem_base != xmlMemBlocks()) {
12458 printf("Leak of %d blocks found in xmlNanoHTTPContentLength",
12459 xmlMemBlocks() - mem_base);
12461 printf(" %d", n_ctx);
12473 test_xmlNanoHTTPEncoding(void) {
12476 #if defined(LIBXML_HTTP_ENABLED)
12478 const char * ret_val;
12479 void * ctx; /* the HTTP context */
12482 for (n_ctx = 0;n_ctx < gen_nb_xmlNanoHTTPCtxtPtr;n_ctx++) {
12483 mem_base = xmlMemBlocks();
12484 ctx = gen_xmlNanoHTTPCtxtPtr(n_ctx, 0);
12486 ret_val = xmlNanoHTTPEncoding(ctx);
12487 desret_const_char_ptr(ret_val);
12489 des_xmlNanoHTTPCtxtPtr(n_ctx, ctx, 0);
12490 xmlResetLastError();
12491 if (mem_base != xmlMemBlocks()) {
12492 printf("Leak of %d blocks found in xmlNanoHTTPEncoding",
12493 xmlMemBlocks() - mem_base);
12495 printf(" %d", n_ctx);
12506 #define gen_nb_char_ptr_ptr 1
12507 static char ** gen_char_ptr_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
12510 static void des_char_ptr_ptr(int no ATTRIBUTE_UNUSED, char ** val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
12514 test_xmlNanoHTTPFetch(void) {
12517 #if defined(LIBXML_HTTP_ENABLED)
12520 const char * URL; /* The URL to load */
12522 const char * filename; /* the filename where the content should be saved */
12524 char ** contentType; /* if available the Content-Type information will be returned at that location */
12527 for (n_URL = 0;n_URL < gen_nb_fileoutput;n_URL++) {
12528 for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
12529 for (n_contentType = 0;n_contentType < gen_nb_char_ptr_ptr;n_contentType++) {
12530 mem_base = xmlMemBlocks();
12531 URL = gen_fileoutput(n_URL, 0);
12532 filename = gen_fileoutput(n_filename, 1);
12533 contentType = gen_char_ptr_ptr(n_contentType, 2);
12535 ret_val = xmlNanoHTTPFetch(URL, filename, contentType);
12536 desret_int(ret_val);
12538 des_fileoutput(n_URL, URL, 0);
12539 des_fileoutput(n_filename, filename, 1);
12540 des_char_ptr_ptr(n_contentType, contentType, 2);
12541 xmlResetLastError();
12542 if (mem_base != xmlMemBlocks()) {
12543 printf("Leak of %d blocks found in xmlNanoHTTPFetch",
12544 xmlMemBlocks() - mem_base);
12546 printf(" %d", n_URL);
12547 printf(" %d", n_filename);
12548 printf(" %d", n_contentType);
12562 test_xmlNanoHTTPInit(void) {
12565 #if defined(LIBXML_HTTP_ENABLED)
12568 mem_base = xmlMemBlocks();
12572 xmlResetLastError();
12573 if (mem_base != xmlMemBlocks()) {
12574 printf("Leak of %d blocks found in xmlNanoHTTPInit",
12575 xmlMemBlocks() - mem_base);
12587 test_xmlNanoHTTPMimeType(void) {
12590 #if defined(LIBXML_HTTP_ENABLED)
12592 const char * ret_val;
12593 void * ctx; /* the HTTP context */
12596 for (n_ctx = 0;n_ctx < gen_nb_xmlNanoHTTPCtxtPtr;n_ctx++) {
12597 mem_base = xmlMemBlocks();
12598 ctx = gen_xmlNanoHTTPCtxtPtr(n_ctx, 0);
12600 ret_val = xmlNanoHTTPMimeType(ctx);
12601 desret_const_char_ptr(ret_val);
12603 des_xmlNanoHTTPCtxtPtr(n_ctx, ctx, 0);
12604 xmlResetLastError();
12605 if (mem_base != xmlMemBlocks()) {
12606 printf("Leak of %d blocks found in xmlNanoHTTPMimeType",
12607 xmlMemBlocks() - mem_base);
12609 printf(" %d", n_ctx);
12621 test_xmlNanoHTTPOpen(void) {
12624 #if defined(LIBXML_HTTP_ENABLED)
12627 const char * URL; /* The URL to load */
12629 char ** contentType; /* if available the Content-Type information will be returned at that location */
12632 for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
12633 for (n_contentType = 0;n_contentType < gen_nb_char_ptr_ptr;n_contentType++) {
12634 mem_base = xmlMemBlocks();
12635 URL = gen_filepath(n_URL, 0);
12636 contentType = gen_char_ptr_ptr(n_contentType, 1);
12638 ret_val = xmlNanoHTTPOpen(URL, contentType);
12639 desret_xmlNanoHTTPCtxtPtr(ret_val);
12641 des_filepath(n_URL, URL, 0);
12642 des_char_ptr_ptr(n_contentType, contentType, 1);
12643 xmlResetLastError();
12644 if (mem_base != xmlMemBlocks()) {
12645 printf("Leak of %d blocks found in xmlNanoHTTPOpen",
12646 xmlMemBlocks() - mem_base);
12648 printf(" %d", n_URL);
12649 printf(" %d", n_contentType);
12662 test_xmlNanoHTTPOpenRedir(void) {
12665 #if defined(LIBXML_HTTP_ENABLED)
12668 const char * URL; /* The URL to load */
12670 char ** contentType; /* if available the Content-Type information will be returned at that location */
12672 char ** redir; /* if available the redirected URL will be returned */
12675 for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
12676 for (n_contentType = 0;n_contentType < gen_nb_char_ptr_ptr;n_contentType++) {
12677 for (n_redir = 0;n_redir < gen_nb_char_ptr_ptr;n_redir++) {
12678 mem_base = xmlMemBlocks();
12679 URL = gen_filepath(n_URL, 0);
12680 contentType = gen_char_ptr_ptr(n_contentType, 1);
12681 redir = gen_char_ptr_ptr(n_redir, 2);
12683 ret_val = xmlNanoHTTPOpenRedir(URL, contentType, redir);
12684 desret_xmlNanoHTTPCtxtPtr(ret_val);
12686 des_filepath(n_URL, URL, 0);
12687 des_char_ptr_ptr(n_contentType, contentType, 1);
12688 des_char_ptr_ptr(n_redir, redir, 2);
12689 xmlResetLastError();
12690 if (mem_base != xmlMemBlocks()) {
12691 printf("Leak of %d blocks found in xmlNanoHTTPOpenRedir",
12692 xmlMemBlocks() - mem_base);
12694 printf(" %d", n_URL);
12695 printf(" %d", n_contentType);
12696 printf(" %d", n_redir);
12710 test_xmlNanoHTTPRead(void) {
12713 #if defined(LIBXML_HTTP_ENABLED)
12716 void * ctx; /* the HTTP context */
12718 void * dest; /* a buffer */
12720 int len; /* the buffer length */
12723 for (n_ctx = 0;n_ctx < gen_nb_xmlNanoHTTPCtxtPtr;n_ctx++) {
12724 for (n_dest = 0;n_dest < gen_nb_void_ptr;n_dest++) {
12725 for (n_len = 0;n_len < gen_nb_int;n_len++) {
12726 mem_base = xmlMemBlocks();
12727 ctx = gen_xmlNanoHTTPCtxtPtr(n_ctx, 0);
12728 dest = gen_void_ptr(n_dest, 1);
12729 len = gen_int(n_len, 2);
12731 ret_val = xmlNanoHTTPRead(ctx, dest, len);
12732 desret_int(ret_val);
12734 des_xmlNanoHTTPCtxtPtr(n_ctx, ctx, 0);
12735 des_void_ptr(n_dest, dest, 1);
12736 des_int(n_len, len, 2);
12737 xmlResetLastError();
12738 if (mem_base != xmlMemBlocks()) {
12739 printf("Leak of %d blocks found in xmlNanoHTTPRead",
12740 xmlMemBlocks() - mem_base);
12742 printf(" %d", n_ctx);
12743 printf(" %d", n_dest);
12744 printf(" %d", n_len);
12758 test_xmlNanoHTTPRedir(void) {
12762 /* missing type support */
12768 test_xmlNanoHTTPReturnCode(void) {
12771 #if defined(LIBXML_HTTP_ENABLED)
12774 void * ctx; /* the HTTP context */
12777 for (n_ctx = 0;n_ctx < gen_nb_xmlNanoHTTPCtxtPtr;n_ctx++) {
12778 mem_base = xmlMemBlocks();
12779 ctx = gen_xmlNanoHTTPCtxtPtr(n_ctx, 0);
12781 ret_val = xmlNanoHTTPReturnCode(ctx);
12782 desret_int(ret_val);
12784 des_xmlNanoHTTPCtxtPtr(n_ctx, ctx, 0);
12785 xmlResetLastError();
12786 if (mem_base != xmlMemBlocks()) {
12787 printf("Leak of %d blocks found in xmlNanoHTTPReturnCode",
12788 xmlMemBlocks() - mem_base);
12790 printf(" %d", n_ctx);
12802 test_xmlNanoHTTPSave(void) {
12805 #if defined(LIBXML_HTTP_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
12808 void * ctxt; /* the HTTP context */
12810 const char * filename; /* the filename where the content should be saved */
12813 for (n_ctxt = 0;n_ctxt < gen_nb_void_ptr;n_ctxt++) {
12814 for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
12815 mem_base = xmlMemBlocks();
12816 ctxt = gen_void_ptr(n_ctxt, 0);
12817 filename = gen_fileoutput(n_filename, 1);
12819 ret_val = xmlNanoHTTPSave(ctxt, filename);
12820 desret_int(ret_val);
12822 des_void_ptr(n_ctxt, ctxt, 0);
12823 des_fileoutput(n_filename, filename, 1);
12824 xmlResetLastError();
12825 if (mem_base != xmlMemBlocks()) {
12826 printf("Leak of %d blocks found in xmlNanoHTTPSave",
12827 xmlMemBlocks() - mem_base);
12829 printf(" %d", n_ctxt);
12830 printf(" %d", n_filename);
12843 test_xmlNanoHTTPScanProxy(void) {
12846 #if defined(LIBXML_HTTP_ENABLED)
12847 const char * URL; /* The proxy URL used to initialize the proxy context */
12850 for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
12851 URL = gen_filepath(n_URL, 0);
12853 xmlNanoHTTPScanProxy(URL);
12855 des_filepath(n_URL, URL, 0);
12856 xmlResetLastError();
12865 test_nanohttp(void) {
12869 if (quiet == 0) printf("Testing nanohttp : 13 of 17 functions ...\n");
12870 rc = test_xmlNanoHTTPAuthHeader();
12871 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12872 rc = test_xmlNanoHTTPCleanup();
12873 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12874 rc = test_xmlNanoHTTPContentLength();
12875 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12876 rc = test_xmlNanoHTTPEncoding();
12877 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12878 rc = test_xmlNanoHTTPFetch();
12879 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12880 rc = test_xmlNanoHTTPInit();
12881 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12882 rc = test_xmlNanoHTTPMimeType();
12883 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12884 rc = test_xmlNanoHTTPOpen();
12885 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12886 rc = test_xmlNanoHTTPOpenRedir();
12887 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12888 rc = test_xmlNanoHTTPRead();
12889 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12890 rc = test_xmlNanoHTTPRedir();
12891 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12892 rc = test_xmlNanoHTTPReturnCode();
12893 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12894 rc = test_xmlNanoHTTPSave();
12895 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12896 rc = test_xmlNanoHTTPScanProxy();
12897 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12900 printf("Module nanohttp: %d errors\n", test_ret);
12905 test_xmlByteConsumed(void) {
12910 xmlParserCtxtPtr ctxt; /* an XML parser context */
12913 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
12914 mem_base = xmlMemBlocks();
12915 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
12917 ret_val = xmlByteConsumed(ctxt);
12918 desret_long(ret_val);
12920 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
12921 xmlResetLastError();
12922 if (mem_base != xmlMemBlocks()) {
12923 printf("Leak of %d blocks found in xmlByteConsumed",
12924 xmlMemBlocks() - mem_base);
12926 printf(" %d", n_ctxt);
12937 test_xmlClearNodeInfoSeq(void) {
12941 xmlParserNodeInfoSeqPtr seq; /* a node info sequence pointer */
12944 for (n_seq = 0;n_seq < gen_nb_xmlParserNodeInfoSeqPtr;n_seq++) {
12945 mem_base = xmlMemBlocks();
12946 seq = gen_xmlParserNodeInfoSeqPtr(n_seq, 0);
12948 xmlClearNodeInfoSeq(seq);
12950 des_xmlParserNodeInfoSeqPtr(n_seq, seq, 0);
12951 xmlResetLastError();
12952 if (mem_base != xmlMemBlocks()) {
12953 printf("Leak of %d blocks found in xmlClearNodeInfoSeq",
12954 xmlMemBlocks() - mem_base);
12956 printf(" %d", n_seq);
12967 test_xmlClearParserCtxt(void) {
12971 xmlParserCtxtPtr ctxt; /* an XML parser context */
12974 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
12975 mem_base = xmlMemBlocks();
12976 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
12978 xmlClearParserCtxt(ctxt);
12980 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
12981 xmlResetLastError();
12982 if (mem_base != xmlMemBlocks()) {
12983 printf("Leak of %d blocks found in xmlClearParserCtxt",
12984 xmlMemBlocks() - mem_base);
12986 printf(" %d", n_ctxt);
12997 test_xmlCreateDocParserCtxt(void) {
13001 xmlParserCtxtPtr ret_val;
13002 xmlChar * cur; /* a pointer to an array of xmlChar */
13005 for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
13006 mem_base = xmlMemBlocks();
13007 cur = gen_const_xmlChar_ptr(n_cur, 0);
13009 ret_val = xmlCreateDocParserCtxt((const xmlChar *)cur);
13010 desret_xmlParserCtxtPtr(ret_val);
13012 des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 0);
13013 xmlResetLastError();
13014 if (mem_base != xmlMemBlocks()) {
13015 printf("Leak of %d blocks found in xmlCreateDocParserCtxt",
13016 xmlMemBlocks() - mem_base);
13018 printf(" %d", n_cur);
13029 test_xmlCreatePushParserCtxt(void) {
13032 #if defined(LIBXML_PUSH_ENABLED)
13034 xmlParserCtxtPtr ret_val;
13035 xmlSAXHandlerPtr sax; /* a SAX handler */
13037 void * user_data; /* The user data returned on SAX callbacks */
13039 char * chunk; /* a pointer to an array of chars */
13041 int size; /* number of chars in the array */
13043 const char * filename; /* an optional file name or URI */
13046 for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
13047 for (n_user_data = 0;n_user_data < gen_nb_userdata;n_user_data++) {
13048 for (n_chunk = 0;n_chunk < gen_nb_const_char_ptr;n_chunk++) {
13049 for (n_size = 0;n_size < gen_nb_int;n_size++) {
13050 for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
13051 mem_base = xmlMemBlocks();
13052 sax = gen_xmlSAXHandlerPtr(n_sax, 0);
13053 user_data = gen_userdata(n_user_data, 1);
13054 chunk = gen_const_char_ptr(n_chunk, 2);
13055 size = gen_int(n_size, 3);
13056 filename = gen_fileoutput(n_filename, 4);
13057 if ((chunk != NULL) &&
13058 (size > (int) strlen((const char *) chunk) + 1))
13061 ret_val = xmlCreatePushParserCtxt(sax, user_data, (const char *)chunk, size, filename);
13062 desret_xmlParserCtxtPtr(ret_val);
13064 des_xmlSAXHandlerPtr(n_sax, sax, 0);
13065 des_userdata(n_user_data, user_data, 1);
13066 des_const_char_ptr(n_chunk, (const char *)chunk, 2);
13067 des_int(n_size, size, 3);
13068 des_fileoutput(n_filename, filename, 4);
13069 xmlResetLastError();
13070 if (mem_base != xmlMemBlocks()) {
13071 printf("Leak of %d blocks found in xmlCreatePushParserCtxt",
13072 xmlMemBlocks() - mem_base);
13074 printf(" %d", n_sax);
13075 printf(" %d", n_user_data);
13076 printf(" %d", n_chunk);
13077 printf(" %d", n_size);
13078 printf(" %d", n_filename);
13094 test_xmlCtxtReadDoc(void) {
13099 xmlParserCtxtPtr ctxt; /* an XML parser context */
13101 xmlChar * cur; /* a pointer to a zero terminated string */
13103 const char * URL; /* the base URL to use for the document */
13105 char * encoding; /* the document encoding, or NULL */
13107 int options; /* a combination of xmlParserOption */
13110 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
13111 for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
13112 for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
13113 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
13114 for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
13115 mem_base = xmlMemBlocks();
13116 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
13117 cur = gen_const_xmlChar_ptr(n_cur, 1);
13118 URL = gen_filepath(n_URL, 2);
13119 encoding = gen_const_char_ptr(n_encoding, 3);
13120 options = gen_parseroptions(n_options, 4);
13122 ret_val = xmlCtxtReadDoc(ctxt, (const xmlChar *)cur, URL, (const char *)encoding, options);
13123 desret_xmlDocPtr(ret_val);
13125 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
13126 des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 1);
13127 des_filepath(n_URL, URL, 2);
13128 des_const_char_ptr(n_encoding, (const char *)encoding, 3);
13129 des_parseroptions(n_options, options, 4);
13130 xmlResetLastError();
13131 if (mem_base != xmlMemBlocks()) {
13132 printf("Leak of %d blocks found in xmlCtxtReadDoc",
13133 xmlMemBlocks() - mem_base);
13135 printf(" %d", n_ctxt);
13136 printf(" %d", n_cur);
13137 printf(" %d", n_URL);
13138 printf(" %d", n_encoding);
13139 printf(" %d", n_options);
13154 test_xmlCtxtReadFile(void) {
13159 xmlParserCtxtPtr ctxt; /* an XML parser context */
13161 const char * filename; /* a file or URL */
13163 char * encoding; /* the document encoding, or NULL */
13165 int options; /* a combination of xmlParserOption */
13168 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
13169 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
13170 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
13171 for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
13172 mem_base = xmlMemBlocks();
13173 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
13174 filename = gen_filepath(n_filename, 1);
13175 encoding = gen_const_char_ptr(n_encoding, 2);
13176 options = gen_parseroptions(n_options, 3);
13178 ret_val = xmlCtxtReadFile(ctxt, filename, (const char *)encoding, options);
13179 desret_xmlDocPtr(ret_val);
13181 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
13182 des_filepath(n_filename, filename, 1);
13183 des_const_char_ptr(n_encoding, (const char *)encoding, 2);
13184 des_parseroptions(n_options, options, 3);
13185 xmlResetLastError();
13186 if (mem_base != xmlMemBlocks()) {
13187 printf("Leak of %d blocks found in xmlCtxtReadFile",
13188 xmlMemBlocks() - mem_base);
13190 printf(" %d", n_ctxt);
13191 printf(" %d", n_filename);
13192 printf(" %d", n_encoding);
13193 printf(" %d", n_options);
13207 test_xmlCtxtReadMemory(void) {
13212 xmlParserCtxtPtr ctxt; /* an XML parser context */
13214 char * buffer; /* a pointer to a char array */
13216 int size; /* the size of the array */
13218 const char * URL; /* the base URL to use for the document */
13220 char * encoding; /* the document encoding, or NULL */
13222 int options; /* a combination of xmlParserOption */
13225 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
13226 for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
13227 for (n_size = 0;n_size < gen_nb_int;n_size++) {
13228 for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
13229 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
13230 for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
13231 mem_base = xmlMemBlocks();
13232 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
13233 buffer = gen_const_char_ptr(n_buffer, 1);
13234 size = gen_int(n_size, 2);
13235 URL = gen_filepath(n_URL, 3);
13236 encoding = gen_const_char_ptr(n_encoding, 4);
13237 options = gen_parseroptions(n_options, 5);
13238 if ((buffer != NULL) &&
13239 (size > (int) strlen((const char *) buffer) + 1))
13242 ret_val = xmlCtxtReadMemory(ctxt, (const char *)buffer, size, URL, (const char *)encoding, options);
13243 desret_xmlDocPtr(ret_val);
13245 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
13246 des_const_char_ptr(n_buffer, (const char *)buffer, 1);
13247 des_int(n_size, size, 2);
13248 des_filepath(n_URL, URL, 3);
13249 des_const_char_ptr(n_encoding, (const char *)encoding, 4);
13250 des_parseroptions(n_options, options, 5);
13251 xmlResetLastError();
13252 if (mem_base != xmlMemBlocks()) {
13253 printf("Leak of %d blocks found in xmlCtxtReadMemory",
13254 xmlMemBlocks() - mem_base);
13256 printf(" %d", n_ctxt);
13257 printf(" %d", n_buffer);
13258 printf(" %d", n_size);
13259 printf(" %d", n_URL);
13260 printf(" %d", n_encoding);
13261 printf(" %d", n_options);
13277 test_xmlCtxtReset(void) {
13281 xmlParserCtxtPtr ctxt; /* an XML parser context */
13284 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
13285 mem_base = xmlMemBlocks();
13286 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
13288 xmlCtxtReset(ctxt);
13290 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
13291 xmlResetLastError();
13292 if (mem_base != xmlMemBlocks()) {
13293 printf("Leak of %d blocks found in xmlCtxtReset",
13294 xmlMemBlocks() - mem_base);
13296 printf(" %d", n_ctxt);
13307 test_xmlCtxtResetPush(void) {
13312 xmlParserCtxtPtr ctxt; /* an XML parser context */
13314 char * chunk; /* a pointer to an array of chars */
13316 int size; /* number of chars in the array */
13318 const char * filename; /* an optional file name or URI */
13320 char * encoding; /* the document encoding, or NULL */
13323 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
13324 for (n_chunk = 0;n_chunk < gen_nb_const_char_ptr;n_chunk++) {
13325 for (n_size = 0;n_size < gen_nb_int;n_size++) {
13326 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
13327 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
13328 mem_base = xmlMemBlocks();
13329 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
13330 chunk = gen_const_char_ptr(n_chunk, 1);
13331 size = gen_int(n_size, 2);
13332 filename = gen_filepath(n_filename, 3);
13333 encoding = gen_const_char_ptr(n_encoding, 4);
13334 if ((chunk != NULL) &&
13335 (size > (int) strlen((const char *) chunk) + 1))
13338 ret_val = xmlCtxtResetPush(ctxt, (const char *)chunk, size, filename, (const char *)encoding);
13339 desret_int(ret_val);
13341 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
13342 des_const_char_ptr(n_chunk, (const char *)chunk, 1);
13343 des_int(n_size, size, 2);
13344 des_filepath(n_filename, filename, 3);
13345 des_const_char_ptr(n_encoding, (const char *)encoding, 4);
13346 xmlResetLastError();
13347 if (mem_base != xmlMemBlocks()) {
13348 printf("Leak of %d blocks found in xmlCtxtResetPush",
13349 xmlMemBlocks() - mem_base);
13351 printf(" %d", n_ctxt);
13352 printf(" %d", n_chunk);
13353 printf(" %d", n_size);
13354 printf(" %d", n_filename);
13355 printf(" %d", n_encoding);
13370 test_xmlCtxtUseOptions(void) {
13375 xmlParserCtxtPtr ctxt; /* an XML parser context */
13377 int options; /* a combination of xmlParserOption */
13380 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
13381 for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
13382 mem_base = xmlMemBlocks();
13383 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
13384 options = gen_parseroptions(n_options, 1);
13386 ret_val = xmlCtxtUseOptions(ctxt, options);
13387 desret_int(ret_val);
13389 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
13390 des_parseroptions(n_options, options, 1);
13391 xmlResetLastError();
13392 if (mem_base != xmlMemBlocks()) {
13393 printf("Leak of %d blocks found in xmlCtxtUseOptions",
13394 xmlMemBlocks() - mem_base);
13396 printf(" %d", n_ctxt);
13397 printf(" %d", n_options);
13409 test_xmlGetExternalEntityLoader(void) {
13413 /* missing type support */
13419 test_xmlGetFeature(void) {
13422 #if defined(LIBXML_LEGACY_ENABLED)
13423 #ifdef LIBXML_LEGACY_ENABLED
13426 xmlParserCtxtPtr ctxt; /* an XML/HTML parser context */
13428 char * name; /* the feature name */
13430 void * result; /* location to store the result */
13433 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
13434 for (n_name = 0;n_name < gen_nb_const_char_ptr;n_name++) {
13435 for (n_result = 0;n_result < gen_nb_void_ptr;n_result++) {
13436 mem_base = xmlMemBlocks();
13437 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
13438 name = gen_const_char_ptr(n_name, 1);
13439 result = gen_void_ptr(n_result, 2);
13441 ret_val = xmlGetFeature(ctxt, (const char *)name, result);
13442 desret_int(ret_val);
13444 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
13445 des_const_char_ptr(n_name, (const char *)name, 1);
13446 des_void_ptr(n_result, result, 2);
13447 xmlResetLastError();
13448 if (mem_base != xmlMemBlocks()) {
13449 printf("Leak of %d blocks found in xmlGetFeature",
13450 xmlMemBlocks() - mem_base);
13452 printf(" %d", n_ctxt);
13453 printf(" %d", n_name);
13454 printf(" %d", n_result);
13468 #define gen_nb_const_char_ptr_ptr 1
13469 static char ** gen_const_char_ptr_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
13472 static void des_const_char_ptr_ptr(int no ATTRIBUTE_UNUSED, const char ** val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
13476 test_xmlGetFeaturesList(void) {
13479 #if defined(LIBXML_LEGACY_ENABLED)
13480 #ifdef LIBXML_LEGACY_ENABLED
13483 int * len; /* the length of the features name array (input/output) */
13485 char ** result; /* an array of string to be filled with the features name. */
13488 for (n_len = 0;n_len < gen_nb_int_ptr;n_len++) {
13489 for (n_result = 0;n_result < gen_nb_const_char_ptr_ptr;n_result++) {
13490 mem_base = xmlMemBlocks();
13491 len = gen_int_ptr(n_len, 0);
13492 result = gen_const_char_ptr_ptr(n_result, 1);
13494 ret_val = xmlGetFeaturesList(len, (const char **)result);
13495 desret_int(ret_val);
13497 des_int_ptr(n_len, len, 0);
13498 des_const_char_ptr_ptr(n_result, (const char **)result, 1);
13499 xmlResetLastError();
13500 if (mem_base != xmlMemBlocks()) {
13501 printf("Leak of %d blocks found in xmlGetFeaturesList",
13502 xmlMemBlocks() - mem_base);
13504 printf(" %d", n_len);
13505 printf(" %d", n_result);
13519 test_xmlHasFeature(void) {
13524 xmlFeature feature; /* the feature to be examined */
13527 for (n_feature = 0;n_feature < gen_nb_xmlFeature;n_feature++) {
13528 mem_base = xmlMemBlocks();
13529 feature = gen_xmlFeature(n_feature, 0);
13531 ret_val = xmlHasFeature(feature);
13532 desret_int(ret_val);
13534 des_xmlFeature(n_feature, feature, 0);
13535 xmlResetLastError();
13536 if (mem_base != xmlMemBlocks()) {
13537 printf("Leak of %d blocks found in xmlHasFeature",
13538 xmlMemBlocks() - mem_base);
13540 printf(" %d", n_feature);
13551 test_xmlIOParseDTD(void) {
13554 #if defined(LIBXML_VALID_ENABLED)
13555 #ifdef LIBXML_VALID_ENABLED
13557 xmlSAXHandlerPtr sax; /* the SAX handler block or NULL */
13559 xmlParserInputBufferPtr input; /* an Input Buffer */
13561 xmlCharEncoding enc; /* the charset encoding if known */
13564 for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
13565 for (n_input = 0;n_input < gen_nb_xmlParserInputBufferPtr;n_input++) {
13566 for (n_enc = 0;n_enc < gen_nb_xmlCharEncoding;n_enc++) {
13567 sax = gen_xmlSAXHandlerPtr(n_sax, 0);
13568 input = gen_xmlParserInputBufferPtr(n_input, 1);
13569 enc = gen_xmlCharEncoding(n_enc, 2);
13571 ret_val = xmlIOParseDTD(sax, input, enc);
13573 desret_xmlDtdPtr(ret_val);
13575 des_xmlSAXHandlerPtr(n_sax, sax, 0);
13576 des_xmlParserInputBufferPtr(n_input, input, 1);
13577 des_xmlCharEncoding(n_enc, enc, 2);
13578 xmlResetLastError();
13591 test_xmlInitNodeInfoSeq(void) {
13595 xmlParserNodeInfoSeqPtr seq; /* a node info sequence pointer */
13598 for (n_seq = 0;n_seq < gen_nb_xmlParserNodeInfoSeqPtr;n_seq++) {
13599 mem_base = xmlMemBlocks();
13600 seq = gen_xmlParserNodeInfoSeqPtr(n_seq, 0);
13602 xmlInitNodeInfoSeq(seq);
13604 des_xmlParserNodeInfoSeqPtr(n_seq, seq, 0);
13605 xmlResetLastError();
13606 if (mem_base != xmlMemBlocks()) {
13607 printf("Leak of %d blocks found in xmlInitNodeInfoSeq",
13608 xmlMemBlocks() - mem_base);
13610 printf(" %d", n_seq);
13621 test_xmlInitParser(void) {
13626 mem_base = xmlMemBlocks();
13630 xmlResetLastError();
13631 if (mem_base != xmlMemBlocks()) {
13632 printf("Leak of %d blocks found in xmlInitParser",
13633 xmlMemBlocks() - mem_base);
13644 test_xmlInitParserCtxt(void) {
13649 xmlParserCtxtPtr ctxt; /* an XML parser context */
13652 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
13653 mem_base = xmlMemBlocks();
13654 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
13656 ret_val = xmlInitParserCtxt(ctxt);
13657 desret_int(ret_val);
13659 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
13660 xmlResetLastError();
13661 if (mem_base != xmlMemBlocks()) {
13662 printf("Leak of %d blocks found in xmlInitParserCtxt",
13663 xmlMemBlocks() - mem_base);
13665 printf(" %d", n_ctxt);
13676 test_xmlKeepBlanksDefault(void) {
13681 int val; /* int 0 or 1 */
13684 for (n_val = 0;n_val < gen_nb_int;n_val++) {
13685 mem_base = xmlMemBlocks();
13686 val = gen_int(n_val, 0);
13688 ret_val = xmlKeepBlanksDefault(val);
13689 desret_int(ret_val);
13691 des_int(n_val, val, 0);
13692 xmlResetLastError();
13693 if (mem_base != xmlMemBlocks()) {
13694 printf("Leak of %d blocks found in xmlKeepBlanksDefault",
13695 xmlMemBlocks() - mem_base);
13697 printf(" %d", n_val);
13708 test_xmlLineNumbersDefault(void) {
13713 int val; /* int 0 or 1 */
13716 for (n_val = 0;n_val < gen_nb_int;n_val++) {
13717 mem_base = xmlMemBlocks();
13718 val = gen_int(n_val, 0);
13720 ret_val = xmlLineNumbersDefault(val);
13721 desret_int(ret_val);
13723 des_int(n_val, val, 0);
13724 xmlResetLastError();
13725 if (mem_base != xmlMemBlocks()) {
13726 printf("Leak of %d blocks found in xmlLineNumbersDefault",
13727 xmlMemBlocks() - mem_base);
13729 printf(" %d", n_val);
13740 test_xmlLoadExternalEntity(void) {
13744 xmlParserInputPtr ret_val;
13745 const char * URL; /* the URL for the entity to load */
13747 char * ID; /* the Public ID for the entity to load */
13749 xmlParserCtxtPtr ctxt; /* the context in which the entity is called or NULL */
13752 for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
13753 for (n_ID = 0;n_ID < gen_nb_const_char_ptr;n_ID++) {
13754 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
13755 mem_base = xmlMemBlocks();
13756 URL = gen_filepath(n_URL, 0);
13757 ID = gen_const_char_ptr(n_ID, 1);
13758 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 2);
13760 ret_val = xmlLoadExternalEntity(URL, (const char *)ID, ctxt);
13761 desret_xmlParserInputPtr(ret_val);
13763 des_filepath(n_URL, URL, 0);
13764 des_const_char_ptr(n_ID, (const char *)ID, 1);
13765 des_xmlParserCtxtPtr(n_ctxt, ctxt, 2);
13766 xmlResetLastError();
13767 if (mem_base != xmlMemBlocks()) {
13768 printf("Leak of %d blocks found in xmlLoadExternalEntity",
13769 xmlMemBlocks() - mem_base);
13771 printf(" %d", n_URL);
13772 printf(" %d", n_ID);
13773 printf(" %d", n_ctxt);
13786 test_xmlNewIOInputStream(void) {
13790 xmlParserInputPtr ret_val;
13791 xmlParserCtxtPtr ctxt; /* an XML parser context */
13793 xmlParserInputBufferPtr input; /* an I/O Input */
13795 xmlCharEncoding enc; /* the charset encoding if known */
13798 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
13799 for (n_input = 0;n_input < gen_nb_xmlParserInputBufferPtr;n_input++) {
13800 for (n_enc = 0;n_enc < gen_nb_xmlCharEncoding;n_enc++) {
13801 mem_base = xmlMemBlocks();
13802 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
13803 input = gen_xmlParserInputBufferPtr(n_input, 1);
13804 enc = gen_xmlCharEncoding(n_enc, 2);
13806 ret_val = xmlNewIOInputStream(ctxt, input, enc);
13807 if (ret_val != NULL) input = NULL;
13808 desret_xmlParserInputPtr(ret_val);
13810 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
13811 des_xmlParserInputBufferPtr(n_input, input, 1);
13812 des_xmlCharEncoding(n_enc, enc, 2);
13813 xmlResetLastError();
13814 if (mem_base != xmlMemBlocks()) {
13815 printf("Leak of %d blocks found in xmlNewIOInputStream",
13816 xmlMemBlocks() - mem_base);
13818 printf(" %d", n_ctxt);
13819 printf(" %d", n_input);
13820 printf(" %d", n_enc);
13833 test_xmlNewParserCtxt(void) {
13837 xmlParserCtxtPtr ret_val;
13839 mem_base = xmlMemBlocks();
13841 ret_val = xmlNewParserCtxt();
13842 desret_xmlParserCtxtPtr(ret_val);
13844 xmlResetLastError();
13845 if (mem_base != xmlMemBlocks()) {
13846 printf("Leak of %d blocks found in xmlNewParserCtxt",
13847 xmlMemBlocks() - mem_base);
13857 #define gen_nb_xmlNodePtr_ptr 1
13858 static xmlNodePtr * gen_xmlNodePtr_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
13861 static void des_xmlNodePtr_ptr(int no ATTRIBUTE_UNUSED, xmlNodePtr * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
13865 test_xmlParseBalancedChunkMemory(void) {
13868 #if defined(LIBXML_SAX1_ENABLED)
13869 #ifdef LIBXML_SAX1_ENABLED
13872 xmlDocPtr doc; /* the document the chunk pertains to */
13874 xmlSAXHandlerPtr sax; /* the SAX handler bloc (possibly NULL) */
13876 void * user_data; /* The user data returned on SAX callbacks (possibly NULL) */
13878 int depth; /* Used for loop detection, use 0 */
13880 xmlChar * string; /* the input string in UTF8 or ISO-Latin (zero terminated) */
13882 xmlNodePtr * lst; /* the return value for the set of parsed nodes */
13885 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
13886 for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
13887 for (n_user_data = 0;n_user_data < gen_nb_userdata;n_user_data++) {
13888 for (n_depth = 0;n_depth < gen_nb_int;n_depth++) {
13889 for (n_string = 0;n_string < gen_nb_const_xmlChar_ptr;n_string++) {
13890 for (n_lst = 0;n_lst < gen_nb_xmlNodePtr_ptr;n_lst++) {
13891 mem_base = xmlMemBlocks();
13892 doc = gen_xmlDocPtr(n_doc, 0);
13893 sax = gen_xmlSAXHandlerPtr(n_sax, 1);
13894 user_data = gen_userdata(n_user_data, 2);
13895 depth = gen_int(n_depth, 3);
13896 string = gen_const_xmlChar_ptr(n_string, 4);
13897 lst = gen_xmlNodePtr_ptr(n_lst, 5);
13899 #ifdef LIBXML_SAX1_ENABLED
13900 if (sax == (xmlSAXHandlerPtr)&xmlDefaultSAXHandler) user_data = NULL;
13904 ret_val = xmlParseBalancedChunkMemory(doc, sax, user_data, depth, (const xmlChar *)string, lst);
13905 desret_int(ret_val);
13907 des_xmlDocPtr(n_doc, doc, 0);
13908 des_xmlSAXHandlerPtr(n_sax, sax, 1);
13909 des_userdata(n_user_data, user_data, 2);
13910 des_int(n_depth, depth, 3);
13911 des_const_xmlChar_ptr(n_string, (const xmlChar *)string, 4);
13912 des_xmlNodePtr_ptr(n_lst, lst, 5);
13913 xmlResetLastError();
13914 if (mem_base != xmlMemBlocks()) {
13915 printf("Leak of %d blocks found in xmlParseBalancedChunkMemory",
13916 xmlMemBlocks() - mem_base);
13918 printf(" %d", n_doc);
13919 printf(" %d", n_sax);
13920 printf(" %d", n_user_data);
13921 printf(" %d", n_depth);
13922 printf(" %d", n_string);
13923 printf(" %d", n_lst);
13941 test_xmlParseBalancedChunkMemoryRecover(void) {
13944 #if defined(LIBXML_SAX1_ENABLED)
13945 #ifdef LIBXML_SAX1_ENABLED
13948 xmlDocPtr doc; /* the document the chunk pertains to */
13950 xmlSAXHandlerPtr sax; /* the SAX handler bloc (possibly NULL) */
13952 void * user_data; /* The user data returned on SAX callbacks (possibly NULL) */
13954 int depth; /* Used for loop detection, use 0 */
13956 xmlChar * string; /* the input string in UTF8 or ISO-Latin (zero terminated) */
13958 xmlNodePtr * lst; /* the return value for the set of parsed nodes */
13960 int recover; /* return nodes even if the data is broken (use 0) */
13963 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
13964 for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
13965 for (n_user_data = 0;n_user_data < gen_nb_userdata;n_user_data++) {
13966 for (n_depth = 0;n_depth < gen_nb_int;n_depth++) {
13967 for (n_string = 0;n_string < gen_nb_const_xmlChar_ptr;n_string++) {
13968 for (n_lst = 0;n_lst < gen_nb_xmlNodePtr_ptr;n_lst++) {
13969 for (n_recover = 0;n_recover < gen_nb_int;n_recover++) {
13970 mem_base = xmlMemBlocks();
13971 doc = gen_xmlDocPtr(n_doc, 0);
13972 sax = gen_xmlSAXHandlerPtr(n_sax, 1);
13973 user_data = gen_userdata(n_user_data, 2);
13974 depth = gen_int(n_depth, 3);
13975 string = gen_const_xmlChar_ptr(n_string, 4);
13976 lst = gen_xmlNodePtr_ptr(n_lst, 5);
13977 recover = gen_int(n_recover, 6);
13979 #ifdef LIBXML_SAX1_ENABLED
13980 if (sax == (xmlSAXHandlerPtr)&xmlDefaultSAXHandler) user_data = NULL;
13984 ret_val = xmlParseBalancedChunkMemoryRecover(doc, sax, user_data, depth, (const xmlChar *)string, lst, recover);
13985 desret_int(ret_val);
13987 des_xmlDocPtr(n_doc, doc, 0);
13988 des_xmlSAXHandlerPtr(n_sax, sax, 1);
13989 des_userdata(n_user_data, user_data, 2);
13990 des_int(n_depth, depth, 3);
13991 des_const_xmlChar_ptr(n_string, (const xmlChar *)string, 4);
13992 des_xmlNodePtr_ptr(n_lst, lst, 5);
13993 des_int(n_recover, recover, 6);
13994 xmlResetLastError();
13995 if (mem_base != xmlMemBlocks()) {
13996 printf("Leak of %d blocks found in xmlParseBalancedChunkMemoryRecover",
13997 xmlMemBlocks() - mem_base);
13999 printf(" %d", n_doc);
14000 printf(" %d", n_sax);
14001 printf(" %d", n_user_data);
14002 printf(" %d", n_depth);
14003 printf(" %d", n_string);
14004 printf(" %d", n_lst);
14005 printf(" %d", n_recover);
14024 test_xmlParseChunk(void) {
14027 #if defined(LIBXML_PUSH_ENABLED)
14030 xmlParserCtxtPtr ctxt; /* an XML parser context */
14032 char * chunk; /* an char array */
14034 int size; /* the size in byte of the chunk */
14036 int terminate; /* last chunk indicator */
14039 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
14040 for (n_chunk = 0;n_chunk < gen_nb_const_char_ptr;n_chunk++) {
14041 for (n_size = 0;n_size < gen_nb_int;n_size++) {
14042 for (n_terminate = 0;n_terminate < gen_nb_int;n_terminate++) {
14043 mem_base = xmlMemBlocks();
14044 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
14045 chunk = gen_const_char_ptr(n_chunk, 1);
14046 size = gen_int(n_size, 2);
14047 terminate = gen_int(n_terminate, 3);
14048 if ((chunk != NULL) &&
14049 (size > (int) strlen((const char *) chunk) + 1))
14052 ret_val = xmlParseChunk(ctxt, (const char *)chunk, size, terminate);
14053 if (ctxt != NULL) {xmlFreeDoc(ctxt->myDoc); ctxt->myDoc = NULL;}
14054 desret_int(ret_val);
14056 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
14057 des_const_char_ptr(n_chunk, (const char *)chunk, 1);
14058 des_int(n_size, size, 2);
14059 des_int(n_terminate, terminate, 3);
14060 xmlResetLastError();
14061 if (mem_base != xmlMemBlocks()) {
14062 printf("Leak of %d blocks found in xmlParseChunk",
14063 xmlMemBlocks() - mem_base);
14065 printf(" %d", n_ctxt);
14066 printf(" %d", n_chunk);
14067 printf(" %d", n_size);
14068 printf(" %d", n_terminate);
14083 test_xmlParseCtxtExternalEntity(void) {
14088 xmlParserCtxtPtr ctx; /* the existing parsing context */
14090 xmlChar * URL; /* the URL for the entity to load */
14092 xmlChar * ID; /* the System ID for the entity to load */
14094 xmlNodePtr * lst; /* the return value for the set of parsed nodes */
14097 for (n_ctx = 0;n_ctx < gen_nb_xmlParserCtxtPtr;n_ctx++) {
14098 for (n_URL = 0;n_URL < gen_nb_const_xmlChar_ptr;n_URL++) {
14099 for (n_ID = 0;n_ID < gen_nb_const_xmlChar_ptr;n_ID++) {
14100 for (n_lst = 0;n_lst < gen_nb_xmlNodePtr_ptr;n_lst++) {
14101 mem_base = xmlMemBlocks();
14102 ctx = gen_xmlParserCtxtPtr(n_ctx, 0);
14103 URL = gen_const_xmlChar_ptr(n_URL, 1);
14104 ID = gen_const_xmlChar_ptr(n_ID, 2);
14105 lst = gen_xmlNodePtr_ptr(n_lst, 3);
14107 ret_val = xmlParseCtxtExternalEntity(ctx, (const xmlChar *)URL, (const xmlChar *)ID, lst);
14108 desret_int(ret_val);
14110 des_xmlParserCtxtPtr(n_ctx, ctx, 0);
14111 des_const_xmlChar_ptr(n_URL, (const xmlChar *)URL, 1);
14112 des_const_xmlChar_ptr(n_ID, (const xmlChar *)ID, 2);
14113 des_xmlNodePtr_ptr(n_lst, lst, 3);
14114 xmlResetLastError();
14115 if (mem_base != xmlMemBlocks()) {
14116 printf("Leak of %d blocks found in xmlParseCtxtExternalEntity",
14117 xmlMemBlocks() - mem_base);
14119 printf(" %d", n_ctx);
14120 printf(" %d", n_URL);
14121 printf(" %d", n_ID);
14122 printf(" %d", n_lst);
14136 test_xmlParseDTD(void) {
14139 #if defined(LIBXML_VALID_ENABLED)
14140 #ifdef LIBXML_VALID_ENABLED
14143 xmlChar * ExternalID; /* a NAME* containing the External ID of the DTD */
14145 xmlChar * SystemID; /* a NAME* containing the URL to the DTD */
14148 for (n_ExternalID = 0;n_ExternalID < gen_nb_const_xmlChar_ptr;n_ExternalID++) {
14149 for (n_SystemID = 0;n_SystemID < gen_nb_const_xmlChar_ptr;n_SystemID++) {
14150 mem_base = xmlMemBlocks();
14151 ExternalID = gen_const_xmlChar_ptr(n_ExternalID, 0);
14152 SystemID = gen_const_xmlChar_ptr(n_SystemID, 1);
14154 ret_val = xmlParseDTD((const xmlChar *)ExternalID, (const xmlChar *)SystemID);
14155 desret_xmlDtdPtr(ret_val);
14157 des_const_xmlChar_ptr(n_ExternalID, (const xmlChar *)ExternalID, 0);
14158 des_const_xmlChar_ptr(n_SystemID, (const xmlChar *)SystemID, 1);
14159 xmlResetLastError();
14160 if (mem_base != xmlMemBlocks()) {
14161 printf("Leak of %d blocks found in xmlParseDTD",
14162 xmlMemBlocks() - mem_base);
14164 printf(" %d", n_ExternalID);
14165 printf(" %d", n_SystemID);
14179 test_xmlParseDoc(void) {
14182 #if defined(LIBXML_SAX1_ENABLED)
14183 #ifdef LIBXML_SAX1_ENABLED
14186 xmlChar * cur; /* a pointer to an array of xmlChar */
14189 for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
14190 mem_base = xmlMemBlocks();
14191 cur = gen_const_xmlChar_ptr(n_cur, 0);
14193 ret_val = xmlParseDoc((const xmlChar *)cur);
14194 desret_xmlDocPtr(ret_val);
14196 des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 0);
14197 xmlResetLastError();
14198 if (mem_base != xmlMemBlocks()) {
14199 printf("Leak of %d blocks found in xmlParseDoc",
14200 xmlMemBlocks() - mem_base);
14202 printf(" %d", n_cur);
14215 test_xmlParseDocument(void) {
14220 xmlParserCtxtPtr ctxt; /* an XML parser context */
14223 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
14224 mem_base = xmlMemBlocks();
14225 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
14227 ret_val = xmlParseDocument(ctxt);
14228 if (ctxt != NULL) {xmlFreeDoc(ctxt->myDoc); ctxt->myDoc = NULL;}
14229 desret_int(ret_val);
14231 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
14232 xmlResetLastError();
14233 if (mem_base != xmlMemBlocks()) {
14234 printf("Leak of %d blocks found in xmlParseDocument",
14235 xmlMemBlocks() - mem_base);
14237 printf(" %d", n_ctxt);
14248 test_xmlParseEntity(void) {
14251 #if defined(LIBXML_SAX1_ENABLED)
14252 #ifdef LIBXML_SAX1_ENABLED
14255 const char * filename; /* the filename */
14258 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
14259 mem_base = xmlMemBlocks();
14260 filename = gen_filepath(n_filename, 0);
14262 ret_val = xmlParseEntity(filename);
14263 desret_xmlDocPtr(ret_val);
14265 des_filepath(n_filename, filename, 0);
14266 xmlResetLastError();
14267 if (mem_base != xmlMemBlocks()) {
14268 printf("Leak of %d blocks found in xmlParseEntity",
14269 xmlMemBlocks() - mem_base);
14271 printf(" %d", n_filename);
14284 test_xmlParseExtParsedEnt(void) {
14289 xmlParserCtxtPtr ctxt; /* an XML parser context */
14292 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
14293 mem_base = xmlMemBlocks();
14294 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
14296 ret_val = xmlParseExtParsedEnt(ctxt);
14297 if (ctxt != NULL) {xmlFreeDoc(ctxt->myDoc); ctxt->myDoc = NULL;}
14298 desret_int(ret_val);
14300 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
14301 xmlResetLastError();
14302 if (mem_base != xmlMemBlocks()) {
14303 printf("Leak of %d blocks found in xmlParseExtParsedEnt",
14304 xmlMemBlocks() - mem_base);
14306 printf(" %d", n_ctxt);
14317 test_xmlParseExternalEntity(void) {
14320 #if defined(LIBXML_SAX1_ENABLED)
14321 #ifdef LIBXML_SAX1_ENABLED
14324 xmlDocPtr doc; /* the document the chunk pertains to */
14326 xmlSAXHandlerPtr sax; /* the SAX handler bloc (possibly NULL) */
14328 void * user_data; /* The user data returned on SAX callbacks (possibly NULL) */
14330 int depth; /* Used for loop detection, use 0 */
14332 xmlChar * URL; /* the URL for the entity to load */
14334 xmlChar * ID; /* the System ID for the entity to load */
14336 xmlNodePtr * lst; /* the return value for the set of parsed nodes */
14339 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
14340 for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
14341 for (n_user_data = 0;n_user_data < gen_nb_userdata;n_user_data++) {
14342 for (n_depth = 0;n_depth < gen_nb_int;n_depth++) {
14343 for (n_URL = 0;n_URL < gen_nb_const_xmlChar_ptr;n_URL++) {
14344 for (n_ID = 0;n_ID < gen_nb_const_xmlChar_ptr;n_ID++) {
14345 for (n_lst = 0;n_lst < gen_nb_xmlNodePtr_ptr;n_lst++) {
14346 mem_base = xmlMemBlocks();
14347 doc = gen_xmlDocPtr(n_doc, 0);
14348 sax = gen_xmlSAXHandlerPtr(n_sax, 1);
14349 user_data = gen_userdata(n_user_data, 2);
14350 depth = gen_int(n_depth, 3);
14351 URL = gen_const_xmlChar_ptr(n_URL, 4);
14352 ID = gen_const_xmlChar_ptr(n_ID, 5);
14353 lst = gen_xmlNodePtr_ptr(n_lst, 6);
14355 ret_val = xmlParseExternalEntity(doc, sax, user_data, depth, (const xmlChar *)URL, (const xmlChar *)ID, lst);
14356 desret_int(ret_val);
14358 des_xmlDocPtr(n_doc, doc, 0);
14359 des_xmlSAXHandlerPtr(n_sax, sax, 1);
14360 des_userdata(n_user_data, user_data, 2);
14361 des_int(n_depth, depth, 3);
14362 des_const_xmlChar_ptr(n_URL, (const xmlChar *)URL, 4);
14363 des_const_xmlChar_ptr(n_ID, (const xmlChar *)ID, 5);
14364 des_xmlNodePtr_ptr(n_lst, lst, 6);
14365 xmlResetLastError();
14366 if (mem_base != xmlMemBlocks()) {
14367 printf("Leak of %d blocks found in xmlParseExternalEntity",
14368 xmlMemBlocks() - mem_base);
14370 printf(" %d", n_doc);
14371 printf(" %d", n_sax);
14372 printf(" %d", n_user_data);
14373 printf(" %d", n_depth);
14374 printf(" %d", n_URL);
14375 printf(" %d", n_ID);
14376 printf(" %d", n_lst);
14395 test_xmlParseFile(void) {
14398 #if defined(LIBXML_SAX1_ENABLED)
14399 #ifdef LIBXML_SAX1_ENABLED
14402 const char * filename; /* the filename */
14405 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
14406 mem_base = xmlMemBlocks();
14407 filename = gen_filepath(n_filename, 0);
14409 ret_val = xmlParseFile(filename);
14410 desret_xmlDocPtr(ret_val);
14412 des_filepath(n_filename, filename, 0);
14413 xmlResetLastError();
14414 if (mem_base != xmlMemBlocks()) {
14415 printf("Leak of %d blocks found in xmlParseFile",
14416 xmlMemBlocks() - mem_base);
14418 printf(" %d", n_filename);
14431 test_xmlParseInNodeContext(void) {
14435 xmlParserErrors ret_val;
14436 xmlNodePtr node; /* the context node */
14438 char * data; /* the input string */
14440 int datalen; /* the input string length in bytes */
14442 int options; /* a combination of xmlParserOption */
14444 xmlNodePtr * lst; /* the return value for the set of parsed nodes */
14447 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
14448 for (n_data = 0;n_data < gen_nb_const_char_ptr;n_data++) {
14449 for (n_datalen = 0;n_datalen < gen_nb_int;n_datalen++) {
14450 for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
14451 for (n_lst = 0;n_lst < gen_nb_xmlNodePtr_ptr;n_lst++) {
14452 mem_base = xmlMemBlocks();
14453 node = gen_xmlNodePtr(n_node, 0);
14454 data = gen_const_char_ptr(n_data, 1);
14455 datalen = gen_int(n_datalen, 2);
14456 options = gen_parseroptions(n_options, 3);
14457 lst = gen_xmlNodePtr_ptr(n_lst, 4);
14459 ret_val = xmlParseInNodeContext(node, (const char *)data, datalen, options, lst);
14460 desret_xmlParserErrors(ret_val);
14462 des_xmlNodePtr(n_node, node, 0);
14463 des_const_char_ptr(n_data, (const char *)data, 1);
14464 des_int(n_datalen, datalen, 2);
14465 des_parseroptions(n_options, options, 3);
14466 des_xmlNodePtr_ptr(n_lst, lst, 4);
14467 xmlResetLastError();
14468 if (mem_base != xmlMemBlocks()) {
14469 printf("Leak of %d blocks found in xmlParseInNodeContext",
14470 xmlMemBlocks() - mem_base);
14472 printf(" %d", n_node);
14473 printf(" %d", n_data);
14474 printf(" %d", n_datalen);
14475 printf(" %d", n_options);
14476 printf(" %d", n_lst);
14491 test_xmlParseMemory(void) {
14494 #if defined(LIBXML_SAX1_ENABLED)
14495 #ifdef LIBXML_SAX1_ENABLED
14498 char * buffer; /* an pointer to a char array */
14500 int size; /* the size of the array */
14503 for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
14504 for (n_size = 0;n_size < gen_nb_int;n_size++) {
14505 mem_base = xmlMemBlocks();
14506 buffer = gen_const_char_ptr(n_buffer, 0);
14507 size = gen_int(n_size, 1);
14508 if ((buffer != NULL) &&
14509 (size > (int) strlen((const char *) buffer) + 1))
14512 ret_val = xmlParseMemory((const char *)buffer, size);
14513 desret_xmlDocPtr(ret_val);
14515 des_const_char_ptr(n_buffer, (const char *)buffer, 0);
14516 des_int(n_size, size, 1);
14517 xmlResetLastError();
14518 if (mem_base != xmlMemBlocks()) {
14519 printf("Leak of %d blocks found in xmlParseMemory",
14520 xmlMemBlocks() - mem_base);
14522 printf(" %d", n_buffer);
14523 printf(" %d", n_size);
14536 #define gen_nb_const_xmlParserNodeInfoPtr 1
14537 static xmlParserNodeInfoPtr gen_const_xmlParserNodeInfoPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
14540 static void des_const_xmlParserNodeInfoPtr(int no ATTRIBUTE_UNUSED, const xmlParserNodeInfoPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
14544 test_xmlParserAddNodeInfo(void) {
14548 xmlParserCtxtPtr ctxt; /* an XML parser context */
14550 xmlParserNodeInfoPtr info; /* a node info sequence pointer */
14553 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
14554 for (n_info = 0;n_info < gen_nb_const_xmlParserNodeInfoPtr;n_info++) {
14555 mem_base = xmlMemBlocks();
14556 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
14557 info = gen_const_xmlParserNodeInfoPtr(n_info, 1);
14559 xmlParserAddNodeInfo(ctxt, (const xmlParserNodeInfoPtr)info);
14561 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
14562 des_const_xmlParserNodeInfoPtr(n_info, (const xmlParserNodeInfoPtr)info, 1);
14563 xmlResetLastError();
14564 if (mem_base != xmlMemBlocks()) {
14565 printf("Leak of %d blocks found in xmlParserAddNodeInfo",
14566 xmlMemBlocks() - mem_base);
14568 printf(" %d", n_ctxt);
14569 printf(" %d", n_info);
14580 #define gen_nb_const_xmlParserCtxtPtr 1
14581 static xmlParserCtxtPtr gen_const_xmlParserCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
14584 static void des_const_xmlParserCtxtPtr(int no ATTRIBUTE_UNUSED, const xmlParserCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
14587 #define gen_nb_const_xmlNodePtr 1
14588 static xmlNodePtr gen_const_xmlNodePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
14591 static void des_const_xmlNodePtr(int no ATTRIBUTE_UNUSED, const xmlNodePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
14595 test_xmlParserFindNodeInfo(void) {
14599 const xmlParserNodeInfo * ret_val;
14600 xmlParserCtxtPtr ctx; /* an XML parser context */
14602 xmlNodePtr node; /* an XML node within the tree */
14605 for (n_ctx = 0;n_ctx < gen_nb_const_xmlParserCtxtPtr;n_ctx++) {
14606 for (n_node = 0;n_node < gen_nb_const_xmlNodePtr;n_node++) {
14607 mem_base = xmlMemBlocks();
14608 ctx = gen_const_xmlParserCtxtPtr(n_ctx, 0);
14609 node = gen_const_xmlNodePtr(n_node, 1);
14611 ret_val = xmlParserFindNodeInfo((const xmlParserCtxtPtr)ctx, (const xmlNodePtr)node);
14612 desret_const_xmlParserNodeInfo_ptr(ret_val);
14614 des_const_xmlParserCtxtPtr(n_ctx, (const xmlParserCtxtPtr)ctx, 0);
14615 des_const_xmlNodePtr(n_node, (const xmlNodePtr)node, 1);
14616 xmlResetLastError();
14617 if (mem_base != xmlMemBlocks()) {
14618 printf("Leak of %d blocks found in xmlParserFindNodeInfo",
14619 xmlMemBlocks() - mem_base);
14621 printf(" %d", n_ctx);
14622 printf(" %d", n_node);
14633 #define gen_nb_const_xmlParserNodeInfoSeqPtr 1
14634 static xmlParserNodeInfoSeqPtr gen_const_xmlParserNodeInfoSeqPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
14637 static void des_const_xmlParserNodeInfoSeqPtr(int no ATTRIBUTE_UNUSED, const xmlParserNodeInfoSeqPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
14641 test_xmlParserFindNodeInfoIndex(void) {
14645 unsigned long ret_val;
14646 xmlParserNodeInfoSeqPtr seq; /* a node info sequence pointer */
14648 xmlNodePtr node; /* an XML node pointer */
14651 for (n_seq = 0;n_seq < gen_nb_const_xmlParserNodeInfoSeqPtr;n_seq++) {
14652 for (n_node = 0;n_node < gen_nb_const_xmlNodePtr;n_node++) {
14653 mem_base = xmlMemBlocks();
14654 seq = gen_const_xmlParserNodeInfoSeqPtr(n_seq, 0);
14655 node = gen_const_xmlNodePtr(n_node, 1);
14657 ret_val = xmlParserFindNodeInfoIndex((const xmlParserNodeInfoSeqPtr)seq, (const xmlNodePtr)node);
14658 desret_unsigned_long(ret_val);
14660 des_const_xmlParserNodeInfoSeqPtr(n_seq, (const xmlParserNodeInfoSeqPtr)seq, 0);
14661 des_const_xmlNodePtr(n_node, (const xmlNodePtr)node, 1);
14662 xmlResetLastError();
14663 if (mem_base != xmlMemBlocks()) {
14664 printf("Leak of %d blocks found in xmlParserFindNodeInfoIndex",
14665 xmlMemBlocks() - mem_base);
14667 printf(" %d", n_seq);
14668 printf(" %d", n_node);
14679 #define gen_nb_xmlParserInputPtr 1
14680 static xmlParserInputPtr gen_xmlParserInputPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
14683 static void des_xmlParserInputPtr(int no ATTRIBUTE_UNUSED, xmlParserInputPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
14687 test_xmlParserInputGrow(void) {
14692 xmlParserInputPtr in; /* an XML parser input */
14694 int len; /* an indicative size for the lookahead */
14697 for (n_in = 0;n_in < gen_nb_xmlParserInputPtr;n_in++) {
14698 for (n_len = 0;n_len < gen_nb_int;n_len++) {
14699 mem_base = xmlMemBlocks();
14700 in = gen_xmlParserInputPtr(n_in, 0);
14701 len = gen_int(n_len, 1);
14703 ret_val = xmlParserInputGrow(in, len);
14704 desret_int(ret_val);
14706 des_xmlParserInputPtr(n_in, in, 0);
14707 des_int(n_len, len, 1);
14708 xmlResetLastError();
14709 if (mem_base != xmlMemBlocks()) {
14710 printf("Leak of %d blocks found in xmlParserInputGrow",
14711 xmlMemBlocks() - mem_base);
14713 printf(" %d", n_in);
14714 printf(" %d", n_len);
14726 test_xmlParserInputRead(void) {
14731 xmlParserInputPtr in; /* an XML parser input */
14733 int len; /* an indicative size for the lookahead */
14736 for (n_in = 0;n_in < gen_nb_xmlParserInputPtr;n_in++) {
14737 for (n_len = 0;n_len < gen_nb_int;n_len++) {
14738 mem_base = xmlMemBlocks();
14739 in = gen_xmlParserInputPtr(n_in, 0);
14740 len = gen_int(n_len, 1);
14742 ret_val = xmlParserInputRead(in, len);
14743 desret_int(ret_val);
14745 des_xmlParserInputPtr(n_in, in, 0);
14746 des_int(n_len, len, 1);
14747 xmlResetLastError();
14748 if (mem_base != xmlMemBlocks()) {
14749 printf("Leak of %d blocks found in xmlParserInputRead",
14750 xmlMemBlocks() - mem_base);
14752 printf(" %d", n_in);
14753 printf(" %d", n_len);
14765 test_xmlPedanticParserDefault(void) {
14770 int val; /* int 0 or 1 */
14773 for (n_val = 0;n_val < gen_nb_int;n_val++) {
14774 mem_base = xmlMemBlocks();
14775 val = gen_int(n_val, 0);
14777 ret_val = xmlPedanticParserDefault(val);
14778 desret_int(ret_val);
14780 des_int(n_val, val, 0);
14781 xmlResetLastError();
14782 if (mem_base != xmlMemBlocks()) {
14783 printf("Leak of %d blocks found in xmlPedanticParserDefault",
14784 xmlMemBlocks() - mem_base);
14786 printf(" %d", n_val);
14797 test_xmlReadDoc(void) {
14802 xmlChar * cur; /* a pointer to a zero terminated string */
14804 const char * URL; /* the base URL to use for the document */
14806 char * encoding; /* the document encoding, or NULL */
14808 int options; /* a combination of xmlParserOption */
14811 for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
14812 for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
14813 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
14814 for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
14815 mem_base = xmlMemBlocks();
14816 cur = gen_const_xmlChar_ptr(n_cur, 0);
14817 URL = gen_filepath(n_URL, 1);
14818 encoding = gen_const_char_ptr(n_encoding, 2);
14819 options = gen_parseroptions(n_options, 3);
14821 ret_val = xmlReadDoc((const xmlChar *)cur, URL, (const char *)encoding, options);
14822 desret_xmlDocPtr(ret_val);
14824 des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 0);
14825 des_filepath(n_URL, URL, 1);
14826 des_const_char_ptr(n_encoding, (const char *)encoding, 2);
14827 des_parseroptions(n_options, options, 3);
14828 xmlResetLastError();
14829 if (mem_base != xmlMemBlocks()) {
14830 printf("Leak of %d blocks found in xmlReadDoc",
14831 xmlMemBlocks() - mem_base);
14833 printf(" %d", n_cur);
14834 printf(" %d", n_URL);
14835 printf(" %d", n_encoding);
14836 printf(" %d", n_options);
14850 test_xmlReadFile(void) {
14855 const char * filename; /* a file or URL */
14857 char * encoding; /* the document encoding, or NULL */
14859 int options; /* a combination of xmlParserOption */
14862 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
14863 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
14864 for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
14865 mem_base = xmlMemBlocks();
14866 filename = gen_filepath(n_filename, 0);
14867 encoding = gen_const_char_ptr(n_encoding, 1);
14868 options = gen_parseroptions(n_options, 2);
14870 ret_val = xmlReadFile(filename, (const char *)encoding, options);
14871 desret_xmlDocPtr(ret_val);
14873 des_filepath(n_filename, filename, 0);
14874 des_const_char_ptr(n_encoding, (const char *)encoding, 1);
14875 des_parseroptions(n_options, options, 2);
14876 xmlResetLastError();
14877 if (mem_base != xmlMemBlocks()) {
14878 printf("Leak of %d blocks found in xmlReadFile",
14879 xmlMemBlocks() - mem_base);
14881 printf(" %d", n_filename);
14882 printf(" %d", n_encoding);
14883 printf(" %d", n_options);
14896 test_xmlReadMemory(void) {
14901 char * buffer; /* a pointer to a char array */
14903 int size; /* the size of the array */
14905 const char * URL; /* the base URL to use for the document */
14907 char * encoding; /* the document encoding, or NULL */
14909 int options; /* a combination of xmlParserOption */
14912 for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
14913 for (n_size = 0;n_size < gen_nb_int;n_size++) {
14914 for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
14915 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
14916 for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
14917 mem_base = xmlMemBlocks();
14918 buffer = gen_const_char_ptr(n_buffer, 0);
14919 size = gen_int(n_size, 1);
14920 URL = gen_filepath(n_URL, 2);
14921 encoding = gen_const_char_ptr(n_encoding, 3);
14922 options = gen_parseroptions(n_options, 4);
14923 if ((buffer != NULL) &&
14924 (size > (int) strlen((const char *) buffer) + 1))
14927 ret_val = xmlReadMemory((const char *)buffer, size, URL, (const char *)encoding, options);
14928 desret_xmlDocPtr(ret_val);
14930 des_const_char_ptr(n_buffer, (const char *)buffer, 0);
14931 des_int(n_size, size, 1);
14932 des_filepath(n_URL, URL, 2);
14933 des_const_char_ptr(n_encoding, (const char *)encoding, 3);
14934 des_parseroptions(n_options, options, 4);
14935 xmlResetLastError();
14936 if (mem_base != xmlMemBlocks()) {
14937 printf("Leak of %d blocks found in xmlReadMemory",
14938 xmlMemBlocks() - mem_base);
14940 printf(" %d", n_buffer);
14941 printf(" %d", n_size);
14942 printf(" %d", n_URL);
14943 printf(" %d", n_encoding);
14944 printf(" %d", n_options);
14959 test_xmlRecoverDoc(void) {
14962 #if defined(LIBXML_SAX1_ENABLED)
14963 #ifdef LIBXML_SAX1_ENABLED
14966 xmlChar * cur; /* a pointer to an array of xmlChar */
14969 for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
14970 mem_base = xmlMemBlocks();
14971 cur = gen_const_xmlChar_ptr(n_cur, 0);
14973 ret_val = xmlRecoverDoc((const xmlChar *)cur);
14974 desret_xmlDocPtr(ret_val);
14976 des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 0);
14977 xmlResetLastError();
14978 if (mem_base != xmlMemBlocks()) {
14979 printf("Leak of %d blocks found in xmlRecoverDoc",
14980 xmlMemBlocks() - mem_base);
14982 printf(" %d", n_cur);
14995 test_xmlRecoverFile(void) {
14998 #if defined(LIBXML_SAX1_ENABLED)
14999 #ifdef LIBXML_SAX1_ENABLED
15002 const char * filename; /* the filename */
15005 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
15006 mem_base = xmlMemBlocks();
15007 filename = gen_filepath(n_filename, 0);
15009 ret_val = xmlRecoverFile(filename);
15010 desret_xmlDocPtr(ret_val);
15012 des_filepath(n_filename, filename, 0);
15013 xmlResetLastError();
15014 if (mem_base != xmlMemBlocks()) {
15015 printf("Leak of %d blocks found in xmlRecoverFile",
15016 xmlMemBlocks() - mem_base);
15018 printf(" %d", n_filename);
15031 test_xmlRecoverMemory(void) {
15034 #if defined(LIBXML_SAX1_ENABLED)
15035 #ifdef LIBXML_SAX1_ENABLED
15038 char * buffer; /* an pointer to a char array */
15040 int size; /* the size of the array */
15043 for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
15044 for (n_size = 0;n_size < gen_nb_int;n_size++) {
15045 mem_base = xmlMemBlocks();
15046 buffer = gen_const_char_ptr(n_buffer, 0);
15047 size = gen_int(n_size, 1);
15048 if ((buffer != NULL) &&
15049 (size > (int) strlen((const char *) buffer) + 1))
15052 ret_val = xmlRecoverMemory((const char *)buffer, size);
15053 desret_xmlDocPtr(ret_val);
15055 des_const_char_ptr(n_buffer, (const char *)buffer, 0);
15056 des_int(n_size, size, 1);
15057 xmlResetLastError();
15058 if (mem_base != xmlMemBlocks()) {
15059 printf("Leak of %d blocks found in xmlRecoverMemory",
15060 xmlMemBlocks() - mem_base);
15062 printf(" %d", n_buffer);
15063 printf(" %d", n_size);
15077 test_xmlSAXParseDTD(void) {
15080 #if defined(LIBXML_VALID_ENABLED)
15081 #ifdef LIBXML_SAX1_ENABLED
15084 xmlSAXHandlerPtr sax; /* the SAX handler block */
15086 xmlChar * ExternalID; /* a NAME* containing the External ID of the DTD */
15088 xmlChar * SystemID; /* a NAME* containing the URL to the DTD */
15091 for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
15092 for (n_ExternalID = 0;n_ExternalID < gen_nb_const_xmlChar_ptr;n_ExternalID++) {
15093 for (n_SystemID = 0;n_SystemID < gen_nb_const_xmlChar_ptr;n_SystemID++) {
15094 mem_base = xmlMemBlocks();
15095 sax = gen_xmlSAXHandlerPtr(n_sax, 0);
15096 ExternalID = gen_const_xmlChar_ptr(n_ExternalID, 1);
15097 SystemID = gen_const_xmlChar_ptr(n_SystemID, 2);
15099 ret_val = xmlSAXParseDTD(sax, (const xmlChar *)ExternalID, (const xmlChar *)SystemID);
15100 desret_xmlDtdPtr(ret_val);
15102 des_xmlSAXHandlerPtr(n_sax, sax, 0);
15103 des_const_xmlChar_ptr(n_ExternalID, (const xmlChar *)ExternalID, 1);
15104 des_const_xmlChar_ptr(n_SystemID, (const xmlChar *)SystemID, 2);
15105 xmlResetLastError();
15106 if (mem_base != xmlMemBlocks()) {
15107 printf("Leak of %d blocks found in xmlSAXParseDTD",
15108 xmlMemBlocks() - mem_base);
15110 printf(" %d", n_sax);
15111 printf(" %d", n_ExternalID);
15112 printf(" %d", n_SystemID);
15127 test_xmlSAXParseDoc(void) {
15130 #if defined(LIBXML_SAX1_ENABLED)
15131 #ifdef LIBXML_SAX1_ENABLED
15134 xmlSAXHandlerPtr sax; /* the SAX handler block */
15136 xmlChar * cur; /* a pointer to an array of xmlChar */
15138 int recovery; /* work in recovery mode, i.e. tries to read no Well Formed documents */
15141 for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
15142 for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
15143 for (n_recovery = 0;n_recovery < gen_nb_int;n_recovery++) {
15144 mem_base = xmlMemBlocks();
15145 sax = gen_xmlSAXHandlerPtr(n_sax, 0);
15146 cur = gen_const_xmlChar_ptr(n_cur, 1);
15147 recovery = gen_int(n_recovery, 2);
15149 ret_val = xmlSAXParseDoc(sax, (const xmlChar *)cur, recovery);
15150 desret_xmlDocPtr(ret_val);
15152 des_xmlSAXHandlerPtr(n_sax, sax, 0);
15153 des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 1);
15154 des_int(n_recovery, recovery, 2);
15155 xmlResetLastError();
15156 if (mem_base != xmlMemBlocks()) {
15157 printf("Leak of %d blocks found in xmlSAXParseDoc",
15158 xmlMemBlocks() - mem_base);
15160 printf(" %d", n_sax);
15161 printf(" %d", n_cur);
15162 printf(" %d", n_recovery);
15177 test_xmlSAXParseEntity(void) {
15180 #if defined(LIBXML_SAX1_ENABLED)
15181 #ifdef LIBXML_SAX1_ENABLED
15184 xmlSAXHandlerPtr sax; /* the SAX handler block */
15186 const char * filename; /* the filename */
15189 for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
15190 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
15191 mem_base = xmlMemBlocks();
15192 sax = gen_xmlSAXHandlerPtr(n_sax, 0);
15193 filename = gen_filepath(n_filename, 1);
15195 ret_val = xmlSAXParseEntity(sax, filename);
15196 desret_xmlDocPtr(ret_val);
15198 des_xmlSAXHandlerPtr(n_sax, sax, 0);
15199 des_filepath(n_filename, filename, 1);
15200 xmlResetLastError();
15201 if (mem_base != xmlMemBlocks()) {
15202 printf("Leak of %d blocks found in xmlSAXParseEntity",
15203 xmlMemBlocks() - mem_base);
15205 printf(" %d", n_sax);
15206 printf(" %d", n_filename);
15220 test_xmlSAXParseFile(void) {
15223 #if defined(LIBXML_SAX1_ENABLED)
15224 #ifdef LIBXML_SAX1_ENABLED
15227 xmlSAXHandlerPtr sax; /* the SAX handler block */
15229 const char * filename; /* the filename */
15231 int recovery; /* work in recovery mode, i.e. tries to read no Well Formed documents */
15234 for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
15235 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
15236 for (n_recovery = 0;n_recovery < gen_nb_int;n_recovery++) {
15237 mem_base = xmlMemBlocks();
15238 sax = gen_xmlSAXHandlerPtr(n_sax, 0);
15239 filename = gen_filepath(n_filename, 1);
15240 recovery = gen_int(n_recovery, 2);
15242 ret_val = xmlSAXParseFile(sax, filename, recovery);
15243 desret_xmlDocPtr(ret_val);
15245 des_xmlSAXHandlerPtr(n_sax, sax, 0);
15246 des_filepath(n_filename, filename, 1);
15247 des_int(n_recovery, recovery, 2);
15248 xmlResetLastError();
15249 if (mem_base != xmlMemBlocks()) {
15250 printf("Leak of %d blocks found in xmlSAXParseFile",
15251 xmlMemBlocks() - mem_base);
15253 printf(" %d", n_sax);
15254 printf(" %d", n_filename);
15255 printf(" %d", n_recovery);
15270 test_xmlSAXParseFileWithData(void) {
15273 #if defined(LIBXML_SAX1_ENABLED)
15274 #ifdef LIBXML_SAX1_ENABLED
15277 xmlSAXHandlerPtr sax; /* the SAX handler block */
15279 const char * filename; /* the filename */
15281 int recovery; /* work in recovery mode, i.e. tries to read no Well Formed documents */
15283 void * data; /* the userdata */
15286 for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
15287 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
15288 for (n_recovery = 0;n_recovery < gen_nb_int;n_recovery++) {
15289 for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
15290 mem_base = xmlMemBlocks();
15291 sax = gen_xmlSAXHandlerPtr(n_sax, 0);
15292 filename = gen_filepath(n_filename, 1);
15293 recovery = gen_int(n_recovery, 2);
15294 data = gen_userdata(n_data, 3);
15296 ret_val = xmlSAXParseFileWithData(sax, filename, recovery, data);
15297 desret_xmlDocPtr(ret_val);
15299 des_xmlSAXHandlerPtr(n_sax, sax, 0);
15300 des_filepath(n_filename, filename, 1);
15301 des_int(n_recovery, recovery, 2);
15302 des_userdata(n_data, data, 3);
15303 xmlResetLastError();
15304 if (mem_base != xmlMemBlocks()) {
15305 printf("Leak of %d blocks found in xmlSAXParseFileWithData",
15306 xmlMemBlocks() - mem_base);
15308 printf(" %d", n_sax);
15309 printf(" %d", n_filename);
15310 printf(" %d", n_recovery);
15311 printf(" %d", n_data);
15327 test_xmlSAXParseMemory(void) {
15330 #if defined(LIBXML_SAX1_ENABLED)
15331 #ifdef LIBXML_SAX1_ENABLED
15334 xmlSAXHandlerPtr sax; /* the SAX handler block */
15336 char * buffer; /* an pointer to a char array */
15338 int size; /* the size of the array */
15340 int recovery; /* work in recovery mode, i.e. tries to read not Well Formed documents */
15343 for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
15344 for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
15345 for (n_size = 0;n_size < gen_nb_int;n_size++) {
15346 for (n_recovery = 0;n_recovery < gen_nb_int;n_recovery++) {
15347 mem_base = xmlMemBlocks();
15348 sax = gen_xmlSAXHandlerPtr(n_sax, 0);
15349 buffer = gen_const_char_ptr(n_buffer, 1);
15350 size = gen_int(n_size, 2);
15351 recovery = gen_int(n_recovery, 3);
15352 if ((buffer != NULL) &&
15353 (size > (int) strlen((const char *) buffer) + 1))
15356 ret_val = xmlSAXParseMemory(sax, (const char *)buffer, size, recovery);
15357 desret_xmlDocPtr(ret_val);
15359 des_xmlSAXHandlerPtr(n_sax, sax, 0);
15360 des_const_char_ptr(n_buffer, (const char *)buffer, 1);
15361 des_int(n_size, size, 2);
15362 des_int(n_recovery, recovery, 3);
15363 xmlResetLastError();
15364 if (mem_base != xmlMemBlocks()) {
15365 printf("Leak of %d blocks found in xmlSAXParseMemory",
15366 xmlMemBlocks() - mem_base);
15368 printf(" %d", n_sax);
15369 printf(" %d", n_buffer);
15370 printf(" %d", n_size);
15371 printf(" %d", n_recovery);
15387 test_xmlSAXParseMemoryWithData(void) {
15390 #if defined(LIBXML_SAX1_ENABLED)
15391 #ifdef LIBXML_SAX1_ENABLED
15394 xmlSAXHandlerPtr sax; /* the SAX handler block */
15396 char * buffer; /* an pointer to a char array */
15398 int size; /* the size of the array */
15400 int recovery; /* work in recovery mode, i.e. tries to read no Well Formed documents */
15402 void * data; /* the userdata */
15405 for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
15406 for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
15407 for (n_size = 0;n_size < gen_nb_int;n_size++) {
15408 for (n_recovery = 0;n_recovery < gen_nb_int;n_recovery++) {
15409 for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
15410 mem_base = xmlMemBlocks();
15411 sax = gen_xmlSAXHandlerPtr(n_sax, 0);
15412 buffer = gen_const_char_ptr(n_buffer, 1);
15413 size = gen_int(n_size, 2);
15414 recovery = gen_int(n_recovery, 3);
15415 data = gen_userdata(n_data, 4);
15416 if ((buffer != NULL) &&
15417 (size > (int) strlen((const char *) buffer) + 1))
15420 ret_val = xmlSAXParseMemoryWithData(sax, (const char *)buffer, size, recovery, data);
15421 desret_xmlDocPtr(ret_val);
15423 des_xmlSAXHandlerPtr(n_sax, sax, 0);
15424 des_const_char_ptr(n_buffer, (const char *)buffer, 1);
15425 des_int(n_size, size, 2);
15426 des_int(n_recovery, recovery, 3);
15427 des_userdata(n_data, data, 4);
15428 xmlResetLastError();
15429 if (mem_base != xmlMemBlocks()) {
15430 printf("Leak of %d blocks found in xmlSAXParseMemoryWithData",
15431 xmlMemBlocks() - mem_base);
15433 printf(" %d", n_sax);
15434 printf(" %d", n_buffer);
15435 printf(" %d", n_size);
15436 printf(" %d", n_recovery);
15437 printf(" %d", n_data);
15454 test_xmlSAXUserParseFile(void) {
15457 #if defined(LIBXML_SAX1_ENABLED)
15458 #ifdef LIBXML_SAX1_ENABLED
15461 xmlSAXHandlerPtr sax; /* a SAX handler */
15463 void * user_data; /* The user data returned on SAX callbacks */
15465 const char * filename; /* a file name */
15468 for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
15469 for (n_user_data = 0;n_user_data < gen_nb_userdata;n_user_data++) {
15470 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
15471 mem_base = xmlMemBlocks();
15472 sax = gen_xmlSAXHandlerPtr(n_sax, 0);
15473 user_data = gen_userdata(n_user_data, 1);
15474 filename = gen_filepath(n_filename, 2);
15476 #ifdef LIBXML_SAX1_ENABLED
15477 if (sax == (xmlSAXHandlerPtr)&xmlDefaultSAXHandler) user_data = NULL;
15481 ret_val = xmlSAXUserParseFile(sax, user_data, filename);
15482 desret_int(ret_val);
15484 des_xmlSAXHandlerPtr(n_sax, sax, 0);
15485 des_userdata(n_user_data, user_data, 1);
15486 des_filepath(n_filename, filename, 2);
15487 xmlResetLastError();
15488 if (mem_base != xmlMemBlocks()) {
15489 printf("Leak of %d blocks found in xmlSAXUserParseFile",
15490 xmlMemBlocks() - mem_base);
15492 printf(" %d", n_sax);
15493 printf(" %d", n_user_data);
15494 printf(" %d", n_filename);
15509 test_xmlSAXUserParseMemory(void) {
15512 #if defined(LIBXML_SAX1_ENABLED)
15513 #ifdef LIBXML_SAX1_ENABLED
15516 xmlSAXHandlerPtr sax; /* a SAX handler */
15518 void * user_data; /* The user data returned on SAX callbacks */
15520 char * buffer; /* an in-memory XML document input */
15522 int size; /* the length of the XML document in bytes */
15525 for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
15526 for (n_user_data = 0;n_user_data < gen_nb_userdata;n_user_data++) {
15527 for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
15528 for (n_size = 0;n_size < gen_nb_int;n_size++) {
15529 mem_base = xmlMemBlocks();
15530 sax = gen_xmlSAXHandlerPtr(n_sax, 0);
15531 user_data = gen_userdata(n_user_data, 1);
15532 buffer = gen_const_char_ptr(n_buffer, 2);
15533 size = gen_int(n_size, 3);
15534 if ((buffer != NULL) &&
15535 (size > (int) strlen((const char *) buffer) + 1))
15538 #ifdef LIBXML_SAX1_ENABLED
15539 if (sax == (xmlSAXHandlerPtr)&xmlDefaultSAXHandler) user_data = NULL;
15543 ret_val = xmlSAXUserParseMemory(sax, user_data, (const char *)buffer, size);
15544 desret_int(ret_val);
15546 des_xmlSAXHandlerPtr(n_sax, sax, 0);
15547 des_userdata(n_user_data, user_data, 1);
15548 des_const_char_ptr(n_buffer, (const char *)buffer, 2);
15549 des_int(n_size, size, 3);
15550 xmlResetLastError();
15551 if (mem_base != xmlMemBlocks()) {
15552 printf("Leak of %d blocks found in xmlSAXUserParseMemory",
15553 xmlMemBlocks() - mem_base);
15555 printf(" %d", n_sax);
15556 printf(" %d", n_user_data);
15557 printf(" %d", n_buffer);
15558 printf(" %d", n_size);
15574 test_xmlSetExternalEntityLoader(void) {
15578 /* missing type support */
15584 test_xmlSetFeature(void) {
15587 #if defined(LIBXML_LEGACY_ENABLED)
15588 #ifdef LIBXML_LEGACY_ENABLED
15591 xmlParserCtxtPtr ctxt; /* an XML/HTML parser context */
15593 char * name; /* the feature name */
15595 void * value; /* pointer to the location of the new value */
15598 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
15599 for (n_name = 0;n_name < gen_nb_const_char_ptr;n_name++) {
15600 for (n_value = 0;n_value < gen_nb_void_ptr;n_value++) {
15601 mem_base = xmlMemBlocks();
15602 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
15603 name = gen_const_char_ptr(n_name, 1);
15604 value = gen_void_ptr(n_value, 2);
15606 ret_val = xmlSetFeature(ctxt, (const char *)name, value);
15607 desret_int(ret_val);
15609 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
15610 des_const_char_ptr(n_name, (const char *)name, 1);
15611 des_void_ptr(n_value, value, 2);
15612 xmlResetLastError();
15613 if (mem_base != xmlMemBlocks()) {
15614 printf("Leak of %d blocks found in xmlSetFeature",
15615 xmlMemBlocks() - mem_base);
15617 printf(" %d", n_ctxt);
15618 printf(" %d", n_name);
15619 printf(" %d", n_value);
15634 test_xmlSetupParserForBuffer(void) {
15637 #if defined(LIBXML_SAX1_ENABLED)
15638 #ifdef LIBXML_SAX1_ENABLED
15640 xmlParserCtxtPtr ctxt; /* an XML parser context */
15642 xmlChar * buffer; /* a xmlChar * buffer */
15644 const char * filename; /* a file name */
15647 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
15648 for (n_buffer = 0;n_buffer < gen_nb_const_xmlChar_ptr;n_buffer++) {
15649 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
15650 mem_base = xmlMemBlocks();
15651 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
15652 buffer = gen_const_xmlChar_ptr(n_buffer, 1);
15653 filename = gen_filepath(n_filename, 2);
15655 xmlSetupParserForBuffer(ctxt, (const xmlChar *)buffer, filename);
15657 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
15658 des_const_xmlChar_ptr(n_buffer, (const xmlChar *)buffer, 1);
15659 des_filepath(n_filename, filename, 2);
15660 xmlResetLastError();
15661 if (mem_base != xmlMemBlocks()) {
15662 printf("Leak of %d blocks found in xmlSetupParserForBuffer",
15663 xmlMemBlocks() - mem_base);
15665 printf(" %d", n_ctxt);
15666 printf(" %d", n_buffer);
15667 printf(" %d", n_filename);
15682 test_xmlStopParser(void) {
15685 #ifdef LIBXML_PUSH_ENABLED
15687 xmlParserCtxtPtr ctxt; /* an XML parser context */
15690 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
15691 mem_base = xmlMemBlocks();
15692 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
15694 xmlStopParser(ctxt);
15696 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
15697 xmlResetLastError();
15698 if (mem_base != xmlMemBlocks()) {
15699 printf("Leak of %d blocks found in xmlStopParser",
15700 xmlMemBlocks() - mem_base);
15702 printf(" %d", n_ctxt);
15714 test_xmlSubstituteEntitiesDefault(void) {
15719 int val; /* int 0 or 1 */
15722 for (n_val = 0;n_val < gen_nb_int;n_val++) {
15723 mem_base = xmlMemBlocks();
15724 val = gen_int(n_val, 0);
15726 ret_val = xmlSubstituteEntitiesDefault(val);
15727 desret_int(ret_val);
15729 des_int(n_val, val, 0);
15730 xmlResetLastError();
15731 if (mem_base != xmlMemBlocks()) {
15732 printf("Leak of %d blocks found in xmlSubstituteEntitiesDefault",
15733 xmlMemBlocks() - mem_base);
15735 printf(" %d", n_val);
15745 test_parser(void) {
15749 if (quiet == 0) printf("Testing parser : 61 of 70 functions ...\n");
15750 rc = test_xmlByteConsumed();
15751 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15752 rc = test_xmlClearNodeInfoSeq();
15753 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15754 rc = test_xmlClearParserCtxt();
15755 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15756 rc = test_xmlCreateDocParserCtxt();
15757 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15758 rc = test_xmlCreatePushParserCtxt();
15759 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15760 rc = test_xmlCtxtReadDoc();
15761 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15762 rc = test_xmlCtxtReadFile();
15763 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15764 rc = test_xmlCtxtReadMemory();
15765 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15766 rc = test_xmlCtxtReset();
15767 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15768 rc = test_xmlCtxtResetPush();
15769 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15770 rc = test_xmlCtxtUseOptions();
15771 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15772 rc = test_xmlGetExternalEntityLoader();
15773 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15774 rc = test_xmlGetFeature();
15775 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15776 rc = test_xmlGetFeaturesList();
15777 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15778 rc = test_xmlHasFeature();
15779 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15780 rc = test_xmlIOParseDTD();
15781 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15782 rc = test_xmlInitNodeInfoSeq();
15783 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15784 rc = test_xmlInitParser();
15785 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15786 rc = test_xmlInitParserCtxt();
15787 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15788 rc = test_xmlKeepBlanksDefault();
15789 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15790 rc = test_xmlLineNumbersDefault();
15791 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15792 rc = test_xmlLoadExternalEntity();
15793 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15794 rc = test_xmlNewIOInputStream();
15795 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15796 rc = test_xmlNewParserCtxt();
15797 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15798 rc = test_xmlParseBalancedChunkMemory();
15799 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15800 rc = test_xmlParseBalancedChunkMemoryRecover();
15801 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15802 rc = test_xmlParseChunk();
15803 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15804 rc = test_xmlParseCtxtExternalEntity();
15805 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15806 rc = test_xmlParseDTD();
15807 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15808 rc = test_xmlParseDoc();
15809 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15810 rc = test_xmlParseDocument();
15811 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15812 rc = test_xmlParseEntity();
15813 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15814 rc = test_xmlParseExtParsedEnt();
15815 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15816 rc = test_xmlParseExternalEntity();
15817 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15818 rc = test_xmlParseFile();
15819 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15820 rc = test_xmlParseInNodeContext();
15821 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15822 rc = test_xmlParseMemory();
15823 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15824 rc = test_xmlParserAddNodeInfo();
15825 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15826 rc = test_xmlParserFindNodeInfo();
15827 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15828 rc = test_xmlParserFindNodeInfoIndex();
15829 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15830 rc = test_xmlParserInputGrow();
15831 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15832 rc = test_xmlParserInputRead();
15833 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15834 rc = test_xmlPedanticParserDefault();
15835 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15836 rc = test_xmlReadDoc();
15837 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15838 rc = test_xmlReadFile();
15839 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15840 rc = test_xmlReadMemory();
15841 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15842 rc = test_xmlRecoverDoc();
15843 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15844 rc = test_xmlRecoverFile();
15845 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15846 rc = test_xmlRecoverMemory();
15847 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15848 rc = test_xmlSAXParseDTD();
15849 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15850 rc = test_xmlSAXParseDoc();
15851 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15852 rc = test_xmlSAXParseEntity();
15853 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15854 rc = test_xmlSAXParseFile();
15855 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15856 rc = test_xmlSAXParseFileWithData();
15857 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15858 rc = test_xmlSAXParseMemory();
15859 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15860 rc = test_xmlSAXParseMemoryWithData();
15861 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15862 rc = test_xmlSAXUserParseFile();
15863 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15864 rc = test_xmlSAXUserParseMemory();
15865 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15866 rc = test_xmlSetExternalEntityLoader();
15867 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15868 rc = test_xmlSetFeature();
15869 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15870 rc = test_xmlSetupParserForBuffer();
15871 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15872 rc = test_xmlStopParser();
15873 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15874 rc = test_xmlSubstituteEntitiesDefault();
15875 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15878 printf("Module parser: %d errors\n", test_ret);
15883 test_htmlCreateFileParserCtxt(void) {
15886 #if defined(LIBXML_HTML_ENABLED)
15888 htmlParserCtxtPtr ret_val;
15889 const char * filename; /* the filename */
15891 char * encoding; /* a free form C string describing the HTML document encoding, or NULL */
15894 for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
15895 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
15896 mem_base = xmlMemBlocks();
15897 filename = gen_fileoutput(n_filename, 0);
15898 encoding = gen_const_char_ptr(n_encoding, 1);
15900 ret_val = htmlCreateFileParserCtxt(filename, (const char *)encoding);
15901 desret_htmlParserCtxtPtr(ret_val);
15903 des_fileoutput(n_filename, filename, 0);
15904 des_const_char_ptr(n_encoding, (const char *)encoding, 1);
15905 xmlResetLastError();
15906 if (mem_base != xmlMemBlocks()) {
15907 printf("Leak of %d blocks found in htmlCreateFileParserCtxt",
15908 xmlMemBlocks() - mem_base);
15910 printf(" %d", n_filename);
15911 printf(" %d", n_encoding);
15924 test_htmlInitAutoClose(void) {
15927 #if defined(LIBXML_HTML_ENABLED)
15930 mem_base = xmlMemBlocks();
15932 htmlInitAutoClose();
15934 xmlResetLastError();
15935 if (mem_base != xmlMemBlocks()) {
15936 printf("Leak of %d blocks found in htmlInitAutoClose",
15937 xmlMemBlocks() - mem_base);
15949 test_inputPop(void) {
15953 xmlParserInputPtr ret_val;
15954 xmlParserCtxtPtr ctxt; /* an XML parser context */
15957 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
15958 mem_base = xmlMemBlocks();
15959 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
15961 ret_val = inputPop(ctxt);
15962 desret_xmlParserInputPtr(ret_val);
15964 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
15965 xmlResetLastError();
15966 if (mem_base != xmlMemBlocks()) {
15967 printf("Leak of %d blocks found in inputPop",
15968 xmlMemBlocks() - mem_base);
15970 printf(" %d", n_ctxt);
15981 test_inputPush(void) {
15986 xmlParserCtxtPtr ctxt; /* an XML parser context */
15988 xmlParserInputPtr value; /* the parser input */
15991 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
15992 for (n_value = 0;n_value < gen_nb_xmlParserInputPtr;n_value++) {
15993 mem_base = xmlMemBlocks();
15994 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
15995 value = gen_xmlParserInputPtr(n_value, 1);
15997 ret_val = inputPush(ctxt, value);
15998 desret_int(ret_val);
16000 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
16001 des_xmlParserInputPtr(n_value, value, 1);
16002 xmlResetLastError();
16003 if (mem_base != xmlMemBlocks()) {
16004 printf("Leak of %d blocks found in inputPush",
16005 xmlMemBlocks() - mem_base);
16007 printf(" %d", n_ctxt);
16008 printf(" %d", n_value);
16020 test_namePop(void) {
16024 const xmlChar * ret_val;
16025 xmlParserCtxtPtr ctxt; /* an XML parser context */
16028 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
16029 mem_base = xmlMemBlocks();
16030 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
16032 ret_val = namePop(ctxt);
16033 desret_const_xmlChar_ptr(ret_val);
16035 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
16036 xmlResetLastError();
16037 if (mem_base != xmlMemBlocks()) {
16038 printf("Leak of %d blocks found in namePop",
16039 xmlMemBlocks() - mem_base);
16041 printf(" %d", n_ctxt);
16052 test_namePush(void) {
16057 xmlParserCtxtPtr ctxt; /* an XML parser context */
16059 xmlChar * value; /* the element name */
16062 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
16063 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
16064 mem_base = xmlMemBlocks();
16065 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
16066 value = gen_const_xmlChar_ptr(n_value, 1);
16068 ret_val = namePush(ctxt, (const xmlChar *)value);
16069 desret_int(ret_val);
16071 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
16072 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 1);
16073 xmlResetLastError();
16074 if (mem_base != xmlMemBlocks()) {
16075 printf("Leak of %d blocks found in namePush",
16076 xmlMemBlocks() - mem_base);
16078 printf(" %d", n_ctxt);
16079 printf(" %d", n_value);
16091 test_nodePop(void) {
16095 xmlNodePtr ret_val;
16096 xmlParserCtxtPtr ctxt; /* an XML parser context */
16099 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
16100 mem_base = xmlMemBlocks();
16101 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
16103 ret_val = nodePop(ctxt);
16104 desret_xmlNodePtr(ret_val);
16106 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
16107 xmlResetLastError();
16108 if (mem_base != xmlMemBlocks()) {
16109 printf("Leak of %d blocks found in nodePop",
16110 xmlMemBlocks() - mem_base);
16112 printf(" %d", n_ctxt);
16123 test_nodePush(void) {
16128 xmlParserCtxtPtr ctxt; /* an XML parser context */
16130 xmlNodePtr value; /* the element node */
16133 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
16134 for (n_value = 0;n_value < gen_nb_xmlNodePtr;n_value++) {
16135 mem_base = xmlMemBlocks();
16136 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
16137 value = gen_xmlNodePtr(n_value, 1);
16139 ret_val = nodePush(ctxt, value);
16140 desret_int(ret_val);
16142 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
16143 des_xmlNodePtr(n_value, value, 1);
16144 xmlResetLastError();
16145 if (mem_base != xmlMemBlocks()) {
16146 printf("Leak of %d blocks found in nodePush",
16147 xmlMemBlocks() - mem_base);
16149 printf(" %d", n_ctxt);
16150 printf(" %d", n_value);
16162 test_xmlCheckLanguageID(void) {
16167 xmlChar * lang; /* pointer to the string value */
16170 for (n_lang = 0;n_lang < gen_nb_const_xmlChar_ptr;n_lang++) {
16171 mem_base = xmlMemBlocks();
16172 lang = gen_const_xmlChar_ptr(n_lang, 0);
16174 ret_val = xmlCheckLanguageID((const xmlChar *)lang);
16175 desret_int(ret_val);
16177 des_const_xmlChar_ptr(n_lang, (const xmlChar *)lang, 0);
16178 xmlResetLastError();
16179 if (mem_base != xmlMemBlocks()) {
16180 printf("Leak of %d blocks found in xmlCheckLanguageID",
16181 xmlMemBlocks() - mem_base);
16183 printf(" %d", n_lang);
16194 test_xmlCopyChar(void) {
16199 int len; /* Ignored, compatibility */
16201 xmlChar * out; /* pointer to an array of xmlChar */
16203 int val; /* the char value */
16206 for (n_len = 0;n_len < gen_nb_int;n_len++) {
16207 for (n_out = 0;n_out < gen_nb_xmlChar_ptr;n_out++) {
16208 for (n_val = 0;n_val < gen_nb_int;n_val++) {
16209 mem_base = xmlMemBlocks();
16210 len = gen_int(n_len, 0);
16211 out = gen_xmlChar_ptr(n_out, 1);
16212 val = gen_int(n_val, 2);
16214 ret_val = xmlCopyChar(len, out, val);
16215 desret_int(ret_val);
16217 des_int(n_len, len, 0);
16218 des_xmlChar_ptr(n_out, out, 1);
16219 des_int(n_val, val, 2);
16220 xmlResetLastError();
16221 if (mem_base != xmlMemBlocks()) {
16222 printf("Leak of %d blocks found in xmlCopyChar",
16223 xmlMemBlocks() - mem_base);
16225 printf(" %d", n_len);
16226 printf(" %d", n_out);
16227 printf(" %d", n_val);
16240 test_xmlCopyCharMultiByte(void) {
16245 xmlChar * out; /* pointer to an array of xmlChar */
16247 int val; /* the char value */
16250 for (n_out = 0;n_out < gen_nb_xmlChar_ptr;n_out++) {
16251 for (n_val = 0;n_val < gen_nb_int;n_val++) {
16252 mem_base = xmlMemBlocks();
16253 out = gen_xmlChar_ptr(n_out, 0);
16254 val = gen_int(n_val, 1);
16256 ret_val = xmlCopyCharMultiByte(out, val);
16257 desret_int(ret_val);
16259 des_xmlChar_ptr(n_out, out, 0);
16260 des_int(n_val, val, 1);
16261 xmlResetLastError();
16262 if (mem_base != xmlMemBlocks()) {
16263 printf("Leak of %d blocks found in xmlCopyCharMultiByte",
16264 xmlMemBlocks() - mem_base);
16266 printf(" %d", n_out);
16267 printf(" %d", n_val);
16279 test_xmlCreateEntityParserCtxt(void) {
16283 xmlParserCtxtPtr ret_val;
16284 xmlChar * URL; /* the entity URL */
16286 xmlChar * ID; /* the entity PUBLIC ID */
16288 xmlChar * base; /* a possible base for the target URI */
16291 for (n_URL = 0;n_URL < gen_nb_const_xmlChar_ptr;n_URL++) {
16292 for (n_ID = 0;n_ID < gen_nb_const_xmlChar_ptr;n_ID++) {
16293 for (n_base = 0;n_base < gen_nb_const_xmlChar_ptr;n_base++) {
16294 mem_base = xmlMemBlocks();
16295 URL = gen_const_xmlChar_ptr(n_URL, 0);
16296 ID = gen_const_xmlChar_ptr(n_ID, 1);
16297 base = gen_const_xmlChar_ptr(n_base, 2);
16299 ret_val = xmlCreateEntityParserCtxt((const xmlChar *)URL, (const xmlChar *)ID, (const xmlChar *)base);
16300 desret_xmlParserCtxtPtr(ret_val);
16302 des_const_xmlChar_ptr(n_URL, (const xmlChar *)URL, 0);
16303 des_const_xmlChar_ptr(n_ID, (const xmlChar *)ID, 1);
16304 des_const_xmlChar_ptr(n_base, (const xmlChar *)base, 2);
16305 xmlResetLastError();
16306 if (mem_base != xmlMemBlocks()) {
16307 printf("Leak of %d blocks found in xmlCreateEntityParserCtxt",
16308 xmlMemBlocks() - mem_base);
16310 printf(" %d", n_URL);
16311 printf(" %d", n_ID);
16312 printf(" %d", n_base);
16325 test_xmlCreateFileParserCtxt(void) {
16329 xmlParserCtxtPtr ret_val;
16330 const char * filename; /* the filename */
16333 for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
16334 mem_base = xmlMemBlocks();
16335 filename = gen_fileoutput(n_filename, 0);
16337 ret_val = xmlCreateFileParserCtxt(filename);
16338 desret_xmlParserCtxtPtr(ret_val);
16340 des_fileoutput(n_filename, filename, 0);
16341 xmlResetLastError();
16342 if (mem_base != xmlMemBlocks()) {
16343 printf("Leak of %d blocks found in xmlCreateFileParserCtxt",
16344 xmlMemBlocks() - mem_base);
16346 printf(" %d", n_filename);
16357 test_xmlCreateMemoryParserCtxt(void) {
16361 xmlParserCtxtPtr ret_val;
16362 char * buffer; /* a pointer to a char array */
16364 int size; /* the size of the array */
16367 for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
16368 for (n_size = 0;n_size < gen_nb_int;n_size++) {
16369 mem_base = xmlMemBlocks();
16370 buffer = gen_const_char_ptr(n_buffer, 0);
16371 size = gen_int(n_size, 1);
16372 if ((buffer != NULL) &&
16373 (size > (int) strlen((const char *) buffer) + 1))
16376 ret_val = xmlCreateMemoryParserCtxt((const char *)buffer, size);
16377 desret_xmlParserCtxtPtr(ret_val);
16379 des_const_char_ptr(n_buffer, (const char *)buffer, 0);
16380 des_int(n_size, size, 1);
16381 xmlResetLastError();
16382 if (mem_base != xmlMemBlocks()) {
16383 printf("Leak of %d blocks found in xmlCreateMemoryParserCtxt",
16384 xmlMemBlocks() - mem_base);
16386 printf(" %d", n_buffer);
16387 printf(" %d", n_size);
16399 test_xmlCreateURLParserCtxt(void) {
16403 xmlParserCtxtPtr ret_val;
16404 const char * filename; /* the filename or URL */
16406 int options; /* a combination of xmlParserOption */
16409 for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
16410 for (n_options = 0;n_options < gen_nb_int;n_options++) {
16411 mem_base = xmlMemBlocks();
16412 filename = gen_fileoutput(n_filename, 0);
16413 options = gen_int(n_options, 1);
16415 ret_val = xmlCreateURLParserCtxt(filename, options);
16416 desret_xmlParserCtxtPtr(ret_val);
16418 des_fileoutput(n_filename, filename, 0);
16419 des_int(n_options, options, 1);
16420 xmlResetLastError();
16421 if (mem_base != xmlMemBlocks()) {
16422 printf("Leak of %d blocks found in xmlCreateURLParserCtxt",
16423 xmlMemBlocks() - mem_base);
16425 printf(" %d", n_filename);
16426 printf(" %d", n_options);
16438 test_xmlCurrentChar(void) {
16443 xmlParserCtxtPtr ctxt; /* the XML parser context */
16445 int * len; /* pointer to the length of the char read */
16448 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
16449 for (n_len = 0;n_len < gen_nb_int_ptr;n_len++) {
16450 mem_base = xmlMemBlocks();
16451 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
16452 len = gen_int_ptr(n_len, 1);
16454 ret_val = xmlCurrentChar(ctxt, len);
16455 desret_int(ret_val);
16457 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
16458 des_int_ptr(n_len, len, 1);
16459 xmlResetLastError();
16460 if (mem_base != xmlMemBlocks()) {
16461 printf("Leak of %d blocks found in xmlCurrentChar",
16462 xmlMemBlocks() - mem_base);
16464 printf(" %d", n_ctxt);
16465 printf(" %d", n_len);
16477 test_xmlErrMemory(void) {
16481 xmlParserCtxtPtr ctxt; /* an XML parser context */
16483 char * extra; /* extra informations */
16486 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
16487 for (n_extra = 0;n_extra < gen_nb_const_char_ptr;n_extra++) {
16488 mem_base = xmlMemBlocks();
16489 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
16490 extra = gen_const_char_ptr(n_extra, 1);
16492 xmlErrMemory(ctxt, (const char *)extra);
16494 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
16495 des_const_char_ptr(n_extra, (const char *)extra, 1);
16496 xmlResetLastError();
16497 if (mem_base != xmlMemBlocks()) {
16498 printf("Leak of %d blocks found in xmlErrMemory",
16499 xmlMemBlocks() - mem_base);
16501 printf(" %d", n_ctxt);
16502 printf(" %d", n_extra);
16514 test_xmlIsLetter(void) {
16519 int c; /* an unicode character (int) */
16522 for (n_c = 0;n_c < gen_nb_int;n_c++) {
16523 mem_base = xmlMemBlocks();
16524 c = gen_int(n_c, 0);
16526 ret_val = xmlIsLetter(c);
16527 desret_int(ret_val);
16529 des_int(n_c, c, 0);
16530 xmlResetLastError();
16531 if (mem_base != xmlMemBlocks()) {
16532 printf("Leak of %d blocks found in xmlIsLetter",
16533 xmlMemBlocks() - mem_base);
16535 printf(" %d", n_c);
16546 test_xmlNewEntityInputStream(void) {
16550 xmlParserInputPtr ret_val;
16551 xmlParserCtxtPtr ctxt; /* an XML parser context */
16553 xmlEntityPtr entity; /* an Entity pointer */
16556 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
16557 for (n_entity = 0;n_entity < gen_nb_xmlEntityPtr;n_entity++) {
16558 mem_base = xmlMemBlocks();
16559 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
16560 entity = gen_xmlEntityPtr(n_entity, 1);
16562 ret_val = xmlNewEntityInputStream(ctxt, entity);
16563 desret_xmlParserInputPtr(ret_val);
16565 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
16566 des_xmlEntityPtr(n_entity, entity, 1);
16567 xmlResetLastError();
16568 if (mem_base != xmlMemBlocks()) {
16569 printf("Leak of %d blocks found in xmlNewEntityInputStream",
16570 xmlMemBlocks() - mem_base);
16572 printf(" %d", n_ctxt);
16573 printf(" %d", n_entity);
16585 test_xmlNewInputFromFile(void) {
16589 xmlParserInputPtr ret_val;
16590 xmlParserCtxtPtr ctxt; /* an XML parser context */
16592 const char * filename; /* the filename to use as entity */
16595 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
16596 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
16597 mem_base = xmlMemBlocks();
16598 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
16599 filename = gen_filepath(n_filename, 1);
16601 ret_val = xmlNewInputFromFile(ctxt, filename);
16602 desret_xmlParserInputPtr(ret_val);
16604 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
16605 des_filepath(n_filename, filename, 1);
16606 xmlResetLastError();
16607 if (mem_base != xmlMemBlocks()) {
16608 printf("Leak of %d blocks found in xmlNewInputFromFile",
16609 xmlMemBlocks() - mem_base);
16611 printf(" %d", n_ctxt);
16612 printf(" %d", n_filename);
16624 test_xmlNewInputStream(void) {
16628 xmlParserInputPtr ret_val;
16629 xmlParserCtxtPtr ctxt; /* an XML parser context */
16632 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
16633 mem_base = xmlMemBlocks();
16634 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
16636 ret_val = xmlNewInputStream(ctxt);
16637 desret_xmlParserInputPtr(ret_val);
16639 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
16640 xmlResetLastError();
16641 if (mem_base != xmlMemBlocks()) {
16642 printf("Leak of %d blocks found in xmlNewInputStream",
16643 xmlMemBlocks() - mem_base);
16645 printf(" %d", n_ctxt);
16656 test_xmlNewStringInputStream(void) {
16660 xmlParserInputPtr ret_val;
16661 xmlParserCtxtPtr ctxt; /* an XML parser context */
16663 xmlChar * buffer; /* an memory buffer */
16666 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
16667 for (n_buffer = 0;n_buffer < gen_nb_const_xmlChar_ptr;n_buffer++) {
16668 mem_base = xmlMemBlocks();
16669 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
16670 buffer = gen_const_xmlChar_ptr(n_buffer, 1);
16672 ret_val = xmlNewStringInputStream(ctxt, (const xmlChar *)buffer);
16673 desret_xmlParserInputPtr(ret_val);
16675 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
16676 des_const_xmlChar_ptr(n_buffer, (const xmlChar *)buffer, 1);
16677 xmlResetLastError();
16678 if (mem_base != xmlMemBlocks()) {
16679 printf("Leak of %d blocks found in xmlNewStringInputStream",
16680 xmlMemBlocks() - mem_base);
16682 printf(" %d", n_ctxt);
16683 printf(" %d", n_buffer);
16695 test_xmlNextChar(void) {
16699 xmlParserCtxtPtr ctxt; /* the XML parser context */
16702 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
16703 mem_base = xmlMemBlocks();
16704 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
16708 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
16709 xmlResetLastError();
16710 if (mem_base != xmlMemBlocks()) {
16711 printf("Leak of %d blocks found in xmlNextChar",
16712 xmlMemBlocks() - mem_base);
16714 printf(" %d", n_ctxt);
16725 test_xmlParserInputShrink(void) {
16729 xmlParserInputPtr in; /* an XML parser input */
16732 for (n_in = 0;n_in < gen_nb_xmlParserInputPtr;n_in++) {
16733 mem_base = xmlMemBlocks();
16734 in = gen_xmlParserInputPtr(n_in, 0);
16736 xmlParserInputShrink(in);
16738 des_xmlParserInputPtr(n_in, in, 0);
16739 xmlResetLastError();
16740 if (mem_base != xmlMemBlocks()) {
16741 printf("Leak of %d blocks found in xmlParserInputShrink",
16742 xmlMemBlocks() - mem_base);
16744 printf(" %d", n_in);
16755 test_xmlPopInput(void) {
16760 xmlParserCtxtPtr ctxt; /* an XML parser context */
16763 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
16764 mem_base = xmlMemBlocks();
16765 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
16767 ret_val = xmlPopInput(ctxt);
16768 desret_xmlChar(ret_val);
16770 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
16771 xmlResetLastError();
16772 if (mem_base != xmlMemBlocks()) {
16773 printf("Leak of %d blocks found in xmlPopInput",
16774 xmlMemBlocks() - mem_base);
16776 printf(" %d", n_ctxt);
16787 test_xmlPushInput(void) {
16792 xmlParserCtxtPtr ctxt; /* an XML parser context */
16794 xmlParserInputPtr input; /* an XML parser input fragment (entity, XML fragment ...). */
16797 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
16798 for (n_input = 0;n_input < gen_nb_xmlParserInputPtr;n_input++) {
16799 mem_base = xmlMemBlocks();
16800 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
16801 input = gen_xmlParserInputPtr(n_input, 1);
16803 ret_val = xmlPushInput(ctxt, input);
16804 desret_int(ret_val);
16806 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
16807 des_xmlParserInputPtr(n_input, input, 1);
16808 xmlResetLastError();
16809 if (mem_base != xmlMemBlocks()) {
16810 printf("Leak of %d blocks found in xmlPushInput",
16811 xmlMemBlocks() - mem_base);
16813 printf(" %d", n_ctxt);
16814 printf(" %d", n_input);
16826 test_xmlSetEntityReferenceFunc(void) {
16830 /* missing type support */
16836 test_xmlSplitQName(void) {
16841 xmlParserCtxtPtr ctxt; /* an XML parser context */
16843 xmlChar * name; /* an XML parser context */
16845 xmlChar ** prefix; /* a xmlChar ** */
16848 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
16849 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
16850 for (n_prefix = 0;n_prefix < gen_nb_xmlChar_ptr_ptr;n_prefix++) {
16851 mem_base = xmlMemBlocks();
16852 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
16853 name = gen_const_xmlChar_ptr(n_name, 1);
16854 prefix = gen_xmlChar_ptr_ptr(n_prefix, 2);
16856 ret_val = xmlSplitQName(ctxt, (const xmlChar *)name, prefix);
16857 desret_xmlChar_ptr(ret_val);
16859 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
16860 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
16861 des_xmlChar_ptr_ptr(n_prefix, prefix, 2);
16862 xmlResetLastError();
16863 if (mem_base != xmlMemBlocks()) {
16864 printf("Leak of %d blocks found in xmlSplitQName",
16865 xmlMemBlocks() - mem_base);
16867 printf(" %d", n_ctxt);
16868 printf(" %d", n_name);
16869 printf(" %d", n_prefix);
16882 test_xmlStringCurrentChar(void) {
16887 xmlParserCtxtPtr ctxt; /* the XML parser context */
16889 xmlChar * cur; /* pointer to the beginning of the char */
16891 int * len; /* pointer to the length of the char read */
16894 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
16895 for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
16896 for (n_len = 0;n_len < gen_nb_int_ptr;n_len++) {
16897 mem_base = xmlMemBlocks();
16898 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
16899 cur = gen_const_xmlChar_ptr(n_cur, 1);
16900 len = gen_int_ptr(n_len, 2);
16902 ret_val = xmlStringCurrentChar(ctxt, (const xmlChar *)cur, len);
16903 desret_int(ret_val);
16905 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
16906 des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 1);
16907 des_int_ptr(n_len, len, 2);
16908 xmlResetLastError();
16909 if (mem_base != xmlMemBlocks()) {
16910 printf("Leak of %d blocks found in xmlStringCurrentChar",
16911 xmlMemBlocks() - mem_base);
16913 printf(" %d", n_ctxt);
16914 printf(" %d", n_cur);
16915 printf(" %d", n_len);
16928 test_xmlStringDecodeEntities(void) {
16933 xmlParserCtxtPtr ctxt; /* the parser context */
16935 xmlChar * str; /* the input string */
16937 int what; /* combination of XML_SUBSTITUTE_REF and XML_SUBSTITUTE_PEREF */
16939 xmlChar end; /* an end marker xmlChar, 0 if none */
16941 xmlChar end2; /* an end marker xmlChar, 0 if none */
16943 xmlChar end3; /* an end marker xmlChar, 0 if none */
16946 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
16947 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
16948 for (n_what = 0;n_what < gen_nb_int;n_what++) {
16949 for (n_end = 0;n_end < gen_nb_xmlChar;n_end++) {
16950 for (n_end2 = 0;n_end2 < gen_nb_xmlChar;n_end2++) {
16951 for (n_end3 = 0;n_end3 < gen_nb_xmlChar;n_end3++) {
16952 mem_base = xmlMemBlocks();
16953 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
16954 str = gen_const_xmlChar_ptr(n_str, 1);
16955 what = gen_int(n_what, 2);
16956 end = gen_xmlChar(n_end, 3);
16957 end2 = gen_xmlChar(n_end2, 4);
16958 end3 = gen_xmlChar(n_end3, 5);
16960 ret_val = xmlStringDecodeEntities(ctxt, (const xmlChar *)str, what, end, end2, end3);
16961 desret_xmlChar_ptr(ret_val);
16963 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
16964 des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 1);
16965 des_int(n_what, what, 2);
16966 des_xmlChar(n_end, end, 3);
16967 des_xmlChar(n_end2, end2, 4);
16968 des_xmlChar(n_end3, end3, 5);
16969 xmlResetLastError();
16970 if (mem_base != xmlMemBlocks()) {
16971 printf("Leak of %d blocks found in xmlStringDecodeEntities",
16972 xmlMemBlocks() - mem_base);
16974 printf(" %d", n_ctxt);
16975 printf(" %d", n_str);
16976 printf(" %d", n_what);
16977 printf(" %d", n_end);
16978 printf(" %d", n_end2);
16979 printf(" %d", n_end3);
16995 test_xmlStringLenDecodeEntities(void) {
17000 xmlParserCtxtPtr ctxt; /* the parser context */
17002 xmlChar * str; /* the input string */
17004 int len; /* the string length */
17006 int what; /* combination of XML_SUBSTITUTE_REF and XML_SUBSTITUTE_PEREF */
17008 xmlChar end; /* an end marker xmlChar, 0 if none */
17010 xmlChar end2; /* an end marker xmlChar, 0 if none */
17012 xmlChar end3; /* an end marker xmlChar, 0 if none */
17015 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
17016 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
17017 for (n_len = 0;n_len < gen_nb_int;n_len++) {
17018 for (n_what = 0;n_what < gen_nb_int;n_what++) {
17019 for (n_end = 0;n_end < gen_nb_xmlChar;n_end++) {
17020 for (n_end2 = 0;n_end2 < gen_nb_xmlChar;n_end2++) {
17021 for (n_end3 = 0;n_end3 < gen_nb_xmlChar;n_end3++) {
17022 mem_base = xmlMemBlocks();
17023 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
17024 str = gen_const_xmlChar_ptr(n_str, 1);
17025 len = gen_int(n_len, 2);
17026 what = gen_int(n_what, 3);
17027 end = gen_xmlChar(n_end, 4);
17028 end2 = gen_xmlChar(n_end2, 5);
17029 end3 = gen_xmlChar(n_end3, 6);
17030 if ((str != NULL) &&
17031 (len > (int) strlen((const char *) str) + 1))
17034 ret_val = xmlStringLenDecodeEntities(ctxt, (const xmlChar *)str, len, what, end, end2, end3);
17035 desret_xmlChar_ptr(ret_val);
17037 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
17038 des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 1);
17039 des_int(n_len, len, 2);
17040 des_int(n_what, what, 3);
17041 des_xmlChar(n_end, end, 4);
17042 des_xmlChar(n_end2, end2, 5);
17043 des_xmlChar(n_end3, end3, 6);
17044 xmlResetLastError();
17045 if (mem_base != xmlMemBlocks()) {
17046 printf("Leak of %d blocks found in xmlStringLenDecodeEntities",
17047 xmlMemBlocks() - mem_base);
17049 printf(" %d", n_ctxt);
17050 printf(" %d", n_str);
17051 printf(" %d", n_len);
17052 printf(" %d", n_what);
17053 printf(" %d", n_end);
17054 printf(" %d", n_end2);
17055 printf(" %d", n_end3);
17072 test_xmlSwitchEncoding(void) {
17077 xmlParserCtxtPtr ctxt; /* the parser context */
17079 xmlCharEncoding enc; /* the encoding value (number) */
17082 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
17083 for (n_enc = 0;n_enc < gen_nb_xmlCharEncoding;n_enc++) {
17084 mem_base = xmlMemBlocks();
17085 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
17086 enc = gen_xmlCharEncoding(n_enc, 1);
17088 ret_val = xmlSwitchEncoding(ctxt, enc);
17089 desret_int(ret_val);
17091 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
17092 des_xmlCharEncoding(n_enc, enc, 1);
17093 xmlResetLastError();
17094 if (mem_base != xmlMemBlocks()) {
17095 printf("Leak of %d blocks found in xmlSwitchEncoding",
17096 xmlMemBlocks() - mem_base);
17098 printf(" %d", n_ctxt);
17099 printf(" %d", n_enc);
17111 test_xmlSwitchInputEncoding(void) {
17116 xmlParserCtxtPtr ctxt; /* the parser context */
17118 xmlParserInputPtr input; /* the input stream */
17120 xmlCharEncodingHandlerPtr handler; /* the encoding handler */
17123 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
17124 for (n_input = 0;n_input < gen_nb_xmlParserInputPtr;n_input++) {
17125 for (n_handler = 0;n_handler < gen_nb_xmlCharEncodingHandlerPtr;n_handler++) {
17126 mem_base = xmlMemBlocks();
17127 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
17128 input = gen_xmlParserInputPtr(n_input, 1);
17129 handler = gen_xmlCharEncodingHandlerPtr(n_handler, 2);
17131 ret_val = xmlSwitchInputEncoding(ctxt, input, handler);
17132 desret_int(ret_val);
17134 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
17135 des_xmlParserInputPtr(n_input, input, 1);
17136 des_xmlCharEncodingHandlerPtr(n_handler, handler, 2);
17137 xmlResetLastError();
17138 if (mem_base != xmlMemBlocks()) {
17139 printf("Leak of %d blocks found in xmlSwitchInputEncoding",
17140 xmlMemBlocks() - mem_base);
17142 printf(" %d", n_ctxt);
17143 printf(" %d", n_input);
17144 printf(" %d", n_handler);
17157 test_xmlSwitchToEncoding(void) {
17162 xmlParserCtxtPtr ctxt; /* the parser context */
17164 xmlCharEncodingHandlerPtr handler; /* the encoding handler */
17167 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
17168 for (n_handler = 0;n_handler < gen_nb_xmlCharEncodingHandlerPtr;n_handler++) {
17169 mem_base = xmlMemBlocks();
17170 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
17171 handler = gen_xmlCharEncodingHandlerPtr(n_handler, 1);
17173 ret_val = xmlSwitchToEncoding(ctxt, handler);
17174 desret_int(ret_val);
17176 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
17177 des_xmlCharEncodingHandlerPtr(n_handler, handler, 1);
17178 xmlResetLastError();
17179 if (mem_base != xmlMemBlocks()) {
17180 printf("Leak of %d blocks found in xmlSwitchToEncoding",
17181 xmlMemBlocks() - mem_base);
17183 printf(" %d", n_ctxt);
17184 printf(" %d", n_handler);
17195 test_parserInternals(void) {
17199 if (quiet == 0) printf("Testing parserInternals : 33 of 90 functions ...\n");
17200 rc = test_htmlCreateFileParserCtxt();
17201 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17202 rc = test_htmlInitAutoClose();
17203 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17204 rc = test_inputPop();
17205 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17206 rc = test_inputPush();
17207 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17208 rc = test_namePop();
17209 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17210 rc = test_namePush();
17211 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17212 rc = test_nodePop();
17213 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17214 rc = test_nodePush();
17215 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17216 rc = test_xmlCheckLanguageID();
17217 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17218 rc = test_xmlCopyChar();
17219 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17220 rc = test_xmlCopyCharMultiByte();
17221 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17222 rc = test_xmlCreateEntityParserCtxt();
17223 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17224 rc = test_xmlCreateFileParserCtxt();
17225 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17226 rc = test_xmlCreateMemoryParserCtxt();
17227 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17228 rc = test_xmlCreateURLParserCtxt();
17229 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17230 rc = test_xmlCurrentChar();
17231 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17232 rc = test_xmlErrMemory();
17233 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17234 rc = test_xmlIsLetter();
17235 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17236 rc = test_xmlNewEntityInputStream();
17237 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17238 rc = test_xmlNewInputFromFile();
17239 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17240 rc = test_xmlNewInputStream();
17241 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17242 rc = test_xmlNewStringInputStream();
17243 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17244 rc = test_xmlNextChar();
17245 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17246 rc = test_xmlParserInputShrink();
17247 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17248 rc = test_xmlPopInput();
17249 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17250 rc = test_xmlPushInput();
17251 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17252 rc = test_xmlSetEntityReferenceFunc();
17253 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17254 rc = test_xmlSplitQName();
17255 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17256 rc = test_xmlStringCurrentChar();
17257 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17258 rc = test_xmlStringDecodeEntities();
17259 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17260 rc = test_xmlStringLenDecodeEntities();
17261 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17262 rc = test_xmlSwitchEncoding();
17263 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17264 rc = test_xmlSwitchInputEncoding();
17265 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17266 rc = test_xmlSwitchToEncoding();
17267 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17270 printf("Module parserInternals: %d errors\n", test_ret);
17275 test_xmlPatternFromRoot(void) {
17278 #if defined(LIBXML_PATTERN_ENABLED)
17281 xmlPatternPtr comp; /* the precompiled pattern */
17284 for (n_comp = 0;n_comp < gen_nb_xmlPatternPtr;n_comp++) {
17285 mem_base = xmlMemBlocks();
17286 comp = gen_xmlPatternPtr(n_comp, 0);
17288 ret_val = xmlPatternFromRoot(comp);
17289 desret_int(ret_val);
17291 des_xmlPatternPtr(n_comp, comp, 0);
17292 xmlResetLastError();
17293 if (mem_base != xmlMemBlocks()) {
17294 printf("Leak of %d blocks found in xmlPatternFromRoot",
17295 xmlMemBlocks() - mem_base);
17297 printf(" %d", n_comp);
17309 test_xmlPatternGetStreamCtxt(void) {
17313 /* missing type support */
17319 test_xmlPatternMatch(void) {
17322 #if defined(LIBXML_PATTERN_ENABLED)
17325 xmlPatternPtr comp; /* the precompiled pattern */
17327 xmlNodePtr node; /* a node */
17330 for (n_comp = 0;n_comp < gen_nb_xmlPatternPtr;n_comp++) {
17331 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
17332 mem_base = xmlMemBlocks();
17333 comp = gen_xmlPatternPtr(n_comp, 0);
17334 node = gen_xmlNodePtr(n_node, 1);
17336 ret_val = xmlPatternMatch(comp, node);
17337 desret_int(ret_val);
17339 des_xmlPatternPtr(n_comp, comp, 0);
17340 des_xmlNodePtr(n_node, node, 1);
17341 xmlResetLastError();
17342 if (mem_base != xmlMemBlocks()) {
17343 printf("Leak of %d blocks found in xmlPatternMatch",
17344 xmlMemBlocks() - mem_base);
17346 printf(" %d", n_comp);
17347 printf(" %d", n_node);
17360 test_xmlPatternMaxDepth(void) {
17363 #if defined(LIBXML_PATTERN_ENABLED)
17366 xmlPatternPtr comp; /* the precompiled pattern */
17369 for (n_comp = 0;n_comp < gen_nb_xmlPatternPtr;n_comp++) {
17370 mem_base = xmlMemBlocks();
17371 comp = gen_xmlPatternPtr(n_comp, 0);
17373 ret_val = xmlPatternMaxDepth(comp);
17374 desret_int(ret_val);
17376 des_xmlPatternPtr(n_comp, comp, 0);
17377 xmlResetLastError();
17378 if (mem_base != xmlMemBlocks()) {
17379 printf("Leak of %d blocks found in xmlPatternMaxDepth",
17380 xmlMemBlocks() - mem_base);
17382 printf(" %d", n_comp);
17394 test_xmlPatternMinDepth(void) {
17397 #if defined(LIBXML_PATTERN_ENABLED)
17400 xmlPatternPtr comp; /* the precompiled pattern */
17403 for (n_comp = 0;n_comp < gen_nb_xmlPatternPtr;n_comp++) {
17404 mem_base = xmlMemBlocks();
17405 comp = gen_xmlPatternPtr(n_comp, 0);
17407 ret_val = xmlPatternMinDepth(comp);
17408 desret_int(ret_val);
17410 des_xmlPatternPtr(n_comp, comp, 0);
17411 xmlResetLastError();
17412 if (mem_base != xmlMemBlocks()) {
17413 printf("Leak of %d blocks found in xmlPatternMinDepth",
17414 xmlMemBlocks() - mem_base);
17416 printf(" %d", n_comp);
17428 test_xmlPatternStreamable(void) {
17431 #if defined(LIBXML_PATTERN_ENABLED)
17434 xmlPatternPtr comp; /* the precompiled pattern */
17437 for (n_comp = 0;n_comp < gen_nb_xmlPatternPtr;n_comp++) {
17438 mem_base = xmlMemBlocks();
17439 comp = gen_xmlPatternPtr(n_comp, 0);
17441 ret_val = xmlPatternStreamable(comp);
17442 desret_int(ret_val);
17444 des_xmlPatternPtr(n_comp, comp, 0);
17445 xmlResetLastError();
17446 if (mem_base != xmlMemBlocks()) {
17447 printf("Leak of %d blocks found in xmlPatternStreamable",
17448 xmlMemBlocks() - mem_base);
17450 printf(" %d", n_comp);
17462 test_xmlPatterncompile(void) {
17466 /* missing type support */
17470 #ifdef LIBXML_PATTERN_ENABLED
17472 #define gen_nb_xmlStreamCtxtPtr 1
17473 static xmlStreamCtxtPtr gen_xmlStreamCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
17476 static void des_xmlStreamCtxtPtr(int no ATTRIBUTE_UNUSED, xmlStreamCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
17482 test_xmlStreamPop(void) {
17485 #if defined(LIBXML_PATTERN_ENABLED)
17488 xmlStreamCtxtPtr stream; /* the stream context */
17491 for (n_stream = 0;n_stream < gen_nb_xmlStreamCtxtPtr;n_stream++) {
17492 mem_base = xmlMemBlocks();
17493 stream = gen_xmlStreamCtxtPtr(n_stream, 0);
17495 ret_val = xmlStreamPop(stream);
17496 desret_int(ret_val);
17498 des_xmlStreamCtxtPtr(n_stream, stream, 0);
17499 xmlResetLastError();
17500 if (mem_base != xmlMemBlocks()) {
17501 printf("Leak of %d blocks found in xmlStreamPop",
17502 xmlMemBlocks() - mem_base);
17504 printf(" %d", n_stream);
17516 test_xmlStreamPush(void) {
17519 #if defined(LIBXML_PATTERN_ENABLED)
17522 xmlStreamCtxtPtr stream; /* the stream context */
17524 xmlChar * name; /* the current name */
17526 xmlChar * ns; /* the namespace name */
17529 for (n_stream = 0;n_stream < gen_nb_xmlStreamCtxtPtr;n_stream++) {
17530 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
17531 for (n_ns = 0;n_ns < gen_nb_const_xmlChar_ptr;n_ns++) {
17532 mem_base = xmlMemBlocks();
17533 stream = gen_xmlStreamCtxtPtr(n_stream, 0);
17534 name = gen_const_xmlChar_ptr(n_name, 1);
17535 ns = gen_const_xmlChar_ptr(n_ns, 2);
17537 ret_val = xmlStreamPush(stream, (const xmlChar *)name, (const xmlChar *)ns);
17538 desret_int(ret_val);
17540 des_xmlStreamCtxtPtr(n_stream, stream, 0);
17541 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
17542 des_const_xmlChar_ptr(n_ns, (const xmlChar *)ns, 2);
17543 xmlResetLastError();
17544 if (mem_base != xmlMemBlocks()) {
17545 printf("Leak of %d blocks found in xmlStreamPush",
17546 xmlMemBlocks() - mem_base);
17548 printf(" %d", n_stream);
17549 printf(" %d", n_name);
17550 printf(" %d", n_ns);
17564 test_xmlStreamPushAttr(void) {
17567 #if defined(LIBXML_PATTERN_ENABLED)
17570 xmlStreamCtxtPtr stream; /* the stream context */
17572 xmlChar * name; /* the current name */
17574 xmlChar * ns; /* the namespace name */
17577 for (n_stream = 0;n_stream < gen_nb_xmlStreamCtxtPtr;n_stream++) {
17578 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
17579 for (n_ns = 0;n_ns < gen_nb_const_xmlChar_ptr;n_ns++) {
17580 mem_base = xmlMemBlocks();
17581 stream = gen_xmlStreamCtxtPtr(n_stream, 0);
17582 name = gen_const_xmlChar_ptr(n_name, 1);
17583 ns = gen_const_xmlChar_ptr(n_ns, 2);
17585 ret_val = xmlStreamPushAttr(stream, (const xmlChar *)name, (const xmlChar *)ns);
17586 desret_int(ret_val);
17588 des_xmlStreamCtxtPtr(n_stream, stream, 0);
17589 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
17590 des_const_xmlChar_ptr(n_ns, (const xmlChar *)ns, 2);
17591 xmlResetLastError();
17592 if (mem_base != xmlMemBlocks()) {
17593 printf("Leak of %d blocks found in xmlStreamPushAttr",
17594 xmlMemBlocks() - mem_base);
17596 printf(" %d", n_stream);
17597 printf(" %d", n_name);
17598 printf(" %d", n_ns);
17612 test_xmlStreamPushNode(void) {
17615 #if defined(LIBXML_PATTERN_ENABLED)
17618 xmlStreamCtxtPtr stream; /* the stream context */
17620 xmlChar * name; /* the current name */
17622 xmlChar * ns; /* the namespace name */
17624 int nodeType; /* the type of the node being pushed */
17627 for (n_stream = 0;n_stream < gen_nb_xmlStreamCtxtPtr;n_stream++) {
17628 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
17629 for (n_ns = 0;n_ns < gen_nb_const_xmlChar_ptr;n_ns++) {
17630 for (n_nodeType = 0;n_nodeType < gen_nb_int;n_nodeType++) {
17631 mem_base = xmlMemBlocks();
17632 stream = gen_xmlStreamCtxtPtr(n_stream, 0);
17633 name = gen_const_xmlChar_ptr(n_name, 1);
17634 ns = gen_const_xmlChar_ptr(n_ns, 2);
17635 nodeType = gen_int(n_nodeType, 3);
17637 ret_val = xmlStreamPushNode(stream, (const xmlChar *)name, (const xmlChar *)ns, nodeType);
17638 desret_int(ret_val);
17640 des_xmlStreamCtxtPtr(n_stream, stream, 0);
17641 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
17642 des_const_xmlChar_ptr(n_ns, (const xmlChar *)ns, 2);
17643 des_int(n_nodeType, nodeType, 3);
17644 xmlResetLastError();
17645 if (mem_base != xmlMemBlocks()) {
17646 printf("Leak of %d blocks found in xmlStreamPushNode",
17647 xmlMemBlocks() - mem_base);
17649 printf(" %d", n_stream);
17650 printf(" %d", n_name);
17651 printf(" %d", n_ns);
17652 printf(" %d", n_nodeType);
17667 test_xmlStreamWantsAnyNode(void) {
17670 #if defined(LIBXML_PATTERN_ENABLED)
17673 xmlStreamCtxtPtr streamCtxt; /* the stream context */
17676 for (n_streamCtxt = 0;n_streamCtxt < gen_nb_xmlStreamCtxtPtr;n_streamCtxt++) {
17677 mem_base = xmlMemBlocks();
17678 streamCtxt = gen_xmlStreamCtxtPtr(n_streamCtxt, 0);
17680 ret_val = xmlStreamWantsAnyNode(streamCtxt);
17681 desret_int(ret_val);
17683 des_xmlStreamCtxtPtr(n_streamCtxt, streamCtxt, 0);
17684 xmlResetLastError();
17685 if (mem_base != xmlMemBlocks()) {
17686 printf("Leak of %d blocks found in xmlStreamWantsAnyNode",
17687 xmlMemBlocks() - mem_base);
17689 printf(" %d", n_streamCtxt);
17700 test_pattern(void) {
17704 if (quiet == 0) printf("Testing pattern : 10 of 15 functions ...\n");
17705 rc = test_xmlPatternFromRoot();
17706 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17707 rc = test_xmlPatternGetStreamCtxt();
17708 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17709 rc = test_xmlPatternMatch();
17710 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17711 rc = test_xmlPatternMaxDepth();
17712 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17713 rc = test_xmlPatternMinDepth();
17714 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17715 rc = test_xmlPatternStreamable();
17716 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17717 rc = test_xmlPatterncompile();
17718 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17719 rc = test_xmlStreamPop();
17720 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17721 rc = test_xmlStreamPush();
17722 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17723 rc = test_xmlStreamPushAttr();
17724 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17725 rc = test_xmlStreamPushNode();
17726 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17727 rc = test_xmlStreamWantsAnyNode();
17728 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17731 printf("Module pattern: %d errors\n", test_ret);
17734 #ifdef LIBXML_SCHEMAS_ENABLED
17736 #define gen_nb_xmlRelaxNGPtr 1
17737 static xmlRelaxNGPtr gen_xmlRelaxNGPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
17740 static void des_xmlRelaxNGPtr(int no ATTRIBUTE_UNUSED, xmlRelaxNGPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
17746 test_xmlRelaxNGDump(void) {
17749 #if defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
17751 FILE * output; /* the file output */
17753 xmlRelaxNGPtr schema; /* a schema structure */
17756 for (n_output = 0;n_output < gen_nb_FILE_ptr;n_output++) {
17757 for (n_schema = 0;n_schema < gen_nb_xmlRelaxNGPtr;n_schema++) {
17758 mem_base = xmlMemBlocks();
17759 output = gen_FILE_ptr(n_output, 0);
17760 schema = gen_xmlRelaxNGPtr(n_schema, 1);
17762 xmlRelaxNGDump(output, schema);
17764 des_FILE_ptr(n_output, output, 0);
17765 des_xmlRelaxNGPtr(n_schema, schema, 1);
17766 xmlResetLastError();
17767 if (mem_base != xmlMemBlocks()) {
17768 printf("Leak of %d blocks found in xmlRelaxNGDump",
17769 xmlMemBlocks() - mem_base);
17771 printf(" %d", n_output);
17772 printf(" %d", n_schema);
17785 test_xmlRelaxNGDumpTree(void) {
17788 #if defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
17790 FILE * output; /* the file output */
17792 xmlRelaxNGPtr schema; /* a schema structure */
17795 for (n_output = 0;n_output < gen_nb_FILE_ptr;n_output++) {
17796 for (n_schema = 0;n_schema < gen_nb_xmlRelaxNGPtr;n_schema++) {
17797 mem_base = xmlMemBlocks();
17798 output = gen_FILE_ptr(n_output, 0);
17799 schema = gen_xmlRelaxNGPtr(n_schema, 1);
17801 xmlRelaxNGDumpTree(output, schema);
17803 des_FILE_ptr(n_output, output, 0);
17804 des_xmlRelaxNGPtr(n_schema, schema, 1);
17805 xmlResetLastError();
17806 if (mem_base != xmlMemBlocks()) {
17807 printf("Leak of %d blocks found in xmlRelaxNGDumpTree",
17808 xmlMemBlocks() - mem_base);
17810 printf(" %d", n_output);
17811 printf(" %d", n_schema);
17822 #ifdef LIBXML_SCHEMAS_ENABLED
17824 #define gen_nb_xmlRelaxNGParserCtxtPtr 1
17825 static xmlRelaxNGParserCtxtPtr gen_xmlRelaxNGParserCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
17828 static void des_xmlRelaxNGParserCtxtPtr(int no ATTRIBUTE_UNUSED, xmlRelaxNGParserCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
17832 #ifdef LIBXML_SCHEMAS_ENABLED
17834 #define gen_nb_xmlRelaxNGValidityErrorFunc_ptr 1
17835 static xmlRelaxNGValidityErrorFunc * gen_xmlRelaxNGValidityErrorFunc_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
17838 static void des_xmlRelaxNGValidityErrorFunc_ptr(int no ATTRIBUTE_UNUSED, xmlRelaxNGValidityErrorFunc * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
17842 #ifdef LIBXML_SCHEMAS_ENABLED
17844 #define gen_nb_xmlRelaxNGValidityWarningFunc_ptr 1
17845 static xmlRelaxNGValidityWarningFunc * gen_xmlRelaxNGValidityWarningFunc_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
17848 static void des_xmlRelaxNGValidityWarningFunc_ptr(int no ATTRIBUTE_UNUSED, xmlRelaxNGValidityWarningFunc * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
17854 test_xmlRelaxNGGetParserErrors(void) {
17857 #if defined(LIBXML_SCHEMAS_ENABLED)
17860 xmlRelaxNGParserCtxtPtr ctxt; /* a Relax-NG validation context */
17862 xmlRelaxNGValidityErrorFunc * err; /* the error callback result */
17864 xmlRelaxNGValidityWarningFunc * warn; /* the warning callback result */
17866 void ** ctx; /* contextual data for the callbacks result */
17869 for (n_ctxt = 0;n_ctxt < gen_nb_xmlRelaxNGParserCtxtPtr;n_ctxt++) {
17870 for (n_err = 0;n_err < gen_nb_xmlRelaxNGValidityErrorFunc_ptr;n_err++) {
17871 for (n_warn = 0;n_warn < gen_nb_xmlRelaxNGValidityWarningFunc_ptr;n_warn++) {
17872 for (n_ctx = 0;n_ctx < gen_nb_void_ptr_ptr;n_ctx++) {
17873 mem_base = xmlMemBlocks();
17874 ctxt = gen_xmlRelaxNGParserCtxtPtr(n_ctxt, 0);
17875 err = gen_xmlRelaxNGValidityErrorFunc_ptr(n_err, 1);
17876 warn = gen_xmlRelaxNGValidityWarningFunc_ptr(n_warn, 2);
17877 ctx = gen_void_ptr_ptr(n_ctx, 3);
17879 ret_val = xmlRelaxNGGetParserErrors(ctxt, err, warn, ctx);
17880 desret_int(ret_val);
17882 des_xmlRelaxNGParserCtxtPtr(n_ctxt, ctxt, 0);
17883 des_xmlRelaxNGValidityErrorFunc_ptr(n_err, err, 1);
17884 des_xmlRelaxNGValidityWarningFunc_ptr(n_warn, warn, 2);
17885 des_void_ptr_ptr(n_ctx, ctx, 3);
17886 xmlResetLastError();
17887 if (mem_base != xmlMemBlocks()) {
17888 printf("Leak of %d blocks found in xmlRelaxNGGetParserErrors",
17889 xmlMemBlocks() - mem_base);
17891 printf(" %d", n_ctxt);
17892 printf(" %d", n_err);
17893 printf(" %d", n_warn);
17894 printf(" %d", n_ctx);
17907 #ifdef LIBXML_SCHEMAS_ENABLED
17909 #define gen_nb_xmlRelaxNGValidCtxtPtr 1
17910 static xmlRelaxNGValidCtxtPtr gen_xmlRelaxNGValidCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
17913 static void des_xmlRelaxNGValidCtxtPtr(int no ATTRIBUTE_UNUSED, xmlRelaxNGValidCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
17919 test_xmlRelaxNGGetValidErrors(void) {
17922 #if defined(LIBXML_SCHEMAS_ENABLED)
17925 xmlRelaxNGValidCtxtPtr ctxt; /* a Relax-NG validation context */
17927 xmlRelaxNGValidityErrorFunc * err; /* the error function result */
17929 xmlRelaxNGValidityWarningFunc * warn; /* the warning function result */
17931 void ** ctx; /* the functions context result */
17934 for (n_ctxt = 0;n_ctxt < gen_nb_xmlRelaxNGValidCtxtPtr;n_ctxt++) {
17935 for (n_err = 0;n_err < gen_nb_xmlRelaxNGValidityErrorFunc_ptr;n_err++) {
17936 for (n_warn = 0;n_warn < gen_nb_xmlRelaxNGValidityWarningFunc_ptr;n_warn++) {
17937 for (n_ctx = 0;n_ctx < gen_nb_void_ptr_ptr;n_ctx++) {
17938 mem_base = xmlMemBlocks();
17939 ctxt = gen_xmlRelaxNGValidCtxtPtr(n_ctxt, 0);
17940 err = gen_xmlRelaxNGValidityErrorFunc_ptr(n_err, 1);
17941 warn = gen_xmlRelaxNGValidityWarningFunc_ptr(n_warn, 2);
17942 ctx = gen_void_ptr_ptr(n_ctx, 3);
17944 ret_val = xmlRelaxNGGetValidErrors(ctxt, err, warn, ctx);
17945 desret_int(ret_val);
17947 des_xmlRelaxNGValidCtxtPtr(n_ctxt, ctxt, 0);
17948 des_xmlRelaxNGValidityErrorFunc_ptr(n_err, err, 1);
17949 des_xmlRelaxNGValidityWarningFunc_ptr(n_warn, warn, 2);
17950 des_void_ptr_ptr(n_ctx, ctx, 3);
17951 xmlResetLastError();
17952 if (mem_base != xmlMemBlocks()) {
17953 printf("Leak of %d blocks found in xmlRelaxNGGetValidErrors",
17954 xmlMemBlocks() - mem_base);
17956 printf(" %d", n_ctxt);
17957 printf(" %d", n_err);
17958 printf(" %d", n_warn);
17959 printf(" %d", n_ctx);
17974 test_xmlRelaxNGInitTypes(void) {
17977 #if defined(LIBXML_SCHEMAS_ENABLED)
17981 mem_base = xmlMemBlocks();
17983 ret_val = xmlRelaxNGInitTypes();
17984 desret_int(ret_val);
17986 xmlResetLastError();
17987 if (mem_base != xmlMemBlocks()) {
17988 printf("Leak of %d blocks found in xmlRelaxNGInitTypes",
17989 xmlMemBlocks() - mem_base);
18001 test_xmlRelaxNGNewDocParserCtxt(void) {
18004 #if defined(LIBXML_SCHEMAS_ENABLED)
18006 xmlRelaxNGParserCtxtPtr ret_val;
18007 xmlDocPtr doc; /* a preparsed document tree */
18010 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
18011 mem_base = xmlMemBlocks();
18012 doc = gen_xmlDocPtr(n_doc, 0);
18014 ret_val = xmlRelaxNGNewDocParserCtxt(doc);
18015 desret_xmlRelaxNGParserCtxtPtr(ret_val);
18017 des_xmlDocPtr(n_doc, doc, 0);
18018 xmlResetLastError();
18019 if (mem_base != xmlMemBlocks()) {
18020 printf("Leak of %d blocks found in xmlRelaxNGNewDocParserCtxt",
18021 xmlMemBlocks() - mem_base);
18023 printf(" %d", n_doc);
18035 test_xmlRelaxNGNewMemParserCtxt(void) {
18038 #if defined(LIBXML_SCHEMAS_ENABLED)
18040 xmlRelaxNGParserCtxtPtr ret_val;
18041 char * buffer; /* a pointer to a char array containing the schemas */
18043 int size; /* the size of the array */
18046 for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
18047 for (n_size = 0;n_size < gen_nb_int;n_size++) {
18048 mem_base = xmlMemBlocks();
18049 buffer = gen_const_char_ptr(n_buffer, 0);
18050 size = gen_int(n_size, 1);
18051 if ((buffer != NULL) &&
18052 (size > (int) strlen((const char *) buffer) + 1))
18055 ret_val = xmlRelaxNGNewMemParserCtxt((const char *)buffer, size);
18056 desret_xmlRelaxNGParserCtxtPtr(ret_val);
18058 des_const_char_ptr(n_buffer, (const char *)buffer, 0);
18059 des_int(n_size, size, 1);
18060 xmlResetLastError();
18061 if (mem_base != xmlMemBlocks()) {
18062 printf("Leak of %d blocks found in xmlRelaxNGNewMemParserCtxt",
18063 xmlMemBlocks() - mem_base);
18065 printf(" %d", n_buffer);
18066 printf(" %d", n_size);
18079 test_xmlRelaxNGNewParserCtxt(void) {
18082 #if defined(LIBXML_SCHEMAS_ENABLED)
18084 xmlRelaxNGParserCtxtPtr ret_val;
18085 char * URL; /* the location of the schema */
18088 for (n_URL = 0;n_URL < gen_nb_const_char_ptr;n_URL++) {
18089 mem_base = xmlMemBlocks();
18090 URL = gen_const_char_ptr(n_URL, 0);
18092 ret_val = xmlRelaxNGNewParserCtxt((const char *)URL);
18093 desret_xmlRelaxNGParserCtxtPtr(ret_val);
18095 des_const_char_ptr(n_URL, (const char *)URL, 0);
18096 xmlResetLastError();
18097 if (mem_base != xmlMemBlocks()) {
18098 printf("Leak of %d blocks found in xmlRelaxNGNewParserCtxt",
18099 xmlMemBlocks() - mem_base);
18101 printf(" %d", n_URL);
18113 test_xmlRelaxNGNewValidCtxt(void) {
18117 /* missing type support */
18123 test_xmlRelaxNGParse(void) {
18127 /* missing type support */
18133 test_xmlRelaxNGSetParserErrors(void) {
18137 /* missing type support */
18143 test_xmlRelaxNGSetParserStructuredErrors(void) {
18147 /* missing type support */
18153 test_xmlRelaxNGSetValidErrors(void) {
18157 /* missing type support */
18163 test_xmlRelaxNGSetValidStructuredErrors(void) {
18167 /* missing type support */
18173 test_xmlRelaxNGValidateDoc(void) {
18176 #if defined(LIBXML_SCHEMAS_ENABLED)
18179 xmlRelaxNGValidCtxtPtr ctxt; /* a Relax-NG validation context */
18181 xmlDocPtr doc; /* a parsed document tree */
18184 for (n_ctxt = 0;n_ctxt < gen_nb_xmlRelaxNGValidCtxtPtr;n_ctxt++) {
18185 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
18186 mem_base = xmlMemBlocks();
18187 ctxt = gen_xmlRelaxNGValidCtxtPtr(n_ctxt, 0);
18188 doc = gen_xmlDocPtr(n_doc, 1);
18190 ret_val = xmlRelaxNGValidateDoc(ctxt, doc);
18191 desret_int(ret_val);
18193 des_xmlRelaxNGValidCtxtPtr(n_ctxt, ctxt, 0);
18194 des_xmlDocPtr(n_doc, doc, 1);
18195 xmlResetLastError();
18196 if (mem_base != xmlMemBlocks()) {
18197 printf("Leak of %d blocks found in xmlRelaxNGValidateDoc",
18198 xmlMemBlocks() - mem_base);
18200 printf(" %d", n_ctxt);
18201 printf(" %d", n_doc);
18214 test_xmlRelaxNGValidateFullElement(void) {
18217 #if defined(LIBXML_SCHEMAS_ENABLED)
18220 xmlRelaxNGValidCtxtPtr ctxt; /* the validation context */
18222 xmlDocPtr doc; /* a document instance */
18224 xmlNodePtr elem; /* an element instance */
18227 for (n_ctxt = 0;n_ctxt < gen_nb_xmlRelaxNGValidCtxtPtr;n_ctxt++) {
18228 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
18229 for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
18230 mem_base = xmlMemBlocks();
18231 ctxt = gen_xmlRelaxNGValidCtxtPtr(n_ctxt, 0);
18232 doc = gen_xmlDocPtr(n_doc, 1);
18233 elem = gen_xmlNodePtr(n_elem, 2);
18235 ret_val = xmlRelaxNGValidateFullElement(ctxt, doc, elem);
18236 desret_int(ret_val);
18238 des_xmlRelaxNGValidCtxtPtr(n_ctxt, ctxt, 0);
18239 des_xmlDocPtr(n_doc, doc, 1);
18240 des_xmlNodePtr(n_elem, elem, 2);
18241 xmlResetLastError();
18242 if (mem_base != xmlMemBlocks()) {
18243 printf("Leak of %d blocks found in xmlRelaxNGValidateFullElement",
18244 xmlMemBlocks() - mem_base);
18246 printf(" %d", n_ctxt);
18247 printf(" %d", n_doc);
18248 printf(" %d", n_elem);
18262 test_xmlRelaxNGValidatePopElement(void) {
18265 #if defined(LIBXML_SCHEMAS_ENABLED)
18268 xmlRelaxNGValidCtxtPtr ctxt; /* the RelaxNG validation context */
18270 xmlDocPtr doc; /* a document instance */
18272 xmlNodePtr elem; /* an element instance */
18275 for (n_ctxt = 0;n_ctxt < gen_nb_xmlRelaxNGValidCtxtPtr;n_ctxt++) {
18276 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
18277 for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
18278 mem_base = xmlMemBlocks();
18279 ctxt = gen_xmlRelaxNGValidCtxtPtr(n_ctxt, 0);
18280 doc = gen_xmlDocPtr(n_doc, 1);
18281 elem = gen_xmlNodePtr(n_elem, 2);
18283 ret_val = xmlRelaxNGValidatePopElement(ctxt, doc, elem);
18284 desret_int(ret_val);
18286 des_xmlRelaxNGValidCtxtPtr(n_ctxt, ctxt, 0);
18287 des_xmlDocPtr(n_doc, doc, 1);
18288 des_xmlNodePtr(n_elem, elem, 2);
18289 xmlResetLastError();
18290 if (mem_base != xmlMemBlocks()) {
18291 printf("Leak of %d blocks found in xmlRelaxNGValidatePopElement",
18292 xmlMemBlocks() - mem_base);
18294 printf(" %d", n_ctxt);
18295 printf(" %d", n_doc);
18296 printf(" %d", n_elem);
18310 test_xmlRelaxNGValidatePushCData(void) {
18313 #if defined(LIBXML_SCHEMAS_ENABLED)
18316 xmlRelaxNGValidCtxtPtr ctxt; /* the RelaxNG validation context */
18318 xmlChar * data; /* some character data read */
18320 int len; /* the length of the data */
18323 for (n_ctxt = 0;n_ctxt < gen_nb_xmlRelaxNGValidCtxtPtr;n_ctxt++) {
18324 for (n_data = 0;n_data < gen_nb_const_xmlChar_ptr;n_data++) {
18325 for (n_len = 0;n_len < gen_nb_int;n_len++) {
18326 mem_base = xmlMemBlocks();
18327 ctxt = gen_xmlRelaxNGValidCtxtPtr(n_ctxt, 0);
18328 data = gen_const_xmlChar_ptr(n_data, 1);
18329 len = gen_int(n_len, 2);
18330 if ((data != NULL) &&
18331 (len > (int) strlen((const char *) data) + 1))
18334 ret_val = xmlRelaxNGValidatePushCData(ctxt, (const xmlChar *)data, len);
18335 desret_int(ret_val);
18337 des_xmlRelaxNGValidCtxtPtr(n_ctxt, ctxt, 0);
18338 des_const_xmlChar_ptr(n_data, (const xmlChar *)data, 1);
18339 des_int(n_len, len, 2);
18340 xmlResetLastError();
18341 if (mem_base != xmlMemBlocks()) {
18342 printf("Leak of %d blocks found in xmlRelaxNGValidatePushCData",
18343 xmlMemBlocks() - mem_base);
18345 printf(" %d", n_ctxt);
18346 printf(" %d", n_data);
18347 printf(" %d", n_len);
18361 test_xmlRelaxNGValidatePushElement(void) {
18364 #if defined(LIBXML_SCHEMAS_ENABLED)
18367 xmlRelaxNGValidCtxtPtr ctxt; /* the validation context */
18369 xmlDocPtr doc; /* a document instance */
18371 xmlNodePtr elem; /* an element instance */
18374 for (n_ctxt = 0;n_ctxt < gen_nb_xmlRelaxNGValidCtxtPtr;n_ctxt++) {
18375 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
18376 for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
18377 mem_base = xmlMemBlocks();
18378 ctxt = gen_xmlRelaxNGValidCtxtPtr(n_ctxt, 0);
18379 doc = gen_xmlDocPtr(n_doc, 1);
18380 elem = gen_xmlNodePtr(n_elem, 2);
18382 ret_val = xmlRelaxNGValidatePushElement(ctxt, doc, elem);
18383 desret_int(ret_val);
18385 des_xmlRelaxNGValidCtxtPtr(n_ctxt, ctxt, 0);
18386 des_xmlDocPtr(n_doc, doc, 1);
18387 des_xmlNodePtr(n_elem, elem, 2);
18388 xmlResetLastError();
18389 if (mem_base != xmlMemBlocks()) {
18390 printf("Leak of %d blocks found in xmlRelaxNGValidatePushElement",
18391 xmlMemBlocks() - mem_base);
18393 printf(" %d", n_ctxt);
18394 printf(" %d", n_doc);
18395 printf(" %d", n_elem);
18409 test_xmlRelaxParserSetFlag(void) {
18412 #if defined(LIBXML_SCHEMAS_ENABLED)
18415 xmlRelaxNGParserCtxtPtr ctxt; /* a RelaxNG parser context */
18417 int flags; /* a set of flags values */
18420 for (n_ctxt = 0;n_ctxt < gen_nb_xmlRelaxNGParserCtxtPtr;n_ctxt++) {
18421 for (n_flags = 0;n_flags < gen_nb_int;n_flags++) {
18422 mem_base = xmlMemBlocks();
18423 ctxt = gen_xmlRelaxNGParserCtxtPtr(n_ctxt, 0);
18424 flags = gen_int(n_flags, 1);
18426 ret_val = xmlRelaxParserSetFlag(ctxt, flags);
18427 desret_int(ret_val);
18429 des_xmlRelaxNGParserCtxtPtr(n_ctxt, ctxt, 0);
18430 des_int(n_flags, flags, 1);
18431 xmlResetLastError();
18432 if (mem_base != xmlMemBlocks()) {
18433 printf("Leak of %d blocks found in xmlRelaxParserSetFlag",
18434 xmlMemBlocks() - mem_base);
18436 printf(" %d", n_ctxt);
18437 printf(" %d", n_flags);
18449 test_relaxng(void) {
18453 if (quiet == 0) printf("Testing relaxng : 14 of 24 functions ...\n");
18454 rc = test_xmlRelaxNGDump();
18455 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18456 rc = test_xmlRelaxNGDumpTree();
18457 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18458 rc = test_xmlRelaxNGGetParserErrors();
18459 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18460 rc = test_xmlRelaxNGGetValidErrors();
18461 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18462 rc = test_xmlRelaxNGInitTypes();
18463 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18464 rc = test_xmlRelaxNGNewDocParserCtxt();
18465 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18466 rc = test_xmlRelaxNGNewMemParserCtxt();
18467 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18468 rc = test_xmlRelaxNGNewParserCtxt();
18469 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18470 rc = test_xmlRelaxNGNewValidCtxt();
18471 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18472 rc = test_xmlRelaxNGParse();
18473 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18474 rc = test_xmlRelaxNGSetParserErrors();
18475 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18476 rc = test_xmlRelaxNGSetParserStructuredErrors();
18477 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18478 rc = test_xmlRelaxNGSetValidErrors();
18479 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18480 rc = test_xmlRelaxNGSetValidStructuredErrors();
18481 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18482 rc = test_xmlRelaxNGValidateDoc();
18483 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18484 rc = test_xmlRelaxNGValidateFullElement();
18485 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18486 rc = test_xmlRelaxNGValidatePopElement();
18487 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18488 rc = test_xmlRelaxNGValidatePushCData();
18489 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18490 rc = test_xmlRelaxNGValidatePushElement();
18491 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18492 rc = test_xmlRelaxParserSetFlag();
18493 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18496 printf("Module relaxng: %d errors\n", test_ret);
18500 test_schemasInternals(void) {
18503 if (quiet == 0) printf("Testing schemasInternals : 0 of 2 functions ...\n");
18506 printf("Module schemasInternals: %d errors\n", test_ret);
18511 test_xmlSchematronNewDocParserCtxt(void) {
18515 /* missing type support */
18521 test_xmlSchematronNewMemParserCtxt(void) {
18525 /* missing type support */
18531 test_xmlSchematronNewParserCtxt(void) {
18535 /* missing type support */
18539 #ifdef LIBXML_SCHEMATRON_ENABLED
18541 #define gen_nb_xmlSchematronPtr 1
18542 static xmlSchematronPtr gen_xmlSchematronPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
18545 static void des_xmlSchematronPtr(int no ATTRIBUTE_UNUSED, xmlSchematronPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
18551 test_xmlSchematronNewValidCtxt(void) {
18555 /* missing type support */
18559 #ifdef LIBXML_SCHEMATRON_ENABLED
18561 #define gen_nb_xmlSchematronParserCtxtPtr 1
18562 static xmlSchematronParserCtxtPtr gen_xmlSchematronParserCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
18565 static void des_xmlSchematronParserCtxtPtr(int no ATTRIBUTE_UNUSED, xmlSchematronParserCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
18571 test_xmlSchematronParse(void) {
18575 /* missing type support */
18579 #ifdef LIBXML_SCHEMATRON_ENABLED
18581 #define gen_nb_xmlSchematronValidCtxtPtr 1
18582 static xmlSchematronValidCtxtPtr gen_xmlSchematronValidCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
18585 static void des_xmlSchematronValidCtxtPtr(int no ATTRIBUTE_UNUSED, xmlSchematronValidCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
18591 test_xmlSchematronSetValidStructuredErrors(void) {
18595 /* missing type support */
18601 test_xmlSchematronValidateDoc(void) {
18604 #if defined(LIBXML_SCHEMATRON_ENABLED)
18607 xmlSchematronValidCtxtPtr ctxt; /* the schema validation context */
18609 xmlDocPtr instance; /* the document instace tree */
18612 for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchematronValidCtxtPtr;n_ctxt++) {
18613 for (n_instance = 0;n_instance < gen_nb_xmlDocPtr;n_instance++) {
18614 mem_base = xmlMemBlocks();
18615 ctxt = gen_xmlSchematronValidCtxtPtr(n_ctxt, 0);
18616 instance = gen_xmlDocPtr(n_instance, 1);
18618 ret_val = xmlSchematronValidateDoc(ctxt, instance);
18619 desret_int(ret_val);
18621 des_xmlSchematronValidCtxtPtr(n_ctxt, ctxt, 0);
18622 des_xmlDocPtr(n_instance, instance, 1);
18623 xmlResetLastError();
18624 if (mem_base != xmlMemBlocks()) {
18625 printf("Leak of %d blocks found in xmlSchematronValidateDoc",
18626 xmlMemBlocks() - mem_base);
18628 printf(" %d", n_ctxt);
18629 printf(" %d", n_instance);
18641 test_schematron(void) {
18645 if (quiet == 0) printf("Testing schematron : 1 of 10 functions ...\n");
18646 rc = test_xmlSchematronNewDocParserCtxt();
18647 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18648 rc = test_xmlSchematronNewMemParserCtxt();
18649 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18650 rc = test_xmlSchematronNewParserCtxt();
18651 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18652 rc = test_xmlSchematronNewValidCtxt();
18653 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18654 rc = test_xmlSchematronParse();
18655 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18656 rc = test_xmlSchematronSetValidStructuredErrors();
18657 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18658 rc = test_xmlSchematronValidateDoc();
18659 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18662 printf("Module schematron: %d errors\n", test_ret);
18667 test_xmlAddChild(void) {
18671 xmlNodePtr ret_val;
18672 xmlNodePtr parent; /* the parent node */
18674 xmlNodePtr cur; /* the child node */
18677 for (n_parent = 0;n_parent < gen_nb_xmlNodePtr;n_parent++) {
18678 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr_in;n_cur++) {
18679 mem_base = xmlMemBlocks();
18680 parent = gen_xmlNodePtr(n_parent, 0);
18681 cur = gen_xmlNodePtr_in(n_cur, 1);
18683 ret_val = xmlAddChild(parent, cur);
18684 if (ret_val == NULL) { xmlFreeNode(cur) ; cur = NULL ; }
18685 desret_xmlNodePtr(ret_val);
18687 des_xmlNodePtr(n_parent, parent, 0);
18688 des_xmlNodePtr_in(n_cur, cur, 1);
18689 xmlResetLastError();
18690 if (mem_base != xmlMemBlocks()) {
18691 printf("Leak of %d blocks found in xmlAddChild",
18692 xmlMemBlocks() - mem_base);
18694 printf(" %d", n_parent);
18695 printf(" %d", n_cur);
18707 test_xmlAddChildList(void) {
18711 xmlNodePtr ret_val;
18712 xmlNodePtr parent; /* the parent node */
18714 xmlNodePtr cur; /* the first node in the list */
18717 for (n_parent = 0;n_parent < gen_nb_xmlNodePtr;n_parent++) {
18718 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr_in;n_cur++) {
18719 mem_base = xmlMemBlocks();
18720 parent = gen_xmlNodePtr(n_parent, 0);
18721 cur = gen_xmlNodePtr_in(n_cur, 1);
18723 ret_val = xmlAddChildList(parent, cur);
18724 if (ret_val == NULL) { xmlFreeNodeList(cur) ; cur = NULL ; }
18725 desret_xmlNodePtr(ret_val);
18727 des_xmlNodePtr(n_parent, parent, 0);
18728 des_xmlNodePtr_in(n_cur, cur, 1);
18729 xmlResetLastError();
18730 if (mem_base != xmlMemBlocks()) {
18731 printf("Leak of %d blocks found in xmlAddChildList",
18732 xmlMemBlocks() - mem_base);
18734 printf(" %d", n_parent);
18735 printf(" %d", n_cur);
18747 test_xmlAddNextSibling(void) {
18751 xmlNodePtr ret_val;
18752 xmlNodePtr cur; /* the child node */
18754 xmlNodePtr elem; /* the new node */
18757 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
18758 for (n_elem = 0;n_elem < gen_nb_xmlNodePtr_in;n_elem++) {
18759 mem_base = xmlMemBlocks();
18760 cur = gen_xmlNodePtr(n_cur, 0);
18761 elem = gen_xmlNodePtr_in(n_elem, 1);
18763 ret_val = xmlAddNextSibling(cur, elem);
18764 if (ret_val == NULL) { xmlFreeNode(elem) ; elem = NULL ; }
18765 desret_xmlNodePtr(ret_val);
18767 des_xmlNodePtr(n_cur, cur, 0);
18768 des_xmlNodePtr_in(n_elem, elem, 1);
18769 xmlResetLastError();
18770 if (mem_base != xmlMemBlocks()) {
18771 printf("Leak of %d blocks found in xmlAddNextSibling",
18772 xmlMemBlocks() - mem_base);
18774 printf(" %d", n_cur);
18775 printf(" %d", n_elem);
18787 test_xmlAddPrevSibling(void) {
18790 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
18792 xmlNodePtr ret_val;
18793 xmlNodePtr cur; /* the child node */
18795 xmlNodePtr elem; /* the new node */
18798 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
18799 for (n_elem = 0;n_elem < gen_nb_xmlNodePtr_in;n_elem++) {
18800 mem_base = xmlMemBlocks();
18801 cur = gen_xmlNodePtr(n_cur, 0);
18802 elem = gen_xmlNodePtr_in(n_elem, 1);
18804 ret_val = xmlAddPrevSibling(cur, elem);
18805 if (ret_val == NULL) { xmlFreeNode(elem) ; elem = NULL ; }
18806 desret_xmlNodePtr(ret_val);
18808 des_xmlNodePtr(n_cur, cur, 0);
18809 des_xmlNodePtr_in(n_elem, elem, 1);
18810 xmlResetLastError();
18811 if (mem_base != xmlMemBlocks()) {
18812 printf("Leak of %d blocks found in xmlAddPrevSibling",
18813 xmlMemBlocks() - mem_base);
18815 printf(" %d", n_cur);
18816 printf(" %d", n_elem);
18829 test_xmlAddSibling(void) {
18833 xmlNodePtr ret_val;
18834 xmlNodePtr cur; /* the child node */
18836 xmlNodePtr elem; /* the new node */
18839 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
18840 for (n_elem = 0;n_elem < gen_nb_xmlNodePtr_in;n_elem++) {
18841 mem_base = xmlMemBlocks();
18842 cur = gen_xmlNodePtr(n_cur, 0);
18843 elem = gen_xmlNodePtr_in(n_elem, 1);
18845 ret_val = xmlAddSibling(cur, elem);
18846 if (ret_val == NULL) { xmlFreeNode(elem) ; elem = NULL ; }
18847 desret_xmlNodePtr(ret_val);
18849 des_xmlNodePtr(n_cur, cur, 0);
18850 des_xmlNodePtr_in(n_elem, elem, 1);
18851 xmlResetLastError();
18852 if (mem_base != xmlMemBlocks()) {
18853 printf("Leak of %d blocks found in xmlAddSibling",
18854 xmlMemBlocks() - mem_base);
18856 printf(" %d", n_cur);
18857 printf(" %d", n_elem);
18869 test_xmlAttrSerializeTxtContent(void) {
18872 #if defined(LIBXML_OUTPUT_ENABLED)
18873 #ifdef LIBXML_OUTPUT_ENABLED
18875 xmlBufferPtr buf; /* the XML buffer output */
18877 xmlDocPtr doc; /* the document */
18879 xmlAttrPtr attr; /* the attribute node */
18881 xmlChar * string; /* the text content */
18884 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
18885 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
18886 for (n_attr = 0;n_attr < gen_nb_xmlAttrPtr;n_attr++) {
18887 for (n_string = 0;n_string < gen_nb_const_xmlChar_ptr;n_string++) {
18888 mem_base = xmlMemBlocks();
18889 buf = gen_xmlBufferPtr(n_buf, 0);
18890 doc = gen_xmlDocPtr(n_doc, 1);
18891 attr = gen_xmlAttrPtr(n_attr, 2);
18892 string = gen_const_xmlChar_ptr(n_string, 3);
18894 xmlAttrSerializeTxtContent(buf, doc, attr, (const xmlChar *)string);
18896 des_xmlBufferPtr(n_buf, buf, 0);
18897 des_xmlDocPtr(n_doc, doc, 1);
18898 des_xmlAttrPtr(n_attr, attr, 2);
18899 des_const_xmlChar_ptr(n_string, (const xmlChar *)string, 3);
18900 xmlResetLastError();
18901 if (mem_base != xmlMemBlocks()) {
18902 printf("Leak of %d blocks found in xmlAttrSerializeTxtContent",
18903 xmlMemBlocks() - mem_base);
18905 printf(" %d", n_buf);
18906 printf(" %d", n_doc);
18907 printf(" %d", n_attr);
18908 printf(" %d", n_string);
18923 #define gen_nb_const_xmlBuf_ptr 1
18924 static xmlBuf * gen_const_xmlBuf_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
18927 static void des_const_xmlBuf_ptr(int no ATTRIBUTE_UNUSED, const xmlBuf * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
18931 test_xmlBufContent(void) {
18936 xmlBuf * buf; /* the buffer */
18939 for (n_buf = 0;n_buf < gen_nb_const_xmlBuf_ptr;n_buf++) {
18940 mem_base = xmlMemBlocks();
18941 buf = gen_const_xmlBuf_ptr(n_buf, 0);
18943 ret_val = xmlBufContent((const xmlBuf *)buf);
18944 desret_xmlChar_ptr(ret_val);
18946 des_const_xmlBuf_ptr(n_buf, (const xmlBuf *)buf, 0);
18947 xmlResetLastError();
18948 if (mem_base != xmlMemBlocks()) {
18949 printf("Leak of %d blocks found in xmlBufContent",
18950 xmlMemBlocks() - mem_base);
18952 printf(" %d", n_buf);
18962 #define gen_nb_xmlBufPtr 1
18963 static xmlBufPtr gen_xmlBufPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
18966 static void des_xmlBufPtr(int no ATTRIBUTE_UNUSED, xmlBufPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
18970 test_xmlBufEnd(void) {
18975 xmlBufPtr buf; /* the buffer */
18978 for (n_buf = 0;n_buf < gen_nb_xmlBufPtr;n_buf++) {
18979 mem_base = xmlMemBlocks();
18980 buf = gen_xmlBufPtr(n_buf, 0);
18982 ret_val = xmlBufEnd(buf);
18983 desret_xmlChar_ptr(ret_val);
18985 des_xmlBufPtr(n_buf, buf, 0);
18986 xmlResetLastError();
18987 if (mem_base != xmlMemBlocks()) {
18988 printf("Leak of %d blocks found in xmlBufEnd",
18989 xmlMemBlocks() - mem_base);
18991 printf(" %d", n_buf);
19001 #define gen_nb_const_xmlNode_ptr 1
19002 static xmlNode * gen_const_xmlNode_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
19005 static void des_const_xmlNode_ptr(int no ATTRIBUTE_UNUSED, const xmlNode * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
19009 test_xmlBufGetNodeContent(void) {
19014 xmlBufPtr buf; /* a buffer xmlBufPtr */
19016 xmlNode * cur; /* the node being read */
19019 for (n_buf = 0;n_buf < gen_nb_xmlBufPtr;n_buf++) {
19020 for (n_cur = 0;n_cur < gen_nb_const_xmlNode_ptr;n_cur++) {
19021 mem_base = xmlMemBlocks();
19022 buf = gen_xmlBufPtr(n_buf, 0);
19023 cur = gen_const_xmlNode_ptr(n_cur, 1);
19025 ret_val = xmlBufGetNodeContent(buf, (const xmlNode *)cur);
19026 desret_int(ret_val);
19028 des_xmlBufPtr(n_buf, buf, 0);
19029 des_const_xmlNode_ptr(n_cur, (const xmlNode *)cur, 1);
19030 xmlResetLastError();
19031 if (mem_base != xmlMemBlocks()) {
19032 printf("Leak of %d blocks found in xmlBufGetNodeContent",
19033 xmlMemBlocks() - mem_base);
19035 printf(" %d", n_buf);
19036 printf(" %d", n_cur);
19048 test_xmlBufNodeDump(void) {
19052 /* missing type support */
19058 test_xmlBufShrink(void) {
19062 /* missing type support */
19067 #define gen_nb_const_xmlBufPtr 1
19068 static xmlBufPtr gen_const_xmlBufPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
19071 static void des_const_xmlBufPtr(int no ATTRIBUTE_UNUSED, const xmlBufPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
19075 test_xmlBufUse(void) {
19079 /* missing type support */
19085 test_xmlBufferAdd(void) {
19090 xmlBufferPtr buf; /* the buffer to dump */
19092 xmlChar * str; /* the #xmlChar string */
19094 int len; /* the number of #xmlChar to add */
19097 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
19098 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
19099 for (n_len = 0;n_len < gen_nb_int;n_len++) {
19100 mem_base = xmlMemBlocks();
19101 buf = gen_xmlBufferPtr(n_buf, 0);
19102 str = gen_const_xmlChar_ptr(n_str, 1);
19103 len = gen_int(n_len, 2);
19104 if ((str != NULL) &&
19105 (len > (int) strlen((const char *) str) + 1))
19108 ret_val = xmlBufferAdd(buf, (const xmlChar *)str, len);
19109 desret_int(ret_val);
19111 des_xmlBufferPtr(n_buf, buf, 0);
19112 des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 1);
19113 des_int(n_len, len, 2);
19114 xmlResetLastError();
19115 if (mem_base != xmlMemBlocks()) {
19116 printf("Leak of %d blocks found in xmlBufferAdd",
19117 xmlMemBlocks() - mem_base);
19119 printf(" %d", n_buf);
19120 printf(" %d", n_str);
19121 printf(" %d", n_len);
19134 test_xmlBufferAddHead(void) {
19139 xmlBufferPtr buf; /* the buffer */
19141 xmlChar * str; /* the #xmlChar string */
19143 int len; /* the number of #xmlChar to add */
19146 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
19147 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
19148 for (n_len = 0;n_len < gen_nb_int;n_len++) {
19149 mem_base = xmlMemBlocks();
19150 buf = gen_xmlBufferPtr(n_buf, 0);
19151 str = gen_const_xmlChar_ptr(n_str, 1);
19152 len = gen_int(n_len, 2);
19153 if ((str != NULL) &&
19154 (len > (int) strlen((const char *) str) + 1))
19157 ret_val = xmlBufferAddHead(buf, (const xmlChar *)str, len);
19158 desret_int(ret_val);
19160 des_xmlBufferPtr(n_buf, buf, 0);
19161 des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 1);
19162 des_int(n_len, len, 2);
19163 xmlResetLastError();
19164 if (mem_base != xmlMemBlocks()) {
19165 printf("Leak of %d blocks found in xmlBufferAddHead",
19166 xmlMemBlocks() - mem_base);
19168 printf(" %d", n_buf);
19169 printf(" %d", n_str);
19170 printf(" %d", n_len);
19183 test_xmlBufferCCat(void) {
19188 xmlBufferPtr buf; /* the buffer to dump */
19190 char * str; /* the C char string */
19193 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
19194 for (n_str = 0;n_str < gen_nb_const_char_ptr;n_str++) {
19195 mem_base = xmlMemBlocks();
19196 buf = gen_xmlBufferPtr(n_buf, 0);
19197 str = gen_const_char_ptr(n_str, 1);
19199 ret_val = xmlBufferCCat(buf, (const char *)str);
19200 desret_int(ret_val);
19202 des_xmlBufferPtr(n_buf, buf, 0);
19203 des_const_char_ptr(n_str, (const char *)str, 1);
19204 xmlResetLastError();
19205 if (mem_base != xmlMemBlocks()) {
19206 printf("Leak of %d blocks found in xmlBufferCCat",
19207 xmlMemBlocks() - mem_base);
19209 printf(" %d", n_buf);
19210 printf(" %d", n_str);
19222 test_xmlBufferCat(void) {
19227 xmlBufferPtr buf; /* the buffer to add to */
19229 xmlChar * str; /* the #xmlChar string */
19232 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
19233 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
19234 mem_base = xmlMemBlocks();
19235 buf = gen_xmlBufferPtr(n_buf, 0);
19236 str = gen_const_xmlChar_ptr(n_str, 1);
19238 ret_val = xmlBufferCat(buf, (const xmlChar *)str);
19239 desret_int(ret_val);
19241 des_xmlBufferPtr(n_buf, buf, 0);
19242 des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 1);
19243 xmlResetLastError();
19244 if (mem_base != xmlMemBlocks()) {
19245 printf("Leak of %d blocks found in xmlBufferCat",
19246 xmlMemBlocks() - mem_base);
19248 printf(" %d", n_buf);
19249 printf(" %d", n_str);
19260 #define gen_nb_const_xmlBuffer_ptr 1
19261 static xmlBuffer * gen_const_xmlBuffer_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
19264 static void des_const_xmlBuffer_ptr(int no ATTRIBUTE_UNUSED, const xmlBuffer * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
19268 test_xmlBufferContent(void) {
19272 const xmlChar * ret_val;
19273 xmlBuffer * buf; /* the buffer */
19276 for (n_buf = 0;n_buf < gen_nb_const_xmlBuffer_ptr;n_buf++) {
19277 mem_base = xmlMemBlocks();
19278 buf = gen_const_xmlBuffer_ptr(n_buf, 0);
19280 ret_val = xmlBufferContent((const xmlBuffer *)buf);
19281 desret_const_xmlChar_ptr(ret_val);
19283 des_const_xmlBuffer_ptr(n_buf, (const xmlBuffer *)buf, 0);
19284 xmlResetLastError();
19285 if (mem_base != xmlMemBlocks()) {
19286 printf("Leak of %d blocks found in xmlBufferContent",
19287 xmlMemBlocks() - mem_base);
19289 printf(" %d", n_buf);
19300 test_xmlBufferCreate(void) {
19304 xmlBufferPtr ret_val;
19306 mem_base = xmlMemBlocks();
19308 ret_val = xmlBufferCreate();
19309 desret_xmlBufferPtr(ret_val);
19311 xmlResetLastError();
19312 if (mem_base != xmlMemBlocks()) {
19313 printf("Leak of %d blocks found in xmlBufferCreate",
19314 xmlMemBlocks() - mem_base);
19325 test_xmlBufferCreateSize(void) {
19329 /* missing type support */
19335 test_xmlBufferCreateStatic(void) {
19339 /* missing type support */
19345 test_xmlBufferDetach(void) {
19350 xmlBufferPtr buf; /* the buffer */
19353 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
19354 mem_base = xmlMemBlocks();
19355 buf = gen_xmlBufferPtr(n_buf, 0);
19357 ret_val = xmlBufferDetach(buf);
19358 desret_xmlChar_ptr(ret_val);
19360 des_xmlBufferPtr(n_buf, buf, 0);
19361 xmlResetLastError();
19362 if (mem_base != xmlMemBlocks()) {
19363 printf("Leak of %d blocks found in xmlBufferDetach",
19364 xmlMemBlocks() - mem_base);
19366 printf(" %d", n_buf);
19377 test_xmlBufferEmpty(void) {
19381 xmlBufferPtr buf; /* the buffer */
19384 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
19385 mem_base = xmlMemBlocks();
19386 buf = gen_xmlBufferPtr(n_buf, 0);
19388 xmlBufferEmpty(buf);
19390 des_xmlBufferPtr(n_buf, buf, 0);
19391 xmlResetLastError();
19392 if (mem_base != xmlMemBlocks()) {
19393 printf("Leak of %d blocks found in xmlBufferEmpty",
19394 xmlMemBlocks() - mem_base);
19396 printf(" %d", n_buf);
19407 test_xmlBufferGrow(void) {
19412 xmlBufferPtr buf; /* the buffer */
19414 unsigned int len; /* the minimum free size to allocate */
19417 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
19418 for (n_len = 0;n_len < gen_nb_unsigned_int;n_len++) {
19419 mem_base = xmlMemBlocks();
19420 buf = gen_xmlBufferPtr(n_buf, 0);
19421 len = gen_unsigned_int(n_len, 1);
19423 ret_val = xmlBufferGrow(buf, len);
19424 desret_int(ret_val);
19426 des_xmlBufferPtr(n_buf, buf, 0);
19427 des_unsigned_int(n_len, len, 1);
19428 xmlResetLastError();
19429 if (mem_base != xmlMemBlocks()) {
19430 printf("Leak of %d blocks found in xmlBufferGrow",
19431 xmlMemBlocks() - mem_base);
19433 printf(" %d", n_buf);
19434 printf(" %d", n_len);
19446 test_xmlBufferLength(void) {
19451 xmlBuffer * buf; /* the buffer */
19454 for (n_buf = 0;n_buf < gen_nb_const_xmlBuffer_ptr;n_buf++) {
19455 mem_base = xmlMemBlocks();
19456 buf = gen_const_xmlBuffer_ptr(n_buf, 0);
19458 ret_val = xmlBufferLength((const xmlBuffer *)buf);
19459 desret_int(ret_val);
19461 des_const_xmlBuffer_ptr(n_buf, (const xmlBuffer *)buf, 0);
19462 xmlResetLastError();
19463 if (mem_base != xmlMemBlocks()) {
19464 printf("Leak of %d blocks found in xmlBufferLength",
19465 xmlMemBlocks() - mem_base);
19467 printf(" %d", n_buf);
19478 test_xmlBufferResize(void) {
19483 xmlBufferPtr buf; /* the buffer to resize */
19485 unsigned int size; /* the desired size */
19488 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
19489 for (n_size = 0;n_size < gen_nb_unsigned_int;n_size++) {
19490 mem_base = xmlMemBlocks();
19491 buf = gen_xmlBufferPtr(n_buf, 0);
19492 size = gen_unsigned_int(n_size, 1);
19494 ret_val = xmlBufferResize(buf, size);
19495 desret_int(ret_val);
19497 des_xmlBufferPtr(n_buf, buf, 0);
19498 des_unsigned_int(n_size, size, 1);
19499 xmlResetLastError();
19500 if (mem_base != xmlMemBlocks()) {
19501 printf("Leak of %d blocks found in xmlBufferResize",
19502 xmlMemBlocks() - mem_base);
19504 printf(" %d", n_buf);
19505 printf(" %d", n_size);
19517 test_xmlBufferSetAllocationScheme(void) {
19521 xmlBufferPtr buf; /* the buffer to tune */
19523 xmlBufferAllocationScheme scheme; /* allocation scheme to use */
19526 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
19527 for (n_scheme = 0;n_scheme < gen_nb_xmlBufferAllocationScheme;n_scheme++) {
19528 mem_base = xmlMemBlocks();
19529 buf = gen_xmlBufferPtr(n_buf, 0);
19530 scheme = gen_xmlBufferAllocationScheme(n_scheme, 1);
19532 xmlBufferSetAllocationScheme(buf, scheme);
19533 if ((buf != NULL) && (scheme == XML_BUFFER_ALLOC_IMMUTABLE) && (buf->content != NULL) && (buf->content != static_buf_content)) { xmlFree(buf->content); buf->content = NULL;}
19535 des_xmlBufferPtr(n_buf, buf, 0);
19536 des_xmlBufferAllocationScheme(n_scheme, scheme, 1);
19537 xmlResetLastError();
19538 if (mem_base != xmlMemBlocks()) {
19539 printf("Leak of %d blocks found in xmlBufferSetAllocationScheme",
19540 xmlMemBlocks() - mem_base);
19542 printf(" %d", n_buf);
19543 printf(" %d", n_scheme);
19555 test_xmlBufferShrink(void) {
19560 xmlBufferPtr buf; /* the buffer to dump */
19562 unsigned int len; /* the number of xmlChar to remove */
19565 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
19566 for (n_len = 0;n_len < gen_nb_unsigned_int;n_len++) {
19567 mem_base = xmlMemBlocks();
19568 buf = gen_xmlBufferPtr(n_buf, 0);
19569 len = gen_unsigned_int(n_len, 1);
19571 ret_val = xmlBufferShrink(buf, len);
19572 desret_int(ret_val);
19574 des_xmlBufferPtr(n_buf, buf, 0);
19575 des_unsigned_int(n_len, len, 1);
19576 xmlResetLastError();
19577 if (mem_base != xmlMemBlocks()) {
19578 printf("Leak of %d blocks found in xmlBufferShrink",
19579 xmlMemBlocks() - mem_base);
19581 printf(" %d", n_buf);
19582 printf(" %d", n_len);
19594 test_xmlBufferWriteCHAR(void) {
19598 xmlBufferPtr buf; /* the XML buffer */
19600 xmlChar * string; /* the string to add */
19603 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
19604 for (n_string = 0;n_string < gen_nb_const_xmlChar_ptr;n_string++) {
19605 mem_base = xmlMemBlocks();
19606 buf = gen_xmlBufferPtr(n_buf, 0);
19607 string = gen_const_xmlChar_ptr(n_string, 1);
19609 xmlBufferWriteCHAR(buf, (const xmlChar *)string);
19611 des_xmlBufferPtr(n_buf, buf, 0);
19612 des_const_xmlChar_ptr(n_string, (const xmlChar *)string, 1);
19613 xmlResetLastError();
19614 if (mem_base != xmlMemBlocks()) {
19615 printf("Leak of %d blocks found in xmlBufferWriteCHAR",
19616 xmlMemBlocks() - mem_base);
19618 printf(" %d", n_buf);
19619 printf(" %d", n_string);
19631 test_xmlBufferWriteChar(void) {
19635 xmlBufferPtr buf; /* the XML buffer output */
19637 char * string; /* the string to add */
19640 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
19641 for (n_string = 0;n_string < gen_nb_const_char_ptr;n_string++) {
19642 mem_base = xmlMemBlocks();
19643 buf = gen_xmlBufferPtr(n_buf, 0);
19644 string = gen_const_char_ptr(n_string, 1);
19646 xmlBufferWriteChar(buf, (const char *)string);
19648 des_xmlBufferPtr(n_buf, buf, 0);
19649 des_const_char_ptr(n_string, (const char *)string, 1);
19650 xmlResetLastError();
19651 if (mem_base != xmlMemBlocks()) {
19652 printf("Leak of %d blocks found in xmlBufferWriteChar",
19653 xmlMemBlocks() - mem_base);
19655 printf(" %d", n_buf);
19656 printf(" %d", n_string);
19668 test_xmlBufferWriteQuotedString(void) {
19672 xmlBufferPtr buf; /* the XML buffer output */
19674 xmlChar * string; /* the string to add */
19677 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
19678 for (n_string = 0;n_string < gen_nb_const_xmlChar_ptr;n_string++) {
19679 mem_base = xmlMemBlocks();
19680 buf = gen_xmlBufferPtr(n_buf, 0);
19681 string = gen_const_xmlChar_ptr(n_string, 1);
19683 xmlBufferWriteQuotedString(buf, (const xmlChar *)string);
19685 des_xmlBufferPtr(n_buf, buf, 0);
19686 des_const_xmlChar_ptr(n_string, (const xmlChar *)string, 1);
19687 xmlResetLastError();
19688 if (mem_base != xmlMemBlocks()) {
19689 printf("Leak of %d blocks found in xmlBufferWriteQuotedString",
19690 xmlMemBlocks() - mem_base);
19692 printf(" %d", n_buf);
19693 printf(" %d", n_string);
19705 test_xmlBuildQName(void) {
19710 xmlChar * ncname; /* the Name */
19712 xmlChar * prefix; /* the prefix */
19714 xmlChar * memory; /* preallocated memory */
19716 int len; /* preallocated memory length */
19719 for (n_ncname = 0;n_ncname < gen_nb_const_xmlChar_ptr;n_ncname++) {
19720 for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
19721 for (n_memory = 0;n_memory < gen_nb_xmlChar_ptr;n_memory++) {
19722 for (n_len = 0;n_len < gen_nb_int;n_len++) {
19723 mem_base = xmlMemBlocks();
19724 ncname = gen_const_xmlChar_ptr(n_ncname, 0);
19725 prefix = gen_const_xmlChar_ptr(n_prefix, 1);
19726 memory = gen_xmlChar_ptr(n_memory, 2);
19727 len = gen_int(n_len, 3);
19728 if ((prefix != NULL) &&
19729 (len > (int) strlen((const char *) prefix) + 1))
19732 ret_val = xmlBuildQName((const xmlChar *)ncname, (const xmlChar *)prefix, memory, len);
19733 if ((ret_val != NULL) && (ret_val != ncname) &&
19734 (ret_val != prefix) && (ret_val != memory))
19737 desret_xmlChar_ptr(ret_val);
19739 des_const_xmlChar_ptr(n_ncname, (const xmlChar *)ncname, 0);
19740 des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 1);
19741 des_xmlChar_ptr(n_memory, memory, 2);
19742 des_int(n_len, len, 3);
19743 xmlResetLastError();
19744 if (mem_base != xmlMemBlocks()) {
19745 printf("Leak of %d blocks found in xmlBuildQName",
19746 xmlMemBlocks() - mem_base);
19748 printf(" %d", n_ncname);
19749 printf(" %d", n_prefix);
19750 printf(" %d", n_memory);
19751 printf(" %d", n_len);
19765 test_xmlChildElementCount(void) {
19768 #if defined(LIBXML_TREE_ENABLED)
19770 unsigned long ret_val;
19771 xmlNodePtr parent; /* the parent node */
19774 for (n_parent = 0;n_parent < gen_nb_xmlNodePtr;n_parent++) {
19775 mem_base = xmlMemBlocks();
19776 parent = gen_xmlNodePtr(n_parent, 0);
19778 ret_val = xmlChildElementCount(parent);
19779 desret_unsigned_long(ret_val);
19781 des_xmlNodePtr(n_parent, parent, 0);
19782 xmlResetLastError();
19783 if (mem_base != xmlMemBlocks()) {
19784 printf("Leak of %d blocks found in xmlChildElementCount",
19785 xmlMemBlocks() - mem_base);
19787 printf(" %d", n_parent);
19799 test_xmlCopyDoc(void) {
19802 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
19805 xmlDocPtr doc; /* the document */
19807 int recursive; /* if not zero do a recursive copy. */
19810 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
19811 for (n_recursive = 0;n_recursive < gen_nb_int;n_recursive++) {
19812 mem_base = xmlMemBlocks();
19813 doc = gen_xmlDocPtr(n_doc, 0);
19814 recursive = gen_int(n_recursive, 1);
19816 ret_val = xmlCopyDoc(doc, recursive);
19817 desret_xmlDocPtr(ret_val);
19819 des_xmlDocPtr(n_doc, doc, 0);
19820 des_int(n_recursive, recursive, 1);
19821 xmlResetLastError();
19822 if (mem_base != xmlMemBlocks()) {
19823 printf("Leak of %d blocks found in xmlCopyDoc",
19824 xmlMemBlocks() - mem_base);
19826 printf(" %d", n_doc);
19827 printf(" %d", n_recursive);
19840 test_xmlCopyDtd(void) {
19843 #if defined(LIBXML_TREE_ENABLED)
19846 xmlDtdPtr dtd; /* the dtd */
19849 for (n_dtd = 0;n_dtd < gen_nb_xmlDtdPtr;n_dtd++) {
19850 mem_base = xmlMemBlocks();
19851 dtd = gen_xmlDtdPtr(n_dtd, 0);
19853 ret_val = xmlCopyDtd(dtd);
19854 desret_xmlDtdPtr(ret_val);
19856 des_xmlDtdPtr(n_dtd, dtd, 0);
19857 xmlResetLastError();
19858 if (mem_base != xmlMemBlocks()) {
19859 printf("Leak of %d blocks found in xmlCopyDtd",
19860 xmlMemBlocks() - mem_base);
19862 printf(" %d", n_dtd);
19874 test_xmlCopyNamespace(void) {
19879 xmlNsPtr cur; /* the namespace */
19882 for (n_cur = 0;n_cur < gen_nb_xmlNsPtr;n_cur++) {
19883 mem_base = xmlMemBlocks();
19884 cur = gen_xmlNsPtr(n_cur, 0);
19886 ret_val = xmlCopyNamespace(cur);
19887 if (ret_val != NULL) xmlFreeNs(ret_val);
19888 desret_xmlNsPtr(ret_val);
19890 des_xmlNsPtr(n_cur, cur, 0);
19891 xmlResetLastError();
19892 if (mem_base != xmlMemBlocks()) {
19893 printf("Leak of %d blocks found in xmlCopyNamespace",
19894 xmlMemBlocks() - mem_base);
19896 printf(" %d", n_cur);
19907 test_xmlCopyNamespaceList(void) {
19912 xmlNsPtr cur; /* the first namespace */
19915 for (n_cur = 0;n_cur < gen_nb_xmlNsPtr;n_cur++) {
19916 mem_base = xmlMemBlocks();
19917 cur = gen_xmlNsPtr(n_cur, 0);
19919 ret_val = xmlCopyNamespaceList(cur);
19920 if (ret_val != NULL) xmlFreeNsList(ret_val);
19921 desret_xmlNsPtr(ret_val);
19923 des_xmlNsPtr(n_cur, cur, 0);
19924 xmlResetLastError();
19925 if (mem_base != xmlMemBlocks()) {
19926 printf("Leak of %d blocks found in xmlCopyNamespaceList",
19927 xmlMemBlocks() - mem_base);
19929 printf(" %d", n_cur);
19940 test_xmlCopyNode(void) {
19944 xmlNodePtr ret_val;
19945 xmlNodePtr node; /* the node */
19947 int extended; /* if 1 do a recursive copy (properties, namespaces and children when applicable) if 2 copy properties and namespaces (when applicable) */
19950 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
19951 for (n_extended = 0;n_extended < gen_nb_int;n_extended++) {
19952 mem_base = xmlMemBlocks();
19953 node = gen_xmlNodePtr(n_node, 0);
19954 extended = gen_int(n_extended, 1);
19956 ret_val = xmlCopyNode(node, extended);
19957 desret_xmlNodePtr(ret_val);
19959 des_xmlNodePtr(n_node, node, 0);
19960 des_int(n_extended, extended, 1);
19961 xmlResetLastError();
19962 if (mem_base != xmlMemBlocks()) {
19963 printf("Leak of %d blocks found in xmlCopyNode",
19964 xmlMemBlocks() - mem_base);
19966 printf(" %d", n_node);
19967 printf(" %d", n_extended);
19979 test_xmlCopyNodeList(void) {
19983 xmlNodePtr ret_val;
19984 xmlNodePtr node; /* the first node in the list. */
19987 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
19988 mem_base = xmlMemBlocks();
19989 node = gen_xmlNodePtr(n_node, 0);
19991 ret_val = xmlCopyNodeList(node);
19992 desret_xmlNodePtr(ret_val);
19994 des_xmlNodePtr(n_node, node, 0);
19995 xmlResetLastError();
19996 if (mem_base != xmlMemBlocks()) {
19997 printf("Leak of %d blocks found in xmlCopyNodeList",
19998 xmlMemBlocks() - mem_base);
20000 printf(" %d", n_node);
20011 test_xmlCopyProp(void) {
20015 xmlAttrPtr ret_val;
20016 xmlNodePtr target; /* the element where the attribute will be grafted */
20018 xmlAttrPtr cur; /* the attribute */
20021 for (n_target = 0;n_target < gen_nb_xmlNodePtr;n_target++) {
20022 for (n_cur = 0;n_cur < gen_nb_xmlAttrPtr;n_cur++) {
20023 mem_base = xmlMemBlocks();
20024 target = gen_xmlNodePtr(n_target, 0);
20025 cur = gen_xmlAttrPtr(n_cur, 1);
20027 ret_val = xmlCopyProp(target, cur);
20028 desret_xmlAttrPtr(ret_val);
20030 des_xmlNodePtr(n_target, target, 0);
20031 des_xmlAttrPtr(n_cur, cur, 1);
20032 xmlResetLastError();
20033 if (mem_base != xmlMemBlocks()) {
20034 printf("Leak of %d blocks found in xmlCopyProp",
20035 xmlMemBlocks() - mem_base);
20037 printf(" %d", n_target);
20038 printf(" %d", n_cur);
20050 test_xmlCopyPropList(void) {
20054 xmlAttrPtr ret_val;
20055 xmlNodePtr target; /* the element where the attributes will be grafted */
20057 xmlAttrPtr cur; /* the first attribute */
20060 for (n_target = 0;n_target < gen_nb_xmlNodePtr;n_target++) {
20061 for (n_cur = 0;n_cur < gen_nb_xmlAttrPtr;n_cur++) {
20062 mem_base = xmlMemBlocks();
20063 target = gen_xmlNodePtr(n_target, 0);
20064 cur = gen_xmlAttrPtr(n_cur, 1);
20066 ret_val = xmlCopyPropList(target, cur);
20067 desret_xmlAttrPtr(ret_val);
20069 des_xmlNodePtr(n_target, target, 0);
20070 des_xmlAttrPtr(n_cur, cur, 1);
20071 xmlResetLastError();
20072 if (mem_base != xmlMemBlocks()) {
20073 printf("Leak of %d blocks found in xmlCopyPropList",
20074 xmlMemBlocks() - mem_base);
20076 printf(" %d", n_target);
20077 printf(" %d", n_cur);
20089 test_xmlCreateIntSubset(void) {
20094 xmlDocPtr doc; /* the document pointer */
20096 xmlChar * name; /* the DTD name */
20098 xmlChar * ExternalID; /* the external (PUBLIC) ID */
20100 xmlChar * SystemID; /* the system ID */
20103 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
20104 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
20105 for (n_ExternalID = 0;n_ExternalID < gen_nb_const_xmlChar_ptr;n_ExternalID++) {
20106 for (n_SystemID = 0;n_SystemID < gen_nb_const_xmlChar_ptr;n_SystemID++) {
20107 mem_base = xmlMemBlocks();
20108 doc = gen_xmlDocPtr(n_doc, 0);
20109 name = gen_const_xmlChar_ptr(n_name, 1);
20110 ExternalID = gen_const_xmlChar_ptr(n_ExternalID, 2);
20111 SystemID = gen_const_xmlChar_ptr(n_SystemID, 3);
20113 ret_val = xmlCreateIntSubset(doc, (const xmlChar *)name, (const xmlChar *)ExternalID, (const xmlChar *)SystemID);
20114 desret_xmlDtdPtr(ret_val);
20116 des_xmlDocPtr(n_doc, doc, 0);
20117 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
20118 des_const_xmlChar_ptr(n_ExternalID, (const xmlChar *)ExternalID, 2);
20119 des_const_xmlChar_ptr(n_SystemID, (const xmlChar *)SystemID, 3);
20120 xmlResetLastError();
20121 if (mem_base != xmlMemBlocks()) {
20122 printf("Leak of %d blocks found in xmlCreateIntSubset",
20123 xmlMemBlocks() - mem_base);
20125 printf(" %d", n_doc);
20126 printf(" %d", n_name);
20127 printf(" %d", n_ExternalID);
20128 printf(" %d", n_SystemID);
20141 #define gen_nb_xmlDOMWrapCtxtPtr 1
20142 static xmlDOMWrapCtxtPtr gen_xmlDOMWrapCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
20145 static void des_xmlDOMWrapCtxtPtr(int no ATTRIBUTE_UNUSED, xmlDOMWrapCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
20149 test_xmlDOMWrapAdoptNode(void) {
20154 xmlDOMWrapCtxtPtr ctxt; /* the optional context for custom processing */
20156 xmlDocPtr sourceDoc; /* the optional sourceDoc */
20158 xmlNodePtr node; /* the node to start with */
20160 xmlDocPtr destDoc; /* the destination doc */
20162 xmlNodePtr destParent; /* the optional new parent of @node in @destDoc */
20164 int options; /* option flags */
20167 for (n_ctxt = 0;n_ctxt < gen_nb_xmlDOMWrapCtxtPtr;n_ctxt++) {
20168 for (n_sourceDoc = 0;n_sourceDoc < gen_nb_xmlDocPtr;n_sourceDoc++) {
20169 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
20170 for (n_destDoc = 0;n_destDoc < gen_nb_xmlDocPtr;n_destDoc++) {
20171 for (n_destParent = 0;n_destParent < gen_nb_xmlNodePtr;n_destParent++) {
20172 for (n_options = 0;n_options < gen_nb_int;n_options++) {
20173 mem_base = xmlMemBlocks();
20174 ctxt = gen_xmlDOMWrapCtxtPtr(n_ctxt, 0);
20175 sourceDoc = gen_xmlDocPtr(n_sourceDoc, 1);
20176 node = gen_xmlNodePtr(n_node, 2);
20177 destDoc = gen_xmlDocPtr(n_destDoc, 3);
20178 destParent = gen_xmlNodePtr(n_destParent, 4);
20179 options = gen_int(n_options, 5);
20181 ret_val = xmlDOMWrapAdoptNode(ctxt, sourceDoc, node, destDoc, destParent, options);
20182 if ((node != NULL) && (node->parent == NULL)) {xmlUnlinkNode(node);xmlFreeNode(node);node = NULL;}
20183 desret_int(ret_val);
20185 des_xmlDOMWrapCtxtPtr(n_ctxt, ctxt, 0);
20186 des_xmlDocPtr(n_sourceDoc, sourceDoc, 1);
20187 des_xmlNodePtr(n_node, node, 2);
20188 des_xmlDocPtr(n_destDoc, destDoc, 3);
20189 des_xmlNodePtr(n_destParent, destParent, 4);
20190 des_int(n_options, options, 5);
20191 xmlResetLastError();
20192 if (mem_base != xmlMemBlocks()) {
20193 printf("Leak of %d blocks found in xmlDOMWrapAdoptNode",
20194 xmlMemBlocks() - mem_base);
20196 printf(" %d", n_ctxt);
20197 printf(" %d", n_sourceDoc);
20198 printf(" %d", n_node);
20199 printf(" %d", n_destDoc);
20200 printf(" %d", n_destParent);
20201 printf(" %d", n_options);
20217 test_xmlDOMWrapCloneNode(void) {
20222 xmlDOMWrapCtxtPtr ctxt; /* the optional context for custom processing */
20224 xmlDocPtr sourceDoc; /* the optional sourceDoc */
20226 xmlNodePtr node; /* the node to start with */
20228 xmlNodePtr * resNode; /* the clone of the given @node */
20230 xmlDocPtr destDoc; /* the destination doc */
20232 xmlNodePtr destParent; /* the optional new parent of @node in @destDoc */
20234 int deep; /* descend into child if set */
20236 int options; /* option flags */
20239 for (n_ctxt = 0;n_ctxt < gen_nb_xmlDOMWrapCtxtPtr;n_ctxt++) {
20240 for (n_sourceDoc = 0;n_sourceDoc < gen_nb_xmlDocPtr;n_sourceDoc++) {
20241 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
20242 for (n_resNode = 0;n_resNode < gen_nb_xmlNodePtr_ptr;n_resNode++) {
20243 for (n_destDoc = 0;n_destDoc < gen_nb_xmlDocPtr;n_destDoc++) {
20244 for (n_destParent = 0;n_destParent < gen_nb_xmlNodePtr;n_destParent++) {
20245 for (n_deep = 0;n_deep < gen_nb_int;n_deep++) {
20246 for (n_options = 0;n_options < gen_nb_int;n_options++) {
20247 mem_base = xmlMemBlocks();
20248 ctxt = gen_xmlDOMWrapCtxtPtr(n_ctxt, 0);
20249 sourceDoc = gen_xmlDocPtr(n_sourceDoc, 1);
20250 node = gen_xmlNodePtr(n_node, 2);
20251 resNode = gen_xmlNodePtr_ptr(n_resNode, 3);
20252 destDoc = gen_xmlDocPtr(n_destDoc, 4);
20253 destParent = gen_xmlNodePtr(n_destParent, 5);
20254 deep = gen_int(n_deep, 6);
20255 options = gen_int(n_options, 7);
20257 ret_val = xmlDOMWrapCloneNode(ctxt, sourceDoc, node, resNode, destDoc, destParent, deep, options);
20258 desret_int(ret_val);
20260 des_xmlDOMWrapCtxtPtr(n_ctxt, ctxt, 0);
20261 des_xmlDocPtr(n_sourceDoc, sourceDoc, 1);
20262 des_xmlNodePtr(n_node, node, 2);
20263 des_xmlNodePtr_ptr(n_resNode, resNode, 3);
20264 des_xmlDocPtr(n_destDoc, destDoc, 4);
20265 des_xmlNodePtr(n_destParent, destParent, 5);
20266 des_int(n_deep, deep, 6);
20267 des_int(n_options, options, 7);
20268 xmlResetLastError();
20269 if (mem_base != xmlMemBlocks()) {
20270 printf("Leak of %d blocks found in xmlDOMWrapCloneNode",
20271 xmlMemBlocks() - mem_base);
20273 printf(" %d", n_ctxt);
20274 printf(" %d", n_sourceDoc);
20275 printf(" %d", n_node);
20276 printf(" %d", n_resNode);
20277 printf(" %d", n_destDoc);
20278 printf(" %d", n_destParent);
20279 printf(" %d", n_deep);
20280 printf(" %d", n_options);
20298 test_xmlDOMWrapNewCtxt(void) {
20302 /* missing type support */
20308 test_xmlDOMWrapReconcileNamespaces(void) {
20313 xmlDOMWrapCtxtPtr ctxt; /* DOM wrapper context, unused at the moment */
20315 xmlNodePtr elem; /* the element-node */
20317 int options; /* option flags */
20320 for (n_ctxt = 0;n_ctxt < gen_nb_xmlDOMWrapCtxtPtr;n_ctxt++) {
20321 for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
20322 for (n_options = 0;n_options < gen_nb_int;n_options++) {
20323 mem_base = xmlMemBlocks();
20324 ctxt = gen_xmlDOMWrapCtxtPtr(n_ctxt, 0);
20325 elem = gen_xmlNodePtr(n_elem, 1);
20326 options = gen_int(n_options, 2);
20328 ret_val = xmlDOMWrapReconcileNamespaces(ctxt, elem, options);
20329 desret_int(ret_val);
20331 des_xmlDOMWrapCtxtPtr(n_ctxt, ctxt, 0);
20332 des_xmlNodePtr(n_elem, elem, 1);
20333 des_int(n_options, options, 2);
20334 xmlResetLastError();
20335 if (mem_base != xmlMemBlocks()) {
20336 printf("Leak of %d blocks found in xmlDOMWrapReconcileNamespaces",
20337 xmlMemBlocks() - mem_base);
20339 printf(" %d", n_ctxt);
20340 printf(" %d", n_elem);
20341 printf(" %d", n_options);
20354 test_xmlDOMWrapRemoveNode(void) {
20359 xmlDOMWrapCtxtPtr ctxt; /* a DOM wrapper context */
20361 xmlDocPtr doc; /* the doc */
20363 xmlNodePtr node; /* the node to be removed. */
20365 int options; /* set of options, unused at the moment */
20368 for (n_ctxt = 0;n_ctxt < gen_nb_xmlDOMWrapCtxtPtr;n_ctxt++) {
20369 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
20370 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
20371 for (n_options = 0;n_options < gen_nb_int;n_options++) {
20372 mem_base = xmlMemBlocks();
20373 ctxt = gen_xmlDOMWrapCtxtPtr(n_ctxt, 0);
20374 doc = gen_xmlDocPtr(n_doc, 1);
20375 node = gen_xmlNodePtr(n_node, 2);
20376 options = gen_int(n_options, 3);
20378 ret_val = xmlDOMWrapRemoveNode(ctxt, doc, node, options);
20379 desret_int(ret_val);
20381 des_xmlDOMWrapCtxtPtr(n_ctxt, ctxt, 0);
20382 des_xmlDocPtr(n_doc, doc, 1);
20383 des_xmlNodePtr(n_node, node, 2);
20384 des_int(n_options, options, 3);
20385 xmlResetLastError();
20386 if (mem_base != xmlMemBlocks()) {
20387 printf("Leak of %d blocks found in xmlDOMWrapRemoveNode",
20388 xmlMemBlocks() - mem_base);
20390 printf(" %d", n_ctxt);
20391 printf(" %d", n_doc);
20392 printf(" %d", n_node);
20393 printf(" %d", n_options);
20407 test_xmlDocCopyNode(void) {
20411 xmlNodePtr ret_val;
20412 xmlNodePtr node; /* the node */
20414 xmlDocPtr doc; /* the document */
20416 int extended; /* if 1 do a recursive copy (properties, namespaces and children when applicable) if 2 copy properties and namespaces (when applicable) */
20419 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
20420 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
20421 for (n_extended = 0;n_extended < gen_nb_int;n_extended++) {
20422 mem_base = xmlMemBlocks();
20423 node = gen_xmlNodePtr(n_node, 0);
20424 doc = gen_xmlDocPtr(n_doc, 1);
20425 extended = gen_int(n_extended, 2);
20427 ret_val = xmlDocCopyNode(node, doc, extended);
20428 desret_xmlNodePtr(ret_val);
20430 des_xmlNodePtr(n_node, node, 0);
20431 des_xmlDocPtr(n_doc, doc, 1);
20432 des_int(n_extended, extended, 2);
20433 xmlResetLastError();
20434 if (mem_base != xmlMemBlocks()) {
20435 printf("Leak of %d blocks found in xmlDocCopyNode",
20436 xmlMemBlocks() - mem_base);
20438 printf(" %d", n_node);
20439 printf(" %d", n_doc);
20440 printf(" %d", n_extended);
20453 test_xmlDocCopyNodeList(void) {
20457 xmlNodePtr ret_val;
20458 xmlDocPtr doc; /* the target document */
20460 xmlNodePtr node; /* the first node in the list. */
20463 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
20464 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
20465 mem_base = xmlMemBlocks();
20466 doc = gen_xmlDocPtr(n_doc, 0);
20467 node = gen_xmlNodePtr(n_node, 1);
20469 ret_val = xmlDocCopyNodeList(doc, node);
20470 desret_xmlNodePtr(ret_val);
20472 des_xmlDocPtr(n_doc, doc, 0);
20473 des_xmlNodePtr(n_node, node, 1);
20474 xmlResetLastError();
20475 if (mem_base != xmlMemBlocks()) {
20476 printf("Leak of %d blocks found in xmlDocCopyNodeList",
20477 xmlMemBlocks() - mem_base);
20479 printf(" %d", n_doc);
20480 printf(" %d", n_node);
20492 test_xmlDocDump(void) {
20495 #if defined(LIBXML_OUTPUT_ENABLED)
20498 FILE * f; /* the FILE* */
20500 xmlDocPtr cur; /* the document */
20503 for (n_f = 0;n_f < gen_nb_FILE_ptr;n_f++) {
20504 for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
20505 mem_base = xmlMemBlocks();
20506 f = gen_FILE_ptr(n_f, 0);
20507 cur = gen_xmlDocPtr(n_cur, 1);
20509 ret_val = xmlDocDump(f, cur);
20510 desret_int(ret_val);
20512 des_FILE_ptr(n_f, f, 0);
20513 des_xmlDocPtr(n_cur, cur, 1);
20514 xmlResetLastError();
20515 if (mem_base != xmlMemBlocks()) {
20516 printf("Leak of %d blocks found in xmlDocDump",
20517 xmlMemBlocks() - mem_base);
20519 printf(" %d", n_f);
20520 printf(" %d", n_cur);
20533 test_xmlDocDumpFormatMemory(void) {
20536 #if defined(LIBXML_OUTPUT_ENABLED)
20538 xmlDocPtr cur; /* the document */
20540 xmlChar ** mem; /* OUT: the memory pointer */
20542 int * size; /* OUT: the memory length */
20544 int format; /* should formatting spaces been added */
20547 for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
20548 for (n_mem = 0;n_mem < gen_nb_xmlChar_ptr_ptr;n_mem++) {
20549 for (n_size = 0;n_size < gen_nb_int_ptr;n_size++) {
20550 for (n_format = 0;n_format < gen_nb_int;n_format++) {
20551 mem_base = xmlMemBlocks();
20552 cur = gen_xmlDocPtr(n_cur, 0);
20553 mem = gen_xmlChar_ptr_ptr(n_mem, 1);
20554 size = gen_int_ptr(n_size, 2);
20555 format = gen_int(n_format, 3);
20557 xmlDocDumpFormatMemory(cur, mem, size, format);
20559 des_xmlDocPtr(n_cur, cur, 0);
20560 des_xmlChar_ptr_ptr(n_mem, mem, 1);
20561 des_int_ptr(n_size, size, 2);
20562 des_int(n_format, format, 3);
20563 xmlResetLastError();
20564 if (mem_base != xmlMemBlocks()) {
20565 printf("Leak of %d blocks found in xmlDocDumpFormatMemory",
20566 xmlMemBlocks() - mem_base);
20568 printf(" %d", n_cur);
20569 printf(" %d", n_mem);
20570 printf(" %d", n_size);
20571 printf(" %d", n_format);
20586 test_xmlDocDumpFormatMemoryEnc(void) {
20589 #if defined(LIBXML_OUTPUT_ENABLED)
20591 xmlDocPtr out_doc; /* Document to generate XML text from */
20593 xmlChar ** doc_txt_ptr; /* Memory pointer for allocated XML text */
20595 int * doc_txt_len; /* Length of the generated XML text */
20597 char * txt_encoding; /* Character encoding to use when generating XML text */
20598 int n_txt_encoding;
20599 int format; /* should formatting spaces been added */
20602 for (n_out_doc = 0;n_out_doc < gen_nb_xmlDocPtr;n_out_doc++) {
20603 for (n_doc_txt_ptr = 0;n_doc_txt_ptr < gen_nb_xmlChar_ptr_ptr;n_doc_txt_ptr++) {
20604 for (n_doc_txt_len = 0;n_doc_txt_len < gen_nb_int_ptr;n_doc_txt_len++) {
20605 for (n_txt_encoding = 0;n_txt_encoding < gen_nb_const_char_ptr;n_txt_encoding++) {
20606 for (n_format = 0;n_format < gen_nb_int;n_format++) {
20607 mem_base = xmlMemBlocks();
20608 out_doc = gen_xmlDocPtr(n_out_doc, 0);
20609 doc_txt_ptr = gen_xmlChar_ptr_ptr(n_doc_txt_ptr, 1);
20610 doc_txt_len = gen_int_ptr(n_doc_txt_len, 2);
20611 txt_encoding = gen_const_char_ptr(n_txt_encoding, 3);
20612 format = gen_int(n_format, 4);
20614 xmlDocDumpFormatMemoryEnc(out_doc, doc_txt_ptr, doc_txt_len, (const char *)txt_encoding, format);
20616 des_xmlDocPtr(n_out_doc, out_doc, 0);
20617 des_xmlChar_ptr_ptr(n_doc_txt_ptr, doc_txt_ptr, 1);
20618 des_int_ptr(n_doc_txt_len, doc_txt_len, 2);
20619 des_const_char_ptr(n_txt_encoding, (const char *)txt_encoding, 3);
20620 des_int(n_format, format, 4);
20621 xmlResetLastError();
20622 if (mem_base != xmlMemBlocks()) {
20623 printf("Leak of %d blocks found in xmlDocDumpFormatMemoryEnc",
20624 xmlMemBlocks() - mem_base);
20626 printf(" %d", n_out_doc);
20627 printf(" %d", n_doc_txt_ptr);
20628 printf(" %d", n_doc_txt_len);
20629 printf(" %d", n_txt_encoding);
20630 printf(" %d", n_format);
20646 test_xmlDocDumpMemory(void) {
20649 #if defined(LIBXML_OUTPUT_ENABLED)
20651 xmlDocPtr cur; /* the document */
20653 xmlChar ** mem; /* OUT: the memory pointer */
20655 int * size; /* OUT: the memory length */
20658 for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
20659 for (n_mem = 0;n_mem < gen_nb_xmlChar_ptr_ptr;n_mem++) {
20660 for (n_size = 0;n_size < gen_nb_int_ptr;n_size++) {
20661 mem_base = xmlMemBlocks();
20662 cur = gen_xmlDocPtr(n_cur, 0);
20663 mem = gen_xmlChar_ptr_ptr(n_mem, 1);
20664 size = gen_int_ptr(n_size, 2);
20666 xmlDocDumpMemory(cur, mem, size);
20668 des_xmlDocPtr(n_cur, cur, 0);
20669 des_xmlChar_ptr_ptr(n_mem, mem, 1);
20670 des_int_ptr(n_size, size, 2);
20671 xmlResetLastError();
20672 if (mem_base != xmlMemBlocks()) {
20673 printf("Leak of %d blocks found in xmlDocDumpMemory",
20674 xmlMemBlocks() - mem_base);
20676 printf(" %d", n_cur);
20677 printf(" %d", n_mem);
20678 printf(" %d", n_size);
20692 test_xmlDocDumpMemoryEnc(void) {
20695 #if defined(LIBXML_OUTPUT_ENABLED)
20697 xmlDocPtr out_doc; /* Document to generate XML text from */
20699 xmlChar ** doc_txt_ptr; /* Memory pointer for allocated XML text */
20701 int * doc_txt_len; /* Length of the generated XML text */
20703 char * txt_encoding; /* Character encoding to use when generating XML text */
20704 int n_txt_encoding;
20706 for (n_out_doc = 0;n_out_doc < gen_nb_xmlDocPtr;n_out_doc++) {
20707 for (n_doc_txt_ptr = 0;n_doc_txt_ptr < gen_nb_xmlChar_ptr_ptr;n_doc_txt_ptr++) {
20708 for (n_doc_txt_len = 0;n_doc_txt_len < gen_nb_int_ptr;n_doc_txt_len++) {
20709 for (n_txt_encoding = 0;n_txt_encoding < gen_nb_const_char_ptr;n_txt_encoding++) {
20710 mem_base = xmlMemBlocks();
20711 out_doc = gen_xmlDocPtr(n_out_doc, 0);
20712 doc_txt_ptr = gen_xmlChar_ptr_ptr(n_doc_txt_ptr, 1);
20713 doc_txt_len = gen_int_ptr(n_doc_txt_len, 2);
20714 txt_encoding = gen_const_char_ptr(n_txt_encoding, 3);
20716 xmlDocDumpMemoryEnc(out_doc, doc_txt_ptr, doc_txt_len, (const char *)txt_encoding);
20718 des_xmlDocPtr(n_out_doc, out_doc, 0);
20719 des_xmlChar_ptr_ptr(n_doc_txt_ptr, doc_txt_ptr, 1);
20720 des_int_ptr(n_doc_txt_len, doc_txt_len, 2);
20721 des_const_char_ptr(n_txt_encoding, (const char *)txt_encoding, 3);
20722 xmlResetLastError();
20723 if (mem_base != xmlMemBlocks()) {
20724 printf("Leak of %d blocks found in xmlDocDumpMemoryEnc",
20725 xmlMemBlocks() - mem_base);
20727 printf(" %d", n_out_doc);
20728 printf(" %d", n_doc_txt_ptr);
20729 printf(" %d", n_doc_txt_len);
20730 printf(" %d", n_txt_encoding);
20745 test_xmlDocFormatDump(void) {
20748 #if defined(LIBXML_OUTPUT_ENABLED)
20751 FILE * f; /* the FILE* */
20753 xmlDocPtr cur; /* the document */
20755 int format; /* should formatting spaces been added */
20758 for (n_f = 0;n_f < gen_nb_FILE_ptr;n_f++) {
20759 for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
20760 for (n_format = 0;n_format < gen_nb_int;n_format++) {
20761 mem_base = xmlMemBlocks();
20762 f = gen_FILE_ptr(n_f, 0);
20763 cur = gen_xmlDocPtr(n_cur, 1);
20764 format = gen_int(n_format, 2);
20766 ret_val = xmlDocFormatDump(f, cur, format);
20767 desret_int(ret_val);
20769 des_FILE_ptr(n_f, f, 0);
20770 des_xmlDocPtr(n_cur, cur, 1);
20771 des_int(n_format, format, 2);
20772 xmlResetLastError();
20773 if (mem_base != xmlMemBlocks()) {
20774 printf("Leak of %d blocks found in xmlDocFormatDump",
20775 xmlMemBlocks() - mem_base);
20777 printf(" %d", n_f);
20778 printf(" %d", n_cur);
20779 printf(" %d", n_format);
20793 test_xmlDocGetRootElement(void) {
20797 xmlNodePtr ret_val;
20798 xmlDoc * doc; /* the document */
20801 for (n_doc = 0;n_doc < gen_nb_const_xmlDoc_ptr;n_doc++) {
20802 mem_base = xmlMemBlocks();
20803 doc = gen_const_xmlDoc_ptr(n_doc, 0);
20805 ret_val = xmlDocGetRootElement((const xmlDoc *)doc);
20806 desret_xmlNodePtr(ret_val);
20808 des_const_xmlDoc_ptr(n_doc, (const xmlDoc *)doc, 0);
20809 xmlResetLastError();
20810 if (mem_base != xmlMemBlocks()) {
20811 printf("Leak of %d blocks found in xmlDocGetRootElement",
20812 xmlMemBlocks() - mem_base);
20814 printf(" %d", n_doc);
20825 test_xmlDocSetRootElement(void) {
20828 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
20830 xmlNodePtr ret_val;
20831 xmlDocPtr doc; /* the document */
20833 xmlNodePtr root; /* the new document root element, if root is NULL no action is taken, to remove a node from a document use xmlUnlinkNode(root) instead. */
20836 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
20837 for (n_root = 0;n_root < gen_nb_xmlNodePtr_in;n_root++) {
20838 mem_base = xmlMemBlocks();
20839 doc = gen_xmlDocPtr(n_doc, 0);
20840 root = gen_xmlNodePtr_in(n_root, 1);
20842 ret_val = xmlDocSetRootElement(doc, root);
20843 if (doc == NULL) { xmlFreeNode(root) ; root = NULL ; }
20844 desret_xmlNodePtr(ret_val);
20846 des_xmlDocPtr(n_doc, doc, 0);
20847 des_xmlNodePtr_in(n_root, root, 1);
20848 xmlResetLastError();
20849 if (mem_base != xmlMemBlocks()) {
20850 printf("Leak of %d blocks found in xmlDocSetRootElement",
20851 xmlMemBlocks() - mem_base);
20853 printf(" %d", n_doc);
20854 printf(" %d", n_root);
20867 test_xmlElemDump(void) {
20870 #if defined(LIBXML_OUTPUT_ENABLED)
20872 FILE * f; /* the FILE * for the output */
20874 xmlDocPtr doc; /* the document */
20876 xmlNodePtr cur; /* the current node */
20879 for (n_f = 0;n_f < gen_nb_FILE_ptr;n_f++) {
20880 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
20881 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
20882 mem_base = xmlMemBlocks();
20883 f = gen_FILE_ptr(n_f, 0);
20884 doc = gen_xmlDocPtr(n_doc, 1);
20885 cur = gen_xmlNodePtr(n_cur, 2);
20887 xmlElemDump(f, doc, cur);
20889 des_FILE_ptr(n_f, f, 0);
20890 des_xmlDocPtr(n_doc, doc, 1);
20891 des_xmlNodePtr(n_cur, cur, 2);
20892 xmlResetLastError();
20893 if (mem_base != xmlMemBlocks()) {
20894 printf("Leak of %d blocks found in xmlElemDump",
20895 xmlMemBlocks() - mem_base);
20897 printf(" %d", n_f);
20898 printf(" %d", n_doc);
20899 printf(" %d", n_cur);
20913 test_xmlFirstElementChild(void) {
20916 #if defined(LIBXML_TREE_ENABLED)
20918 xmlNodePtr ret_val;
20919 xmlNodePtr parent; /* the parent node */
20922 for (n_parent = 0;n_parent < gen_nb_xmlNodePtr;n_parent++) {
20923 mem_base = xmlMemBlocks();
20924 parent = gen_xmlNodePtr(n_parent, 0);
20926 ret_val = xmlFirstElementChild(parent);
20927 desret_xmlNodePtr(ret_val);
20929 des_xmlNodePtr(n_parent, parent, 0);
20930 xmlResetLastError();
20931 if (mem_base != xmlMemBlocks()) {
20932 printf("Leak of %d blocks found in xmlFirstElementChild",
20933 xmlMemBlocks() - mem_base);
20935 printf(" %d", n_parent);
20947 test_xmlGetBufferAllocationScheme(void) {
20951 xmlBufferAllocationScheme ret_val;
20953 mem_base = xmlMemBlocks();
20955 ret_val = xmlGetBufferAllocationScheme();
20956 desret_xmlBufferAllocationScheme(ret_val);
20958 xmlResetLastError();
20959 if (mem_base != xmlMemBlocks()) {
20960 printf("Leak of %d blocks found in xmlGetBufferAllocationScheme",
20961 xmlMemBlocks() - mem_base);
20972 test_xmlGetCompressMode(void) {
20978 mem_base = xmlMemBlocks();
20980 ret_val = xmlGetCompressMode();
20981 desret_int(ret_val);
20983 xmlResetLastError();
20984 if (mem_base != xmlMemBlocks()) {
20985 printf("Leak of %d blocks found in xmlGetCompressMode",
20986 xmlMemBlocks() - mem_base);
20997 test_xmlGetDocCompressMode(void) {
21002 xmlDoc * doc; /* the document */
21005 for (n_doc = 0;n_doc < gen_nb_const_xmlDoc_ptr;n_doc++) {
21006 mem_base = xmlMemBlocks();
21007 doc = gen_const_xmlDoc_ptr(n_doc, 0);
21009 ret_val = xmlGetDocCompressMode((const xmlDoc *)doc);
21010 desret_int(ret_val);
21012 des_const_xmlDoc_ptr(n_doc, (const xmlDoc *)doc, 0);
21013 xmlResetLastError();
21014 if (mem_base != xmlMemBlocks()) {
21015 printf("Leak of %d blocks found in xmlGetDocCompressMode",
21016 xmlMemBlocks() - mem_base);
21018 printf(" %d", n_doc);
21029 test_xmlGetIntSubset(void) {
21034 xmlDoc * doc; /* the document pointer */
21037 for (n_doc = 0;n_doc < gen_nb_const_xmlDoc_ptr;n_doc++) {
21038 mem_base = xmlMemBlocks();
21039 doc = gen_const_xmlDoc_ptr(n_doc, 0);
21041 ret_val = xmlGetIntSubset((const xmlDoc *)doc);
21042 desret_xmlDtdPtr(ret_val);
21044 des_const_xmlDoc_ptr(n_doc, (const xmlDoc *)doc, 0);
21045 xmlResetLastError();
21046 if (mem_base != xmlMemBlocks()) {
21047 printf("Leak of %d blocks found in xmlGetIntSubset",
21048 xmlMemBlocks() - mem_base);
21050 printf(" %d", n_doc);
21061 test_xmlGetLastChild(void) {
21065 xmlNodePtr ret_val;
21066 xmlNode * parent; /* the parent node */
21069 for (n_parent = 0;n_parent < gen_nb_const_xmlNode_ptr;n_parent++) {
21070 mem_base = xmlMemBlocks();
21071 parent = gen_const_xmlNode_ptr(n_parent, 0);
21073 ret_val = xmlGetLastChild((const xmlNode *)parent);
21074 desret_xmlNodePtr(ret_val);
21076 des_const_xmlNode_ptr(n_parent, (const xmlNode *)parent, 0);
21077 xmlResetLastError();
21078 if (mem_base != xmlMemBlocks()) {
21079 printf("Leak of %d blocks found in xmlGetLastChild",
21080 xmlMemBlocks() - mem_base);
21082 printf(" %d", n_parent);
21093 test_xmlGetLineNo(void) {
21098 xmlNode * node; /* valid node */
21101 for (n_node = 0;n_node < gen_nb_const_xmlNode_ptr;n_node++) {
21102 mem_base = xmlMemBlocks();
21103 node = gen_const_xmlNode_ptr(n_node, 0);
21105 ret_val = xmlGetLineNo((const xmlNode *)node);
21106 desret_long(ret_val);
21108 des_const_xmlNode_ptr(n_node, (const xmlNode *)node, 0);
21109 xmlResetLastError();
21110 if (mem_base != xmlMemBlocks()) {
21111 printf("Leak of %d blocks found in xmlGetLineNo",
21112 xmlMemBlocks() - mem_base);
21114 printf(" %d", n_node);
21125 test_xmlGetNoNsProp(void) {
21130 xmlNode * node; /* the node */
21132 xmlChar * name; /* the attribute name */
21135 for (n_node = 0;n_node < gen_nb_const_xmlNode_ptr;n_node++) {
21136 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
21137 mem_base = xmlMemBlocks();
21138 node = gen_const_xmlNode_ptr(n_node, 0);
21139 name = gen_const_xmlChar_ptr(n_name, 1);
21141 ret_val = xmlGetNoNsProp((const xmlNode *)node, (const xmlChar *)name);
21142 desret_xmlChar_ptr(ret_val);
21144 des_const_xmlNode_ptr(n_node, (const xmlNode *)node, 0);
21145 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
21146 xmlResetLastError();
21147 if (mem_base != xmlMemBlocks()) {
21148 printf("Leak of %d blocks found in xmlGetNoNsProp",
21149 xmlMemBlocks() - mem_base);
21151 printf(" %d", n_node);
21152 printf(" %d", n_name);
21164 test_xmlGetNodePath(void) {
21167 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED)
21170 xmlNode * node; /* a node */
21173 for (n_node = 0;n_node < gen_nb_const_xmlNode_ptr;n_node++) {
21174 mem_base = xmlMemBlocks();
21175 node = gen_const_xmlNode_ptr(n_node, 0);
21177 ret_val = xmlGetNodePath((const xmlNode *)node);
21178 desret_xmlChar_ptr(ret_val);
21180 des_const_xmlNode_ptr(n_node, (const xmlNode *)node, 0);
21181 xmlResetLastError();
21182 if (mem_base != xmlMemBlocks()) {
21183 printf("Leak of %d blocks found in xmlGetNodePath",
21184 xmlMemBlocks() - mem_base);
21186 printf(" %d", n_node);
21198 test_xmlGetNsList(void) {
21202 /* missing type support */
21208 test_xmlGetNsProp(void) {
21213 xmlNode * node; /* the node */
21215 xmlChar * name; /* the attribute name */
21217 xmlChar * nameSpace; /* the URI of the namespace */
21220 for (n_node = 0;n_node < gen_nb_const_xmlNode_ptr;n_node++) {
21221 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
21222 for (n_nameSpace = 0;n_nameSpace < gen_nb_const_xmlChar_ptr;n_nameSpace++) {
21223 mem_base = xmlMemBlocks();
21224 node = gen_const_xmlNode_ptr(n_node, 0);
21225 name = gen_const_xmlChar_ptr(n_name, 1);
21226 nameSpace = gen_const_xmlChar_ptr(n_nameSpace, 2);
21228 ret_val = xmlGetNsProp((const xmlNode *)node, (const xmlChar *)name, (const xmlChar *)nameSpace);
21229 desret_xmlChar_ptr(ret_val);
21231 des_const_xmlNode_ptr(n_node, (const xmlNode *)node, 0);
21232 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
21233 des_const_xmlChar_ptr(n_nameSpace, (const xmlChar *)nameSpace, 2);
21234 xmlResetLastError();
21235 if (mem_base != xmlMemBlocks()) {
21236 printf("Leak of %d blocks found in xmlGetNsProp",
21237 xmlMemBlocks() - mem_base);
21239 printf(" %d", n_node);
21240 printf(" %d", n_name);
21241 printf(" %d", n_nameSpace);
21254 test_xmlGetProp(void) {
21259 xmlNode * node; /* the node */
21261 xmlChar * name; /* the attribute name */
21264 for (n_node = 0;n_node < gen_nb_const_xmlNode_ptr;n_node++) {
21265 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
21266 mem_base = xmlMemBlocks();
21267 node = gen_const_xmlNode_ptr(n_node, 0);
21268 name = gen_const_xmlChar_ptr(n_name, 1);
21270 ret_val = xmlGetProp((const xmlNode *)node, (const xmlChar *)name);
21271 desret_xmlChar_ptr(ret_val);
21273 des_const_xmlNode_ptr(n_node, (const xmlNode *)node, 0);
21274 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
21275 xmlResetLastError();
21276 if (mem_base != xmlMemBlocks()) {
21277 printf("Leak of %d blocks found in xmlGetProp",
21278 xmlMemBlocks() - mem_base);
21280 printf(" %d", n_node);
21281 printf(" %d", n_name);
21293 test_xmlHasNsProp(void) {
21297 xmlAttrPtr ret_val;
21298 xmlNode * node; /* the node */
21300 xmlChar * name; /* the attribute name */
21302 xmlChar * nameSpace; /* the URI of the namespace */
21305 for (n_node = 0;n_node < gen_nb_const_xmlNode_ptr;n_node++) {
21306 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
21307 for (n_nameSpace = 0;n_nameSpace < gen_nb_const_xmlChar_ptr;n_nameSpace++) {
21308 mem_base = xmlMemBlocks();
21309 node = gen_const_xmlNode_ptr(n_node, 0);
21310 name = gen_const_xmlChar_ptr(n_name, 1);
21311 nameSpace = gen_const_xmlChar_ptr(n_nameSpace, 2);
21313 ret_val = xmlHasNsProp((const xmlNode *)node, (const xmlChar *)name, (const xmlChar *)nameSpace);
21314 desret_xmlAttrPtr(ret_val);
21316 des_const_xmlNode_ptr(n_node, (const xmlNode *)node, 0);
21317 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
21318 des_const_xmlChar_ptr(n_nameSpace, (const xmlChar *)nameSpace, 2);
21319 xmlResetLastError();
21320 if (mem_base != xmlMemBlocks()) {
21321 printf("Leak of %d blocks found in xmlHasNsProp",
21322 xmlMemBlocks() - mem_base);
21324 printf(" %d", n_node);
21325 printf(" %d", n_name);
21326 printf(" %d", n_nameSpace);
21339 test_xmlHasProp(void) {
21343 xmlAttrPtr ret_val;
21344 xmlNode * node; /* the node */
21346 xmlChar * name; /* the attribute name */
21349 for (n_node = 0;n_node < gen_nb_const_xmlNode_ptr;n_node++) {
21350 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
21351 mem_base = xmlMemBlocks();
21352 node = gen_const_xmlNode_ptr(n_node, 0);
21353 name = gen_const_xmlChar_ptr(n_name, 1);
21355 ret_val = xmlHasProp((const xmlNode *)node, (const xmlChar *)name);
21356 desret_xmlAttrPtr(ret_val);
21358 des_const_xmlNode_ptr(n_node, (const xmlNode *)node, 0);
21359 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
21360 xmlResetLastError();
21361 if (mem_base != xmlMemBlocks()) {
21362 printf("Leak of %d blocks found in xmlHasProp",
21363 xmlMemBlocks() - mem_base);
21365 printf(" %d", n_node);
21366 printf(" %d", n_name);
21378 test_xmlIsBlankNode(void) {
21383 xmlNode * node; /* the node */
21386 for (n_node = 0;n_node < gen_nb_const_xmlNode_ptr;n_node++) {
21387 mem_base = xmlMemBlocks();
21388 node = gen_const_xmlNode_ptr(n_node, 0);
21390 ret_val = xmlIsBlankNode((const xmlNode *)node);
21391 desret_int(ret_val);
21393 des_const_xmlNode_ptr(n_node, (const xmlNode *)node, 0);
21394 xmlResetLastError();
21395 if (mem_base != xmlMemBlocks()) {
21396 printf("Leak of %d blocks found in xmlIsBlankNode",
21397 xmlMemBlocks() - mem_base);
21399 printf(" %d", n_node);
21410 test_xmlIsXHTML(void) {
21415 xmlChar * systemID; /* the system identifier */
21417 xmlChar * publicID; /* the public identifier */
21420 for (n_systemID = 0;n_systemID < gen_nb_const_xmlChar_ptr;n_systemID++) {
21421 for (n_publicID = 0;n_publicID < gen_nb_const_xmlChar_ptr;n_publicID++) {
21422 mem_base = xmlMemBlocks();
21423 systemID = gen_const_xmlChar_ptr(n_systemID, 0);
21424 publicID = gen_const_xmlChar_ptr(n_publicID, 1);
21426 ret_val = xmlIsXHTML((const xmlChar *)systemID, (const xmlChar *)publicID);
21427 desret_int(ret_val);
21429 des_const_xmlChar_ptr(n_systemID, (const xmlChar *)systemID, 0);
21430 des_const_xmlChar_ptr(n_publicID, (const xmlChar *)publicID, 1);
21431 xmlResetLastError();
21432 if (mem_base != xmlMemBlocks()) {
21433 printf("Leak of %d blocks found in xmlIsXHTML",
21434 xmlMemBlocks() - mem_base);
21436 printf(" %d", n_systemID);
21437 printf(" %d", n_publicID);
21449 test_xmlLastElementChild(void) {
21452 #if defined(LIBXML_TREE_ENABLED)
21454 xmlNodePtr ret_val;
21455 xmlNodePtr parent; /* the parent node */
21458 for (n_parent = 0;n_parent < gen_nb_xmlNodePtr;n_parent++) {
21459 mem_base = xmlMemBlocks();
21460 parent = gen_xmlNodePtr(n_parent, 0);
21462 ret_val = xmlLastElementChild(parent);
21463 desret_xmlNodePtr(ret_val);
21465 des_xmlNodePtr(n_parent, parent, 0);
21466 xmlResetLastError();
21467 if (mem_base != xmlMemBlocks()) {
21468 printf("Leak of %d blocks found in xmlLastElementChild",
21469 xmlMemBlocks() - mem_base);
21471 printf(" %d", n_parent);
21483 test_xmlNewCDataBlock(void) {
21487 xmlNodePtr ret_val;
21488 xmlDocPtr doc; /* the document */
21490 xmlChar * content; /* the CDATA block content content */
21492 int len; /* the length of the block */
21495 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
21496 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
21497 for (n_len = 0;n_len < gen_nb_int;n_len++) {
21498 mem_base = xmlMemBlocks();
21499 doc = gen_xmlDocPtr(n_doc, 0);
21500 content = gen_const_xmlChar_ptr(n_content, 1);
21501 len = gen_int(n_len, 2);
21502 if ((content != NULL) &&
21503 (len > (int) strlen((const char *) content) + 1))
21506 ret_val = xmlNewCDataBlock(doc, (const xmlChar *)content, len);
21507 desret_xmlNodePtr(ret_val);
21509 des_xmlDocPtr(n_doc, doc, 0);
21510 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
21511 des_int(n_len, len, 2);
21512 xmlResetLastError();
21513 if (mem_base != xmlMemBlocks()) {
21514 printf("Leak of %d blocks found in xmlNewCDataBlock",
21515 xmlMemBlocks() - mem_base);
21517 printf(" %d", n_doc);
21518 printf(" %d", n_content);
21519 printf(" %d", n_len);
21532 test_xmlNewCharRef(void) {
21536 xmlNodePtr ret_val;
21537 xmlDocPtr doc; /* the document */
21539 xmlChar * name; /* the char ref string, starting with # or "&# ... ;" */
21542 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
21543 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
21544 mem_base = xmlMemBlocks();
21545 doc = gen_xmlDocPtr(n_doc, 0);
21546 name = gen_const_xmlChar_ptr(n_name, 1);
21548 ret_val = xmlNewCharRef(doc, (const xmlChar *)name);
21549 desret_xmlNodePtr(ret_val);
21551 des_xmlDocPtr(n_doc, doc, 0);
21552 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
21553 xmlResetLastError();
21554 if (mem_base != xmlMemBlocks()) {
21555 printf("Leak of %d blocks found in xmlNewCharRef",
21556 xmlMemBlocks() - mem_base);
21558 printf(" %d", n_doc);
21559 printf(" %d", n_name);
21571 test_xmlNewChild(void) {
21574 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
21575 #ifdef LIBXML_TREE_ENABLED
21577 xmlNodePtr ret_val;
21578 xmlNodePtr parent; /* the parent node */
21580 xmlNsPtr ns; /* a namespace if any */
21582 xmlChar * name; /* the name of the child */
21584 xmlChar * content; /* the XML content of the child if any. */
21587 for (n_parent = 0;n_parent < gen_nb_xmlNodePtr;n_parent++) {
21588 for (n_ns = 0;n_ns < gen_nb_xmlNsPtr;n_ns++) {
21589 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
21590 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
21591 mem_base = xmlMemBlocks();
21592 parent = gen_xmlNodePtr(n_parent, 0);
21593 ns = gen_xmlNsPtr(n_ns, 1);
21594 name = gen_const_xmlChar_ptr(n_name, 2);
21595 content = gen_const_xmlChar_ptr(n_content, 3);
21597 ret_val = xmlNewChild(parent, ns, (const xmlChar *)name, (const xmlChar *)content);
21598 desret_xmlNodePtr(ret_val);
21600 des_xmlNodePtr(n_parent, parent, 0);
21601 des_xmlNsPtr(n_ns, ns, 1);
21602 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
21603 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 3);
21604 xmlResetLastError();
21605 if (mem_base != xmlMemBlocks()) {
21606 printf("Leak of %d blocks found in xmlNewChild",
21607 xmlMemBlocks() - mem_base);
21609 printf(" %d", n_parent);
21610 printf(" %d", n_ns);
21611 printf(" %d", n_name);
21612 printf(" %d", n_content);
21628 test_xmlNewComment(void) {
21632 xmlNodePtr ret_val;
21633 xmlChar * content; /* the comment content */
21636 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
21637 mem_base = xmlMemBlocks();
21638 content = gen_const_xmlChar_ptr(n_content, 0);
21640 ret_val = xmlNewComment((const xmlChar *)content);
21641 desret_xmlNodePtr(ret_val);
21643 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 0);
21644 xmlResetLastError();
21645 if (mem_base != xmlMemBlocks()) {
21646 printf("Leak of %d blocks found in xmlNewComment",
21647 xmlMemBlocks() - mem_base);
21649 printf(" %d", n_content);
21660 test_xmlNewDoc(void) {
21665 xmlChar * version; /* xmlChar string giving the version of XML "1.0" */
21668 for (n_version = 0;n_version < gen_nb_const_xmlChar_ptr;n_version++) {
21669 mem_base = xmlMemBlocks();
21670 version = gen_const_xmlChar_ptr(n_version, 0);
21672 ret_val = xmlNewDoc((const xmlChar *)version);
21673 desret_xmlDocPtr(ret_val);
21675 des_const_xmlChar_ptr(n_version, (const xmlChar *)version, 0);
21676 xmlResetLastError();
21677 if (mem_base != xmlMemBlocks()) {
21678 printf("Leak of %d blocks found in xmlNewDoc",
21679 xmlMemBlocks() - mem_base);
21681 printf(" %d", n_version);
21692 test_xmlNewDocComment(void) {
21696 xmlNodePtr ret_val;
21697 xmlDocPtr doc; /* the document */
21699 xmlChar * content; /* the comment content */
21702 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
21703 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
21704 mem_base = xmlMemBlocks();
21705 doc = gen_xmlDocPtr(n_doc, 0);
21706 content = gen_const_xmlChar_ptr(n_content, 1);
21708 ret_val = xmlNewDocComment(doc, (const xmlChar *)content);
21709 desret_xmlNodePtr(ret_val);
21711 des_xmlDocPtr(n_doc, doc, 0);
21712 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
21713 xmlResetLastError();
21714 if (mem_base != xmlMemBlocks()) {
21715 printf("Leak of %d blocks found in xmlNewDocComment",
21716 xmlMemBlocks() - mem_base);
21718 printf(" %d", n_doc);
21719 printf(" %d", n_content);
21731 test_xmlNewDocFragment(void) {
21734 #if defined(LIBXML_TREE_ENABLED)
21736 xmlNodePtr ret_val;
21737 xmlDocPtr doc; /* the document owning the fragment */
21740 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
21741 mem_base = xmlMemBlocks();
21742 doc = gen_xmlDocPtr(n_doc, 0);
21744 ret_val = xmlNewDocFragment(doc);
21745 desret_xmlNodePtr(ret_val);
21747 des_xmlDocPtr(n_doc, doc, 0);
21748 xmlResetLastError();
21749 if (mem_base != xmlMemBlocks()) {
21750 printf("Leak of %d blocks found in xmlNewDocFragment",
21751 xmlMemBlocks() - mem_base);
21753 printf(" %d", n_doc);
21765 test_xmlNewDocNode(void) {
21769 xmlNodePtr ret_val;
21770 xmlDocPtr doc; /* the document */
21772 xmlNsPtr ns; /* namespace if any */
21774 xmlChar * name; /* the node name */
21776 xmlChar * content; /* the XML text content if any */
21779 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
21780 for (n_ns = 0;n_ns < gen_nb_xmlNsPtr;n_ns++) {
21781 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
21782 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
21783 mem_base = xmlMemBlocks();
21784 doc = gen_xmlDocPtr(n_doc, 0);
21785 ns = gen_xmlNsPtr(n_ns, 1);
21786 name = gen_const_xmlChar_ptr(n_name, 2);
21787 content = gen_const_xmlChar_ptr(n_content, 3);
21789 ret_val = xmlNewDocNode(doc, ns, (const xmlChar *)name, (const xmlChar *)content);
21790 desret_xmlNodePtr(ret_val);
21792 des_xmlDocPtr(n_doc, doc, 0);
21793 des_xmlNsPtr(n_ns, ns, 1);
21794 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
21795 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 3);
21796 xmlResetLastError();
21797 if (mem_base != xmlMemBlocks()) {
21798 printf("Leak of %d blocks found in xmlNewDocNode",
21799 xmlMemBlocks() - mem_base);
21801 printf(" %d", n_doc);
21802 printf(" %d", n_ns);
21803 printf(" %d", n_name);
21804 printf(" %d", n_content);
21818 test_xmlNewDocNodeEatName(void) {
21822 xmlNodePtr ret_val;
21823 xmlDocPtr doc; /* the document */
21825 xmlNsPtr ns; /* namespace if any */
21827 xmlChar * name; /* the node name */
21829 xmlChar * content; /* the XML text content if any */
21832 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
21833 for (n_ns = 0;n_ns < gen_nb_xmlNsPtr;n_ns++) {
21834 for (n_name = 0;n_name < gen_nb_eaten_name;n_name++) {
21835 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
21836 mem_base = xmlMemBlocks();
21837 doc = gen_xmlDocPtr(n_doc, 0);
21838 ns = gen_xmlNsPtr(n_ns, 1);
21839 name = gen_eaten_name(n_name, 2);
21840 content = gen_const_xmlChar_ptr(n_content, 3);
21842 ret_val = xmlNewDocNodeEatName(doc, ns, name, (const xmlChar *)content);
21843 desret_xmlNodePtr(ret_val);
21845 des_xmlDocPtr(n_doc, doc, 0);
21846 des_xmlNsPtr(n_ns, ns, 1);
21847 des_eaten_name(n_name, name, 2);
21848 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 3);
21849 xmlResetLastError();
21850 if (mem_base != xmlMemBlocks()) {
21851 printf("Leak of %d blocks found in xmlNewDocNodeEatName",
21852 xmlMemBlocks() - mem_base);
21854 printf(" %d", n_doc);
21855 printf(" %d", n_ns);
21856 printf(" %d", n_name);
21857 printf(" %d", n_content);
21871 test_xmlNewDocPI(void) {
21875 xmlNodePtr ret_val;
21876 xmlDocPtr doc; /* the target document */
21878 xmlChar * name; /* the processing instruction name */
21880 xmlChar * content; /* the PI content */
21883 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
21884 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
21885 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
21886 mem_base = xmlMemBlocks();
21887 doc = gen_xmlDocPtr(n_doc, 0);
21888 name = gen_const_xmlChar_ptr(n_name, 1);
21889 content = gen_const_xmlChar_ptr(n_content, 2);
21891 ret_val = xmlNewDocPI(doc, (const xmlChar *)name, (const xmlChar *)content);
21892 desret_xmlNodePtr(ret_val);
21894 des_xmlDocPtr(n_doc, doc, 0);
21895 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
21896 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 2);
21897 xmlResetLastError();
21898 if (mem_base != xmlMemBlocks()) {
21899 printf("Leak of %d blocks found in xmlNewDocPI",
21900 xmlMemBlocks() - mem_base);
21902 printf(" %d", n_doc);
21903 printf(" %d", n_name);
21904 printf(" %d", n_content);
21917 test_xmlNewDocProp(void) {
21921 xmlAttrPtr ret_val;
21922 xmlDocPtr doc; /* the document */
21924 xmlChar * name; /* the name of the attribute */
21926 xmlChar * value; /* the value of the attribute */
21929 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
21930 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
21931 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
21932 mem_base = xmlMemBlocks();
21933 doc = gen_xmlDocPtr(n_doc, 0);
21934 name = gen_const_xmlChar_ptr(n_name, 1);
21935 value = gen_const_xmlChar_ptr(n_value, 2);
21937 ret_val = xmlNewDocProp(doc, (const xmlChar *)name, (const xmlChar *)value);
21938 desret_xmlAttrPtr(ret_val);
21940 des_xmlDocPtr(n_doc, doc, 0);
21941 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
21942 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 2);
21943 xmlResetLastError();
21944 if (mem_base != xmlMemBlocks()) {
21945 printf("Leak of %d blocks found in xmlNewDocProp",
21946 xmlMemBlocks() - mem_base);
21948 printf(" %d", n_doc);
21949 printf(" %d", n_name);
21950 printf(" %d", n_value);
21963 test_xmlNewDocRawNode(void) {
21966 #if defined(LIBXML_TREE_ENABLED)
21967 #ifdef LIBXML_TREE_ENABLED
21969 xmlNodePtr ret_val;
21970 xmlDocPtr doc; /* the document */
21972 xmlNsPtr ns; /* namespace if any */
21974 xmlChar * name; /* the node name */
21976 xmlChar * content; /* the text content if any */
21979 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
21980 for (n_ns = 0;n_ns < gen_nb_xmlNsPtr;n_ns++) {
21981 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
21982 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
21983 mem_base = xmlMemBlocks();
21984 doc = gen_xmlDocPtr(n_doc, 0);
21985 ns = gen_xmlNsPtr(n_ns, 1);
21986 name = gen_const_xmlChar_ptr(n_name, 2);
21987 content = gen_const_xmlChar_ptr(n_content, 3);
21989 ret_val = xmlNewDocRawNode(doc, ns, (const xmlChar *)name, (const xmlChar *)content);
21990 desret_xmlNodePtr(ret_val);
21992 des_xmlDocPtr(n_doc, doc, 0);
21993 des_xmlNsPtr(n_ns, ns, 1);
21994 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
21995 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 3);
21996 xmlResetLastError();
21997 if (mem_base != xmlMemBlocks()) {
21998 printf("Leak of %d blocks found in xmlNewDocRawNode",
21999 xmlMemBlocks() - mem_base);
22001 printf(" %d", n_doc);
22002 printf(" %d", n_ns);
22003 printf(" %d", n_name);
22004 printf(" %d", n_content);
22020 test_xmlNewDocText(void) {
22024 xmlNodePtr ret_val;
22025 xmlDoc * doc; /* the document */
22027 xmlChar * content; /* the text content */
22030 for (n_doc = 0;n_doc < gen_nb_const_xmlDoc_ptr;n_doc++) {
22031 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
22032 mem_base = xmlMemBlocks();
22033 doc = gen_const_xmlDoc_ptr(n_doc, 0);
22034 content = gen_const_xmlChar_ptr(n_content, 1);
22036 ret_val = xmlNewDocText((const xmlDoc *)doc, (const xmlChar *)content);
22037 desret_xmlNodePtr(ret_val);
22039 des_const_xmlDoc_ptr(n_doc, (const xmlDoc *)doc, 0);
22040 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
22041 xmlResetLastError();
22042 if (mem_base != xmlMemBlocks()) {
22043 printf("Leak of %d blocks found in xmlNewDocText",
22044 xmlMemBlocks() - mem_base);
22046 printf(" %d", n_doc);
22047 printf(" %d", n_content);
22059 test_xmlNewDocTextLen(void) {
22063 xmlNodePtr ret_val;
22064 xmlDocPtr doc; /* the document */
22066 xmlChar * content; /* the text content */
22068 int len; /* the text len. */
22071 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
22072 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
22073 for (n_len = 0;n_len < gen_nb_int;n_len++) {
22074 mem_base = xmlMemBlocks();
22075 doc = gen_xmlDocPtr(n_doc, 0);
22076 content = gen_const_xmlChar_ptr(n_content, 1);
22077 len = gen_int(n_len, 2);
22078 if ((content != NULL) &&
22079 (len > (int) strlen((const char *) content) + 1))
22082 ret_val = xmlNewDocTextLen(doc, (const xmlChar *)content, len);
22083 desret_xmlNodePtr(ret_val);
22085 des_xmlDocPtr(n_doc, doc, 0);
22086 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
22087 des_int(n_len, len, 2);
22088 xmlResetLastError();
22089 if (mem_base != xmlMemBlocks()) {
22090 printf("Leak of %d blocks found in xmlNewDocTextLen",
22091 xmlMemBlocks() - mem_base);
22093 printf(" %d", n_doc);
22094 printf(" %d", n_content);
22095 printf(" %d", n_len);
22108 test_xmlNewDtd(void) {
22113 xmlDocPtr doc; /* the document pointer */
22115 xmlChar * name; /* the DTD name */
22117 xmlChar * ExternalID; /* the external ID */
22119 xmlChar * SystemID; /* the system ID */
22122 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
22123 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
22124 for (n_ExternalID = 0;n_ExternalID < gen_nb_const_xmlChar_ptr;n_ExternalID++) {
22125 for (n_SystemID = 0;n_SystemID < gen_nb_const_xmlChar_ptr;n_SystemID++) {
22126 mem_base = xmlMemBlocks();
22127 doc = gen_xmlDocPtr(n_doc, 0);
22128 name = gen_const_xmlChar_ptr(n_name, 1);
22129 ExternalID = gen_const_xmlChar_ptr(n_ExternalID, 2);
22130 SystemID = gen_const_xmlChar_ptr(n_SystemID, 3);
22132 ret_val = xmlNewDtd(doc, (const xmlChar *)name, (const xmlChar *)ExternalID, (const xmlChar *)SystemID);
22133 desret_xmlDtdPtr(ret_val);
22135 des_xmlDocPtr(n_doc, doc, 0);
22136 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
22137 des_const_xmlChar_ptr(n_ExternalID, (const xmlChar *)ExternalID, 2);
22138 des_const_xmlChar_ptr(n_SystemID, (const xmlChar *)SystemID, 3);
22139 xmlResetLastError();
22140 if (mem_base != xmlMemBlocks()) {
22141 printf("Leak of %d blocks found in xmlNewDtd",
22142 xmlMemBlocks() - mem_base);
22144 printf(" %d", n_doc);
22145 printf(" %d", n_name);
22146 printf(" %d", n_ExternalID);
22147 printf(" %d", n_SystemID);
22161 test_xmlNewNode(void) {
22165 xmlNodePtr ret_val;
22166 xmlNsPtr ns; /* namespace if any */
22168 xmlChar * name; /* the node name */
22171 for (n_ns = 0;n_ns < gen_nb_xmlNsPtr;n_ns++) {
22172 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
22173 mem_base = xmlMemBlocks();
22174 ns = gen_xmlNsPtr(n_ns, 0);
22175 name = gen_const_xmlChar_ptr(n_name, 1);
22177 ret_val = xmlNewNode(ns, (const xmlChar *)name);
22178 desret_xmlNodePtr(ret_val);
22180 des_xmlNsPtr(n_ns, ns, 0);
22181 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
22182 xmlResetLastError();
22183 if (mem_base != xmlMemBlocks()) {
22184 printf("Leak of %d blocks found in xmlNewNode",
22185 xmlMemBlocks() - mem_base);
22187 printf(" %d", n_ns);
22188 printf(" %d", n_name);
22200 test_xmlNewNodeEatName(void) {
22204 xmlNodePtr ret_val;
22205 xmlNsPtr ns; /* namespace if any */
22207 xmlChar * name; /* the node name */
22210 for (n_ns = 0;n_ns < gen_nb_xmlNsPtr;n_ns++) {
22211 for (n_name = 0;n_name < gen_nb_eaten_name;n_name++) {
22212 mem_base = xmlMemBlocks();
22213 ns = gen_xmlNsPtr(n_ns, 0);
22214 name = gen_eaten_name(n_name, 1);
22216 ret_val = xmlNewNodeEatName(ns, name);
22217 desret_xmlNodePtr(ret_val);
22219 des_xmlNsPtr(n_ns, ns, 0);
22220 des_eaten_name(n_name, name, 1);
22221 xmlResetLastError();
22222 if (mem_base != xmlMemBlocks()) {
22223 printf("Leak of %d blocks found in xmlNewNodeEatName",
22224 xmlMemBlocks() - mem_base);
22226 printf(" %d", n_ns);
22227 printf(" %d", n_name);
22239 test_xmlNewNs(void) {
22244 xmlNodePtr node; /* the element carrying the namespace */
22246 xmlChar * href; /* the URI associated */
22248 xmlChar * prefix; /* the prefix for the namespace */
22251 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
22252 for (n_href = 0;n_href < gen_nb_const_xmlChar_ptr;n_href++) {
22253 for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
22254 mem_base = xmlMemBlocks();
22255 node = gen_xmlNodePtr(n_node, 0);
22256 href = gen_const_xmlChar_ptr(n_href, 1);
22257 prefix = gen_const_xmlChar_ptr(n_prefix, 2);
22259 ret_val = xmlNewNs(node, (const xmlChar *)href, (const xmlChar *)prefix);
22260 if ((node == NULL) && (ret_val != NULL)) xmlFreeNs(ret_val);
22261 desret_xmlNsPtr(ret_val);
22263 des_xmlNodePtr(n_node, node, 0);
22264 des_const_xmlChar_ptr(n_href, (const xmlChar *)href, 1);
22265 des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 2);
22266 xmlResetLastError();
22267 if (mem_base != xmlMemBlocks()) {
22268 printf("Leak of %d blocks found in xmlNewNs",
22269 xmlMemBlocks() - mem_base);
22271 printf(" %d", n_node);
22272 printf(" %d", n_href);
22273 printf(" %d", n_prefix);
22286 test_xmlNewNsProp(void) {
22290 xmlAttrPtr ret_val;
22291 xmlNodePtr node; /* the holding node */
22293 xmlNsPtr ns; /* the namespace */
22295 xmlChar * name; /* the name of the attribute */
22297 xmlChar * value; /* the value of the attribute */
22300 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
22301 for (n_ns = 0;n_ns < gen_nb_xmlNsPtr;n_ns++) {
22302 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
22303 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
22304 mem_base = xmlMemBlocks();
22305 node = gen_xmlNodePtr(n_node, 0);
22306 ns = gen_xmlNsPtr(n_ns, 1);
22307 name = gen_const_xmlChar_ptr(n_name, 2);
22308 value = gen_const_xmlChar_ptr(n_value, 3);
22310 ret_val = xmlNewNsProp(node, ns, (const xmlChar *)name, (const xmlChar *)value);
22311 desret_xmlAttrPtr(ret_val);
22313 des_xmlNodePtr(n_node, node, 0);
22314 des_xmlNsPtr(n_ns, ns, 1);
22315 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
22316 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 3);
22317 xmlResetLastError();
22318 if (mem_base != xmlMemBlocks()) {
22319 printf("Leak of %d blocks found in xmlNewNsProp",
22320 xmlMemBlocks() - mem_base);
22322 printf(" %d", n_node);
22323 printf(" %d", n_ns);
22324 printf(" %d", n_name);
22325 printf(" %d", n_value);
22339 test_xmlNewNsPropEatName(void) {
22343 xmlAttrPtr ret_val;
22344 xmlNodePtr node; /* the holding node */
22346 xmlNsPtr ns; /* the namespace */
22348 xmlChar * name; /* the name of the attribute */
22350 xmlChar * value; /* the value of the attribute */
22353 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
22354 for (n_ns = 0;n_ns < gen_nb_xmlNsPtr;n_ns++) {
22355 for (n_name = 0;n_name < gen_nb_eaten_name;n_name++) {
22356 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
22357 mem_base = xmlMemBlocks();
22358 node = gen_xmlNodePtr(n_node, 0);
22359 ns = gen_xmlNsPtr(n_ns, 1);
22360 name = gen_eaten_name(n_name, 2);
22361 value = gen_const_xmlChar_ptr(n_value, 3);
22363 ret_val = xmlNewNsPropEatName(node, ns, name, (const xmlChar *)value);
22364 desret_xmlAttrPtr(ret_val);
22366 des_xmlNodePtr(n_node, node, 0);
22367 des_xmlNsPtr(n_ns, ns, 1);
22368 des_eaten_name(n_name, name, 2);
22369 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 3);
22370 xmlResetLastError();
22371 if (mem_base != xmlMemBlocks()) {
22372 printf("Leak of %d blocks found in xmlNewNsPropEatName",
22373 xmlMemBlocks() - mem_base);
22375 printf(" %d", n_node);
22376 printf(" %d", n_ns);
22377 printf(" %d", n_name);
22378 printf(" %d", n_value);
22392 test_xmlNewPI(void) {
22396 xmlNodePtr ret_val;
22397 xmlChar * name; /* the processing instruction name */
22399 xmlChar * content; /* the PI content */
22402 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
22403 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
22404 mem_base = xmlMemBlocks();
22405 name = gen_const_xmlChar_ptr(n_name, 0);
22406 content = gen_const_xmlChar_ptr(n_content, 1);
22408 ret_val = xmlNewPI((const xmlChar *)name, (const xmlChar *)content);
22409 desret_xmlNodePtr(ret_val);
22411 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 0);
22412 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
22413 xmlResetLastError();
22414 if (mem_base != xmlMemBlocks()) {
22415 printf("Leak of %d blocks found in xmlNewPI",
22416 xmlMemBlocks() - mem_base);
22418 printf(" %d", n_name);
22419 printf(" %d", n_content);
22431 test_xmlNewProp(void) {
22434 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
22435 #ifdef LIBXML_TREE_ENABLED
22437 xmlAttrPtr ret_val;
22438 xmlNodePtr node; /* the holding node */
22440 xmlChar * name; /* the name of the attribute */
22442 xmlChar * value; /* the value of the attribute */
22445 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
22446 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
22447 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
22448 mem_base = xmlMemBlocks();
22449 node = gen_xmlNodePtr(n_node, 0);
22450 name = gen_const_xmlChar_ptr(n_name, 1);
22451 value = gen_const_xmlChar_ptr(n_value, 2);
22453 ret_val = xmlNewProp(node, (const xmlChar *)name, (const xmlChar *)value);
22454 desret_xmlAttrPtr(ret_val);
22456 des_xmlNodePtr(n_node, node, 0);
22457 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
22458 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 2);
22459 xmlResetLastError();
22460 if (mem_base != xmlMemBlocks()) {
22461 printf("Leak of %d blocks found in xmlNewProp",
22462 xmlMemBlocks() - mem_base);
22464 printf(" %d", n_node);
22465 printf(" %d", n_name);
22466 printf(" %d", n_value);
22481 test_xmlNewReference(void) {
22485 xmlNodePtr ret_val;
22486 xmlDoc * doc; /* the document */
22488 xmlChar * name; /* the reference name, or the reference string with & and ; */
22491 for (n_doc = 0;n_doc < gen_nb_const_xmlDoc_ptr;n_doc++) {
22492 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
22493 mem_base = xmlMemBlocks();
22494 doc = gen_const_xmlDoc_ptr(n_doc, 0);
22495 name = gen_const_xmlChar_ptr(n_name, 1);
22497 ret_val = xmlNewReference((const xmlDoc *)doc, (const xmlChar *)name);
22498 desret_xmlNodePtr(ret_val);
22500 des_const_xmlDoc_ptr(n_doc, (const xmlDoc *)doc, 0);
22501 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
22502 xmlResetLastError();
22503 if (mem_base != xmlMemBlocks()) {
22504 printf("Leak of %d blocks found in xmlNewReference",
22505 xmlMemBlocks() - mem_base);
22507 printf(" %d", n_doc);
22508 printf(" %d", n_name);
22520 test_xmlNewText(void) {
22524 xmlNodePtr ret_val;
22525 xmlChar * content; /* the text content */
22528 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
22529 mem_base = xmlMemBlocks();
22530 content = gen_const_xmlChar_ptr(n_content, 0);
22532 ret_val = xmlNewText((const xmlChar *)content);
22533 desret_xmlNodePtr(ret_val);
22535 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 0);
22536 xmlResetLastError();
22537 if (mem_base != xmlMemBlocks()) {
22538 printf("Leak of %d blocks found in xmlNewText",
22539 xmlMemBlocks() - mem_base);
22541 printf(" %d", n_content);
22552 test_xmlNewTextChild(void) {
22555 #if defined(LIBXML_TREE_ENABLED)
22556 #ifdef LIBXML_TREE_ENABLED
22558 xmlNodePtr ret_val;
22559 xmlNodePtr parent; /* the parent node */
22561 xmlNsPtr ns; /* a namespace if any */
22563 xmlChar * name; /* the name of the child */
22565 xmlChar * content; /* the text content of the child if any. */
22568 for (n_parent = 0;n_parent < gen_nb_xmlNodePtr;n_parent++) {
22569 for (n_ns = 0;n_ns < gen_nb_xmlNsPtr;n_ns++) {
22570 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
22571 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
22572 mem_base = xmlMemBlocks();
22573 parent = gen_xmlNodePtr(n_parent, 0);
22574 ns = gen_xmlNsPtr(n_ns, 1);
22575 name = gen_const_xmlChar_ptr(n_name, 2);
22576 content = gen_const_xmlChar_ptr(n_content, 3);
22578 ret_val = xmlNewTextChild(parent, ns, (const xmlChar *)name, (const xmlChar *)content);
22579 desret_xmlNodePtr(ret_val);
22581 des_xmlNodePtr(n_parent, parent, 0);
22582 des_xmlNsPtr(n_ns, ns, 1);
22583 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
22584 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 3);
22585 xmlResetLastError();
22586 if (mem_base != xmlMemBlocks()) {
22587 printf("Leak of %d blocks found in xmlNewTextChild",
22588 xmlMemBlocks() - mem_base);
22590 printf(" %d", n_parent);
22591 printf(" %d", n_ns);
22592 printf(" %d", n_name);
22593 printf(" %d", n_content);
22609 test_xmlNewTextLen(void) {
22613 xmlNodePtr ret_val;
22614 xmlChar * content; /* the text content */
22616 int len; /* the text len. */
22619 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
22620 for (n_len = 0;n_len < gen_nb_int;n_len++) {
22621 mem_base = xmlMemBlocks();
22622 content = gen_const_xmlChar_ptr(n_content, 0);
22623 len = gen_int(n_len, 1);
22624 if ((content != NULL) &&
22625 (len > (int) strlen((const char *) content) + 1))
22628 ret_val = xmlNewTextLen((const xmlChar *)content, len);
22629 desret_xmlNodePtr(ret_val);
22631 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 0);
22632 des_int(n_len, len, 1);
22633 xmlResetLastError();
22634 if (mem_base != xmlMemBlocks()) {
22635 printf("Leak of %d blocks found in xmlNewTextLen",
22636 xmlMemBlocks() - mem_base);
22638 printf(" %d", n_content);
22639 printf(" %d", n_len);
22651 test_xmlNextElementSibling(void) {
22654 #if defined(LIBXML_TREE_ENABLED)
22656 xmlNodePtr ret_val;
22657 xmlNodePtr node; /* the current node */
22660 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
22661 mem_base = xmlMemBlocks();
22662 node = gen_xmlNodePtr(n_node, 0);
22664 ret_val = xmlNextElementSibling(node);
22665 desret_xmlNodePtr(ret_val);
22667 des_xmlNodePtr(n_node, node, 0);
22668 xmlResetLastError();
22669 if (mem_base != xmlMemBlocks()) {
22670 printf("Leak of %d blocks found in xmlNextElementSibling",
22671 xmlMemBlocks() - mem_base);
22673 printf(" %d", n_node);
22685 test_xmlNodeAddContent(void) {
22689 xmlNodePtr cur; /* the node being modified */
22691 xmlChar * content; /* extra content */
22694 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
22695 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
22696 mem_base = xmlMemBlocks();
22697 cur = gen_xmlNodePtr(n_cur, 0);
22698 content = gen_const_xmlChar_ptr(n_content, 1);
22700 xmlNodeAddContent(cur, (const xmlChar *)content);
22702 des_xmlNodePtr(n_cur, cur, 0);
22703 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
22704 xmlResetLastError();
22705 if (mem_base != xmlMemBlocks()) {
22706 printf("Leak of %d blocks found in xmlNodeAddContent",
22707 xmlMemBlocks() - mem_base);
22709 printf(" %d", n_cur);
22710 printf(" %d", n_content);
22722 test_xmlNodeAddContentLen(void) {
22726 xmlNodePtr cur; /* the node being modified */
22728 xmlChar * content; /* extra content */
22730 int len; /* the size of @content */
22733 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
22734 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
22735 for (n_len = 0;n_len < gen_nb_int;n_len++) {
22736 mem_base = xmlMemBlocks();
22737 cur = gen_xmlNodePtr(n_cur, 0);
22738 content = gen_const_xmlChar_ptr(n_content, 1);
22739 len = gen_int(n_len, 2);
22740 if ((content != NULL) &&
22741 (len > (int) strlen((const char *) content) + 1))
22744 xmlNodeAddContentLen(cur, (const xmlChar *)content, len);
22746 des_xmlNodePtr(n_cur, cur, 0);
22747 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
22748 des_int(n_len, len, 2);
22749 xmlResetLastError();
22750 if (mem_base != xmlMemBlocks()) {
22751 printf("Leak of %d blocks found in xmlNodeAddContentLen",
22752 xmlMemBlocks() - mem_base);
22754 printf(" %d", n_cur);
22755 printf(" %d", n_content);
22756 printf(" %d", n_len);
22769 test_xmlNodeBufGetContent(void) {
22774 xmlBufferPtr buffer; /* a buffer */
22776 xmlNode * cur; /* the node being read */
22779 for (n_buffer = 0;n_buffer < gen_nb_xmlBufferPtr;n_buffer++) {
22780 for (n_cur = 0;n_cur < gen_nb_const_xmlNode_ptr;n_cur++) {
22781 mem_base = xmlMemBlocks();
22782 buffer = gen_xmlBufferPtr(n_buffer, 0);
22783 cur = gen_const_xmlNode_ptr(n_cur, 1);
22785 ret_val = xmlNodeBufGetContent(buffer, (const xmlNode *)cur);
22786 desret_int(ret_val);
22788 des_xmlBufferPtr(n_buffer, buffer, 0);
22789 des_const_xmlNode_ptr(n_cur, (const xmlNode *)cur, 1);
22790 xmlResetLastError();
22791 if (mem_base != xmlMemBlocks()) {
22792 printf("Leak of %d blocks found in xmlNodeBufGetContent",
22793 xmlMemBlocks() - mem_base);
22795 printf(" %d", n_buffer);
22796 printf(" %d", n_cur);
22808 test_xmlNodeDump(void) {
22811 #if defined(LIBXML_OUTPUT_ENABLED)
22814 xmlBufferPtr buf; /* the XML buffer output */
22816 xmlDocPtr doc; /* the document */
22818 xmlNodePtr cur; /* the current node */
22820 int level; /* the imbrication level for indenting */
22822 int format; /* is formatting allowed */
22825 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
22826 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
22827 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
22828 for (n_level = 0;n_level < gen_nb_int;n_level++) {
22829 for (n_format = 0;n_format < gen_nb_int;n_format++) {
22830 mem_base = xmlMemBlocks();
22831 buf = gen_xmlBufferPtr(n_buf, 0);
22832 doc = gen_xmlDocPtr(n_doc, 1);
22833 cur = gen_xmlNodePtr(n_cur, 2);
22834 level = gen_int(n_level, 3);
22835 format = gen_int(n_format, 4);
22837 ret_val = xmlNodeDump(buf, doc, cur, level, format);
22838 desret_int(ret_val);
22840 des_xmlBufferPtr(n_buf, buf, 0);
22841 des_xmlDocPtr(n_doc, doc, 1);
22842 des_xmlNodePtr(n_cur, cur, 2);
22843 des_int(n_level, level, 3);
22844 des_int(n_format, format, 4);
22845 xmlResetLastError();
22846 if (mem_base != xmlMemBlocks()) {
22847 printf("Leak of %d blocks found in xmlNodeDump",
22848 xmlMemBlocks() - mem_base);
22850 printf(" %d", n_buf);
22851 printf(" %d", n_doc);
22852 printf(" %d", n_cur);
22853 printf(" %d", n_level);
22854 printf(" %d", n_format);
22870 test_xmlNodeDumpOutput(void) {
22873 #if defined(LIBXML_OUTPUT_ENABLED)
22875 xmlOutputBufferPtr buf; /* the XML buffer output */
22877 xmlDocPtr doc; /* the document */
22879 xmlNodePtr cur; /* the current node */
22881 int level; /* the imbrication level for indenting */
22883 int format; /* is formatting allowed */
22885 char * encoding; /* an optional encoding string */
22888 for (n_buf = 0;n_buf < gen_nb_xmlOutputBufferPtr;n_buf++) {
22889 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
22890 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
22891 for (n_level = 0;n_level < gen_nb_int;n_level++) {
22892 for (n_format = 0;n_format < gen_nb_int;n_format++) {
22893 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
22894 mem_base = xmlMemBlocks();
22895 buf = gen_xmlOutputBufferPtr(n_buf, 0);
22896 doc = gen_xmlDocPtr(n_doc, 1);
22897 cur = gen_xmlNodePtr(n_cur, 2);
22898 level = gen_int(n_level, 3);
22899 format = gen_int(n_format, 4);
22900 encoding = gen_const_char_ptr(n_encoding, 5);
22902 xmlNodeDumpOutput(buf, doc, cur, level, format, (const char *)encoding);
22904 des_xmlOutputBufferPtr(n_buf, buf, 0);
22905 des_xmlDocPtr(n_doc, doc, 1);
22906 des_xmlNodePtr(n_cur, cur, 2);
22907 des_int(n_level, level, 3);
22908 des_int(n_format, format, 4);
22909 des_const_char_ptr(n_encoding, (const char *)encoding, 5);
22910 xmlResetLastError();
22911 if (mem_base != xmlMemBlocks()) {
22912 printf("Leak of %d blocks found in xmlNodeDumpOutput",
22913 xmlMemBlocks() - mem_base);
22915 printf(" %d", n_buf);
22916 printf(" %d", n_doc);
22917 printf(" %d", n_cur);
22918 printf(" %d", n_level);
22919 printf(" %d", n_format);
22920 printf(" %d", n_encoding);
22937 test_xmlNodeGetBase(void) {
22942 xmlDoc * doc; /* the document the node pertains to */
22944 xmlNode * cur; /* the node being checked */
22947 for (n_doc = 0;n_doc < gen_nb_const_xmlDoc_ptr;n_doc++) {
22948 for (n_cur = 0;n_cur < gen_nb_const_xmlNode_ptr;n_cur++) {
22949 mem_base = xmlMemBlocks();
22950 doc = gen_const_xmlDoc_ptr(n_doc, 0);
22951 cur = gen_const_xmlNode_ptr(n_cur, 1);
22953 ret_val = xmlNodeGetBase((const xmlDoc *)doc, (const xmlNode *)cur);
22954 desret_xmlChar_ptr(ret_val);
22956 des_const_xmlDoc_ptr(n_doc, (const xmlDoc *)doc, 0);
22957 des_const_xmlNode_ptr(n_cur, (const xmlNode *)cur, 1);
22958 xmlResetLastError();
22959 if (mem_base != xmlMemBlocks()) {
22960 printf("Leak of %d blocks found in xmlNodeGetBase",
22961 xmlMemBlocks() - mem_base);
22963 printf(" %d", n_doc);
22964 printf(" %d", n_cur);
22976 test_xmlNodeGetContent(void) {
22981 xmlNode * cur; /* the node being read */
22984 for (n_cur = 0;n_cur < gen_nb_const_xmlNode_ptr;n_cur++) {
22985 mem_base = xmlMemBlocks();
22986 cur = gen_const_xmlNode_ptr(n_cur, 0);
22988 ret_val = xmlNodeGetContent((const xmlNode *)cur);
22989 desret_xmlChar_ptr(ret_val);
22991 des_const_xmlNode_ptr(n_cur, (const xmlNode *)cur, 0);
22992 xmlResetLastError();
22993 if (mem_base != xmlMemBlocks()) {
22994 printf("Leak of %d blocks found in xmlNodeGetContent",
22995 xmlMemBlocks() - mem_base);
22997 printf(" %d", n_cur);
23008 test_xmlNodeGetLang(void) {
23013 xmlNode * cur; /* the node being checked */
23016 for (n_cur = 0;n_cur < gen_nb_const_xmlNode_ptr;n_cur++) {
23017 mem_base = xmlMemBlocks();
23018 cur = gen_const_xmlNode_ptr(n_cur, 0);
23020 ret_val = xmlNodeGetLang((const xmlNode *)cur);
23021 desret_xmlChar_ptr(ret_val);
23023 des_const_xmlNode_ptr(n_cur, (const xmlNode *)cur, 0);
23024 xmlResetLastError();
23025 if (mem_base != xmlMemBlocks()) {
23026 printf("Leak of %d blocks found in xmlNodeGetLang",
23027 xmlMemBlocks() - mem_base);
23029 printf(" %d", n_cur);
23040 test_xmlNodeGetSpacePreserve(void) {
23045 xmlNode * cur; /* the node being checked */
23048 for (n_cur = 0;n_cur < gen_nb_const_xmlNode_ptr;n_cur++) {
23049 mem_base = xmlMemBlocks();
23050 cur = gen_const_xmlNode_ptr(n_cur, 0);
23052 ret_val = xmlNodeGetSpacePreserve((const xmlNode *)cur);
23053 desret_int(ret_val);
23055 des_const_xmlNode_ptr(n_cur, (const xmlNode *)cur, 0);
23056 xmlResetLastError();
23057 if (mem_base != xmlMemBlocks()) {
23058 printf("Leak of %d blocks found in xmlNodeGetSpacePreserve",
23059 xmlMemBlocks() - mem_base);
23061 printf(" %d", n_cur);
23072 test_xmlNodeIsText(void) {
23077 xmlNode * node; /* the node */
23080 for (n_node = 0;n_node < gen_nb_const_xmlNode_ptr;n_node++) {
23081 mem_base = xmlMemBlocks();
23082 node = gen_const_xmlNode_ptr(n_node, 0);
23084 ret_val = xmlNodeIsText((const xmlNode *)node);
23085 desret_int(ret_val);
23087 des_const_xmlNode_ptr(n_node, (const xmlNode *)node, 0);
23088 xmlResetLastError();
23089 if (mem_base != xmlMemBlocks()) {
23090 printf("Leak of %d blocks found in xmlNodeIsText",
23091 xmlMemBlocks() - mem_base);
23093 printf(" %d", n_node);
23104 test_xmlNodeListGetRawString(void) {
23107 #if defined(LIBXML_TREE_ENABLED)
23110 xmlDoc * doc; /* the document */
23112 xmlNode * list; /* a Node list */
23114 int inLine; /* should we replace entity contents or show their external form */
23117 for (n_doc = 0;n_doc < gen_nb_const_xmlDoc_ptr;n_doc++) {
23118 for (n_list = 0;n_list < gen_nb_const_xmlNode_ptr;n_list++) {
23119 for (n_inLine = 0;n_inLine < gen_nb_int;n_inLine++) {
23120 mem_base = xmlMemBlocks();
23121 doc = gen_const_xmlDoc_ptr(n_doc, 0);
23122 list = gen_const_xmlNode_ptr(n_list, 1);
23123 inLine = gen_int(n_inLine, 2);
23125 ret_val = xmlNodeListGetRawString((const xmlDoc *)doc, (const xmlNode *)list, inLine);
23126 desret_xmlChar_ptr(ret_val);
23128 des_const_xmlDoc_ptr(n_doc, (const xmlDoc *)doc, 0);
23129 des_const_xmlNode_ptr(n_list, (const xmlNode *)list, 1);
23130 des_int(n_inLine, inLine, 2);
23131 xmlResetLastError();
23132 if (mem_base != xmlMemBlocks()) {
23133 printf("Leak of %d blocks found in xmlNodeListGetRawString",
23134 xmlMemBlocks() - mem_base);
23136 printf(" %d", n_doc);
23137 printf(" %d", n_list);
23138 printf(" %d", n_inLine);
23152 test_xmlNodeListGetString(void) {
23157 xmlDocPtr doc; /* the document */
23159 xmlNode * list; /* a Node list */
23161 int inLine; /* should we replace entity contents or show their external form */
23164 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
23165 for (n_list = 0;n_list < gen_nb_const_xmlNode_ptr;n_list++) {
23166 for (n_inLine = 0;n_inLine < gen_nb_int;n_inLine++) {
23167 mem_base = xmlMemBlocks();
23168 doc = gen_xmlDocPtr(n_doc, 0);
23169 list = gen_const_xmlNode_ptr(n_list, 1);
23170 inLine = gen_int(n_inLine, 2);
23172 ret_val = xmlNodeListGetString(doc, (const xmlNode *)list, inLine);
23173 desret_xmlChar_ptr(ret_val);
23175 des_xmlDocPtr(n_doc, doc, 0);
23176 des_const_xmlNode_ptr(n_list, (const xmlNode *)list, 1);
23177 des_int(n_inLine, inLine, 2);
23178 xmlResetLastError();
23179 if (mem_base != xmlMemBlocks()) {
23180 printf("Leak of %d blocks found in xmlNodeListGetString",
23181 xmlMemBlocks() - mem_base);
23183 printf(" %d", n_doc);
23184 printf(" %d", n_list);
23185 printf(" %d", n_inLine);
23198 test_xmlNodeSetBase(void) {
23201 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
23203 xmlNodePtr cur; /* the node being changed */
23205 xmlChar * uri; /* the new base URI */
23208 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
23209 for (n_uri = 0;n_uri < gen_nb_const_xmlChar_ptr;n_uri++) {
23210 mem_base = xmlMemBlocks();
23211 cur = gen_xmlNodePtr(n_cur, 0);
23212 uri = gen_const_xmlChar_ptr(n_uri, 1);
23214 xmlNodeSetBase(cur, (const xmlChar *)uri);
23216 des_xmlNodePtr(n_cur, cur, 0);
23217 des_const_xmlChar_ptr(n_uri, (const xmlChar *)uri, 1);
23218 xmlResetLastError();
23219 if (mem_base != xmlMemBlocks()) {
23220 printf("Leak of %d blocks found in xmlNodeSetBase",
23221 xmlMemBlocks() - mem_base);
23223 printf(" %d", n_cur);
23224 printf(" %d", n_uri);
23237 test_xmlNodeSetContent(void) {
23241 xmlNodePtr cur; /* the node being modified */
23243 xmlChar * content; /* the new value of the content */
23246 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
23247 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
23248 mem_base = xmlMemBlocks();
23249 cur = gen_xmlNodePtr(n_cur, 0);
23250 content = gen_const_xmlChar_ptr(n_content, 1);
23252 xmlNodeSetContent(cur, (const xmlChar *)content);
23254 des_xmlNodePtr(n_cur, cur, 0);
23255 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
23256 xmlResetLastError();
23257 if (mem_base != xmlMemBlocks()) {
23258 printf("Leak of %d blocks found in xmlNodeSetContent",
23259 xmlMemBlocks() - mem_base);
23261 printf(" %d", n_cur);
23262 printf(" %d", n_content);
23274 test_xmlNodeSetContentLen(void) {
23277 #if defined(LIBXML_TREE_ENABLED)
23279 xmlNodePtr cur; /* the node being modified */
23281 xmlChar * content; /* the new value of the content */
23283 int len; /* the size of @content */
23286 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
23287 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
23288 for (n_len = 0;n_len < gen_nb_int;n_len++) {
23289 mem_base = xmlMemBlocks();
23290 cur = gen_xmlNodePtr(n_cur, 0);
23291 content = gen_const_xmlChar_ptr(n_content, 1);
23292 len = gen_int(n_len, 2);
23293 if ((content != NULL) &&
23294 (len > (int) strlen((const char *) content) + 1))
23297 xmlNodeSetContentLen(cur, (const xmlChar *)content, len);
23299 des_xmlNodePtr(n_cur, cur, 0);
23300 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
23301 des_int(n_len, len, 2);
23302 xmlResetLastError();
23303 if (mem_base != xmlMemBlocks()) {
23304 printf("Leak of %d blocks found in xmlNodeSetContentLen",
23305 xmlMemBlocks() - mem_base);
23307 printf(" %d", n_cur);
23308 printf(" %d", n_content);
23309 printf(" %d", n_len);
23323 test_xmlNodeSetLang(void) {
23326 #if defined(LIBXML_TREE_ENABLED)
23328 xmlNodePtr cur; /* the node being changed */
23330 xmlChar * lang; /* the language description */
23333 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
23334 for (n_lang = 0;n_lang < gen_nb_const_xmlChar_ptr;n_lang++) {
23335 mem_base = xmlMemBlocks();
23336 cur = gen_xmlNodePtr(n_cur, 0);
23337 lang = gen_const_xmlChar_ptr(n_lang, 1);
23339 xmlNodeSetLang(cur, (const xmlChar *)lang);
23341 des_xmlNodePtr(n_cur, cur, 0);
23342 des_const_xmlChar_ptr(n_lang, (const xmlChar *)lang, 1);
23343 xmlResetLastError();
23344 if (mem_base != xmlMemBlocks()) {
23345 printf("Leak of %d blocks found in xmlNodeSetLang",
23346 xmlMemBlocks() - mem_base);
23348 printf(" %d", n_cur);
23349 printf(" %d", n_lang);
23362 test_xmlNodeSetName(void) {
23365 #if defined(LIBXML_TREE_ENABLED)
23367 xmlNodePtr cur; /* the node being changed */
23369 xmlChar * name; /* the new tag name */
23372 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
23373 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
23374 mem_base = xmlMemBlocks();
23375 cur = gen_xmlNodePtr(n_cur, 0);
23376 name = gen_const_xmlChar_ptr(n_name, 1);
23378 xmlNodeSetName(cur, (const xmlChar *)name);
23380 des_xmlNodePtr(n_cur, cur, 0);
23381 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
23382 xmlResetLastError();
23383 if (mem_base != xmlMemBlocks()) {
23384 printf("Leak of %d blocks found in xmlNodeSetName",
23385 xmlMemBlocks() - mem_base);
23387 printf(" %d", n_cur);
23388 printf(" %d", n_name);
23401 test_xmlNodeSetSpacePreserve(void) {
23404 #if defined(LIBXML_TREE_ENABLED)
23406 xmlNodePtr cur; /* the node being changed */
23408 int val; /* the xml:space value ("0": default, 1: "preserve") */
23411 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
23412 for (n_val = 0;n_val < gen_nb_int;n_val++) {
23413 mem_base = xmlMemBlocks();
23414 cur = gen_xmlNodePtr(n_cur, 0);
23415 val = gen_int(n_val, 1);
23417 xmlNodeSetSpacePreserve(cur, val);
23419 des_xmlNodePtr(n_cur, cur, 0);
23420 des_int(n_val, val, 1);
23421 xmlResetLastError();
23422 if (mem_base != xmlMemBlocks()) {
23423 printf("Leak of %d blocks found in xmlNodeSetSpacePreserve",
23424 xmlMemBlocks() - mem_base);
23426 printf(" %d", n_cur);
23427 printf(" %d", n_val);
23440 test_xmlPreviousElementSibling(void) {
23443 #if defined(LIBXML_TREE_ENABLED)
23445 xmlNodePtr ret_val;
23446 xmlNodePtr node; /* the current node */
23449 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
23450 mem_base = xmlMemBlocks();
23451 node = gen_xmlNodePtr(n_node, 0);
23453 ret_val = xmlPreviousElementSibling(node);
23454 desret_xmlNodePtr(ret_val);
23456 des_xmlNodePtr(n_node, node, 0);
23457 xmlResetLastError();
23458 if (mem_base != xmlMemBlocks()) {
23459 printf("Leak of %d blocks found in xmlPreviousElementSibling",
23460 xmlMemBlocks() - mem_base);
23462 printf(" %d", n_node);
23474 test_xmlReconciliateNs(void) {
23477 #if defined(LIBXML_TREE_ENABLED)
23478 #ifdef LIBXML_TREE_ENABLED
23481 xmlDocPtr doc; /* the document */
23483 xmlNodePtr tree; /* a node defining the subtree to reconciliate */
23486 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
23487 for (n_tree = 0;n_tree < gen_nb_xmlNodePtr;n_tree++) {
23488 mem_base = xmlMemBlocks();
23489 doc = gen_xmlDocPtr(n_doc, 0);
23490 tree = gen_xmlNodePtr(n_tree, 1);
23492 ret_val = xmlReconciliateNs(doc, tree);
23493 desret_int(ret_val);
23495 des_xmlDocPtr(n_doc, doc, 0);
23496 des_xmlNodePtr(n_tree, tree, 1);
23497 xmlResetLastError();
23498 if (mem_base != xmlMemBlocks()) {
23499 printf("Leak of %d blocks found in xmlReconciliateNs",
23500 xmlMemBlocks() - mem_base);
23502 printf(" %d", n_doc);
23503 printf(" %d", n_tree);
23517 test_xmlRemoveProp(void) {
23522 xmlAttrPtr cur; /* an attribute */
23525 for (n_cur = 0;n_cur < gen_nb_xmlAttrPtr;n_cur++) {
23526 mem_base = xmlMemBlocks();
23527 cur = gen_xmlAttrPtr(n_cur, 0);
23529 ret_val = xmlRemoveProp(cur);
23531 desret_int(ret_val);
23533 des_xmlAttrPtr(n_cur, cur, 0);
23534 xmlResetLastError();
23535 if (mem_base != xmlMemBlocks()) {
23536 printf("Leak of %d blocks found in xmlRemoveProp",
23537 xmlMemBlocks() - mem_base);
23539 printf(" %d", n_cur);
23550 test_xmlReplaceNode(void) {
23553 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
23555 xmlNodePtr ret_val;
23556 xmlNodePtr old; /* the old node */
23558 xmlNodePtr cur; /* the node */
23561 for (n_old = 0;n_old < gen_nb_xmlNodePtr;n_old++) {
23562 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr_in;n_cur++) {
23563 mem_base = xmlMemBlocks();
23564 old = gen_xmlNodePtr(n_old, 0);
23565 cur = gen_xmlNodePtr_in(n_cur, 1);
23567 ret_val = xmlReplaceNode(old, cur);
23569 xmlUnlinkNode(cur);
23570 xmlFreeNode(cur) ; cur = NULL ; }
23572 xmlUnlinkNode(old);
23573 xmlFreeNode(old) ; old = NULL ; }
23575 desret_xmlNodePtr(ret_val);
23577 des_xmlNodePtr(n_old, old, 0);
23578 des_xmlNodePtr_in(n_cur, cur, 1);
23579 xmlResetLastError();
23580 if (mem_base != xmlMemBlocks()) {
23581 printf("Leak of %d blocks found in xmlReplaceNode",
23582 xmlMemBlocks() - mem_base);
23584 printf(" %d", n_old);
23585 printf(" %d", n_cur);
23598 test_xmlSaveFile(void) {
23601 #if defined(LIBXML_OUTPUT_ENABLED)
23604 const char * filename; /* the filename (or URL) */
23606 xmlDocPtr cur; /* the document */
23609 for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
23610 for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
23611 mem_base = xmlMemBlocks();
23612 filename = gen_fileoutput(n_filename, 0);
23613 cur = gen_xmlDocPtr(n_cur, 1);
23615 ret_val = xmlSaveFile(filename, cur);
23616 desret_int(ret_val);
23618 des_fileoutput(n_filename, filename, 0);
23619 des_xmlDocPtr(n_cur, cur, 1);
23620 xmlResetLastError();
23621 if (mem_base != xmlMemBlocks()) {
23622 printf("Leak of %d blocks found in xmlSaveFile",
23623 xmlMemBlocks() - mem_base);
23625 printf(" %d", n_filename);
23626 printf(" %d", n_cur);
23639 test_xmlSaveFileEnc(void) {
23642 #if defined(LIBXML_OUTPUT_ENABLED)
23645 const char * filename; /* the filename (or URL) */
23647 xmlDocPtr cur; /* the document */
23649 char * encoding; /* the name of an encoding (or NULL) */
23652 for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
23653 for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
23654 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
23655 mem_base = xmlMemBlocks();
23656 filename = gen_fileoutput(n_filename, 0);
23657 cur = gen_xmlDocPtr(n_cur, 1);
23658 encoding = gen_const_char_ptr(n_encoding, 2);
23660 ret_val = xmlSaveFileEnc(filename, cur, (const char *)encoding);
23661 desret_int(ret_val);
23663 des_fileoutput(n_filename, filename, 0);
23664 des_xmlDocPtr(n_cur, cur, 1);
23665 des_const_char_ptr(n_encoding, (const char *)encoding, 2);
23666 xmlResetLastError();
23667 if (mem_base != xmlMemBlocks()) {
23668 printf("Leak of %d blocks found in xmlSaveFileEnc",
23669 xmlMemBlocks() - mem_base);
23671 printf(" %d", n_filename);
23672 printf(" %d", n_cur);
23673 printf(" %d", n_encoding);
23687 test_xmlSaveFileTo(void) {
23690 #if defined(LIBXML_OUTPUT_ENABLED)
23693 xmlOutputBufferPtr buf; /* an output I/O buffer */
23695 xmlDocPtr cur; /* the document */
23697 char * encoding; /* the encoding if any assuming the I/O layer handles the trancoding */
23700 for (n_buf = 0;n_buf < gen_nb_xmlOutputBufferPtr;n_buf++) {
23701 for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
23702 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
23703 mem_base = xmlMemBlocks();
23704 buf = gen_xmlOutputBufferPtr(n_buf, 0);
23705 cur = gen_xmlDocPtr(n_cur, 1);
23706 encoding = gen_const_char_ptr(n_encoding, 2);
23708 ret_val = xmlSaveFileTo(buf, cur, (const char *)encoding);
23710 desret_int(ret_val);
23712 des_xmlOutputBufferPtr(n_buf, buf, 0);
23713 des_xmlDocPtr(n_cur, cur, 1);
23714 des_const_char_ptr(n_encoding, (const char *)encoding, 2);
23715 xmlResetLastError();
23716 if (mem_base != xmlMemBlocks()) {
23717 printf("Leak of %d blocks found in xmlSaveFileTo",
23718 xmlMemBlocks() - mem_base);
23720 printf(" %d", n_buf);
23721 printf(" %d", n_cur);
23722 printf(" %d", n_encoding);
23736 test_xmlSaveFormatFile(void) {
23739 #if defined(LIBXML_OUTPUT_ENABLED)
23742 const char * filename; /* the filename (or URL) */
23744 xmlDocPtr cur; /* the document */
23746 int format; /* should formatting spaces been added */
23749 for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
23750 for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
23751 for (n_format = 0;n_format < gen_nb_int;n_format++) {
23752 mem_base = xmlMemBlocks();
23753 filename = gen_fileoutput(n_filename, 0);
23754 cur = gen_xmlDocPtr(n_cur, 1);
23755 format = gen_int(n_format, 2);
23757 ret_val = xmlSaveFormatFile(filename, cur, format);
23758 desret_int(ret_val);
23760 des_fileoutput(n_filename, filename, 0);
23761 des_xmlDocPtr(n_cur, cur, 1);
23762 des_int(n_format, format, 2);
23763 xmlResetLastError();
23764 if (mem_base != xmlMemBlocks()) {
23765 printf("Leak of %d blocks found in xmlSaveFormatFile",
23766 xmlMemBlocks() - mem_base);
23768 printf(" %d", n_filename);
23769 printf(" %d", n_cur);
23770 printf(" %d", n_format);
23784 test_xmlSaveFormatFileEnc(void) {
23787 #if defined(LIBXML_OUTPUT_ENABLED)
23790 const char * filename; /* the filename or URL to output */
23792 xmlDocPtr cur; /* the document being saved */
23794 char * encoding; /* the name of the encoding to use or NULL. */
23796 int format; /* should formatting spaces be added. */
23799 for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
23800 for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
23801 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
23802 for (n_format = 0;n_format < gen_nb_int;n_format++) {
23803 mem_base = xmlMemBlocks();
23804 filename = gen_fileoutput(n_filename, 0);
23805 cur = gen_xmlDocPtr(n_cur, 1);
23806 encoding = gen_const_char_ptr(n_encoding, 2);
23807 format = gen_int(n_format, 3);
23809 ret_val = xmlSaveFormatFileEnc(filename, cur, (const char *)encoding, format);
23810 desret_int(ret_val);
23812 des_fileoutput(n_filename, filename, 0);
23813 des_xmlDocPtr(n_cur, cur, 1);
23814 des_const_char_ptr(n_encoding, (const char *)encoding, 2);
23815 des_int(n_format, format, 3);
23816 xmlResetLastError();
23817 if (mem_base != xmlMemBlocks()) {
23818 printf("Leak of %d blocks found in xmlSaveFormatFileEnc",
23819 xmlMemBlocks() - mem_base);
23821 printf(" %d", n_filename);
23822 printf(" %d", n_cur);
23823 printf(" %d", n_encoding);
23824 printf(" %d", n_format);
23839 test_xmlSaveFormatFileTo(void) {
23842 #if defined(LIBXML_OUTPUT_ENABLED)
23845 xmlOutputBufferPtr buf; /* an output I/O buffer */
23847 xmlDocPtr cur; /* the document */
23849 char * encoding; /* the encoding if any assuming the I/O layer handles the trancoding */
23851 int format; /* should formatting spaces been added */
23854 for (n_buf = 0;n_buf < gen_nb_xmlOutputBufferPtr;n_buf++) {
23855 for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
23856 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
23857 for (n_format = 0;n_format < gen_nb_int;n_format++) {
23858 mem_base = xmlMemBlocks();
23859 buf = gen_xmlOutputBufferPtr(n_buf, 0);
23860 cur = gen_xmlDocPtr(n_cur, 1);
23861 encoding = gen_const_char_ptr(n_encoding, 2);
23862 format = gen_int(n_format, 3);
23864 ret_val = xmlSaveFormatFileTo(buf, cur, (const char *)encoding, format);
23866 desret_int(ret_val);
23868 des_xmlOutputBufferPtr(n_buf, buf, 0);
23869 des_xmlDocPtr(n_cur, cur, 1);
23870 des_const_char_ptr(n_encoding, (const char *)encoding, 2);
23871 des_int(n_format, format, 3);
23872 xmlResetLastError();
23873 if (mem_base != xmlMemBlocks()) {
23874 printf("Leak of %d blocks found in xmlSaveFormatFileTo",
23875 xmlMemBlocks() - mem_base);
23877 printf(" %d", n_buf);
23878 printf(" %d", n_cur);
23879 printf(" %d", n_encoding);
23880 printf(" %d", n_format);
23895 test_xmlSearchNs(void) {
23900 xmlDocPtr doc; /* the document */
23902 xmlNodePtr node; /* the current node */
23904 xmlChar * nameSpace; /* the namespace prefix */
23907 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
23908 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
23909 for (n_nameSpace = 0;n_nameSpace < gen_nb_const_xmlChar_ptr;n_nameSpace++) {
23910 mem_base = xmlMemBlocks();
23911 doc = gen_xmlDocPtr(n_doc, 0);
23912 node = gen_xmlNodePtr(n_node, 1);
23913 nameSpace = gen_const_xmlChar_ptr(n_nameSpace, 2);
23915 ret_val = xmlSearchNs(doc, node, (const xmlChar *)nameSpace);
23916 desret_xmlNsPtr(ret_val);
23918 des_xmlDocPtr(n_doc, doc, 0);
23919 des_xmlNodePtr(n_node, node, 1);
23920 des_const_xmlChar_ptr(n_nameSpace, (const xmlChar *)nameSpace, 2);
23921 xmlResetLastError();
23922 if (mem_base != xmlMemBlocks()) {
23923 printf("Leak of %d blocks found in xmlSearchNs",
23924 xmlMemBlocks() - mem_base);
23926 printf(" %d", n_doc);
23927 printf(" %d", n_node);
23928 printf(" %d", n_nameSpace);
23941 test_xmlSearchNsByHref(void) {
23946 xmlDocPtr doc; /* the document */
23948 xmlNodePtr node; /* the current node */
23950 xmlChar * href; /* the namespace value */
23953 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
23954 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
23955 for (n_href = 0;n_href < gen_nb_const_xmlChar_ptr;n_href++) {
23956 mem_base = xmlMemBlocks();
23957 doc = gen_xmlDocPtr(n_doc, 0);
23958 node = gen_xmlNodePtr(n_node, 1);
23959 href = gen_const_xmlChar_ptr(n_href, 2);
23961 ret_val = xmlSearchNsByHref(doc, node, (const xmlChar *)href);
23962 desret_xmlNsPtr(ret_val);
23964 des_xmlDocPtr(n_doc, doc, 0);
23965 des_xmlNodePtr(n_node, node, 1);
23966 des_const_xmlChar_ptr(n_href, (const xmlChar *)href, 2);
23967 xmlResetLastError();
23968 if (mem_base != xmlMemBlocks()) {
23969 printf("Leak of %d blocks found in xmlSearchNsByHref",
23970 xmlMemBlocks() - mem_base);
23972 printf(" %d", n_doc);
23973 printf(" %d", n_node);
23974 printf(" %d", n_href);
23987 test_xmlSetBufferAllocationScheme(void) {
23991 xmlBufferAllocationScheme scheme; /* allocation method to use */
23994 for (n_scheme = 0;n_scheme < gen_nb_xmlBufferAllocationScheme;n_scheme++) {
23995 mem_base = xmlMemBlocks();
23996 scheme = gen_xmlBufferAllocationScheme(n_scheme, 0);
23998 xmlSetBufferAllocationScheme(scheme);
24000 des_xmlBufferAllocationScheme(n_scheme, scheme, 0);
24001 xmlResetLastError();
24002 if (mem_base != xmlMemBlocks()) {
24003 printf("Leak of %d blocks found in xmlSetBufferAllocationScheme",
24004 xmlMemBlocks() - mem_base);
24006 printf(" %d", n_scheme);
24017 test_xmlSetCompressMode(void) {
24021 int mode; /* the compression ratio */
24024 for (n_mode = 0;n_mode < gen_nb_int;n_mode++) {
24025 mem_base = xmlMemBlocks();
24026 mode = gen_int(n_mode, 0);
24028 xmlSetCompressMode(mode);
24030 des_int(n_mode, mode, 0);
24031 xmlResetLastError();
24032 if (mem_base != xmlMemBlocks()) {
24033 printf("Leak of %d blocks found in xmlSetCompressMode",
24034 xmlMemBlocks() - mem_base);
24036 printf(" %d", n_mode);
24047 test_xmlSetDocCompressMode(void) {
24051 xmlDocPtr doc; /* the document */
24053 int mode; /* the compression ratio */
24056 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
24057 for (n_mode = 0;n_mode < gen_nb_int;n_mode++) {
24058 mem_base = xmlMemBlocks();
24059 doc = gen_xmlDocPtr(n_doc, 0);
24060 mode = gen_int(n_mode, 1);
24062 xmlSetDocCompressMode(doc, mode);
24064 des_xmlDocPtr(n_doc, doc, 0);
24065 des_int(n_mode, mode, 1);
24066 xmlResetLastError();
24067 if (mem_base != xmlMemBlocks()) {
24068 printf("Leak of %d blocks found in xmlSetDocCompressMode",
24069 xmlMemBlocks() - mem_base);
24071 printf(" %d", n_doc);
24072 printf(" %d", n_mode);
24084 test_xmlSetNs(void) {
24088 xmlNodePtr node; /* a node in the document */
24090 xmlNsPtr ns; /* a namespace pointer */
24093 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
24094 for (n_ns = 0;n_ns < gen_nb_xmlNsPtr;n_ns++) {
24095 mem_base = xmlMemBlocks();
24096 node = gen_xmlNodePtr(n_node, 0);
24097 ns = gen_xmlNsPtr(n_ns, 1);
24099 xmlSetNs(node, ns);
24101 des_xmlNodePtr(n_node, node, 0);
24102 des_xmlNsPtr(n_ns, ns, 1);
24103 xmlResetLastError();
24104 if (mem_base != xmlMemBlocks()) {
24105 printf("Leak of %d blocks found in xmlSetNs",
24106 xmlMemBlocks() - mem_base);
24108 printf(" %d", n_node);
24109 printf(" %d", n_ns);
24121 test_xmlSetNsProp(void) {
24124 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)
24126 xmlAttrPtr ret_val;
24127 xmlNodePtr node; /* the node */
24129 xmlNsPtr ns; /* the namespace definition */
24131 xmlChar * name; /* the attribute name */
24133 xmlChar * value; /* the attribute value */
24136 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
24137 for (n_ns = 0;n_ns < gen_nb_xmlNsPtr;n_ns++) {
24138 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
24139 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
24140 mem_base = xmlMemBlocks();
24141 node = gen_xmlNodePtr(n_node, 0);
24142 ns = gen_xmlNsPtr(n_ns, 1);
24143 name = gen_const_xmlChar_ptr(n_name, 2);
24144 value = gen_const_xmlChar_ptr(n_value, 3);
24146 ret_val = xmlSetNsProp(node, ns, (const xmlChar *)name, (const xmlChar *)value);
24147 desret_xmlAttrPtr(ret_val);
24149 des_xmlNodePtr(n_node, node, 0);
24150 des_xmlNsPtr(n_ns, ns, 1);
24151 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
24152 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 3);
24153 xmlResetLastError();
24154 if (mem_base != xmlMemBlocks()) {
24155 printf("Leak of %d blocks found in xmlSetNsProp",
24156 xmlMemBlocks() - mem_base);
24158 printf(" %d", n_node);
24159 printf(" %d", n_ns);
24160 printf(" %d", n_name);
24161 printf(" %d", n_value);
24176 test_xmlSetProp(void) {
24179 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)
24181 xmlAttrPtr ret_val;
24182 xmlNodePtr node; /* the node */
24184 xmlChar * name; /* the attribute name (a QName) */
24186 xmlChar * value; /* the attribute value */
24189 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
24190 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
24191 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
24192 mem_base = xmlMemBlocks();
24193 node = gen_xmlNodePtr(n_node, 0);
24194 name = gen_const_xmlChar_ptr(n_name, 1);
24195 value = gen_const_xmlChar_ptr(n_value, 2);
24197 ret_val = xmlSetProp(node, (const xmlChar *)name, (const xmlChar *)value);
24198 desret_xmlAttrPtr(ret_val);
24200 des_xmlNodePtr(n_node, node, 0);
24201 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
24202 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 2);
24203 xmlResetLastError();
24204 if (mem_base != xmlMemBlocks()) {
24205 printf("Leak of %d blocks found in xmlSetProp",
24206 xmlMemBlocks() - mem_base);
24208 printf(" %d", n_node);
24209 printf(" %d", n_name);
24210 printf(" %d", n_value);
24224 test_xmlSplitQName2(void) {
24229 xmlChar * name; /* the full QName */
24231 xmlChar ** prefix; /* a xmlChar ** */
24234 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
24235 for (n_prefix = 0;n_prefix < gen_nb_xmlChar_ptr_ptr;n_prefix++) {
24236 mem_base = xmlMemBlocks();
24237 name = gen_const_xmlChar_ptr(n_name, 0);
24238 prefix = gen_xmlChar_ptr_ptr(n_prefix, 1);
24240 ret_val = xmlSplitQName2((const xmlChar *)name, prefix);
24241 desret_xmlChar_ptr(ret_val);
24243 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 0);
24244 des_xmlChar_ptr_ptr(n_prefix, prefix, 1);
24245 xmlResetLastError();
24246 if (mem_base != xmlMemBlocks()) {
24247 printf("Leak of %d blocks found in xmlSplitQName2",
24248 xmlMemBlocks() - mem_base);
24250 printf(" %d", n_name);
24251 printf(" %d", n_prefix);
24263 test_xmlSplitQName3(void) {
24267 const xmlChar * ret_val;
24268 xmlChar * name; /* the full QName */
24270 int * len; /* an int * */
24273 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
24274 for (n_len = 0;n_len < gen_nb_int_ptr;n_len++) {
24275 mem_base = xmlMemBlocks();
24276 name = gen_const_xmlChar_ptr(n_name, 0);
24277 len = gen_int_ptr(n_len, 1);
24279 ret_val = xmlSplitQName3((const xmlChar *)name, len);
24280 desret_const_xmlChar_ptr(ret_val);
24282 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 0);
24283 des_int_ptr(n_len, len, 1);
24284 xmlResetLastError();
24285 if (mem_base != xmlMemBlocks()) {
24286 printf("Leak of %d blocks found in xmlSplitQName3",
24287 xmlMemBlocks() - mem_base);
24289 printf(" %d", n_name);
24290 printf(" %d", n_len);
24302 test_xmlStringGetNodeList(void) {
24306 xmlNodePtr ret_val;
24307 xmlDoc * doc; /* the document */
24309 xmlChar * value; /* the value of the attribute */
24312 for (n_doc = 0;n_doc < gen_nb_const_xmlDoc_ptr;n_doc++) {
24313 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
24314 mem_base = xmlMemBlocks();
24315 doc = gen_const_xmlDoc_ptr(n_doc, 0);
24316 value = gen_const_xmlChar_ptr(n_value, 1);
24318 ret_val = xmlStringGetNodeList((const xmlDoc *)doc, (const xmlChar *)value);
24319 desret_xmlNodePtr(ret_val);
24321 des_const_xmlDoc_ptr(n_doc, (const xmlDoc *)doc, 0);
24322 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 1);
24323 xmlResetLastError();
24324 if (mem_base != xmlMemBlocks()) {
24325 printf("Leak of %d blocks found in xmlStringGetNodeList",
24326 xmlMemBlocks() - mem_base);
24328 printf(" %d", n_doc);
24329 printf(" %d", n_value);
24341 test_xmlStringLenGetNodeList(void) {
24345 xmlNodePtr ret_val;
24346 xmlDoc * doc; /* the document */
24348 xmlChar * value; /* the value of the text */
24350 int len; /* the length of the string value */
24353 for (n_doc = 0;n_doc < gen_nb_const_xmlDoc_ptr;n_doc++) {
24354 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
24355 for (n_len = 0;n_len < gen_nb_int;n_len++) {
24356 mem_base = xmlMemBlocks();
24357 doc = gen_const_xmlDoc_ptr(n_doc, 0);
24358 value = gen_const_xmlChar_ptr(n_value, 1);
24359 len = gen_int(n_len, 2);
24360 if ((value != NULL) &&
24361 (len > (int) strlen((const char *) value) + 1))
24364 ret_val = xmlStringLenGetNodeList((const xmlDoc *)doc, (const xmlChar *)value, len);
24365 desret_xmlNodePtr(ret_val);
24367 des_const_xmlDoc_ptr(n_doc, (const xmlDoc *)doc, 0);
24368 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 1);
24369 des_int(n_len, len, 2);
24370 xmlResetLastError();
24371 if (mem_base != xmlMemBlocks()) {
24372 printf("Leak of %d blocks found in xmlStringLenGetNodeList",
24373 xmlMemBlocks() - mem_base);
24375 printf(" %d", n_doc);
24376 printf(" %d", n_value);
24377 printf(" %d", n_len);
24390 test_xmlTextConcat(void) {
24395 xmlNodePtr node; /* the node */
24397 xmlChar * content; /* the content */
24399 int len; /* @content length */
24402 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
24403 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
24404 for (n_len = 0;n_len < gen_nb_int;n_len++) {
24405 mem_base = xmlMemBlocks();
24406 node = gen_xmlNodePtr(n_node, 0);
24407 content = gen_const_xmlChar_ptr(n_content, 1);
24408 len = gen_int(n_len, 2);
24409 if ((content != NULL) &&
24410 (len > (int) strlen((const char *) content) + 1))
24413 ret_val = xmlTextConcat(node, (const xmlChar *)content, len);
24414 desret_int(ret_val);
24416 des_xmlNodePtr(n_node, node, 0);
24417 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
24418 des_int(n_len, len, 2);
24419 xmlResetLastError();
24420 if (mem_base != xmlMemBlocks()) {
24421 printf("Leak of %d blocks found in xmlTextConcat",
24422 xmlMemBlocks() - mem_base);
24424 printf(" %d", n_node);
24425 printf(" %d", n_content);
24426 printf(" %d", n_len);
24439 test_xmlTextMerge(void) {
24443 xmlNodePtr ret_val;
24444 xmlNodePtr first; /* the first text node */
24446 xmlNodePtr second; /* the second text node being merged */
24449 for (n_first = 0;n_first < gen_nb_xmlNodePtr_in;n_first++) {
24450 for (n_second = 0;n_second < gen_nb_xmlNodePtr_in;n_second++) {
24451 mem_base = xmlMemBlocks();
24452 first = gen_xmlNodePtr_in(n_first, 0);
24453 second = gen_xmlNodePtr_in(n_second, 1);
24455 ret_val = xmlTextMerge(first, second);
24456 if ((first != NULL) && (first->type != XML_TEXT_NODE)) {
24457 xmlUnlinkNode(second);
24458 xmlFreeNode(second) ; second = NULL ; }
24459 desret_xmlNodePtr(ret_val);
24461 des_xmlNodePtr_in(n_first, first, 0);
24462 des_xmlNodePtr_in(n_second, second, 1);
24463 xmlResetLastError();
24464 if (mem_base != xmlMemBlocks()) {
24465 printf("Leak of %d blocks found in xmlTextMerge",
24466 xmlMemBlocks() - mem_base);
24468 printf(" %d", n_first);
24469 printf(" %d", n_second);
24481 test_xmlUnsetNsProp(void) {
24484 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
24487 xmlNodePtr node; /* the node */
24489 xmlNsPtr ns; /* the namespace definition */
24491 xmlChar * name; /* the attribute name */
24494 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
24495 for (n_ns = 0;n_ns < gen_nb_xmlNsPtr;n_ns++) {
24496 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
24497 mem_base = xmlMemBlocks();
24498 node = gen_xmlNodePtr(n_node, 0);
24499 ns = gen_xmlNsPtr(n_ns, 1);
24500 name = gen_const_xmlChar_ptr(n_name, 2);
24502 ret_val = xmlUnsetNsProp(node, ns, (const xmlChar *)name);
24503 desret_int(ret_val);
24505 des_xmlNodePtr(n_node, node, 0);
24506 des_xmlNsPtr(n_ns, ns, 1);
24507 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
24508 xmlResetLastError();
24509 if (mem_base != xmlMemBlocks()) {
24510 printf("Leak of %d blocks found in xmlUnsetNsProp",
24511 xmlMemBlocks() - mem_base);
24513 printf(" %d", n_node);
24514 printf(" %d", n_ns);
24515 printf(" %d", n_name);
24529 test_xmlUnsetProp(void) {
24532 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
24535 xmlNodePtr node; /* the node */
24537 xmlChar * name; /* the attribute name */
24540 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
24541 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
24542 mem_base = xmlMemBlocks();
24543 node = gen_xmlNodePtr(n_node, 0);
24544 name = gen_const_xmlChar_ptr(n_name, 1);
24546 ret_val = xmlUnsetProp(node, (const xmlChar *)name);
24547 desret_int(ret_val);
24549 des_xmlNodePtr(n_node, node, 0);
24550 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
24551 xmlResetLastError();
24552 if (mem_base != xmlMemBlocks()) {
24553 printf("Leak of %d blocks found in xmlUnsetProp",
24554 xmlMemBlocks() - mem_base);
24556 printf(" %d", n_node);
24557 printf(" %d", n_name);
24570 test_xmlValidateNCName(void) {
24573 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || defined (LIBXML_HTML_ENABLED) || defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
24574 #ifdef LIBXML_TREE_ENABLED
24577 xmlChar * value; /* the value to check */
24579 int space; /* allow spaces in front and end of the string */
24582 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
24583 for (n_space = 0;n_space < gen_nb_int;n_space++) {
24584 mem_base = xmlMemBlocks();
24585 value = gen_const_xmlChar_ptr(n_value, 0);
24586 space = gen_int(n_space, 1);
24588 ret_val = xmlValidateNCName((const xmlChar *)value, space);
24589 desret_int(ret_val);
24591 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 0);
24592 des_int(n_space, space, 1);
24593 xmlResetLastError();
24594 if (mem_base != xmlMemBlocks()) {
24595 printf("Leak of %d blocks found in xmlValidateNCName",
24596 xmlMemBlocks() - mem_base);
24598 printf(" %d", n_value);
24599 printf(" %d", n_space);
24613 test_xmlValidateNMToken(void) {
24616 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
24617 #ifdef LIBXML_TREE_ENABLED
24620 xmlChar * value; /* the value to check */
24622 int space; /* allow spaces in front and end of the string */
24625 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
24626 for (n_space = 0;n_space < gen_nb_int;n_space++) {
24627 mem_base = xmlMemBlocks();
24628 value = gen_const_xmlChar_ptr(n_value, 0);
24629 space = gen_int(n_space, 1);
24631 ret_val = xmlValidateNMToken((const xmlChar *)value, space);
24632 desret_int(ret_val);
24634 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 0);
24635 des_int(n_space, space, 1);
24636 xmlResetLastError();
24637 if (mem_base != xmlMemBlocks()) {
24638 printf("Leak of %d blocks found in xmlValidateNMToken",
24639 xmlMemBlocks() - mem_base);
24641 printf(" %d", n_value);
24642 printf(" %d", n_space);
24656 test_xmlValidateName(void) {
24659 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
24660 #ifdef LIBXML_TREE_ENABLED
24663 xmlChar * value; /* the value to check */
24665 int space; /* allow spaces in front and end of the string */
24668 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
24669 for (n_space = 0;n_space < gen_nb_int;n_space++) {
24670 mem_base = xmlMemBlocks();
24671 value = gen_const_xmlChar_ptr(n_value, 0);
24672 space = gen_int(n_space, 1);
24674 ret_val = xmlValidateName((const xmlChar *)value, space);
24675 desret_int(ret_val);
24677 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 0);
24678 des_int(n_space, space, 1);
24679 xmlResetLastError();
24680 if (mem_base != xmlMemBlocks()) {
24681 printf("Leak of %d blocks found in xmlValidateName",
24682 xmlMemBlocks() - mem_base);
24684 printf(" %d", n_value);
24685 printf(" %d", n_space);
24699 test_xmlValidateQName(void) {
24702 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
24703 #ifdef LIBXML_TREE_ENABLED
24706 xmlChar * value; /* the value to check */
24708 int space; /* allow spaces in front and end of the string */
24711 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
24712 for (n_space = 0;n_space < gen_nb_int;n_space++) {
24713 mem_base = xmlMemBlocks();
24714 value = gen_const_xmlChar_ptr(n_value, 0);
24715 space = gen_int(n_space, 1);
24717 ret_val = xmlValidateQName((const xmlChar *)value, space);
24718 desret_int(ret_val);
24720 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 0);
24721 des_int(n_space, space, 1);
24722 xmlResetLastError();
24723 if (mem_base != xmlMemBlocks()) {
24724 printf("Leak of %d blocks found in xmlValidateQName",
24725 xmlMemBlocks() - mem_base);
24727 printf(" %d", n_value);
24728 printf(" %d", n_space);
24745 if (quiet == 0) printf("Testing tree : 142 of 164 functions ...\n");
24746 rc = test_xmlAddChild();
24747 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24748 rc = test_xmlAddChildList();
24749 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24750 rc = test_xmlAddNextSibling();
24751 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24752 rc = test_xmlAddPrevSibling();
24753 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24754 rc = test_xmlAddSibling();
24755 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24756 rc = test_xmlAttrSerializeTxtContent();
24757 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24758 rc = test_xmlBufContent();
24759 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24760 rc = test_xmlBufEnd();
24761 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24762 rc = test_xmlBufGetNodeContent();
24763 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24764 rc = test_xmlBufNodeDump();
24765 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24766 rc = test_xmlBufShrink();
24767 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24768 rc = test_xmlBufUse();
24769 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24770 rc = test_xmlBufferAdd();
24771 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24772 rc = test_xmlBufferAddHead();
24773 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24774 rc = test_xmlBufferCCat();
24775 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24776 rc = test_xmlBufferCat();
24777 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24778 rc = test_xmlBufferContent();
24779 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24780 rc = test_xmlBufferCreate();
24781 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24782 rc = test_xmlBufferCreateSize();
24783 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24784 rc = test_xmlBufferCreateStatic();
24785 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24786 rc = test_xmlBufferDetach();
24787 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24788 rc = test_xmlBufferEmpty();
24789 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24790 rc = test_xmlBufferGrow();
24791 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24792 rc = test_xmlBufferLength();
24793 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24794 rc = test_xmlBufferResize();
24795 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24796 rc = test_xmlBufferSetAllocationScheme();
24797 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24798 rc = test_xmlBufferShrink();
24799 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24800 rc = test_xmlBufferWriteCHAR();
24801 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24802 rc = test_xmlBufferWriteChar();
24803 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24804 rc = test_xmlBufferWriteQuotedString();
24805 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24806 rc = test_xmlBuildQName();
24807 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24808 rc = test_xmlChildElementCount();
24809 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24810 rc = test_xmlCopyDoc();
24811 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24812 rc = test_xmlCopyDtd();
24813 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24814 rc = test_xmlCopyNamespace();
24815 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24816 rc = test_xmlCopyNamespaceList();
24817 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24818 rc = test_xmlCopyNode();
24819 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24820 rc = test_xmlCopyNodeList();
24821 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24822 rc = test_xmlCopyProp();
24823 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24824 rc = test_xmlCopyPropList();
24825 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24826 rc = test_xmlCreateIntSubset();
24827 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24828 rc = test_xmlDOMWrapAdoptNode();
24829 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24830 rc = test_xmlDOMWrapCloneNode();
24831 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24832 rc = test_xmlDOMWrapNewCtxt();
24833 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24834 rc = test_xmlDOMWrapReconcileNamespaces();
24835 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24836 rc = test_xmlDOMWrapRemoveNode();
24837 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24838 rc = test_xmlDocCopyNode();
24839 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24840 rc = test_xmlDocCopyNodeList();
24841 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24842 rc = test_xmlDocDump();
24843 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24844 rc = test_xmlDocDumpFormatMemory();
24845 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24846 rc = test_xmlDocDumpFormatMemoryEnc();
24847 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24848 rc = test_xmlDocDumpMemory();
24849 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24850 rc = test_xmlDocDumpMemoryEnc();
24851 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24852 rc = test_xmlDocFormatDump();
24853 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24854 rc = test_xmlDocGetRootElement();
24855 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24856 rc = test_xmlDocSetRootElement();
24857 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24858 rc = test_xmlElemDump();
24859 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24860 rc = test_xmlFirstElementChild();
24861 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24862 rc = test_xmlGetBufferAllocationScheme();
24863 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24864 rc = test_xmlGetCompressMode();
24865 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24866 rc = test_xmlGetDocCompressMode();
24867 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24868 rc = test_xmlGetIntSubset();
24869 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24870 rc = test_xmlGetLastChild();
24871 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24872 rc = test_xmlGetLineNo();
24873 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24874 rc = test_xmlGetNoNsProp();
24875 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24876 rc = test_xmlGetNodePath();
24877 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24878 rc = test_xmlGetNsList();
24879 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24880 rc = test_xmlGetNsProp();
24881 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24882 rc = test_xmlGetProp();
24883 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24884 rc = test_xmlHasNsProp();
24885 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24886 rc = test_xmlHasProp();
24887 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24888 rc = test_xmlIsBlankNode();
24889 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24890 rc = test_xmlIsXHTML();
24891 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24892 rc = test_xmlLastElementChild();
24893 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24894 rc = test_xmlNewCDataBlock();
24895 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24896 rc = test_xmlNewCharRef();
24897 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24898 rc = test_xmlNewChild();
24899 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24900 rc = test_xmlNewComment();
24901 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24902 rc = test_xmlNewDoc();
24903 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24904 rc = test_xmlNewDocComment();
24905 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24906 rc = test_xmlNewDocFragment();
24907 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24908 rc = test_xmlNewDocNode();
24909 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24910 rc = test_xmlNewDocNodeEatName();
24911 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24912 rc = test_xmlNewDocPI();
24913 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24914 rc = test_xmlNewDocProp();
24915 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24916 rc = test_xmlNewDocRawNode();
24917 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24918 rc = test_xmlNewDocText();
24919 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24920 rc = test_xmlNewDocTextLen();
24921 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24922 rc = test_xmlNewDtd();
24923 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24924 rc = test_xmlNewNode();
24925 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24926 rc = test_xmlNewNodeEatName();
24927 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24928 rc = test_xmlNewNs();
24929 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24930 rc = test_xmlNewNsProp();
24931 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24932 rc = test_xmlNewNsPropEatName();
24933 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24934 rc = test_xmlNewPI();
24935 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24936 rc = test_xmlNewProp();
24937 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24938 rc = test_xmlNewReference();
24939 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24940 rc = test_xmlNewText();
24941 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24942 rc = test_xmlNewTextChild();
24943 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24944 rc = test_xmlNewTextLen();
24945 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24946 rc = test_xmlNextElementSibling();
24947 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24948 rc = test_xmlNodeAddContent();
24949 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24950 rc = test_xmlNodeAddContentLen();
24951 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24952 rc = test_xmlNodeBufGetContent();
24953 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24954 rc = test_xmlNodeDump();
24955 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24956 rc = test_xmlNodeDumpOutput();
24957 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24958 rc = test_xmlNodeGetBase();
24959 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24960 rc = test_xmlNodeGetContent();
24961 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24962 rc = test_xmlNodeGetLang();
24963 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24964 rc = test_xmlNodeGetSpacePreserve();
24965 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24966 rc = test_xmlNodeIsText();
24967 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24968 rc = test_xmlNodeListGetRawString();
24969 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24970 rc = test_xmlNodeListGetString();
24971 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24972 rc = test_xmlNodeSetBase();
24973 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24974 rc = test_xmlNodeSetContent();
24975 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24976 rc = test_xmlNodeSetContentLen();
24977 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24978 rc = test_xmlNodeSetLang();
24979 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24980 rc = test_xmlNodeSetName();
24981 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24982 rc = test_xmlNodeSetSpacePreserve();
24983 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24984 rc = test_xmlPreviousElementSibling();
24985 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24986 rc = test_xmlReconciliateNs();
24987 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24988 rc = test_xmlRemoveProp();
24989 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24990 rc = test_xmlReplaceNode();
24991 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24992 rc = test_xmlSaveFile();
24993 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24994 rc = test_xmlSaveFileEnc();
24995 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24996 rc = test_xmlSaveFileTo();
24997 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24998 rc = test_xmlSaveFormatFile();
24999 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25000 rc = test_xmlSaveFormatFileEnc();
25001 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25002 rc = test_xmlSaveFormatFileTo();
25003 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25004 rc = test_xmlSearchNs();
25005 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25006 rc = test_xmlSearchNsByHref();
25007 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25008 rc = test_xmlSetBufferAllocationScheme();
25009 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25010 rc = test_xmlSetCompressMode();
25011 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25012 rc = test_xmlSetDocCompressMode();
25013 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25014 rc = test_xmlSetNs();
25015 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25016 rc = test_xmlSetNsProp();
25017 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25018 rc = test_xmlSetProp();
25019 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25020 rc = test_xmlSplitQName2();
25021 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25022 rc = test_xmlSplitQName3();
25023 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25024 rc = test_xmlStringGetNodeList();
25025 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25026 rc = test_xmlStringLenGetNodeList();
25027 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25028 rc = test_xmlTextConcat();
25029 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25030 rc = test_xmlTextMerge();
25031 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25032 rc = test_xmlUnsetNsProp();
25033 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25034 rc = test_xmlUnsetProp();
25035 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25036 rc = test_xmlValidateNCName();
25037 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25038 rc = test_xmlValidateNMToken();
25039 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25040 rc = test_xmlValidateName();
25041 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25042 rc = test_xmlValidateQName();
25043 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25046 printf("Module tree: %d errors\n", test_ret);
25051 test_xmlBuildRelativeURI(void) {
25056 xmlChar * URI; /* the URI reference under consideration */
25058 xmlChar * base; /* the base value */
25061 for (n_URI = 0;n_URI < gen_nb_const_xmlChar_ptr;n_URI++) {
25062 for (n_base = 0;n_base < gen_nb_const_xmlChar_ptr;n_base++) {
25063 mem_base = xmlMemBlocks();
25064 URI = gen_const_xmlChar_ptr(n_URI, 0);
25065 base = gen_const_xmlChar_ptr(n_base, 1);
25067 ret_val = xmlBuildRelativeURI((const xmlChar *)URI, (const xmlChar *)base);
25068 desret_xmlChar_ptr(ret_val);
25070 des_const_xmlChar_ptr(n_URI, (const xmlChar *)URI, 0);
25071 des_const_xmlChar_ptr(n_base, (const xmlChar *)base, 1);
25072 xmlResetLastError();
25073 if (mem_base != xmlMemBlocks()) {
25074 printf("Leak of %d blocks found in xmlBuildRelativeURI",
25075 xmlMemBlocks() - mem_base);
25077 printf(" %d", n_URI);
25078 printf(" %d", n_base);
25090 test_xmlBuildURI(void) {
25095 xmlChar * URI; /* the URI instance found in the document */
25097 xmlChar * base; /* the base value */
25100 for (n_URI = 0;n_URI < gen_nb_const_xmlChar_ptr;n_URI++) {
25101 for (n_base = 0;n_base < gen_nb_const_xmlChar_ptr;n_base++) {
25102 mem_base = xmlMemBlocks();
25103 URI = gen_const_xmlChar_ptr(n_URI, 0);
25104 base = gen_const_xmlChar_ptr(n_base, 1);
25106 ret_val = xmlBuildURI((const xmlChar *)URI, (const xmlChar *)base);
25107 desret_xmlChar_ptr(ret_val);
25109 des_const_xmlChar_ptr(n_URI, (const xmlChar *)URI, 0);
25110 des_const_xmlChar_ptr(n_base, (const xmlChar *)base, 1);
25111 xmlResetLastError();
25112 if (mem_base != xmlMemBlocks()) {
25113 printf("Leak of %d blocks found in xmlBuildURI",
25114 xmlMemBlocks() - mem_base);
25116 printf(" %d", n_URI);
25117 printf(" %d", n_base);
25129 test_xmlCanonicPath(void) {
25134 xmlChar * path; /* the resource locator in a filesystem notation */
25137 for (n_path = 0;n_path < gen_nb_const_xmlChar_ptr;n_path++) {
25138 mem_base = xmlMemBlocks();
25139 path = gen_const_xmlChar_ptr(n_path, 0);
25141 ret_val = xmlCanonicPath((const xmlChar *)path);
25142 desret_xmlChar_ptr(ret_val);
25144 des_const_xmlChar_ptr(n_path, (const xmlChar *)path, 0);
25145 xmlResetLastError();
25146 if (mem_base != xmlMemBlocks()) {
25147 printf("Leak of %d blocks found in xmlCanonicPath",
25148 xmlMemBlocks() - mem_base);
25150 printf(" %d", n_path);
25161 test_xmlCreateURI(void) {
25165 /* missing type support */
25171 test_xmlNormalizeURIPath(void) {
25176 char * path; /* pointer to the path string */
25179 for (n_path = 0;n_path < gen_nb_char_ptr;n_path++) {
25180 mem_base = xmlMemBlocks();
25181 path = gen_char_ptr(n_path, 0);
25183 ret_val = xmlNormalizeURIPath(path);
25184 desret_int(ret_val);
25186 des_char_ptr(n_path, path, 0);
25187 xmlResetLastError();
25188 if (mem_base != xmlMemBlocks()) {
25189 printf("Leak of %d blocks found in xmlNormalizeURIPath",
25190 xmlMemBlocks() - mem_base);
25192 printf(" %d", n_path);
25203 test_xmlParseURI(void) {
25207 /* missing type support */
25213 test_xmlParseURIRaw(void) {
25217 /* missing type support */
25222 #define gen_nb_xmlURIPtr 1
25223 static xmlURIPtr gen_xmlURIPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
25226 static void des_xmlURIPtr(int no ATTRIBUTE_UNUSED, xmlURIPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
25230 test_xmlParseURIReference(void) {
25235 xmlURIPtr uri; /* pointer to an URI structure */
25237 char * str; /* the string to analyze */
25240 for (n_uri = 0;n_uri < gen_nb_xmlURIPtr;n_uri++) {
25241 for (n_str = 0;n_str < gen_nb_const_char_ptr;n_str++) {
25242 mem_base = xmlMemBlocks();
25243 uri = gen_xmlURIPtr(n_uri, 0);
25244 str = gen_const_char_ptr(n_str, 1);
25246 ret_val = xmlParseURIReference(uri, (const char *)str);
25247 desret_int(ret_val);
25249 des_xmlURIPtr(n_uri, uri, 0);
25250 des_const_char_ptr(n_str, (const char *)str, 1);
25251 xmlResetLastError();
25252 if (mem_base != xmlMemBlocks()) {
25253 printf("Leak of %d blocks found in xmlParseURIReference",
25254 xmlMemBlocks() - mem_base);
25256 printf(" %d", n_uri);
25257 printf(" %d", n_str);
25269 test_xmlPathToURI(void) {
25274 xmlChar * path; /* the resource locator in a filesystem notation */
25277 for (n_path = 0;n_path < gen_nb_const_xmlChar_ptr;n_path++) {
25278 mem_base = xmlMemBlocks();
25279 path = gen_const_xmlChar_ptr(n_path, 0);
25281 ret_val = xmlPathToURI((const xmlChar *)path);
25282 desret_xmlChar_ptr(ret_val);
25284 des_const_xmlChar_ptr(n_path, (const xmlChar *)path, 0);
25285 xmlResetLastError();
25286 if (mem_base != xmlMemBlocks()) {
25287 printf("Leak of %d blocks found in xmlPathToURI",
25288 xmlMemBlocks() - mem_base);
25290 printf(" %d", n_path);
25301 test_xmlPrintURI(void) {
25305 FILE * stream; /* a FILE* for the output */
25307 xmlURIPtr uri; /* pointer to an xmlURI */
25310 for (n_stream = 0;n_stream < gen_nb_FILE_ptr;n_stream++) {
25311 for (n_uri = 0;n_uri < gen_nb_xmlURIPtr;n_uri++) {
25312 mem_base = xmlMemBlocks();
25313 stream = gen_FILE_ptr(n_stream, 0);
25314 uri = gen_xmlURIPtr(n_uri, 1);
25316 xmlPrintURI(stream, uri);
25318 des_FILE_ptr(n_stream, stream, 0);
25319 des_xmlURIPtr(n_uri, uri, 1);
25320 xmlResetLastError();
25321 if (mem_base != xmlMemBlocks()) {
25322 printf("Leak of %d blocks found in xmlPrintURI",
25323 xmlMemBlocks() - mem_base);
25325 printf(" %d", n_stream);
25326 printf(" %d", n_uri);
25338 test_xmlSaveUri(void) {
25343 xmlURIPtr uri; /* pointer to an xmlURI */
25346 for (n_uri = 0;n_uri < gen_nb_xmlURIPtr;n_uri++) {
25347 mem_base = xmlMemBlocks();
25348 uri = gen_xmlURIPtr(n_uri, 0);
25350 ret_val = xmlSaveUri(uri);
25351 desret_xmlChar_ptr(ret_val);
25353 des_xmlURIPtr(n_uri, uri, 0);
25354 xmlResetLastError();
25355 if (mem_base != xmlMemBlocks()) {
25356 printf("Leak of %d blocks found in xmlSaveUri",
25357 xmlMemBlocks() - mem_base);
25359 printf(" %d", n_uri);
25370 test_xmlURIEscape(void) {
25375 xmlChar * str; /* the string of the URI to escape */
25378 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
25379 mem_base = xmlMemBlocks();
25380 str = gen_const_xmlChar_ptr(n_str, 0);
25382 ret_val = xmlURIEscape((const xmlChar *)str);
25383 desret_xmlChar_ptr(ret_val);
25385 des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 0);
25386 xmlResetLastError();
25387 if (mem_base != xmlMemBlocks()) {
25388 printf("Leak of %d blocks found in xmlURIEscape",
25389 xmlMemBlocks() - mem_base);
25391 printf(" %d", n_str);
25402 test_xmlURIEscapeStr(void) {
25407 xmlChar * str; /* string to escape */
25409 xmlChar * list; /* exception list string of chars not to escape */
25412 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
25413 for (n_list = 0;n_list < gen_nb_const_xmlChar_ptr;n_list++) {
25414 mem_base = xmlMemBlocks();
25415 str = gen_const_xmlChar_ptr(n_str, 0);
25416 list = gen_const_xmlChar_ptr(n_list, 1);
25418 ret_val = xmlURIEscapeStr((const xmlChar *)str, (const xmlChar *)list);
25419 desret_xmlChar_ptr(ret_val);
25421 des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 0);
25422 des_const_xmlChar_ptr(n_list, (const xmlChar *)list, 1);
25423 xmlResetLastError();
25424 if (mem_base != xmlMemBlocks()) {
25425 printf("Leak of %d blocks found in xmlURIEscapeStr",
25426 xmlMemBlocks() - mem_base);
25428 printf(" %d", n_str);
25429 printf(" %d", n_list);
25441 test_xmlURIUnescapeString(void) {
25445 /* missing type support */
25454 if (quiet == 0) printf("Testing uri : 10 of 15 functions ...\n");
25455 rc = test_xmlBuildRelativeURI();
25456 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25457 rc = test_xmlBuildURI();
25458 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25459 rc = test_xmlCanonicPath();
25460 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25461 rc = test_xmlCreateURI();
25462 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25463 rc = test_xmlNormalizeURIPath();
25464 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25465 rc = test_xmlParseURI();
25466 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25467 rc = test_xmlParseURIRaw();
25468 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25469 rc = test_xmlParseURIReference();
25470 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25471 rc = test_xmlPathToURI();
25472 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25473 rc = test_xmlPrintURI();
25474 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25475 rc = test_xmlSaveUri();
25476 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25477 rc = test_xmlURIEscape();
25478 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25479 rc = test_xmlURIEscapeStr();
25480 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25481 rc = test_xmlURIUnescapeString();
25482 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25485 printf("Module uri: %d errors\n", test_ret);
25490 test_xmlAddAttributeDecl(void) {
25494 xmlAttributePtr ret_val;
25495 xmlValidCtxtPtr ctxt; /* the validation context */
25497 xmlDtdPtr dtd; /* pointer to the DTD */
25499 xmlChar * elem; /* the element name */
25501 xmlChar * name; /* the attribute name */
25503 xmlChar * ns; /* the attribute namespace prefix */
25505 xmlAttributeType type; /* the attribute type */
25507 xmlAttributeDefault def; /* the attribute default type */
25509 xmlChar * defaultValue; /* the attribute default value */
25510 int n_defaultValue;
25511 xmlEnumerationPtr tree; /* if it's an enumeration, the associated list */
25514 for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
25515 for (n_dtd = 0;n_dtd < gen_nb_xmlDtdPtr;n_dtd++) {
25516 for (n_elem = 0;n_elem < gen_nb_const_xmlChar_ptr;n_elem++) {
25517 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
25518 for (n_ns = 0;n_ns < gen_nb_const_xmlChar_ptr;n_ns++) {
25519 for (n_type = 0;n_type < gen_nb_xmlAttributeType;n_type++) {
25520 for (n_def = 0;n_def < gen_nb_xmlAttributeDefault;n_def++) {
25521 for (n_defaultValue = 0;n_defaultValue < gen_nb_const_xmlChar_ptr;n_defaultValue++) {
25522 for (n_tree = 0;n_tree < gen_nb_xmlEnumerationPtr;n_tree++) {
25523 mem_base = xmlMemBlocks();
25524 ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
25525 dtd = gen_xmlDtdPtr(n_dtd, 1);
25526 elem = gen_const_xmlChar_ptr(n_elem, 2);
25527 name = gen_const_xmlChar_ptr(n_name, 3);
25528 ns = gen_const_xmlChar_ptr(n_ns, 4);
25529 type = gen_xmlAttributeType(n_type, 5);
25530 def = gen_xmlAttributeDefault(n_def, 6);
25531 defaultValue = gen_const_xmlChar_ptr(n_defaultValue, 7);
25532 tree = gen_xmlEnumerationPtr(n_tree, 8);
25534 ret_val = xmlAddAttributeDecl(ctxt, dtd, (const xmlChar *)elem, (const xmlChar *)name, (const xmlChar *)ns, type, def, (const xmlChar *)defaultValue, tree);
25535 desret_xmlAttributePtr(ret_val);
25537 des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
25538 des_xmlDtdPtr(n_dtd, dtd, 1);
25539 des_const_xmlChar_ptr(n_elem, (const xmlChar *)elem, 2);
25540 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 3);
25541 des_const_xmlChar_ptr(n_ns, (const xmlChar *)ns, 4);
25542 des_xmlAttributeType(n_type, type, 5);
25543 des_xmlAttributeDefault(n_def, def, 6);
25544 des_const_xmlChar_ptr(n_defaultValue, (const xmlChar *)defaultValue, 7);
25545 des_xmlEnumerationPtr(n_tree, tree, 8);
25546 xmlResetLastError();
25547 if (mem_base != xmlMemBlocks()) {
25548 printf("Leak of %d blocks found in xmlAddAttributeDecl",
25549 xmlMemBlocks() - mem_base);
25551 printf(" %d", n_ctxt);
25552 printf(" %d", n_dtd);
25553 printf(" %d", n_elem);
25554 printf(" %d", n_name);
25555 printf(" %d", n_ns);
25556 printf(" %d", n_type);
25557 printf(" %d", n_def);
25558 printf(" %d", n_defaultValue);
25559 printf(" %d", n_tree);
25578 test_xmlAddElementDecl(void) {
25582 xmlElementPtr ret_val;
25583 xmlValidCtxtPtr ctxt; /* the validation context */
25585 xmlDtdPtr dtd; /* pointer to the DTD */
25587 xmlChar * name; /* the entity name */
25589 xmlElementTypeVal type; /* the element type */
25591 xmlElementContentPtr content; /* the element content tree or NULL */
25594 for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
25595 for (n_dtd = 0;n_dtd < gen_nb_xmlDtdPtr;n_dtd++) {
25596 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
25597 for (n_type = 0;n_type < gen_nb_xmlElementTypeVal;n_type++) {
25598 for (n_content = 0;n_content < gen_nb_xmlElementContentPtr;n_content++) {
25599 mem_base = xmlMemBlocks();
25600 ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
25601 dtd = gen_xmlDtdPtr(n_dtd, 1);
25602 name = gen_const_xmlChar_ptr(n_name, 2);
25603 type = gen_xmlElementTypeVal(n_type, 3);
25604 content = gen_xmlElementContentPtr(n_content, 4);
25606 ret_val = xmlAddElementDecl(ctxt, dtd, (const xmlChar *)name, type, content);
25607 desret_xmlElementPtr(ret_val);
25609 des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
25610 des_xmlDtdPtr(n_dtd, dtd, 1);
25611 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
25612 des_xmlElementTypeVal(n_type, type, 3);
25613 des_xmlElementContentPtr(n_content, content, 4);
25614 xmlResetLastError();
25615 if (mem_base != xmlMemBlocks()) {
25616 printf("Leak of %d blocks found in xmlAddElementDecl",
25617 xmlMemBlocks() - mem_base);
25619 printf(" %d", n_ctxt);
25620 printf(" %d", n_dtd);
25621 printf(" %d", n_name);
25622 printf(" %d", n_type);
25623 printf(" %d", n_content);
25638 test_xmlAddID(void) {
25642 /* missing type support */
25648 test_xmlAddNotationDecl(void) {
25652 /* missing type support */
25658 test_xmlAddRef(void) {
25662 /* missing type support */
25667 #define gen_nb_xmlAttributeTablePtr 1
25668 static xmlAttributeTablePtr gen_xmlAttributeTablePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
25671 static void des_xmlAttributeTablePtr(int no ATTRIBUTE_UNUSED, xmlAttributeTablePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
25675 test_xmlCopyAttributeTable(void) {
25679 /* missing type support */
25685 test_xmlCopyDocElementContent(void) {
25689 xmlElementContentPtr ret_val;
25690 xmlDocPtr doc; /* the document owning the element declaration */
25692 xmlElementContentPtr cur; /* An element content pointer. */
25695 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
25696 for (n_cur = 0;n_cur < gen_nb_xmlElementContentPtr;n_cur++) {
25697 mem_base = xmlMemBlocks();
25698 doc = gen_xmlDocPtr(n_doc, 0);
25699 cur = gen_xmlElementContentPtr(n_cur, 1);
25701 ret_val = xmlCopyDocElementContent(doc, cur);
25702 desret_xmlElementContentPtr(ret_val);
25704 des_xmlDocPtr(n_doc, doc, 0);
25705 des_xmlElementContentPtr(n_cur, cur, 1);
25706 xmlResetLastError();
25707 if (mem_base != xmlMemBlocks()) {
25708 printf("Leak of %d blocks found in xmlCopyDocElementContent",
25709 xmlMemBlocks() - mem_base);
25711 printf(" %d", n_doc);
25712 printf(" %d", n_cur);
25724 test_xmlCopyElementContent(void) {
25728 xmlElementContentPtr ret_val;
25729 xmlElementContentPtr cur; /* An element content pointer. */
25732 for (n_cur = 0;n_cur < gen_nb_xmlElementContentPtr;n_cur++) {
25733 mem_base = xmlMemBlocks();
25734 cur = gen_xmlElementContentPtr(n_cur, 0);
25736 ret_val = xmlCopyElementContent(cur);
25737 desret_xmlElementContentPtr(ret_val);
25739 des_xmlElementContentPtr(n_cur, cur, 0);
25740 xmlResetLastError();
25741 if (mem_base != xmlMemBlocks()) {
25742 printf("Leak of %d blocks found in xmlCopyElementContent",
25743 xmlMemBlocks() - mem_base);
25745 printf(" %d", n_cur);
25755 #define gen_nb_xmlElementTablePtr 1
25756 static xmlElementTablePtr gen_xmlElementTablePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
25759 static void des_xmlElementTablePtr(int no ATTRIBUTE_UNUSED, xmlElementTablePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
25763 test_xmlCopyElementTable(void) {
25767 /* missing type support */
25773 test_xmlCopyEnumeration(void) {
25777 /* missing type support */
25782 #define gen_nb_xmlNotationTablePtr 1
25783 static xmlNotationTablePtr gen_xmlNotationTablePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
25786 static void des_xmlNotationTablePtr(int no ATTRIBUTE_UNUSED, xmlNotationTablePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
25790 test_xmlCopyNotationTable(void) {
25794 /* missing type support */
25800 test_xmlCreateEnumeration(void) {
25804 /* missing type support */
25809 #define gen_nb_xmlAttributePtr 1
25810 static xmlAttributePtr gen_xmlAttributePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
25813 static void des_xmlAttributePtr(int no ATTRIBUTE_UNUSED, xmlAttributePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
25817 test_xmlDumpAttributeDecl(void) {
25820 #if defined(LIBXML_OUTPUT_ENABLED)
25822 xmlBufferPtr buf; /* the XML buffer output */
25824 xmlAttributePtr attr; /* An attribute declaration */
25827 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
25828 for (n_attr = 0;n_attr < gen_nb_xmlAttributePtr;n_attr++) {
25829 mem_base = xmlMemBlocks();
25830 buf = gen_xmlBufferPtr(n_buf, 0);
25831 attr = gen_xmlAttributePtr(n_attr, 1);
25833 xmlDumpAttributeDecl(buf, attr);
25835 des_xmlBufferPtr(n_buf, buf, 0);
25836 des_xmlAttributePtr(n_attr, attr, 1);
25837 xmlResetLastError();
25838 if (mem_base != xmlMemBlocks()) {
25839 printf("Leak of %d blocks found in xmlDumpAttributeDecl",
25840 xmlMemBlocks() - mem_base);
25842 printf(" %d", n_buf);
25843 printf(" %d", n_attr);
25856 test_xmlDumpAttributeTable(void) {
25859 #if defined(LIBXML_OUTPUT_ENABLED)
25861 xmlBufferPtr buf; /* the XML buffer output */
25863 xmlAttributeTablePtr table; /* An attribute table */
25866 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
25867 for (n_table = 0;n_table < gen_nb_xmlAttributeTablePtr;n_table++) {
25868 mem_base = xmlMemBlocks();
25869 buf = gen_xmlBufferPtr(n_buf, 0);
25870 table = gen_xmlAttributeTablePtr(n_table, 1);
25872 xmlDumpAttributeTable(buf, table);
25874 des_xmlBufferPtr(n_buf, buf, 0);
25875 des_xmlAttributeTablePtr(n_table, table, 1);
25876 xmlResetLastError();
25877 if (mem_base != xmlMemBlocks()) {
25878 printf("Leak of %d blocks found in xmlDumpAttributeTable",
25879 xmlMemBlocks() - mem_base);
25881 printf(" %d", n_buf);
25882 printf(" %d", n_table);
25894 #define gen_nb_xmlElementPtr 1
25895 static xmlElementPtr gen_xmlElementPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
25898 static void des_xmlElementPtr(int no ATTRIBUTE_UNUSED, xmlElementPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
25902 test_xmlDumpElementDecl(void) {
25905 #if defined(LIBXML_OUTPUT_ENABLED)
25907 xmlBufferPtr buf; /* the XML buffer output */
25909 xmlElementPtr elem; /* An element table */
25912 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
25913 for (n_elem = 0;n_elem < gen_nb_xmlElementPtr;n_elem++) {
25914 mem_base = xmlMemBlocks();
25915 buf = gen_xmlBufferPtr(n_buf, 0);
25916 elem = gen_xmlElementPtr(n_elem, 1);
25918 xmlDumpElementDecl(buf, elem);
25920 des_xmlBufferPtr(n_buf, buf, 0);
25921 des_xmlElementPtr(n_elem, elem, 1);
25922 xmlResetLastError();
25923 if (mem_base != xmlMemBlocks()) {
25924 printf("Leak of %d blocks found in xmlDumpElementDecl",
25925 xmlMemBlocks() - mem_base);
25927 printf(" %d", n_buf);
25928 printf(" %d", n_elem);
25941 test_xmlDumpElementTable(void) {
25944 #if defined(LIBXML_OUTPUT_ENABLED)
25946 xmlBufferPtr buf; /* the XML buffer output */
25948 xmlElementTablePtr table; /* An element table */
25951 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
25952 for (n_table = 0;n_table < gen_nb_xmlElementTablePtr;n_table++) {
25953 mem_base = xmlMemBlocks();
25954 buf = gen_xmlBufferPtr(n_buf, 0);
25955 table = gen_xmlElementTablePtr(n_table, 1);
25957 xmlDumpElementTable(buf, table);
25959 des_xmlBufferPtr(n_buf, buf, 0);
25960 des_xmlElementTablePtr(n_table, table, 1);
25961 xmlResetLastError();
25962 if (mem_base != xmlMemBlocks()) {
25963 printf("Leak of %d blocks found in xmlDumpElementTable",
25964 xmlMemBlocks() - mem_base);
25966 printf(" %d", n_buf);
25967 printf(" %d", n_table);
25979 #define gen_nb_xmlNotationPtr 1
25980 static xmlNotationPtr gen_xmlNotationPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
25983 static void des_xmlNotationPtr(int no ATTRIBUTE_UNUSED, xmlNotationPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
25987 test_xmlDumpNotationDecl(void) {
25990 #if defined(LIBXML_OUTPUT_ENABLED)
25992 xmlBufferPtr buf; /* the XML buffer output */
25994 xmlNotationPtr nota; /* A notation declaration */
25997 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
25998 for (n_nota = 0;n_nota < gen_nb_xmlNotationPtr;n_nota++) {
25999 mem_base = xmlMemBlocks();
26000 buf = gen_xmlBufferPtr(n_buf, 0);
26001 nota = gen_xmlNotationPtr(n_nota, 1);
26003 xmlDumpNotationDecl(buf, nota);
26005 des_xmlBufferPtr(n_buf, buf, 0);
26006 des_xmlNotationPtr(n_nota, nota, 1);
26007 xmlResetLastError();
26008 if (mem_base != xmlMemBlocks()) {
26009 printf("Leak of %d blocks found in xmlDumpNotationDecl",
26010 xmlMemBlocks() - mem_base);
26012 printf(" %d", n_buf);
26013 printf(" %d", n_nota);
26026 test_xmlDumpNotationTable(void) {
26029 #if defined(LIBXML_OUTPUT_ENABLED)
26031 xmlBufferPtr buf; /* the XML buffer output */
26033 xmlNotationTablePtr table; /* A notation table */
26036 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
26037 for (n_table = 0;n_table < gen_nb_xmlNotationTablePtr;n_table++) {
26038 mem_base = xmlMemBlocks();
26039 buf = gen_xmlBufferPtr(n_buf, 0);
26040 table = gen_xmlNotationTablePtr(n_table, 1);
26042 xmlDumpNotationTable(buf, table);
26044 des_xmlBufferPtr(n_buf, buf, 0);
26045 des_xmlNotationTablePtr(n_table, table, 1);
26046 xmlResetLastError();
26047 if (mem_base != xmlMemBlocks()) {
26048 printf("Leak of %d blocks found in xmlDumpNotationTable",
26049 xmlMemBlocks() - mem_base);
26051 printf(" %d", n_buf);
26052 printf(" %d", n_table);
26065 test_xmlGetDtdAttrDesc(void) {
26069 xmlAttributePtr ret_val;
26070 xmlDtdPtr dtd; /* a pointer to the DtD to search */
26072 xmlChar * elem; /* the element name */
26074 xmlChar * name; /* the attribute name */
26077 for (n_dtd = 0;n_dtd < gen_nb_xmlDtdPtr;n_dtd++) {
26078 for (n_elem = 0;n_elem < gen_nb_const_xmlChar_ptr;n_elem++) {
26079 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
26080 mem_base = xmlMemBlocks();
26081 dtd = gen_xmlDtdPtr(n_dtd, 0);
26082 elem = gen_const_xmlChar_ptr(n_elem, 1);
26083 name = gen_const_xmlChar_ptr(n_name, 2);
26085 ret_val = xmlGetDtdAttrDesc(dtd, (const xmlChar *)elem, (const xmlChar *)name);
26086 desret_xmlAttributePtr(ret_val);
26088 des_xmlDtdPtr(n_dtd, dtd, 0);
26089 des_const_xmlChar_ptr(n_elem, (const xmlChar *)elem, 1);
26090 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
26091 xmlResetLastError();
26092 if (mem_base != xmlMemBlocks()) {
26093 printf("Leak of %d blocks found in xmlGetDtdAttrDesc",
26094 xmlMemBlocks() - mem_base);
26096 printf(" %d", n_dtd);
26097 printf(" %d", n_elem);
26098 printf(" %d", n_name);
26111 test_xmlGetDtdElementDesc(void) {
26115 xmlElementPtr ret_val;
26116 xmlDtdPtr dtd; /* a pointer to the DtD to search */
26118 xmlChar * name; /* the element name */
26121 for (n_dtd = 0;n_dtd < gen_nb_xmlDtdPtr;n_dtd++) {
26122 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
26123 mem_base = xmlMemBlocks();
26124 dtd = gen_xmlDtdPtr(n_dtd, 0);
26125 name = gen_const_xmlChar_ptr(n_name, 1);
26127 ret_val = xmlGetDtdElementDesc(dtd, (const xmlChar *)name);
26128 desret_xmlElementPtr(ret_val);
26130 des_xmlDtdPtr(n_dtd, dtd, 0);
26131 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
26132 xmlResetLastError();
26133 if (mem_base != xmlMemBlocks()) {
26134 printf("Leak of %d blocks found in xmlGetDtdElementDesc",
26135 xmlMemBlocks() - mem_base);
26137 printf(" %d", n_dtd);
26138 printf(" %d", n_name);
26150 test_xmlGetDtdNotationDesc(void) {
26154 /* missing type support */
26160 test_xmlGetDtdQAttrDesc(void) {
26164 xmlAttributePtr ret_val;
26165 xmlDtdPtr dtd; /* a pointer to the DtD to search */
26167 xmlChar * elem; /* the element name */
26169 xmlChar * name; /* the attribute name */
26171 xmlChar * prefix; /* the attribute namespace prefix */
26174 for (n_dtd = 0;n_dtd < gen_nb_xmlDtdPtr;n_dtd++) {
26175 for (n_elem = 0;n_elem < gen_nb_const_xmlChar_ptr;n_elem++) {
26176 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
26177 for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
26178 mem_base = xmlMemBlocks();
26179 dtd = gen_xmlDtdPtr(n_dtd, 0);
26180 elem = gen_const_xmlChar_ptr(n_elem, 1);
26181 name = gen_const_xmlChar_ptr(n_name, 2);
26182 prefix = gen_const_xmlChar_ptr(n_prefix, 3);
26184 ret_val = xmlGetDtdQAttrDesc(dtd, (const xmlChar *)elem, (const xmlChar *)name, (const xmlChar *)prefix);
26185 desret_xmlAttributePtr(ret_val);
26187 des_xmlDtdPtr(n_dtd, dtd, 0);
26188 des_const_xmlChar_ptr(n_elem, (const xmlChar *)elem, 1);
26189 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
26190 des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 3);
26191 xmlResetLastError();
26192 if (mem_base != xmlMemBlocks()) {
26193 printf("Leak of %d blocks found in xmlGetDtdQAttrDesc",
26194 xmlMemBlocks() - mem_base);
26196 printf(" %d", n_dtd);
26197 printf(" %d", n_elem);
26198 printf(" %d", n_name);
26199 printf(" %d", n_prefix);
26213 test_xmlGetDtdQElementDesc(void) {
26217 xmlElementPtr ret_val;
26218 xmlDtdPtr dtd; /* a pointer to the DtD to search */
26220 xmlChar * name; /* the element name */
26222 xmlChar * prefix; /* the element namespace prefix */
26225 for (n_dtd = 0;n_dtd < gen_nb_xmlDtdPtr;n_dtd++) {
26226 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
26227 for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
26228 mem_base = xmlMemBlocks();
26229 dtd = gen_xmlDtdPtr(n_dtd, 0);
26230 name = gen_const_xmlChar_ptr(n_name, 1);
26231 prefix = gen_const_xmlChar_ptr(n_prefix, 2);
26233 ret_val = xmlGetDtdQElementDesc(dtd, (const xmlChar *)name, (const xmlChar *)prefix);
26234 desret_xmlElementPtr(ret_val);
26236 des_xmlDtdPtr(n_dtd, dtd, 0);
26237 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
26238 des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 2);
26239 xmlResetLastError();
26240 if (mem_base != xmlMemBlocks()) {
26241 printf("Leak of %d blocks found in xmlGetDtdQElementDesc",
26242 xmlMemBlocks() - mem_base);
26244 printf(" %d", n_dtd);
26245 printf(" %d", n_name);
26246 printf(" %d", n_prefix);
26259 test_xmlGetID(void) {
26263 xmlAttrPtr ret_val;
26264 xmlDocPtr doc; /* pointer to the document */
26266 xmlChar * ID; /* the ID value */
26269 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
26270 for (n_ID = 0;n_ID < gen_nb_const_xmlChar_ptr;n_ID++) {
26271 mem_base = xmlMemBlocks();
26272 doc = gen_xmlDocPtr(n_doc, 0);
26273 ID = gen_const_xmlChar_ptr(n_ID, 1);
26275 ret_val = xmlGetID(doc, (const xmlChar *)ID);
26276 desret_xmlAttrPtr(ret_val);
26278 des_xmlDocPtr(n_doc, doc, 0);
26279 des_const_xmlChar_ptr(n_ID, (const xmlChar *)ID, 1);
26280 xmlResetLastError();
26281 if (mem_base != xmlMemBlocks()) {
26282 printf("Leak of %d blocks found in xmlGetID",
26283 xmlMemBlocks() - mem_base);
26285 printf(" %d", n_doc);
26286 printf(" %d", n_ID);
26298 test_xmlGetRefs(void) {
26302 /* missing type support */
26308 test_xmlIsID(void) {
26313 xmlDocPtr doc; /* the document */
26315 xmlNodePtr elem; /* the element carrying the attribute */
26317 xmlAttrPtr attr; /* the attribute */
26320 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
26321 for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
26322 for (n_attr = 0;n_attr < gen_nb_xmlAttrPtr;n_attr++) {
26323 mem_base = xmlMemBlocks();
26324 doc = gen_xmlDocPtr(n_doc, 0);
26325 elem = gen_xmlNodePtr(n_elem, 1);
26326 attr = gen_xmlAttrPtr(n_attr, 2);
26328 ret_val = xmlIsID(doc, elem, attr);
26329 desret_int(ret_val);
26331 des_xmlDocPtr(n_doc, doc, 0);
26332 des_xmlNodePtr(n_elem, elem, 1);
26333 des_xmlAttrPtr(n_attr, attr, 2);
26334 xmlResetLastError();
26335 if (mem_base != xmlMemBlocks()) {
26336 printf("Leak of %d blocks found in xmlIsID",
26337 xmlMemBlocks() - mem_base);
26339 printf(" %d", n_doc);
26340 printf(" %d", n_elem);
26341 printf(" %d", n_attr);
26354 test_xmlIsMixedElement(void) {
26359 xmlDocPtr doc; /* the document */
26361 xmlChar * name; /* the element name */
26364 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
26365 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
26366 mem_base = xmlMemBlocks();
26367 doc = gen_xmlDocPtr(n_doc, 0);
26368 name = gen_const_xmlChar_ptr(n_name, 1);
26370 ret_val = xmlIsMixedElement(doc, (const xmlChar *)name);
26371 desret_int(ret_val);
26373 des_xmlDocPtr(n_doc, doc, 0);
26374 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
26375 xmlResetLastError();
26376 if (mem_base != xmlMemBlocks()) {
26377 printf("Leak of %d blocks found in xmlIsMixedElement",
26378 xmlMemBlocks() - mem_base);
26380 printf(" %d", n_doc);
26381 printf(" %d", n_name);
26393 test_xmlIsRef(void) {
26398 xmlDocPtr doc; /* the document */
26400 xmlNodePtr elem; /* the element carrying the attribute */
26402 xmlAttrPtr attr; /* the attribute */
26405 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
26406 for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
26407 for (n_attr = 0;n_attr < gen_nb_xmlAttrPtr;n_attr++) {
26408 mem_base = xmlMemBlocks();
26409 doc = gen_xmlDocPtr(n_doc, 0);
26410 elem = gen_xmlNodePtr(n_elem, 1);
26411 attr = gen_xmlAttrPtr(n_attr, 2);
26413 ret_val = xmlIsRef(doc, elem, attr);
26414 desret_int(ret_val);
26416 des_xmlDocPtr(n_doc, doc, 0);
26417 des_xmlNodePtr(n_elem, elem, 1);
26418 des_xmlAttrPtr(n_attr, attr, 2);
26419 xmlResetLastError();
26420 if (mem_base != xmlMemBlocks()) {
26421 printf("Leak of %d blocks found in xmlIsRef",
26422 xmlMemBlocks() - mem_base);
26424 printf(" %d", n_doc);
26425 printf(" %d", n_elem);
26426 printf(" %d", n_attr);
26439 test_xmlNewDocElementContent(void) {
26443 xmlElementContentPtr ret_val;
26444 xmlDocPtr doc; /* the document */
26446 xmlChar * name; /* the subelement name or NULL */
26448 xmlElementContentType type; /* the type of element content decl */
26451 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
26452 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
26453 for (n_type = 0;n_type < gen_nb_xmlElementContentType;n_type++) {
26454 mem_base = xmlMemBlocks();
26455 doc = gen_xmlDocPtr(n_doc, 0);
26456 name = gen_const_xmlChar_ptr(n_name, 1);
26457 type = gen_xmlElementContentType(n_type, 2);
26459 ret_val = xmlNewDocElementContent(doc, (const xmlChar *)name, type);
26460 xmlFreeDocElementContent(doc, ret_val); ret_val = NULL;
26461 desret_xmlElementContentPtr(ret_val);
26463 des_xmlDocPtr(n_doc, doc, 0);
26464 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
26465 des_xmlElementContentType(n_type, type, 2);
26466 xmlResetLastError();
26467 if (mem_base != xmlMemBlocks()) {
26468 printf("Leak of %d blocks found in xmlNewDocElementContent",
26469 xmlMemBlocks() - mem_base);
26471 printf(" %d", n_doc);
26472 printf(" %d", n_name);
26473 printf(" %d", n_type);
26486 test_xmlNewElementContent(void) {
26490 xmlElementContentPtr ret_val;
26491 xmlChar * name; /* the subelement name or NULL */
26493 xmlElementContentType type; /* the type of element content decl */
26496 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
26497 for (n_type = 0;n_type < gen_nb_xmlElementContentType;n_type++) {
26498 mem_base = xmlMemBlocks();
26499 name = gen_const_xmlChar_ptr(n_name, 0);
26500 type = gen_xmlElementContentType(n_type, 1);
26502 ret_val = xmlNewElementContent((const xmlChar *)name, type);
26503 desret_xmlElementContentPtr(ret_val);
26505 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 0);
26506 des_xmlElementContentType(n_type, type, 1);
26507 xmlResetLastError();
26508 if (mem_base != xmlMemBlocks()) {
26509 printf("Leak of %d blocks found in xmlNewElementContent",
26510 xmlMemBlocks() - mem_base);
26512 printf(" %d", n_name);
26513 printf(" %d", n_type);
26525 test_xmlNewValidCtxt(void) {
26529 /* missing type support */
26535 test_xmlRemoveID(void) {
26540 xmlDocPtr doc; /* the document */
26542 xmlAttrPtr attr; /* the attribute */
26545 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
26546 for (n_attr = 0;n_attr < gen_nb_xmlAttrPtr;n_attr++) {
26547 mem_base = xmlMemBlocks();
26548 doc = gen_xmlDocPtr(n_doc, 0);
26549 attr = gen_xmlAttrPtr(n_attr, 1);
26551 ret_val = xmlRemoveID(doc, attr);
26552 desret_int(ret_val);
26554 des_xmlDocPtr(n_doc, doc, 0);
26555 des_xmlAttrPtr(n_attr, attr, 1);
26556 xmlResetLastError();
26557 if (mem_base != xmlMemBlocks()) {
26558 printf("Leak of %d blocks found in xmlRemoveID",
26559 xmlMemBlocks() - mem_base);
26561 printf(" %d", n_doc);
26562 printf(" %d", n_attr);
26574 test_xmlRemoveRef(void) {
26579 xmlDocPtr doc; /* the document */
26581 xmlAttrPtr attr; /* the attribute */
26584 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
26585 for (n_attr = 0;n_attr < gen_nb_xmlAttrPtr;n_attr++) {
26586 mem_base = xmlMemBlocks();
26587 doc = gen_xmlDocPtr(n_doc, 0);
26588 attr = gen_xmlAttrPtr(n_attr, 1);
26590 ret_val = xmlRemoveRef(doc, attr);
26591 desret_int(ret_val);
26593 des_xmlDocPtr(n_doc, doc, 0);
26594 des_xmlAttrPtr(n_attr, attr, 1);
26595 xmlResetLastError();
26596 if (mem_base != xmlMemBlocks()) {
26597 printf("Leak of %d blocks found in xmlRemoveRef",
26598 xmlMemBlocks() - mem_base);
26600 printf(" %d", n_doc);
26601 printf(" %d", n_attr);
26613 test_xmlSnprintfElementContent(void) {
26617 char * buf; /* an output buffer */
26619 int size; /* the buffer size */
26621 xmlElementContentPtr content; /* An element table */
26623 int englob; /* 1 if one must print the englobing parenthesis, 0 otherwise */
26626 for (n_buf = 0;n_buf < gen_nb_char_ptr;n_buf++) {
26627 for (n_size = 0;n_size < gen_nb_int;n_size++) {
26628 for (n_content = 0;n_content < gen_nb_xmlElementContentPtr;n_content++) {
26629 for (n_englob = 0;n_englob < gen_nb_int;n_englob++) {
26630 mem_base = xmlMemBlocks();
26631 buf = gen_char_ptr(n_buf, 0);
26632 size = gen_int(n_size, 1);
26633 content = gen_xmlElementContentPtr(n_content, 2);
26634 englob = gen_int(n_englob, 3);
26636 xmlSnprintfElementContent(buf, size, content, englob);
26638 des_char_ptr(n_buf, buf, 0);
26639 des_int(n_size, size, 1);
26640 des_xmlElementContentPtr(n_content, content, 2);
26641 des_int(n_englob, englob, 3);
26642 xmlResetLastError();
26643 if (mem_base != xmlMemBlocks()) {
26644 printf("Leak of %d blocks found in xmlSnprintfElementContent",
26645 xmlMemBlocks() - mem_base);
26647 printf(" %d", n_buf);
26648 printf(" %d", n_size);
26649 printf(" %d", n_content);
26650 printf(" %d", n_englob);
26664 test_xmlSprintfElementContent(void) {
26667 #if defined(LIBXML_OUTPUT_ENABLED)
26668 #ifdef LIBXML_OUTPUT_ENABLED
26670 char * buf; /* an output buffer */
26672 xmlElementContentPtr content; /* An element table */
26674 int englob; /* 1 if one must print the englobing parenthesis, 0 otherwise */
26677 for (n_buf = 0;n_buf < gen_nb_char_ptr;n_buf++) {
26678 for (n_content = 0;n_content < gen_nb_xmlElementContentPtr;n_content++) {
26679 for (n_englob = 0;n_englob < gen_nb_int;n_englob++) {
26680 mem_base = xmlMemBlocks();
26681 buf = gen_char_ptr(n_buf, 0);
26682 content = gen_xmlElementContentPtr(n_content, 1);
26683 englob = gen_int(n_englob, 2);
26685 xmlSprintfElementContent(buf, content, englob);
26687 des_char_ptr(n_buf, buf, 0);
26688 des_xmlElementContentPtr(n_content, content, 1);
26689 des_int(n_englob, englob, 2);
26690 xmlResetLastError();
26691 if (mem_base != xmlMemBlocks()) {
26692 printf("Leak of %d blocks found in xmlSprintfElementContent",
26693 xmlMemBlocks() - mem_base);
26695 printf(" %d", n_buf);
26696 printf(" %d", n_content);
26697 printf(" %d", n_englob);
26712 test_xmlValidBuildContentModel(void) {
26715 #if defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED)
26718 xmlValidCtxtPtr ctxt; /* a validation context */
26720 xmlElementPtr elem; /* an element declaration node */
26723 for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
26724 for (n_elem = 0;n_elem < gen_nb_xmlElementPtr;n_elem++) {
26725 mem_base = xmlMemBlocks();
26726 ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
26727 elem = gen_xmlElementPtr(n_elem, 1);
26729 ret_val = xmlValidBuildContentModel(ctxt, elem);
26730 desret_int(ret_val);
26732 des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
26733 des_xmlElementPtr(n_elem, elem, 1);
26734 xmlResetLastError();
26735 if (mem_base != xmlMemBlocks()) {
26736 printf("Leak of %d blocks found in xmlValidBuildContentModel",
26737 xmlMemBlocks() - mem_base);
26739 printf(" %d", n_ctxt);
26740 printf(" %d", n_elem);
26753 test_xmlValidCtxtNormalizeAttributeValue(void) {
26756 #if defined(LIBXML_VALID_ENABLED)
26759 xmlValidCtxtPtr ctxt; /* the validation context or NULL */
26761 xmlDocPtr doc; /* the document */
26763 xmlNodePtr elem; /* the parent */
26765 xmlChar * name; /* the attribute name */
26767 xmlChar * value; /* the attribute value */
26770 for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
26771 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
26772 for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
26773 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
26774 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
26775 mem_base = xmlMemBlocks();
26776 ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
26777 doc = gen_xmlDocPtr(n_doc, 1);
26778 elem = gen_xmlNodePtr(n_elem, 2);
26779 name = gen_const_xmlChar_ptr(n_name, 3);
26780 value = gen_const_xmlChar_ptr(n_value, 4);
26782 ret_val = xmlValidCtxtNormalizeAttributeValue(ctxt, doc, elem, (const xmlChar *)name, (const xmlChar *)value);
26783 desret_xmlChar_ptr(ret_val);
26785 des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
26786 des_xmlDocPtr(n_doc, doc, 1);
26787 des_xmlNodePtr(n_elem, elem, 2);
26788 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 3);
26789 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 4);
26790 xmlResetLastError();
26791 if (mem_base != xmlMemBlocks()) {
26792 printf("Leak of %d blocks found in xmlValidCtxtNormalizeAttributeValue",
26793 xmlMemBlocks() - mem_base);
26795 printf(" %d", n_ctxt);
26796 printf(" %d", n_doc);
26797 printf(" %d", n_elem);
26798 printf(" %d", n_name);
26799 printf(" %d", n_value);
26814 #define gen_nb_xmlElementContent_ptr 1
26815 static xmlElementContent * gen_xmlElementContent_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
26818 static void des_xmlElementContent_ptr(int no ATTRIBUTE_UNUSED, xmlElementContent * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
26822 test_xmlValidGetPotentialChildren(void) {
26825 #if defined(LIBXML_VALID_ENABLED)
26826 #ifdef LIBXML_VALID_ENABLED
26829 xmlElementContent * ctree; /* an element content tree */
26831 xmlChar ** names; /* an array to store the list of child names */
26833 int * len; /* a pointer to the number of element in the list */
26835 int max; /* the size of the array */
26838 for (n_ctree = 0;n_ctree < gen_nb_xmlElementContent_ptr;n_ctree++) {
26839 for (n_names = 0;n_names < gen_nb_const_xmlChar_ptr_ptr;n_names++) {
26840 for (n_len = 0;n_len < gen_nb_int_ptr;n_len++) {
26841 for (n_max = 0;n_max < gen_nb_int;n_max++) {
26842 mem_base = xmlMemBlocks();
26843 ctree = gen_xmlElementContent_ptr(n_ctree, 0);
26844 names = gen_const_xmlChar_ptr_ptr(n_names, 1);
26845 len = gen_int_ptr(n_len, 2);
26846 max = gen_int(n_max, 3);
26848 ret_val = xmlValidGetPotentialChildren(ctree, (const xmlChar **)names, len, max);
26849 desret_int(ret_val);
26851 des_xmlElementContent_ptr(n_ctree, ctree, 0);
26852 des_const_xmlChar_ptr_ptr(n_names, (const xmlChar **)names, 1);
26853 des_int_ptr(n_len, len, 2);
26854 des_int(n_max, max, 3);
26855 xmlResetLastError();
26856 if (mem_base != xmlMemBlocks()) {
26857 printf("Leak of %d blocks found in xmlValidGetPotentialChildren",
26858 xmlMemBlocks() - mem_base);
26860 printf(" %d", n_ctree);
26861 printf(" %d", n_names);
26862 printf(" %d", n_len);
26863 printf(" %d", n_max);
26879 test_xmlValidGetValidElements(void) {
26882 #if defined(LIBXML_VALID_ENABLED)
26883 #ifdef LIBXML_VALID_ENABLED
26886 xmlNode * prev; /* an element to insert after */
26888 xmlNode * next; /* an element to insert next */
26890 xmlChar ** names; /* an array to store the list of child names */
26892 int max; /* the size of the array */
26895 for (n_prev = 0;n_prev < gen_nb_xmlNodePtr;n_prev++) {
26896 for (n_next = 0;n_next < gen_nb_xmlNodePtr;n_next++) {
26897 for (n_names = 0;n_names < gen_nb_const_xmlChar_ptr_ptr;n_names++) {
26898 for (n_max = 0;n_max < gen_nb_int;n_max++) {
26899 mem_base = xmlMemBlocks();
26900 prev = gen_xmlNodePtr(n_prev, 0);
26901 next = gen_xmlNodePtr(n_next, 1);
26902 names = gen_const_xmlChar_ptr_ptr(n_names, 2);
26903 max = gen_int(n_max, 3);
26905 ret_val = xmlValidGetValidElements(prev, next, (const xmlChar **)names, max);
26906 desret_int(ret_val);
26908 des_xmlNodePtr(n_prev, prev, 0);
26909 des_xmlNodePtr(n_next, next, 1);
26910 des_const_xmlChar_ptr_ptr(n_names, (const xmlChar **)names, 2);
26911 des_int(n_max, max, 3);
26912 xmlResetLastError();
26913 if (mem_base != xmlMemBlocks()) {
26914 printf("Leak of %d blocks found in xmlValidGetValidElements",
26915 xmlMemBlocks() - mem_base);
26917 printf(" %d", n_prev);
26918 printf(" %d", n_next);
26919 printf(" %d", n_names);
26920 printf(" %d", n_max);
26936 test_xmlValidNormalizeAttributeValue(void) {
26939 #if defined(LIBXML_VALID_ENABLED)
26942 xmlDocPtr doc; /* the document */
26944 xmlNodePtr elem; /* the parent */
26946 xmlChar * name; /* the attribute name */
26948 xmlChar * value; /* the attribute value */
26951 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
26952 for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
26953 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
26954 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
26955 mem_base = xmlMemBlocks();
26956 doc = gen_xmlDocPtr(n_doc, 0);
26957 elem = gen_xmlNodePtr(n_elem, 1);
26958 name = gen_const_xmlChar_ptr(n_name, 2);
26959 value = gen_const_xmlChar_ptr(n_value, 3);
26961 ret_val = xmlValidNormalizeAttributeValue(doc, elem, (const xmlChar *)name, (const xmlChar *)value);
26962 desret_xmlChar_ptr(ret_val);
26964 des_xmlDocPtr(n_doc, doc, 0);
26965 des_xmlNodePtr(n_elem, elem, 1);
26966 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
26967 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 3);
26968 xmlResetLastError();
26969 if (mem_base != xmlMemBlocks()) {
26970 printf("Leak of %d blocks found in xmlValidNormalizeAttributeValue",
26971 xmlMemBlocks() - mem_base);
26973 printf(" %d", n_doc);
26974 printf(" %d", n_elem);
26975 printf(" %d", n_name);
26976 printf(" %d", n_value);
26991 test_xmlValidateAttributeDecl(void) {
26994 #if defined(LIBXML_VALID_ENABLED)
26997 xmlValidCtxtPtr ctxt; /* the validation context */
26999 xmlDocPtr doc; /* a document instance */
27001 xmlAttributePtr attr; /* an attribute definition */
27004 for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
27005 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
27006 for (n_attr = 0;n_attr < gen_nb_xmlAttributePtr;n_attr++) {
27007 mem_base = xmlMemBlocks();
27008 ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
27009 doc = gen_xmlDocPtr(n_doc, 1);
27010 attr = gen_xmlAttributePtr(n_attr, 2);
27012 ret_val = xmlValidateAttributeDecl(ctxt, doc, attr);
27013 desret_int(ret_val);
27015 des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
27016 des_xmlDocPtr(n_doc, doc, 1);
27017 des_xmlAttributePtr(n_attr, attr, 2);
27018 xmlResetLastError();
27019 if (mem_base != xmlMemBlocks()) {
27020 printf("Leak of %d blocks found in xmlValidateAttributeDecl",
27021 xmlMemBlocks() - mem_base);
27023 printf(" %d", n_ctxt);
27024 printf(" %d", n_doc);
27025 printf(" %d", n_attr);
27039 test_xmlValidateAttributeValue(void) {
27042 #if defined(LIBXML_VALID_ENABLED)
27045 xmlAttributeType type; /* an attribute type */
27047 xmlChar * value; /* an attribute value */
27050 for (n_type = 0;n_type < gen_nb_xmlAttributeType;n_type++) {
27051 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
27052 mem_base = xmlMemBlocks();
27053 type = gen_xmlAttributeType(n_type, 0);
27054 value = gen_const_xmlChar_ptr(n_value, 1);
27056 ret_val = xmlValidateAttributeValue(type, (const xmlChar *)value);
27057 desret_int(ret_val);
27059 des_xmlAttributeType(n_type, type, 0);
27060 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 1);
27061 xmlResetLastError();
27062 if (mem_base != xmlMemBlocks()) {
27063 printf("Leak of %d blocks found in xmlValidateAttributeValue",
27064 xmlMemBlocks() - mem_base);
27066 printf(" %d", n_type);
27067 printf(" %d", n_value);
27080 test_xmlValidateDocument(void) {
27083 #if defined(LIBXML_VALID_ENABLED)
27086 xmlValidCtxtPtr ctxt; /* the validation context */
27088 xmlDocPtr doc; /* a document instance */
27091 for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
27092 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
27093 mem_base = xmlMemBlocks();
27094 ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
27095 doc = gen_xmlDocPtr(n_doc, 1);
27097 ret_val = xmlValidateDocument(ctxt, doc);
27098 desret_int(ret_val);
27100 des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
27101 des_xmlDocPtr(n_doc, doc, 1);
27102 xmlResetLastError();
27103 if (mem_base != xmlMemBlocks()) {
27104 printf("Leak of %d blocks found in xmlValidateDocument",
27105 xmlMemBlocks() - mem_base);
27107 printf(" %d", n_ctxt);
27108 printf(" %d", n_doc);
27121 test_xmlValidateDocumentFinal(void) {
27124 #if defined(LIBXML_VALID_ENABLED)
27127 xmlValidCtxtPtr ctxt; /* the validation context */
27129 xmlDocPtr doc; /* a document instance */
27132 for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
27133 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
27134 mem_base = xmlMemBlocks();
27135 ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
27136 doc = gen_xmlDocPtr(n_doc, 1);
27138 ret_val = xmlValidateDocumentFinal(ctxt, doc);
27139 desret_int(ret_val);
27141 des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
27142 des_xmlDocPtr(n_doc, doc, 1);
27143 xmlResetLastError();
27144 if (mem_base != xmlMemBlocks()) {
27145 printf("Leak of %d blocks found in xmlValidateDocumentFinal",
27146 xmlMemBlocks() - mem_base);
27148 printf(" %d", n_ctxt);
27149 printf(" %d", n_doc);
27162 test_xmlValidateDtd(void) {
27165 #if defined(LIBXML_VALID_ENABLED)
27168 xmlValidCtxtPtr ctxt; /* the validation context */
27170 xmlDocPtr doc; /* a document instance */
27172 xmlDtdPtr dtd; /* a dtd instance */
27175 for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
27176 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
27177 for (n_dtd = 0;n_dtd < gen_nb_xmlDtdPtr;n_dtd++) {
27178 mem_base = xmlMemBlocks();
27179 ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
27180 doc = gen_xmlDocPtr(n_doc, 1);
27181 dtd = gen_xmlDtdPtr(n_dtd, 2);
27183 ret_val = xmlValidateDtd(ctxt, doc, dtd);
27184 desret_int(ret_val);
27186 des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
27187 des_xmlDocPtr(n_doc, doc, 1);
27188 des_xmlDtdPtr(n_dtd, dtd, 2);
27189 xmlResetLastError();
27190 if (mem_base != xmlMemBlocks()) {
27191 printf("Leak of %d blocks found in xmlValidateDtd",
27192 xmlMemBlocks() - mem_base);
27194 printf(" %d", n_ctxt);
27195 printf(" %d", n_doc);
27196 printf(" %d", n_dtd);
27210 test_xmlValidateDtdFinal(void) {
27213 #if defined(LIBXML_VALID_ENABLED)
27216 xmlValidCtxtPtr ctxt; /* the validation context */
27218 xmlDocPtr doc; /* a document instance */
27221 for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
27222 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
27223 mem_base = xmlMemBlocks();
27224 ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
27225 doc = gen_xmlDocPtr(n_doc, 1);
27227 ret_val = xmlValidateDtdFinal(ctxt, doc);
27228 desret_int(ret_val);
27230 des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
27231 des_xmlDocPtr(n_doc, doc, 1);
27232 xmlResetLastError();
27233 if (mem_base != xmlMemBlocks()) {
27234 printf("Leak of %d blocks found in xmlValidateDtdFinal",
27235 xmlMemBlocks() - mem_base);
27237 printf(" %d", n_ctxt);
27238 printf(" %d", n_doc);
27251 test_xmlValidateElement(void) {
27254 #if defined(LIBXML_VALID_ENABLED)
27257 xmlValidCtxtPtr ctxt; /* the validation context */
27259 xmlDocPtr doc; /* a document instance */
27261 xmlNodePtr elem; /* an element instance */
27264 for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
27265 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
27266 for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
27267 mem_base = xmlMemBlocks();
27268 ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
27269 doc = gen_xmlDocPtr(n_doc, 1);
27270 elem = gen_xmlNodePtr(n_elem, 2);
27272 ret_val = xmlValidateElement(ctxt, doc, elem);
27273 desret_int(ret_val);
27275 des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
27276 des_xmlDocPtr(n_doc, doc, 1);
27277 des_xmlNodePtr(n_elem, elem, 2);
27278 xmlResetLastError();
27279 if (mem_base != xmlMemBlocks()) {
27280 printf("Leak of %d blocks found in xmlValidateElement",
27281 xmlMemBlocks() - mem_base);
27283 printf(" %d", n_ctxt);
27284 printf(" %d", n_doc);
27285 printf(" %d", n_elem);
27299 test_xmlValidateElementDecl(void) {
27302 #if defined(LIBXML_VALID_ENABLED)
27305 xmlValidCtxtPtr ctxt; /* the validation context */
27307 xmlDocPtr doc; /* a document instance */
27309 xmlElementPtr elem; /* an element definition */
27312 for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
27313 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
27314 for (n_elem = 0;n_elem < gen_nb_xmlElementPtr;n_elem++) {
27315 mem_base = xmlMemBlocks();
27316 ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
27317 doc = gen_xmlDocPtr(n_doc, 1);
27318 elem = gen_xmlElementPtr(n_elem, 2);
27320 ret_val = xmlValidateElementDecl(ctxt, doc, elem);
27321 desret_int(ret_val);
27323 des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
27324 des_xmlDocPtr(n_doc, doc, 1);
27325 des_xmlElementPtr(n_elem, elem, 2);
27326 xmlResetLastError();
27327 if (mem_base != xmlMemBlocks()) {
27328 printf("Leak of %d blocks found in xmlValidateElementDecl",
27329 xmlMemBlocks() - mem_base);
27331 printf(" %d", n_ctxt);
27332 printf(" %d", n_doc);
27333 printf(" %d", n_elem);
27347 test_xmlValidateNameValue(void) {
27350 #if defined(LIBXML_VALID_ENABLED)
27353 xmlChar * value; /* an Name value */
27356 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
27357 mem_base = xmlMemBlocks();
27358 value = gen_const_xmlChar_ptr(n_value, 0);
27360 ret_val = xmlValidateNameValue((const xmlChar *)value);
27361 desret_int(ret_val);
27363 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 0);
27364 xmlResetLastError();
27365 if (mem_base != xmlMemBlocks()) {
27366 printf("Leak of %d blocks found in xmlValidateNameValue",
27367 xmlMemBlocks() - mem_base);
27369 printf(" %d", n_value);
27381 test_xmlValidateNamesValue(void) {
27384 #if defined(LIBXML_VALID_ENABLED)
27387 xmlChar * value; /* an Names value */
27390 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
27391 mem_base = xmlMemBlocks();
27392 value = gen_const_xmlChar_ptr(n_value, 0);
27394 ret_val = xmlValidateNamesValue((const xmlChar *)value);
27395 desret_int(ret_val);
27397 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 0);
27398 xmlResetLastError();
27399 if (mem_base != xmlMemBlocks()) {
27400 printf("Leak of %d blocks found in xmlValidateNamesValue",
27401 xmlMemBlocks() - mem_base);
27403 printf(" %d", n_value);
27415 test_xmlValidateNmtokenValue(void) {
27418 #if defined(LIBXML_VALID_ENABLED)
27421 xmlChar * value; /* an Nmtoken value */
27424 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
27425 mem_base = xmlMemBlocks();
27426 value = gen_const_xmlChar_ptr(n_value, 0);
27428 ret_val = xmlValidateNmtokenValue((const xmlChar *)value);
27429 desret_int(ret_val);
27431 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 0);
27432 xmlResetLastError();
27433 if (mem_base != xmlMemBlocks()) {
27434 printf("Leak of %d blocks found in xmlValidateNmtokenValue",
27435 xmlMemBlocks() - mem_base);
27437 printf(" %d", n_value);
27449 test_xmlValidateNmtokensValue(void) {
27452 #if defined(LIBXML_VALID_ENABLED)
27455 xmlChar * value; /* an Nmtokens value */
27458 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
27459 mem_base = xmlMemBlocks();
27460 value = gen_const_xmlChar_ptr(n_value, 0);
27462 ret_val = xmlValidateNmtokensValue((const xmlChar *)value);
27463 desret_int(ret_val);
27465 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 0);
27466 xmlResetLastError();
27467 if (mem_base != xmlMemBlocks()) {
27468 printf("Leak of %d blocks found in xmlValidateNmtokensValue",
27469 xmlMemBlocks() - mem_base);
27471 printf(" %d", n_value);
27483 test_xmlValidateNotationDecl(void) {
27486 #if defined(LIBXML_VALID_ENABLED)
27489 xmlValidCtxtPtr ctxt; /* the validation context */
27491 xmlDocPtr doc; /* a document instance */
27493 xmlNotationPtr nota; /* a notation definition */
27496 for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
27497 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
27498 for (n_nota = 0;n_nota < gen_nb_xmlNotationPtr;n_nota++) {
27499 mem_base = xmlMemBlocks();
27500 ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
27501 doc = gen_xmlDocPtr(n_doc, 1);
27502 nota = gen_xmlNotationPtr(n_nota, 2);
27504 ret_val = xmlValidateNotationDecl(ctxt, doc, nota);
27505 desret_int(ret_val);
27507 des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
27508 des_xmlDocPtr(n_doc, doc, 1);
27509 des_xmlNotationPtr(n_nota, nota, 2);
27510 xmlResetLastError();
27511 if (mem_base != xmlMemBlocks()) {
27512 printf("Leak of %d blocks found in xmlValidateNotationDecl",
27513 xmlMemBlocks() - mem_base);
27515 printf(" %d", n_ctxt);
27516 printf(" %d", n_doc);
27517 printf(" %d", n_nota);
27531 test_xmlValidateNotationUse(void) {
27534 #if defined(LIBXML_VALID_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
27537 xmlValidCtxtPtr ctxt; /* the validation context */
27539 xmlDocPtr doc; /* the document */
27541 xmlChar * notationName; /* the notation name to check */
27542 int n_notationName;
27544 for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
27545 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
27546 for (n_notationName = 0;n_notationName < gen_nb_const_xmlChar_ptr;n_notationName++) {
27547 mem_base = xmlMemBlocks();
27548 ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
27549 doc = gen_xmlDocPtr(n_doc, 1);
27550 notationName = gen_const_xmlChar_ptr(n_notationName, 2);
27552 ret_val = xmlValidateNotationUse(ctxt, doc, (const xmlChar *)notationName);
27553 desret_int(ret_val);
27555 des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
27556 des_xmlDocPtr(n_doc, doc, 1);
27557 des_const_xmlChar_ptr(n_notationName, (const xmlChar *)notationName, 2);
27558 xmlResetLastError();
27559 if (mem_base != xmlMemBlocks()) {
27560 printf("Leak of %d blocks found in xmlValidateNotationUse",
27561 xmlMemBlocks() - mem_base);
27563 printf(" %d", n_ctxt);
27564 printf(" %d", n_doc);
27565 printf(" %d", n_notationName);
27579 test_xmlValidateOneAttribute(void) {
27582 #if defined(LIBXML_VALID_ENABLED)
27585 xmlValidCtxtPtr ctxt; /* the validation context */
27587 xmlDocPtr doc; /* a document instance */
27589 xmlNodePtr elem; /* an element instance */
27591 xmlAttrPtr attr; /* an attribute instance */
27593 xmlChar * value; /* the attribute value (without entities processing) */
27596 for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
27597 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
27598 for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
27599 for (n_attr = 0;n_attr < gen_nb_xmlAttrPtr;n_attr++) {
27600 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
27601 mem_base = xmlMemBlocks();
27602 ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
27603 doc = gen_xmlDocPtr(n_doc, 1);
27604 elem = gen_xmlNodePtr(n_elem, 2);
27605 attr = gen_xmlAttrPtr(n_attr, 3);
27606 value = gen_const_xmlChar_ptr(n_value, 4);
27608 ret_val = xmlValidateOneAttribute(ctxt, doc, elem, attr, (const xmlChar *)value);
27609 desret_int(ret_val);
27611 des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
27612 des_xmlDocPtr(n_doc, doc, 1);
27613 des_xmlNodePtr(n_elem, elem, 2);
27614 des_xmlAttrPtr(n_attr, attr, 3);
27615 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 4);
27616 xmlResetLastError();
27617 if (mem_base != xmlMemBlocks()) {
27618 printf("Leak of %d blocks found in xmlValidateOneAttribute",
27619 xmlMemBlocks() - mem_base);
27621 printf(" %d", n_ctxt);
27622 printf(" %d", n_doc);
27623 printf(" %d", n_elem);
27624 printf(" %d", n_attr);
27625 printf(" %d", n_value);
27641 test_xmlValidateOneElement(void) {
27644 #if defined(LIBXML_VALID_ENABLED)
27647 xmlValidCtxtPtr ctxt; /* the validation context */
27649 xmlDocPtr doc; /* a document instance */
27651 xmlNodePtr elem; /* an element instance */
27654 for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
27655 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
27656 for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
27657 mem_base = xmlMemBlocks();
27658 ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
27659 doc = gen_xmlDocPtr(n_doc, 1);
27660 elem = gen_xmlNodePtr(n_elem, 2);
27662 ret_val = xmlValidateOneElement(ctxt, doc, elem);
27663 desret_int(ret_val);
27665 des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
27666 des_xmlDocPtr(n_doc, doc, 1);
27667 des_xmlNodePtr(n_elem, elem, 2);
27668 xmlResetLastError();
27669 if (mem_base != xmlMemBlocks()) {
27670 printf("Leak of %d blocks found in xmlValidateOneElement",
27671 xmlMemBlocks() - mem_base);
27673 printf(" %d", n_ctxt);
27674 printf(" %d", n_doc);
27675 printf(" %d", n_elem);
27689 test_xmlValidateOneNamespace(void) {
27692 #if defined(LIBXML_VALID_ENABLED)
27695 xmlValidCtxtPtr ctxt; /* the validation context */
27697 xmlDocPtr doc; /* a document instance */
27699 xmlNodePtr elem; /* an element instance */
27701 xmlChar * prefix; /* the namespace prefix */
27703 xmlNsPtr ns; /* an namespace declaration instance */
27705 xmlChar * value; /* the attribute value (without entities processing) */
27708 for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
27709 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
27710 for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
27711 for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
27712 for (n_ns = 0;n_ns < gen_nb_xmlNsPtr;n_ns++) {
27713 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
27714 mem_base = xmlMemBlocks();
27715 ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
27716 doc = gen_xmlDocPtr(n_doc, 1);
27717 elem = gen_xmlNodePtr(n_elem, 2);
27718 prefix = gen_const_xmlChar_ptr(n_prefix, 3);
27719 ns = gen_xmlNsPtr(n_ns, 4);
27720 value = gen_const_xmlChar_ptr(n_value, 5);
27722 ret_val = xmlValidateOneNamespace(ctxt, doc, elem, (const xmlChar *)prefix, ns, (const xmlChar *)value);
27723 desret_int(ret_val);
27725 des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
27726 des_xmlDocPtr(n_doc, doc, 1);
27727 des_xmlNodePtr(n_elem, elem, 2);
27728 des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 3);
27729 des_xmlNsPtr(n_ns, ns, 4);
27730 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 5);
27731 xmlResetLastError();
27732 if (mem_base != xmlMemBlocks()) {
27733 printf("Leak of %d blocks found in xmlValidateOneNamespace",
27734 xmlMemBlocks() - mem_base);
27736 printf(" %d", n_ctxt);
27737 printf(" %d", n_doc);
27738 printf(" %d", n_elem);
27739 printf(" %d", n_prefix);
27740 printf(" %d", n_ns);
27741 printf(" %d", n_value);
27758 test_xmlValidatePopElement(void) {
27761 #if defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED)
27764 xmlValidCtxtPtr ctxt; /* the validation context */
27766 xmlDocPtr doc; /* a document instance */
27768 xmlNodePtr elem; /* an element instance */
27770 xmlChar * qname; /* the qualified name as appearing in the serialization */
27773 for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
27774 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
27775 for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
27776 for (n_qname = 0;n_qname < gen_nb_const_xmlChar_ptr;n_qname++) {
27777 mem_base = xmlMemBlocks();
27778 ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
27779 doc = gen_xmlDocPtr(n_doc, 1);
27780 elem = gen_xmlNodePtr(n_elem, 2);
27781 qname = gen_const_xmlChar_ptr(n_qname, 3);
27783 ret_val = xmlValidatePopElement(ctxt, doc, elem, (const xmlChar *)qname);
27784 desret_int(ret_val);
27786 des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
27787 des_xmlDocPtr(n_doc, doc, 1);
27788 des_xmlNodePtr(n_elem, elem, 2);
27789 des_const_xmlChar_ptr(n_qname, (const xmlChar *)qname, 3);
27790 xmlResetLastError();
27791 if (mem_base != xmlMemBlocks()) {
27792 printf("Leak of %d blocks found in xmlValidatePopElement",
27793 xmlMemBlocks() - mem_base);
27795 printf(" %d", n_ctxt);
27796 printf(" %d", n_doc);
27797 printf(" %d", n_elem);
27798 printf(" %d", n_qname);
27813 test_xmlValidatePushCData(void) {
27816 #if defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED)
27819 xmlValidCtxtPtr ctxt; /* the validation context */
27821 xmlChar * data; /* some character data read */
27823 int len; /* the length of the data */
27826 for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
27827 for (n_data = 0;n_data < gen_nb_const_xmlChar_ptr;n_data++) {
27828 for (n_len = 0;n_len < gen_nb_int;n_len++) {
27829 mem_base = xmlMemBlocks();
27830 ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
27831 data = gen_const_xmlChar_ptr(n_data, 1);
27832 len = gen_int(n_len, 2);
27833 if ((data != NULL) &&
27834 (len > (int) strlen((const char *) data) + 1))
27837 ret_val = xmlValidatePushCData(ctxt, (const xmlChar *)data, len);
27838 desret_int(ret_val);
27840 des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
27841 des_const_xmlChar_ptr(n_data, (const xmlChar *)data, 1);
27842 des_int(n_len, len, 2);
27843 xmlResetLastError();
27844 if (mem_base != xmlMemBlocks()) {
27845 printf("Leak of %d blocks found in xmlValidatePushCData",
27846 xmlMemBlocks() - mem_base);
27848 printf(" %d", n_ctxt);
27849 printf(" %d", n_data);
27850 printf(" %d", n_len);
27864 test_xmlValidatePushElement(void) {
27867 #if defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED)
27870 xmlValidCtxtPtr ctxt; /* the validation context */
27872 xmlDocPtr doc; /* a document instance */
27874 xmlNodePtr elem; /* an element instance */
27876 xmlChar * qname; /* the qualified name as appearing in the serialization */
27879 for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
27880 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
27881 for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
27882 for (n_qname = 0;n_qname < gen_nb_const_xmlChar_ptr;n_qname++) {
27883 mem_base = xmlMemBlocks();
27884 ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
27885 doc = gen_xmlDocPtr(n_doc, 1);
27886 elem = gen_xmlNodePtr(n_elem, 2);
27887 qname = gen_const_xmlChar_ptr(n_qname, 3);
27889 ret_val = xmlValidatePushElement(ctxt, doc, elem, (const xmlChar *)qname);
27890 desret_int(ret_val);
27892 des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
27893 des_xmlDocPtr(n_doc, doc, 1);
27894 des_xmlNodePtr(n_elem, elem, 2);
27895 des_const_xmlChar_ptr(n_qname, (const xmlChar *)qname, 3);
27896 xmlResetLastError();
27897 if (mem_base != xmlMemBlocks()) {
27898 printf("Leak of %d blocks found in xmlValidatePushElement",
27899 xmlMemBlocks() - mem_base);
27901 printf(" %d", n_ctxt);
27902 printf(" %d", n_doc);
27903 printf(" %d", n_elem);
27904 printf(" %d", n_qname);
27919 test_xmlValidateRoot(void) {
27922 #if defined(LIBXML_VALID_ENABLED)
27925 xmlValidCtxtPtr ctxt; /* the validation context */
27927 xmlDocPtr doc; /* a document instance */
27930 for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
27931 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
27932 mem_base = xmlMemBlocks();
27933 ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
27934 doc = gen_xmlDocPtr(n_doc, 1);
27936 ret_val = xmlValidateRoot(ctxt, doc);
27937 desret_int(ret_val);
27939 des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
27940 des_xmlDocPtr(n_doc, doc, 1);
27941 xmlResetLastError();
27942 if (mem_base != xmlMemBlocks()) {
27943 printf("Leak of %d blocks found in xmlValidateRoot",
27944 xmlMemBlocks() - mem_base);
27946 printf(" %d", n_ctxt);
27947 printf(" %d", n_doc);
27963 if (quiet == 0) printf("Testing valid : 50 of 70 functions ...\n");
27964 rc = test_xmlAddAttributeDecl();
27965 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27966 rc = test_xmlAddElementDecl();
27967 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27968 rc = test_xmlAddID();
27969 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27970 rc = test_xmlAddNotationDecl();
27971 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27972 rc = test_xmlAddRef();
27973 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27974 rc = test_xmlCopyAttributeTable();
27975 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27976 rc = test_xmlCopyDocElementContent();
27977 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27978 rc = test_xmlCopyElementContent();
27979 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27980 rc = test_xmlCopyElementTable();
27981 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27982 rc = test_xmlCopyEnumeration();
27983 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27984 rc = test_xmlCopyNotationTable();
27985 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27986 rc = test_xmlCreateEnumeration();
27987 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27988 rc = test_xmlDumpAttributeDecl();
27989 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27990 rc = test_xmlDumpAttributeTable();
27991 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27992 rc = test_xmlDumpElementDecl();
27993 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27994 rc = test_xmlDumpElementTable();
27995 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27996 rc = test_xmlDumpNotationDecl();
27997 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27998 rc = test_xmlDumpNotationTable();
27999 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28000 rc = test_xmlGetDtdAttrDesc();
28001 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28002 rc = test_xmlGetDtdElementDesc();
28003 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28004 rc = test_xmlGetDtdNotationDesc();
28005 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28006 rc = test_xmlGetDtdQAttrDesc();
28007 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28008 rc = test_xmlGetDtdQElementDesc();
28009 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28010 rc = test_xmlGetID();
28011 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28012 rc = test_xmlGetRefs();
28013 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28014 rc = test_xmlIsID();
28015 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28016 rc = test_xmlIsMixedElement();
28017 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28018 rc = test_xmlIsRef();
28019 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28020 rc = test_xmlNewDocElementContent();
28021 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28022 rc = test_xmlNewElementContent();
28023 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28024 rc = test_xmlNewValidCtxt();
28025 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28026 rc = test_xmlRemoveID();
28027 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28028 rc = test_xmlRemoveRef();
28029 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28030 rc = test_xmlSnprintfElementContent();
28031 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28032 rc = test_xmlSprintfElementContent();
28033 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28034 rc = test_xmlValidBuildContentModel();
28035 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28036 rc = test_xmlValidCtxtNormalizeAttributeValue();
28037 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28038 rc = test_xmlValidGetPotentialChildren();
28039 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28040 rc = test_xmlValidGetValidElements();
28041 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28042 rc = test_xmlValidNormalizeAttributeValue();
28043 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28044 rc = test_xmlValidateAttributeDecl();
28045 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28046 rc = test_xmlValidateAttributeValue();
28047 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28048 rc = test_xmlValidateDocument();
28049 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28050 rc = test_xmlValidateDocumentFinal();
28051 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28052 rc = test_xmlValidateDtd();
28053 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28054 rc = test_xmlValidateDtdFinal();
28055 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28056 rc = test_xmlValidateElement();
28057 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28058 rc = test_xmlValidateElementDecl();
28059 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28060 rc = test_xmlValidateNameValue();
28061 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28062 rc = test_xmlValidateNamesValue();
28063 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28064 rc = test_xmlValidateNmtokenValue();
28065 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28066 rc = test_xmlValidateNmtokensValue();
28067 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28068 rc = test_xmlValidateNotationDecl();
28069 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28070 rc = test_xmlValidateNotationUse();
28071 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28072 rc = test_xmlValidateOneAttribute();
28073 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28074 rc = test_xmlValidateOneElement();
28075 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28076 rc = test_xmlValidateOneNamespace();
28077 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28078 rc = test_xmlValidatePopElement();
28079 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28080 rc = test_xmlValidatePushCData();
28081 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28082 rc = test_xmlValidatePushElement();
28083 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28084 rc = test_xmlValidateRoot();
28085 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28088 printf("Module valid: %d errors\n", test_ret);
28093 test_xmlXIncludeNewContext(void) {
28097 /* missing type support */
28103 test_xmlXIncludeProcess(void) {
28106 #if defined(LIBXML_XINCLUDE_ENABLED)
28109 xmlDocPtr doc; /* an XML document */
28112 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
28113 mem_base = xmlMemBlocks();
28114 doc = gen_xmlDocPtr(n_doc, 0);
28116 ret_val = xmlXIncludeProcess(doc);
28117 desret_int(ret_val);
28119 des_xmlDocPtr(n_doc, doc, 0);
28120 xmlResetLastError();
28121 if (mem_base != xmlMemBlocks()) {
28122 printf("Leak of %d blocks found in xmlXIncludeProcess",
28123 xmlMemBlocks() - mem_base);
28125 printf(" %d", n_doc);
28137 test_xmlXIncludeProcessFlags(void) {
28140 #if defined(LIBXML_XINCLUDE_ENABLED)
28143 xmlDocPtr doc; /* an XML document */
28145 int flags; /* a set of xmlParserOption used for parsing XML includes */
28148 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
28149 for (n_flags = 0;n_flags < gen_nb_int;n_flags++) {
28150 mem_base = xmlMemBlocks();
28151 doc = gen_xmlDocPtr(n_doc, 0);
28152 flags = gen_int(n_flags, 1);
28154 ret_val = xmlXIncludeProcessFlags(doc, flags);
28155 desret_int(ret_val);
28157 des_xmlDocPtr(n_doc, doc, 0);
28158 des_int(n_flags, flags, 1);
28159 xmlResetLastError();
28160 if (mem_base != xmlMemBlocks()) {
28161 printf("Leak of %d blocks found in xmlXIncludeProcessFlags",
28162 xmlMemBlocks() - mem_base);
28164 printf(" %d", n_doc);
28165 printf(" %d", n_flags);
28178 test_xmlXIncludeProcessFlagsData(void) {
28181 #if defined(LIBXML_XINCLUDE_ENABLED)
28184 xmlDocPtr doc; /* an XML document */
28186 int flags; /* a set of xmlParserOption used for parsing XML includes */
28188 void * data; /* application data that will be passed to the parser context in the _private field of the parser context(s) */
28191 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
28192 for (n_flags = 0;n_flags < gen_nb_int;n_flags++) {
28193 for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
28194 mem_base = xmlMemBlocks();
28195 doc = gen_xmlDocPtr(n_doc, 0);
28196 flags = gen_int(n_flags, 1);
28197 data = gen_userdata(n_data, 2);
28199 ret_val = xmlXIncludeProcessFlagsData(doc, flags, data);
28200 desret_int(ret_val);
28202 des_xmlDocPtr(n_doc, doc, 0);
28203 des_int(n_flags, flags, 1);
28204 des_userdata(n_data, data, 2);
28205 xmlResetLastError();
28206 if (mem_base != xmlMemBlocks()) {
28207 printf("Leak of %d blocks found in xmlXIncludeProcessFlagsData",
28208 xmlMemBlocks() - mem_base);
28210 printf(" %d", n_doc);
28211 printf(" %d", n_flags);
28212 printf(" %d", n_data);
28224 #ifdef LIBXML_XINCLUDE_ENABLED
28226 #define gen_nb_xmlXIncludeCtxtPtr 1
28227 static xmlXIncludeCtxtPtr gen_xmlXIncludeCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
28230 static void des_xmlXIncludeCtxtPtr(int no ATTRIBUTE_UNUSED, xmlXIncludeCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
28236 test_xmlXIncludeProcessNode(void) {
28239 #if defined(LIBXML_XINCLUDE_ENABLED)
28242 xmlXIncludeCtxtPtr ctxt; /* an existing XInclude context */
28244 xmlNodePtr node; /* a node in an XML document */
28247 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXIncludeCtxtPtr;n_ctxt++) {
28248 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
28249 mem_base = xmlMemBlocks();
28250 ctxt = gen_xmlXIncludeCtxtPtr(n_ctxt, 0);
28251 node = gen_xmlNodePtr(n_node, 1);
28253 ret_val = xmlXIncludeProcessNode(ctxt, node);
28254 desret_int(ret_val);
28256 des_xmlXIncludeCtxtPtr(n_ctxt, ctxt, 0);
28257 des_xmlNodePtr(n_node, node, 1);
28258 xmlResetLastError();
28259 if (mem_base != xmlMemBlocks()) {
28260 printf("Leak of %d blocks found in xmlXIncludeProcessNode",
28261 xmlMemBlocks() - mem_base);
28263 printf(" %d", n_ctxt);
28264 printf(" %d", n_node);
28277 test_xmlXIncludeProcessTree(void) {
28280 #if defined(LIBXML_XINCLUDE_ENABLED)
28283 xmlNodePtr tree; /* a node in an XML document */
28286 for (n_tree = 0;n_tree < gen_nb_xmlNodePtr;n_tree++) {
28287 mem_base = xmlMemBlocks();
28288 tree = gen_xmlNodePtr(n_tree, 0);
28290 ret_val = xmlXIncludeProcessTree(tree);
28291 desret_int(ret_val);
28293 des_xmlNodePtr(n_tree, tree, 0);
28294 xmlResetLastError();
28295 if (mem_base != xmlMemBlocks()) {
28296 printf("Leak of %d blocks found in xmlXIncludeProcessTree",
28297 xmlMemBlocks() - mem_base);
28299 printf(" %d", n_tree);
28311 test_xmlXIncludeProcessTreeFlags(void) {
28314 #if defined(LIBXML_XINCLUDE_ENABLED)
28317 xmlNodePtr tree; /* a node in an XML document */
28319 int flags; /* a set of xmlParserOption used for parsing XML includes */
28322 for (n_tree = 0;n_tree < gen_nb_xmlNodePtr;n_tree++) {
28323 for (n_flags = 0;n_flags < gen_nb_int;n_flags++) {
28324 mem_base = xmlMemBlocks();
28325 tree = gen_xmlNodePtr(n_tree, 0);
28326 flags = gen_int(n_flags, 1);
28328 ret_val = xmlXIncludeProcessTreeFlags(tree, flags);
28329 desret_int(ret_val);
28331 des_xmlNodePtr(n_tree, tree, 0);
28332 des_int(n_flags, flags, 1);
28333 xmlResetLastError();
28334 if (mem_base != xmlMemBlocks()) {
28335 printf("Leak of %d blocks found in xmlXIncludeProcessTreeFlags",
28336 xmlMemBlocks() - mem_base);
28338 printf(" %d", n_tree);
28339 printf(" %d", n_flags);
28352 test_xmlXIncludeProcessTreeFlagsData(void) {
28355 #if defined(LIBXML_XINCLUDE_ENABLED)
28358 xmlNodePtr tree; /* an XML node */
28360 int flags; /* a set of xmlParserOption used for parsing XML includes */
28362 void * data; /* application data that will be passed to the parser context in the _private field of the parser context(s) */
28365 for (n_tree = 0;n_tree < gen_nb_xmlNodePtr;n_tree++) {
28366 for (n_flags = 0;n_flags < gen_nb_int;n_flags++) {
28367 for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
28368 mem_base = xmlMemBlocks();
28369 tree = gen_xmlNodePtr(n_tree, 0);
28370 flags = gen_int(n_flags, 1);
28371 data = gen_userdata(n_data, 2);
28373 ret_val = xmlXIncludeProcessTreeFlagsData(tree, flags, data);
28374 desret_int(ret_val);
28376 des_xmlNodePtr(n_tree, tree, 0);
28377 des_int(n_flags, flags, 1);
28378 des_userdata(n_data, data, 2);
28379 xmlResetLastError();
28380 if (mem_base != xmlMemBlocks()) {
28381 printf("Leak of %d blocks found in xmlXIncludeProcessTreeFlagsData",
28382 xmlMemBlocks() - mem_base);
28384 printf(" %d", n_tree);
28385 printf(" %d", n_flags);
28386 printf(" %d", n_data);
28400 test_xmlXIncludeSetFlags(void) {
28403 #if defined(LIBXML_XINCLUDE_ENABLED)
28406 xmlXIncludeCtxtPtr ctxt; /* an XInclude processing context */
28408 int flags; /* a set of xmlParserOption used for parsing XML includes */
28411 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXIncludeCtxtPtr;n_ctxt++) {
28412 for (n_flags = 0;n_flags < gen_nb_int;n_flags++) {
28413 mem_base = xmlMemBlocks();
28414 ctxt = gen_xmlXIncludeCtxtPtr(n_ctxt, 0);
28415 flags = gen_int(n_flags, 1);
28417 ret_val = xmlXIncludeSetFlags(ctxt, flags);
28418 desret_int(ret_val);
28420 des_xmlXIncludeCtxtPtr(n_ctxt, ctxt, 0);
28421 des_int(n_flags, flags, 1);
28422 xmlResetLastError();
28423 if (mem_base != xmlMemBlocks()) {
28424 printf("Leak of %d blocks found in xmlXIncludeSetFlags",
28425 xmlMemBlocks() - mem_base);
28427 printf(" %d", n_ctxt);
28428 printf(" %d", n_flags);
28440 test_xinclude(void) {
28444 if (quiet == 0) printf("Testing xinclude : 8 of 10 functions ...\n");
28445 rc = test_xmlXIncludeNewContext();
28446 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28447 rc = test_xmlXIncludeProcess();
28448 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28449 rc = test_xmlXIncludeProcessFlags();
28450 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28451 rc = test_xmlXIncludeProcessFlagsData();
28452 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28453 rc = test_xmlXIncludeProcessNode();
28454 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28455 rc = test_xmlXIncludeProcessTree();
28456 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28457 rc = test_xmlXIncludeProcessTreeFlags();
28458 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28459 rc = test_xmlXIncludeProcessTreeFlagsData();
28460 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28461 rc = test_xmlXIncludeSetFlags();
28462 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28465 printf("Module xinclude: %d errors\n", test_ret);
28470 test_xmlAllocOutputBuffer(void) {
28473 #if defined(LIBXML_OUTPUT_ENABLED)
28475 xmlOutputBufferPtr ret_val;
28476 xmlCharEncodingHandlerPtr encoder; /* the encoding converter or NULL */
28479 for (n_encoder = 0;n_encoder < gen_nb_xmlCharEncodingHandlerPtr;n_encoder++) {
28480 mem_base = xmlMemBlocks();
28481 encoder = gen_xmlCharEncodingHandlerPtr(n_encoder, 0);
28483 ret_val = xmlAllocOutputBuffer(encoder);
28484 desret_xmlOutputBufferPtr(ret_val);
28486 des_xmlCharEncodingHandlerPtr(n_encoder, encoder, 0);
28487 xmlResetLastError();
28488 if (mem_base != xmlMemBlocks()) {
28489 printf("Leak of %d blocks found in xmlAllocOutputBuffer",
28490 xmlMemBlocks() - mem_base);
28492 printf(" %d", n_encoder);
28504 test_xmlAllocParserInputBuffer(void) {
28508 xmlParserInputBufferPtr ret_val;
28509 xmlCharEncoding enc; /* the charset encoding if known */
28512 for (n_enc = 0;n_enc < gen_nb_xmlCharEncoding;n_enc++) {
28513 mem_base = xmlMemBlocks();
28514 enc = gen_xmlCharEncoding(n_enc, 0);
28516 ret_val = xmlAllocParserInputBuffer(enc);
28517 desret_xmlParserInputBufferPtr(ret_val);
28519 des_xmlCharEncoding(n_enc, enc, 0);
28520 xmlResetLastError();
28521 if (mem_base != xmlMemBlocks()) {
28522 printf("Leak of %d blocks found in xmlAllocParserInputBuffer",
28523 xmlMemBlocks() - mem_base);
28525 printf(" %d", n_enc);
28536 test_xmlCheckFilename(void) {
28541 char * path; /* the path to check */
28544 for (n_path = 0;n_path < gen_nb_const_char_ptr;n_path++) {
28545 mem_base = xmlMemBlocks();
28546 path = gen_const_char_ptr(n_path, 0);
28548 ret_val = xmlCheckFilename((const char *)path);
28549 desret_int(ret_val);
28551 des_const_char_ptr(n_path, (const char *)path, 0);
28552 xmlResetLastError();
28553 if (mem_base != xmlMemBlocks()) {
28554 printf("Leak of %d blocks found in xmlCheckFilename",
28555 xmlMemBlocks() - mem_base);
28557 printf(" %d", n_path);
28568 test_xmlCheckHTTPInput(void) {
28572 xmlParserInputPtr ret_val;
28573 xmlParserCtxtPtr ctxt; /* an XML parser context */
28575 xmlParserInputPtr ret; /* an XML parser input */
28578 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
28579 for (n_ret = 0;n_ret < gen_nb_xmlParserInputPtr;n_ret++) {
28580 mem_base = xmlMemBlocks();
28581 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
28582 ret = gen_xmlParserInputPtr(n_ret, 1);
28584 ret_val = xmlCheckHTTPInput(ctxt, ret);
28585 desret_xmlParserInputPtr(ret_val);
28587 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
28588 des_xmlParserInputPtr(n_ret, ret, 1);
28589 xmlResetLastError();
28590 if (mem_base != xmlMemBlocks()) {
28591 printf("Leak of %d blocks found in xmlCheckHTTPInput",
28592 xmlMemBlocks() - mem_base);
28594 printf(" %d", n_ctxt);
28595 printf(" %d", n_ret);
28607 test_xmlCleanupInputCallbacks(void) {
28612 mem_base = xmlMemBlocks();
28614 xmlCleanupInputCallbacks();
28616 xmlResetLastError();
28617 if (mem_base != xmlMemBlocks()) {
28618 printf("Leak of %d blocks found in xmlCleanupInputCallbacks",
28619 xmlMemBlocks() - mem_base);
28630 test_xmlCleanupOutputCallbacks(void) {
28633 #if defined(LIBXML_OUTPUT_ENABLED)
28636 mem_base = xmlMemBlocks();
28638 xmlCleanupOutputCallbacks();
28640 xmlResetLastError();
28641 if (mem_base != xmlMemBlocks()) {
28642 printf("Leak of %d blocks found in xmlCleanupOutputCallbacks",
28643 xmlMemBlocks() - mem_base);
28655 test_xmlFileClose(void) {
28660 void * context; /* the I/O context */
28663 for (n_context = 0;n_context < gen_nb_void_ptr;n_context++) {
28664 mem_base = xmlMemBlocks();
28665 context = gen_void_ptr(n_context, 0);
28667 ret_val = xmlFileClose(context);
28668 desret_int(ret_val);
28670 des_void_ptr(n_context, context, 0);
28671 xmlResetLastError();
28672 if (mem_base != xmlMemBlocks()) {
28673 printf("Leak of %d blocks found in xmlFileClose",
28674 xmlMemBlocks() - mem_base);
28676 printf(" %d", n_context);
28687 test_xmlFileMatch(void) {
28692 const char * filename; /* the URI for matching */
28695 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
28696 mem_base = xmlMemBlocks();
28697 filename = gen_filepath(n_filename, 0);
28699 ret_val = xmlFileMatch(filename);
28700 desret_int(ret_val);
28702 des_filepath(n_filename, filename, 0);
28703 xmlResetLastError();
28704 if (mem_base != xmlMemBlocks()) {
28705 printf("Leak of %d blocks found in xmlFileMatch",
28706 xmlMemBlocks() - mem_base);
28708 printf(" %d", n_filename);
28719 test_xmlFileOpen(void) {
28724 const char * filename; /* the URI for matching */
28727 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
28728 mem_base = xmlMemBlocks();
28729 filename = gen_filepath(n_filename, 0);
28731 ret_val = xmlFileOpen(filename);
28732 desret_void_ptr(ret_val);
28734 des_filepath(n_filename, filename, 0);
28735 xmlResetLastError();
28736 if (mem_base != xmlMemBlocks()) {
28737 printf("Leak of %d blocks found in xmlFileOpen",
28738 xmlMemBlocks() - mem_base);
28740 printf(" %d", n_filename);
28751 test_xmlFileRead(void) {
28756 void * context; /* the I/O context */
28758 char * buffer; /* where to drop data */
28760 int len; /* number of bytes to write */
28763 for (n_context = 0;n_context < gen_nb_void_ptr;n_context++) {
28764 for (n_buffer = 0;n_buffer < gen_nb_char_ptr;n_buffer++) {
28765 for (n_len = 0;n_len < gen_nb_int;n_len++) {
28766 mem_base = xmlMemBlocks();
28767 context = gen_void_ptr(n_context, 0);
28768 buffer = gen_char_ptr(n_buffer, 1);
28769 len = gen_int(n_len, 2);
28771 ret_val = xmlFileRead(context, buffer, len);
28772 desret_int(ret_val);
28774 des_void_ptr(n_context, context, 0);
28775 des_char_ptr(n_buffer, buffer, 1);
28776 des_int(n_len, len, 2);
28777 xmlResetLastError();
28778 if (mem_base != xmlMemBlocks()) {
28779 printf("Leak of %d blocks found in xmlFileRead",
28780 xmlMemBlocks() - mem_base);
28782 printf(" %d", n_context);
28783 printf(" %d", n_buffer);
28784 printf(" %d", n_len);
28797 test_xmlIOFTPClose(void) {
28800 #if defined(LIBXML_FTP_ENABLED)
28803 void * context; /* the I/O context */
28806 for (n_context = 0;n_context < gen_nb_void_ptr;n_context++) {
28807 mem_base = xmlMemBlocks();
28808 context = gen_void_ptr(n_context, 0);
28810 ret_val = xmlIOFTPClose(context);
28811 desret_int(ret_val);
28813 des_void_ptr(n_context, context, 0);
28814 xmlResetLastError();
28815 if (mem_base != xmlMemBlocks()) {
28816 printf("Leak of %d blocks found in xmlIOFTPClose",
28817 xmlMemBlocks() - mem_base);
28819 printf(" %d", n_context);
28831 test_xmlIOFTPMatch(void) {
28834 #if defined(LIBXML_FTP_ENABLED)
28837 const char * filename; /* the URI for matching */
28840 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
28841 mem_base = xmlMemBlocks();
28842 filename = gen_filepath(n_filename, 0);
28844 ret_val = xmlIOFTPMatch(filename);
28845 desret_int(ret_val);
28847 des_filepath(n_filename, filename, 0);
28848 xmlResetLastError();
28849 if (mem_base != xmlMemBlocks()) {
28850 printf("Leak of %d blocks found in xmlIOFTPMatch",
28851 xmlMemBlocks() - mem_base);
28853 printf(" %d", n_filename);
28865 test_xmlIOFTPOpen(void) {
28868 #if defined(LIBXML_FTP_ENABLED)
28871 const char * filename; /* the URI for matching */
28874 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
28875 mem_base = xmlMemBlocks();
28876 filename = gen_filepath(n_filename, 0);
28878 ret_val = xmlIOFTPOpen(filename);
28879 desret_void_ptr(ret_val);
28881 des_filepath(n_filename, filename, 0);
28882 xmlResetLastError();
28883 if (mem_base != xmlMemBlocks()) {
28884 printf("Leak of %d blocks found in xmlIOFTPOpen",
28885 xmlMemBlocks() - mem_base);
28887 printf(" %d", n_filename);
28899 test_xmlIOFTPRead(void) {
28902 #if defined(LIBXML_FTP_ENABLED)
28905 void * context; /* the I/O context */
28907 char * buffer; /* where to drop data */
28909 int len; /* number of bytes to write */
28912 for (n_context = 0;n_context < gen_nb_void_ptr;n_context++) {
28913 for (n_buffer = 0;n_buffer < gen_nb_char_ptr;n_buffer++) {
28914 for (n_len = 0;n_len < gen_nb_int;n_len++) {
28915 mem_base = xmlMemBlocks();
28916 context = gen_void_ptr(n_context, 0);
28917 buffer = gen_char_ptr(n_buffer, 1);
28918 len = gen_int(n_len, 2);
28920 ret_val = xmlIOFTPRead(context, buffer, len);
28921 desret_int(ret_val);
28923 des_void_ptr(n_context, context, 0);
28924 des_char_ptr(n_buffer, buffer, 1);
28925 des_int(n_len, len, 2);
28926 xmlResetLastError();
28927 if (mem_base != xmlMemBlocks()) {
28928 printf("Leak of %d blocks found in xmlIOFTPRead",
28929 xmlMemBlocks() - mem_base);
28931 printf(" %d", n_context);
28932 printf(" %d", n_buffer);
28933 printf(" %d", n_len);
28947 test_xmlIOHTTPClose(void) {
28950 #if defined(LIBXML_HTTP_ENABLED)
28953 void * context; /* the I/O context */
28956 for (n_context = 0;n_context < gen_nb_void_ptr;n_context++) {
28957 mem_base = xmlMemBlocks();
28958 context = gen_void_ptr(n_context, 0);
28960 ret_val = xmlIOHTTPClose(context);
28961 desret_int(ret_val);
28963 des_void_ptr(n_context, context, 0);
28964 xmlResetLastError();
28965 if (mem_base != xmlMemBlocks()) {
28966 printf("Leak of %d blocks found in xmlIOHTTPClose",
28967 xmlMemBlocks() - mem_base);
28969 printf(" %d", n_context);
28981 test_xmlIOHTTPMatch(void) {
28984 #if defined(LIBXML_HTTP_ENABLED)
28987 const char * filename; /* the URI for matching */
28990 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
28991 mem_base = xmlMemBlocks();
28992 filename = gen_filepath(n_filename, 0);
28994 ret_val = xmlIOHTTPMatch(filename);
28995 desret_int(ret_val);
28997 des_filepath(n_filename, filename, 0);
28998 xmlResetLastError();
28999 if (mem_base != xmlMemBlocks()) {
29000 printf("Leak of %d blocks found in xmlIOHTTPMatch",
29001 xmlMemBlocks() - mem_base);
29003 printf(" %d", n_filename);
29015 test_xmlIOHTTPOpen(void) {
29018 #if defined(LIBXML_HTTP_ENABLED)
29021 const char * filename; /* the URI for matching */
29024 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
29025 mem_base = xmlMemBlocks();
29026 filename = gen_filepath(n_filename, 0);
29028 ret_val = xmlIOHTTPOpen(filename);
29029 desret_xmlNanoHTTPCtxtPtr(ret_val);
29031 des_filepath(n_filename, filename, 0);
29032 xmlResetLastError();
29033 if (mem_base != xmlMemBlocks()) {
29034 printf("Leak of %d blocks found in xmlIOHTTPOpen",
29035 xmlMemBlocks() - mem_base);
29037 printf(" %d", n_filename);
29049 test_xmlIOHTTPRead(void) {
29052 #if defined(LIBXML_HTTP_ENABLED)
29055 void * context; /* the I/O context */
29057 char * buffer; /* where to drop data */
29059 int len; /* number of bytes to write */
29062 for (n_context = 0;n_context < gen_nb_void_ptr;n_context++) {
29063 for (n_buffer = 0;n_buffer < gen_nb_char_ptr;n_buffer++) {
29064 for (n_len = 0;n_len < gen_nb_int;n_len++) {
29065 mem_base = xmlMemBlocks();
29066 context = gen_void_ptr(n_context, 0);
29067 buffer = gen_char_ptr(n_buffer, 1);
29068 len = gen_int(n_len, 2);
29070 ret_val = xmlIOHTTPRead(context, buffer, len);
29071 desret_int(ret_val);
29073 des_void_ptr(n_context, context, 0);
29074 des_char_ptr(n_buffer, buffer, 1);
29075 des_int(n_len, len, 2);
29076 xmlResetLastError();
29077 if (mem_base != xmlMemBlocks()) {
29078 printf("Leak of %d blocks found in xmlIOHTTPRead",
29079 xmlMemBlocks() - mem_base);
29081 printf(" %d", n_context);
29082 printf(" %d", n_buffer);
29083 printf(" %d", n_len);
29097 test_xmlNoNetExternalEntityLoader(void) {
29101 xmlParserInputPtr ret_val;
29102 const char * URL; /* the URL for the entity to load */
29104 char * ID; /* the System ID for the entity to load */
29106 xmlParserCtxtPtr ctxt; /* the context in which the entity is called or NULL */
29109 for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
29110 for (n_ID = 0;n_ID < gen_nb_const_char_ptr;n_ID++) {
29111 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
29112 mem_base = xmlMemBlocks();
29113 URL = gen_filepath(n_URL, 0);
29114 ID = gen_const_char_ptr(n_ID, 1);
29115 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 2);
29117 ret_val = xmlNoNetExternalEntityLoader(URL, (const char *)ID, ctxt);
29118 desret_xmlParserInputPtr(ret_val);
29120 des_filepath(n_URL, URL, 0);
29121 des_const_char_ptr(n_ID, (const char *)ID, 1);
29122 des_xmlParserCtxtPtr(n_ctxt, ctxt, 2);
29123 xmlResetLastError();
29124 if (mem_base != xmlMemBlocks()) {
29125 printf("Leak of %d blocks found in xmlNoNetExternalEntityLoader",
29126 xmlMemBlocks() - mem_base);
29128 printf(" %d", n_URL);
29129 printf(" %d", n_ID);
29130 printf(" %d", n_ctxt);
29143 test_xmlNormalizeWindowsPath(void) {
29148 xmlChar * path; /* the input file path */
29151 for (n_path = 0;n_path < gen_nb_const_xmlChar_ptr;n_path++) {
29152 mem_base = xmlMemBlocks();
29153 path = gen_const_xmlChar_ptr(n_path, 0);
29155 ret_val = xmlNormalizeWindowsPath((const xmlChar *)path);
29156 desret_xmlChar_ptr(ret_val);
29158 des_const_xmlChar_ptr(n_path, (const xmlChar *)path, 0);
29159 xmlResetLastError();
29160 if (mem_base != xmlMemBlocks()) {
29161 printf("Leak of %d blocks found in xmlNormalizeWindowsPath",
29162 xmlMemBlocks() - mem_base);
29164 printf(" %d", n_path);
29175 test_xmlOutputBufferCreateBuffer(void) {
29178 #if defined(LIBXML_OUTPUT_ENABLED)
29180 xmlOutputBufferPtr ret_val;
29181 xmlBufferPtr buffer; /* a xmlBufferPtr */
29183 xmlCharEncodingHandlerPtr encoder; /* the encoding converter or NULL */
29186 for (n_buffer = 0;n_buffer < gen_nb_xmlBufferPtr;n_buffer++) {
29187 for (n_encoder = 0;n_encoder < gen_nb_xmlCharEncodingHandlerPtr;n_encoder++) {
29188 mem_base = xmlMemBlocks();
29189 buffer = gen_xmlBufferPtr(n_buffer, 0);
29190 encoder = gen_xmlCharEncodingHandlerPtr(n_encoder, 1);
29192 ret_val = xmlOutputBufferCreateBuffer(buffer, encoder);
29193 desret_xmlOutputBufferPtr(ret_val);
29195 des_xmlBufferPtr(n_buffer, buffer, 0);
29196 des_xmlCharEncodingHandlerPtr(n_encoder, encoder, 1);
29197 xmlResetLastError();
29198 if (mem_base != xmlMemBlocks()) {
29199 printf("Leak of %d blocks found in xmlOutputBufferCreateBuffer",
29200 xmlMemBlocks() - mem_base);
29202 printf(" %d", n_buffer);
29203 printf(" %d", n_encoder);
29216 test_xmlOutputBufferCreateFd(void) {
29219 #if defined(LIBXML_OUTPUT_ENABLED)
29221 xmlOutputBufferPtr ret_val;
29222 int fd; /* a file descriptor number */
29224 xmlCharEncodingHandlerPtr encoder; /* the encoding converter or NULL */
29227 for (n_fd = 0;n_fd < gen_nb_int;n_fd++) {
29228 for (n_encoder = 0;n_encoder < gen_nb_xmlCharEncodingHandlerPtr;n_encoder++) {
29229 mem_base = xmlMemBlocks();
29230 fd = gen_int(n_fd, 0);
29231 encoder = gen_xmlCharEncodingHandlerPtr(n_encoder, 1);
29233 ret_val = xmlOutputBufferCreateFd(fd, encoder);
29234 desret_xmlOutputBufferPtr(ret_val);
29236 des_int(n_fd, fd, 0);
29237 des_xmlCharEncodingHandlerPtr(n_encoder, encoder, 1);
29238 xmlResetLastError();
29239 if (mem_base != xmlMemBlocks()) {
29240 printf("Leak of %d blocks found in xmlOutputBufferCreateFd",
29241 xmlMemBlocks() - mem_base);
29243 printf(" %d", n_fd);
29244 printf(" %d", n_encoder);
29257 test_xmlOutputBufferCreateFile(void) {
29260 #if defined(LIBXML_OUTPUT_ENABLED)
29262 xmlOutputBufferPtr ret_val;
29263 FILE * file; /* a FILE* */
29265 xmlCharEncodingHandlerPtr encoder; /* the encoding converter or NULL */
29268 for (n_file = 0;n_file < gen_nb_FILE_ptr;n_file++) {
29269 for (n_encoder = 0;n_encoder < gen_nb_xmlCharEncodingHandlerPtr;n_encoder++) {
29270 mem_base = xmlMemBlocks();
29271 file = gen_FILE_ptr(n_file, 0);
29272 encoder = gen_xmlCharEncodingHandlerPtr(n_encoder, 1);
29274 ret_val = xmlOutputBufferCreateFile(file, encoder);
29275 desret_xmlOutputBufferPtr(ret_val);
29277 des_FILE_ptr(n_file, file, 0);
29278 des_xmlCharEncodingHandlerPtr(n_encoder, encoder, 1);
29279 xmlResetLastError();
29280 if (mem_base != xmlMemBlocks()) {
29281 printf("Leak of %d blocks found in xmlOutputBufferCreateFile",
29282 xmlMemBlocks() - mem_base);
29284 printf(" %d", n_file);
29285 printf(" %d", n_encoder);
29298 test_xmlOutputBufferCreateFilename(void) {
29301 #if defined(LIBXML_OUTPUT_ENABLED)
29303 xmlOutputBufferPtr ret_val;
29304 const char * URI; /* a C string containing the URI or filename */
29306 xmlCharEncodingHandlerPtr encoder; /* the encoding converter or NULL */
29308 int compression; /* the compression ration (0 none, 9 max). */
29311 for (n_URI = 0;n_URI < gen_nb_fileoutput;n_URI++) {
29312 for (n_encoder = 0;n_encoder < gen_nb_xmlCharEncodingHandlerPtr;n_encoder++) {
29313 for (n_compression = 0;n_compression < gen_nb_int;n_compression++) {
29314 mem_base = xmlMemBlocks();
29315 URI = gen_fileoutput(n_URI, 0);
29316 encoder = gen_xmlCharEncodingHandlerPtr(n_encoder, 1);
29317 compression = gen_int(n_compression, 2);
29319 ret_val = xmlOutputBufferCreateFilename(URI, encoder, compression);
29320 desret_xmlOutputBufferPtr(ret_val);
29322 des_fileoutput(n_URI, URI, 0);
29323 des_xmlCharEncodingHandlerPtr(n_encoder, encoder, 1);
29324 des_int(n_compression, compression, 2);
29325 xmlResetLastError();
29326 if (mem_base != xmlMemBlocks()) {
29327 printf("Leak of %d blocks found in xmlOutputBufferCreateFilename",
29328 xmlMemBlocks() - mem_base);
29330 printf(" %d", n_URI);
29331 printf(" %d", n_encoder);
29332 printf(" %d", n_compression);
29346 test_xmlOutputBufferFlush(void) {
29349 #if defined(LIBXML_OUTPUT_ENABLED)
29352 xmlOutputBufferPtr out; /* a buffered output */
29355 for (n_out = 0;n_out < gen_nb_xmlOutputBufferPtr;n_out++) {
29356 mem_base = xmlMemBlocks();
29357 out = gen_xmlOutputBufferPtr(n_out, 0);
29359 ret_val = xmlOutputBufferFlush(out);
29360 desret_int(ret_val);
29362 des_xmlOutputBufferPtr(n_out, out, 0);
29363 xmlResetLastError();
29364 if (mem_base != xmlMemBlocks()) {
29365 printf("Leak of %d blocks found in xmlOutputBufferFlush",
29366 xmlMemBlocks() - mem_base);
29368 printf(" %d", n_out);
29380 test_xmlOutputBufferGetContent(void) {
29383 #if defined(LIBXML_OUTPUT_ENABLED)
29385 const xmlChar * ret_val;
29386 xmlOutputBufferPtr out; /* an xmlOutputBufferPtr */
29389 for (n_out = 0;n_out < gen_nb_xmlOutputBufferPtr;n_out++) {
29390 mem_base = xmlMemBlocks();
29391 out = gen_xmlOutputBufferPtr(n_out, 0);
29393 ret_val = xmlOutputBufferGetContent(out);
29394 desret_const_xmlChar_ptr(ret_val);
29396 des_xmlOutputBufferPtr(n_out, out, 0);
29397 xmlResetLastError();
29398 if (mem_base != xmlMemBlocks()) {
29399 printf("Leak of %d blocks found in xmlOutputBufferGetContent",
29400 xmlMemBlocks() - mem_base);
29402 printf(" %d", n_out);
29414 test_xmlOutputBufferGetSize(void) {
29418 /* missing type support */
29424 test_xmlOutputBufferWrite(void) {
29427 #if defined(LIBXML_OUTPUT_ENABLED)
29430 xmlOutputBufferPtr out; /* a buffered parser output */
29432 int len; /* the size in bytes of the array. */
29434 char * buf; /* an char array */
29437 for (n_out = 0;n_out < gen_nb_xmlOutputBufferPtr;n_out++) {
29438 for (n_len = 0;n_len < gen_nb_int;n_len++) {
29439 for (n_buf = 0;n_buf < gen_nb_const_char_ptr;n_buf++) {
29440 mem_base = xmlMemBlocks();
29441 out = gen_xmlOutputBufferPtr(n_out, 0);
29442 len = gen_int(n_len, 1);
29443 buf = gen_const_char_ptr(n_buf, 2);
29444 if ((buf != NULL) &&
29445 (len > (int) strlen((const char *) buf) + 1))
29448 ret_val = xmlOutputBufferWrite(out, len, (const char *)buf);
29449 desret_int(ret_val);
29451 des_xmlOutputBufferPtr(n_out, out, 0);
29452 des_int(n_len, len, 1);
29453 des_const_char_ptr(n_buf, (const char *)buf, 2);
29454 xmlResetLastError();
29455 if (mem_base != xmlMemBlocks()) {
29456 printf("Leak of %d blocks found in xmlOutputBufferWrite",
29457 xmlMemBlocks() - mem_base);
29459 printf(" %d", n_out);
29460 printf(" %d", n_len);
29461 printf(" %d", n_buf);
29475 test_xmlOutputBufferWriteEscape(void) {
29479 /* missing type support */
29485 test_xmlOutputBufferWriteString(void) {
29488 #if defined(LIBXML_OUTPUT_ENABLED)
29491 xmlOutputBufferPtr out; /* a buffered parser output */
29493 char * str; /* a zero terminated C string */
29496 for (n_out = 0;n_out < gen_nb_xmlOutputBufferPtr;n_out++) {
29497 for (n_str = 0;n_str < gen_nb_const_char_ptr;n_str++) {
29498 mem_base = xmlMemBlocks();
29499 out = gen_xmlOutputBufferPtr(n_out, 0);
29500 str = gen_const_char_ptr(n_str, 1);
29502 ret_val = xmlOutputBufferWriteString(out, (const char *)str);
29503 desret_int(ret_val);
29505 des_xmlOutputBufferPtr(n_out, out, 0);
29506 des_const_char_ptr(n_str, (const char *)str, 1);
29507 xmlResetLastError();
29508 if (mem_base != xmlMemBlocks()) {
29509 printf("Leak of %d blocks found in xmlOutputBufferWriteString",
29510 xmlMemBlocks() - mem_base);
29512 printf(" %d", n_out);
29513 printf(" %d", n_str);
29526 test_xmlParserGetDirectory(void) {
29530 /* missing type support */
29536 test_xmlParserInputBufferCreateFd(void) {
29540 xmlParserInputBufferPtr ret_val;
29541 int fd; /* a file descriptor number */
29543 xmlCharEncoding enc; /* the charset encoding if known */
29546 for (n_fd = 0;n_fd < gen_nb_int;n_fd++) {
29547 for (n_enc = 0;n_enc < gen_nb_xmlCharEncoding;n_enc++) {
29548 mem_base = xmlMemBlocks();
29549 fd = gen_int(n_fd, 0);
29550 enc = gen_xmlCharEncoding(n_enc, 1);
29551 if (fd >= 0) fd = -1;
29553 ret_val = xmlParserInputBufferCreateFd(fd, enc);
29554 desret_xmlParserInputBufferPtr(ret_val);
29556 des_int(n_fd, fd, 0);
29557 des_xmlCharEncoding(n_enc, enc, 1);
29558 xmlResetLastError();
29559 if (mem_base != xmlMemBlocks()) {
29560 printf("Leak of %d blocks found in xmlParserInputBufferCreateFd",
29561 xmlMemBlocks() - mem_base);
29563 printf(" %d", n_fd);
29564 printf(" %d", n_enc);
29576 test_xmlParserInputBufferCreateFile(void) {
29580 xmlParserInputBufferPtr ret_val;
29581 FILE * file; /* a FILE* */
29583 xmlCharEncoding enc; /* the charset encoding if known */
29586 for (n_file = 0;n_file < gen_nb_FILE_ptr;n_file++) {
29587 for (n_enc = 0;n_enc < gen_nb_xmlCharEncoding;n_enc++) {
29588 mem_base = xmlMemBlocks();
29589 file = gen_FILE_ptr(n_file, 0);
29590 enc = gen_xmlCharEncoding(n_enc, 1);
29592 ret_val = xmlParserInputBufferCreateFile(file, enc);
29593 desret_xmlParserInputBufferPtr(ret_val);
29595 des_FILE_ptr(n_file, file, 0);
29596 des_xmlCharEncoding(n_enc, enc, 1);
29597 xmlResetLastError();
29598 if (mem_base != xmlMemBlocks()) {
29599 printf("Leak of %d blocks found in xmlParserInputBufferCreateFile",
29600 xmlMemBlocks() - mem_base);
29602 printf(" %d", n_file);
29603 printf(" %d", n_enc);
29615 test_xmlParserInputBufferCreateFilename(void) {
29619 xmlParserInputBufferPtr ret_val;
29620 const char * URI; /* a C string containing the URI or filename */
29622 xmlCharEncoding enc; /* the charset encoding if known */
29625 for (n_URI = 0;n_URI < gen_nb_fileoutput;n_URI++) {
29626 for (n_enc = 0;n_enc < gen_nb_xmlCharEncoding;n_enc++) {
29627 mem_base = xmlMemBlocks();
29628 URI = gen_fileoutput(n_URI, 0);
29629 enc = gen_xmlCharEncoding(n_enc, 1);
29631 ret_val = xmlParserInputBufferCreateFilename(URI, enc);
29632 desret_xmlParserInputBufferPtr(ret_val);
29634 des_fileoutput(n_URI, URI, 0);
29635 des_xmlCharEncoding(n_enc, enc, 1);
29636 xmlResetLastError();
29637 if (mem_base != xmlMemBlocks()) {
29638 printf("Leak of %d blocks found in xmlParserInputBufferCreateFilename",
29639 xmlMemBlocks() - mem_base);
29641 printf(" %d", n_URI);
29642 printf(" %d", n_enc);
29654 test_xmlParserInputBufferCreateMem(void) {
29658 xmlParserInputBufferPtr ret_val;
29659 char * mem; /* the memory input */
29661 int size; /* the length of the memory block */
29663 xmlCharEncoding enc; /* the charset encoding if known */
29666 for (n_mem = 0;n_mem < gen_nb_const_char_ptr;n_mem++) {
29667 for (n_size = 0;n_size < gen_nb_int;n_size++) {
29668 for (n_enc = 0;n_enc < gen_nb_xmlCharEncoding;n_enc++) {
29669 mem_base = xmlMemBlocks();
29670 mem = gen_const_char_ptr(n_mem, 0);
29671 size = gen_int(n_size, 1);
29672 enc = gen_xmlCharEncoding(n_enc, 2);
29673 if ((mem != NULL) &&
29674 (size > (int) strlen((const char *) mem) + 1))
29677 ret_val = xmlParserInputBufferCreateMem((const char *)mem, size, enc);
29678 desret_xmlParserInputBufferPtr(ret_val);
29680 des_const_char_ptr(n_mem, (const char *)mem, 0);
29681 des_int(n_size, size, 1);
29682 des_xmlCharEncoding(n_enc, enc, 2);
29683 xmlResetLastError();
29684 if (mem_base != xmlMemBlocks()) {
29685 printf("Leak of %d blocks found in xmlParserInputBufferCreateMem",
29686 xmlMemBlocks() - mem_base);
29688 printf(" %d", n_mem);
29689 printf(" %d", n_size);
29690 printf(" %d", n_enc);
29703 test_xmlParserInputBufferCreateStatic(void) {
29707 xmlParserInputBufferPtr ret_val;
29708 char * mem; /* the memory input */
29710 int size; /* the length of the memory block */
29712 xmlCharEncoding enc; /* the charset encoding if known */
29715 for (n_mem = 0;n_mem < gen_nb_const_char_ptr;n_mem++) {
29716 for (n_size = 0;n_size < gen_nb_int;n_size++) {
29717 for (n_enc = 0;n_enc < gen_nb_xmlCharEncoding;n_enc++) {
29718 mem_base = xmlMemBlocks();
29719 mem = gen_const_char_ptr(n_mem, 0);
29720 size = gen_int(n_size, 1);
29721 enc = gen_xmlCharEncoding(n_enc, 2);
29722 if ((mem != NULL) &&
29723 (size > (int) strlen((const char *) mem) + 1))
29726 ret_val = xmlParserInputBufferCreateStatic((const char *)mem, size, enc);
29727 desret_xmlParserInputBufferPtr(ret_val);
29729 des_const_char_ptr(n_mem, (const char *)mem, 0);
29730 des_int(n_size, size, 1);
29731 des_xmlCharEncoding(n_enc, enc, 2);
29732 xmlResetLastError();
29733 if (mem_base != xmlMemBlocks()) {
29734 printf("Leak of %d blocks found in xmlParserInputBufferCreateStatic",
29735 xmlMemBlocks() - mem_base);
29737 printf(" %d", n_mem);
29738 printf(" %d", n_size);
29739 printf(" %d", n_enc);
29752 test_xmlParserInputBufferGrow(void) {
29757 xmlParserInputBufferPtr in; /* a buffered parser input */
29759 int len; /* indicative value of the amount of chars to read */
29762 for (n_in = 0;n_in < gen_nb_xmlParserInputBufferPtr;n_in++) {
29763 for (n_len = 0;n_len < gen_nb_int;n_len++) {
29764 mem_base = xmlMemBlocks();
29765 in = gen_xmlParserInputBufferPtr(n_in, 0);
29766 len = gen_int(n_len, 1);
29768 ret_val = xmlParserInputBufferGrow(in, len);
29769 desret_int(ret_val);
29771 des_xmlParserInputBufferPtr(n_in, in, 0);
29772 des_int(n_len, len, 1);
29773 xmlResetLastError();
29774 if (mem_base != xmlMemBlocks()) {
29775 printf("Leak of %d blocks found in xmlParserInputBufferGrow",
29776 xmlMemBlocks() - mem_base);
29778 printf(" %d", n_in);
29779 printf(" %d", n_len);
29791 test_xmlParserInputBufferPush(void) {
29796 xmlParserInputBufferPtr in; /* a buffered parser input */
29798 int len; /* the size in bytes of the array. */
29800 char * buf; /* an char array */
29803 for (n_in = 0;n_in < gen_nb_xmlParserInputBufferPtr;n_in++) {
29804 for (n_len = 0;n_len < gen_nb_int;n_len++) {
29805 for (n_buf = 0;n_buf < gen_nb_const_char_ptr;n_buf++) {
29806 mem_base = xmlMemBlocks();
29807 in = gen_xmlParserInputBufferPtr(n_in, 0);
29808 len = gen_int(n_len, 1);
29809 buf = gen_const_char_ptr(n_buf, 2);
29810 if ((buf != NULL) &&
29811 (len > (int) strlen((const char *) buf) + 1))
29814 ret_val = xmlParserInputBufferPush(in, len, (const char *)buf);
29815 desret_int(ret_val);
29817 des_xmlParserInputBufferPtr(n_in, in, 0);
29818 des_int(n_len, len, 1);
29819 des_const_char_ptr(n_buf, (const char *)buf, 2);
29820 xmlResetLastError();
29821 if (mem_base != xmlMemBlocks()) {
29822 printf("Leak of %d blocks found in xmlParserInputBufferPush",
29823 xmlMemBlocks() - mem_base);
29825 printf(" %d", n_in);
29826 printf(" %d", n_len);
29827 printf(" %d", n_buf);
29840 test_xmlParserInputBufferRead(void) {
29845 xmlParserInputBufferPtr in; /* a buffered parser input */
29847 int len; /* indicative value of the amount of chars to read */
29850 for (n_in = 0;n_in < gen_nb_xmlParserInputBufferPtr;n_in++) {
29851 for (n_len = 0;n_len < gen_nb_int;n_len++) {
29852 mem_base = xmlMemBlocks();
29853 in = gen_xmlParserInputBufferPtr(n_in, 0);
29854 len = gen_int(n_len, 1);
29856 ret_val = xmlParserInputBufferRead(in, len);
29857 desret_int(ret_val);
29859 des_xmlParserInputBufferPtr(n_in, in, 0);
29860 des_int(n_len, len, 1);
29861 xmlResetLastError();
29862 if (mem_base != xmlMemBlocks()) {
29863 printf("Leak of %d blocks found in xmlParserInputBufferRead",
29864 xmlMemBlocks() - mem_base);
29866 printf(" %d", n_in);
29867 printf(" %d", n_len);
29879 test_xmlPopInputCallbacks(void) {
29885 mem_base = xmlMemBlocks();
29887 ret_val = xmlPopInputCallbacks();
29888 desret_int(ret_val);
29890 xmlResetLastError();
29891 if (mem_base != xmlMemBlocks()) {
29892 printf("Leak of %d blocks found in xmlPopInputCallbacks",
29893 xmlMemBlocks() - mem_base);
29904 test_xmlRegisterDefaultInputCallbacks(void) {
29909 mem_base = xmlMemBlocks();
29911 xmlRegisterDefaultInputCallbacks();
29913 xmlResetLastError();
29914 if (mem_base != xmlMemBlocks()) {
29915 printf("Leak of %d blocks found in xmlRegisterDefaultInputCallbacks",
29916 xmlMemBlocks() - mem_base);
29927 test_xmlRegisterDefaultOutputCallbacks(void) {
29930 #if defined(LIBXML_OUTPUT_ENABLED)
29933 mem_base = xmlMemBlocks();
29935 xmlRegisterDefaultOutputCallbacks();
29937 xmlResetLastError();
29938 if (mem_base != xmlMemBlocks()) {
29939 printf("Leak of %d blocks found in xmlRegisterDefaultOutputCallbacks",
29940 xmlMemBlocks() - mem_base);
29952 test_xmlRegisterHTTPPostCallbacks(void) {
29955 #if defined(LIBXML_OUTPUT_ENABLED) && defined(LIBXML_HTTP_ENABLED)
29958 mem_base = xmlMemBlocks();
29960 xmlRegisterHTTPPostCallbacks();
29962 xmlResetLastError();
29963 if (mem_base != xmlMemBlocks()) {
29964 printf("Leak of %d blocks found in xmlRegisterHTTPPostCallbacks",
29965 xmlMemBlocks() - mem_base);
29980 if (quiet == 0) printf("Testing xmlIO : 40 of 50 functions ...\n");
29981 rc = test_xmlAllocOutputBuffer();
29982 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29983 rc = test_xmlAllocParserInputBuffer();
29984 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29985 rc = test_xmlCheckFilename();
29986 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29987 rc = test_xmlCheckHTTPInput();
29988 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29989 rc = test_xmlCleanupInputCallbacks();
29990 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29991 rc = test_xmlCleanupOutputCallbacks();
29992 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29993 rc = test_xmlFileClose();
29994 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29995 rc = test_xmlFileMatch();
29996 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29997 rc = test_xmlFileOpen();
29998 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29999 rc = test_xmlFileRead();
30000 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30001 rc = test_xmlIOFTPClose();
30002 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30003 rc = test_xmlIOFTPMatch();
30004 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30005 rc = test_xmlIOFTPOpen();
30006 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30007 rc = test_xmlIOFTPRead();
30008 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30009 rc = test_xmlIOHTTPClose();
30010 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30011 rc = test_xmlIOHTTPMatch();
30012 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30013 rc = test_xmlIOHTTPOpen();
30014 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30015 rc = test_xmlIOHTTPRead();
30016 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30017 rc = test_xmlNoNetExternalEntityLoader();
30018 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30019 rc = test_xmlNormalizeWindowsPath();
30020 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30021 rc = test_xmlOutputBufferCreateBuffer();
30022 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30023 rc = test_xmlOutputBufferCreateFd();
30024 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30025 rc = test_xmlOutputBufferCreateFile();
30026 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30027 rc = test_xmlOutputBufferCreateFilename();
30028 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30029 rc = test_xmlOutputBufferFlush();
30030 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30031 rc = test_xmlOutputBufferGetContent();
30032 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30033 rc = test_xmlOutputBufferGetSize();
30034 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30035 rc = test_xmlOutputBufferWrite();
30036 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30037 rc = test_xmlOutputBufferWriteEscape();
30038 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30039 rc = test_xmlOutputBufferWriteString();
30040 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30041 rc = test_xmlParserGetDirectory();
30042 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30043 rc = test_xmlParserInputBufferCreateFd();
30044 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30045 rc = test_xmlParserInputBufferCreateFile();
30046 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30047 rc = test_xmlParserInputBufferCreateFilename();
30048 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30049 rc = test_xmlParserInputBufferCreateMem();
30050 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30051 rc = test_xmlParserInputBufferCreateStatic();
30052 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30053 rc = test_xmlParserInputBufferGrow();
30054 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30055 rc = test_xmlParserInputBufferPush();
30056 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30057 rc = test_xmlParserInputBufferRead();
30058 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30059 rc = test_xmlPopInputCallbacks();
30060 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30061 rc = test_xmlRegisterDefaultInputCallbacks();
30062 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30063 rc = test_xmlRegisterDefaultOutputCallbacks();
30064 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30065 rc = test_xmlRegisterHTTPPostCallbacks();
30066 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30069 printf("Module xmlIO: %d errors\n", test_ret);
30072 #ifdef LIBXML_AUTOMATA_ENABLED
30074 #define gen_nb_xmlAutomataPtr 1
30075 static xmlAutomataPtr gen_xmlAutomataPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
30078 static void des_xmlAutomataPtr(int no ATTRIBUTE_UNUSED, xmlAutomataPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
30084 test_xmlAutomataCompile(void) {
30088 /* missing type support */
30094 test_xmlAutomataGetInitState(void) {
30098 /* missing type support */
30104 test_xmlAutomataIsDeterminist(void) {
30107 #if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
30110 xmlAutomataPtr am; /* an automata */
30113 for (n_am = 0;n_am < gen_nb_xmlAutomataPtr;n_am++) {
30114 mem_base = xmlMemBlocks();
30115 am = gen_xmlAutomataPtr(n_am, 0);
30117 ret_val = xmlAutomataIsDeterminist(am);
30118 desret_int(ret_val);
30120 des_xmlAutomataPtr(n_am, am, 0);
30121 xmlResetLastError();
30122 if (mem_base != xmlMemBlocks()) {
30123 printf("Leak of %d blocks found in xmlAutomataIsDeterminist",
30124 xmlMemBlocks() - mem_base);
30126 printf(" %d", n_am);
30136 #ifdef LIBXML_AUTOMATA_ENABLED
30138 #define gen_nb_xmlAutomataStatePtr 1
30139 static xmlAutomataStatePtr gen_xmlAutomataStatePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
30142 static void des_xmlAutomataStatePtr(int no ATTRIBUTE_UNUSED, xmlAutomataStatePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
30148 test_xmlAutomataNewAllTrans(void) {
30152 /* missing type support */
30158 test_xmlAutomataNewCountTrans(void) {
30162 /* missing type support */
30168 test_xmlAutomataNewCountTrans2(void) {
30172 /* missing type support */
30178 test_xmlAutomataNewCountedTrans(void) {
30182 /* missing type support */
30188 test_xmlAutomataNewCounter(void) {
30191 #if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
30194 xmlAutomataPtr am; /* an automata */
30196 int min; /* the minimal value on the counter */
30198 int max; /* the maximal value on the counter */
30201 for (n_am = 0;n_am < gen_nb_xmlAutomataPtr;n_am++) {
30202 for (n_min = 0;n_min < gen_nb_int;n_min++) {
30203 for (n_max = 0;n_max < gen_nb_int;n_max++) {
30204 mem_base = xmlMemBlocks();
30205 am = gen_xmlAutomataPtr(n_am, 0);
30206 min = gen_int(n_min, 1);
30207 max = gen_int(n_max, 2);
30209 ret_val = xmlAutomataNewCounter(am, min, max);
30210 desret_int(ret_val);
30212 des_xmlAutomataPtr(n_am, am, 0);
30213 des_int(n_min, min, 1);
30214 des_int(n_max, max, 2);
30215 xmlResetLastError();
30216 if (mem_base != xmlMemBlocks()) {
30217 printf("Leak of %d blocks found in xmlAutomataNewCounter",
30218 xmlMemBlocks() - mem_base);
30220 printf(" %d", n_am);
30221 printf(" %d", n_min);
30222 printf(" %d", n_max);
30236 test_xmlAutomataNewCounterTrans(void) {
30240 /* missing type support */
30246 test_xmlAutomataNewEpsilon(void) {
30250 /* missing type support */
30256 test_xmlAutomataNewNegTrans(void) {
30260 /* missing type support */
30266 test_xmlAutomataNewOnceTrans(void) {
30270 /* missing type support */
30276 test_xmlAutomataNewOnceTrans2(void) {
30280 /* missing type support */
30286 test_xmlAutomataNewState(void) {
30290 /* missing type support */
30296 test_xmlAutomataNewTransition(void) {
30300 /* missing type support */
30306 test_xmlAutomataNewTransition2(void) {
30310 /* missing type support */
30316 test_xmlAutomataSetFinalState(void) {
30319 #if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
30322 xmlAutomataPtr am; /* an automata */
30324 xmlAutomataStatePtr state; /* a state in this automata */
30327 for (n_am = 0;n_am < gen_nb_xmlAutomataPtr;n_am++) {
30328 for (n_state = 0;n_state < gen_nb_xmlAutomataStatePtr;n_state++) {
30329 mem_base = xmlMemBlocks();
30330 am = gen_xmlAutomataPtr(n_am, 0);
30331 state = gen_xmlAutomataStatePtr(n_state, 1);
30333 ret_val = xmlAutomataSetFinalState(am, state);
30334 desret_int(ret_val);
30336 des_xmlAutomataPtr(n_am, am, 0);
30337 des_xmlAutomataStatePtr(n_state, state, 1);
30338 xmlResetLastError();
30339 if (mem_base != xmlMemBlocks()) {
30340 printf("Leak of %d blocks found in xmlAutomataSetFinalState",
30341 xmlMemBlocks() - mem_base);
30343 printf(" %d", n_am);
30344 printf(" %d", n_state);
30357 test_xmlNewAutomata(void) {
30361 /* missing type support */
30366 test_xmlautomata(void) {
30370 if (quiet == 0) printf("Testing xmlautomata : 3 of 19 functions ...\n");
30371 rc = test_xmlAutomataCompile();
30372 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30373 rc = test_xmlAutomataGetInitState();
30374 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30375 rc = test_xmlAutomataIsDeterminist();
30376 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30377 rc = test_xmlAutomataNewAllTrans();
30378 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30379 rc = test_xmlAutomataNewCountTrans();
30380 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30381 rc = test_xmlAutomataNewCountTrans2();
30382 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30383 rc = test_xmlAutomataNewCountedTrans();
30384 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30385 rc = test_xmlAutomataNewCounter();
30386 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30387 rc = test_xmlAutomataNewCounterTrans();
30388 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30389 rc = test_xmlAutomataNewEpsilon();
30390 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30391 rc = test_xmlAutomataNewNegTrans();
30392 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30393 rc = test_xmlAutomataNewOnceTrans();
30394 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30395 rc = test_xmlAutomataNewOnceTrans2();
30396 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30397 rc = test_xmlAutomataNewState();
30398 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30399 rc = test_xmlAutomataNewTransition();
30400 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30401 rc = test_xmlAutomataNewTransition2();
30402 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30403 rc = test_xmlAutomataSetFinalState();
30404 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30405 rc = test_xmlNewAutomata();
30406 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30409 printf("Module xmlautomata: %d errors\n", test_ret);
30413 #define gen_nb_xmlGenericErrorFunc_ptr 1
30414 static xmlGenericErrorFunc * gen_xmlGenericErrorFunc_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
30417 static void des_xmlGenericErrorFunc_ptr(int no ATTRIBUTE_UNUSED, xmlGenericErrorFunc * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
30421 test_initGenericErrorDefaultFunc(void) {
30425 xmlGenericErrorFunc * handler; /* the handler */
30428 for (n_handler = 0;n_handler < gen_nb_xmlGenericErrorFunc_ptr;n_handler++) {
30429 mem_base = xmlMemBlocks();
30430 handler = gen_xmlGenericErrorFunc_ptr(n_handler, 0);
30432 initGenericErrorDefaultFunc(handler);
30434 des_xmlGenericErrorFunc_ptr(n_handler, handler, 0);
30435 xmlResetLastError();
30436 if (mem_base != xmlMemBlocks()) {
30437 printf("Leak of %d blocks found in initGenericErrorDefaultFunc",
30438 xmlMemBlocks() - mem_base);
30440 printf(" %d", n_handler);
30450 #define gen_nb_xmlErrorPtr 1
30451 static xmlErrorPtr gen_xmlErrorPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
30454 static void des_xmlErrorPtr(int no ATTRIBUTE_UNUSED, xmlErrorPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
30458 test_xmlCopyError(void) {
30463 xmlErrorPtr from; /* a source error */
30465 xmlErrorPtr to; /* a target error */
30468 for (n_from = 0;n_from < gen_nb_xmlErrorPtr;n_from++) {
30469 for (n_to = 0;n_to < gen_nb_xmlErrorPtr;n_to++) {
30470 mem_base = xmlMemBlocks();
30471 from = gen_xmlErrorPtr(n_from, 0);
30472 to = gen_xmlErrorPtr(n_to, 1);
30474 ret_val = xmlCopyError(from, to);
30475 desret_int(ret_val);
30477 des_xmlErrorPtr(n_from, from, 0);
30478 des_xmlErrorPtr(n_to, to, 1);
30479 xmlResetLastError();
30480 if (mem_base != xmlMemBlocks()) {
30481 printf("Leak of %d blocks found in xmlCopyError",
30482 xmlMemBlocks() - mem_base);
30484 printf(" %d", n_from);
30485 printf(" %d", n_to);
30497 test_xmlCtxtGetLastError(void) {
30501 /* missing type support */
30507 test_xmlCtxtResetLastError(void) {
30511 void * ctx; /* an XML parser context */
30514 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
30515 mem_base = xmlMemBlocks();
30516 ctx = gen_void_ptr(n_ctx, 0);
30518 xmlCtxtResetLastError(ctx);
30520 des_void_ptr(n_ctx, ctx, 0);
30521 xmlResetLastError();
30522 if (mem_base != xmlMemBlocks()) {
30523 printf("Leak of %d blocks found in xmlCtxtResetLastError",
30524 xmlMemBlocks() - mem_base);
30526 printf(" %d", n_ctx);
30537 test_xmlGetLastError(void) {
30541 /* missing type support */
30547 test_xmlParserError(void) {
30551 /* missing type support */
30557 test_xmlParserPrintFileContext(void) {
30561 xmlParserInputPtr input; /* an xmlParserInputPtr input */
30564 for (n_input = 0;n_input < gen_nb_xmlParserInputPtr;n_input++) {
30565 mem_base = xmlMemBlocks();
30566 input = gen_xmlParserInputPtr(n_input, 0);
30568 xmlParserPrintFileContext(input);
30570 des_xmlParserInputPtr(n_input, input, 0);
30571 xmlResetLastError();
30572 if (mem_base != xmlMemBlocks()) {
30573 printf("Leak of %d blocks found in xmlParserPrintFileContext",
30574 xmlMemBlocks() - mem_base);
30576 printf(" %d", n_input);
30587 test_xmlParserPrintFileInfo(void) {
30591 xmlParserInputPtr input; /* an xmlParserInputPtr input */
30594 for (n_input = 0;n_input < gen_nb_xmlParserInputPtr;n_input++) {
30595 mem_base = xmlMemBlocks();
30596 input = gen_xmlParserInputPtr(n_input, 0);
30598 xmlParserPrintFileInfo(input);
30600 des_xmlParserInputPtr(n_input, input, 0);
30601 xmlResetLastError();
30602 if (mem_base != xmlMemBlocks()) {
30603 printf("Leak of %d blocks found in xmlParserPrintFileInfo",
30604 xmlMemBlocks() - mem_base);
30606 printf(" %d", n_input);
30617 test_xmlParserValidityError(void) {
30621 /* missing type support */
30627 test_xmlParserValidityWarning(void) {
30631 /* missing type support */
30637 test_xmlParserWarning(void) {
30641 /* missing type support */
30647 test_xmlResetError(void) {
30651 xmlErrorPtr err; /* pointer to the error. */
30654 for (n_err = 0;n_err < gen_nb_xmlErrorPtr;n_err++) {
30655 mem_base = xmlMemBlocks();
30656 err = gen_xmlErrorPtr(n_err, 0);
30658 xmlResetError(err);
30660 des_xmlErrorPtr(n_err, err, 0);
30661 xmlResetLastError();
30662 if (mem_base != xmlMemBlocks()) {
30663 printf("Leak of %d blocks found in xmlResetError",
30664 xmlMemBlocks() - mem_base);
30666 printf(" %d", n_err);
30677 test_xmlResetLastError(void) {
30682 xmlResetLastError();
30684 xmlResetLastError();
30692 test_xmlSetGenericErrorFunc(void) {
30696 /* missing type support */
30702 test_xmlSetStructuredErrorFunc(void) {
30706 /* missing type support */
30711 test_xmlerror(void) {
30715 if (quiet == 0) printf("Testing xmlerror : 7 of 15 functions ...\n");
30716 rc = test_initGenericErrorDefaultFunc();
30717 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30718 rc = test_xmlCopyError();
30719 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30720 rc = test_xmlCtxtGetLastError();
30721 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30722 rc = test_xmlCtxtResetLastError();
30723 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30724 rc = test_xmlGetLastError();
30725 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30726 rc = test_xmlParserError();
30727 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30728 rc = test_xmlParserPrintFileContext();
30729 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30730 rc = test_xmlParserPrintFileInfo();
30731 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30732 rc = test_xmlParserValidityError();
30733 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30734 rc = test_xmlParserValidityWarning();
30735 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30736 rc = test_xmlParserWarning();
30737 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30738 rc = test_xmlResetError();
30739 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30740 rc = test_xmlResetLastError();
30741 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30742 rc = test_xmlSetGenericErrorFunc();
30743 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30744 rc = test_xmlSetStructuredErrorFunc();
30745 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30748 printf("Module xmlerror: %d errors\n", test_ret);
30751 #ifdef LIBXML_MODULES_ENABLED
30753 #define gen_nb_xmlModulePtr 1
30754 static xmlModulePtr gen_xmlModulePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
30757 static void des_xmlModulePtr(int no ATTRIBUTE_UNUSED, xmlModulePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
30763 test_xmlModuleClose(void) {
30766 #if defined(LIBXML_MODULES_ENABLED)
30769 xmlModulePtr module; /* the module handle */
30772 for (n_module = 0;n_module < gen_nb_xmlModulePtr;n_module++) {
30773 mem_base = xmlMemBlocks();
30774 module = gen_xmlModulePtr(n_module, 0);
30776 ret_val = xmlModuleClose(module);
30777 desret_int(ret_val);
30779 des_xmlModulePtr(n_module, module, 0);
30780 xmlResetLastError();
30781 if (mem_base != xmlMemBlocks()) {
30782 printf("Leak of %d blocks found in xmlModuleClose",
30783 xmlMemBlocks() - mem_base);
30785 printf(" %d", n_module);
30797 test_xmlModuleOpen(void) {
30801 /* missing type support */
30807 test_xmlModuleSymbol(void) {
30810 #if defined(LIBXML_MODULES_ENABLED)
30813 xmlModulePtr module; /* the module */
30815 char * name; /* the name of the symbol */
30817 void ** symbol; /* the resulting symbol address */
30820 for (n_module = 0;n_module < gen_nb_xmlModulePtr;n_module++) {
30821 for (n_name = 0;n_name < gen_nb_const_char_ptr;n_name++) {
30822 for (n_symbol = 0;n_symbol < gen_nb_void_ptr_ptr;n_symbol++) {
30823 mem_base = xmlMemBlocks();
30824 module = gen_xmlModulePtr(n_module, 0);
30825 name = gen_const_char_ptr(n_name, 1);
30826 symbol = gen_void_ptr_ptr(n_symbol, 2);
30828 ret_val = xmlModuleSymbol(module, (const char *)name, symbol);
30829 desret_int(ret_val);
30831 des_xmlModulePtr(n_module, module, 0);
30832 des_const_char_ptr(n_name, (const char *)name, 1);
30833 des_void_ptr_ptr(n_symbol, symbol, 2);
30834 xmlResetLastError();
30835 if (mem_base != xmlMemBlocks()) {
30836 printf("Leak of %d blocks found in xmlModuleSymbol",
30837 xmlMemBlocks() - mem_base);
30839 printf(" %d", n_module);
30840 printf(" %d", n_name);
30841 printf(" %d", n_symbol);
30854 test_xmlmodule(void) {
30858 if (quiet == 0) printf("Testing xmlmodule : 2 of 4 functions ...\n");
30859 rc = test_xmlModuleClose();
30860 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30861 rc = test_xmlModuleOpen();
30862 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30863 rc = test_xmlModuleSymbol();
30864 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30867 printf("Module xmlmodule: %d errors\n", test_ret);
30872 test_xmlNewTextReader(void) {
30875 #if defined(LIBXML_READER_ENABLED)
30877 xmlTextReaderPtr ret_val;
30878 xmlParserInputBufferPtr input; /* the xmlParserInputBufferPtr used to read data */
30880 const char * URI; /* the URI information for the source if available */
30883 for (n_input = 0;n_input < gen_nb_xmlParserInputBufferPtr;n_input++) {
30884 for (n_URI = 0;n_URI < gen_nb_filepath;n_URI++) {
30885 mem_base = xmlMemBlocks();
30886 input = gen_xmlParserInputBufferPtr(n_input, 0);
30887 URI = gen_filepath(n_URI, 1);
30889 ret_val = xmlNewTextReader(input, URI);
30890 desret_xmlTextReaderPtr(ret_val);
30892 des_xmlParserInputBufferPtr(n_input, input, 0);
30893 des_filepath(n_URI, URI, 1);
30894 xmlResetLastError();
30895 if (mem_base != xmlMemBlocks()) {
30896 printf("Leak of %d blocks found in xmlNewTextReader",
30897 xmlMemBlocks() - mem_base);
30899 printf(" %d", n_input);
30900 printf(" %d", n_URI);
30913 test_xmlNewTextReaderFilename(void) {
30916 #if defined(LIBXML_READER_ENABLED)
30918 xmlTextReaderPtr ret_val;
30919 const char * URI; /* the URI of the resource to process */
30922 for (n_URI = 0;n_URI < gen_nb_filepath;n_URI++) {
30923 mem_base = xmlMemBlocks();
30924 URI = gen_filepath(n_URI, 0);
30926 ret_val = xmlNewTextReaderFilename(URI);
30927 desret_xmlTextReaderPtr(ret_val);
30929 des_filepath(n_URI, URI, 0);
30930 xmlResetLastError();
30931 if (mem_base != xmlMemBlocks()) {
30932 printf("Leak of %d blocks found in xmlNewTextReaderFilename",
30933 xmlMemBlocks() - mem_base);
30935 printf(" %d", n_URI);
30947 test_xmlReaderForDoc(void) {
30950 #if defined(LIBXML_READER_ENABLED)
30952 xmlTextReaderPtr ret_val;
30953 xmlChar * cur; /* a pointer to a zero terminated string */
30955 const char * URL; /* the base URL to use for the document */
30957 char * encoding; /* the document encoding, or NULL */
30959 int options; /* a combination of xmlParserOption */
30962 for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
30963 for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
30964 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
30965 for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
30966 mem_base = xmlMemBlocks();
30967 cur = gen_const_xmlChar_ptr(n_cur, 0);
30968 URL = gen_filepath(n_URL, 1);
30969 encoding = gen_const_char_ptr(n_encoding, 2);
30970 options = gen_parseroptions(n_options, 3);
30972 ret_val = xmlReaderForDoc((const xmlChar *)cur, URL, (const char *)encoding, options);
30973 desret_xmlTextReaderPtr(ret_val);
30975 des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 0);
30976 des_filepath(n_URL, URL, 1);
30977 des_const_char_ptr(n_encoding, (const char *)encoding, 2);
30978 des_parseroptions(n_options, options, 3);
30979 xmlResetLastError();
30980 if (mem_base != xmlMemBlocks()) {
30981 printf("Leak of %d blocks found in xmlReaderForDoc",
30982 xmlMemBlocks() - mem_base);
30984 printf(" %d", n_cur);
30985 printf(" %d", n_URL);
30986 printf(" %d", n_encoding);
30987 printf(" %d", n_options);
31002 test_xmlReaderForFile(void) {
31005 #if defined(LIBXML_READER_ENABLED)
31007 xmlTextReaderPtr ret_val;
31008 const char * filename; /* a file or URL */
31010 char * encoding; /* the document encoding, or NULL */
31012 int options; /* a combination of xmlParserOption */
31015 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
31016 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
31017 for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
31018 mem_base = xmlMemBlocks();
31019 filename = gen_filepath(n_filename, 0);
31020 encoding = gen_const_char_ptr(n_encoding, 1);
31021 options = gen_parseroptions(n_options, 2);
31023 ret_val = xmlReaderForFile(filename, (const char *)encoding, options);
31024 desret_xmlTextReaderPtr(ret_val);
31026 des_filepath(n_filename, filename, 0);
31027 des_const_char_ptr(n_encoding, (const char *)encoding, 1);
31028 des_parseroptions(n_options, options, 2);
31029 xmlResetLastError();
31030 if (mem_base != xmlMemBlocks()) {
31031 printf("Leak of %d blocks found in xmlReaderForFile",
31032 xmlMemBlocks() - mem_base);
31034 printf(" %d", n_filename);
31035 printf(" %d", n_encoding);
31036 printf(" %d", n_options);
31050 test_xmlReaderForMemory(void) {
31053 #if defined(LIBXML_READER_ENABLED)
31055 xmlTextReaderPtr ret_val;
31056 char * buffer; /* a pointer to a char array */
31058 int size; /* the size of the array */
31060 const char * URL; /* the base URL to use for the document */
31062 char * encoding; /* the document encoding, or NULL */
31064 int options; /* a combination of xmlParserOption */
31067 for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
31068 for (n_size = 0;n_size < gen_nb_int;n_size++) {
31069 for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
31070 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
31071 for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
31072 mem_base = xmlMemBlocks();
31073 buffer = gen_const_char_ptr(n_buffer, 0);
31074 size = gen_int(n_size, 1);
31075 URL = gen_filepath(n_URL, 2);
31076 encoding = gen_const_char_ptr(n_encoding, 3);
31077 options = gen_parseroptions(n_options, 4);
31078 if ((buffer != NULL) &&
31079 (size > (int) strlen((const char *) buffer) + 1))
31082 ret_val = xmlReaderForMemory((const char *)buffer, size, URL, (const char *)encoding, options);
31083 desret_xmlTextReaderPtr(ret_val);
31085 des_const_char_ptr(n_buffer, (const char *)buffer, 0);
31086 des_int(n_size, size, 1);
31087 des_filepath(n_URL, URL, 2);
31088 des_const_char_ptr(n_encoding, (const char *)encoding, 3);
31089 des_parseroptions(n_options, options, 4);
31090 xmlResetLastError();
31091 if (mem_base != xmlMemBlocks()) {
31092 printf("Leak of %d blocks found in xmlReaderForMemory",
31093 xmlMemBlocks() - mem_base);
31095 printf(" %d", n_buffer);
31096 printf(" %d", n_size);
31097 printf(" %d", n_URL);
31098 printf(" %d", n_encoding);
31099 printf(" %d", n_options);
31115 test_xmlReaderNewDoc(void) {
31118 #if defined(LIBXML_READER_ENABLED)
31121 xmlTextReaderPtr reader; /* an XML reader */
31123 xmlChar * cur; /* a pointer to a zero terminated string */
31125 const char * URL; /* the base URL to use for the document */
31127 char * encoding; /* the document encoding, or NULL */
31129 int options; /* a combination of xmlParserOption */
31132 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31133 for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
31134 for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
31135 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
31136 for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
31137 mem_base = xmlMemBlocks();
31138 reader = gen_xmlTextReaderPtr(n_reader, 0);
31139 cur = gen_const_xmlChar_ptr(n_cur, 1);
31140 URL = gen_filepath(n_URL, 2);
31141 encoding = gen_const_char_ptr(n_encoding, 3);
31142 options = gen_parseroptions(n_options, 4);
31144 ret_val = xmlReaderNewDoc(reader, (const xmlChar *)cur, URL, (const char *)encoding, options);
31145 desret_int(ret_val);
31147 des_xmlTextReaderPtr(n_reader, reader, 0);
31148 des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 1);
31149 des_filepath(n_URL, URL, 2);
31150 des_const_char_ptr(n_encoding, (const char *)encoding, 3);
31151 des_parseroptions(n_options, options, 4);
31152 xmlResetLastError();
31153 if (mem_base != xmlMemBlocks()) {
31154 printf("Leak of %d blocks found in xmlReaderNewDoc",
31155 xmlMemBlocks() - mem_base);
31157 printf(" %d", n_reader);
31158 printf(" %d", n_cur);
31159 printf(" %d", n_URL);
31160 printf(" %d", n_encoding);
31161 printf(" %d", n_options);
31177 test_xmlReaderNewFile(void) {
31180 #if defined(LIBXML_READER_ENABLED)
31183 xmlTextReaderPtr reader; /* an XML reader */
31185 const char * filename; /* a file or URL */
31187 char * encoding; /* the document encoding, or NULL */
31189 int options; /* a combination of xmlParserOption */
31192 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31193 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
31194 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
31195 for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
31196 mem_base = xmlMemBlocks();
31197 reader = gen_xmlTextReaderPtr(n_reader, 0);
31198 filename = gen_filepath(n_filename, 1);
31199 encoding = gen_const_char_ptr(n_encoding, 2);
31200 options = gen_parseroptions(n_options, 3);
31202 ret_val = xmlReaderNewFile(reader, filename, (const char *)encoding, options);
31203 desret_int(ret_val);
31205 des_xmlTextReaderPtr(n_reader, reader, 0);
31206 des_filepath(n_filename, filename, 1);
31207 des_const_char_ptr(n_encoding, (const char *)encoding, 2);
31208 des_parseroptions(n_options, options, 3);
31209 xmlResetLastError();
31210 if (mem_base != xmlMemBlocks()) {
31211 printf("Leak of %d blocks found in xmlReaderNewFile",
31212 xmlMemBlocks() - mem_base);
31214 printf(" %d", n_reader);
31215 printf(" %d", n_filename);
31216 printf(" %d", n_encoding);
31217 printf(" %d", n_options);
31232 test_xmlReaderNewMemory(void) {
31235 #if defined(LIBXML_READER_ENABLED)
31238 xmlTextReaderPtr reader; /* an XML reader */
31240 char * buffer; /* a pointer to a char array */
31242 int size; /* the size of the array */
31244 const char * URL; /* the base URL to use for the document */
31246 char * encoding; /* the document encoding, or NULL */
31248 int options; /* a combination of xmlParserOption */
31251 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31252 for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
31253 for (n_size = 0;n_size < gen_nb_int;n_size++) {
31254 for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
31255 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
31256 for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
31257 mem_base = xmlMemBlocks();
31258 reader = gen_xmlTextReaderPtr(n_reader, 0);
31259 buffer = gen_const_char_ptr(n_buffer, 1);
31260 size = gen_int(n_size, 2);
31261 URL = gen_filepath(n_URL, 3);
31262 encoding = gen_const_char_ptr(n_encoding, 4);
31263 options = gen_parseroptions(n_options, 5);
31264 if ((buffer != NULL) &&
31265 (size > (int) strlen((const char *) buffer) + 1))
31268 ret_val = xmlReaderNewMemory(reader, (const char *)buffer, size, URL, (const char *)encoding, options);
31269 desret_int(ret_val);
31271 des_xmlTextReaderPtr(n_reader, reader, 0);
31272 des_const_char_ptr(n_buffer, (const char *)buffer, 1);
31273 des_int(n_size, size, 2);
31274 des_filepath(n_URL, URL, 3);
31275 des_const_char_ptr(n_encoding, (const char *)encoding, 4);
31276 des_parseroptions(n_options, options, 5);
31277 xmlResetLastError();
31278 if (mem_base != xmlMemBlocks()) {
31279 printf("Leak of %d blocks found in xmlReaderNewMemory",
31280 xmlMemBlocks() - mem_base);
31282 printf(" %d", n_reader);
31283 printf(" %d", n_buffer);
31284 printf(" %d", n_size);
31285 printf(" %d", n_URL);
31286 printf(" %d", n_encoding);
31287 printf(" %d", n_options);
31304 test_xmlReaderNewWalker(void) {
31307 #if defined(LIBXML_READER_ENABLED)
31310 xmlTextReaderPtr reader; /* an XML reader */
31312 xmlDocPtr doc; /* a preparsed document */
31315 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31316 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
31317 mem_base = xmlMemBlocks();
31318 reader = gen_xmlTextReaderPtr(n_reader, 0);
31319 doc = gen_xmlDocPtr(n_doc, 1);
31321 ret_val = xmlReaderNewWalker(reader, doc);
31322 desret_int(ret_val);
31324 des_xmlTextReaderPtr(n_reader, reader, 0);
31325 des_xmlDocPtr(n_doc, doc, 1);
31326 xmlResetLastError();
31327 if (mem_base != xmlMemBlocks()) {
31328 printf("Leak of %d blocks found in xmlReaderNewWalker",
31329 xmlMemBlocks() - mem_base);
31331 printf(" %d", n_reader);
31332 printf(" %d", n_doc);
31345 test_xmlReaderWalker(void) {
31348 #if defined(LIBXML_READER_ENABLED)
31350 xmlTextReaderPtr ret_val;
31351 xmlDocPtr doc; /* a preparsed document */
31354 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
31355 mem_base = xmlMemBlocks();
31356 doc = gen_xmlDocPtr(n_doc, 0);
31358 ret_val = xmlReaderWalker(doc);
31359 desret_xmlTextReaderPtr(ret_val);
31361 des_xmlDocPtr(n_doc, doc, 0);
31362 xmlResetLastError();
31363 if (mem_base != xmlMemBlocks()) {
31364 printf("Leak of %d blocks found in xmlReaderWalker",
31365 xmlMemBlocks() - mem_base);
31367 printf(" %d", n_doc);
31379 test_xmlTextReaderAttributeCount(void) {
31382 #if defined(LIBXML_READER_ENABLED)
31385 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
31388 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31389 mem_base = xmlMemBlocks();
31390 reader = gen_xmlTextReaderPtr(n_reader, 0);
31392 ret_val = xmlTextReaderAttributeCount(reader);
31393 desret_int(ret_val);
31395 des_xmlTextReaderPtr(n_reader, reader, 0);
31396 xmlResetLastError();
31397 if (mem_base != xmlMemBlocks()) {
31398 printf("Leak of %d blocks found in xmlTextReaderAttributeCount",
31399 xmlMemBlocks() - mem_base);
31401 printf(" %d", n_reader);
31413 test_xmlTextReaderBaseUri(void) {
31416 #if defined(LIBXML_READER_ENABLED)
31419 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
31422 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31423 mem_base = xmlMemBlocks();
31424 reader = gen_xmlTextReaderPtr(n_reader, 0);
31426 ret_val = xmlTextReaderBaseUri(reader);
31427 desret_xmlChar_ptr(ret_val);
31429 des_xmlTextReaderPtr(n_reader, reader, 0);
31430 xmlResetLastError();
31431 if (mem_base != xmlMemBlocks()) {
31432 printf("Leak of %d blocks found in xmlTextReaderBaseUri",
31433 xmlMemBlocks() - mem_base);
31435 printf(" %d", n_reader);
31447 test_xmlTextReaderByteConsumed(void) {
31450 #if defined(LIBXML_READER_ENABLED)
31453 xmlTextReaderPtr reader; /* an XML reader */
31456 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31457 mem_base = xmlMemBlocks();
31458 reader = gen_xmlTextReaderPtr(n_reader, 0);
31460 ret_val = xmlTextReaderByteConsumed(reader);
31461 desret_long(ret_val);
31463 des_xmlTextReaderPtr(n_reader, reader, 0);
31464 xmlResetLastError();
31465 if (mem_base != xmlMemBlocks()) {
31466 printf("Leak of %d blocks found in xmlTextReaderByteConsumed",
31467 xmlMemBlocks() - mem_base);
31469 printf(" %d", n_reader);
31481 test_xmlTextReaderClose(void) {
31484 #if defined(LIBXML_READER_ENABLED)
31487 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
31490 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31491 mem_base = xmlMemBlocks();
31492 reader = gen_xmlTextReaderPtr(n_reader, 0);
31494 ret_val = xmlTextReaderClose(reader);
31495 desret_int(ret_val);
31497 des_xmlTextReaderPtr(n_reader, reader, 0);
31498 xmlResetLastError();
31499 if (mem_base != xmlMemBlocks()) {
31500 printf("Leak of %d blocks found in xmlTextReaderClose",
31501 xmlMemBlocks() - mem_base);
31503 printf(" %d", n_reader);
31515 test_xmlTextReaderConstBaseUri(void) {
31518 #if defined(LIBXML_READER_ENABLED)
31520 const xmlChar * ret_val;
31521 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
31524 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31525 mem_base = xmlMemBlocks();
31526 reader = gen_xmlTextReaderPtr(n_reader, 0);
31528 ret_val = xmlTextReaderConstBaseUri(reader);
31529 desret_const_xmlChar_ptr(ret_val);
31531 des_xmlTextReaderPtr(n_reader, reader, 0);
31532 xmlResetLastError();
31533 if (mem_base != xmlMemBlocks()) {
31534 printf("Leak of %d blocks found in xmlTextReaderConstBaseUri",
31535 xmlMemBlocks() - mem_base);
31537 printf(" %d", n_reader);
31549 test_xmlTextReaderConstEncoding(void) {
31552 #if defined(LIBXML_READER_ENABLED)
31554 const xmlChar * ret_val;
31555 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
31558 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31559 mem_base = xmlMemBlocks();
31560 reader = gen_xmlTextReaderPtr(n_reader, 0);
31562 ret_val = xmlTextReaderConstEncoding(reader);
31563 desret_const_xmlChar_ptr(ret_val);
31565 des_xmlTextReaderPtr(n_reader, reader, 0);
31566 xmlResetLastError();
31567 if (mem_base != xmlMemBlocks()) {
31568 printf("Leak of %d blocks found in xmlTextReaderConstEncoding",
31569 xmlMemBlocks() - mem_base);
31571 printf(" %d", n_reader);
31583 test_xmlTextReaderConstLocalName(void) {
31586 #if defined(LIBXML_READER_ENABLED)
31588 const xmlChar * ret_val;
31589 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
31592 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31593 mem_base = xmlMemBlocks();
31594 reader = gen_xmlTextReaderPtr(n_reader, 0);
31596 ret_val = xmlTextReaderConstLocalName(reader);
31597 desret_const_xmlChar_ptr(ret_val);
31599 des_xmlTextReaderPtr(n_reader, reader, 0);
31600 xmlResetLastError();
31601 if (mem_base != xmlMemBlocks()) {
31602 printf("Leak of %d blocks found in xmlTextReaderConstLocalName",
31603 xmlMemBlocks() - mem_base);
31605 printf(" %d", n_reader);
31617 test_xmlTextReaderConstName(void) {
31620 #if defined(LIBXML_READER_ENABLED)
31622 const xmlChar * ret_val;
31623 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
31626 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31627 mem_base = xmlMemBlocks();
31628 reader = gen_xmlTextReaderPtr(n_reader, 0);
31630 ret_val = xmlTextReaderConstName(reader);
31631 desret_const_xmlChar_ptr(ret_val);
31633 des_xmlTextReaderPtr(n_reader, reader, 0);
31634 xmlResetLastError();
31635 if (mem_base != xmlMemBlocks()) {
31636 printf("Leak of %d blocks found in xmlTextReaderConstName",
31637 xmlMemBlocks() - mem_base);
31639 printf(" %d", n_reader);
31651 test_xmlTextReaderConstNamespaceUri(void) {
31654 #if defined(LIBXML_READER_ENABLED)
31656 const xmlChar * ret_val;
31657 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
31660 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31661 mem_base = xmlMemBlocks();
31662 reader = gen_xmlTextReaderPtr(n_reader, 0);
31664 ret_val = xmlTextReaderConstNamespaceUri(reader);
31665 desret_const_xmlChar_ptr(ret_val);
31667 des_xmlTextReaderPtr(n_reader, reader, 0);
31668 xmlResetLastError();
31669 if (mem_base != xmlMemBlocks()) {
31670 printf("Leak of %d blocks found in xmlTextReaderConstNamespaceUri",
31671 xmlMemBlocks() - mem_base);
31673 printf(" %d", n_reader);
31685 test_xmlTextReaderConstPrefix(void) {
31688 #if defined(LIBXML_READER_ENABLED)
31690 const xmlChar * ret_val;
31691 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
31694 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31695 mem_base = xmlMemBlocks();
31696 reader = gen_xmlTextReaderPtr(n_reader, 0);
31698 ret_val = xmlTextReaderConstPrefix(reader);
31699 desret_const_xmlChar_ptr(ret_val);
31701 des_xmlTextReaderPtr(n_reader, reader, 0);
31702 xmlResetLastError();
31703 if (mem_base != xmlMemBlocks()) {
31704 printf("Leak of %d blocks found in xmlTextReaderConstPrefix",
31705 xmlMemBlocks() - mem_base);
31707 printf(" %d", n_reader);
31719 test_xmlTextReaderConstString(void) {
31722 #if defined(LIBXML_READER_ENABLED)
31724 const xmlChar * ret_val;
31725 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
31727 xmlChar * str; /* the string to intern. */
31730 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31731 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
31732 mem_base = xmlMemBlocks();
31733 reader = gen_xmlTextReaderPtr(n_reader, 0);
31734 str = gen_const_xmlChar_ptr(n_str, 1);
31736 ret_val = xmlTextReaderConstString(reader, (const xmlChar *)str);
31737 desret_const_xmlChar_ptr(ret_val);
31739 des_xmlTextReaderPtr(n_reader, reader, 0);
31740 des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 1);
31741 xmlResetLastError();
31742 if (mem_base != xmlMemBlocks()) {
31743 printf("Leak of %d blocks found in xmlTextReaderConstString",
31744 xmlMemBlocks() - mem_base);
31746 printf(" %d", n_reader);
31747 printf(" %d", n_str);
31760 test_xmlTextReaderConstValue(void) {
31763 #if defined(LIBXML_READER_ENABLED)
31765 const xmlChar * ret_val;
31766 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
31769 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31770 mem_base = xmlMemBlocks();
31771 reader = gen_xmlTextReaderPtr(n_reader, 0);
31773 ret_val = xmlTextReaderConstValue(reader);
31774 desret_const_xmlChar_ptr(ret_val);
31776 des_xmlTextReaderPtr(n_reader, reader, 0);
31777 xmlResetLastError();
31778 if (mem_base != xmlMemBlocks()) {
31779 printf("Leak of %d blocks found in xmlTextReaderConstValue",
31780 xmlMemBlocks() - mem_base);
31782 printf(" %d", n_reader);
31794 test_xmlTextReaderConstXmlLang(void) {
31797 #if defined(LIBXML_READER_ENABLED)
31799 const xmlChar * ret_val;
31800 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
31803 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31804 mem_base = xmlMemBlocks();
31805 reader = gen_xmlTextReaderPtr(n_reader, 0);
31807 ret_val = xmlTextReaderConstXmlLang(reader);
31808 desret_const_xmlChar_ptr(ret_val);
31810 des_xmlTextReaderPtr(n_reader, reader, 0);
31811 xmlResetLastError();
31812 if (mem_base != xmlMemBlocks()) {
31813 printf("Leak of %d blocks found in xmlTextReaderConstXmlLang",
31814 xmlMemBlocks() - mem_base);
31816 printf(" %d", n_reader);
31828 test_xmlTextReaderConstXmlVersion(void) {
31831 #if defined(LIBXML_READER_ENABLED)
31833 const xmlChar * ret_val;
31834 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
31837 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31838 mem_base = xmlMemBlocks();
31839 reader = gen_xmlTextReaderPtr(n_reader, 0);
31841 ret_val = xmlTextReaderConstXmlVersion(reader);
31842 desret_const_xmlChar_ptr(ret_val);
31844 des_xmlTextReaderPtr(n_reader, reader, 0);
31845 xmlResetLastError();
31846 if (mem_base != xmlMemBlocks()) {
31847 printf("Leak of %d blocks found in xmlTextReaderConstXmlVersion",
31848 xmlMemBlocks() - mem_base);
31850 printf(" %d", n_reader);
31862 test_xmlTextReaderCurrentDoc(void) {
31865 #if defined(LIBXML_READER_ENABLED)
31868 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
31871 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31872 mem_base = xmlMemBlocks();
31873 reader = gen_xmlTextReaderPtr(n_reader, 0);
31875 ret_val = xmlTextReaderCurrentDoc(reader);
31876 desret_xmlDocPtr(ret_val);
31878 des_xmlTextReaderPtr(n_reader, reader, 0);
31879 xmlResetLastError();
31880 if (mem_base != xmlMemBlocks()) {
31881 printf("Leak of %d blocks found in xmlTextReaderCurrentDoc",
31882 xmlMemBlocks() - mem_base);
31884 printf(" %d", n_reader);
31896 test_xmlTextReaderCurrentNode(void) {
31899 #if defined(LIBXML_READER_ENABLED)
31901 xmlNodePtr ret_val;
31902 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
31905 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31906 mem_base = xmlMemBlocks();
31907 reader = gen_xmlTextReaderPtr(n_reader, 0);
31909 ret_val = xmlTextReaderCurrentNode(reader);
31910 desret_xmlNodePtr(ret_val);
31912 des_xmlTextReaderPtr(n_reader, reader, 0);
31913 xmlResetLastError();
31914 if (mem_base != xmlMemBlocks()) {
31915 printf("Leak of %d blocks found in xmlTextReaderCurrentNode",
31916 xmlMemBlocks() - mem_base);
31918 printf(" %d", n_reader);
31930 test_xmlTextReaderDepth(void) {
31933 #if defined(LIBXML_READER_ENABLED)
31936 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
31939 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31940 mem_base = xmlMemBlocks();
31941 reader = gen_xmlTextReaderPtr(n_reader, 0);
31943 ret_val = xmlTextReaderDepth(reader);
31944 desret_int(ret_val);
31946 des_xmlTextReaderPtr(n_reader, reader, 0);
31947 xmlResetLastError();
31948 if (mem_base != xmlMemBlocks()) {
31949 printf("Leak of %d blocks found in xmlTextReaderDepth",
31950 xmlMemBlocks() - mem_base);
31952 printf(" %d", n_reader);
31964 test_xmlTextReaderExpand(void) {
31967 #if defined(LIBXML_READER_ENABLED)
31969 xmlNodePtr ret_val;
31970 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
31973 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31974 mem_base = xmlMemBlocks();
31975 reader = gen_xmlTextReaderPtr(n_reader, 0);
31977 ret_val = xmlTextReaderExpand(reader);
31978 desret_xmlNodePtr(ret_val);
31980 des_xmlTextReaderPtr(n_reader, reader, 0);
31981 xmlResetLastError();
31982 if (mem_base != xmlMemBlocks()) {
31983 printf("Leak of %d blocks found in xmlTextReaderExpand",
31984 xmlMemBlocks() - mem_base);
31986 printf(" %d", n_reader);
31998 test_xmlTextReaderGetAttribute(void) {
32001 #if defined(LIBXML_READER_ENABLED)
32004 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32006 xmlChar * name; /* the qualified name of the attribute. */
32009 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32010 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
32011 mem_base = xmlMemBlocks();
32012 reader = gen_xmlTextReaderPtr(n_reader, 0);
32013 name = gen_const_xmlChar_ptr(n_name, 1);
32015 ret_val = xmlTextReaderGetAttribute(reader, (const xmlChar *)name);
32016 desret_xmlChar_ptr(ret_val);
32018 des_xmlTextReaderPtr(n_reader, reader, 0);
32019 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
32020 xmlResetLastError();
32021 if (mem_base != xmlMemBlocks()) {
32022 printf("Leak of %d blocks found in xmlTextReaderGetAttribute",
32023 xmlMemBlocks() - mem_base);
32025 printf(" %d", n_reader);
32026 printf(" %d", n_name);
32039 test_xmlTextReaderGetAttributeNo(void) {
32042 #if defined(LIBXML_READER_ENABLED)
32045 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32047 int no; /* the zero-based index of the attribute relative to the containing element */
32050 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32051 for (n_no = 0;n_no < gen_nb_int;n_no++) {
32052 mem_base = xmlMemBlocks();
32053 reader = gen_xmlTextReaderPtr(n_reader, 0);
32054 no = gen_int(n_no, 1);
32056 ret_val = xmlTextReaderGetAttributeNo(reader, no);
32057 desret_xmlChar_ptr(ret_val);
32059 des_xmlTextReaderPtr(n_reader, reader, 0);
32060 des_int(n_no, no, 1);
32061 xmlResetLastError();
32062 if (mem_base != xmlMemBlocks()) {
32063 printf("Leak of %d blocks found in xmlTextReaderGetAttributeNo",
32064 xmlMemBlocks() - mem_base);
32066 printf(" %d", n_reader);
32067 printf(" %d", n_no);
32080 test_xmlTextReaderGetAttributeNs(void) {
32083 #if defined(LIBXML_READER_ENABLED)
32086 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32088 xmlChar * localName; /* the local name of the attribute. */
32090 xmlChar * namespaceURI; /* the namespace URI of the attribute. */
32091 int n_namespaceURI;
32093 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32094 for (n_localName = 0;n_localName < gen_nb_const_xmlChar_ptr;n_localName++) {
32095 for (n_namespaceURI = 0;n_namespaceURI < gen_nb_const_xmlChar_ptr;n_namespaceURI++) {
32096 mem_base = xmlMemBlocks();
32097 reader = gen_xmlTextReaderPtr(n_reader, 0);
32098 localName = gen_const_xmlChar_ptr(n_localName, 1);
32099 namespaceURI = gen_const_xmlChar_ptr(n_namespaceURI, 2);
32101 ret_val = xmlTextReaderGetAttributeNs(reader, (const xmlChar *)localName, (const xmlChar *)namespaceURI);
32102 desret_xmlChar_ptr(ret_val);
32104 des_xmlTextReaderPtr(n_reader, reader, 0);
32105 des_const_xmlChar_ptr(n_localName, (const xmlChar *)localName, 1);
32106 des_const_xmlChar_ptr(n_namespaceURI, (const xmlChar *)namespaceURI, 2);
32107 xmlResetLastError();
32108 if (mem_base != xmlMemBlocks()) {
32109 printf("Leak of %d blocks found in xmlTextReaderGetAttributeNs",
32110 xmlMemBlocks() - mem_base);
32112 printf(" %d", n_reader);
32113 printf(" %d", n_localName);
32114 printf(" %d", n_namespaceURI);
32126 #ifdef LIBXML_READER_ENABLED
32128 #define gen_nb_xmlTextReaderErrorFunc_ptr 1
32129 static xmlTextReaderErrorFunc * gen_xmlTextReaderErrorFunc_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
32132 static void des_xmlTextReaderErrorFunc_ptr(int no ATTRIBUTE_UNUSED, xmlTextReaderErrorFunc * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
32138 test_xmlTextReaderGetErrorHandler(void) {
32141 #if defined(LIBXML_READER_ENABLED)
32143 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32145 xmlTextReaderErrorFunc * f; /* the callback function or NULL is no callback has been registered */
32147 void ** arg; /* a user argument */
32150 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32151 for (n_f = 0;n_f < gen_nb_xmlTextReaderErrorFunc_ptr;n_f++) {
32152 for (n_arg = 0;n_arg < gen_nb_void_ptr_ptr;n_arg++) {
32153 mem_base = xmlMemBlocks();
32154 reader = gen_xmlTextReaderPtr(n_reader, 0);
32155 f = gen_xmlTextReaderErrorFunc_ptr(n_f, 1);
32156 arg = gen_void_ptr_ptr(n_arg, 2);
32158 xmlTextReaderGetErrorHandler(reader, f, arg);
32160 des_xmlTextReaderPtr(n_reader, reader, 0);
32161 des_xmlTextReaderErrorFunc_ptr(n_f, f, 1);
32162 des_void_ptr_ptr(n_arg, arg, 2);
32163 xmlResetLastError();
32164 if (mem_base != xmlMemBlocks()) {
32165 printf("Leak of %d blocks found in xmlTextReaderGetErrorHandler",
32166 xmlMemBlocks() - mem_base);
32168 printf(" %d", n_reader);
32169 printf(" %d", n_f);
32170 printf(" %d", n_arg);
32184 test_xmlTextReaderGetParserColumnNumber(void) {
32187 #if defined(LIBXML_READER_ENABLED)
32190 xmlTextReaderPtr reader; /* the user data (XML reader context) */
32193 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32194 mem_base = xmlMemBlocks();
32195 reader = gen_xmlTextReaderPtr(n_reader, 0);
32197 ret_val = xmlTextReaderGetParserColumnNumber(reader);
32198 desret_int(ret_val);
32200 des_xmlTextReaderPtr(n_reader, reader, 0);
32201 xmlResetLastError();
32202 if (mem_base != xmlMemBlocks()) {
32203 printf("Leak of %d blocks found in xmlTextReaderGetParserColumnNumber",
32204 xmlMemBlocks() - mem_base);
32206 printf(" %d", n_reader);
32218 test_xmlTextReaderGetParserLineNumber(void) {
32221 #if defined(LIBXML_READER_ENABLED)
32224 xmlTextReaderPtr reader; /* the user data (XML reader context) */
32227 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32228 mem_base = xmlMemBlocks();
32229 reader = gen_xmlTextReaderPtr(n_reader, 0);
32231 ret_val = xmlTextReaderGetParserLineNumber(reader);
32232 desret_int(ret_val);
32234 des_xmlTextReaderPtr(n_reader, reader, 0);
32235 xmlResetLastError();
32236 if (mem_base != xmlMemBlocks()) {
32237 printf("Leak of %d blocks found in xmlTextReaderGetParserLineNumber",
32238 xmlMemBlocks() - mem_base);
32240 printf(" %d", n_reader);
32252 test_xmlTextReaderGetParserProp(void) {
32255 #if defined(LIBXML_READER_ENABLED)
32258 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32260 int prop; /* the xmlParserProperties to get */
32263 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32264 for (n_prop = 0;n_prop < gen_nb_int;n_prop++) {
32265 mem_base = xmlMemBlocks();
32266 reader = gen_xmlTextReaderPtr(n_reader, 0);
32267 prop = gen_int(n_prop, 1);
32269 ret_val = xmlTextReaderGetParserProp(reader, prop);
32270 desret_int(ret_val);
32272 des_xmlTextReaderPtr(n_reader, reader, 0);
32273 des_int(n_prop, prop, 1);
32274 xmlResetLastError();
32275 if (mem_base != xmlMemBlocks()) {
32276 printf("Leak of %d blocks found in xmlTextReaderGetParserProp",
32277 xmlMemBlocks() - mem_base);
32279 printf(" %d", n_reader);
32280 printf(" %d", n_prop);
32293 test_xmlTextReaderGetRemainder(void) {
32296 #if defined(LIBXML_READER_ENABLED)
32298 xmlParserInputBufferPtr ret_val;
32299 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32302 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32303 mem_base = xmlMemBlocks();
32304 reader = gen_xmlTextReaderPtr(n_reader, 0);
32306 ret_val = xmlTextReaderGetRemainder(reader);
32307 desret_xmlParserInputBufferPtr(ret_val);
32309 des_xmlTextReaderPtr(n_reader, reader, 0);
32310 xmlResetLastError();
32311 if (mem_base != xmlMemBlocks()) {
32312 printf("Leak of %d blocks found in xmlTextReaderGetRemainder",
32313 xmlMemBlocks() - mem_base);
32315 printf(" %d", n_reader);
32327 test_xmlTextReaderHasAttributes(void) {
32330 #if defined(LIBXML_READER_ENABLED)
32333 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32336 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32337 mem_base = xmlMemBlocks();
32338 reader = gen_xmlTextReaderPtr(n_reader, 0);
32340 ret_val = xmlTextReaderHasAttributes(reader);
32341 desret_int(ret_val);
32343 des_xmlTextReaderPtr(n_reader, reader, 0);
32344 xmlResetLastError();
32345 if (mem_base != xmlMemBlocks()) {
32346 printf("Leak of %d blocks found in xmlTextReaderHasAttributes",
32347 xmlMemBlocks() - mem_base);
32349 printf(" %d", n_reader);
32361 test_xmlTextReaderHasValue(void) {
32364 #if defined(LIBXML_READER_ENABLED)
32367 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32370 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32371 mem_base = xmlMemBlocks();
32372 reader = gen_xmlTextReaderPtr(n_reader, 0);
32374 ret_val = xmlTextReaderHasValue(reader);
32375 desret_int(ret_val);
32377 des_xmlTextReaderPtr(n_reader, reader, 0);
32378 xmlResetLastError();
32379 if (mem_base != xmlMemBlocks()) {
32380 printf("Leak of %d blocks found in xmlTextReaderHasValue",
32381 xmlMemBlocks() - mem_base);
32383 printf(" %d", n_reader);
32395 test_xmlTextReaderIsDefault(void) {
32398 #if defined(LIBXML_READER_ENABLED)
32401 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32404 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32405 mem_base = xmlMemBlocks();
32406 reader = gen_xmlTextReaderPtr(n_reader, 0);
32408 ret_val = xmlTextReaderIsDefault(reader);
32409 desret_int(ret_val);
32411 des_xmlTextReaderPtr(n_reader, reader, 0);
32412 xmlResetLastError();
32413 if (mem_base != xmlMemBlocks()) {
32414 printf("Leak of %d blocks found in xmlTextReaderIsDefault",
32415 xmlMemBlocks() - mem_base);
32417 printf(" %d", n_reader);
32429 test_xmlTextReaderIsEmptyElement(void) {
32432 #if defined(LIBXML_READER_ENABLED)
32435 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32438 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32439 mem_base = xmlMemBlocks();
32440 reader = gen_xmlTextReaderPtr(n_reader, 0);
32442 ret_val = xmlTextReaderIsEmptyElement(reader);
32443 desret_int(ret_val);
32445 des_xmlTextReaderPtr(n_reader, reader, 0);
32446 xmlResetLastError();
32447 if (mem_base != xmlMemBlocks()) {
32448 printf("Leak of %d blocks found in xmlTextReaderIsEmptyElement",
32449 xmlMemBlocks() - mem_base);
32451 printf(" %d", n_reader);
32463 test_xmlTextReaderIsNamespaceDecl(void) {
32466 #if defined(LIBXML_READER_ENABLED)
32469 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32472 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32473 mem_base = xmlMemBlocks();
32474 reader = gen_xmlTextReaderPtr(n_reader, 0);
32476 ret_val = xmlTextReaderIsNamespaceDecl(reader);
32477 desret_int(ret_val);
32479 des_xmlTextReaderPtr(n_reader, reader, 0);
32480 xmlResetLastError();
32481 if (mem_base != xmlMemBlocks()) {
32482 printf("Leak of %d blocks found in xmlTextReaderIsNamespaceDecl",
32483 xmlMemBlocks() - mem_base);
32485 printf(" %d", n_reader);
32497 test_xmlTextReaderIsValid(void) {
32500 #if defined(LIBXML_READER_ENABLED)
32503 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32506 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32507 mem_base = xmlMemBlocks();
32508 reader = gen_xmlTextReaderPtr(n_reader, 0);
32510 ret_val = xmlTextReaderIsValid(reader);
32511 desret_int(ret_val);
32513 des_xmlTextReaderPtr(n_reader, reader, 0);
32514 xmlResetLastError();
32515 if (mem_base != xmlMemBlocks()) {
32516 printf("Leak of %d blocks found in xmlTextReaderIsValid",
32517 xmlMemBlocks() - mem_base);
32519 printf(" %d", n_reader);
32531 test_xmlTextReaderLocalName(void) {
32534 #if defined(LIBXML_READER_ENABLED)
32537 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32540 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32541 mem_base = xmlMemBlocks();
32542 reader = gen_xmlTextReaderPtr(n_reader, 0);
32544 ret_val = xmlTextReaderLocalName(reader);
32545 desret_xmlChar_ptr(ret_val);
32547 des_xmlTextReaderPtr(n_reader, reader, 0);
32548 xmlResetLastError();
32549 if (mem_base != xmlMemBlocks()) {
32550 printf("Leak of %d blocks found in xmlTextReaderLocalName",
32551 xmlMemBlocks() - mem_base);
32553 printf(" %d", n_reader);
32563 #ifdef LIBXML_READER_ENABLED
32565 #define gen_nb_xmlTextReaderLocatorPtr 1
32566 static xmlTextReaderLocatorPtr gen_xmlTextReaderLocatorPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
32569 static void des_xmlTextReaderLocatorPtr(int no ATTRIBUTE_UNUSED, xmlTextReaderLocatorPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
32575 test_xmlTextReaderLocatorBaseURI(void) {
32578 #if defined(LIBXML_READER_ENABLED)
32581 xmlTextReaderLocatorPtr locator; /* the xmlTextReaderLocatorPtr used */
32584 for (n_locator = 0;n_locator < gen_nb_xmlTextReaderLocatorPtr;n_locator++) {
32585 mem_base = xmlMemBlocks();
32586 locator = gen_xmlTextReaderLocatorPtr(n_locator, 0);
32588 ret_val = xmlTextReaderLocatorBaseURI(locator);
32589 desret_xmlChar_ptr(ret_val);
32591 des_xmlTextReaderLocatorPtr(n_locator, locator, 0);
32592 xmlResetLastError();
32593 if (mem_base != xmlMemBlocks()) {
32594 printf("Leak of %d blocks found in xmlTextReaderLocatorBaseURI",
32595 xmlMemBlocks() - mem_base);
32597 printf(" %d", n_locator);
32609 test_xmlTextReaderLocatorLineNumber(void) {
32612 #if defined(LIBXML_READER_ENABLED)
32615 xmlTextReaderLocatorPtr locator; /* the xmlTextReaderLocatorPtr used */
32618 for (n_locator = 0;n_locator < gen_nb_xmlTextReaderLocatorPtr;n_locator++) {
32619 mem_base = xmlMemBlocks();
32620 locator = gen_xmlTextReaderLocatorPtr(n_locator, 0);
32622 ret_val = xmlTextReaderLocatorLineNumber(locator);
32623 desret_int(ret_val);
32625 des_xmlTextReaderLocatorPtr(n_locator, locator, 0);
32626 xmlResetLastError();
32627 if (mem_base != xmlMemBlocks()) {
32628 printf("Leak of %d blocks found in xmlTextReaderLocatorLineNumber",
32629 xmlMemBlocks() - mem_base);
32631 printf(" %d", n_locator);
32643 test_xmlTextReaderLookupNamespace(void) {
32646 #if defined(LIBXML_READER_ENABLED)
32649 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32651 xmlChar * prefix; /* the prefix whose namespace URI is to be resolved. To return the default namespace, specify NULL */
32654 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32655 for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
32656 mem_base = xmlMemBlocks();
32657 reader = gen_xmlTextReaderPtr(n_reader, 0);
32658 prefix = gen_const_xmlChar_ptr(n_prefix, 1);
32660 ret_val = xmlTextReaderLookupNamespace(reader, (const xmlChar *)prefix);
32661 desret_xmlChar_ptr(ret_val);
32663 des_xmlTextReaderPtr(n_reader, reader, 0);
32664 des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 1);
32665 xmlResetLastError();
32666 if (mem_base != xmlMemBlocks()) {
32667 printf("Leak of %d blocks found in xmlTextReaderLookupNamespace",
32668 xmlMemBlocks() - mem_base);
32670 printf(" %d", n_reader);
32671 printf(" %d", n_prefix);
32684 test_xmlTextReaderMoveToAttribute(void) {
32687 #if defined(LIBXML_READER_ENABLED)
32690 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32692 xmlChar * name; /* the qualified name of the attribute. */
32695 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32696 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
32697 mem_base = xmlMemBlocks();
32698 reader = gen_xmlTextReaderPtr(n_reader, 0);
32699 name = gen_const_xmlChar_ptr(n_name, 1);
32701 ret_val = xmlTextReaderMoveToAttribute(reader, (const xmlChar *)name);
32702 desret_int(ret_val);
32704 des_xmlTextReaderPtr(n_reader, reader, 0);
32705 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
32706 xmlResetLastError();
32707 if (mem_base != xmlMemBlocks()) {
32708 printf("Leak of %d blocks found in xmlTextReaderMoveToAttribute",
32709 xmlMemBlocks() - mem_base);
32711 printf(" %d", n_reader);
32712 printf(" %d", n_name);
32725 test_xmlTextReaderMoveToAttributeNo(void) {
32728 #if defined(LIBXML_READER_ENABLED)
32731 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32733 int no; /* the zero-based index of the attribute relative to the containing element. */
32736 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32737 for (n_no = 0;n_no < gen_nb_int;n_no++) {
32738 mem_base = xmlMemBlocks();
32739 reader = gen_xmlTextReaderPtr(n_reader, 0);
32740 no = gen_int(n_no, 1);
32742 ret_val = xmlTextReaderMoveToAttributeNo(reader, no);
32743 desret_int(ret_val);
32745 des_xmlTextReaderPtr(n_reader, reader, 0);
32746 des_int(n_no, no, 1);
32747 xmlResetLastError();
32748 if (mem_base != xmlMemBlocks()) {
32749 printf("Leak of %d blocks found in xmlTextReaderMoveToAttributeNo",
32750 xmlMemBlocks() - mem_base);
32752 printf(" %d", n_reader);
32753 printf(" %d", n_no);
32766 test_xmlTextReaderMoveToAttributeNs(void) {
32769 #if defined(LIBXML_READER_ENABLED)
32772 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32774 xmlChar * localName; /* the local name of the attribute. */
32776 xmlChar * namespaceURI; /* the namespace URI of the attribute. */
32777 int n_namespaceURI;
32779 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32780 for (n_localName = 0;n_localName < gen_nb_const_xmlChar_ptr;n_localName++) {
32781 for (n_namespaceURI = 0;n_namespaceURI < gen_nb_const_xmlChar_ptr;n_namespaceURI++) {
32782 mem_base = xmlMemBlocks();
32783 reader = gen_xmlTextReaderPtr(n_reader, 0);
32784 localName = gen_const_xmlChar_ptr(n_localName, 1);
32785 namespaceURI = gen_const_xmlChar_ptr(n_namespaceURI, 2);
32787 ret_val = xmlTextReaderMoveToAttributeNs(reader, (const xmlChar *)localName, (const xmlChar *)namespaceURI);
32788 desret_int(ret_val);
32790 des_xmlTextReaderPtr(n_reader, reader, 0);
32791 des_const_xmlChar_ptr(n_localName, (const xmlChar *)localName, 1);
32792 des_const_xmlChar_ptr(n_namespaceURI, (const xmlChar *)namespaceURI, 2);
32793 xmlResetLastError();
32794 if (mem_base != xmlMemBlocks()) {
32795 printf("Leak of %d blocks found in xmlTextReaderMoveToAttributeNs",
32796 xmlMemBlocks() - mem_base);
32798 printf(" %d", n_reader);
32799 printf(" %d", n_localName);
32800 printf(" %d", n_namespaceURI);
32814 test_xmlTextReaderMoveToElement(void) {
32817 #if defined(LIBXML_READER_ENABLED)
32820 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32823 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32824 mem_base = xmlMemBlocks();
32825 reader = gen_xmlTextReaderPtr(n_reader, 0);
32827 ret_val = xmlTextReaderMoveToElement(reader);
32828 desret_int(ret_val);
32830 des_xmlTextReaderPtr(n_reader, reader, 0);
32831 xmlResetLastError();
32832 if (mem_base != xmlMemBlocks()) {
32833 printf("Leak of %d blocks found in xmlTextReaderMoveToElement",
32834 xmlMemBlocks() - mem_base);
32836 printf(" %d", n_reader);
32848 test_xmlTextReaderMoveToFirstAttribute(void) {
32851 #if defined(LIBXML_READER_ENABLED)
32854 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32857 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32858 mem_base = xmlMemBlocks();
32859 reader = gen_xmlTextReaderPtr(n_reader, 0);
32861 ret_val = xmlTextReaderMoveToFirstAttribute(reader);
32862 desret_int(ret_val);
32864 des_xmlTextReaderPtr(n_reader, reader, 0);
32865 xmlResetLastError();
32866 if (mem_base != xmlMemBlocks()) {
32867 printf("Leak of %d blocks found in xmlTextReaderMoveToFirstAttribute",
32868 xmlMemBlocks() - mem_base);
32870 printf(" %d", n_reader);
32882 test_xmlTextReaderMoveToNextAttribute(void) {
32885 #if defined(LIBXML_READER_ENABLED)
32888 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32891 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32892 mem_base = xmlMemBlocks();
32893 reader = gen_xmlTextReaderPtr(n_reader, 0);
32895 ret_val = xmlTextReaderMoveToNextAttribute(reader);
32896 desret_int(ret_val);
32898 des_xmlTextReaderPtr(n_reader, reader, 0);
32899 xmlResetLastError();
32900 if (mem_base != xmlMemBlocks()) {
32901 printf("Leak of %d blocks found in xmlTextReaderMoveToNextAttribute",
32902 xmlMemBlocks() - mem_base);
32904 printf(" %d", n_reader);
32916 test_xmlTextReaderName(void) {
32919 #if defined(LIBXML_READER_ENABLED)
32922 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32925 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32926 mem_base = xmlMemBlocks();
32927 reader = gen_xmlTextReaderPtr(n_reader, 0);
32929 ret_val = xmlTextReaderName(reader);
32930 desret_xmlChar_ptr(ret_val);
32932 des_xmlTextReaderPtr(n_reader, reader, 0);
32933 xmlResetLastError();
32934 if (mem_base != xmlMemBlocks()) {
32935 printf("Leak of %d blocks found in xmlTextReaderName",
32936 xmlMemBlocks() - mem_base);
32938 printf(" %d", n_reader);
32950 test_xmlTextReaderNamespaceUri(void) {
32953 #if defined(LIBXML_READER_ENABLED)
32956 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32959 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32960 mem_base = xmlMemBlocks();
32961 reader = gen_xmlTextReaderPtr(n_reader, 0);
32963 ret_val = xmlTextReaderNamespaceUri(reader);
32964 desret_xmlChar_ptr(ret_val);
32966 des_xmlTextReaderPtr(n_reader, reader, 0);
32967 xmlResetLastError();
32968 if (mem_base != xmlMemBlocks()) {
32969 printf("Leak of %d blocks found in xmlTextReaderNamespaceUri",
32970 xmlMemBlocks() - mem_base);
32972 printf(" %d", n_reader);
32984 test_xmlTextReaderNext(void) {
32987 #if defined(LIBXML_READER_ENABLED)
32990 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32993 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32994 mem_base = xmlMemBlocks();
32995 reader = gen_xmlTextReaderPtr(n_reader, 0);
32997 ret_val = xmlTextReaderNext(reader);
32998 desret_int(ret_val);
33000 des_xmlTextReaderPtr(n_reader, reader, 0);
33001 xmlResetLastError();
33002 if (mem_base != xmlMemBlocks()) {
33003 printf("Leak of %d blocks found in xmlTextReaderNext",
33004 xmlMemBlocks() - mem_base);
33006 printf(" %d", n_reader);
33018 test_xmlTextReaderNextSibling(void) {
33021 #if defined(LIBXML_READER_ENABLED)
33024 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
33027 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
33028 mem_base = xmlMemBlocks();
33029 reader = gen_xmlTextReaderPtr(n_reader, 0);
33031 ret_val = xmlTextReaderNextSibling(reader);
33032 desret_int(ret_val);
33034 des_xmlTextReaderPtr(n_reader, reader, 0);
33035 xmlResetLastError();
33036 if (mem_base != xmlMemBlocks()) {
33037 printf("Leak of %d blocks found in xmlTextReaderNextSibling",
33038 xmlMemBlocks() - mem_base);
33040 printf(" %d", n_reader);
33052 test_xmlTextReaderNodeType(void) {
33055 #if defined(LIBXML_READER_ENABLED)
33058 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
33061 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
33062 mem_base = xmlMemBlocks();
33063 reader = gen_xmlTextReaderPtr(n_reader, 0);
33065 ret_val = xmlTextReaderNodeType(reader);
33066 desret_int(ret_val);
33068 des_xmlTextReaderPtr(n_reader, reader, 0);
33069 xmlResetLastError();
33070 if (mem_base != xmlMemBlocks()) {
33071 printf("Leak of %d blocks found in xmlTextReaderNodeType",
33072 xmlMemBlocks() - mem_base);
33074 printf(" %d", n_reader);
33086 test_xmlTextReaderNormalization(void) {
33089 #if defined(LIBXML_READER_ENABLED)
33092 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
33095 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
33096 mem_base = xmlMemBlocks();
33097 reader = gen_xmlTextReaderPtr(n_reader, 0);
33099 ret_val = xmlTextReaderNormalization(reader);
33100 desret_int(ret_val);
33102 des_xmlTextReaderPtr(n_reader, reader, 0);
33103 xmlResetLastError();
33104 if (mem_base != xmlMemBlocks()) {
33105 printf("Leak of %d blocks found in xmlTextReaderNormalization",
33106 xmlMemBlocks() - mem_base);
33108 printf(" %d", n_reader);
33120 test_xmlTextReaderPrefix(void) {
33123 #if defined(LIBXML_READER_ENABLED)
33126 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
33129 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
33130 mem_base = xmlMemBlocks();
33131 reader = gen_xmlTextReaderPtr(n_reader, 0);
33133 ret_val = xmlTextReaderPrefix(reader);
33134 desret_xmlChar_ptr(ret_val);
33136 des_xmlTextReaderPtr(n_reader, reader, 0);
33137 xmlResetLastError();
33138 if (mem_base != xmlMemBlocks()) {
33139 printf("Leak of %d blocks found in xmlTextReaderPrefix",
33140 xmlMemBlocks() - mem_base);
33142 printf(" %d", n_reader);
33154 test_xmlTextReaderPreserve(void) {
33157 #if defined(LIBXML_READER_ENABLED)
33159 xmlNodePtr ret_val;
33160 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
33163 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
33164 mem_base = xmlMemBlocks();
33165 reader = gen_xmlTextReaderPtr(n_reader, 0);
33167 ret_val = xmlTextReaderPreserve(reader);
33168 desret_xmlNodePtr(ret_val);
33170 des_xmlTextReaderPtr(n_reader, reader, 0);
33171 xmlResetLastError();
33172 if (mem_base != xmlMemBlocks()) {
33173 printf("Leak of %d blocks found in xmlTextReaderPreserve",
33174 xmlMemBlocks() - mem_base);
33176 printf(" %d", n_reader);
33188 test_xmlTextReaderPreservePattern(void) {
33191 #if defined(LIBXML_READER_ENABLED) && defined(LIBXML_PATTERN_ENABLED)
33192 #ifdef LIBXML_PATTERN_ENABLED
33195 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
33197 xmlChar * pattern; /* an XPath subset pattern */
33199 xmlChar ** namespaces; /* the prefix definitions, array of [URI, prefix] or NULL */
33202 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
33203 for (n_pattern = 0;n_pattern < gen_nb_const_xmlChar_ptr;n_pattern++) {
33204 for (n_namespaces = 0;n_namespaces < gen_nb_const_xmlChar_ptr_ptr;n_namespaces++) {
33205 mem_base = xmlMemBlocks();
33206 reader = gen_xmlTextReaderPtr(n_reader, 0);
33207 pattern = gen_const_xmlChar_ptr(n_pattern, 1);
33208 namespaces = gen_const_xmlChar_ptr_ptr(n_namespaces, 2);
33210 ret_val = xmlTextReaderPreservePattern(reader, (const xmlChar *)pattern, (const xmlChar **)namespaces);
33211 desret_int(ret_val);
33213 des_xmlTextReaderPtr(n_reader, reader, 0);
33214 des_const_xmlChar_ptr(n_pattern, (const xmlChar *)pattern, 1);
33215 des_const_xmlChar_ptr_ptr(n_namespaces, (const xmlChar **)namespaces, 2);
33216 xmlResetLastError();
33217 if (mem_base != xmlMemBlocks()) {
33218 printf("Leak of %d blocks found in xmlTextReaderPreservePattern",
33219 xmlMemBlocks() - mem_base);
33221 printf(" %d", n_reader);
33222 printf(" %d", n_pattern);
33223 printf(" %d", n_namespaces);
33238 test_xmlTextReaderQuoteChar(void) {
33241 #if defined(LIBXML_READER_ENABLED)
33244 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
33247 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
33248 mem_base = xmlMemBlocks();
33249 reader = gen_xmlTextReaderPtr(n_reader, 0);
33251 ret_val = xmlTextReaderQuoteChar(reader);
33252 desret_int(ret_val);
33254 des_xmlTextReaderPtr(n_reader, reader, 0);
33255 xmlResetLastError();
33256 if (mem_base != xmlMemBlocks()) {
33257 printf("Leak of %d blocks found in xmlTextReaderQuoteChar",
33258 xmlMemBlocks() - mem_base);
33260 printf(" %d", n_reader);
33272 test_xmlTextReaderRead(void) {
33275 #if defined(LIBXML_READER_ENABLED)
33278 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
33281 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
33282 mem_base = xmlMemBlocks();
33283 reader = gen_xmlTextReaderPtr(n_reader, 0);
33285 ret_val = xmlTextReaderRead(reader);
33286 desret_int(ret_val);
33288 des_xmlTextReaderPtr(n_reader, reader, 0);
33289 xmlResetLastError();
33290 if (mem_base != xmlMemBlocks()) {
33291 printf("Leak of %d blocks found in xmlTextReaderRead",
33292 xmlMemBlocks() - mem_base);
33294 printf(" %d", n_reader);
33306 test_xmlTextReaderReadAttributeValue(void) {
33309 #if defined(LIBXML_READER_ENABLED)
33312 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
33315 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
33316 mem_base = xmlMemBlocks();
33317 reader = gen_xmlTextReaderPtr(n_reader, 0);
33319 ret_val = xmlTextReaderReadAttributeValue(reader);
33320 desret_int(ret_val);
33322 des_xmlTextReaderPtr(n_reader, reader, 0);
33323 xmlResetLastError();
33324 if (mem_base != xmlMemBlocks()) {
33325 printf("Leak of %d blocks found in xmlTextReaderReadAttributeValue",
33326 xmlMemBlocks() - mem_base);
33328 printf(" %d", n_reader);
33340 test_xmlTextReaderReadState(void) {
33343 #if defined(LIBXML_READER_ENABLED)
33346 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
33349 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
33350 mem_base = xmlMemBlocks();
33351 reader = gen_xmlTextReaderPtr(n_reader, 0);
33353 ret_val = xmlTextReaderReadState(reader);
33354 desret_int(ret_val);
33356 des_xmlTextReaderPtr(n_reader, reader, 0);
33357 xmlResetLastError();
33358 if (mem_base != xmlMemBlocks()) {
33359 printf("Leak of %d blocks found in xmlTextReaderReadState",
33360 xmlMemBlocks() - mem_base);
33362 printf(" %d", n_reader);
33374 test_xmlTextReaderRelaxNGSetSchema(void) {
33377 #if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
33380 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
33382 xmlRelaxNGPtr schema; /* a precompiled RelaxNG schema */
33385 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
33386 for (n_schema = 0;n_schema < gen_nb_xmlRelaxNGPtr;n_schema++) {
33387 mem_base = xmlMemBlocks();
33388 reader = gen_xmlTextReaderPtr(n_reader, 0);
33389 schema = gen_xmlRelaxNGPtr(n_schema, 1);
33391 ret_val = xmlTextReaderRelaxNGSetSchema(reader, schema);
33392 desret_int(ret_val);
33394 des_xmlTextReaderPtr(n_reader, reader, 0);
33395 des_xmlRelaxNGPtr(n_schema, schema, 1);
33396 xmlResetLastError();
33397 if (mem_base != xmlMemBlocks()) {
33398 printf("Leak of %d blocks found in xmlTextReaderRelaxNGSetSchema",
33399 xmlMemBlocks() - mem_base);
33401 printf(" %d", n_reader);
33402 printf(" %d", n_schema);
33415 test_xmlTextReaderRelaxNGValidate(void) {
33418 #if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
33421 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
33423 char * rng; /* the path to a RelaxNG schema or NULL */
33426 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
33427 for (n_rng = 0;n_rng < gen_nb_const_char_ptr;n_rng++) {
33428 mem_base = xmlMemBlocks();
33429 reader = gen_xmlTextReaderPtr(n_reader, 0);
33430 rng = gen_const_char_ptr(n_rng, 1);
33432 ret_val = xmlTextReaderRelaxNGValidate(reader, (const char *)rng);
33433 desret_int(ret_val);
33435 des_xmlTextReaderPtr(n_reader, reader, 0);
33436 des_const_char_ptr(n_rng, (const char *)rng, 1);
33437 xmlResetLastError();
33438 if (mem_base != xmlMemBlocks()) {
33439 printf("Leak of %d blocks found in xmlTextReaderRelaxNGValidate",
33440 xmlMemBlocks() - mem_base);
33442 printf(" %d", n_reader);
33443 printf(" %d", n_rng);
33456 test_xmlTextReaderRelaxNGValidateCtxt(void) {
33459 #if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
33462 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
33464 xmlRelaxNGValidCtxtPtr ctxt; /* the RelaxNG schema validation context or NULL */
33466 int options; /* options (not used yet) */
33469 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
33470 for (n_ctxt = 0;n_ctxt < gen_nb_xmlRelaxNGValidCtxtPtr;n_ctxt++) {
33471 for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
33472 mem_base = xmlMemBlocks();
33473 reader = gen_xmlTextReaderPtr(n_reader, 0);
33474 ctxt = gen_xmlRelaxNGValidCtxtPtr(n_ctxt, 1);
33475 options = gen_parseroptions(n_options, 2);
33477 ret_val = xmlTextReaderRelaxNGValidateCtxt(reader, ctxt, options);
33478 desret_int(ret_val);
33480 des_xmlTextReaderPtr(n_reader, reader, 0);
33481 des_xmlRelaxNGValidCtxtPtr(n_ctxt, ctxt, 1);
33482 des_parseroptions(n_options, options, 2);
33483 xmlResetLastError();
33484 if (mem_base != xmlMemBlocks()) {
33485 printf("Leak of %d blocks found in xmlTextReaderRelaxNGValidateCtxt",
33486 xmlMemBlocks() - mem_base);
33488 printf(" %d", n_reader);
33489 printf(" %d", n_ctxt);
33490 printf(" %d", n_options);
33504 test_xmlTextReaderSchemaValidate(void) {
33507 #if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
33509 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
33511 char * xsd; /* the path to a W3C XSD schema or NULL */
33514 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
33515 for (n_xsd = 0;n_xsd < gen_nb_const_char_ptr;n_xsd++) {
33516 reader = gen_xmlTextReaderPtr(n_reader, 0);
33517 xsd = gen_const_char_ptr(n_xsd, 1);
33519 ret_val = xmlTextReaderSchemaValidate(reader, (const char *)xsd);
33520 desret_int(ret_val);
33522 des_xmlTextReaderPtr(n_reader, reader, 0);
33523 des_const_char_ptr(n_xsd, (const char *)xsd, 1);
33524 xmlResetLastError();
33535 test_xmlTextReaderSchemaValidateCtxt(void) {
33538 #if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
33541 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
33543 xmlSchemaValidCtxtPtr ctxt; /* the XML Schema validation context or NULL */
33545 int options; /* options (not used yet) */
33548 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
33549 for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) {
33550 for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
33551 mem_base = xmlMemBlocks();
33552 reader = gen_xmlTextReaderPtr(n_reader, 0);
33553 ctxt = gen_xmlSchemaValidCtxtPtr(n_ctxt, 1);
33554 options = gen_parseroptions(n_options, 2);
33556 ret_val = xmlTextReaderSchemaValidateCtxt(reader, ctxt, options);
33557 desret_int(ret_val);
33559 des_xmlTextReaderPtr(n_reader, reader, 0);
33560 des_xmlSchemaValidCtxtPtr(n_ctxt, ctxt, 1);
33561 des_parseroptions(n_options, options, 2);
33562 xmlResetLastError();
33563 if (mem_base != xmlMemBlocks()) {
33564 printf("Leak of %d blocks found in xmlTextReaderSchemaValidateCtxt",
33565 xmlMemBlocks() - mem_base);
33567 printf(" %d", n_reader);
33568 printf(" %d", n_ctxt);
33569 printf(" %d", n_options);
33583 test_xmlTextReaderSetErrorHandler(void) {
33587 /* missing type support */
33593 test_xmlTextReaderSetParserProp(void) {
33596 #if defined(LIBXML_READER_ENABLED)
33599 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
33601 int prop; /* the xmlParserProperties to set */
33603 int value; /* usually 0 or 1 to (de)activate it */
33606 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
33607 for (n_prop = 0;n_prop < gen_nb_int;n_prop++) {
33608 for (n_value = 0;n_value < gen_nb_int;n_value++) {
33609 mem_base = xmlMemBlocks();
33610 reader = gen_xmlTextReaderPtr(n_reader, 0);
33611 prop = gen_int(n_prop, 1);
33612 value = gen_int(n_value, 2);
33614 ret_val = xmlTextReaderSetParserProp(reader, prop, value);
33615 desret_int(ret_val);
33617 des_xmlTextReaderPtr(n_reader, reader, 0);
33618 des_int(n_prop, prop, 1);
33619 des_int(n_value, value, 2);
33620 xmlResetLastError();
33621 if (mem_base != xmlMemBlocks()) {
33622 printf("Leak of %d blocks found in xmlTextReaderSetParserProp",
33623 xmlMemBlocks() - mem_base);
33625 printf(" %d", n_reader);
33626 printf(" %d", n_prop);
33627 printf(" %d", n_value);
33641 test_xmlTextReaderSetSchema(void) {
33644 #if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
33647 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
33649 xmlSchemaPtr schema; /* a precompiled Schema schema */
33652 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
33653 for (n_schema = 0;n_schema < gen_nb_xmlSchemaPtr;n_schema++) {
33654 mem_base = xmlMemBlocks();
33655 reader = gen_xmlTextReaderPtr(n_reader, 0);
33656 schema = gen_xmlSchemaPtr(n_schema, 1);
33658 ret_val = xmlTextReaderSetSchema(reader, schema);
33659 desret_int(ret_val);
33661 des_xmlTextReaderPtr(n_reader, reader, 0);
33662 des_xmlSchemaPtr(n_schema, schema, 1);
33663 xmlResetLastError();
33664 if (mem_base != xmlMemBlocks()) {
33665 printf("Leak of %d blocks found in xmlTextReaderSetSchema",
33666 xmlMemBlocks() - mem_base);
33668 printf(" %d", n_reader);
33669 printf(" %d", n_schema);
33682 test_xmlTextReaderSetStructuredErrorHandler(void) {
33686 /* missing type support */
33692 test_xmlTextReaderSetup(void) {
33695 #if defined(LIBXML_READER_ENABLED)
33698 xmlTextReaderPtr reader; /* an XML reader */
33700 xmlParserInputBufferPtr input; /* xmlParserInputBufferPtr used to feed the reader, will be destroyed with it. */
33702 const char * URL; /* the base URL to use for the document */
33704 char * encoding; /* the document encoding, or NULL */
33706 int options; /* a combination of xmlParserOption */
33709 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
33710 for (n_input = 0;n_input < gen_nb_xmlParserInputBufferPtr;n_input++) {
33711 for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
33712 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
33713 for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
33714 mem_base = xmlMemBlocks();
33715 reader = gen_xmlTextReaderPtr(n_reader, 0);
33716 input = gen_xmlParserInputBufferPtr(n_input, 1);
33717 URL = gen_filepath(n_URL, 2);
33718 encoding = gen_const_char_ptr(n_encoding, 3);
33719 options = gen_parseroptions(n_options, 4);
33721 ret_val = xmlTextReaderSetup(reader, input, URL, (const char *)encoding, options);
33722 desret_int(ret_val);
33724 des_xmlTextReaderPtr(n_reader, reader, 0);
33725 des_filepath(n_URL, URL, 2);
33726 des_const_char_ptr(n_encoding, (const char *)encoding, 3);
33727 des_parseroptions(n_options, options, 4);
33728 xmlResetLastError();
33729 if (mem_base != xmlMemBlocks()) {
33730 printf("Leak of %d blocks found in xmlTextReaderSetup",
33731 xmlMemBlocks() - mem_base);
33733 printf(" %d", n_reader);
33734 printf(" %d", n_input);
33735 printf(" %d", n_URL);
33736 printf(" %d", n_encoding);
33737 printf(" %d", n_options);
33753 test_xmlTextReaderStandalone(void) {
33756 #if defined(LIBXML_READER_ENABLED)
33759 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
33762 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
33763 mem_base = xmlMemBlocks();
33764 reader = gen_xmlTextReaderPtr(n_reader, 0);
33766 ret_val = xmlTextReaderStandalone(reader);
33767 desret_int(ret_val);
33769 des_xmlTextReaderPtr(n_reader, reader, 0);
33770 xmlResetLastError();
33771 if (mem_base != xmlMemBlocks()) {
33772 printf("Leak of %d blocks found in xmlTextReaderStandalone",
33773 xmlMemBlocks() - mem_base);
33775 printf(" %d", n_reader);
33787 test_xmlTextReaderValue(void) {
33790 #if defined(LIBXML_READER_ENABLED)
33793 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
33796 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
33797 mem_base = xmlMemBlocks();
33798 reader = gen_xmlTextReaderPtr(n_reader, 0);
33800 ret_val = xmlTextReaderValue(reader);
33801 desret_xmlChar_ptr(ret_val);
33803 des_xmlTextReaderPtr(n_reader, reader, 0);
33804 xmlResetLastError();
33805 if (mem_base != xmlMemBlocks()) {
33806 printf("Leak of %d blocks found in xmlTextReaderValue",
33807 xmlMemBlocks() - mem_base);
33809 printf(" %d", n_reader);
33821 test_xmlTextReaderXmlLang(void) {
33824 #if defined(LIBXML_READER_ENABLED)
33827 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
33830 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
33831 mem_base = xmlMemBlocks();
33832 reader = gen_xmlTextReaderPtr(n_reader, 0);
33834 ret_val = xmlTextReaderXmlLang(reader);
33835 desret_xmlChar_ptr(ret_val);
33837 des_xmlTextReaderPtr(n_reader, reader, 0);
33838 xmlResetLastError();
33839 if (mem_base != xmlMemBlocks()) {
33840 printf("Leak of %d blocks found in xmlTextReaderXmlLang",
33841 xmlMemBlocks() - mem_base);
33843 printf(" %d", n_reader);
33854 test_xmlreader(void) {
33858 if (quiet == 0) printf("Testing xmlreader : 76 of 86 functions ...\n");
33859 rc = test_xmlNewTextReader();
33860 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33861 rc = test_xmlNewTextReaderFilename();
33862 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33863 rc = test_xmlReaderForDoc();
33864 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33865 rc = test_xmlReaderForFile();
33866 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33867 rc = test_xmlReaderForMemory();
33868 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33869 rc = test_xmlReaderNewDoc();
33870 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33871 rc = test_xmlReaderNewFile();
33872 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33873 rc = test_xmlReaderNewMemory();
33874 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33875 rc = test_xmlReaderNewWalker();
33876 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33877 rc = test_xmlReaderWalker();
33878 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33879 rc = test_xmlTextReaderAttributeCount();
33880 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33881 rc = test_xmlTextReaderBaseUri();
33882 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33883 rc = test_xmlTextReaderByteConsumed();
33884 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33885 rc = test_xmlTextReaderClose();
33886 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33887 rc = test_xmlTextReaderConstBaseUri();
33888 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33889 rc = test_xmlTextReaderConstEncoding();
33890 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33891 rc = test_xmlTextReaderConstLocalName();
33892 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33893 rc = test_xmlTextReaderConstName();
33894 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33895 rc = test_xmlTextReaderConstNamespaceUri();
33896 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33897 rc = test_xmlTextReaderConstPrefix();
33898 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33899 rc = test_xmlTextReaderConstString();
33900 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33901 rc = test_xmlTextReaderConstValue();
33902 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33903 rc = test_xmlTextReaderConstXmlLang();
33904 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33905 rc = test_xmlTextReaderConstXmlVersion();
33906 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33907 rc = test_xmlTextReaderCurrentDoc();
33908 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33909 rc = test_xmlTextReaderCurrentNode();
33910 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33911 rc = test_xmlTextReaderDepth();
33912 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33913 rc = test_xmlTextReaderExpand();
33914 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33915 rc = test_xmlTextReaderGetAttribute();
33916 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33917 rc = test_xmlTextReaderGetAttributeNo();
33918 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33919 rc = test_xmlTextReaderGetAttributeNs();
33920 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33921 rc = test_xmlTextReaderGetErrorHandler();
33922 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33923 rc = test_xmlTextReaderGetParserColumnNumber();
33924 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33925 rc = test_xmlTextReaderGetParserLineNumber();
33926 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33927 rc = test_xmlTextReaderGetParserProp();
33928 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33929 rc = test_xmlTextReaderGetRemainder();
33930 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33931 rc = test_xmlTextReaderHasAttributes();
33932 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33933 rc = test_xmlTextReaderHasValue();
33934 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33935 rc = test_xmlTextReaderIsDefault();
33936 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33937 rc = test_xmlTextReaderIsEmptyElement();
33938 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33939 rc = test_xmlTextReaderIsNamespaceDecl();
33940 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33941 rc = test_xmlTextReaderIsValid();
33942 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33943 rc = test_xmlTextReaderLocalName();
33944 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33945 rc = test_xmlTextReaderLocatorBaseURI();
33946 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33947 rc = test_xmlTextReaderLocatorLineNumber();
33948 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33949 rc = test_xmlTextReaderLookupNamespace();
33950 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33951 rc = test_xmlTextReaderMoveToAttribute();
33952 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33953 rc = test_xmlTextReaderMoveToAttributeNo();
33954 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33955 rc = test_xmlTextReaderMoveToAttributeNs();
33956 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33957 rc = test_xmlTextReaderMoveToElement();
33958 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33959 rc = test_xmlTextReaderMoveToFirstAttribute();
33960 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33961 rc = test_xmlTextReaderMoveToNextAttribute();
33962 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33963 rc = test_xmlTextReaderName();
33964 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33965 rc = test_xmlTextReaderNamespaceUri();
33966 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33967 rc = test_xmlTextReaderNext();
33968 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33969 rc = test_xmlTextReaderNextSibling();
33970 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33971 rc = test_xmlTextReaderNodeType();
33972 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33973 rc = test_xmlTextReaderNormalization();
33974 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33975 rc = test_xmlTextReaderPrefix();
33976 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33977 rc = test_xmlTextReaderPreserve();
33978 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33979 rc = test_xmlTextReaderPreservePattern();
33980 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33981 rc = test_xmlTextReaderQuoteChar();
33982 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33983 rc = test_xmlTextReaderRead();
33984 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33985 rc = test_xmlTextReaderReadAttributeValue();
33986 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33987 rc = test_xmlTextReaderReadState();
33988 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33989 rc = test_xmlTextReaderRelaxNGSetSchema();
33990 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33991 rc = test_xmlTextReaderRelaxNGValidate();
33992 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33993 rc = test_xmlTextReaderRelaxNGValidateCtxt();
33994 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33995 rc = test_xmlTextReaderSchemaValidate();
33996 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33997 rc = test_xmlTextReaderSchemaValidateCtxt();
33998 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33999 rc = test_xmlTextReaderSetErrorHandler();
34000 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34001 rc = test_xmlTextReaderSetParserProp();
34002 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34003 rc = test_xmlTextReaderSetSchema();
34004 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34005 rc = test_xmlTextReaderSetStructuredErrorHandler();
34006 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34007 rc = test_xmlTextReaderSetup();
34008 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34009 rc = test_xmlTextReaderStandalone();
34010 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34011 rc = test_xmlTextReaderValue();
34012 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34013 rc = test_xmlTextReaderXmlLang();
34014 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34017 printf("Module xmlreader: %d errors\n", test_ret);
34022 test_xmlExpCtxtNbCons(void) {
34025 #if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
34028 xmlExpCtxtPtr ctxt; /* an expression context */
34031 for (n_ctxt = 0;n_ctxt < gen_nb_xmlExpCtxtPtr;n_ctxt++) {
34032 mem_base = xmlMemBlocks();
34033 ctxt = gen_xmlExpCtxtPtr(n_ctxt, 0);
34035 ret_val = xmlExpCtxtNbCons(ctxt);
34036 desret_int(ret_val);
34038 des_xmlExpCtxtPtr(n_ctxt, ctxt, 0);
34039 xmlResetLastError();
34040 if (mem_base != xmlMemBlocks()) {
34041 printf("Leak of %d blocks found in xmlExpCtxtNbCons",
34042 xmlMemBlocks() - mem_base);
34044 printf(" %d", n_ctxt);
34056 test_xmlExpCtxtNbNodes(void) {
34059 #if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
34062 xmlExpCtxtPtr ctxt; /* an expression context */
34065 for (n_ctxt = 0;n_ctxt < gen_nb_xmlExpCtxtPtr;n_ctxt++) {
34066 mem_base = xmlMemBlocks();
34067 ctxt = gen_xmlExpCtxtPtr(n_ctxt, 0);
34069 ret_val = xmlExpCtxtNbNodes(ctxt);
34070 desret_int(ret_val);
34072 des_xmlExpCtxtPtr(n_ctxt, ctxt, 0);
34073 xmlResetLastError();
34074 if (mem_base != xmlMemBlocks()) {
34075 printf("Leak of %d blocks found in xmlExpCtxtNbNodes",
34076 xmlMemBlocks() - mem_base);
34078 printf(" %d", n_ctxt);
34090 test_xmlExpDump(void) {
34093 #if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
34095 xmlBufferPtr buf; /* a buffer to receive the output */
34097 xmlExpNodePtr expr; /* the compiled expression */
34100 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
34101 for (n_expr = 0;n_expr < gen_nb_xmlExpNodePtr;n_expr++) {
34102 mem_base = xmlMemBlocks();
34103 buf = gen_xmlBufferPtr(n_buf, 0);
34104 expr = gen_xmlExpNodePtr(n_expr, 1);
34106 xmlExpDump(buf, expr);
34108 des_xmlBufferPtr(n_buf, buf, 0);
34109 des_xmlExpNodePtr(n_expr, expr, 1);
34110 xmlResetLastError();
34111 if (mem_base != xmlMemBlocks()) {
34112 printf("Leak of %d blocks found in xmlExpDump",
34113 xmlMemBlocks() - mem_base);
34115 printf(" %d", n_buf);
34116 printf(" %d", n_expr);
34129 test_xmlExpExpDerive(void) {
34133 /* missing type support */
34139 test_xmlExpGetLanguage(void) {
34142 #if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
34145 xmlExpCtxtPtr ctxt; /* the expression context */
34147 xmlExpNodePtr exp; /* the expression */
34149 xmlChar ** langList; /* where to store the tokens */
34151 int len; /* the allocated length of @list */
34154 for (n_ctxt = 0;n_ctxt < gen_nb_xmlExpCtxtPtr;n_ctxt++) {
34155 for (n_exp = 0;n_exp < gen_nb_xmlExpNodePtr;n_exp++) {
34156 for (n_langList = 0;n_langList < gen_nb_const_xmlChar_ptr_ptr;n_langList++) {
34157 for (n_len = 0;n_len < gen_nb_int;n_len++) {
34158 mem_base = xmlMemBlocks();
34159 ctxt = gen_xmlExpCtxtPtr(n_ctxt, 0);
34160 exp = gen_xmlExpNodePtr(n_exp, 1);
34161 langList = gen_const_xmlChar_ptr_ptr(n_langList, 2);
34162 len = gen_int(n_len, 3);
34164 ret_val = xmlExpGetLanguage(ctxt, exp, (const xmlChar **)langList, len);
34165 desret_int(ret_val);
34167 des_xmlExpCtxtPtr(n_ctxt, ctxt, 0);
34168 des_xmlExpNodePtr(n_exp, exp, 1);
34169 des_const_xmlChar_ptr_ptr(n_langList, (const xmlChar **)langList, 2);
34170 des_int(n_len, len, 3);
34171 xmlResetLastError();
34172 if (mem_base != xmlMemBlocks()) {
34173 printf("Leak of %d blocks found in xmlExpGetLanguage",
34174 xmlMemBlocks() - mem_base);
34176 printf(" %d", n_ctxt);
34177 printf(" %d", n_exp);
34178 printf(" %d", n_langList);
34179 printf(" %d", n_len);
34194 test_xmlExpGetStart(void) {
34197 #if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
34200 xmlExpCtxtPtr ctxt; /* the expression context */
34202 xmlExpNodePtr exp; /* the expression */
34204 xmlChar ** tokList; /* where to store the tokens */
34206 int len; /* the allocated length of @list */
34209 for (n_ctxt = 0;n_ctxt < gen_nb_xmlExpCtxtPtr;n_ctxt++) {
34210 for (n_exp = 0;n_exp < gen_nb_xmlExpNodePtr;n_exp++) {
34211 for (n_tokList = 0;n_tokList < gen_nb_const_xmlChar_ptr_ptr;n_tokList++) {
34212 for (n_len = 0;n_len < gen_nb_int;n_len++) {
34213 mem_base = xmlMemBlocks();
34214 ctxt = gen_xmlExpCtxtPtr(n_ctxt, 0);
34215 exp = gen_xmlExpNodePtr(n_exp, 1);
34216 tokList = gen_const_xmlChar_ptr_ptr(n_tokList, 2);
34217 len = gen_int(n_len, 3);
34219 ret_val = xmlExpGetStart(ctxt, exp, (const xmlChar **)tokList, len);
34220 desret_int(ret_val);
34222 des_xmlExpCtxtPtr(n_ctxt, ctxt, 0);
34223 des_xmlExpNodePtr(n_exp, exp, 1);
34224 des_const_xmlChar_ptr_ptr(n_tokList, (const xmlChar **)tokList, 2);
34225 des_int(n_len, len, 3);
34226 xmlResetLastError();
34227 if (mem_base != xmlMemBlocks()) {
34228 printf("Leak of %d blocks found in xmlExpGetStart",
34229 xmlMemBlocks() - mem_base);
34231 printf(" %d", n_ctxt);
34232 printf(" %d", n_exp);
34233 printf(" %d", n_tokList);
34234 printf(" %d", n_len);
34249 test_xmlExpIsNillable(void) {
34252 #if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
34255 xmlExpNodePtr exp; /* the expression */
34258 for (n_exp = 0;n_exp < gen_nb_xmlExpNodePtr;n_exp++) {
34259 mem_base = xmlMemBlocks();
34260 exp = gen_xmlExpNodePtr(n_exp, 0);
34262 ret_val = xmlExpIsNillable(exp);
34263 desret_int(ret_val);
34265 des_xmlExpNodePtr(n_exp, exp, 0);
34266 xmlResetLastError();
34267 if (mem_base != xmlMemBlocks()) {
34268 printf("Leak of %d blocks found in xmlExpIsNillable",
34269 xmlMemBlocks() - mem_base);
34271 printf(" %d", n_exp);
34283 test_xmlExpMaxToken(void) {
34286 #if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
34289 xmlExpNodePtr expr; /* a compiled expression */
34292 for (n_expr = 0;n_expr < gen_nb_xmlExpNodePtr;n_expr++) {
34293 mem_base = xmlMemBlocks();
34294 expr = gen_xmlExpNodePtr(n_expr, 0);
34296 ret_val = xmlExpMaxToken(expr);
34297 desret_int(ret_val);
34299 des_xmlExpNodePtr(n_expr, expr, 0);
34300 xmlResetLastError();
34301 if (mem_base != xmlMemBlocks()) {
34302 printf("Leak of %d blocks found in xmlExpMaxToken",
34303 xmlMemBlocks() - mem_base);
34305 printf(" %d", n_expr);
34317 test_xmlExpNewAtom(void) {
34321 /* missing type support */
34327 test_xmlExpNewCtxt(void) {
34331 /* missing type support */
34337 test_xmlExpNewOr(void) {
34341 /* missing type support */
34347 test_xmlExpNewRange(void) {
34351 /* missing type support */
34357 test_xmlExpNewSeq(void) {
34361 /* missing type support */
34367 test_xmlExpParse(void) {
34371 /* missing type support */
34377 test_xmlExpRef(void) {
34380 #if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
34382 xmlExpNodePtr exp; /* the expression */
34385 for (n_exp = 0;n_exp < gen_nb_xmlExpNodePtr;n_exp++) {
34386 mem_base = xmlMemBlocks();
34387 exp = gen_xmlExpNodePtr(n_exp, 0);
34391 des_xmlExpNodePtr(n_exp, exp, 0);
34392 xmlResetLastError();
34393 if (mem_base != xmlMemBlocks()) {
34394 printf("Leak of %d blocks found in xmlExpRef",
34395 xmlMemBlocks() - mem_base);
34397 printf(" %d", n_exp);
34409 test_xmlExpStringDerive(void) {
34413 /* missing type support */
34419 test_xmlExpSubsume(void) {
34422 #if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
34425 xmlExpCtxtPtr ctxt; /* the expressions context */
34427 xmlExpNodePtr exp; /* the englobing expression */
34429 xmlExpNodePtr sub; /* the subexpression */
34432 for (n_ctxt = 0;n_ctxt < gen_nb_xmlExpCtxtPtr;n_ctxt++) {
34433 for (n_exp = 0;n_exp < gen_nb_xmlExpNodePtr;n_exp++) {
34434 for (n_sub = 0;n_sub < gen_nb_xmlExpNodePtr;n_sub++) {
34435 mem_base = xmlMemBlocks();
34436 ctxt = gen_xmlExpCtxtPtr(n_ctxt, 0);
34437 exp = gen_xmlExpNodePtr(n_exp, 1);
34438 sub = gen_xmlExpNodePtr(n_sub, 2);
34440 ret_val = xmlExpSubsume(ctxt, exp, sub);
34441 desret_int(ret_val);
34443 des_xmlExpCtxtPtr(n_ctxt, ctxt, 0);
34444 des_xmlExpNodePtr(n_exp, exp, 1);
34445 des_xmlExpNodePtr(n_sub, sub, 2);
34446 xmlResetLastError();
34447 if (mem_base != xmlMemBlocks()) {
34448 printf("Leak of %d blocks found in xmlExpSubsume",
34449 xmlMemBlocks() - mem_base);
34451 printf(" %d", n_ctxt);
34452 printf(" %d", n_exp);
34453 printf(" %d", n_sub);
34465 #ifdef LIBXML_REGEXP_ENABLED
34467 #define gen_nb_xmlRegExecCtxtPtr 1
34468 static xmlRegExecCtxtPtr gen_xmlRegExecCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
34471 static void des_xmlRegExecCtxtPtr(int no ATTRIBUTE_UNUSED, xmlRegExecCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
34477 test_xmlRegExecErrInfo(void) {
34480 #if defined(LIBXML_REGEXP_ENABLED)
34483 xmlRegExecCtxtPtr exec; /* a regexp execution context generating an error */
34485 xmlChar ** string; /* return value for the error string */
34487 int * nbval; /* pointer to the number of accepted values IN/OUT */
34489 int * nbneg; /* return number of negative transitions */
34491 xmlChar ** values; /* pointer to the array of acceptable values */
34493 int * terminal; /* return value if this was a terminal state */
34496 for (n_exec = 0;n_exec < gen_nb_xmlRegExecCtxtPtr;n_exec++) {
34497 for (n_string = 0;n_string < gen_nb_const_xmlChar_ptr_ptr;n_string++) {
34498 for (n_nbval = 0;n_nbval < gen_nb_int_ptr;n_nbval++) {
34499 for (n_nbneg = 0;n_nbneg < gen_nb_int_ptr;n_nbneg++) {
34500 for (n_values = 0;n_values < gen_nb_xmlChar_ptr_ptr;n_values++) {
34501 for (n_terminal = 0;n_terminal < gen_nb_int_ptr;n_terminal++) {
34502 mem_base = xmlMemBlocks();
34503 exec = gen_xmlRegExecCtxtPtr(n_exec, 0);
34504 string = gen_const_xmlChar_ptr_ptr(n_string, 1);
34505 nbval = gen_int_ptr(n_nbval, 2);
34506 nbneg = gen_int_ptr(n_nbneg, 3);
34507 values = gen_xmlChar_ptr_ptr(n_values, 4);
34508 terminal = gen_int_ptr(n_terminal, 5);
34510 ret_val = xmlRegExecErrInfo(exec, (const xmlChar **)string, nbval, nbneg, values, terminal);
34511 desret_int(ret_val);
34513 des_xmlRegExecCtxtPtr(n_exec, exec, 0);
34514 des_const_xmlChar_ptr_ptr(n_string, (const xmlChar **)string, 1);
34515 des_int_ptr(n_nbval, nbval, 2);
34516 des_int_ptr(n_nbneg, nbneg, 3);
34517 des_xmlChar_ptr_ptr(n_values, values, 4);
34518 des_int_ptr(n_terminal, terminal, 5);
34519 xmlResetLastError();
34520 if (mem_base != xmlMemBlocks()) {
34521 printf("Leak of %d blocks found in xmlRegExecErrInfo",
34522 xmlMemBlocks() - mem_base);
34524 printf(" %d", n_exec);
34525 printf(" %d", n_string);
34526 printf(" %d", n_nbval);
34527 printf(" %d", n_nbneg);
34528 printf(" %d", n_values);
34529 printf(" %d", n_terminal);
34546 test_xmlRegExecNextValues(void) {
34549 #if defined(LIBXML_REGEXP_ENABLED)
34552 xmlRegExecCtxtPtr exec; /* a regexp execution context */
34554 int * nbval; /* pointer to the number of accepted values IN/OUT */
34556 int * nbneg; /* return number of negative transitions */
34558 xmlChar ** values; /* pointer to the array of acceptable values */
34560 int * terminal; /* return value if this was a terminal state */
34563 for (n_exec = 0;n_exec < gen_nb_xmlRegExecCtxtPtr;n_exec++) {
34564 for (n_nbval = 0;n_nbval < gen_nb_int_ptr;n_nbval++) {
34565 for (n_nbneg = 0;n_nbneg < gen_nb_int_ptr;n_nbneg++) {
34566 for (n_values = 0;n_values < gen_nb_xmlChar_ptr_ptr;n_values++) {
34567 for (n_terminal = 0;n_terminal < gen_nb_int_ptr;n_terminal++) {
34568 mem_base = xmlMemBlocks();
34569 exec = gen_xmlRegExecCtxtPtr(n_exec, 0);
34570 nbval = gen_int_ptr(n_nbval, 1);
34571 nbneg = gen_int_ptr(n_nbneg, 2);
34572 values = gen_xmlChar_ptr_ptr(n_values, 3);
34573 terminal = gen_int_ptr(n_terminal, 4);
34575 ret_val = xmlRegExecNextValues(exec, nbval, nbneg, values, terminal);
34576 desret_int(ret_val);
34578 des_xmlRegExecCtxtPtr(n_exec, exec, 0);
34579 des_int_ptr(n_nbval, nbval, 1);
34580 des_int_ptr(n_nbneg, nbneg, 2);
34581 des_xmlChar_ptr_ptr(n_values, values, 3);
34582 des_int_ptr(n_terminal, terminal, 4);
34583 xmlResetLastError();
34584 if (mem_base != xmlMemBlocks()) {
34585 printf("Leak of %d blocks found in xmlRegExecNextValues",
34586 xmlMemBlocks() - mem_base);
34588 printf(" %d", n_exec);
34589 printf(" %d", n_nbval);
34590 printf(" %d", n_nbneg);
34591 printf(" %d", n_values);
34592 printf(" %d", n_terminal);
34608 test_xmlRegExecPushString(void) {
34611 #if defined(LIBXML_REGEXP_ENABLED)
34614 xmlRegExecCtxtPtr exec; /* a regexp execution context or NULL to indicate the end */
34616 xmlChar * value; /* a string token input */
34618 void * data; /* data associated to the token to reuse in callbacks */
34621 for (n_exec = 0;n_exec < gen_nb_xmlRegExecCtxtPtr;n_exec++) {
34622 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
34623 for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
34624 mem_base = xmlMemBlocks();
34625 exec = gen_xmlRegExecCtxtPtr(n_exec, 0);
34626 value = gen_const_xmlChar_ptr(n_value, 1);
34627 data = gen_userdata(n_data, 2);
34629 ret_val = xmlRegExecPushString(exec, (const xmlChar *)value, data);
34630 desret_int(ret_val);
34632 des_xmlRegExecCtxtPtr(n_exec, exec, 0);
34633 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 1);
34634 des_userdata(n_data, data, 2);
34635 xmlResetLastError();
34636 if (mem_base != xmlMemBlocks()) {
34637 printf("Leak of %d blocks found in xmlRegExecPushString",
34638 xmlMemBlocks() - mem_base);
34640 printf(" %d", n_exec);
34641 printf(" %d", n_value);
34642 printf(" %d", n_data);
34656 test_xmlRegExecPushString2(void) {
34659 #if defined(LIBXML_REGEXP_ENABLED)
34662 xmlRegExecCtxtPtr exec; /* a regexp execution context or NULL to indicate the end */
34664 xmlChar * value; /* the first string token input */
34666 xmlChar * value2; /* the second string token input */
34668 void * data; /* data associated to the token to reuse in callbacks */
34671 for (n_exec = 0;n_exec < gen_nb_xmlRegExecCtxtPtr;n_exec++) {
34672 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
34673 for (n_value2 = 0;n_value2 < gen_nb_const_xmlChar_ptr;n_value2++) {
34674 for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
34675 mem_base = xmlMemBlocks();
34676 exec = gen_xmlRegExecCtxtPtr(n_exec, 0);
34677 value = gen_const_xmlChar_ptr(n_value, 1);
34678 value2 = gen_const_xmlChar_ptr(n_value2, 2);
34679 data = gen_userdata(n_data, 3);
34681 ret_val = xmlRegExecPushString2(exec, (const xmlChar *)value, (const xmlChar *)value2, data);
34682 desret_int(ret_val);
34684 des_xmlRegExecCtxtPtr(n_exec, exec, 0);
34685 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 1);
34686 des_const_xmlChar_ptr(n_value2, (const xmlChar *)value2, 2);
34687 des_userdata(n_data, data, 3);
34688 xmlResetLastError();
34689 if (mem_base != xmlMemBlocks()) {
34690 printf("Leak of %d blocks found in xmlRegExecPushString2",
34691 xmlMemBlocks() - mem_base);
34693 printf(" %d", n_exec);
34694 printf(" %d", n_value);
34695 printf(" %d", n_value2);
34696 printf(" %d", n_data);
34709 #ifdef LIBXML_REGEXP_ENABLED
34711 #define gen_nb_xmlRegexpPtr 1
34712 static xmlRegexpPtr gen_xmlRegexpPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
34715 static void des_xmlRegexpPtr(int no ATTRIBUTE_UNUSED, xmlRegexpPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
34721 test_xmlRegNewExecCtxt(void) {
34725 /* missing type support */
34731 test_xmlRegexpCompile(void) {
34735 /* missing type support */
34741 test_xmlRegexpExec(void) {
34744 #if defined(LIBXML_REGEXP_ENABLED)
34747 xmlRegexpPtr comp; /* the compiled regular expression */
34749 xmlChar * content; /* the value to check against the regular expression */
34752 for (n_comp = 0;n_comp < gen_nb_xmlRegexpPtr;n_comp++) {
34753 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
34754 mem_base = xmlMemBlocks();
34755 comp = gen_xmlRegexpPtr(n_comp, 0);
34756 content = gen_const_xmlChar_ptr(n_content, 1);
34758 ret_val = xmlRegexpExec(comp, (const xmlChar *)content);
34759 desret_int(ret_val);
34761 des_xmlRegexpPtr(n_comp, comp, 0);
34762 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
34763 xmlResetLastError();
34764 if (mem_base != xmlMemBlocks()) {
34765 printf("Leak of %d blocks found in xmlRegexpExec",
34766 xmlMemBlocks() - mem_base);
34768 printf(" %d", n_comp);
34769 printf(" %d", n_content);
34782 test_xmlRegexpIsDeterminist(void) {
34785 #if defined(LIBXML_REGEXP_ENABLED)
34788 xmlRegexpPtr comp; /* the compiled regular expression */
34791 for (n_comp = 0;n_comp < gen_nb_xmlRegexpPtr;n_comp++) {
34792 mem_base = xmlMemBlocks();
34793 comp = gen_xmlRegexpPtr(n_comp, 0);
34795 ret_val = xmlRegexpIsDeterminist(comp);
34796 desret_int(ret_val);
34798 des_xmlRegexpPtr(n_comp, comp, 0);
34799 xmlResetLastError();
34800 if (mem_base != xmlMemBlocks()) {
34801 printf("Leak of %d blocks found in xmlRegexpIsDeterminist",
34802 xmlMemBlocks() - mem_base);
34804 printf(" %d", n_comp);
34816 test_xmlRegexpPrint(void) {
34819 #if defined(LIBXML_REGEXP_ENABLED)
34821 FILE * output; /* the file for the output debug */
34823 xmlRegexpPtr regexp; /* the compiled regexp */
34826 for (n_output = 0;n_output < gen_nb_FILE_ptr;n_output++) {
34827 for (n_regexp = 0;n_regexp < gen_nb_xmlRegexpPtr;n_regexp++) {
34828 mem_base = xmlMemBlocks();
34829 output = gen_FILE_ptr(n_output, 0);
34830 regexp = gen_xmlRegexpPtr(n_regexp, 1);
34832 xmlRegexpPrint(output, regexp);
34834 des_FILE_ptr(n_output, output, 0);
34835 des_xmlRegexpPtr(n_regexp, regexp, 1);
34836 xmlResetLastError();
34837 if (mem_base != xmlMemBlocks()) {
34838 printf("Leak of %d blocks found in xmlRegexpPrint",
34839 xmlMemBlocks() - mem_base);
34841 printf(" %d", n_output);
34842 printf(" %d", n_regexp);
34854 test_xmlregexp(void) {
34858 if (quiet == 0) printf("Testing xmlregexp : 16 of 30 functions ...\n");
34859 rc = test_xmlExpCtxtNbCons();
34860 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34861 rc = test_xmlExpCtxtNbNodes();
34862 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34863 rc = test_xmlExpDump();
34864 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34865 rc = test_xmlExpExpDerive();
34866 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34867 rc = test_xmlExpGetLanguage();
34868 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34869 rc = test_xmlExpGetStart();
34870 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34871 rc = test_xmlExpIsNillable();
34872 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34873 rc = test_xmlExpMaxToken();
34874 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34875 rc = test_xmlExpNewAtom();
34876 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34877 rc = test_xmlExpNewCtxt();
34878 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34879 rc = test_xmlExpNewOr();
34880 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34881 rc = test_xmlExpNewRange();
34882 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34883 rc = test_xmlExpNewSeq();
34884 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34885 rc = test_xmlExpParse();
34886 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34887 rc = test_xmlExpRef();
34888 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34889 rc = test_xmlExpStringDerive();
34890 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34891 rc = test_xmlExpSubsume();
34892 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34893 rc = test_xmlRegExecErrInfo();
34894 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34895 rc = test_xmlRegExecNextValues();
34896 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34897 rc = test_xmlRegExecPushString();
34898 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34899 rc = test_xmlRegExecPushString2();
34900 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34901 rc = test_xmlRegNewExecCtxt();
34902 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34903 rc = test_xmlRegexpCompile();
34904 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34905 rc = test_xmlRegexpExec();
34906 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34907 rc = test_xmlRegexpIsDeterminist();
34908 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34909 rc = test_xmlRegexpPrint();
34910 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34913 printf("Module xmlregexp: %d errors\n", test_ret);
34916 #ifdef LIBXML_OUTPUT_ENABLED
34918 #define gen_nb_xmlSaveCtxtPtr 1
34919 static xmlSaveCtxtPtr gen_xmlSaveCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
34922 static void des_xmlSaveCtxtPtr(int no ATTRIBUTE_UNUSED, xmlSaveCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
34928 test_xmlSaveClose(void) {
34931 #if defined(LIBXML_OUTPUT_ENABLED)
34934 xmlSaveCtxtPtr ctxt; /* a document saving context */
34937 for (n_ctxt = 0;n_ctxt < gen_nb_xmlSaveCtxtPtr;n_ctxt++) {
34938 mem_base = xmlMemBlocks();
34939 ctxt = gen_xmlSaveCtxtPtr(n_ctxt, 0);
34941 ret_val = xmlSaveClose(ctxt);
34942 desret_int(ret_val);
34944 des_xmlSaveCtxtPtr(n_ctxt, ctxt, 0);
34945 xmlResetLastError();
34946 if (mem_base != xmlMemBlocks()) {
34947 printf("Leak of %d blocks found in xmlSaveClose",
34948 xmlMemBlocks() - mem_base);
34950 printf(" %d", n_ctxt);
34962 test_xmlSaveDoc(void) {
34965 #if defined(LIBXML_OUTPUT_ENABLED)
34968 xmlSaveCtxtPtr ctxt; /* a document saving context */
34970 xmlDocPtr doc; /* a document */
34973 for (n_ctxt = 0;n_ctxt < gen_nb_xmlSaveCtxtPtr;n_ctxt++) {
34974 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
34975 mem_base = xmlMemBlocks();
34976 ctxt = gen_xmlSaveCtxtPtr(n_ctxt, 0);
34977 doc = gen_xmlDocPtr(n_doc, 1);
34979 ret_val = xmlSaveDoc(ctxt, doc);
34980 desret_long(ret_val);
34982 des_xmlSaveCtxtPtr(n_ctxt, ctxt, 0);
34983 des_xmlDocPtr(n_doc, doc, 1);
34984 xmlResetLastError();
34985 if (mem_base != xmlMemBlocks()) {
34986 printf("Leak of %d blocks found in xmlSaveDoc",
34987 xmlMemBlocks() - mem_base);
34989 printf(" %d", n_ctxt);
34990 printf(" %d", n_doc);
35003 test_xmlSaveFlush(void) {
35006 #if defined(LIBXML_OUTPUT_ENABLED)
35009 xmlSaveCtxtPtr ctxt; /* a document saving context */
35012 for (n_ctxt = 0;n_ctxt < gen_nb_xmlSaveCtxtPtr;n_ctxt++) {
35013 mem_base = xmlMemBlocks();
35014 ctxt = gen_xmlSaveCtxtPtr(n_ctxt, 0);
35016 ret_val = xmlSaveFlush(ctxt);
35017 desret_int(ret_val);
35019 des_xmlSaveCtxtPtr(n_ctxt, ctxt, 0);
35020 xmlResetLastError();
35021 if (mem_base != xmlMemBlocks()) {
35022 printf("Leak of %d blocks found in xmlSaveFlush",
35023 xmlMemBlocks() - mem_base);
35025 printf(" %d", n_ctxt);
35037 test_xmlSaveSetAttrEscape(void) {
35041 /* missing type support */
35047 test_xmlSaveSetEscape(void) {
35051 /* missing type support */
35057 test_xmlSaveToBuffer(void) {
35061 /* missing type support */
35067 test_xmlSaveToFd(void) {
35071 /* missing type support */
35077 test_xmlSaveToFilename(void) {
35081 /* missing type support */
35087 test_xmlSaveTree(void) {
35090 #if defined(LIBXML_OUTPUT_ENABLED)
35093 xmlSaveCtxtPtr ctxt; /* a document saving context */
35095 xmlNodePtr node; /* the top node of the subtree to save */
35098 for (n_ctxt = 0;n_ctxt < gen_nb_xmlSaveCtxtPtr;n_ctxt++) {
35099 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
35100 mem_base = xmlMemBlocks();
35101 ctxt = gen_xmlSaveCtxtPtr(n_ctxt, 0);
35102 node = gen_xmlNodePtr(n_node, 1);
35104 ret_val = xmlSaveTree(ctxt, node);
35105 desret_long(ret_val);
35107 des_xmlSaveCtxtPtr(n_ctxt, ctxt, 0);
35108 des_xmlNodePtr(n_node, node, 1);
35109 xmlResetLastError();
35110 if (mem_base != xmlMemBlocks()) {
35111 printf("Leak of %d blocks found in xmlSaveTree",
35112 xmlMemBlocks() - mem_base);
35114 printf(" %d", n_ctxt);
35115 printf(" %d", n_node);
35127 test_xmlsave(void) {
35131 if (quiet == 0) printf("Testing xmlsave : 4 of 10 functions ...\n");
35132 rc = test_xmlSaveClose();
35133 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35134 rc = test_xmlSaveDoc();
35135 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35136 rc = test_xmlSaveFlush();
35137 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35138 rc = test_xmlSaveSetAttrEscape();
35139 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35140 rc = test_xmlSaveSetEscape();
35141 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35142 rc = test_xmlSaveToBuffer();
35143 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35144 rc = test_xmlSaveToFd();
35145 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35146 rc = test_xmlSaveToFilename();
35147 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35148 rc = test_xmlSaveTree();
35149 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35152 printf("Module xmlsave: %d errors\n", test_ret);
35157 test_xmlSchemaDump(void) {
35160 #if defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
35162 FILE * output; /* the file output */
35164 xmlSchemaPtr schema; /* a schema structure */
35167 for (n_output = 0;n_output < gen_nb_FILE_ptr;n_output++) {
35168 for (n_schema = 0;n_schema < gen_nb_xmlSchemaPtr;n_schema++) {
35169 mem_base = xmlMemBlocks();
35170 output = gen_FILE_ptr(n_output, 0);
35171 schema = gen_xmlSchemaPtr(n_schema, 1);
35173 xmlSchemaDump(output, schema);
35175 des_FILE_ptr(n_output, output, 0);
35176 des_xmlSchemaPtr(n_schema, schema, 1);
35177 xmlResetLastError();
35178 if (mem_base != xmlMemBlocks()) {
35179 printf("Leak of %d blocks found in xmlSchemaDump",
35180 xmlMemBlocks() - mem_base);
35182 printf(" %d", n_output);
35183 printf(" %d", n_schema);
35194 #ifdef LIBXML_SCHEMAS_ENABLED
35196 #define gen_nb_xmlSchemaParserCtxtPtr 1
35197 static xmlSchemaParserCtxtPtr gen_xmlSchemaParserCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
35200 static void des_xmlSchemaParserCtxtPtr(int no ATTRIBUTE_UNUSED, xmlSchemaParserCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
35204 #ifdef LIBXML_SCHEMAS_ENABLED
35206 #define gen_nb_xmlSchemaValidityErrorFunc_ptr 1
35207 static xmlSchemaValidityErrorFunc * gen_xmlSchemaValidityErrorFunc_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
35210 static void des_xmlSchemaValidityErrorFunc_ptr(int no ATTRIBUTE_UNUSED, xmlSchemaValidityErrorFunc * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
35214 #ifdef LIBXML_SCHEMAS_ENABLED
35216 #define gen_nb_xmlSchemaValidityWarningFunc_ptr 1
35217 static xmlSchemaValidityWarningFunc * gen_xmlSchemaValidityWarningFunc_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
35220 static void des_xmlSchemaValidityWarningFunc_ptr(int no ATTRIBUTE_UNUSED, xmlSchemaValidityWarningFunc * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
35226 test_xmlSchemaGetParserErrors(void) {
35229 #if defined(LIBXML_SCHEMAS_ENABLED)
35232 xmlSchemaParserCtxtPtr ctxt; /* a XMl-Schema parser context */
35234 xmlSchemaValidityErrorFunc * err; /* the error callback result */
35236 xmlSchemaValidityWarningFunc * warn; /* the warning callback result */
35238 void ** ctx; /* contextual data for the callbacks result */
35241 for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaParserCtxtPtr;n_ctxt++) {
35242 for (n_err = 0;n_err < gen_nb_xmlSchemaValidityErrorFunc_ptr;n_err++) {
35243 for (n_warn = 0;n_warn < gen_nb_xmlSchemaValidityWarningFunc_ptr;n_warn++) {
35244 for (n_ctx = 0;n_ctx < gen_nb_void_ptr_ptr;n_ctx++) {
35245 mem_base = xmlMemBlocks();
35246 ctxt = gen_xmlSchemaParserCtxtPtr(n_ctxt, 0);
35247 err = gen_xmlSchemaValidityErrorFunc_ptr(n_err, 1);
35248 warn = gen_xmlSchemaValidityWarningFunc_ptr(n_warn, 2);
35249 ctx = gen_void_ptr_ptr(n_ctx, 3);
35251 ret_val = xmlSchemaGetParserErrors(ctxt, err, warn, ctx);
35252 desret_int(ret_val);
35254 des_xmlSchemaParserCtxtPtr(n_ctxt, ctxt, 0);
35255 des_xmlSchemaValidityErrorFunc_ptr(n_err, err, 1);
35256 des_xmlSchemaValidityWarningFunc_ptr(n_warn, warn, 2);
35257 des_void_ptr_ptr(n_ctx, ctx, 3);
35258 xmlResetLastError();
35259 if (mem_base != xmlMemBlocks()) {
35260 printf("Leak of %d blocks found in xmlSchemaGetParserErrors",
35261 xmlMemBlocks() - mem_base);
35263 printf(" %d", n_ctxt);
35264 printf(" %d", n_err);
35265 printf(" %d", n_warn);
35266 printf(" %d", n_ctx);
35281 test_xmlSchemaGetValidErrors(void) {
35284 #if defined(LIBXML_SCHEMAS_ENABLED)
35287 xmlSchemaValidCtxtPtr ctxt; /* a XML-Schema validation context */
35289 xmlSchemaValidityErrorFunc * err; /* the error function result */
35291 xmlSchemaValidityWarningFunc * warn; /* the warning function result */
35293 void ** ctx; /* the functions context result */
35296 for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) {
35297 for (n_err = 0;n_err < gen_nb_xmlSchemaValidityErrorFunc_ptr;n_err++) {
35298 for (n_warn = 0;n_warn < gen_nb_xmlSchemaValidityWarningFunc_ptr;n_warn++) {
35299 for (n_ctx = 0;n_ctx < gen_nb_void_ptr_ptr;n_ctx++) {
35300 mem_base = xmlMemBlocks();
35301 ctxt = gen_xmlSchemaValidCtxtPtr(n_ctxt, 0);
35302 err = gen_xmlSchemaValidityErrorFunc_ptr(n_err, 1);
35303 warn = gen_xmlSchemaValidityWarningFunc_ptr(n_warn, 2);
35304 ctx = gen_void_ptr_ptr(n_ctx, 3);
35306 ret_val = xmlSchemaGetValidErrors(ctxt, err, warn, ctx);
35307 desret_int(ret_val);
35309 des_xmlSchemaValidCtxtPtr(n_ctxt, ctxt, 0);
35310 des_xmlSchemaValidityErrorFunc_ptr(n_err, err, 1);
35311 des_xmlSchemaValidityWarningFunc_ptr(n_warn, warn, 2);
35312 des_void_ptr_ptr(n_ctx, ctx, 3);
35313 xmlResetLastError();
35314 if (mem_base != xmlMemBlocks()) {
35315 printf("Leak of %d blocks found in xmlSchemaGetValidErrors",
35316 xmlMemBlocks() - mem_base);
35318 printf(" %d", n_ctxt);
35319 printf(" %d", n_err);
35320 printf(" %d", n_warn);
35321 printf(" %d", n_ctx);
35336 test_xmlSchemaIsValid(void) {
35339 #if defined(LIBXML_SCHEMAS_ENABLED)
35342 xmlSchemaValidCtxtPtr ctxt; /* the schema validation context */
35345 for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) {
35346 mem_base = xmlMemBlocks();
35347 ctxt = gen_xmlSchemaValidCtxtPtr(n_ctxt, 0);
35349 ret_val = xmlSchemaIsValid(ctxt);
35350 desret_int(ret_val);
35352 des_xmlSchemaValidCtxtPtr(n_ctxt, ctxt, 0);
35353 xmlResetLastError();
35354 if (mem_base != xmlMemBlocks()) {
35355 printf("Leak of %d blocks found in xmlSchemaIsValid",
35356 xmlMemBlocks() - mem_base);
35358 printf(" %d", n_ctxt);
35370 test_xmlSchemaNewDocParserCtxt(void) {
35373 #if defined(LIBXML_SCHEMAS_ENABLED)
35375 xmlSchemaParserCtxtPtr ret_val;
35376 xmlDocPtr doc; /* a preparsed document tree */
35379 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
35380 mem_base = xmlMemBlocks();
35381 doc = gen_xmlDocPtr(n_doc, 0);
35383 ret_val = xmlSchemaNewDocParserCtxt(doc);
35384 desret_xmlSchemaParserCtxtPtr(ret_val);
35386 des_xmlDocPtr(n_doc, doc, 0);
35387 xmlResetLastError();
35388 if (mem_base != xmlMemBlocks()) {
35389 printf("Leak of %d blocks found in xmlSchemaNewDocParserCtxt",
35390 xmlMemBlocks() - mem_base);
35392 printf(" %d", n_doc);
35404 test_xmlSchemaNewMemParserCtxt(void) {
35407 #if defined(LIBXML_SCHEMAS_ENABLED)
35409 xmlSchemaParserCtxtPtr ret_val;
35410 char * buffer; /* a pointer to a char array containing the schemas */
35412 int size; /* the size of the array */
35415 for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
35416 for (n_size = 0;n_size < gen_nb_int;n_size++) {
35417 mem_base = xmlMemBlocks();
35418 buffer = gen_const_char_ptr(n_buffer, 0);
35419 size = gen_int(n_size, 1);
35420 if ((buffer != NULL) &&
35421 (size > (int) strlen((const char *) buffer) + 1))
35424 ret_val = xmlSchemaNewMemParserCtxt((const char *)buffer, size);
35425 desret_xmlSchemaParserCtxtPtr(ret_val);
35427 des_const_char_ptr(n_buffer, (const char *)buffer, 0);
35428 des_int(n_size, size, 1);
35429 xmlResetLastError();
35430 if (mem_base != xmlMemBlocks()) {
35431 printf("Leak of %d blocks found in xmlSchemaNewMemParserCtxt",
35432 xmlMemBlocks() - mem_base);
35434 printf(" %d", n_buffer);
35435 printf(" %d", n_size);
35448 test_xmlSchemaNewParserCtxt(void) {
35451 #if defined(LIBXML_SCHEMAS_ENABLED)
35453 xmlSchemaParserCtxtPtr ret_val;
35454 char * URL; /* the location of the schema */
35457 for (n_URL = 0;n_URL < gen_nb_const_char_ptr;n_URL++) {
35458 mem_base = xmlMemBlocks();
35459 URL = gen_const_char_ptr(n_URL, 0);
35461 ret_val = xmlSchemaNewParserCtxt((const char *)URL);
35462 desret_xmlSchemaParserCtxtPtr(ret_val);
35464 des_const_char_ptr(n_URL, (const char *)URL, 0);
35465 xmlResetLastError();
35466 if (mem_base != xmlMemBlocks()) {
35467 printf("Leak of %d blocks found in xmlSchemaNewParserCtxt",
35468 xmlMemBlocks() - mem_base);
35470 printf(" %d", n_URL);
35482 test_xmlSchemaNewValidCtxt(void) {
35486 /* missing type support */
35492 test_xmlSchemaParse(void) {
35496 /* missing type support */
35500 #ifdef LIBXML_SCHEMAS_ENABLED
35502 #define gen_nb_xmlSAXHandlerPtr_ptr 1
35503 static xmlSAXHandlerPtr * gen_xmlSAXHandlerPtr_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
35506 static void des_xmlSAXHandlerPtr_ptr(int no ATTRIBUTE_UNUSED, xmlSAXHandlerPtr * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
35512 test_xmlSchemaSAXPlug(void) {
35516 /* missing type support */
35520 #ifdef LIBXML_SCHEMAS_ENABLED
35522 #define gen_nb_xmlSchemaSAXPlugPtr 1
35523 static xmlSchemaSAXPlugPtr gen_xmlSchemaSAXPlugPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
35526 static void des_xmlSchemaSAXPlugPtr(int no ATTRIBUTE_UNUSED, xmlSchemaSAXPlugPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
35532 test_xmlSchemaSAXUnplug(void) {
35535 #if defined(LIBXML_SCHEMAS_ENABLED)
35538 xmlSchemaSAXPlugPtr plug; /* a data structure returned by xmlSchemaSAXPlug */
35541 for (n_plug = 0;n_plug < gen_nb_xmlSchemaSAXPlugPtr;n_plug++) {
35542 mem_base = xmlMemBlocks();
35543 plug = gen_xmlSchemaSAXPlugPtr(n_plug, 0);
35545 ret_val = xmlSchemaSAXUnplug(plug);
35546 desret_int(ret_val);
35548 des_xmlSchemaSAXPlugPtr(n_plug, plug, 0);
35549 xmlResetLastError();
35550 if (mem_base != xmlMemBlocks()) {
35551 printf("Leak of %d blocks found in xmlSchemaSAXUnplug",
35552 xmlMemBlocks() - mem_base);
35554 printf(" %d", n_plug);
35566 test_xmlSchemaSetParserErrors(void) {
35570 /* missing type support */
35576 test_xmlSchemaSetParserStructuredErrors(void) {
35580 /* missing type support */
35586 test_xmlSchemaSetValidErrors(void) {
35590 /* missing type support */
35596 test_xmlSchemaSetValidOptions(void) {
35599 #if defined(LIBXML_SCHEMAS_ENABLED)
35602 xmlSchemaValidCtxtPtr ctxt; /* a schema validation context */
35604 int options; /* a combination of xmlSchemaValidOption */
35607 for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) {
35608 for (n_options = 0;n_options < gen_nb_int;n_options++) {
35609 mem_base = xmlMemBlocks();
35610 ctxt = gen_xmlSchemaValidCtxtPtr(n_ctxt, 0);
35611 options = gen_int(n_options, 1);
35613 ret_val = xmlSchemaSetValidOptions(ctxt, options);
35614 desret_int(ret_val);
35616 des_xmlSchemaValidCtxtPtr(n_ctxt, ctxt, 0);
35617 des_int(n_options, options, 1);
35618 xmlResetLastError();
35619 if (mem_base != xmlMemBlocks()) {
35620 printf("Leak of %d blocks found in xmlSchemaSetValidOptions",
35621 xmlMemBlocks() - mem_base);
35623 printf(" %d", n_ctxt);
35624 printf(" %d", n_options);
35637 test_xmlSchemaSetValidStructuredErrors(void) {
35641 /* missing type support */
35647 test_xmlSchemaValidCtxtGetOptions(void) {
35650 #if defined(LIBXML_SCHEMAS_ENABLED)
35653 xmlSchemaValidCtxtPtr ctxt; /* a schema validation context */
35656 for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) {
35657 mem_base = xmlMemBlocks();
35658 ctxt = gen_xmlSchemaValidCtxtPtr(n_ctxt, 0);
35660 ret_val = xmlSchemaValidCtxtGetOptions(ctxt);
35661 desret_int(ret_val);
35663 des_xmlSchemaValidCtxtPtr(n_ctxt, ctxt, 0);
35664 xmlResetLastError();
35665 if (mem_base != xmlMemBlocks()) {
35666 printf("Leak of %d blocks found in xmlSchemaValidCtxtGetOptions",
35667 xmlMemBlocks() - mem_base);
35669 printf(" %d", n_ctxt);
35681 test_xmlSchemaValidCtxtGetParserCtxt(void) {
35684 #if defined(LIBXML_SCHEMAS_ENABLED)
35686 xmlParserCtxtPtr ret_val;
35687 xmlSchemaValidCtxtPtr ctxt; /* a schema validation context */
35690 for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) {
35691 mem_base = xmlMemBlocks();
35692 ctxt = gen_xmlSchemaValidCtxtPtr(n_ctxt, 0);
35694 ret_val = xmlSchemaValidCtxtGetParserCtxt(ctxt);
35695 desret_xmlParserCtxtPtr(ret_val);
35697 des_xmlSchemaValidCtxtPtr(n_ctxt, ctxt, 0);
35698 xmlResetLastError();
35699 if (mem_base != xmlMemBlocks()) {
35700 printf("Leak of %d blocks found in xmlSchemaValidCtxtGetParserCtxt",
35701 xmlMemBlocks() - mem_base);
35703 printf(" %d", n_ctxt);
35715 test_xmlSchemaValidateDoc(void) {
35718 #if defined(LIBXML_SCHEMAS_ENABLED)
35721 xmlSchemaValidCtxtPtr ctxt; /* a schema validation context */
35723 xmlDocPtr doc; /* a parsed document tree */
35726 for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) {
35727 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
35728 mem_base = xmlMemBlocks();
35729 ctxt = gen_xmlSchemaValidCtxtPtr(n_ctxt, 0);
35730 doc = gen_xmlDocPtr(n_doc, 1);
35732 ret_val = xmlSchemaValidateDoc(ctxt, doc);
35733 desret_int(ret_val);
35735 des_xmlSchemaValidCtxtPtr(n_ctxt, ctxt, 0);
35736 des_xmlDocPtr(n_doc, doc, 1);
35737 xmlResetLastError();
35738 if (mem_base != xmlMemBlocks()) {
35739 printf("Leak of %d blocks found in xmlSchemaValidateDoc",
35740 xmlMemBlocks() - mem_base);
35742 printf(" %d", n_ctxt);
35743 printf(" %d", n_doc);
35756 test_xmlSchemaValidateFile(void) {
35759 #if defined(LIBXML_SCHEMAS_ENABLED)
35762 xmlSchemaValidCtxtPtr ctxt; /* a schema validation context */
35764 const char * filename; /* the URI of the instance */
35766 int options; /* a future set of options, currently unused */
35769 for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) {
35770 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
35771 for (n_options = 0;n_options < gen_nb_int;n_options++) {
35772 mem_base = xmlMemBlocks();
35773 ctxt = gen_xmlSchemaValidCtxtPtr(n_ctxt, 0);
35774 filename = gen_filepath(n_filename, 1);
35775 options = gen_int(n_options, 2);
35777 ret_val = xmlSchemaValidateFile(ctxt, filename, options);
35778 desret_int(ret_val);
35780 des_xmlSchemaValidCtxtPtr(n_ctxt, ctxt, 0);
35781 des_filepath(n_filename, filename, 1);
35782 des_int(n_options, options, 2);
35783 xmlResetLastError();
35784 if (mem_base != xmlMemBlocks()) {
35785 printf("Leak of %d blocks found in xmlSchemaValidateFile",
35786 xmlMemBlocks() - mem_base);
35788 printf(" %d", n_ctxt);
35789 printf(" %d", n_filename);
35790 printf(" %d", n_options);
35804 test_xmlSchemaValidateOneElement(void) {
35807 #if defined(LIBXML_SCHEMAS_ENABLED)
35810 xmlSchemaValidCtxtPtr ctxt; /* a schema validation context */
35812 xmlNodePtr elem; /* an element node */
35815 for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) {
35816 for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
35817 mem_base = xmlMemBlocks();
35818 ctxt = gen_xmlSchemaValidCtxtPtr(n_ctxt, 0);
35819 elem = gen_xmlNodePtr(n_elem, 1);
35821 ret_val = xmlSchemaValidateOneElement(ctxt, elem);
35822 desret_int(ret_val);
35824 des_xmlSchemaValidCtxtPtr(n_ctxt, ctxt, 0);
35825 des_xmlNodePtr(n_elem, elem, 1);
35826 xmlResetLastError();
35827 if (mem_base != xmlMemBlocks()) {
35828 printf("Leak of %d blocks found in xmlSchemaValidateOneElement",
35829 xmlMemBlocks() - mem_base);
35831 printf(" %d", n_ctxt);
35832 printf(" %d", n_elem);
35845 test_xmlSchemaValidateSetFilename(void) {
35848 #if defined(LIBXML_SCHEMAS_ENABLED)
35850 xmlSchemaValidCtxtPtr vctxt; /* the schema validation context */
35852 const char * filename; /* the file name */
35855 for (n_vctxt = 0;n_vctxt < gen_nb_xmlSchemaValidCtxtPtr;n_vctxt++) {
35856 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
35857 mem_base = xmlMemBlocks();
35858 vctxt = gen_xmlSchemaValidCtxtPtr(n_vctxt, 0);
35859 filename = gen_filepath(n_filename, 1);
35861 xmlSchemaValidateSetFilename(vctxt, filename);
35863 des_xmlSchemaValidCtxtPtr(n_vctxt, vctxt, 0);
35864 des_filepath(n_filename, filename, 1);
35865 xmlResetLastError();
35866 if (mem_base != xmlMemBlocks()) {
35867 printf("Leak of %d blocks found in xmlSchemaValidateSetFilename",
35868 xmlMemBlocks() - mem_base);
35870 printf(" %d", n_vctxt);
35871 printf(" %d", n_filename);
35884 test_xmlSchemaValidateSetLocator(void) {
35888 /* missing type support */
35894 test_xmlSchemaValidateStream(void) {
35897 #if defined(LIBXML_SCHEMAS_ENABLED)
35900 xmlSchemaValidCtxtPtr ctxt; /* a schema validation context */
35902 xmlParserInputBufferPtr input; /* the input to use for reading the data */
35904 xmlCharEncoding enc; /* an optional encoding information */
35906 xmlSAXHandlerPtr sax; /* a SAX handler for the resulting events */
35908 void * user_data; /* the context to provide to the SAX handler. */
35911 for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) {
35912 for (n_input = 0;n_input < gen_nb_xmlParserInputBufferPtr;n_input++) {
35913 for (n_enc = 0;n_enc < gen_nb_xmlCharEncoding;n_enc++) {
35914 for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
35915 for (n_user_data = 0;n_user_data < gen_nb_userdata;n_user_data++) {
35916 mem_base = xmlMemBlocks();
35917 ctxt = gen_xmlSchemaValidCtxtPtr(n_ctxt, 0);
35918 input = gen_xmlParserInputBufferPtr(n_input, 1);
35919 enc = gen_xmlCharEncoding(n_enc, 2);
35920 sax = gen_xmlSAXHandlerPtr(n_sax, 3);
35921 user_data = gen_userdata(n_user_data, 4);
35923 ret_val = xmlSchemaValidateStream(ctxt, input, enc, sax, user_data);
35924 desret_int(ret_val);
35926 des_xmlSchemaValidCtxtPtr(n_ctxt, ctxt, 0);
35927 des_xmlParserInputBufferPtr(n_input, input, 1);
35928 des_xmlCharEncoding(n_enc, enc, 2);
35929 des_xmlSAXHandlerPtr(n_sax, sax, 3);
35930 des_userdata(n_user_data, user_data, 4);
35931 xmlResetLastError();
35932 if (mem_base != xmlMemBlocks()) {
35933 printf("Leak of %d blocks found in xmlSchemaValidateStream",
35934 xmlMemBlocks() - mem_base);
35936 printf(" %d", n_ctxt);
35937 printf(" %d", n_input);
35938 printf(" %d", n_enc);
35939 printf(" %d", n_sax);
35940 printf(" %d", n_user_data);
35955 test_xmlschemas(void) {
35959 if (quiet == 0) printf("Testing xmlschemas : 16 of 27 functions ...\n");
35960 rc = test_xmlSchemaDump();
35961 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35962 rc = test_xmlSchemaGetParserErrors();
35963 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35964 rc = test_xmlSchemaGetValidErrors();
35965 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35966 rc = test_xmlSchemaIsValid();
35967 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35968 rc = test_xmlSchemaNewDocParserCtxt();
35969 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35970 rc = test_xmlSchemaNewMemParserCtxt();
35971 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35972 rc = test_xmlSchemaNewParserCtxt();
35973 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35974 rc = test_xmlSchemaNewValidCtxt();
35975 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35976 rc = test_xmlSchemaParse();
35977 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35978 rc = test_xmlSchemaSAXPlug();
35979 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35980 rc = test_xmlSchemaSAXUnplug();
35981 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35982 rc = test_xmlSchemaSetParserErrors();
35983 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35984 rc = test_xmlSchemaSetParserStructuredErrors();
35985 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35986 rc = test_xmlSchemaSetValidErrors();
35987 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35988 rc = test_xmlSchemaSetValidOptions();
35989 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35990 rc = test_xmlSchemaSetValidStructuredErrors();
35991 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35992 rc = test_xmlSchemaValidCtxtGetOptions();
35993 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35994 rc = test_xmlSchemaValidCtxtGetParserCtxt();
35995 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35996 rc = test_xmlSchemaValidateDoc();
35997 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35998 rc = test_xmlSchemaValidateFile();
35999 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
36000 rc = test_xmlSchemaValidateOneElement();
36001 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
36002 rc = test_xmlSchemaValidateSetFilename();
36003 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
36004 rc = test_xmlSchemaValidateSetLocator();
36005 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
36006 rc = test_xmlSchemaValidateStream();
36007 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
36010 printf("Module xmlschemas: %d errors\n", test_ret);
36013 #ifdef LIBXML_SCHEMAS_ENABLED
36015 #define gen_nb_xmlSchemaFacetPtr 1
36016 static xmlSchemaFacetPtr gen_xmlSchemaFacetPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
36019 static void des_xmlSchemaFacetPtr(int no ATTRIBUTE_UNUSED, xmlSchemaFacetPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
36023 #ifdef LIBXML_SCHEMAS_ENABLED
36025 #define gen_nb_xmlSchemaTypePtr 1
36026 static xmlSchemaTypePtr gen_xmlSchemaTypePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
36029 static void des_xmlSchemaTypePtr(int no ATTRIBUTE_UNUSED, xmlSchemaTypePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
36035 test_xmlSchemaCheckFacet(void) {
36038 #if defined(LIBXML_SCHEMAS_ENABLED)
36041 xmlSchemaFacetPtr facet; /* the facet */
36043 xmlSchemaTypePtr typeDecl; /* the schema type definition */
36045 xmlSchemaParserCtxtPtr pctxt; /* the schema parser context or NULL */
36047 xmlChar * name; /* the optional name of the type */
36050 for (n_facet = 0;n_facet < gen_nb_xmlSchemaFacetPtr;n_facet++) {
36051 for (n_typeDecl = 0;n_typeDecl < gen_nb_xmlSchemaTypePtr;n_typeDecl++) {
36052 for (n_pctxt = 0;n_pctxt < gen_nb_xmlSchemaParserCtxtPtr;n_pctxt++) {
36053 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
36054 mem_base = xmlMemBlocks();
36055 facet = gen_xmlSchemaFacetPtr(n_facet, 0);
36056 typeDecl = gen_xmlSchemaTypePtr(n_typeDecl, 1);
36057 pctxt = gen_xmlSchemaParserCtxtPtr(n_pctxt, 2);
36058 name = gen_const_xmlChar_ptr(n_name, 3);
36060 ret_val = xmlSchemaCheckFacet(facet, typeDecl, pctxt, (const xmlChar *)name);
36061 desret_int(ret_val);
36063 des_xmlSchemaFacetPtr(n_facet, facet, 0);
36064 des_xmlSchemaTypePtr(n_typeDecl, typeDecl, 1);
36065 des_xmlSchemaParserCtxtPtr(n_pctxt, pctxt, 2);
36066 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 3);
36067 xmlResetLastError();
36068 if (mem_base != xmlMemBlocks()) {
36069 printf("Leak of %d blocks found in xmlSchemaCheckFacet",
36070 xmlMemBlocks() - mem_base);
36072 printf(" %d", n_facet);
36073 printf(" %d", n_typeDecl);
36074 printf(" %d", n_pctxt);
36075 printf(" %d", n_name);
36090 test_xmlSchemaCleanupTypes(void) {
36093 #if defined(LIBXML_SCHEMAS_ENABLED)
36096 xmlSchemaCleanupTypes();
36098 xmlResetLastError();
36107 test_xmlSchemaCollapseString(void) {
36110 #if defined(LIBXML_SCHEMAS_ENABLED)
36113 xmlChar * value; /* a value */
36116 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
36117 mem_base = xmlMemBlocks();
36118 value = gen_const_xmlChar_ptr(n_value, 0);
36120 ret_val = xmlSchemaCollapseString((const xmlChar *)value);
36121 desret_xmlChar_ptr(ret_val);
36123 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 0);
36124 xmlResetLastError();
36125 if (mem_base != xmlMemBlocks()) {
36126 printf("Leak of %d blocks found in xmlSchemaCollapseString",
36127 xmlMemBlocks() - mem_base);
36129 printf(" %d", n_value);
36139 #ifdef LIBXML_SCHEMAS_ENABLED
36141 #define gen_nb_xmlSchemaValPtr 1
36142 static xmlSchemaValPtr gen_xmlSchemaValPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
36145 static void des_xmlSchemaValPtr(int no ATTRIBUTE_UNUSED, xmlSchemaValPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
36151 test_xmlSchemaCompareValues(void) {
36154 #if defined(LIBXML_SCHEMAS_ENABLED)
36157 xmlSchemaValPtr x; /* a first value */
36159 xmlSchemaValPtr y; /* a second value */
36162 for (n_x = 0;n_x < gen_nb_xmlSchemaValPtr;n_x++) {
36163 for (n_y = 0;n_y < gen_nb_xmlSchemaValPtr;n_y++) {
36164 mem_base = xmlMemBlocks();
36165 x = gen_xmlSchemaValPtr(n_x, 0);
36166 y = gen_xmlSchemaValPtr(n_y, 1);
36168 ret_val = xmlSchemaCompareValues(x, y);
36169 desret_int(ret_val);
36171 des_xmlSchemaValPtr(n_x, x, 0);
36172 des_xmlSchemaValPtr(n_y, y, 1);
36173 xmlResetLastError();
36174 if (mem_base != xmlMemBlocks()) {
36175 printf("Leak of %d blocks found in xmlSchemaCompareValues",
36176 xmlMemBlocks() - mem_base);
36178 printf(" %d", n_x);
36179 printf(" %d", n_y);
36192 test_xmlSchemaCompareValuesWhtsp(void) {
36195 #if defined(LIBXML_SCHEMAS_ENABLED)
36198 xmlSchemaValPtr x; /* a first value */
36200 xmlSchemaWhitespaceValueType xws; /* the whitespace value of x */
36202 xmlSchemaValPtr y; /* a second value */
36204 xmlSchemaWhitespaceValueType yws; /* the whitespace value of y */
36207 for (n_x = 0;n_x < gen_nb_xmlSchemaValPtr;n_x++) {
36208 for (n_xws = 0;n_xws < gen_nb_xmlSchemaWhitespaceValueType;n_xws++) {
36209 for (n_y = 0;n_y < gen_nb_xmlSchemaValPtr;n_y++) {
36210 for (n_yws = 0;n_yws < gen_nb_xmlSchemaWhitespaceValueType;n_yws++) {
36211 mem_base = xmlMemBlocks();
36212 x = gen_xmlSchemaValPtr(n_x, 0);
36213 xws = gen_xmlSchemaWhitespaceValueType(n_xws, 1);
36214 y = gen_xmlSchemaValPtr(n_y, 2);
36215 yws = gen_xmlSchemaWhitespaceValueType(n_yws, 3);
36217 ret_val = xmlSchemaCompareValuesWhtsp(x, xws, y, yws);
36218 desret_int(ret_val);
36220 des_xmlSchemaValPtr(n_x, x, 0);
36221 des_xmlSchemaWhitespaceValueType(n_xws, xws, 1);
36222 des_xmlSchemaValPtr(n_y, y, 2);
36223 des_xmlSchemaWhitespaceValueType(n_yws, yws, 3);
36224 xmlResetLastError();
36225 if (mem_base != xmlMemBlocks()) {
36226 printf("Leak of %d blocks found in xmlSchemaCompareValuesWhtsp",
36227 xmlMemBlocks() - mem_base);
36229 printf(" %d", n_x);
36230 printf(" %d", n_xws);
36231 printf(" %d", n_y);
36232 printf(" %d", n_yws);
36247 test_xmlSchemaCopyValue(void) {
36251 /* missing type support */
36257 test_xmlSchemaGetBuiltInListSimpleTypeItemType(void) {
36260 #if defined(LIBXML_SCHEMAS_ENABLED)
36262 xmlSchemaTypePtr ret_val;
36263 xmlSchemaTypePtr type; /* the built-in simple type. */
36266 for (n_type = 0;n_type < gen_nb_xmlSchemaTypePtr;n_type++) {
36267 mem_base = xmlMemBlocks();
36268 type = gen_xmlSchemaTypePtr(n_type, 0);
36270 ret_val = xmlSchemaGetBuiltInListSimpleTypeItemType(type);
36271 desret_xmlSchemaTypePtr(ret_val);
36273 des_xmlSchemaTypePtr(n_type, type, 0);
36274 xmlResetLastError();
36275 if (mem_base != xmlMemBlocks()) {
36276 printf("Leak of %d blocks found in xmlSchemaGetBuiltInListSimpleTypeItemType",
36277 xmlMemBlocks() - mem_base);
36279 printf(" %d", n_type);
36291 test_xmlSchemaGetBuiltInType(void) {
36294 #if defined(LIBXML_SCHEMAS_ENABLED)
36295 xmlSchemaTypePtr ret_val;
36296 xmlSchemaValType type; /* the type of the built in type */
36299 for (n_type = 0;n_type < gen_nb_xmlSchemaValType;n_type++) {
36300 type = gen_xmlSchemaValType(n_type, 0);
36302 ret_val = xmlSchemaGetBuiltInType(type);
36303 desret_xmlSchemaTypePtr(ret_val);
36305 des_xmlSchemaValType(n_type, type, 0);
36306 xmlResetLastError();
36316 test_xmlSchemaGetCanonValue(void) {
36319 #if defined(LIBXML_SCHEMAS_ENABLED)
36322 xmlSchemaValPtr val; /* the precomputed value */
36324 xmlChar ** retValue; /* the returned value */
36327 for (n_val = 0;n_val < gen_nb_xmlSchemaValPtr;n_val++) {
36328 for (n_retValue = 0;n_retValue < gen_nb_const_xmlChar_ptr_ptr;n_retValue++) {
36329 mem_base = xmlMemBlocks();
36330 val = gen_xmlSchemaValPtr(n_val, 0);
36331 retValue = gen_const_xmlChar_ptr_ptr(n_retValue, 1);
36333 ret_val = xmlSchemaGetCanonValue(val, (const xmlChar **)retValue);
36334 desret_int(ret_val);
36336 des_xmlSchemaValPtr(n_val, val, 0);
36337 des_const_xmlChar_ptr_ptr(n_retValue, (const xmlChar **)retValue, 1);
36338 xmlResetLastError();
36339 if (mem_base != xmlMemBlocks()) {
36340 printf("Leak of %d blocks found in xmlSchemaGetCanonValue",
36341 xmlMemBlocks() - mem_base);
36343 printf(" %d", n_val);
36344 printf(" %d", n_retValue);
36357 test_xmlSchemaGetCanonValueWhtsp(void) {
36360 #if defined(LIBXML_SCHEMAS_ENABLED)
36363 xmlSchemaValPtr val; /* the precomputed value */
36365 xmlChar ** retValue; /* the returned value */
36367 xmlSchemaWhitespaceValueType ws; /* the whitespace type of the value */
36370 for (n_val = 0;n_val < gen_nb_xmlSchemaValPtr;n_val++) {
36371 for (n_retValue = 0;n_retValue < gen_nb_const_xmlChar_ptr_ptr;n_retValue++) {
36372 for (n_ws = 0;n_ws < gen_nb_xmlSchemaWhitespaceValueType;n_ws++) {
36373 mem_base = xmlMemBlocks();
36374 val = gen_xmlSchemaValPtr(n_val, 0);
36375 retValue = gen_const_xmlChar_ptr_ptr(n_retValue, 1);
36376 ws = gen_xmlSchemaWhitespaceValueType(n_ws, 2);
36378 ret_val = xmlSchemaGetCanonValueWhtsp(val, (const xmlChar **)retValue, ws);
36379 desret_int(ret_val);
36381 des_xmlSchemaValPtr(n_val, val, 0);
36382 des_const_xmlChar_ptr_ptr(n_retValue, (const xmlChar **)retValue, 1);
36383 des_xmlSchemaWhitespaceValueType(n_ws, ws, 2);
36384 xmlResetLastError();
36385 if (mem_base != xmlMemBlocks()) {
36386 printf("Leak of %d blocks found in xmlSchemaGetCanonValueWhtsp",
36387 xmlMemBlocks() - mem_base);
36389 printf(" %d", n_val);
36390 printf(" %d", n_retValue);
36391 printf(" %d", n_ws);
36405 test_xmlSchemaGetFacetValueAsULong(void) {
36408 #if defined(LIBXML_SCHEMAS_ENABLED)
36410 unsigned long ret_val;
36411 xmlSchemaFacetPtr facet; /* an schemas type facet */
36414 for (n_facet = 0;n_facet < gen_nb_xmlSchemaFacetPtr;n_facet++) {
36415 mem_base = xmlMemBlocks();
36416 facet = gen_xmlSchemaFacetPtr(n_facet, 0);
36418 ret_val = xmlSchemaGetFacetValueAsULong(facet);
36419 desret_unsigned_long(ret_val);
36421 des_xmlSchemaFacetPtr(n_facet, facet, 0);
36422 xmlResetLastError();
36423 if (mem_base != xmlMemBlocks()) {
36424 printf("Leak of %d blocks found in xmlSchemaGetFacetValueAsULong",
36425 xmlMemBlocks() - mem_base);
36427 printf(" %d", n_facet);
36439 test_xmlSchemaGetPredefinedType(void) {
36442 #if defined(LIBXML_SCHEMAS_ENABLED)
36444 xmlSchemaTypePtr ret_val;
36445 xmlChar * name; /* the type name */
36447 xmlChar * ns; /* the URI of the namespace usually "http://www.w3.org/2001/XMLSchema" */
36450 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
36451 for (n_ns = 0;n_ns < gen_nb_const_xmlChar_ptr;n_ns++) {
36452 mem_base = xmlMemBlocks();
36453 name = gen_const_xmlChar_ptr(n_name, 0);
36454 ns = gen_const_xmlChar_ptr(n_ns, 1);
36456 ret_val = xmlSchemaGetPredefinedType((const xmlChar *)name, (const xmlChar *)ns);
36457 desret_xmlSchemaTypePtr(ret_val);
36459 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 0);
36460 des_const_xmlChar_ptr(n_ns, (const xmlChar *)ns, 1);
36461 xmlResetLastError();
36462 if (mem_base != xmlMemBlocks()) {
36463 printf("Leak of %d blocks found in xmlSchemaGetPredefinedType",
36464 xmlMemBlocks() - mem_base);
36466 printf(" %d", n_name);
36467 printf(" %d", n_ns);
36480 test_xmlSchemaGetValType(void) {
36483 #if defined(LIBXML_SCHEMAS_ENABLED)
36485 xmlSchemaValType ret_val;
36486 xmlSchemaValPtr val; /* a schemas value */
36489 for (n_val = 0;n_val < gen_nb_xmlSchemaValPtr;n_val++) {
36490 mem_base = xmlMemBlocks();
36491 val = gen_xmlSchemaValPtr(n_val, 0);
36493 ret_val = xmlSchemaGetValType(val);
36494 desret_xmlSchemaValType(ret_val);
36496 des_xmlSchemaValPtr(n_val, val, 0);
36497 xmlResetLastError();
36498 if (mem_base != xmlMemBlocks()) {
36499 printf("Leak of %d blocks found in xmlSchemaGetValType",
36500 xmlMemBlocks() - mem_base);
36502 printf(" %d", n_val);
36514 test_xmlSchemaInitTypes(void) {
36517 #if defined(LIBXML_SCHEMAS_ENABLED)
36520 xmlSchemaInitTypes();
36522 xmlResetLastError();
36531 test_xmlSchemaIsBuiltInTypeFacet(void) {
36534 #if defined(LIBXML_SCHEMAS_ENABLED)
36537 xmlSchemaTypePtr type; /* the built-in type */
36539 int facetType; /* the facet type */
36542 for (n_type = 0;n_type < gen_nb_xmlSchemaTypePtr;n_type++) {
36543 for (n_facetType = 0;n_facetType < gen_nb_int;n_facetType++) {
36544 mem_base = xmlMemBlocks();
36545 type = gen_xmlSchemaTypePtr(n_type, 0);
36546 facetType = gen_int(n_facetType, 1);
36548 ret_val = xmlSchemaIsBuiltInTypeFacet(type, facetType);
36549 desret_int(ret_val);
36551 des_xmlSchemaTypePtr(n_type, type, 0);
36552 des_int(n_facetType, facetType, 1);
36553 xmlResetLastError();
36554 if (mem_base != xmlMemBlocks()) {
36555 printf("Leak of %d blocks found in xmlSchemaIsBuiltInTypeFacet",
36556 xmlMemBlocks() - mem_base);
36558 printf(" %d", n_type);
36559 printf(" %d", n_facetType);
36572 test_xmlSchemaNewFacet(void) {
36576 /* missing type support */
36582 test_xmlSchemaNewNOTATIONValue(void) {
36586 /* missing type support */
36592 test_xmlSchemaNewQNameValue(void) {
36596 /* missing type support */
36602 test_xmlSchemaNewStringValue(void) {
36606 /* missing type support */
36610 #ifdef LIBXML_SCHEMAS_ENABLED
36612 #define gen_nb_xmlSchemaValPtr_ptr 1
36613 static xmlSchemaValPtr * gen_xmlSchemaValPtr_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
36616 static void des_xmlSchemaValPtr_ptr(int no ATTRIBUTE_UNUSED, xmlSchemaValPtr * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
36622 test_xmlSchemaValPredefTypeNode(void) {
36625 #if defined(LIBXML_SCHEMAS_ENABLED)
36628 xmlSchemaTypePtr type; /* the predefined type */
36630 xmlChar * value; /* the value to check */
36632 xmlSchemaValPtr * val; /* the return computed value */
36634 xmlNodePtr node; /* the node containing the value */
36637 for (n_type = 0;n_type < gen_nb_xmlSchemaTypePtr;n_type++) {
36638 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
36639 for (n_val = 0;n_val < gen_nb_xmlSchemaValPtr_ptr;n_val++) {
36640 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
36641 mem_base = xmlMemBlocks();
36642 type = gen_xmlSchemaTypePtr(n_type, 0);
36643 value = gen_const_xmlChar_ptr(n_value, 1);
36644 val = gen_xmlSchemaValPtr_ptr(n_val, 2);
36645 node = gen_xmlNodePtr(n_node, 3);
36647 ret_val = xmlSchemaValPredefTypeNode(type, (const xmlChar *)value, val, node);
36648 desret_int(ret_val);
36650 des_xmlSchemaTypePtr(n_type, type, 0);
36651 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 1);
36652 des_xmlSchemaValPtr_ptr(n_val, val, 2);
36653 des_xmlNodePtr(n_node, node, 3);
36654 xmlResetLastError();
36655 if (mem_base != xmlMemBlocks()) {
36656 printf("Leak of %d blocks found in xmlSchemaValPredefTypeNode",
36657 xmlMemBlocks() - mem_base);
36659 printf(" %d", n_type);
36660 printf(" %d", n_value);
36661 printf(" %d", n_val);
36662 printf(" %d", n_node);
36677 test_xmlSchemaValPredefTypeNodeNoNorm(void) {
36680 #if defined(LIBXML_SCHEMAS_ENABLED)
36683 xmlSchemaTypePtr type; /* the predefined type */
36685 xmlChar * value; /* the value to check */
36687 xmlSchemaValPtr * val; /* the return computed value */
36689 xmlNodePtr node; /* the node containing the value */
36692 for (n_type = 0;n_type < gen_nb_xmlSchemaTypePtr;n_type++) {
36693 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
36694 for (n_val = 0;n_val < gen_nb_xmlSchemaValPtr_ptr;n_val++) {
36695 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
36696 mem_base = xmlMemBlocks();
36697 type = gen_xmlSchemaTypePtr(n_type, 0);
36698 value = gen_const_xmlChar_ptr(n_value, 1);
36699 val = gen_xmlSchemaValPtr_ptr(n_val, 2);
36700 node = gen_xmlNodePtr(n_node, 3);
36702 ret_val = xmlSchemaValPredefTypeNodeNoNorm(type, (const xmlChar *)value, val, node);
36703 desret_int(ret_val);
36705 des_xmlSchemaTypePtr(n_type, type, 0);
36706 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 1);
36707 des_xmlSchemaValPtr_ptr(n_val, val, 2);
36708 des_xmlNodePtr(n_node, node, 3);
36709 xmlResetLastError();
36710 if (mem_base != xmlMemBlocks()) {
36711 printf("Leak of %d blocks found in xmlSchemaValPredefTypeNodeNoNorm",
36712 xmlMemBlocks() - mem_base);
36714 printf(" %d", n_type);
36715 printf(" %d", n_value);
36716 printf(" %d", n_val);
36717 printf(" %d", n_node);
36732 test_xmlSchemaValidateFacet(void) {
36735 #if defined(LIBXML_SCHEMAS_ENABLED)
36738 xmlSchemaTypePtr base; /* the base type */
36740 xmlSchemaFacetPtr facet; /* the facet to check */
36742 xmlChar * value; /* the lexical repr of the value to validate */
36744 xmlSchemaValPtr val; /* the precomputed value */
36747 for (n_base = 0;n_base < gen_nb_xmlSchemaTypePtr;n_base++) {
36748 for (n_facet = 0;n_facet < gen_nb_xmlSchemaFacetPtr;n_facet++) {
36749 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
36750 for (n_val = 0;n_val < gen_nb_xmlSchemaValPtr;n_val++) {
36751 mem_base = xmlMemBlocks();
36752 base = gen_xmlSchemaTypePtr(n_base, 0);
36753 facet = gen_xmlSchemaFacetPtr(n_facet, 1);
36754 value = gen_const_xmlChar_ptr(n_value, 2);
36755 val = gen_xmlSchemaValPtr(n_val, 3);
36757 ret_val = xmlSchemaValidateFacet(base, facet, (const xmlChar *)value, val);
36758 desret_int(ret_val);
36760 des_xmlSchemaTypePtr(n_base, base, 0);
36761 des_xmlSchemaFacetPtr(n_facet, facet, 1);
36762 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 2);
36763 des_xmlSchemaValPtr(n_val, val, 3);
36764 xmlResetLastError();
36765 if (mem_base != xmlMemBlocks()) {
36766 printf("Leak of %d blocks found in xmlSchemaValidateFacet",
36767 xmlMemBlocks() - mem_base);
36769 printf(" %d", n_base);
36770 printf(" %d", n_facet);
36771 printf(" %d", n_value);
36772 printf(" %d", n_val);
36787 test_xmlSchemaValidateFacetWhtsp(void) {
36790 #if defined(LIBXML_SCHEMAS_ENABLED)
36793 xmlSchemaFacetPtr facet; /* the facet to check */
36795 xmlSchemaWhitespaceValueType fws; /* the whitespace type of the facet's value */
36797 xmlSchemaValType valType; /* the built-in type of the value */
36799 xmlChar * value; /* the lexical (or normalized for pattern) repr of the value to validate */
36801 xmlSchemaValPtr val; /* the precomputed value */
36803 xmlSchemaWhitespaceValueType ws; /* the whitespace type of the value */
36806 for (n_facet = 0;n_facet < gen_nb_xmlSchemaFacetPtr;n_facet++) {
36807 for (n_fws = 0;n_fws < gen_nb_xmlSchemaWhitespaceValueType;n_fws++) {
36808 for (n_valType = 0;n_valType < gen_nb_xmlSchemaValType;n_valType++) {
36809 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
36810 for (n_val = 0;n_val < gen_nb_xmlSchemaValPtr;n_val++) {
36811 for (n_ws = 0;n_ws < gen_nb_xmlSchemaWhitespaceValueType;n_ws++) {
36812 mem_base = xmlMemBlocks();
36813 facet = gen_xmlSchemaFacetPtr(n_facet, 0);
36814 fws = gen_xmlSchemaWhitespaceValueType(n_fws, 1);
36815 valType = gen_xmlSchemaValType(n_valType, 2);
36816 value = gen_const_xmlChar_ptr(n_value, 3);
36817 val = gen_xmlSchemaValPtr(n_val, 4);
36818 ws = gen_xmlSchemaWhitespaceValueType(n_ws, 5);
36820 ret_val = xmlSchemaValidateFacetWhtsp(facet, fws, valType, (const xmlChar *)value, val, ws);
36821 desret_int(ret_val);
36823 des_xmlSchemaFacetPtr(n_facet, facet, 0);
36824 des_xmlSchemaWhitespaceValueType(n_fws, fws, 1);
36825 des_xmlSchemaValType(n_valType, valType, 2);
36826 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 3);
36827 des_xmlSchemaValPtr(n_val, val, 4);
36828 des_xmlSchemaWhitespaceValueType(n_ws, ws, 5);
36829 xmlResetLastError();
36830 if (mem_base != xmlMemBlocks()) {
36831 printf("Leak of %d blocks found in xmlSchemaValidateFacetWhtsp",
36832 xmlMemBlocks() - mem_base);
36834 printf(" %d", n_facet);
36835 printf(" %d", n_fws);
36836 printf(" %d", n_valType);
36837 printf(" %d", n_value);
36838 printf(" %d", n_val);
36839 printf(" %d", n_ws);
36856 test_xmlSchemaValidateLengthFacet(void) {
36859 #if defined(LIBXML_SCHEMAS_ENABLED)
36862 xmlSchemaTypePtr type; /* the built-in type */
36864 xmlSchemaFacetPtr facet; /* the facet to check */
36866 xmlChar * value; /* the lexical repr. of the value to be validated */
36868 xmlSchemaValPtr val; /* the precomputed value */
36870 unsigned long * length; /* the actual length of the value */
36873 for (n_type = 0;n_type < gen_nb_xmlSchemaTypePtr;n_type++) {
36874 for (n_facet = 0;n_facet < gen_nb_xmlSchemaFacetPtr;n_facet++) {
36875 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
36876 for (n_val = 0;n_val < gen_nb_xmlSchemaValPtr;n_val++) {
36877 for (n_length = 0;n_length < gen_nb_unsigned_long_ptr;n_length++) {
36878 mem_base = xmlMemBlocks();
36879 type = gen_xmlSchemaTypePtr(n_type, 0);
36880 facet = gen_xmlSchemaFacetPtr(n_facet, 1);
36881 value = gen_const_xmlChar_ptr(n_value, 2);
36882 val = gen_xmlSchemaValPtr(n_val, 3);
36883 length = gen_unsigned_long_ptr(n_length, 4);
36885 ret_val = xmlSchemaValidateLengthFacet(type, facet, (const xmlChar *)value, val, length);
36886 desret_int(ret_val);
36888 des_xmlSchemaTypePtr(n_type, type, 0);
36889 des_xmlSchemaFacetPtr(n_facet, facet, 1);
36890 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 2);
36891 des_xmlSchemaValPtr(n_val, val, 3);
36892 des_unsigned_long_ptr(n_length, length, 4);
36893 xmlResetLastError();
36894 if (mem_base != xmlMemBlocks()) {
36895 printf("Leak of %d blocks found in xmlSchemaValidateLengthFacet",
36896 xmlMemBlocks() - mem_base);
36898 printf(" %d", n_type);
36899 printf(" %d", n_facet);
36900 printf(" %d", n_value);
36901 printf(" %d", n_val);
36902 printf(" %d", n_length);
36918 test_xmlSchemaValidateLengthFacetWhtsp(void) {
36921 #if defined(LIBXML_SCHEMAS_ENABLED)
36924 xmlSchemaFacetPtr facet; /* the facet to check */
36926 xmlSchemaValType valType; /* the built-in type */
36928 xmlChar * value; /* the lexical repr. of the value to be validated */
36930 xmlSchemaValPtr val; /* the precomputed value */
36932 unsigned long * length; /* the actual length of the value */
36934 xmlSchemaWhitespaceValueType ws; /* the whitespace type of the value */
36937 for (n_facet = 0;n_facet < gen_nb_xmlSchemaFacetPtr;n_facet++) {
36938 for (n_valType = 0;n_valType < gen_nb_xmlSchemaValType;n_valType++) {
36939 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
36940 for (n_val = 0;n_val < gen_nb_xmlSchemaValPtr;n_val++) {
36941 for (n_length = 0;n_length < gen_nb_unsigned_long_ptr;n_length++) {
36942 for (n_ws = 0;n_ws < gen_nb_xmlSchemaWhitespaceValueType;n_ws++) {
36943 mem_base = xmlMemBlocks();
36944 facet = gen_xmlSchemaFacetPtr(n_facet, 0);
36945 valType = gen_xmlSchemaValType(n_valType, 1);
36946 value = gen_const_xmlChar_ptr(n_value, 2);
36947 val = gen_xmlSchemaValPtr(n_val, 3);
36948 length = gen_unsigned_long_ptr(n_length, 4);
36949 ws = gen_xmlSchemaWhitespaceValueType(n_ws, 5);
36951 ret_val = xmlSchemaValidateLengthFacetWhtsp(facet, valType, (const xmlChar *)value, val, length, ws);
36952 desret_int(ret_val);
36954 des_xmlSchemaFacetPtr(n_facet, facet, 0);
36955 des_xmlSchemaValType(n_valType, valType, 1);
36956 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 2);
36957 des_xmlSchemaValPtr(n_val, val, 3);
36958 des_unsigned_long_ptr(n_length, length, 4);
36959 des_xmlSchemaWhitespaceValueType(n_ws, ws, 5);
36960 xmlResetLastError();
36961 if (mem_base != xmlMemBlocks()) {
36962 printf("Leak of %d blocks found in xmlSchemaValidateLengthFacetWhtsp",
36963 xmlMemBlocks() - mem_base);
36965 printf(" %d", n_facet);
36966 printf(" %d", n_valType);
36967 printf(" %d", n_value);
36968 printf(" %d", n_val);
36969 printf(" %d", n_length);
36970 printf(" %d", n_ws);
36987 test_xmlSchemaValidateListSimpleTypeFacet(void) {
36990 #if defined(LIBXML_SCHEMAS_ENABLED)
36993 xmlSchemaFacetPtr facet; /* the facet to check */
36995 xmlChar * value; /* the lexical repr of the value to validate */
36997 unsigned long actualLen; /* the number of list items */
36999 unsigned long * expectedLen; /* the resulting expected number of list items */
37002 for (n_facet = 0;n_facet < gen_nb_xmlSchemaFacetPtr;n_facet++) {
37003 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
37004 for (n_actualLen = 0;n_actualLen < gen_nb_unsigned_long;n_actualLen++) {
37005 for (n_expectedLen = 0;n_expectedLen < gen_nb_unsigned_long_ptr;n_expectedLen++) {
37006 mem_base = xmlMemBlocks();
37007 facet = gen_xmlSchemaFacetPtr(n_facet, 0);
37008 value = gen_const_xmlChar_ptr(n_value, 1);
37009 actualLen = gen_unsigned_long(n_actualLen, 2);
37010 expectedLen = gen_unsigned_long_ptr(n_expectedLen, 3);
37012 ret_val = xmlSchemaValidateListSimpleTypeFacet(facet, (const xmlChar *)value, actualLen, expectedLen);
37013 desret_int(ret_val);
37015 des_xmlSchemaFacetPtr(n_facet, facet, 0);
37016 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 1);
37017 des_unsigned_long(n_actualLen, actualLen, 2);
37018 des_unsigned_long_ptr(n_expectedLen, expectedLen, 3);
37019 xmlResetLastError();
37020 if (mem_base != xmlMemBlocks()) {
37021 printf("Leak of %d blocks found in xmlSchemaValidateListSimpleTypeFacet",
37022 xmlMemBlocks() - mem_base);
37024 printf(" %d", n_facet);
37025 printf(" %d", n_value);
37026 printf(" %d", n_actualLen);
37027 printf(" %d", n_expectedLen);
37042 test_xmlSchemaValidatePredefinedType(void) {
37045 #if defined(LIBXML_SCHEMAS_ENABLED)
37048 xmlSchemaTypePtr type; /* the predefined type */
37050 xmlChar * value; /* the value to check */
37052 xmlSchemaValPtr * val; /* the return computed value */
37055 for (n_type = 0;n_type < gen_nb_xmlSchemaTypePtr;n_type++) {
37056 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
37057 for (n_val = 0;n_val < gen_nb_xmlSchemaValPtr_ptr;n_val++) {
37058 mem_base = xmlMemBlocks();
37059 type = gen_xmlSchemaTypePtr(n_type, 0);
37060 value = gen_const_xmlChar_ptr(n_value, 1);
37061 val = gen_xmlSchemaValPtr_ptr(n_val, 2);
37063 ret_val = xmlSchemaValidatePredefinedType(type, (const xmlChar *)value, val);
37064 desret_int(ret_val);
37066 des_xmlSchemaTypePtr(n_type, type, 0);
37067 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 1);
37068 des_xmlSchemaValPtr_ptr(n_val, val, 2);
37069 xmlResetLastError();
37070 if (mem_base != xmlMemBlocks()) {
37071 printf("Leak of %d blocks found in xmlSchemaValidatePredefinedType",
37072 xmlMemBlocks() - mem_base);
37074 printf(" %d", n_type);
37075 printf(" %d", n_value);
37076 printf(" %d", n_val);
37090 test_xmlSchemaValueAppend(void) {
37093 #if defined(LIBXML_SCHEMAS_ENABLED)
37096 xmlSchemaValPtr prev; /* the value */
37098 xmlSchemaValPtr cur; /* the value to be appended */
37101 for (n_prev = 0;n_prev < gen_nb_xmlSchemaValPtr;n_prev++) {
37102 for (n_cur = 0;n_cur < gen_nb_xmlSchemaValPtr;n_cur++) {
37103 mem_base = xmlMemBlocks();
37104 prev = gen_xmlSchemaValPtr(n_prev, 0);
37105 cur = gen_xmlSchemaValPtr(n_cur, 1);
37107 ret_val = xmlSchemaValueAppend(prev, cur);
37108 desret_int(ret_val);
37110 des_xmlSchemaValPtr(n_prev, prev, 0);
37111 des_xmlSchemaValPtr(n_cur, cur, 1);
37112 xmlResetLastError();
37113 if (mem_base != xmlMemBlocks()) {
37114 printf("Leak of %d blocks found in xmlSchemaValueAppend",
37115 xmlMemBlocks() - mem_base);
37117 printf(" %d", n_prev);
37118 printf(" %d", n_cur);
37131 test_xmlSchemaValueGetAsBoolean(void) {
37134 #if defined(LIBXML_SCHEMAS_ENABLED)
37137 xmlSchemaValPtr val; /* the value */
37140 for (n_val = 0;n_val < gen_nb_xmlSchemaValPtr;n_val++) {
37141 mem_base = xmlMemBlocks();
37142 val = gen_xmlSchemaValPtr(n_val, 0);
37144 ret_val = xmlSchemaValueGetAsBoolean(val);
37145 desret_int(ret_val);
37147 des_xmlSchemaValPtr(n_val, val, 0);
37148 xmlResetLastError();
37149 if (mem_base != xmlMemBlocks()) {
37150 printf("Leak of %d blocks found in xmlSchemaValueGetAsBoolean",
37151 xmlMemBlocks() - mem_base);
37153 printf(" %d", n_val);
37165 test_xmlSchemaValueGetAsString(void) {
37168 #if defined(LIBXML_SCHEMAS_ENABLED)
37170 const xmlChar * ret_val;
37171 xmlSchemaValPtr val; /* the value */
37174 for (n_val = 0;n_val < gen_nb_xmlSchemaValPtr;n_val++) {
37175 mem_base = xmlMemBlocks();
37176 val = gen_xmlSchemaValPtr(n_val, 0);
37178 ret_val = xmlSchemaValueGetAsString(val);
37179 desret_const_xmlChar_ptr(ret_val);
37181 des_xmlSchemaValPtr(n_val, val, 0);
37182 xmlResetLastError();
37183 if (mem_base != xmlMemBlocks()) {
37184 printf("Leak of %d blocks found in xmlSchemaValueGetAsString",
37185 xmlMemBlocks() - mem_base);
37187 printf(" %d", n_val);
37199 test_xmlSchemaValueGetNext(void) {
37203 /* missing type support */
37209 test_xmlSchemaWhiteSpaceReplace(void) {
37212 #if defined(LIBXML_SCHEMAS_ENABLED)
37215 xmlChar * value; /* a value */
37218 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
37219 mem_base = xmlMemBlocks();
37220 value = gen_const_xmlChar_ptr(n_value, 0);
37222 ret_val = xmlSchemaWhiteSpaceReplace((const xmlChar *)value);
37223 desret_xmlChar_ptr(ret_val);
37225 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 0);
37226 xmlResetLastError();
37227 if (mem_base != xmlMemBlocks()) {
37228 printf("Leak of %d blocks found in xmlSchemaWhiteSpaceReplace",
37229 xmlMemBlocks() - mem_base);
37231 printf(" %d", n_value);
37242 test_xmlschemastypes(void) {
37246 if (quiet == 0) printf("Testing xmlschemastypes : 26 of 34 functions ...\n");
37247 rc = test_xmlSchemaCheckFacet();
37248 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37249 rc = test_xmlSchemaCleanupTypes();
37250 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37251 rc = test_xmlSchemaCollapseString();
37252 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37253 rc = test_xmlSchemaCompareValues();
37254 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37255 rc = test_xmlSchemaCompareValuesWhtsp();
37256 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37257 rc = test_xmlSchemaCopyValue();
37258 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37259 rc = test_xmlSchemaGetBuiltInListSimpleTypeItemType();
37260 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37261 rc = test_xmlSchemaGetBuiltInType();
37262 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37263 rc = test_xmlSchemaGetCanonValue();
37264 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37265 rc = test_xmlSchemaGetCanonValueWhtsp();
37266 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37267 rc = test_xmlSchemaGetFacetValueAsULong();
37268 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37269 rc = test_xmlSchemaGetPredefinedType();
37270 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37271 rc = test_xmlSchemaGetValType();
37272 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37273 rc = test_xmlSchemaInitTypes();
37274 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37275 rc = test_xmlSchemaIsBuiltInTypeFacet();
37276 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37277 rc = test_xmlSchemaNewFacet();
37278 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37279 rc = test_xmlSchemaNewNOTATIONValue();
37280 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37281 rc = test_xmlSchemaNewQNameValue();
37282 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37283 rc = test_xmlSchemaNewStringValue();
37284 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37285 rc = test_xmlSchemaValPredefTypeNode();
37286 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37287 rc = test_xmlSchemaValPredefTypeNodeNoNorm();
37288 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37289 rc = test_xmlSchemaValidateFacet();
37290 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37291 rc = test_xmlSchemaValidateFacetWhtsp();
37292 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37293 rc = test_xmlSchemaValidateLengthFacet();
37294 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37295 rc = test_xmlSchemaValidateLengthFacetWhtsp();
37296 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37297 rc = test_xmlSchemaValidateListSimpleTypeFacet();
37298 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37299 rc = test_xmlSchemaValidatePredefinedType();
37300 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37301 rc = test_xmlSchemaValueAppend();
37302 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37303 rc = test_xmlSchemaValueGetAsBoolean();
37304 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37305 rc = test_xmlSchemaValueGetAsString();
37306 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37307 rc = test_xmlSchemaValueGetNext();
37308 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37309 rc = test_xmlSchemaWhiteSpaceReplace();
37310 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37313 printf("Module xmlschemastypes: %d errors\n", test_ret);
37318 test_xmlCharStrdup(void) {
37323 char * cur; /* the input char * */
37326 for (n_cur = 0;n_cur < gen_nb_const_char_ptr;n_cur++) {
37327 mem_base = xmlMemBlocks();
37328 cur = gen_const_char_ptr(n_cur, 0);
37330 ret_val = xmlCharStrdup((const char *)cur);
37331 desret_xmlChar_ptr(ret_val);
37333 des_const_char_ptr(n_cur, (const char *)cur, 0);
37334 xmlResetLastError();
37335 if (mem_base != xmlMemBlocks()) {
37336 printf("Leak of %d blocks found in xmlCharStrdup",
37337 xmlMemBlocks() - mem_base);
37339 printf(" %d", n_cur);
37350 test_xmlCharStrndup(void) {
37355 char * cur; /* the input char * */
37357 int len; /* the len of @cur */
37360 for (n_cur = 0;n_cur < gen_nb_const_char_ptr;n_cur++) {
37361 for (n_len = 0;n_len < gen_nb_int;n_len++) {
37362 mem_base = xmlMemBlocks();
37363 cur = gen_const_char_ptr(n_cur, 0);
37364 len = gen_int(n_len, 1);
37365 if ((cur != NULL) &&
37366 (len > (int) strlen((const char *) cur) + 1))
37369 ret_val = xmlCharStrndup((const char *)cur, len);
37370 desret_xmlChar_ptr(ret_val);
37372 des_const_char_ptr(n_cur, (const char *)cur, 0);
37373 des_int(n_len, len, 1);
37374 xmlResetLastError();
37375 if (mem_base != xmlMemBlocks()) {
37376 printf("Leak of %d blocks found in xmlCharStrndup",
37377 xmlMemBlocks() - mem_base);
37379 printf(" %d", n_cur);
37380 printf(" %d", n_len);
37392 test_xmlCheckUTF8(void) {
37397 unsigned char * utf; /* Pointer to putative UTF-8 encoded string. */
37400 for (n_utf = 0;n_utf < gen_nb_const_unsigned_char_ptr;n_utf++) {
37401 mem_base = xmlMemBlocks();
37402 utf = gen_const_unsigned_char_ptr(n_utf, 0);
37404 ret_val = xmlCheckUTF8((const unsigned char *)utf);
37405 desret_int(ret_val);
37407 des_const_unsigned_char_ptr(n_utf, (const unsigned char *)utf, 0);
37408 xmlResetLastError();
37409 if (mem_base != xmlMemBlocks()) {
37410 printf("Leak of %d blocks found in xmlCheckUTF8",
37411 xmlMemBlocks() - mem_base);
37413 printf(" %d", n_utf);
37424 test_xmlGetUTF8Char(void) {
37429 unsigned char * utf; /* a sequence of UTF-8 encoded bytes */
37431 int * len; /* a pointer to the minimum number of bytes present in the sequence. This is used to assure the next character is completely contained within the sequence. */
37434 for (n_utf = 0;n_utf < gen_nb_const_unsigned_char_ptr;n_utf++) {
37435 for (n_len = 0;n_len < gen_nb_int_ptr;n_len++) {
37436 mem_base = xmlMemBlocks();
37437 utf = gen_const_unsigned_char_ptr(n_utf, 0);
37438 len = gen_int_ptr(n_len, 1);
37440 ret_val = xmlGetUTF8Char((const unsigned char *)utf, len);
37441 desret_int(ret_val);
37443 des_const_unsigned_char_ptr(n_utf, (const unsigned char *)utf, 0);
37444 des_int_ptr(n_len, len, 1);
37445 xmlResetLastError();
37446 if (mem_base != xmlMemBlocks()) {
37447 printf("Leak of %d blocks found in xmlGetUTF8Char",
37448 xmlMemBlocks() - mem_base);
37450 printf(" %d", n_utf);
37451 printf(" %d", n_len);
37463 test_xmlStrEqual(void) {
37468 xmlChar * str1; /* the first xmlChar * */
37470 xmlChar * str2; /* the second xmlChar * */
37473 for (n_str1 = 0;n_str1 < gen_nb_const_xmlChar_ptr;n_str1++) {
37474 for (n_str2 = 0;n_str2 < gen_nb_const_xmlChar_ptr;n_str2++) {
37475 mem_base = xmlMemBlocks();
37476 str1 = gen_const_xmlChar_ptr(n_str1, 0);
37477 str2 = gen_const_xmlChar_ptr(n_str2, 1);
37479 ret_val = xmlStrEqual((const xmlChar *)str1, (const xmlChar *)str2);
37480 desret_int(ret_val);
37482 des_const_xmlChar_ptr(n_str1, (const xmlChar *)str1, 0);
37483 des_const_xmlChar_ptr(n_str2, (const xmlChar *)str2, 1);
37484 xmlResetLastError();
37485 if (mem_base != xmlMemBlocks()) {
37486 printf("Leak of %d blocks found in xmlStrEqual",
37487 xmlMemBlocks() - mem_base);
37489 printf(" %d", n_str1);
37490 printf(" %d", n_str2);
37502 test_xmlStrPrintf(void) {
37506 /* missing type support */
37512 test_xmlStrQEqual(void) {
37517 xmlChar * pref; /* the prefix of the QName */
37519 xmlChar * name; /* the localname of the QName */
37521 xmlChar * str; /* the second xmlChar * */
37524 for (n_pref = 0;n_pref < gen_nb_const_xmlChar_ptr;n_pref++) {
37525 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
37526 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
37527 mem_base = xmlMemBlocks();
37528 pref = gen_const_xmlChar_ptr(n_pref, 0);
37529 name = gen_const_xmlChar_ptr(n_name, 1);
37530 str = gen_const_xmlChar_ptr(n_str, 2);
37532 ret_val = xmlStrQEqual((const xmlChar *)pref, (const xmlChar *)name, (const xmlChar *)str);
37533 desret_int(ret_val);
37535 des_const_xmlChar_ptr(n_pref, (const xmlChar *)pref, 0);
37536 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
37537 des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 2);
37538 xmlResetLastError();
37539 if (mem_base != xmlMemBlocks()) {
37540 printf("Leak of %d blocks found in xmlStrQEqual",
37541 xmlMemBlocks() - mem_base);
37543 printf(" %d", n_pref);
37544 printf(" %d", n_name);
37545 printf(" %d", n_str);
37558 test_xmlStrVPrintf(void) {
37562 /* missing type support */
37568 test_xmlStrcasecmp(void) {
37573 xmlChar * str1; /* the first xmlChar * */
37575 xmlChar * str2; /* the second xmlChar * */
37578 for (n_str1 = 0;n_str1 < gen_nb_const_xmlChar_ptr;n_str1++) {
37579 for (n_str2 = 0;n_str2 < gen_nb_const_xmlChar_ptr;n_str2++) {
37580 mem_base = xmlMemBlocks();
37581 str1 = gen_const_xmlChar_ptr(n_str1, 0);
37582 str2 = gen_const_xmlChar_ptr(n_str2, 1);
37584 ret_val = xmlStrcasecmp((const xmlChar *)str1, (const xmlChar *)str2);
37585 desret_int(ret_val);
37587 des_const_xmlChar_ptr(n_str1, (const xmlChar *)str1, 0);
37588 des_const_xmlChar_ptr(n_str2, (const xmlChar *)str2, 1);
37589 xmlResetLastError();
37590 if (mem_base != xmlMemBlocks()) {
37591 printf("Leak of %d blocks found in xmlStrcasecmp",
37592 xmlMemBlocks() - mem_base);
37594 printf(" %d", n_str1);
37595 printf(" %d", n_str2);
37607 test_xmlStrcasestr(void) {
37611 const xmlChar * ret_val;
37612 xmlChar * str; /* the xmlChar * array (haystack) */
37614 xmlChar * val; /* the xmlChar to search (needle) */
37617 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
37618 for (n_val = 0;n_val < gen_nb_const_xmlChar_ptr;n_val++) {
37619 mem_base = xmlMemBlocks();
37620 str = gen_const_xmlChar_ptr(n_str, 0);
37621 val = gen_const_xmlChar_ptr(n_val, 1);
37623 ret_val = xmlStrcasestr((const xmlChar *)str, (const xmlChar *)val);
37624 desret_const_xmlChar_ptr(ret_val);
37626 des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 0);
37627 des_const_xmlChar_ptr(n_val, (const xmlChar *)val, 1);
37628 xmlResetLastError();
37629 if (mem_base != xmlMemBlocks()) {
37630 printf("Leak of %d blocks found in xmlStrcasestr",
37631 xmlMemBlocks() - mem_base);
37633 printf(" %d", n_str);
37634 printf(" %d", n_val);
37646 test_xmlStrchr(void) {
37650 const xmlChar * ret_val;
37651 xmlChar * str; /* the xmlChar * array */
37653 xmlChar val; /* the xmlChar to search */
37656 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
37657 for (n_val = 0;n_val < gen_nb_xmlChar;n_val++) {
37658 mem_base = xmlMemBlocks();
37659 str = gen_const_xmlChar_ptr(n_str, 0);
37660 val = gen_xmlChar(n_val, 1);
37662 ret_val = xmlStrchr((const xmlChar *)str, val);
37663 desret_const_xmlChar_ptr(ret_val);
37665 des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 0);
37666 des_xmlChar(n_val, val, 1);
37667 xmlResetLastError();
37668 if (mem_base != xmlMemBlocks()) {
37669 printf("Leak of %d blocks found in xmlStrchr",
37670 xmlMemBlocks() - mem_base);
37672 printf(" %d", n_str);
37673 printf(" %d", n_val);
37685 test_xmlStrcmp(void) {
37690 xmlChar * str1; /* the first xmlChar * */
37692 xmlChar * str2; /* the second xmlChar * */
37695 for (n_str1 = 0;n_str1 < gen_nb_const_xmlChar_ptr;n_str1++) {
37696 for (n_str2 = 0;n_str2 < gen_nb_const_xmlChar_ptr;n_str2++) {
37697 mem_base = xmlMemBlocks();
37698 str1 = gen_const_xmlChar_ptr(n_str1, 0);
37699 str2 = gen_const_xmlChar_ptr(n_str2, 1);
37701 ret_val = xmlStrcmp((const xmlChar *)str1, (const xmlChar *)str2);
37702 desret_int(ret_val);
37704 des_const_xmlChar_ptr(n_str1, (const xmlChar *)str1, 0);
37705 des_const_xmlChar_ptr(n_str2, (const xmlChar *)str2, 1);
37706 xmlResetLastError();
37707 if (mem_base != xmlMemBlocks()) {
37708 printf("Leak of %d blocks found in xmlStrcmp",
37709 xmlMemBlocks() - mem_base);
37711 printf(" %d", n_str1);
37712 printf(" %d", n_str2);
37724 test_xmlStrdup(void) {
37729 xmlChar * cur; /* the input xmlChar * */
37732 for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
37733 mem_base = xmlMemBlocks();
37734 cur = gen_const_xmlChar_ptr(n_cur, 0);
37736 ret_val = xmlStrdup((const xmlChar *)cur);
37737 desret_xmlChar_ptr(ret_val);
37739 des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 0);
37740 xmlResetLastError();
37741 if (mem_base != xmlMemBlocks()) {
37742 printf("Leak of %d blocks found in xmlStrdup",
37743 xmlMemBlocks() - mem_base);
37745 printf(" %d", n_cur);
37756 test_xmlStrlen(void) {
37761 xmlChar * str; /* the xmlChar * array */
37764 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
37765 mem_base = xmlMemBlocks();
37766 str = gen_const_xmlChar_ptr(n_str, 0);
37768 ret_val = xmlStrlen((const xmlChar *)str);
37769 desret_int(ret_val);
37771 des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 0);
37772 xmlResetLastError();
37773 if (mem_base != xmlMemBlocks()) {
37774 printf("Leak of %d blocks found in xmlStrlen",
37775 xmlMemBlocks() - mem_base);
37777 printf(" %d", n_str);
37788 test_xmlStrncasecmp(void) {
37793 xmlChar * str1; /* the first xmlChar * */
37795 xmlChar * str2; /* the second xmlChar * */
37797 int len; /* the max comparison length */
37800 for (n_str1 = 0;n_str1 < gen_nb_const_xmlChar_ptr;n_str1++) {
37801 for (n_str2 = 0;n_str2 < gen_nb_const_xmlChar_ptr;n_str2++) {
37802 for (n_len = 0;n_len < gen_nb_int;n_len++) {
37803 mem_base = xmlMemBlocks();
37804 str1 = gen_const_xmlChar_ptr(n_str1, 0);
37805 str2 = gen_const_xmlChar_ptr(n_str2, 1);
37806 len = gen_int(n_len, 2);
37807 if ((str2 != NULL) &&
37808 (len > (int) strlen((const char *) str2) + 1))
37811 ret_val = xmlStrncasecmp((const xmlChar *)str1, (const xmlChar *)str2, len);
37812 desret_int(ret_val);
37814 des_const_xmlChar_ptr(n_str1, (const xmlChar *)str1, 0);
37815 des_const_xmlChar_ptr(n_str2, (const xmlChar *)str2, 1);
37816 des_int(n_len, len, 2);
37817 xmlResetLastError();
37818 if (mem_base != xmlMemBlocks()) {
37819 printf("Leak of %d blocks found in xmlStrncasecmp",
37820 xmlMemBlocks() - mem_base);
37822 printf(" %d", n_str1);
37823 printf(" %d", n_str2);
37824 printf(" %d", n_len);
37837 test_xmlStrncatNew(void) {
37842 xmlChar * str1; /* first xmlChar string */
37844 xmlChar * str2; /* second xmlChar string */
37846 int len; /* the len of @str2 or < 0 */
37849 for (n_str1 = 0;n_str1 < gen_nb_const_xmlChar_ptr;n_str1++) {
37850 for (n_str2 = 0;n_str2 < gen_nb_const_xmlChar_ptr;n_str2++) {
37851 for (n_len = 0;n_len < gen_nb_int;n_len++) {
37852 mem_base = xmlMemBlocks();
37853 str1 = gen_const_xmlChar_ptr(n_str1, 0);
37854 str2 = gen_const_xmlChar_ptr(n_str2, 1);
37855 len = gen_int(n_len, 2);
37856 if ((str2 != NULL) &&
37857 (len > (int) strlen((const char *) str2) + 1))
37860 ret_val = xmlStrncatNew((const xmlChar *)str1, (const xmlChar *)str2, len);
37861 desret_xmlChar_ptr(ret_val);
37863 des_const_xmlChar_ptr(n_str1, (const xmlChar *)str1, 0);
37864 des_const_xmlChar_ptr(n_str2, (const xmlChar *)str2, 1);
37865 des_int(n_len, len, 2);
37866 xmlResetLastError();
37867 if (mem_base != xmlMemBlocks()) {
37868 printf("Leak of %d blocks found in xmlStrncatNew",
37869 xmlMemBlocks() - mem_base);
37871 printf(" %d", n_str1);
37872 printf(" %d", n_str2);
37873 printf(" %d", n_len);
37886 test_xmlStrncmp(void) {
37891 xmlChar * str1; /* the first xmlChar * */
37893 xmlChar * str2; /* the second xmlChar * */
37895 int len; /* the max comparison length */
37898 for (n_str1 = 0;n_str1 < gen_nb_const_xmlChar_ptr;n_str1++) {
37899 for (n_str2 = 0;n_str2 < gen_nb_const_xmlChar_ptr;n_str2++) {
37900 for (n_len = 0;n_len < gen_nb_int;n_len++) {
37901 mem_base = xmlMemBlocks();
37902 str1 = gen_const_xmlChar_ptr(n_str1, 0);
37903 str2 = gen_const_xmlChar_ptr(n_str2, 1);
37904 len = gen_int(n_len, 2);
37905 if ((str2 != NULL) &&
37906 (len > (int) strlen((const char *) str2) + 1))
37909 ret_val = xmlStrncmp((const xmlChar *)str1, (const xmlChar *)str2, len);
37910 desret_int(ret_val);
37912 des_const_xmlChar_ptr(n_str1, (const xmlChar *)str1, 0);
37913 des_const_xmlChar_ptr(n_str2, (const xmlChar *)str2, 1);
37914 des_int(n_len, len, 2);
37915 xmlResetLastError();
37916 if (mem_base != xmlMemBlocks()) {
37917 printf("Leak of %d blocks found in xmlStrncmp",
37918 xmlMemBlocks() - mem_base);
37920 printf(" %d", n_str1);
37921 printf(" %d", n_str2);
37922 printf(" %d", n_len);
37935 test_xmlStrndup(void) {
37940 xmlChar * cur; /* the input xmlChar * */
37942 int len; /* the len of @cur */
37945 for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
37946 for (n_len = 0;n_len < gen_nb_int;n_len++) {
37947 mem_base = xmlMemBlocks();
37948 cur = gen_const_xmlChar_ptr(n_cur, 0);
37949 len = gen_int(n_len, 1);
37950 if ((cur != NULL) &&
37951 (len > (int) strlen((const char *) cur) + 1))
37954 ret_val = xmlStrndup((const xmlChar *)cur, len);
37955 desret_xmlChar_ptr(ret_val);
37957 des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 0);
37958 des_int(n_len, len, 1);
37959 xmlResetLastError();
37960 if (mem_base != xmlMemBlocks()) {
37961 printf("Leak of %d blocks found in xmlStrndup",
37962 xmlMemBlocks() - mem_base);
37964 printf(" %d", n_cur);
37965 printf(" %d", n_len);
37977 test_xmlStrstr(void) {
37981 const xmlChar * ret_val;
37982 xmlChar * str; /* the xmlChar * array (haystack) */
37984 xmlChar * val; /* the xmlChar to search (needle) */
37987 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
37988 for (n_val = 0;n_val < gen_nb_const_xmlChar_ptr;n_val++) {
37989 mem_base = xmlMemBlocks();
37990 str = gen_const_xmlChar_ptr(n_str, 0);
37991 val = gen_const_xmlChar_ptr(n_val, 1);
37993 ret_val = xmlStrstr((const xmlChar *)str, (const xmlChar *)val);
37994 desret_const_xmlChar_ptr(ret_val);
37996 des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 0);
37997 des_const_xmlChar_ptr(n_val, (const xmlChar *)val, 1);
37998 xmlResetLastError();
37999 if (mem_base != xmlMemBlocks()) {
38000 printf("Leak of %d blocks found in xmlStrstr",
38001 xmlMemBlocks() - mem_base);
38003 printf(" %d", n_str);
38004 printf(" %d", n_val);
38016 test_xmlStrsub(void) {
38021 xmlChar * str; /* the xmlChar * array (haystack) */
38023 int start; /* the index of the first char (zero based) */
38025 int len; /* the length of the substring */
38028 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
38029 for (n_start = 0;n_start < gen_nb_int;n_start++) {
38030 for (n_len = 0;n_len < gen_nb_int;n_len++) {
38031 mem_base = xmlMemBlocks();
38032 str = gen_const_xmlChar_ptr(n_str, 0);
38033 start = gen_int(n_start, 1);
38034 len = gen_int(n_len, 2);
38035 if ((str != NULL) &&
38036 (start > (int) strlen((const char *) str) + 1))
38038 if ((str != NULL) &&
38039 (len > (int) strlen((const char *) str) + 1))
38042 ret_val = xmlStrsub((const xmlChar *)str, start, len);
38043 desret_xmlChar_ptr(ret_val);
38045 des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 0);
38046 des_int(n_start, start, 1);
38047 des_int(n_len, len, 2);
38048 xmlResetLastError();
38049 if (mem_base != xmlMemBlocks()) {
38050 printf("Leak of %d blocks found in xmlStrsub",
38051 xmlMemBlocks() - mem_base);
38053 printf(" %d", n_str);
38054 printf(" %d", n_start);
38055 printf(" %d", n_len);
38068 test_xmlUTF8Charcmp(void) {
38073 xmlChar * utf1; /* pointer to first UTF8 char */
38075 xmlChar * utf2; /* pointer to second UTF8 char */
38078 for (n_utf1 = 0;n_utf1 < gen_nb_const_xmlChar_ptr;n_utf1++) {
38079 for (n_utf2 = 0;n_utf2 < gen_nb_const_xmlChar_ptr;n_utf2++) {
38080 mem_base = xmlMemBlocks();
38081 utf1 = gen_const_xmlChar_ptr(n_utf1, 0);
38082 utf2 = gen_const_xmlChar_ptr(n_utf2, 1);
38084 ret_val = xmlUTF8Charcmp((const xmlChar *)utf1, (const xmlChar *)utf2);
38085 desret_int(ret_val);
38087 des_const_xmlChar_ptr(n_utf1, (const xmlChar *)utf1, 0);
38088 des_const_xmlChar_ptr(n_utf2, (const xmlChar *)utf2, 1);
38089 xmlResetLastError();
38090 if (mem_base != xmlMemBlocks()) {
38091 printf("Leak of %d blocks found in xmlUTF8Charcmp",
38092 xmlMemBlocks() - mem_base);
38094 printf(" %d", n_utf1);
38095 printf(" %d", n_utf2);
38107 test_xmlUTF8Size(void) {
38112 xmlChar * utf; /* pointer to the UTF8 character */
38115 for (n_utf = 0;n_utf < gen_nb_const_xmlChar_ptr;n_utf++) {
38116 mem_base = xmlMemBlocks();
38117 utf = gen_const_xmlChar_ptr(n_utf, 0);
38119 ret_val = xmlUTF8Size((const xmlChar *)utf);
38120 desret_int(ret_val);
38122 des_const_xmlChar_ptr(n_utf, (const xmlChar *)utf, 0);
38123 xmlResetLastError();
38124 if (mem_base != xmlMemBlocks()) {
38125 printf("Leak of %d blocks found in xmlUTF8Size",
38126 xmlMemBlocks() - mem_base);
38128 printf(" %d", n_utf);
38139 test_xmlUTF8Strlen(void) {
38144 xmlChar * utf; /* a sequence of UTF-8 encoded bytes */
38147 for (n_utf = 0;n_utf < gen_nb_const_xmlChar_ptr;n_utf++) {
38148 mem_base = xmlMemBlocks();
38149 utf = gen_const_xmlChar_ptr(n_utf, 0);
38151 ret_val = xmlUTF8Strlen((const xmlChar *)utf);
38152 desret_int(ret_val);
38154 des_const_xmlChar_ptr(n_utf, (const xmlChar *)utf, 0);
38155 xmlResetLastError();
38156 if (mem_base != xmlMemBlocks()) {
38157 printf("Leak of %d blocks found in xmlUTF8Strlen",
38158 xmlMemBlocks() - mem_base);
38160 printf(" %d", n_utf);
38171 test_xmlUTF8Strloc(void) {
38176 xmlChar * utf; /* the input UTF8 * */
38178 xmlChar * utfchar; /* the UTF8 character to be found */
38181 for (n_utf = 0;n_utf < gen_nb_const_xmlChar_ptr;n_utf++) {
38182 for (n_utfchar = 0;n_utfchar < gen_nb_const_xmlChar_ptr;n_utfchar++) {
38183 mem_base = xmlMemBlocks();
38184 utf = gen_const_xmlChar_ptr(n_utf, 0);
38185 utfchar = gen_const_xmlChar_ptr(n_utfchar, 1);
38187 ret_val = xmlUTF8Strloc((const xmlChar *)utf, (const xmlChar *)utfchar);
38188 desret_int(ret_val);
38190 des_const_xmlChar_ptr(n_utf, (const xmlChar *)utf, 0);
38191 des_const_xmlChar_ptr(n_utfchar, (const xmlChar *)utfchar, 1);
38192 xmlResetLastError();
38193 if (mem_base != xmlMemBlocks()) {
38194 printf("Leak of %d blocks found in xmlUTF8Strloc",
38195 xmlMemBlocks() - mem_base);
38197 printf(" %d", n_utf);
38198 printf(" %d", n_utfchar);
38210 test_xmlUTF8Strndup(void) {
38215 xmlChar * utf; /* the input UTF8 * */
38217 int len; /* the len of @utf (in chars) */
38220 for (n_utf = 0;n_utf < gen_nb_const_xmlChar_ptr;n_utf++) {
38221 for (n_len = 0;n_len < gen_nb_int;n_len++) {
38222 mem_base = xmlMemBlocks();
38223 utf = gen_const_xmlChar_ptr(n_utf, 0);
38224 len = gen_int(n_len, 1);
38225 if ((utf != NULL) &&
38226 (len > (int) strlen((const char *) utf) + 1))
38229 ret_val = xmlUTF8Strndup((const xmlChar *)utf, len);
38230 desret_xmlChar_ptr(ret_val);
38232 des_const_xmlChar_ptr(n_utf, (const xmlChar *)utf, 0);
38233 des_int(n_len, len, 1);
38234 xmlResetLastError();
38235 if (mem_base != xmlMemBlocks()) {
38236 printf("Leak of %d blocks found in xmlUTF8Strndup",
38237 xmlMemBlocks() - mem_base);
38239 printf(" %d", n_utf);
38240 printf(" %d", n_len);
38252 test_xmlUTF8Strpos(void) {
38256 const xmlChar * ret_val;
38257 xmlChar * utf; /* the input UTF8 * */
38259 int pos; /* the position of the desired UTF8 char (in chars) */
38262 for (n_utf = 0;n_utf < gen_nb_const_xmlChar_ptr;n_utf++) {
38263 for (n_pos = 0;n_pos < gen_nb_int;n_pos++) {
38264 mem_base = xmlMemBlocks();
38265 utf = gen_const_xmlChar_ptr(n_utf, 0);
38266 pos = gen_int(n_pos, 1);
38268 ret_val = xmlUTF8Strpos((const xmlChar *)utf, pos);
38269 desret_const_xmlChar_ptr(ret_val);
38271 des_const_xmlChar_ptr(n_utf, (const xmlChar *)utf, 0);
38272 des_int(n_pos, pos, 1);
38273 xmlResetLastError();
38274 if (mem_base != xmlMemBlocks()) {
38275 printf("Leak of %d blocks found in xmlUTF8Strpos",
38276 xmlMemBlocks() - mem_base);
38278 printf(" %d", n_utf);
38279 printf(" %d", n_pos);
38291 test_xmlUTF8Strsize(void) {
38296 xmlChar * utf; /* a sequence of UTF-8 encoded bytes */
38298 int len; /* the number of characters in the array */
38301 for (n_utf = 0;n_utf < gen_nb_const_xmlChar_ptr;n_utf++) {
38302 for (n_len = 0;n_len < gen_nb_int;n_len++) {
38303 mem_base = xmlMemBlocks();
38304 utf = gen_const_xmlChar_ptr(n_utf, 0);
38305 len = gen_int(n_len, 1);
38306 if ((utf != NULL) &&
38307 (len > (int) strlen((const char *) utf) + 1))
38310 ret_val = xmlUTF8Strsize((const xmlChar *)utf, len);
38311 desret_int(ret_val);
38313 des_const_xmlChar_ptr(n_utf, (const xmlChar *)utf, 0);
38314 des_int(n_len, len, 1);
38315 xmlResetLastError();
38316 if (mem_base != xmlMemBlocks()) {
38317 printf("Leak of %d blocks found in xmlUTF8Strsize",
38318 xmlMemBlocks() - mem_base);
38320 printf(" %d", n_utf);
38321 printf(" %d", n_len);
38333 test_xmlUTF8Strsub(void) {
38338 xmlChar * utf; /* a sequence of UTF-8 encoded bytes */
38340 int start; /* relative pos of first char */
38342 int len; /* total number to copy */
38345 for (n_utf = 0;n_utf < gen_nb_const_xmlChar_ptr;n_utf++) {
38346 for (n_start = 0;n_start < gen_nb_int;n_start++) {
38347 for (n_len = 0;n_len < gen_nb_int;n_len++) {
38348 mem_base = xmlMemBlocks();
38349 utf = gen_const_xmlChar_ptr(n_utf, 0);
38350 start = gen_int(n_start, 1);
38351 len = gen_int(n_len, 2);
38352 if ((utf != NULL) &&
38353 (start > (int) strlen((const char *) utf) + 1))
38355 if ((utf != NULL) &&
38356 (len > (int) strlen((const char *) utf) + 1))
38359 ret_val = xmlUTF8Strsub((const xmlChar *)utf, start, len);
38360 desret_xmlChar_ptr(ret_val);
38362 des_const_xmlChar_ptr(n_utf, (const xmlChar *)utf, 0);
38363 des_int(n_start, start, 1);
38364 des_int(n_len, len, 2);
38365 xmlResetLastError();
38366 if (mem_base != xmlMemBlocks()) {
38367 printf("Leak of %d blocks found in xmlUTF8Strsub",
38368 xmlMemBlocks() - mem_base);
38370 printf(" %d", n_utf);
38371 printf(" %d", n_start);
38372 printf(" %d", n_len);
38384 test_xmlstring(void) {
38388 if (quiet == 0) printf("Testing xmlstring : 26 of 30 functions ...\n");
38389 rc = test_xmlCharStrdup();
38390 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38391 rc = test_xmlCharStrndup();
38392 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38393 rc = test_xmlCheckUTF8();
38394 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38395 rc = test_xmlGetUTF8Char();
38396 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38397 rc = test_xmlStrEqual();
38398 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38399 rc = test_xmlStrPrintf();
38400 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38401 rc = test_xmlStrQEqual();
38402 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38403 rc = test_xmlStrVPrintf();
38404 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38405 rc = test_xmlStrcasecmp();
38406 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38407 rc = test_xmlStrcasestr();
38408 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38409 rc = test_xmlStrchr();
38410 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38411 rc = test_xmlStrcmp();
38412 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38413 rc = test_xmlStrdup();
38414 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38415 rc = test_xmlStrlen();
38416 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38417 rc = test_xmlStrncasecmp();
38418 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38419 rc = test_xmlStrncatNew();
38420 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38421 rc = test_xmlStrncmp();
38422 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38423 rc = test_xmlStrndup();
38424 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38425 rc = test_xmlStrstr();
38426 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38427 rc = test_xmlStrsub();
38428 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38429 rc = test_xmlUTF8Charcmp();
38430 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38431 rc = test_xmlUTF8Size();
38432 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38433 rc = test_xmlUTF8Strlen();
38434 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38435 rc = test_xmlUTF8Strloc();
38436 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38437 rc = test_xmlUTF8Strndup();
38438 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38439 rc = test_xmlUTF8Strpos();
38440 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38441 rc = test_xmlUTF8Strsize();
38442 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38443 rc = test_xmlUTF8Strsub();
38444 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38447 printf("Module xmlstring: %d errors\n", test_ret);
38452 test_xmlUCSIsAegeanNumbers(void) {
38455 #if defined(LIBXML_UNICODE_ENABLED)
38458 int code; /* UCS code point */
38461 for (n_code = 0;n_code < gen_nb_int;n_code++) {
38462 mem_base = xmlMemBlocks();
38463 code = gen_int(n_code, 0);
38465 ret_val = xmlUCSIsAegeanNumbers(code);
38466 desret_int(ret_val);
38468 des_int(n_code, code, 0);
38469 xmlResetLastError();
38470 if (mem_base != xmlMemBlocks()) {
38471 printf("Leak of %d blocks found in xmlUCSIsAegeanNumbers",
38472 xmlMemBlocks() - mem_base);
38474 printf(" %d", n_code);
38486 test_xmlUCSIsAlphabeticPresentationForms(void) {
38489 #if defined(LIBXML_UNICODE_ENABLED)
38492 int code; /* UCS code point */
38495 for (n_code = 0;n_code < gen_nb_int;n_code++) {
38496 mem_base = xmlMemBlocks();
38497 code = gen_int(n_code, 0);
38499 ret_val = xmlUCSIsAlphabeticPresentationForms(code);
38500 desret_int(ret_val);
38502 des_int(n_code, code, 0);
38503 xmlResetLastError();
38504 if (mem_base != xmlMemBlocks()) {
38505 printf("Leak of %d blocks found in xmlUCSIsAlphabeticPresentationForms",
38506 xmlMemBlocks() - mem_base);
38508 printf(" %d", n_code);
38520 test_xmlUCSIsArabic(void) {
38523 #if defined(LIBXML_UNICODE_ENABLED)
38526 int code; /* UCS code point */
38529 for (n_code = 0;n_code < gen_nb_int;n_code++) {
38530 mem_base = xmlMemBlocks();
38531 code = gen_int(n_code, 0);
38533 ret_val = xmlUCSIsArabic(code);
38534 desret_int(ret_val);
38536 des_int(n_code, code, 0);
38537 xmlResetLastError();
38538 if (mem_base != xmlMemBlocks()) {
38539 printf("Leak of %d blocks found in xmlUCSIsArabic",
38540 xmlMemBlocks() - mem_base);
38542 printf(" %d", n_code);
38554 test_xmlUCSIsArabicPresentationFormsA(void) {
38557 #if defined(LIBXML_UNICODE_ENABLED)
38560 int code; /* UCS code point */
38563 for (n_code = 0;n_code < gen_nb_int;n_code++) {
38564 mem_base = xmlMemBlocks();
38565 code = gen_int(n_code, 0);
38567 ret_val = xmlUCSIsArabicPresentationFormsA(code);
38568 desret_int(ret_val);
38570 des_int(n_code, code, 0);
38571 xmlResetLastError();
38572 if (mem_base != xmlMemBlocks()) {
38573 printf("Leak of %d blocks found in xmlUCSIsArabicPresentationFormsA",
38574 xmlMemBlocks() - mem_base);
38576 printf(" %d", n_code);
38588 test_xmlUCSIsArabicPresentationFormsB(void) {
38591 #if defined(LIBXML_UNICODE_ENABLED)
38594 int code; /* UCS code point */
38597 for (n_code = 0;n_code < gen_nb_int;n_code++) {
38598 mem_base = xmlMemBlocks();
38599 code = gen_int(n_code, 0);
38601 ret_val = xmlUCSIsArabicPresentationFormsB(code);
38602 desret_int(ret_val);
38604 des_int(n_code, code, 0);
38605 xmlResetLastError();
38606 if (mem_base != xmlMemBlocks()) {
38607 printf("Leak of %d blocks found in xmlUCSIsArabicPresentationFormsB",
38608 xmlMemBlocks() - mem_base);
38610 printf(" %d", n_code);
38622 test_xmlUCSIsArmenian(void) {
38625 #if defined(LIBXML_UNICODE_ENABLED)
38628 int code; /* UCS code point */
38631 for (n_code = 0;n_code < gen_nb_int;n_code++) {
38632 mem_base = xmlMemBlocks();
38633 code = gen_int(n_code, 0);
38635 ret_val = xmlUCSIsArmenian(code);
38636 desret_int(ret_val);
38638 des_int(n_code, code, 0);
38639 xmlResetLastError();
38640 if (mem_base != xmlMemBlocks()) {
38641 printf("Leak of %d blocks found in xmlUCSIsArmenian",
38642 xmlMemBlocks() - mem_base);
38644 printf(" %d", n_code);
38656 test_xmlUCSIsArrows(void) {
38659 #if defined(LIBXML_UNICODE_ENABLED)
38662 int code; /* UCS code point */
38665 for (n_code = 0;n_code < gen_nb_int;n_code++) {
38666 mem_base = xmlMemBlocks();
38667 code = gen_int(n_code, 0);
38669 ret_val = xmlUCSIsArrows(code);
38670 desret_int(ret_val);
38672 des_int(n_code, code, 0);
38673 xmlResetLastError();
38674 if (mem_base != xmlMemBlocks()) {
38675 printf("Leak of %d blocks found in xmlUCSIsArrows",
38676 xmlMemBlocks() - mem_base);
38678 printf(" %d", n_code);
38690 test_xmlUCSIsBasicLatin(void) {
38693 #if defined(LIBXML_UNICODE_ENABLED)
38696 int code; /* UCS code point */
38699 for (n_code = 0;n_code < gen_nb_int;n_code++) {
38700 mem_base = xmlMemBlocks();
38701 code = gen_int(n_code, 0);
38703 ret_val = xmlUCSIsBasicLatin(code);
38704 desret_int(ret_val);
38706 des_int(n_code, code, 0);
38707 xmlResetLastError();
38708 if (mem_base != xmlMemBlocks()) {
38709 printf("Leak of %d blocks found in xmlUCSIsBasicLatin",
38710 xmlMemBlocks() - mem_base);
38712 printf(" %d", n_code);
38724 test_xmlUCSIsBengali(void) {
38727 #if defined(LIBXML_UNICODE_ENABLED)
38730 int code; /* UCS code point */
38733 for (n_code = 0;n_code < gen_nb_int;n_code++) {
38734 mem_base = xmlMemBlocks();
38735 code = gen_int(n_code, 0);
38737 ret_val = xmlUCSIsBengali(code);
38738 desret_int(ret_val);
38740 des_int(n_code, code, 0);
38741 xmlResetLastError();
38742 if (mem_base != xmlMemBlocks()) {
38743 printf("Leak of %d blocks found in xmlUCSIsBengali",
38744 xmlMemBlocks() - mem_base);
38746 printf(" %d", n_code);
38758 test_xmlUCSIsBlock(void) {
38761 #if defined(LIBXML_UNICODE_ENABLED)
38764 int code; /* UCS code point */
38766 char * block; /* UCS block name */
38769 for (n_code = 0;n_code < gen_nb_int;n_code++) {
38770 for (n_block = 0;n_block < gen_nb_const_char_ptr;n_block++) {
38771 mem_base = xmlMemBlocks();
38772 code = gen_int(n_code, 0);
38773 block = gen_const_char_ptr(n_block, 1);
38775 ret_val = xmlUCSIsBlock(code, (const char *)block);
38776 desret_int(ret_val);
38778 des_int(n_code, code, 0);
38779 des_const_char_ptr(n_block, (const char *)block, 1);
38780 xmlResetLastError();
38781 if (mem_base != xmlMemBlocks()) {
38782 printf("Leak of %d blocks found in xmlUCSIsBlock",
38783 xmlMemBlocks() - mem_base);
38785 printf(" %d", n_code);
38786 printf(" %d", n_block);
38799 test_xmlUCSIsBlockElements(void) {
38802 #if defined(LIBXML_UNICODE_ENABLED)
38805 int code; /* UCS code point */
38808 for (n_code = 0;n_code < gen_nb_int;n_code++) {
38809 mem_base = xmlMemBlocks();
38810 code = gen_int(n_code, 0);
38812 ret_val = xmlUCSIsBlockElements(code);
38813 desret_int(ret_val);
38815 des_int(n_code, code, 0);
38816 xmlResetLastError();
38817 if (mem_base != xmlMemBlocks()) {
38818 printf("Leak of %d blocks found in xmlUCSIsBlockElements",
38819 xmlMemBlocks() - mem_base);
38821 printf(" %d", n_code);
38833 test_xmlUCSIsBopomofo(void) {
38836 #if defined(LIBXML_UNICODE_ENABLED)
38839 int code; /* UCS code point */
38842 for (n_code = 0;n_code < gen_nb_int;n_code++) {
38843 mem_base = xmlMemBlocks();
38844 code = gen_int(n_code, 0);
38846 ret_val = xmlUCSIsBopomofo(code);
38847 desret_int(ret_val);
38849 des_int(n_code, code, 0);
38850 xmlResetLastError();
38851 if (mem_base != xmlMemBlocks()) {
38852 printf("Leak of %d blocks found in xmlUCSIsBopomofo",
38853 xmlMemBlocks() - mem_base);
38855 printf(" %d", n_code);
38867 test_xmlUCSIsBopomofoExtended(void) {
38870 #if defined(LIBXML_UNICODE_ENABLED)
38873 int code; /* UCS code point */
38876 for (n_code = 0;n_code < gen_nb_int;n_code++) {
38877 mem_base = xmlMemBlocks();
38878 code = gen_int(n_code, 0);
38880 ret_val = xmlUCSIsBopomofoExtended(code);
38881 desret_int(ret_val);
38883 des_int(n_code, code, 0);
38884 xmlResetLastError();
38885 if (mem_base != xmlMemBlocks()) {
38886 printf("Leak of %d blocks found in xmlUCSIsBopomofoExtended",
38887 xmlMemBlocks() - mem_base);
38889 printf(" %d", n_code);
38901 test_xmlUCSIsBoxDrawing(void) {
38904 #if defined(LIBXML_UNICODE_ENABLED)
38907 int code; /* UCS code point */
38910 for (n_code = 0;n_code < gen_nb_int;n_code++) {
38911 mem_base = xmlMemBlocks();
38912 code = gen_int(n_code, 0);
38914 ret_val = xmlUCSIsBoxDrawing(code);
38915 desret_int(ret_val);
38917 des_int(n_code, code, 0);
38918 xmlResetLastError();
38919 if (mem_base != xmlMemBlocks()) {
38920 printf("Leak of %d blocks found in xmlUCSIsBoxDrawing",
38921 xmlMemBlocks() - mem_base);
38923 printf(" %d", n_code);
38935 test_xmlUCSIsBraillePatterns(void) {
38938 #if defined(LIBXML_UNICODE_ENABLED)
38941 int code; /* UCS code point */
38944 for (n_code = 0;n_code < gen_nb_int;n_code++) {
38945 mem_base = xmlMemBlocks();
38946 code = gen_int(n_code, 0);
38948 ret_val = xmlUCSIsBraillePatterns(code);
38949 desret_int(ret_val);
38951 des_int(n_code, code, 0);
38952 xmlResetLastError();
38953 if (mem_base != xmlMemBlocks()) {
38954 printf("Leak of %d blocks found in xmlUCSIsBraillePatterns",
38955 xmlMemBlocks() - mem_base);
38957 printf(" %d", n_code);
38969 test_xmlUCSIsBuhid(void) {
38972 #if defined(LIBXML_UNICODE_ENABLED)
38975 int code; /* UCS code point */
38978 for (n_code = 0;n_code < gen_nb_int;n_code++) {
38979 mem_base = xmlMemBlocks();
38980 code = gen_int(n_code, 0);
38982 ret_val = xmlUCSIsBuhid(code);
38983 desret_int(ret_val);
38985 des_int(n_code, code, 0);
38986 xmlResetLastError();
38987 if (mem_base != xmlMemBlocks()) {
38988 printf("Leak of %d blocks found in xmlUCSIsBuhid",
38989 xmlMemBlocks() - mem_base);
38991 printf(" %d", n_code);
39003 test_xmlUCSIsByzantineMusicalSymbols(void) {
39006 #if defined(LIBXML_UNICODE_ENABLED)
39009 int code; /* UCS code point */
39012 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39013 mem_base = xmlMemBlocks();
39014 code = gen_int(n_code, 0);
39016 ret_val = xmlUCSIsByzantineMusicalSymbols(code);
39017 desret_int(ret_val);
39019 des_int(n_code, code, 0);
39020 xmlResetLastError();
39021 if (mem_base != xmlMemBlocks()) {
39022 printf("Leak of %d blocks found in xmlUCSIsByzantineMusicalSymbols",
39023 xmlMemBlocks() - mem_base);
39025 printf(" %d", n_code);
39037 test_xmlUCSIsCJKCompatibility(void) {
39040 #if defined(LIBXML_UNICODE_ENABLED)
39043 int code; /* UCS code point */
39046 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39047 mem_base = xmlMemBlocks();
39048 code = gen_int(n_code, 0);
39050 ret_val = xmlUCSIsCJKCompatibility(code);
39051 desret_int(ret_val);
39053 des_int(n_code, code, 0);
39054 xmlResetLastError();
39055 if (mem_base != xmlMemBlocks()) {
39056 printf("Leak of %d blocks found in xmlUCSIsCJKCompatibility",
39057 xmlMemBlocks() - mem_base);
39059 printf(" %d", n_code);
39071 test_xmlUCSIsCJKCompatibilityForms(void) {
39074 #if defined(LIBXML_UNICODE_ENABLED)
39077 int code; /* UCS code point */
39080 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39081 mem_base = xmlMemBlocks();
39082 code = gen_int(n_code, 0);
39084 ret_val = xmlUCSIsCJKCompatibilityForms(code);
39085 desret_int(ret_val);
39087 des_int(n_code, code, 0);
39088 xmlResetLastError();
39089 if (mem_base != xmlMemBlocks()) {
39090 printf("Leak of %d blocks found in xmlUCSIsCJKCompatibilityForms",
39091 xmlMemBlocks() - mem_base);
39093 printf(" %d", n_code);
39105 test_xmlUCSIsCJKCompatibilityIdeographs(void) {
39108 #if defined(LIBXML_UNICODE_ENABLED)
39111 int code; /* UCS code point */
39114 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39115 mem_base = xmlMemBlocks();
39116 code = gen_int(n_code, 0);
39118 ret_val = xmlUCSIsCJKCompatibilityIdeographs(code);
39119 desret_int(ret_val);
39121 des_int(n_code, code, 0);
39122 xmlResetLastError();
39123 if (mem_base != xmlMemBlocks()) {
39124 printf("Leak of %d blocks found in xmlUCSIsCJKCompatibilityIdeographs",
39125 xmlMemBlocks() - mem_base);
39127 printf(" %d", n_code);
39139 test_xmlUCSIsCJKCompatibilityIdeographsSupplement(void) {
39142 #if defined(LIBXML_UNICODE_ENABLED)
39145 int code; /* UCS code point */
39148 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39149 mem_base = xmlMemBlocks();
39150 code = gen_int(n_code, 0);
39152 ret_val = xmlUCSIsCJKCompatibilityIdeographsSupplement(code);
39153 desret_int(ret_val);
39155 des_int(n_code, code, 0);
39156 xmlResetLastError();
39157 if (mem_base != xmlMemBlocks()) {
39158 printf("Leak of %d blocks found in xmlUCSIsCJKCompatibilityIdeographsSupplement",
39159 xmlMemBlocks() - mem_base);
39161 printf(" %d", n_code);
39173 test_xmlUCSIsCJKRadicalsSupplement(void) {
39176 #if defined(LIBXML_UNICODE_ENABLED)
39179 int code; /* UCS code point */
39182 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39183 mem_base = xmlMemBlocks();
39184 code = gen_int(n_code, 0);
39186 ret_val = xmlUCSIsCJKRadicalsSupplement(code);
39187 desret_int(ret_val);
39189 des_int(n_code, code, 0);
39190 xmlResetLastError();
39191 if (mem_base != xmlMemBlocks()) {
39192 printf("Leak of %d blocks found in xmlUCSIsCJKRadicalsSupplement",
39193 xmlMemBlocks() - mem_base);
39195 printf(" %d", n_code);
39207 test_xmlUCSIsCJKSymbolsandPunctuation(void) {
39210 #if defined(LIBXML_UNICODE_ENABLED)
39213 int code; /* UCS code point */
39216 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39217 mem_base = xmlMemBlocks();
39218 code = gen_int(n_code, 0);
39220 ret_val = xmlUCSIsCJKSymbolsandPunctuation(code);
39221 desret_int(ret_val);
39223 des_int(n_code, code, 0);
39224 xmlResetLastError();
39225 if (mem_base != xmlMemBlocks()) {
39226 printf("Leak of %d blocks found in xmlUCSIsCJKSymbolsandPunctuation",
39227 xmlMemBlocks() - mem_base);
39229 printf(" %d", n_code);
39241 test_xmlUCSIsCJKUnifiedIdeographs(void) {
39244 #if defined(LIBXML_UNICODE_ENABLED)
39247 int code; /* UCS code point */
39250 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39251 mem_base = xmlMemBlocks();
39252 code = gen_int(n_code, 0);
39254 ret_val = xmlUCSIsCJKUnifiedIdeographs(code);
39255 desret_int(ret_val);
39257 des_int(n_code, code, 0);
39258 xmlResetLastError();
39259 if (mem_base != xmlMemBlocks()) {
39260 printf("Leak of %d blocks found in xmlUCSIsCJKUnifiedIdeographs",
39261 xmlMemBlocks() - mem_base);
39263 printf(" %d", n_code);
39275 test_xmlUCSIsCJKUnifiedIdeographsExtensionA(void) {
39278 #if defined(LIBXML_UNICODE_ENABLED)
39281 int code; /* UCS code point */
39284 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39285 mem_base = xmlMemBlocks();
39286 code = gen_int(n_code, 0);
39288 ret_val = xmlUCSIsCJKUnifiedIdeographsExtensionA(code);
39289 desret_int(ret_val);
39291 des_int(n_code, code, 0);
39292 xmlResetLastError();
39293 if (mem_base != xmlMemBlocks()) {
39294 printf("Leak of %d blocks found in xmlUCSIsCJKUnifiedIdeographsExtensionA",
39295 xmlMemBlocks() - mem_base);
39297 printf(" %d", n_code);
39309 test_xmlUCSIsCJKUnifiedIdeographsExtensionB(void) {
39312 #if defined(LIBXML_UNICODE_ENABLED)
39315 int code; /* UCS code point */
39318 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39319 mem_base = xmlMemBlocks();
39320 code = gen_int(n_code, 0);
39322 ret_val = xmlUCSIsCJKUnifiedIdeographsExtensionB(code);
39323 desret_int(ret_val);
39325 des_int(n_code, code, 0);
39326 xmlResetLastError();
39327 if (mem_base != xmlMemBlocks()) {
39328 printf("Leak of %d blocks found in xmlUCSIsCJKUnifiedIdeographsExtensionB",
39329 xmlMemBlocks() - mem_base);
39331 printf(" %d", n_code);
39343 test_xmlUCSIsCat(void) {
39346 #if defined(LIBXML_UNICODE_ENABLED)
39349 int code; /* UCS code point */
39351 char * cat; /* UCS Category name */
39354 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39355 for (n_cat = 0;n_cat < gen_nb_const_char_ptr;n_cat++) {
39356 mem_base = xmlMemBlocks();
39357 code = gen_int(n_code, 0);
39358 cat = gen_const_char_ptr(n_cat, 1);
39360 ret_val = xmlUCSIsCat(code, (const char *)cat);
39361 desret_int(ret_val);
39363 des_int(n_code, code, 0);
39364 des_const_char_ptr(n_cat, (const char *)cat, 1);
39365 xmlResetLastError();
39366 if (mem_base != xmlMemBlocks()) {
39367 printf("Leak of %d blocks found in xmlUCSIsCat",
39368 xmlMemBlocks() - mem_base);
39370 printf(" %d", n_code);
39371 printf(" %d", n_cat);
39384 test_xmlUCSIsCatC(void) {
39387 #if defined(LIBXML_UNICODE_ENABLED)
39390 int code; /* UCS code point */
39393 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39394 mem_base = xmlMemBlocks();
39395 code = gen_int(n_code, 0);
39397 ret_val = xmlUCSIsCatC(code);
39398 desret_int(ret_val);
39400 des_int(n_code, code, 0);
39401 xmlResetLastError();
39402 if (mem_base != xmlMemBlocks()) {
39403 printf("Leak of %d blocks found in xmlUCSIsCatC",
39404 xmlMemBlocks() - mem_base);
39406 printf(" %d", n_code);
39418 test_xmlUCSIsCatCc(void) {
39421 #if defined(LIBXML_UNICODE_ENABLED)
39424 int code; /* UCS code point */
39427 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39428 mem_base = xmlMemBlocks();
39429 code = gen_int(n_code, 0);
39431 ret_val = xmlUCSIsCatCc(code);
39432 desret_int(ret_val);
39434 des_int(n_code, code, 0);
39435 xmlResetLastError();
39436 if (mem_base != xmlMemBlocks()) {
39437 printf("Leak of %d blocks found in xmlUCSIsCatCc",
39438 xmlMemBlocks() - mem_base);
39440 printf(" %d", n_code);
39452 test_xmlUCSIsCatCf(void) {
39455 #if defined(LIBXML_UNICODE_ENABLED)
39458 int code; /* UCS code point */
39461 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39462 mem_base = xmlMemBlocks();
39463 code = gen_int(n_code, 0);
39465 ret_val = xmlUCSIsCatCf(code);
39466 desret_int(ret_val);
39468 des_int(n_code, code, 0);
39469 xmlResetLastError();
39470 if (mem_base != xmlMemBlocks()) {
39471 printf("Leak of %d blocks found in xmlUCSIsCatCf",
39472 xmlMemBlocks() - mem_base);
39474 printf(" %d", n_code);
39486 test_xmlUCSIsCatCo(void) {
39489 #if defined(LIBXML_UNICODE_ENABLED)
39492 int code; /* UCS code point */
39495 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39496 mem_base = xmlMemBlocks();
39497 code = gen_int(n_code, 0);
39499 ret_val = xmlUCSIsCatCo(code);
39500 desret_int(ret_val);
39502 des_int(n_code, code, 0);
39503 xmlResetLastError();
39504 if (mem_base != xmlMemBlocks()) {
39505 printf("Leak of %d blocks found in xmlUCSIsCatCo",
39506 xmlMemBlocks() - mem_base);
39508 printf(" %d", n_code);
39520 test_xmlUCSIsCatCs(void) {
39523 #if defined(LIBXML_UNICODE_ENABLED)
39526 int code; /* UCS code point */
39529 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39530 mem_base = xmlMemBlocks();
39531 code = gen_int(n_code, 0);
39533 ret_val = xmlUCSIsCatCs(code);
39534 desret_int(ret_val);
39536 des_int(n_code, code, 0);
39537 xmlResetLastError();
39538 if (mem_base != xmlMemBlocks()) {
39539 printf("Leak of %d blocks found in xmlUCSIsCatCs",
39540 xmlMemBlocks() - mem_base);
39542 printf(" %d", n_code);
39554 test_xmlUCSIsCatL(void) {
39557 #if defined(LIBXML_UNICODE_ENABLED)
39560 int code; /* UCS code point */
39563 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39564 mem_base = xmlMemBlocks();
39565 code = gen_int(n_code, 0);
39567 ret_val = xmlUCSIsCatL(code);
39568 desret_int(ret_val);
39570 des_int(n_code, code, 0);
39571 xmlResetLastError();
39572 if (mem_base != xmlMemBlocks()) {
39573 printf("Leak of %d blocks found in xmlUCSIsCatL",
39574 xmlMemBlocks() - mem_base);
39576 printf(" %d", n_code);
39588 test_xmlUCSIsCatLl(void) {
39591 #if defined(LIBXML_UNICODE_ENABLED)
39594 int code; /* UCS code point */
39597 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39598 mem_base = xmlMemBlocks();
39599 code = gen_int(n_code, 0);
39601 ret_val = xmlUCSIsCatLl(code);
39602 desret_int(ret_val);
39604 des_int(n_code, code, 0);
39605 xmlResetLastError();
39606 if (mem_base != xmlMemBlocks()) {
39607 printf("Leak of %d blocks found in xmlUCSIsCatLl",
39608 xmlMemBlocks() - mem_base);
39610 printf(" %d", n_code);
39622 test_xmlUCSIsCatLm(void) {
39625 #if defined(LIBXML_UNICODE_ENABLED)
39628 int code; /* UCS code point */
39631 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39632 mem_base = xmlMemBlocks();
39633 code = gen_int(n_code, 0);
39635 ret_val = xmlUCSIsCatLm(code);
39636 desret_int(ret_val);
39638 des_int(n_code, code, 0);
39639 xmlResetLastError();
39640 if (mem_base != xmlMemBlocks()) {
39641 printf("Leak of %d blocks found in xmlUCSIsCatLm",
39642 xmlMemBlocks() - mem_base);
39644 printf(" %d", n_code);
39656 test_xmlUCSIsCatLo(void) {
39659 #if defined(LIBXML_UNICODE_ENABLED)
39662 int code; /* UCS code point */
39665 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39666 mem_base = xmlMemBlocks();
39667 code = gen_int(n_code, 0);
39669 ret_val = xmlUCSIsCatLo(code);
39670 desret_int(ret_val);
39672 des_int(n_code, code, 0);
39673 xmlResetLastError();
39674 if (mem_base != xmlMemBlocks()) {
39675 printf("Leak of %d blocks found in xmlUCSIsCatLo",
39676 xmlMemBlocks() - mem_base);
39678 printf(" %d", n_code);
39690 test_xmlUCSIsCatLt(void) {
39693 #if defined(LIBXML_UNICODE_ENABLED)
39696 int code; /* UCS code point */
39699 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39700 mem_base = xmlMemBlocks();
39701 code = gen_int(n_code, 0);
39703 ret_val = xmlUCSIsCatLt(code);
39704 desret_int(ret_val);
39706 des_int(n_code, code, 0);
39707 xmlResetLastError();
39708 if (mem_base != xmlMemBlocks()) {
39709 printf("Leak of %d blocks found in xmlUCSIsCatLt",
39710 xmlMemBlocks() - mem_base);
39712 printf(" %d", n_code);
39724 test_xmlUCSIsCatLu(void) {
39727 #if defined(LIBXML_UNICODE_ENABLED)
39730 int code; /* UCS code point */
39733 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39734 mem_base = xmlMemBlocks();
39735 code = gen_int(n_code, 0);
39737 ret_val = xmlUCSIsCatLu(code);
39738 desret_int(ret_val);
39740 des_int(n_code, code, 0);
39741 xmlResetLastError();
39742 if (mem_base != xmlMemBlocks()) {
39743 printf("Leak of %d blocks found in xmlUCSIsCatLu",
39744 xmlMemBlocks() - mem_base);
39746 printf(" %d", n_code);
39758 test_xmlUCSIsCatM(void) {
39761 #if defined(LIBXML_UNICODE_ENABLED)
39764 int code; /* UCS code point */
39767 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39768 mem_base = xmlMemBlocks();
39769 code = gen_int(n_code, 0);
39771 ret_val = xmlUCSIsCatM(code);
39772 desret_int(ret_val);
39774 des_int(n_code, code, 0);
39775 xmlResetLastError();
39776 if (mem_base != xmlMemBlocks()) {
39777 printf("Leak of %d blocks found in xmlUCSIsCatM",
39778 xmlMemBlocks() - mem_base);
39780 printf(" %d", n_code);
39792 test_xmlUCSIsCatMc(void) {
39795 #if defined(LIBXML_UNICODE_ENABLED)
39798 int code; /* UCS code point */
39801 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39802 mem_base = xmlMemBlocks();
39803 code = gen_int(n_code, 0);
39805 ret_val = xmlUCSIsCatMc(code);
39806 desret_int(ret_val);
39808 des_int(n_code, code, 0);
39809 xmlResetLastError();
39810 if (mem_base != xmlMemBlocks()) {
39811 printf("Leak of %d blocks found in xmlUCSIsCatMc",
39812 xmlMemBlocks() - mem_base);
39814 printf(" %d", n_code);
39826 test_xmlUCSIsCatMe(void) {
39829 #if defined(LIBXML_UNICODE_ENABLED)
39832 int code; /* UCS code point */
39835 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39836 mem_base = xmlMemBlocks();
39837 code = gen_int(n_code, 0);
39839 ret_val = xmlUCSIsCatMe(code);
39840 desret_int(ret_val);
39842 des_int(n_code, code, 0);
39843 xmlResetLastError();
39844 if (mem_base != xmlMemBlocks()) {
39845 printf("Leak of %d blocks found in xmlUCSIsCatMe",
39846 xmlMemBlocks() - mem_base);
39848 printf(" %d", n_code);
39860 test_xmlUCSIsCatMn(void) {
39863 #if defined(LIBXML_UNICODE_ENABLED)
39866 int code; /* UCS code point */
39869 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39870 mem_base = xmlMemBlocks();
39871 code = gen_int(n_code, 0);
39873 ret_val = xmlUCSIsCatMn(code);
39874 desret_int(ret_val);
39876 des_int(n_code, code, 0);
39877 xmlResetLastError();
39878 if (mem_base != xmlMemBlocks()) {
39879 printf("Leak of %d blocks found in xmlUCSIsCatMn",
39880 xmlMemBlocks() - mem_base);
39882 printf(" %d", n_code);
39894 test_xmlUCSIsCatN(void) {
39897 #if defined(LIBXML_UNICODE_ENABLED)
39900 int code; /* UCS code point */
39903 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39904 mem_base = xmlMemBlocks();
39905 code = gen_int(n_code, 0);
39907 ret_val = xmlUCSIsCatN(code);
39908 desret_int(ret_val);
39910 des_int(n_code, code, 0);
39911 xmlResetLastError();
39912 if (mem_base != xmlMemBlocks()) {
39913 printf("Leak of %d blocks found in xmlUCSIsCatN",
39914 xmlMemBlocks() - mem_base);
39916 printf(" %d", n_code);
39928 test_xmlUCSIsCatNd(void) {
39931 #if defined(LIBXML_UNICODE_ENABLED)
39934 int code; /* UCS code point */
39937 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39938 mem_base = xmlMemBlocks();
39939 code = gen_int(n_code, 0);
39941 ret_val = xmlUCSIsCatNd(code);
39942 desret_int(ret_val);
39944 des_int(n_code, code, 0);
39945 xmlResetLastError();
39946 if (mem_base != xmlMemBlocks()) {
39947 printf("Leak of %d blocks found in xmlUCSIsCatNd",
39948 xmlMemBlocks() - mem_base);
39950 printf(" %d", n_code);
39962 test_xmlUCSIsCatNl(void) {
39965 #if defined(LIBXML_UNICODE_ENABLED)
39968 int code; /* UCS code point */
39971 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39972 mem_base = xmlMemBlocks();
39973 code = gen_int(n_code, 0);
39975 ret_val = xmlUCSIsCatNl(code);
39976 desret_int(ret_val);
39978 des_int(n_code, code, 0);
39979 xmlResetLastError();
39980 if (mem_base != xmlMemBlocks()) {
39981 printf("Leak of %d blocks found in xmlUCSIsCatNl",
39982 xmlMemBlocks() - mem_base);
39984 printf(" %d", n_code);
39996 test_xmlUCSIsCatNo(void) {
39999 #if defined(LIBXML_UNICODE_ENABLED)
40002 int code; /* UCS code point */
40005 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40006 mem_base = xmlMemBlocks();
40007 code = gen_int(n_code, 0);
40009 ret_val = xmlUCSIsCatNo(code);
40010 desret_int(ret_val);
40012 des_int(n_code, code, 0);
40013 xmlResetLastError();
40014 if (mem_base != xmlMemBlocks()) {
40015 printf("Leak of %d blocks found in xmlUCSIsCatNo",
40016 xmlMemBlocks() - mem_base);
40018 printf(" %d", n_code);
40030 test_xmlUCSIsCatP(void) {
40033 #if defined(LIBXML_UNICODE_ENABLED)
40036 int code; /* UCS code point */
40039 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40040 mem_base = xmlMemBlocks();
40041 code = gen_int(n_code, 0);
40043 ret_val = xmlUCSIsCatP(code);
40044 desret_int(ret_val);
40046 des_int(n_code, code, 0);
40047 xmlResetLastError();
40048 if (mem_base != xmlMemBlocks()) {
40049 printf("Leak of %d blocks found in xmlUCSIsCatP",
40050 xmlMemBlocks() - mem_base);
40052 printf(" %d", n_code);
40064 test_xmlUCSIsCatPc(void) {
40067 #if defined(LIBXML_UNICODE_ENABLED)
40070 int code; /* UCS code point */
40073 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40074 mem_base = xmlMemBlocks();
40075 code = gen_int(n_code, 0);
40077 ret_val = xmlUCSIsCatPc(code);
40078 desret_int(ret_val);
40080 des_int(n_code, code, 0);
40081 xmlResetLastError();
40082 if (mem_base != xmlMemBlocks()) {
40083 printf("Leak of %d blocks found in xmlUCSIsCatPc",
40084 xmlMemBlocks() - mem_base);
40086 printf(" %d", n_code);
40098 test_xmlUCSIsCatPd(void) {
40101 #if defined(LIBXML_UNICODE_ENABLED)
40104 int code; /* UCS code point */
40107 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40108 mem_base = xmlMemBlocks();
40109 code = gen_int(n_code, 0);
40111 ret_val = xmlUCSIsCatPd(code);
40112 desret_int(ret_val);
40114 des_int(n_code, code, 0);
40115 xmlResetLastError();
40116 if (mem_base != xmlMemBlocks()) {
40117 printf("Leak of %d blocks found in xmlUCSIsCatPd",
40118 xmlMemBlocks() - mem_base);
40120 printf(" %d", n_code);
40132 test_xmlUCSIsCatPe(void) {
40135 #if defined(LIBXML_UNICODE_ENABLED)
40138 int code; /* UCS code point */
40141 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40142 mem_base = xmlMemBlocks();
40143 code = gen_int(n_code, 0);
40145 ret_val = xmlUCSIsCatPe(code);
40146 desret_int(ret_val);
40148 des_int(n_code, code, 0);
40149 xmlResetLastError();
40150 if (mem_base != xmlMemBlocks()) {
40151 printf("Leak of %d blocks found in xmlUCSIsCatPe",
40152 xmlMemBlocks() - mem_base);
40154 printf(" %d", n_code);
40166 test_xmlUCSIsCatPf(void) {
40169 #if defined(LIBXML_UNICODE_ENABLED)
40172 int code; /* UCS code point */
40175 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40176 mem_base = xmlMemBlocks();
40177 code = gen_int(n_code, 0);
40179 ret_val = xmlUCSIsCatPf(code);
40180 desret_int(ret_val);
40182 des_int(n_code, code, 0);
40183 xmlResetLastError();
40184 if (mem_base != xmlMemBlocks()) {
40185 printf("Leak of %d blocks found in xmlUCSIsCatPf",
40186 xmlMemBlocks() - mem_base);
40188 printf(" %d", n_code);
40200 test_xmlUCSIsCatPi(void) {
40203 #if defined(LIBXML_UNICODE_ENABLED)
40206 int code; /* UCS code point */
40209 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40210 mem_base = xmlMemBlocks();
40211 code = gen_int(n_code, 0);
40213 ret_val = xmlUCSIsCatPi(code);
40214 desret_int(ret_val);
40216 des_int(n_code, code, 0);
40217 xmlResetLastError();
40218 if (mem_base != xmlMemBlocks()) {
40219 printf("Leak of %d blocks found in xmlUCSIsCatPi",
40220 xmlMemBlocks() - mem_base);
40222 printf(" %d", n_code);
40234 test_xmlUCSIsCatPo(void) {
40237 #if defined(LIBXML_UNICODE_ENABLED)
40240 int code; /* UCS code point */
40243 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40244 mem_base = xmlMemBlocks();
40245 code = gen_int(n_code, 0);
40247 ret_val = xmlUCSIsCatPo(code);
40248 desret_int(ret_val);
40250 des_int(n_code, code, 0);
40251 xmlResetLastError();
40252 if (mem_base != xmlMemBlocks()) {
40253 printf("Leak of %d blocks found in xmlUCSIsCatPo",
40254 xmlMemBlocks() - mem_base);
40256 printf(" %d", n_code);
40268 test_xmlUCSIsCatPs(void) {
40271 #if defined(LIBXML_UNICODE_ENABLED)
40274 int code; /* UCS code point */
40277 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40278 mem_base = xmlMemBlocks();
40279 code = gen_int(n_code, 0);
40281 ret_val = xmlUCSIsCatPs(code);
40282 desret_int(ret_val);
40284 des_int(n_code, code, 0);
40285 xmlResetLastError();
40286 if (mem_base != xmlMemBlocks()) {
40287 printf("Leak of %d blocks found in xmlUCSIsCatPs",
40288 xmlMemBlocks() - mem_base);
40290 printf(" %d", n_code);
40302 test_xmlUCSIsCatS(void) {
40305 #if defined(LIBXML_UNICODE_ENABLED)
40308 int code; /* UCS code point */
40311 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40312 mem_base = xmlMemBlocks();
40313 code = gen_int(n_code, 0);
40315 ret_val = xmlUCSIsCatS(code);
40316 desret_int(ret_val);
40318 des_int(n_code, code, 0);
40319 xmlResetLastError();
40320 if (mem_base != xmlMemBlocks()) {
40321 printf("Leak of %d blocks found in xmlUCSIsCatS",
40322 xmlMemBlocks() - mem_base);
40324 printf(" %d", n_code);
40336 test_xmlUCSIsCatSc(void) {
40339 #if defined(LIBXML_UNICODE_ENABLED)
40342 int code; /* UCS code point */
40345 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40346 mem_base = xmlMemBlocks();
40347 code = gen_int(n_code, 0);
40349 ret_val = xmlUCSIsCatSc(code);
40350 desret_int(ret_val);
40352 des_int(n_code, code, 0);
40353 xmlResetLastError();
40354 if (mem_base != xmlMemBlocks()) {
40355 printf("Leak of %d blocks found in xmlUCSIsCatSc",
40356 xmlMemBlocks() - mem_base);
40358 printf(" %d", n_code);
40370 test_xmlUCSIsCatSk(void) {
40373 #if defined(LIBXML_UNICODE_ENABLED)
40376 int code; /* UCS code point */
40379 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40380 mem_base = xmlMemBlocks();
40381 code = gen_int(n_code, 0);
40383 ret_val = xmlUCSIsCatSk(code);
40384 desret_int(ret_val);
40386 des_int(n_code, code, 0);
40387 xmlResetLastError();
40388 if (mem_base != xmlMemBlocks()) {
40389 printf("Leak of %d blocks found in xmlUCSIsCatSk",
40390 xmlMemBlocks() - mem_base);
40392 printf(" %d", n_code);
40404 test_xmlUCSIsCatSm(void) {
40407 #if defined(LIBXML_UNICODE_ENABLED)
40410 int code; /* UCS code point */
40413 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40414 mem_base = xmlMemBlocks();
40415 code = gen_int(n_code, 0);
40417 ret_val = xmlUCSIsCatSm(code);
40418 desret_int(ret_val);
40420 des_int(n_code, code, 0);
40421 xmlResetLastError();
40422 if (mem_base != xmlMemBlocks()) {
40423 printf("Leak of %d blocks found in xmlUCSIsCatSm",
40424 xmlMemBlocks() - mem_base);
40426 printf(" %d", n_code);
40438 test_xmlUCSIsCatSo(void) {
40441 #if defined(LIBXML_UNICODE_ENABLED)
40444 int code; /* UCS code point */
40447 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40448 mem_base = xmlMemBlocks();
40449 code = gen_int(n_code, 0);
40451 ret_val = xmlUCSIsCatSo(code);
40452 desret_int(ret_val);
40454 des_int(n_code, code, 0);
40455 xmlResetLastError();
40456 if (mem_base != xmlMemBlocks()) {
40457 printf("Leak of %d blocks found in xmlUCSIsCatSo",
40458 xmlMemBlocks() - mem_base);
40460 printf(" %d", n_code);
40472 test_xmlUCSIsCatZ(void) {
40475 #if defined(LIBXML_UNICODE_ENABLED)
40478 int code; /* UCS code point */
40481 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40482 mem_base = xmlMemBlocks();
40483 code = gen_int(n_code, 0);
40485 ret_val = xmlUCSIsCatZ(code);
40486 desret_int(ret_val);
40488 des_int(n_code, code, 0);
40489 xmlResetLastError();
40490 if (mem_base != xmlMemBlocks()) {
40491 printf("Leak of %d blocks found in xmlUCSIsCatZ",
40492 xmlMemBlocks() - mem_base);
40494 printf(" %d", n_code);
40506 test_xmlUCSIsCatZl(void) {
40509 #if defined(LIBXML_UNICODE_ENABLED)
40512 int code; /* UCS code point */
40515 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40516 mem_base = xmlMemBlocks();
40517 code = gen_int(n_code, 0);
40519 ret_val = xmlUCSIsCatZl(code);
40520 desret_int(ret_val);
40522 des_int(n_code, code, 0);
40523 xmlResetLastError();
40524 if (mem_base != xmlMemBlocks()) {
40525 printf("Leak of %d blocks found in xmlUCSIsCatZl",
40526 xmlMemBlocks() - mem_base);
40528 printf(" %d", n_code);
40540 test_xmlUCSIsCatZp(void) {
40543 #if defined(LIBXML_UNICODE_ENABLED)
40546 int code; /* UCS code point */
40549 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40550 mem_base = xmlMemBlocks();
40551 code = gen_int(n_code, 0);
40553 ret_val = xmlUCSIsCatZp(code);
40554 desret_int(ret_val);
40556 des_int(n_code, code, 0);
40557 xmlResetLastError();
40558 if (mem_base != xmlMemBlocks()) {
40559 printf("Leak of %d blocks found in xmlUCSIsCatZp",
40560 xmlMemBlocks() - mem_base);
40562 printf(" %d", n_code);
40574 test_xmlUCSIsCatZs(void) {
40577 #if defined(LIBXML_UNICODE_ENABLED)
40580 int code; /* UCS code point */
40583 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40584 mem_base = xmlMemBlocks();
40585 code = gen_int(n_code, 0);
40587 ret_val = xmlUCSIsCatZs(code);
40588 desret_int(ret_val);
40590 des_int(n_code, code, 0);
40591 xmlResetLastError();
40592 if (mem_base != xmlMemBlocks()) {
40593 printf("Leak of %d blocks found in xmlUCSIsCatZs",
40594 xmlMemBlocks() - mem_base);
40596 printf(" %d", n_code);
40608 test_xmlUCSIsCherokee(void) {
40611 #if defined(LIBXML_UNICODE_ENABLED)
40614 int code; /* UCS code point */
40617 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40618 mem_base = xmlMemBlocks();
40619 code = gen_int(n_code, 0);
40621 ret_val = xmlUCSIsCherokee(code);
40622 desret_int(ret_val);
40624 des_int(n_code, code, 0);
40625 xmlResetLastError();
40626 if (mem_base != xmlMemBlocks()) {
40627 printf("Leak of %d blocks found in xmlUCSIsCherokee",
40628 xmlMemBlocks() - mem_base);
40630 printf(" %d", n_code);
40642 test_xmlUCSIsCombiningDiacriticalMarks(void) {
40645 #if defined(LIBXML_UNICODE_ENABLED)
40648 int code; /* UCS code point */
40651 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40652 mem_base = xmlMemBlocks();
40653 code = gen_int(n_code, 0);
40655 ret_val = xmlUCSIsCombiningDiacriticalMarks(code);
40656 desret_int(ret_val);
40658 des_int(n_code, code, 0);
40659 xmlResetLastError();
40660 if (mem_base != xmlMemBlocks()) {
40661 printf("Leak of %d blocks found in xmlUCSIsCombiningDiacriticalMarks",
40662 xmlMemBlocks() - mem_base);
40664 printf(" %d", n_code);
40676 test_xmlUCSIsCombiningDiacriticalMarksforSymbols(void) {
40679 #if defined(LIBXML_UNICODE_ENABLED)
40682 int code; /* UCS code point */
40685 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40686 mem_base = xmlMemBlocks();
40687 code = gen_int(n_code, 0);
40689 ret_val = xmlUCSIsCombiningDiacriticalMarksforSymbols(code);
40690 desret_int(ret_val);
40692 des_int(n_code, code, 0);
40693 xmlResetLastError();
40694 if (mem_base != xmlMemBlocks()) {
40695 printf("Leak of %d blocks found in xmlUCSIsCombiningDiacriticalMarksforSymbols",
40696 xmlMemBlocks() - mem_base);
40698 printf(" %d", n_code);
40710 test_xmlUCSIsCombiningHalfMarks(void) {
40713 #if defined(LIBXML_UNICODE_ENABLED)
40716 int code; /* UCS code point */
40719 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40720 mem_base = xmlMemBlocks();
40721 code = gen_int(n_code, 0);
40723 ret_val = xmlUCSIsCombiningHalfMarks(code);
40724 desret_int(ret_val);
40726 des_int(n_code, code, 0);
40727 xmlResetLastError();
40728 if (mem_base != xmlMemBlocks()) {
40729 printf("Leak of %d blocks found in xmlUCSIsCombiningHalfMarks",
40730 xmlMemBlocks() - mem_base);
40732 printf(" %d", n_code);
40744 test_xmlUCSIsCombiningMarksforSymbols(void) {
40747 #if defined(LIBXML_UNICODE_ENABLED)
40750 int code; /* UCS code point */
40753 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40754 mem_base = xmlMemBlocks();
40755 code = gen_int(n_code, 0);
40757 ret_val = xmlUCSIsCombiningMarksforSymbols(code);
40758 desret_int(ret_val);
40760 des_int(n_code, code, 0);
40761 xmlResetLastError();
40762 if (mem_base != xmlMemBlocks()) {
40763 printf("Leak of %d blocks found in xmlUCSIsCombiningMarksforSymbols",
40764 xmlMemBlocks() - mem_base);
40766 printf(" %d", n_code);
40778 test_xmlUCSIsControlPictures(void) {
40781 #if defined(LIBXML_UNICODE_ENABLED)
40784 int code; /* UCS code point */
40787 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40788 mem_base = xmlMemBlocks();
40789 code = gen_int(n_code, 0);
40791 ret_val = xmlUCSIsControlPictures(code);
40792 desret_int(ret_val);
40794 des_int(n_code, code, 0);
40795 xmlResetLastError();
40796 if (mem_base != xmlMemBlocks()) {
40797 printf("Leak of %d blocks found in xmlUCSIsControlPictures",
40798 xmlMemBlocks() - mem_base);
40800 printf(" %d", n_code);
40812 test_xmlUCSIsCurrencySymbols(void) {
40815 #if defined(LIBXML_UNICODE_ENABLED)
40818 int code; /* UCS code point */
40821 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40822 mem_base = xmlMemBlocks();
40823 code = gen_int(n_code, 0);
40825 ret_val = xmlUCSIsCurrencySymbols(code);
40826 desret_int(ret_val);
40828 des_int(n_code, code, 0);
40829 xmlResetLastError();
40830 if (mem_base != xmlMemBlocks()) {
40831 printf("Leak of %d blocks found in xmlUCSIsCurrencySymbols",
40832 xmlMemBlocks() - mem_base);
40834 printf(" %d", n_code);
40846 test_xmlUCSIsCypriotSyllabary(void) {
40849 #if defined(LIBXML_UNICODE_ENABLED)
40852 int code; /* UCS code point */
40855 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40856 mem_base = xmlMemBlocks();
40857 code = gen_int(n_code, 0);
40859 ret_val = xmlUCSIsCypriotSyllabary(code);
40860 desret_int(ret_val);
40862 des_int(n_code, code, 0);
40863 xmlResetLastError();
40864 if (mem_base != xmlMemBlocks()) {
40865 printf("Leak of %d blocks found in xmlUCSIsCypriotSyllabary",
40866 xmlMemBlocks() - mem_base);
40868 printf(" %d", n_code);
40880 test_xmlUCSIsCyrillic(void) {
40883 #if defined(LIBXML_UNICODE_ENABLED)
40886 int code; /* UCS code point */
40889 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40890 mem_base = xmlMemBlocks();
40891 code = gen_int(n_code, 0);
40893 ret_val = xmlUCSIsCyrillic(code);
40894 desret_int(ret_val);
40896 des_int(n_code, code, 0);
40897 xmlResetLastError();
40898 if (mem_base != xmlMemBlocks()) {
40899 printf("Leak of %d blocks found in xmlUCSIsCyrillic",
40900 xmlMemBlocks() - mem_base);
40902 printf(" %d", n_code);
40914 test_xmlUCSIsCyrillicSupplement(void) {
40917 #if defined(LIBXML_UNICODE_ENABLED)
40920 int code; /* UCS code point */
40923 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40924 mem_base = xmlMemBlocks();
40925 code = gen_int(n_code, 0);
40927 ret_val = xmlUCSIsCyrillicSupplement(code);
40928 desret_int(ret_val);
40930 des_int(n_code, code, 0);
40931 xmlResetLastError();
40932 if (mem_base != xmlMemBlocks()) {
40933 printf("Leak of %d blocks found in xmlUCSIsCyrillicSupplement",
40934 xmlMemBlocks() - mem_base);
40936 printf(" %d", n_code);
40948 test_xmlUCSIsDeseret(void) {
40951 #if defined(LIBXML_UNICODE_ENABLED)
40954 int code; /* UCS code point */
40957 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40958 mem_base = xmlMemBlocks();
40959 code = gen_int(n_code, 0);
40961 ret_val = xmlUCSIsDeseret(code);
40962 desret_int(ret_val);
40964 des_int(n_code, code, 0);
40965 xmlResetLastError();
40966 if (mem_base != xmlMemBlocks()) {
40967 printf("Leak of %d blocks found in xmlUCSIsDeseret",
40968 xmlMemBlocks() - mem_base);
40970 printf(" %d", n_code);
40982 test_xmlUCSIsDevanagari(void) {
40985 #if defined(LIBXML_UNICODE_ENABLED)
40988 int code; /* UCS code point */
40991 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40992 mem_base = xmlMemBlocks();
40993 code = gen_int(n_code, 0);
40995 ret_val = xmlUCSIsDevanagari(code);
40996 desret_int(ret_val);
40998 des_int(n_code, code, 0);
40999 xmlResetLastError();
41000 if (mem_base != xmlMemBlocks()) {
41001 printf("Leak of %d blocks found in xmlUCSIsDevanagari",
41002 xmlMemBlocks() - mem_base);
41004 printf(" %d", n_code);
41016 test_xmlUCSIsDingbats(void) {
41019 #if defined(LIBXML_UNICODE_ENABLED)
41022 int code; /* UCS code point */
41025 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41026 mem_base = xmlMemBlocks();
41027 code = gen_int(n_code, 0);
41029 ret_val = xmlUCSIsDingbats(code);
41030 desret_int(ret_val);
41032 des_int(n_code, code, 0);
41033 xmlResetLastError();
41034 if (mem_base != xmlMemBlocks()) {
41035 printf("Leak of %d blocks found in xmlUCSIsDingbats",
41036 xmlMemBlocks() - mem_base);
41038 printf(" %d", n_code);
41050 test_xmlUCSIsEnclosedAlphanumerics(void) {
41053 #if defined(LIBXML_UNICODE_ENABLED)
41056 int code; /* UCS code point */
41059 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41060 mem_base = xmlMemBlocks();
41061 code = gen_int(n_code, 0);
41063 ret_val = xmlUCSIsEnclosedAlphanumerics(code);
41064 desret_int(ret_val);
41066 des_int(n_code, code, 0);
41067 xmlResetLastError();
41068 if (mem_base != xmlMemBlocks()) {
41069 printf("Leak of %d blocks found in xmlUCSIsEnclosedAlphanumerics",
41070 xmlMemBlocks() - mem_base);
41072 printf(" %d", n_code);
41084 test_xmlUCSIsEnclosedCJKLettersandMonths(void) {
41087 #if defined(LIBXML_UNICODE_ENABLED)
41090 int code; /* UCS code point */
41093 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41094 mem_base = xmlMemBlocks();
41095 code = gen_int(n_code, 0);
41097 ret_val = xmlUCSIsEnclosedCJKLettersandMonths(code);
41098 desret_int(ret_val);
41100 des_int(n_code, code, 0);
41101 xmlResetLastError();
41102 if (mem_base != xmlMemBlocks()) {
41103 printf("Leak of %d blocks found in xmlUCSIsEnclosedCJKLettersandMonths",
41104 xmlMemBlocks() - mem_base);
41106 printf(" %d", n_code);
41118 test_xmlUCSIsEthiopic(void) {
41121 #if defined(LIBXML_UNICODE_ENABLED)
41124 int code; /* UCS code point */
41127 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41128 mem_base = xmlMemBlocks();
41129 code = gen_int(n_code, 0);
41131 ret_val = xmlUCSIsEthiopic(code);
41132 desret_int(ret_val);
41134 des_int(n_code, code, 0);
41135 xmlResetLastError();
41136 if (mem_base != xmlMemBlocks()) {
41137 printf("Leak of %d blocks found in xmlUCSIsEthiopic",
41138 xmlMemBlocks() - mem_base);
41140 printf(" %d", n_code);
41152 test_xmlUCSIsGeneralPunctuation(void) {
41155 #if defined(LIBXML_UNICODE_ENABLED)
41158 int code; /* UCS code point */
41161 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41162 mem_base = xmlMemBlocks();
41163 code = gen_int(n_code, 0);
41165 ret_val = xmlUCSIsGeneralPunctuation(code);
41166 desret_int(ret_val);
41168 des_int(n_code, code, 0);
41169 xmlResetLastError();
41170 if (mem_base != xmlMemBlocks()) {
41171 printf("Leak of %d blocks found in xmlUCSIsGeneralPunctuation",
41172 xmlMemBlocks() - mem_base);
41174 printf(" %d", n_code);
41186 test_xmlUCSIsGeometricShapes(void) {
41189 #if defined(LIBXML_UNICODE_ENABLED)
41192 int code; /* UCS code point */
41195 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41196 mem_base = xmlMemBlocks();
41197 code = gen_int(n_code, 0);
41199 ret_val = xmlUCSIsGeometricShapes(code);
41200 desret_int(ret_val);
41202 des_int(n_code, code, 0);
41203 xmlResetLastError();
41204 if (mem_base != xmlMemBlocks()) {
41205 printf("Leak of %d blocks found in xmlUCSIsGeometricShapes",
41206 xmlMemBlocks() - mem_base);
41208 printf(" %d", n_code);
41220 test_xmlUCSIsGeorgian(void) {
41223 #if defined(LIBXML_UNICODE_ENABLED)
41226 int code; /* UCS code point */
41229 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41230 mem_base = xmlMemBlocks();
41231 code = gen_int(n_code, 0);
41233 ret_val = xmlUCSIsGeorgian(code);
41234 desret_int(ret_val);
41236 des_int(n_code, code, 0);
41237 xmlResetLastError();
41238 if (mem_base != xmlMemBlocks()) {
41239 printf("Leak of %d blocks found in xmlUCSIsGeorgian",
41240 xmlMemBlocks() - mem_base);
41242 printf(" %d", n_code);
41254 test_xmlUCSIsGothic(void) {
41257 #if defined(LIBXML_UNICODE_ENABLED)
41260 int code; /* UCS code point */
41263 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41264 mem_base = xmlMemBlocks();
41265 code = gen_int(n_code, 0);
41267 ret_val = xmlUCSIsGothic(code);
41268 desret_int(ret_val);
41270 des_int(n_code, code, 0);
41271 xmlResetLastError();
41272 if (mem_base != xmlMemBlocks()) {
41273 printf("Leak of %d blocks found in xmlUCSIsGothic",
41274 xmlMemBlocks() - mem_base);
41276 printf(" %d", n_code);
41288 test_xmlUCSIsGreek(void) {
41291 #if defined(LIBXML_UNICODE_ENABLED)
41294 int code; /* UCS code point */
41297 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41298 mem_base = xmlMemBlocks();
41299 code = gen_int(n_code, 0);
41301 ret_val = xmlUCSIsGreek(code);
41302 desret_int(ret_val);
41304 des_int(n_code, code, 0);
41305 xmlResetLastError();
41306 if (mem_base != xmlMemBlocks()) {
41307 printf("Leak of %d blocks found in xmlUCSIsGreek",
41308 xmlMemBlocks() - mem_base);
41310 printf(" %d", n_code);
41322 test_xmlUCSIsGreekExtended(void) {
41325 #if defined(LIBXML_UNICODE_ENABLED)
41328 int code; /* UCS code point */
41331 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41332 mem_base = xmlMemBlocks();
41333 code = gen_int(n_code, 0);
41335 ret_val = xmlUCSIsGreekExtended(code);
41336 desret_int(ret_val);
41338 des_int(n_code, code, 0);
41339 xmlResetLastError();
41340 if (mem_base != xmlMemBlocks()) {
41341 printf("Leak of %d blocks found in xmlUCSIsGreekExtended",
41342 xmlMemBlocks() - mem_base);
41344 printf(" %d", n_code);
41356 test_xmlUCSIsGreekandCoptic(void) {
41359 #if defined(LIBXML_UNICODE_ENABLED)
41362 int code; /* UCS code point */
41365 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41366 mem_base = xmlMemBlocks();
41367 code = gen_int(n_code, 0);
41369 ret_val = xmlUCSIsGreekandCoptic(code);
41370 desret_int(ret_val);
41372 des_int(n_code, code, 0);
41373 xmlResetLastError();
41374 if (mem_base != xmlMemBlocks()) {
41375 printf("Leak of %d blocks found in xmlUCSIsGreekandCoptic",
41376 xmlMemBlocks() - mem_base);
41378 printf(" %d", n_code);
41390 test_xmlUCSIsGujarati(void) {
41393 #if defined(LIBXML_UNICODE_ENABLED)
41396 int code; /* UCS code point */
41399 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41400 mem_base = xmlMemBlocks();
41401 code = gen_int(n_code, 0);
41403 ret_val = xmlUCSIsGujarati(code);
41404 desret_int(ret_val);
41406 des_int(n_code, code, 0);
41407 xmlResetLastError();
41408 if (mem_base != xmlMemBlocks()) {
41409 printf("Leak of %d blocks found in xmlUCSIsGujarati",
41410 xmlMemBlocks() - mem_base);
41412 printf(" %d", n_code);
41424 test_xmlUCSIsGurmukhi(void) {
41427 #if defined(LIBXML_UNICODE_ENABLED)
41430 int code; /* UCS code point */
41433 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41434 mem_base = xmlMemBlocks();
41435 code = gen_int(n_code, 0);
41437 ret_val = xmlUCSIsGurmukhi(code);
41438 desret_int(ret_val);
41440 des_int(n_code, code, 0);
41441 xmlResetLastError();
41442 if (mem_base != xmlMemBlocks()) {
41443 printf("Leak of %d blocks found in xmlUCSIsGurmukhi",
41444 xmlMemBlocks() - mem_base);
41446 printf(" %d", n_code);
41458 test_xmlUCSIsHalfwidthandFullwidthForms(void) {
41461 #if defined(LIBXML_UNICODE_ENABLED)
41464 int code; /* UCS code point */
41467 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41468 mem_base = xmlMemBlocks();
41469 code = gen_int(n_code, 0);
41471 ret_val = xmlUCSIsHalfwidthandFullwidthForms(code);
41472 desret_int(ret_val);
41474 des_int(n_code, code, 0);
41475 xmlResetLastError();
41476 if (mem_base != xmlMemBlocks()) {
41477 printf("Leak of %d blocks found in xmlUCSIsHalfwidthandFullwidthForms",
41478 xmlMemBlocks() - mem_base);
41480 printf(" %d", n_code);
41492 test_xmlUCSIsHangulCompatibilityJamo(void) {
41495 #if defined(LIBXML_UNICODE_ENABLED)
41498 int code; /* UCS code point */
41501 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41502 mem_base = xmlMemBlocks();
41503 code = gen_int(n_code, 0);
41505 ret_val = xmlUCSIsHangulCompatibilityJamo(code);
41506 desret_int(ret_val);
41508 des_int(n_code, code, 0);
41509 xmlResetLastError();
41510 if (mem_base != xmlMemBlocks()) {
41511 printf("Leak of %d blocks found in xmlUCSIsHangulCompatibilityJamo",
41512 xmlMemBlocks() - mem_base);
41514 printf(" %d", n_code);
41526 test_xmlUCSIsHangulJamo(void) {
41529 #if defined(LIBXML_UNICODE_ENABLED)
41532 int code; /* UCS code point */
41535 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41536 mem_base = xmlMemBlocks();
41537 code = gen_int(n_code, 0);
41539 ret_val = xmlUCSIsHangulJamo(code);
41540 desret_int(ret_val);
41542 des_int(n_code, code, 0);
41543 xmlResetLastError();
41544 if (mem_base != xmlMemBlocks()) {
41545 printf("Leak of %d blocks found in xmlUCSIsHangulJamo",
41546 xmlMemBlocks() - mem_base);
41548 printf(" %d", n_code);
41560 test_xmlUCSIsHangulSyllables(void) {
41563 #if defined(LIBXML_UNICODE_ENABLED)
41566 int code; /* UCS code point */
41569 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41570 mem_base = xmlMemBlocks();
41571 code = gen_int(n_code, 0);
41573 ret_val = xmlUCSIsHangulSyllables(code);
41574 desret_int(ret_val);
41576 des_int(n_code, code, 0);
41577 xmlResetLastError();
41578 if (mem_base != xmlMemBlocks()) {
41579 printf("Leak of %d blocks found in xmlUCSIsHangulSyllables",
41580 xmlMemBlocks() - mem_base);
41582 printf(" %d", n_code);
41594 test_xmlUCSIsHanunoo(void) {
41597 #if defined(LIBXML_UNICODE_ENABLED)
41600 int code; /* UCS code point */
41603 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41604 mem_base = xmlMemBlocks();
41605 code = gen_int(n_code, 0);
41607 ret_val = xmlUCSIsHanunoo(code);
41608 desret_int(ret_val);
41610 des_int(n_code, code, 0);
41611 xmlResetLastError();
41612 if (mem_base != xmlMemBlocks()) {
41613 printf("Leak of %d blocks found in xmlUCSIsHanunoo",
41614 xmlMemBlocks() - mem_base);
41616 printf(" %d", n_code);
41628 test_xmlUCSIsHebrew(void) {
41631 #if defined(LIBXML_UNICODE_ENABLED)
41634 int code; /* UCS code point */
41637 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41638 mem_base = xmlMemBlocks();
41639 code = gen_int(n_code, 0);
41641 ret_val = xmlUCSIsHebrew(code);
41642 desret_int(ret_val);
41644 des_int(n_code, code, 0);
41645 xmlResetLastError();
41646 if (mem_base != xmlMemBlocks()) {
41647 printf("Leak of %d blocks found in xmlUCSIsHebrew",
41648 xmlMemBlocks() - mem_base);
41650 printf(" %d", n_code);
41662 test_xmlUCSIsHighPrivateUseSurrogates(void) {
41665 #if defined(LIBXML_UNICODE_ENABLED)
41668 int code; /* UCS code point */
41671 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41672 mem_base = xmlMemBlocks();
41673 code = gen_int(n_code, 0);
41675 ret_val = xmlUCSIsHighPrivateUseSurrogates(code);
41676 desret_int(ret_val);
41678 des_int(n_code, code, 0);
41679 xmlResetLastError();
41680 if (mem_base != xmlMemBlocks()) {
41681 printf("Leak of %d blocks found in xmlUCSIsHighPrivateUseSurrogates",
41682 xmlMemBlocks() - mem_base);
41684 printf(" %d", n_code);
41696 test_xmlUCSIsHighSurrogates(void) {
41699 #if defined(LIBXML_UNICODE_ENABLED)
41702 int code; /* UCS code point */
41705 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41706 mem_base = xmlMemBlocks();
41707 code = gen_int(n_code, 0);
41709 ret_val = xmlUCSIsHighSurrogates(code);
41710 desret_int(ret_val);
41712 des_int(n_code, code, 0);
41713 xmlResetLastError();
41714 if (mem_base != xmlMemBlocks()) {
41715 printf("Leak of %d blocks found in xmlUCSIsHighSurrogates",
41716 xmlMemBlocks() - mem_base);
41718 printf(" %d", n_code);
41730 test_xmlUCSIsHiragana(void) {
41733 #if defined(LIBXML_UNICODE_ENABLED)
41736 int code; /* UCS code point */
41739 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41740 mem_base = xmlMemBlocks();
41741 code = gen_int(n_code, 0);
41743 ret_val = xmlUCSIsHiragana(code);
41744 desret_int(ret_val);
41746 des_int(n_code, code, 0);
41747 xmlResetLastError();
41748 if (mem_base != xmlMemBlocks()) {
41749 printf("Leak of %d blocks found in xmlUCSIsHiragana",
41750 xmlMemBlocks() - mem_base);
41752 printf(" %d", n_code);
41764 test_xmlUCSIsIPAExtensions(void) {
41767 #if defined(LIBXML_UNICODE_ENABLED)
41770 int code; /* UCS code point */
41773 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41774 mem_base = xmlMemBlocks();
41775 code = gen_int(n_code, 0);
41777 ret_val = xmlUCSIsIPAExtensions(code);
41778 desret_int(ret_val);
41780 des_int(n_code, code, 0);
41781 xmlResetLastError();
41782 if (mem_base != xmlMemBlocks()) {
41783 printf("Leak of %d blocks found in xmlUCSIsIPAExtensions",
41784 xmlMemBlocks() - mem_base);
41786 printf(" %d", n_code);
41798 test_xmlUCSIsIdeographicDescriptionCharacters(void) {
41801 #if defined(LIBXML_UNICODE_ENABLED)
41804 int code; /* UCS code point */
41807 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41808 mem_base = xmlMemBlocks();
41809 code = gen_int(n_code, 0);
41811 ret_val = xmlUCSIsIdeographicDescriptionCharacters(code);
41812 desret_int(ret_val);
41814 des_int(n_code, code, 0);
41815 xmlResetLastError();
41816 if (mem_base != xmlMemBlocks()) {
41817 printf("Leak of %d blocks found in xmlUCSIsIdeographicDescriptionCharacters",
41818 xmlMemBlocks() - mem_base);
41820 printf(" %d", n_code);
41832 test_xmlUCSIsKanbun(void) {
41835 #if defined(LIBXML_UNICODE_ENABLED)
41838 int code; /* UCS code point */
41841 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41842 mem_base = xmlMemBlocks();
41843 code = gen_int(n_code, 0);
41845 ret_val = xmlUCSIsKanbun(code);
41846 desret_int(ret_val);
41848 des_int(n_code, code, 0);
41849 xmlResetLastError();
41850 if (mem_base != xmlMemBlocks()) {
41851 printf("Leak of %d blocks found in xmlUCSIsKanbun",
41852 xmlMemBlocks() - mem_base);
41854 printf(" %d", n_code);
41866 test_xmlUCSIsKangxiRadicals(void) {
41869 #if defined(LIBXML_UNICODE_ENABLED)
41872 int code; /* UCS code point */
41875 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41876 mem_base = xmlMemBlocks();
41877 code = gen_int(n_code, 0);
41879 ret_val = xmlUCSIsKangxiRadicals(code);
41880 desret_int(ret_val);
41882 des_int(n_code, code, 0);
41883 xmlResetLastError();
41884 if (mem_base != xmlMemBlocks()) {
41885 printf("Leak of %d blocks found in xmlUCSIsKangxiRadicals",
41886 xmlMemBlocks() - mem_base);
41888 printf(" %d", n_code);
41900 test_xmlUCSIsKannada(void) {
41903 #if defined(LIBXML_UNICODE_ENABLED)
41906 int code; /* UCS code point */
41909 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41910 mem_base = xmlMemBlocks();
41911 code = gen_int(n_code, 0);
41913 ret_val = xmlUCSIsKannada(code);
41914 desret_int(ret_val);
41916 des_int(n_code, code, 0);
41917 xmlResetLastError();
41918 if (mem_base != xmlMemBlocks()) {
41919 printf("Leak of %d blocks found in xmlUCSIsKannada",
41920 xmlMemBlocks() - mem_base);
41922 printf(" %d", n_code);
41934 test_xmlUCSIsKatakana(void) {
41937 #if defined(LIBXML_UNICODE_ENABLED)
41940 int code; /* UCS code point */
41943 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41944 mem_base = xmlMemBlocks();
41945 code = gen_int(n_code, 0);
41947 ret_val = xmlUCSIsKatakana(code);
41948 desret_int(ret_val);
41950 des_int(n_code, code, 0);
41951 xmlResetLastError();
41952 if (mem_base != xmlMemBlocks()) {
41953 printf("Leak of %d blocks found in xmlUCSIsKatakana",
41954 xmlMemBlocks() - mem_base);
41956 printf(" %d", n_code);
41968 test_xmlUCSIsKatakanaPhoneticExtensions(void) {
41971 #if defined(LIBXML_UNICODE_ENABLED)
41974 int code; /* UCS code point */
41977 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41978 mem_base = xmlMemBlocks();
41979 code = gen_int(n_code, 0);
41981 ret_val = xmlUCSIsKatakanaPhoneticExtensions(code);
41982 desret_int(ret_val);
41984 des_int(n_code, code, 0);
41985 xmlResetLastError();
41986 if (mem_base != xmlMemBlocks()) {
41987 printf("Leak of %d blocks found in xmlUCSIsKatakanaPhoneticExtensions",
41988 xmlMemBlocks() - mem_base);
41990 printf(" %d", n_code);
42002 test_xmlUCSIsKhmer(void) {
42005 #if defined(LIBXML_UNICODE_ENABLED)
42008 int code; /* UCS code point */
42011 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42012 mem_base = xmlMemBlocks();
42013 code = gen_int(n_code, 0);
42015 ret_val = xmlUCSIsKhmer(code);
42016 desret_int(ret_val);
42018 des_int(n_code, code, 0);
42019 xmlResetLastError();
42020 if (mem_base != xmlMemBlocks()) {
42021 printf("Leak of %d blocks found in xmlUCSIsKhmer",
42022 xmlMemBlocks() - mem_base);
42024 printf(" %d", n_code);
42036 test_xmlUCSIsKhmerSymbols(void) {
42039 #if defined(LIBXML_UNICODE_ENABLED)
42042 int code; /* UCS code point */
42045 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42046 mem_base = xmlMemBlocks();
42047 code = gen_int(n_code, 0);
42049 ret_val = xmlUCSIsKhmerSymbols(code);
42050 desret_int(ret_val);
42052 des_int(n_code, code, 0);
42053 xmlResetLastError();
42054 if (mem_base != xmlMemBlocks()) {
42055 printf("Leak of %d blocks found in xmlUCSIsKhmerSymbols",
42056 xmlMemBlocks() - mem_base);
42058 printf(" %d", n_code);
42070 test_xmlUCSIsLao(void) {
42073 #if defined(LIBXML_UNICODE_ENABLED)
42076 int code; /* UCS code point */
42079 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42080 mem_base = xmlMemBlocks();
42081 code = gen_int(n_code, 0);
42083 ret_val = xmlUCSIsLao(code);
42084 desret_int(ret_val);
42086 des_int(n_code, code, 0);
42087 xmlResetLastError();
42088 if (mem_base != xmlMemBlocks()) {
42089 printf("Leak of %d blocks found in xmlUCSIsLao",
42090 xmlMemBlocks() - mem_base);
42092 printf(" %d", n_code);
42104 test_xmlUCSIsLatin1Supplement(void) {
42107 #if defined(LIBXML_UNICODE_ENABLED)
42110 int code; /* UCS code point */
42113 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42114 mem_base = xmlMemBlocks();
42115 code = gen_int(n_code, 0);
42117 ret_val = xmlUCSIsLatin1Supplement(code);
42118 desret_int(ret_val);
42120 des_int(n_code, code, 0);
42121 xmlResetLastError();
42122 if (mem_base != xmlMemBlocks()) {
42123 printf("Leak of %d blocks found in xmlUCSIsLatin1Supplement",
42124 xmlMemBlocks() - mem_base);
42126 printf(" %d", n_code);
42138 test_xmlUCSIsLatinExtendedA(void) {
42141 #if defined(LIBXML_UNICODE_ENABLED)
42144 int code; /* UCS code point */
42147 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42148 mem_base = xmlMemBlocks();
42149 code = gen_int(n_code, 0);
42151 ret_val = xmlUCSIsLatinExtendedA(code);
42152 desret_int(ret_val);
42154 des_int(n_code, code, 0);
42155 xmlResetLastError();
42156 if (mem_base != xmlMemBlocks()) {
42157 printf("Leak of %d blocks found in xmlUCSIsLatinExtendedA",
42158 xmlMemBlocks() - mem_base);
42160 printf(" %d", n_code);
42172 test_xmlUCSIsLatinExtendedAdditional(void) {
42175 #if defined(LIBXML_UNICODE_ENABLED)
42178 int code; /* UCS code point */
42181 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42182 mem_base = xmlMemBlocks();
42183 code = gen_int(n_code, 0);
42185 ret_val = xmlUCSIsLatinExtendedAdditional(code);
42186 desret_int(ret_val);
42188 des_int(n_code, code, 0);
42189 xmlResetLastError();
42190 if (mem_base != xmlMemBlocks()) {
42191 printf("Leak of %d blocks found in xmlUCSIsLatinExtendedAdditional",
42192 xmlMemBlocks() - mem_base);
42194 printf(" %d", n_code);
42206 test_xmlUCSIsLatinExtendedB(void) {
42209 #if defined(LIBXML_UNICODE_ENABLED)
42212 int code; /* UCS code point */
42215 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42216 mem_base = xmlMemBlocks();
42217 code = gen_int(n_code, 0);
42219 ret_val = xmlUCSIsLatinExtendedB(code);
42220 desret_int(ret_val);
42222 des_int(n_code, code, 0);
42223 xmlResetLastError();
42224 if (mem_base != xmlMemBlocks()) {
42225 printf("Leak of %d blocks found in xmlUCSIsLatinExtendedB",
42226 xmlMemBlocks() - mem_base);
42228 printf(" %d", n_code);
42240 test_xmlUCSIsLetterlikeSymbols(void) {
42243 #if defined(LIBXML_UNICODE_ENABLED)
42246 int code; /* UCS code point */
42249 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42250 mem_base = xmlMemBlocks();
42251 code = gen_int(n_code, 0);
42253 ret_val = xmlUCSIsLetterlikeSymbols(code);
42254 desret_int(ret_val);
42256 des_int(n_code, code, 0);
42257 xmlResetLastError();
42258 if (mem_base != xmlMemBlocks()) {
42259 printf("Leak of %d blocks found in xmlUCSIsLetterlikeSymbols",
42260 xmlMemBlocks() - mem_base);
42262 printf(" %d", n_code);
42274 test_xmlUCSIsLimbu(void) {
42277 #if defined(LIBXML_UNICODE_ENABLED)
42280 int code; /* UCS code point */
42283 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42284 mem_base = xmlMemBlocks();
42285 code = gen_int(n_code, 0);
42287 ret_val = xmlUCSIsLimbu(code);
42288 desret_int(ret_val);
42290 des_int(n_code, code, 0);
42291 xmlResetLastError();
42292 if (mem_base != xmlMemBlocks()) {
42293 printf("Leak of %d blocks found in xmlUCSIsLimbu",
42294 xmlMemBlocks() - mem_base);
42296 printf(" %d", n_code);
42308 test_xmlUCSIsLinearBIdeograms(void) {
42311 #if defined(LIBXML_UNICODE_ENABLED)
42314 int code; /* UCS code point */
42317 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42318 mem_base = xmlMemBlocks();
42319 code = gen_int(n_code, 0);
42321 ret_val = xmlUCSIsLinearBIdeograms(code);
42322 desret_int(ret_val);
42324 des_int(n_code, code, 0);
42325 xmlResetLastError();
42326 if (mem_base != xmlMemBlocks()) {
42327 printf("Leak of %d blocks found in xmlUCSIsLinearBIdeograms",
42328 xmlMemBlocks() - mem_base);
42330 printf(" %d", n_code);
42342 test_xmlUCSIsLinearBSyllabary(void) {
42345 #if defined(LIBXML_UNICODE_ENABLED)
42348 int code; /* UCS code point */
42351 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42352 mem_base = xmlMemBlocks();
42353 code = gen_int(n_code, 0);
42355 ret_val = xmlUCSIsLinearBSyllabary(code);
42356 desret_int(ret_val);
42358 des_int(n_code, code, 0);
42359 xmlResetLastError();
42360 if (mem_base != xmlMemBlocks()) {
42361 printf("Leak of %d blocks found in xmlUCSIsLinearBSyllabary",
42362 xmlMemBlocks() - mem_base);
42364 printf(" %d", n_code);
42376 test_xmlUCSIsLowSurrogates(void) {
42379 #if defined(LIBXML_UNICODE_ENABLED)
42382 int code; /* UCS code point */
42385 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42386 mem_base = xmlMemBlocks();
42387 code = gen_int(n_code, 0);
42389 ret_val = xmlUCSIsLowSurrogates(code);
42390 desret_int(ret_val);
42392 des_int(n_code, code, 0);
42393 xmlResetLastError();
42394 if (mem_base != xmlMemBlocks()) {
42395 printf("Leak of %d blocks found in xmlUCSIsLowSurrogates",
42396 xmlMemBlocks() - mem_base);
42398 printf(" %d", n_code);
42410 test_xmlUCSIsMalayalam(void) {
42413 #if defined(LIBXML_UNICODE_ENABLED)
42416 int code; /* UCS code point */
42419 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42420 mem_base = xmlMemBlocks();
42421 code = gen_int(n_code, 0);
42423 ret_val = xmlUCSIsMalayalam(code);
42424 desret_int(ret_val);
42426 des_int(n_code, code, 0);
42427 xmlResetLastError();
42428 if (mem_base != xmlMemBlocks()) {
42429 printf("Leak of %d blocks found in xmlUCSIsMalayalam",
42430 xmlMemBlocks() - mem_base);
42432 printf(" %d", n_code);
42444 test_xmlUCSIsMathematicalAlphanumericSymbols(void) {
42447 #if defined(LIBXML_UNICODE_ENABLED)
42450 int code; /* UCS code point */
42453 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42454 mem_base = xmlMemBlocks();
42455 code = gen_int(n_code, 0);
42457 ret_val = xmlUCSIsMathematicalAlphanumericSymbols(code);
42458 desret_int(ret_val);
42460 des_int(n_code, code, 0);
42461 xmlResetLastError();
42462 if (mem_base != xmlMemBlocks()) {
42463 printf("Leak of %d blocks found in xmlUCSIsMathematicalAlphanumericSymbols",
42464 xmlMemBlocks() - mem_base);
42466 printf(" %d", n_code);
42478 test_xmlUCSIsMathematicalOperators(void) {
42481 #if defined(LIBXML_UNICODE_ENABLED)
42484 int code; /* UCS code point */
42487 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42488 mem_base = xmlMemBlocks();
42489 code = gen_int(n_code, 0);
42491 ret_val = xmlUCSIsMathematicalOperators(code);
42492 desret_int(ret_val);
42494 des_int(n_code, code, 0);
42495 xmlResetLastError();
42496 if (mem_base != xmlMemBlocks()) {
42497 printf("Leak of %d blocks found in xmlUCSIsMathematicalOperators",
42498 xmlMemBlocks() - mem_base);
42500 printf(" %d", n_code);
42512 test_xmlUCSIsMiscellaneousMathematicalSymbolsA(void) {
42515 #if defined(LIBXML_UNICODE_ENABLED)
42518 int code; /* UCS code point */
42521 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42522 mem_base = xmlMemBlocks();
42523 code = gen_int(n_code, 0);
42525 ret_val = xmlUCSIsMiscellaneousMathematicalSymbolsA(code);
42526 desret_int(ret_val);
42528 des_int(n_code, code, 0);
42529 xmlResetLastError();
42530 if (mem_base != xmlMemBlocks()) {
42531 printf("Leak of %d blocks found in xmlUCSIsMiscellaneousMathematicalSymbolsA",
42532 xmlMemBlocks() - mem_base);
42534 printf(" %d", n_code);
42546 test_xmlUCSIsMiscellaneousMathematicalSymbolsB(void) {
42549 #if defined(LIBXML_UNICODE_ENABLED)
42552 int code; /* UCS code point */
42555 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42556 mem_base = xmlMemBlocks();
42557 code = gen_int(n_code, 0);
42559 ret_val = xmlUCSIsMiscellaneousMathematicalSymbolsB(code);
42560 desret_int(ret_val);
42562 des_int(n_code, code, 0);
42563 xmlResetLastError();
42564 if (mem_base != xmlMemBlocks()) {
42565 printf("Leak of %d blocks found in xmlUCSIsMiscellaneousMathematicalSymbolsB",
42566 xmlMemBlocks() - mem_base);
42568 printf(" %d", n_code);
42580 test_xmlUCSIsMiscellaneousSymbols(void) {
42583 #if defined(LIBXML_UNICODE_ENABLED)
42586 int code; /* UCS code point */
42589 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42590 mem_base = xmlMemBlocks();
42591 code = gen_int(n_code, 0);
42593 ret_val = xmlUCSIsMiscellaneousSymbols(code);
42594 desret_int(ret_val);
42596 des_int(n_code, code, 0);
42597 xmlResetLastError();
42598 if (mem_base != xmlMemBlocks()) {
42599 printf("Leak of %d blocks found in xmlUCSIsMiscellaneousSymbols",
42600 xmlMemBlocks() - mem_base);
42602 printf(" %d", n_code);
42614 test_xmlUCSIsMiscellaneousSymbolsandArrows(void) {
42617 #if defined(LIBXML_UNICODE_ENABLED)
42620 int code; /* UCS code point */
42623 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42624 mem_base = xmlMemBlocks();
42625 code = gen_int(n_code, 0);
42627 ret_val = xmlUCSIsMiscellaneousSymbolsandArrows(code);
42628 desret_int(ret_val);
42630 des_int(n_code, code, 0);
42631 xmlResetLastError();
42632 if (mem_base != xmlMemBlocks()) {
42633 printf("Leak of %d blocks found in xmlUCSIsMiscellaneousSymbolsandArrows",
42634 xmlMemBlocks() - mem_base);
42636 printf(" %d", n_code);
42648 test_xmlUCSIsMiscellaneousTechnical(void) {
42651 #if defined(LIBXML_UNICODE_ENABLED)
42654 int code; /* UCS code point */
42657 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42658 mem_base = xmlMemBlocks();
42659 code = gen_int(n_code, 0);
42661 ret_val = xmlUCSIsMiscellaneousTechnical(code);
42662 desret_int(ret_val);
42664 des_int(n_code, code, 0);
42665 xmlResetLastError();
42666 if (mem_base != xmlMemBlocks()) {
42667 printf("Leak of %d blocks found in xmlUCSIsMiscellaneousTechnical",
42668 xmlMemBlocks() - mem_base);
42670 printf(" %d", n_code);
42682 test_xmlUCSIsMongolian(void) {
42685 #if defined(LIBXML_UNICODE_ENABLED)
42688 int code; /* UCS code point */
42691 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42692 mem_base = xmlMemBlocks();
42693 code = gen_int(n_code, 0);
42695 ret_val = xmlUCSIsMongolian(code);
42696 desret_int(ret_val);
42698 des_int(n_code, code, 0);
42699 xmlResetLastError();
42700 if (mem_base != xmlMemBlocks()) {
42701 printf("Leak of %d blocks found in xmlUCSIsMongolian",
42702 xmlMemBlocks() - mem_base);
42704 printf(" %d", n_code);
42716 test_xmlUCSIsMusicalSymbols(void) {
42719 #if defined(LIBXML_UNICODE_ENABLED)
42722 int code; /* UCS code point */
42725 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42726 mem_base = xmlMemBlocks();
42727 code = gen_int(n_code, 0);
42729 ret_val = xmlUCSIsMusicalSymbols(code);
42730 desret_int(ret_val);
42732 des_int(n_code, code, 0);
42733 xmlResetLastError();
42734 if (mem_base != xmlMemBlocks()) {
42735 printf("Leak of %d blocks found in xmlUCSIsMusicalSymbols",
42736 xmlMemBlocks() - mem_base);
42738 printf(" %d", n_code);
42750 test_xmlUCSIsMyanmar(void) {
42753 #if defined(LIBXML_UNICODE_ENABLED)
42756 int code; /* UCS code point */
42759 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42760 mem_base = xmlMemBlocks();
42761 code = gen_int(n_code, 0);
42763 ret_val = xmlUCSIsMyanmar(code);
42764 desret_int(ret_val);
42766 des_int(n_code, code, 0);
42767 xmlResetLastError();
42768 if (mem_base != xmlMemBlocks()) {
42769 printf("Leak of %d blocks found in xmlUCSIsMyanmar",
42770 xmlMemBlocks() - mem_base);
42772 printf(" %d", n_code);
42784 test_xmlUCSIsNumberForms(void) {
42787 #if defined(LIBXML_UNICODE_ENABLED)
42790 int code; /* UCS code point */
42793 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42794 mem_base = xmlMemBlocks();
42795 code = gen_int(n_code, 0);
42797 ret_val = xmlUCSIsNumberForms(code);
42798 desret_int(ret_val);
42800 des_int(n_code, code, 0);
42801 xmlResetLastError();
42802 if (mem_base != xmlMemBlocks()) {
42803 printf("Leak of %d blocks found in xmlUCSIsNumberForms",
42804 xmlMemBlocks() - mem_base);
42806 printf(" %d", n_code);
42818 test_xmlUCSIsOgham(void) {
42821 #if defined(LIBXML_UNICODE_ENABLED)
42824 int code; /* UCS code point */
42827 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42828 mem_base = xmlMemBlocks();
42829 code = gen_int(n_code, 0);
42831 ret_val = xmlUCSIsOgham(code);
42832 desret_int(ret_val);
42834 des_int(n_code, code, 0);
42835 xmlResetLastError();
42836 if (mem_base != xmlMemBlocks()) {
42837 printf("Leak of %d blocks found in xmlUCSIsOgham",
42838 xmlMemBlocks() - mem_base);
42840 printf(" %d", n_code);
42852 test_xmlUCSIsOldItalic(void) {
42855 #if defined(LIBXML_UNICODE_ENABLED)
42858 int code; /* UCS code point */
42861 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42862 mem_base = xmlMemBlocks();
42863 code = gen_int(n_code, 0);
42865 ret_val = xmlUCSIsOldItalic(code);
42866 desret_int(ret_val);
42868 des_int(n_code, code, 0);
42869 xmlResetLastError();
42870 if (mem_base != xmlMemBlocks()) {
42871 printf("Leak of %d blocks found in xmlUCSIsOldItalic",
42872 xmlMemBlocks() - mem_base);
42874 printf(" %d", n_code);
42886 test_xmlUCSIsOpticalCharacterRecognition(void) {
42889 #if defined(LIBXML_UNICODE_ENABLED)
42892 int code; /* UCS code point */
42895 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42896 mem_base = xmlMemBlocks();
42897 code = gen_int(n_code, 0);
42899 ret_val = xmlUCSIsOpticalCharacterRecognition(code);
42900 desret_int(ret_val);
42902 des_int(n_code, code, 0);
42903 xmlResetLastError();
42904 if (mem_base != xmlMemBlocks()) {
42905 printf("Leak of %d blocks found in xmlUCSIsOpticalCharacterRecognition",
42906 xmlMemBlocks() - mem_base);
42908 printf(" %d", n_code);
42920 test_xmlUCSIsOriya(void) {
42923 #if defined(LIBXML_UNICODE_ENABLED)
42926 int code; /* UCS code point */
42929 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42930 mem_base = xmlMemBlocks();
42931 code = gen_int(n_code, 0);
42933 ret_val = xmlUCSIsOriya(code);
42934 desret_int(ret_val);
42936 des_int(n_code, code, 0);
42937 xmlResetLastError();
42938 if (mem_base != xmlMemBlocks()) {
42939 printf("Leak of %d blocks found in xmlUCSIsOriya",
42940 xmlMemBlocks() - mem_base);
42942 printf(" %d", n_code);
42954 test_xmlUCSIsOsmanya(void) {
42957 #if defined(LIBXML_UNICODE_ENABLED)
42960 int code; /* UCS code point */
42963 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42964 mem_base = xmlMemBlocks();
42965 code = gen_int(n_code, 0);
42967 ret_val = xmlUCSIsOsmanya(code);
42968 desret_int(ret_val);
42970 des_int(n_code, code, 0);
42971 xmlResetLastError();
42972 if (mem_base != xmlMemBlocks()) {
42973 printf("Leak of %d blocks found in xmlUCSIsOsmanya",
42974 xmlMemBlocks() - mem_base);
42976 printf(" %d", n_code);
42988 test_xmlUCSIsPhoneticExtensions(void) {
42991 #if defined(LIBXML_UNICODE_ENABLED)
42994 int code; /* UCS code point */
42997 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42998 mem_base = xmlMemBlocks();
42999 code = gen_int(n_code, 0);
43001 ret_val = xmlUCSIsPhoneticExtensions(code);
43002 desret_int(ret_val);
43004 des_int(n_code, code, 0);
43005 xmlResetLastError();
43006 if (mem_base != xmlMemBlocks()) {
43007 printf("Leak of %d blocks found in xmlUCSIsPhoneticExtensions",
43008 xmlMemBlocks() - mem_base);
43010 printf(" %d", n_code);
43022 test_xmlUCSIsPrivateUse(void) {
43025 #if defined(LIBXML_UNICODE_ENABLED)
43028 int code; /* UCS code point */
43031 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43032 mem_base = xmlMemBlocks();
43033 code = gen_int(n_code, 0);
43035 ret_val = xmlUCSIsPrivateUse(code);
43036 desret_int(ret_val);
43038 des_int(n_code, code, 0);
43039 xmlResetLastError();
43040 if (mem_base != xmlMemBlocks()) {
43041 printf("Leak of %d blocks found in xmlUCSIsPrivateUse",
43042 xmlMemBlocks() - mem_base);
43044 printf(" %d", n_code);
43056 test_xmlUCSIsPrivateUseArea(void) {
43059 #if defined(LIBXML_UNICODE_ENABLED)
43062 int code; /* UCS code point */
43065 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43066 mem_base = xmlMemBlocks();
43067 code = gen_int(n_code, 0);
43069 ret_val = xmlUCSIsPrivateUseArea(code);
43070 desret_int(ret_val);
43072 des_int(n_code, code, 0);
43073 xmlResetLastError();
43074 if (mem_base != xmlMemBlocks()) {
43075 printf("Leak of %d blocks found in xmlUCSIsPrivateUseArea",
43076 xmlMemBlocks() - mem_base);
43078 printf(" %d", n_code);
43090 test_xmlUCSIsRunic(void) {
43093 #if defined(LIBXML_UNICODE_ENABLED)
43096 int code; /* UCS code point */
43099 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43100 mem_base = xmlMemBlocks();
43101 code = gen_int(n_code, 0);
43103 ret_val = xmlUCSIsRunic(code);
43104 desret_int(ret_val);
43106 des_int(n_code, code, 0);
43107 xmlResetLastError();
43108 if (mem_base != xmlMemBlocks()) {
43109 printf("Leak of %d blocks found in xmlUCSIsRunic",
43110 xmlMemBlocks() - mem_base);
43112 printf(" %d", n_code);
43124 test_xmlUCSIsShavian(void) {
43127 #if defined(LIBXML_UNICODE_ENABLED)
43130 int code; /* UCS code point */
43133 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43134 mem_base = xmlMemBlocks();
43135 code = gen_int(n_code, 0);
43137 ret_val = xmlUCSIsShavian(code);
43138 desret_int(ret_val);
43140 des_int(n_code, code, 0);
43141 xmlResetLastError();
43142 if (mem_base != xmlMemBlocks()) {
43143 printf("Leak of %d blocks found in xmlUCSIsShavian",
43144 xmlMemBlocks() - mem_base);
43146 printf(" %d", n_code);
43158 test_xmlUCSIsSinhala(void) {
43161 #if defined(LIBXML_UNICODE_ENABLED)
43164 int code; /* UCS code point */
43167 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43168 mem_base = xmlMemBlocks();
43169 code = gen_int(n_code, 0);
43171 ret_val = xmlUCSIsSinhala(code);
43172 desret_int(ret_val);
43174 des_int(n_code, code, 0);
43175 xmlResetLastError();
43176 if (mem_base != xmlMemBlocks()) {
43177 printf("Leak of %d blocks found in xmlUCSIsSinhala",
43178 xmlMemBlocks() - mem_base);
43180 printf(" %d", n_code);
43192 test_xmlUCSIsSmallFormVariants(void) {
43195 #if defined(LIBXML_UNICODE_ENABLED)
43198 int code; /* UCS code point */
43201 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43202 mem_base = xmlMemBlocks();
43203 code = gen_int(n_code, 0);
43205 ret_val = xmlUCSIsSmallFormVariants(code);
43206 desret_int(ret_val);
43208 des_int(n_code, code, 0);
43209 xmlResetLastError();
43210 if (mem_base != xmlMemBlocks()) {
43211 printf("Leak of %d blocks found in xmlUCSIsSmallFormVariants",
43212 xmlMemBlocks() - mem_base);
43214 printf(" %d", n_code);
43226 test_xmlUCSIsSpacingModifierLetters(void) {
43229 #if defined(LIBXML_UNICODE_ENABLED)
43232 int code; /* UCS code point */
43235 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43236 mem_base = xmlMemBlocks();
43237 code = gen_int(n_code, 0);
43239 ret_val = xmlUCSIsSpacingModifierLetters(code);
43240 desret_int(ret_val);
43242 des_int(n_code, code, 0);
43243 xmlResetLastError();
43244 if (mem_base != xmlMemBlocks()) {
43245 printf("Leak of %d blocks found in xmlUCSIsSpacingModifierLetters",
43246 xmlMemBlocks() - mem_base);
43248 printf(" %d", n_code);
43260 test_xmlUCSIsSpecials(void) {
43263 #if defined(LIBXML_UNICODE_ENABLED)
43266 int code; /* UCS code point */
43269 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43270 mem_base = xmlMemBlocks();
43271 code = gen_int(n_code, 0);
43273 ret_val = xmlUCSIsSpecials(code);
43274 desret_int(ret_val);
43276 des_int(n_code, code, 0);
43277 xmlResetLastError();
43278 if (mem_base != xmlMemBlocks()) {
43279 printf("Leak of %d blocks found in xmlUCSIsSpecials",
43280 xmlMemBlocks() - mem_base);
43282 printf(" %d", n_code);
43294 test_xmlUCSIsSuperscriptsandSubscripts(void) {
43297 #if defined(LIBXML_UNICODE_ENABLED)
43300 int code; /* UCS code point */
43303 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43304 mem_base = xmlMemBlocks();
43305 code = gen_int(n_code, 0);
43307 ret_val = xmlUCSIsSuperscriptsandSubscripts(code);
43308 desret_int(ret_val);
43310 des_int(n_code, code, 0);
43311 xmlResetLastError();
43312 if (mem_base != xmlMemBlocks()) {
43313 printf("Leak of %d blocks found in xmlUCSIsSuperscriptsandSubscripts",
43314 xmlMemBlocks() - mem_base);
43316 printf(" %d", n_code);
43328 test_xmlUCSIsSupplementalArrowsA(void) {
43331 #if defined(LIBXML_UNICODE_ENABLED)
43334 int code; /* UCS code point */
43337 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43338 mem_base = xmlMemBlocks();
43339 code = gen_int(n_code, 0);
43341 ret_val = xmlUCSIsSupplementalArrowsA(code);
43342 desret_int(ret_val);
43344 des_int(n_code, code, 0);
43345 xmlResetLastError();
43346 if (mem_base != xmlMemBlocks()) {
43347 printf("Leak of %d blocks found in xmlUCSIsSupplementalArrowsA",
43348 xmlMemBlocks() - mem_base);
43350 printf(" %d", n_code);
43362 test_xmlUCSIsSupplementalArrowsB(void) {
43365 #if defined(LIBXML_UNICODE_ENABLED)
43368 int code; /* UCS code point */
43371 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43372 mem_base = xmlMemBlocks();
43373 code = gen_int(n_code, 0);
43375 ret_val = xmlUCSIsSupplementalArrowsB(code);
43376 desret_int(ret_val);
43378 des_int(n_code, code, 0);
43379 xmlResetLastError();
43380 if (mem_base != xmlMemBlocks()) {
43381 printf("Leak of %d blocks found in xmlUCSIsSupplementalArrowsB",
43382 xmlMemBlocks() - mem_base);
43384 printf(" %d", n_code);
43396 test_xmlUCSIsSupplementalMathematicalOperators(void) {
43399 #if defined(LIBXML_UNICODE_ENABLED)
43402 int code; /* UCS code point */
43405 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43406 mem_base = xmlMemBlocks();
43407 code = gen_int(n_code, 0);
43409 ret_val = xmlUCSIsSupplementalMathematicalOperators(code);
43410 desret_int(ret_val);
43412 des_int(n_code, code, 0);
43413 xmlResetLastError();
43414 if (mem_base != xmlMemBlocks()) {
43415 printf("Leak of %d blocks found in xmlUCSIsSupplementalMathematicalOperators",
43416 xmlMemBlocks() - mem_base);
43418 printf(" %d", n_code);
43430 test_xmlUCSIsSupplementaryPrivateUseAreaA(void) {
43433 #if defined(LIBXML_UNICODE_ENABLED)
43436 int code; /* UCS code point */
43439 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43440 mem_base = xmlMemBlocks();
43441 code = gen_int(n_code, 0);
43443 ret_val = xmlUCSIsSupplementaryPrivateUseAreaA(code);
43444 desret_int(ret_val);
43446 des_int(n_code, code, 0);
43447 xmlResetLastError();
43448 if (mem_base != xmlMemBlocks()) {
43449 printf("Leak of %d blocks found in xmlUCSIsSupplementaryPrivateUseAreaA",
43450 xmlMemBlocks() - mem_base);
43452 printf(" %d", n_code);
43464 test_xmlUCSIsSupplementaryPrivateUseAreaB(void) {
43467 #if defined(LIBXML_UNICODE_ENABLED)
43470 int code; /* UCS code point */
43473 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43474 mem_base = xmlMemBlocks();
43475 code = gen_int(n_code, 0);
43477 ret_val = xmlUCSIsSupplementaryPrivateUseAreaB(code);
43478 desret_int(ret_val);
43480 des_int(n_code, code, 0);
43481 xmlResetLastError();
43482 if (mem_base != xmlMemBlocks()) {
43483 printf("Leak of %d blocks found in xmlUCSIsSupplementaryPrivateUseAreaB",
43484 xmlMemBlocks() - mem_base);
43486 printf(" %d", n_code);
43498 test_xmlUCSIsSyriac(void) {
43501 #if defined(LIBXML_UNICODE_ENABLED)
43504 int code; /* UCS code point */
43507 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43508 mem_base = xmlMemBlocks();
43509 code = gen_int(n_code, 0);
43511 ret_val = xmlUCSIsSyriac(code);
43512 desret_int(ret_val);
43514 des_int(n_code, code, 0);
43515 xmlResetLastError();
43516 if (mem_base != xmlMemBlocks()) {
43517 printf("Leak of %d blocks found in xmlUCSIsSyriac",
43518 xmlMemBlocks() - mem_base);
43520 printf(" %d", n_code);
43532 test_xmlUCSIsTagalog(void) {
43535 #if defined(LIBXML_UNICODE_ENABLED)
43538 int code; /* UCS code point */
43541 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43542 mem_base = xmlMemBlocks();
43543 code = gen_int(n_code, 0);
43545 ret_val = xmlUCSIsTagalog(code);
43546 desret_int(ret_val);
43548 des_int(n_code, code, 0);
43549 xmlResetLastError();
43550 if (mem_base != xmlMemBlocks()) {
43551 printf("Leak of %d blocks found in xmlUCSIsTagalog",
43552 xmlMemBlocks() - mem_base);
43554 printf(" %d", n_code);
43566 test_xmlUCSIsTagbanwa(void) {
43569 #if defined(LIBXML_UNICODE_ENABLED)
43572 int code; /* UCS code point */
43575 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43576 mem_base = xmlMemBlocks();
43577 code = gen_int(n_code, 0);
43579 ret_val = xmlUCSIsTagbanwa(code);
43580 desret_int(ret_val);
43582 des_int(n_code, code, 0);
43583 xmlResetLastError();
43584 if (mem_base != xmlMemBlocks()) {
43585 printf("Leak of %d blocks found in xmlUCSIsTagbanwa",
43586 xmlMemBlocks() - mem_base);
43588 printf(" %d", n_code);
43600 test_xmlUCSIsTags(void) {
43603 #if defined(LIBXML_UNICODE_ENABLED)
43606 int code; /* UCS code point */
43609 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43610 mem_base = xmlMemBlocks();
43611 code = gen_int(n_code, 0);
43613 ret_val = xmlUCSIsTags(code);
43614 desret_int(ret_val);
43616 des_int(n_code, code, 0);
43617 xmlResetLastError();
43618 if (mem_base != xmlMemBlocks()) {
43619 printf("Leak of %d blocks found in xmlUCSIsTags",
43620 xmlMemBlocks() - mem_base);
43622 printf(" %d", n_code);
43634 test_xmlUCSIsTaiLe(void) {
43637 #if defined(LIBXML_UNICODE_ENABLED)
43640 int code; /* UCS code point */
43643 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43644 mem_base = xmlMemBlocks();
43645 code = gen_int(n_code, 0);
43647 ret_val = xmlUCSIsTaiLe(code);
43648 desret_int(ret_val);
43650 des_int(n_code, code, 0);
43651 xmlResetLastError();
43652 if (mem_base != xmlMemBlocks()) {
43653 printf("Leak of %d blocks found in xmlUCSIsTaiLe",
43654 xmlMemBlocks() - mem_base);
43656 printf(" %d", n_code);
43668 test_xmlUCSIsTaiXuanJingSymbols(void) {
43671 #if defined(LIBXML_UNICODE_ENABLED)
43674 int code; /* UCS code point */
43677 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43678 mem_base = xmlMemBlocks();
43679 code = gen_int(n_code, 0);
43681 ret_val = xmlUCSIsTaiXuanJingSymbols(code);
43682 desret_int(ret_val);
43684 des_int(n_code, code, 0);
43685 xmlResetLastError();
43686 if (mem_base != xmlMemBlocks()) {
43687 printf("Leak of %d blocks found in xmlUCSIsTaiXuanJingSymbols",
43688 xmlMemBlocks() - mem_base);
43690 printf(" %d", n_code);
43702 test_xmlUCSIsTamil(void) {
43705 #if defined(LIBXML_UNICODE_ENABLED)
43708 int code; /* UCS code point */
43711 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43712 mem_base = xmlMemBlocks();
43713 code = gen_int(n_code, 0);
43715 ret_val = xmlUCSIsTamil(code);
43716 desret_int(ret_val);
43718 des_int(n_code, code, 0);
43719 xmlResetLastError();
43720 if (mem_base != xmlMemBlocks()) {
43721 printf("Leak of %d blocks found in xmlUCSIsTamil",
43722 xmlMemBlocks() - mem_base);
43724 printf(" %d", n_code);
43736 test_xmlUCSIsTelugu(void) {
43739 #if defined(LIBXML_UNICODE_ENABLED)
43742 int code; /* UCS code point */
43745 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43746 mem_base = xmlMemBlocks();
43747 code = gen_int(n_code, 0);
43749 ret_val = xmlUCSIsTelugu(code);
43750 desret_int(ret_val);
43752 des_int(n_code, code, 0);
43753 xmlResetLastError();
43754 if (mem_base != xmlMemBlocks()) {
43755 printf("Leak of %d blocks found in xmlUCSIsTelugu",
43756 xmlMemBlocks() - mem_base);
43758 printf(" %d", n_code);
43770 test_xmlUCSIsThaana(void) {
43773 #if defined(LIBXML_UNICODE_ENABLED)
43776 int code; /* UCS code point */
43779 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43780 mem_base = xmlMemBlocks();
43781 code = gen_int(n_code, 0);
43783 ret_val = xmlUCSIsThaana(code);
43784 desret_int(ret_val);
43786 des_int(n_code, code, 0);
43787 xmlResetLastError();
43788 if (mem_base != xmlMemBlocks()) {
43789 printf("Leak of %d blocks found in xmlUCSIsThaana",
43790 xmlMemBlocks() - mem_base);
43792 printf(" %d", n_code);
43804 test_xmlUCSIsThai(void) {
43807 #if defined(LIBXML_UNICODE_ENABLED)
43810 int code; /* UCS code point */
43813 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43814 mem_base = xmlMemBlocks();
43815 code = gen_int(n_code, 0);
43817 ret_val = xmlUCSIsThai(code);
43818 desret_int(ret_val);
43820 des_int(n_code, code, 0);
43821 xmlResetLastError();
43822 if (mem_base != xmlMemBlocks()) {
43823 printf("Leak of %d blocks found in xmlUCSIsThai",
43824 xmlMemBlocks() - mem_base);
43826 printf(" %d", n_code);
43838 test_xmlUCSIsTibetan(void) {
43841 #if defined(LIBXML_UNICODE_ENABLED)
43844 int code; /* UCS code point */
43847 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43848 mem_base = xmlMemBlocks();
43849 code = gen_int(n_code, 0);
43851 ret_val = xmlUCSIsTibetan(code);
43852 desret_int(ret_val);
43854 des_int(n_code, code, 0);
43855 xmlResetLastError();
43856 if (mem_base != xmlMemBlocks()) {
43857 printf("Leak of %d blocks found in xmlUCSIsTibetan",
43858 xmlMemBlocks() - mem_base);
43860 printf(" %d", n_code);
43872 test_xmlUCSIsUgaritic(void) {
43875 #if defined(LIBXML_UNICODE_ENABLED)
43878 int code; /* UCS code point */
43881 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43882 mem_base = xmlMemBlocks();
43883 code = gen_int(n_code, 0);
43885 ret_val = xmlUCSIsUgaritic(code);
43886 desret_int(ret_val);
43888 des_int(n_code, code, 0);
43889 xmlResetLastError();
43890 if (mem_base != xmlMemBlocks()) {
43891 printf("Leak of %d blocks found in xmlUCSIsUgaritic",
43892 xmlMemBlocks() - mem_base);
43894 printf(" %d", n_code);
43906 test_xmlUCSIsUnifiedCanadianAboriginalSyllabics(void) {
43909 #if defined(LIBXML_UNICODE_ENABLED)
43912 int code; /* UCS code point */
43915 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43916 mem_base = xmlMemBlocks();
43917 code = gen_int(n_code, 0);
43919 ret_val = xmlUCSIsUnifiedCanadianAboriginalSyllabics(code);
43920 desret_int(ret_val);
43922 des_int(n_code, code, 0);
43923 xmlResetLastError();
43924 if (mem_base != xmlMemBlocks()) {
43925 printf("Leak of %d blocks found in xmlUCSIsUnifiedCanadianAboriginalSyllabics",
43926 xmlMemBlocks() - mem_base);
43928 printf(" %d", n_code);
43940 test_xmlUCSIsVariationSelectors(void) {
43943 #if defined(LIBXML_UNICODE_ENABLED)
43946 int code; /* UCS code point */
43949 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43950 mem_base = xmlMemBlocks();
43951 code = gen_int(n_code, 0);
43953 ret_val = xmlUCSIsVariationSelectors(code);
43954 desret_int(ret_val);
43956 des_int(n_code, code, 0);
43957 xmlResetLastError();
43958 if (mem_base != xmlMemBlocks()) {
43959 printf("Leak of %d blocks found in xmlUCSIsVariationSelectors",
43960 xmlMemBlocks() - mem_base);
43962 printf(" %d", n_code);
43974 test_xmlUCSIsVariationSelectorsSupplement(void) {
43977 #if defined(LIBXML_UNICODE_ENABLED)
43980 int code; /* UCS code point */
43983 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43984 mem_base = xmlMemBlocks();
43985 code = gen_int(n_code, 0);
43987 ret_val = xmlUCSIsVariationSelectorsSupplement(code);
43988 desret_int(ret_val);
43990 des_int(n_code, code, 0);
43991 xmlResetLastError();
43992 if (mem_base != xmlMemBlocks()) {
43993 printf("Leak of %d blocks found in xmlUCSIsVariationSelectorsSupplement",
43994 xmlMemBlocks() - mem_base);
43996 printf(" %d", n_code);
44008 test_xmlUCSIsYiRadicals(void) {
44011 #if defined(LIBXML_UNICODE_ENABLED)
44014 int code; /* UCS code point */
44017 for (n_code = 0;n_code < gen_nb_int;n_code++) {
44018 mem_base = xmlMemBlocks();
44019 code = gen_int(n_code, 0);
44021 ret_val = xmlUCSIsYiRadicals(code);
44022 desret_int(ret_val);
44024 des_int(n_code, code, 0);
44025 xmlResetLastError();
44026 if (mem_base != xmlMemBlocks()) {
44027 printf("Leak of %d blocks found in xmlUCSIsYiRadicals",
44028 xmlMemBlocks() - mem_base);
44030 printf(" %d", n_code);
44042 test_xmlUCSIsYiSyllables(void) {
44045 #if defined(LIBXML_UNICODE_ENABLED)
44048 int code; /* UCS code point */
44051 for (n_code = 0;n_code < gen_nb_int;n_code++) {
44052 mem_base = xmlMemBlocks();
44053 code = gen_int(n_code, 0);
44055 ret_val = xmlUCSIsYiSyllables(code);
44056 desret_int(ret_val);
44058 des_int(n_code, code, 0);
44059 xmlResetLastError();
44060 if (mem_base != xmlMemBlocks()) {
44061 printf("Leak of %d blocks found in xmlUCSIsYiSyllables",
44062 xmlMemBlocks() - mem_base);
44064 printf(" %d", n_code);
44076 test_xmlUCSIsYijingHexagramSymbols(void) {
44079 #if defined(LIBXML_UNICODE_ENABLED)
44082 int code; /* UCS code point */
44085 for (n_code = 0;n_code < gen_nb_int;n_code++) {
44086 mem_base = xmlMemBlocks();
44087 code = gen_int(n_code, 0);
44089 ret_val = xmlUCSIsYijingHexagramSymbols(code);
44090 desret_int(ret_val);
44092 des_int(n_code, code, 0);
44093 xmlResetLastError();
44094 if (mem_base != xmlMemBlocks()) {
44095 printf("Leak of %d blocks found in xmlUCSIsYijingHexagramSymbols",
44096 xmlMemBlocks() - mem_base);
44098 printf(" %d", n_code);
44109 test_xmlunicode(void) {
44113 if (quiet == 0) printf("Testing xmlunicode : 166 of 166 functions ...\n");
44114 rc = test_xmlUCSIsAegeanNumbers();
44115 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44116 rc = test_xmlUCSIsAlphabeticPresentationForms();
44117 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44118 rc = test_xmlUCSIsArabic();
44119 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44120 rc = test_xmlUCSIsArabicPresentationFormsA();
44121 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44122 rc = test_xmlUCSIsArabicPresentationFormsB();
44123 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44124 rc = test_xmlUCSIsArmenian();
44125 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44126 rc = test_xmlUCSIsArrows();
44127 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44128 rc = test_xmlUCSIsBasicLatin();
44129 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44130 rc = test_xmlUCSIsBengali();
44131 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44132 rc = test_xmlUCSIsBlock();
44133 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44134 rc = test_xmlUCSIsBlockElements();
44135 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44136 rc = test_xmlUCSIsBopomofo();
44137 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44138 rc = test_xmlUCSIsBopomofoExtended();
44139 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44140 rc = test_xmlUCSIsBoxDrawing();
44141 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44142 rc = test_xmlUCSIsBraillePatterns();
44143 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44144 rc = test_xmlUCSIsBuhid();
44145 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44146 rc = test_xmlUCSIsByzantineMusicalSymbols();
44147 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44148 rc = test_xmlUCSIsCJKCompatibility();
44149 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44150 rc = test_xmlUCSIsCJKCompatibilityForms();
44151 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44152 rc = test_xmlUCSIsCJKCompatibilityIdeographs();
44153 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44154 rc = test_xmlUCSIsCJKCompatibilityIdeographsSupplement();
44155 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44156 rc = test_xmlUCSIsCJKRadicalsSupplement();
44157 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44158 rc = test_xmlUCSIsCJKSymbolsandPunctuation();
44159 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44160 rc = test_xmlUCSIsCJKUnifiedIdeographs();
44161 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44162 rc = test_xmlUCSIsCJKUnifiedIdeographsExtensionA();
44163 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44164 rc = test_xmlUCSIsCJKUnifiedIdeographsExtensionB();
44165 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44166 rc = test_xmlUCSIsCat();
44167 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44168 rc = test_xmlUCSIsCatC();
44169 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44170 rc = test_xmlUCSIsCatCc();
44171 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44172 rc = test_xmlUCSIsCatCf();
44173 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44174 rc = test_xmlUCSIsCatCo();
44175 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44176 rc = test_xmlUCSIsCatCs();
44177 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44178 rc = test_xmlUCSIsCatL();
44179 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44180 rc = test_xmlUCSIsCatLl();
44181 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44182 rc = test_xmlUCSIsCatLm();
44183 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44184 rc = test_xmlUCSIsCatLo();
44185 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44186 rc = test_xmlUCSIsCatLt();
44187 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44188 rc = test_xmlUCSIsCatLu();
44189 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44190 rc = test_xmlUCSIsCatM();
44191 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44192 rc = test_xmlUCSIsCatMc();
44193 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44194 rc = test_xmlUCSIsCatMe();
44195 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44196 rc = test_xmlUCSIsCatMn();
44197 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44198 rc = test_xmlUCSIsCatN();
44199 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44200 rc = test_xmlUCSIsCatNd();
44201 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44202 rc = test_xmlUCSIsCatNl();
44203 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44204 rc = test_xmlUCSIsCatNo();
44205 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44206 rc = test_xmlUCSIsCatP();
44207 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44208 rc = test_xmlUCSIsCatPc();
44209 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44210 rc = test_xmlUCSIsCatPd();
44211 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44212 rc = test_xmlUCSIsCatPe();
44213 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44214 rc = test_xmlUCSIsCatPf();
44215 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44216 rc = test_xmlUCSIsCatPi();
44217 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44218 rc = test_xmlUCSIsCatPo();
44219 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44220 rc = test_xmlUCSIsCatPs();
44221 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44222 rc = test_xmlUCSIsCatS();
44223 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44224 rc = test_xmlUCSIsCatSc();
44225 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44226 rc = test_xmlUCSIsCatSk();
44227 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44228 rc = test_xmlUCSIsCatSm();
44229 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44230 rc = test_xmlUCSIsCatSo();
44231 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44232 rc = test_xmlUCSIsCatZ();
44233 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44234 rc = test_xmlUCSIsCatZl();
44235 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44236 rc = test_xmlUCSIsCatZp();
44237 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44238 rc = test_xmlUCSIsCatZs();
44239 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44240 rc = test_xmlUCSIsCherokee();
44241 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44242 rc = test_xmlUCSIsCombiningDiacriticalMarks();
44243 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44244 rc = test_xmlUCSIsCombiningDiacriticalMarksforSymbols();
44245 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44246 rc = test_xmlUCSIsCombiningHalfMarks();
44247 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44248 rc = test_xmlUCSIsCombiningMarksforSymbols();
44249 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44250 rc = test_xmlUCSIsControlPictures();
44251 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44252 rc = test_xmlUCSIsCurrencySymbols();
44253 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44254 rc = test_xmlUCSIsCypriotSyllabary();
44255 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44256 rc = test_xmlUCSIsCyrillic();
44257 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44258 rc = test_xmlUCSIsCyrillicSupplement();
44259 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44260 rc = test_xmlUCSIsDeseret();
44261 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44262 rc = test_xmlUCSIsDevanagari();
44263 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44264 rc = test_xmlUCSIsDingbats();
44265 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44266 rc = test_xmlUCSIsEnclosedAlphanumerics();
44267 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44268 rc = test_xmlUCSIsEnclosedCJKLettersandMonths();
44269 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44270 rc = test_xmlUCSIsEthiopic();
44271 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44272 rc = test_xmlUCSIsGeneralPunctuation();
44273 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44274 rc = test_xmlUCSIsGeometricShapes();
44275 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44276 rc = test_xmlUCSIsGeorgian();
44277 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44278 rc = test_xmlUCSIsGothic();
44279 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44280 rc = test_xmlUCSIsGreek();
44281 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44282 rc = test_xmlUCSIsGreekExtended();
44283 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44284 rc = test_xmlUCSIsGreekandCoptic();
44285 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44286 rc = test_xmlUCSIsGujarati();
44287 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44288 rc = test_xmlUCSIsGurmukhi();
44289 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44290 rc = test_xmlUCSIsHalfwidthandFullwidthForms();
44291 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44292 rc = test_xmlUCSIsHangulCompatibilityJamo();
44293 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44294 rc = test_xmlUCSIsHangulJamo();
44295 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44296 rc = test_xmlUCSIsHangulSyllables();
44297 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44298 rc = test_xmlUCSIsHanunoo();
44299 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44300 rc = test_xmlUCSIsHebrew();
44301 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44302 rc = test_xmlUCSIsHighPrivateUseSurrogates();
44303 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44304 rc = test_xmlUCSIsHighSurrogates();
44305 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44306 rc = test_xmlUCSIsHiragana();
44307 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44308 rc = test_xmlUCSIsIPAExtensions();
44309 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44310 rc = test_xmlUCSIsIdeographicDescriptionCharacters();
44311 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44312 rc = test_xmlUCSIsKanbun();
44313 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44314 rc = test_xmlUCSIsKangxiRadicals();
44315 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44316 rc = test_xmlUCSIsKannada();
44317 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44318 rc = test_xmlUCSIsKatakana();
44319 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44320 rc = test_xmlUCSIsKatakanaPhoneticExtensions();
44321 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44322 rc = test_xmlUCSIsKhmer();
44323 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44324 rc = test_xmlUCSIsKhmerSymbols();
44325 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44326 rc = test_xmlUCSIsLao();
44327 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44328 rc = test_xmlUCSIsLatin1Supplement();
44329 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44330 rc = test_xmlUCSIsLatinExtendedA();
44331 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44332 rc = test_xmlUCSIsLatinExtendedAdditional();
44333 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44334 rc = test_xmlUCSIsLatinExtendedB();
44335 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44336 rc = test_xmlUCSIsLetterlikeSymbols();
44337 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44338 rc = test_xmlUCSIsLimbu();
44339 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44340 rc = test_xmlUCSIsLinearBIdeograms();
44341 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44342 rc = test_xmlUCSIsLinearBSyllabary();
44343 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44344 rc = test_xmlUCSIsLowSurrogates();
44345 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44346 rc = test_xmlUCSIsMalayalam();
44347 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44348 rc = test_xmlUCSIsMathematicalAlphanumericSymbols();
44349 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44350 rc = test_xmlUCSIsMathematicalOperators();
44351 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44352 rc = test_xmlUCSIsMiscellaneousMathematicalSymbolsA();
44353 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44354 rc = test_xmlUCSIsMiscellaneousMathematicalSymbolsB();
44355 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44356 rc = test_xmlUCSIsMiscellaneousSymbols();
44357 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44358 rc = test_xmlUCSIsMiscellaneousSymbolsandArrows();
44359 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44360 rc = test_xmlUCSIsMiscellaneousTechnical();
44361 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44362 rc = test_xmlUCSIsMongolian();
44363 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44364 rc = test_xmlUCSIsMusicalSymbols();
44365 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44366 rc = test_xmlUCSIsMyanmar();
44367 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44368 rc = test_xmlUCSIsNumberForms();
44369 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44370 rc = test_xmlUCSIsOgham();
44371 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44372 rc = test_xmlUCSIsOldItalic();
44373 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44374 rc = test_xmlUCSIsOpticalCharacterRecognition();
44375 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44376 rc = test_xmlUCSIsOriya();
44377 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44378 rc = test_xmlUCSIsOsmanya();
44379 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44380 rc = test_xmlUCSIsPhoneticExtensions();
44381 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44382 rc = test_xmlUCSIsPrivateUse();
44383 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44384 rc = test_xmlUCSIsPrivateUseArea();
44385 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44386 rc = test_xmlUCSIsRunic();
44387 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44388 rc = test_xmlUCSIsShavian();
44389 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44390 rc = test_xmlUCSIsSinhala();
44391 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44392 rc = test_xmlUCSIsSmallFormVariants();
44393 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44394 rc = test_xmlUCSIsSpacingModifierLetters();
44395 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44396 rc = test_xmlUCSIsSpecials();
44397 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44398 rc = test_xmlUCSIsSuperscriptsandSubscripts();
44399 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44400 rc = test_xmlUCSIsSupplementalArrowsA();
44401 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44402 rc = test_xmlUCSIsSupplementalArrowsB();
44403 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44404 rc = test_xmlUCSIsSupplementalMathematicalOperators();
44405 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44406 rc = test_xmlUCSIsSupplementaryPrivateUseAreaA();
44407 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44408 rc = test_xmlUCSIsSupplementaryPrivateUseAreaB();
44409 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44410 rc = test_xmlUCSIsSyriac();
44411 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44412 rc = test_xmlUCSIsTagalog();
44413 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44414 rc = test_xmlUCSIsTagbanwa();
44415 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44416 rc = test_xmlUCSIsTags();
44417 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44418 rc = test_xmlUCSIsTaiLe();
44419 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44420 rc = test_xmlUCSIsTaiXuanJingSymbols();
44421 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44422 rc = test_xmlUCSIsTamil();
44423 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44424 rc = test_xmlUCSIsTelugu();
44425 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44426 rc = test_xmlUCSIsThaana();
44427 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44428 rc = test_xmlUCSIsThai();
44429 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44430 rc = test_xmlUCSIsTibetan();
44431 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44432 rc = test_xmlUCSIsUgaritic();
44433 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44434 rc = test_xmlUCSIsUnifiedCanadianAboriginalSyllabics();
44435 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44436 rc = test_xmlUCSIsVariationSelectors();
44437 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44438 rc = test_xmlUCSIsVariationSelectorsSupplement();
44439 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44440 rc = test_xmlUCSIsYiRadicals();
44441 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44442 rc = test_xmlUCSIsYiSyllables();
44443 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44444 rc = test_xmlUCSIsYijingHexagramSymbols();
44445 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44448 printf("Module xmlunicode: %d errors\n", test_ret);
44453 test_xmlNewTextWriter(void) {
44456 #if defined(LIBXML_WRITER_ENABLED)
44458 xmlTextWriterPtr ret_val;
44459 xmlOutputBufferPtr out; /* an xmlOutputBufferPtr */
44462 for (n_out = 0;n_out < gen_nb_xmlOutputBufferPtr;n_out++) {
44463 mem_base = xmlMemBlocks();
44464 out = gen_xmlOutputBufferPtr(n_out, 0);
44466 ret_val = xmlNewTextWriter(out);
44467 if (ret_val != NULL) out = NULL;
44468 desret_xmlTextWriterPtr(ret_val);
44470 des_xmlOutputBufferPtr(n_out, out, 0);
44471 xmlResetLastError();
44472 if (mem_base != xmlMemBlocks()) {
44473 printf("Leak of %d blocks found in xmlNewTextWriter",
44474 xmlMemBlocks() - mem_base);
44476 printf(" %d", n_out);
44488 test_xmlNewTextWriterFilename(void) {
44491 #if defined(LIBXML_WRITER_ENABLED)
44493 xmlTextWriterPtr ret_val;
44494 const char * uri; /* the URI of the resource for the output */
44496 int compression; /* compress the output? */
44499 for (n_uri = 0;n_uri < gen_nb_fileoutput;n_uri++) {
44500 for (n_compression = 0;n_compression < gen_nb_int;n_compression++) {
44501 mem_base = xmlMemBlocks();
44502 uri = gen_fileoutput(n_uri, 0);
44503 compression = gen_int(n_compression, 1);
44505 ret_val = xmlNewTextWriterFilename(uri, compression);
44506 desret_xmlTextWriterPtr(ret_val);
44508 des_fileoutput(n_uri, uri, 0);
44509 des_int(n_compression, compression, 1);
44510 xmlResetLastError();
44511 if (mem_base != xmlMemBlocks()) {
44512 printf("Leak of %d blocks found in xmlNewTextWriterFilename",
44513 xmlMemBlocks() - mem_base);
44515 printf(" %d", n_uri);
44516 printf(" %d", n_compression);
44529 test_xmlNewTextWriterMemory(void) {
44532 #if defined(LIBXML_WRITER_ENABLED)
44534 xmlTextWriterPtr ret_val;
44535 xmlBufferPtr buf; /* xmlBufferPtr */
44537 int compression; /* compress the output? */
44540 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
44541 for (n_compression = 0;n_compression < gen_nb_int;n_compression++) {
44542 mem_base = xmlMemBlocks();
44543 buf = gen_xmlBufferPtr(n_buf, 0);
44544 compression = gen_int(n_compression, 1);
44546 ret_val = xmlNewTextWriterMemory(buf, compression);
44547 desret_xmlTextWriterPtr(ret_val);
44549 des_xmlBufferPtr(n_buf, buf, 0);
44550 des_int(n_compression, compression, 1);
44551 xmlResetLastError();
44552 if (mem_base != xmlMemBlocks()) {
44553 printf("Leak of %d blocks found in xmlNewTextWriterMemory",
44554 xmlMemBlocks() - mem_base);
44556 printf(" %d", n_buf);
44557 printf(" %d", n_compression);
44570 test_xmlNewTextWriterPushParser(void) {
44573 #if defined(LIBXML_WRITER_ENABLED)
44575 xmlTextWriterPtr ret_val;
44576 xmlParserCtxtPtr ctxt; /* xmlParserCtxtPtr to hold the new XML document tree */
44578 int compression; /* compress the output? */
44581 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
44582 for (n_compression = 0;n_compression < gen_nb_int;n_compression++) {
44583 mem_base = xmlMemBlocks();
44584 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
44585 compression = gen_int(n_compression, 1);
44587 ret_val = xmlNewTextWriterPushParser(ctxt, compression);
44588 if (ctxt != NULL) {xmlFreeDoc(ctxt->myDoc); ctxt->myDoc = NULL;} if (ret_val != NULL) ctxt = NULL;
44589 desret_xmlTextWriterPtr(ret_val);
44591 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
44592 des_int(n_compression, compression, 1);
44593 xmlResetLastError();
44594 if (mem_base != xmlMemBlocks()) {
44595 printf("Leak of %d blocks found in xmlNewTextWriterPushParser",
44596 xmlMemBlocks() - mem_base);
44598 printf(" %d", n_ctxt);
44599 printf(" %d", n_compression);
44612 test_xmlNewTextWriterTree(void) {
44615 #if defined(LIBXML_WRITER_ENABLED)
44617 xmlTextWriterPtr ret_val;
44618 xmlDocPtr doc; /* xmlDocPtr */
44620 xmlNodePtr node; /* xmlNodePtr or NULL for doc->children */
44622 int compression; /* compress the output? */
44625 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
44626 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
44627 for (n_compression = 0;n_compression < gen_nb_int;n_compression++) {
44628 mem_base = xmlMemBlocks();
44629 doc = gen_xmlDocPtr(n_doc, 0);
44630 node = gen_xmlNodePtr(n_node, 1);
44631 compression = gen_int(n_compression, 2);
44633 ret_val = xmlNewTextWriterTree(doc, node, compression);
44634 desret_xmlTextWriterPtr(ret_val);
44636 des_xmlDocPtr(n_doc, doc, 0);
44637 des_xmlNodePtr(n_node, node, 1);
44638 des_int(n_compression, compression, 2);
44639 xmlResetLastError();
44640 if (mem_base != xmlMemBlocks()) {
44641 printf("Leak of %d blocks found in xmlNewTextWriterTree",
44642 xmlMemBlocks() - mem_base);
44644 printf(" %d", n_doc);
44645 printf(" %d", n_node);
44646 printf(" %d", n_compression);
44660 test_xmlTextWriterEndAttribute(void) {
44663 #if defined(LIBXML_WRITER_ENABLED)
44666 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
44669 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
44670 mem_base = xmlMemBlocks();
44671 writer = gen_xmlTextWriterPtr(n_writer, 0);
44673 ret_val = xmlTextWriterEndAttribute(writer);
44674 desret_int(ret_val);
44676 des_xmlTextWriterPtr(n_writer, writer, 0);
44677 xmlResetLastError();
44678 if (mem_base != xmlMemBlocks()) {
44679 printf("Leak of %d blocks found in xmlTextWriterEndAttribute",
44680 xmlMemBlocks() - mem_base);
44682 printf(" %d", n_writer);
44694 test_xmlTextWriterEndCDATA(void) {
44697 #if defined(LIBXML_WRITER_ENABLED)
44700 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
44703 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
44704 mem_base = xmlMemBlocks();
44705 writer = gen_xmlTextWriterPtr(n_writer, 0);
44707 ret_val = xmlTextWriterEndCDATA(writer);
44708 desret_int(ret_val);
44710 des_xmlTextWriterPtr(n_writer, writer, 0);
44711 xmlResetLastError();
44712 if (mem_base != xmlMemBlocks()) {
44713 printf("Leak of %d blocks found in xmlTextWriterEndCDATA",
44714 xmlMemBlocks() - mem_base);
44716 printf(" %d", n_writer);
44728 test_xmlTextWriterEndComment(void) {
44731 #if defined(LIBXML_WRITER_ENABLED)
44734 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
44737 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
44738 mem_base = xmlMemBlocks();
44739 writer = gen_xmlTextWriterPtr(n_writer, 0);
44741 ret_val = xmlTextWriterEndComment(writer);
44742 desret_int(ret_val);
44744 des_xmlTextWriterPtr(n_writer, writer, 0);
44745 xmlResetLastError();
44746 if (mem_base != xmlMemBlocks()) {
44747 printf("Leak of %d blocks found in xmlTextWriterEndComment",
44748 xmlMemBlocks() - mem_base);
44750 printf(" %d", n_writer);
44762 test_xmlTextWriterEndDTD(void) {
44765 #if defined(LIBXML_WRITER_ENABLED)
44768 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
44771 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
44772 mem_base = xmlMemBlocks();
44773 writer = gen_xmlTextWriterPtr(n_writer, 0);
44775 ret_val = xmlTextWriterEndDTD(writer);
44776 desret_int(ret_val);
44778 des_xmlTextWriterPtr(n_writer, writer, 0);
44779 xmlResetLastError();
44780 if (mem_base != xmlMemBlocks()) {
44781 printf("Leak of %d blocks found in xmlTextWriterEndDTD",
44782 xmlMemBlocks() - mem_base);
44784 printf(" %d", n_writer);
44796 test_xmlTextWriterEndDTDAttlist(void) {
44799 #if defined(LIBXML_WRITER_ENABLED)
44802 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
44805 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
44806 mem_base = xmlMemBlocks();
44807 writer = gen_xmlTextWriterPtr(n_writer, 0);
44809 ret_val = xmlTextWriterEndDTDAttlist(writer);
44810 desret_int(ret_val);
44812 des_xmlTextWriterPtr(n_writer, writer, 0);
44813 xmlResetLastError();
44814 if (mem_base != xmlMemBlocks()) {
44815 printf("Leak of %d blocks found in xmlTextWriterEndDTDAttlist",
44816 xmlMemBlocks() - mem_base);
44818 printf(" %d", n_writer);
44830 test_xmlTextWriterEndDTDElement(void) {
44833 #if defined(LIBXML_WRITER_ENABLED)
44836 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
44839 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
44840 mem_base = xmlMemBlocks();
44841 writer = gen_xmlTextWriterPtr(n_writer, 0);
44843 ret_val = xmlTextWriterEndDTDElement(writer);
44844 desret_int(ret_val);
44846 des_xmlTextWriterPtr(n_writer, writer, 0);
44847 xmlResetLastError();
44848 if (mem_base != xmlMemBlocks()) {
44849 printf("Leak of %d blocks found in xmlTextWriterEndDTDElement",
44850 xmlMemBlocks() - mem_base);
44852 printf(" %d", n_writer);
44864 test_xmlTextWriterEndDTDEntity(void) {
44867 #if defined(LIBXML_WRITER_ENABLED)
44870 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
44873 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
44874 mem_base = xmlMemBlocks();
44875 writer = gen_xmlTextWriterPtr(n_writer, 0);
44877 ret_val = xmlTextWriterEndDTDEntity(writer);
44878 desret_int(ret_val);
44880 des_xmlTextWriterPtr(n_writer, writer, 0);
44881 xmlResetLastError();
44882 if (mem_base != xmlMemBlocks()) {
44883 printf("Leak of %d blocks found in xmlTextWriterEndDTDEntity",
44884 xmlMemBlocks() - mem_base);
44886 printf(" %d", n_writer);
44898 test_xmlTextWriterEndDocument(void) {
44901 #if defined(LIBXML_WRITER_ENABLED)
44904 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
44907 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
44908 mem_base = xmlMemBlocks();
44909 writer = gen_xmlTextWriterPtr(n_writer, 0);
44911 ret_val = xmlTextWriterEndDocument(writer);
44912 desret_int(ret_val);
44914 des_xmlTextWriterPtr(n_writer, writer, 0);
44915 xmlResetLastError();
44916 if (mem_base != xmlMemBlocks()) {
44917 printf("Leak of %d blocks found in xmlTextWriterEndDocument",
44918 xmlMemBlocks() - mem_base);
44920 printf(" %d", n_writer);
44932 test_xmlTextWriterEndElement(void) {
44935 #if defined(LIBXML_WRITER_ENABLED)
44938 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
44941 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
44942 mem_base = xmlMemBlocks();
44943 writer = gen_xmlTextWriterPtr(n_writer, 0);
44945 ret_val = xmlTextWriterEndElement(writer);
44946 desret_int(ret_val);
44948 des_xmlTextWriterPtr(n_writer, writer, 0);
44949 xmlResetLastError();
44950 if (mem_base != xmlMemBlocks()) {
44951 printf("Leak of %d blocks found in xmlTextWriterEndElement",
44952 xmlMemBlocks() - mem_base);
44954 printf(" %d", n_writer);
44966 test_xmlTextWriterEndPI(void) {
44969 #if defined(LIBXML_WRITER_ENABLED)
44972 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
44975 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
44976 mem_base = xmlMemBlocks();
44977 writer = gen_xmlTextWriterPtr(n_writer, 0);
44979 ret_val = xmlTextWriterEndPI(writer);
44980 desret_int(ret_val);
44982 des_xmlTextWriterPtr(n_writer, writer, 0);
44983 xmlResetLastError();
44984 if (mem_base != xmlMemBlocks()) {
44985 printf("Leak of %d blocks found in xmlTextWriterEndPI",
44986 xmlMemBlocks() - mem_base);
44988 printf(" %d", n_writer);
45000 test_xmlTextWriterFlush(void) {
45003 #if defined(LIBXML_WRITER_ENABLED)
45006 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
45009 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
45010 mem_base = xmlMemBlocks();
45011 writer = gen_xmlTextWriterPtr(n_writer, 0);
45013 ret_val = xmlTextWriterFlush(writer);
45014 desret_int(ret_val);
45016 des_xmlTextWriterPtr(n_writer, writer, 0);
45017 xmlResetLastError();
45018 if (mem_base != xmlMemBlocks()) {
45019 printf("Leak of %d blocks found in xmlTextWriterFlush",
45020 xmlMemBlocks() - mem_base);
45022 printf(" %d", n_writer);
45034 test_xmlTextWriterFullEndElement(void) {
45037 #if defined(LIBXML_WRITER_ENABLED)
45040 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
45043 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
45044 mem_base = xmlMemBlocks();
45045 writer = gen_xmlTextWriterPtr(n_writer, 0);
45047 ret_val = xmlTextWriterFullEndElement(writer);
45048 desret_int(ret_val);
45050 des_xmlTextWriterPtr(n_writer, writer, 0);
45051 xmlResetLastError();
45052 if (mem_base != xmlMemBlocks()) {
45053 printf("Leak of %d blocks found in xmlTextWriterFullEndElement",
45054 xmlMemBlocks() - mem_base);
45056 printf(" %d", n_writer);
45068 test_xmlTextWriterSetIndent(void) {
45071 #if defined(LIBXML_WRITER_ENABLED)
45074 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
45076 int indent; /* do indentation? */
45079 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
45080 for (n_indent = 0;n_indent < gen_nb_int;n_indent++) {
45081 mem_base = xmlMemBlocks();
45082 writer = gen_xmlTextWriterPtr(n_writer, 0);
45083 indent = gen_int(n_indent, 1);
45085 ret_val = xmlTextWriterSetIndent(writer, indent);
45086 desret_int(ret_val);
45088 des_xmlTextWriterPtr(n_writer, writer, 0);
45089 des_int(n_indent, indent, 1);
45090 xmlResetLastError();
45091 if (mem_base != xmlMemBlocks()) {
45092 printf("Leak of %d blocks found in xmlTextWriterSetIndent",
45093 xmlMemBlocks() - mem_base);
45095 printf(" %d", n_writer);
45096 printf(" %d", n_indent);
45109 test_xmlTextWriterSetIndentString(void) {
45112 #if defined(LIBXML_WRITER_ENABLED)
45115 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
45117 xmlChar * str; /* the xmlChar string */
45120 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
45121 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
45122 mem_base = xmlMemBlocks();
45123 writer = gen_xmlTextWriterPtr(n_writer, 0);
45124 str = gen_const_xmlChar_ptr(n_str, 1);
45126 ret_val = xmlTextWriterSetIndentString(writer, (const xmlChar *)str);
45127 desret_int(ret_val);
45129 des_xmlTextWriterPtr(n_writer, writer, 0);
45130 des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 1);
45131 xmlResetLastError();
45132 if (mem_base != xmlMemBlocks()) {
45133 printf("Leak of %d blocks found in xmlTextWriterSetIndentString",
45134 xmlMemBlocks() - mem_base);
45136 printf(" %d", n_writer);
45137 printf(" %d", n_str);
45150 test_xmlTextWriterSetQuoteChar(void) {
45153 #if defined(LIBXML_WRITER_ENABLED)
45156 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
45158 xmlChar quotechar; /* the quote character */
45161 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
45162 for (n_quotechar = 0;n_quotechar < gen_nb_xmlChar;n_quotechar++) {
45163 mem_base = xmlMemBlocks();
45164 writer = gen_xmlTextWriterPtr(n_writer, 0);
45165 quotechar = gen_xmlChar(n_quotechar, 1);
45167 ret_val = xmlTextWriterSetQuoteChar(writer, quotechar);
45168 desret_int(ret_val);
45170 des_xmlTextWriterPtr(n_writer, writer, 0);
45171 des_xmlChar(n_quotechar, quotechar, 1);
45172 xmlResetLastError();
45173 if (mem_base != xmlMemBlocks()) {
45174 printf("Leak of %d blocks found in xmlTextWriterSetQuoteChar",
45175 xmlMemBlocks() - mem_base);
45177 printf(" %d", n_writer);
45178 printf(" %d", n_quotechar);
45191 test_xmlTextWriterStartAttribute(void) {
45194 #if defined(LIBXML_WRITER_ENABLED)
45197 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
45199 xmlChar * name; /* element name */
45202 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
45203 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
45204 mem_base = xmlMemBlocks();
45205 writer = gen_xmlTextWriterPtr(n_writer, 0);
45206 name = gen_const_xmlChar_ptr(n_name, 1);
45208 ret_val = xmlTextWriterStartAttribute(writer, (const xmlChar *)name);
45209 desret_int(ret_val);
45211 des_xmlTextWriterPtr(n_writer, writer, 0);
45212 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
45213 xmlResetLastError();
45214 if (mem_base != xmlMemBlocks()) {
45215 printf("Leak of %d blocks found in xmlTextWriterStartAttribute",
45216 xmlMemBlocks() - mem_base);
45218 printf(" %d", n_writer);
45219 printf(" %d", n_name);
45232 test_xmlTextWriterStartAttributeNS(void) {
45235 #if defined(LIBXML_WRITER_ENABLED)
45238 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
45240 xmlChar * prefix; /* namespace prefix or NULL */
45242 xmlChar * name; /* element local name */
45244 xmlChar * namespaceURI; /* namespace URI or NULL */
45245 int n_namespaceURI;
45247 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
45248 for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
45249 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
45250 for (n_namespaceURI = 0;n_namespaceURI < gen_nb_const_xmlChar_ptr;n_namespaceURI++) {
45251 mem_base = xmlMemBlocks();
45252 writer = gen_xmlTextWriterPtr(n_writer, 0);
45253 prefix = gen_const_xmlChar_ptr(n_prefix, 1);
45254 name = gen_const_xmlChar_ptr(n_name, 2);
45255 namespaceURI = gen_const_xmlChar_ptr(n_namespaceURI, 3);
45257 ret_val = xmlTextWriterStartAttributeNS(writer, (const xmlChar *)prefix, (const xmlChar *)name, (const xmlChar *)namespaceURI);
45258 desret_int(ret_val);
45260 des_xmlTextWriterPtr(n_writer, writer, 0);
45261 des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 1);
45262 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
45263 des_const_xmlChar_ptr(n_namespaceURI, (const xmlChar *)namespaceURI, 3);
45264 xmlResetLastError();
45265 if (mem_base != xmlMemBlocks()) {
45266 printf("Leak of %d blocks found in xmlTextWriterStartAttributeNS",
45267 xmlMemBlocks() - mem_base);
45269 printf(" %d", n_writer);
45270 printf(" %d", n_prefix);
45271 printf(" %d", n_name);
45272 printf(" %d", n_namespaceURI);
45287 test_xmlTextWriterStartCDATA(void) {
45290 #if defined(LIBXML_WRITER_ENABLED)
45293 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
45296 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
45297 mem_base = xmlMemBlocks();
45298 writer = gen_xmlTextWriterPtr(n_writer, 0);
45300 ret_val = xmlTextWriterStartCDATA(writer);
45301 desret_int(ret_val);
45303 des_xmlTextWriterPtr(n_writer, writer, 0);
45304 xmlResetLastError();
45305 if (mem_base != xmlMemBlocks()) {
45306 printf("Leak of %d blocks found in xmlTextWriterStartCDATA",
45307 xmlMemBlocks() - mem_base);
45309 printf(" %d", n_writer);
45321 test_xmlTextWriterStartComment(void) {
45324 #if defined(LIBXML_WRITER_ENABLED)
45327 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
45330 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
45331 mem_base = xmlMemBlocks();
45332 writer = gen_xmlTextWriterPtr(n_writer, 0);
45334 ret_val = xmlTextWriterStartComment(writer);
45335 desret_int(ret_val);
45337 des_xmlTextWriterPtr(n_writer, writer, 0);
45338 xmlResetLastError();
45339 if (mem_base != xmlMemBlocks()) {
45340 printf("Leak of %d blocks found in xmlTextWriterStartComment",
45341 xmlMemBlocks() - mem_base);
45343 printf(" %d", n_writer);
45355 test_xmlTextWriterStartDTD(void) {
45358 #if defined(LIBXML_WRITER_ENABLED)
45361 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
45363 xmlChar * name; /* the name of the DTD */
45365 xmlChar * pubid; /* the public identifier, which is an alternative to the system identifier */
45367 xmlChar * sysid; /* the system identifier, which is the URI of the DTD */
45370 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
45371 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
45372 for (n_pubid = 0;n_pubid < gen_nb_const_xmlChar_ptr;n_pubid++) {
45373 for (n_sysid = 0;n_sysid < gen_nb_const_xmlChar_ptr;n_sysid++) {
45374 mem_base = xmlMemBlocks();
45375 writer = gen_xmlTextWriterPtr(n_writer, 0);
45376 name = gen_const_xmlChar_ptr(n_name, 1);
45377 pubid = gen_const_xmlChar_ptr(n_pubid, 2);
45378 sysid = gen_const_xmlChar_ptr(n_sysid, 3);
45380 ret_val = xmlTextWriterStartDTD(writer, (const xmlChar *)name, (const xmlChar *)pubid, (const xmlChar *)sysid);
45381 desret_int(ret_val);
45383 des_xmlTextWriterPtr(n_writer, writer, 0);
45384 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
45385 des_const_xmlChar_ptr(n_pubid, (const xmlChar *)pubid, 2);
45386 des_const_xmlChar_ptr(n_sysid, (const xmlChar *)sysid, 3);
45387 xmlResetLastError();
45388 if (mem_base != xmlMemBlocks()) {
45389 printf("Leak of %d blocks found in xmlTextWriterStartDTD",
45390 xmlMemBlocks() - mem_base);
45392 printf(" %d", n_writer);
45393 printf(" %d", n_name);
45394 printf(" %d", n_pubid);
45395 printf(" %d", n_sysid);
45410 test_xmlTextWriterStartDTDAttlist(void) {
45413 #if defined(LIBXML_WRITER_ENABLED)
45416 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
45418 xmlChar * name; /* the name of the DTD ATTLIST */
45421 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
45422 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
45423 mem_base = xmlMemBlocks();
45424 writer = gen_xmlTextWriterPtr(n_writer, 0);
45425 name = gen_const_xmlChar_ptr(n_name, 1);
45427 ret_val = xmlTextWriterStartDTDAttlist(writer, (const xmlChar *)name);
45428 desret_int(ret_val);
45430 des_xmlTextWriterPtr(n_writer, writer, 0);
45431 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
45432 xmlResetLastError();
45433 if (mem_base != xmlMemBlocks()) {
45434 printf("Leak of %d blocks found in xmlTextWriterStartDTDAttlist",
45435 xmlMemBlocks() - mem_base);
45437 printf(" %d", n_writer);
45438 printf(" %d", n_name);
45451 test_xmlTextWriterStartDTDElement(void) {
45454 #if defined(LIBXML_WRITER_ENABLED)
45457 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
45459 xmlChar * name; /* the name of the DTD element */
45462 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
45463 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
45464 mem_base = xmlMemBlocks();
45465 writer = gen_xmlTextWriterPtr(n_writer, 0);
45466 name = gen_const_xmlChar_ptr(n_name, 1);
45468 ret_val = xmlTextWriterStartDTDElement(writer, (const xmlChar *)name);
45469 desret_int(ret_val);
45471 des_xmlTextWriterPtr(n_writer, writer, 0);
45472 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
45473 xmlResetLastError();
45474 if (mem_base != xmlMemBlocks()) {
45475 printf("Leak of %d blocks found in xmlTextWriterStartDTDElement",
45476 xmlMemBlocks() - mem_base);
45478 printf(" %d", n_writer);
45479 printf(" %d", n_name);
45492 test_xmlTextWriterStartDTDEntity(void) {
45495 #if defined(LIBXML_WRITER_ENABLED)
45498 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
45500 int pe; /* TRUE if this is a parameter entity, FALSE if not */
45502 xmlChar * name; /* the name of the DTD ATTLIST */
45505 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
45506 for (n_pe = 0;n_pe < gen_nb_int;n_pe++) {
45507 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
45508 mem_base = xmlMemBlocks();
45509 writer = gen_xmlTextWriterPtr(n_writer, 0);
45510 pe = gen_int(n_pe, 1);
45511 name = gen_const_xmlChar_ptr(n_name, 2);
45513 ret_val = xmlTextWriterStartDTDEntity(writer, pe, (const xmlChar *)name);
45514 desret_int(ret_val);
45516 des_xmlTextWriterPtr(n_writer, writer, 0);
45517 des_int(n_pe, pe, 1);
45518 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
45519 xmlResetLastError();
45520 if (mem_base != xmlMemBlocks()) {
45521 printf("Leak of %d blocks found in xmlTextWriterStartDTDEntity",
45522 xmlMemBlocks() - mem_base);
45524 printf(" %d", n_writer);
45525 printf(" %d", n_pe);
45526 printf(" %d", n_name);
45540 test_xmlTextWriterStartDocument(void) {
45543 #if defined(LIBXML_WRITER_ENABLED)
45546 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
45548 char * version; /* the xml version ("1.0") or NULL for default ("1.0") */
45550 char * encoding; /* the encoding or NULL for default */
45552 char * standalone; /* "yes" or "no" or NULL for default */
45555 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
45556 for (n_version = 0;n_version < gen_nb_const_char_ptr;n_version++) {
45557 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
45558 for (n_standalone = 0;n_standalone < gen_nb_const_char_ptr;n_standalone++) {
45559 mem_base = xmlMemBlocks();
45560 writer = gen_xmlTextWriterPtr(n_writer, 0);
45561 version = gen_const_char_ptr(n_version, 1);
45562 encoding = gen_const_char_ptr(n_encoding, 2);
45563 standalone = gen_const_char_ptr(n_standalone, 3);
45565 ret_val = xmlTextWriterStartDocument(writer, (const char *)version, (const char *)encoding, (const char *)standalone);
45566 desret_int(ret_val);
45568 des_xmlTextWriterPtr(n_writer, writer, 0);
45569 des_const_char_ptr(n_version, (const char *)version, 1);
45570 des_const_char_ptr(n_encoding, (const char *)encoding, 2);
45571 des_const_char_ptr(n_standalone, (const char *)standalone, 3);
45572 xmlResetLastError();
45573 if (mem_base != xmlMemBlocks()) {
45574 printf("Leak of %d blocks found in xmlTextWriterStartDocument",
45575 xmlMemBlocks() - mem_base);
45577 printf(" %d", n_writer);
45578 printf(" %d", n_version);
45579 printf(" %d", n_encoding);
45580 printf(" %d", n_standalone);
45595 test_xmlTextWriterStartElement(void) {
45598 #if defined(LIBXML_WRITER_ENABLED)
45601 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
45603 xmlChar * name; /* element name */
45606 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
45607 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
45608 mem_base = xmlMemBlocks();
45609 writer = gen_xmlTextWriterPtr(n_writer, 0);
45610 name = gen_const_xmlChar_ptr(n_name, 1);
45612 ret_val = xmlTextWriterStartElement(writer, (const xmlChar *)name);
45613 desret_int(ret_val);
45615 des_xmlTextWriterPtr(n_writer, writer, 0);
45616 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
45617 xmlResetLastError();
45618 if (mem_base != xmlMemBlocks()) {
45619 printf("Leak of %d blocks found in xmlTextWriterStartElement",
45620 xmlMemBlocks() - mem_base);
45622 printf(" %d", n_writer);
45623 printf(" %d", n_name);
45636 test_xmlTextWriterStartElementNS(void) {
45639 #if defined(LIBXML_WRITER_ENABLED)
45642 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
45644 xmlChar * prefix; /* namespace prefix or NULL */
45646 xmlChar * name; /* element local name */
45648 xmlChar * namespaceURI; /* namespace URI or NULL */
45649 int n_namespaceURI;
45651 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
45652 for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
45653 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
45654 for (n_namespaceURI = 0;n_namespaceURI < gen_nb_const_xmlChar_ptr;n_namespaceURI++) {
45655 mem_base = xmlMemBlocks();
45656 writer = gen_xmlTextWriterPtr(n_writer, 0);
45657 prefix = gen_const_xmlChar_ptr(n_prefix, 1);
45658 name = gen_const_xmlChar_ptr(n_name, 2);
45659 namespaceURI = gen_const_xmlChar_ptr(n_namespaceURI, 3);
45661 ret_val = xmlTextWriterStartElementNS(writer, (const xmlChar *)prefix, (const xmlChar *)name, (const xmlChar *)namespaceURI);
45662 desret_int(ret_val);
45664 des_xmlTextWriterPtr(n_writer, writer, 0);
45665 des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 1);
45666 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
45667 des_const_xmlChar_ptr(n_namespaceURI, (const xmlChar *)namespaceURI, 3);
45668 xmlResetLastError();
45669 if (mem_base != xmlMemBlocks()) {
45670 printf("Leak of %d blocks found in xmlTextWriterStartElementNS",
45671 xmlMemBlocks() - mem_base);
45673 printf(" %d", n_writer);
45674 printf(" %d", n_prefix);
45675 printf(" %d", n_name);
45676 printf(" %d", n_namespaceURI);
45691 test_xmlTextWriterStartPI(void) {
45694 #if defined(LIBXML_WRITER_ENABLED)
45697 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
45699 xmlChar * target; /* PI target */
45702 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
45703 for (n_target = 0;n_target < gen_nb_const_xmlChar_ptr;n_target++) {
45704 mem_base = xmlMemBlocks();
45705 writer = gen_xmlTextWriterPtr(n_writer, 0);
45706 target = gen_const_xmlChar_ptr(n_target, 1);
45708 ret_val = xmlTextWriterStartPI(writer, (const xmlChar *)target);
45709 desret_int(ret_val);
45711 des_xmlTextWriterPtr(n_writer, writer, 0);
45712 des_const_xmlChar_ptr(n_target, (const xmlChar *)target, 1);
45713 xmlResetLastError();
45714 if (mem_base != xmlMemBlocks()) {
45715 printf("Leak of %d blocks found in xmlTextWriterStartPI",
45716 xmlMemBlocks() - mem_base);
45718 printf(" %d", n_writer);
45719 printf(" %d", n_target);
45732 test_xmlTextWriterWriteAttribute(void) {
45735 #if defined(LIBXML_WRITER_ENABLED)
45738 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
45740 xmlChar * name; /* attribute name */
45742 xmlChar * content; /* attribute content */
45745 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
45746 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
45747 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
45748 mem_base = xmlMemBlocks();
45749 writer = gen_xmlTextWriterPtr(n_writer, 0);
45750 name = gen_const_xmlChar_ptr(n_name, 1);
45751 content = gen_const_xmlChar_ptr(n_content, 2);
45753 ret_val = xmlTextWriterWriteAttribute(writer, (const xmlChar *)name, (const xmlChar *)content);
45754 desret_int(ret_val);
45756 des_xmlTextWriterPtr(n_writer, writer, 0);
45757 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
45758 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 2);
45759 xmlResetLastError();
45760 if (mem_base != xmlMemBlocks()) {
45761 printf("Leak of %d blocks found in xmlTextWriterWriteAttribute",
45762 xmlMemBlocks() - mem_base);
45764 printf(" %d", n_writer);
45765 printf(" %d", n_name);
45766 printf(" %d", n_content);
45780 test_xmlTextWriterWriteAttributeNS(void) {
45783 #if defined(LIBXML_WRITER_ENABLED)
45786 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
45788 xmlChar * prefix; /* namespace prefix */
45790 xmlChar * name; /* attribute local name */
45792 xmlChar * namespaceURI; /* namespace URI */
45793 int n_namespaceURI;
45794 xmlChar * content; /* attribute content */
45797 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
45798 for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
45799 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
45800 for (n_namespaceURI = 0;n_namespaceURI < gen_nb_const_xmlChar_ptr;n_namespaceURI++) {
45801 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
45802 mem_base = xmlMemBlocks();
45803 writer = gen_xmlTextWriterPtr(n_writer, 0);
45804 prefix = gen_const_xmlChar_ptr(n_prefix, 1);
45805 name = gen_const_xmlChar_ptr(n_name, 2);
45806 namespaceURI = gen_const_xmlChar_ptr(n_namespaceURI, 3);
45807 content = gen_const_xmlChar_ptr(n_content, 4);
45809 ret_val = xmlTextWriterWriteAttributeNS(writer, (const xmlChar *)prefix, (const xmlChar *)name, (const xmlChar *)namespaceURI, (const xmlChar *)content);
45810 desret_int(ret_val);
45812 des_xmlTextWriterPtr(n_writer, writer, 0);
45813 des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 1);
45814 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
45815 des_const_xmlChar_ptr(n_namespaceURI, (const xmlChar *)namespaceURI, 3);
45816 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 4);
45817 xmlResetLastError();
45818 if (mem_base != xmlMemBlocks()) {
45819 printf("Leak of %d blocks found in xmlTextWriterWriteAttributeNS",
45820 xmlMemBlocks() - mem_base);
45822 printf(" %d", n_writer);
45823 printf(" %d", n_prefix);
45824 printf(" %d", n_name);
45825 printf(" %d", n_namespaceURI);
45826 printf(" %d", n_content);
45842 test_xmlTextWriterWriteBase64(void) {
45845 #if defined(LIBXML_WRITER_ENABLED)
45848 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
45850 char * data; /* binary data */
45852 int start; /* the position within the data of the first byte to encode */
45854 int len; /* the number of bytes to encode */
45857 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
45858 for (n_data = 0;n_data < gen_nb_const_char_ptr;n_data++) {
45859 for (n_start = 0;n_start < gen_nb_int;n_start++) {
45860 for (n_len = 0;n_len < gen_nb_int;n_len++) {
45861 mem_base = xmlMemBlocks();
45862 writer = gen_xmlTextWriterPtr(n_writer, 0);
45863 data = gen_const_char_ptr(n_data, 1);
45864 start = gen_int(n_start, 2);
45865 len = gen_int(n_len, 3);
45866 if ((data != NULL) &&
45867 (start > (int) strlen((const char *) data) + 1))
45869 if ((data != NULL) &&
45870 (len > (int) strlen((const char *) data) + 1))
45873 ret_val = xmlTextWriterWriteBase64(writer, (const char *)data, start, len);
45874 desret_int(ret_val);
45876 des_xmlTextWriterPtr(n_writer, writer, 0);
45877 des_const_char_ptr(n_data, (const char *)data, 1);
45878 des_int(n_start, start, 2);
45879 des_int(n_len, len, 3);
45880 xmlResetLastError();
45881 if (mem_base != xmlMemBlocks()) {
45882 printf("Leak of %d blocks found in xmlTextWriterWriteBase64",
45883 xmlMemBlocks() - mem_base);
45885 printf(" %d", n_writer);
45886 printf(" %d", n_data);
45887 printf(" %d", n_start);
45888 printf(" %d", n_len);
45903 test_xmlTextWriterWriteBinHex(void) {
45906 #if defined(LIBXML_WRITER_ENABLED)
45909 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
45911 char * data; /* binary data */
45913 int start; /* the position within the data of the first byte to encode */
45915 int len; /* the number of bytes to encode */
45918 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
45919 for (n_data = 0;n_data < gen_nb_const_char_ptr;n_data++) {
45920 for (n_start = 0;n_start < gen_nb_int;n_start++) {
45921 for (n_len = 0;n_len < gen_nb_int;n_len++) {
45922 mem_base = xmlMemBlocks();
45923 writer = gen_xmlTextWriterPtr(n_writer, 0);
45924 data = gen_const_char_ptr(n_data, 1);
45925 start = gen_int(n_start, 2);
45926 len = gen_int(n_len, 3);
45927 if ((data != NULL) &&
45928 (start > (int) strlen((const char *) data) + 1))
45930 if ((data != NULL) &&
45931 (len > (int) strlen((const char *) data) + 1))
45934 ret_val = xmlTextWriterWriteBinHex(writer, (const char *)data, start, len);
45935 desret_int(ret_val);
45937 des_xmlTextWriterPtr(n_writer, writer, 0);
45938 des_const_char_ptr(n_data, (const char *)data, 1);
45939 des_int(n_start, start, 2);
45940 des_int(n_len, len, 3);
45941 xmlResetLastError();
45942 if (mem_base != xmlMemBlocks()) {
45943 printf("Leak of %d blocks found in xmlTextWriterWriteBinHex",
45944 xmlMemBlocks() - mem_base);
45946 printf(" %d", n_writer);
45947 printf(" %d", n_data);
45948 printf(" %d", n_start);
45949 printf(" %d", n_len);
45964 test_xmlTextWriterWriteCDATA(void) {
45967 #if defined(LIBXML_WRITER_ENABLED)
45970 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
45972 xmlChar * content; /* CDATA content */
45975 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
45976 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
45977 mem_base = xmlMemBlocks();
45978 writer = gen_xmlTextWriterPtr(n_writer, 0);
45979 content = gen_const_xmlChar_ptr(n_content, 1);
45981 ret_val = xmlTextWriterWriteCDATA(writer, (const xmlChar *)content);
45982 desret_int(ret_val);
45984 des_xmlTextWriterPtr(n_writer, writer, 0);
45985 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
45986 xmlResetLastError();
45987 if (mem_base != xmlMemBlocks()) {
45988 printf("Leak of %d blocks found in xmlTextWriterWriteCDATA",
45989 xmlMemBlocks() - mem_base);
45991 printf(" %d", n_writer);
45992 printf(" %d", n_content);
46005 test_xmlTextWriterWriteComment(void) {
46008 #if defined(LIBXML_WRITER_ENABLED)
46011 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
46013 xmlChar * content; /* comment string */
46016 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
46017 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
46018 mem_base = xmlMemBlocks();
46019 writer = gen_xmlTextWriterPtr(n_writer, 0);
46020 content = gen_const_xmlChar_ptr(n_content, 1);
46022 ret_val = xmlTextWriterWriteComment(writer, (const xmlChar *)content);
46023 desret_int(ret_val);
46025 des_xmlTextWriterPtr(n_writer, writer, 0);
46026 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
46027 xmlResetLastError();
46028 if (mem_base != xmlMemBlocks()) {
46029 printf("Leak of %d blocks found in xmlTextWriterWriteComment",
46030 xmlMemBlocks() - mem_base);
46032 printf(" %d", n_writer);
46033 printf(" %d", n_content);
46046 test_xmlTextWriterWriteDTD(void) {
46049 #if defined(LIBXML_WRITER_ENABLED)
46052 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
46054 xmlChar * name; /* the name of the DTD */
46056 xmlChar * pubid; /* the public identifier, which is an alternative to the system identifier */
46058 xmlChar * sysid; /* the system identifier, which is the URI of the DTD */
46060 xmlChar * subset; /* string content of the DTD */
46063 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
46064 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
46065 for (n_pubid = 0;n_pubid < gen_nb_const_xmlChar_ptr;n_pubid++) {
46066 for (n_sysid = 0;n_sysid < gen_nb_const_xmlChar_ptr;n_sysid++) {
46067 for (n_subset = 0;n_subset < gen_nb_const_xmlChar_ptr;n_subset++) {
46068 mem_base = xmlMemBlocks();
46069 writer = gen_xmlTextWriterPtr(n_writer, 0);
46070 name = gen_const_xmlChar_ptr(n_name, 1);
46071 pubid = gen_const_xmlChar_ptr(n_pubid, 2);
46072 sysid = gen_const_xmlChar_ptr(n_sysid, 3);
46073 subset = gen_const_xmlChar_ptr(n_subset, 4);
46075 ret_val = xmlTextWriterWriteDTD(writer, (const xmlChar *)name, (const xmlChar *)pubid, (const xmlChar *)sysid, (const xmlChar *)subset);
46076 desret_int(ret_val);
46078 des_xmlTextWriterPtr(n_writer, writer, 0);
46079 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
46080 des_const_xmlChar_ptr(n_pubid, (const xmlChar *)pubid, 2);
46081 des_const_xmlChar_ptr(n_sysid, (const xmlChar *)sysid, 3);
46082 des_const_xmlChar_ptr(n_subset, (const xmlChar *)subset, 4);
46083 xmlResetLastError();
46084 if (mem_base != xmlMemBlocks()) {
46085 printf("Leak of %d blocks found in xmlTextWriterWriteDTD",
46086 xmlMemBlocks() - mem_base);
46088 printf(" %d", n_writer);
46089 printf(" %d", n_name);
46090 printf(" %d", n_pubid);
46091 printf(" %d", n_sysid);
46092 printf(" %d", n_subset);
46108 test_xmlTextWriterWriteDTDAttlist(void) {
46111 #if defined(LIBXML_WRITER_ENABLED)
46114 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
46116 xmlChar * name; /* the name of the DTD ATTLIST */
46118 xmlChar * content; /* content of the ATTLIST */
46121 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
46122 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
46123 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
46124 mem_base = xmlMemBlocks();
46125 writer = gen_xmlTextWriterPtr(n_writer, 0);
46126 name = gen_const_xmlChar_ptr(n_name, 1);
46127 content = gen_const_xmlChar_ptr(n_content, 2);
46129 ret_val = xmlTextWriterWriteDTDAttlist(writer, (const xmlChar *)name, (const xmlChar *)content);
46130 desret_int(ret_val);
46132 des_xmlTextWriterPtr(n_writer, writer, 0);
46133 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
46134 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 2);
46135 xmlResetLastError();
46136 if (mem_base != xmlMemBlocks()) {
46137 printf("Leak of %d blocks found in xmlTextWriterWriteDTDAttlist",
46138 xmlMemBlocks() - mem_base);
46140 printf(" %d", n_writer);
46141 printf(" %d", n_name);
46142 printf(" %d", n_content);
46156 test_xmlTextWriterWriteDTDElement(void) {
46159 #if defined(LIBXML_WRITER_ENABLED)
46162 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
46164 xmlChar * name; /* the name of the DTD element */
46166 xmlChar * content; /* content of the element */
46169 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
46170 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
46171 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
46172 mem_base = xmlMemBlocks();
46173 writer = gen_xmlTextWriterPtr(n_writer, 0);
46174 name = gen_const_xmlChar_ptr(n_name, 1);
46175 content = gen_const_xmlChar_ptr(n_content, 2);
46177 ret_val = xmlTextWriterWriteDTDElement(writer, (const xmlChar *)name, (const xmlChar *)content);
46178 desret_int(ret_val);
46180 des_xmlTextWriterPtr(n_writer, writer, 0);
46181 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
46182 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 2);
46183 xmlResetLastError();
46184 if (mem_base != xmlMemBlocks()) {
46185 printf("Leak of %d blocks found in xmlTextWriterWriteDTDElement",
46186 xmlMemBlocks() - mem_base);
46188 printf(" %d", n_writer);
46189 printf(" %d", n_name);
46190 printf(" %d", n_content);
46204 test_xmlTextWriterWriteDTDEntity(void) {
46207 #if defined(LIBXML_WRITER_ENABLED)
46210 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
46212 int pe; /* TRUE if this is a parameter entity, FALSE if not */
46214 xmlChar * name; /* the name of the DTD entity */
46216 xmlChar * pubid; /* the public identifier, which is an alternative to the system identifier */
46218 xmlChar * sysid; /* the system identifier, which is the URI of the DTD */
46220 xmlChar * ndataid; /* the xml notation name. */
46222 xmlChar * content; /* content of the entity */
46225 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
46226 for (n_pe = 0;n_pe < gen_nb_int;n_pe++) {
46227 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
46228 for (n_pubid = 0;n_pubid < gen_nb_const_xmlChar_ptr;n_pubid++) {
46229 for (n_sysid = 0;n_sysid < gen_nb_const_xmlChar_ptr;n_sysid++) {
46230 for (n_ndataid = 0;n_ndataid < gen_nb_const_xmlChar_ptr;n_ndataid++) {
46231 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
46232 mem_base = xmlMemBlocks();
46233 writer = gen_xmlTextWriterPtr(n_writer, 0);
46234 pe = gen_int(n_pe, 1);
46235 name = gen_const_xmlChar_ptr(n_name, 2);
46236 pubid = gen_const_xmlChar_ptr(n_pubid, 3);
46237 sysid = gen_const_xmlChar_ptr(n_sysid, 4);
46238 ndataid = gen_const_xmlChar_ptr(n_ndataid, 5);
46239 content = gen_const_xmlChar_ptr(n_content, 6);
46241 ret_val = xmlTextWriterWriteDTDEntity(writer, pe, (const xmlChar *)name, (const xmlChar *)pubid, (const xmlChar *)sysid, (const xmlChar *)ndataid, (const xmlChar *)content);
46242 desret_int(ret_val);
46244 des_xmlTextWriterPtr(n_writer, writer, 0);
46245 des_int(n_pe, pe, 1);
46246 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
46247 des_const_xmlChar_ptr(n_pubid, (const xmlChar *)pubid, 3);
46248 des_const_xmlChar_ptr(n_sysid, (const xmlChar *)sysid, 4);
46249 des_const_xmlChar_ptr(n_ndataid, (const xmlChar *)ndataid, 5);
46250 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 6);
46251 xmlResetLastError();
46252 if (mem_base != xmlMemBlocks()) {
46253 printf("Leak of %d blocks found in xmlTextWriterWriteDTDEntity",
46254 xmlMemBlocks() - mem_base);
46256 printf(" %d", n_writer);
46257 printf(" %d", n_pe);
46258 printf(" %d", n_name);
46259 printf(" %d", n_pubid);
46260 printf(" %d", n_sysid);
46261 printf(" %d", n_ndataid);
46262 printf(" %d", n_content);
46280 test_xmlTextWriterWriteDTDExternalEntity(void) {
46283 #if defined(LIBXML_WRITER_ENABLED)
46286 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
46288 int pe; /* TRUE if this is a parameter entity, FALSE if not */
46290 xmlChar * name; /* the name of the DTD entity */
46292 xmlChar * pubid; /* the public identifier, which is an alternative to the system identifier */
46294 xmlChar * sysid; /* the system identifier, which is the URI of the DTD */
46296 xmlChar * ndataid; /* the xml notation name. */
46299 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
46300 for (n_pe = 0;n_pe < gen_nb_int;n_pe++) {
46301 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
46302 for (n_pubid = 0;n_pubid < gen_nb_const_xmlChar_ptr;n_pubid++) {
46303 for (n_sysid = 0;n_sysid < gen_nb_const_xmlChar_ptr;n_sysid++) {
46304 for (n_ndataid = 0;n_ndataid < gen_nb_const_xmlChar_ptr;n_ndataid++) {
46305 mem_base = xmlMemBlocks();
46306 writer = gen_xmlTextWriterPtr(n_writer, 0);
46307 pe = gen_int(n_pe, 1);
46308 name = gen_const_xmlChar_ptr(n_name, 2);
46309 pubid = gen_const_xmlChar_ptr(n_pubid, 3);
46310 sysid = gen_const_xmlChar_ptr(n_sysid, 4);
46311 ndataid = gen_const_xmlChar_ptr(n_ndataid, 5);
46313 ret_val = xmlTextWriterWriteDTDExternalEntity(writer, pe, (const xmlChar *)name, (const xmlChar *)pubid, (const xmlChar *)sysid, (const xmlChar *)ndataid);
46314 desret_int(ret_val);
46316 des_xmlTextWriterPtr(n_writer, writer, 0);
46317 des_int(n_pe, pe, 1);
46318 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
46319 des_const_xmlChar_ptr(n_pubid, (const xmlChar *)pubid, 3);
46320 des_const_xmlChar_ptr(n_sysid, (const xmlChar *)sysid, 4);
46321 des_const_xmlChar_ptr(n_ndataid, (const xmlChar *)ndataid, 5);
46322 xmlResetLastError();
46323 if (mem_base != xmlMemBlocks()) {
46324 printf("Leak of %d blocks found in xmlTextWriterWriteDTDExternalEntity",
46325 xmlMemBlocks() - mem_base);
46327 printf(" %d", n_writer);
46328 printf(" %d", n_pe);
46329 printf(" %d", n_name);
46330 printf(" %d", n_pubid);
46331 printf(" %d", n_sysid);
46332 printf(" %d", n_ndataid);
46349 test_xmlTextWriterWriteDTDExternalEntityContents(void) {
46352 #if defined(LIBXML_WRITER_ENABLED)
46355 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
46357 xmlChar * pubid; /* the public identifier, which is an alternative to the system identifier */
46359 xmlChar * sysid; /* the system identifier, which is the URI of the DTD */
46361 xmlChar * ndataid; /* the xml notation name. */
46364 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
46365 for (n_pubid = 0;n_pubid < gen_nb_const_xmlChar_ptr;n_pubid++) {
46366 for (n_sysid = 0;n_sysid < gen_nb_const_xmlChar_ptr;n_sysid++) {
46367 for (n_ndataid = 0;n_ndataid < gen_nb_const_xmlChar_ptr;n_ndataid++) {
46368 mem_base = xmlMemBlocks();
46369 writer = gen_xmlTextWriterPtr(n_writer, 0);
46370 pubid = gen_const_xmlChar_ptr(n_pubid, 1);
46371 sysid = gen_const_xmlChar_ptr(n_sysid, 2);
46372 ndataid = gen_const_xmlChar_ptr(n_ndataid, 3);
46374 ret_val = xmlTextWriterWriteDTDExternalEntityContents(writer, (const xmlChar *)pubid, (const xmlChar *)sysid, (const xmlChar *)ndataid);
46375 desret_int(ret_val);
46377 des_xmlTextWriterPtr(n_writer, writer, 0);
46378 des_const_xmlChar_ptr(n_pubid, (const xmlChar *)pubid, 1);
46379 des_const_xmlChar_ptr(n_sysid, (const xmlChar *)sysid, 2);
46380 des_const_xmlChar_ptr(n_ndataid, (const xmlChar *)ndataid, 3);
46381 xmlResetLastError();
46382 if (mem_base != xmlMemBlocks()) {
46383 printf("Leak of %d blocks found in xmlTextWriterWriteDTDExternalEntityContents",
46384 xmlMemBlocks() - mem_base);
46386 printf(" %d", n_writer);
46387 printf(" %d", n_pubid);
46388 printf(" %d", n_sysid);
46389 printf(" %d", n_ndataid);
46404 test_xmlTextWriterWriteDTDInternalEntity(void) {
46407 #if defined(LIBXML_WRITER_ENABLED)
46410 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
46412 int pe; /* TRUE if this is a parameter entity, FALSE if not */
46414 xmlChar * name; /* the name of the DTD entity */
46416 xmlChar * content; /* content of the entity */
46419 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
46420 for (n_pe = 0;n_pe < gen_nb_int;n_pe++) {
46421 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
46422 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
46423 mem_base = xmlMemBlocks();
46424 writer = gen_xmlTextWriterPtr(n_writer, 0);
46425 pe = gen_int(n_pe, 1);
46426 name = gen_const_xmlChar_ptr(n_name, 2);
46427 content = gen_const_xmlChar_ptr(n_content, 3);
46429 ret_val = xmlTextWriterWriteDTDInternalEntity(writer, pe, (const xmlChar *)name, (const xmlChar *)content);
46430 desret_int(ret_val);
46432 des_xmlTextWriterPtr(n_writer, writer, 0);
46433 des_int(n_pe, pe, 1);
46434 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
46435 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 3);
46436 xmlResetLastError();
46437 if (mem_base != xmlMemBlocks()) {
46438 printf("Leak of %d blocks found in xmlTextWriterWriteDTDInternalEntity",
46439 xmlMemBlocks() - mem_base);
46441 printf(" %d", n_writer);
46442 printf(" %d", n_pe);
46443 printf(" %d", n_name);
46444 printf(" %d", n_content);
46459 test_xmlTextWriterWriteDTDNotation(void) {
46462 #if defined(LIBXML_WRITER_ENABLED)
46465 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
46467 xmlChar * name; /* the name of the xml notation */
46469 xmlChar * pubid; /* the public identifier, which is an alternative to the system identifier */
46471 xmlChar * sysid; /* the system identifier, which is the URI of the DTD */
46474 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
46475 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
46476 for (n_pubid = 0;n_pubid < gen_nb_const_xmlChar_ptr;n_pubid++) {
46477 for (n_sysid = 0;n_sysid < gen_nb_const_xmlChar_ptr;n_sysid++) {
46478 mem_base = xmlMemBlocks();
46479 writer = gen_xmlTextWriterPtr(n_writer, 0);
46480 name = gen_const_xmlChar_ptr(n_name, 1);
46481 pubid = gen_const_xmlChar_ptr(n_pubid, 2);
46482 sysid = gen_const_xmlChar_ptr(n_sysid, 3);
46484 ret_val = xmlTextWriterWriteDTDNotation(writer, (const xmlChar *)name, (const xmlChar *)pubid, (const xmlChar *)sysid);
46485 desret_int(ret_val);
46487 des_xmlTextWriterPtr(n_writer, writer, 0);
46488 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
46489 des_const_xmlChar_ptr(n_pubid, (const xmlChar *)pubid, 2);
46490 des_const_xmlChar_ptr(n_sysid, (const xmlChar *)sysid, 3);
46491 xmlResetLastError();
46492 if (mem_base != xmlMemBlocks()) {
46493 printf("Leak of %d blocks found in xmlTextWriterWriteDTDNotation",
46494 xmlMemBlocks() - mem_base);
46496 printf(" %d", n_writer);
46497 printf(" %d", n_name);
46498 printf(" %d", n_pubid);
46499 printf(" %d", n_sysid);
46514 test_xmlTextWriterWriteElement(void) {
46517 #if defined(LIBXML_WRITER_ENABLED)
46520 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
46522 xmlChar * name; /* element name */
46524 xmlChar * content; /* element content */
46527 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
46528 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
46529 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
46530 mem_base = xmlMemBlocks();
46531 writer = gen_xmlTextWriterPtr(n_writer, 0);
46532 name = gen_const_xmlChar_ptr(n_name, 1);
46533 content = gen_const_xmlChar_ptr(n_content, 2);
46535 ret_val = xmlTextWriterWriteElement(writer, (const xmlChar *)name, (const xmlChar *)content);
46536 desret_int(ret_val);
46538 des_xmlTextWriterPtr(n_writer, writer, 0);
46539 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
46540 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 2);
46541 xmlResetLastError();
46542 if (mem_base != xmlMemBlocks()) {
46543 printf("Leak of %d blocks found in xmlTextWriterWriteElement",
46544 xmlMemBlocks() - mem_base);
46546 printf(" %d", n_writer);
46547 printf(" %d", n_name);
46548 printf(" %d", n_content);
46562 test_xmlTextWriterWriteElementNS(void) {
46565 #if defined(LIBXML_WRITER_ENABLED)
46568 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
46570 xmlChar * prefix; /* namespace prefix */
46572 xmlChar * name; /* element local name */
46574 xmlChar * namespaceURI; /* namespace URI */
46575 int n_namespaceURI;
46576 xmlChar * content; /* element content */
46579 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
46580 for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
46581 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
46582 for (n_namespaceURI = 0;n_namespaceURI < gen_nb_const_xmlChar_ptr;n_namespaceURI++) {
46583 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
46584 mem_base = xmlMemBlocks();
46585 writer = gen_xmlTextWriterPtr(n_writer, 0);
46586 prefix = gen_const_xmlChar_ptr(n_prefix, 1);
46587 name = gen_const_xmlChar_ptr(n_name, 2);
46588 namespaceURI = gen_const_xmlChar_ptr(n_namespaceURI, 3);
46589 content = gen_const_xmlChar_ptr(n_content, 4);
46591 ret_val = xmlTextWriterWriteElementNS(writer, (const xmlChar *)prefix, (const xmlChar *)name, (const xmlChar *)namespaceURI, (const xmlChar *)content);
46592 desret_int(ret_val);
46594 des_xmlTextWriterPtr(n_writer, writer, 0);
46595 des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 1);
46596 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
46597 des_const_xmlChar_ptr(n_namespaceURI, (const xmlChar *)namespaceURI, 3);
46598 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 4);
46599 xmlResetLastError();
46600 if (mem_base != xmlMemBlocks()) {
46601 printf("Leak of %d blocks found in xmlTextWriterWriteElementNS",
46602 xmlMemBlocks() - mem_base);
46604 printf(" %d", n_writer);
46605 printf(" %d", n_prefix);
46606 printf(" %d", n_name);
46607 printf(" %d", n_namespaceURI);
46608 printf(" %d", n_content);
46624 test_xmlTextWriterWriteFormatAttribute(void) {
46628 /* missing type support */
46634 test_xmlTextWriterWriteFormatAttributeNS(void) {
46638 /* missing type support */
46644 test_xmlTextWriterWriteFormatCDATA(void) {
46648 /* missing type support */
46654 test_xmlTextWriterWriteFormatComment(void) {
46658 /* missing type support */
46664 test_xmlTextWriterWriteFormatDTD(void) {
46668 /* missing type support */
46674 test_xmlTextWriterWriteFormatDTDAttlist(void) {
46678 /* missing type support */
46684 test_xmlTextWriterWriteFormatDTDElement(void) {
46688 /* missing type support */
46694 test_xmlTextWriterWriteFormatDTDInternalEntity(void) {
46698 /* missing type support */
46704 test_xmlTextWriterWriteFormatElement(void) {
46708 /* missing type support */
46714 test_xmlTextWriterWriteFormatElementNS(void) {
46718 /* missing type support */
46724 test_xmlTextWriterWriteFormatPI(void) {
46728 /* missing type support */
46734 test_xmlTextWriterWriteFormatRaw(void) {
46738 /* missing type support */
46744 test_xmlTextWriterWriteFormatString(void) {
46748 /* missing type support */
46754 test_xmlTextWriterWritePI(void) {
46757 #if defined(LIBXML_WRITER_ENABLED)
46760 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
46762 xmlChar * target; /* PI target */
46764 xmlChar * content; /* PI content */
46767 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
46768 for (n_target = 0;n_target < gen_nb_const_xmlChar_ptr;n_target++) {
46769 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
46770 mem_base = xmlMemBlocks();
46771 writer = gen_xmlTextWriterPtr(n_writer, 0);
46772 target = gen_const_xmlChar_ptr(n_target, 1);
46773 content = gen_const_xmlChar_ptr(n_content, 2);
46775 ret_val = xmlTextWriterWritePI(writer, (const xmlChar *)target, (const xmlChar *)content);
46776 desret_int(ret_val);
46778 des_xmlTextWriterPtr(n_writer, writer, 0);
46779 des_const_xmlChar_ptr(n_target, (const xmlChar *)target, 1);
46780 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 2);
46781 xmlResetLastError();
46782 if (mem_base != xmlMemBlocks()) {
46783 printf("Leak of %d blocks found in xmlTextWriterWritePI",
46784 xmlMemBlocks() - mem_base);
46786 printf(" %d", n_writer);
46787 printf(" %d", n_target);
46788 printf(" %d", n_content);
46802 test_xmlTextWriterWriteRaw(void) {
46805 #if defined(LIBXML_WRITER_ENABLED)
46808 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
46810 xmlChar * content; /* text string */
46813 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
46814 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
46815 mem_base = xmlMemBlocks();
46816 writer = gen_xmlTextWriterPtr(n_writer, 0);
46817 content = gen_const_xmlChar_ptr(n_content, 1);
46819 ret_val = xmlTextWriterWriteRaw(writer, (const xmlChar *)content);
46820 desret_int(ret_val);
46822 des_xmlTextWriterPtr(n_writer, writer, 0);
46823 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
46824 xmlResetLastError();
46825 if (mem_base != xmlMemBlocks()) {
46826 printf("Leak of %d blocks found in xmlTextWriterWriteRaw",
46827 xmlMemBlocks() - mem_base);
46829 printf(" %d", n_writer);
46830 printf(" %d", n_content);
46843 test_xmlTextWriterWriteRawLen(void) {
46846 #if defined(LIBXML_WRITER_ENABLED)
46849 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
46851 xmlChar * content; /* text string */
46853 int len; /* length of the text string */
46856 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
46857 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
46858 for (n_len = 0;n_len < gen_nb_int;n_len++) {
46859 mem_base = xmlMemBlocks();
46860 writer = gen_xmlTextWriterPtr(n_writer, 0);
46861 content = gen_const_xmlChar_ptr(n_content, 1);
46862 len = gen_int(n_len, 2);
46863 if ((content != NULL) &&
46864 (len > (int) strlen((const char *) content) + 1))
46867 ret_val = xmlTextWriterWriteRawLen(writer, (const xmlChar *)content, len);
46868 desret_int(ret_val);
46870 des_xmlTextWriterPtr(n_writer, writer, 0);
46871 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
46872 des_int(n_len, len, 2);
46873 xmlResetLastError();
46874 if (mem_base != xmlMemBlocks()) {
46875 printf("Leak of %d blocks found in xmlTextWriterWriteRawLen",
46876 xmlMemBlocks() - mem_base);
46878 printf(" %d", n_writer);
46879 printf(" %d", n_content);
46880 printf(" %d", n_len);
46894 test_xmlTextWriterWriteString(void) {
46897 #if defined(LIBXML_WRITER_ENABLED)
46900 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
46902 xmlChar * content; /* text string */
46905 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
46906 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
46907 mem_base = xmlMemBlocks();
46908 writer = gen_xmlTextWriterPtr(n_writer, 0);
46909 content = gen_const_xmlChar_ptr(n_content, 1);
46911 ret_val = xmlTextWriterWriteString(writer, (const xmlChar *)content);
46912 desret_int(ret_val);
46914 des_xmlTextWriterPtr(n_writer, writer, 0);
46915 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
46916 xmlResetLastError();
46917 if (mem_base != xmlMemBlocks()) {
46918 printf("Leak of %d blocks found in xmlTextWriterWriteString",
46919 xmlMemBlocks() - mem_base);
46921 printf(" %d", n_writer);
46922 printf(" %d", n_content);
46935 test_xmlTextWriterWriteVFormatAttribute(void) {
46939 /* missing type support */
46945 test_xmlTextWriterWriteVFormatAttributeNS(void) {
46949 /* missing type support */
46955 test_xmlTextWriterWriteVFormatCDATA(void) {
46959 /* missing type support */
46965 test_xmlTextWriterWriteVFormatComment(void) {
46969 /* missing type support */
46975 test_xmlTextWriterWriteVFormatDTD(void) {
46979 /* missing type support */
46985 test_xmlTextWriterWriteVFormatDTDAttlist(void) {
46989 /* missing type support */
46995 test_xmlTextWriterWriteVFormatDTDElement(void) {
46999 /* missing type support */
47005 test_xmlTextWriterWriteVFormatDTDInternalEntity(void) {
47009 /* missing type support */
47015 test_xmlTextWriterWriteVFormatElement(void) {
47019 /* missing type support */
47025 test_xmlTextWriterWriteVFormatElementNS(void) {
47029 /* missing type support */
47035 test_xmlTextWriterWriteVFormatPI(void) {
47039 /* missing type support */
47045 test_xmlTextWriterWriteVFormatRaw(void) {
47049 /* missing type support */
47055 test_xmlTextWriterWriteVFormatString(void) {
47059 /* missing type support */
47064 test_xmlwriter(void) {
47068 if (quiet == 0) printf("Testing xmlwriter : 52 of 80 functions ...\n");
47069 rc = test_xmlNewTextWriter();
47070 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47071 rc = test_xmlNewTextWriterFilename();
47072 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47073 rc = test_xmlNewTextWriterMemory();
47074 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47075 rc = test_xmlNewTextWriterPushParser();
47076 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47077 rc = test_xmlNewTextWriterTree();
47078 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47079 rc = test_xmlTextWriterEndAttribute();
47080 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47081 rc = test_xmlTextWriterEndCDATA();
47082 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47083 rc = test_xmlTextWriterEndComment();
47084 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47085 rc = test_xmlTextWriterEndDTD();
47086 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47087 rc = test_xmlTextWriterEndDTDAttlist();
47088 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47089 rc = test_xmlTextWriterEndDTDElement();
47090 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47091 rc = test_xmlTextWriterEndDTDEntity();
47092 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47093 rc = test_xmlTextWriterEndDocument();
47094 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47095 rc = test_xmlTextWriterEndElement();
47096 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47097 rc = test_xmlTextWriterEndPI();
47098 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47099 rc = test_xmlTextWriterFlush();
47100 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47101 rc = test_xmlTextWriterFullEndElement();
47102 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47103 rc = test_xmlTextWriterSetIndent();
47104 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47105 rc = test_xmlTextWriterSetIndentString();
47106 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47107 rc = test_xmlTextWriterSetQuoteChar();
47108 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47109 rc = test_xmlTextWriterStartAttribute();
47110 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47111 rc = test_xmlTextWriterStartAttributeNS();
47112 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47113 rc = test_xmlTextWriterStartCDATA();
47114 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47115 rc = test_xmlTextWriterStartComment();
47116 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47117 rc = test_xmlTextWriterStartDTD();
47118 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47119 rc = test_xmlTextWriterStartDTDAttlist();
47120 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47121 rc = test_xmlTextWriterStartDTDElement();
47122 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47123 rc = test_xmlTextWriterStartDTDEntity();
47124 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47125 rc = test_xmlTextWriterStartDocument();
47126 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47127 rc = test_xmlTextWriterStartElement();
47128 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47129 rc = test_xmlTextWriterStartElementNS();
47130 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47131 rc = test_xmlTextWriterStartPI();
47132 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47133 rc = test_xmlTextWriterWriteAttribute();
47134 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47135 rc = test_xmlTextWriterWriteAttributeNS();
47136 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47137 rc = test_xmlTextWriterWriteBase64();
47138 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47139 rc = test_xmlTextWriterWriteBinHex();
47140 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47141 rc = test_xmlTextWriterWriteCDATA();
47142 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47143 rc = test_xmlTextWriterWriteComment();
47144 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47145 rc = test_xmlTextWriterWriteDTD();
47146 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47147 rc = test_xmlTextWriterWriteDTDAttlist();
47148 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47149 rc = test_xmlTextWriterWriteDTDElement();
47150 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47151 rc = test_xmlTextWriterWriteDTDEntity();
47152 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47153 rc = test_xmlTextWriterWriteDTDExternalEntity();
47154 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47155 rc = test_xmlTextWriterWriteDTDExternalEntityContents();
47156 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47157 rc = test_xmlTextWriterWriteDTDInternalEntity();
47158 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47159 rc = test_xmlTextWriterWriteDTDNotation();
47160 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47161 rc = test_xmlTextWriterWriteElement();
47162 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47163 rc = test_xmlTextWriterWriteElementNS();
47164 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47165 rc = test_xmlTextWriterWriteFormatAttribute();
47166 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47167 rc = test_xmlTextWriterWriteFormatAttributeNS();
47168 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47169 rc = test_xmlTextWriterWriteFormatCDATA();
47170 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47171 rc = test_xmlTextWriterWriteFormatComment();
47172 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47173 rc = test_xmlTextWriterWriteFormatDTD();
47174 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47175 rc = test_xmlTextWriterWriteFormatDTDAttlist();
47176 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47177 rc = test_xmlTextWriterWriteFormatDTDElement();
47178 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47179 rc = test_xmlTextWriterWriteFormatDTDInternalEntity();
47180 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47181 rc = test_xmlTextWriterWriteFormatElement();
47182 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47183 rc = test_xmlTextWriterWriteFormatElementNS();
47184 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47185 rc = test_xmlTextWriterWriteFormatPI();
47186 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47187 rc = test_xmlTextWriterWriteFormatRaw();
47188 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47189 rc = test_xmlTextWriterWriteFormatString();
47190 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47191 rc = test_xmlTextWriterWritePI();
47192 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47193 rc = test_xmlTextWriterWriteRaw();
47194 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47195 rc = test_xmlTextWriterWriteRawLen();
47196 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47197 rc = test_xmlTextWriterWriteString();
47198 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47199 rc = test_xmlTextWriterWriteVFormatAttribute();
47200 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47201 rc = test_xmlTextWriterWriteVFormatAttributeNS();
47202 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47203 rc = test_xmlTextWriterWriteVFormatCDATA();
47204 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47205 rc = test_xmlTextWriterWriteVFormatComment();
47206 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47207 rc = test_xmlTextWriterWriteVFormatDTD();
47208 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47209 rc = test_xmlTextWriterWriteVFormatDTDAttlist();
47210 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47211 rc = test_xmlTextWriterWriteVFormatDTDElement();
47212 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47213 rc = test_xmlTextWriterWriteVFormatDTDInternalEntity();
47214 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47215 rc = test_xmlTextWriterWriteVFormatElement();
47216 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47217 rc = test_xmlTextWriterWriteVFormatElementNS();
47218 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47219 rc = test_xmlTextWriterWriteVFormatPI();
47220 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47221 rc = test_xmlTextWriterWriteVFormatRaw();
47222 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47223 rc = test_xmlTextWriterWriteVFormatString();
47224 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47227 printf("Module xmlwriter: %d errors\n", test_ret);
47232 test_xmlXPathCastBooleanToNumber(void) {
47235 #if defined(LIBXML_XPATH_ENABLED)
47238 int val; /* a boolean */
47241 for (n_val = 0;n_val < gen_nb_int;n_val++) {
47242 mem_base = xmlMemBlocks();
47243 val = gen_int(n_val, 0);
47245 ret_val = xmlXPathCastBooleanToNumber(val);
47246 desret_double(ret_val);
47248 des_int(n_val, val, 0);
47249 xmlResetLastError();
47250 if (mem_base != xmlMemBlocks()) {
47251 printf("Leak of %d blocks found in xmlXPathCastBooleanToNumber",
47252 xmlMemBlocks() - mem_base);
47254 printf(" %d", n_val);
47266 test_xmlXPathCastBooleanToString(void) {
47269 #if defined(LIBXML_XPATH_ENABLED)
47272 int val; /* a boolean */
47275 for (n_val = 0;n_val < gen_nb_int;n_val++) {
47276 mem_base = xmlMemBlocks();
47277 val = gen_int(n_val, 0);
47279 ret_val = xmlXPathCastBooleanToString(val);
47280 desret_xmlChar_ptr(ret_val);
47282 des_int(n_val, val, 0);
47283 xmlResetLastError();
47284 if (mem_base != xmlMemBlocks()) {
47285 printf("Leak of %d blocks found in xmlXPathCastBooleanToString",
47286 xmlMemBlocks() - mem_base);
47288 printf(" %d", n_val);
47300 test_xmlXPathCastNodeSetToBoolean(void) {
47303 #if defined(LIBXML_XPATH_ENABLED)
47306 xmlNodeSetPtr ns; /* a node-set */
47309 for (n_ns = 0;n_ns < gen_nb_xmlNodeSetPtr;n_ns++) {
47310 mem_base = xmlMemBlocks();
47311 ns = gen_xmlNodeSetPtr(n_ns, 0);
47313 ret_val = xmlXPathCastNodeSetToBoolean(ns);
47314 desret_int(ret_val);
47316 des_xmlNodeSetPtr(n_ns, ns, 0);
47317 xmlResetLastError();
47318 if (mem_base != xmlMemBlocks()) {
47319 printf("Leak of %d blocks found in xmlXPathCastNodeSetToBoolean",
47320 xmlMemBlocks() - mem_base);
47322 printf(" %d", n_ns);
47334 test_xmlXPathCastNodeSetToNumber(void) {
47337 #if defined(LIBXML_XPATH_ENABLED)
47340 xmlNodeSetPtr ns; /* a node-set */
47343 for (n_ns = 0;n_ns < gen_nb_xmlNodeSetPtr;n_ns++) {
47344 mem_base = xmlMemBlocks();
47345 ns = gen_xmlNodeSetPtr(n_ns, 0);
47347 ret_val = xmlXPathCastNodeSetToNumber(ns);
47348 desret_double(ret_val);
47350 des_xmlNodeSetPtr(n_ns, ns, 0);
47351 xmlResetLastError();
47352 if (mem_base != xmlMemBlocks()) {
47353 printf("Leak of %d blocks found in xmlXPathCastNodeSetToNumber",
47354 xmlMemBlocks() - mem_base);
47356 printf(" %d", n_ns);
47368 test_xmlXPathCastNodeSetToString(void) {
47371 #if defined(LIBXML_XPATH_ENABLED)
47374 xmlNodeSetPtr ns; /* a node-set */
47377 for (n_ns = 0;n_ns < gen_nb_xmlNodeSetPtr;n_ns++) {
47378 mem_base = xmlMemBlocks();
47379 ns = gen_xmlNodeSetPtr(n_ns, 0);
47381 ret_val = xmlXPathCastNodeSetToString(ns);
47382 desret_xmlChar_ptr(ret_val);
47384 des_xmlNodeSetPtr(n_ns, ns, 0);
47385 xmlResetLastError();
47386 if (mem_base != xmlMemBlocks()) {
47387 printf("Leak of %d blocks found in xmlXPathCastNodeSetToString",
47388 xmlMemBlocks() - mem_base);
47390 printf(" %d", n_ns);
47402 test_xmlXPathCastNodeToNumber(void) {
47405 #if defined(LIBXML_XPATH_ENABLED)
47408 xmlNodePtr node; /* a node */
47411 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
47412 mem_base = xmlMemBlocks();
47413 node = gen_xmlNodePtr(n_node, 0);
47415 ret_val = xmlXPathCastNodeToNumber(node);
47416 desret_double(ret_val);
47418 des_xmlNodePtr(n_node, node, 0);
47419 xmlResetLastError();
47420 if (mem_base != xmlMemBlocks()) {
47421 printf("Leak of %d blocks found in xmlXPathCastNodeToNumber",
47422 xmlMemBlocks() - mem_base);
47424 printf(" %d", n_node);
47436 test_xmlXPathCastNodeToString(void) {
47439 #if defined(LIBXML_XPATH_ENABLED)
47442 xmlNodePtr node; /* a node */
47445 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
47446 mem_base = xmlMemBlocks();
47447 node = gen_xmlNodePtr(n_node, 0);
47449 ret_val = xmlXPathCastNodeToString(node);
47450 desret_xmlChar_ptr(ret_val);
47452 des_xmlNodePtr(n_node, node, 0);
47453 xmlResetLastError();
47454 if (mem_base != xmlMemBlocks()) {
47455 printf("Leak of %d blocks found in xmlXPathCastNodeToString",
47456 xmlMemBlocks() - mem_base);
47458 printf(" %d", n_node);
47470 test_xmlXPathCastNumberToBoolean(void) {
47473 #if defined(LIBXML_XPATH_ENABLED)
47476 double val; /* a number */
47479 for (n_val = 0;n_val < gen_nb_double;n_val++) {
47480 mem_base = xmlMemBlocks();
47481 val = gen_double(n_val, 0);
47483 ret_val = xmlXPathCastNumberToBoolean(val);
47484 desret_int(ret_val);
47486 des_double(n_val, val, 0);
47487 xmlResetLastError();
47488 if (mem_base != xmlMemBlocks()) {
47489 printf("Leak of %d blocks found in xmlXPathCastNumberToBoolean",
47490 xmlMemBlocks() - mem_base);
47492 printf(" %d", n_val);
47504 test_xmlXPathCastNumberToString(void) {
47507 #if defined(LIBXML_XPATH_ENABLED)
47510 double val; /* a number */
47513 for (n_val = 0;n_val < gen_nb_double;n_val++) {
47514 mem_base = xmlMemBlocks();
47515 val = gen_double(n_val, 0);
47517 ret_val = xmlXPathCastNumberToString(val);
47518 desret_xmlChar_ptr(ret_val);
47520 des_double(n_val, val, 0);
47521 xmlResetLastError();
47522 if (mem_base != xmlMemBlocks()) {
47523 printf("Leak of %d blocks found in xmlXPathCastNumberToString",
47524 xmlMemBlocks() - mem_base);
47526 printf(" %d", n_val);
47538 test_xmlXPathCastStringToBoolean(void) {
47541 #if defined(LIBXML_XPATH_ENABLED)
47544 xmlChar * val; /* a string */
47547 for (n_val = 0;n_val < gen_nb_const_xmlChar_ptr;n_val++) {
47548 mem_base = xmlMemBlocks();
47549 val = gen_const_xmlChar_ptr(n_val, 0);
47551 ret_val = xmlXPathCastStringToBoolean((const xmlChar *)val);
47552 desret_int(ret_val);
47554 des_const_xmlChar_ptr(n_val, (const xmlChar *)val, 0);
47555 xmlResetLastError();
47556 if (mem_base != xmlMemBlocks()) {
47557 printf("Leak of %d blocks found in xmlXPathCastStringToBoolean",
47558 xmlMemBlocks() - mem_base);
47560 printf(" %d", n_val);
47572 test_xmlXPathCastStringToNumber(void) {
47575 #if defined(LIBXML_XPATH_ENABLED)
47578 xmlChar * val; /* a string */
47581 for (n_val = 0;n_val < gen_nb_const_xmlChar_ptr;n_val++) {
47582 mem_base = xmlMemBlocks();
47583 val = gen_const_xmlChar_ptr(n_val, 0);
47585 ret_val = xmlXPathCastStringToNumber((const xmlChar *)val);
47586 desret_double(ret_val);
47588 des_const_xmlChar_ptr(n_val, (const xmlChar *)val, 0);
47589 xmlResetLastError();
47590 if (mem_base != xmlMemBlocks()) {
47591 printf("Leak of %d blocks found in xmlXPathCastStringToNumber",
47592 xmlMemBlocks() - mem_base);
47594 printf(" %d", n_val);
47606 test_xmlXPathCastToBoolean(void) {
47609 #if defined(LIBXML_XPATH_ENABLED)
47612 xmlXPathObjectPtr val; /* an XPath object */
47615 for (n_val = 0;n_val < gen_nb_xmlXPathObjectPtr;n_val++) {
47616 mem_base = xmlMemBlocks();
47617 val = gen_xmlXPathObjectPtr(n_val, 0);
47619 ret_val = xmlXPathCastToBoolean(val);
47620 desret_int(ret_val);
47622 des_xmlXPathObjectPtr(n_val, val, 0);
47623 xmlResetLastError();
47624 if (mem_base != xmlMemBlocks()) {
47625 printf("Leak of %d blocks found in xmlXPathCastToBoolean",
47626 xmlMemBlocks() - mem_base);
47628 printf(" %d", n_val);
47640 test_xmlXPathCastToNumber(void) {
47643 #if defined(LIBXML_XPATH_ENABLED)
47646 xmlXPathObjectPtr val; /* an XPath object */
47649 for (n_val = 0;n_val < gen_nb_xmlXPathObjectPtr;n_val++) {
47650 mem_base = xmlMemBlocks();
47651 val = gen_xmlXPathObjectPtr(n_val, 0);
47653 ret_val = xmlXPathCastToNumber(val);
47654 desret_double(ret_val);
47656 des_xmlXPathObjectPtr(n_val, val, 0);
47657 xmlResetLastError();
47658 if (mem_base != xmlMemBlocks()) {
47659 printf("Leak of %d blocks found in xmlXPathCastToNumber",
47660 xmlMemBlocks() - mem_base);
47662 printf(" %d", n_val);
47674 test_xmlXPathCastToString(void) {
47677 #if defined(LIBXML_XPATH_ENABLED)
47680 xmlXPathObjectPtr val; /* an XPath object */
47683 for (n_val = 0;n_val < gen_nb_xmlXPathObjectPtr;n_val++) {
47684 mem_base = xmlMemBlocks();
47685 val = gen_xmlXPathObjectPtr(n_val, 0);
47687 ret_val = xmlXPathCastToString(val);
47688 desret_xmlChar_ptr(ret_val);
47690 des_xmlXPathObjectPtr(n_val, val, 0);
47691 xmlResetLastError();
47692 if (mem_base != xmlMemBlocks()) {
47693 printf("Leak of %d blocks found in xmlXPathCastToString",
47694 xmlMemBlocks() - mem_base);
47696 printf(" %d", n_val);
47708 test_xmlXPathCmpNodes(void) {
47711 #if defined(LIBXML_XPATH_ENABLED)
47714 xmlNodePtr node1; /* the first node */
47716 xmlNodePtr node2; /* the second node */
47719 for (n_node1 = 0;n_node1 < gen_nb_xmlNodePtr;n_node1++) {
47720 for (n_node2 = 0;n_node2 < gen_nb_xmlNodePtr;n_node2++) {
47721 mem_base = xmlMemBlocks();
47722 node1 = gen_xmlNodePtr(n_node1, 0);
47723 node2 = gen_xmlNodePtr(n_node2, 1);
47725 ret_val = xmlXPathCmpNodes(node1, node2);
47726 desret_int(ret_val);
47728 des_xmlNodePtr(n_node1, node1, 0);
47729 des_xmlNodePtr(n_node2, node2, 1);
47730 xmlResetLastError();
47731 if (mem_base != xmlMemBlocks()) {
47732 printf("Leak of %d blocks found in xmlXPathCmpNodes",
47733 xmlMemBlocks() - mem_base);
47735 printf(" %d", n_node1);
47736 printf(" %d", n_node2);
47749 test_xmlXPathCompile(void) {
47753 /* missing type support */
47757 #ifdef LIBXML_XPATH_ENABLED
47759 #define gen_nb_xmlXPathCompExprPtr 1
47760 static xmlXPathCompExprPtr gen_xmlXPathCompExprPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
47763 static void des_xmlXPathCompExprPtr(int no ATTRIBUTE_UNUSED, xmlXPathCompExprPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
47767 #ifdef LIBXML_XPATH_ENABLED
47769 #define gen_nb_xmlXPathContextPtr 1
47770 static xmlXPathContextPtr gen_xmlXPathContextPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
47773 static void des_xmlXPathContextPtr(int no ATTRIBUTE_UNUSED, xmlXPathContextPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
47779 test_xmlXPathCompiledEval(void) {
47782 #if defined(LIBXML_XPATH_ENABLED)
47784 xmlXPathObjectPtr ret_val;
47785 xmlXPathCompExprPtr comp; /* the compiled XPath expression */
47787 xmlXPathContextPtr ctx; /* the XPath context */
47790 for (n_comp = 0;n_comp < gen_nb_xmlXPathCompExprPtr;n_comp++) {
47791 for (n_ctx = 0;n_ctx < gen_nb_xmlXPathContextPtr;n_ctx++) {
47792 mem_base = xmlMemBlocks();
47793 comp = gen_xmlXPathCompExprPtr(n_comp, 0);
47794 ctx = gen_xmlXPathContextPtr(n_ctx, 1);
47796 ret_val = xmlXPathCompiledEval(comp, ctx);
47797 desret_xmlXPathObjectPtr(ret_val);
47799 des_xmlXPathCompExprPtr(n_comp, comp, 0);
47800 des_xmlXPathContextPtr(n_ctx, ctx, 1);
47801 xmlResetLastError();
47802 if (mem_base != xmlMemBlocks()) {
47803 printf("Leak of %d blocks found in xmlXPathCompiledEval",
47804 xmlMemBlocks() - mem_base);
47806 printf(" %d", n_comp);
47807 printf(" %d", n_ctx);
47820 test_xmlXPathCompiledEvalToBoolean(void) {
47823 #if defined(LIBXML_XPATH_ENABLED)
47826 xmlXPathCompExprPtr comp; /* the compiled XPath expression */
47828 xmlXPathContextPtr ctxt; /* the XPath context */
47831 for (n_comp = 0;n_comp < gen_nb_xmlXPathCompExprPtr;n_comp++) {
47832 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathContextPtr;n_ctxt++) {
47833 mem_base = xmlMemBlocks();
47834 comp = gen_xmlXPathCompExprPtr(n_comp, 0);
47835 ctxt = gen_xmlXPathContextPtr(n_ctxt, 1);
47837 ret_val = xmlXPathCompiledEvalToBoolean(comp, ctxt);
47838 desret_int(ret_val);
47840 des_xmlXPathCompExprPtr(n_comp, comp, 0);
47841 des_xmlXPathContextPtr(n_ctxt, ctxt, 1);
47842 xmlResetLastError();
47843 if (mem_base != xmlMemBlocks()) {
47844 printf("Leak of %d blocks found in xmlXPathCompiledEvalToBoolean",
47845 xmlMemBlocks() - mem_base);
47847 printf(" %d", n_comp);
47848 printf(" %d", n_ctxt);
47861 test_xmlXPathContextSetCache(void) {
47864 #if defined(LIBXML_XPATH_ENABLED)
47867 xmlXPathContextPtr ctxt; /* the XPath context */
47869 int active; /* enables/disables (creates/frees) the cache */
47871 int value; /* a value with semantics dependant on @options */
47873 int options; /* options (currently only the value 0 is used) */
47876 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathContextPtr;n_ctxt++) {
47877 for (n_active = 0;n_active < gen_nb_int;n_active++) {
47878 for (n_value = 0;n_value < gen_nb_int;n_value++) {
47879 for (n_options = 0;n_options < gen_nb_int;n_options++) {
47880 mem_base = xmlMemBlocks();
47881 ctxt = gen_xmlXPathContextPtr(n_ctxt, 0);
47882 active = gen_int(n_active, 1);
47883 value = gen_int(n_value, 2);
47884 options = gen_int(n_options, 3);
47886 ret_val = xmlXPathContextSetCache(ctxt, active, value, options);
47887 desret_int(ret_val);
47889 des_xmlXPathContextPtr(n_ctxt, ctxt, 0);
47890 des_int(n_active, active, 1);
47891 des_int(n_value, value, 2);
47892 des_int(n_options, options, 3);
47893 xmlResetLastError();
47894 if (mem_base != xmlMemBlocks()) {
47895 printf("Leak of %d blocks found in xmlXPathContextSetCache",
47896 xmlMemBlocks() - mem_base);
47898 printf(" %d", n_ctxt);
47899 printf(" %d", n_active);
47900 printf(" %d", n_value);
47901 printf(" %d", n_options);
47916 test_xmlXPathConvertBoolean(void) {
47919 #if defined(LIBXML_XPATH_ENABLED)
47921 xmlXPathObjectPtr ret_val;
47922 xmlXPathObjectPtr val; /* an XPath object */
47925 for (n_val = 0;n_val < gen_nb_xmlXPathObjectPtr;n_val++) {
47926 mem_base = xmlMemBlocks();
47927 val = gen_xmlXPathObjectPtr(n_val, 0);
47929 ret_val = xmlXPathConvertBoolean(val);
47931 desret_xmlXPathObjectPtr(ret_val);
47933 des_xmlXPathObjectPtr(n_val, val, 0);
47934 xmlResetLastError();
47935 if (mem_base != xmlMemBlocks()) {
47936 printf("Leak of %d blocks found in xmlXPathConvertBoolean",
47937 xmlMemBlocks() - mem_base);
47939 printf(" %d", n_val);
47951 test_xmlXPathConvertNumber(void) {
47954 #if defined(LIBXML_XPATH_ENABLED)
47956 xmlXPathObjectPtr ret_val;
47957 xmlXPathObjectPtr val; /* an XPath object */
47960 for (n_val = 0;n_val < gen_nb_xmlXPathObjectPtr;n_val++) {
47961 mem_base = xmlMemBlocks();
47962 val = gen_xmlXPathObjectPtr(n_val, 0);
47964 ret_val = xmlXPathConvertNumber(val);
47966 desret_xmlXPathObjectPtr(ret_val);
47968 des_xmlXPathObjectPtr(n_val, val, 0);
47969 xmlResetLastError();
47970 if (mem_base != xmlMemBlocks()) {
47971 printf("Leak of %d blocks found in xmlXPathConvertNumber",
47972 xmlMemBlocks() - mem_base);
47974 printf(" %d", n_val);
47986 test_xmlXPathConvertString(void) {
47989 #if defined(LIBXML_XPATH_ENABLED)
47991 xmlXPathObjectPtr ret_val;
47992 xmlXPathObjectPtr val; /* an XPath object */
47995 for (n_val = 0;n_val < gen_nb_xmlXPathObjectPtr;n_val++) {
47996 mem_base = xmlMemBlocks();
47997 val = gen_xmlXPathObjectPtr(n_val, 0);
47999 ret_val = xmlXPathConvertString(val);
48001 desret_xmlXPathObjectPtr(ret_val);
48003 des_xmlXPathObjectPtr(n_val, val, 0);
48004 xmlResetLastError();
48005 if (mem_base != xmlMemBlocks()) {
48006 printf("Leak of %d blocks found in xmlXPathConvertString",
48007 xmlMemBlocks() - mem_base);
48009 printf(" %d", n_val);
48021 test_xmlXPathCtxtCompile(void) {
48025 /* missing type support */
48031 test_xmlXPathEval(void) {
48034 #if defined(LIBXML_XPATH_ENABLED)
48036 xmlXPathObjectPtr ret_val;
48037 xmlChar * str; /* the XPath expression */
48039 xmlXPathContextPtr ctx; /* the XPath context */
48042 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
48043 for (n_ctx = 0;n_ctx < gen_nb_xmlXPathContextPtr;n_ctx++) {
48044 mem_base = xmlMemBlocks();
48045 str = gen_const_xmlChar_ptr(n_str, 0);
48046 ctx = gen_xmlXPathContextPtr(n_ctx, 1);
48048 ret_val = xmlXPathEval((const xmlChar *)str, ctx);
48049 desret_xmlXPathObjectPtr(ret_val);
48051 des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 0);
48052 des_xmlXPathContextPtr(n_ctx, ctx, 1);
48053 xmlResetLastError();
48054 if (mem_base != xmlMemBlocks()) {
48055 printf("Leak of %d blocks found in xmlXPathEval",
48056 xmlMemBlocks() - mem_base);
48058 printf(" %d", n_str);
48059 printf(" %d", n_ctx);
48072 test_xmlXPathEvalExpression(void) {
48075 #if defined(LIBXML_XPATH_ENABLED)
48077 xmlXPathObjectPtr ret_val;
48078 xmlChar * str; /* the XPath expression */
48080 xmlXPathContextPtr ctxt; /* the XPath context */
48083 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
48084 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathContextPtr;n_ctxt++) {
48085 mem_base = xmlMemBlocks();
48086 str = gen_const_xmlChar_ptr(n_str, 0);
48087 ctxt = gen_xmlXPathContextPtr(n_ctxt, 1);
48089 ret_val = xmlXPathEvalExpression((const xmlChar *)str, ctxt);
48090 desret_xmlXPathObjectPtr(ret_val);
48092 des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 0);
48093 des_xmlXPathContextPtr(n_ctxt, ctxt, 1);
48094 xmlResetLastError();
48095 if (mem_base != xmlMemBlocks()) {
48096 printf("Leak of %d blocks found in xmlXPathEvalExpression",
48097 xmlMemBlocks() - mem_base);
48099 printf(" %d", n_str);
48100 printf(" %d", n_ctxt);
48113 test_xmlXPathEvalPredicate(void) {
48116 #if defined(LIBXML_XPATH_ENABLED)
48119 xmlXPathContextPtr ctxt; /* the XPath context */
48121 xmlXPathObjectPtr res; /* the Predicate Expression evaluation result */
48124 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathContextPtr;n_ctxt++) {
48125 for (n_res = 0;n_res < gen_nb_xmlXPathObjectPtr;n_res++) {
48126 mem_base = xmlMemBlocks();
48127 ctxt = gen_xmlXPathContextPtr(n_ctxt, 0);
48128 res = gen_xmlXPathObjectPtr(n_res, 1);
48130 ret_val = xmlXPathEvalPredicate(ctxt, res);
48131 desret_int(ret_val);
48133 des_xmlXPathContextPtr(n_ctxt, ctxt, 0);
48134 des_xmlXPathObjectPtr(n_res, res, 1);
48135 xmlResetLastError();
48136 if (mem_base != xmlMemBlocks()) {
48137 printf("Leak of %d blocks found in xmlXPathEvalPredicate",
48138 xmlMemBlocks() - mem_base);
48140 printf(" %d", n_ctxt);
48141 printf(" %d", n_res);
48154 test_xmlXPathInit(void) {
48157 #if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
48160 mem_base = xmlMemBlocks();
48164 xmlResetLastError();
48165 if (mem_base != xmlMemBlocks()) {
48166 printf("Leak of %d blocks found in xmlXPathInit",
48167 xmlMemBlocks() - mem_base);
48179 test_xmlXPathIsInf(void) {
48182 #if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
48185 double val; /* a double value */
48188 for (n_val = 0;n_val < gen_nb_double;n_val++) {
48189 mem_base = xmlMemBlocks();
48190 val = gen_double(n_val, 0);
48192 ret_val = xmlXPathIsInf(val);
48193 desret_int(ret_val);
48195 des_double(n_val, val, 0);
48196 xmlResetLastError();
48197 if (mem_base != xmlMemBlocks()) {
48198 printf("Leak of %d blocks found in xmlXPathIsInf",
48199 xmlMemBlocks() - mem_base);
48201 printf(" %d", n_val);
48213 test_xmlXPathIsNaN(void) {
48216 #if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
48219 double val; /* a double value */
48222 for (n_val = 0;n_val < gen_nb_double;n_val++) {
48223 mem_base = xmlMemBlocks();
48224 val = gen_double(n_val, 0);
48226 ret_val = xmlXPathIsNaN(val);
48227 desret_int(ret_val);
48229 des_double(n_val, val, 0);
48230 xmlResetLastError();
48231 if (mem_base != xmlMemBlocks()) {
48232 printf("Leak of %d blocks found in xmlXPathIsNaN",
48233 xmlMemBlocks() - mem_base);
48235 printf(" %d", n_val);
48247 test_xmlXPathNewContext(void) {
48251 /* missing type support */
48257 test_xmlXPathNodeEval(void) {
48260 #if defined(LIBXML_XPATH_ENABLED)
48262 xmlXPathObjectPtr ret_val;
48263 xmlNodePtr node; /* the node to to use as the context node */
48265 xmlChar * str; /* the XPath expression */
48267 xmlXPathContextPtr ctx; /* the XPath context */
48270 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
48271 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
48272 for (n_ctx = 0;n_ctx < gen_nb_xmlXPathContextPtr;n_ctx++) {
48273 mem_base = xmlMemBlocks();
48274 node = gen_xmlNodePtr(n_node, 0);
48275 str = gen_const_xmlChar_ptr(n_str, 1);
48276 ctx = gen_xmlXPathContextPtr(n_ctx, 2);
48278 ret_val = xmlXPathNodeEval(node, (const xmlChar *)str, ctx);
48279 desret_xmlXPathObjectPtr(ret_val);
48281 des_xmlNodePtr(n_node, node, 0);
48282 des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 1);
48283 des_xmlXPathContextPtr(n_ctx, ctx, 2);
48284 xmlResetLastError();
48285 if (mem_base != xmlMemBlocks()) {
48286 printf("Leak of %d blocks found in xmlXPathNodeEval",
48287 xmlMemBlocks() - mem_base);
48289 printf(" %d", n_node);
48290 printf(" %d", n_str);
48291 printf(" %d", n_ctx);
48305 test_xmlXPathNodeSetCreate(void) {
48308 #if defined(LIBXML_XPATH_ENABLED)
48310 xmlNodeSetPtr ret_val;
48311 xmlNodePtr val; /* an initial xmlNodePtr, or NULL */
48314 for (n_val = 0;n_val < gen_nb_xmlNodePtr;n_val++) {
48315 mem_base = xmlMemBlocks();
48316 val = gen_xmlNodePtr(n_val, 0);
48318 ret_val = xmlXPathNodeSetCreate(val);
48319 desret_xmlNodeSetPtr(ret_val);
48321 des_xmlNodePtr(n_val, val, 0);
48322 xmlResetLastError();
48323 if (mem_base != xmlMemBlocks()) {
48324 printf("Leak of %d blocks found in xmlXPathNodeSetCreate",
48325 xmlMemBlocks() - mem_base);
48327 printf(" %d", n_val);
48339 test_xmlXPathObjectCopy(void) {
48342 #if defined(LIBXML_XPATH_ENABLED)
48344 xmlXPathObjectPtr ret_val;
48345 xmlXPathObjectPtr val; /* the original object */
48348 for (n_val = 0;n_val < gen_nb_xmlXPathObjectPtr;n_val++) {
48349 mem_base = xmlMemBlocks();
48350 val = gen_xmlXPathObjectPtr(n_val, 0);
48352 ret_val = xmlXPathObjectCopy(val);
48353 desret_xmlXPathObjectPtr(ret_val);
48355 des_xmlXPathObjectPtr(n_val, val, 0);
48356 xmlResetLastError();
48357 if (mem_base != xmlMemBlocks()) {
48358 printf("Leak of %d blocks found in xmlXPathObjectCopy",
48359 xmlMemBlocks() - mem_base);
48361 printf(" %d", n_val);
48373 test_xmlXPathOrderDocElems(void) {
48376 #if defined(LIBXML_XPATH_ENABLED)
48379 xmlDocPtr doc; /* an input document */
48382 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
48383 mem_base = xmlMemBlocks();
48384 doc = gen_xmlDocPtr(n_doc, 0);
48386 ret_val = xmlXPathOrderDocElems(doc);
48387 desret_long(ret_val);
48389 des_xmlDocPtr(n_doc, doc, 0);
48390 xmlResetLastError();
48391 if (mem_base != xmlMemBlocks()) {
48392 printf("Leak of %d blocks found in xmlXPathOrderDocElems",
48393 xmlMemBlocks() - mem_base);
48395 printf(" %d", n_doc);
48407 test_xmlXPathSetContextNode(void) {
48410 #if defined(LIBXML_XPATH_ENABLED)
48413 xmlNodePtr node; /* the node to to use as the context node */
48415 xmlXPathContextPtr ctx; /* the XPath context */
48418 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
48419 for (n_ctx = 0;n_ctx < gen_nb_xmlXPathContextPtr;n_ctx++) {
48420 mem_base = xmlMemBlocks();
48421 node = gen_xmlNodePtr(n_node, 0);
48422 ctx = gen_xmlXPathContextPtr(n_ctx, 1);
48424 ret_val = xmlXPathSetContextNode(node, ctx);
48425 desret_int(ret_val);
48427 des_xmlNodePtr(n_node, node, 0);
48428 des_xmlXPathContextPtr(n_ctx, ctx, 1);
48429 xmlResetLastError();
48430 if (mem_base != xmlMemBlocks()) {
48431 printf("Leak of %d blocks found in xmlXPathSetContextNode",
48432 xmlMemBlocks() - mem_base);
48434 printf(" %d", n_node);
48435 printf(" %d", n_ctx);
48451 if (quiet == 0) printf("Testing xpath : 32 of 40 functions ...\n");
48452 rc = test_xmlXPathCastBooleanToNumber();
48453 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48454 rc = test_xmlXPathCastBooleanToString();
48455 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48456 rc = test_xmlXPathCastNodeSetToBoolean();
48457 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48458 rc = test_xmlXPathCastNodeSetToNumber();
48459 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48460 rc = test_xmlXPathCastNodeSetToString();
48461 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48462 rc = test_xmlXPathCastNodeToNumber();
48463 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48464 rc = test_xmlXPathCastNodeToString();
48465 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48466 rc = test_xmlXPathCastNumberToBoolean();
48467 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48468 rc = test_xmlXPathCastNumberToString();
48469 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48470 rc = test_xmlXPathCastStringToBoolean();
48471 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48472 rc = test_xmlXPathCastStringToNumber();
48473 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48474 rc = test_xmlXPathCastToBoolean();
48475 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48476 rc = test_xmlXPathCastToNumber();
48477 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48478 rc = test_xmlXPathCastToString();
48479 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48480 rc = test_xmlXPathCmpNodes();
48481 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48482 rc = test_xmlXPathCompile();
48483 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48484 rc = test_xmlXPathCompiledEval();
48485 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48486 rc = test_xmlXPathCompiledEvalToBoolean();
48487 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48488 rc = test_xmlXPathContextSetCache();
48489 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48490 rc = test_xmlXPathConvertBoolean();
48491 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48492 rc = test_xmlXPathConvertNumber();
48493 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48494 rc = test_xmlXPathConvertString();
48495 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48496 rc = test_xmlXPathCtxtCompile();
48497 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48498 rc = test_xmlXPathEval();
48499 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48500 rc = test_xmlXPathEvalExpression();
48501 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48502 rc = test_xmlXPathEvalPredicate();
48503 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48504 rc = test_xmlXPathInit();
48505 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48506 rc = test_xmlXPathIsInf();
48507 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48508 rc = test_xmlXPathIsNaN();
48509 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48510 rc = test_xmlXPathNewContext();
48511 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48512 rc = test_xmlXPathNodeEval();
48513 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48514 rc = test_xmlXPathNodeSetCreate();
48515 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48516 rc = test_xmlXPathObjectCopy();
48517 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48518 rc = test_xmlXPathOrderDocElems();
48519 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48520 rc = test_xmlXPathSetContextNode();
48521 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48524 printf("Module xpath: %d errors\n", test_ret);
48527 #ifdef LIBXML_XPATH_ENABLED
48529 #define gen_nb_xmlXPathParserContextPtr 1
48530 static xmlXPathParserContextPtr gen_xmlXPathParserContextPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
48533 static void des_xmlXPathParserContextPtr(int no ATTRIBUTE_UNUSED, xmlXPathParserContextPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
48539 test_valuePop(void) {
48542 #if defined(LIBXML_XPATH_ENABLED)
48544 xmlXPathObjectPtr ret_val;
48545 xmlXPathParserContextPtr ctxt; /* an XPath evaluation context */
48548 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
48549 mem_base = xmlMemBlocks();
48550 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
48552 ret_val = valuePop(ctxt);
48553 desret_xmlXPathObjectPtr(ret_val);
48555 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
48556 xmlResetLastError();
48557 if (mem_base != xmlMemBlocks()) {
48558 printf("Leak of %d blocks found in valuePop",
48559 xmlMemBlocks() - mem_base);
48561 printf(" %d", n_ctxt);
48573 test_valuePush(void) {
48576 #if defined(LIBXML_XPATH_ENABLED)
48579 xmlXPathParserContextPtr ctxt; /* an XPath evaluation context */
48581 xmlXPathObjectPtr value; /* the XPath object */
48584 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
48585 for (n_value = 0;n_value < gen_nb_xmlXPathObjectPtr;n_value++) {
48586 mem_base = xmlMemBlocks();
48587 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
48588 value = gen_xmlXPathObjectPtr(n_value, 1);
48590 ret_val = valuePush(ctxt, value);
48591 desret_int(ret_val);
48593 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
48594 des_xmlXPathObjectPtr(n_value, value, 1);
48595 xmlResetLastError();
48596 if (mem_base != xmlMemBlocks()) {
48597 printf("Leak of %d blocks found in valuePush",
48598 xmlMemBlocks() - mem_base);
48600 printf(" %d", n_ctxt);
48601 printf(" %d", n_value);
48614 test_xmlXPathAddValues(void) {
48617 #if defined(LIBXML_XPATH_ENABLED)
48619 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
48622 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
48623 mem_base = xmlMemBlocks();
48624 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
48626 xmlXPathAddValues(ctxt);
48628 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
48629 xmlResetLastError();
48630 if (mem_base != xmlMemBlocks()) {
48631 printf("Leak of %d blocks found in xmlXPathAddValues",
48632 xmlMemBlocks() - mem_base);
48634 printf(" %d", n_ctxt);
48646 test_xmlXPathBooleanFunction(void) {
48649 #if defined(LIBXML_XPATH_ENABLED)
48651 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
48653 int nargs; /* the number of arguments */
48656 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
48657 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
48658 mem_base = xmlMemBlocks();
48659 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
48660 nargs = gen_int(n_nargs, 1);
48662 xmlXPathBooleanFunction(ctxt, nargs);
48664 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
48665 des_int(n_nargs, nargs, 1);
48666 xmlResetLastError();
48667 if (mem_base != xmlMemBlocks()) {
48668 printf("Leak of %d blocks found in xmlXPathBooleanFunction",
48669 xmlMemBlocks() - mem_base);
48671 printf(" %d", n_ctxt);
48672 printf(" %d", n_nargs);
48685 test_xmlXPathCeilingFunction(void) {
48688 #if defined(LIBXML_XPATH_ENABLED)
48690 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
48692 int nargs; /* the number of arguments */
48695 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
48696 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
48697 mem_base = xmlMemBlocks();
48698 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
48699 nargs = gen_int(n_nargs, 1);
48701 xmlXPathCeilingFunction(ctxt, nargs);
48703 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
48704 des_int(n_nargs, nargs, 1);
48705 xmlResetLastError();
48706 if (mem_base != xmlMemBlocks()) {
48707 printf("Leak of %d blocks found in xmlXPathCeilingFunction",
48708 xmlMemBlocks() - mem_base);
48710 printf(" %d", n_ctxt);
48711 printf(" %d", n_nargs);
48724 test_xmlXPathCompareValues(void) {
48727 #if defined(LIBXML_XPATH_ENABLED)
48730 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
48732 int inf; /* less than (1) or greater than (0) */
48734 int strict; /* is the comparison strict */
48737 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
48738 for (n_inf = 0;n_inf < gen_nb_int;n_inf++) {
48739 for (n_strict = 0;n_strict < gen_nb_int;n_strict++) {
48740 mem_base = xmlMemBlocks();
48741 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
48742 inf = gen_int(n_inf, 1);
48743 strict = gen_int(n_strict, 2);
48745 ret_val = xmlXPathCompareValues(ctxt, inf, strict);
48746 desret_int(ret_val);
48748 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
48749 des_int(n_inf, inf, 1);
48750 des_int(n_strict, strict, 2);
48751 xmlResetLastError();
48752 if (mem_base != xmlMemBlocks()) {
48753 printf("Leak of %d blocks found in xmlXPathCompareValues",
48754 xmlMemBlocks() - mem_base);
48756 printf(" %d", n_ctxt);
48757 printf(" %d", n_inf);
48758 printf(" %d", n_strict);
48772 test_xmlXPathConcatFunction(void) {
48775 #if defined(LIBXML_XPATH_ENABLED)
48777 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
48779 int nargs; /* the number of arguments */
48782 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
48783 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
48784 mem_base = xmlMemBlocks();
48785 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
48786 nargs = gen_int(n_nargs, 1);
48788 xmlXPathConcatFunction(ctxt, nargs);
48790 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
48791 des_int(n_nargs, nargs, 1);
48792 xmlResetLastError();
48793 if (mem_base != xmlMemBlocks()) {
48794 printf("Leak of %d blocks found in xmlXPathConcatFunction",
48795 xmlMemBlocks() - mem_base);
48797 printf(" %d", n_ctxt);
48798 printf(" %d", n_nargs);
48811 test_xmlXPathContainsFunction(void) {
48814 #if defined(LIBXML_XPATH_ENABLED)
48816 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
48818 int nargs; /* the number of arguments */
48821 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
48822 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
48823 mem_base = xmlMemBlocks();
48824 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
48825 nargs = gen_int(n_nargs, 1);
48827 xmlXPathContainsFunction(ctxt, nargs);
48829 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
48830 des_int(n_nargs, nargs, 1);
48831 xmlResetLastError();
48832 if (mem_base != xmlMemBlocks()) {
48833 printf("Leak of %d blocks found in xmlXPathContainsFunction",
48834 xmlMemBlocks() - mem_base);
48836 printf(" %d", n_ctxt);
48837 printf(" %d", n_nargs);
48850 test_xmlXPathCountFunction(void) {
48853 #if defined(LIBXML_XPATH_ENABLED)
48855 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
48857 int nargs; /* the number of arguments */
48860 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
48861 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
48862 mem_base = xmlMemBlocks();
48863 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
48864 nargs = gen_int(n_nargs, 1);
48866 xmlXPathCountFunction(ctxt, nargs);
48868 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
48869 des_int(n_nargs, nargs, 1);
48870 xmlResetLastError();
48871 if (mem_base != xmlMemBlocks()) {
48872 printf("Leak of %d blocks found in xmlXPathCountFunction",
48873 xmlMemBlocks() - mem_base);
48875 printf(" %d", n_ctxt);
48876 printf(" %d", n_nargs);
48889 test_xmlXPathDebugDumpCompExpr(void) {
48892 #if defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_DEBUG_ENABLED)
48894 FILE * output; /* the FILE * for the output */
48896 xmlXPathCompExprPtr comp; /* the precompiled XPath expression */
48898 int depth; /* the indentation level. */
48901 for (n_output = 0;n_output < gen_nb_FILE_ptr;n_output++) {
48902 for (n_comp = 0;n_comp < gen_nb_xmlXPathCompExprPtr;n_comp++) {
48903 for (n_depth = 0;n_depth < gen_nb_int;n_depth++) {
48904 mem_base = xmlMemBlocks();
48905 output = gen_FILE_ptr(n_output, 0);
48906 comp = gen_xmlXPathCompExprPtr(n_comp, 1);
48907 depth = gen_int(n_depth, 2);
48909 xmlXPathDebugDumpCompExpr(output, comp, depth);
48911 des_FILE_ptr(n_output, output, 0);
48912 des_xmlXPathCompExprPtr(n_comp, comp, 1);
48913 des_int(n_depth, depth, 2);
48914 xmlResetLastError();
48915 if (mem_base != xmlMemBlocks()) {
48916 printf("Leak of %d blocks found in xmlXPathDebugDumpCompExpr",
48917 xmlMemBlocks() - mem_base);
48919 printf(" %d", n_output);
48920 printf(" %d", n_comp);
48921 printf(" %d", n_depth);
48935 test_xmlXPathDebugDumpObject(void) {
48938 #if defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_DEBUG_ENABLED)
48940 FILE * output; /* the FILE * to dump the output */
48942 xmlXPathObjectPtr cur; /* the object to inspect */
48944 int depth; /* indentation level */
48947 for (n_output = 0;n_output < gen_nb_FILE_ptr;n_output++) {
48948 for (n_cur = 0;n_cur < gen_nb_xmlXPathObjectPtr;n_cur++) {
48949 for (n_depth = 0;n_depth < gen_nb_int;n_depth++) {
48950 mem_base = xmlMemBlocks();
48951 output = gen_FILE_ptr(n_output, 0);
48952 cur = gen_xmlXPathObjectPtr(n_cur, 1);
48953 depth = gen_int(n_depth, 2);
48955 xmlXPathDebugDumpObject(output, cur, depth);
48957 des_FILE_ptr(n_output, output, 0);
48958 des_xmlXPathObjectPtr(n_cur, cur, 1);
48959 des_int(n_depth, depth, 2);
48960 xmlResetLastError();
48961 if (mem_base != xmlMemBlocks()) {
48962 printf("Leak of %d blocks found in xmlXPathDebugDumpObject",
48963 xmlMemBlocks() - mem_base);
48965 printf(" %d", n_output);
48966 printf(" %d", n_cur);
48967 printf(" %d", n_depth);
48981 test_xmlXPathDifference(void) {
48984 #if defined(LIBXML_XPATH_ENABLED)
48986 xmlNodeSetPtr ret_val;
48987 xmlNodeSetPtr nodes1; /* a node-set */
48989 xmlNodeSetPtr nodes2; /* a node-set */
48992 for (n_nodes1 = 0;n_nodes1 < gen_nb_xmlNodeSetPtr;n_nodes1++) {
48993 for (n_nodes2 = 0;n_nodes2 < gen_nb_xmlNodeSetPtr;n_nodes2++) {
48994 mem_base = xmlMemBlocks();
48995 nodes1 = gen_xmlNodeSetPtr(n_nodes1, 0);
48996 nodes2 = gen_xmlNodeSetPtr(n_nodes2, 1);
48998 ret_val = xmlXPathDifference(nodes1, nodes2);
48999 desret_xmlNodeSetPtr(ret_val);
49001 des_xmlNodeSetPtr(n_nodes1, nodes1, 0);
49002 des_xmlNodeSetPtr(n_nodes2, nodes2, 1);
49003 xmlResetLastError();
49004 if (mem_base != xmlMemBlocks()) {
49005 printf("Leak of %d blocks found in xmlXPathDifference",
49006 xmlMemBlocks() - mem_base);
49008 printf(" %d", n_nodes1);
49009 printf(" %d", n_nodes2);
49022 test_xmlXPathDistinct(void) {
49025 #if defined(LIBXML_XPATH_ENABLED)
49027 xmlNodeSetPtr ret_val;
49028 xmlNodeSetPtr nodes; /* a node-set */
49031 for (n_nodes = 0;n_nodes < gen_nb_xmlNodeSetPtr;n_nodes++) {
49032 mem_base = xmlMemBlocks();
49033 nodes = gen_xmlNodeSetPtr(n_nodes, 0);
49035 ret_val = xmlXPathDistinct(nodes);
49036 desret_xmlNodeSetPtr(ret_val);
49038 des_xmlNodeSetPtr(n_nodes, nodes, 0);
49039 xmlResetLastError();
49040 if (mem_base != xmlMemBlocks()) {
49041 printf("Leak of %d blocks found in xmlXPathDistinct",
49042 xmlMemBlocks() - mem_base);
49044 printf(" %d", n_nodes);
49056 test_xmlXPathDistinctSorted(void) {
49059 #if defined(LIBXML_XPATH_ENABLED)
49061 xmlNodeSetPtr ret_val;
49062 xmlNodeSetPtr nodes; /* a node-set, sorted by document order */
49065 for (n_nodes = 0;n_nodes < gen_nb_xmlNodeSetPtr;n_nodes++) {
49066 mem_base = xmlMemBlocks();
49067 nodes = gen_xmlNodeSetPtr(n_nodes, 0);
49069 ret_val = xmlXPathDistinctSorted(nodes);
49070 desret_xmlNodeSetPtr(ret_val);
49072 des_xmlNodeSetPtr(n_nodes, nodes, 0);
49073 xmlResetLastError();
49074 if (mem_base != xmlMemBlocks()) {
49075 printf("Leak of %d blocks found in xmlXPathDistinctSorted",
49076 xmlMemBlocks() - mem_base);
49078 printf(" %d", n_nodes);
49090 test_xmlXPathDivValues(void) {
49093 #if defined(LIBXML_XPATH_ENABLED)
49095 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
49098 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
49099 mem_base = xmlMemBlocks();
49100 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
49102 xmlXPathDivValues(ctxt);
49104 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
49105 xmlResetLastError();
49106 if (mem_base != xmlMemBlocks()) {
49107 printf("Leak of %d blocks found in xmlXPathDivValues",
49108 xmlMemBlocks() - mem_base);
49110 printf(" %d", n_ctxt);
49122 test_xmlXPathEqualValues(void) {
49125 #if defined(LIBXML_XPATH_ENABLED)
49128 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
49131 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
49132 mem_base = xmlMemBlocks();
49133 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
49135 ret_val = xmlXPathEqualValues(ctxt);
49136 desret_int(ret_val);
49138 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
49139 xmlResetLastError();
49140 if (mem_base != xmlMemBlocks()) {
49141 printf("Leak of %d blocks found in xmlXPathEqualValues",
49142 xmlMemBlocks() - mem_base);
49144 printf(" %d", n_ctxt);
49156 test_xmlXPathErr(void) {
49159 #if defined(LIBXML_XPATH_ENABLED)
49161 xmlXPathParserContextPtr ctxt; /* a XPath parser context */
49163 int error; /* the error code */
49166 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
49167 for (n_error = 0;n_error < gen_nb_int;n_error++) {
49168 mem_base = xmlMemBlocks();
49169 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
49170 error = gen_int(n_error, 1);
49172 xmlXPathErr(ctxt, error);
49174 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
49175 des_int(n_error, error, 1);
49176 xmlResetLastError();
49177 if (mem_base != xmlMemBlocks()) {
49178 printf("Leak of %d blocks found in xmlXPathErr",
49179 xmlMemBlocks() - mem_base);
49181 printf(" %d", n_ctxt);
49182 printf(" %d", n_error);
49195 test_xmlXPathEvalExpr(void) {
49198 #if defined(LIBXML_XPATH_ENABLED)
49200 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
49203 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
49204 mem_base = xmlMemBlocks();
49205 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
49207 xmlXPathEvalExpr(ctxt);
49209 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
49210 xmlResetLastError();
49211 if (mem_base != xmlMemBlocks()) {
49212 printf("Leak of %d blocks found in xmlXPathEvalExpr",
49213 xmlMemBlocks() - mem_base);
49215 printf(" %d", n_ctxt);
49227 test_xmlXPathEvaluatePredicateResult(void) {
49230 #if defined(LIBXML_XPATH_ENABLED)
49233 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
49235 xmlXPathObjectPtr res; /* the Predicate Expression evaluation result */
49238 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
49239 for (n_res = 0;n_res < gen_nb_xmlXPathObjectPtr;n_res++) {
49240 mem_base = xmlMemBlocks();
49241 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
49242 res = gen_xmlXPathObjectPtr(n_res, 1);
49244 ret_val = xmlXPathEvaluatePredicateResult(ctxt, res);
49245 desret_int(ret_val);
49247 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
49248 des_xmlXPathObjectPtr(n_res, res, 1);
49249 xmlResetLastError();
49250 if (mem_base != xmlMemBlocks()) {
49251 printf("Leak of %d blocks found in xmlXPathEvaluatePredicateResult",
49252 xmlMemBlocks() - mem_base);
49254 printf(" %d", n_ctxt);
49255 printf(" %d", n_res);
49268 test_xmlXPathFalseFunction(void) {
49271 #if defined(LIBXML_XPATH_ENABLED)
49273 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
49275 int nargs; /* the number of arguments */
49278 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
49279 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
49280 mem_base = xmlMemBlocks();
49281 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
49282 nargs = gen_int(n_nargs, 1);
49284 xmlXPathFalseFunction(ctxt, nargs);
49286 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
49287 des_int(n_nargs, nargs, 1);
49288 xmlResetLastError();
49289 if (mem_base != xmlMemBlocks()) {
49290 printf("Leak of %d blocks found in xmlXPathFalseFunction",
49291 xmlMemBlocks() - mem_base);
49293 printf(" %d", n_ctxt);
49294 printf(" %d", n_nargs);
49307 test_xmlXPathFloorFunction(void) {
49310 #if defined(LIBXML_XPATH_ENABLED)
49312 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
49314 int nargs; /* the number of arguments */
49317 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
49318 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
49319 mem_base = xmlMemBlocks();
49320 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
49321 nargs = gen_int(n_nargs, 1);
49323 xmlXPathFloorFunction(ctxt, nargs);
49325 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
49326 des_int(n_nargs, nargs, 1);
49327 xmlResetLastError();
49328 if (mem_base != xmlMemBlocks()) {
49329 printf("Leak of %d blocks found in xmlXPathFloorFunction",
49330 xmlMemBlocks() - mem_base);
49332 printf(" %d", n_ctxt);
49333 printf(" %d", n_nargs);
49346 test_xmlXPathFunctionLookup(void) {
49350 /* missing type support */
49356 test_xmlXPathFunctionLookupNS(void) {
49360 /* missing type support */
49366 test_xmlXPathHasSameNodes(void) {
49369 #if defined(LIBXML_XPATH_ENABLED)
49372 xmlNodeSetPtr nodes1; /* a node-set */
49374 xmlNodeSetPtr nodes2; /* a node-set */
49377 for (n_nodes1 = 0;n_nodes1 < gen_nb_xmlNodeSetPtr;n_nodes1++) {
49378 for (n_nodes2 = 0;n_nodes2 < gen_nb_xmlNodeSetPtr;n_nodes2++) {
49379 mem_base = xmlMemBlocks();
49380 nodes1 = gen_xmlNodeSetPtr(n_nodes1, 0);
49381 nodes2 = gen_xmlNodeSetPtr(n_nodes2, 1);
49383 ret_val = xmlXPathHasSameNodes(nodes1, nodes2);
49384 desret_int(ret_val);
49386 des_xmlNodeSetPtr(n_nodes1, nodes1, 0);
49387 des_xmlNodeSetPtr(n_nodes2, nodes2, 1);
49388 xmlResetLastError();
49389 if (mem_base != xmlMemBlocks()) {
49390 printf("Leak of %d blocks found in xmlXPathHasSameNodes",
49391 xmlMemBlocks() - mem_base);
49393 printf(" %d", n_nodes1);
49394 printf(" %d", n_nodes2);
49407 test_xmlXPathIdFunction(void) {
49410 #if defined(LIBXML_XPATH_ENABLED)
49412 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
49414 int nargs; /* the number of arguments */
49417 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
49418 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
49419 mem_base = xmlMemBlocks();
49420 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
49421 nargs = gen_int(n_nargs, 1);
49423 xmlXPathIdFunction(ctxt, nargs);
49425 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
49426 des_int(n_nargs, nargs, 1);
49427 xmlResetLastError();
49428 if (mem_base != xmlMemBlocks()) {
49429 printf("Leak of %d blocks found in xmlXPathIdFunction",
49430 xmlMemBlocks() - mem_base);
49432 printf(" %d", n_ctxt);
49433 printf(" %d", n_nargs);
49446 test_xmlXPathIntersection(void) {
49449 #if defined(LIBXML_XPATH_ENABLED)
49451 xmlNodeSetPtr ret_val;
49452 xmlNodeSetPtr nodes1; /* a node-set */
49454 xmlNodeSetPtr nodes2; /* a node-set */
49457 for (n_nodes1 = 0;n_nodes1 < gen_nb_xmlNodeSetPtr;n_nodes1++) {
49458 for (n_nodes2 = 0;n_nodes2 < gen_nb_xmlNodeSetPtr;n_nodes2++) {
49459 mem_base = xmlMemBlocks();
49460 nodes1 = gen_xmlNodeSetPtr(n_nodes1, 0);
49461 nodes2 = gen_xmlNodeSetPtr(n_nodes2, 1);
49463 ret_val = xmlXPathIntersection(nodes1, nodes2);
49464 desret_xmlNodeSetPtr(ret_val);
49466 des_xmlNodeSetPtr(n_nodes1, nodes1, 0);
49467 des_xmlNodeSetPtr(n_nodes2, nodes2, 1);
49468 xmlResetLastError();
49469 if (mem_base != xmlMemBlocks()) {
49470 printf("Leak of %d blocks found in xmlXPathIntersection",
49471 xmlMemBlocks() - mem_base);
49473 printf(" %d", n_nodes1);
49474 printf(" %d", n_nodes2);
49487 test_xmlXPathIsNodeType(void) {
49490 #if defined(LIBXML_XPATH_ENABLED)
49493 xmlChar * name; /* a name string */
49496 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
49497 mem_base = xmlMemBlocks();
49498 name = gen_const_xmlChar_ptr(n_name, 0);
49500 ret_val = xmlXPathIsNodeType((const xmlChar *)name);
49501 desret_int(ret_val);
49503 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 0);
49504 xmlResetLastError();
49505 if (mem_base != xmlMemBlocks()) {
49506 printf("Leak of %d blocks found in xmlXPathIsNodeType",
49507 xmlMemBlocks() - mem_base);
49509 printf(" %d", n_name);
49521 test_xmlXPathLangFunction(void) {
49524 #if defined(LIBXML_XPATH_ENABLED)
49526 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
49528 int nargs; /* the number of arguments */
49531 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
49532 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
49533 mem_base = xmlMemBlocks();
49534 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
49535 nargs = gen_int(n_nargs, 1);
49537 xmlXPathLangFunction(ctxt, nargs);
49539 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
49540 des_int(n_nargs, nargs, 1);
49541 xmlResetLastError();
49542 if (mem_base != xmlMemBlocks()) {
49543 printf("Leak of %d blocks found in xmlXPathLangFunction",
49544 xmlMemBlocks() - mem_base);
49546 printf(" %d", n_ctxt);
49547 printf(" %d", n_nargs);
49560 test_xmlXPathLastFunction(void) {
49563 #if defined(LIBXML_XPATH_ENABLED)
49565 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
49567 int nargs; /* the number of arguments */
49570 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
49571 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
49572 mem_base = xmlMemBlocks();
49573 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
49574 nargs = gen_int(n_nargs, 1);
49576 xmlXPathLastFunction(ctxt, nargs);
49578 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
49579 des_int(n_nargs, nargs, 1);
49580 xmlResetLastError();
49581 if (mem_base != xmlMemBlocks()) {
49582 printf("Leak of %d blocks found in xmlXPathLastFunction",
49583 xmlMemBlocks() - mem_base);
49585 printf(" %d", n_ctxt);
49586 printf(" %d", n_nargs);
49599 test_xmlXPathLeading(void) {
49602 #if defined(LIBXML_XPATH_ENABLED)
49604 xmlNodeSetPtr ret_val;
49605 xmlNodeSetPtr nodes1; /* a node-set */
49607 xmlNodeSetPtr nodes2; /* a node-set */
49610 for (n_nodes1 = 0;n_nodes1 < gen_nb_xmlNodeSetPtr;n_nodes1++) {
49611 for (n_nodes2 = 0;n_nodes2 < gen_nb_xmlNodeSetPtr;n_nodes2++) {
49612 mem_base = xmlMemBlocks();
49613 nodes1 = gen_xmlNodeSetPtr(n_nodes1, 0);
49614 nodes2 = gen_xmlNodeSetPtr(n_nodes2, 1);
49616 ret_val = xmlXPathLeading(nodes1, nodes2);
49617 desret_xmlNodeSetPtr(ret_val);
49619 des_xmlNodeSetPtr(n_nodes1, nodes1, 0);
49620 des_xmlNodeSetPtr(n_nodes2, nodes2, 1);
49621 xmlResetLastError();
49622 if (mem_base != xmlMemBlocks()) {
49623 printf("Leak of %d blocks found in xmlXPathLeading",
49624 xmlMemBlocks() - mem_base);
49626 printf(" %d", n_nodes1);
49627 printf(" %d", n_nodes2);
49640 test_xmlXPathLeadingSorted(void) {
49643 #if defined(LIBXML_XPATH_ENABLED)
49645 xmlNodeSetPtr ret_val;
49646 xmlNodeSetPtr nodes1; /* a node-set, sorted by document order */
49648 xmlNodeSetPtr nodes2; /* a node-set, sorted by document order */
49651 for (n_nodes1 = 0;n_nodes1 < gen_nb_xmlNodeSetPtr;n_nodes1++) {
49652 for (n_nodes2 = 0;n_nodes2 < gen_nb_xmlNodeSetPtr;n_nodes2++) {
49653 mem_base = xmlMemBlocks();
49654 nodes1 = gen_xmlNodeSetPtr(n_nodes1, 0);
49655 nodes2 = gen_xmlNodeSetPtr(n_nodes2, 1);
49657 ret_val = xmlXPathLeadingSorted(nodes1, nodes2);
49658 desret_xmlNodeSetPtr(ret_val);
49660 des_xmlNodeSetPtr(n_nodes1, nodes1, 0);
49661 des_xmlNodeSetPtr(n_nodes2, nodes2, 1);
49662 xmlResetLastError();
49663 if (mem_base != xmlMemBlocks()) {
49664 printf("Leak of %d blocks found in xmlXPathLeadingSorted",
49665 xmlMemBlocks() - mem_base);
49667 printf(" %d", n_nodes1);
49668 printf(" %d", n_nodes2);
49681 test_xmlXPathLocalNameFunction(void) {
49684 #if defined(LIBXML_XPATH_ENABLED)
49686 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
49688 int nargs; /* the number of arguments */
49691 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
49692 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
49693 mem_base = xmlMemBlocks();
49694 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
49695 nargs = gen_int(n_nargs, 1);
49697 xmlXPathLocalNameFunction(ctxt, nargs);
49699 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
49700 des_int(n_nargs, nargs, 1);
49701 xmlResetLastError();
49702 if (mem_base != xmlMemBlocks()) {
49703 printf("Leak of %d blocks found in xmlXPathLocalNameFunction",
49704 xmlMemBlocks() - mem_base);
49706 printf(" %d", n_ctxt);
49707 printf(" %d", n_nargs);
49720 test_xmlXPathModValues(void) {
49723 #if defined(LIBXML_XPATH_ENABLED)
49725 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
49728 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
49729 mem_base = xmlMemBlocks();
49730 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
49732 xmlXPathModValues(ctxt);
49734 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
49735 xmlResetLastError();
49736 if (mem_base != xmlMemBlocks()) {
49737 printf("Leak of %d blocks found in xmlXPathModValues",
49738 xmlMemBlocks() - mem_base);
49740 printf(" %d", n_ctxt);
49752 test_xmlXPathMultValues(void) {
49755 #if defined(LIBXML_XPATH_ENABLED)
49757 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
49760 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
49761 mem_base = xmlMemBlocks();
49762 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
49764 xmlXPathMultValues(ctxt);
49766 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
49767 xmlResetLastError();
49768 if (mem_base != xmlMemBlocks()) {
49769 printf("Leak of %d blocks found in xmlXPathMultValues",
49770 xmlMemBlocks() - mem_base);
49772 printf(" %d", n_ctxt);
49784 test_xmlXPathNamespaceURIFunction(void) {
49787 #if defined(LIBXML_XPATH_ENABLED)
49789 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
49791 int nargs; /* the number of arguments */
49794 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
49795 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
49796 mem_base = xmlMemBlocks();
49797 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
49798 nargs = gen_int(n_nargs, 1);
49800 xmlXPathNamespaceURIFunction(ctxt, nargs);
49802 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
49803 des_int(n_nargs, nargs, 1);
49804 xmlResetLastError();
49805 if (mem_base != xmlMemBlocks()) {
49806 printf("Leak of %d blocks found in xmlXPathNamespaceURIFunction",
49807 xmlMemBlocks() - mem_base);
49809 printf(" %d", n_ctxt);
49810 printf(" %d", n_nargs);
49823 test_xmlXPathNewBoolean(void) {
49826 #if defined(LIBXML_XPATH_ENABLED)
49828 xmlXPathObjectPtr ret_val;
49829 int val; /* the boolean value */
49832 for (n_val = 0;n_val < gen_nb_int;n_val++) {
49833 mem_base = xmlMemBlocks();
49834 val = gen_int(n_val, 0);
49836 ret_val = xmlXPathNewBoolean(val);
49837 desret_xmlXPathObjectPtr(ret_val);
49839 des_int(n_val, val, 0);
49840 xmlResetLastError();
49841 if (mem_base != xmlMemBlocks()) {
49842 printf("Leak of %d blocks found in xmlXPathNewBoolean",
49843 xmlMemBlocks() - mem_base);
49845 printf(" %d", n_val);
49857 test_xmlXPathNewCString(void) {
49860 #if defined(LIBXML_XPATH_ENABLED)
49862 xmlXPathObjectPtr ret_val;
49863 char * val; /* the char * value */
49866 for (n_val = 0;n_val < gen_nb_const_char_ptr;n_val++) {
49867 mem_base = xmlMemBlocks();
49868 val = gen_const_char_ptr(n_val, 0);
49870 ret_val = xmlXPathNewCString((const char *)val);
49871 desret_xmlXPathObjectPtr(ret_val);
49873 des_const_char_ptr(n_val, (const char *)val, 0);
49874 xmlResetLastError();
49875 if (mem_base != xmlMemBlocks()) {
49876 printf("Leak of %d blocks found in xmlXPathNewCString",
49877 xmlMemBlocks() - mem_base);
49879 printf(" %d", n_val);
49891 test_xmlXPathNewFloat(void) {
49894 #if defined(LIBXML_XPATH_ENABLED)
49896 xmlXPathObjectPtr ret_val;
49897 double val; /* the double value */
49900 for (n_val = 0;n_val < gen_nb_double;n_val++) {
49901 mem_base = xmlMemBlocks();
49902 val = gen_double(n_val, 0);
49904 ret_val = xmlXPathNewFloat(val);
49905 desret_xmlXPathObjectPtr(ret_val);
49907 des_double(n_val, val, 0);
49908 xmlResetLastError();
49909 if (mem_base != xmlMemBlocks()) {
49910 printf("Leak of %d blocks found in xmlXPathNewFloat",
49911 xmlMemBlocks() - mem_base);
49913 printf(" %d", n_val);
49925 test_xmlXPathNewNodeSet(void) {
49928 #if defined(LIBXML_XPATH_ENABLED)
49930 xmlXPathObjectPtr ret_val;
49931 xmlNodePtr val; /* the NodePtr value */
49934 for (n_val = 0;n_val < gen_nb_xmlNodePtr;n_val++) {
49935 mem_base = xmlMemBlocks();
49936 val = gen_xmlNodePtr(n_val, 0);
49938 ret_val = xmlXPathNewNodeSet(val);
49939 desret_xmlXPathObjectPtr(ret_val);
49941 des_xmlNodePtr(n_val, val, 0);
49942 xmlResetLastError();
49943 if (mem_base != xmlMemBlocks()) {
49944 printf("Leak of %d blocks found in xmlXPathNewNodeSet",
49945 xmlMemBlocks() - mem_base);
49947 printf(" %d", n_val);
49959 test_xmlXPathNewNodeSetList(void) {
49962 #if defined(LIBXML_XPATH_ENABLED)
49964 xmlXPathObjectPtr ret_val;
49965 xmlNodeSetPtr val; /* an existing NodeSet */
49968 for (n_val = 0;n_val < gen_nb_xmlNodeSetPtr;n_val++) {
49969 mem_base = xmlMemBlocks();
49970 val = gen_xmlNodeSetPtr(n_val, 0);
49972 ret_val = xmlXPathNewNodeSetList(val);
49973 desret_xmlXPathObjectPtr(ret_val);
49975 des_xmlNodeSetPtr(n_val, val, 0);
49976 xmlResetLastError();
49977 if (mem_base != xmlMemBlocks()) {
49978 printf("Leak of %d blocks found in xmlXPathNewNodeSetList",
49979 xmlMemBlocks() - mem_base);
49981 printf(" %d", n_val);
49993 test_xmlXPathNewParserContext(void) {
49997 /* missing type support */
50003 test_xmlXPathNewString(void) {
50006 #if defined(LIBXML_XPATH_ENABLED)
50008 xmlXPathObjectPtr ret_val;
50009 xmlChar * val; /* the xmlChar * value */
50012 for (n_val = 0;n_val < gen_nb_const_xmlChar_ptr;n_val++) {
50013 mem_base = xmlMemBlocks();
50014 val = gen_const_xmlChar_ptr(n_val, 0);
50016 ret_val = xmlXPathNewString((const xmlChar *)val);
50017 desret_xmlXPathObjectPtr(ret_val);
50019 des_const_xmlChar_ptr(n_val, (const xmlChar *)val, 0);
50020 xmlResetLastError();
50021 if (mem_base != xmlMemBlocks()) {
50022 printf("Leak of %d blocks found in xmlXPathNewString",
50023 xmlMemBlocks() - mem_base);
50025 printf(" %d", n_val);
50037 test_xmlXPathNextAncestor(void) {
50040 #if defined(LIBXML_XPATH_ENABLED)
50042 xmlNodePtr ret_val;
50043 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
50045 xmlNodePtr cur; /* the current node in the traversal */
50048 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
50049 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
50050 mem_base = xmlMemBlocks();
50051 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
50052 cur = gen_xmlNodePtr(n_cur, 1);
50054 ret_val = xmlXPathNextAncestor(ctxt, cur);
50055 desret_xmlNodePtr(ret_val);
50057 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
50058 des_xmlNodePtr(n_cur, cur, 1);
50059 xmlResetLastError();
50060 if (mem_base != xmlMemBlocks()) {
50061 printf("Leak of %d blocks found in xmlXPathNextAncestor",
50062 xmlMemBlocks() - mem_base);
50064 printf(" %d", n_ctxt);
50065 printf(" %d", n_cur);
50078 test_xmlXPathNextAncestorOrSelf(void) {
50081 #if defined(LIBXML_XPATH_ENABLED)
50083 xmlNodePtr ret_val;
50084 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
50086 xmlNodePtr cur; /* the current node in the traversal */
50089 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
50090 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
50091 mem_base = xmlMemBlocks();
50092 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
50093 cur = gen_xmlNodePtr(n_cur, 1);
50095 ret_val = xmlXPathNextAncestorOrSelf(ctxt, cur);
50096 desret_xmlNodePtr(ret_val);
50098 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
50099 des_xmlNodePtr(n_cur, cur, 1);
50100 xmlResetLastError();
50101 if (mem_base != xmlMemBlocks()) {
50102 printf("Leak of %d blocks found in xmlXPathNextAncestorOrSelf",
50103 xmlMemBlocks() - mem_base);
50105 printf(" %d", n_ctxt);
50106 printf(" %d", n_cur);
50119 test_xmlXPathNextAttribute(void) {
50122 #if defined(LIBXML_XPATH_ENABLED)
50124 xmlNodePtr ret_val;
50125 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
50127 xmlNodePtr cur; /* the current attribute in the traversal */
50130 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
50131 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
50132 mem_base = xmlMemBlocks();
50133 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
50134 cur = gen_xmlNodePtr(n_cur, 1);
50136 ret_val = xmlXPathNextAttribute(ctxt, cur);
50137 desret_xmlNodePtr(ret_val);
50139 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
50140 des_xmlNodePtr(n_cur, cur, 1);
50141 xmlResetLastError();
50142 if (mem_base != xmlMemBlocks()) {
50143 printf("Leak of %d blocks found in xmlXPathNextAttribute",
50144 xmlMemBlocks() - mem_base);
50146 printf(" %d", n_ctxt);
50147 printf(" %d", n_cur);
50160 test_xmlXPathNextChild(void) {
50163 #if defined(LIBXML_XPATH_ENABLED)
50165 xmlNodePtr ret_val;
50166 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
50168 xmlNodePtr cur; /* the current node in the traversal */
50171 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
50172 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
50173 mem_base = xmlMemBlocks();
50174 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
50175 cur = gen_xmlNodePtr(n_cur, 1);
50177 ret_val = xmlXPathNextChild(ctxt, cur);
50178 desret_xmlNodePtr(ret_val);
50180 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
50181 des_xmlNodePtr(n_cur, cur, 1);
50182 xmlResetLastError();
50183 if (mem_base != xmlMemBlocks()) {
50184 printf("Leak of %d blocks found in xmlXPathNextChild",
50185 xmlMemBlocks() - mem_base);
50187 printf(" %d", n_ctxt);
50188 printf(" %d", n_cur);
50201 test_xmlXPathNextDescendant(void) {
50204 #if defined(LIBXML_XPATH_ENABLED)
50206 xmlNodePtr ret_val;
50207 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
50209 xmlNodePtr cur; /* the current node in the traversal */
50212 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
50213 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
50214 mem_base = xmlMemBlocks();
50215 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
50216 cur = gen_xmlNodePtr(n_cur, 1);
50218 ret_val = xmlXPathNextDescendant(ctxt, cur);
50219 desret_xmlNodePtr(ret_val);
50221 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
50222 des_xmlNodePtr(n_cur, cur, 1);
50223 xmlResetLastError();
50224 if (mem_base != xmlMemBlocks()) {
50225 printf("Leak of %d blocks found in xmlXPathNextDescendant",
50226 xmlMemBlocks() - mem_base);
50228 printf(" %d", n_ctxt);
50229 printf(" %d", n_cur);
50242 test_xmlXPathNextDescendantOrSelf(void) {
50245 #if defined(LIBXML_XPATH_ENABLED)
50247 xmlNodePtr ret_val;
50248 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
50250 xmlNodePtr cur; /* the current node in the traversal */
50253 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
50254 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
50255 mem_base = xmlMemBlocks();
50256 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
50257 cur = gen_xmlNodePtr(n_cur, 1);
50259 ret_val = xmlXPathNextDescendantOrSelf(ctxt, cur);
50260 desret_xmlNodePtr(ret_val);
50262 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
50263 des_xmlNodePtr(n_cur, cur, 1);
50264 xmlResetLastError();
50265 if (mem_base != xmlMemBlocks()) {
50266 printf("Leak of %d blocks found in xmlXPathNextDescendantOrSelf",
50267 xmlMemBlocks() - mem_base);
50269 printf(" %d", n_ctxt);
50270 printf(" %d", n_cur);
50283 test_xmlXPathNextFollowing(void) {
50286 #if defined(LIBXML_XPATH_ENABLED)
50288 xmlNodePtr ret_val;
50289 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
50291 xmlNodePtr cur; /* the current node in the traversal */
50294 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
50295 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
50296 mem_base = xmlMemBlocks();
50297 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
50298 cur = gen_xmlNodePtr(n_cur, 1);
50300 ret_val = xmlXPathNextFollowing(ctxt, cur);
50301 desret_xmlNodePtr(ret_val);
50303 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
50304 des_xmlNodePtr(n_cur, cur, 1);
50305 xmlResetLastError();
50306 if (mem_base != xmlMemBlocks()) {
50307 printf("Leak of %d blocks found in xmlXPathNextFollowing",
50308 xmlMemBlocks() - mem_base);
50310 printf(" %d", n_ctxt);
50311 printf(" %d", n_cur);
50324 test_xmlXPathNextFollowingSibling(void) {
50327 #if defined(LIBXML_XPATH_ENABLED)
50329 xmlNodePtr ret_val;
50330 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
50332 xmlNodePtr cur; /* the current node in the traversal */
50335 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
50336 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
50337 mem_base = xmlMemBlocks();
50338 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
50339 cur = gen_xmlNodePtr(n_cur, 1);
50341 ret_val = xmlXPathNextFollowingSibling(ctxt, cur);
50342 desret_xmlNodePtr(ret_val);
50344 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
50345 des_xmlNodePtr(n_cur, cur, 1);
50346 xmlResetLastError();
50347 if (mem_base != xmlMemBlocks()) {
50348 printf("Leak of %d blocks found in xmlXPathNextFollowingSibling",
50349 xmlMemBlocks() - mem_base);
50351 printf(" %d", n_ctxt);
50352 printf(" %d", n_cur);
50365 test_xmlXPathNextNamespace(void) {
50368 #if defined(LIBXML_XPATH_ENABLED)
50370 xmlNodePtr ret_val;
50371 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
50373 xmlNodePtr cur; /* the current attribute in the traversal */
50376 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
50377 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
50378 mem_base = xmlMemBlocks();
50379 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
50380 cur = gen_xmlNodePtr(n_cur, 1);
50382 ret_val = xmlXPathNextNamespace(ctxt, cur);
50383 desret_xmlNodePtr(ret_val);
50385 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
50386 des_xmlNodePtr(n_cur, cur, 1);
50387 xmlResetLastError();
50388 if (mem_base != xmlMemBlocks()) {
50389 printf("Leak of %d blocks found in xmlXPathNextNamespace",
50390 xmlMemBlocks() - mem_base);
50392 printf(" %d", n_ctxt);
50393 printf(" %d", n_cur);
50406 test_xmlXPathNextParent(void) {
50409 #if defined(LIBXML_XPATH_ENABLED)
50411 xmlNodePtr ret_val;
50412 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
50414 xmlNodePtr cur; /* the current node in the traversal */
50417 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
50418 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
50419 mem_base = xmlMemBlocks();
50420 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
50421 cur = gen_xmlNodePtr(n_cur, 1);
50423 ret_val = xmlXPathNextParent(ctxt, cur);
50424 desret_xmlNodePtr(ret_val);
50426 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
50427 des_xmlNodePtr(n_cur, cur, 1);
50428 xmlResetLastError();
50429 if (mem_base != xmlMemBlocks()) {
50430 printf("Leak of %d blocks found in xmlXPathNextParent",
50431 xmlMemBlocks() - mem_base);
50433 printf(" %d", n_ctxt);
50434 printf(" %d", n_cur);
50447 test_xmlXPathNextPreceding(void) {
50450 #if defined(LIBXML_XPATH_ENABLED)
50452 xmlNodePtr ret_val;
50453 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
50455 xmlNodePtr cur; /* the current node in the traversal */
50458 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
50459 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
50460 mem_base = xmlMemBlocks();
50461 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
50462 cur = gen_xmlNodePtr(n_cur, 1);
50464 ret_val = xmlXPathNextPreceding(ctxt, cur);
50465 desret_xmlNodePtr(ret_val);
50467 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
50468 des_xmlNodePtr(n_cur, cur, 1);
50469 xmlResetLastError();
50470 if (mem_base != xmlMemBlocks()) {
50471 printf("Leak of %d blocks found in xmlXPathNextPreceding",
50472 xmlMemBlocks() - mem_base);
50474 printf(" %d", n_ctxt);
50475 printf(" %d", n_cur);
50488 test_xmlXPathNextPrecedingSibling(void) {
50491 #if defined(LIBXML_XPATH_ENABLED)
50493 xmlNodePtr ret_val;
50494 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
50496 xmlNodePtr cur; /* the current node in the traversal */
50499 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
50500 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
50501 mem_base = xmlMemBlocks();
50502 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
50503 cur = gen_xmlNodePtr(n_cur, 1);
50505 ret_val = xmlXPathNextPrecedingSibling(ctxt, cur);
50506 desret_xmlNodePtr(ret_val);
50508 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
50509 des_xmlNodePtr(n_cur, cur, 1);
50510 xmlResetLastError();
50511 if (mem_base != xmlMemBlocks()) {
50512 printf("Leak of %d blocks found in xmlXPathNextPrecedingSibling",
50513 xmlMemBlocks() - mem_base);
50515 printf(" %d", n_ctxt);
50516 printf(" %d", n_cur);
50529 test_xmlXPathNextSelf(void) {
50532 #if defined(LIBXML_XPATH_ENABLED)
50534 xmlNodePtr ret_val;
50535 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
50537 xmlNodePtr cur; /* the current node in the traversal */
50540 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
50541 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
50542 mem_base = xmlMemBlocks();
50543 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
50544 cur = gen_xmlNodePtr(n_cur, 1);
50546 ret_val = xmlXPathNextSelf(ctxt, cur);
50547 desret_xmlNodePtr(ret_val);
50549 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
50550 des_xmlNodePtr(n_cur, cur, 1);
50551 xmlResetLastError();
50552 if (mem_base != xmlMemBlocks()) {
50553 printf("Leak of %d blocks found in xmlXPathNextSelf",
50554 xmlMemBlocks() - mem_base);
50556 printf(" %d", n_ctxt);
50557 printf(" %d", n_cur);
50570 test_xmlXPathNodeLeading(void) {
50573 #if defined(LIBXML_XPATH_ENABLED)
50575 xmlNodeSetPtr ret_val;
50576 xmlNodeSetPtr nodes; /* a node-set */
50578 xmlNodePtr node; /* a node */
50581 for (n_nodes = 0;n_nodes < gen_nb_xmlNodeSetPtr;n_nodes++) {
50582 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
50583 mem_base = xmlMemBlocks();
50584 nodes = gen_xmlNodeSetPtr(n_nodes, 0);
50585 node = gen_xmlNodePtr(n_node, 1);
50587 ret_val = xmlXPathNodeLeading(nodes, node);
50588 desret_xmlNodeSetPtr(ret_val);
50590 des_xmlNodeSetPtr(n_nodes, nodes, 0);
50591 des_xmlNodePtr(n_node, node, 1);
50592 xmlResetLastError();
50593 if (mem_base != xmlMemBlocks()) {
50594 printf("Leak of %d blocks found in xmlXPathNodeLeading",
50595 xmlMemBlocks() - mem_base);
50597 printf(" %d", n_nodes);
50598 printf(" %d", n_node);
50611 test_xmlXPathNodeLeadingSorted(void) {
50614 #if defined(LIBXML_XPATH_ENABLED)
50616 xmlNodeSetPtr ret_val;
50617 xmlNodeSetPtr nodes; /* a node-set, sorted by document order */
50619 xmlNodePtr node; /* a node */
50622 for (n_nodes = 0;n_nodes < gen_nb_xmlNodeSetPtr;n_nodes++) {
50623 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
50624 mem_base = xmlMemBlocks();
50625 nodes = gen_xmlNodeSetPtr(n_nodes, 0);
50626 node = gen_xmlNodePtr(n_node, 1);
50628 ret_val = xmlXPathNodeLeadingSorted(nodes, node);
50629 desret_xmlNodeSetPtr(ret_val);
50631 des_xmlNodeSetPtr(n_nodes, nodes, 0);
50632 des_xmlNodePtr(n_node, node, 1);
50633 xmlResetLastError();
50634 if (mem_base != xmlMemBlocks()) {
50635 printf("Leak of %d blocks found in xmlXPathNodeLeadingSorted",
50636 xmlMemBlocks() - mem_base);
50638 printf(" %d", n_nodes);
50639 printf(" %d", n_node);
50652 test_xmlXPathNodeSetAdd(void) {
50655 #if defined(LIBXML_XPATH_ENABLED)
50658 xmlNodeSetPtr cur; /* the initial node set */
50660 xmlNodePtr val; /* a new xmlNodePtr */
50663 for (n_cur = 0;n_cur < gen_nb_xmlNodeSetPtr;n_cur++) {
50664 for (n_val = 0;n_val < gen_nb_xmlNodePtr;n_val++) {
50665 mem_base = xmlMemBlocks();
50666 cur = gen_xmlNodeSetPtr(n_cur, 0);
50667 val = gen_xmlNodePtr(n_val, 1);
50669 ret_val = xmlXPathNodeSetAdd(cur, val);
50670 desret_int(ret_val);
50672 des_xmlNodeSetPtr(n_cur, cur, 0);
50673 des_xmlNodePtr(n_val, val, 1);
50674 xmlResetLastError();
50675 if (mem_base != xmlMemBlocks()) {
50676 printf("Leak of %d blocks found in xmlXPathNodeSetAdd",
50677 xmlMemBlocks() - mem_base);
50679 printf(" %d", n_cur);
50680 printf(" %d", n_val);
50693 test_xmlXPathNodeSetAddNs(void) {
50696 #if defined(LIBXML_XPATH_ENABLED)
50699 xmlNodeSetPtr cur; /* the initial node set */
50701 xmlNodePtr node; /* the hosting node */
50703 xmlNsPtr ns; /* a the namespace node */
50706 for (n_cur = 0;n_cur < gen_nb_xmlNodeSetPtr;n_cur++) {
50707 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
50708 for (n_ns = 0;n_ns < gen_nb_xmlNsPtr;n_ns++) {
50709 mem_base = xmlMemBlocks();
50710 cur = gen_xmlNodeSetPtr(n_cur, 0);
50711 node = gen_xmlNodePtr(n_node, 1);
50712 ns = gen_xmlNsPtr(n_ns, 2);
50714 ret_val = xmlXPathNodeSetAddNs(cur, node, ns);
50715 desret_int(ret_val);
50717 des_xmlNodeSetPtr(n_cur, cur, 0);
50718 des_xmlNodePtr(n_node, node, 1);
50719 des_xmlNsPtr(n_ns, ns, 2);
50720 xmlResetLastError();
50721 if (mem_base != xmlMemBlocks()) {
50722 printf("Leak of %d blocks found in xmlXPathNodeSetAddNs",
50723 xmlMemBlocks() - mem_base);
50725 printf(" %d", n_cur);
50726 printf(" %d", n_node);
50727 printf(" %d", n_ns);
50741 test_xmlXPathNodeSetAddUnique(void) {
50744 #if defined(LIBXML_XPATH_ENABLED)
50747 xmlNodeSetPtr cur; /* the initial node set */
50749 xmlNodePtr val; /* a new xmlNodePtr */
50752 for (n_cur = 0;n_cur < gen_nb_xmlNodeSetPtr;n_cur++) {
50753 for (n_val = 0;n_val < gen_nb_xmlNodePtr;n_val++) {
50754 mem_base = xmlMemBlocks();
50755 cur = gen_xmlNodeSetPtr(n_cur, 0);
50756 val = gen_xmlNodePtr(n_val, 1);
50758 ret_val = xmlXPathNodeSetAddUnique(cur, val);
50759 desret_int(ret_val);
50761 des_xmlNodeSetPtr(n_cur, cur, 0);
50762 des_xmlNodePtr(n_val, val, 1);
50763 xmlResetLastError();
50764 if (mem_base != xmlMemBlocks()) {
50765 printf("Leak of %d blocks found in xmlXPathNodeSetAddUnique",
50766 xmlMemBlocks() - mem_base);
50768 printf(" %d", n_cur);
50769 printf(" %d", n_val);
50782 test_xmlXPathNodeSetContains(void) {
50785 #if defined(LIBXML_XPATH_ENABLED)
50788 xmlNodeSetPtr cur; /* the node-set */
50790 xmlNodePtr val; /* the node */
50793 for (n_cur = 0;n_cur < gen_nb_xmlNodeSetPtr;n_cur++) {
50794 for (n_val = 0;n_val < gen_nb_xmlNodePtr;n_val++) {
50795 mem_base = xmlMemBlocks();
50796 cur = gen_xmlNodeSetPtr(n_cur, 0);
50797 val = gen_xmlNodePtr(n_val, 1);
50799 ret_val = xmlXPathNodeSetContains(cur, val);
50800 desret_int(ret_val);
50802 des_xmlNodeSetPtr(n_cur, cur, 0);
50803 des_xmlNodePtr(n_val, val, 1);
50804 xmlResetLastError();
50805 if (mem_base != xmlMemBlocks()) {
50806 printf("Leak of %d blocks found in xmlXPathNodeSetContains",
50807 xmlMemBlocks() - mem_base);
50809 printf(" %d", n_cur);
50810 printf(" %d", n_val);
50823 test_xmlXPathNodeSetDel(void) {
50826 #if defined(LIBXML_XPATH_ENABLED)
50828 xmlNodeSetPtr cur; /* the initial node set */
50830 xmlNodePtr val; /* an xmlNodePtr */
50833 for (n_cur = 0;n_cur < gen_nb_xmlNodeSetPtr;n_cur++) {
50834 for (n_val = 0;n_val < gen_nb_xmlNodePtr;n_val++) {
50835 mem_base = xmlMemBlocks();
50836 cur = gen_xmlNodeSetPtr(n_cur, 0);
50837 val = gen_xmlNodePtr(n_val, 1);
50839 xmlXPathNodeSetDel(cur, val);
50841 des_xmlNodeSetPtr(n_cur, cur, 0);
50842 des_xmlNodePtr(n_val, val, 1);
50843 xmlResetLastError();
50844 if (mem_base != xmlMemBlocks()) {
50845 printf("Leak of %d blocks found in xmlXPathNodeSetDel",
50846 xmlMemBlocks() - mem_base);
50848 printf(" %d", n_cur);
50849 printf(" %d", n_val);
50862 test_xmlXPathNodeSetMerge(void) {
50865 #if defined(LIBXML_XPATH_ENABLED)
50867 xmlNodeSetPtr ret_val;
50868 xmlNodeSetPtr val1; /* the first NodeSet or NULL */
50870 xmlNodeSetPtr val2; /* the second NodeSet */
50873 for (n_val1 = 0;n_val1 < gen_nb_xmlNodeSetPtr;n_val1++) {
50874 for (n_val2 = 0;n_val2 < gen_nb_xmlNodeSetPtr;n_val2++) {
50875 mem_base = xmlMemBlocks();
50876 val1 = gen_xmlNodeSetPtr(n_val1, 0);
50877 val2 = gen_xmlNodeSetPtr(n_val2, 1);
50879 ret_val = xmlXPathNodeSetMerge(val1, val2);
50880 desret_xmlNodeSetPtr(ret_val);
50882 des_xmlNodeSetPtr(n_val1, val1, 0);
50883 des_xmlNodeSetPtr(n_val2, val2, 1);
50884 xmlResetLastError();
50885 if (mem_base != xmlMemBlocks()) {
50886 printf("Leak of %d blocks found in xmlXPathNodeSetMerge",
50887 xmlMemBlocks() - mem_base);
50889 printf(" %d", n_val1);
50890 printf(" %d", n_val2);
50903 test_xmlXPathNodeSetRemove(void) {
50906 #if defined(LIBXML_XPATH_ENABLED)
50908 xmlNodeSetPtr cur; /* the initial node set */
50910 int val; /* the index to remove */
50913 for (n_cur = 0;n_cur < gen_nb_xmlNodeSetPtr;n_cur++) {
50914 for (n_val = 0;n_val < gen_nb_int;n_val++) {
50915 mem_base = xmlMemBlocks();
50916 cur = gen_xmlNodeSetPtr(n_cur, 0);
50917 val = gen_int(n_val, 1);
50919 xmlXPathNodeSetRemove(cur, val);
50921 des_xmlNodeSetPtr(n_cur, cur, 0);
50922 des_int(n_val, val, 1);
50923 xmlResetLastError();
50924 if (mem_base != xmlMemBlocks()) {
50925 printf("Leak of %d blocks found in xmlXPathNodeSetRemove",
50926 xmlMemBlocks() - mem_base);
50928 printf(" %d", n_cur);
50929 printf(" %d", n_val);
50942 test_xmlXPathNodeSetSort(void) {
50945 #if defined(LIBXML_XPATH_ENABLED)
50947 xmlNodeSetPtr set; /* the node set */
50950 for (n_set = 0;n_set < gen_nb_xmlNodeSetPtr;n_set++) {
50951 mem_base = xmlMemBlocks();
50952 set = gen_xmlNodeSetPtr(n_set, 0);
50954 xmlXPathNodeSetSort(set);
50956 des_xmlNodeSetPtr(n_set, set, 0);
50957 xmlResetLastError();
50958 if (mem_base != xmlMemBlocks()) {
50959 printf("Leak of %d blocks found in xmlXPathNodeSetSort",
50960 xmlMemBlocks() - mem_base);
50962 printf(" %d", n_set);
50974 test_xmlXPathNodeTrailing(void) {
50977 #if defined(LIBXML_XPATH_ENABLED)
50979 xmlNodeSetPtr ret_val;
50980 xmlNodeSetPtr nodes; /* a node-set */
50982 xmlNodePtr node; /* a node */
50985 for (n_nodes = 0;n_nodes < gen_nb_xmlNodeSetPtr;n_nodes++) {
50986 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
50987 mem_base = xmlMemBlocks();
50988 nodes = gen_xmlNodeSetPtr(n_nodes, 0);
50989 node = gen_xmlNodePtr(n_node, 1);
50991 ret_val = xmlXPathNodeTrailing(nodes, node);
50992 desret_xmlNodeSetPtr(ret_val);
50994 des_xmlNodeSetPtr(n_nodes, nodes, 0);
50995 des_xmlNodePtr(n_node, node, 1);
50996 xmlResetLastError();
50997 if (mem_base != xmlMemBlocks()) {
50998 printf("Leak of %d blocks found in xmlXPathNodeTrailing",
50999 xmlMemBlocks() - mem_base);
51001 printf(" %d", n_nodes);
51002 printf(" %d", n_node);
51015 test_xmlXPathNodeTrailingSorted(void) {
51018 #if defined(LIBXML_XPATH_ENABLED)
51020 xmlNodeSetPtr ret_val;
51021 xmlNodeSetPtr nodes; /* a node-set, sorted by document order */
51023 xmlNodePtr node; /* a node */
51026 for (n_nodes = 0;n_nodes < gen_nb_xmlNodeSetPtr;n_nodes++) {
51027 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
51028 mem_base = xmlMemBlocks();
51029 nodes = gen_xmlNodeSetPtr(n_nodes, 0);
51030 node = gen_xmlNodePtr(n_node, 1);
51032 ret_val = xmlXPathNodeTrailingSorted(nodes, node);
51033 desret_xmlNodeSetPtr(ret_val);
51035 des_xmlNodeSetPtr(n_nodes, nodes, 0);
51036 des_xmlNodePtr(n_node, node, 1);
51037 xmlResetLastError();
51038 if (mem_base != xmlMemBlocks()) {
51039 printf("Leak of %d blocks found in xmlXPathNodeTrailingSorted",
51040 xmlMemBlocks() - mem_base);
51042 printf(" %d", n_nodes);
51043 printf(" %d", n_node);
51056 test_xmlXPathNormalizeFunction(void) {
51059 #if defined(LIBXML_XPATH_ENABLED)
51061 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
51063 int nargs; /* the number of arguments */
51066 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
51067 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
51068 mem_base = xmlMemBlocks();
51069 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
51070 nargs = gen_int(n_nargs, 1);
51072 xmlXPathNormalizeFunction(ctxt, nargs);
51074 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
51075 des_int(n_nargs, nargs, 1);
51076 xmlResetLastError();
51077 if (mem_base != xmlMemBlocks()) {
51078 printf("Leak of %d blocks found in xmlXPathNormalizeFunction",
51079 xmlMemBlocks() - mem_base);
51081 printf(" %d", n_ctxt);
51082 printf(" %d", n_nargs);
51095 test_xmlXPathNotEqualValues(void) {
51098 #if defined(LIBXML_XPATH_ENABLED)
51101 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
51104 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
51105 mem_base = xmlMemBlocks();
51106 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
51108 ret_val = xmlXPathNotEqualValues(ctxt);
51109 desret_int(ret_val);
51111 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
51112 xmlResetLastError();
51113 if (mem_base != xmlMemBlocks()) {
51114 printf("Leak of %d blocks found in xmlXPathNotEqualValues",
51115 xmlMemBlocks() - mem_base);
51117 printf(" %d", n_ctxt);
51129 test_xmlXPathNotFunction(void) {
51132 #if defined(LIBXML_XPATH_ENABLED)
51134 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
51136 int nargs; /* the number of arguments */
51139 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
51140 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
51141 mem_base = xmlMemBlocks();
51142 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
51143 nargs = gen_int(n_nargs, 1);
51145 xmlXPathNotFunction(ctxt, nargs);
51147 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
51148 des_int(n_nargs, nargs, 1);
51149 xmlResetLastError();
51150 if (mem_base != xmlMemBlocks()) {
51151 printf("Leak of %d blocks found in xmlXPathNotFunction",
51152 xmlMemBlocks() - mem_base);
51154 printf(" %d", n_ctxt);
51155 printf(" %d", n_nargs);
51168 test_xmlXPathNsLookup(void) {
51171 #if defined(LIBXML_XPATH_ENABLED)
51173 const xmlChar * ret_val;
51174 xmlXPathContextPtr ctxt; /* the XPath context */
51176 xmlChar * prefix; /* the namespace prefix value */
51179 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathContextPtr;n_ctxt++) {
51180 for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
51181 mem_base = xmlMemBlocks();
51182 ctxt = gen_xmlXPathContextPtr(n_ctxt, 0);
51183 prefix = gen_const_xmlChar_ptr(n_prefix, 1);
51185 ret_val = xmlXPathNsLookup(ctxt, (const xmlChar *)prefix);
51186 desret_const_xmlChar_ptr(ret_val);
51188 des_xmlXPathContextPtr(n_ctxt, ctxt, 0);
51189 des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 1);
51190 xmlResetLastError();
51191 if (mem_base != xmlMemBlocks()) {
51192 printf("Leak of %d blocks found in xmlXPathNsLookup",
51193 xmlMemBlocks() - mem_base);
51195 printf(" %d", n_ctxt);
51196 printf(" %d", n_prefix);
51209 test_xmlXPathNumberFunction(void) {
51212 #if defined(LIBXML_XPATH_ENABLED)
51214 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
51216 int nargs; /* the number of arguments */
51219 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
51220 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
51221 mem_base = xmlMemBlocks();
51222 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
51223 nargs = gen_int(n_nargs, 1);
51225 xmlXPathNumberFunction(ctxt, nargs);
51227 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
51228 des_int(n_nargs, nargs, 1);
51229 xmlResetLastError();
51230 if (mem_base != xmlMemBlocks()) {
51231 printf("Leak of %d blocks found in xmlXPathNumberFunction",
51232 xmlMemBlocks() - mem_base);
51234 printf(" %d", n_ctxt);
51235 printf(" %d", n_nargs);
51248 test_xmlXPathParseNCName(void) {
51251 #if defined(LIBXML_XPATH_ENABLED)
51254 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
51257 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
51258 mem_base = xmlMemBlocks();
51259 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
51261 ret_val = xmlXPathParseNCName(ctxt);
51262 desret_xmlChar_ptr(ret_val);
51264 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
51265 xmlResetLastError();
51266 if (mem_base != xmlMemBlocks()) {
51267 printf("Leak of %d blocks found in xmlXPathParseNCName",
51268 xmlMemBlocks() - mem_base);
51270 printf(" %d", n_ctxt);
51282 test_xmlXPathParseName(void) {
51285 #if defined(LIBXML_XPATH_ENABLED)
51288 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
51291 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
51292 mem_base = xmlMemBlocks();
51293 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
51295 ret_val = xmlXPathParseName(ctxt);
51296 desret_xmlChar_ptr(ret_val);
51298 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
51299 xmlResetLastError();
51300 if (mem_base != xmlMemBlocks()) {
51301 printf("Leak of %d blocks found in xmlXPathParseName",
51302 xmlMemBlocks() - mem_base);
51304 printf(" %d", n_ctxt);
51316 test_xmlXPathPopBoolean(void) {
51319 #if defined(LIBXML_XPATH_ENABLED)
51322 xmlXPathParserContextPtr ctxt; /* an XPath parser context */
51325 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
51326 mem_base = xmlMemBlocks();
51327 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
51329 ret_val = xmlXPathPopBoolean(ctxt);
51330 desret_int(ret_val);
51332 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
51333 xmlResetLastError();
51334 if (mem_base != xmlMemBlocks()) {
51335 printf("Leak of %d blocks found in xmlXPathPopBoolean",
51336 xmlMemBlocks() - mem_base);
51338 printf(" %d", n_ctxt);
51350 test_xmlXPathPopExternal(void) {
51353 #if defined(LIBXML_XPATH_ENABLED)
51356 xmlXPathParserContextPtr ctxt; /* an XPath parser context */
51359 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
51360 mem_base = xmlMemBlocks();
51361 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
51363 ret_val = xmlXPathPopExternal(ctxt);
51364 desret_void_ptr(ret_val);
51366 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
51367 xmlResetLastError();
51368 if (mem_base != xmlMemBlocks()) {
51369 printf("Leak of %d blocks found in xmlXPathPopExternal",
51370 xmlMemBlocks() - mem_base);
51372 printf(" %d", n_ctxt);
51384 test_xmlXPathPopNodeSet(void) {
51387 #if defined(LIBXML_XPATH_ENABLED)
51389 xmlNodeSetPtr ret_val;
51390 xmlXPathParserContextPtr ctxt; /* an XPath parser context */
51393 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
51394 mem_base = xmlMemBlocks();
51395 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
51397 ret_val = xmlXPathPopNodeSet(ctxt);
51398 desret_xmlNodeSetPtr(ret_val);
51400 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
51401 xmlResetLastError();
51402 if (mem_base != xmlMemBlocks()) {
51403 printf("Leak of %d blocks found in xmlXPathPopNodeSet",
51404 xmlMemBlocks() - mem_base);
51406 printf(" %d", n_ctxt);
51418 test_xmlXPathPopNumber(void) {
51421 #if defined(LIBXML_XPATH_ENABLED)
51424 xmlXPathParserContextPtr ctxt; /* an XPath parser context */
51427 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
51428 mem_base = xmlMemBlocks();
51429 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
51431 ret_val = xmlXPathPopNumber(ctxt);
51432 desret_double(ret_val);
51434 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
51435 xmlResetLastError();
51436 if (mem_base != xmlMemBlocks()) {
51437 printf("Leak of %d blocks found in xmlXPathPopNumber",
51438 xmlMemBlocks() - mem_base);
51440 printf(" %d", n_ctxt);
51452 test_xmlXPathPopString(void) {
51455 #if defined(LIBXML_XPATH_ENABLED)
51458 xmlXPathParserContextPtr ctxt; /* an XPath parser context */
51461 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
51462 mem_base = xmlMemBlocks();
51463 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
51465 ret_val = xmlXPathPopString(ctxt);
51466 desret_xmlChar_ptr(ret_val);
51468 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
51469 xmlResetLastError();
51470 if (mem_base != xmlMemBlocks()) {
51471 printf("Leak of %d blocks found in xmlXPathPopString",
51472 xmlMemBlocks() - mem_base);
51474 printf(" %d", n_ctxt);
51486 test_xmlXPathPositionFunction(void) {
51489 #if defined(LIBXML_XPATH_ENABLED)
51491 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
51493 int nargs; /* the number of arguments */
51496 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
51497 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
51498 mem_base = xmlMemBlocks();
51499 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
51500 nargs = gen_int(n_nargs, 1);
51502 xmlXPathPositionFunction(ctxt, nargs);
51504 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
51505 des_int(n_nargs, nargs, 1);
51506 xmlResetLastError();
51507 if (mem_base != xmlMemBlocks()) {
51508 printf("Leak of %d blocks found in xmlXPathPositionFunction",
51509 xmlMemBlocks() - mem_base);
51511 printf(" %d", n_ctxt);
51512 printf(" %d", n_nargs);
51525 test_xmlXPathRegisterAllFunctions(void) {
51528 #if defined(LIBXML_XPATH_ENABLED)
51530 xmlXPathContextPtr ctxt; /* the XPath context */
51533 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathContextPtr;n_ctxt++) {
51534 mem_base = xmlMemBlocks();
51535 ctxt = gen_xmlXPathContextPtr(n_ctxt, 0);
51537 xmlXPathRegisterAllFunctions(ctxt);
51539 des_xmlXPathContextPtr(n_ctxt, ctxt, 0);
51540 xmlResetLastError();
51541 if (mem_base != xmlMemBlocks()) {
51542 printf("Leak of %d blocks found in xmlXPathRegisterAllFunctions",
51543 xmlMemBlocks() - mem_base);
51545 printf(" %d", n_ctxt);
51557 test_xmlXPathRegisterFunc(void) {
51561 /* missing type support */
51567 test_xmlXPathRegisterFuncLookup(void) {
51571 /* missing type support */
51577 test_xmlXPathRegisterFuncNS(void) {
51581 /* missing type support */
51587 test_xmlXPathRegisterNs(void) {
51590 #if defined(LIBXML_XPATH_ENABLED)
51593 xmlXPathContextPtr ctxt; /* the XPath context */
51595 xmlChar * prefix; /* the namespace prefix cannot be NULL or empty string */
51597 xmlChar * ns_uri; /* the namespace name */
51600 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathContextPtr;n_ctxt++) {
51601 for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
51602 for (n_ns_uri = 0;n_ns_uri < gen_nb_const_xmlChar_ptr;n_ns_uri++) {
51603 mem_base = xmlMemBlocks();
51604 ctxt = gen_xmlXPathContextPtr(n_ctxt, 0);
51605 prefix = gen_const_xmlChar_ptr(n_prefix, 1);
51606 ns_uri = gen_const_xmlChar_ptr(n_ns_uri, 2);
51608 ret_val = xmlXPathRegisterNs(ctxt, (const xmlChar *)prefix, (const xmlChar *)ns_uri);
51609 desret_int(ret_val);
51611 des_xmlXPathContextPtr(n_ctxt, ctxt, 0);
51612 des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 1);
51613 des_const_xmlChar_ptr(n_ns_uri, (const xmlChar *)ns_uri, 2);
51614 xmlResetLastError();
51615 if (mem_base != xmlMemBlocks()) {
51616 printf("Leak of %d blocks found in xmlXPathRegisterNs",
51617 xmlMemBlocks() - mem_base);
51619 printf(" %d", n_ctxt);
51620 printf(" %d", n_prefix);
51621 printf(" %d", n_ns_uri);
51635 test_xmlXPathRegisterVariable(void) {
51638 #if defined(LIBXML_XPATH_ENABLED)
51641 xmlXPathContextPtr ctxt; /* the XPath context */
51643 xmlChar * name; /* the variable name */
51645 xmlXPathObjectPtr value; /* the variable value or NULL */
51648 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathContextPtr;n_ctxt++) {
51649 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
51650 for (n_value = 0;n_value < gen_nb_xmlXPathObjectPtr;n_value++) {
51651 mem_base = xmlMemBlocks();
51652 ctxt = gen_xmlXPathContextPtr(n_ctxt, 0);
51653 name = gen_const_xmlChar_ptr(n_name, 1);
51654 value = gen_xmlXPathObjectPtr(n_value, 2);
51656 ret_val = xmlXPathRegisterVariable(ctxt, (const xmlChar *)name, value);
51657 desret_int(ret_val);
51659 des_xmlXPathContextPtr(n_ctxt, ctxt, 0);
51660 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
51661 des_xmlXPathObjectPtr(n_value, value, 2);
51662 xmlResetLastError();
51663 if (mem_base != xmlMemBlocks()) {
51664 printf("Leak of %d blocks found in xmlXPathRegisterVariable",
51665 xmlMemBlocks() - mem_base);
51667 printf(" %d", n_ctxt);
51668 printf(" %d", n_name);
51669 printf(" %d", n_value);
51683 test_xmlXPathRegisterVariableLookup(void) {
51687 /* missing type support */
51693 test_xmlXPathRegisterVariableNS(void) {
51696 #if defined(LIBXML_XPATH_ENABLED)
51699 xmlXPathContextPtr ctxt; /* the XPath context */
51701 xmlChar * name; /* the variable name */
51703 xmlChar * ns_uri; /* the variable namespace URI */
51705 xmlXPathObjectPtr value; /* the variable value or NULL */
51708 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathContextPtr;n_ctxt++) {
51709 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
51710 for (n_ns_uri = 0;n_ns_uri < gen_nb_const_xmlChar_ptr;n_ns_uri++) {
51711 for (n_value = 0;n_value < gen_nb_xmlXPathObjectPtr;n_value++) {
51712 mem_base = xmlMemBlocks();
51713 ctxt = gen_xmlXPathContextPtr(n_ctxt, 0);
51714 name = gen_const_xmlChar_ptr(n_name, 1);
51715 ns_uri = gen_const_xmlChar_ptr(n_ns_uri, 2);
51716 value = gen_xmlXPathObjectPtr(n_value, 3);
51718 ret_val = xmlXPathRegisterVariableNS(ctxt, (const xmlChar *)name, (const xmlChar *)ns_uri, value);
51719 desret_int(ret_val);
51721 des_xmlXPathContextPtr(n_ctxt, ctxt, 0);
51722 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
51723 des_const_xmlChar_ptr(n_ns_uri, (const xmlChar *)ns_uri, 2);
51724 des_xmlXPathObjectPtr(n_value, value, 3);
51725 xmlResetLastError();
51726 if (mem_base != xmlMemBlocks()) {
51727 printf("Leak of %d blocks found in xmlXPathRegisterVariableNS",
51728 xmlMemBlocks() - mem_base);
51730 printf(" %d", n_ctxt);
51731 printf(" %d", n_name);
51732 printf(" %d", n_ns_uri);
51733 printf(" %d", n_value);
51748 test_xmlXPathRegisteredFuncsCleanup(void) {
51751 #if defined(LIBXML_XPATH_ENABLED)
51753 xmlXPathContextPtr ctxt; /* the XPath context */
51756 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathContextPtr;n_ctxt++) {
51757 mem_base = xmlMemBlocks();
51758 ctxt = gen_xmlXPathContextPtr(n_ctxt, 0);
51760 xmlXPathRegisteredFuncsCleanup(ctxt);
51762 des_xmlXPathContextPtr(n_ctxt, ctxt, 0);
51763 xmlResetLastError();
51764 if (mem_base != xmlMemBlocks()) {
51765 printf("Leak of %d blocks found in xmlXPathRegisteredFuncsCleanup",
51766 xmlMemBlocks() - mem_base);
51768 printf(" %d", n_ctxt);
51780 test_xmlXPathRegisteredNsCleanup(void) {
51783 #if defined(LIBXML_XPATH_ENABLED)
51785 xmlXPathContextPtr ctxt; /* the XPath context */
51788 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathContextPtr;n_ctxt++) {
51789 mem_base = xmlMemBlocks();
51790 ctxt = gen_xmlXPathContextPtr(n_ctxt, 0);
51792 xmlXPathRegisteredNsCleanup(ctxt);
51794 des_xmlXPathContextPtr(n_ctxt, ctxt, 0);
51795 xmlResetLastError();
51796 if (mem_base != xmlMemBlocks()) {
51797 printf("Leak of %d blocks found in xmlXPathRegisteredNsCleanup",
51798 xmlMemBlocks() - mem_base);
51800 printf(" %d", n_ctxt);
51812 test_xmlXPathRegisteredVariablesCleanup(void) {
51815 #if defined(LIBXML_XPATH_ENABLED)
51817 xmlXPathContextPtr ctxt; /* the XPath context */
51820 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathContextPtr;n_ctxt++) {
51821 mem_base = xmlMemBlocks();
51822 ctxt = gen_xmlXPathContextPtr(n_ctxt, 0);
51824 xmlXPathRegisteredVariablesCleanup(ctxt);
51826 des_xmlXPathContextPtr(n_ctxt, ctxt, 0);
51827 xmlResetLastError();
51828 if (mem_base != xmlMemBlocks()) {
51829 printf("Leak of %d blocks found in xmlXPathRegisteredVariablesCleanup",
51830 xmlMemBlocks() - mem_base);
51832 printf(" %d", n_ctxt);
51844 test_xmlXPathRoot(void) {
51847 #if defined(LIBXML_XPATH_ENABLED)
51849 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
51852 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
51853 mem_base = xmlMemBlocks();
51854 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
51856 xmlXPathRoot(ctxt);
51858 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
51859 xmlResetLastError();
51860 if (mem_base != xmlMemBlocks()) {
51861 printf("Leak of %d blocks found in xmlXPathRoot",
51862 xmlMemBlocks() - mem_base);
51864 printf(" %d", n_ctxt);
51876 test_xmlXPathRoundFunction(void) {
51879 #if defined(LIBXML_XPATH_ENABLED)
51881 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
51883 int nargs; /* the number of arguments */
51886 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
51887 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
51888 mem_base = xmlMemBlocks();
51889 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
51890 nargs = gen_int(n_nargs, 1);
51892 xmlXPathRoundFunction(ctxt, nargs);
51894 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
51895 des_int(n_nargs, nargs, 1);
51896 xmlResetLastError();
51897 if (mem_base != xmlMemBlocks()) {
51898 printf("Leak of %d blocks found in xmlXPathRoundFunction",
51899 xmlMemBlocks() - mem_base);
51901 printf(" %d", n_ctxt);
51902 printf(" %d", n_nargs);
51915 test_xmlXPathStartsWithFunction(void) {
51918 #if defined(LIBXML_XPATH_ENABLED)
51920 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
51922 int nargs; /* the number of arguments */
51925 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
51926 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
51927 mem_base = xmlMemBlocks();
51928 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
51929 nargs = gen_int(n_nargs, 1);
51931 xmlXPathStartsWithFunction(ctxt, nargs);
51933 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
51934 des_int(n_nargs, nargs, 1);
51935 xmlResetLastError();
51936 if (mem_base != xmlMemBlocks()) {
51937 printf("Leak of %d blocks found in xmlXPathStartsWithFunction",
51938 xmlMemBlocks() - mem_base);
51940 printf(" %d", n_ctxt);
51941 printf(" %d", n_nargs);
51954 test_xmlXPathStringEvalNumber(void) {
51957 #if defined(LIBXML_XPATH_ENABLED)
51960 xmlChar * str; /* A string to scan */
51963 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
51964 mem_base = xmlMemBlocks();
51965 str = gen_const_xmlChar_ptr(n_str, 0);
51967 ret_val = xmlXPathStringEvalNumber((const xmlChar *)str);
51968 desret_double(ret_val);
51970 des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 0);
51971 xmlResetLastError();
51972 if (mem_base != xmlMemBlocks()) {
51973 printf("Leak of %d blocks found in xmlXPathStringEvalNumber",
51974 xmlMemBlocks() - mem_base);
51976 printf(" %d", n_str);
51988 test_xmlXPathStringFunction(void) {
51991 #if defined(LIBXML_XPATH_ENABLED)
51993 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
51995 int nargs; /* the number of arguments */
51998 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
51999 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
52000 mem_base = xmlMemBlocks();
52001 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
52002 nargs = gen_int(n_nargs, 1);
52004 xmlXPathStringFunction(ctxt, nargs);
52006 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
52007 des_int(n_nargs, nargs, 1);
52008 xmlResetLastError();
52009 if (mem_base != xmlMemBlocks()) {
52010 printf("Leak of %d blocks found in xmlXPathStringFunction",
52011 xmlMemBlocks() - mem_base);
52013 printf(" %d", n_ctxt);
52014 printf(" %d", n_nargs);
52027 test_xmlXPathStringLengthFunction(void) {
52030 #if defined(LIBXML_XPATH_ENABLED)
52032 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
52034 int nargs; /* the number of arguments */
52037 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
52038 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
52039 mem_base = xmlMemBlocks();
52040 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
52041 nargs = gen_int(n_nargs, 1);
52043 xmlXPathStringLengthFunction(ctxt, nargs);
52045 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
52046 des_int(n_nargs, nargs, 1);
52047 xmlResetLastError();
52048 if (mem_base != xmlMemBlocks()) {
52049 printf("Leak of %d blocks found in xmlXPathStringLengthFunction",
52050 xmlMemBlocks() - mem_base);
52052 printf(" %d", n_ctxt);
52053 printf(" %d", n_nargs);
52066 test_xmlXPathSubValues(void) {
52069 #if defined(LIBXML_XPATH_ENABLED)
52071 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
52074 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
52075 mem_base = xmlMemBlocks();
52076 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
52078 xmlXPathSubValues(ctxt);
52080 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
52081 xmlResetLastError();
52082 if (mem_base != xmlMemBlocks()) {
52083 printf("Leak of %d blocks found in xmlXPathSubValues",
52084 xmlMemBlocks() - mem_base);
52086 printf(" %d", n_ctxt);
52098 test_xmlXPathSubstringAfterFunction(void) {
52101 #if defined(LIBXML_XPATH_ENABLED)
52103 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
52105 int nargs; /* the number of arguments */
52108 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
52109 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
52110 mem_base = xmlMemBlocks();
52111 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
52112 nargs = gen_int(n_nargs, 1);
52114 xmlXPathSubstringAfterFunction(ctxt, nargs);
52116 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
52117 des_int(n_nargs, nargs, 1);
52118 xmlResetLastError();
52119 if (mem_base != xmlMemBlocks()) {
52120 printf("Leak of %d blocks found in xmlXPathSubstringAfterFunction",
52121 xmlMemBlocks() - mem_base);
52123 printf(" %d", n_ctxt);
52124 printf(" %d", n_nargs);
52137 test_xmlXPathSubstringBeforeFunction(void) {
52140 #if defined(LIBXML_XPATH_ENABLED)
52142 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
52144 int nargs; /* the number of arguments */
52147 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
52148 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
52149 mem_base = xmlMemBlocks();
52150 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
52151 nargs = gen_int(n_nargs, 1);
52153 xmlXPathSubstringBeforeFunction(ctxt, nargs);
52155 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
52156 des_int(n_nargs, nargs, 1);
52157 xmlResetLastError();
52158 if (mem_base != xmlMemBlocks()) {
52159 printf("Leak of %d blocks found in xmlXPathSubstringBeforeFunction",
52160 xmlMemBlocks() - mem_base);
52162 printf(" %d", n_ctxt);
52163 printf(" %d", n_nargs);
52176 test_xmlXPathSubstringFunction(void) {
52179 #if defined(LIBXML_XPATH_ENABLED)
52181 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
52183 int nargs; /* the number of arguments */
52186 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
52187 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
52188 mem_base = xmlMemBlocks();
52189 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
52190 nargs = gen_int(n_nargs, 1);
52192 xmlXPathSubstringFunction(ctxt, nargs);
52194 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
52195 des_int(n_nargs, nargs, 1);
52196 xmlResetLastError();
52197 if (mem_base != xmlMemBlocks()) {
52198 printf("Leak of %d blocks found in xmlXPathSubstringFunction",
52199 xmlMemBlocks() - mem_base);
52201 printf(" %d", n_ctxt);
52202 printf(" %d", n_nargs);
52215 test_xmlXPathSumFunction(void) {
52218 #if defined(LIBXML_XPATH_ENABLED)
52220 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
52222 int nargs; /* the number of arguments */
52225 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
52226 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
52227 mem_base = xmlMemBlocks();
52228 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
52229 nargs = gen_int(n_nargs, 1);
52231 xmlXPathSumFunction(ctxt, nargs);
52233 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
52234 des_int(n_nargs, nargs, 1);
52235 xmlResetLastError();
52236 if (mem_base != xmlMemBlocks()) {
52237 printf("Leak of %d blocks found in xmlXPathSumFunction",
52238 xmlMemBlocks() - mem_base);
52240 printf(" %d", n_ctxt);
52241 printf(" %d", n_nargs);
52254 test_xmlXPathTrailing(void) {
52257 #if defined(LIBXML_XPATH_ENABLED)
52259 xmlNodeSetPtr ret_val;
52260 xmlNodeSetPtr nodes1; /* a node-set */
52262 xmlNodeSetPtr nodes2; /* a node-set */
52265 for (n_nodes1 = 0;n_nodes1 < gen_nb_xmlNodeSetPtr;n_nodes1++) {
52266 for (n_nodes2 = 0;n_nodes2 < gen_nb_xmlNodeSetPtr;n_nodes2++) {
52267 mem_base = xmlMemBlocks();
52268 nodes1 = gen_xmlNodeSetPtr(n_nodes1, 0);
52269 nodes2 = gen_xmlNodeSetPtr(n_nodes2, 1);
52271 ret_val = xmlXPathTrailing(nodes1, nodes2);
52272 desret_xmlNodeSetPtr(ret_val);
52274 des_xmlNodeSetPtr(n_nodes1, nodes1, 0);
52275 des_xmlNodeSetPtr(n_nodes2, nodes2, 1);
52276 xmlResetLastError();
52277 if (mem_base != xmlMemBlocks()) {
52278 printf("Leak of %d blocks found in xmlXPathTrailing",
52279 xmlMemBlocks() - mem_base);
52281 printf(" %d", n_nodes1);
52282 printf(" %d", n_nodes2);
52295 test_xmlXPathTrailingSorted(void) {
52298 #if defined(LIBXML_XPATH_ENABLED)
52300 xmlNodeSetPtr ret_val;
52301 xmlNodeSetPtr nodes1; /* a node-set, sorted by document order */
52303 xmlNodeSetPtr nodes2; /* a node-set, sorted by document order */
52306 for (n_nodes1 = 0;n_nodes1 < gen_nb_xmlNodeSetPtr;n_nodes1++) {
52307 for (n_nodes2 = 0;n_nodes2 < gen_nb_xmlNodeSetPtr;n_nodes2++) {
52308 mem_base = xmlMemBlocks();
52309 nodes1 = gen_xmlNodeSetPtr(n_nodes1, 0);
52310 nodes2 = gen_xmlNodeSetPtr(n_nodes2, 1);
52312 ret_val = xmlXPathTrailingSorted(nodes1, nodes2);
52313 desret_xmlNodeSetPtr(ret_val);
52315 des_xmlNodeSetPtr(n_nodes1, nodes1, 0);
52316 des_xmlNodeSetPtr(n_nodes2, nodes2, 1);
52317 xmlResetLastError();
52318 if (mem_base != xmlMemBlocks()) {
52319 printf("Leak of %d blocks found in xmlXPathTrailingSorted",
52320 xmlMemBlocks() - mem_base);
52322 printf(" %d", n_nodes1);
52323 printf(" %d", n_nodes2);
52336 test_xmlXPathTranslateFunction(void) {
52339 #if defined(LIBXML_XPATH_ENABLED)
52341 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
52343 int nargs; /* the number of arguments */
52346 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
52347 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
52348 mem_base = xmlMemBlocks();
52349 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
52350 nargs = gen_int(n_nargs, 1);
52352 xmlXPathTranslateFunction(ctxt, nargs);
52354 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
52355 des_int(n_nargs, nargs, 1);
52356 xmlResetLastError();
52357 if (mem_base != xmlMemBlocks()) {
52358 printf("Leak of %d blocks found in xmlXPathTranslateFunction",
52359 xmlMemBlocks() - mem_base);
52361 printf(" %d", n_ctxt);
52362 printf(" %d", n_nargs);
52375 test_xmlXPathTrueFunction(void) {
52378 #if defined(LIBXML_XPATH_ENABLED)
52380 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
52382 int nargs; /* the number of arguments */
52385 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
52386 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
52387 mem_base = xmlMemBlocks();
52388 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
52389 nargs = gen_int(n_nargs, 1);
52391 xmlXPathTrueFunction(ctxt, nargs);
52393 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
52394 des_int(n_nargs, nargs, 1);
52395 xmlResetLastError();
52396 if (mem_base != xmlMemBlocks()) {
52397 printf("Leak of %d blocks found in xmlXPathTrueFunction",
52398 xmlMemBlocks() - mem_base);
52400 printf(" %d", n_ctxt);
52401 printf(" %d", n_nargs);
52414 test_xmlXPathValueFlipSign(void) {
52417 #if defined(LIBXML_XPATH_ENABLED)
52419 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
52422 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
52423 mem_base = xmlMemBlocks();
52424 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
52426 xmlXPathValueFlipSign(ctxt);
52428 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
52429 xmlResetLastError();
52430 if (mem_base != xmlMemBlocks()) {
52431 printf("Leak of %d blocks found in xmlXPathValueFlipSign",
52432 xmlMemBlocks() - mem_base);
52434 printf(" %d", n_ctxt);
52446 test_xmlXPathVariableLookup(void) {
52449 #if defined(LIBXML_XPATH_ENABLED)
52451 xmlXPathObjectPtr ret_val;
52452 xmlXPathContextPtr ctxt; /* the XPath context */
52454 xmlChar * name; /* the variable name */
52457 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathContextPtr;n_ctxt++) {
52458 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
52459 mem_base = xmlMemBlocks();
52460 ctxt = gen_xmlXPathContextPtr(n_ctxt, 0);
52461 name = gen_const_xmlChar_ptr(n_name, 1);
52463 ret_val = xmlXPathVariableLookup(ctxt, (const xmlChar *)name);
52464 desret_xmlXPathObjectPtr(ret_val);
52466 des_xmlXPathContextPtr(n_ctxt, ctxt, 0);
52467 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
52468 xmlResetLastError();
52469 if (mem_base != xmlMemBlocks()) {
52470 printf("Leak of %d blocks found in xmlXPathVariableLookup",
52471 xmlMemBlocks() - mem_base);
52473 printf(" %d", n_ctxt);
52474 printf(" %d", n_name);
52487 test_xmlXPathVariableLookupNS(void) {
52490 #if defined(LIBXML_XPATH_ENABLED)
52492 xmlXPathObjectPtr ret_val;
52493 xmlXPathContextPtr ctxt; /* the XPath context */
52495 xmlChar * name; /* the variable name */
52497 xmlChar * ns_uri; /* the variable namespace URI */
52500 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathContextPtr;n_ctxt++) {
52501 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
52502 for (n_ns_uri = 0;n_ns_uri < gen_nb_const_xmlChar_ptr;n_ns_uri++) {
52503 mem_base = xmlMemBlocks();
52504 ctxt = gen_xmlXPathContextPtr(n_ctxt, 0);
52505 name = gen_const_xmlChar_ptr(n_name, 1);
52506 ns_uri = gen_const_xmlChar_ptr(n_ns_uri, 2);
52508 ret_val = xmlXPathVariableLookupNS(ctxt, (const xmlChar *)name, (const xmlChar *)ns_uri);
52509 desret_xmlXPathObjectPtr(ret_val);
52511 des_xmlXPathContextPtr(n_ctxt, ctxt, 0);
52512 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
52513 des_const_xmlChar_ptr(n_ns_uri, (const xmlChar *)ns_uri, 2);
52514 xmlResetLastError();
52515 if (mem_base != xmlMemBlocks()) {
52516 printf("Leak of %d blocks found in xmlXPathVariableLookupNS",
52517 xmlMemBlocks() - mem_base);
52519 printf(" %d", n_ctxt);
52520 printf(" %d", n_name);
52521 printf(" %d", n_ns_uri);
52535 test_xmlXPathWrapCString(void) {
52538 #if defined(LIBXML_XPATH_ENABLED)
52540 xmlXPathObjectPtr ret_val;
52541 char * val; /* the char * value */
52544 for (n_val = 0;n_val < gen_nb_char_ptr;n_val++) {
52545 mem_base = xmlMemBlocks();
52546 val = gen_char_ptr(n_val, 0);
52548 ret_val = xmlXPathWrapCString(val);
52549 desret_xmlXPathObjectPtr(ret_val);
52551 des_char_ptr(n_val, val, 0);
52552 xmlResetLastError();
52553 if (mem_base != xmlMemBlocks()) {
52554 printf("Leak of %d blocks found in xmlXPathWrapCString",
52555 xmlMemBlocks() - mem_base);
52557 printf(" %d", n_val);
52569 test_xmlXPathWrapExternal(void) {
52572 #if defined(LIBXML_XPATH_ENABLED)
52574 xmlXPathObjectPtr ret_val;
52575 void * val; /* the user data */
52578 for (n_val = 0;n_val < gen_nb_void_ptr;n_val++) {
52579 mem_base = xmlMemBlocks();
52580 val = gen_void_ptr(n_val, 0);
52582 ret_val = xmlXPathWrapExternal(val);
52583 desret_xmlXPathObjectPtr(ret_val);
52585 des_void_ptr(n_val, val, 0);
52586 xmlResetLastError();
52587 if (mem_base != xmlMemBlocks()) {
52588 printf("Leak of %d blocks found in xmlXPathWrapExternal",
52589 xmlMemBlocks() - mem_base);
52591 printf(" %d", n_val);
52603 test_xmlXPathWrapNodeSet(void) {
52606 #if defined(LIBXML_XPATH_ENABLED)
52608 xmlXPathObjectPtr ret_val;
52609 xmlNodeSetPtr val; /* the NodePtr value */
52612 for (n_val = 0;n_val < gen_nb_xmlNodeSetPtr;n_val++) {
52613 mem_base = xmlMemBlocks();
52614 val = gen_xmlNodeSetPtr(n_val, 0);
52616 ret_val = xmlXPathWrapNodeSet(val);
52617 desret_xmlXPathObjectPtr(ret_val);
52619 des_xmlNodeSetPtr(n_val, val, 0);
52620 xmlResetLastError();
52621 if (mem_base != xmlMemBlocks()) {
52622 printf("Leak of %d blocks found in xmlXPathWrapNodeSet",
52623 xmlMemBlocks() - mem_base);
52625 printf(" %d", n_val);
52637 test_xmlXPatherror(void) {
52640 #if defined(LIBXML_XPATH_ENABLED)
52642 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
52644 const char * file; /* the file name */
52646 int line; /* the line number */
52648 int no; /* the error number */
52651 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
52652 for (n_file = 0;n_file < gen_nb_filepath;n_file++) {
52653 for (n_line = 0;n_line < gen_nb_int;n_line++) {
52654 for (n_no = 0;n_no < gen_nb_int;n_no++) {
52655 mem_base = xmlMemBlocks();
52656 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
52657 file = gen_filepath(n_file, 1);
52658 line = gen_int(n_line, 2);
52659 no = gen_int(n_no, 3);
52661 xmlXPatherror(ctxt, file, line, no);
52663 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
52664 des_filepath(n_file, file, 1);
52665 des_int(n_line, line, 2);
52666 des_int(n_no, no, 3);
52667 xmlResetLastError();
52668 if (mem_base != xmlMemBlocks()) {
52669 printf("Leak of %d blocks found in xmlXPatherror",
52670 xmlMemBlocks() - mem_base);
52672 printf(" %d", n_ctxt);
52673 printf(" %d", n_file);
52674 printf(" %d", n_line);
52675 printf(" %d", n_no);
52689 test_xpathInternals(void) {
52693 if (quiet == 0) printf("Testing xpathInternals : 106 of 117 functions ...\n");
52694 rc = test_valuePop();
52695 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52696 rc = test_valuePush();
52697 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52698 rc = test_xmlXPathAddValues();
52699 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52700 rc = test_xmlXPathBooleanFunction();
52701 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52702 rc = test_xmlXPathCeilingFunction();
52703 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52704 rc = test_xmlXPathCompareValues();
52705 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52706 rc = test_xmlXPathConcatFunction();
52707 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52708 rc = test_xmlXPathContainsFunction();
52709 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52710 rc = test_xmlXPathCountFunction();
52711 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52712 rc = test_xmlXPathDebugDumpCompExpr();
52713 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52714 rc = test_xmlXPathDebugDumpObject();
52715 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52716 rc = test_xmlXPathDifference();
52717 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52718 rc = test_xmlXPathDistinct();
52719 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52720 rc = test_xmlXPathDistinctSorted();
52721 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52722 rc = test_xmlXPathDivValues();
52723 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52724 rc = test_xmlXPathEqualValues();
52725 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52726 rc = test_xmlXPathErr();
52727 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52728 rc = test_xmlXPathEvalExpr();
52729 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52730 rc = test_xmlXPathEvaluatePredicateResult();
52731 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52732 rc = test_xmlXPathFalseFunction();
52733 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52734 rc = test_xmlXPathFloorFunction();
52735 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52736 rc = test_xmlXPathFunctionLookup();
52737 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52738 rc = test_xmlXPathFunctionLookupNS();
52739 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52740 rc = test_xmlXPathHasSameNodes();
52741 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52742 rc = test_xmlXPathIdFunction();
52743 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52744 rc = test_xmlXPathIntersection();
52745 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52746 rc = test_xmlXPathIsNodeType();
52747 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52748 rc = test_xmlXPathLangFunction();
52749 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52750 rc = test_xmlXPathLastFunction();
52751 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52752 rc = test_xmlXPathLeading();
52753 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52754 rc = test_xmlXPathLeadingSorted();
52755 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52756 rc = test_xmlXPathLocalNameFunction();
52757 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52758 rc = test_xmlXPathModValues();
52759 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52760 rc = test_xmlXPathMultValues();
52761 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52762 rc = test_xmlXPathNamespaceURIFunction();
52763 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52764 rc = test_xmlXPathNewBoolean();
52765 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52766 rc = test_xmlXPathNewCString();
52767 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52768 rc = test_xmlXPathNewFloat();
52769 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52770 rc = test_xmlXPathNewNodeSet();
52771 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52772 rc = test_xmlXPathNewNodeSetList();
52773 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52774 rc = test_xmlXPathNewParserContext();
52775 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52776 rc = test_xmlXPathNewString();
52777 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52778 rc = test_xmlXPathNextAncestor();
52779 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52780 rc = test_xmlXPathNextAncestorOrSelf();
52781 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52782 rc = test_xmlXPathNextAttribute();
52783 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52784 rc = test_xmlXPathNextChild();
52785 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52786 rc = test_xmlXPathNextDescendant();
52787 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52788 rc = test_xmlXPathNextDescendantOrSelf();
52789 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52790 rc = test_xmlXPathNextFollowing();
52791 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52792 rc = test_xmlXPathNextFollowingSibling();
52793 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52794 rc = test_xmlXPathNextNamespace();
52795 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52796 rc = test_xmlXPathNextParent();
52797 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52798 rc = test_xmlXPathNextPreceding();
52799 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52800 rc = test_xmlXPathNextPrecedingSibling();
52801 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52802 rc = test_xmlXPathNextSelf();
52803 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52804 rc = test_xmlXPathNodeLeading();
52805 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52806 rc = test_xmlXPathNodeLeadingSorted();
52807 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52808 rc = test_xmlXPathNodeSetAdd();
52809 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52810 rc = test_xmlXPathNodeSetAddNs();
52811 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52812 rc = test_xmlXPathNodeSetAddUnique();
52813 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52814 rc = test_xmlXPathNodeSetContains();
52815 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52816 rc = test_xmlXPathNodeSetDel();
52817 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52818 rc = test_xmlXPathNodeSetMerge();
52819 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52820 rc = test_xmlXPathNodeSetRemove();
52821 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52822 rc = test_xmlXPathNodeSetSort();
52823 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52824 rc = test_xmlXPathNodeTrailing();
52825 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52826 rc = test_xmlXPathNodeTrailingSorted();
52827 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52828 rc = test_xmlXPathNormalizeFunction();
52829 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52830 rc = test_xmlXPathNotEqualValues();
52831 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52832 rc = test_xmlXPathNotFunction();
52833 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52834 rc = test_xmlXPathNsLookup();
52835 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52836 rc = test_xmlXPathNumberFunction();
52837 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52838 rc = test_xmlXPathParseNCName();
52839 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52840 rc = test_xmlXPathParseName();
52841 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52842 rc = test_xmlXPathPopBoolean();
52843 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52844 rc = test_xmlXPathPopExternal();
52845 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52846 rc = test_xmlXPathPopNodeSet();
52847 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52848 rc = test_xmlXPathPopNumber();
52849 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52850 rc = test_xmlXPathPopString();
52851 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52852 rc = test_xmlXPathPositionFunction();
52853 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52854 rc = test_xmlXPathRegisterAllFunctions();
52855 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52856 rc = test_xmlXPathRegisterFunc();
52857 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52858 rc = test_xmlXPathRegisterFuncLookup();
52859 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52860 rc = test_xmlXPathRegisterFuncNS();
52861 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52862 rc = test_xmlXPathRegisterNs();
52863 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52864 rc = test_xmlXPathRegisterVariable();
52865 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52866 rc = test_xmlXPathRegisterVariableLookup();
52867 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52868 rc = test_xmlXPathRegisterVariableNS();
52869 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52870 rc = test_xmlXPathRegisteredFuncsCleanup();
52871 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52872 rc = test_xmlXPathRegisteredNsCleanup();
52873 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52874 rc = test_xmlXPathRegisteredVariablesCleanup();
52875 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52876 rc = test_xmlXPathRoot();
52877 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52878 rc = test_xmlXPathRoundFunction();
52879 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52880 rc = test_xmlXPathStartsWithFunction();
52881 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52882 rc = test_xmlXPathStringEvalNumber();
52883 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52884 rc = test_xmlXPathStringFunction();
52885 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52886 rc = test_xmlXPathStringLengthFunction();
52887 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52888 rc = test_xmlXPathSubValues();
52889 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52890 rc = test_xmlXPathSubstringAfterFunction();
52891 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52892 rc = test_xmlXPathSubstringBeforeFunction();
52893 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52894 rc = test_xmlXPathSubstringFunction();
52895 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52896 rc = test_xmlXPathSumFunction();
52897 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52898 rc = test_xmlXPathTrailing();
52899 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52900 rc = test_xmlXPathTrailingSorted();
52901 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52902 rc = test_xmlXPathTranslateFunction();
52903 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52904 rc = test_xmlXPathTrueFunction();
52905 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52906 rc = test_xmlXPathValueFlipSign();
52907 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52908 rc = test_xmlXPathVariableLookup();
52909 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52910 rc = test_xmlXPathVariableLookupNS();
52911 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52912 rc = test_xmlXPathWrapCString();
52913 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52914 rc = test_xmlXPathWrapExternal();
52915 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52916 rc = test_xmlXPathWrapNodeSet();
52917 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52918 rc = test_xmlXPatherror();
52919 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52922 printf("Module xpathInternals: %d errors\n", test_ret);
52927 test_xmlXPtrBuildNodeList(void) {
52930 #if defined(LIBXML_XPTR_ENABLED)
52932 xmlNodePtr ret_val;
52933 xmlXPathObjectPtr obj; /* the XPointer result from the evaluation. */
52936 for (n_obj = 0;n_obj < gen_nb_xmlXPathObjectPtr;n_obj++) {
52937 mem_base = xmlMemBlocks();
52938 obj = gen_xmlXPathObjectPtr(n_obj, 0);
52940 ret_val = xmlXPtrBuildNodeList(obj);
52941 desret_xmlNodePtr(ret_val);
52943 des_xmlXPathObjectPtr(n_obj, obj, 0);
52944 xmlResetLastError();
52945 if (mem_base != xmlMemBlocks()) {
52946 printf("Leak of %d blocks found in xmlXPtrBuildNodeList",
52947 xmlMemBlocks() - mem_base);
52949 printf(" %d", n_obj);
52961 test_xmlXPtrEval(void) {
52964 #if defined(LIBXML_XPTR_ENABLED)
52966 xmlXPathObjectPtr ret_val;
52967 xmlChar * str; /* the XPointer expression */
52969 xmlXPathContextPtr ctx; /* the XPointer context */
52972 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
52973 for (n_ctx = 0;n_ctx < gen_nb_xmlXPathContextPtr;n_ctx++) {
52974 mem_base = xmlMemBlocks();
52975 str = gen_const_xmlChar_ptr(n_str, 0);
52976 ctx = gen_xmlXPathContextPtr(n_ctx, 1);
52978 ret_val = xmlXPtrEval((const xmlChar *)str, ctx);
52979 desret_xmlXPathObjectPtr(ret_val);
52981 des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 0);
52982 des_xmlXPathContextPtr(n_ctx, ctx, 1);
52983 xmlResetLastError();
52984 if (mem_base != xmlMemBlocks()) {
52985 printf("Leak of %d blocks found in xmlXPtrEval",
52986 xmlMemBlocks() - mem_base);
52988 printf(" %d", n_str);
52989 printf(" %d", n_ctx);
53002 test_xmlXPtrEvalRangePredicate(void) {
53005 #if defined(LIBXML_XPTR_ENABLED)
53007 xmlXPathParserContextPtr ctxt; /* the XPointer Parser context */
53010 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
53011 mem_base = xmlMemBlocks();
53012 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
53014 xmlXPtrEvalRangePredicate(ctxt);
53016 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
53017 xmlResetLastError();
53018 if (mem_base != xmlMemBlocks()) {
53019 printf("Leak of %d blocks found in xmlXPtrEvalRangePredicate",
53020 xmlMemBlocks() - mem_base);
53022 printf(" %d", n_ctxt);
53032 #ifdef LIBXML_XPTR_ENABLED
53034 #define gen_nb_xmlLocationSetPtr 1
53035 static xmlLocationSetPtr gen_xmlLocationSetPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
53038 static void des_xmlLocationSetPtr(int no ATTRIBUTE_UNUSED, xmlLocationSetPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
53044 test_xmlXPtrLocationSetAdd(void) {
53047 #if defined(LIBXML_XPTR_ENABLED)
53049 xmlLocationSetPtr cur; /* the initial range set */
53051 xmlXPathObjectPtr val; /* a new xmlXPathObjectPtr */
53054 for (n_cur = 0;n_cur < gen_nb_xmlLocationSetPtr;n_cur++) {
53055 for (n_val = 0;n_val < gen_nb_xmlXPathObjectPtr;n_val++) {
53056 mem_base = xmlMemBlocks();
53057 cur = gen_xmlLocationSetPtr(n_cur, 0);
53058 val = gen_xmlXPathObjectPtr(n_val, 1);
53060 xmlXPtrLocationSetAdd(cur, val);
53062 des_xmlLocationSetPtr(n_cur, cur, 0);
53063 des_xmlXPathObjectPtr(n_val, val, 1);
53064 xmlResetLastError();
53065 if (mem_base != xmlMemBlocks()) {
53066 printf("Leak of %d blocks found in xmlXPtrLocationSetAdd",
53067 xmlMemBlocks() - mem_base);
53069 printf(" %d", n_cur);
53070 printf(" %d", n_val);
53083 test_xmlXPtrLocationSetCreate(void) {
53087 /* missing type support */
53093 test_xmlXPtrLocationSetDel(void) {
53096 #if defined(LIBXML_XPTR_ENABLED)
53098 xmlLocationSetPtr cur; /* the initial range set */
53100 xmlXPathObjectPtr val; /* an xmlXPathObjectPtr */
53103 for (n_cur = 0;n_cur < gen_nb_xmlLocationSetPtr;n_cur++) {
53104 for (n_val = 0;n_val < gen_nb_xmlXPathObjectPtr;n_val++) {
53105 mem_base = xmlMemBlocks();
53106 cur = gen_xmlLocationSetPtr(n_cur, 0);
53107 val = gen_xmlXPathObjectPtr(n_val, 1);
53109 xmlXPtrLocationSetDel(cur, val);
53111 des_xmlLocationSetPtr(n_cur, cur, 0);
53112 des_xmlXPathObjectPtr(n_val, val, 1);
53113 xmlResetLastError();
53114 if (mem_base != xmlMemBlocks()) {
53115 printf("Leak of %d blocks found in xmlXPtrLocationSetDel",
53116 xmlMemBlocks() - mem_base);
53118 printf(" %d", n_cur);
53119 printf(" %d", n_val);
53132 test_xmlXPtrLocationSetMerge(void) {
53136 /* missing type support */
53142 test_xmlXPtrLocationSetRemove(void) {
53145 #if defined(LIBXML_XPTR_ENABLED)
53147 xmlLocationSetPtr cur; /* the initial range set */
53149 int val; /* the index to remove */
53152 for (n_cur = 0;n_cur < gen_nb_xmlLocationSetPtr;n_cur++) {
53153 for (n_val = 0;n_val < gen_nb_int;n_val++) {
53154 mem_base = xmlMemBlocks();
53155 cur = gen_xmlLocationSetPtr(n_cur, 0);
53156 val = gen_int(n_val, 1);
53158 xmlXPtrLocationSetRemove(cur, val);
53160 des_xmlLocationSetPtr(n_cur, cur, 0);
53161 des_int(n_val, val, 1);
53162 xmlResetLastError();
53163 if (mem_base != xmlMemBlocks()) {
53164 printf("Leak of %d blocks found in xmlXPtrLocationSetRemove",
53165 xmlMemBlocks() - mem_base);
53167 printf(" %d", n_cur);
53168 printf(" %d", n_val);
53181 test_xmlXPtrNewCollapsedRange(void) {
53184 #if defined(LIBXML_XPTR_ENABLED)
53186 xmlXPathObjectPtr ret_val;
53187 xmlNodePtr start; /* the starting and ending node */
53190 for (n_start = 0;n_start < gen_nb_xmlNodePtr;n_start++) {
53191 mem_base = xmlMemBlocks();
53192 start = gen_xmlNodePtr(n_start, 0);
53194 ret_val = xmlXPtrNewCollapsedRange(start);
53195 desret_xmlXPathObjectPtr(ret_val);
53197 des_xmlNodePtr(n_start, start, 0);
53198 xmlResetLastError();
53199 if (mem_base != xmlMemBlocks()) {
53200 printf("Leak of %d blocks found in xmlXPtrNewCollapsedRange",
53201 xmlMemBlocks() - mem_base);
53203 printf(" %d", n_start);
53215 test_xmlXPtrNewContext(void) {
53219 /* missing type support */
53225 test_xmlXPtrNewLocationSetNodeSet(void) {
53228 #if defined(LIBXML_XPTR_ENABLED)
53230 xmlXPathObjectPtr ret_val;
53231 xmlNodeSetPtr set; /* a node set */
53234 for (n_set = 0;n_set < gen_nb_xmlNodeSetPtr;n_set++) {
53235 mem_base = xmlMemBlocks();
53236 set = gen_xmlNodeSetPtr(n_set, 0);
53238 ret_val = xmlXPtrNewLocationSetNodeSet(set);
53239 desret_xmlXPathObjectPtr(ret_val);
53241 des_xmlNodeSetPtr(n_set, set, 0);
53242 xmlResetLastError();
53243 if (mem_base != xmlMemBlocks()) {
53244 printf("Leak of %d blocks found in xmlXPtrNewLocationSetNodeSet",
53245 xmlMemBlocks() - mem_base);
53247 printf(" %d", n_set);
53259 test_xmlXPtrNewLocationSetNodes(void) {
53262 #if defined(LIBXML_XPTR_ENABLED)
53264 xmlXPathObjectPtr ret_val;
53265 xmlNodePtr start; /* the start NodePtr value */
53267 xmlNodePtr end; /* the end NodePtr value or NULL */
53270 for (n_start = 0;n_start < gen_nb_xmlNodePtr;n_start++) {
53271 for (n_end = 0;n_end < gen_nb_xmlNodePtr;n_end++) {
53272 mem_base = xmlMemBlocks();
53273 start = gen_xmlNodePtr(n_start, 0);
53274 end = gen_xmlNodePtr(n_end, 1);
53276 ret_val = xmlXPtrNewLocationSetNodes(start, end);
53277 desret_xmlXPathObjectPtr(ret_val);
53279 des_xmlNodePtr(n_start, start, 0);
53280 des_xmlNodePtr(n_end, end, 1);
53281 xmlResetLastError();
53282 if (mem_base != xmlMemBlocks()) {
53283 printf("Leak of %d blocks found in xmlXPtrNewLocationSetNodes",
53284 xmlMemBlocks() - mem_base);
53286 printf(" %d", n_start);
53287 printf(" %d", n_end);
53300 test_xmlXPtrNewRange(void) {
53303 #if defined(LIBXML_XPTR_ENABLED)
53305 xmlXPathObjectPtr ret_val;
53306 xmlNodePtr start; /* the starting node */
53308 int startindex; /* the start index */
53310 xmlNodePtr end; /* the ending point */
53312 int endindex; /* the ending index */
53315 for (n_start = 0;n_start < gen_nb_xmlNodePtr;n_start++) {
53316 for (n_startindex = 0;n_startindex < gen_nb_int;n_startindex++) {
53317 for (n_end = 0;n_end < gen_nb_xmlNodePtr;n_end++) {
53318 for (n_endindex = 0;n_endindex < gen_nb_int;n_endindex++) {
53319 mem_base = xmlMemBlocks();
53320 start = gen_xmlNodePtr(n_start, 0);
53321 startindex = gen_int(n_startindex, 1);
53322 end = gen_xmlNodePtr(n_end, 2);
53323 endindex = gen_int(n_endindex, 3);
53325 ret_val = xmlXPtrNewRange(start, startindex, end, endindex);
53326 desret_xmlXPathObjectPtr(ret_val);
53328 des_xmlNodePtr(n_start, start, 0);
53329 des_int(n_startindex, startindex, 1);
53330 des_xmlNodePtr(n_end, end, 2);
53331 des_int(n_endindex, endindex, 3);
53332 xmlResetLastError();
53333 if (mem_base != xmlMemBlocks()) {
53334 printf("Leak of %d blocks found in xmlXPtrNewRange",
53335 xmlMemBlocks() - mem_base);
53337 printf(" %d", n_start);
53338 printf(" %d", n_startindex);
53339 printf(" %d", n_end);
53340 printf(" %d", n_endindex);
53355 test_xmlXPtrNewRangeNodeObject(void) {
53358 #if defined(LIBXML_XPTR_ENABLED)
53360 xmlXPathObjectPtr ret_val;
53361 xmlNodePtr start; /* the starting node */
53363 xmlXPathObjectPtr end; /* the ending object */
53366 for (n_start = 0;n_start < gen_nb_xmlNodePtr;n_start++) {
53367 for (n_end = 0;n_end < gen_nb_xmlXPathObjectPtr;n_end++) {
53368 mem_base = xmlMemBlocks();
53369 start = gen_xmlNodePtr(n_start, 0);
53370 end = gen_xmlXPathObjectPtr(n_end, 1);
53372 ret_val = xmlXPtrNewRangeNodeObject(start, end);
53373 desret_xmlXPathObjectPtr(ret_val);
53375 des_xmlNodePtr(n_start, start, 0);
53376 des_xmlXPathObjectPtr(n_end, end, 1);
53377 xmlResetLastError();
53378 if (mem_base != xmlMemBlocks()) {
53379 printf("Leak of %d blocks found in xmlXPtrNewRangeNodeObject",
53380 xmlMemBlocks() - mem_base);
53382 printf(" %d", n_start);
53383 printf(" %d", n_end);
53396 test_xmlXPtrNewRangeNodePoint(void) {
53399 #if defined(LIBXML_XPTR_ENABLED)
53401 xmlXPathObjectPtr ret_val;
53402 xmlNodePtr start; /* the starting node */
53404 xmlXPathObjectPtr end; /* the ending point */
53407 for (n_start = 0;n_start < gen_nb_xmlNodePtr;n_start++) {
53408 for (n_end = 0;n_end < gen_nb_xmlXPathObjectPtr;n_end++) {
53409 mem_base = xmlMemBlocks();
53410 start = gen_xmlNodePtr(n_start, 0);
53411 end = gen_xmlXPathObjectPtr(n_end, 1);
53413 ret_val = xmlXPtrNewRangeNodePoint(start, end);
53414 desret_xmlXPathObjectPtr(ret_val);
53416 des_xmlNodePtr(n_start, start, 0);
53417 des_xmlXPathObjectPtr(n_end, end, 1);
53418 xmlResetLastError();
53419 if (mem_base != xmlMemBlocks()) {
53420 printf("Leak of %d blocks found in xmlXPtrNewRangeNodePoint",
53421 xmlMemBlocks() - mem_base);
53423 printf(" %d", n_start);
53424 printf(" %d", n_end);
53437 test_xmlXPtrNewRangeNodes(void) {
53440 #if defined(LIBXML_XPTR_ENABLED)
53442 xmlXPathObjectPtr ret_val;
53443 xmlNodePtr start; /* the starting node */
53445 xmlNodePtr end; /* the ending node */
53448 for (n_start = 0;n_start < gen_nb_xmlNodePtr;n_start++) {
53449 for (n_end = 0;n_end < gen_nb_xmlNodePtr;n_end++) {
53450 mem_base = xmlMemBlocks();
53451 start = gen_xmlNodePtr(n_start, 0);
53452 end = gen_xmlNodePtr(n_end, 1);
53454 ret_val = xmlXPtrNewRangeNodes(start, end);
53455 desret_xmlXPathObjectPtr(ret_val);
53457 des_xmlNodePtr(n_start, start, 0);
53458 des_xmlNodePtr(n_end, end, 1);
53459 xmlResetLastError();
53460 if (mem_base != xmlMemBlocks()) {
53461 printf("Leak of %d blocks found in xmlXPtrNewRangeNodes",
53462 xmlMemBlocks() - mem_base);
53464 printf(" %d", n_start);
53465 printf(" %d", n_end);
53478 test_xmlXPtrNewRangePointNode(void) {
53481 #if defined(LIBXML_XPTR_ENABLED)
53483 xmlXPathObjectPtr ret_val;
53484 xmlXPathObjectPtr start; /* the starting point */
53486 xmlNodePtr end; /* the ending node */
53489 for (n_start = 0;n_start < gen_nb_xmlXPathObjectPtr;n_start++) {
53490 for (n_end = 0;n_end < gen_nb_xmlNodePtr;n_end++) {
53491 mem_base = xmlMemBlocks();
53492 start = gen_xmlXPathObjectPtr(n_start, 0);
53493 end = gen_xmlNodePtr(n_end, 1);
53495 ret_val = xmlXPtrNewRangePointNode(start, end);
53496 desret_xmlXPathObjectPtr(ret_val);
53498 des_xmlXPathObjectPtr(n_start, start, 0);
53499 des_xmlNodePtr(n_end, end, 1);
53500 xmlResetLastError();
53501 if (mem_base != xmlMemBlocks()) {
53502 printf("Leak of %d blocks found in xmlXPtrNewRangePointNode",
53503 xmlMemBlocks() - mem_base);
53505 printf(" %d", n_start);
53506 printf(" %d", n_end);
53519 test_xmlXPtrNewRangePoints(void) {
53522 #if defined(LIBXML_XPTR_ENABLED)
53524 xmlXPathObjectPtr ret_val;
53525 xmlXPathObjectPtr start; /* the starting point */
53527 xmlXPathObjectPtr end; /* the ending point */
53530 for (n_start = 0;n_start < gen_nb_xmlXPathObjectPtr;n_start++) {
53531 for (n_end = 0;n_end < gen_nb_xmlXPathObjectPtr;n_end++) {
53532 mem_base = xmlMemBlocks();
53533 start = gen_xmlXPathObjectPtr(n_start, 0);
53534 end = gen_xmlXPathObjectPtr(n_end, 1);
53536 ret_val = xmlXPtrNewRangePoints(start, end);
53537 desret_xmlXPathObjectPtr(ret_val);
53539 des_xmlXPathObjectPtr(n_start, start, 0);
53540 des_xmlXPathObjectPtr(n_end, end, 1);
53541 xmlResetLastError();
53542 if (mem_base != xmlMemBlocks()) {
53543 printf("Leak of %d blocks found in xmlXPtrNewRangePoints",
53544 xmlMemBlocks() - mem_base);
53546 printf(" %d", n_start);
53547 printf(" %d", n_end);
53560 test_xmlXPtrRangeToFunction(void) {
53563 #if defined(LIBXML_XPTR_ENABLED)
53565 xmlXPathParserContextPtr ctxt; /* the XPointer Parser context */
53567 int nargs; /* the number of args */
53570 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
53571 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
53572 mem_base = xmlMemBlocks();
53573 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
53574 nargs = gen_int(n_nargs, 1);
53576 xmlXPtrRangeToFunction(ctxt, nargs);
53578 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
53579 des_int(n_nargs, nargs, 1);
53580 xmlResetLastError();
53581 if (mem_base != xmlMemBlocks()) {
53582 printf("Leak of %d blocks found in xmlXPtrRangeToFunction",
53583 xmlMemBlocks() - mem_base);
53585 printf(" %d", n_ctxt);
53586 printf(" %d", n_nargs);
53599 test_xmlXPtrWrapLocationSet(void) {
53602 #if defined(LIBXML_XPTR_ENABLED)
53604 xmlXPathObjectPtr ret_val;
53605 xmlLocationSetPtr val; /* the LocationSet value */
53608 for (n_val = 0;n_val < gen_nb_xmlLocationSetPtr;n_val++) {
53609 mem_base = xmlMemBlocks();
53610 val = gen_xmlLocationSetPtr(n_val, 0);
53612 ret_val = xmlXPtrWrapLocationSet(val);
53613 desret_xmlXPathObjectPtr(ret_val);
53615 des_xmlLocationSetPtr(n_val, val, 0);
53616 xmlResetLastError();
53617 if (mem_base != xmlMemBlocks()) {
53618 printf("Leak of %d blocks found in xmlXPtrWrapLocationSet",
53619 xmlMemBlocks() - mem_base);
53621 printf(" %d", n_val);
53632 test_xpointer(void) {
53636 if (quiet == 0) printf("Testing xpointer : 17 of 21 functions ...\n");
53637 rc = test_xmlXPtrBuildNodeList();
53638 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
53639 rc = test_xmlXPtrEval();
53640 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
53641 rc = test_xmlXPtrEvalRangePredicate();
53642 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
53643 rc = test_xmlXPtrLocationSetAdd();
53644 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
53645 rc = test_xmlXPtrLocationSetCreate();
53646 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
53647 rc = test_xmlXPtrLocationSetDel();
53648 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
53649 rc = test_xmlXPtrLocationSetMerge();
53650 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
53651 rc = test_xmlXPtrLocationSetRemove();
53652 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
53653 rc = test_xmlXPtrNewCollapsedRange();
53654 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
53655 rc = test_xmlXPtrNewContext();
53656 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
53657 rc = test_xmlXPtrNewLocationSetNodeSet();
53658 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
53659 rc = test_xmlXPtrNewLocationSetNodes();
53660 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
53661 rc = test_xmlXPtrNewRange();
53662 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
53663 rc = test_xmlXPtrNewRangeNodeObject();
53664 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
53665 rc = test_xmlXPtrNewRangeNodePoint();
53666 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
53667 rc = test_xmlXPtrNewRangeNodes();
53668 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
53669 rc = test_xmlXPtrNewRangePointNode();
53670 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
53671 rc = test_xmlXPtrNewRangePoints();
53672 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
53673 rc = test_xmlXPtrRangeToFunction();
53674 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
53675 rc = test_xmlXPtrWrapLocationSet();
53676 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
53679 printf("Module xpointer: %d errors\n", test_ret);
53683 test_module(const char *module) {
53684 if (!strcmp(module, "HTMLparser")) return(test_HTMLparser());
53685 if (!strcmp(module, "HTMLtree")) return(test_HTMLtree());
53686 if (!strcmp(module, "SAX2")) return(test_SAX2());
53687 if (!strcmp(module, "c14n")) return(test_c14n());
53688 if (!strcmp(module, "catalog")) return(test_catalog());
53689 if (!strcmp(module, "chvalid")) return(test_chvalid());
53690 if (!strcmp(module, "debugXML")) return(test_debugXML());
53691 if (!strcmp(module, "dict")) return(test_dict());
53692 if (!strcmp(module, "encoding")) return(test_encoding());
53693 if (!strcmp(module, "entities")) return(test_entities());
53694 if (!strcmp(module, "hash")) return(test_hash());
53695 if (!strcmp(module, "list")) return(test_list());
53696 if (!strcmp(module, "nanoftp")) return(test_nanoftp());
53697 if (!strcmp(module, "nanohttp")) return(test_nanohttp());
53698 if (!strcmp(module, "parser")) return(test_parser());
53699 if (!strcmp(module, "parserInternals")) return(test_parserInternals());
53700 if (!strcmp(module, "pattern")) return(test_pattern());
53701 if (!strcmp(module, "relaxng")) return(test_relaxng());
53702 if (!strcmp(module, "schemasInternals")) return(test_schemasInternals());
53703 if (!strcmp(module, "schematron")) return(test_schematron());
53704 if (!strcmp(module, "tree")) return(test_tree());
53705 if (!strcmp(module, "uri")) return(test_uri());
53706 if (!strcmp(module, "valid")) return(test_valid());
53707 if (!strcmp(module, "xinclude")) return(test_xinclude());
53708 if (!strcmp(module, "xmlIO")) return(test_xmlIO());
53709 if (!strcmp(module, "xmlautomata")) return(test_xmlautomata());
53710 if (!strcmp(module, "xmlerror")) return(test_xmlerror());
53711 if (!strcmp(module, "xmlmodule")) return(test_xmlmodule());
53712 if (!strcmp(module, "xmlreader")) return(test_xmlreader());
53713 if (!strcmp(module, "xmlregexp")) return(test_xmlregexp());
53714 if (!strcmp(module, "xmlsave")) return(test_xmlsave());
53715 if (!strcmp(module, "xmlschemas")) return(test_xmlschemas());
53716 if (!strcmp(module, "xmlschemastypes")) return(test_xmlschemastypes());
53717 if (!strcmp(module, "xmlstring")) return(test_xmlstring());
53718 if (!strcmp(module, "xmlunicode")) return(test_xmlunicode());
53719 if (!strcmp(module, "xmlwriter")) return(test_xmlwriter());
53720 if (!strcmp(module, "xpath")) return(test_xpath());
53721 if (!strcmp(module, "xpathInternals")) return(test_xpathInternals());
53722 if (!strcmp(module, "xpointer")) return(test_xpointer());