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
1250 test_ret += test_HTMLparser();
1251 test_ret += test_HTMLtree();
1252 test_ret += test_SAX2();
1253 test_ret += test_c14n();
1254 test_ret += test_catalog();
1255 test_ret += test_chvalid();
1256 test_ret += test_debugXML();
1257 test_ret += test_dict();
1258 test_ret += test_encoding();
1259 test_ret += test_entities();
1260 test_ret += test_hash();
1261 test_ret += test_list();
1262 test_ret += test_nanoftp();
1263 test_ret += test_nanohttp();
1264 test_ret += test_parser();
1265 test_ret += test_parserInternals();
1266 test_ret += test_pattern();
1267 test_ret += test_relaxng();
1268 test_ret += test_schemasInternals();
1269 test_ret += test_schematron();
1270 test_ret += test_tree();
1271 test_ret += test_uri();
1272 test_ret += test_valid();
1273 test_ret += test_xinclude();
1274 test_ret += test_xmlIO();
1275 test_ret += test_xmlautomata();
1276 test_ret += test_xmlerror();
1277 test_ret += test_xmlmodule();
1278 test_ret += test_xmlreader();
1279 test_ret += test_xmlregexp();
1280 test_ret += test_xmlsave();
1281 test_ret += test_xmlschemas();
1282 test_ret += test_xmlschemastypes();
1283 test_ret += test_xmlstring();
1284 test_ret += test_xmlunicode();
1285 test_ret += test_xmlwriter();
1286 test_ret += test_xpath();
1287 test_ret += test_xpathInternals();
1288 test_ret += test_xpointer();
1290 printf("Total: %d functions, %d tests, %d errors\n",
1291 function_tests, call_tests, test_ret);
1297 test_UTF8ToHtml(void) {
1300 #if defined(LIBXML_HTML_ENABLED)
1303 unsigned char * out; /* a pointer to an array of bytes to store the result */
1305 int * outlen; /* the length of @out */
1307 unsigned char * in; /* a pointer to an array of UTF-8 chars */
1309 int * inlen; /* the length of @in */
1312 for (n_out = 0;n_out < gen_nb_unsigned_char_ptr;n_out++) {
1313 for (n_outlen = 0;n_outlen < gen_nb_int_ptr;n_outlen++) {
1314 for (n_in = 0;n_in < gen_nb_const_unsigned_char_ptr;n_in++) {
1315 for (n_inlen = 0;n_inlen < gen_nb_int_ptr;n_inlen++) {
1316 mem_base = xmlMemBlocks();
1317 out = gen_unsigned_char_ptr(n_out, 0);
1318 outlen = gen_int_ptr(n_outlen, 1);
1319 in = gen_const_unsigned_char_ptr(n_in, 2);
1320 inlen = gen_int_ptr(n_inlen, 3);
1322 ret_val = UTF8ToHtml(out, outlen, (const unsigned char *)in, inlen);
1323 desret_int(ret_val);
1325 des_unsigned_char_ptr(n_out, out, 0);
1326 des_int_ptr(n_outlen, outlen, 1);
1327 des_const_unsigned_char_ptr(n_in, (const unsigned char *)in, 2);
1328 des_int_ptr(n_inlen, inlen, 3);
1329 xmlResetLastError();
1330 if (mem_base != xmlMemBlocks()) {
1331 printf("Leak of %d blocks found in UTF8ToHtml",
1332 xmlMemBlocks() - mem_base);
1334 printf(" %d", n_out);
1335 printf(" %d", n_outlen);
1336 printf(" %d", n_in);
1337 printf(" %d", n_inlen);
1350 #ifdef LIBXML_HTML_ENABLED
1352 #define gen_nb_const_htmlElemDesc_ptr 1
1353 static htmlElemDesc * gen_const_htmlElemDesc_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
1356 static void des_const_htmlElemDesc_ptr(int no ATTRIBUTE_UNUSED, const htmlElemDesc * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
1362 test_htmlAttrAllowed(void) {
1365 #if defined(LIBXML_HTML_ENABLED)
1368 htmlElemDesc * elt; /* HTML element */
1370 xmlChar * attr; /* HTML attribute */
1372 int legacy; /* whether to allow deprecated attributes */
1375 for (n_elt = 0;n_elt < gen_nb_const_htmlElemDesc_ptr;n_elt++) {
1376 for (n_attr = 0;n_attr < gen_nb_const_xmlChar_ptr;n_attr++) {
1377 for (n_legacy = 0;n_legacy < gen_nb_int;n_legacy++) {
1378 mem_base = xmlMemBlocks();
1379 elt = gen_const_htmlElemDesc_ptr(n_elt, 0);
1380 attr = gen_const_xmlChar_ptr(n_attr, 1);
1381 legacy = gen_int(n_legacy, 2);
1383 ret_val = htmlAttrAllowed((const htmlElemDesc *)elt, (const xmlChar *)attr, legacy);
1384 desret_htmlStatus(ret_val);
1386 des_const_htmlElemDesc_ptr(n_elt, (const htmlElemDesc *)elt, 0);
1387 des_const_xmlChar_ptr(n_attr, (const xmlChar *)attr, 1);
1388 des_int(n_legacy, legacy, 2);
1389 xmlResetLastError();
1390 if (mem_base != xmlMemBlocks()) {
1391 printf("Leak of %d blocks found in htmlAttrAllowed",
1392 xmlMemBlocks() - mem_base);
1394 printf(" %d", n_elt);
1395 printf(" %d", n_attr);
1396 printf(" %d", n_legacy);
1408 #ifdef LIBXML_HTML_ENABLED
1410 #define gen_nb_htmlNodePtr 1
1411 static htmlNodePtr gen_htmlNodePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
1414 static void des_htmlNodePtr(int no ATTRIBUTE_UNUSED, htmlNodePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
1420 test_htmlAutoCloseTag(void) {
1423 #if defined(LIBXML_HTML_ENABLED)
1426 htmlDocPtr doc; /* the HTML document */
1428 xmlChar * name; /* The tag name */
1430 htmlNodePtr elem; /* the HTML element */
1433 for (n_doc = 0;n_doc < gen_nb_htmlDocPtr;n_doc++) {
1434 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
1435 for (n_elem = 0;n_elem < gen_nb_htmlNodePtr;n_elem++) {
1436 mem_base = xmlMemBlocks();
1437 doc = gen_htmlDocPtr(n_doc, 0);
1438 name = gen_const_xmlChar_ptr(n_name, 1);
1439 elem = gen_htmlNodePtr(n_elem, 2);
1441 ret_val = htmlAutoCloseTag(doc, (const xmlChar *)name, elem);
1442 desret_int(ret_val);
1444 des_htmlDocPtr(n_doc, doc, 0);
1445 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
1446 des_htmlNodePtr(n_elem, elem, 2);
1447 xmlResetLastError();
1448 if (mem_base != xmlMemBlocks()) {
1449 printf("Leak of %d blocks found in htmlAutoCloseTag",
1450 xmlMemBlocks() - mem_base);
1452 printf(" %d", n_doc);
1453 printf(" %d", n_name);
1454 printf(" %d", n_elem);
1468 test_htmlCreateMemoryParserCtxt(void) {
1471 #if defined(LIBXML_HTML_ENABLED)
1473 htmlParserCtxtPtr ret_val;
1474 char * buffer; /* a pointer to a char array */
1476 int size; /* the size of the array */
1479 for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
1480 for (n_size = 0;n_size < gen_nb_int;n_size++) {
1481 mem_base = xmlMemBlocks();
1482 buffer = gen_const_char_ptr(n_buffer, 0);
1483 size = gen_int(n_size, 1);
1485 ret_val = htmlCreateMemoryParserCtxt((const char *)buffer, size);
1486 desret_htmlParserCtxtPtr(ret_val);
1488 des_const_char_ptr(n_buffer, (const char *)buffer, 0);
1489 des_int(n_size, size, 1);
1490 xmlResetLastError();
1491 if (mem_base != xmlMemBlocks()) {
1492 printf("Leak of %d blocks found in htmlCreateMemoryParserCtxt",
1493 xmlMemBlocks() - mem_base);
1495 printf(" %d", n_buffer);
1496 printf(" %d", n_size);
1507 #ifdef LIBXML_HTML_ENABLED
1509 #define gen_nb_htmlSAXHandlerPtr 1
1510 static htmlSAXHandlerPtr gen_htmlSAXHandlerPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
1513 static void des_htmlSAXHandlerPtr(int no ATTRIBUTE_UNUSED, htmlSAXHandlerPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
1519 test_htmlCreatePushParserCtxt(void) {
1522 #if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_PUSH_ENABLED)
1524 htmlParserCtxtPtr ret_val;
1525 htmlSAXHandlerPtr sax; /* a SAX handler */
1527 void * user_data; /* The user data returned on SAX callbacks */
1529 char * chunk; /* a pointer to an array of chars */
1531 int size; /* number of chars in the array */
1533 const char * filename; /* an optional file name or URI */
1535 xmlCharEncoding enc; /* an optional encoding */
1538 for (n_sax = 0;n_sax < gen_nb_htmlSAXHandlerPtr;n_sax++) {
1539 for (n_user_data = 0;n_user_data < gen_nb_userdata;n_user_data++) {
1540 for (n_chunk = 0;n_chunk < gen_nb_const_char_ptr;n_chunk++) {
1541 for (n_size = 0;n_size < gen_nb_int;n_size++) {
1542 for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
1543 for (n_enc = 0;n_enc < gen_nb_xmlCharEncoding;n_enc++) {
1544 mem_base = xmlMemBlocks();
1545 sax = gen_htmlSAXHandlerPtr(n_sax, 0);
1546 user_data = gen_userdata(n_user_data, 1);
1547 chunk = gen_const_char_ptr(n_chunk, 2);
1548 size = gen_int(n_size, 3);
1549 filename = gen_fileoutput(n_filename, 4);
1550 enc = gen_xmlCharEncoding(n_enc, 5);
1552 ret_val = htmlCreatePushParserCtxt(sax, user_data, (const char *)chunk, size, filename, enc);
1553 desret_htmlParserCtxtPtr(ret_val);
1555 des_htmlSAXHandlerPtr(n_sax, sax, 0);
1556 des_userdata(n_user_data, user_data, 1);
1557 des_const_char_ptr(n_chunk, (const char *)chunk, 2);
1558 des_int(n_size, size, 3);
1559 des_fileoutput(n_filename, filename, 4);
1560 des_xmlCharEncoding(n_enc, enc, 5);
1561 xmlResetLastError();
1562 if (mem_base != xmlMemBlocks()) {
1563 printf("Leak of %d blocks found in htmlCreatePushParserCtxt",
1564 xmlMemBlocks() - mem_base);
1566 printf(" %d", n_sax);
1567 printf(" %d", n_user_data);
1568 printf(" %d", n_chunk);
1569 printf(" %d", n_size);
1570 printf(" %d", n_filename);
1571 printf(" %d", n_enc);
1588 test_htmlCtxtReadDoc(void) {
1591 #if defined(LIBXML_HTML_ENABLED)
1594 htmlParserCtxtPtr ctxt; /* an HTML parser context */
1596 xmlChar * cur; /* a pointer to a zero terminated string */
1598 const char * URL; /* the base URL to use for the document */
1600 char * encoding; /* the document encoding, or NULL */
1602 int options; /* a combination of htmlParserOption(s) */
1605 for (n_ctxt = 0;n_ctxt < gen_nb_htmlParserCtxtPtr;n_ctxt++) {
1606 for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
1607 for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
1608 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
1609 for (n_options = 0;n_options < gen_nb_int;n_options++) {
1610 mem_base = xmlMemBlocks();
1611 ctxt = gen_htmlParserCtxtPtr(n_ctxt, 0);
1612 cur = gen_const_xmlChar_ptr(n_cur, 1);
1613 URL = gen_filepath(n_URL, 2);
1614 encoding = gen_const_char_ptr(n_encoding, 3);
1615 options = gen_int(n_options, 4);
1617 ret_val = htmlCtxtReadDoc(ctxt, (const xmlChar *)cur, URL, (const char *)encoding, options);
1618 desret_htmlDocPtr(ret_val);
1620 des_htmlParserCtxtPtr(n_ctxt, ctxt, 0);
1621 des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 1);
1622 des_filepath(n_URL, URL, 2);
1623 des_const_char_ptr(n_encoding, (const char *)encoding, 3);
1624 des_int(n_options, options, 4);
1625 xmlResetLastError();
1626 if (mem_base != xmlMemBlocks()) {
1627 printf("Leak of %d blocks found in htmlCtxtReadDoc",
1628 xmlMemBlocks() - mem_base);
1630 printf(" %d", n_ctxt);
1631 printf(" %d", n_cur);
1632 printf(" %d", n_URL);
1633 printf(" %d", n_encoding);
1634 printf(" %d", n_options);
1650 test_htmlCtxtReadFile(void) {
1653 #if defined(LIBXML_HTML_ENABLED)
1655 htmlParserCtxtPtr ctxt; /* an HTML parser context */
1657 const char * filename; /* a file or URL */
1659 char * encoding; /* the document encoding, or NULL */
1661 int options; /* a combination of htmlParserOption(s) */
1664 for (n_ctxt = 0;n_ctxt < gen_nb_htmlParserCtxtPtr;n_ctxt++) {
1665 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
1666 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
1667 for (n_options = 0;n_options < gen_nb_int;n_options++) {
1668 ctxt = gen_htmlParserCtxtPtr(n_ctxt, 0);
1669 filename = gen_filepath(n_filename, 1);
1670 encoding = gen_const_char_ptr(n_encoding, 2);
1671 options = gen_int(n_options, 3);
1673 ret_val = htmlCtxtReadFile(ctxt, filename, (const char *)encoding, options);
1674 desret_htmlDocPtr(ret_val);
1676 des_htmlParserCtxtPtr(n_ctxt, ctxt, 0);
1677 des_filepath(n_filename, filename, 1);
1678 des_const_char_ptr(n_encoding, (const char *)encoding, 2);
1679 des_int(n_options, options, 3);
1680 xmlResetLastError();
1693 test_htmlCtxtReadMemory(void) {
1696 #if defined(LIBXML_HTML_ENABLED)
1699 htmlParserCtxtPtr ctxt; /* an HTML parser context */
1701 char * buffer; /* a pointer to a char array */
1703 int size; /* the size of the array */
1705 const char * URL; /* the base URL to use for the document */
1707 char * encoding; /* the document encoding, or NULL */
1709 int options; /* a combination of htmlParserOption(s) */
1712 for (n_ctxt = 0;n_ctxt < gen_nb_htmlParserCtxtPtr;n_ctxt++) {
1713 for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
1714 for (n_size = 0;n_size < gen_nb_int;n_size++) {
1715 for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
1716 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
1717 for (n_options = 0;n_options < gen_nb_int;n_options++) {
1718 mem_base = xmlMemBlocks();
1719 ctxt = gen_htmlParserCtxtPtr(n_ctxt, 0);
1720 buffer = gen_const_char_ptr(n_buffer, 1);
1721 size = gen_int(n_size, 2);
1722 URL = gen_filepath(n_URL, 3);
1723 encoding = gen_const_char_ptr(n_encoding, 4);
1724 options = gen_int(n_options, 5);
1726 ret_val = htmlCtxtReadMemory(ctxt, (const char *)buffer, size, URL, (const char *)encoding, options);
1727 desret_htmlDocPtr(ret_val);
1729 des_htmlParserCtxtPtr(n_ctxt, ctxt, 0);
1730 des_const_char_ptr(n_buffer, (const char *)buffer, 1);
1731 des_int(n_size, size, 2);
1732 des_filepath(n_URL, URL, 3);
1733 des_const_char_ptr(n_encoding, (const char *)encoding, 4);
1734 des_int(n_options, options, 5);
1735 xmlResetLastError();
1736 if (mem_base != xmlMemBlocks()) {
1737 printf("Leak of %d blocks found in htmlCtxtReadMemory",
1738 xmlMemBlocks() - mem_base);
1740 printf(" %d", n_ctxt);
1741 printf(" %d", n_buffer);
1742 printf(" %d", n_size);
1743 printf(" %d", n_URL);
1744 printf(" %d", n_encoding);
1745 printf(" %d", n_options);
1762 test_htmlCtxtReset(void) {
1765 #if defined(LIBXML_HTML_ENABLED)
1767 htmlParserCtxtPtr ctxt; /* an HTML parser context */
1770 for (n_ctxt = 0;n_ctxt < gen_nb_htmlParserCtxtPtr;n_ctxt++) {
1771 mem_base = xmlMemBlocks();
1772 ctxt = gen_htmlParserCtxtPtr(n_ctxt, 0);
1774 htmlCtxtReset(ctxt);
1776 des_htmlParserCtxtPtr(n_ctxt, ctxt, 0);
1777 xmlResetLastError();
1778 if (mem_base != xmlMemBlocks()) {
1779 printf("Leak of %d blocks found in htmlCtxtReset",
1780 xmlMemBlocks() - mem_base);
1782 printf(" %d", n_ctxt);
1794 test_htmlCtxtUseOptions(void) {
1797 #if defined(LIBXML_HTML_ENABLED)
1800 htmlParserCtxtPtr ctxt; /* an HTML parser context */
1802 int options; /* a combination of htmlParserOption(s) */
1805 for (n_ctxt = 0;n_ctxt < gen_nb_htmlParserCtxtPtr;n_ctxt++) {
1806 for (n_options = 0;n_options < gen_nb_int;n_options++) {
1807 mem_base = xmlMemBlocks();
1808 ctxt = gen_htmlParserCtxtPtr(n_ctxt, 0);
1809 options = gen_int(n_options, 1);
1811 ret_val = htmlCtxtUseOptions(ctxt, options);
1812 desret_int(ret_val);
1814 des_htmlParserCtxtPtr(n_ctxt, ctxt, 0);
1815 des_int(n_options, options, 1);
1816 xmlResetLastError();
1817 if (mem_base != xmlMemBlocks()) {
1818 printf("Leak of %d blocks found in htmlCtxtUseOptions",
1819 xmlMemBlocks() - mem_base);
1821 printf(" %d", n_ctxt);
1822 printf(" %d", n_options);
1835 test_htmlElementAllowedHere(void) {
1838 #if defined(LIBXML_HTML_ENABLED)
1841 htmlElemDesc * parent; /* HTML parent element */
1843 xmlChar * elt; /* HTML element */
1846 for (n_parent = 0;n_parent < gen_nb_const_htmlElemDesc_ptr;n_parent++) {
1847 for (n_elt = 0;n_elt < gen_nb_const_xmlChar_ptr;n_elt++) {
1848 mem_base = xmlMemBlocks();
1849 parent = gen_const_htmlElemDesc_ptr(n_parent, 0);
1850 elt = gen_const_xmlChar_ptr(n_elt, 1);
1852 ret_val = htmlElementAllowedHere((const htmlElemDesc *)parent, (const xmlChar *)elt);
1853 desret_int(ret_val);
1855 des_const_htmlElemDesc_ptr(n_parent, (const htmlElemDesc *)parent, 0);
1856 des_const_xmlChar_ptr(n_elt, (const xmlChar *)elt, 1);
1857 xmlResetLastError();
1858 if (mem_base != xmlMemBlocks()) {
1859 printf("Leak of %d blocks found in htmlElementAllowedHere",
1860 xmlMemBlocks() - mem_base);
1862 printf(" %d", n_parent);
1863 printf(" %d", n_elt);
1876 test_htmlElementStatusHere(void) {
1879 #if defined(LIBXML_HTML_ENABLED)
1882 htmlElemDesc * parent; /* HTML parent element */
1884 htmlElemDesc * elt; /* HTML element */
1887 for (n_parent = 0;n_parent < gen_nb_const_htmlElemDesc_ptr;n_parent++) {
1888 for (n_elt = 0;n_elt < gen_nb_const_htmlElemDesc_ptr;n_elt++) {
1889 mem_base = xmlMemBlocks();
1890 parent = gen_const_htmlElemDesc_ptr(n_parent, 0);
1891 elt = gen_const_htmlElemDesc_ptr(n_elt, 1);
1893 ret_val = htmlElementStatusHere((const htmlElemDesc *)parent, (const htmlElemDesc *)elt);
1894 desret_htmlStatus(ret_val);
1896 des_const_htmlElemDesc_ptr(n_parent, (const htmlElemDesc *)parent, 0);
1897 des_const_htmlElemDesc_ptr(n_elt, (const htmlElemDesc *)elt, 1);
1898 xmlResetLastError();
1899 if (mem_base != xmlMemBlocks()) {
1900 printf("Leak of %d blocks found in htmlElementStatusHere",
1901 xmlMemBlocks() - mem_base);
1903 printf(" %d", n_parent);
1904 printf(" %d", n_elt);
1917 test_htmlEncodeEntities(void) {
1920 #if defined(LIBXML_HTML_ENABLED)
1923 unsigned char * out; /* a pointer to an array of bytes to store the result */
1925 int * outlen; /* the length of @out */
1927 unsigned char * in; /* a pointer to an array of UTF-8 chars */
1929 int * inlen; /* the length of @in */
1931 int quoteChar; /* the quote character to escape (' or ") or zero. */
1934 for (n_out = 0;n_out < gen_nb_unsigned_char_ptr;n_out++) {
1935 for (n_outlen = 0;n_outlen < gen_nb_int_ptr;n_outlen++) {
1936 for (n_in = 0;n_in < gen_nb_const_unsigned_char_ptr;n_in++) {
1937 for (n_inlen = 0;n_inlen < gen_nb_int_ptr;n_inlen++) {
1938 for (n_quoteChar = 0;n_quoteChar < gen_nb_int;n_quoteChar++) {
1939 mem_base = xmlMemBlocks();
1940 out = gen_unsigned_char_ptr(n_out, 0);
1941 outlen = gen_int_ptr(n_outlen, 1);
1942 in = gen_const_unsigned_char_ptr(n_in, 2);
1943 inlen = gen_int_ptr(n_inlen, 3);
1944 quoteChar = gen_int(n_quoteChar, 4);
1946 ret_val = htmlEncodeEntities(out, outlen, (const unsigned char *)in, inlen, quoteChar);
1947 desret_int(ret_val);
1949 des_unsigned_char_ptr(n_out, out, 0);
1950 des_int_ptr(n_outlen, outlen, 1);
1951 des_const_unsigned_char_ptr(n_in, (const unsigned char *)in, 2);
1952 des_int_ptr(n_inlen, inlen, 3);
1953 des_int(n_quoteChar, quoteChar, 4);
1954 xmlResetLastError();
1955 if (mem_base != xmlMemBlocks()) {
1956 printf("Leak of %d blocks found in htmlEncodeEntities",
1957 xmlMemBlocks() - mem_base);
1959 printf(" %d", n_out);
1960 printf(" %d", n_outlen);
1961 printf(" %d", n_in);
1962 printf(" %d", n_inlen);
1963 printf(" %d", n_quoteChar);
1979 test_htmlEntityLookup(void) {
1982 #if defined(LIBXML_HTML_ENABLED)
1984 const htmlEntityDesc * ret_val;
1985 xmlChar * name; /* the entity name */
1988 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
1989 mem_base = xmlMemBlocks();
1990 name = gen_const_xmlChar_ptr(n_name, 0);
1992 ret_val = htmlEntityLookup((const xmlChar *)name);
1993 desret_const_htmlEntityDesc_ptr(ret_val);
1995 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 0);
1996 xmlResetLastError();
1997 if (mem_base != xmlMemBlocks()) {
1998 printf("Leak of %d blocks found in htmlEntityLookup",
1999 xmlMemBlocks() - mem_base);
2001 printf(" %d", n_name);
2013 test_htmlEntityValueLookup(void) {
2016 #if defined(LIBXML_HTML_ENABLED)
2018 const htmlEntityDesc * ret_val;
2019 unsigned int value; /* the entity's unicode value */
2022 for (n_value = 0;n_value < gen_nb_unsigned_int;n_value++) {
2023 mem_base = xmlMemBlocks();
2024 value = gen_unsigned_int(n_value, 0);
2026 ret_val = htmlEntityValueLookup(value);
2027 desret_const_htmlEntityDesc_ptr(ret_val);
2029 des_unsigned_int(n_value, value, 0);
2030 xmlResetLastError();
2031 if (mem_base != xmlMemBlocks()) {
2032 printf("Leak of %d blocks found in htmlEntityValueLookup",
2033 xmlMemBlocks() - mem_base);
2035 printf(" %d", n_value);
2047 test_htmlHandleOmittedElem(void) {
2050 #if defined(LIBXML_HTML_ENABLED)
2053 int val; /* int 0 or 1 */
2056 for (n_val = 0;n_val < gen_nb_int;n_val++) {
2057 mem_base = xmlMemBlocks();
2058 val = gen_int(n_val, 0);
2060 ret_val = htmlHandleOmittedElem(val);
2061 desret_int(ret_val);
2063 des_int(n_val, val, 0);
2064 xmlResetLastError();
2065 if (mem_base != xmlMemBlocks()) {
2066 printf("Leak of %d blocks found in htmlHandleOmittedElem",
2067 xmlMemBlocks() - mem_base);
2069 printf(" %d", n_val);
2081 test_htmlIsAutoClosed(void) {
2084 #if defined(LIBXML_HTML_ENABLED)
2087 htmlDocPtr doc; /* the HTML document */
2089 htmlNodePtr elem; /* the HTML element */
2092 for (n_doc = 0;n_doc < gen_nb_htmlDocPtr;n_doc++) {
2093 for (n_elem = 0;n_elem < gen_nb_htmlNodePtr;n_elem++) {
2094 mem_base = xmlMemBlocks();
2095 doc = gen_htmlDocPtr(n_doc, 0);
2096 elem = gen_htmlNodePtr(n_elem, 1);
2098 ret_val = htmlIsAutoClosed(doc, elem);
2099 desret_int(ret_val);
2101 des_htmlDocPtr(n_doc, doc, 0);
2102 des_htmlNodePtr(n_elem, elem, 1);
2103 xmlResetLastError();
2104 if (mem_base != xmlMemBlocks()) {
2105 printf("Leak of %d blocks found in htmlIsAutoClosed",
2106 xmlMemBlocks() - mem_base);
2108 printf(" %d", n_doc);
2109 printf(" %d", n_elem);
2122 test_htmlIsScriptAttribute(void) {
2125 #if defined(LIBXML_HTML_ENABLED)
2128 xmlChar * name; /* an attribute name */
2131 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
2132 mem_base = xmlMemBlocks();
2133 name = gen_const_xmlChar_ptr(n_name, 0);
2135 ret_val = htmlIsScriptAttribute((const xmlChar *)name);
2136 desret_int(ret_val);
2138 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 0);
2139 xmlResetLastError();
2140 if (mem_base != xmlMemBlocks()) {
2141 printf("Leak of %d blocks found in htmlIsScriptAttribute",
2142 xmlMemBlocks() - mem_base);
2144 printf(" %d", n_name);
2156 test_htmlNewParserCtxt(void) {
2159 #if defined(LIBXML_HTML_ENABLED)
2161 htmlParserCtxtPtr ret_val;
2163 mem_base = xmlMemBlocks();
2165 ret_val = htmlNewParserCtxt();
2166 desret_htmlParserCtxtPtr(ret_val);
2168 xmlResetLastError();
2169 if (mem_base != xmlMemBlocks()) {
2170 printf("Leak of %d blocks found in htmlNewParserCtxt",
2171 xmlMemBlocks() - mem_base);
2183 test_htmlNodeStatus(void) {
2186 #if defined(LIBXML_HTML_ENABLED)
2189 htmlNodePtr node; /* an htmlNodePtr in a tree */
2191 int legacy; /* whether to allow deprecated elements (YES is faster here for Element nodes) */
2194 for (n_node = 0;n_node < gen_nb_const_htmlNodePtr;n_node++) {
2195 for (n_legacy = 0;n_legacy < gen_nb_int;n_legacy++) {
2196 mem_base = xmlMemBlocks();
2197 node = gen_const_htmlNodePtr(n_node, 0);
2198 legacy = gen_int(n_legacy, 1);
2200 ret_val = htmlNodeStatus((const htmlNodePtr)node, legacy);
2201 desret_htmlStatus(ret_val);
2203 des_const_htmlNodePtr(n_node, (const htmlNodePtr)node, 0);
2204 des_int(n_legacy, legacy, 1);
2205 xmlResetLastError();
2206 if (mem_base != xmlMemBlocks()) {
2207 printf("Leak of %d blocks found in htmlNodeStatus",
2208 xmlMemBlocks() - mem_base);
2210 printf(" %d", n_node);
2211 printf(" %d", n_legacy);
2224 test_htmlParseCharRef(void) {
2227 #if defined(LIBXML_HTML_ENABLED)
2230 htmlParserCtxtPtr ctxt; /* an HTML parser context */
2233 for (n_ctxt = 0;n_ctxt < gen_nb_htmlParserCtxtPtr;n_ctxt++) {
2234 mem_base = xmlMemBlocks();
2235 ctxt = gen_htmlParserCtxtPtr(n_ctxt, 0);
2237 ret_val = htmlParseCharRef(ctxt);
2238 desret_int(ret_val);
2240 des_htmlParserCtxtPtr(n_ctxt, ctxt, 0);
2241 xmlResetLastError();
2242 if (mem_base != xmlMemBlocks()) {
2243 printf("Leak of %d blocks found in htmlParseCharRef",
2244 xmlMemBlocks() - mem_base);
2246 printf(" %d", n_ctxt);
2258 test_htmlParseChunk(void) {
2261 #if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_PUSH_ENABLED)
2264 htmlParserCtxtPtr ctxt; /* an HTML parser context */
2266 char * chunk; /* an char array */
2268 int size; /* the size in byte of the chunk */
2270 int terminate; /* last chunk indicator */
2273 for (n_ctxt = 0;n_ctxt < gen_nb_htmlParserCtxtPtr;n_ctxt++) {
2274 for (n_chunk = 0;n_chunk < gen_nb_const_char_ptr;n_chunk++) {
2275 for (n_size = 0;n_size < gen_nb_int;n_size++) {
2276 for (n_terminate = 0;n_terminate < gen_nb_int;n_terminate++) {
2277 mem_base = xmlMemBlocks();
2278 ctxt = gen_htmlParserCtxtPtr(n_ctxt, 0);
2279 chunk = gen_const_char_ptr(n_chunk, 1);
2280 size = gen_int(n_size, 2);
2281 terminate = gen_int(n_terminate, 3);
2283 ret_val = htmlParseChunk(ctxt, (const char *)chunk, size, terminate);
2284 if (ctxt != NULL) {xmlFreeDoc(ctxt->myDoc); ctxt->myDoc = NULL;}
2285 desret_int(ret_val);
2287 des_htmlParserCtxtPtr(n_ctxt, ctxt, 0);
2288 des_const_char_ptr(n_chunk, (const char *)chunk, 1);
2289 des_int(n_size, size, 2);
2290 des_int(n_terminate, terminate, 3);
2291 xmlResetLastError();
2292 if (mem_base != xmlMemBlocks()) {
2293 printf("Leak of %d blocks found in htmlParseChunk",
2294 xmlMemBlocks() - mem_base);
2296 printf(" %d", n_ctxt);
2297 printf(" %d", n_chunk);
2298 printf(" %d", n_size);
2299 printf(" %d", n_terminate);
2314 test_htmlParseDoc(void) {
2317 #if defined(LIBXML_HTML_ENABLED)
2320 xmlChar * cur; /* a pointer to an array of xmlChar */
2322 char * encoding; /* a free form C string describing the HTML document encoding, or NULL */
2325 for (n_cur = 0;n_cur < gen_nb_xmlChar_ptr;n_cur++) {
2326 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
2327 mem_base = xmlMemBlocks();
2328 cur = gen_xmlChar_ptr(n_cur, 0);
2329 encoding = gen_const_char_ptr(n_encoding, 1);
2331 ret_val = htmlParseDoc(cur, (const char *)encoding);
2332 desret_htmlDocPtr(ret_val);
2334 des_xmlChar_ptr(n_cur, cur, 0);
2335 des_const_char_ptr(n_encoding, (const char *)encoding, 1);
2336 xmlResetLastError();
2337 if (mem_base != xmlMemBlocks()) {
2338 printf("Leak of %d blocks found in htmlParseDoc",
2339 xmlMemBlocks() - mem_base);
2341 printf(" %d", n_cur);
2342 printf(" %d", n_encoding);
2355 test_htmlParseDocument(void) {
2358 #if defined(LIBXML_HTML_ENABLED)
2361 htmlParserCtxtPtr ctxt; /* an HTML parser context */
2364 for (n_ctxt = 0;n_ctxt < gen_nb_htmlParserCtxtPtr;n_ctxt++) {
2365 mem_base = xmlMemBlocks();
2366 ctxt = gen_htmlParserCtxtPtr(n_ctxt, 0);
2368 ret_val = htmlParseDocument(ctxt);
2369 if (ctxt != NULL) {xmlFreeDoc(ctxt->myDoc); ctxt->myDoc = NULL;}
2370 desret_int(ret_val);
2372 des_htmlParserCtxtPtr(n_ctxt, ctxt, 0);
2373 xmlResetLastError();
2374 if (mem_base != xmlMemBlocks()) {
2375 printf("Leak of %d blocks found in htmlParseDocument",
2376 xmlMemBlocks() - mem_base);
2378 printf(" %d", n_ctxt);
2390 test_htmlParseElement(void) {
2393 #if defined(LIBXML_HTML_ENABLED)
2395 htmlParserCtxtPtr ctxt; /* an HTML parser context */
2398 for (n_ctxt = 0;n_ctxt < gen_nb_htmlParserCtxtPtr;n_ctxt++) {
2399 mem_base = xmlMemBlocks();
2400 ctxt = gen_htmlParserCtxtPtr(n_ctxt, 0);
2402 htmlParseElement(ctxt);
2404 des_htmlParserCtxtPtr(n_ctxt, ctxt, 0);
2405 xmlResetLastError();
2406 if (mem_base != xmlMemBlocks()) {
2407 printf("Leak of %d blocks found in htmlParseElement",
2408 xmlMemBlocks() - mem_base);
2410 printf(" %d", n_ctxt);
2422 test_htmlParseEntityRef(void) {
2425 #if defined(LIBXML_HTML_ENABLED)
2427 const htmlEntityDesc * ret_val;
2428 htmlParserCtxtPtr ctxt; /* an HTML parser context */
2430 xmlChar ** str; /* location to store the entity name */
2433 for (n_ctxt = 0;n_ctxt < gen_nb_htmlParserCtxtPtr;n_ctxt++) {
2434 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr_ptr;n_str++) {
2435 mem_base = xmlMemBlocks();
2436 ctxt = gen_htmlParserCtxtPtr(n_ctxt, 0);
2437 str = gen_const_xmlChar_ptr_ptr(n_str, 1);
2439 ret_val = htmlParseEntityRef(ctxt, (const xmlChar **)str);
2440 desret_const_htmlEntityDesc_ptr(ret_val);
2442 des_htmlParserCtxtPtr(n_ctxt, ctxt, 0);
2443 des_const_xmlChar_ptr_ptr(n_str, (const xmlChar **)str, 1);
2444 xmlResetLastError();
2445 if (mem_base != xmlMemBlocks()) {
2446 printf("Leak of %d blocks found in htmlParseEntityRef",
2447 xmlMemBlocks() - mem_base);
2449 printf(" %d", n_ctxt);
2450 printf(" %d", n_str);
2463 test_htmlParseFile(void) {
2466 #if defined(LIBXML_HTML_ENABLED)
2468 const char * filename; /* the filename */
2470 char * encoding; /* a free form C string describing the HTML document encoding, or NULL */
2473 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
2474 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
2475 filename = gen_filepath(n_filename, 0);
2476 encoding = gen_const_char_ptr(n_encoding, 1);
2478 ret_val = htmlParseFile(filename, (const char *)encoding);
2479 desret_htmlDocPtr(ret_val);
2481 des_filepath(n_filename, filename, 0);
2482 des_const_char_ptr(n_encoding, (const char *)encoding, 1);
2483 xmlResetLastError();
2494 test_htmlReadDoc(void) {
2497 #if defined(LIBXML_HTML_ENABLED)
2500 xmlChar * cur; /* a pointer to a zero terminated string */
2502 const char * URL; /* the base URL to use for the document */
2504 char * encoding; /* the document encoding, or NULL */
2506 int options; /* a combination of htmlParserOption(s) */
2509 for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
2510 for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
2511 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
2512 for (n_options = 0;n_options < gen_nb_int;n_options++) {
2513 mem_base = xmlMemBlocks();
2514 cur = gen_const_xmlChar_ptr(n_cur, 0);
2515 URL = gen_filepath(n_URL, 1);
2516 encoding = gen_const_char_ptr(n_encoding, 2);
2517 options = gen_int(n_options, 3);
2519 ret_val = htmlReadDoc((const xmlChar *)cur, URL, (const char *)encoding, options);
2520 desret_htmlDocPtr(ret_val);
2522 des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 0);
2523 des_filepath(n_URL, URL, 1);
2524 des_const_char_ptr(n_encoding, (const char *)encoding, 2);
2525 des_int(n_options, options, 3);
2526 xmlResetLastError();
2527 if (mem_base != xmlMemBlocks()) {
2528 printf("Leak of %d blocks found in htmlReadDoc",
2529 xmlMemBlocks() - mem_base);
2531 printf(" %d", n_cur);
2532 printf(" %d", n_URL);
2533 printf(" %d", n_encoding);
2534 printf(" %d", n_options);
2549 test_htmlReadFile(void) {
2552 #if defined(LIBXML_HTML_ENABLED)
2555 const char * filename; /* a file or URL */
2557 char * encoding; /* the document encoding, or NULL */
2559 int options; /* a combination of htmlParserOption(s) */
2562 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
2563 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
2564 for (n_options = 0;n_options < gen_nb_int;n_options++) {
2565 mem_base = xmlMemBlocks();
2566 filename = gen_filepath(n_filename, 0);
2567 encoding = gen_const_char_ptr(n_encoding, 1);
2568 options = gen_int(n_options, 2);
2570 ret_val = htmlReadFile(filename, (const char *)encoding, options);
2571 desret_htmlDocPtr(ret_val);
2573 des_filepath(n_filename, filename, 0);
2574 des_const_char_ptr(n_encoding, (const char *)encoding, 1);
2575 des_int(n_options, options, 2);
2576 xmlResetLastError();
2577 if (mem_base != xmlMemBlocks()) {
2578 printf("Leak of %d blocks found in htmlReadFile",
2579 xmlMemBlocks() - mem_base);
2581 printf(" %d", n_filename);
2582 printf(" %d", n_encoding);
2583 printf(" %d", n_options);
2597 test_htmlReadMemory(void) {
2600 #if defined(LIBXML_HTML_ENABLED)
2603 char * buffer; /* a pointer to a char array */
2605 int size; /* the size of the array */
2607 const char * URL; /* the base URL to use for the document */
2609 char * encoding; /* the document encoding, or NULL */
2611 int options; /* a combination of htmlParserOption(s) */
2614 for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
2615 for (n_size = 0;n_size < gen_nb_int;n_size++) {
2616 for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
2617 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
2618 for (n_options = 0;n_options < gen_nb_int;n_options++) {
2619 mem_base = xmlMemBlocks();
2620 buffer = gen_const_char_ptr(n_buffer, 0);
2621 size = gen_int(n_size, 1);
2622 URL = gen_filepath(n_URL, 2);
2623 encoding = gen_const_char_ptr(n_encoding, 3);
2624 options = gen_int(n_options, 4);
2626 ret_val = htmlReadMemory((const char *)buffer, size, URL, (const char *)encoding, options);
2627 desret_htmlDocPtr(ret_val);
2629 des_const_char_ptr(n_buffer, (const char *)buffer, 0);
2630 des_int(n_size, size, 1);
2631 des_filepath(n_URL, URL, 2);
2632 des_const_char_ptr(n_encoding, (const char *)encoding, 3);
2633 des_int(n_options, options, 4);
2634 xmlResetLastError();
2635 if (mem_base != xmlMemBlocks()) {
2636 printf("Leak of %d blocks found in htmlReadMemory",
2637 xmlMemBlocks() - mem_base);
2639 printf(" %d", n_buffer);
2640 printf(" %d", n_size);
2641 printf(" %d", n_URL);
2642 printf(" %d", n_encoding);
2643 printf(" %d", n_options);
2659 test_htmlSAXParseDoc(void) {
2662 #if defined(LIBXML_HTML_ENABLED)
2665 xmlChar * cur; /* a pointer to an array of xmlChar */
2667 char * encoding; /* a free form C string describing the HTML document encoding, or NULL */
2669 htmlSAXHandlerPtr sax; /* the SAX handler block */
2671 void * userData; /* if using SAX, this pointer will be provided on callbacks. */
2674 for (n_cur = 0;n_cur < gen_nb_xmlChar_ptr;n_cur++) {
2675 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
2676 for (n_sax = 0;n_sax < gen_nb_htmlSAXHandlerPtr;n_sax++) {
2677 for (n_userData = 0;n_userData < gen_nb_userdata;n_userData++) {
2678 mem_base = xmlMemBlocks();
2679 cur = gen_xmlChar_ptr(n_cur, 0);
2680 encoding = gen_const_char_ptr(n_encoding, 1);
2681 sax = gen_htmlSAXHandlerPtr(n_sax, 2);
2682 userData = gen_userdata(n_userData, 3);
2684 ret_val = htmlSAXParseDoc(cur, (const char *)encoding, sax, userData);
2685 desret_htmlDocPtr(ret_val);
2687 des_xmlChar_ptr(n_cur, cur, 0);
2688 des_const_char_ptr(n_encoding, (const char *)encoding, 1);
2689 des_htmlSAXHandlerPtr(n_sax, sax, 2);
2690 des_userdata(n_userData, userData, 3);
2691 xmlResetLastError();
2692 if (mem_base != xmlMemBlocks()) {
2693 printf("Leak of %d blocks found in htmlSAXParseDoc",
2694 xmlMemBlocks() - mem_base);
2696 printf(" %d", n_cur);
2697 printf(" %d", n_encoding);
2698 printf(" %d", n_sax);
2699 printf(" %d", n_userData);
2714 test_htmlSAXParseFile(void) {
2717 #if defined(LIBXML_HTML_ENABLED)
2720 const char * filename; /* the filename */
2722 char * encoding; /* a free form C string describing the HTML document encoding, or NULL */
2724 htmlSAXHandlerPtr sax; /* the SAX handler block */
2726 void * userData; /* if using SAX, this pointer will be provided on callbacks. */
2729 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
2730 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
2731 for (n_sax = 0;n_sax < gen_nb_htmlSAXHandlerPtr;n_sax++) {
2732 for (n_userData = 0;n_userData < gen_nb_userdata;n_userData++) {
2733 mem_base = xmlMemBlocks();
2734 filename = gen_filepath(n_filename, 0);
2735 encoding = gen_const_char_ptr(n_encoding, 1);
2736 sax = gen_htmlSAXHandlerPtr(n_sax, 2);
2737 userData = gen_userdata(n_userData, 3);
2739 ret_val = htmlSAXParseFile(filename, (const char *)encoding, sax, userData);
2740 desret_htmlDocPtr(ret_val);
2742 des_filepath(n_filename, filename, 0);
2743 des_const_char_ptr(n_encoding, (const char *)encoding, 1);
2744 des_htmlSAXHandlerPtr(n_sax, sax, 2);
2745 des_userdata(n_userData, userData, 3);
2746 xmlResetLastError();
2747 if (mem_base != xmlMemBlocks()) {
2748 printf("Leak of %d blocks found in htmlSAXParseFile",
2749 xmlMemBlocks() - mem_base);
2751 printf(" %d", n_filename);
2752 printf(" %d", n_encoding);
2753 printf(" %d", n_sax);
2754 printf(" %d", n_userData);
2769 test_htmlTagLookup(void) {
2773 /* missing type support */
2778 test_HTMLparser(void) {
2782 if (quiet == 0) printf("Testing HTMLparser : 32 of 38 functions ...\n");
2783 rc = test_UTF8ToHtml();
2784 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2785 rc = test_htmlAttrAllowed();
2786 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2787 rc = test_htmlAutoCloseTag();
2788 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2789 rc = test_htmlCreateMemoryParserCtxt();
2790 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2791 rc = test_htmlCreatePushParserCtxt();
2792 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2793 rc = test_htmlCtxtReadDoc();
2794 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2795 rc = test_htmlCtxtReadFile();
2796 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2797 rc = test_htmlCtxtReadMemory();
2798 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2799 rc = test_htmlCtxtReset();
2800 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2801 rc = test_htmlCtxtUseOptions();
2802 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2803 rc = test_htmlElementAllowedHere();
2804 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2805 rc = test_htmlElementStatusHere();
2806 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2807 rc = test_htmlEncodeEntities();
2808 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2809 rc = test_htmlEntityLookup();
2810 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2811 rc = test_htmlEntityValueLookup();
2812 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2813 rc = test_htmlHandleOmittedElem();
2814 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2815 rc = test_htmlIsAutoClosed();
2816 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2817 rc = test_htmlIsScriptAttribute();
2818 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2819 rc = test_htmlNewParserCtxt();
2820 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2821 rc = test_htmlNodeStatus();
2822 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2823 rc = test_htmlParseCharRef();
2824 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2825 rc = test_htmlParseChunk();
2826 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2827 rc = test_htmlParseDoc();
2828 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2829 rc = test_htmlParseDocument();
2830 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2831 rc = test_htmlParseElement();
2832 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2833 rc = test_htmlParseEntityRef();
2834 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2835 rc = test_htmlParseFile();
2836 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2837 rc = test_htmlReadDoc();
2838 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2839 rc = test_htmlReadFile();
2840 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2841 rc = test_htmlReadMemory();
2842 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2843 rc = test_htmlSAXParseDoc();
2844 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2845 rc = test_htmlSAXParseFile();
2846 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2847 rc = test_htmlTagLookup();
2848 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
2851 printf("Module HTMLparser: %d errors\n", test_ret);
2856 test_htmlDocContentDumpFormatOutput(void) {
2859 #if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
2861 xmlOutputBufferPtr buf; /* the HTML buffer output */
2863 xmlDocPtr cur; /* the document */
2865 char * encoding; /* the encoding string */
2867 int format; /* should formatting spaces been added */
2870 for (n_buf = 0;n_buf < gen_nb_xmlOutputBufferPtr;n_buf++) {
2871 for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
2872 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
2873 for (n_format = 0;n_format < gen_nb_int;n_format++) {
2874 mem_base = xmlMemBlocks();
2875 buf = gen_xmlOutputBufferPtr(n_buf, 0);
2876 cur = gen_xmlDocPtr(n_cur, 1);
2877 encoding = gen_const_char_ptr(n_encoding, 2);
2878 format = gen_int(n_format, 3);
2880 htmlDocContentDumpFormatOutput(buf, cur, (const char *)encoding, format);
2882 des_xmlOutputBufferPtr(n_buf, buf, 0);
2883 des_xmlDocPtr(n_cur, cur, 1);
2884 des_const_char_ptr(n_encoding, (const char *)encoding, 2);
2885 des_int(n_format, format, 3);
2886 xmlResetLastError();
2887 if (mem_base != xmlMemBlocks()) {
2888 printf("Leak of %d blocks found in htmlDocContentDumpFormatOutput",
2889 xmlMemBlocks() - mem_base);
2891 printf(" %d", n_buf);
2892 printf(" %d", n_cur);
2893 printf(" %d", n_encoding);
2894 printf(" %d", n_format);
2909 test_htmlDocContentDumpOutput(void) {
2912 #if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
2914 xmlOutputBufferPtr buf; /* the HTML buffer output */
2916 xmlDocPtr cur; /* the document */
2918 char * encoding; /* the encoding string */
2921 for (n_buf = 0;n_buf < gen_nb_xmlOutputBufferPtr;n_buf++) {
2922 for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
2923 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
2924 mem_base = xmlMemBlocks();
2925 buf = gen_xmlOutputBufferPtr(n_buf, 0);
2926 cur = gen_xmlDocPtr(n_cur, 1);
2927 encoding = gen_const_char_ptr(n_encoding, 2);
2929 htmlDocContentDumpOutput(buf, cur, (const char *)encoding);
2931 des_xmlOutputBufferPtr(n_buf, buf, 0);
2932 des_xmlDocPtr(n_cur, cur, 1);
2933 des_const_char_ptr(n_encoding, (const char *)encoding, 2);
2934 xmlResetLastError();
2935 if (mem_base != xmlMemBlocks()) {
2936 printf("Leak of %d blocks found in htmlDocContentDumpOutput",
2937 xmlMemBlocks() - mem_base);
2939 printf(" %d", n_buf);
2940 printf(" %d", n_cur);
2941 printf(" %d", n_encoding);
2955 test_htmlDocDump(void) {
2958 #if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
2961 FILE * f; /* the FILE* */
2963 xmlDocPtr cur; /* the document */
2966 for (n_f = 0;n_f < gen_nb_FILE_ptr;n_f++) {
2967 for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
2968 mem_base = xmlMemBlocks();
2969 f = gen_FILE_ptr(n_f, 0);
2970 cur = gen_xmlDocPtr(n_cur, 1);
2972 ret_val = htmlDocDump(f, cur);
2973 desret_int(ret_val);
2975 des_FILE_ptr(n_f, f, 0);
2976 des_xmlDocPtr(n_cur, cur, 1);
2977 xmlResetLastError();
2978 if (mem_base != xmlMemBlocks()) {
2979 printf("Leak of %d blocks found in htmlDocDump",
2980 xmlMemBlocks() - mem_base);
2983 printf(" %d", n_cur);
2995 #define gen_nb_xmlChar_ptr_ptr 1
2996 static xmlChar ** gen_xmlChar_ptr_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
2999 static void des_xmlChar_ptr_ptr(int no ATTRIBUTE_UNUSED, xmlChar ** val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
3003 test_htmlDocDumpMemory(void) {
3006 #if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
3008 xmlDocPtr cur; /* the document */
3010 xmlChar ** mem; /* OUT: the memory pointer */
3012 int * size; /* OUT: the memory length */
3015 for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
3016 for (n_mem = 0;n_mem < gen_nb_xmlChar_ptr_ptr;n_mem++) {
3017 for (n_size = 0;n_size < gen_nb_int_ptr;n_size++) {
3018 mem_base = xmlMemBlocks();
3019 cur = gen_xmlDocPtr(n_cur, 0);
3020 mem = gen_xmlChar_ptr_ptr(n_mem, 1);
3021 size = gen_int_ptr(n_size, 2);
3023 htmlDocDumpMemory(cur, mem, size);
3025 des_xmlDocPtr(n_cur, cur, 0);
3026 des_xmlChar_ptr_ptr(n_mem, mem, 1);
3027 des_int_ptr(n_size, size, 2);
3028 xmlResetLastError();
3029 if (mem_base != xmlMemBlocks()) {
3030 printf("Leak of %d blocks found in htmlDocDumpMemory",
3031 xmlMemBlocks() - mem_base);
3033 printf(" %d", n_cur);
3034 printf(" %d", n_mem);
3035 printf(" %d", n_size);
3049 test_htmlDocDumpMemoryFormat(void) {
3052 #if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
3054 xmlDocPtr cur; /* the document */
3056 xmlChar ** mem; /* OUT: the memory pointer */
3058 int * size; /* OUT: the memory length */
3060 int format; /* should formatting spaces been added */
3063 for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
3064 for (n_mem = 0;n_mem < gen_nb_xmlChar_ptr_ptr;n_mem++) {
3065 for (n_size = 0;n_size < gen_nb_int_ptr;n_size++) {
3066 for (n_format = 0;n_format < gen_nb_int;n_format++) {
3067 mem_base = xmlMemBlocks();
3068 cur = gen_xmlDocPtr(n_cur, 0);
3069 mem = gen_xmlChar_ptr_ptr(n_mem, 1);
3070 size = gen_int_ptr(n_size, 2);
3071 format = gen_int(n_format, 3);
3073 htmlDocDumpMemoryFormat(cur, mem, size, format);
3075 des_xmlDocPtr(n_cur, cur, 0);
3076 des_xmlChar_ptr_ptr(n_mem, mem, 1);
3077 des_int_ptr(n_size, size, 2);
3078 des_int(n_format, format, 3);
3079 xmlResetLastError();
3080 if (mem_base != xmlMemBlocks()) {
3081 printf("Leak of %d blocks found in htmlDocDumpMemoryFormat",
3082 xmlMemBlocks() - mem_base);
3084 printf(" %d", n_cur);
3085 printf(" %d", n_mem);
3086 printf(" %d", n_size);
3087 printf(" %d", n_format);
3102 test_htmlGetMetaEncoding(void) {
3105 #if defined(LIBXML_HTML_ENABLED)
3107 const xmlChar * ret_val;
3108 htmlDocPtr doc; /* the document */
3111 for (n_doc = 0;n_doc < gen_nb_htmlDocPtr;n_doc++) {
3112 mem_base = xmlMemBlocks();
3113 doc = gen_htmlDocPtr(n_doc, 0);
3115 ret_val = htmlGetMetaEncoding(doc);
3116 desret_const_xmlChar_ptr(ret_val);
3118 des_htmlDocPtr(n_doc, doc, 0);
3119 xmlResetLastError();
3120 if (mem_base != xmlMemBlocks()) {
3121 printf("Leak of %d blocks found in htmlGetMetaEncoding",
3122 xmlMemBlocks() - mem_base);
3124 printf(" %d", n_doc);
3136 test_htmlIsBooleanAttr(void) {
3139 #if defined(LIBXML_HTML_ENABLED)
3142 xmlChar * name; /* the name of the attribute to check */
3145 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
3146 mem_base = xmlMemBlocks();
3147 name = gen_const_xmlChar_ptr(n_name, 0);
3149 ret_val = htmlIsBooleanAttr((const xmlChar *)name);
3150 desret_int(ret_val);
3152 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 0);
3153 xmlResetLastError();
3154 if (mem_base != xmlMemBlocks()) {
3155 printf("Leak of %d blocks found in htmlIsBooleanAttr",
3156 xmlMemBlocks() - mem_base);
3158 printf(" %d", n_name);
3170 test_htmlNewDoc(void) {
3173 #if defined(LIBXML_HTML_ENABLED)
3176 xmlChar * URI; /* URI for the dtd, or NULL */
3178 xmlChar * ExternalID; /* the external ID of the DTD, or NULL */
3181 for (n_URI = 0;n_URI < gen_nb_const_xmlChar_ptr;n_URI++) {
3182 for (n_ExternalID = 0;n_ExternalID < gen_nb_const_xmlChar_ptr;n_ExternalID++) {
3183 mem_base = xmlMemBlocks();
3184 URI = gen_const_xmlChar_ptr(n_URI, 0);
3185 ExternalID = gen_const_xmlChar_ptr(n_ExternalID, 1);
3187 ret_val = htmlNewDoc((const xmlChar *)URI, (const xmlChar *)ExternalID);
3188 desret_htmlDocPtr(ret_val);
3190 des_const_xmlChar_ptr(n_URI, (const xmlChar *)URI, 0);
3191 des_const_xmlChar_ptr(n_ExternalID, (const xmlChar *)ExternalID, 1);
3192 xmlResetLastError();
3193 if (mem_base != xmlMemBlocks()) {
3194 printf("Leak of %d blocks found in htmlNewDoc",
3195 xmlMemBlocks() - mem_base);
3197 printf(" %d", n_URI);
3198 printf(" %d", n_ExternalID);
3211 test_htmlNewDocNoDtD(void) {
3214 #if defined(LIBXML_HTML_ENABLED)
3217 xmlChar * URI; /* URI for the dtd, or NULL */
3219 xmlChar * ExternalID; /* the external ID of the DTD, or NULL */
3222 for (n_URI = 0;n_URI < gen_nb_const_xmlChar_ptr;n_URI++) {
3223 for (n_ExternalID = 0;n_ExternalID < gen_nb_const_xmlChar_ptr;n_ExternalID++) {
3224 mem_base = xmlMemBlocks();
3225 URI = gen_const_xmlChar_ptr(n_URI, 0);
3226 ExternalID = gen_const_xmlChar_ptr(n_ExternalID, 1);
3228 ret_val = htmlNewDocNoDtD((const xmlChar *)URI, (const xmlChar *)ExternalID);
3229 desret_htmlDocPtr(ret_val);
3231 des_const_xmlChar_ptr(n_URI, (const xmlChar *)URI, 0);
3232 des_const_xmlChar_ptr(n_ExternalID, (const xmlChar *)ExternalID, 1);
3233 xmlResetLastError();
3234 if (mem_base != xmlMemBlocks()) {
3235 printf("Leak of %d blocks found in htmlNewDocNoDtD",
3236 xmlMemBlocks() - mem_base);
3238 printf(" %d", n_URI);
3239 printf(" %d", n_ExternalID);
3252 test_htmlNodeDump(void) {
3255 #if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
3258 xmlBufferPtr buf; /* the HTML buffer output */
3260 xmlDocPtr doc; /* the document */
3262 xmlNodePtr cur; /* the current node */
3265 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
3266 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
3267 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
3268 mem_base = xmlMemBlocks();
3269 buf = gen_xmlBufferPtr(n_buf, 0);
3270 doc = gen_xmlDocPtr(n_doc, 1);
3271 cur = gen_xmlNodePtr(n_cur, 2);
3273 ret_val = htmlNodeDump(buf, doc, cur);
3274 desret_int(ret_val);
3276 des_xmlBufferPtr(n_buf, buf, 0);
3277 des_xmlDocPtr(n_doc, doc, 1);
3278 des_xmlNodePtr(n_cur, cur, 2);
3279 xmlResetLastError();
3280 if (mem_base != xmlMemBlocks()) {
3281 printf("Leak of %d blocks found in htmlNodeDump",
3282 xmlMemBlocks() - mem_base);
3284 printf(" %d", n_buf);
3285 printf(" %d", n_doc);
3286 printf(" %d", n_cur);
3300 test_htmlNodeDumpFile(void) {
3303 #if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
3305 FILE * out; /* the FILE pointer */
3307 xmlDocPtr doc; /* the document */
3309 xmlNodePtr cur; /* the current node */
3312 for (n_out = 0;n_out < gen_nb_FILE_ptr;n_out++) {
3313 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
3314 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
3315 mem_base = xmlMemBlocks();
3316 out = gen_FILE_ptr(n_out, 0);
3317 doc = gen_xmlDocPtr(n_doc, 1);
3318 cur = gen_xmlNodePtr(n_cur, 2);
3320 htmlNodeDumpFile(out, doc, cur);
3322 des_FILE_ptr(n_out, out, 0);
3323 des_xmlDocPtr(n_doc, doc, 1);
3324 des_xmlNodePtr(n_cur, cur, 2);
3325 xmlResetLastError();
3326 if (mem_base != xmlMemBlocks()) {
3327 printf("Leak of %d blocks found in htmlNodeDumpFile",
3328 xmlMemBlocks() - mem_base);
3330 printf(" %d", n_out);
3331 printf(" %d", n_doc);
3332 printf(" %d", n_cur);
3346 test_htmlNodeDumpFileFormat(void) {
3349 #if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
3352 FILE * out; /* the FILE pointer */
3354 xmlDocPtr doc; /* the document */
3356 xmlNodePtr cur; /* the current node */
3358 char * encoding; /* the document encoding */
3360 int format; /* should formatting spaces been added */
3363 for (n_out = 0;n_out < gen_nb_FILE_ptr;n_out++) {
3364 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
3365 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
3366 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
3367 for (n_format = 0;n_format < gen_nb_int;n_format++) {
3368 mem_base = xmlMemBlocks();
3369 out = gen_FILE_ptr(n_out, 0);
3370 doc = gen_xmlDocPtr(n_doc, 1);
3371 cur = gen_xmlNodePtr(n_cur, 2);
3372 encoding = gen_const_char_ptr(n_encoding, 3);
3373 format = gen_int(n_format, 4);
3375 ret_val = htmlNodeDumpFileFormat(out, doc, cur, (const char *)encoding, format);
3376 desret_int(ret_val);
3378 des_FILE_ptr(n_out, out, 0);
3379 des_xmlDocPtr(n_doc, doc, 1);
3380 des_xmlNodePtr(n_cur, cur, 2);
3381 des_const_char_ptr(n_encoding, (const char *)encoding, 3);
3382 des_int(n_format, format, 4);
3383 xmlResetLastError();
3384 if (mem_base != xmlMemBlocks()) {
3385 printf("Leak of %d blocks found in htmlNodeDumpFileFormat",
3386 xmlMemBlocks() - mem_base);
3388 printf(" %d", n_out);
3389 printf(" %d", n_doc);
3390 printf(" %d", n_cur);
3391 printf(" %d", n_encoding);
3392 printf(" %d", n_format);
3408 test_htmlNodeDumpFormatOutput(void) {
3411 #if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
3413 xmlOutputBufferPtr buf; /* the HTML buffer output */
3415 xmlDocPtr doc; /* the document */
3417 xmlNodePtr cur; /* the current node */
3419 char * encoding; /* the encoding string */
3421 int format; /* should formatting spaces been added */
3424 for (n_buf = 0;n_buf < gen_nb_xmlOutputBufferPtr;n_buf++) {
3425 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
3426 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
3427 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
3428 for (n_format = 0;n_format < gen_nb_int;n_format++) {
3429 mem_base = xmlMemBlocks();
3430 buf = gen_xmlOutputBufferPtr(n_buf, 0);
3431 doc = gen_xmlDocPtr(n_doc, 1);
3432 cur = gen_xmlNodePtr(n_cur, 2);
3433 encoding = gen_const_char_ptr(n_encoding, 3);
3434 format = gen_int(n_format, 4);
3436 htmlNodeDumpFormatOutput(buf, doc, cur, (const char *)encoding, format);
3438 des_xmlOutputBufferPtr(n_buf, buf, 0);
3439 des_xmlDocPtr(n_doc, doc, 1);
3440 des_xmlNodePtr(n_cur, cur, 2);
3441 des_const_char_ptr(n_encoding, (const char *)encoding, 3);
3442 des_int(n_format, format, 4);
3443 xmlResetLastError();
3444 if (mem_base != xmlMemBlocks()) {
3445 printf("Leak of %d blocks found in htmlNodeDumpFormatOutput",
3446 xmlMemBlocks() - mem_base);
3448 printf(" %d", n_buf);
3449 printf(" %d", n_doc);
3450 printf(" %d", n_cur);
3451 printf(" %d", n_encoding);
3452 printf(" %d", n_format);
3468 test_htmlNodeDumpOutput(void) {
3471 #if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
3473 xmlOutputBufferPtr buf; /* the HTML buffer output */
3475 xmlDocPtr doc; /* the document */
3477 xmlNodePtr cur; /* the current node */
3479 char * encoding; /* the encoding string */
3482 for (n_buf = 0;n_buf < gen_nb_xmlOutputBufferPtr;n_buf++) {
3483 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
3484 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
3485 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
3486 mem_base = xmlMemBlocks();
3487 buf = gen_xmlOutputBufferPtr(n_buf, 0);
3488 doc = gen_xmlDocPtr(n_doc, 1);
3489 cur = gen_xmlNodePtr(n_cur, 2);
3490 encoding = gen_const_char_ptr(n_encoding, 3);
3492 htmlNodeDumpOutput(buf, doc, cur, (const char *)encoding);
3494 des_xmlOutputBufferPtr(n_buf, buf, 0);
3495 des_xmlDocPtr(n_doc, doc, 1);
3496 des_xmlNodePtr(n_cur, cur, 2);
3497 des_const_char_ptr(n_encoding, (const char *)encoding, 3);
3498 xmlResetLastError();
3499 if (mem_base != xmlMemBlocks()) {
3500 printf("Leak of %d blocks found in htmlNodeDumpOutput",
3501 xmlMemBlocks() - mem_base);
3503 printf(" %d", n_buf);
3504 printf(" %d", n_doc);
3505 printf(" %d", n_cur);
3506 printf(" %d", n_encoding);
3521 test_htmlSaveFile(void) {
3524 #if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
3527 const char * filename; /* the filename (or URL) */
3529 xmlDocPtr cur; /* the document */
3532 for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
3533 for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
3534 mem_base = xmlMemBlocks();
3535 filename = gen_fileoutput(n_filename, 0);
3536 cur = gen_xmlDocPtr(n_cur, 1);
3538 ret_val = htmlSaveFile(filename, cur);
3539 desret_int(ret_val);
3541 des_fileoutput(n_filename, filename, 0);
3542 des_xmlDocPtr(n_cur, cur, 1);
3543 xmlResetLastError();
3544 if (mem_base != xmlMemBlocks()) {
3545 printf("Leak of %d blocks found in htmlSaveFile",
3546 xmlMemBlocks() - mem_base);
3548 printf(" %d", n_filename);
3549 printf(" %d", n_cur);
3562 test_htmlSaveFileEnc(void) {
3565 #if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
3568 const char * filename; /* the filename */
3570 xmlDocPtr cur; /* the document */
3572 char * encoding; /* the document encoding */
3575 for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
3576 for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
3577 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
3578 mem_base = xmlMemBlocks();
3579 filename = gen_fileoutput(n_filename, 0);
3580 cur = gen_xmlDocPtr(n_cur, 1);
3581 encoding = gen_const_char_ptr(n_encoding, 2);
3583 ret_val = htmlSaveFileEnc(filename, cur, (const char *)encoding);
3584 desret_int(ret_val);
3586 des_fileoutput(n_filename, filename, 0);
3587 des_xmlDocPtr(n_cur, cur, 1);
3588 des_const_char_ptr(n_encoding, (const char *)encoding, 2);
3589 xmlResetLastError();
3590 if (mem_base != xmlMemBlocks()) {
3591 printf("Leak of %d blocks found in htmlSaveFileEnc",
3592 xmlMemBlocks() - mem_base);
3594 printf(" %d", n_filename);
3595 printf(" %d", n_cur);
3596 printf(" %d", n_encoding);
3610 test_htmlSaveFileFormat(void) {
3613 #if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
3616 const char * filename; /* the filename */
3618 xmlDocPtr cur; /* the document */
3620 char * encoding; /* the document encoding */
3622 int format; /* should formatting spaces been added */
3625 for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
3626 for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
3627 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
3628 for (n_format = 0;n_format < gen_nb_int;n_format++) {
3629 mem_base = xmlMemBlocks();
3630 filename = gen_fileoutput(n_filename, 0);
3631 cur = gen_xmlDocPtr(n_cur, 1);
3632 encoding = gen_const_char_ptr(n_encoding, 2);
3633 format = gen_int(n_format, 3);
3635 ret_val = htmlSaveFileFormat(filename, cur, (const char *)encoding, format);
3636 desret_int(ret_val);
3638 des_fileoutput(n_filename, filename, 0);
3639 des_xmlDocPtr(n_cur, cur, 1);
3640 des_const_char_ptr(n_encoding, (const char *)encoding, 2);
3641 des_int(n_format, format, 3);
3642 xmlResetLastError();
3643 if (mem_base != xmlMemBlocks()) {
3644 printf("Leak of %d blocks found in htmlSaveFileFormat",
3645 xmlMemBlocks() - mem_base);
3647 printf(" %d", n_filename);
3648 printf(" %d", n_cur);
3649 printf(" %d", n_encoding);
3650 printf(" %d", n_format);
3665 test_htmlSetMetaEncoding(void) {
3668 #if defined(LIBXML_HTML_ENABLED)
3671 htmlDocPtr doc; /* the document */
3673 xmlChar * encoding; /* the encoding string */
3676 for (n_doc = 0;n_doc < gen_nb_htmlDocPtr;n_doc++) {
3677 for (n_encoding = 0;n_encoding < gen_nb_const_xmlChar_ptr;n_encoding++) {
3678 mem_base = xmlMemBlocks();
3679 doc = gen_htmlDocPtr(n_doc, 0);
3680 encoding = gen_const_xmlChar_ptr(n_encoding, 1);
3682 ret_val = htmlSetMetaEncoding(doc, (const xmlChar *)encoding);
3683 desret_int(ret_val);
3685 des_htmlDocPtr(n_doc, doc, 0);
3686 des_const_xmlChar_ptr(n_encoding, (const xmlChar *)encoding, 1);
3687 xmlResetLastError();
3688 if (mem_base != xmlMemBlocks()) {
3689 printf("Leak of %d blocks found in htmlSetMetaEncoding",
3690 xmlMemBlocks() - mem_base);
3692 printf(" %d", n_doc);
3693 printf(" %d", n_encoding);
3705 test_HTMLtree(void) {
3709 if (quiet == 0) printf("Testing HTMLtree : 18 of 18 functions ...\n");
3710 rc = test_htmlDocContentDumpFormatOutput();
3711 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
3712 rc = test_htmlDocContentDumpOutput();
3713 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
3714 rc = test_htmlDocDump();
3715 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
3716 rc = test_htmlDocDumpMemory();
3717 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
3718 rc = test_htmlDocDumpMemoryFormat();
3719 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
3720 rc = test_htmlGetMetaEncoding();
3721 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
3722 rc = test_htmlIsBooleanAttr();
3723 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
3724 rc = test_htmlNewDoc();
3725 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
3726 rc = test_htmlNewDocNoDtD();
3727 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
3728 rc = test_htmlNodeDump();
3729 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
3730 rc = test_htmlNodeDumpFile();
3731 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
3732 rc = test_htmlNodeDumpFileFormat();
3733 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
3734 rc = test_htmlNodeDumpFormatOutput();
3735 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
3736 rc = test_htmlNodeDumpOutput();
3737 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
3738 rc = test_htmlSaveFile();
3739 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
3740 rc = test_htmlSaveFileEnc();
3741 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
3742 rc = test_htmlSaveFileFormat();
3743 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
3744 rc = test_htmlSetMetaEncoding();
3745 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
3748 printf("Module HTMLtree: %d errors\n", test_ret);
3753 test_docbDefaultSAXHandlerInit(void) {
3756 #if defined(LIBXML_DOCB_ENABLED)
3757 #ifdef LIBXML_DOCB_ENABLED
3760 mem_base = xmlMemBlocks();
3762 docbDefaultSAXHandlerInit();
3764 xmlResetLastError();
3765 if (mem_base != xmlMemBlocks()) {
3766 printf("Leak of %d blocks found in docbDefaultSAXHandlerInit",
3767 xmlMemBlocks() - mem_base);
3780 test_htmlDefaultSAXHandlerInit(void) {
3783 #if defined(LIBXML_HTML_ENABLED)
3784 #ifdef LIBXML_HTML_ENABLED
3787 mem_base = xmlMemBlocks();
3789 htmlDefaultSAXHandlerInit();
3791 xmlResetLastError();
3792 if (mem_base != xmlMemBlocks()) {
3793 printf("Leak of %d blocks found in htmlDefaultSAXHandlerInit",
3794 xmlMemBlocks() - mem_base);
3807 test_xmlDefaultSAXHandlerInit(void) {
3812 mem_base = xmlMemBlocks();
3814 xmlDefaultSAXHandlerInit();
3816 xmlResetLastError();
3817 if (mem_base != xmlMemBlocks()) {
3818 printf("Leak of %d blocks found in xmlDefaultSAXHandlerInit",
3819 xmlMemBlocks() - mem_base);
3829 #define gen_nb_xmlEnumerationPtr 1
3830 static xmlEnumerationPtr gen_xmlEnumerationPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
3833 static void des_xmlEnumerationPtr(int no ATTRIBUTE_UNUSED, xmlEnumerationPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
3837 test_xmlSAX2AttributeDecl(void) {
3841 void * ctx; /* the user data (XML parser context) */
3843 xmlChar * elem; /* the name of the element */
3845 xmlChar * fullname; /* the attribute name */
3847 int type; /* the attribute type */
3849 int def; /* the type of default value */
3851 xmlChar * defaultValue; /* the attribute default value */
3853 xmlEnumerationPtr tree; /* the tree of enumerated value set */
3856 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
3857 for (n_elem = 0;n_elem < gen_nb_const_xmlChar_ptr;n_elem++) {
3858 for (n_fullname = 0;n_fullname < gen_nb_const_xmlChar_ptr;n_fullname++) {
3859 for (n_type = 0;n_type < gen_nb_int;n_type++) {
3860 for (n_def = 0;n_def < gen_nb_int;n_def++) {
3861 for (n_defaultValue = 0;n_defaultValue < gen_nb_const_xmlChar_ptr;n_defaultValue++) {
3862 for (n_tree = 0;n_tree < gen_nb_xmlEnumerationPtr;n_tree++) {
3863 mem_base = xmlMemBlocks();
3864 ctx = gen_void_ptr(n_ctx, 0);
3865 elem = gen_const_xmlChar_ptr(n_elem, 1);
3866 fullname = gen_const_xmlChar_ptr(n_fullname, 2);
3867 type = gen_int(n_type, 3);
3868 def = gen_int(n_def, 4);
3869 defaultValue = gen_const_xmlChar_ptr(n_defaultValue, 5);
3870 tree = gen_xmlEnumerationPtr(n_tree, 6);
3872 xmlSAX2AttributeDecl(ctx, (const xmlChar *)elem, (const xmlChar *)fullname, type, def, (const xmlChar *)defaultValue, tree);
3874 des_void_ptr(n_ctx, ctx, 0);
3875 des_const_xmlChar_ptr(n_elem, (const xmlChar *)elem, 1);
3876 des_const_xmlChar_ptr(n_fullname, (const xmlChar *)fullname, 2);
3877 des_int(n_type, type, 3);
3878 des_int(n_def, def, 4);
3879 des_const_xmlChar_ptr(n_defaultValue, (const xmlChar *)defaultValue, 5);
3880 des_xmlEnumerationPtr(n_tree, tree, 6);
3881 xmlResetLastError();
3882 if (mem_base != xmlMemBlocks()) {
3883 printf("Leak of %d blocks found in xmlSAX2AttributeDecl",
3884 xmlMemBlocks() - mem_base);
3886 printf(" %d", n_ctx);
3887 printf(" %d", n_elem);
3888 printf(" %d", n_fullname);
3889 printf(" %d", n_type);
3890 printf(" %d", n_def);
3891 printf(" %d", n_defaultValue);
3892 printf(" %d", n_tree);
3909 test_xmlSAX2CDataBlock(void) {
3913 void * ctx; /* the user data (XML parser context) */
3915 xmlChar * value; /* The pcdata content */
3917 int len; /* the block length */
3920 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
3921 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
3922 for (n_len = 0;n_len < gen_nb_int;n_len++) {
3923 mem_base = xmlMemBlocks();
3924 ctx = gen_void_ptr(n_ctx, 0);
3925 value = gen_const_xmlChar_ptr(n_value, 1);
3926 len = gen_int(n_len, 2);
3928 xmlSAX2CDataBlock(ctx, (const xmlChar *)value, len);
3930 des_void_ptr(n_ctx, ctx, 0);
3931 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 1);
3932 des_int(n_len, len, 2);
3933 xmlResetLastError();
3934 if (mem_base != xmlMemBlocks()) {
3935 printf("Leak of %d blocks found in xmlSAX2CDataBlock",
3936 xmlMemBlocks() - mem_base);
3938 printf(" %d", n_ctx);
3939 printf(" %d", n_value);
3940 printf(" %d", n_len);
3953 test_xmlSAX2Characters(void) {
3957 void * ctx; /* the user data (XML parser context) */
3959 xmlChar * ch; /* a xmlChar string */
3961 int len; /* the number of xmlChar */
3964 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
3965 for (n_ch = 0;n_ch < gen_nb_const_xmlChar_ptr;n_ch++) {
3966 for (n_len = 0;n_len < gen_nb_int;n_len++) {
3967 mem_base = xmlMemBlocks();
3968 ctx = gen_void_ptr(n_ctx, 0);
3969 ch = gen_const_xmlChar_ptr(n_ch, 1);
3970 len = gen_int(n_len, 2);
3972 xmlSAX2Characters(ctx, (const xmlChar *)ch, len);
3974 des_void_ptr(n_ctx, ctx, 0);
3975 des_const_xmlChar_ptr(n_ch, (const xmlChar *)ch, 1);
3976 des_int(n_len, len, 2);
3977 xmlResetLastError();
3978 if (mem_base != xmlMemBlocks()) {
3979 printf("Leak of %d blocks found in xmlSAX2Characters",
3980 xmlMemBlocks() - mem_base);
3982 printf(" %d", n_ctx);
3983 printf(" %d", n_ch);
3984 printf(" %d", n_len);
3997 test_xmlSAX2Comment(void) {
4001 void * ctx; /* the user data (XML parser context) */
4003 xmlChar * value; /* the xmlSAX2Comment content */
4006 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
4007 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
4008 mem_base = xmlMemBlocks();
4009 ctx = gen_void_ptr(n_ctx, 0);
4010 value = gen_const_xmlChar_ptr(n_value, 1);
4012 xmlSAX2Comment(ctx, (const xmlChar *)value);
4014 des_void_ptr(n_ctx, ctx, 0);
4015 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 1);
4016 xmlResetLastError();
4017 if (mem_base != xmlMemBlocks()) {
4018 printf("Leak of %d blocks found in xmlSAX2Comment",
4019 xmlMemBlocks() - mem_base);
4021 printf(" %d", n_ctx);
4022 printf(" %d", n_value);
4034 test_xmlSAX2ElementDecl(void) {
4038 void * ctx; /* the user data (XML parser context) */
4040 xmlChar * name; /* the element name */
4042 int type; /* the element type */
4044 xmlElementContentPtr content; /* the element value tree */
4047 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
4048 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
4049 for (n_type = 0;n_type < gen_nb_int;n_type++) {
4050 for (n_content = 0;n_content < gen_nb_xmlElementContentPtr;n_content++) {
4051 mem_base = xmlMemBlocks();
4052 ctx = gen_void_ptr(n_ctx, 0);
4053 name = gen_const_xmlChar_ptr(n_name, 1);
4054 type = gen_int(n_type, 2);
4055 content = gen_xmlElementContentPtr(n_content, 3);
4057 xmlSAX2ElementDecl(ctx, (const xmlChar *)name, type, content);
4059 des_void_ptr(n_ctx, ctx, 0);
4060 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
4061 des_int(n_type, type, 2);
4062 des_xmlElementContentPtr(n_content, content, 3);
4063 xmlResetLastError();
4064 if (mem_base != xmlMemBlocks()) {
4065 printf("Leak of %d blocks found in xmlSAX2ElementDecl",
4066 xmlMemBlocks() - mem_base);
4068 printf(" %d", n_ctx);
4069 printf(" %d", n_name);
4070 printf(" %d", n_type);
4071 printf(" %d", n_content);
4085 test_xmlSAX2EndDocument(void) {
4089 void * ctx; /* the user data (XML parser context) */
4092 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
4093 mem_base = xmlMemBlocks();
4094 ctx = gen_void_ptr(n_ctx, 0);
4096 xmlSAX2EndDocument(ctx);
4098 des_void_ptr(n_ctx, ctx, 0);
4099 xmlResetLastError();
4100 if (mem_base != xmlMemBlocks()) {
4101 printf("Leak of %d blocks found in xmlSAX2EndDocument",
4102 xmlMemBlocks() - mem_base);
4104 printf(" %d", n_ctx);
4115 test_xmlSAX2EndElement(void) {
4118 #if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
4119 #ifdef LIBXML_SAX1_ENABLED
4121 void * ctx; /* the user data (XML parser context) */
4123 xmlChar * name; /* The element name */
4126 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
4127 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
4128 mem_base = xmlMemBlocks();
4129 ctx = gen_void_ptr(n_ctx, 0);
4130 name = gen_const_xmlChar_ptr(n_name, 1);
4132 xmlSAX2EndElement(ctx, (const xmlChar *)name);
4134 des_void_ptr(n_ctx, ctx, 0);
4135 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
4136 xmlResetLastError();
4137 if (mem_base != xmlMemBlocks()) {
4138 printf("Leak of %d blocks found in xmlSAX2EndElement",
4139 xmlMemBlocks() - mem_base);
4141 printf(" %d", n_ctx);
4142 printf(" %d", n_name);
4156 test_xmlSAX2EndElementNs(void) {
4160 void * ctx; /* the user data (XML parser context) */
4162 xmlChar * localname; /* the local name of the element */
4164 xmlChar * prefix; /* the element namespace prefix if available */
4166 xmlChar * URI; /* the element namespace name if available */
4169 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
4170 for (n_localname = 0;n_localname < gen_nb_const_xmlChar_ptr;n_localname++) {
4171 for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
4172 for (n_URI = 0;n_URI < gen_nb_const_xmlChar_ptr;n_URI++) {
4173 mem_base = xmlMemBlocks();
4174 ctx = gen_void_ptr(n_ctx, 0);
4175 localname = gen_const_xmlChar_ptr(n_localname, 1);
4176 prefix = gen_const_xmlChar_ptr(n_prefix, 2);
4177 URI = gen_const_xmlChar_ptr(n_URI, 3);
4179 xmlSAX2EndElementNs(ctx, (const xmlChar *)localname, (const xmlChar *)prefix, (const xmlChar *)URI);
4181 des_void_ptr(n_ctx, ctx, 0);
4182 des_const_xmlChar_ptr(n_localname, (const xmlChar *)localname, 1);
4183 des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 2);
4184 des_const_xmlChar_ptr(n_URI, (const xmlChar *)URI, 3);
4185 xmlResetLastError();
4186 if (mem_base != xmlMemBlocks()) {
4187 printf("Leak of %d blocks found in xmlSAX2EndElementNs",
4188 xmlMemBlocks() - mem_base);
4190 printf(" %d", n_ctx);
4191 printf(" %d", n_localname);
4192 printf(" %d", n_prefix);
4193 printf(" %d", n_URI);
4207 test_xmlSAX2EntityDecl(void) {
4211 void * ctx; /* the user data (XML parser context) */
4213 xmlChar * name; /* the entity name */
4215 int type; /* the entity type */
4217 xmlChar * publicId; /* The public ID of the entity */
4219 xmlChar * systemId; /* The system ID of the entity */
4221 xmlChar * content; /* the entity value (without processing). */
4224 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
4225 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
4226 for (n_type = 0;n_type < gen_nb_int;n_type++) {
4227 for (n_publicId = 0;n_publicId < gen_nb_const_xmlChar_ptr;n_publicId++) {
4228 for (n_systemId = 0;n_systemId < gen_nb_const_xmlChar_ptr;n_systemId++) {
4229 for (n_content = 0;n_content < gen_nb_xmlChar_ptr;n_content++) {
4230 mem_base = xmlMemBlocks();
4231 ctx = gen_void_ptr(n_ctx, 0);
4232 name = gen_const_xmlChar_ptr(n_name, 1);
4233 type = gen_int(n_type, 2);
4234 publicId = gen_const_xmlChar_ptr(n_publicId, 3);
4235 systemId = gen_const_xmlChar_ptr(n_systemId, 4);
4236 content = gen_xmlChar_ptr(n_content, 5);
4238 xmlSAX2EntityDecl(ctx, (const xmlChar *)name, type, (const xmlChar *)publicId, (const xmlChar *)systemId, content);
4240 des_void_ptr(n_ctx, ctx, 0);
4241 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
4242 des_int(n_type, type, 2);
4243 des_const_xmlChar_ptr(n_publicId, (const xmlChar *)publicId, 3);
4244 des_const_xmlChar_ptr(n_systemId, (const xmlChar *)systemId, 4);
4245 des_xmlChar_ptr(n_content, content, 5);
4246 xmlResetLastError();
4247 if (mem_base != xmlMemBlocks()) {
4248 printf("Leak of %d blocks found in xmlSAX2EntityDecl",
4249 xmlMemBlocks() - mem_base);
4251 printf(" %d", n_ctx);
4252 printf(" %d", n_name);
4253 printf(" %d", n_type);
4254 printf(" %d", n_publicId);
4255 printf(" %d", n_systemId);
4256 printf(" %d", n_content);
4272 test_xmlSAX2ExternalSubset(void) {
4276 void * ctx; /* the user data (XML parser context) */
4278 xmlChar * name; /* the root element name */
4280 xmlChar * ExternalID; /* the external ID */
4282 xmlChar * SystemID; /* the SYSTEM ID (e.g. filename or URL) */
4285 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
4286 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
4287 for (n_ExternalID = 0;n_ExternalID < gen_nb_const_xmlChar_ptr;n_ExternalID++) {
4288 for (n_SystemID = 0;n_SystemID < gen_nb_const_xmlChar_ptr;n_SystemID++) {
4289 mem_base = xmlMemBlocks();
4290 ctx = gen_void_ptr(n_ctx, 0);
4291 name = gen_const_xmlChar_ptr(n_name, 1);
4292 ExternalID = gen_const_xmlChar_ptr(n_ExternalID, 2);
4293 SystemID = gen_const_xmlChar_ptr(n_SystemID, 3);
4295 xmlSAX2ExternalSubset(ctx, (const xmlChar *)name, (const xmlChar *)ExternalID, (const xmlChar *)SystemID);
4297 des_void_ptr(n_ctx, ctx, 0);
4298 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
4299 des_const_xmlChar_ptr(n_ExternalID, (const xmlChar *)ExternalID, 2);
4300 des_const_xmlChar_ptr(n_SystemID, (const xmlChar *)SystemID, 3);
4301 xmlResetLastError();
4302 if (mem_base != xmlMemBlocks()) {
4303 printf("Leak of %d blocks found in xmlSAX2ExternalSubset",
4304 xmlMemBlocks() - mem_base);
4306 printf(" %d", n_ctx);
4307 printf(" %d", n_name);
4308 printf(" %d", n_ExternalID);
4309 printf(" %d", n_SystemID);
4323 test_xmlSAX2GetColumnNumber(void) {
4328 void * ctx; /* the user data (XML parser context) */
4331 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
4332 mem_base = xmlMemBlocks();
4333 ctx = gen_void_ptr(n_ctx, 0);
4335 ret_val = xmlSAX2GetColumnNumber(ctx);
4336 desret_int(ret_val);
4338 des_void_ptr(n_ctx, ctx, 0);
4339 xmlResetLastError();
4340 if (mem_base != xmlMemBlocks()) {
4341 printf("Leak of %d blocks found in xmlSAX2GetColumnNumber",
4342 xmlMemBlocks() - mem_base);
4344 printf(" %d", n_ctx);
4355 test_xmlSAX2GetEntity(void) {
4359 xmlEntityPtr ret_val;
4360 void * ctx; /* the user data (XML parser context) */
4362 xmlChar * name; /* The entity name */
4365 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
4366 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
4367 mem_base = xmlMemBlocks();
4368 ctx = gen_void_ptr(n_ctx, 0);
4369 name = gen_const_xmlChar_ptr(n_name, 1);
4371 ret_val = xmlSAX2GetEntity(ctx, (const xmlChar *)name);
4372 desret_xmlEntityPtr(ret_val);
4374 des_void_ptr(n_ctx, ctx, 0);
4375 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
4376 xmlResetLastError();
4377 if (mem_base != xmlMemBlocks()) {
4378 printf("Leak of %d blocks found in xmlSAX2GetEntity",
4379 xmlMemBlocks() - mem_base);
4381 printf(" %d", n_ctx);
4382 printf(" %d", n_name);
4394 test_xmlSAX2GetLineNumber(void) {
4399 void * ctx; /* the user data (XML parser context) */
4402 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
4403 mem_base = xmlMemBlocks();
4404 ctx = gen_void_ptr(n_ctx, 0);
4406 ret_val = xmlSAX2GetLineNumber(ctx);
4407 desret_int(ret_val);
4409 des_void_ptr(n_ctx, ctx, 0);
4410 xmlResetLastError();
4411 if (mem_base != xmlMemBlocks()) {
4412 printf("Leak of %d blocks found in xmlSAX2GetLineNumber",
4413 xmlMemBlocks() - mem_base);
4415 printf(" %d", n_ctx);
4426 test_xmlSAX2GetParameterEntity(void) {
4430 xmlEntityPtr ret_val;
4431 void * ctx; /* the user data (XML parser context) */
4433 xmlChar * name; /* The entity name */
4436 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
4437 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
4438 mem_base = xmlMemBlocks();
4439 ctx = gen_void_ptr(n_ctx, 0);
4440 name = gen_const_xmlChar_ptr(n_name, 1);
4442 ret_val = xmlSAX2GetParameterEntity(ctx, (const xmlChar *)name);
4443 desret_xmlEntityPtr(ret_val);
4445 des_void_ptr(n_ctx, ctx, 0);
4446 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
4447 xmlResetLastError();
4448 if (mem_base != xmlMemBlocks()) {
4449 printf("Leak of %d blocks found in xmlSAX2GetParameterEntity",
4450 xmlMemBlocks() - mem_base);
4452 printf(" %d", n_ctx);
4453 printf(" %d", n_name);
4465 test_xmlSAX2GetPublicId(void) {
4469 const xmlChar * ret_val;
4470 void * ctx; /* the user data (XML parser context) */
4473 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
4474 mem_base = xmlMemBlocks();
4475 ctx = gen_void_ptr(n_ctx, 0);
4477 ret_val = xmlSAX2GetPublicId(ctx);
4478 desret_const_xmlChar_ptr(ret_val);
4480 des_void_ptr(n_ctx, ctx, 0);
4481 xmlResetLastError();
4482 if (mem_base != xmlMemBlocks()) {
4483 printf("Leak of %d blocks found in xmlSAX2GetPublicId",
4484 xmlMemBlocks() - mem_base);
4486 printf(" %d", n_ctx);
4497 test_xmlSAX2GetSystemId(void) {
4501 const xmlChar * ret_val;
4502 void * ctx; /* the user data (XML parser context) */
4505 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
4506 mem_base = xmlMemBlocks();
4507 ctx = gen_void_ptr(n_ctx, 0);
4509 ret_val = xmlSAX2GetSystemId(ctx);
4510 desret_const_xmlChar_ptr(ret_val);
4512 des_void_ptr(n_ctx, ctx, 0);
4513 xmlResetLastError();
4514 if (mem_base != xmlMemBlocks()) {
4515 printf("Leak of %d blocks found in xmlSAX2GetSystemId",
4516 xmlMemBlocks() - mem_base);
4518 printf(" %d", n_ctx);
4529 test_xmlSAX2HasExternalSubset(void) {
4534 void * ctx; /* the user data (XML parser context) */
4537 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
4538 mem_base = xmlMemBlocks();
4539 ctx = gen_void_ptr(n_ctx, 0);
4541 ret_val = xmlSAX2HasExternalSubset(ctx);
4542 desret_int(ret_val);
4544 des_void_ptr(n_ctx, ctx, 0);
4545 xmlResetLastError();
4546 if (mem_base != xmlMemBlocks()) {
4547 printf("Leak of %d blocks found in xmlSAX2HasExternalSubset",
4548 xmlMemBlocks() - mem_base);
4550 printf(" %d", n_ctx);
4561 test_xmlSAX2HasInternalSubset(void) {
4566 void * ctx; /* the user data (XML parser context) */
4569 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
4570 mem_base = xmlMemBlocks();
4571 ctx = gen_void_ptr(n_ctx, 0);
4573 ret_val = xmlSAX2HasInternalSubset(ctx);
4574 desret_int(ret_val);
4576 des_void_ptr(n_ctx, ctx, 0);
4577 xmlResetLastError();
4578 if (mem_base != xmlMemBlocks()) {
4579 printf("Leak of %d blocks found in xmlSAX2HasInternalSubset",
4580 xmlMemBlocks() - mem_base);
4582 printf(" %d", n_ctx);
4593 test_xmlSAX2IgnorableWhitespace(void) {
4597 void * ctx; /* the user data (XML parser context) */
4599 xmlChar * ch; /* a xmlChar string */
4601 int len; /* the number of xmlChar */
4604 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
4605 for (n_ch = 0;n_ch < gen_nb_const_xmlChar_ptr;n_ch++) {
4606 for (n_len = 0;n_len < gen_nb_int;n_len++) {
4607 mem_base = xmlMemBlocks();
4608 ctx = gen_void_ptr(n_ctx, 0);
4609 ch = gen_const_xmlChar_ptr(n_ch, 1);
4610 len = gen_int(n_len, 2);
4612 xmlSAX2IgnorableWhitespace(ctx, (const xmlChar *)ch, len);
4614 des_void_ptr(n_ctx, ctx, 0);
4615 des_const_xmlChar_ptr(n_ch, (const xmlChar *)ch, 1);
4616 des_int(n_len, len, 2);
4617 xmlResetLastError();
4618 if (mem_base != xmlMemBlocks()) {
4619 printf("Leak of %d blocks found in xmlSAX2IgnorableWhitespace",
4620 xmlMemBlocks() - mem_base);
4622 printf(" %d", n_ctx);
4623 printf(" %d", n_ch);
4624 printf(" %d", n_len);
4636 #define gen_nb_xmlSAXHandler_ptr 1
4637 static xmlSAXHandler * gen_xmlSAXHandler_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
4640 static void des_xmlSAXHandler_ptr(int no ATTRIBUTE_UNUSED, xmlSAXHandler * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
4644 test_xmlSAX2InitDefaultSAXHandler(void) {
4648 xmlSAXHandler * hdlr; /* the SAX handler */
4650 int warning; /* flag if non-zero sets the handler warning procedure */
4653 for (n_hdlr = 0;n_hdlr < gen_nb_xmlSAXHandler_ptr;n_hdlr++) {
4654 for (n_warning = 0;n_warning < gen_nb_int;n_warning++) {
4655 mem_base = xmlMemBlocks();
4656 hdlr = gen_xmlSAXHandler_ptr(n_hdlr, 0);
4657 warning = gen_int(n_warning, 1);
4659 xmlSAX2InitDefaultSAXHandler(hdlr, warning);
4661 des_xmlSAXHandler_ptr(n_hdlr, hdlr, 0);
4662 des_int(n_warning, warning, 1);
4663 xmlResetLastError();
4664 if (mem_base != xmlMemBlocks()) {
4665 printf("Leak of %d blocks found in xmlSAX2InitDefaultSAXHandler",
4666 xmlMemBlocks() - mem_base);
4668 printf(" %d", n_hdlr);
4669 printf(" %d", n_warning);
4681 test_xmlSAX2InitDocbDefaultSAXHandler(void) {
4684 #if defined(LIBXML_DOCB_ENABLED)
4686 xmlSAXHandler * hdlr; /* the SAX handler */
4689 for (n_hdlr = 0;n_hdlr < gen_nb_xmlSAXHandler_ptr;n_hdlr++) {
4690 mem_base = xmlMemBlocks();
4691 hdlr = gen_xmlSAXHandler_ptr(n_hdlr, 0);
4693 xmlSAX2InitDocbDefaultSAXHandler(hdlr);
4695 des_xmlSAXHandler_ptr(n_hdlr, hdlr, 0);
4696 xmlResetLastError();
4697 if (mem_base != xmlMemBlocks()) {
4698 printf("Leak of %d blocks found in xmlSAX2InitDocbDefaultSAXHandler",
4699 xmlMemBlocks() - mem_base);
4701 printf(" %d", n_hdlr);
4713 test_xmlSAX2InitHtmlDefaultSAXHandler(void) {
4716 #if defined(LIBXML_HTML_ENABLED)
4718 xmlSAXHandler * hdlr; /* the SAX handler */
4721 for (n_hdlr = 0;n_hdlr < gen_nb_xmlSAXHandler_ptr;n_hdlr++) {
4722 mem_base = xmlMemBlocks();
4723 hdlr = gen_xmlSAXHandler_ptr(n_hdlr, 0);
4725 xmlSAX2InitHtmlDefaultSAXHandler(hdlr);
4727 des_xmlSAXHandler_ptr(n_hdlr, hdlr, 0);
4728 xmlResetLastError();
4729 if (mem_base != xmlMemBlocks()) {
4730 printf("Leak of %d blocks found in xmlSAX2InitHtmlDefaultSAXHandler",
4731 xmlMemBlocks() - mem_base);
4733 printf(" %d", n_hdlr);
4745 test_xmlSAX2InternalSubset(void) {
4749 void * ctx; /* the user data (XML parser context) */
4751 xmlChar * name; /* the root element name */
4753 xmlChar * ExternalID; /* the external ID */
4755 xmlChar * SystemID; /* the SYSTEM ID (e.g. filename or URL) */
4758 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
4759 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
4760 for (n_ExternalID = 0;n_ExternalID < gen_nb_const_xmlChar_ptr;n_ExternalID++) {
4761 for (n_SystemID = 0;n_SystemID < gen_nb_const_xmlChar_ptr;n_SystemID++) {
4762 mem_base = xmlMemBlocks();
4763 ctx = gen_void_ptr(n_ctx, 0);
4764 name = gen_const_xmlChar_ptr(n_name, 1);
4765 ExternalID = gen_const_xmlChar_ptr(n_ExternalID, 2);
4766 SystemID = gen_const_xmlChar_ptr(n_SystemID, 3);
4768 xmlSAX2InternalSubset(ctx, (const xmlChar *)name, (const xmlChar *)ExternalID, (const xmlChar *)SystemID);
4770 des_void_ptr(n_ctx, ctx, 0);
4771 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
4772 des_const_xmlChar_ptr(n_ExternalID, (const xmlChar *)ExternalID, 2);
4773 des_const_xmlChar_ptr(n_SystemID, (const xmlChar *)SystemID, 3);
4774 xmlResetLastError();
4775 if (mem_base != xmlMemBlocks()) {
4776 printf("Leak of %d blocks found in xmlSAX2InternalSubset",
4777 xmlMemBlocks() - mem_base);
4779 printf(" %d", n_ctx);
4780 printf(" %d", n_name);
4781 printf(" %d", n_ExternalID);
4782 printf(" %d", n_SystemID);
4796 test_xmlSAX2IsStandalone(void) {
4801 void * ctx; /* the user data (XML parser context) */
4804 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
4805 mem_base = xmlMemBlocks();
4806 ctx = gen_void_ptr(n_ctx, 0);
4808 ret_val = xmlSAX2IsStandalone(ctx);
4809 desret_int(ret_val);
4811 des_void_ptr(n_ctx, ctx, 0);
4812 xmlResetLastError();
4813 if (mem_base != xmlMemBlocks()) {
4814 printf("Leak of %d blocks found in xmlSAX2IsStandalone",
4815 xmlMemBlocks() - mem_base);
4817 printf(" %d", n_ctx);
4828 test_xmlSAX2NotationDecl(void) {
4832 void * ctx; /* the user data (XML parser context) */
4834 xmlChar * name; /* The name of the notation */
4836 xmlChar * publicId; /* The public ID of the entity */
4838 xmlChar * systemId; /* The system ID of the entity */
4841 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
4842 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
4843 for (n_publicId = 0;n_publicId < gen_nb_const_xmlChar_ptr;n_publicId++) {
4844 for (n_systemId = 0;n_systemId < gen_nb_const_xmlChar_ptr;n_systemId++) {
4845 mem_base = xmlMemBlocks();
4846 ctx = gen_void_ptr(n_ctx, 0);
4847 name = gen_const_xmlChar_ptr(n_name, 1);
4848 publicId = gen_const_xmlChar_ptr(n_publicId, 2);
4849 systemId = gen_const_xmlChar_ptr(n_systemId, 3);
4851 xmlSAX2NotationDecl(ctx, (const xmlChar *)name, (const xmlChar *)publicId, (const xmlChar *)systemId);
4853 des_void_ptr(n_ctx, ctx, 0);
4854 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
4855 des_const_xmlChar_ptr(n_publicId, (const xmlChar *)publicId, 2);
4856 des_const_xmlChar_ptr(n_systemId, (const xmlChar *)systemId, 3);
4857 xmlResetLastError();
4858 if (mem_base != xmlMemBlocks()) {
4859 printf("Leak of %d blocks found in xmlSAX2NotationDecl",
4860 xmlMemBlocks() - mem_base);
4862 printf(" %d", n_ctx);
4863 printf(" %d", n_name);
4864 printf(" %d", n_publicId);
4865 printf(" %d", n_systemId);
4879 test_xmlSAX2ProcessingInstruction(void) {
4883 void * ctx; /* the user data (XML parser context) */
4885 xmlChar * target; /* the target name */
4887 xmlChar * data; /* the PI data's */
4890 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
4891 for (n_target = 0;n_target < gen_nb_const_xmlChar_ptr;n_target++) {
4892 for (n_data = 0;n_data < gen_nb_const_xmlChar_ptr;n_data++) {
4893 mem_base = xmlMemBlocks();
4894 ctx = gen_void_ptr(n_ctx, 0);
4895 target = gen_const_xmlChar_ptr(n_target, 1);
4896 data = gen_const_xmlChar_ptr(n_data, 2);
4898 xmlSAX2ProcessingInstruction(ctx, (const xmlChar *)target, (const xmlChar *)data);
4900 des_void_ptr(n_ctx, ctx, 0);
4901 des_const_xmlChar_ptr(n_target, (const xmlChar *)target, 1);
4902 des_const_xmlChar_ptr(n_data, (const xmlChar *)data, 2);
4903 xmlResetLastError();
4904 if (mem_base != xmlMemBlocks()) {
4905 printf("Leak of %d blocks found in xmlSAX2ProcessingInstruction",
4906 xmlMemBlocks() - mem_base);
4908 printf(" %d", n_ctx);
4909 printf(" %d", n_target);
4910 printf(" %d", n_data);
4923 test_xmlSAX2Reference(void) {
4927 void * ctx; /* the user data (XML parser context) */
4929 xmlChar * name; /* The entity name */
4932 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
4933 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
4934 mem_base = xmlMemBlocks();
4935 ctx = gen_void_ptr(n_ctx, 0);
4936 name = gen_const_xmlChar_ptr(n_name, 1);
4938 xmlSAX2Reference(ctx, (const xmlChar *)name);
4940 des_void_ptr(n_ctx, ctx, 0);
4941 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
4942 xmlResetLastError();
4943 if (mem_base != xmlMemBlocks()) {
4944 printf("Leak of %d blocks found in xmlSAX2Reference",
4945 xmlMemBlocks() - mem_base);
4947 printf(" %d", n_ctx);
4948 printf(" %d", n_name);
4960 test_xmlSAX2ResolveEntity(void) {
4964 xmlParserInputPtr ret_val;
4965 void * ctx; /* the user data (XML parser context) */
4967 xmlChar * publicId; /* The public ID of the entity */
4969 xmlChar * systemId; /* The system ID of the entity */
4972 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
4973 for (n_publicId = 0;n_publicId < gen_nb_const_xmlChar_ptr;n_publicId++) {
4974 for (n_systemId = 0;n_systemId < gen_nb_const_xmlChar_ptr;n_systemId++) {
4975 mem_base = xmlMemBlocks();
4976 ctx = gen_void_ptr(n_ctx, 0);
4977 publicId = gen_const_xmlChar_ptr(n_publicId, 1);
4978 systemId = gen_const_xmlChar_ptr(n_systemId, 2);
4980 ret_val = xmlSAX2ResolveEntity(ctx, (const xmlChar *)publicId, (const xmlChar *)systemId);
4981 desret_xmlParserInputPtr(ret_val);
4983 des_void_ptr(n_ctx, ctx, 0);
4984 des_const_xmlChar_ptr(n_publicId, (const xmlChar *)publicId, 1);
4985 des_const_xmlChar_ptr(n_systemId, (const xmlChar *)systemId, 2);
4986 xmlResetLastError();
4987 if (mem_base != xmlMemBlocks()) {
4988 printf("Leak of %d blocks found in xmlSAX2ResolveEntity",
4989 xmlMemBlocks() - mem_base);
4991 printf(" %d", n_ctx);
4992 printf(" %d", n_publicId);
4993 printf(" %d", n_systemId);
5005 #define gen_nb_xmlSAXLocatorPtr 1
5006 static xmlSAXLocatorPtr gen_xmlSAXLocatorPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
5009 static void des_xmlSAXLocatorPtr(int no ATTRIBUTE_UNUSED, xmlSAXLocatorPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
5013 test_xmlSAX2SetDocumentLocator(void) {
5017 void * ctx; /* the user data (XML parser context) */
5019 xmlSAXLocatorPtr loc; /* A SAX Locator */
5022 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
5023 for (n_loc = 0;n_loc < gen_nb_xmlSAXLocatorPtr;n_loc++) {
5024 mem_base = xmlMemBlocks();
5025 ctx = gen_void_ptr(n_ctx, 0);
5026 loc = gen_xmlSAXLocatorPtr(n_loc, 1);
5028 xmlSAX2SetDocumentLocator(ctx, loc);
5030 des_void_ptr(n_ctx, ctx, 0);
5031 des_xmlSAXLocatorPtr(n_loc, loc, 1);
5032 xmlResetLastError();
5033 if (mem_base != xmlMemBlocks()) {
5034 printf("Leak of %d blocks found in xmlSAX2SetDocumentLocator",
5035 xmlMemBlocks() - mem_base);
5037 printf(" %d", n_ctx);
5038 printf(" %d", n_loc);
5050 test_xmlSAX2StartDocument(void) {
5054 void * ctx; /* the user data (XML parser context) */
5057 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
5058 mem_base = xmlMemBlocks();
5059 ctx = gen_void_ptr(n_ctx, 0);
5061 xmlSAX2StartDocument(ctx);
5063 des_void_ptr(n_ctx, ctx, 0);
5064 xmlResetLastError();
5065 if (mem_base != xmlMemBlocks()) {
5066 printf("Leak of %d blocks found in xmlSAX2StartDocument",
5067 xmlMemBlocks() - mem_base);
5069 printf(" %d", n_ctx);
5080 test_xmlSAX2StartElement(void) {
5083 #if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
5084 #ifdef LIBXML_SAX1_ENABLED
5086 void * ctx; /* the user data (XML parser context) */
5088 xmlChar * fullname; /* The element name, including namespace prefix */
5090 xmlChar ** atts; /* An array of name/value attributes pairs, NULL terminated */
5093 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
5094 for (n_fullname = 0;n_fullname < gen_nb_const_xmlChar_ptr;n_fullname++) {
5095 for (n_atts = 0;n_atts < gen_nb_const_xmlChar_ptr_ptr;n_atts++) {
5096 mem_base = xmlMemBlocks();
5097 ctx = gen_void_ptr(n_ctx, 0);
5098 fullname = gen_const_xmlChar_ptr(n_fullname, 1);
5099 atts = gen_const_xmlChar_ptr_ptr(n_atts, 2);
5101 xmlSAX2StartElement(ctx, (const xmlChar *)fullname, (const xmlChar **)atts);
5103 des_void_ptr(n_ctx, ctx, 0);
5104 des_const_xmlChar_ptr(n_fullname, (const xmlChar *)fullname, 1);
5105 des_const_xmlChar_ptr_ptr(n_atts, (const xmlChar **)atts, 2);
5106 xmlResetLastError();
5107 if (mem_base != xmlMemBlocks()) {
5108 printf("Leak of %d blocks found in xmlSAX2StartElement",
5109 xmlMemBlocks() - mem_base);
5111 printf(" %d", n_ctx);
5112 printf(" %d", n_fullname);
5113 printf(" %d", n_atts);
5128 test_xmlSAX2StartElementNs(void) {
5132 void * ctx; /* the user data (XML parser context) */
5134 xmlChar * localname; /* the local name of the element */
5136 xmlChar * prefix; /* the element namespace prefix if available */
5138 xmlChar * URI; /* the element namespace name if available */
5140 int nb_namespaces; /* number of namespace definitions on that node */
5141 int n_nb_namespaces;
5142 xmlChar ** namespaces; /* pointer to the array of prefix/URI pairs namespace definitions */
5144 int nb_attributes; /* the number of attributes on that node */
5145 int n_nb_attributes;
5146 int nb_defaulted; /* the number of defaulted attributes. */
5148 xmlChar ** attributes; /* pointer to the array of (localname/prefix/URI/value/end) attribute values. */
5151 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
5152 for (n_localname = 0;n_localname < gen_nb_const_xmlChar_ptr;n_localname++) {
5153 for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
5154 for (n_URI = 0;n_URI < gen_nb_const_xmlChar_ptr;n_URI++) {
5155 for (n_nb_namespaces = 0;n_nb_namespaces < gen_nb_int;n_nb_namespaces++) {
5156 for (n_namespaces = 0;n_namespaces < gen_nb_const_xmlChar_ptr_ptr;n_namespaces++) {
5157 for (n_nb_attributes = 0;n_nb_attributes < gen_nb_int;n_nb_attributes++) {
5158 for (n_nb_defaulted = 0;n_nb_defaulted < gen_nb_int;n_nb_defaulted++) {
5159 for (n_attributes = 0;n_attributes < gen_nb_const_xmlChar_ptr_ptr;n_attributes++) {
5160 mem_base = xmlMemBlocks();
5161 ctx = gen_void_ptr(n_ctx, 0);
5162 localname = gen_const_xmlChar_ptr(n_localname, 1);
5163 prefix = gen_const_xmlChar_ptr(n_prefix, 2);
5164 URI = gen_const_xmlChar_ptr(n_URI, 3);
5165 nb_namespaces = gen_int(n_nb_namespaces, 4);
5166 namespaces = gen_const_xmlChar_ptr_ptr(n_namespaces, 5);
5167 nb_attributes = gen_int(n_nb_attributes, 6);
5168 nb_defaulted = gen_int(n_nb_defaulted, 7);
5169 attributes = gen_const_xmlChar_ptr_ptr(n_attributes, 8);
5171 xmlSAX2StartElementNs(ctx, (const xmlChar *)localname, (const xmlChar *)prefix, (const xmlChar *)URI, nb_namespaces, (const xmlChar **)namespaces, nb_attributes, nb_defaulted, (const xmlChar **)attributes);
5173 des_void_ptr(n_ctx, ctx, 0);
5174 des_const_xmlChar_ptr(n_localname, (const xmlChar *)localname, 1);
5175 des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 2);
5176 des_const_xmlChar_ptr(n_URI, (const xmlChar *)URI, 3);
5177 des_int(n_nb_namespaces, nb_namespaces, 4);
5178 des_const_xmlChar_ptr_ptr(n_namespaces, (const xmlChar **)namespaces, 5);
5179 des_int(n_nb_attributes, nb_attributes, 6);
5180 des_int(n_nb_defaulted, nb_defaulted, 7);
5181 des_const_xmlChar_ptr_ptr(n_attributes, (const xmlChar **)attributes, 8);
5182 xmlResetLastError();
5183 if (mem_base != xmlMemBlocks()) {
5184 printf("Leak of %d blocks found in xmlSAX2StartElementNs",
5185 xmlMemBlocks() - mem_base);
5187 printf(" %d", n_ctx);
5188 printf(" %d", n_localname);
5189 printf(" %d", n_prefix);
5190 printf(" %d", n_URI);
5191 printf(" %d", n_nb_namespaces);
5192 printf(" %d", n_namespaces);
5193 printf(" %d", n_nb_attributes);
5194 printf(" %d", n_nb_defaulted);
5195 printf(" %d", n_attributes);
5214 test_xmlSAX2UnparsedEntityDecl(void) {
5218 void * ctx; /* the user data (XML parser context) */
5220 xmlChar * name; /* The name of the entity */
5222 xmlChar * publicId; /* The public ID of the entity */
5224 xmlChar * systemId; /* The system ID of the entity */
5226 xmlChar * notationName; /* the name of the notation */
5229 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
5230 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
5231 for (n_publicId = 0;n_publicId < gen_nb_const_xmlChar_ptr;n_publicId++) {
5232 for (n_systemId = 0;n_systemId < gen_nb_const_xmlChar_ptr;n_systemId++) {
5233 for (n_notationName = 0;n_notationName < gen_nb_const_xmlChar_ptr;n_notationName++) {
5234 mem_base = xmlMemBlocks();
5235 ctx = gen_void_ptr(n_ctx, 0);
5236 name = gen_const_xmlChar_ptr(n_name, 1);
5237 publicId = gen_const_xmlChar_ptr(n_publicId, 2);
5238 systemId = gen_const_xmlChar_ptr(n_systemId, 3);
5239 notationName = gen_const_xmlChar_ptr(n_notationName, 4);
5241 xmlSAX2UnparsedEntityDecl(ctx, (const xmlChar *)name, (const xmlChar *)publicId, (const xmlChar *)systemId, (const xmlChar *)notationName);
5243 des_void_ptr(n_ctx, ctx, 0);
5244 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
5245 des_const_xmlChar_ptr(n_publicId, (const xmlChar *)publicId, 2);
5246 des_const_xmlChar_ptr(n_systemId, (const xmlChar *)systemId, 3);
5247 des_const_xmlChar_ptr(n_notationName, (const xmlChar *)notationName, 4);
5248 xmlResetLastError();
5249 if (mem_base != xmlMemBlocks()) {
5250 printf("Leak of %d blocks found in xmlSAX2UnparsedEntityDecl",
5251 xmlMemBlocks() - mem_base);
5253 printf(" %d", n_ctx);
5254 printf(" %d", n_name);
5255 printf(" %d", n_publicId);
5256 printf(" %d", n_systemId);
5257 printf(" %d", n_notationName);
5272 test_xmlSAXDefaultVersion(void) {
5275 #if defined(LIBXML_SAX1_ENABLED)
5276 #ifdef LIBXML_SAX1_ENABLED
5279 int version; /* the version, 1 or 2 */
5282 for (n_version = 0;n_version < gen_nb_int;n_version++) {
5283 mem_base = xmlMemBlocks();
5284 version = gen_int(n_version, 0);
5286 ret_val = xmlSAXDefaultVersion(version);
5287 desret_int(ret_val);
5289 des_int(n_version, version, 0);
5290 xmlResetLastError();
5291 if (mem_base != xmlMemBlocks()) {
5292 printf("Leak of %d blocks found in xmlSAXDefaultVersion",
5293 xmlMemBlocks() - mem_base);
5295 printf(" %d", n_version);
5308 test_xmlSAXVersion(void) {
5313 xmlSAXHandler * hdlr; /* the SAX handler */
5315 int version; /* the version, 1 or 2 */
5318 for (n_hdlr = 0;n_hdlr < gen_nb_xmlSAXHandler_ptr;n_hdlr++) {
5319 for (n_version = 0;n_version < gen_nb_int;n_version++) {
5320 mem_base = xmlMemBlocks();
5321 hdlr = gen_xmlSAXHandler_ptr(n_hdlr, 0);
5322 version = gen_int(n_version, 1);
5324 ret_val = xmlSAXVersion(hdlr, version);
5325 desret_int(ret_val);
5327 des_xmlSAXHandler_ptr(n_hdlr, hdlr, 0);
5328 des_int(n_version, version, 1);
5329 xmlResetLastError();
5330 if (mem_base != xmlMemBlocks()) {
5331 printf("Leak of %d blocks found in xmlSAXVersion",
5332 xmlMemBlocks() - mem_base);
5334 printf(" %d", n_hdlr);
5335 printf(" %d", n_version);
5350 if (quiet == 0) printf("Testing SAX2 : 38 of 38 functions ...\n");
5351 rc = test_docbDefaultSAXHandlerInit();
5352 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5353 rc = test_htmlDefaultSAXHandlerInit();
5354 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5355 rc = test_xmlDefaultSAXHandlerInit();
5356 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5357 rc = test_xmlSAX2AttributeDecl();
5358 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5359 rc = test_xmlSAX2CDataBlock();
5360 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5361 rc = test_xmlSAX2Characters();
5362 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5363 rc = test_xmlSAX2Comment();
5364 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5365 rc = test_xmlSAX2ElementDecl();
5366 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5367 rc = test_xmlSAX2EndDocument();
5368 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5369 rc = test_xmlSAX2EndElement();
5370 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5371 rc = test_xmlSAX2EndElementNs();
5372 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5373 rc = test_xmlSAX2EntityDecl();
5374 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5375 rc = test_xmlSAX2ExternalSubset();
5376 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5377 rc = test_xmlSAX2GetColumnNumber();
5378 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5379 rc = test_xmlSAX2GetEntity();
5380 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5381 rc = test_xmlSAX2GetLineNumber();
5382 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5383 rc = test_xmlSAX2GetParameterEntity();
5384 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5385 rc = test_xmlSAX2GetPublicId();
5386 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5387 rc = test_xmlSAX2GetSystemId();
5388 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5389 rc = test_xmlSAX2HasExternalSubset();
5390 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5391 rc = test_xmlSAX2HasInternalSubset();
5392 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5393 rc = test_xmlSAX2IgnorableWhitespace();
5394 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5395 rc = test_xmlSAX2InitDefaultSAXHandler();
5396 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5397 rc = test_xmlSAX2InitDocbDefaultSAXHandler();
5398 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5399 rc = test_xmlSAX2InitHtmlDefaultSAXHandler();
5400 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5401 rc = test_xmlSAX2InternalSubset();
5402 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5403 rc = test_xmlSAX2IsStandalone();
5404 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5405 rc = test_xmlSAX2NotationDecl();
5406 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5407 rc = test_xmlSAX2ProcessingInstruction();
5408 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5409 rc = test_xmlSAX2Reference();
5410 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5411 rc = test_xmlSAX2ResolveEntity();
5412 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5413 rc = test_xmlSAX2SetDocumentLocator();
5414 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5415 rc = test_xmlSAX2StartDocument();
5416 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5417 rc = test_xmlSAX2StartElement();
5418 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5419 rc = test_xmlSAX2StartElementNs();
5420 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5421 rc = test_xmlSAX2UnparsedEntityDecl();
5422 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5423 rc = test_xmlSAXDefaultVersion();
5424 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5425 rc = test_xmlSAXVersion();
5428 printf("Module SAX2: %d errors\n", test_ret);
5433 test_xmlC14NDocDumpMemory(void) {
5436 #if defined(LIBXML_C14N_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
5439 xmlDocPtr doc; /* the XML document for canonization */
5441 xmlNodeSetPtr nodes; /* the nodes set to be included in the canonized image or NULL if all document nodes should be included */
5443 int mode; /* the c14n mode (see @xmlC14NMode) */
5445 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) */
5446 int n_inclusive_ns_prefixes;
5447 int with_comments; /* include comments in the result (!=0) or not (==0) */
5448 int n_with_comments;
5449 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 */
5452 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
5453 for (n_nodes = 0;n_nodes < gen_nb_xmlNodeSetPtr;n_nodes++) {
5454 for (n_mode = 0;n_mode < gen_nb_int;n_mode++) {
5455 for (n_inclusive_ns_prefixes = 0;n_inclusive_ns_prefixes < gen_nb_xmlChar_ptr_ptr;n_inclusive_ns_prefixes++) {
5456 for (n_with_comments = 0;n_with_comments < gen_nb_int;n_with_comments++) {
5457 for (n_doc_txt_ptr = 0;n_doc_txt_ptr < gen_nb_xmlChar_ptr_ptr;n_doc_txt_ptr++) {
5458 mem_base = xmlMemBlocks();
5459 doc = gen_xmlDocPtr(n_doc, 0);
5460 nodes = gen_xmlNodeSetPtr(n_nodes, 1);
5461 mode = gen_int(n_mode, 2);
5462 inclusive_ns_prefixes = gen_xmlChar_ptr_ptr(n_inclusive_ns_prefixes, 3);
5463 with_comments = gen_int(n_with_comments, 4);
5464 doc_txt_ptr = gen_xmlChar_ptr_ptr(n_doc_txt_ptr, 5);
5466 ret_val = xmlC14NDocDumpMemory(doc, nodes, mode, inclusive_ns_prefixes, with_comments, doc_txt_ptr);
5467 desret_int(ret_val);
5469 des_xmlDocPtr(n_doc, doc, 0);
5470 des_xmlNodeSetPtr(n_nodes, nodes, 1);
5471 des_int(n_mode, mode, 2);
5472 des_xmlChar_ptr_ptr(n_inclusive_ns_prefixes, inclusive_ns_prefixes, 3);
5473 des_int(n_with_comments, with_comments, 4);
5474 des_xmlChar_ptr_ptr(n_doc_txt_ptr, doc_txt_ptr, 5);
5475 xmlResetLastError();
5476 if (mem_base != xmlMemBlocks()) {
5477 printf("Leak of %d blocks found in xmlC14NDocDumpMemory",
5478 xmlMemBlocks() - mem_base);
5480 printf(" %d", n_doc);
5481 printf(" %d", n_nodes);
5482 printf(" %d", n_mode);
5483 printf(" %d", n_inclusive_ns_prefixes);
5484 printf(" %d", n_with_comments);
5485 printf(" %d", n_doc_txt_ptr);
5502 test_xmlC14NDocSave(void) {
5505 #if defined(LIBXML_C14N_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
5508 xmlDocPtr doc; /* the XML document for canonization */
5510 xmlNodeSetPtr nodes; /* the nodes set to be included in the canonized image or NULL if all document nodes should be included */
5512 int mode; /* the c14n mode (see @xmlC14NMode) */
5514 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) */
5515 int n_inclusive_ns_prefixes;
5516 int with_comments; /* include comments in the result (!=0) or not (==0) */
5517 int n_with_comments;
5518 const char * filename; /* the filename to store canonical XML image */
5520 int compression; /* the compression level (zlib requred): -1 - libxml default, 0 - uncompressed, >0 - compression level */
5523 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
5524 for (n_nodes = 0;n_nodes < gen_nb_xmlNodeSetPtr;n_nodes++) {
5525 for (n_mode = 0;n_mode < gen_nb_int;n_mode++) {
5526 for (n_inclusive_ns_prefixes = 0;n_inclusive_ns_prefixes < gen_nb_xmlChar_ptr_ptr;n_inclusive_ns_prefixes++) {
5527 for (n_with_comments = 0;n_with_comments < gen_nb_int;n_with_comments++) {
5528 for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
5529 for (n_compression = 0;n_compression < gen_nb_int;n_compression++) {
5530 mem_base = xmlMemBlocks();
5531 doc = gen_xmlDocPtr(n_doc, 0);
5532 nodes = gen_xmlNodeSetPtr(n_nodes, 1);
5533 mode = gen_int(n_mode, 2);
5534 inclusive_ns_prefixes = gen_xmlChar_ptr_ptr(n_inclusive_ns_prefixes, 3);
5535 with_comments = gen_int(n_with_comments, 4);
5536 filename = gen_fileoutput(n_filename, 5);
5537 compression = gen_int(n_compression, 6);
5539 ret_val = xmlC14NDocSave(doc, nodes, mode, inclusive_ns_prefixes, with_comments, filename, compression);
5540 desret_int(ret_val);
5542 des_xmlDocPtr(n_doc, doc, 0);
5543 des_xmlNodeSetPtr(n_nodes, nodes, 1);
5544 des_int(n_mode, mode, 2);
5545 des_xmlChar_ptr_ptr(n_inclusive_ns_prefixes, inclusive_ns_prefixes, 3);
5546 des_int(n_with_comments, with_comments, 4);
5547 des_fileoutput(n_filename, filename, 5);
5548 des_int(n_compression, compression, 6);
5549 xmlResetLastError();
5550 if (mem_base != xmlMemBlocks()) {
5551 printf("Leak of %d blocks found in xmlC14NDocSave",
5552 xmlMemBlocks() - mem_base);
5554 printf(" %d", n_doc);
5555 printf(" %d", n_nodes);
5556 printf(" %d", n_mode);
5557 printf(" %d", n_inclusive_ns_prefixes);
5558 printf(" %d", n_with_comments);
5559 printf(" %d", n_filename);
5560 printf(" %d", n_compression);
5578 test_xmlC14NDocSaveTo(void) {
5581 #if defined(LIBXML_C14N_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
5584 xmlDocPtr doc; /* the XML document for canonization */
5586 xmlNodeSetPtr nodes; /* the nodes set to be included in the canonized image or NULL if all document nodes should be included */
5588 int mode; /* the c14n mode (see @xmlC14NMode) */
5590 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) */
5591 int n_inclusive_ns_prefixes;
5592 int with_comments; /* include comments in the result (!=0) or not (==0) */
5593 int n_with_comments;
5594 xmlOutputBufferPtr buf; /* the output buffer to store canonical XML; this buffer MUST have encoder==NULL because C14N requires UTF-8 output */
5597 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
5598 for (n_nodes = 0;n_nodes < gen_nb_xmlNodeSetPtr;n_nodes++) {
5599 for (n_mode = 0;n_mode < gen_nb_int;n_mode++) {
5600 for (n_inclusive_ns_prefixes = 0;n_inclusive_ns_prefixes < gen_nb_xmlChar_ptr_ptr;n_inclusive_ns_prefixes++) {
5601 for (n_with_comments = 0;n_with_comments < gen_nb_int;n_with_comments++) {
5602 for (n_buf = 0;n_buf < gen_nb_xmlOutputBufferPtr;n_buf++) {
5603 mem_base = xmlMemBlocks();
5604 doc = gen_xmlDocPtr(n_doc, 0);
5605 nodes = gen_xmlNodeSetPtr(n_nodes, 1);
5606 mode = gen_int(n_mode, 2);
5607 inclusive_ns_prefixes = gen_xmlChar_ptr_ptr(n_inclusive_ns_prefixes, 3);
5608 with_comments = gen_int(n_with_comments, 4);
5609 buf = gen_xmlOutputBufferPtr(n_buf, 5);
5611 ret_val = xmlC14NDocSaveTo(doc, nodes, mode, inclusive_ns_prefixes, with_comments, buf);
5612 desret_int(ret_val);
5614 des_xmlDocPtr(n_doc, doc, 0);
5615 des_xmlNodeSetPtr(n_nodes, nodes, 1);
5616 des_int(n_mode, mode, 2);
5617 des_xmlChar_ptr_ptr(n_inclusive_ns_prefixes, inclusive_ns_prefixes, 3);
5618 des_int(n_with_comments, with_comments, 4);
5619 des_xmlOutputBufferPtr(n_buf, buf, 5);
5620 xmlResetLastError();
5621 if (mem_base != xmlMemBlocks()) {
5622 printf("Leak of %d blocks found in xmlC14NDocSaveTo",
5623 xmlMemBlocks() - mem_base);
5625 printf(" %d", n_doc);
5626 printf(" %d", n_nodes);
5627 printf(" %d", n_mode);
5628 printf(" %d", n_inclusive_ns_prefixes);
5629 printf(" %d", n_with_comments);
5630 printf(" %d", n_buf);
5647 test_xmlC14NExecute(void) {
5651 /* missing type support */
5660 if (quiet == 0) printf("Testing c14n : 3 of 4 functions ...\n");
5661 rc = test_xmlC14NDocDumpMemory();
5662 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5663 rc = test_xmlC14NDocSave();
5664 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5665 rc = test_xmlC14NDocSaveTo();
5666 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5667 rc = test_xmlC14NExecute();
5668 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
5671 printf("Module c14n: %d errors\n", test_ret);
5674 #ifdef LIBXML_CATALOG_ENABLED
5676 #define gen_nb_xmlCatalogPtr 1
5677 static xmlCatalogPtr gen_xmlCatalogPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
5680 static void des_xmlCatalogPtr(int no ATTRIBUTE_UNUSED, xmlCatalogPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
5686 test_xmlACatalogAdd(void) {
5689 #if defined(LIBXML_CATALOG_ENABLED)
5692 xmlCatalogPtr catal; /* a Catalog */
5694 xmlChar * type; /* the type of record to add to the catalog */
5696 xmlChar * orig; /* the system, public or prefix to match */
5698 xmlChar * replace; /* the replacement value for the match */
5701 for (n_catal = 0;n_catal < gen_nb_xmlCatalogPtr;n_catal++) {
5702 for (n_type = 0;n_type < gen_nb_const_xmlChar_ptr;n_type++) {
5703 for (n_orig = 0;n_orig < gen_nb_const_xmlChar_ptr;n_orig++) {
5704 for (n_replace = 0;n_replace < gen_nb_const_xmlChar_ptr;n_replace++) {
5705 mem_base = xmlMemBlocks();
5706 catal = gen_xmlCatalogPtr(n_catal, 0);
5707 type = gen_const_xmlChar_ptr(n_type, 1);
5708 orig = gen_const_xmlChar_ptr(n_orig, 2);
5709 replace = gen_const_xmlChar_ptr(n_replace, 3);
5711 ret_val = xmlACatalogAdd(catal, (const xmlChar *)type, (const xmlChar *)orig, (const xmlChar *)replace);
5712 desret_int(ret_val);
5714 des_xmlCatalogPtr(n_catal, catal, 0);
5715 des_const_xmlChar_ptr(n_type, (const xmlChar *)type, 1);
5716 des_const_xmlChar_ptr(n_orig, (const xmlChar *)orig, 2);
5717 des_const_xmlChar_ptr(n_replace, (const xmlChar *)replace, 3);
5718 xmlResetLastError();
5719 if (mem_base != xmlMemBlocks()) {
5720 printf("Leak of %d blocks found in xmlACatalogAdd",
5721 xmlMemBlocks() - mem_base);
5723 printf(" %d", n_catal);
5724 printf(" %d", n_type);
5725 printf(" %d", n_orig);
5726 printf(" %d", n_replace);
5741 test_xmlACatalogDump(void) {
5744 #if defined(LIBXML_CATALOG_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
5746 xmlCatalogPtr catal; /* a Catalog */
5748 FILE * out; /* the file. */
5751 for (n_catal = 0;n_catal < gen_nb_xmlCatalogPtr;n_catal++) {
5752 for (n_out = 0;n_out < gen_nb_FILE_ptr;n_out++) {
5753 mem_base = xmlMemBlocks();
5754 catal = gen_xmlCatalogPtr(n_catal, 0);
5755 out = gen_FILE_ptr(n_out, 1);
5757 xmlACatalogDump(catal, out);
5759 des_xmlCatalogPtr(n_catal, catal, 0);
5760 des_FILE_ptr(n_out, out, 1);
5761 xmlResetLastError();
5762 if (mem_base != xmlMemBlocks()) {
5763 printf("Leak of %d blocks found in xmlACatalogDump",
5764 xmlMemBlocks() - mem_base);
5766 printf(" %d", n_catal);
5767 printf(" %d", n_out);
5780 test_xmlACatalogRemove(void) {
5783 #if defined(LIBXML_CATALOG_ENABLED)
5786 xmlCatalogPtr catal; /* a Catalog */
5788 xmlChar * value; /* the value to remove */
5791 for (n_catal = 0;n_catal < gen_nb_xmlCatalogPtr;n_catal++) {
5792 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
5793 mem_base = xmlMemBlocks();
5794 catal = gen_xmlCatalogPtr(n_catal, 0);
5795 value = gen_const_xmlChar_ptr(n_value, 1);
5797 ret_val = xmlACatalogRemove(catal, (const xmlChar *)value);
5798 desret_int(ret_val);
5800 des_xmlCatalogPtr(n_catal, catal, 0);
5801 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 1);
5802 xmlResetLastError();
5803 if (mem_base != xmlMemBlocks()) {
5804 printf("Leak of %d blocks found in xmlACatalogRemove",
5805 xmlMemBlocks() - mem_base);
5807 printf(" %d", n_catal);
5808 printf(" %d", n_value);
5821 test_xmlACatalogResolve(void) {
5824 #if defined(LIBXML_CATALOG_ENABLED)
5827 xmlCatalogPtr catal; /* a Catalog */
5829 xmlChar * pubID; /* the public ID string */
5831 xmlChar * sysID; /* the system ID string */
5834 for (n_catal = 0;n_catal < gen_nb_xmlCatalogPtr;n_catal++) {
5835 for (n_pubID = 0;n_pubID < gen_nb_const_xmlChar_ptr;n_pubID++) {
5836 for (n_sysID = 0;n_sysID < gen_nb_const_xmlChar_ptr;n_sysID++) {
5837 mem_base = xmlMemBlocks();
5838 catal = gen_xmlCatalogPtr(n_catal, 0);
5839 pubID = gen_const_xmlChar_ptr(n_pubID, 1);
5840 sysID = gen_const_xmlChar_ptr(n_sysID, 2);
5842 ret_val = xmlACatalogResolve(catal, (const xmlChar *)pubID, (const xmlChar *)sysID);
5843 desret_xmlChar_ptr(ret_val);
5845 des_xmlCatalogPtr(n_catal, catal, 0);
5846 des_const_xmlChar_ptr(n_pubID, (const xmlChar *)pubID, 1);
5847 des_const_xmlChar_ptr(n_sysID, (const xmlChar *)sysID, 2);
5848 xmlResetLastError();
5849 if (mem_base != xmlMemBlocks()) {
5850 printf("Leak of %d blocks found in xmlACatalogResolve",
5851 xmlMemBlocks() - mem_base);
5853 printf(" %d", n_catal);
5854 printf(" %d", n_pubID);
5855 printf(" %d", n_sysID);
5869 test_xmlACatalogResolvePublic(void) {
5872 #if defined(LIBXML_CATALOG_ENABLED)
5875 xmlCatalogPtr catal; /* a Catalog */
5877 xmlChar * pubID; /* the public ID string */
5880 for (n_catal = 0;n_catal < gen_nb_xmlCatalogPtr;n_catal++) {
5881 for (n_pubID = 0;n_pubID < gen_nb_const_xmlChar_ptr;n_pubID++) {
5882 mem_base = xmlMemBlocks();
5883 catal = gen_xmlCatalogPtr(n_catal, 0);
5884 pubID = gen_const_xmlChar_ptr(n_pubID, 1);
5886 ret_val = xmlACatalogResolvePublic(catal, (const xmlChar *)pubID);
5887 desret_xmlChar_ptr(ret_val);
5889 des_xmlCatalogPtr(n_catal, catal, 0);
5890 des_const_xmlChar_ptr(n_pubID, (const xmlChar *)pubID, 1);
5891 xmlResetLastError();
5892 if (mem_base != xmlMemBlocks()) {
5893 printf("Leak of %d blocks found in xmlACatalogResolvePublic",
5894 xmlMemBlocks() - mem_base);
5896 printf(" %d", n_catal);
5897 printf(" %d", n_pubID);
5910 test_xmlACatalogResolveSystem(void) {
5913 #if defined(LIBXML_CATALOG_ENABLED)
5916 xmlCatalogPtr catal; /* a Catalog */
5918 xmlChar * sysID; /* the system ID string */
5921 for (n_catal = 0;n_catal < gen_nb_xmlCatalogPtr;n_catal++) {
5922 for (n_sysID = 0;n_sysID < gen_nb_const_xmlChar_ptr;n_sysID++) {
5923 mem_base = xmlMemBlocks();
5924 catal = gen_xmlCatalogPtr(n_catal, 0);
5925 sysID = gen_const_xmlChar_ptr(n_sysID, 1);
5927 ret_val = xmlACatalogResolveSystem(catal, (const xmlChar *)sysID);
5928 desret_xmlChar_ptr(ret_val);
5930 des_xmlCatalogPtr(n_catal, catal, 0);
5931 des_const_xmlChar_ptr(n_sysID, (const xmlChar *)sysID, 1);
5932 xmlResetLastError();
5933 if (mem_base != xmlMemBlocks()) {
5934 printf("Leak of %d blocks found in xmlACatalogResolveSystem",
5935 xmlMemBlocks() - mem_base);
5937 printf(" %d", n_catal);
5938 printf(" %d", n_sysID);
5951 test_xmlACatalogResolveURI(void) {
5954 #if defined(LIBXML_CATALOG_ENABLED)
5957 xmlCatalogPtr catal; /* a Catalog */
5959 xmlChar * URI; /* the URI */
5962 for (n_catal = 0;n_catal < gen_nb_xmlCatalogPtr;n_catal++) {
5963 for (n_URI = 0;n_URI < gen_nb_const_xmlChar_ptr;n_URI++) {
5964 mem_base = xmlMemBlocks();
5965 catal = gen_xmlCatalogPtr(n_catal, 0);
5966 URI = gen_const_xmlChar_ptr(n_URI, 1);
5968 ret_val = xmlACatalogResolveURI(catal, (const xmlChar *)URI);
5969 desret_xmlChar_ptr(ret_val);
5971 des_xmlCatalogPtr(n_catal, catal, 0);
5972 des_const_xmlChar_ptr(n_URI, (const xmlChar *)URI, 1);
5973 xmlResetLastError();
5974 if (mem_base != xmlMemBlocks()) {
5975 printf("Leak of %d blocks found in xmlACatalogResolveURI",
5976 xmlMemBlocks() - mem_base);
5978 printf(" %d", n_catal);
5979 printf(" %d", n_URI);
5992 test_xmlCatalogAdd(void) {
5995 #if defined(LIBXML_CATALOG_ENABLED)
5998 xmlChar * type; /* the type of record to add to the catalog */
6000 xmlChar * orig; /* the system, public or prefix to match */
6002 xmlChar * replace; /* the replacement value for the match */
6005 for (n_type = 0;n_type < gen_nb_const_xmlChar_ptr;n_type++) {
6006 for (n_orig = 0;n_orig < gen_nb_const_xmlChar_ptr;n_orig++) {
6007 for (n_replace = 0;n_replace < gen_nb_const_xmlChar_ptr;n_replace++) {
6008 mem_base = xmlMemBlocks();
6009 type = gen_const_xmlChar_ptr(n_type, 0);
6010 orig = gen_const_xmlChar_ptr(n_orig, 1);
6011 replace = gen_const_xmlChar_ptr(n_replace, 2);
6013 ret_val = xmlCatalogAdd((const xmlChar *)type, (const xmlChar *)orig, (const xmlChar *)replace);
6014 desret_int(ret_val);
6016 des_const_xmlChar_ptr(n_type, (const xmlChar *)type, 0);
6017 des_const_xmlChar_ptr(n_orig, (const xmlChar *)orig, 1);
6018 des_const_xmlChar_ptr(n_replace, (const xmlChar *)replace, 2);
6019 xmlResetLastError();
6020 if (mem_base != xmlMemBlocks()) {
6021 printf("Leak of %d blocks found in xmlCatalogAdd",
6022 xmlMemBlocks() - mem_base);
6024 printf(" %d", n_type);
6025 printf(" %d", n_orig);
6026 printf(" %d", n_replace);
6040 test_xmlCatalogCleanup(void) {
6043 #if defined(LIBXML_CATALOG_ENABLED)
6046 xmlCatalogCleanup();
6048 xmlResetLastError();
6057 test_xmlCatalogConvert(void) {
6060 #if defined(LIBXML_CATALOG_ENABLED)
6064 ret_val = xmlCatalogConvert();
6065 desret_int(ret_val);
6067 xmlResetLastError();
6076 test_xmlCatalogDump(void) {
6079 #if defined(LIBXML_CATALOG_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
6081 FILE * out; /* the file. */
6084 for (n_out = 0;n_out < gen_nb_FILE_ptr;n_out++) {
6085 mem_base = xmlMemBlocks();
6086 out = gen_FILE_ptr(n_out, 0);
6088 xmlCatalogDump(out);
6090 des_FILE_ptr(n_out, out, 0);
6091 xmlResetLastError();
6092 if (mem_base != xmlMemBlocks()) {
6093 printf("Leak of %d blocks found in xmlCatalogDump",
6094 xmlMemBlocks() - mem_base);
6096 printf(" %d", n_out);
6108 test_xmlCatalogGetDefaults(void) {
6111 #if defined(LIBXML_CATALOG_ENABLED)
6113 xmlCatalogAllow ret_val;
6115 mem_base = xmlMemBlocks();
6117 ret_val = xmlCatalogGetDefaults();
6118 desret_xmlCatalogAllow(ret_val);
6120 xmlResetLastError();
6121 if (mem_base != xmlMemBlocks()) {
6122 printf("Leak of %d blocks found in xmlCatalogGetDefaults",
6123 xmlMemBlocks() - mem_base);
6135 test_xmlCatalogIsEmpty(void) {
6138 #if defined(LIBXML_CATALOG_ENABLED)
6141 xmlCatalogPtr catal; /* should this create an SGML catalog */
6144 for (n_catal = 0;n_catal < gen_nb_xmlCatalogPtr;n_catal++) {
6145 mem_base = xmlMemBlocks();
6146 catal = gen_xmlCatalogPtr(n_catal, 0);
6148 ret_val = xmlCatalogIsEmpty(catal);
6149 desret_int(ret_val);
6151 des_xmlCatalogPtr(n_catal, catal, 0);
6152 xmlResetLastError();
6153 if (mem_base != xmlMemBlocks()) {
6154 printf("Leak of %d blocks found in xmlCatalogIsEmpty",
6155 xmlMemBlocks() - mem_base);
6157 printf(" %d", n_catal);
6169 test_xmlCatalogLocalResolve(void) {
6172 #if defined(LIBXML_CATALOG_ENABLED)
6175 void * catalogs; /* a document's list of catalogs */
6177 xmlChar * pubID; /* the public ID string */
6179 xmlChar * sysID; /* the system ID string */
6182 for (n_catalogs = 0;n_catalogs < gen_nb_void_ptr;n_catalogs++) {
6183 for (n_pubID = 0;n_pubID < gen_nb_const_xmlChar_ptr;n_pubID++) {
6184 for (n_sysID = 0;n_sysID < gen_nb_const_xmlChar_ptr;n_sysID++) {
6185 mem_base = xmlMemBlocks();
6186 catalogs = gen_void_ptr(n_catalogs, 0);
6187 pubID = gen_const_xmlChar_ptr(n_pubID, 1);
6188 sysID = gen_const_xmlChar_ptr(n_sysID, 2);
6190 ret_val = xmlCatalogLocalResolve(catalogs, (const xmlChar *)pubID, (const xmlChar *)sysID);
6191 desret_xmlChar_ptr(ret_val);
6193 des_void_ptr(n_catalogs, catalogs, 0);
6194 des_const_xmlChar_ptr(n_pubID, (const xmlChar *)pubID, 1);
6195 des_const_xmlChar_ptr(n_sysID, (const xmlChar *)sysID, 2);
6196 xmlResetLastError();
6197 if (mem_base != xmlMemBlocks()) {
6198 printf("Leak of %d blocks found in xmlCatalogLocalResolve",
6199 xmlMemBlocks() - mem_base);
6201 printf(" %d", n_catalogs);
6202 printf(" %d", n_pubID);
6203 printf(" %d", n_sysID);
6217 test_xmlCatalogLocalResolveURI(void) {
6220 #if defined(LIBXML_CATALOG_ENABLED)
6223 void * catalogs; /* a document's list of catalogs */
6225 xmlChar * URI; /* the URI */
6228 for (n_catalogs = 0;n_catalogs < gen_nb_void_ptr;n_catalogs++) {
6229 for (n_URI = 0;n_URI < gen_nb_const_xmlChar_ptr;n_URI++) {
6230 mem_base = xmlMemBlocks();
6231 catalogs = gen_void_ptr(n_catalogs, 0);
6232 URI = gen_const_xmlChar_ptr(n_URI, 1);
6234 ret_val = xmlCatalogLocalResolveURI(catalogs, (const xmlChar *)URI);
6235 desret_xmlChar_ptr(ret_val);
6237 des_void_ptr(n_catalogs, catalogs, 0);
6238 des_const_xmlChar_ptr(n_URI, (const xmlChar *)URI, 1);
6239 xmlResetLastError();
6240 if (mem_base != xmlMemBlocks()) {
6241 printf("Leak of %d blocks found in xmlCatalogLocalResolveURI",
6242 xmlMemBlocks() - mem_base);
6244 printf(" %d", n_catalogs);
6245 printf(" %d", n_URI);
6258 test_xmlCatalogRemove(void) {
6261 #if defined(LIBXML_CATALOG_ENABLED)
6263 xmlChar * value; /* the value to remove */
6266 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
6267 value = gen_const_xmlChar_ptr(n_value, 0);
6269 ret_val = xmlCatalogRemove((const xmlChar *)value);
6270 desret_int(ret_val);
6272 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 0);
6273 xmlResetLastError();
6283 test_xmlCatalogResolve(void) {
6286 #if defined(LIBXML_CATALOG_ENABLED)
6288 xmlChar * pubID; /* the public ID string */
6290 xmlChar * sysID; /* the system ID string */
6293 for (n_pubID = 0;n_pubID < gen_nb_const_xmlChar_ptr;n_pubID++) {
6294 for (n_sysID = 0;n_sysID < gen_nb_const_xmlChar_ptr;n_sysID++) {
6295 pubID = gen_const_xmlChar_ptr(n_pubID, 0);
6296 sysID = gen_const_xmlChar_ptr(n_sysID, 1);
6298 ret_val = xmlCatalogResolve((const xmlChar *)pubID, (const xmlChar *)sysID);
6299 desret_xmlChar_ptr(ret_val);
6301 des_const_xmlChar_ptr(n_pubID, (const xmlChar *)pubID, 0);
6302 des_const_xmlChar_ptr(n_sysID, (const xmlChar *)sysID, 1);
6303 xmlResetLastError();
6314 test_xmlCatalogResolvePublic(void) {
6317 #if defined(LIBXML_CATALOG_ENABLED)
6320 xmlChar * pubID; /* the public ID string */
6323 for (n_pubID = 0;n_pubID < gen_nb_const_xmlChar_ptr;n_pubID++) {
6324 mem_base = xmlMemBlocks();
6325 pubID = gen_const_xmlChar_ptr(n_pubID, 0);
6327 ret_val = xmlCatalogResolvePublic((const xmlChar *)pubID);
6328 desret_xmlChar_ptr(ret_val);
6330 des_const_xmlChar_ptr(n_pubID, (const xmlChar *)pubID, 0);
6331 xmlResetLastError();
6332 if (mem_base != xmlMemBlocks()) {
6333 printf("Leak of %d blocks found in xmlCatalogResolvePublic",
6334 xmlMemBlocks() - mem_base);
6336 printf(" %d", n_pubID);
6348 test_xmlCatalogResolveSystem(void) {
6351 #if defined(LIBXML_CATALOG_ENABLED)
6354 xmlChar * sysID; /* the system ID string */
6357 for (n_sysID = 0;n_sysID < gen_nb_const_xmlChar_ptr;n_sysID++) {
6358 mem_base = xmlMemBlocks();
6359 sysID = gen_const_xmlChar_ptr(n_sysID, 0);
6361 ret_val = xmlCatalogResolveSystem((const xmlChar *)sysID);
6362 desret_xmlChar_ptr(ret_val);
6364 des_const_xmlChar_ptr(n_sysID, (const xmlChar *)sysID, 0);
6365 xmlResetLastError();
6366 if (mem_base != xmlMemBlocks()) {
6367 printf("Leak of %d blocks found in xmlCatalogResolveSystem",
6368 xmlMemBlocks() - mem_base);
6370 printf(" %d", n_sysID);
6382 test_xmlCatalogResolveURI(void) {
6385 #if defined(LIBXML_CATALOG_ENABLED)
6388 xmlChar * URI; /* the URI */
6391 for (n_URI = 0;n_URI < gen_nb_const_xmlChar_ptr;n_URI++) {
6392 mem_base = xmlMemBlocks();
6393 URI = gen_const_xmlChar_ptr(n_URI, 0);
6395 ret_val = xmlCatalogResolveURI((const xmlChar *)URI);
6396 desret_xmlChar_ptr(ret_val);
6398 des_const_xmlChar_ptr(n_URI, (const xmlChar *)URI, 0);
6399 xmlResetLastError();
6400 if (mem_base != xmlMemBlocks()) {
6401 printf("Leak of %d blocks found in xmlCatalogResolveURI",
6402 xmlMemBlocks() - mem_base);
6404 printf(" %d", n_URI);
6416 test_xmlCatalogSetDefaultPrefer(void) {
6419 #if defined(LIBXML_CATALOG_ENABLED)
6421 xmlCatalogPrefer ret_val;
6422 xmlCatalogPrefer prefer; /* the default preference for delegation */
6425 for (n_prefer = 0;n_prefer < gen_nb_xmlCatalogPrefer;n_prefer++) {
6426 mem_base = xmlMemBlocks();
6427 prefer = gen_xmlCatalogPrefer(n_prefer, 0);
6429 ret_val = xmlCatalogSetDefaultPrefer(prefer);
6430 desret_xmlCatalogPrefer(ret_val);
6432 des_xmlCatalogPrefer(n_prefer, prefer, 0);
6433 xmlResetLastError();
6434 if (mem_base != xmlMemBlocks()) {
6435 printf("Leak of %d blocks found in xmlCatalogSetDefaultPrefer",
6436 xmlMemBlocks() - mem_base);
6438 printf(" %d", n_prefer);
6450 test_xmlCatalogSetDefaults(void) {
6453 #if defined(LIBXML_CATALOG_ENABLED)
6455 xmlCatalogAllow allow; /* what catalogs should be accepted */
6458 for (n_allow = 0;n_allow < gen_nb_xmlCatalogAllow;n_allow++) {
6459 mem_base = xmlMemBlocks();
6460 allow = gen_xmlCatalogAllow(n_allow, 0);
6462 xmlCatalogSetDefaults(allow);
6464 des_xmlCatalogAllow(n_allow, allow, 0);
6465 xmlResetLastError();
6466 if (mem_base != xmlMemBlocks()) {
6467 printf("Leak of %d blocks found in xmlCatalogSetDefaults",
6468 xmlMemBlocks() - mem_base);
6470 printf(" %d", n_allow);
6482 test_xmlConvertSGMLCatalog(void) {
6485 #if defined(LIBXML_CATALOG_ENABLED)
6488 xmlCatalogPtr catal; /* the catalog */
6491 for (n_catal = 0;n_catal < gen_nb_xmlCatalogPtr;n_catal++) {
6492 mem_base = xmlMemBlocks();
6493 catal = gen_xmlCatalogPtr(n_catal, 0);
6495 ret_val = xmlConvertSGMLCatalog(catal);
6496 desret_int(ret_val);
6498 des_xmlCatalogPtr(n_catal, catal, 0);
6499 xmlResetLastError();
6500 if (mem_base != xmlMemBlocks()) {
6501 printf("Leak of %d blocks found in xmlConvertSGMLCatalog",
6502 xmlMemBlocks() - mem_base);
6504 printf(" %d", n_catal);
6516 test_xmlInitializeCatalog(void) {
6519 #if defined(LIBXML_CATALOG_ENABLED)
6522 mem_base = xmlMemBlocks();
6524 xmlInitializeCatalog();
6526 xmlResetLastError();
6527 if (mem_base != xmlMemBlocks()) {
6528 printf("Leak of %d blocks found in xmlInitializeCatalog",
6529 xmlMemBlocks() - mem_base);
6541 test_xmlLoadACatalog(void) {
6545 /* missing type support */
6551 test_xmlLoadCatalog(void) {
6554 #if defined(LIBXML_CATALOG_ENABLED)
6556 const char * filename; /* a file path */
6559 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
6560 filename = gen_filepath(n_filename, 0);
6562 ret_val = xmlLoadCatalog(filename);
6563 desret_int(ret_val);
6565 des_filepath(n_filename, filename, 0);
6566 xmlResetLastError();
6576 test_xmlLoadCatalogs(void) {
6579 #if defined(LIBXML_CATALOG_ENABLED)
6580 char * pathss; /* a list of directories separated by a colon or a space. */
6583 for (n_pathss = 0;n_pathss < gen_nb_const_char_ptr;n_pathss++) {
6584 pathss = gen_const_char_ptr(n_pathss, 0);
6586 xmlLoadCatalogs((const char *)pathss);
6588 des_const_char_ptr(n_pathss, (const char *)pathss, 0);
6589 xmlResetLastError();
6599 test_xmlLoadSGMLSuperCatalog(void) {
6603 /* missing type support */
6609 test_xmlNewCatalog(void) {
6613 /* missing type support */
6619 test_xmlParseCatalogFile(void) {
6622 #if defined(LIBXML_CATALOG_ENABLED)
6625 const char * filename; /* the filename */
6628 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
6629 mem_base = xmlMemBlocks();
6630 filename = gen_filepath(n_filename, 0);
6632 ret_val = xmlParseCatalogFile(filename);
6633 desret_xmlDocPtr(ret_val);
6635 des_filepath(n_filename, filename, 0);
6636 xmlResetLastError();
6637 if (mem_base != xmlMemBlocks()) {
6638 printf("Leak of %d blocks found in xmlParseCatalogFile",
6639 xmlMemBlocks() - mem_base);
6641 printf(" %d", n_filename);
6652 test_catalog(void) {
6656 if (quiet == 0) printf("Testing catalog : 27 of 36 functions ...\n");
6657 rc = test_xmlACatalogAdd();
6658 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6659 rc = test_xmlACatalogDump();
6660 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6661 rc = test_xmlACatalogRemove();
6662 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6663 rc = test_xmlACatalogResolve();
6664 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6665 rc = test_xmlACatalogResolvePublic();
6666 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6667 rc = test_xmlACatalogResolveSystem();
6668 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6669 rc = test_xmlACatalogResolveURI();
6670 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6671 rc = test_xmlCatalogAdd();
6672 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6673 rc = test_xmlCatalogCleanup();
6674 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6675 rc = test_xmlCatalogConvert();
6676 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6677 rc = test_xmlCatalogDump();
6678 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6679 rc = test_xmlCatalogGetDefaults();
6680 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6681 rc = test_xmlCatalogIsEmpty();
6682 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6683 rc = test_xmlCatalogLocalResolve();
6684 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6685 rc = test_xmlCatalogLocalResolveURI();
6686 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6687 rc = test_xmlCatalogRemove();
6688 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6689 rc = test_xmlCatalogResolve();
6690 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6691 rc = test_xmlCatalogResolvePublic();
6692 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6693 rc = test_xmlCatalogResolveSystem();
6694 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6695 rc = test_xmlCatalogResolveURI();
6696 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6697 rc = test_xmlCatalogSetDefaultPrefer();
6698 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6699 rc = test_xmlCatalogSetDefaults();
6700 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6701 rc = test_xmlConvertSGMLCatalog();
6702 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6703 rc = test_xmlInitializeCatalog();
6704 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6705 rc = test_xmlLoadACatalog();
6706 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6707 rc = test_xmlLoadCatalog();
6708 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6709 rc = test_xmlLoadCatalogs();
6710 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6711 rc = test_xmlLoadSGMLSuperCatalog();
6712 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6713 rc = test_xmlNewCatalog();
6714 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6715 rc = test_xmlParseCatalogFile();
6716 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
6719 printf("Module catalog: %d errors\n", test_ret);
6723 #define gen_nb_const_xmlChRangeGroup_ptr 1
6724 static xmlChRangeGroup * gen_const_xmlChRangeGroup_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
6727 static void des_const_xmlChRangeGroup_ptr(int no ATTRIBUTE_UNUSED, const xmlChRangeGroup * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
6731 test_xmlCharInRange(void) {
6736 unsigned int val; /* character to be validated */
6738 xmlChRangeGroup * rptr; /* pointer to range to be used to validate */
6741 for (n_val = 0;n_val < gen_nb_unsigned_int;n_val++) {
6742 for (n_rptr = 0;n_rptr < gen_nb_const_xmlChRangeGroup_ptr;n_rptr++) {
6743 mem_base = xmlMemBlocks();
6744 val = gen_unsigned_int(n_val, 0);
6745 rptr = gen_const_xmlChRangeGroup_ptr(n_rptr, 1);
6747 ret_val = xmlCharInRange(val, (const xmlChRangeGroup *)rptr);
6748 desret_int(ret_val);
6750 des_unsigned_int(n_val, val, 0);
6751 des_const_xmlChRangeGroup_ptr(n_rptr, (const xmlChRangeGroup *)rptr, 1);
6752 xmlResetLastError();
6753 if (mem_base != xmlMemBlocks()) {
6754 printf("Leak of %d blocks found in xmlCharInRange",
6755 xmlMemBlocks() - mem_base);
6757 printf(" %d", n_val);
6758 printf(" %d", n_rptr);
6770 test_xmlIsBaseChar(void) {
6775 unsigned int ch; /* character to validate */
6778 for (n_ch = 0;n_ch < gen_nb_unsigned_int;n_ch++) {
6779 mem_base = xmlMemBlocks();
6780 ch = gen_unsigned_int(n_ch, 0);
6782 ret_val = xmlIsBaseChar(ch);
6783 desret_int(ret_val);
6785 des_unsigned_int(n_ch, ch, 0);
6786 xmlResetLastError();
6787 if (mem_base != xmlMemBlocks()) {
6788 printf("Leak of %d blocks found in xmlIsBaseChar",
6789 xmlMemBlocks() - mem_base);
6791 printf(" %d", n_ch);
6802 test_xmlIsBlank(void) {
6807 unsigned int ch; /* character to validate */
6810 for (n_ch = 0;n_ch < gen_nb_unsigned_int;n_ch++) {
6811 mem_base = xmlMemBlocks();
6812 ch = gen_unsigned_int(n_ch, 0);
6814 ret_val = xmlIsBlank(ch);
6815 desret_int(ret_val);
6817 des_unsigned_int(n_ch, ch, 0);
6818 xmlResetLastError();
6819 if (mem_base != xmlMemBlocks()) {
6820 printf("Leak of %d blocks found in xmlIsBlank",
6821 xmlMemBlocks() - mem_base);
6823 printf(" %d", n_ch);
6834 test_xmlIsChar(void) {
6839 unsigned int ch; /* character to validate */
6842 for (n_ch = 0;n_ch < gen_nb_unsigned_int;n_ch++) {
6843 mem_base = xmlMemBlocks();
6844 ch = gen_unsigned_int(n_ch, 0);
6846 ret_val = xmlIsChar(ch);
6847 desret_int(ret_val);
6849 des_unsigned_int(n_ch, ch, 0);
6850 xmlResetLastError();
6851 if (mem_base != xmlMemBlocks()) {
6852 printf("Leak of %d blocks found in xmlIsChar",
6853 xmlMemBlocks() - mem_base);
6855 printf(" %d", n_ch);
6866 test_xmlIsCombining(void) {
6871 unsigned int ch; /* character to validate */
6874 for (n_ch = 0;n_ch < gen_nb_unsigned_int;n_ch++) {
6875 mem_base = xmlMemBlocks();
6876 ch = gen_unsigned_int(n_ch, 0);
6878 ret_val = xmlIsCombining(ch);
6879 desret_int(ret_val);
6881 des_unsigned_int(n_ch, ch, 0);
6882 xmlResetLastError();
6883 if (mem_base != xmlMemBlocks()) {
6884 printf("Leak of %d blocks found in xmlIsCombining",
6885 xmlMemBlocks() - mem_base);
6887 printf(" %d", n_ch);
6898 test_xmlIsDigit(void) {
6903 unsigned int ch; /* character to validate */
6906 for (n_ch = 0;n_ch < gen_nb_unsigned_int;n_ch++) {
6907 mem_base = xmlMemBlocks();
6908 ch = gen_unsigned_int(n_ch, 0);
6910 ret_val = xmlIsDigit(ch);
6911 desret_int(ret_val);
6913 des_unsigned_int(n_ch, ch, 0);
6914 xmlResetLastError();
6915 if (mem_base != xmlMemBlocks()) {
6916 printf("Leak of %d blocks found in xmlIsDigit",
6917 xmlMemBlocks() - mem_base);
6919 printf(" %d", n_ch);
6930 test_xmlIsExtender(void) {
6935 unsigned int ch; /* character to validate */
6938 for (n_ch = 0;n_ch < gen_nb_unsigned_int;n_ch++) {
6939 mem_base = xmlMemBlocks();
6940 ch = gen_unsigned_int(n_ch, 0);
6942 ret_val = xmlIsExtender(ch);
6943 desret_int(ret_val);
6945 des_unsigned_int(n_ch, ch, 0);
6946 xmlResetLastError();
6947 if (mem_base != xmlMemBlocks()) {
6948 printf("Leak of %d blocks found in xmlIsExtender",
6949 xmlMemBlocks() - mem_base);
6951 printf(" %d", n_ch);
6962 test_xmlIsIdeographic(void) {
6967 unsigned int ch; /* character to validate */
6970 for (n_ch = 0;n_ch < gen_nb_unsigned_int;n_ch++) {
6971 mem_base = xmlMemBlocks();
6972 ch = gen_unsigned_int(n_ch, 0);
6974 ret_val = xmlIsIdeographic(ch);
6975 desret_int(ret_val);
6977 des_unsigned_int(n_ch, ch, 0);
6978 xmlResetLastError();
6979 if (mem_base != xmlMemBlocks()) {
6980 printf("Leak of %d blocks found in xmlIsIdeographic",
6981 xmlMemBlocks() - mem_base);
6983 printf(" %d", n_ch);
6994 test_xmlIsPubidChar(void) {
6999 unsigned int ch; /* character to validate */
7002 for (n_ch = 0;n_ch < gen_nb_unsigned_int;n_ch++) {
7003 mem_base = xmlMemBlocks();
7004 ch = gen_unsigned_int(n_ch, 0);
7006 ret_val = xmlIsPubidChar(ch);
7007 desret_int(ret_val);
7009 des_unsigned_int(n_ch, ch, 0);
7010 xmlResetLastError();
7011 if (mem_base != xmlMemBlocks()) {
7012 printf("Leak of %d blocks found in xmlIsPubidChar",
7013 xmlMemBlocks() - mem_base);
7015 printf(" %d", n_ch);
7025 test_chvalid(void) {
7029 if (quiet == 0) printf("Testing chvalid : 9 of 9 functions ...\n");
7030 rc = test_xmlCharInRange();
7031 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
7032 rc = test_xmlIsBaseChar();
7033 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
7034 rc = test_xmlIsBlank();
7035 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
7036 rc = test_xmlIsChar();
7037 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
7038 rc = test_xmlIsCombining();
7039 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
7040 rc = test_xmlIsDigit();
7041 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
7042 rc = test_xmlIsExtender();
7043 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
7044 rc = test_xmlIsIdeographic();
7045 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
7046 rc = test_xmlIsPubidChar();
7047 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
7050 printf("Module chvalid: %d errors\n", test_ret);
7055 test_xmlBoolToText(void) {
7058 #if defined(LIBXML_DEBUG_ENABLED)
7060 const char * ret_val;
7061 int boolval; /* a bool to turn into text */
7064 for (n_boolval = 0;n_boolval < gen_nb_int;n_boolval++) {
7065 mem_base = xmlMemBlocks();
7066 boolval = gen_int(n_boolval, 0);
7068 ret_val = xmlBoolToText(boolval);
7069 desret_const_char_ptr(ret_val);
7071 des_int(n_boolval, boolval, 0);
7072 xmlResetLastError();
7073 if (mem_base != xmlMemBlocks()) {
7074 printf("Leak of %d blocks found in xmlBoolToText",
7075 xmlMemBlocks() - mem_base);
7077 printf(" %d", n_boolval);
7089 test_xmlDebugCheckDocument(void) {
7092 #if defined(LIBXML_DEBUG_ENABLED)
7095 FILE * output; /* the FILE * for the output */
7097 xmlDocPtr doc; /* the document */
7100 for (n_output = 0;n_output < gen_nb_debug_FILE_ptr;n_output++) {
7101 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
7102 mem_base = xmlMemBlocks();
7103 output = gen_debug_FILE_ptr(n_output, 0);
7104 doc = gen_xmlDocPtr(n_doc, 1);
7106 ret_val = xmlDebugCheckDocument(output, doc);
7107 desret_int(ret_val);
7109 des_debug_FILE_ptr(n_output, output, 0);
7110 des_xmlDocPtr(n_doc, doc, 1);
7111 xmlResetLastError();
7112 if (mem_base != xmlMemBlocks()) {
7113 printf("Leak of %d blocks found in xmlDebugCheckDocument",
7114 xmlMemBlocks() - mem_base);
7116 printf(" %d", n_output);
7117 printf(" %d", n_doc);
7130 test_xmlDebugDumpAttr(void) {
7133 #if defined(LIBXML_DEBUG_ENABLED)
7135 FILE * output; /* the FILE * for the output */
7137 xmlAttrPtr attr; /* the attribute */
7139 int depth; /* the indentation level. */
7142 for (n_output = 0;n_output < gen_nb_debug_FILE_ptr;n_output++) {
7143 for (n_attr = 0;n_attr < gen_nb_xmlAttrPtr;n_attr++) {
7144 for (n_depth = 0;n_depth < gen_nb_int;n_depth++) {
7145 mem_base = xmlMemBlocks();
7146 output = gen_debug_FILE_ptr(n_output, 0);
7147 attr = gen_xmlAttrPtr(n_attr, 1);
7148 depth = gen_int(n_depth, 2);
7150 xmlDebugDumpAttr(output, attr, depth);
7152 des_debug_FILE_ptr(n_output, output, 0);
7153 des_xmlAttrPtr(n_attr, attr, 1);
7154 des_int(n_depth, depth, 2);
7155 xmlResetLastError();
7156 if (mem_base != xmlMemBlocks()) {
7157 printf("Leak of %d blocks found in xmlDebugDumpAttr",
7158 xmlMemBlocks() - mem_base);
7160 printf(" %d", n_output);
7161 printf(" %d", n_attr);
7162 printf(" %d", n_depth);
7176 test_xmlDebugDumpAttrList(void) {
7179 #if defined(LIBXML_DEBUG_ENABLED)
7181 FILE * output; /* the FILE * for the output */
7183 xmlAttrPtr attr; /* the attribute list */
7185 int depth; /* the indentation level. */
7188 for (n_output = 0;n_output < gen_nb_debug_FILE_ptr;n_output++) {
7189 for (n_attr = 0;n_attr < gen_nb_xmlAttrPtr;n_attr++) {
7190 for (n_depth = 0;n_depth < gen_nb_int;n_depth++) {
7191 mem_base = xmlMemBlocks();
7192 output = gen_debug_FILE_ptr(n_output, 0);
7193 attr = gen_xmlAttrPtr(n_attr, 1);
7194 depth = gen_int(n_depth, 2);
7196 xmlDebugDumpAttrList(output, attr, depth);
7198 des_debug_FILE_ptr(n_output, output, 0);
7199 des_xmlAttrPtr(n_attr, attr, 1);
7200 des_int(n_depth, depth, 2);
7201 xmlResetLastError();
7202 if (mem_base != xmlMemBlocks()) {
7203 printf("Leak of %d blocks found in xmlDebugDumpAttrList",
7204 xmlMemBlocks() - mem_base);
7206 printf(" %d", n_output);
7207 printf(" %d", n_attr);
7208 printf(" %d", n_depth);
7222 test_xmlDebugDumpDTD(void) {
7225 #if defined(LIBXML_DEBUG_ENABLED)
7227 FILE * output; /* the FILE * for the output */
7229 xmlDtdPtr dtd; /* the DTD */
7232 for (n_output = 0;n_output < gen_nb_debug_FILE_ptr;n_output++) {
7233 for (n_dtd = 0;n_dtd < gen_nb_xmlDtdPtr;n_dtd++) {
7234 mem_base = xmlMemBlocks();
7235 output = gen_debug_FILE_ptr(n_output, 0);
7236 dtd = gen_xmlDtdPtr(n_dtd, 1);
7238 xmlDebugDumpDTD(output, dtd);
7240 des_debug_FILE_ptr(n_output, output, 0);
7241 des_xmlDtdPtr(n_dtd, dtd, 1);
7242 xmlResetLastError();
7243 if (mem_base != xmlMemBlocks()) {
7244 printf("Leak of %d blocks found in xmlDebugDumpDTD",
7245 xmlMemBlocks() - mem_base);
7247 printf(" %d", n_output);
7248 printf(" %d", n_dtd);
7261 test_xmlDebugDumpDocument(void) {
7264 #if defined(LIBXML_DEBUG_ENABLED)
7266 FILE * output; /* the FILE * for the output */
7268 xmlDocPtr doc; /* the document */
7271 for (n_output = 0;n_output < gen_nb_debug_FILE_ptr;n_output++) {
7272 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
7273 mem_base = xmlMemBlocks();
7274 output = gen_debug_FILE_ptr(n_output, 0);
7275 doc = gen_xmlDocPtr(n_doc, 1);
7277 xmlDebugDumpDocument(output, doc);
7279 des_debug_FILE_ptr(n_output, output, 0);
7280 des_xmlDocPtr(n_doc, doc, 1);
7281 xmlResetLastError();
7282 if (mem_base != xmlMemBlocks()) {
7283 printf("Leak of %d blocks found in xmlDebugDumpDocument",
7284 xmlMemBlocks() - mem_base);
7286 printf(" %d", n_output);
7287 printf(" %d", n_doc);
7300 test_xmlDebugDumpDocumentHead(void) {
7303 #if defined(LIBXML_DEBUG_ENABLED)
7305 FILE * output; /* the FILE * for the output */
7307 xmlDocPtr doc; /* the document */
7310 for (n_output = 0;n_output < gen_nb_debug_FILE_ptr;n_output++) {
7311 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
7312 mem_base = xmlMemBlocks();
7313 output = gen_debug_FILE_ptr(n_output, 0);
7314 doc = gen_xmlDocPtr(n_doc, 1);
7316 xmlDebugDumpDocumentHead(output, doc);
7318 des_debug_FILE_ptr(n_output, output, 0);
7319 des_xmlDocPtr(n_doc, doc, 1);
7320 xmlResetLastError();
7321 if (mem_base != xmlMemBlocks()) {
7322 printf("Leak of %d blocks found in xmlDebugDumpDocumentHead",
7323 xmlMemBlocks() - mem_base);
7325 printf(" %d", n_output);
7326 printf(" %d", n_doc);
7339 test_xmlDebugDumpEntities(void) {
7342 #if defined(LIBXML_DEBUG_ENABLED)
7344 FILE * output; /* the FILE * for the output */
7346 xmlDocPtr doc; /* the document */
7349 for (n_output = 0;n_output < gen_nb_debug_FILE_ptr;n_output++) {
7350 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
7351 mem_base = xmlMemBlocks();
7352 output = gen_debug_FILE_ptr(n_output, 0);
7353 doc = gen_xmlDocPtr(n_doc, 1);
7355 xmlDebugDumpEntities(output, doc);
7357 des_debug_FILE_ptr(n_output, output, 0);
7358 des_xmlDocPtr(n_doc, doc, 1);
7359 xmlResetLastError();
7360 if (mem_base != xmlMemBlocks()) {
7361 printf("Leak of %d blocks found in xmlDebugDumpEntities",
7362 xmlMemBlocks() - mem_base);
7364 printf(" %d", n_output);
7365 printf(" %d", n_doc);
7378 test_xmlDebugDumpNode(void) {
7381 #if defined(LIBXML_DEBUG_ENABLED)
7383 FILE * output; /* the FILE * for the output */
7385 xmlNodePtr node; /* the node */
7387 int depth; /* the indentation level. */
7390 for (n_output = 0;n_output < gen_nb_debug_FILE_ptr;n_output++) {
7391 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
7392 for (n_depth = 0;n_depth < gen_nb_int;n_depth++) {
7393 mem_base = xmlMemBlocks();
7394 output = gen_debug_FILE_ptr(n_output, 0);
7395 node = gen_xmlNodePtr(n_node, 1);
7396 depth = gen_int(n_depth, 2);
7398 xmlDebugDumpNode(output, node, depth);
7400 des_debug_FILE_ptr(n_output, output, 0);
7401 des_xmlNodePtr(n_node, node, 1);
7402 des_int(n_depth, depth, 2);
7403 xmlResetLastError();
7404 if (mem_base != xmlMemBlocks()) {
7405 printf("Leak of %d blocks found in xmlDebugDumpNode",
7406 xmlMemBlocks() - mem_base);
7408 printf(" %d", n_output);
7409 printf(" %d", n_node);
7410 printf(" %d", n_depth);
7424 test_xmlDebugDumpNodeList(void) {
7427 #if defined(LIBXML_DEBUG_ENABLED)
7429 FILE * output; /* the FILE * for the output */
7431 xmlNodePtr node; /* the node list */
7433 int depth; /* the indentation level. */
7436 for (n_output = 0;n_output < gen_nb_debug_FILE_ptr;n_output++) {
7437 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
7438 for (n_depth = 0;n_depth < gen_nb_int;n_depth++) {
7439 mem_base = xmlMemBlocks();
7440 output = gen_debug_FILE_ptr(n_output, 0);
7441 node = gen_xmlNodePtr(n_node, 1);
7442 depth = gen_int(n_depth, 2);
7444 xmlDebugDumpNodeList(output, node, depth);
7446 des_debug_FILE_ptr(n_output, output, 0);
7447 des_xmlNodePtr(n_node, node, 1);
7448 des_int(n_depth, depth, 2);
7449 xmlResetLastError();
7450 if (mem_base != xmlMemBlocks()) {
7451 printf("Leak of %d blocks found in xmlDebugDumpNodeList",
7452 xmlMemBlocks() - mem_base);
7454 printf(" %d", n_output);
7455 printf(" %d", n_node);
7456 printf(" %d", n_depth);
7470 test_xmlDebugDumpOneNode(void) {
7473 #if defined(LIBXML_DEBUG_ENABLED)
7475 FILE * output; /* the FILE * for the output */
7477 xmlNodePtr node; /* the node */
7479 int depth; /* the indentation level. */
7482 for (n_output = 0;n_output < gen_nb_debug_FILE_ptr;n_output++) {
7483 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
7484 for (n_depth = 0;n_depth < gen_nb_int;n_depth++) {
7485 mem_base = xmlMemBlocks();
7486 output = gen_debug_FILE_ptr(n_output, 0);
7487 node = gen_xmlNodePtr(n_node, 1);
7488 depth = gen_int(n_depth, 2);
7490 xmlDebugDumpOneNode(output, node, depth);
7492 des_debug_FILE_ptr(n_output, output, 0);
7493 des_xmlNodePtr(n_node, node, 1);
7494 des_int(n_depth, depth, 2);
7495 xmlResetLastError();
7496 if (mem_base != xmlMemBlocks()) {
7497 printf("Leak of %d blocks found in xmlDebugDumpOneNode",
7498 xmlMemBlocks() - mem_base);
7500 printf(" %d", n_output);
7501 printf(" %d", n_node);
7502 printf(" %d", n_depth);
7516 test_xmlDebugDumpString(void) {
7519 #if defined(LIBXML_DEBUG_ENABLED)
7521 FILE * output; /* the FILE * for the output */
7523 xmlChar * str; /* the string */
7526 for (n_output = 0;n_output < gen_nb_debug_FILE_ptr;n_output++) {
7527 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
7528 mem_base = xmlMemBlocks();
7529 output = gen_debug_FILE_ptr(n_output, 0);
7530 str = gen_const_xmlChar_ptr(n_str, 1);
7532 xmlDebugDumpString(output, (const xmlChar *)str);
7534 des_debug_FILE_ptr(n_output, output, 0);
7535 des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 1);
7536 xmlResetLastError();
7537 if (mem_base != xmlMemBlocks()) {
7538 printf("Leak of %d blocks found in xmlDebugDumpString",
7539 xmlMemBlocks() - mem_base);
7541 printf(" %d", n_output);
7542 printf(" %d", n_str);
7555 test_xmlLsCountNode(void) {
7558 #if defined(LIBXML_DEBUG_ENABLED)
7561 xmlNodePtr node; /* the node to count */
7564 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
7565 mem_base = xmlMemBlocks();
7566 node = gen_xmlNodePtr(n_node, 0);
7568 ret_val = xmlLsCountNode(node);
7569 desret_int(ret_val);
7571 des_xmlNodePtr(n_node, node, 0);
7572 xmlResetLastError();
7573 if (mem_base != xmlMemBlocks()) {
7574 printf("Leak of %d blocks found in xmlLsCountNode",
7575 xmlMemBlocks() - mem_base);
7577 printf(" %d", n_node);
7589 test_xmlLsOneNode(void) {
7592 #if defined(LIBXML_DEBUG_ENABLED)
7594 FILE * output; /* the FILE * for the output */
7596 xmlNodePtr node; /* the node to dump */
7599 for (n_output = 0;n_output < gen_nb_debug_FILE_ptr;n_output++) {
7600 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
7601 mem_base = xmlMemBlocks();
7602 output = gen_debug_FILE_ptr(n_output, 0);
7603 node = gen_xmlNodePtr(n_node, 1);
7605 xmlLsOneNode(output, node);
7607 des_debug_FILE_ptr(n_output, output, 0);
7608 des_xmlNodePtr(n_node, node, 1);
7609 xmlResetLastError();
7610 if (mem_base != xmlMemBlocks()) {
7611 printf("Leak of %d blocks found in xmlLsOneNode",
7612 xmlMemBlocks() - mem_base);
7614 printf(" %d", n_output);
7615 printf(" %d", n_node);
7627 #define gen_nb_char_ptr 1
7628 static char * gen_char_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
7631 static void des_char_ptr(int no ATTRIBUTE_UNUSED, char * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
7635 test_xmlShell(void) {
7639 /* missing type support */
7645 test_xmlShellBase(void) {
7648 #if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED)
7651 xmlShellCtxtPtr ctxt; /* the shell context */
7653 char * arg; /* unused */
7655 xmlNodePtr node; /* a node */
7657 xmlNodePtr node2; /* unused */
7660 for (n_ctxt = 0;n_ctxt < gen_nb_xmlShellCtxtPtr;n_ctxt++) {
7661 for (n_arg = 0;n_arg < gen_nb_char_ptr;n_arg++) {
7662 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
7663 for (n_node2 = 0;n_node2 < gen_nb_xmlNodePtr;n_node2++) {
7664 mem_base = xmlMemBlocks();
7665 ctxt = gen_xmlShellCtxtPtr(n_ctxt, 0);
7666 arg = gen_char_ptr(n_arg, 1);
7667 node = gen_xmlNodePtr(n_node, 2);
7668 node2 = gen_xmlNodePtr(n_node2, 3);
7670 ret_val = xmlShellBase(ctxt, arg, node, node2);
7671 desret_int(ret_val);
7673 des_xmlShellCtxtPtr(n_ctxt, ctxt, 0);
7674 des_char_ptr(n_arg, arg, 1);
7675 des_xmlNodePtr(n_node, node, 2);
7676 des_xmlNodePtr(n_node2, node2, 3);
7677 xmlResetLastError();
7678 if (mem_base != xmlMemBlocks()) {
7679 printf("Leak of %d blocks found in xmlShellBase",
7680 xmlMemBlocks() - mem_base);
7682 printf(" %d", n_ctxt);
7683 printf(" %d", n_arg);
7684 printf(" %d", n_node);
7685 printf(" %d", n_node2);
7700 test_xmlShellCat(void) {
7703 #if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
7706 xmlShellCtxtPtr ctxt; /* the shell context */
7708 char * arg; /* unused */
7710 xmlNodePtr node; /* a node */
7712 xmlNodePtr node2; /* unused */
7715 for (n_ctxt = 0;n_ctxt < gen_nb_xmlShellCtxtPtr;n_ctxt++) {
7716 for (n_arg = 0;n_arg < gen_nb_char_ptr;n_arg++) {
7717 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
7718 for (n_node2 = 0;n_node2 < gen_nb_xmlNodePtr;n_node2++) {
7719 mem_base = xmlMemBlocks();
7720 ctxt = gen_xmlShellCtxtPtr(n_ctxt, 0);
7721 arg = gen_char_ptr(n_arg, 1);
7722 node = gen_xmlNodePtr(n_node, 2);
7723 node2 = gen_xmlNodePtr(n_node2, 3);
7725 ret_val = xmlShellCat(ctxt, arg, node, node2);
7726 desret_int(ret_val);
7728 des_xmlShellCtxtPtr(n_ctxt, ctxt, 0);
7729 des_char_ptr(n_arg, arg, 1);
7730 des_xmlNodePtr(n_node, node, 2);
7731 des_xmlNodePtr(n_node2, node2, 3);
7732 xmlResetLastError();
7733 if (mem_base != xmlMemBlocks()) {
7734 printf("Leak of %d blocks found in xmlShellCat",
7735 xmlMemBlocks() - mem_base);
7737 printf(" %d", n_ctxt);
7738 printf(" %d", n_arg);
7739 printf(" %d", n_node);
7740 printf(" %d", n_node2);
7755 test_xmlShellDir(void) {
7758 #if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED)
7761 xmlShellCtxtPtr ctxt; /* the shell context */
7763 char * arg; /* unused */
7765 xmlNodePtr node; /* a node */
7767 xmlNodePtr node2; /* unused */
7770 for (n_ctxt = 0;n_ctxt < gen_nb_xmlShellCtxtPtr;n_ctxt++) {
7771 for (n_arg = 0;n_arg < gen_nb_char_ptr;n_arg++) {
7772 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
7773 for (n_node2 = 0;n_node2 < gen_nb_xmlNodePtr;n_node2++) {
7774 mem_base = xmlMemBlocks();
7775 ctxt = gen_xmlShellCtxtPtr(n_ctxt, 0);
7776 arg = gen_char_ptr(n_arg, 1);
7777 node = gen_xmlNodePtr(n_node, 2);
7778 node2 = gen_xmlNodePtr(n_node2, 3);
7780 ret_val = xmlShellDir(ctxt, arg, node, node2);
7781 desret_int(ret_val);
7783 des_xmlShellCtxtPtr(n_ctxt, ctxt, 0);
7784 des_char_ptr(n_arg, arg, 1);
7785 des_xmlNodePtr(n_node, node, 2);
7786 des_xmlNodePtr(n_node2, node2, 3);
7787 xmlResetLastError();
7788 if (mem_base != xmlMemBlocks()) {
7789 printf("Leak of %d blocks found in xmlShellDir",
7790 xmlMemBlocks() - mem_base);
7792 printf(" %d", n_ctxt);
7793 printf(" %d", n_arg);
7794 printf(" %d", n_node);
7795 printf(" %d", n_node2);
7810 test_xmlShellDu(void) {
7813 #if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED)
7816 xmlShellCtxtPtr ctxt; /* the shell context */
7818 char * arg; /* unused */
7820 xmlNodePtr tree; /* a node defining a subtree */
7822 xmlNodePtr node2; /* unused */
7825 for (n_ctxt = 0;n_ctxt < gen_nb_xmlShellCtxtPtr;n_ctxt++) {
7826 for (n_arg = 0;n_arg < gen_nb_char_ptr;n_arg++) {
7827 for (n_tree = 0;n_tree < gen_nb_xmlNodePtr;n_tree++) {
7828 for (n_node2 = 0;n_node2 < gen_nb_xmlNodePtr;n_node2++) {
7829 mem_base = xmlMemBlocks();
7830 ctxt = gen_xmlShellCtxtPtr(n_ctxt, 0);
7831 arg = gen_char_ptr(n_arg, 1);
7832 tree = gen_xmlNodePtr(n_tree, 2);
7833 node2 = gen_xmlNodePtr(n_node2, 3);
7835 ret_val = xmlShellDu(ctxt, arg, tree, node2);
7836 desret_int(ret_val);
7838 des_xmlShellCtxtPtr(n_ctxt, ctxt, 0);
7839 des_char_ptr(n_arg, arg, 1);
7840 des_xmlNodePtr(n_tree, tree, 2);
7841 des_xmlNodePtr(n_node2, node2, 3);
7842 xmlResetLastError();
7843 if (mem_base != xmlMemBlocks()) {
7844 printf("Leak of %d blocks found in xmlShellDu",
7845 xmlMemBlocks() - mem_base);
7847 printf(" %d", n_ctxt);
7848 printf(" %d", n_arg);
7849 printf(" %d", n_tree);
7850 printf(" %d", n_node2);
7865 test_xmlShellList(void) {
7868 #if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED)
7871 xmlShellCtxtPtr ctxt; /* the shell context */
7873 char * arg; /* unused */
7875 xmlNodePtr node; /* a node */
7877 xmlNodePtr node2; /* unused */
7880 for (n_ctxt = 0;n_ctxt < gen_nb_xmlShellCtxtPtr;n_ctxt++) {
7881 for (n_arg = 0;n_arg < gen_nb_char_ptr;n_arg++) {
7882 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
7883 for (n_node2 = 0;n_node2 < gen_nb_xmlNodePtr;n_node2++) {
7884 mem_base = xmlMemBlocks();
7885 ctxt = gen_xmlShellCtxtPtr(n_ctxt, 0);
7886 arg = gen_char_ptr(n_arg, 1);
7887 node = gen_xmlNodePtr(n_node, 2);
7888 node2 = gen_xmlNodePtr(n_node2, 3);
7890 ret_val = xmlShellList(ctxt, arg, node, node2);
7891 desret_int(ret_val);
7893 des_xmlShellCtxtPtr(n_ctxt, ctxt, 0);
7894 des_char_ptr(n_arg, arg, 1);
7895 des_xmlNodePtr(n_node, node, 2);
7896 des_xmlNodePtr(n_node2, node2, 3);
7897 xmlResetLastError();
7898 if (mem_base != xmlMemBlocks()) {
7899 printf("Leak of %d blocks found in xmlShellList",
7900 xmlMemBlocks() - mem_base);
7902 printf(" %d", n_ctxt);
7903 printf(" %d", n_arg);
7904 printf(" %d", n_node);
7905 printf(" %d", n_node2);
7920 test_xmlShellLoad(void) {
7923 #if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED)
7926 xmlShellCtxtPtr ctxt; /* the shell context */
7928 char * filename; /* the file name */
7930 xmlNodePtr node; /* unused */
7932 xmlNodePtr node2; /* unused */
7935 for (n_ctxt = 0;n_ctxt < gen_nb_xmlShellCtxtPtr;n_ctxt++) {
7936 for (n_filename = 0;n_filename < gen_nb_char_ptr;n_filename++) {
7937 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
7938 for (n_node2 = 0;n_node2 < gen_nb_xmlNodePtr;n_node2++) {
7939 mem_base = xmlMemBlocks();
7940 ctxt = gen_xmlShellCtxtPtr(n_ctxt, 0);
7941 filename = gen_char_ptr(n_filename, 1);
7942 node = gen_xmlNodePtr(n_node, 2);
7943 node2 = gen_xmlNodePtr(n_node2, 3);
7945 ret_val = xmlShellLoad(ctxt, filename, node, node2);
7946 desret_int(ret_val);
7948 des_xmlShellCtxtPtr(n_ctxt, ctxt, 0);
7949 des_char_ptr(n_filename, filename, 1);
7950 des_xmlNodePtr(n_node, node, 2);
7951 des_xmlNodePtr(n_node2, node2, 3);
7952 xmlResetLastError();
7953 if (mem_base != xmlMemBlocks()) {
7954 printf("Leak of %d blocks found in xmlShellLoad",
7955 xmlMemBlocks() - mem_base);
7957 printf(" %d", n_ctxt);
7958 printf(" %d", n_filename);
7959 printf(" %d", n_node);
7960 printf(" %d", n_node2);
7975 test_xmlShellPrintXPathResult(void) {
7978 #if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED)
7980 xmlXPathObjectPtr list; /* a valid result generated by an xpath evaluation */
7983 for (n_list = 0;n_list < gen_nb_xmlXPathObjectPtr;n_list++) {
7984 mem_base = xmlMemBlocks();
7985 list = gen_xmlXPathObjectPtr(n_list, 0);
7987 xmlShellPrintXPathResult(list);
7989 des_xmlXPathObjectPtr(n_list, list, 0);
7990 xmlResetLastError();
7991 if (mem_base != xmlMemBlocks()) {
7992 printf("Leak of %d blocks found in xmlShellPrintXPathResult",
7993 xmlMemBlocks() - mem_base);
7995 printf(" %d", n_list);
8007 test_xmlShellPwd(void) {
8010 #if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED)
8013 xmlShellCtxtPtr ctxt; /* the shell context */
8015 char * buffer; /* the output buffer */
8017 xmlNodePtr node; /* a node */
8019 xmlNodePtr node2; /* unused */
8022 for (n_ctxt = 0;n_ctxt < gen_nb_xmlShellCtxtPtr;n_ctxt++) {
8023 for (n_buffer = 0;n_buffer < gen_nb_char_ptr;n_buffer++) {
8024 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
8025 for (n_node2 = 0;n_node2 < gen_nb_xmlNodePtr;n_node2++) {
8026 mem_base = xmlMemBlocks();
8027 ctxt = gen_xmlShellCtxtPtr(n_ctxt, 0);
8028 buffer = gen_char_ptr(n_buffer, 1);
8029 node = gen_xmlNodePtr(n_node, 2);
8030 node2 = gen_xmlNodePtr(n_node2, 3);
8032 ret_val = xmlShellPwd(ctxt, buffer, node, node2);
8033 desret_int(ret_val);
8035 des_xmlShellCtxtPtr(n_ctxt, ctxt, 0);
8036 des_char_ptr(n_buffer, buffer, 1);
8037 des_xmlNodePtr(n_node, node, 2);
8038 des_xmlNodePtr(n_node2, node2, 3);
8039 xmlResetLastError();
8040 if (mem_base != xmlMemBlocks()) {
8041 printf("Leak of %d blocks found in xmlShellPwd",
8042 xmlMemBlocks() - mem_base);
8044 printf(" %d", n_ctxt);
8045 printf(" %d", n_buffer);
8046 printf(" %d", n_node);
8047 printf(" %d", n_node2);
8062 test_xmlShellSave(void) {
8065 #if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
8068 xmlShellCtxtPtr ctxt; /* the shell context */
8070 char * filename; /* the file name (optional) */
8072 xmlNodePtr node; /* unused */
8074 xmlNodePtr node2; /* unused */
8077 for (n_ctxt = 0;n_ctxt < gen_nb_xmlShellCtxtPtr;n_ctxt++) {
8078 for (n_filename = 0;n_filename < gen_nb_char_ptr;n_filename++) {
8079 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
8080 for (n_node2 = 0;n_node2 < gen_nb_xmlNodePtr;n_node2++) {
8081 mem_base = xmlMemBlocks();
8082 ctxt = gen_xmlShellCtxtPtr(n_ctxt, 0);
8083 filename = gen_char_ptr(n_filename, 1);
8084 node = gen_xmlNodePtr(n_node, 2);
8085 node2 = gen_xmlNodePtr(n_node2, 3);
8087 ret_val = xmlShellSave(ctxt, filename, node, node2);
8088 desret_int(ret_val);
8090 des_xmlShellCtxtPtr(n_ctxt, ctxt, 0);
8091 des_char_ptr(n_filename, filename, 1);
8092 des_xmlNodePtr(n_node, node, 2);
8093 des_xmlNodePtr(n_node2, node2, 3);
8094 xmlResetLastError();
8095 if (mem_base != xmlMemBlocks()) {
8096 printf("Leak of %d blocks found in xmlShellSave",
8097 xmlMemBlocks() - mem_base);
8099 printf(" %d", n_ctxt);
8100 printf(" %d", n_filename);
8101 printf(" %d", n_node);
8102 printf(" %d", n_node2);
8117 test_xmlShellValidate(void) {
8120 #if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_VALID_ENABLED)
8123 xmlShellCtxtPtr ctxt; /* the shell context */
8125 char * dtd; /* the DTD URI (optional) */
8127 xmlNodePtr node; /* unused */
8129 xmlNodePtr node2; /* unused */
8132 for (n_ctxt = 0;n_ctxt < gen_nb_xmlShellCtxtPtr;n_ctxt++) {
8133 for (n_dtd = 0;n_dtd < gen_nb_char_ptr;n_dtd++) {
8134 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
8135 for (n_node2 = 0;n_node2 < gen_nb_xmlNodePtr;n_node2++) {
8136 mem_base = xmlMemBlocks();
8137 ctxt = gen_xmlShellCtxtPtr(n_ctxt, 0);
8138 dtd = gen_char_ptr(n_dtd, 1);
8139 node = gen_xmlNodePtr(n_node, 2);
8140 node2 = gen_xmlNodePtr(n_node2, 3);
8142 ret_val = xmlShellValidate(ctxt, dtd, node, node2);
8143 desret_int(ret_val);
8145 des_xmlShellCtxtPtr(n_ctxt, ctxt, 0);
8146 des_char_ptr(n_dtd, dtd, 1);
8147 des_xmlNodePtr(n_node, node, 2);
8148 des_xmlNodePtr(n_node2, node2, 3);
8149 xmlResetLastError();
8150 if (mem_base != xmlMemBlocks()) {
8151 printf("Leak of %d blocks found in xmlShellValidate",
8152 xmlMemBlocks() - mem_base);
8154 printf(" %d", n_ctxt);
8155 printf(" %d", n_dtd);
8156 printf(" %d", n_node);
8157 printf(" %d", n_node2);
8172 test_xmlShellWrite(void) {
8175 #if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
8178 xmlShellCtxtPtr ctxt; /* the shell context */
8180 char * filename; /* the file name */
8182 xmlNodePtr node; /* a node in the tree */
8184 xmlNodePtr node2; /* unused */
8187 for (n_ctxt = 0;n_ctxt < gen_nb_xmlShellCtxtPtr;n_ctxt++) {
8188 for (n_filename = 0;n_filename < gen_nb_char_ptr;n_filename++) {
8189 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
8190 for (n_node2 = 0;n_node2 < gen_nb_xmlNodePtr;n_node2++) {
8191 mem_base = xmlMemBlocks();
8192 ctxt = gen_xmlShellCtxtPtr(n_ctxt, 0);
8193 filename = gen_char_ptr(n_filename, 1);
8194 node = gen_xmlNodePtr(n_node, 2);
8195 node2 = gen_xmlNodePtr(n_node2, 3);
8197 ret_val = xmlShellWrite(ctxt, filename, node, node2);
8198 desret_int(ret_val);
8200 des_xmlShellCtxtPtr(n_ctxt, ctxt, 0);
8201 des_char_ptr(n_filename, filename, 1);
8202 des_xmlNodePtr(n_node, node, 2);
8203 des_xmlNodePtr(n_node2, node2, 3);
8204 xmlResetLastError();
8205 if (mem_base != xmlMemBlocks()) {
8206 printf("Leak of %d blocks found in xmlShellWrite",
8207 xmlMemBlocks() - mem_base);
8209 printf(" %d", n_ctxt);
8210 printf(" %d", n_filename);
8211 printf(" %d", n_node);
8212 printf(" %d", n_node2);
8226 test_debugXML(void) {
8230 if (quiet == 0) printf("Testing debugXML : 25 of 28 functions ...\n");
8231 rc = test_xmlBoolToText();
8232 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8233 rc = test_xmlDebugCheckDocument();
8234 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8235 rc = test_xmlDebugDumpAttr();
8236 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8237 rc = test_xmlDebugDumpAttrList();
8238 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8239 rc = test_xmlDebugDumpDTD();
8240 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8241 rc = test_xmlDebugDumpDocument();
8242 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8243 rc = test_xmlDebugDumpDocumentHead();
8244 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8245 rc = test_xmlDebugDumpEntities();
8246 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8247 rc = test_xmlDebugDumpNode();
8248 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8249 rc = test_xmlDebugDumpNodeList();
8250 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8251 rc = test_xmlDebugDumpOneNode();
8252 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8253 rc = test_xmlDebugDumpString();
8254 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8255 rc = test_xmlLsCountNode();
8256 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8257 rc = test_xmlLsOneNode();
8258 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8259 rc = test_xmlShell();
8260 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8261 rc = test_xmlShellBase();
8262 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8263 rc = test_xmlShellCat();
8264 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8265 rc = test_xmlShellDir();
8266 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8267 rc = test_xmlShellDu();
8268 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8269 rc = test_xmlShellList();
8270 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8271 rc = test_xmlShellLoad();
8272 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8273 rc = test_xmlShellPrintXPathResult();
8274 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8275 rc = test_xmlShellPwd();
8276 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8277 rc = test_xmlShellSave();
8278 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8279 rc = test_xmlShellValidate();
8280 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8281 rc = test_xmlShellWrite();
8282 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8285 printf("Module debugXML: %d errors\n", test_ret);
8290 test_xmlDictCleanup(void) {
8295 mem_base = xmlMemBlocks();
8299 xmlResetLastError();
8300 if (mem_base != xmlMemBlocks()) {
8301 printf("Leak of %d blocks found in xmlDictCleanup",
8302 xmlMemBlocks() - mem_base);
8313 test_xmlDictCreate(void) {
8319 mem_base = xmlMemBlocks();
8321 ret_val = xmlDictCreate();
8322 desret_xmlDictPtr(ret_val);
8324 xmlResetLastError();
8325 if (mem_base != xmlMemBlocks()) {
8326 printf("Leak of %d blocks found in xmlDictCreate",
8327 xmlMemBlocks() - mem_base);
8338 test_xmlDictCreateSub(void) {
8343 xmlDictPtr sub; /* an existing dictionary */
8346 for (n_sub = 0;n_sub < gen_nb_xmlDictPtr;n_sub++) {
8347 mem_base = xmlMemBlocks();
8348 sub = gen_xmlDictPtr(n_sub, 0);
8350 ret_val = xmlDictCreateSub(sub);
8351 desret_xmlDictPtr(ret_val);
8353 des_xmlDictPtr(n_sub, sub, 0);
8354 xmlResetLastError();
8355 if (mem_base != xmlMemBlocks()) {
8356 printf("Leak of %d blocks found in xmlDictCreateSub",
8357 xmlMemBlocks() - mem_base);
8359 printf(" %d", n_sub);
8370 test_xmlDictExists(void) {
8374 const xmlChar * ret_val;
8375 xmlDictPtr dict; /* the dictionary */
8377 xmlChar * name; /* the name of the userdata */
8379 int len; /* the length of the name, if -1 it is recomputed */
8382 for (n_dict = 0;n_dict < gen_nb_xmlDictPtr;n_dict++) {
8383 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
8384 for (n_len = 0;n_len < gen_nb_int;n_len++) {
8385 mem_base = xmlMemBlocks();
8386 dict = gen_xmlDictPtr(n_dict, 0);
8387 name = gen_const_xmlChar_ptr(n_name, 1);
8388 len = gen_int(n_len, 2);
8390 ret_val = xmlDictExists(dict, (const xmlChar *)name, len);
8391 desret_const_xmlChar_ptr(ret_val);
8393 des_xmlDictPtr(n_dict, dict, 0);
8394 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
8395 des_int(n_len, len, 2);
8396 xmlResetLastError();
8397 if (mem_base != xmlMemBlocks()) {
8398 printf("Leak of %d blocks found in xmlDictExists",
8399 xmlMemBlocks() - mem_base);
8401 printf(" %d", n_dict);
8402 printf(" %d", n_name);
8403 printf(" %d", n_len);
8416 test_xmlDictGetUsage(void) {
8420 /* missing type support */
8426 test_xmlDictLookup(void) {
8430 const xmlChar * ret_val;
8431 xmlDictPtr dict; /* the dictionary */
8433 xmlChar * name; /* the name of the userdata */
8435 int len; /* the length of the name, if -1 it is recomputed */
8438 for (n_dict = 0;n_dict < gen_nb_xmlDictPtr;n_dict++) {
8439 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
8440 for (n_len = 0;n_len < gen_nb_int;n_len++) {
8441 mem_base = xmlMemBlocks();
8442 dict = gen_xmlDictPtr(n_dict, 0);
8443 name = gen_const_xmlChar_ptr(n_name, 1);
8444 len = gen_int(n_len, 2);
8446 ret_val = xmlDictLookup(dict, (const xmlChar *)name, len);
8447 desret_const_xmlChar_ptr(ret_val);
8449 des_xmlDictPtr(n_dict, dict, 0);
8450 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
8451 des_int(n_len, len, 2);
8452 xmlResetLastError();
8453 if (mem_base != xmlMemBlocks()) {
8454 printf("Leak of %d blocks found in xmlDictLookup",
8455 xmlMemBlocks() - mem_base);
8457 printf(" %d", n_dict);
8458 printf(" %d", n_name);
8459 printf(" %d", n_len);
8472 test_xmlDictOwns(void) {
8477 xmlDictPtr dict; /* the dictionary */
8479 xmlChar * str; /* the string */
8482 for (n_dict = 0;n_dict < gen_nb_xmlDictPtr;n_dict++) {
8483 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
8484 mem_base = xmlMemBlocks();
8485 dict = gen_xmlDictPtr(n_dict, 0);
8486 str = gen_const_xmlChar_ptr(n_str, 1);
8488 ret_val = xmlDictOwns(dict, (const xmlChar *)str);
8489 desret_int(ret_val);
8491 des_xmlDictPtr(n_dict, dict, 0);
8492 des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 1);
8493 xmlResetLastError();
8494 if (mem_base != xmlMemBlocks()) {
8495 printf("Leak of %d blocks found in xmlDictOwns",
8496 xmlMemBlocks() - mem_base);
8498 printf(" %d", n_dict);
8499 printf(" %d", n_str);
8511 test_xmlDictQLookup(void) {
8515 const xmlChar * ret_val;
8516 xmlDictPtr dict; /* the dictionary */
8518 xmlChar * prefix; /* the prefix */
8520 xmlChar * name; /* the name */
8523 for (n_dict = 0;n_dict < gen_nb_xmlDictPtr;n_dict++) {
8524 for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
8525 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
8526 mem_base = xmlMemBlocks();
8527 dict = gen_xmlDictPtr(n_dict, 0);
8528 prefix = gen_const_xmlChar_ptr(n_prefix, 1);
8529 name = gen_const_xmlChar_ptr(n_name, 2);
8531 ret_val = xmlDictQLookup(dict, (const xmlChar *)prefix, (const xmlChar *)name);
8532 desret_const_xmlChar_ptr(ret_val);
8534 des_xmlDictPtr(n_dict, dict, 0);
8535 des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 1);
8536 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
8537 xmlResetLastError();
8538 if (mem_base != xmlMemBlocks()) {
8539 printf("Leak of %d blocks found in xmlDictQLookup",
8540 xmlMemBlocks() - mem_base);
8542 printf(" %d", n_dict);
8543 printf(" %d", n_prefix);
8544 printf(" %d", n_name);
8557 test_xmlDictReference(void) {
8562 xmlDictPtr dict; /* the dictionary */
8565 for (n_dict = 0;n_dict < gen_nb_xmlDictPtr;n_dict++) {
8566 mem_base = xmlMemBlocks();
8567 dict = gen_xmlDictPtr(n_dict, 0);
8569 ret_val = xmlDictReference(dict);
8571 desret_int(ret_val);
8573 des_xmlDictPtr(n_dict, dict, 0);
8574 xmlResetLastError();
8575 if (mem_base != xmlMemBlocks()) {
8576 printf("Leak of %d blocks found in xmlDictReference",
8577 xmlMemBlocks() - mem_base);
8579 printf(" %d", n_dict);
8590 test_xmlDictSetLimit(void) {
8594 /* missing type support */
8600 test_xmlDictSize(void) {
8605 xmlDictPtr dict; /* the dictionary */
8608 for (n_dict = 0;n_dict < gen_nb_xmlDictPtr;n_dict++) {
8609 mem_base = xmlMemBlocks();
8610 dict = gen_xmlDictPtr(n_dict, 0);
8612 ret_val = xmlDictSize(dict);
8613 desret_int(ret_val);
8615 des_xmlDictPtr(n_dict, dict, 0);
8616 xmlResetLastError();
8617 if (mem_base != xmlMemBlocks()) {
8618 printf("Leak of %d blocks found in xmlDictSize",
8619 xmlMemBlocks() - mem_base);
8621 printf(" %d", n_dict);
8632 test_xmlInitializeDict(void) {
8638 mem_base = xmlMemBlocks();
8640 ret_val = xmlInitializeDict();
8641 desret_int(ret_val);
8643 xmlResetLastError();
8644 if (mem_base != xmlMemBlocks()) {
8645 printf("Leak of %d blocks found in xmlInitializeDict",
8646 xmlMemBlocks() - mem_base);
8660 if (quiet == 0) printf("Testing dict : 10 of 13 functions ...\n");
8661 rc = test_xmlDictCleanup();
8662 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8663 rc = test_xmlDictCreate();
8664 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8665 rc = test_xmlDictCreateSub();
8666 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8667 rc = test_xmlDictExists();
8668 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8669 rc = test_xmlDictGetUsage();
8670 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8671 rc = test_xmlDictLookup();
8672 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8673 rc = test_xmlDictOwns();
8674 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8675 rc = test_xmlDictQLookup();
8676 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8677 rc = test_xmlDictReference();
8678 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8679 rc = test_xmlDictSetLimit();
8680 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8681 rc = test_xmlDictSize();
8682 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8683 rc = test_xmlInitializeDict();
8684 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
8687 printf("Module dict: %d errors\n", test_ret);
8692 test_UTF8Toisolat1(void) {
8695 #if defined(LIBXML_OUTPUT_ENABLED)
8696 #ifdef LIBXML_OUTPUT_ENABLED
8699 unsigned char * out; /* a pointer to an array of bytes to store the result */
8701 int * outlen; /* the length of @out */
8703 unsigned char * in; /* a pointer to an array of UTF-8 chars */
8705 int * inlen; /* the length of @in */
8708 for (n_out = 0;n_out < gen_nb_unsigned_char_ptr;n_out++) {
8709 for (n_outlen = 0;n_outlen < gen_nb_int_ptr;n_outlen++) {
8710 for (n_in = 0;n_in < gen_nb_const_unsigned_char_ptr;n_in++) {
8711 for (n_inlen = 0;n_inlen < gen_nb_int_ptr;n_inlen++) {
8712 mem_base = xmlMemBlocks();
8713 out = gen_unsigned_char_ptr(n_out, 0);
8714 outlen = gen_int_ptr(n_outlen, 1);
8715 in = gen_const_unsigned_char_ptr(n_in, 2);
8716 inlen = gen_int_ptr(n_inlen, 3);
8718 ret_val = UTF8Toisolat1(out, outlen, (const unsigned char *)in, inlen);
8719 desret_int(ret_val);
8721 des_unsigned_char_ptr(n_out, out, 0);
8722 des_int_ptr(n_outlen, outlen, 1);
8723 des_const_unsigned_char_ptr(n_in, (const unsigned char *)in, 2);
8724 des_int_ptr(n_inlen, inlen, 3);
8725 xmlResetLastError();
8726 if (mem_base != xmlMemBlocks()) {
8727 printf("Leak of %d blocks found in UTF8Toisolat1",
8728 xmlMemBlocks() - mem_base);
8730 printf(" %d", n_out);
8731 printf(" %d", n_outlen);
8732 printf(" %d", n_in);
8733 printf(" %d", n_inlen);
8749 test_isolat1ToUTF8(void) {
8754 unsigned char * out; /* a pointer to an array of bytes to store the result */
8756 int * outlen; /* the length of @out */
8758 unsigned char * in; /* a pointer to an array of ISO Latin 1 chars */
8760 int * inlen; /* the length of @in */
8763 for (n_out = 0;n_out < gen_nb_unsigned_char_ptr;n_out++) {
8764 for (n_outlen = 0;n_outlen < gen_nb_int_ptr;n_outlen++) {
8765 for (n_in = 0;n_in < gen_nb_const_unsigned_char_ptr;n_in++) {
8766 for (n_inlen = 0;n_inlen < gen_nb_int_ptr;n_inlen++) {
8767 mem_base = xmlMemBlocks();
8768 out = gen_unsigned_char_ptr(n_out, 0);
8769 outlen = gen_int_ptr(n_outlen, 1);
8770 in = gen_const_unsigned_char_ptr(n_in, 2);
8771 inlen = gen_int_ptr(n_inlen, 3);
8773 ret_val = isolat1ToUTF8(out, outlen, (const unsigned char *)in, inlen);
8774 desret_int(ret_val);
8776 des_unsigned_char_ptr(n_out, out, 0);
8777 des_int_ptr(n_outlen, outlen, 1);
8778 des_const_unsigned_char_ptr(n_in, (const unsigned char *)in, 2);
8779 des_int_ptr(n_inlen, inlen, 3);
8780 xmlResetLastError();
8781 if (mem_base != xmlMemBlocks()) {
8782 printf("Leak of %d blocks found in isolat1ToUTF8",
8783 xmlMemBlocks() - mem_base);
8785 printf(" %d", n_out);
8786 printf(" %d", n_outlen);
8787 printf(" %d", n_in);
8788 printf(" %d", n_inlen);
8802 test_xmlAddEncodingAlias(void) {
8806 char * name; /* the encoding name as parsed, in UTF-8 format (ASCII actually) */
8808 char * alias; /* the alias name as parsed, in UTF-8 format (ASCII actually) */
8811 for (n_name = 0;n_name < gen_nb_const_char_ptr;n_name++) {
8812 for (n_alias = 0;n_alias < gen_nb_const_char_ptr;n_alias++) {
8813 name = gen_const_char_ptr(n_name, 0);
8814 alias = gen_const_char_ptr(n_alias, 1);
8816 ret_val = xmlAddEncodingAlias((const char *)name, (const char *)alias);
8817 desret_int(ret_val);
8819 des_const_char_ptr(n_name, (const char *)name, 0);
8820 des_const_char_ptr(n_alias, (const char *)alias, 1);
8821 xmlResetLastError();
8830 #define gen_nb_xmlCharEncodingHandler_ptr 1
8831 static xmlCharEncodingHandler * gen_xmlCharEncodingHandler_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
8834 static void des_xmlCharEncodingHandler_ptr(int no ATTRIBUTE_UNUSED, xmlCharEncodingHandler * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
8838 test_xmlCharEncCloseFunc(void) {
8843 xmlCharEncodingHandler * handler; /* char enconding transformation data structure */
8846 for (n_handler = 0;n_handler < gen_nb_xmlCharEncodingHandler_ptr;n_handler++) {
8847 mem_base = xmlMemBlocks();
8848 handler = gen_xmlCharEncodingHandler_ptr(n_handler, 0);
8850 ret_val = xmlCharEncCloseFunc(handler);
8851 desret_int(ret_val);
8853 des_xmlCharEncodingHandler_ptr(n_handler, handler, 0);
8854 xmlResetLastError();
8855 if (mem_base != xmlMemBlocks()) {
8856 printf("Leak of %d blocks found in xmlCharEncCloseFunc",
8857 xmlMemBlocks() - mem_base);
8859 printf(" %d", n_handler);
8870 test_xmlCharEncFirstLine(void) {
8875 xmlCharEncodingHandler * handler; /* char enconding transformation data structure */
8877 xmlBufferPtr out; /* an xmlBuffer for the output. */
8879 xmlBufferPtr in; /* an xmlBuffer for the input */
8882 for (n_handler = 0;n_handler < gen_nb_xmlCharEncodingHandler_ptr;n_handler++) {
8883 for (n_out = 0;n_out < gen_nb_xmlBufferPtr;n_out++) {
8884 for (n_in = 0;n_in < gen_nb_xmlBufferPtr;n_in++) {
8885 mem_base = xmlMemBlocks();
8886 handler = gen_xmlCharEncodingHandler_ptr(n_handler, 0);
8887 out = gen_xmlBufferPtr(n_out, 1);
8888 in = gen_xmlBufferPtr(n_in, 2);
8890 ret_val = xmlCharEncFirstLine(handler, out, in);
8891 desret_int(ret_val);
8893 des_xmlCharEncodingHandler_ptr(n_handler, handler, 0);
8894 des_xmlBufferPtr(n_out, out, 1);
8895 des_xmlBufferPtr(n_in, in, 2);
8896 xmlResetLastError();
8897 if (mem_base != xmlMemBlocks()) {
8898 printf("Leak of %d blocks found in xmlCharEncFirstLine",
8899 xmlMemBlocks() - mem_base);
8901 printf(" %d", n_handler);
8902 printf(" %d", n_out);
8903 printf(" %d", n_in);
8916 test_xmlCharEncInFunc(void) {
8921 xmlCharEncodingHandler * handler; /* char encoding transformation data structure */
8923 xmlBufferPtr out; /* an xmlBuffer for the output. */
8925 xmlBufferPtr in; /* an xmlBuffer for the input */
8928 for (n_handler = 0;n_handler < gen_nb_xmlCharEncodingHandler_ptr;n_handler++) {
8929 for (n_out = 0;n_out < gen_nb_xmlBufferPtr;n_out++) {
8930 for (n_in = 0;n_in < gen_nb_xmlBufferPtr;n_in++) {
8931 mem_base = xmlMemBlocks();
8932 handler = gen_xmlCharEncodingHandler_ptr(n_handler, 0);
8933 out = gen_xmlBufferPtr(n_out, 1);
8934 in = gen_xmlBufferPtr(n_in, 2);
8936 ret_val = xmlCharEncInFunc(handler, out, in);
8937 desret_int(ret_val);
8939 des_xmlCharEncodingHandler_ptr(n_handler, handler, 0);
8940 des_xmlBufferPtr(n_out, out, 1);
8941 des_xmlBufferPtr(n_in, in, 2);
8942 xmlResetLastError();
8943 if (mem_base != xmlMemBlocks()) {
8944 printf("Leak of %d blocks found in xmlCharEncInFunc",
8945 xmlMemBlocks() - mem_base);
8947 printf(" %d", n_handler);
8948 printf(" %d", n_out);
8949 printf(" %d", n_in);
8962 test_xmlCharEncOutFunc(void) {
8967 xmlCharEncodingHandler * handler; /* char enconding transformation data structure */
8969 xmlBufferPtr out; /* an xmlBuffer for the output. */
8971 xmlBufferPtr in; /* an xmlBuffer for the input */
8974 for (n_handler = 0;n_handler < gen_nb_xmlCharEncodingHandler_ptr;n_handler++) {
8975 for (n_out = 0;n_out < gen_nb_xmlBufferPtr;n_out++) {
8976 for (n_in = 0;n_in < gen_nb_xmlBufferPtr;n_in++) {
8977 mem_base = xmlMemBlocks();
8978 handler = gen_xmlCharEncodingHandler_ptr(n_handler, 0);
8979 out = gen_xmlBufferPtr(n_out, 1);
8980 in = gen_xmlBufferPtr(n_in, 2);
8982 ret_val = xmlCharEncOutFunc(handler, out, in);
8983 desret_int(ret_val);
8985 des_xmlCharEncodingHandler_ptr(n_handler, handler, 0);
8986 des_xmlBufferPtr(n_out, out, 1);
8987 des_xmlBufferPtr(n_in, in, 2);
8988 xmlResetLastError();
8989 if (mem_base != xmlMemBlocks()) {
8990 printf("Leak of %d blocks found in xmlCharEncOutFunc",
8991 xmlMemBlocks() - mem_base);
8993 printf(" %d", n_handler);
8994 printf(" %d", n_out);
8995 printf(" %d", n_in);
9008 test_xmlCleanupCharEncodingHandlers(void) {
9013 xmlCleanupCharEncodingHandlers();
9015 xmlResetLastError();
9023 test_xmlCleanupEncodingAliases(void) {
9028 mem_base = xmlMemBlocks();
9030 xmlCleanupEncodingAliases();
9032 xmlResetLastError();
9033 if (mem_base != xmlMemBlocks()) {
9034 printf("Leak of %d blocks found in xmlCleanupEncodingAliases",
9035 xmlMemBlocks() - mem_base);
9046 test_xmlDelEncodingAlias(void) {
9051 char * alias; /* the alias name as parsed, in UTF-8 format (ASCII actually) */
9054 for (n_alias = 0;n_alias < gen_nb_const_char_ptr;n_alias++) {
9055 mem_base = xmlMemBlocks();
9056 alias = gen_const_char_ptr(n_alias, 0);
9058 ret_val = xmlDelEncodingAlias((const char *)alias);
9059 desret_int(ret_val);
9061 des_const_char_ptr(n_alias, (const char *)alias, 0);
9062 xmlResetLastError();
9063 if (mem_base != xmlMemBlocks()) {
9064 printf("Leak of %d blocks found in xmlDelEncodingAlias",
9065 xmlMemBlocks() - mem_base);
9067 printf(" %d", n_alias);
9078 test_xmlDetectCharEncoding(void) {
9082 xmlCharEncoding ret_val;
9083 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). */
9085 int len; /* pointer to the length of the buffer */
9088 for (n_in = 0;n_in < gen_nb_const_unsigned_char_ptr;n_in++) {
9089 for (n_len = 0;n_len < gen_nb_int;n_len++) {
9090 mem_base = xmlMemBlocks();
9091 in = gen_const_unsigned_char_ptr(n_in, 0);
9092 len = gen_int(n_len, 1);
9094 ret_val = xmlDetectCharEncoding((const unsigned char *)in, len);
9095 desret_xmlCharEncoding(ret_val);
9097 des_const_unsigned_char_ptr(n_in, (const unsigned char *)in, 0);
9098 des_int(n_len, len, 1);
9099 xmlResetLastError();
9100 if (mem_base != xmlMemBlocks()) {
9101 printf("Leak of %d blocks found in xmlDetectCharEncoding",
9102 xmlMemBlocks() - mem_base);
9104 printf(" %d", n_in);
9105 printf(" %d", n_len);
9117 test_xmlFindCharEncodingHandler(void) {
9121 /* missing type support */
9127 test_xmlGetCharEncodingHandler(void) {
9131 /* missing type support */
9137 test_xmlGetCharEncodingName(void) {
9141 const char * ret_val;
9142 xmlCharEncoding enc; /* the encoding */
9145 for (n_enc = 0;n_enc < gen_nb_xmlCharEncoding;n_enc++) {
9146 mem_base = xmlMemBlocks();
9147 enc = gen_xmlCharEncoding(n_enc, 0);
9149 ret_val = xmlGetCharEncodingName(enc);
9150 desret_const_char_ptr(ret_val);
9152 des_xmlCharEncoding(n_enc, enc, 0);
9153 xmlResetLastError();
9154 if (mem_base != xmlMemBlocks()) {
9155 printf("Leak of %d blocks found in xmlGetCharEncodingName",
9156 xmlMemBlocks() - mem_base);
9158 printf(" %d", n_enc);
9169 test_xmlGetEncodingAlias(void) {
9173 const char * ret_val;
9174 char * alias; /* the alias name as parsed, in UTF-8 format (ASCII actually) */
9177 for (n_alias = 0;n_alias < gen_nb_const_char_ptr;n_alias++) {
9178 mem_base = xmlMemBlocks();
9179 alias = gen_const_char_ptr(n_alias, 0);
9181 ret_val = xmlGetEncodingAlias((const char *)alias);
9182 desret_const_char_ptr(ret_val);
9184 des_const_char_ptr(n_alias, (const char *)alias, 0);
9185 xmlResetLastError();
9186 if (mem_base != xmlMemBlocks()) {
9187 printf("Leak of %d blocks found in xmlGetEncodingAlias",
9188 xmlMemBlocks() - mem_base);
9190 printf(" %d", n_alias);
9201 test_xmlInitCharEncodingHandlers(void) {
9206 xmlInitCharEncodingHandlers();
9208 xmlResetLastError();
9216 test_xmlNewCharEncodingHandler(void) {
9220 /* missing type support */
9226 test_xmlParseCharEncoding(void) {
9230 xmlCharEncoding ret_val;
9231 char * name; /* the encoding name as parsed, in UTF-8 format (ASCII actually) */
9234 for (n_name = 0;n_name < gen_nb_const_char_ptr;n_name++) {
9235 mem_base = xmlMemBlocks();
9236 name = gen_const_char_ptr(n_name, 0);
9238 ret_val = xmlParseCharEncoding((const char *)name);
9239 desret_xmlCharEncoding(ret_val);
9241 des_const_char_ptr(n_name, (const char *)name, 0);
9242 xmlResetLastError();
9243 if (mem_base != xmlMemBlocks()) {
9244 printf("Leak of %d blocks found in xmlParseCharEncoding",
9245 xmlMemBlocks() - mem_base);
9247 printf(" %d", n_name);
9257 #define gen_nb_xmlCharEncodingHandlerPtr 1
9258 static xmlCharEncodingHandlerPtr gen_xmlCharEncodingHandlerPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
9261 static void des_xmlCharEncodingHandlerPtr(int no ATTRIBUTE_UNUSED, xmlCharEncodingHandlerPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
9265 test_xmlRegisterCharEncodingHandler(void) {
9269 xmlCharEncodingHandlerPtr handler; /* the xmlCharEncodingHandlerPtr handler block */
9272 for (n_handler = 0;n_handler < gen_nb_xmlCharEncodingHandlerPtr;n_handler++) {
9273 mem_base = xmlMemBlocks();
9274 handler = gen_xmlCharEncodingHandlerPtr(n_handler, 0);
9276 xmlRegisterCharEncodingHandler(handler);
9278 des_xmlCharEncodingHandlerPtr(n_handler, handler, 0);
9279 xmlResetLastError();
9280 if (mem_base != xmlMemBlocks()) {
9281 printf("Leak of %d blocks found in xmlRegisterCharEncodingHandler",
9282 xmlMemBlocks() - mem_base);
9284 printf(" %d", n_handler);
9294 test_encoding(void) {
9298 if (quiet == 0) printf("Testing encoding : 16 of 19 functions ...\n");
9299 rc = test_UTF8Toisolat1();
9300 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9301 rc = test_isolat1ToUTF8();
9302 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9303 rc = test_xmlAddEncodingAlias();
9304 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9305 rc = test_xmlCharEncCloseFunc();
9306 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9307 rc = test_xmlCharEncFirstLine();
9308 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9309 rc = test_xmlCharEncInFunc();
9310 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9311 rc = test_xmlCharEncOutFunc();
9312 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9313 rc = test_xmlCleanupCharEncodingHandlers();
9314 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9315 rc = test_xmlCleanupEncodingAliases();
9316 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9317 rc = test_xmlDelEncodingAlias();
9318 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9319 rc = test_xmlDetectCharEncoding();
9320 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9321 rc = test_xmlFindCharEncodingHandler();
9322 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9323 rc = test_xmlGetCharEncodingHandler();
9324 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9325 rc = test_xmlGetCharEncodingName();
9326 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9327 rc = test_xmlGetEncodingAlias();
9328 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9329 rc = test_xmlInitCharEncodingHandlers();
9330 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9331 rc = test_xmlNewCharEncodingHandler();
9332 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9333 rc = test_xmlParseCharEncoding();
9334 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9335 rc = test_xmlRegisterCharEncodingHandler();
9336 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9339 printf("Module encoding: %d errors\n", test_ret);
9344 test_xmlAddDocEntity(void) {
9348 xmlEntityPtr ret_val;
9349 xmlDocPtr doc; /* the document */
9351 xmlChar * name; /* the entity name */
9353 int type; /* the entity type XML_xxx_yyy_ENTITY */
9355 xmlChar * ExternalID; /* the entity external ID if available */
9357 xmlChar * SystemID; /* the entity system ID if available */
9359 xmlChar * content; /* the entity content */
9362 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
9363 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
9364 for (n_type = 0;n_type < gen_nb_int;n_type++) {
9365 for (n_ExternalID = 0;n_ExternalID < gen_nb_const_xmlChar_ptr;n_ExternalID++) {
9366 for (n_SystemID = 0;n_SystemID < gen_nb_const_xmlChar_ptr;n_SystemID++) {
9367 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
9368 mem_base = xmlMemBlocks();
9369 doc = gen_xmlDocPtr(n_doc, 0);
9370 name = gen_const_xmlChar_ptr(n_name, 1);
9371 type = gen_int(n_type, 2);
9372 ExternalID = gen_const_xmlChar_ptr(n_ExternalID, 3);
9373 SystemID = gen_const_xmlChar_ptr(n_SystemID, 4);
9374 content = gen_const_xmlChar_ptr(n_content, 5);
9376 ret_val = xmlAddDocEntity(doc, (const xmlChar *)name, type, (const xmlChar *)ExternalID, (const xmlChar *)SystemID, (const xmlChar *)content);
9377 desret_xmlEntityPtr(ret_val);
9379 des_xmlDocPtr(n_doc, doc, 0);
9380 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
9381 des_int(n_type, type, 2);
9382 des_const_xmlChar_ptr(n_ExternalID, (const xmlChar *)ExternalID, 3);
9383 des_const_xmlChar_ptr(n_SystemID, (const xmlChar *)SystemID, 4);
9384 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 5);
9385 xmlResetLastError();
9386 if (mem_base != xmlMemBlocks()) {
9387 printf("Leak of %d blocks found in xmlAddDocEntity",
9388 xmlMemBlocks() - mem_base);
9390 printf(" %d", n_doc);
9391 printf(" %d", n_name);
9392 printf(" %d", n_type);
9393 printf(" %d", n_ExternalID);
9394 printf(" %d", n_SystemID);
9395 printf(" %d", n_content);
9411 test_xmlAddDtdEntity(void) {
9415 xmlEntityPtr ret_val;
9416 xmlDocPtr doc; /* the document */
9418 xmlChar * name; /* the entity name */
9420 int type; /* the entity type XML_xxx_yyy_ENTITY */
9422 xmlChar * ExternalID; /* the entity external ID if available */
9424 xmlChar * SystemID; /* the entity system ID if available */
9426 xmlChar * content; /* the entity content */
9429 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
9430 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
9431 for (n_type = 0;n_type < gen_nb_int;n_type++) {
9432 for (n_ExternalID = 0;n_ExternalID < gen_nb_const_xmlChar_ptr;n_ExternalID++) {
9433 for (n_SystemID = 0;n_SystemID < gen_nb_const_xmlChar_ptr;n_SystemID++) {
9434 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
9435 mem_base = xmlMemBlocks();
9436 doc = gen_xmlDocPtr(n_doc, 0);
9437 name = gen_const_xmlChar_ptr(n_name, 1);
9438 type = gen_int(n_type, 2);
9439 ExternalID = gen_const_xmlChar_ptr(n_ExternalID, 3);
9440 SystemID = gen_const_xmlChar_ptr(n_SystemID, 4);
9441 content = gen_const_xmlChar_ptr(n_content, 5);
9443 ret_val = xmlAddDtdEntity(doc, (const xmlChar *)name, type, (const xmlChar *)ExternalID, (const xmlChar *)SystemID, (const xmlChar *)content);
9444 desret_xmlEntityPtr(ret_val);
9446 des_xmlDocPtr(n_doc, doc, 0);
9447 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
9448 des_int(n_type, type, 2);
9449 des_const_xmlChar_ptr(n_ExternalID, (const xmlChar *)ExternalID, 3);
9450 des_const_xmlChar_ptr(n_SystemID, (const xmlChar *)SystemID, 4);
9451 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 5);
9452 xmlResetLastError();
9453 if (mem_base != xmlMemBlocks()) {
9454 printf("Leak of %d blocks found in xmlAddDtdEntity",
9455 xmlMemBlocks() - mem_base);
9457 printf(" %d", n_doc);
9458 printf(" %d", n_name);
9459 printf(" %d", n_type);
9460 printf(" %d", n_ExternalID);
9461 printf(" %d", n_SystemID);
9462 printf(" %d", n_content);
9478 test_xmlCleanupPredefinedEntities(void) {
9481 #if defined(LIBXML_LEGACY_ENABLED)
9482 #ifdef LIBXML_LEGACY_ENABLED
9485 mem_base = xmlMemBlocks();
9487 xmlCleanupPredefinedEntities();
9489 xmlResetLastError();
9490 if (mem_base != xmlMemBlocks()) {
9491 printf("Leak of %d blocks found in xmlCleanupPredefinedEntities",
9492 xmlMemBlocks() - mem_base);
9504 #define gen_nb_xmlEntitiesTablePtr 1
9505 static xmlEntitiesTablePtr gen_xmlEntitiesTablePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
9508 static void des_xmlEntitiesTablePtr(int no ATTRIBUTE_UNUSED, xmlEntitiesTablePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
9512 test_xmlCopyEntitiesTable(void) {
9516 /* missing type support */
9522 test_xmlCreateEntitiesTable(void) {
9526 /* missing type support */
9532 test_xmlDumpEntitiesTable(void) {
9535 #if defined(LIBXML_OUTPUT_ENABLED)
9537 xmlBufferPtr buf; /* An XML buffer. */
9539 xmlEntitiesTablePtr table; /* An entity table */
9542 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
9543 for (n_table = 0;n_table < gen_nb_xmlEntitiesTablePtr;n_table++) {
9544 mem_base = xmlMemBlocks();
9545 buf = gen_xmlBufferPtr(n_buf, 0);
9546 table = gen_xmlEntitiesTablePtr(n_table, 1);
9548 xmlDumpEntitiesTable(buf, table);
9550 des_xmlBufferPtr(n_buf, buf, 0);
9551 des_xmlEntitiesTablePtr(n_table, table, 1);
9552 xmlResetLastError();
9553 if (mem_base != xmlMemBlocks()) {
9554 printf("Leak of %d blocks found in xmlDumpEntitiesTable",
9555 xmlMemBlocks() - mem_base);
9557 printf(" %d", n_buf);
9558 printf(" %d", n_table);
9570 #define gen_nb_xmlEntityPtr 1
9571 static xmlEntityPtr gen_xmlEntityPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
9574 static void des_xmlEntityPtr(int no ATTRIBUTE_UNUSED, xmlEntityPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
9578 test_xmlDumpEntityDecl(void) {
9581 #if defined(LIBXML_OUTPUT_ENABLED)
9583 xmlBufferPtr buf; /* An XML buffer. */
9585 xmlEntityPtr ent; /* An entity table */
9588 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
9589 for (n_ent = 0;n_ent < gen_nb_xmlEntityPtr;n_ent++) {
9590 mem_base = xmlMemBlocks();
9591 buf = gen_xmlBufferPtr(n_buf, 0);
9592 ent = gen_xmlEntityPtr(n_ent, 1);
9594 xmlDumpEntityDecl(buf, ent);
9596 des_xmlBufferPtr(n_buf, buf, 0);
9597 des_xmlEntityPtr(n_ent, ent, 1);
9598 xmlResetLastError();
9599 if (mem_base != xmlMemBlocks()) {
9600 printf("Leak of %d blocks found in xmlDumpEntityDecl",
9601 xmlMemBlocks() - mem_base);
9603 printf(" %d", n_buf);
9604 printf(" %d", n_ent);
9617 test_xmlEncodeEntitiesReentrant(void) {
9622 xmlDocPtr doc; /* the document containing the string */
9624 xmlChar * input; /* A string to convert to XML. */
9627 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
9628 for (n_input = 0;n_input < gen_nb_const_xmlChar_ptr;n_input++) {
9629 mem_base = xmlMemBlocks();
9630 doc = gen_xmlDocPtr(n_doc, 0);
9631 input = gen_const_xmlChar_ptr(n_input, 1);
9633 ret_val = xmlEncodeEntitiesReentrant(doc, (const xmlChar *)input);
9634 desret_xmlChar_ptr(ret_val);
9636 des_xmlDocPtr(n_doc, doc, 0);
9637 des_const_xmlChar_ptr(n_input, (const xmlChar *)input, 1);
9638 xmlResetLastError();
9639 if (mem_base != xmlMemBlocks()) {
9640 printf("Leak of %d blocks found in xmlEncodeEntitiesReentrant",
9641 xmlMemBlocks() - mem_base);
9643 printf(" %d", n_doc);
9644 printf(" %d", n_input);
9655 #define gen_nb_const_xmlDoc_ptr 1
9656 static xmlDoc * gen_const_xmlDoc_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
9659 static void des_const_xmlDoc_ptr(int no ATTRIBUTE_UNUSED, const xmlDoc * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
9663 test_xmlEncodeSpecialChars(void) {
9668 xmlDoc * doc; /* the document containing the string */
9670 xmlChar * input; /* A string to convert to XML. */
9673 for (n_doc = 0;n_doc < gen_nb_const_xmlDoc_ptr;n_doc++) {
9674 for (n_input = 0;n_input < gen_nb_const_xmlChar_ptr;n_input++) {
9675 mem_base = xmlMemBlocks();
9676 doc = gen_const_xmlDoc_ptr(n_doc, 0);
9677 input = gen_const_xmlChar_ptr(n_input, 1);
9679 ret_val = xmlEncodeSpecialChars((const xmlDoc *)doc, (const xmlChar *)input);
9680 desret_xmlChar_ptr(ret_val);
9682 des_const_xmlDoc_ptr(n_doc, (const xmlDoc *)doc, 0);
9683 des_const_xmlChar_ptr(n_input, (const xmlChar *)input, 1);
9684 xmlResetLastError();
9685 if (mem_base != xmlMemBlocks()) {
9686 printf("Leak of %d blocks found in xmlEncodeSpecialChars",
9687 xmlMemBlocks() - mem_base);
9689 printf(" %d", n_doc);
9690 printf(" %d", n_input);
9702 test_xmlGetDocEntity(void) {
9706 xmlEntityPtr ret_val;
9707 xmlDoc * doc; /* the document referencing the entity */
9709 xmlChar * name; /* the entity name */
9712 for (n_doc = 0;n_doc < gen_nb_const_xmlDoc_ptr;n_doc++) {
9713 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
9714 mem_base = xmlMemBlocks();
9715 doc = gen_const_xmlDoc_ptr(n_doc, 0);
9716 name = gen_const_xmlChar_ptr(n_name, 1);
9718 ret_val = xmlGetDocEntity((const xmlDoc *)doc, (const xmlChar *)name);
9719 desret_xmlEntityPtr(ret_val);
9721 des_const_xmlDoc_ptr(n_doc, (const xmlDoc *)doc, 0);
9722 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
9723 xmlResetLastError();
9724 if (mem_base != xmlMemBlocks()) {
9725 printf("Leak of %d blocks found in xmlGetDocEntity",
9726 xmlMemBlocks() - mem_base);
9728 printf(" %d", n_doc);
9729 printf(" %d", n_name);
9741 test_xmlGetDtdEntity(void) {
9745 xmlEntityPtr ret_val;
9746 xmlDocPtr doc; /* the document referencing the entity */
9748 xmlChar * name; /* the entity name */
9751 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
9752 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
9753 mem_base = xmlMemBlocks();
9754 doc = gen_xmlDocPtr(n_doc, 0);
9755 name = gen_const_xmlChar_ptr(n_name, 1);
9757 ret_val = xmlGetDtdEntity(doc, (const xmlChar *)name);
9758 desret_xmlEntityPtr(ret_val);
9760 des_xmlDocPtr(n_doc, doc, 0);
9761 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
9762 xmlResetLastError();
9763 if (mem_base != xmlMemBlocks()) {
9764 printf("Leak of %d blocks found in xmlGetDtdEntity",
9765 xmlMemBlocks() - mem_base);
9767 printf(" %d", n_doc);
9768 printf(" %d", n_name);
9780 test_xmlGetParameterEntity(void) {
9784 xmlEntityPtr ret_val;
9785 xmlDocPtr doc; /* the document referencing the entity */
9787 xmlChar * name; /* the entity name */
9790 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
9791 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
9792 mem_base = xmlMemBlocks();
9793 doc = gen_xmlDocPtr(n_doc, 0);
9794 name = gen_const_xmlChar_ptr(n_name, 1);
9796 ret_val = xmlGetParameterEntity(doc, (const xmlChar *)name);
9797 desret_xmlEntityPtr(ret_val);
9799 des_xmlDocPtr(n_doc, doc, 0);
9800 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
9801 xmlResetLastError();
9802 if (mem_base != xmlMemBlocks()) {
9803 printf("Leak of %d blocks found in xmlGetParameterEntity",
9804 xmlMemBlocks() - mem_base);
9806 printf(" %d", n_doc);
9807 printf(" %d", n_name);
9819 test_xmlGetPredefinedEntity(void) {
9823 xmlEntityPtr ret_val;
9824 xmlChar * name; /* the entity name */
9827 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
9828 mem_base = xmlMemBlocks();
9829 name = gen_const_xmlChar_ptr(n_name, 0);
9831 ret_val = xmlGetPredefinedEntity((const xmlChar *)name);
9832 desret_xmlEntityPtr(ret_val);
9834 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 0);
9835 xmlResetLastError();
9836 if (mem_base != xmlMemBlocks()) {
9837 printf("Leak of %d blocks found in xmlGetPredefinedEntity",
9838 xmlMemBlocks() - mem_base);
9840 printf(" %d", n_name);
9851 test_xmlInitializePredefinedEntities(void) {
9854 #if defined(LIBXML_LEGACY_ENABLED)
9855 #ifdef LIBXML_LEGACY_ENABLED
9858 mem_base = xmlMemBlocks();
9860 xmlInitializePredefinedEntities();
9862 xmlResetLastError();
9863 if (mem_base != xmlMemBlocks()) {
9864 printf("Leak of %d blocks found in xmlInitializePredefinedEntities",
9865 xmlMemBlocks() - mem_base);
9878 test_xmlNewEntity(void) {
9882 xmlEntityPtr ret_val;
9883 xmlDocPtr doc; /* the document */
9885 xmlChar * name; /* the entity name */
9887 int type; /* the entity type XML_xxx_yyy_ENTITY */
9889 xmlChar * ExternalID; /* the entity external ID if available */
9891 xmlChar * SystemID; /* the entity system ID if available */
9893 xmlChar * content; /* the entity content */
9896 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
9897 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
9898 for (n_type = 0;n_type < gen_nb_int;n_type++) {
9899 for (n_ExternalID = 0;n_ExternalID < gen_nb_const_xmlChar_ptr;n_ExternalID++) {
9900 for (n_SystemID = 0;n_SystemID < gen_nb_const_xmlChar_ptr;n_SystemID++) {
9901 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
9902 mem_base = xmlMemBlocks();
9903 doc = gen_xmlDocPtr(n_doc, 0);
9904 name = gen_const_xmlChar_ptr(n_name, 1);
9905 type = gen_int(n_type, 2);
9906 ExternalID = gen_const_xmlChar_ptr(n_ExternalID, 3);
9907 SystemID = gen_const_xmlChar_ptr(n_SystemID, 4);
9908 content = gen_const_xmlChar_ptr(n_content, 5);
9910 ret_val = xmlNewEntity(doc, (const xmlChar *)name, type, (const xmlChar *)ExternalID, (const xmlChar *)SystemID, (const xmlChar *)content);
9911 desret_xmlEntityPtr(ret_val);
9913 des_xmlDocPtr(n_doc, doc, 0);
9914 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
9915 des_int(n_type, type, 2);
9916 des_const_xmlChar_ptr(n_ExternalID, (const xmlChar *)ExternalID, 3);
9917 des_const_xmlChar_ptr(n_SystemID, (const xmlChar *)SystemID, 4);
9918 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 5);
9919 xmlResetLastError();
9920 if (mem_base != xmlMemBlocks()) {
9921 printf("Leak of %d blocks found in xmlNewEntity",
9922 xmlMemBlocks() - mem_base);
9924 printf(" %d", n_doc);
9925 printf(" %d", n_name);
9926 printf(" %d", n_type);
9927 printf(" %d", n_ExternalID);
9928 printf(" %d", n_SystemID);
9929 printf(" %d", n_content);
9944 test_entities(void) {
9948 if (quiet == 0) printf("Testing entities : 13 of 17 functions ...\n");
9949 rc = test_xmlAddDocEntity();
9950 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9951 rc = test_xmlAddDtdEntity();
9952 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9953 rc = test_xmlCleanupPredefinedEntities();
9954 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9955 rc = test_xmlCopyEntitiesTable();
9956 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9957 rc = test_xmlCreateEntitiesTable();
9958 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9959 rc = test_xmlDumpEntitiesTable();
9960 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9961 rc = test_xmlDumpEntityDecl();
9962 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9963 rc = test_xmlEncodeEntitiesReentrant();
9964 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9965 rc = test_xmlEncodeSpecialChars();
9966 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9967 rc = test_xmlGetDocEntity();
9968 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9969 rc = test_xmlGetDtdEntity();
9970 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9971 rc = test_xmlGetParameterEntity();
9972 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9973 rc = test_xmlGetPredefinedEntity();
9974 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9975 rc = test_xmlInitializePredefinedEntities();
9976 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9977 rc = test_xmlNewEntity();
9978 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
9981 printf("Module entities: %d errors\n", test_ret);
9986 test_xmlHashAddEntry(void) {
9991 xmlHashTablePtr table; /* the hash table */
9993 xmlChar * name; /* the name of the userdata */
9995 void * userdata; /* a pointer to the userdata */
9998 for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
9999 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
10000 for (n_userdata = 0;n_userdata < gen_nb_userdata;n_userdata++) {
10001 mem_base = xmlMemBlocks();
10002 table = gen_xmlHashTablePtr(n_table, 0);
10003 name = gen_const_xmlChar_ptr(n_name, 1);
10004 userdata = gen_userdata(n_userdata, 2);
10006 ret_val = xmlHashAddEntry(table, (const xmlChar *)name, userdata);
10007 desret_int(ret_val);
10009 des_xmlHashTablePtr(n_table, table, 0);
10010 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
10011 des_userdata(n_userdata, userdata, 2);
10012 xmlResetLastError();
10013 if (mem_base != xmlMemBlocks()) {
10014 printf("Leak of %d blocks found in xmlHashAddEntry",
10015 xmlMemBlocks() - mem_base);
10017 printf(" %d", n_table);
10018 printf(" %d", n_name);
10019 printf(" %d", n_userdata);
10032 test_xmlHashAddEntry2(void) {
10037 xmlHashTablePtr table; /* the hash table */
10039 xmlChar * name; /* the name of the userdata */
10041 xmlChar * name2; /* a second name of the userdata */
10043 void * userdata; /* a pointer to the userdata */
10046 for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
10047 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
10048 for (n_name2 = 0;n_name2 < gen_nb_const_xmlChar_ptr;n_name2++) {
10049 for (n_userdata = 0;n_userdata < gen_nb_userdata;n_userdata++) {
10050 mem_base = xmlMemBlocks();
10051 table = gen_xmlHashTablePtr(n_table, 0);
10052 name = gen_const_xmlChar_ptr(n_name, 1);
10053 name2 = gen_const_xmlChar_ptr(n_name2, 2);
10054 userdata = gen_userdata(n_userdata, 3);
10056 ret_val = xmlHashAddEntry2(table, (const xmlChar *)name, (const xmlChar *)name2, userdata);
10057 desret_int(ret_val);
10059 des_xmlHashTablePtr(n_table, table, 0);
10060 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
10061 des_const_xmlChar_ptr(n_name2, (const xmlChar *)name2, 2);
10062 des_userdata(n_userdata, userdata, 3);
10063 xmlResetLastError();
10064 if (mem_base != xmlMemBlocks()) {
10065 printf("Leak of %d blocks found in xmlHashAddEntry2",
10066 xmlMemBlocks() - mem_base);
10068 printf(" %d", n_table);
10069 printf(" %d", n_name);
10070 printf(" %d", n_name2);
10071 printf(" %d", n_userdata);
10085 test_xmlHashAddEntry3(void) {
10090 xmlHashTablePtr table; /* the hash table */
10092 xmlChar * name; /* the name of the userdata */
10094 xmlChar * name2; /* a second name of the userdata */
10096 xmlChar * name3; /* a third name of the userdata */
10098 void * userdata; /* a pointer to the userdata */
10101 for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
10102 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
10103 for (n_name2 = 0;n_name2 < gen_nb_const_xmlChar_ptr;n_name2++) {
10104 for (n_name3 = 0;n_name3 < gen_nb_const_xmlChar_ptr;n_name3++) {
10105 for (n_userdata = 0;n_userdata < gen_nb_userdata;n_userdata++) {
10106 mem_base = xmlMemBlocks();
10107 table = gen_xmlHashTablePtr(n_table, 0);
10108 name = gen_const_xmlChar_ptr(n_name, 1);
10109 name2 = gen_const_xmlChar_ptr(n_name2, 2);
10110 name3 = gen_const_xmlChar_ptr(n_name3, 3);
10111 userdata = gen_userdata(n_userdata, 4);
10113 ret_val = xmlHashAddEntry3(table, (const xmlChar *)name, (const xmlChar *)name2, (const xmlChar *)name3, userdata);
10114 desret_int(ret_val);
10116 des_xmlHashTablePtr(n_table, table, 0);
10117 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
10118 des_const_xmlChar_ptr(n_name2, (const xmlChar *)name2, 2);
10119 des_const_xmlChar_ptr(n_name3, (const xmlChar *)name3, 3);
10120 des_userdata(n_userdata, userdata, 4);
10121 xmlResetLastError();
10122 if (mem_base != xmlMemBlocks()) {
10123 printf("Leak of %d blocks found in xmlHashAddEntry3",
10124 xmlMemBlocks() - mem_base);
10126 printf(" %d", n_table);
10127 printf(" %d", n_name);
10128 printf(" %d", n_name2);
10129 printf(" %d", n_name3);
10130 printf(" %d", n_userdata);
10145 test_xmlHashCopy(void) {
10149 /* missing type support */
10155 test_xmlHashCreate(void) {
10159 /* missing type support */
10165 test_xmlHashCreateDict(void) {
10169 /* missing type support */
10175 test_xmlHashLookup(void) {
10180 xmlHashTablePtr table; /* the hash table */
10182 xmlChar * name; /* the name of the userdata */
10185 for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
10186 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
10187 mem_base = xmlMemBlocks();
10188 table = gen_xmlHashTablePtr(n_table, 0);
10189 name = gen_const_xmlChar_ptr(n_name, 1);
10191 ret_val = xmlHashLookup(table, (const xmlChar *)name);
10192 desret_void_ptr(ret_val);
10194 des_xmlHashTablePtr(n_table, table, 0);
10195 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
10196 xmlResetLastError();
10197 if (mem_base != xmlMemBlocks()) {
10198 printf("Leak of %d blocks found in xmlHashLookup",
10199 xmlMemBlocks() - mem_base);
10201 printf(" %d", n_table);
10202 printf(" %d", n_name);
10214 test_xmlHashLookup2(void) {
10219 xmlHashTablePtr table; /* the hash table */
10221 xmlChar * name; /* the name of the userdata */
10223 xmlChar * name2; /* a second name of the userdata */
10226 for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
10227 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
10228 for (n_name2 = 0;n_name2 < gen_nb_const_xmlChar_ptr;n_name2++) {
10229 mem_base = xmlMemBlocks();
10230 table = gen_xmlHashTablePtr(n_table, 0);
10231 name = gen_const_xmlChar_ptr(n_name, 1);
10232 name2 = gen_const_xmlChar_ptr(n_name2, 2);
10234 ret_val = xmlHashLookup2(table, (const xmlChar *)name, (const xmlChar *)name2);
10235 desret_void_ptr(ret_val);
10237 des_xmlHashTablePtr(n_table, table, 0);
10238 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
10239 des_const_xmlChar_ptr(n_name2, (const xmlChar *)name2, 2);
10240 xmlResetLastError();
10241 if (mem_base != xmlMemBlocks()) {
10242 printf("Leak of %d blocks found in xmlHashLookup2",
10243 xmlMemBlocks() - mem_base);
10245 printf(" %d", n_table);
10246 printf(" %d", n_name);
10247 printf(" %d", n_name2);
10260 test_xmlHashLookup3(void) {
10265 xmlHashTablePtr table; /* the hash table */
10267 xmlChar * name; /* the name of the userdata */
10269 xmlChar * name2; /* a second name of the userdata */
10271 xmlChar * name3; /* a third name of the userdata */
10274 for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
10275 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
10276 for (n_name2 = 0;n_name2 < gen_nb_const_xmlChar_ptr;n_name2++) {
10277 for (n_name3 = 0;n_name3 < gen_nb_const_xmlChar_ptr;n_name3++) {
10278 mem_base = xmlMemBlocks();
10279 table = gen_xmlHashTablePtr(n_table, 0);
10280 name = gen_const_xmlChar_ptr(n_name, 1);
10281 name2 = gen_const_xmlChar_ptr(n_name2, 2);
10282 name3 = gen_const_xmlChar_ptr(n_name3, 3);
10284 ret_val = xmlHashLookup3(table, (const xmlChar *)name, (const xmlChar *)name2, (const xmlChar *)name3);
10285 desret_void_ptr(ret_val);
10287 des_xmlHashTablePtr(n_table, table, 0);
10288 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
10289 des_const_xmlChar_ptr(n_name2, (const xmlChar *)name2, 2);
10290 des_const_xmlChar_ptr(n_name3, (const xmlChar *)name3, 3);
10291 xmlResetLastError();
10292 if (mem_base != xmlMemBlocks()) {
10293 printf("Leak of %d blocks found in xmlHashLookup3",
10294 xmlMemBlocks() - mem_base);
10296 printf(" %d", n_table);
10297 printf(" %d", n_name);
10298 printf(" %d", n_name2);
10299 printf(" %d", n_name3);
10313 test_xmlHashQLookup(void) {
10318 xmlHashTablePtr table; /* the hash table */
10320 xmlChar * prefix; /* the prefix of the userdata */
10322 xmlChar * name; /* the name of the userdata */
10325 for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
10326 for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
10327 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
10328 mem_base = xmlMemBlocks();
10329 table = gen_xmlHashTablePtr(n_table, 0);
10330 prefix = gen_const_xmlChar_ptr(n_prefix, 1);
10331 name = gen_const_xmlChar_ptr(n_name, 2);
10333 ret_val = xmlHashQLookup(table, (const xmlChar *)prefix, (const xmlChar *)name);
10334 desret_void_ptr(ret_val);
10336 des_xmlHashTablePtr(n_table, table, 0);
10337 des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 1);
10338 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
10339 xmlResetLastError();
10340 if (mem_base != xmlMemBlocks()) {
10341 printf("Leak of %d blocks found in xmlHashQLookup",
10342 xmlMemBlocks() - mem_base);
10344 printf(" %d", n_table);
10345 printf(" %d", n_prefix);
10346 printf(" %d", n_name);
10359 test_xmlHashQLookup2(void) {
10364 xmlHashTablePtr table; /* the hash table */
10366 xmlChar * prefix; /* the prefix of the userdata */
10368 xmlChar * name; /* the name of the userdata */
10370 xmlChar * prefix2; /* the second prefix of the userdata */
10372 xmlChar * name2; /* a second name of the userdata */
10375 for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
10376 for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
10377 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
10378 for (n_prefix2 = 0;n_prefix2 < gen_nb_const_xmlChar_ptr;n_prefix2++) {
10379 for (n_name2 = 0;n_name2 < gen_nb_const_xmlChar_ptr;n_name2++) {
10380 mem_base = xmlMemBlocks();
10381 table = gen_xmlHashTablePtr(n_table, 0);
10382 prefix = gen_const_xmlChar_ptr(n_prefix, 1);
10383 name = gen_const_xmlChar_ptr(n_name, 2);
10384 prefix2 = gen_const_xmlChar_ptr(n_prefix2, 3);
10385 name2 = gen_const_xmlChar_ptr(n_name2, 4);
10387 ret_val = xmlHashQLookup2(table, (const xmlChar *)prefix, (const xmlChar *)name, (const xmlChar *)prefix2, (const xmlChar *)name2);
10388 desret_void_ptr(ret_val);
10390 des_xmlHashTablePtr(n_table, table, 0);
10391 des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 1);
10392 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
10393 des_const_xmlChar_ptr(n_prefix2, (const xmlChar *)prefix2, 3);
10394 des_const_xmlChar_ptr(n_name2, (const xmlChar *)name2, 4);
10395 xmlResetLastError();
10396 if (mem_base != xmlMemBlocks()) {
10397 printf("Leak of %d blocks found in xmlHashQLookup2",
10398 xmlMemBlocks() - mem_base);
10400 printf(" %d", n_table);
10401 printf(" %d", n_prefix);
10402 printf(" %d", n_name);
10403 printf(" %d", n_prefix2);
10404 printf(" %d", n_name2);
10419 test_xmlHashQLookup3(void) {
10424 xmlHashTablePtr table; /* the hash table */
10426 xmlChar * prefix; /* the prefix of the userdata */
10428 xmlChar * name; /* the name of the userdata */
10430 xmlChar * prefix2; /* the second prefix of the userdata */
10432 xmlChar * name2; /* a second name of the userdata */
10434 xmlChar * prefix3; /* the third prefix of the userdata */
10436 xmlChar * name3; /* a third name of the userdata */
10439 for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
10440 for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
10441 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
10442 for (n_prefix2 = 0;n_prefix2 < gen_nb_const_xmlChar_ptr;n_prefix2++) {
10443 for (n_name2 = 0;n_name2 < gen_nb_const_xmlChar_ptr;n_name2++) {
10444 for (n_prefix3 = 0;n_prefix3 < gen_nb_const_xmlChar_ptr;n_prefix3++) {
10445 for (n_name3 = 0;n_name3 < gen_nb_const_xmlChar_ptr;n_name3++) {
10446 mem_base = xmlMemBlocks();
10447 table = gen_xmlHashTablePtr(n_table, 0);
10448 prefix = gen_const_xmlChar_ptr(n_prefix, 1);
10449 name = gen_const_xmlChar_ptr(n_name, 2);
10450 prefix2 = gen_const_xmlChar_ptr(n_prefix2, 3);
10451 name2 = gen_const_xmlChar_ptr(n_name2, 4);
10452 prefix3 = gen_const_xmlChar_ptr(n_prefix3, 5);
10453 name3 = gen_const_xmlChar_ptr(n_name3, 6);
10455 ret_val = xmlHashQLookup3(table, (const xmlChar *)prefix, (const xmlChar *)name, (const xmlChar *)prefix2, (const xmlChar *)name2, (const xmlChar *)prefix3, (const xmlChar *)name3);
10456 desret_void_ptr(ret_val);
10458 des_xmlHashTablePtr(n_table, table, 0);
10459 des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 1);
10460 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
10461 des_const_xmlChar_ptr(n_prefix2, (const xmlChar *)prefix2, 3);
10462 des_const_xmlChar_ptr(n_name2, (const xmlChar *)name2, 4);
10463 des_const_xmlChar_ptr(n_prefix3, (const xmlChar *)prefix3, 5);
10464 des_const_xmlChar_ptr(n_name3, (const xmlChar *)name3, 6);
10465 xmlResetLastError();
10466 if (mem_base != xmlMemBlocks()) {
10467 printf("Leak of %d blocks found in xmlHashQLookup3",
10468 xmlMemBlocks() - mem_base);
10470 printf(" %d", n_table);
10471 printf(" %d", n_prefix);
10472 printf(" %d", n_name);
10473 printf(" %d", n_prefix2);
10474 printf(" %d", n_name2);
10475 printf(" %d", n_prefix3);
10476 printf(" %d", n_name3);
10493 test_xmlHashRemoveEntry(void) {
10498 xmlHashTablePtr table; /* the hash table */
10500 xmlChar * name; /* the name of the userdata */
10502 xmlHashDeallocator f; /* the deallocator function for removed item (if any) */
10505 for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
10506 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
10507 for (n_f = 0;n_f < gen_nb_xmlHashDeallocator;n_f++) {
10508 mem_base = xmlMemBlocks();
10509 table = gen_xmlHashTablePtr(n_table, 0);
10510 name = gen_const_xmlChar_ptr(n_name, 1);
10511 f = gen_xmlHashDeallocator(n_f, 2);
10513 ret_val = xmlHashRemoveEntry(table, (const xmlChar *)name, f);
10514 desret_int(ret_val);
10516 des_xmlHashTablePtr(n_table, table, 0);
10517 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
10518 des_xmlHashDeallocator(n_f, f, 2);
10519 xmlResetLastError();
10520 if (mem_base != xmlMemBlocks()) {
10521 printf("Leak of %d blocks found in xmlHashRemoveEntry",
10522 xmlMemBlocks() - mem_base);
10524 printf(" %d", n_table);
10525 printf(" %d", n_name);
10526 printf(" %d", n_f);
10539 test_xmlHashRemoveEntry2(void) {
10544 xmlHashTablePtr table; /* the hash table */
10546 xmlChar * name; /* the name of the userdata */
10548 xmlChar * name2; /* a second name of the userdata */
10550 xmlHashDeallocator f; /* the deallocator function for removed item (if any) */
10553 for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
10554 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
10555 for (n_name2 = 0;n_name2 < gen_nb_const_xmlChar_ptr;n_name2++) {
10556 for (n_f = 0;n_f < gen_nb_xmlHashDeallocator;n_f++) {
10557 mem_base = xmlMemBlocks();
10558 table = gen_xmlHashTablePtr(n_table, 0);
10559 name = gen_const_xmlChar_ptr(n_name, 1);
10560 name2 = gen_const_xmlChar_ptr(n_name2, 2);
10561 f = gen_xmlHashDeallocator(n_f, 3);
10563 ret_val = xmlHashRemoveEntry2(table, (const xmlChar *)name, (const xmlChar *)name2, f);
10564 desret_int(ret_val);
10566 des_xmlHashTablePtr(n_table, table, 0);
10567 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
10568 des_const_xmlChar_ptr(n_name2, (const xmlChar *)name2, 2);
10569 des_xmlHashDeallocator(n_f, f, 3);
10570 xmlResetLastError();
10571 if (mem_base != xmlMemBlocks()) {
10572 printf("Leak of %d blocks found in xmlHashRemoveEntry2",
10573 xmlMemBlocks() - mem_base);
10575 printf(" %d", n_table);
10576 printf(" %d", n_name);
10577 printf(" %d", n_name2);
10578 printf(" %d", n_f);
10592 test_xmlHashRemoveEntry3(void) {
10597 xmlHashTablePtr table; /* the hash table */
10599 xmlChar * name; /* the name of the userdata */
10601 xmlChar * name2; /* a second name of the userdata */
10603 xmlChar * name3; /* a third name of the userdata */
10605 xmlHashDeallocator f; /* the deallocator function for removed item (if any) */
10608 for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
10609 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
10610 for (n_name2 = 0;n_name2 < gen_nb_const_xmlChar_ptr;n_name2++) {
10611 for (n_name3 = 0;n_name3 < gen_nb_const_xmlChar_ptr;n_name3++) {
10612 for (n_f = 0;n_f < gen_nb_xmlHashDeallocator;n_f++) {
10613 mem_base = xmlMemBlocks();
10614 table = gen_xmlHashTablePtr(n_table, 0);
10615 name = gen_const_xmlChar_ptr(n_name, 1);
10616 name2 = gen_const_xmlChar_ptr(n_name2, 2);
10617 name3 = gen_const_xmlChar_ptr(n_name3, 3);
10618 f = gen_xmlHashDeallocator(n_f, 4);
10620 ret_val = xmlHashRemoveEntry3(table, (const xmlChar *)name, (const xmlChar *)name2, (const xmlChar *)name3, f);
10621 desret_int(ret_val);
10623 des_xmlHashTablePtr(n_table, table, 0);
10624 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
10625 des_const_xmlChar_ptr(n_name2, (const xmlChar *)name2, 2);
10626 des_const_xmlChar_ptr(n_name3, (const xmlChar *)name3, 3);
10627 des_xmlHashDeallocator(n_f, f, 4);
10628 xmlResetLastError();
10629 if (mem_base != xmlMemBlocks()) {
10630 printf("Leak of %d blocks found in xmlHashRemoveEntry3",
10631 xmlMemBlocks() - mem_base);
10633 printf(" %d", n_table);
10634 printf(" %d", n_name);
10635 printf(" %d", n_name2);
10636 printf(" %d", n_name3);
10637 printf(" %d", n_f);
10652 test_xmlHashScan(void) {
10656 /* missing type support */
10662 test_xmlHashScan3(void) {
10666 /* missing type support */
10672 test_xmlHashScanFull(void) {
10676 /* missing type support */
10682 test_xmlHashScanFull3(void) {
10686 /* missing type support */
10692 test_xmlHashSize(void) {
10697 xmlHashTablePtr table; /* the hash table */
10700 for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
10701 mem_base = xmlMemBlocks();
10702 table = gen_xmlHashTablePtr(n_table, 0);
10704 ret_val = xmlHashSize(table);
10705 desret_int(ret_val);
10707 des_xmlHashTablePtr(n_table, table, 0);
10708 xmlResetLastError();
10709 if (mem_base != xmlMemBlocks()) {
10710 printf("Leak of %d blocks found in xmlHashSize",
10711 xmlMemBlocks() - mem_base);
10713 printf(" %d", n_table);
10724 test_xmlHashUpdateEntry(void) {
10729 xmlHashTablePtr table; /* the hash table */
10731 xmlChar * name; /* the name of the userdata */
10733 void * userdata; /* a pointer to the userdata */
10735 xmlHashDeallocator f; /* the deallocator function for replaced item (if any) */
10738 for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
10739 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
10740 for (n_userdata = 0;n_userdata < gen_nb_userdata;n_userdata++) {
10741 for (n_f = 0;n_f < gen_nb_xmlHashDeallocator;n_f++) {
10742 mem_base = xmlMemBlocks();
10743 table = gen_xmlHashTablePtr(n_table, 0);
10744 name = gen_const_xmlChar_ptr(n_name, 1);
10745 userdata = gen_userdata(n_userdata, 2);
10746 f = gen_xmlHashDeallocator(n_f, 3);
10748 ret_val = xmlHashUpdateEntry(table, (const xmlChar *)name, userdata, f);
10749 desret_int(ret_val);
10751 des_xmlHashTablePtr(n_table, table, 0);
10752 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
10753 des_userdata(n_userdata, userdata, 2);
10754 des_xmlHashDeallocator(n_f, f, 3);
10755 xmlResetLastError();
10756 if (mem_base != xmlMemBlocks()) {
10757 printf("Leak of %d blocks found in xmlHashUpdateEntry",
10758 xmlMemBlocks() - mem_base);
10760 printf(" %d", n_table);
10761 printf(" %d", n_name);
10762 printf(" %d", n_userdata);
10763 printf(" %d", n_f);
10777 test_xmlHashUpdateEntry2(void) {
10782 xmlHashTablePtr table; /* the hash table */
10784 xmlChar * name; /* the name of the userdata */
10786 xmlChar * name2; /* a second name of the userdata */
10788 void * userdata; /* a pointer to the userdata */
10790 xmlHashDeallocator f; /* the deallocator function for replaced item (if any) */
10793 for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
10794 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
10795 for (n_name2 = 0;n_name2 < gen_nb_const_xmlChar_ptr;n_name2++) {
10796 for (n_userdata = 0;n_userdata < gen_nb_userdata;n_userdata++) {
10797 for (n_f = 0;n_f < gen_nb_xmlHashDeallocator;n_f++) {
10798 mem_base = xmlMemBlocks();
10799 table = gen_xmlHashTablePtr(n_table, 0);
10800 name = gen_const_xmlChar_ptr(n_name, 1);
10801 name2 = gen_const_xmlChar_ptr(n_name2, 2);
10802 userdata = gen_userdata(n_userdata, 3);
10803 f = gen_xmlHashDeallocator(n_f, 4);
10805 ret_val = xmlHashUpdateEntry2(table, (const xmlChar *)name, (const xmlChar *)name2, userdata, f);
10806 desret_int(ret_val);
10808 des_xmlHashTablePtr(n_table, table, 0);
10809 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
10810 des_const_xmlChar_ptr(n_name2, (const xmlChar *)name2, 2);
10811 des_userdata(n_userdata, userdata, 3);
10812 des_xmlHashDeallocator(n_f, f, 4);
10813 xmlResetLastError();
10814 if (mem_base != xmlMemBlocks()) {
10815 printf("Leak of %d blocks found in xmlHashUpdateEntry2",
10816 xmlMemBlocks() - mem_base);
10818 printf(" %d", n_table);
10819 printf(" %d", n_name);
10820 printf(" %d", n_name2);
10821 printf(" %d", n_userdata);
10822 printf(" %d", n_f);
10837 test_xmlHashUpdateEntry3(void) {
10842 xmlHashTablePtr table; /* the hash table */
10844 xmlChar * name; /* the name of the userdata */
10846 xmlChar * name2; /* a second name of the userdata */
10848 xmlChar * name3; /* a third name of the userdata */
10850 void * userdata; /* a pointer to the userdata */
10852 xmlHashDeallocator f; /* the deallocator function for replaced item (if any) */
10855 for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
10856 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
10857 for (n_name2 = 0;n_name2 < gen_nb_const_xmlChar_ptr;n_name2++) {
10858 for (n_name3 = 0;n_name3 < gen_nb_const_xmlChar_ptr;n_name3++) {
10859 for (n_userdata = 0;n_userdata < gen_nb_userdata;n_userdata++) {
10860 for (n_f = 0;n_f < gen_nb_xmlHashDeallocator;n_f++) {
10861 mem_base = xmlMemBlocks();
10862 table = gen_xmlHashTablePtr(n_table, 0);
10863 name = gen_const_xmlChar_ptr(n_name, 1);
10864 name2 = gen_const_xmlChar_ptr(n_name2, 2);
10865 name3 = gen_const_xmlChar_ptr(n_name3, 3);
10866 userdata = gen_userdata(n_userdata, 4);
10867 f = gen_xmlHashDeallocator(n_f, 5);
10869 ret_val = xmlHashUpdateEntry3(table, (const xmlChar *)name, (const xmlChar *)name2, (const xmlChar *)name3, userdata, f);
10870 desret_int(ret_val);
10872 des_xmlHashTablePtr(n_table, table, 0);
10873 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
10874 des_const_xmlChar_ptr(n_name2, (const xmlChar *)name2, 2);
10875 des_const_xmlChar_ptr(n_name3, (const xmlChar *)name3, 3);
10876 des_userdata(n_userdata, userdata, 4);
10877 des_xmlHashDeallocator(n_f, f, 5);
10878 xmlResetLastError();
10879 if (mem_base != xmlMemBlocks()) {
10880 printf("Leak of %d blocks found in xmlHashUpdateEntry3",
10881 xmlMemBlocks() - mem_base);
10883 printf(" %d", n_table);
10884 printf(" %d", n_name);
10885 printf(" %d", n_name2);
10886 printf(" %d", n_name3);
10887 printf(" %d", n_userdata);
10888 printf(" %d", n_f);
10907 if (quiet == 0) printf("Testing hash : 16 of 24 functions ...\n");
10908 rc = test_xmlHashAddEntry();
10909 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10910 rc = test_xmlHashAddEntry2();
10911 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10912 rc = test_xmlHashAddEntry3();
10913 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10914 rc = test_xmlHashCopy();
10915 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10916 rc = test_xmlHashCreate();
10917 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10918 rc = test_xmlHashCreateDict();
10919 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10920 rc = test_xmlHashLookup();
10921 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10922 rc = test_xmlHashLookup2();
10923 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10924 rc = test_xmlHashLookup3();
10925 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10926 rc = test_xmlHashQLookup();
10927 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10928 rc = test_xmlHashQLookup2();
10929 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10930 rc = test_xmlHashQLookup3();
10931 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10932 rc = test_xmlHashRemoveEntry();
10933 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10934 rc = test_xmlHashRemoveEntry2();
10935 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10936 rc = test_xmlHashRemoveEntry3();
10937 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10938 rc = test_xmlHashScan();
10939 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10940 rc = test_xmlHashScan3();
10941 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10942 rc = test_xmlHashScanFull();
10943 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10944 rc = test_xmlHashScanFull3();
10945 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10946 rc = test_xmlHashSize();
10947 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10948 rc = test_xmlHashUpdateEntry();
10949 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10950 rc = test_xmlHashUpdateEntry2();
10951 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10952 rc = test_xmlHashUpdateEntry3();
10953 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
10956 printf("Module hash: %d errors\n", test_ret);
10960 #define gen_nb_xmlLinkPtr 1
10961 static xmlLinkPtr gen_xmlLinkPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
10964 static void des_xmlLinkPtr(int no ATTRIBUTE_UNUSED, xmlLinkPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
10968 test_xmlLinkGetData(void) {
10973 xmlLinkPtr lk; /* a link */
10976 for (n_lk = 0;n_lk < gen_nb_xmlLinkPtr;n_lk++) {
10977 mem_base = xmlMemBlocks();
10978 lk = gen_xmlLinkPtr(n_lk, 0);
10980 ret_val = xmlLinkGetData(lk);
10981 desret_void_ptr(ret_val);
10983 des_xmlLinkPtr(n_lk, lk, 0);
10984 xmlResetLastError();
10985 if (mem_base != xmlMemBlocks()) {
10986 printf("Leak of %d blocks found in xmlLinkGetData",
10987 xmlMemBlocks() - mem_base);
10989 printf(" %d", n_lk);
11000 test_xmlListAppend(void) {
11005 xmlListPtr l; /* a list */
11007 void * data; /* the data */
11010 for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
11011 for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
11012 mem_base = xmlMemBlocks();
11013 l = gen_xmlListPtr(n_l, 0);
11014 data = gen_userdata(n_data, 1);
11016 ret_val = xmlListAppend(l, data);
11017 desret_int(ret_val);
11019 des_xmlListPtr(n_l, l, 0);
11020 des_userdata(n_data, data, 1);
11021 xmlResetLastError();
11022 if (mem_base != xmlMemBlocks()) {
11023 printf("Leak of %d blocks found in xmlListAppend",
11024 xmlMemBlocks() - mem_base);
11026 printf(" %d", n_l);
11027 printf(" %d", n_data);
11039 test_xmlListClear(void) {
11043 xmlListPtr l; /* a list */
11046 for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
11047 mem_base = xmlMemBlocks();
11048 l = gen_xmlListPtr(n_l, 0);
11052 des_xmlListPtr(n_l, l, 0);
11053 xmlResetLastError();
11054 if (mem_base != xmlMemBlocks()) {
11055 printf("Leak of %d blocks found in xmlListClear",
11056 xmlMemBlocks() - mem_base);
11058 printf(" %d", n_l);
11068 #define gen_nb_const_xmlListPtr 1
11069 static xmlListPtr gen_const_xmlListPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
11072 static void des_const_xmlListPtr(int no ATTRIBUTE_UNUSED, const xmlListPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
11076 test_xmlListCopy(void) {
11081 xmlListPtr cur; /* the new list */
11083 xmlListPtr old; /* the old list */
11086 for (n_cur = 0;n_cur < gen_nb_xmlListPtr;n_cur++) {
11087 for (n_old = 0;n_old < gen_nb_const_xmlListPtr;n_old++) {
11088 mem_base = xmlMemBlocks();
11089 cur = gen_xmlListPtr(n_cur, 0);
11090 old = gen_const_xmlListPtr(n_old, 1);
11092 ret_val = xmlListCopy(cur, (const xmlListPtr)old);
11093 desret_int(ret_val);
11095 des_xmlListPtr(n_cur, cur, 0);
11096 des_const_xmlListPtr(n_old, (const xmlListPtr)old, 1);
11097 xmlResetLastError();
11098 if (mem_base != xmlMemBlocks()) {
11099 printf("Leak of %d blocks found in xmlListCopy",
11100 xmlMemBlocks() - mem_base);
11102 printf(" %d", n_cur);
11103 printf(" %d", n_old);
11115 test_xmlListCreate(void) {
11119 /* missing type support */
11125 test_xmlListDup(void) {
11129 /* missing type support */
11135 test_xmlListEmpty(void) {
11140 xmlListPtr l; /* a list */
11143 for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
11144 mem_base = xmlMemBlocks();
11145 l = gen_xmlListPtr(n_l, 0);
11147 ret_val = xmlListEmpty(l);
11148 desret_int(ret_val);
11150 des_xmlListPtr(n_l, l, 0);
11151 xmlResetLastError();
11152 if (mem_base != xmlMemBlocks()) {
11153 printf("Leak of %d blocks found in xmlListEmpty",
11154 xmlMemBlocks() - mem_base);
11156 printf(" %d", n_l);
11167 test_xmlListEnd(void) {
11171 /* missing type support */
11177 test_xmlListFront(void) {
11181 /* missing type support */
11187 test_xmlListInsert(void) {
11192 xmlListPtr l; /* a list */
11194 void * data; /* the data */
11197 for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
11198 for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
11199 mem_base = xmlMemBlocks();
11200 l = gen_xmlListPtr(n_l, 0);
11201 data = gen_userdata(n_data, 1);
11203 ret_val = xmlListInsert(l, data);
11204 desret_int(ret_val);
11206 des_xmlListPtr(n_l, l, 0);
11207 des_userdata(n_data, data, 1);
11208 xmlResetLastError();
11209 if (mem_base != xmlMemBlocks()) {
11210 printf("Leak of %d blocks found in xmlListInsert",
11211 xmlMemBlocks() - mem_base);
11213 printf(" %d", n_l);
11214 printf(" %d", n_data);
11226 test_xmlListMerge(void) {
11230 xmlListPtr l1; /* the original list */
11232 xmlListPtr l2; /* the new list */
11235 for (n_l1 = 0;n_l1 < gen_nb_xmlListPtr;n_l1++) {
11236 for (n_l2 = 0;n_l2 < gen_nb_xmlListPtr;n_l2++) {
11237 mem_base = xmlMemBlocks();
11238 l1 = gen_xmlListPtr(n_l1, 0);
11239 l2 = gen_xmlListPtr(n_l2, 1);
11241 xmlListMerge(l1, l2);
11243 des_xmlListPtr(n_l1, l1, 0);
11244 des_xmlListPtr(n_l2, l2, 1);
11245 xmlResetLastError();
11246 if (mem_base != xmlMemBlocks()) {
11247 printf("Leak of %d blocks found in xmlListMerge",
11248 xmlMemBlocks() - mem_base);
11250 printf(" %d", n_l1);
11251 printf(" %d", n_l2);
11263 test_xmlListPopBack(void) {
11267 xmlListPtr l; /* a list */
11270 for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
11271 mem_base = xmlMemBlocks();
11272 l = gen_xmlListPtr(n_l, 0);
11276 des_xmlListPtr(n_l, l, 0);
11277 xmlResetLastError();
11278 if (mem_base != xmlMemBlocks()) {
11279 printf("Leak of %d blocks found in xmlListPopBack",
11280 xmlMemBlocks() - mem_base);
11282 printf(" %d", n_l);
11293 test_xmlListPopFront(void) {
11297 xmlListPtr l; /* a list */
11300 for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
11301 mem_base = xmlMemBlocks();
11302 l = gen_xmlListPtr(n_l, 0);
11304 xmlListPopFront(l);
11306 des_xmlListPtr(n_l, l, 0);
11307 xmlResetLastError();
11308 if (mem_base != xmlMemBlocks()) {
11309 printf("Leak of %d blocks found in xmlListPopFront",
11310 xmlMemBlocks() - mem_base);
11312 printf(" %d", n_l);
11323 test_xmlListPushBack(void) {
11328 xmlListPtr l; /* a list */
11330 void * data; /* new data */
11333 for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
11334 for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
11335 mem_base = xmlMemBlocks();
11336 l = gen_xmlListPtr(n_l, 0);
11337 data = gen_userdata(n_data, 1);
11339 ret_val = xmlListPushBack(l, data);
11340 desret_int(ret_val);
11342 des_xmlListPtr(n_l, l, 0);
11343 des_userdata(n_data, data, 1);
11344 xmlResetLastError();
11345 if (mem_base != xmlMemBlocks()) {
11346 printf("Leak of %d blocks found in xmlListPushBack",
11347 xmlMemBlocks() - mem_base);
11349 printf(" %d", n_l);
11350 printf(" %d", n_data);
11362 test_xmlListPushFront(void) {
11367 xmlListPtr l; /* a list */
11369 void * data; /* new data */
11372 for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
11373 for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
11374 mem_base = xmlMemBlocks();
11375 l = gen_xmlListPtr(n_l, 0);
11376 data = gen_userdata(n_data, 1);
11378 ret_val = xmlListPushFront(l, data);
11379 desret_int(ret_val);
11381 des_xmlListPtr(n_l, l, 0);
11382 des_userdata(n_data, data, 1);
11383 xmlResetLastError();
11384 if (mem_base != xmlMemBlocks()) {
11385 printf("Leak of %d blocks found in xmlListPushFront",
11386 xmlMemBlocks() - mem_base);
11388 printf(" %d", n_l);
11389 printf(" %d", n_data);
11401 test_xmlListRemoveAll(void) {
11406 xmlListPtr l; /* a list */
11408 void * data; /* list data */
11411 for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
11412 for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
11413 mem_base = xmlMemBlocks();
11414 l = gen_xmlListPtr(n_l, 0);
11415 data = gen_userdata(n_data, 1);
11417 ret_val = xmlListRemoveAll(l, data);
11418 desret_int(ret_val);
11420 des_xmlListPtr(n_l, l, 0);
11421 des_userdata(n_data, data, 1);
11422 xmlResetLastError();
11423 if (mem_base != xmlMemBlocks()) {
11424 printf("Leak of %d blocks found in xmlListRemoveAll",
11425 xmlMemBlocks() - mem_base);
11427 printf(" %d", n_l);
11428 printf(" %d", n_data);
11440 test_xmlListRemoveFirst(void) {
11445 xmlListPtr l; /* a list */
11447 void * data; /* list data */
11450 for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
11451 for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
11452 mem_base = xmlMemBlocks();
11453 l = gen_xmlListPtr(n_l, 0);
11454 data = gen_userdata(n_data, 1);
11456 ret_val = xmlListRemoveFirst(l, data);
11457 desret_int(ret_val);
11459 des_xmlListPtr(n_l, l, 0);
11460 des_userdata(n_data, data, 1);
11461 xmlResetLastError();
11462 if (mem_base != xmlMemBlocks()) {
11463 printf("Leak of %d blocks found in xmlListRemoveFirst",
11464 xmlMemBlocks() - mem_base);
11466 printf(" %d", n_l);
11467 printf(" %d", n_data);
11479 test_xmlListRemoveLast(void) {
11484 xmlListPtr l; /* a list */
11486 void * data; /* list data */
11489 for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
11490 for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
11491 mem_base = xmlMemBlocks();
11492 l = gen_xmlListPtr(n_l, 0);
11493 data = gen_userdata(n_data, 1);
11495 ret_val = xmlListRemoveLast(l, data);
11496 desret_int(ret_val);
11498 des_xmlListPtr(n_l, l, 0);
11499 des_userdata(n_data, data, 1);
11500 xmlResetLastError();
11501 if (mem_base != xmlMemBlocks()) {
11502 printf("Leak of %d blocks found in xmlListRemoveLast",
11503 xmlMemBlocks() - mem_base);
11505 printf(" %d", n_l);
11506 printf(" %d", n_data);
11518 test_xmlListReverse(void) {
11522 xmlListPtr l; /* a list */
11525 for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
11526 mem_base = xmlMemBlocks();
11527 l = gen_xmlListPtr(n_l, 0);
11531 des_xmlListPtr(n_l, l, 0);
11532 xmlResetLastError();
11533 if (mem_base != xmlMemBlocks()) {
11534 printf("Leak of %d blocks found in xmlListReverse",
11535 xmlMemBlocks() - mem_base);
11537 printf(" %d", n_l);
11548 test_xmlListReverseSearch(void) {
11553 xmlListPtr l; /* a list */
11555 void * data; /* a search value */
11558 for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
11559 for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
11560 mem_base = xmlMemBlocks();
11561 l = gen_xmlListPtr(n_l, 0);
11562 data = gen_userdata(n_data, 1);
11564 ret_val = xmlListReverseSearch(l, data);
11565 desret_void_ptr(ret_val);
11567 des_xmlListPtr(n_l, l, 0);
11568 des_userdata(n_data, data, 1);
11569 xmlResetLastError();
11570 if (mem_base != xmlMemBlocks()) {
11571 printf("Leak of %d blocks found in xmlListReverseSearch",
11572 xmlMemBlocks() - mem_base);
11574 printf(" %d", n_l);
11575 printf(" %d", n_data);
11587 test_xmlListReverseWalk(void) {
11591 /* missing type support */
11597 test_xmlListSearch(void) {
11602 xmlListPtr l; /* a list */
11604 void * data; /* a search value */
11607 for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
11608 for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
11609 mem_base = xmlMemBlocks();
11610 l = gen_xmlListPtr(n_l, 0);
11611 data = gen_userdata(n_data, 1);
11613 ret_val = xmlListSearch(l, data);
11614 desret_void_ptr(ret_val);
11616 des_xmlListPtr(n_l, l, 0);
11617 des_userdata(n_data, data, 1);
11618 xmlResetLastError();
11619 if (mem_base != xmlMemBlocks()) {
11620 printf("Leak of %d blocks found in xmlListSearch",
11621 xmlMemBlocks() - mem_base);
11623 printf(" %d", n_l);
11624 printf(" %d", n_data);
11636 test_xmlListSize(void) {
11641 xmlListPtr l; /* a list */
11644 for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
11645 mem_base = xmlMemBlocks();
11646 l = gen_xmlListPtr(n_l, 0);
11648 ret_val = xmlListSize(l);
11649 desret_int(ret_val);
11651 des_xmlListPtr(n_l, l, 0);
11652 xmlResetLastError();
11653 if (mem_base != xmlMemBlocks()) {
11654 printf("Leak of %d blocks found in xmlListSize",
11655 xmlMemBlocks() - mem_base);
11657 printf(" %d", n_l);
11668 test_xmlListSort(void) {
11672 xmlListPtr l; /* a list */
11675 for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
11676 mem_base = xmlMemBlocks();
11677 l = gen_xmlListPtr(n_l, 0);
11681 des_xmlListPtr(n_l, l, 0);
11682 xmlResetLastError();
11683 if (mem_base != xmlMemBlocks()) {
11684 printf("Leak of %d blocks found in xmlListSort",
11685 xmlMemBlocks() - mem_base);
11687 printf(" %d", n_l);
11698 test_xmlListWalk(void) {
11702 /* missing type support */
11711 if (quiet == 0) printf("Testing list : 19 of 26 functions ...\n");
11712 rc = test_xmlLinkGetData();
11713 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11714 rc = test_xmlListAppend();
11715 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11716 rc = test_xmlListClear();
11717 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11718 rc = test_xmlListCopy();
11719 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11720 rc = test_xmlListCreate();
11721 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11722 rc = test_xmlListDup();
11723 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11724 rc = test_xmlListEmpty();
11725 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11726 rc = test_xmlListEnd();
11727 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11728 rc = test_xmlListFront();
11729 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11730 rc = test_xmlListInsert();
11731 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11732 rc = test_xmlListMerge();
11733 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11734 rc = test_xmlListPopBack();
11735 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11736 rc = test_xmlListPopFront();
11737 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11738 rc = test_xmlListPushBack();
11739 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11740 rc = test_xmlListPushFront();
11741 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11742 rc = test_xmlListRemoveAll();
11743 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11744 rc = test_xmlListRemoveFirst();
11745 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11746 rc = test_xmlListRemoveLast();
11747 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11748 rc = test_xmlListReverse();
11749 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11750 rc = test_xmlListReverseSearch();
11751 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11752 rc = test_xmlListReverseWalk();
11753 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11754 rc = test_xmlListSearch();
11755 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11756 rc = test_xmlListSize();
11757 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11758 rc = test_xmlListSort();
11759 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11760 rc = test_xmlListWalk();
11761 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
11764 printf("Module list: %d errors\n", test_ret);
11769 test_xmlNanoFTPCheckResponse(void) {
11772 #if defined(LIBXML_FTP_ENABLED)
11775 void * ctx; /* an FTP context */
11778 for (n_ctx = 0;n_ctx < gen_nb_xmlNanoFTPCtxtPtr;n_ctx++) {
11779 mem_base = xmlMemBlocks();
11780 ctx = gen_xmlNanoFTPCtxtPtr(n_ctx, 0);
11782 ret_val = xmlNanoFTPCheckResponse(ctx);
11783 desret_int(ret_val);
11785 des_xmlNanoFTPCtxtPtr(n_ctx, ctx, 0);
11786 xmlResetLastError();
11787 if (mem_base != xmlMemBlocks()) {
11788 printf("Leak of %d blocks found in xmlNanoFTPCheckResponse",
11789 xmlMemBlocks() - mem_base);
11791 printf(" %d", n_ctx);
11803 test_xmlNanoFTPCleanup(void) {
11806 #if defined(LIBXML_FTP_ENABLED)
11809 mem_base = xmlMemBlocks();
11811 xmlNanoFTPCleanup();
11813 xmlResetLastError();
11814 if (mem_base != xmlMemBlocks()) {
11815 printf("Leak of %d blocks found in xmlNanoFTPCleanup",
11816 xmlMemBlocks() - mem_base);
11828 test_xmlNanoFTPCloseConnection(void) {
11831 #if defined(LIBXML_FTP_ENABLED)
11834 void * ctx; /* an FTP context */
11837 for (n_ctx = 0;n_ctx < gen_nb_xmlNanoFTPCtxtPtr;n_ctx++) {
11838 mem_base = xmlMemBlocks();
11839 ctx = gen_xmlNanoFTPCtxtPtr(n_ctx, 0);
11841 ret_val = xmlNanoFTPCloseConnection(ctx);
11842 desret_int(ret_val);
11844 des_xmlNanoFTPCtxtPtr(n_ctx, ctx, 0);
11845 xmlResetLastError();
11846 if (mem_base != xmlMemBlocks()) {
11847 printf("Leak of %d blocks found in xmlNanoFTPCloseConnection",
11848 xmlMemBlocks() - mem_base);
11850 printf(" %d", n_ctx);
11862 test_xmlNanoFTPCwd(void) {
11865 #if defined(LIBXML_FTP_ENABLED)
11868 void * ctx; /* an FTP context */
11870 char * directory; /* a directory on the server */
11873 for (n_ctx = 0;n_ctx < gen_nb_xmlNanoFTPCtxtPtr;n_ctx++) {
11874 for (n_directory = 0;n_directory < gen_nb_const_char_ptr;n_directory++) {
11875 mem_base = xmlMemBlocks();
11876 ctx = gen_xmlNanoFTPCtxtPtr(n_ctx, 0);
11877 directory = gen_const_char_ptr(n_directory, 1);
11879 ret_val = xmlNanoFTPCwd(ctx, (const char *)directory);
11880 desret_int(ret_val);
11882 des_xmlNanoFTPCtxtPtr(n_ctx, ctx, 0);
11883 des_const_char_ptr(n_directory, (const char *)directory, 1);
11884 xmlResetLastError();
11885 if (mem_base != xmlMemBlocks()) {
11886 printf("Leak of %d blocks found in xmlNanoFTPCwd",
11887 xmlMemBlocks() - mem_base);
11889 printf(" %d", n_ctx);
11890 printf(" %d", n_directory);
11903 test_xmlNanoFTPDele(void) {
11906 #if defined(LIBXML_FTP_ENABLED)
11909 void * ctx; /* an FTP context */
11911 const char * file; /* a file or directory on the server */
11914 for (n_ctx = 0;n_ctx < gen_nb_xmlNanoFTPCtxtPtr;n_ctx++) {
11915 for (n_file = 0;n_file < gen_nb_filepath;n_file++) {
11916 mem_base = xmlMemBlocks();
11917 ctx = gen_xmlNanoFTPCtxtPtr(n_ctx, 0);
11918 file = gen_filepath(n_file, 1);
11920 ret_val = xmlNanoFTPDele(ctx, file);
11921 desret_int(ret_val);
11923 des_xmlNanoFTPCtxtPtr(n_ctx, ctx, 0);
11924 des_filepath(n_file, file, 1);
11925 xmlResetLastError();
11926 if (mem_base != xmlMemBlocks()) {
11927 printf("Leak of %d blocks found in xmlNanoFTPDele",
11928 xmlMemBlocks() - mem_base);
11930 printf(" %d", n_ctx);
11931 printf(" %d", n_file);
11944 test_xmlNanoFTPGet(void) {
11948 /* missing type support */
11954 test_xmlNanoFTPGetConnection(void) {
11958 /* missing type support */
11964 test_xmlNanoFTPGetResponse(void) {
11967 #if defined(LIBXML_FTP_ENABLED)
11970 void * ctx; /* an FTP context */
11973 for (n_ctx = 0;n_ctx < gen_nb_xmlNanoFTPCtxtPtr;n_ctx++) {
11974 mem_base = xmlMemBlocks();
11975 ctx = gen_xmlNanoFTPCtxtPtr(n_ctx, 0);
11977 ret_val = xmlNanoFTPGetResponse(ctx);
11978 desret_int(ret_val);
11980 des_xmlNanoFTPCtxtPtr(n_ctx, ctx, 0);
11981 xmlResetLastError();
11982 if (mem_base != xmlMemBlocks()) {
11983 printf("Leak of %d blocks found in xmlNanoFTPGetResponse",
11984 xmlMemBlocks() - mem_base);
11986 printf(" %d", n_ctx);
11998 test_xmlNanoFTPGetSocket(void) {
12002 /* missing type support */
12008 test_xmlNanoFTPInit(void) {
12011 #if defined(LIBXML_FTP_ENABLED)
12014 mem_base = xmlMemBlocks();
12018 xmlResetLastError();
12019 if (mem_base != xmlMemBlocks()) {
12020 printf("Leak of %d blocks found in xmlNanoFTPInit",
12021 xmlMemBlocks() - mem_base);
12033 test_xmlNanoFTPList(void) {
12037 /* missing type support */
12043 test_xmlNanoFTPNewCtxt(void) {
12046 #if defined(LIBXML_FTP_ENABLED)
12049 const char * URL; /* The URL used to initialize the context */
12052 for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
12053 mem_base = xmlMemBlocks();
12054 URL = gen_filepath(n_URL, 0);
12056 ret_val = xmlNanoFTPNewCtxt(URL);
12057 desret_xmlNanoFTPCtxtPtr(ret_val);
12059 des_filepath(n_URL, URL, 0);
12060 xmlResetLastError();
12061 if (mem_base != xmlMemBlocks()) {
12062 printf("Leak of %d blocks found in xmlNanoFTPNewCtxt",
12063 xmlMemBlocks() - mem_base);
12065 printf(" %d", n_URL);
12077 test_xmlNanoFTPOpen(void) {
12080 #if defined(LIBXML_FTP_ENABLED)
12083 const char * URL; /* the URL to the resource */
12086 for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
12087 mem_base = xmlMemBlocks();
12088 URL = gen_filepath(n_URL, 0);
12090 ret_val = xmlNanoFTPOpen(URL);
12091 desret_xmlNanoFTPCtxtPtr(ret_val);
12093 des_filepath(n_URL, URL, 0);
12094 xmlResetLastError();
12095 if (mem_base != xmlMemBlocks()) {
12096 printf("Leak of %d blocks found in xmlNanoFTPOpen",
12097 xmlMemBlocks() - mem_base);
12099 printf(" %d", n_URL);
12111 test_xmlNanoFTPProxy(void) {
12114 #if defined(LIBXML_FTP_ENABLED)
12115 char * host; /* the proxy host name */
12117 int port; /* the proxy port */
12119 char * user; /* the proxy user name */
12121 char * passwd; /* the proxy password */
12123 int type; /* the type of proxy 1 for using SITE, 2 for USER a@b */
12126 for (n_host = 0;n_host < gen_nb_const_char_ptr;n_host++) {
12127 for (n_port = 0;n_port < gen_nb_int;n_port++) {
12128 for (n_user = 0;n_user < gen_nb_const_char_ptr;n_user++) {
12129 for (n_passwd = 0;n_passwd < gen_nb_const_char_ptr;n_passwd++) {
12130 for (n_type = 0;n_type < gen_nb_int;n_type++) {
12131 host = gen_const_char_ptr(n_host, 0);
12132 port = gen_int(n_port, 1);
12133 user = gen_const_char_ptr(n_user, 2);
12134 passwd = gen_const_char_ptr(n_passwd, 3);
12135 type = gen_int(n_type, 4);
12137 xmlNanoFTPProxy((const char *)host, port, (const char *)user, (const char *)passwd, type);
12139 des_const_char_ptr(n_host, (const char *)host, 0);
12140 des_int(n_port, port, 1);
12141 des_const_char_ptr(n_user, (const char *)user, 2);
12142 des_const_char_ptr(n_passwd, (const char *)passwd, 3);
12143 des_int(n_type, type, 4);
12144 xmlResetLastError();
12158 test_xmlNanoFTPQuit(void) {
12161 #if defined(LIBXML_FTP_ENABLED)
12164 void * ctx; /* an FTP context */
12167 for (n_ctx = 0;n_ctx < gen_nb_xmlNanoFTPCtxtPtr;n_ctx++) {
12168 mem_base = xmlMemBlocks();
12169 ctx = gen_xmlNanoFTPCtxtPtr(n_ctx, 0);
12171 ret_val = xmlNanoFTPQuit(ctx);
12172 desret_int(ret_val);
12174 des_xmlNanoFTPCtxtPtr(n_ctx, ctx, 0);
12175 xmlResetLastError();
12176 if (mem_base != xmlMemBlocks()) {
12177 printf("Leak of %d blocks found in xmlNanoFTPQuit",
12178 xmlMemBlocks() - mem_base);
12180 printf(" %d", n_ctx);
12192 test_xmlNanoFTPRead(void) {
12195 #if defined(LIBXML_FTP_ENABLED)
12198 void * ctx; /* the FTP context */
12200 void * dest; /* a buffer */
12202 int len; /* the buffer length */
12205 for (n_ctx = 0;n_ctx < gen_nb_xmlNanoFTPCtxtPtr;n_ctx++) {
12206 for (n_dest = 0;n_dest < gen_nb_void_ptr;n_dest++) {
12207 for (n_len = 0;n_len < gen_nb_int;n_len++) {
12208 mem_base = xmlMemBlocks();
12209 ctx = gen_xmlNanoFTPCtxtPtr(n_ctx, 0);
12210 dest = gen_void_ptr(n_dest, 1);
12211 len = gen_int(n_len, 2);
12213 ret_val = xmlNanoFTPRead(ctx, dest, len);
12214 desret_int(ret_val);
12216 des_xmlNanoFTPCtxtPtr(n_ctx, ctx, 0);
12217 des_void_ptr(n_dest, dest, 1);
12218 des_int(n_len, len, 2);
12219 xmlResetLastError();
12220 if (mem_base != xmlMemBlocks()) {
12221 printf("Leak of %d blocks found in xmlNanoFTPRead",
12222 xmlMemBlocks() - mem_base);
12224 printf(" %d", n_ctx);
12225 printf(" %d", n_dest);
12226 printf(" %d", n_len);
12240 test_xmlNanoFTPScanProxy(void) {
12243 #if defined(LIBXML_FTP_ENABLED)
12244 const char * URL; /* The proxy URL used to initialize the proxy context */
12247 for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
12248 URL = gen_filepath(n_URL, 0);
12250 xmlNanoFTPScanProxy(URL);
12252 des_filepath(n_URL, URL, 0);
12253 xmlResetLastError();
12263 test_xmlNanoFTPUpdateURL(void) {
12266 #if defined(LIBXML_FTP_ENABLED)
12269 void * ctx; /* an FTP context */
12271 const char * URL; /* The URL used to update the context */
12274 for (n_ctx = 0;n_ctx < gen_nb_xmlNanoFTPCtxtPtr;n_ctx++) {
12275 for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
12276 mem_base = xmlMemBlocks();
12277 ctx = gen_xmlNanoFTPCtxtPtr(n_ctx, 0);
12278 URL = gen_filepath(n_URL, 1);
12280 ret_val = xmlNanoFTPUpdateURL(ctx, URL);
12281 desret_int(ret_val);
12283 des_xmlNanoFTPCtxtPtr(n_ctx, ctx, 0);
12284 des_filepath(n_URL, URL, 1);
12285 xmlResetLastError();
12286 if (mem_base != xmlMemBlocks()) {
12287 printf("Leak of %d blocks found in xmlNanoFTPUpdateURL",
12288 xmlMemBlocks() - mem_base);
12290 printf(" %d", n_ctx);
12291 printf(" %d", n_URL);
12303 test_nanoftp(void) {
12307 if (quiet == 0) printf("Testing nanoftp : 14 of 22 functions ...\n");
12308 rc = test_xmlNanoFTPCheckResponse();
12309 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12310 rc = test_xmlNanoFTPCleanup();
12311 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12312 rc = test_xmlNanoFTPCloseConnection();
12313 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12314 rc = test_xmlNanoFTPCwd();
12315 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12316 rc = test_xmlNanoFTPDele();
12317 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12318 rc = test_xmlNanoFTPGet();
12319 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12320 rc = test_xmlNanoFTPGetConnection();
12321 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12322 rc = test_xmlNanoFTPGetResponse();
12323 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12324 rc = test_xmlNanoFTPGetSocket();
12325 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12326 rc = test_xmlNanoFTPInit();
12327 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12328 rc = test_xmlNanoFTPList();
12329 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12330 rc = test_xmlNanoFTPNewCtxt();
12331 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12332 rc = test_xmlNanoFTPOpen();
12333 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12334 rc = test_xmlNanoFTPProxy();
12335 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12336 rc = test_xmlNanoFTPQuit();
12337 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12338 rc = test_xmlNanoFTPRead();
12339 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12340 rc = test_xmlNanoFTPScanProxy();
12341 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12342 rc = test_xmlNanoFTPUpdateURL();
12343 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12346 printf("Module nanoftp: %d errors\n", test_ret);
12351 test_xmlNanoHTTPAuthHeader(void) {
12354 #if defined(LIBXML_HTTP_ENABLED)
12356 const char * ret_val;
12357 void * ctx; /* the HTTP context */
12360 for (n_ctx = 0;n_ctx < gen_nb_xmlNanoHTTPCtxtPtr;n_ctx++) {
12361 mem_base = xmlMemBlocks();
12362 ctx = gen_xmlNanoHTTPCtxtPtr(n_ctx, 0);
12364 ret_val = xmlNanoHTTPAuthHeader(ctx);
12365 desret_const_char_ptr(ret_val);
12367 des_xmlNanoHTTPCtxtPtr(n_ctx, ctx, 0);
12368 xmlResetLastError();
12369 if (mem_base != xmlMemBlocks()) {
12370 printf("Leak of %d blocks found in xmlNanoHTTPAuthHeader",
12371 xmlMemBlocks() - mem_base);
12373 printf(" %d", n_ctx);
12385 test_xmlNanoHTTPCleanup(void) {
12388 #if defined(LIBXML_HTTP_ENABLED)
12391 mem_base = xmlMemBlocks();
12393 xmlNanoHTTPCleanup();
12395 xmlResetLastError();
12396 if (mem_base != xmlMemBlocks()) {
12397 printf("Leak of %d blocks found in xmlNanoHTTPCleanup",
12398 xmlMemBlocks() - mem_base);
12410 test_xmlNanoHTTPContentLength(void) {
12413 #if defined(LIBXML_HTTP_ENABLED)
12416 void * ctx; /* the HTTP context */
12419 for (n_ctx = 0;n_ctx < gen_nb_xmlNanoHTTPCtxtPtr;n_ctx++) {
12420 mem_base = xmlMemBlocks();
12421 ctx = gen_xmlNanoHTTPCtxtPtr(n_ctx, 0);
12423 ret_val = xmlNanoHTTPContentLength(ctx);
12424 desret_int(ret_val);
12426 des_xmlNanoHTTPCtxtPtr(n_ctx, ctx, 0);
12427 xmlResetLastError();
12428 if (mem_base != xmlMemBlocks()) {
12429 printf("Leak of %d blocks found in xmlNanoHTTPContentLength",
12430 xmlMemBlocks() - mem_base);
12432 printf(" %d", n_ctx);
12444 test_xmlNanoHTTPEncoding(void) {
12447 #if defined(LIBXML_HTTP_ENABLED)
12449 const char * ret_val;
12450 void * ctx; /* the HTTP context */
12453 for (n_ctx = 0;n_ctx < gen_nb_xmlNanoHTTPCtxtPtr;n_ctx++) {
12454 mem_base = xmlMemBlocks();
12455 ctx = gen_xmlNanoHTTPCtxtPtr(n_ctx, 0);
12457 ret_val = xmlNanoHTTPEncoding(ctx);
12458 desret_const_char_ptr(ret_val);
12460 des_xmlNanoHTTPCtxtPtr(n_ctx, ctx, 0);
12461 xmlResetLastError();
12462 if (mem_base != xmlMemBlocks()) {
12463 printf("Leak of %d blocks found in xmlNanoHTTPEncoding",
12464 xmlMemBlocks() - mem_base);
12466 printf(" %d", n_ctx);
12477 #define gen_nb_char_ptr_ptr 1
12478 static char ** gen_char_ptr_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
12481 static void des_char_ptr_ptr(int no ATTRIBUTE_UNUSED, char ** val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
12485 test_xmlNanoHTTPFetch(void) {
12488 #if defined(LIBXML_HTTP_ENABLED)
12491 const char * URL; /* The URL to load */
12493 const char * filename; /* the filename where the content should be saved */
12495 char ** contentType; /* if available the Content-Type information will be returned at that location */
12498 for (n_URL = 0;n_URL < gen_nb_fileoutput;n_URL++) {
12499 for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
12500 for (n_contentType = 0;n_contentType < gen_nb_char_ptr_ptr;n_contentType++) {
12501 mem_base = xmlMemBlocks();
12502 URL = gen_fileoutput(n_URL, 0);
12503 filename = gen_fileoutput(n_filename, 1);
12504 contentType = gen_char_ptr_ptr(n_contentType, 2);
12506 ret_val = xmlNanoHTTPFetch(URL, filename, contentType);
12507 desret_int(ret_val);
12509 des_fileoutput(n_URL, URL, 0);
12510 des_fileoutput(n_filename, filename, 1);
12511 des_char_ptr_ptr(n_contentType, contentType, 2);
12512 xmlResetLastError();
12513 if (mem_base != xmlMemBlocks()) {
12514 printf("Leak of %d blocks found in xmlNanoHTTPFetch",
12515 xmlMemBlocks() - mem_base);
12517 printf(" %d", n_URL);
12518 printf(" %d", n_filename);
12519 printf(" %d", n_contentType);
12533 test_xmlNanoHTTPInit(void) {
12536 #if defined(LIBXML_HTTP_ENABLED)
12539 mem_base = xmlMemBlocks();
12543 xmlResetLastError();
12544 if (mem_base != xmlMemBlocks()) {
12545 printf("Leak of %d blocks found in xmlNanoHTTPInit",
12546 xmlMemBlocks() - mem_base);
12558 test_xmlNanoHTTPMimeType(void) {
12561 #if defined(LIBXML_HTTP_ENABLED)
12563 const char * ret_val;
12564 void * ctx; /* the HTTP context */
12567 for (n_ctx = 0;n_ctx < gen_nb_xmlNanoHTTPCtxtPtr;n_ctx++) {
12568 mem_base = xmlMemBlocks();
12569 ctx = gen_xmlNanoHTTPCtxtPtr(n_ctx, 0);
12571 ret_val = xmlNanoHTTPMimeType(ctx);
12572 desret_const_char_ptr(ret_val);
12574 des_xmlNanoHTTPCtxtPtr(n_ctx, ctx, 0);
12575 xmlResetLastError();
12576 if (mem_base != xmlMemBlocks()) {
12577 printf("Leak of %d blocks found in xmlNanoHTTPMimeType",
12578 xmlMemBlocks() - mem_base);
12580 printf(" %d", n_ctx);
12592 test_xmlNanoHTTPOpen(void) {
12595 #if defined(LIBXML_HTTP_ENABLED)
12598 const char * URL; /* The URL to load */
12600 char ** contentType; /* if available the Content-Type information will be returned at that location */
12603 for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
12604 for (n_contentType = 0;n_contentType < gen_nb_char_ptr_ptr;n_contentType++) {
12605 mem_base = xmlMemBlocks();
12606 URL = gen_filepath(n_URL, 0);
12607 contentType = gen_char_ptr_ptr(n_contentType, 1);
12609 ret_val = xmlNanoHTTPOpen(URL, contentType);
12610 desret_xmlNanoHTTPCtxtPtr(ret_val);
12612 des_filepath(n_URL, URL, 0);
12613 des_char_ptr_ptr(n_contentType, contentType, 1);
12614 xmlResetLastError();
12615 if (mem_base != xmlMemBlocks()) {
12616 printf("Leak of %d blocks found in xmlNanoHTTPOpen",
12617 xmlMemBlocks() - mem_base);
12619 printf(" %d", n_URL);
12620 printf(" %d", n_contentType);
12633 test_xmlNanoHTTPOpenRedir(void) {
12636 #if defined(LIBXML_HTTP_ENABLED)
12639 const char * URL; /* The URL to load */
12641 char ** contentType; /* if available the Content-Type information will be returned at that location */
12643 char ** redir; /* if available the redirected URL will be returned */
12646 for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
12647 for (n_contentType = 0;n_contentType < gen_nb_char_ptr_ptr;n_contentType++) {
12648 for (n_redir = 0;n_redir < gen_nb_char_ptr_ptr;n_redir++) {
12649 mem_base = xmlMemBlocks();
12650 URL = gen_filepath(n_URL, 0);
12651 contentType = gen_char_ptr_ptr(n_contentType, 1);
12652 redir = gen_char_ptr_ptr(n_redir, 2);
12654 ret_val = xmlNanoHTTPOpenRedir(URL, contentType, redir);
12655 desret_xmlNanoHTTPCtxtPtr(ret_val);
12657 des_filepath(n_URL, URL, 0);
12658 des_char_ptr_ptr(n_contentType, contentType, 1);
12659 des_char_ptr_ptr(n_redir, redir, 2);
12660 xmlResetLastError();
12661 if (mem_base != xmlMemBlocks()) {
12662 printf("Leak of %d blocks found in xmlNanoHTTPOpenRedir",
12663 xmlMemBlocks() - mem_base);
12665 printf(" %d", n_URL);
12666 printf(" %d", n_contentType);
12667 printf(" %d", n_redir);
12681 test_xmlNanoHTTPRead(void) {
12684 #if defined(LIBXML_HTTP_ENABLED)
12687 void * ctx; /* the HTTP context */
12689 void * dest; /* a buffer */
12691 int len; /* the buffer length */
12694 for (n_ctx = 0;n_ctx < gen_nb_xmlNanoHTTPCtxtPtr;n_ctx++) {
12695 for (n_dest = 0;n_dest < gen_nb_void_ptr;n_dest++) {
12696 for (n_len = 0;n_len < gen_nb_int;n_len++) {
12697 mem_base = xmlMemBlocks();
12698 ctx = gen_xmlNanoHTTPCtxtPtr(n_ctx, 0);
12699 dest = gen_void_ptr(n_dest, 1);
12700 len = gen_int(n_len, 2);
12702 ret_val = xmlNanoHTTPRead(ctx, dest, len);
12703 desret_int(ret_val);
12705 des_xmlNanoHTTPCtxtPtr(n_ctx, ctx, 0);
12706 des_void_ptr(n_dest, dest, 1);
12707 des_int(n_len, len, 2);
12708 xmlResetLastError();
12709 if (mem_base != xmlMemBlocks()) {
12710 printf("Leak of %d blocks found in xmlNanoHTTPRead",
12711 xmlMemBlocks() - mem_base);
12713 printf(" %d", n_ctx);
12714 printf(" %d", n_dest);
12715 printf(" %d", n_len);
12729 test_xmlNanoHTTPRedir(void) {
12733 /* missing type support */
12739 test_xmlNanoHTTPReturnCode(void) {
12742 #if defined(LIBXML_HTTP_ENABLED)
12745 void * ctx; /* the HTTP context */
12748 for (n_ctx = 0;n_ctx < gen_nb_xmlNanoHTTPCtxtPtr;n_ctx++) {
12749 mem_base = xmlMemBlocks();
12750 ctx = gen_xmlNanoHTTPCtxtPtr(n_ctx, 0);
12752 ret_val = xmlNanoHTTPReturnCode(ctx);
12753 desret_int(ret_val);
12755 des_xmlNanoHTTPCtxtPtr(n_ctx, ctx, 0);
12756 xmlResetLastError();
12757 if (mem_base != xmlMemBlocks()) {
12758 printf("Leak of %d blocks found in xmlNanoHTTPReturnCode",
12759 xmlMemBlocks() - mem_base);
12761 printf(" %d", n_ctx);
12773 test_xmlNanoHTTPSave(void) {
12776 #if defined(LIBXML_HTTP_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
12779 void * ctxt; /* the HTTP context */
12781 const char * filename; /* the filename where the content should be saved */
12784 for (n_ctxt = 0;n_ctxt < gen_nb_void_ptr;n_ctxt++) {
12785 for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
12786 mem_base = xmlMemBlocks();
12787 ctxt = gen_void_ptr(n_ctxt, 0);
12788 filename = gen_fileoutput(n_filename, 1);
12790 ret_val = xmlNanoHTTPSave(ctxt, filename);
12791 desret_int(ret_val);
12793 des_void_ptr(n_ctxt, ctxt, 0);
12794 des_fileoutput(n_filename, filename, 1);
12795 xmlResetLastError();
12796 if (mem_base != xmlMemBlocks()) {
12797 printf("Leak of %d blocks found in xmlNanoHTTPSave",
12798 xmlMemBlocks() - mem_base);
12800 printf(" %d", n_ctxt);
12801 printf(" %d", n_filename);
12814 test_xmlNanoHTTPScanProxy(void) {
12817 #if defined(LIBXML_HTTP_ENABLED)
12818 const char * URL; /* The proxy URL used to initialize the proxy context */
12821 for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
12822 URL = gen_filepath(n_URL, 0);
12824 xmlNanoHTTPScanProxy(URL);
12826 des_filepath(n_URL, URL, 0);
12827 xmlResetLastError();
12836 test_nanohttp(void) {
12840 if (quiet == 0) printf("Testing nanohttp : 13 of 17 functions ...\n");
12841 rc = test_xmlNanoHTTPAuthHeader();
12842 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12843 rc = test_xmlNanoHTTPCleanup();
12844 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12845 rc = test_xmlNanoHTTPContentLength();
12846 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12847 rc = test_xmlNanoHTTPEncoding();
12848 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12849 rc = test_xmlNanoHTTPFetch();
12850 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12851 rc = test_xmlNanoHTTPInit();
12852 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12853 rc = test_xmlNanoHTTPMimeType();
12854 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12855 rc = test_xmlNanoHTTPOpen();
12856 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12857 rc = test_xmlNanoHTTPOpenRedir();
12858 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12859 rc = test_xmlNanoHTTPRead();
12860 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12861 rc = test_xmlNanoHTTPRedir();
12862 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12863 rc = test_xmlNanoHTTPReturnCode();
12864 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12865 rc = test_xmlNanoHTTPSave();
12866 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12867 rc = test_xmlNanoHTTPScanProxy();
12868 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
12871 printf("Module nanohttp: %d errors\n", test_ret);
12876 test_xmlByteConsumed(void) {
12881 xmlParserCtxtPtr ctxt; /* an XML parser context */
12884 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
12885 mem_base = xmlMemBlocks();
12886 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
12888 ret_val = xmlByteConsumed(ctxt);
12889 desret_long(ret_val);
12891 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
12892 xmlResetLastError();
12893 if (mem_base != xmlMemBlocks()) {
12894 printf("Leak of %d blocks found in xmlByteConsumed",
12895 xmlMemBlocks() - mem_base);
12897 printf(" %d", n_ctxt);
12908 test_xmlClearNodeInfoSeq(void) {
12912 xmlParserNodeInfoSeqPtr seq; /* a node info sequence pointer */
12915 for (n_seq = 0;n_seq < gen_nb_xmlParserNodeInfoSeqPtr;n_seq++) {
12916 mem_base = xmlMemBlocks();
12917 seq = gen_xmlParserNodeInfoSeqPtr(n_seq, 0);
12919 xmlClearNodeInfoSeq(seq);
12921 des_xmlParserNodeInfoSeqPtr(n_seq, seq, 0);
12922 xmlResetLastError();
12923 if (mem_base != xmlMemBlocks()) {
12924 printf("Leak of %d blocks found in xmlClearNodeInfoSeq",
12925 xmlMemBlocks() - mem_base);
12927 printf(" %d", n_seq);
12938 test_xmlClearParserCtxt(void) {
12942 xmlParserCtxtPtr ctxt; /* an XML parser context */
12945 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
12946 mem_base = xmlMemBlocks();
12947 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
12949 xmlClearParserCtxt(ctxt);
12951 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
12952 xmlResetLastError();
12953 if (mem_base != xmlMemBlocks()) {
12954 printf("Leak of %d blocks found in xmlClearParserCtxt",
12955 xmlMemBlocks() - mem_base);
12957 printf(" %d", n_ctxt);
12968 test_xmlCreateDocParserCtxt(void) {
12972 xmlParserCtxtPtr ret_val;
12973 xmlChar * cur; /* a pointer to an array of xmlChar */
12976 for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
12977 mem_base = xmlMemBlocks();
12978 cur = gen_const_xmlChar_ptr(n_cur, 0);
12980 ret_val = xmlCreateDocParserCtxt((const xmlChar *)cur);
12981 desret_xmlParserCtxtPtr(ret_val);
12983 des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 0);
12984 xmlResetLastError();
12985 if (mem_base != xmlMemBlocks()) {
12986 printf("Leak of %d blocks found in xmlCreateDocParserCtxt",
12987 xmlMemBlocks() - mem_base);
12989 printf(" %d", n_cur);
13000 test_xmlCreatePushParserCtxt(void) {
13003 #if defined(LIBXML_PUSH_ENABLED)
13005 xmlParserCtxtPtr ret_val;
13006 xmlSAXHandlerPtr sax; /* a SAX handler */
13008 void * user_data; /* The user data returned on SAX callbacks */
13010 char * chunk; /* a pointer to an array of chars */
13012 int size; /* number of chars in the array */
13014 const char * filename; /* an optional file name or URI */
13017 for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
13018 for (n_user_data = 0;n_user_data < gen_nb_userdata;n_user_data++) {
13019 for (n_chunk = 0;n_chunk < gen_nb_const_char_ptr;n_chunk++) {
13020 for (n_size = 0;n_size < gen_nb_int;n_size++) {
13021 for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
13022 mem_base = xmlMemBlocks();
13023 sax = gen_xmlSAXHandlerPtr(n_sax, 0);
13024 user_data = gen_userdata(n_user_data, 1);
13025 chunk = gen_const_char_ptr(n_chunk, 2);
13026 size = gen_int(n_size, 3);
13027 filename = gen_fileoutput(n_filename, 4);
13029 ret_val = xmlCreatePushParserCtxt(sax, user_data, (const char *)chunk, size, filename);
13030 desret_xmlParserCtxtPtr(ret_val);
13032 des_xmlSAXHandlerPtr(n_sax, sax, 0);
13033 des_userdata(n_user_data, user_data, 1);
13034 des_const_char_ptr(n_chunk, (const char *)chunk, 2);
13035 des_int(n_size, size, 3);
13036 des_fileoutput(n_filename, filename, 4);
13037 xmlResetLastError();
13038 if (mem_base != xmlMemBlocks()) {
13039 printf("Leak of %d blocks found in xmlCreatePushParserCtxt",
13040 xmlMemBlocks() - mem_base);
13042 printf(" %d", n_sax);
13043 printf(" %d", n_user_data);
13044 printf(" %d", n_chunk);
13045 printf(" %d", n_size);
13046 printf(" %d", n_filename);
13062 test_xmlCtxtReadDoc(void) {
13067 xmlParserCtxtPtr ctxt; /* an XML parser context */
13069 xmlChar * cur; /* a pointer to a zero terminated string */
13071 const char * URL; /* the base URL to use for the document */
13073 char * encoding; /* the document encoding, or NULL */
13075 int options; /* a combination of xmlParserOption */
13078 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
13079 for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
13080 for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
13081 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
13082 for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
13083 mem_base = xmlMemBlocks();
13084 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
13085 cur = gen_const_xmlChar_ptr(n_cur, 1);
13086 URL = gen_filepath(n_URL, 2);
13087 encoding = gen_const_char_ptr(n_encoding, 3);
13088 options = gen_parseroptions(n_options, 4);
13090 ret_val = xmlCtxtReadDoc(ctxt, (const xmlChar *)cur, URL, (const char *)encoding, options);
13091 desret_xmlDocPtr(ret_val);
13093 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
13094 des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 1);
13095 des_filepath(n_URL, URL, 2);
13096 des_const_char_ptr(n_encoding, (const char *)encoding, 3);
13097 des_parseroptions(n_options, options, 4);
13098 xmlResetLastError();
13099 if (mem_base != xmlMemBlocks()) {
13100 printf("Leak of %d blocks found in xmlCtxtReadDoc",
13101 xmlMemBlocks() - mem_base);
13103 printf(" %d", n_ctxt);
13104 printf(" %d", n_cur);
13105 printf(" %d", n_URL);
13106 printf(" %d", n_encoding);
13107 printf(" %d", n_options);
13122 test_xmlCtxtReadFile(void) {
13127 xmlParserCtxtPtr ctxt; /* an XML parser context */
13129 const char * filename; /* a file or URL */
13131 char * encoding; /* the document encoding, or NULL */
13133 int options; /* a combination of xmlParserOption */
13136 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
13137 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
13138 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
13139 for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
13140 mem_base = xmlMemBlocks();
13141 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
13142 filename = gen_filepath(n_filename, 1);
13143 encoding = gen_const_char_ptr(n_encoding, 2);
13144 options = gen_parseroptions(n_options, 3);
13146 ret_val = xmlCtxtReadFile(ctxt, filename, (const char *)encoding, options);
13147 desret_xmlDocPtr(ret_val);
13149 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
13150 des_filepath(n_filename, filename, 1);
13151 des_const_char_ptr(n_encoding, (const char *)encoding, 2);
13152 des_parseroptions(n_options, options, 3);
13153 xmlResetLastError();
13154 if (mem_base != xmlMemBlocks()) {
13155 printf("Leak of %d blocks found in xmlCtxtReadFile",
13156 xmlMemBlocks() - mem_base);
13158 printf(" %d", n_ctxt);
13159 printf(" %d", n_filename);
13160 printf(" %d", n_encoding);
13161 printf(" %d", n_options);
13175 test_xmlCtxtReadMemory(void) {
13180 xmlParserCtxtPtr ctxt; /* an XML parser context */
13182 char * buffer; /* a pointer to a char array */
13184 int size; /* the size of the array */
13186 const char * URL; /* the base URL to use for the document */
13188 char * encoding; /* the document encoding, or NULL */
13190 int options; /* a combination of xmlParserOption */
13193 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
13194 for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
13195 for (n_size = 0;n_size < gen_nb_int;n_size++) {
13196 for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
13197 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
13198 for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
13199 mem_base = xmlMemBlocks();
13200 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
13201 buffer = gen_const_char_ptr(n_buffer, 1);
13202 size = gen_int(n_size, 2);
13203 URL = gen_filepath(n_URL, 3);
13204 encoding = gen_const_char_ptr(n_encoding, 4);
13205 options = gen_parseroptions(n_options, 5);
13207 ret_val = xmlCtxtReadMemory(ctxt, (const char *)buffer, size, URL, (const char *)encoding, options);
13208 desret_xmlDocPtr(ret_val);
13210 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
13211 des_const_char_ptr(n_buffer, (const char *)buffer, 1);
13212 des_int(n_size, size, 2);
13213 des_filepath(n_URL, URL, 3);
13214 des_const_char_ptr(n_encoding, (const char *)encoding, 4);
13215 des_parseroptions(n_options, options, 5);
13216 xmlResetLastError();
13217 if (mem_base != xmlMemBlocks()) {
13218 printf("Leak of %d blocks found in xmlCtxtReadMemory",
13219 xmlMemBlocks() - mem_base);
13221 printf(" %d", n_ctxt);
13222 printf(" %d", n_buffer);
13223 printf(" %d", n_size);
13224 printf(" %d", n_URL);
13225 printf(" %d", n_encoding);
13226 printf(" %d", n_options);
13242 test_xmlCtxtReset(void) {
13246 xmlParserCtxtPtr ctxt; /* an XML parser context */
13249 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
13250 mem_base = xmlMemBlocks();
13251 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
13253 xmlCtxtReset(ctxt);
13255 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
13256 xmlResetLastError();
13257 if (mem_base != xmlMemBlocks()) {
13258 printf("Leak of %d blocks found in xmlCtxtReset",
13259 xmlMemBlocks() - mem_base);
13261 printf(" %d", n_ctxt);
13272 test_xmlCtxtResetPush(void) {
13277 xmlParserCtxtPtr ctxt; /* an XML parser context */
13279 char * chunk; /* a pointer to an array of chars */
13281 int size; /* number of chars in the array */
13283 const char * filename; /* an optional file name or URI */
13285 char * encoding; /* the document encoding, or NULL */
13288 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
13289 for (n_chunk = 0;n_chunk < gen_nb_const_char_ptr;n_chunk++) {
13290 for (n_size = 0;n_size < gen_nb_int;n_size++) {
13291 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
13292 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
13293 mem_base = xmlMemBlocks();
13294 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
13295 chunk = gen_const_char_ptr(n_chunk, 1);
13296 size = gen_int(n_size, 2);
13297 filename = gen_filepath(n_filename, 3);
13298 encoding = gen_const_char_ptr(n_encoding, 4);
13300 ret_val = xmlCtxtResetPush(ctxt, (const char *)chunk, size, filename, (const char *)encoding);
13301 desret_int(ret_val);
13303 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
13304 des_const_char_ptr(n_chunk, (const char *)chunk, 1);
13305 des_int(n_size, size, 2);
13306 des_filepath(n_filename, filename, 3);
13307 des_const_char_ptr(n_encoding, (const char *)encoding, 4);
13308 xmlResetLastError();
13309 if (mem_base != xmlMemBlocks()) {
13310 printf("Leak of %d blocks found in xmlCtxtResetPush",
13311 xmlMemBlocks() - mem_base);
13313 printf(" %d", n_ctxt);
13314 printf(" %d", n_chunk);
13315 printf(" %d", n_size);
13316 printf(" %d", n_filename);
13317 printf(" %d", n_encoding);
13332 test_xmlCtxtUseOptions(void) {
13337 xmlParserCtxtPtr ctxt; /* an XML parser context */
13339 int options; /* a combination of xmlParserOption */
13342 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
13343 for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
13344 mem_base = xmlMemBlocks();
13345 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
13346 options = gen_parseroptions(n_options, 1);
13348 ret_val = xmlCtxtUseOptions(ctxt, options);
13349 desret_int(ret_val);
13351 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
13352 des_parseroptions(n_options, options, 1);
13353 xmlResetLastError();
13354 if (mem_base != xmlMemBlocks()) {
13355 printf("Leak of %d blocks found in xmlCtxtUseOptions",
13356 xmlMemBlocks() - mem_base);
13358 printf(" %d", n_ctxt);
13359 printf(" %d", n_options);
13371 test_xmlGetExternalEntityLoader(void) {
13375 /* missing type support */
13381 test_xmlGetFeature(void) {
13384 #if defined(LIBXML_LEGACY_ENABLED)
13385 #ifdef LIBXML_LEGACY_ENABLED
13388 xmlParserCtxtPtr ctxt; /* an XML/HTML parser context */
13390 char * name; /* the feature name */
13392 void * result; /* location to store the result */
13395 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
13396 for (n_name = 0;n_name < gen_nb_const_char_ptr;n_name++) {
13397 for (n_result = 0;n_result < gen_nb_void_ptr;n_result++) {
13398 mem_base = xmlMemBlocks();
13399 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
13400 name = gen_const_char_ptr(n_name, 1);
13401 result = gen_void_ptr(n_result, 2);
13403 ret_val = xmlGetFeature(ctxt, (const char *)name, result);
13404 desret_int(ret_val);
13406 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
13407 des_const_char_ptr(n_name, (const char *)name, 1);
13408 des_void_ptr(n_result, result, 2);
13409 xmlResetLastError();
13410 if (mem_base != xmlMemBlocks()) {
13411 printf("Leak of %d blocks found in xmlGetFeature",
13412 xmlMemBlocks() - mem_base);
13414 printf(" %d", n_ctxt);
13415 printf(" %d", n_name);
13416 printf(" %d", n_result);
13430 #define gen_nb_const_char_ptr_ptr 1
13431 static char ** gen_const_char_ptr_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
13434 static void des_const_char_ptr_ptr(int no ATTRIBUTE_UNUSED, const char ** val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
13438 test_xmlGetFeaturesList(void) {
13441 #if defined(LIBXML_LEGACY_ENABLED)
13442 #ifdef LIBXML_LEGACY_ENABLED
13445 int * len; /* the length of the features name array (input/output) */
13447 char ** result; /* an array of string to be filled with the features name. */
13450 for (n_len = 0;n_len < gen_nb_int_ptr;n_len++) {
13451 for (n_result = 0;n_result < gen_nb_const_char_ptr_ptr;n_result++) {
13452 mem_base = xmlMemBlocks();
13453 len = gen_int_ptr(n_len, 0);
13454 result = gen_const_char_ptr_ptr(n_result, 1);
13456 ret_val = xmlGetFeaturesList(len, (const char **)result);
13457 desret_int(ret_val);
13459 des_int_ptr(n_len, len, 0);
13460 des_const_char_ptr_ptr(n_result, (const char **)result, 1);
13461 xmlResetLastError();
13462 if (mem_base != xmlMemBlocks()) {
13463 printf("Leak of %d blocks found in xmlGetFeaturesList",
13464 xmlMemBlocks() - mem_base);
13466 printf(" %d", n_len);
13467 printf(" %d", n_result);
13481 test_xmlHasFeature(void) {
13486 xmlFeature feature; /* the feature to be examined */
13489 for (n_feature = 0;n_feature < gen_nb_xmlFeature;n_feature++) {
13490 mem_base = xmlMemBlocks();
13491 feature = gen_xmlFeature(n_feature, 0);
13493 ret_val = xmlHasFeature(feature);
13494 desret_int(ret_val);
13496 des_xmlFeature(n_feature, feature, 0);
13497 xmlResetLastError();
13498 if (mem_base != xmlMemBlocks()) {
13499 printf("Leak of %d blocks found in xmlHasFeature",
13500 xmlMemBlocks() - mem_base);
13502 printf(" %d", n_feature);
13513 test_xmlIOParseDTD(void) {
13516 #if defined(LIBXML_VALID_ENABLED)
13517 #ifdef LIBXML_VALID_ENABLED
13519 xmlSAXHandlerPtr sax; /* the SAX handler block or NULL */
13521 xmlParserInputBufferPtr input; /* an Input Buffer */
13523 xmlCharEncoding enc; /* the charset encoding if known */
13526 for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
13527 for (n_input = 0;n_input < gen_nb_xmlParserInputBufferPtr;n_input++) {
13528 for (n_enc = 0;n_enc < gen_nb_xmlCharEncoding;n_enc++) {
13529 sax = gen_xmlSAXHandlerPtr(n_sax, 0);
13530 input = gen_xmlParserInputBufferPtr(n_input, 1);
13531 enc = gen_xmlCharEncoding(n_enc, 2);
13533 ret_val = xmlIOParseDTD(sax, input, enc);
13535 desret_xmlDtdPtr(ret_val);
13537 des_xmlSAXHandlerPtr(n_sax, sax, 0);
13538 des_xmlParserInputBufferPtr(n_input, input, 1);
13539 des_xmlCharEncoding(n_enc, enc, 2);
13540 xmlResetLastError();
13553 test_xmlInitNodeInfoSeq(void) {
13557 xmlParserNodeInfoSeqPtr seq; /* a node info sequence pointer */
13560 for (n_seq = 0;n_seq < gen_nb_xmlParserNodeInfoSeqPtr;n_seq++) {
13561 mem_base = xmlMemBlocks();
13562 seq = gen_xmlParserNodeInfoSeqPtr(n_seq, 0);
13564 xmlInitNodeInfoSeq(seq);
13566 des_xmlParserNodeInfoSeqPtr(n_seq, seq, 0);
13567 xmlResetLastError();
13568 if (mem_base != xmlMemBlocks()) {
13569 printf("Leak of %d blocks found in xmlInitNodeInfoSeq",
13570 xmlMemBlocks() - mem_base);
13572 printf(" %d", n_seq);
13583 test_xmlInitParser(void) {
13588 mem_base = xmlMemBlocks();
13592 xmlResetLastError();
13593 if (mem_base != xmlMemBlocks()) {
13594 printf("Leak of %d blocks found in xmlInitParser",
13595 xmlMemBlocks() - mem_base);
13606 test_xmlInitParserCtxt(void) {
13611 xmlParserCtxtPtr ctxt; /* an XML parser context */
13614 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
13615 mem_base = xmlMemBlocks();
13616 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
13618 ret_val = xmlInitParserCtxt(ctxt);
13619 desret_int(ret_val);
13621 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
13622 xmlResetLastError();
13623 if (mem_base != xmlMemBlocks()) {
13624 printf("Leak of %d blocks found in xmlInitParserCtxt",
13625 xmlMemBlocks() - mem_base);
13627 printf(" %d", n_ctxt);
13638 test_xmlKeepBlanksDefault(void) {
13643 int val; /* int 0 or 1 */
13646 for (n_val = 0;n_val < gen_nb_int;n_val++) {
13647 mem_base = xmlMemBlocks();
13648 val = gen_int(n_val, 0);
13650 ret_val = xmlKeepBlanksDefault(val);
13651 desret_int(ret_val);
13653 des_int(n_val, val, 0);
13654 xmlResetLastError();
13655 if (mem_base != xmlMemBlocks()) {
13656 printf("Leak of %d blocks found in xmlKeepBlanksDefault",
13657 xmlMemBlocks() - mem_base);
13659 printf(" %d", n_val);
13670 test_xmlLineNumbersDefault(void) {
13675 int val; /* int 0 or 1 */
13678 for (n_val = 0;n_val < gen_nb_int;n_val++) {
13679 mem_base = xmlMemBlocks();
13680 val = gen_int(n_val, 0);
13682 ret_val = xmlLineNumbersDefault(val);
13683 desret_int(ret_val);
13685 des_int(n_val, val, 0);
13686 xmlResetLastError();
13687 if (mem_base != xmlMemBlocks()) {
13688 printf("Leak of %d blocks found in xmlLineNumbersDefault",
13689 xmlMemBlocks() - mem_base);
13691 printf(" %d", n_val);
13702 test_xmlLoadExternalEntity(void) {
13706 xmlParserInputPtr ret_val;
13707 const char * URL; /* the URL for the entity to load */
13709 char * ID; /* the Public ID for the entity to load */
13711 xmlParserCtxtPtr ctxt; /* the context in which the entity is called or NULL */
13714 for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
13715 for (n_ID = 0;n_ID < gen_nb_const_char_ptr;n_ID++) {
13716 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
13717 mem_base = xmlMemBlocks();
13718 URL = gen_filepath(n_URL, 0);
13719 ID = gen_const_char_ptr(n_ID, 1);
13720 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 2);
13722 ret_val = xmlLoadExternalEntity(URL, (const char *)ID, ctxt);
13723 desret_xmlParserInputPtr(ret_val);
13725 des_filepath(n_URL, URL, 0);
13726 des_const_char_ptr(n_ID, (const char *)ID, 1);
13727 des_xmlParserCtxtPtr(n_ctxt, ctxt, 2);
13728 xmlResetLastError();
13729 if (mem_base != xmlMemBlocks()) {
13730 printf("Leak of %d blocks found in xmlLoadExternalEntity",
13731 xmlMemBlocks() - mem_base);
13733 printf(" %d", n_URL);
13734 printf(" %d", n_ID);
13735 printf(" %d", n_ctxt);
13748 test_xmlNewIOInputStream(void) {
13752 xmlParserInputPtr ret_val;
13753 xmlParserCtxtPtr ctxt; /* an XML parser context */
13755 xmlParserInputBufferPtr input; /* an I/O Input */
13757 xmlCharEncoding enc; /* the charset encoding if known */
13760 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
13761 for (n_input = 0;n_input < gen_nb_xmlParserInputBufferPtr;n_input++) {
13762 for (n_enc = 0;n_enc < gen_nb_xmlCharEncoding;n_enc++) {
13763 mem_base = xmlMemBlocks();
13764 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
13765 input = gen_xmlParserInputBufferPtr(n_input, 1);
13766 enc = gen_xmlCharEncoding(n_enc, 2);
13768 ret_val = xmlNewIOInputStream(ctxt, input, enc);
13769 if (ret_val != NULL) input = NULL;
13770 desret_xmlParserInputPtr(ret_val);
13772 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
13773 des_xmlParserInputBufferPtr(n_input, input, 1);
13774 des_xmlCharEncoding(n_enc, enc, 2);
13775 xmlResetLastError();
13776 if (mem_base != xmlMemBlocks()) {
13777 printf("Leak of %d blocks found in xmlNewIOInputStream",
13778 xmlMemBlocks() - mem_base);
13780 printf(" %d", n_ctxt);
13781 printf(" %d", n_input);
13782 printf(" %d", n_enc);
13795 test_xmlNewParserCtxt(void) {
13799 xmlParserCtxtPtr ret_val;
13801 mem_base = xmlMemBlocks();
13803 ret_val = xmlNewParserCtxt();
13804 desret_xmlParserCtxtPtr(ret_val);
13806 xmlResetLastError();
13807 if (mem_base != xmlMemBlocks()) {
13808 printf("Leak of %d blocks found in xmlNewParserCtxt",
13809 xmlMemBlocks() - mem_base);
13819 #define gen_nb_xmlNodePtr_ptr 1
13820 static xmlNodePtr * gen_xmlNodePtr_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
13823 static void des_xmlNodePtr_ptr(int no ATTRIBUTE_UNUSED, xmlNodePtr * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
13827 test_xmlParseBalancedChunkMemory(void) {
13830 #if defined(LIBXML_SAX1_ENABLED)
13831 #ifdef LIBXML_SAX1_ENABLED
13834 xmlDocPtr doc; /* the document the chunk pertains to */
13836 xmlSAXHandlerPtr sax; /* the SAX handler bloc (possibly NULL) */
13838 void * user_data; /* The user data returned on SAX callbacks (possibly NULL) */
13840 int depth; /* Used for loop detection, use 0 */
13842 xmlChar * string; /* the input string in UTF8 or ISO-Latin (zero terminated) */
13844 xmlNodePtr * lst; /* the return value for the set of parsed nodes */
13847 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
13848 for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
13849 for (n_user_data = 0;n_user_data < gen_nb_userdata;n_user_data++) {
13850 for (n_depth = 0;n_depth < gen_nb_int;n_depth++) {
13851 for (n_string = 0;n_string < gen_nb_const_xmlChar_ptr;n_string++) {
13852 for (n_lst = 0;n_lst < gen_nb_xmlNodePtr_ptr;n_lst++) {
13853 mem_base = xmlMemBlocks();
13854 doc = gen_xmlDocPtr(n_doc, 0);
13855 sax = gen_xmlSAXHandlerPtr(n_sax, 1);
13856 user_data = gen_userdata(n_user_data, 2);
13857 depth = gen_int(n_depth, 3);
13858 string = gen_const_xmlChar_ptr(n_string, 4);
13859 lst = gen_xmlNodePtr_ptr(n_lst, 5);
13861 #ifdef LIBXML_SAX1_ENABLED
13862 if (sax == (xmlSAXHandlerPtr)&xmlDefaultSAXHandler) user_data = NULL;
13866 ret_val = xmlParseBalancedChunkMemory(doc, sax, user_data, depth, (const xmlChar *)string, lst);
13867 desret_int(ret_val);
13869 des_xmlDocPtr(n_doc, doc, 0);
13870 des_xmlSAXHandlerPtr(n_sax, sax, 1);
13871 des_userdata(n_user_data, user_data, 2);
13872 des_int(n_depth, depth, 3);
13873 des_const_xmlChar_ptr(n_string, (const xmlChar *)string, 4);
13874 des_xmlNodePtr_ptr(n_lst, lst, 5);
13875 xmlResetLastError();
13876 if (mem_base != xmlMemBlocks()) {
13877 printf("Leak of %d blocks found in xmlParseBalancedChunkMemory",
13878 xmlMemBlocks() - mem_base);
13880 printf(" %d", n_doc);
13881 printf(" %d", n_sax);
13882 printf(" %d", n_user_data);
13883 printf(" %d", n_depth);
13884 printf(" %d", n_string);
13885 printf(" %d", n_lst);
13903 test_xmlParseBalancedChunkMemoryRecover(void) {
13906 #if defined(LIBXML_SAX1_ENABLED)
13907 #ifdef LIBXML_SAX1_ENABLED
13910 xmlDocPtr doc; /* the document the chunk pertains to */
13912 xmlSAXHandlerPtr sax; /* the SAX handler bloc (possibly NULL) */
13914 void * user_data; /* The user data returned on SAX callbacks (possibly NULL) */
13916 int depth; /* Used for loop detection, use 0 */
13918 xmlChar * string; /* the input string in UTF8 or ISO-Latin (zero terminated) */
13920 xmlNodePtr * lst; /* the return value for the set of parsed nodes */
13922 int recover; /* return nodes even if the data is broken (use 0) */
13925 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
13926 for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
13927 for (n_user_data = 0;n_user_data < gen_nb_userdata;n_user_data++) {
13928 for (n_depth = 0;n_depth < gen_nb_int;n_depth++) {
13929 for (n_string = 0;n_string < gen_nb_const_xmlChar_ptr;n_string++) {
13930 for (n_lst = 0;n_lst < gen_nb_xmlNodePtr_ptr;n_lst++) {
13931 for (n_recover = 0;n_recover < gen_nb_int;n_recover++) {
13932 mem_base = xmlMemBlocks();
13933 doc = gen_xmlDocPtr(n_doc, 0);
13934 sax = gen_xmlSAXHandlerPtr(n_sax, 1);
13935 user_data = gen_userdata(n_user_data, 2);
13936 depth = gen_int(n_depth, 3);
13937 string = gen_const_xmlChar_ptr(n_string, 4);
13938 lst = gen_xmlNodePtr_ptr(n_lst, 5);
13939 recover = gen_int(n_recover, 6);
13941 #ifdef LIBXML_SAX1_ENABLED
13942 if (sax == (xmlSAXHandlerPtr)&xmlDefaultSAXHandler) user_data = NULL;
13946 ret_val = xmlParseBalancedChunkMemoryRecover(doc, sax, user_data, depth, (const xmlChar *)string, lst, recover);
13947 desret_int(ret_val);
13949 des_xmlDocPtr(n_doc, doc, 0);
13950 des_xmlSAXHandlerPtr(n_sax, sax, 1);
13951 des_userdata(n_user_data, user_data, 2);
13952 des_int(n_depth, depth, 3);
13953 des_const_xmlChar_ptr(n_string, (const xmlChar *)string, 4);
13954 des_xmlNodePtr_ptr(n_lst, lst, 5);
13955 des_int(n_recover, recover, 6);
13956 xmlResetLastError();
13957 if (mem_base != xmlMemBlocks()) {
13958 printf("Leak of %d blocks found in xmlParseBalancedChunkMemoryRecover",
13959 xmlMemBlocks() - mem_base);
13961 printf(" %d", n_doc);
13962 printf(" %d", n_sax);
13963 printf(" %d", n_user_data);
13964 printf(" %d", n_depth);
13965 printf(" %d", n_string);
13966 printf(" %d", n_lst);
13967 printf(" %d", n_recover);
13986 test_xmlParseChunk(void) {
13989 #if defined(LIBXML_PUSH_ENABLED)
13992 xmlParserCtxtPtr ctxt; /* an XML parser context */
13994 char * chunk; /* an char array */
13996 int size; /* the size in byte of the chunk */
13998 int terminate; /* last chunk indicator */
14001 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
14002 for (n_chunk = 0;n_chunk < gen_nb_const_char_ptr;n_chunk++) {
14003 for (n_size = 0;n_size < gen_nb_int;n_size++) {
14004 for (n_terminate = 0;n_terminate < gen_nb_int;n_terminate++) {
14005 mem_base = xmlMemBlocks();
14006 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
14007 chunk = gen_const_char_ptr(n_chunk, 1);
14008 size = gen_int(n_size, 2);
14009 terminate = gen_int(n_terminate, 3);
14011 ret_val = xmlParseChunk(ctxt, (const char *)chunk, size, terminate);
14012 if (ctxt != NULL) {xmlFreeDoc(ctxt->myDoc); ctxt->myDoc = NULL;}
14013 desret_int(ret_val);
14015 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
14016 des_const_char_ptr(n_chunk, (const char *)chunk, 1);
14017 des_int(n_size, size, 2);
14018 des_int(n_terminate, terminate, 3);
14019 xmlResetLastError();
14020 if (mem_base != xmlMemBlocks()) {
14021 printf("Leak of %d blocks found in xmlParseChunk",
14022 xmlMemBlocks() - mem_base);
14024 printf(" %d", n_ctxt);
14025 printf(" %d", n_chunk);
14026 printf(" %d", n_size);
14027 printf(" %d", n_terminate);
14042 test_xmlParseCtxtExternalEntity(void) {
14047 xmlParserCtxtPtr ctx; /* the existing parsing context */
14049 xmlChar * URL; /* the URL for the entity to load */
14051 xmlChar * ID; /* the System ID for the entity to load */
14053 xmlNodePtr * lst; /* the return value for the set of parsed nodes */
14056 for (n_ctx = 0;n_ctx < gen_nb_xmlParserCtxtPtr;n_ctx++) {
14057 for (n_URL = 0;n_URL < gen_nb_const_xmlChar_ptr;n_URL++) {
14058 for (n_ID = 0;n_ID < gen_nb_const_xmlChar_ptr;n_ID++) {
14059 for (n_lst = 0;n_lst < gen_nb_xmlNodePtr_ptr;n_lst++) {
14060 mem_base = xmlMemBlocks();
14061 ctx = gen_xmlParserCtxtPtr(n_ctx, 0);
14062 URL = gen_const_xmlChar_ptr(n_URL, 1);
14063 ID = gen_const_xmlChar_ptr(n_ID, 2);
14064 lst = gen_xmlNodePtr_ptr(n_lst, 3);
14066 ret_val = xmlParseCtxtExternalEntity(ctx, (const xmlChar *)URL, (const xmlChar *)ID, lst);
14067 desret_int(ret_val);
14069 des_xmlParserCtxtPtr(n_ctx, ctx, 0);
14070 des_const_xmlChar_ptr(n_URL, (const xmlChar *)URL, 1);
14071 des_const_xmlChar_ptr(n_ID, (const xmlChar *)ID, 2);
14072 des_xmlNodePtr_ptr(n_lst, lst, 3);
14073 xmlResetLastError();
14074 if (mem_base != xmlMemBlocks()) {
14075 printf("Leak of %d blocks found in xmlParseCtxtExternalEntity",
14076 xmlMemBlocks() - mem_base);
14078 printf(" %d", n_ctx);
14079 printf(" %d", n_URL);
14080 printf(" %d", n_ID);
14081 printf(" %d", n_lst);
14095 test_xmlParseDTD(void) {
14098 #if defined(LIBXML_VALID_ENABLED)
14099 #ifdef LIBXML_VALID_ENABLED
14102 xmlChar * ExternalID; /* a NAME* containing the External ID of the DTD */
14104 xmlChar * SystemID; /* a NAME* containing the URL to the DTD */
14107 for (n_ExternalID = 0;n_ExternalID < gen_nb_const_xmlChar_ptr;n_ExternalID++) {
14108 for (n_SystemID = 0;n_SystemID < gen_nb_const_xmlChar_ptr;n_SystemID++) {
14109 mem_base = xmlMemBlocks();
14110 ExternalID = gen_const_xmlChar_ptr(n_ExternalID, 0);
14111 SystemID = gen_const_xmlChar_ptr(n_SystemID, 1);
14113 ret_val = xmlParseDTD((const xmlChar *)ExternalID, (const xmlChar *)SystemID);
14114 desret_xmlDtdPtr(ret_val);
14116 des_const_xmlChar_ptr(n_ExternalID, (const xmlChar *)ExternalID, 0);
14117 des_const_xmlChar_ptr(n_SystemID, (const xmlChar *)SystemID, 1);
14118 xmlResetLastError();
14119 if (mem_base != xmlMemBlocks()) {
14120 printf("Leak of %d blocks found in xmlParseDTD",
14121 xmlMemBlocks() - mem_base);
14123 printf(" %d", n_ExternalID);
14124 printf(" %d", n_SystemID);
14138 test_xmlParseDoc(void) {
14141 #if defined(LIBXML_SAX1_ENABLED)
14142 #ifdef LIBXML_SAX1_ENABLED
14145 xmlChar * cur; /* a pointer to an array of xmlChar */
14148 for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
14149 mem_base = xmlMemBlocks();
14150 cur = gen_const_xmlChar_ptr(n_cur, 0);
14152 ret_val = xmlParseDoc((const xmlChar *)cur);
14153 desret_xmlDocPtr(ret_val);
14155 des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 0);
14156 xmlResetLastError();
14157 if (mem_base != xmlMemBlocks()) {
14158 printf("Leak of %d blocks found in xmlParseDoc",
14159 xmlMemBlocks() - mem_base);
14161 printf(" %d", n_cur);
14174 test_xmlParseDocument(void) {
14179 xmlParserCtxtPtr ctxt; /* an XML parser context */
14182 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
14183 mem_base = xmlMemBlocks();
14184 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
14186 ret_val = xmlParseDocument(ctxt);
14187 if (ctxt != NULL) {xmlFreeDoc(ctxt->myDoc); ctxt->myDoc = NULL;}
14188 desret_int(ret_val);
14190 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
14191 xmlResetLastError();
14192 if (mem_base != xmlMemBlocks()) {
14193 printf("Leak of %d blocks found in xmlParseDocument",
14194 xmlMemBlocks() - mem_base);
14196 printf(" %d", n_ctxt);
14207 test_xmlParseEntity(void) {
14210 #if defined(LIBXML_SAX1_ENABLED)
14211 #ifdef LIBXML_SAX1_ENABLED
14214 const char * filename; /* the filename */
14217 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
14218 mem_base = xmlMemBlocks();
14219 filename = gen_filepath(n_filename, 0);
14221 ret_val = xmlParseEntity(filename);
14222 desret_xmlDocPtr(ret_val);
14224 des_filepath(n_filename, filename, 0);
14225 xmlResetLastError();
14226 if (mem_base != xmlMemBlocks()) {
14227 printf("Leak of %d blocks found in xmlParseEntity",
14228 xmlMemBlocks() - mem_base);
14230 printf(" %d", n_filename);
14243 test_xmlParseExtParsedEnt(void) {
14248 xmlParserCtxtPtr ctxt; /* an XML parser context */
14251 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
14252 mem_base = xmlMemBlocks();
14253 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
14255 ret_val = xmlParseExtParsedEnt(ctxt);
14256 if (ctxt != NULL) {xmlFreeDoc(ctxt->myDoc); ctxt->myDoc = NULL;}
14257 desret_int(ret_val);
14259 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
14260 xmlResetLastError();
14261 if (mem_base != xmlMemBlocks()) {
14262 printf("Leak of %d blocks found in xmlParseExtParsedEnt",
14263 xmlMemBlocks() - mem_base);
14265 printf(" %d", n_ctxt);
14276 test_xmlParseExternalEntity(void) {
14279 #if defined(LIBXML_SAX1_ENABLED)
14280 #ifdef LIBXML_SAX1_ENABLED
14283 xmlDocPtr doc; /* the document the chunk pertains to */
14285 xmlSAXHandlerPtr sax; /* the SAX handler bloc (possibly NULL) */
14287 void * user_data; /* The user data returned on SAX callbacks (possibly NULL) */
14289 int depth; /* Used for loop detection, use 0 */
14291 xmlChar * URL; /* the URL for the entity to load */
14293 xmlChar * ID; /* the System ID for the entity to load */
14295 xmlNodePtr * lst; /* the return value for the set of parsed nodes */
14298 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
14299 for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
14300 for (n_user_data = 0;n_user_data < gen_nb_userdata;n_user_data++) {
14301 for (n_depth = 0;n_depth < gen_nb_int;n_depth++) {
14302 for (n_URL = 0;n_URL < gen_nb_const_xmlChar_ptr;n_URL++) {
14303 for (n_ID = 0;n_ID < gen_nb_const_xmlChar_ptr;n_ID++) {
14304 for (n_lst = 0;n_lst < gen_nb_xmlNodePtr_ptr;n_lst++) {
14305 mem_base = xmlMemBlocks();
14306 doc = gen_xmlDocPtr(n_doc, 0);
14307 sax = gen_xmlSAXHandlerPtr(n_sax, 1);
14308 user_data = gen_userdata(n_user_data, 2);
14309 depth = gen_int(n_depth, 3);
14310 URL = gen_const_xmlChar_ptr(n_URL, 4);
14311 ID = gen_const_xmlChar_ptr(n_ID, 5);
14312 lst = gen_xmlNodePtr_ptr(n_lst, 6);
14314 ret_val = xmlParseExternalEntity(doc, sax, user_data, depth, (const xmlChar *)URL, (const xmlChar *)ID, lst);
14315 desret_int(ret_val);
14317 des_xmlDocPtr(n_doc, doc, 0);
14318 des_xmlSAXHandlerPtr(n_sax, sax, 1);
14319 des_userdata(n_user_data, user_data, 2);
14320 des_int(n_depth, depth, 3);
14321 des_const_xmlChar_ptr(n_URL, (const xmlChar *)URL, 4);
14322 des_const_xmlChar_ptr(n_ID, (const xmlChar *)ID, 5);
14323 des_xmlNodePtr_ptr(n_lst, lst, 6);
14324 xmlResetLastError();
14325 if (mem_base != xmlMemBlocks()) {
14326 printf("Leak of %d blocks found in xmlParseExternalEntity",
14327 xmlMemBlocks() - mem_base);
14329 printf(" %d", n_doc);
14330 printf(" %d", n_sax);
14331 printf(" %d", n_user_data);
14332 printf(" %d", n_depth);
14333 printf(" %d", n_URL);
14334 printf(" %d", n_ID);
14335 printf(" %d", n_lst);
14354 test_xmlParseFile(void) {
14357 #if defined(LIBXML_SAX1_ENABLED)
14358 #ifdef LIBXML_SAX1_ENABLED
14361 const char * filename; /* the filename */
14364 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
14365 mem_base = xmlMemBlocks();
14366 filename = gen_filepath(n_filename, 0);
14368 ret_val = xmlParseFile(filename);
14369 desret_xmlDocPtr(ret_val);
14371 des_filepath(n_filename, filename, 0);
14372 xmlResetLastError();
14373 if (mem_base != xmlMemBlocks()) {
14374 printf("Leak of %d blocks found in xmlParseFile",
14375 xmlMemBlocks() - mem_base);
14377 printf(" %d", n_filename);
14390 test_xmlParseInNodeContext(void) {
14394 xmlParserErrors ret_val;
14395 xmlNodePtr node; /* the context node */
14397 char * data; /* the input string */
14399 int datalen; /* the input string length in bytes */
14401 int options; /* a combination of xmlParserOption */
14403 xmlNodePtr * lst; /* the return value for the set of parsed nodes */
14406 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
14407 for (n_data = 0;n_data < gen_nb_const_char_ptr;n_data++) {
14408 for (n_datalen = 0;n_datalen < gen_nb_int;n_datalen++) {
14409 for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
14410 for (n_lst = 0;n_lst < gen_nb_xmlNodePtr_ptr;n_lst++) {
14411 mem_base = xmlMemBlocks();
14412 node = gen_xmlNodePtr(n_node, 0);
14413 data = gen_const_char_ptr(n_data, 1);
14414 datalen = gen_int(n_datalen, 2);
14415 options = gen_parseroptions(n_options, 3);
14416 lst = gen_xmlNodePtr_ptr(n_lst, 4);
14418 ret_val = xmlParseInNodeContext(node, (const char *)data, datalen, options, lst);
14419 desret_xmlParserErrors(ret_val);
14421 des_xmlNodePtr(n_node, node, 0);
14422 des_const_char_ptr(n_data, (const char *)data, 1);
14423 des_int(n_datalen, datalen, 2);
14424 des_parseroptions(n_options, options, 3);
14425 des_xmlNodePtr_ptr(n_lst, lst, 4);
14426 xmlResetLastError();
14427 if (mem_base != xmlMemBlocks()) {
14428 printf("Leak of %d blocks found in xmlParseInNodeContext",
14429 xmlMemBlocks() - mem_base);
14431 printf(" %d", n_node);
14432 printf(" %d", n_data);
14433 printf(" %d", n_datalen);
14434 printf(" %d", n_options);
14435 printf(" %d", n_lst);
14450 test_xmlParseMemory(void) {
14453 #if defined(LIBXML_SAX1_ENABLED)
14454 #ifdef LIBXML_SAX1_ENABLED
14457 char * buffer; /* an pointer to a char array */
14459 int size; /* the size of the array */
14462 for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
14463 for (n_size = 0;n_size < gen_nb_int;n_size++) {
14464 mem_base = xmlMemBlocks();
14465 buffer = gen_const_char_ptr(n_buffer, 0);
14466 size = gen_int(n_size, 1);
14468 ret_val = xmlParseMemory((const char *)buffer, size);
14469 desret_xmlDocPtr(ret_val);
14471 des_const_char_ptr(n_buffer, (const char *)buffer, 0);
14472 des_int(n_size, size, 1);
14473 xmlResetLastError();
14474 if (mem_base != xmlMemBlocks()) {
14475 printf("Leak of %d blocks found in xmlParseMemory",
14476 xmlMemBlocks() - mem_base);
14478 printf(" %d", n_buffer);
14479 printf(" %d", n_size);
14492 #define gen_nb_const_xmlParserNodeInfoPtr 1
14493 static xmlParserNodeInfoPtr gen_const_xmlParserNodeInfoPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
14496 static void des_const_xmlParserNodeInfoPtr(int no ATTRIBUTE_UNUSED, const xmlParserNodeInfoPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
14500 test_xmlParserAddNodeInfo(void) {
14504 xmlParserCtxtPtr ctxt; /* an XML parser context */
14506 xmlParserNodeInfoPtr info; /* a node info sequence pointer */
14509 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
14510 for (n_info = 0;n_info < gen_nb_const_xmlParserNodeInfoPtr;n_info++) {
14511 mem_base = xmlMemBlocks();
14512 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
14513 info = gen_const_xmlParserNodeInfoPtr(n_info, 1);
14515 xmlParserAddNodeInfo(ctxt, (const xmlParserNodeInfoPtr)info);
14517 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
14518 des_const_xmlParserNodeInfoPtr(n_info, (const xmlParserNodeInfoPtr)info, 1);
14519 xmlResetLastError();
14520 if (mem_base != xmlMemBlocks()) {
14521 printf("Leak of %d blocks found in xmlParserAddNodeInfo",
14522 xmlMemBlocks() - mem_base);
14524 printf(" %d", n_ctxt);
14525 printf(" %d", n_info);
14536 #define gen_nb_const_xmlParserCtxtPtr 1
14537 static xmlParserCtxtPtr gen_const_xmlParserCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
14540 static void des_const_xmlParserCtxtPtr(int no ATTRIBUTE_UNUSED, const xmlParserCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
14543 #define gen_nb_const_xmlNodePtr 1
14544 static xmlNodePtr gen_const_xmlNodePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
14547 static void des_const_xmlNodePtr(int no ATTRIBUTE_UNUSED, const xmlNodePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
14551 test_xmlParserFindNodeInfo(void) {
14555 const xmlParserNodeInfo * ret_val;
14556 xmlParserCtxtPtr ctx; /* an XML parser context */
14558 xmlNodePtr node; /* an XML node within the tree */
14561 for (n_ctx = 0;n_ctx < gen_nb_const_xmlParserCtxtPtr;n_ctx++) {
14562 for (n_node = 0;n_node < gen_nb_const_xmlNodePtr;n_node++) {
14563 mem_base = xmlMemBlocks();
14564 ctx = gen_const_xmlParserCtxtPtr(n_ctx, 0);
14565 node = gen_const_xmlNodePtr(n_node, 1);
14567 ret_val = xmlParserFindNodeInfo((const xmlParserCtxtPtr)ctx, (const xmlNodePtr)node);
14568 desret_const_xmlParserNodeInfo_ptr(ret_val);
14570 des_const_xmlParserCtxtPtr(n_ctx, (const xmlParserCtxtPtr)ctx, 0);
14571 des_const_xmlNodePtr(n_node, (const xmlNodePtr)node, 1);
14572 xmlResetLastError();
14573 if (mem_base != xmlMemBlocks()) {
14574 printf("Leak of %d blocks found in xmlParserFindNodeInfo",
14575 xmlMemBlocks() - mem_base);
14577 printf(" %d", n_ctx);
14578 printf(" %d", n_node);
14589 #define gen_nb_const_xmlParserNodeInfoSeqPtr 1
14590 static xmlParserNodeInfoSeqPtr gen_const_xmlParserNodeInfoSeqPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
14593 static void des_const_xmlParserNodeInfoSeqPtr(int no ATTRIBUTE_UNUSED, const xmlParserNodeInfoSeqPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
14597 test_xmlParserFindNodeInfoIndex(void) {
14601 unsigned long ret_val;
14602 xmlParserNodeInfoSeqPtr seq; /* a node info sequence pointer */
14604 xmlNodePtr node; /* an XML node pointer */
14607 for (n_seq = 0;n_seq < gen_nb_const_xmlParserNodeInfoSeqPtr;n_seq++) {
14608 for (n_node = 0;n_node < gen_nb_const_xmlNodePtr;n_node++) {
14609 mem_base = xmlMemBlocks();
14610 seq = gen_const_xmlParserNodeInfoSeqPtr(n_seq, 0);
14611 node = gen_const_xmlNodePtr(n_node, 1);
14613 ret_val = xmlParserFindNodeInfoIndex((const xmlParserNodeInfoSeqPtr)seq, (const xmlNodePtr)node);
14614 desret_unsigned_long(ret_val);
14616 des_const_xmlParserNodeInfoSeqPtr(n_seq, (const xmlParserNodeInfoSeqPtr)seq, 0);
14617 des_const_xmlNodePtr(n_node, (const xmlNodePtr)node, 1);
14618 xmlResetLastError();
14619 if (mem_base != xmlMemBlocks()) {
14620 printf("Leak of %d blocks found in xmlParserFindNodeInfoIndex",
14621 xmlMemBlocks() - mem_base);
14623 printf(" %d", n_seq);
14624 printf(" %d", n_node);
14635 #define gen_nb_xmlParserInputPtr 1
14636 static xmlParserInputPtr gen_xmlParserInputPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
14639 static void des_xmlParserInputPtr(int no ATTRIBUTE_UNUSED, xmlParserInputPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
14643 test_xmlParserInputGrow(void) {
14648 xmlParserInputPtr in; /* an XML parser input */
14650 int len; /* an indicative size for the lookahead */
14653 for (n_in = 0;n_in < gen_nb_xmlParserInputPtr;n_in++) {
14654 for (n_len = 0;n_len < gen_nb_int;n_len++) {
14655 mem_base = xmlMemBlocks();
14656 in = gen_xmlParserInputPtr(n_in, 0);
14657 len = gen_int(n_len, 1);
14659 ret_val = xmlParserInputGrow(in, len);
14660 desret_int(ret_val);
14662 des_xmlParserInputPtr(n_in, in, 0);
14663 des_int(n_len, len, 1);
14664 xmlResetLastError();
14665 if (mem_base != xmlMemBlocks()) {
14666 printf("Leak of %d blocks found in xmlParserInputGrow",
14667 xmlMemBlocks() - mem_base);
14669 printf(" %d", n_in);
14670 printf(" %d", n_len);
14682 test_xmlParserInputRead(void) {
14687 xmlParserInputPtr in; /* an XML parser input */
14689 int len; /* an indicative size for the lookahead */
14692 for (n_in = 0;n_in < gen_nb_xmlParserInputPtr;n_in++) {
14693 for (n_len = 0;n_len < gen_nb_int;n_len++) {
14694 mem_base = xmlMemBlocks();
14695 in = gen_xmlParserInputPtr(n_in, 0);
14696 len = gen_int(n_len, 1);
14698 ret_val = xmlParserInputRead(in, len);
14699 desret_int(ret_val);
14701 des_xmlParserInputPtr(n_in, in, 0);
14702 des_int(n_len, len, 1);
14703 xmlResetLastError();
14704 if (mem_base != xmlMemBlocks()) {
14705 printf("Leak of %d blocks found in xmlParserInputRead",
14706 xmlMemBlocks() - mem_base);
14708 printf(" %d", n_in);
14709 printf(" %d", n_len);
14721 test_xmlPedanticParserDefault(void) {
14726 int val; /* int 0 or 1 */
14729 for (n_val = 0;n_val < gen_nb_int;n_val++) {
14730 mem_base = xmlMemBlocks();
14731 val = gen_int(n_val, 0);
14733 ret_val = xmlPedanticParserDefault(val);
14734 desret_int(ret_val);
14736 des_int(n_val, val, 0);
14737 xmlResetLastError();
14738 if (mem_base != xmlMemBlocks()) {
14739 printf("Leak of %d blocks found in xmlPedanticParserDefault",
14740 xmlMemBlocks() - mem_base);
14742 printf(" %d", n_val);
14753 test_xmlReadDoc(void) {
14758 xmlChar * cur; /* a pointer to a zero terminated string */
14760 const char * URL; /* the base URL to use for the document */
14762 char * encoding; /* the document encoding, or NULL */
14764 int options; /* a combination of xmlParserOption */
14767 for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
14768 for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
14769 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
14770 for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
14771 mem_base = xmlMemBlocks();
14772 cur = gen_const_xmlChar_ptr(n_cur, 0);
14773 URL = gen_filepath(n_URL, 1);
14774 encoding = gen_const_char_ptr(n_encoding, 2);
14775 options = gen_parseroptions(n_options, 3);
14777 ret_val = xmlReadDoc((const xmlChar *)cur, URL, (const char *)encoding, options);
14778 desret_xmlDocPtr(ret_val);
14780 des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 0);
14781 des_filepath(n_URL, URL, 1);
14782 des_const_char_ptr(n_encoding, (const char *)encoding, 2);
14783 des_parseroptions(n_options, options, 3);
14784 xmlResetLastError();
14785 if (mem_base != xmlMemBlocks()) {
14786 printf("Leak of %d blocks found in xmlReadDoc",
14787 xmlMemBlocks() - mem_base);
14789 printf(" %d", n_cur);
14790 printf(" %d", n_URL);
14791 printf(" %d", n_encoding);
14792 printf(" %d", n_options);
14806 test_xmlReadFile(void) {
14811 const char * filename; /* a file or URL */
14813 char * encoding; /* the document encoding, or NULL */
14815 int options; /* a combination of xmlParserOption */
14818 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
14819 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
14820 for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
14821 mem_base = xmlMemBlocks();
14822 filename = gen_filepath(n_filename, 0);
14823 encoding = gen_const_char_ptr(n_encoding, 1);
14824 options = gen_parseroptions(n_options, 2);
14826 ret_val = xmlReadFile(filename, (const char *)encoding, options);
14827 desret_xmlDocPtr(ret_val);
14829 des_filepath(n_filename, filename, 0);
14830 des_const_char_ptr(n_encoding, (const char *)encoding, 1);
14831 des_parseroptions(n_options, options, 2);
14832 xmlResetLastError();
14833 if (mem_base != xmlMemBlocks()) {
14834 printf("Leak of %d blocks found in xmlReadFile",
14835 xmlMemBlocks() - mem_base);
14837 printf(" %d", n_filename);
14838 printf(" %d", n_encoding);
14839 printf(" %d", n_options);
14852 test_xmlReadMemory(void) {
14857 char * buffer; /* a pointer to a char array */
14859 int size; /* the size of the array */
14861 const char * URL; /* the base URL to use for the document */
14863 char * encoding; /* the document encoding, or NULL */
14865 int options; /* a combination of xmlParserOption */
14868 for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
14869 for (n_size = 0;n_size < gen_nb_int;n_size++) {
14870 for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
14871 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
14872 for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
14873 mem_base = xmlMemBlocks();
14874 buffer = gen_const_char_ptr(n_buffer, 0);
14875 size = gen_int(n_size, 1);
14876 URL = gen_filepath(n_URL, 2);
14877 encoding = gen_const_char_ptr(n_encoding, 3);
14878 options = gen_parseroptions(n_options, 4);
14880 ret_val = xmlReadMemory((const char *)buffer, size, URL, (const char *)encoding, options);
14881 desret_xmlDocPtr(ret_val);
14883 des_const_char_ptr(n_buffer, (const char *)buffer, 0);
14884 des_int(n_size, size, 1);
14885 des_filepath(n_URL, URL, 2);
14886 des_const_char_ptr(n_encoding, (const char *)encoding, 3);
14887 des_parseroptions(n_options, options, 4);
14888 xmlResetLastError();
14889 if (mem_base != xmlMemBlocks()) {
14890 printf("Leak of %d blocks found in xmlReadMemory",
14891 xmlMemBlocks() - mem_base);
14893 printf(" %d", n_buffer);
14894 printf(" %d", n_size);
14895 printf(" %d", n_URL);
14896 printf(" %d", n_encoding);
14897 printf(" %d", n_options);
14912 test_xmlRecoverDoc(void) {
14915 #if defined(LIBXML_SAX1_ENABLED)
14916 #ifdef LIBXML_SAX1_ENABLED
14919 xmlChar * cur; /* a pointer to an array of xmlChar */
14922 for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
14923 mem_base = xmlMemBlocks();
14924 cur = gen_const_xmlChar_ptr(n_cur, 0);
14926 ret_val = xmlRecoverDoc((const xmlChar *)cur);
14927 desret_xmlDocPtr(ret_val);
14929 des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 0);
14930 xmlResetLastError();
14931 if (mem_base != xmlMemBlocks()) {
14932 printf("Leak of %d blocks found in xmlRecoverDoc",
14933 xmlMemBlocks() - mem_base);
14935 printf(" %d", n_cur);
14948 test_xmlRecoverFile(void) {
14951 #if defined(LIBXML_SAX1_ENABLED)
14952 #ifdef LIBXML_SAX1_ENABLED
14955 const char * filename; /* the filename */
14958 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
14959 mem_base = xmlMemBlocks();
14960 filename = gen_filepath(n_filename, 0);
14962 ret_val = xmlRecoverFile(filename);
14963 desret_xmlDocPtr(ret_val);
14965 des_filepath(n_filename, filename, 0);
14966 xmlResetLastError();
14967 if (mem_base != xmlMemBlocks()) {
14968 printf("Leak of %d blocks found in xmlRecoverFile",
14969 xmlMemBlocks() - mem_base);
14971 printf(" %d", n_filename);
14984 test_xmlRecoverMemory(void) {
14987 #if defined(LIBXML_SAX1_ENABLED)
14988 #ifdef LIBXML_SAX1_ENABLED
14991 char * buffer; /* an pointer to a char array */
14993 int size; /* the size of the array */
14996 for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
14997 for (n_size = 0;n_size < gen_nb_int;n_size++) {
14998 mem_base = xmlMemBlocks();
14999 buffer = gen_const_char_ptr(n_buffer, 0);
15000 size = gen_int(n_size, 1);
15002 ret_val = xmlRecoverMemory((const char *)buffer, size);
15003 desret_xmlDocPtr(ret_val);
15005 des_const_char_ptr(n_buffer, (const char *)buffer, 0);
15006 des_int(n_size, size, 1);
15007 xmlResetLastError();
15008 if (mem_base != xmlMemBlocks()) {
15009 printf("Leak of %d blocks found in xmlRecoverMemory",
15010 xmlMemBlocks() - mem_base);
15012 printf(" %d", n_buffer);
15013 printf(" %d", n_size);
15027 test_xmlSAXParseDTD(void) {
15030 #if defined(LIBXML_VALID_ENABLED)
15031 #ifdef LIBXML_SAX1_ENABLED
15034 xmlSAXHandlerPtr sax; /* the SAX handler block */
15036 xmlChar * ExternalID; /* a NAME* containing the External ID of the DTD */
15038 xmlChar * SystemID; /* a NAME* containing the URL to the DTD */
15041 for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
15042 for (n_ExternalID = 0;n_ExternalID < gen_nb_const_xmlChar_ptr;n_ExternalID++) {
15043 for (n_SystemID = 0;n_SystemID < gen_nb_const_xmlChar_ptr;n_SystemID++) {
15044 mem_base = xmlMemBlocks();
15045 sax = gen_xmlSAXHandlerPtr(n_sax, 0);
15046 ExternalID = gen_const_xmlChar_ptr(n_ExternalID, 1);
15047 SystemID = gen_const_xmlChar_ptr(n_SystemID, 2);
15049 ret_val = xmlSAXParseDTD(sax, (const xmlChar *)ExternalID, (const xmlChar *)SystemID);
15050 desret_xmlDtdPtr(ret_val);
15052 des_xmlSAXHandlerPtr(n_sax, sax, 0);
15053 des_const_xmlChar_ptr(n_ExternalID, (const xmlChar *)ExternalID, 1);
15054 des_const_xmlChar_ptr(n_SystemID, (const xmlChar *)SystemID, 2);
15055 xmlResetLastError();
15056 if (mem_base != xmlMemBlocks()) {
15057 printf("Leak of %d blocks found in xmlSAXParseDTD",
15058 xmlMemBlocks() - mem_base);
15060 printf(" %d", n_sax);
15061 printf(" %d", n_ExternalID);
15062 printf(" %d", n_SystemID);
15077 test_xmlSAXParseDoc(void) {
15080 #if defined(LIBXML_SAX1_ENABLED)
15081 #ifdef LIBXML_SAX1_ENABLED
15084 xmlSAXHandlerPtr sax; /* the SAX handler block */
15086 xmlChar * cur; /* a pointer to an array of xmlChar */
15088 int recovery; /* work in recovery mode, i.e. tries to read no Well Formed documents */
15091 for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
15092 for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
15093 for (n_recovery = 0;n_recovery < gen_nb_int;n_recovery++) {
15094 mem_base = xmlMemBlocks();
15095 sax = gen_xmlSAXHandlerPtr(n_sax, 0);
15096 cur = gen_const_xmlChar_ptr(n_cur, 1);
15097 recovery = gen_int(n_recovery, 2);
15099 ret_val = xmlSAXParseDoc(sax, (const xmlChar *)cur, recovery);
15100 desret_xmlDocPtr(ret_val);
15102 des_xmlSAXHandlerPtr(n_sax, sax, 0);
15103 des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 1);
15104 des_int(n_recovery, recovery, 2);
15105 xmlResetLastError();
15106 if (mem_base != xmlMemBlocks()) {
15107 printf("Leak of %d blocks found in xmlSAXParseDoc",
15108 xmlMemBlocks() - mem_base);
15110 printf(" %d", n_sax);
15111 printf(" %d", n_cur);
15112 printf(" %d", n_recovery);
15127 test_xmlSAXParseEntity(void) {
15130 #if defined(LIBXML_SAX1_ENABLED)
15131 #ifdef LIBXML_SAX1_ENABLED
15134 xmlSAXHandlerPtr sax; /* the SAX handler block */
15136 const char * filename; /* the filename */
15139 for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
15140 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
15141 mem_base = xmlMemBlocks();
15142 sax = gen_xmlSAXHandlerPtr(n_sax, 0);
15143 filename = gen_filepath(n_filename, 1);
15145 ret_val = xmlSAXParseEntity(sax, filename);
15146 desret_xmlDocPtr(ret_val);
15148 des_xmlSAXHandlerPtr(n_sax, sax, 0);
15149 des_filepath(n_filename, filename, 1);
15150 xmlResetLastError();
15151 if (mem_base != xmlMemBlocks()) {
15152 printf("Leak of %d blocks found in xmlSAXParseEntity",
15153 xmlMemBlocks() - mem_base);
15155 printf(" %d", n_sax);
15156 printf(" %d", n_filename);
15170 test_xmlSAXParseFile(void) {
15173 #if defined(LIBXML_SAX1_ENABLED)
15174 #ifdef LIBXML_SAX1_ENABLED
15177 xmlSAXHandlerPtr sax; /* the SAX handler block */
15179 const char * filename; /* the filename */
15181 int recovery; /* work in recovery mode, i.e. tries to read no Well Formed documents */
15184 for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
15185 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
15186 for (n_recovery = 0;n_recovery < gen_nb_int;n_recovery++) {
15187 mem_base = xmlMemBlocks();
15188 sax = gen_xmlSAXHandlerPtr(n_sax, 0);
15189 filename = gen_filepath(n_filename, 1);
15190 recovery = gen_int(n_recovery, 2);
15192 ret_val = xmlSAXParseFile(sax, filename, recovery);
15193 desret_xmlDocPtr(ret_val);
15195 des_xmlSAXHandlerPtr(n_sax, sax, 0);
15196 des_filepath(n_filename, filename, 1);
15197 des_int(n_recovery, recovery, 2);
15198 xmlResetLastError();
15199 if (mem_base != xmlMemBlocks()) {
15200 printf("Leak of %d blocks found in xmlSAXParseFile",
15201 xmlMemBlocks() - mem_base);
15203 printf(" %d", n_sax);
15204 printf(" %d", n_filename);
15205 printf(" %d", n_recovery);
15220 test_xmlSAXParseFileWithData(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 */
15233 void * data; /* the userdata */
15236 for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
15237 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
15238 for (n_recovery = 0;n_recovery < gen_nb_int;n_recovery++) {
15239 for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
15240 mem_base = xmlMemBlocks();
15241 sax = gen_xmlSAXHandlerPtr(n_sax, 0);
15242 filename = gen_filepath(n_filename, 1);
15243 recovery = gen_int(n_recovery, 2);
15244 data = gen_userdata(n_data, 3);
15246 ret_val = xmlSAXParseFileWithData(sax, filename, recovery, data);
15247 desret_xmlDocPtr(ret_val);
15249 des_xmlSAXHandlerPtr(n_sax, sax, 0);
15250 des_filepath(n_filename, filename, 1);
15251 des_int(n_recovery, recovery, 2);
15252 des_userdata(n_data, data, 3);
15253 xmlResetLastError();
15254 if (mem_base != xmlMemBlocks()) {
15255 printf("Leak of %d blocks found in xmlSAXParseFileWithData",
15256 xmlMemBlocks() - mem_base);
15258 printf(" %d", n_sax);
15259 printf(" %d", n_filename);
15260 printf(" %d", n_recovery);
15261 printf(" %d", n_data);
15277 test_xmlSAXParseMemory(void) {
15280 #if defined(LIBXML_SAX1_ENABLED)
15281 #ifdef LIBXML_SAX1_ENABLED
15284 xmlSAXHandlerPtr sax; /* the SAX handler block */
15286 char * buffer; /* an pointer to a char array */
15288 int size; /* the size of the array */
15290 int recovery; /* work in recovery mode, i.e. tries to read not Well Formed documents */
15293 for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
15294 for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
15295 for (n_size = 0;n_size < gen_nb_int;n_size++) {
15296 for (n_recovery = 0;n_recovery < gen_nb_int;n_recovery++) {
15297 mem_base = xmlMemBlocks();
15298 sax = gen_xmlSAXHandlerPtr(n_sax, 0);
15299 buffer = gen_const_char_ptr(n_buffer, 1);
15300 size = gen_int(n_size, 2);
15301 recovery = gen_int(n_recovery, 3);
15303 ret_val = xmlSAXParseMemory(sax, (const char *)buffer, size, recovery);
15304 desret_xmlDocPtr(ret_val);
15306 des_xmlSAXHandlerPtr(n_sax, sax, 0);
15307 des_const_char_ptr(n_buffer, (const char *)buffer, 1);
15308 des_int(n_size, size, 2);
15309 des_int(n_recovery, recovery, 3);
15310 xmlResetLastError();
15311 if (mem_base != xmlMemBlocks()) {
15312 printf("Leak of %d blocks found in xmlSAXParseMemory",
15313 xmlMemBlocks() - mem_base);
15315 printf(" %d", n_sax);
15316 printf(" %d", n_buffer);
15317 printf(" %d", n_size);
15318 printf(" %d", n_recovery);
15334 test_xmlSAXParseMemoryWithData(void) {
15337 #if defined(LIBXML_SAX1_ENABLED)
15338 #ifdef LIBXML_SAX1_ENABLED
15341 xmlSAXHandlerPtr sax; /* the SAX handler block */
15343 char * buffer; /* an pointer to a char array */
15345 int size; /* the size of the array */
15347 int recovery; /* work in recovery mode, i.e. tries to read no Well Formed documents */
15349 void * data; /* the userdata */
15352 for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
15353 for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
15354 for (n_size = 0;n_size < gen_nb_int;n_size++) {
15355 for (n_recovery = 0;n_recovery < gen_nb_int;n_recovery++) {
15356 for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
15357 mem_base = xmlMemBlocks();
15358 sax = gen_xmlSAXHandlerPtr(n_sax, 0);
15359 buffer = gen_const_char_ptr(n_buffer, 1);
15360 size = gen_int(n_size, 2);
15361 recovery = gen_int(n_recovery, 3);
15362 data = gen_userdata(n_data, 4);
15364 ret_val = xmlSAXParseMemoryWithData(sax, (const char *)buffer, size, recovery, data);
15365 desret_xmlDocPtr(ret_val);
15367 des_xmlSAXHandlerPtr(n_sax, sax, 0);
15368 des_const_char_ptr(n_buffer, (const char *)buffer, 1);
15369 des_int(n_size, size, 2);
15370 des_int(n_recovery, recovery, 3);
15371 des_userdata(n_data, data, 4);
15372 xmlResetLastError();
15373 if (mem_base != xmlMemBlocks()) {
15374 printf("Leak of %d blocks found in xmlSAXParseMemoryWithData",
15375 xmlMemBlocks() - mem_base);
15377 printf(" %d", n_sax);
15378 printf(" %d", n_buffer);
15379 printf(" %d", n_size);
15380 printf(" %d", n_recovery);
15381 printf(" %d", n_data);
15398 test_xmlSAXUserParseFile(void) {
15401 #if defined(LIBXML_SAX1_ENABLED)
15402 #ifdef LIBXML_SAX1_ENABLED
15405 xmlSAXHandlerPtr sax; /* a SAX handler */
15407 void * user_data; /* The user data returned on SAX callbacks */
15409 const char * filename; /* a file name */
15412 for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
15413 for (n_user_data = 0;n_user_data < gen_nb_userdata;n_user_data++) {
15414 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
15415 mem_base = xmlMemBlocks();
15416 sax = gen_xmlSAXHandlerPtr(n_sax, 0);
15417 user_data = gen_userdata(n_user_data, 1);
15418 filename = gen_filepath(n_filename, 2);
15420 #ifdef LIBXML_SAX1_ENABLED
15421 if (sax == (xmlSAXHandlerPtr)&xmlDefaultSAXHandler) user_data = NULL;
15425 ret_val = xmlSAXUserParseFile(sax, user_data, filename);
15426 desret_int(ret_val);
15428 des_xmlSAXHandlerPtr(n_sax, sax, 0);
15429 des_userdata(n_user_data, user_data, 1);
15430 des_filepath(n_filename, filename, 2);
15431 xmlResetLastError();
15432 if (mem_base != xmlMemBlocks()) {
15433 printf("Leak of %d blocks found in xmlSAXUserParseFile",
15434 xmlMemBlocks() - mem_base);
15436 printf(" %d", n_sax);
15437 printf(" %d", n_user_data);
15438 printf(" %d", n_filename);
15453 test_xmlSAXUserParseMemory(void) {
15456 #if defined(LIBXML_SAX1_ENABLED)
15457 #ifdef LIBXML_SAX1_ENABLED
15460 xmlSAXHandlerPtr sax; /* a SAX handler */
15462 void * user_data; /* The user data returned on SAX callbacks */
15464 char * buffer; /* an in-memory XML document input */
15466 int size; /* the length of the XML document in bytes */
15469 for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
15470 for (n_user_data = 0;n_user_data < gen_nb_userdata;n_user_data++) {
15471 for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
15472 for (n_size = 0;n_size < gen_nb_int;n_size++) {
15473 mem_base = xmlMemBlocks();
15474 sax = gen_xmlSAXHandlerPtr(n_sax, 0);
15475 user_data = gen_userdata(n_user_data, 1);
15476 buffer = gen_const_char_ptr(n_buffer, 2);
15477 size = gen_int(n_size, 3);
15479 #ifdef LIBXML_SAX1_ENABLED
15480 if (sax == (xmlSAXHandlerPtr)&xmlDefaultSAXHandler) user_data = NULL;
15484 ret_val = xmlSAXUserParseMemory(sax, user_data, (const char *)buffer, size);
15485 desret_int(ret_val);
15487 des_xmlSAXHandlerPtr(n_sax, sax, 0);
15488 des_userdata(n_user_data, user_data, 1);
15489 des_const_char_ptr(n_buffer, (const char *)buffer, 2);
15490 des_int(n_size, size, 3);
15491 xmlResetLastError();
15492 if (mem_base != xmlMemBlocks()) {
15493 printf("Leak of %d blocks found in xmlSAXUserParseMemory",
15494 xmlMemBlocks() - mem_base);
15496 printf(" %d", n_sax);
15497 printf(" %d", n_user_data);
15498 printf(" %d", n_buffer);
15499 printf(" %d", n_size);
15515 test_xmlSetExternalEntityLoader(void) {
15519 /* missing type support */
15525 test_xmlSetFeature(void) {
15528 #if defined(LIBXML_LEGACY_ENABLED)
15529 #ifdef LIBXML_LEGACY_ENABLED
15532 xmlParserCtxtPtr ctxt; /* an XML/HTML parser context */
15534 char * name; /* the feature name */
15536 void * value; /* pointer to the location of the new value */
15539 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
15540 for (n_name = 0;n_name < gen_nb_const_char_ptr;n_name++) {
15541 for (n_value = 0;n_value < gen_nb_void_ptr;n_value++) {
15542 mem_base = xmlMemBlocks();
15543 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
15544 name = gen_const_char_ptr(n_name, 1);
15545 value = gen_void_ptr(n_value, 2);
15547 ret_val = xmlSetFeature(ctxt, (const char *)name, value);
15548 desret_int(ret_val);
15550 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
15551 des_const_char_ptr(n_name, (const char *)name, 1);
15552 des_void_ptr(n_value, value, 2);
15553 xmlResetLastError();
15554 if (mem_base != xmlMemBlocks()) {
15555 printf("Leak of %d blocks found in xmlSetFeature",
15556 xmlMemBlocks() - mem_base);
15558 printf(" %d", n_ctxt);
15559 printf(" %d", n_name);
15560 printf(" %d", n_value);
15575 test_xmlSetupParserForBuffer(void) {
15578 #if defined(LIBXML_SAX1_ENABLED)
15579 #ifdef LIBXML_SAX1_ENABLED
15581 xmlParserCtxtPtr ctxt; /* an XML parser context */
15583 xmlChar * buffer; /* a xmlChar * buffer */
15585 const char * filename; /* a file name */
15588 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
15589 for (n_buffer = 0;n_buffer < gen_nb_const_xmlChar_ptr;n_buffer++) {
15590 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
15591 mem_base = xmlMemBlocks();
15592 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
15593 buffer = gen_const_xmlChar_ptr(n_buffer, 1);
15594 filename = gen_filepath(n_filename, 2);
15596 xmlSetupParserForBuffer(ctxt, (const xmlChar *)buffer, filename);
15598 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
15599 des_const_xmlChar_ptr(n_buffer, (const xmlChar *)buffer, 1);
15600 des_filepath(n_filename, filename, 2);
15601 xmlResetLastError();
15602 if (mem_base != xmlMemBlocks()) {
15603 printf("Leak of %d blocks found in xmlSetupParserForBuffer",
15604 xmlMemBlocks() - mem_base);
15606 printf(" %d", n_ctxt);
15607 printf(" %d", n_buffer);
15608 printf(" %d", n_filename);
15623 test_xmlStopParser(void) {
15626 #ifdef LIBXML_PUSH_ENABLED
15628 xmlParserCtxtPtr ctxt; /* an XML parser context */
15631 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
15632 mem_base = xmlMemBlocks();
15633 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
15635 xmlStopParser(ctxt);
15637 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
15638 xmlResetLastError();
15639 if (mem_base != xmlMemBlocks()) {
15640 printf("Leak of %d blocks found in xmlStopParser",
15641 xmlMemBlocks() - mem_base);
15643 printf(" %d", n_ctxt);
15655 test_xmlSubstituteEntitiesDefault(void) {
15660 int val; /* int 0 or 1 */
15663 for (n_val = 0;n_val < gen_nb_int;n_val++) {
15664 mem_base = xmlMemBlocks();
15665 val = gen_int(n_val, 0);
15667 ret_val = xmlSubstituteEntitiesDefault(val);
15668 desret_int(ret_val);
15670 des_int(n_val, val, 0);
15671 xmlResetLastError();
15672 if (mem_base != xmlMemBlocks()) {
15673 printf("Leak of %d blocks found in xmlSubstituteEntitiesDefault",
15674 xmlMemBlocks() - mem_base);
15676 printf(" %d", n_val);
15686 test_parser(void) {
15690 if (quiet == 0) printf("Testing parser : 61 of 70 functions ...\n");
15691 rc = test_xmlByteConsumed();
15692 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15693 rc = test_xmlClearNodeInfoSeq();
15694 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15695 rc = test_xmlClearParserCtxt();
15696 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15697 rc = test_xmlCreateDocParserCtxt();
15698 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15699 rc = test_xmlCreatePushParserCtxt();
15700 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15701 rc = test_xmlCtxtReadDoc();
15702 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15703 rc = test_xmlCtxtReadFile();
15704 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15705 rc = test_xmlCtxtReadMemory();
15706 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15707 rc = test_xmlCtxtReset();
15708 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15709 rc = test_xmlCtxtResetPush();
15710 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15711 rc = test_xmlCtxtUseOptions();
15712 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15713 rc = test_xmlGetExternalEntityLoader();
15714 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15715 rc = test_xmlGetFeature();
15716 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15717 rc = test_xmlGetFeaturesList();
15718 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15719 rc = test_xmlHasFeature();
15720 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15721 rc = test_xmlIOParseDTD();
15722 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15723 rc = test_xmlInitNodeInfoSeq();
15724 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15725 rc = test_xmlInitParser();
15726 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15727 rc = test_xmlInitParserCtxt();
15728 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15729 rc = test_xmlKeepBlanksDefault();
15730 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15731 rc = test_xmlLineNumbersDefault();
15732 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15733 rc = test_xmlLoadExternalEntity();
15734 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15735 rc = test_xmlNewIOInputStream();
15736 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15737 rc = test_xmlNewParserCtxt();
15738 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15739 rc = test_xmlParseBalancedChunkMemory();
15740 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15741 rc = test_xmlParseBalancedChunkMemoryRecover();
15742 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15743 rc = test_xmlParseChunk();
15744 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15745 rc = test_xmlParseCtxtExternalEntity();
15746 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15747 rc = test_xmlParseDTD();
15748 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15749 rc = test_xmlParseDoc();
15750 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15751 rc = test_xmlParseDocument();
15752 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15753 rc = test_xmlParseEntity();
15754 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15755 rc = test_xmlParseExtParsedEnt();
15756 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15757 rc = test_xmlParseExternalEntity();
15758 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15759 rc = test_xmlParseFile();
15760 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15761 rc = test_xmlParseInNodeContext();
15762 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15763 rc = test_xmlParseMemory();
15764 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15765 rc = test_xmlParserAddNodeInfo();
15766 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15767 rc = test_xmlParserFindNodeInfo();
15768 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15769 rc = test_xmlParserFindNodeInfoIndex();
15770 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15771 rc = test_xmlParserInputGrow();
15772 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15773 rc = test_xmlParserInputRead();
15774 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15775 rc = test_xmlPedanticParserDefault();
15776 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15777 rc = test_xmlReadDoc();
15778 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15779 rc = test_xmlReadFile();
15780 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15781 rc = test_xmlReadMemory();
15782 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15783 rc = test_xmlRecoverDoc();
15784 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15785 rc = test_xmlRecoverFile();
15786 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15787 rc = test_xmlRecoverMemory();
15788 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15789 rc = test_xmlSAXParseDTD();
15790 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15791 rc = test_xmlSAXParseDoc();
15792 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15793 rc = test_xmlSAXParseEntity();
15794 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15795 rc = test_xmlSAXParseFile();
15796 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15797 rc = test_xmlSAXParseFileWithData();
15798 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15799 rc = test_xmlSAXParseMemory();
15800 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15801 rc = test_xmlSAXParseMemoryWithData();
15802 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15803 rc = test_xmlSAXUserParseFile();
15804 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15805 rc = test_xmlSAXUserParseMemory();
15806 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15807 rc = test_xmlSetExternalEntityLoader();
15808 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15809 rc = test_xmlSetFeature();
15810 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15811 rc = test_xmlSetupParserForBuffer();
15812 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15813 rc = test_xmlStopParser();
15814 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15815 rc = test_xmlSubstituteEntitiesDefault();
15816 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
15819 printf("Module parser: %d errors\n", test_ret);
15824 test_htmlCreateFileParserCtxt(void) {
15827 #if defined(LIBXML_HTML_ENABLED)
15829 htmlParserCtxtPtr ret_val;
15830 const char * filename; /* the filename */
15832 char * encoding; /* a free form C string describing the HTML document encoding, or NULL */
15835 for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
15836 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
15837 mem_base = xmlMemBlocks();
15838 filename = gen_fileoutput(n_filename, 0);
15839 encoding = gen_const_char_ptr(n_encoding, 1);
15841 ret_val = htmlCreateFileParserCtxt(filename, (const char *)encoding);
15842 desret_htmlParserCtxtPtr(ret_val);
15844 des_fileoutput(n_filename, filename, 0);
15845 des_const_char_ptr(n_encoding, (const char *)encoding, 1);
15846 xmlResetLastError();
15847 if (mem_base != xmlMemBlocks()) {
15848 printf("Leak of %d blocks found in htmlCreateFileParserCtxt",
15849 xmlMemBlocks() - mem_base);
15851 printf(" %d", n_filename);
15852 printf(" %d", n_encoding);
15865 test_htmlInitAutoClose(void) {
15868 #if defined(LIBXML_HTML_ENABLED)
15871 mem_base = xmlMemBlocks();
15873 htmlInitAutoClose();
15875 xmlResetLastError();
15876 if (mem_base != xmlMemBlocks()) {
15877 printf("Leak of %d blocks found in htmlInitAutoClose",
15878 xmlMemBlocks() - mem_base);
15890 test_inputPop(void) {
15894 xmlParserInputPtr ret_val;
15895 xmlParserCtxtPtr ctxt; /* an XML parser context */
15898 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
15899 mem_base = xmlMemBlocks();
15900 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
15902 ret_val = inputPop(ctxt);
15903 desret_xmlParserInputPtr(ret_val);
15905 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
15906 xmlResetLastError();
15907 if (mem_base != xmlMemBlocks()) {
15908 printf("Leak of %d blocks found in inputPop",
15909 xmlMemBlocks() - mem_base);
15911 printf(" %d", n_ctxt);
15922 test_inputPush(void) {
15927 xmlParserCtxtPtr ctxt; /* an XML parser context */
15929 xmlParserInputPtr value; /* the parser input */
15932 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
15933 for (n_value = 0;n_value < gen_nb_xmlParserInputPtr;n_value++) {
15934 mem_base = xmlMemBlocks();
15935 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
15936 value = gen_xmlParserInputPtr(n_value, 1);
15938 ret_val = inputPush(ctxt, value);
15939 desret_int(ret_val);
15941 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
15942 des_xmlParserInputPtr(n_value, value, 1);
15943 xmlResetLastError();
15944 if (mem_base != xmlMemBlocks()) {
15945 printf("Leak of %d blocks found in inputPush",
15946 xmlMemBlocks() - mem_base);
15948 printf(" %d", n_ctxt);
15949 printf(" %d", n_value);
15961 test_namePop(void) {
15965 const xmlChar * ret_val;
15966 xmlParserCtxtPtr ctxt; /* an XML parser context */
15969 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
15970 mem_base = xmlMemBlocks();
15971 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
15973 ret_val = namePop(ctxt);
15974 desret_const_xmlChar_ptr(ret_val);
15976 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
15977 xmlResetLastError();
15978 if (mem_base != xmlMemBlocks()) {
15979 printf("Leak of %d blocks found in namePop",
15980 xmlMemBlocks() - mem_base);
15982 printf(" %d", n_ctxt);
15993 test_namePush(void) {
15998 xmlParserCtxtPtr ctxt; /* an XML parser context */
16000 xmlChar * value; /* the element name */
16003 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
16004 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
16005 mem_base = xmlMemBlocks();
16006 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
16007 value = gen_const_xmlChar_ptr(n_value, 1);
16009 ret_val = namePush(ctxt, (const xmlChar *)value);
16010 desret_int(ret_val);
16012 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
16013 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 1);
16014 xmlResetLastError();
16015 if (mem_base != xmlMemBlocks()) {
16016 printf("Leak of %d blocks found in namePush",
16017 xmlMemBlocks() - mem_base);
16019 printf(" %d", n_ctxt);
16020 printf(" %d", n_value);
16032 test_nodePop(void) {
16036 xmlNodePtr ret_val;
16037 xmlParserCtxtPtr ctxt; /* an XML parser context */
16040 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
16041 mem_base = xmlMemBlocks();
16042 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
16044 ret_val = nodePop(ctxt);
16045 desret_xmlNodePtr(ret_val);
16047 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
16048 xmlResetLastError();
16049 if (mem_base != xmlMemBlocks()) {
16050 printf("Leak of %d blocks found in nodePop",
16051 xmlMemBlocks() - mem_base);
16053 printf(" %d", n_ctxt);
16064 test_nodePush(void) {
16069 xmlParserCtxtPtr ctxt; /* an XML parser context */
16071 xmlNodePtr value; /* the element node */
16074 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
16075 for (n_value = 0;n_value < gen_nb_xmlNodePtr;n_value++) {
16076 mem_base = xmlMemBlocks();
16077 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
16078 value = gen_xmlNodePtr(n_value, 1);
16080 ret_val = nodePush(ctxt, value);
16081 desret_int(ret_val);
16083 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
16084 des_xmlNodePtr(n_value, value, 1);
16085 xmlResetLastError();
16086 if (mem_base != xmlMemBlocks()) {
16087 printf("Leak of %d blocks found in nodePush",
16088 xmlMemBlocks() - mem_base);
16090 printf(" %d", n_ctxt);
16091 printf(" %d", n_value);
16103 test_xmlCheckLanguageID(void) {
16108 xmlChar * lang; /* pointer to the string value */
16111 for (n_lang = 0;n_lang < gen_nb_const_xmlChar_ptr;n_lang++) {
16112 mem_base = xmlMemBlocks();
16113 lang = gen_const_xmlChar_ptr(n_lang, 0);
16115 ret_val = xmlCheckLanguageID((const xmlChar *)lang);
16116 desret_int(ret_val);
16118 des_const_xmlChar_ptr(n_lang, (const xmlChar *)lang, 0);
16119 xmlResetLastError();
16120 if (mem_base != xmlMemBlocks()) {
16121 printf("Leak of %d blocks found in xmlCheckLanguageID",
16122 xmlMemBlocks() - mem_base);
16124 printf(" %d", n_lang);
16135 test_xmlCopyChar(void) {
16140 int len; /* Ignored, compatibility */
16142 xmlChar * out; /* pointer to an array of xmlChar */
16144 int val; /* the char value */
16147 for (n_len = 0;n_len < gen_nb_int;n_len++) {
16148 for (n_out = 0;n_out < gen_nb_xmlChar_ptr;n_out++) {
16149 for (n_val = 0;n_val < gen_nb_int;n_val++) {
16150 mem_base = xmlMemBlocks();
16151 len = gen_int(n_len, 0);
16152 out = gen_xmlChar_ptr(n_out, 1);
16153 val = gen_int(n_val, 2);
16155 ret_val = xmlCopyChar(len, out, val);
16156 desret_int(ret_val);
16158 des_int(n_len, len, 0);
16159 des_xmlChar_ptr(n_out, out, 1);
16160 des_int(n_val, val, 2);
16161 xmlResetLastError();
16162 if (mem_base != xmlMemBlocks()) {
16163 printf("Leak of %d blocks found in xmlCopyChar",
16164 xmlMemBlocks() - mem_base);
16166 printf(" %d", n_len);
16167 printf(" %d", n_out);
16168 printf(" %d", n_val);
16181 test_xmlCopyCharMultiByte(void) {
16186 xmlChar * out; /* pointer to an array of xmlChar */
16188 int val; /* the char value */
16191 for (n_out = 0;n_out < gen_nb_xmlChar_ptr;n_out++) {
16192 for (n_val = 0;n_val < gen_nb_int;n_val++) {
16193 mem_base = xmlMemBlocks();
16194 out = gen_xmlChar_ptr(n_out, 0);
16195 val = gen_int(n_val, 1);
16197 ret_val = xmlCopyCharMultiByte(out, val);
16198 desret_int(ret_val);
16200 des_xmlChar_ptr(n_out, out, 0);
16201 des_int(n_val, val, 1);
16202 xmlResetLastError();
16203 if (mem_base != xmlMemBlocks()) {
16204 printf("Leak of %d blocks found in xmlCopyCharMultiByte",
16205 xmlMemBlocks() - mem_base);
16207 printf(" %d", n_out);
16208 printf(" %d", n_val);
16220 test_xmlCreateEntityParserCtxt(void) {
16224 xmlParserCtxtPtr ret_val;
16225 xmlChar * URL; /* the entity URL */
16227 xmlChar * ID; /* the entity PUBLIC ID */
16229 xmlChar * base; /* a possible base for the target URI */
16232 for (n_URL = 0;n_URL < gen_nb_const_xmlChar_ptr;n_URL++) {
16233 for (n_ID = 0;n_ID < gen_nb_const_xmlChar_ptr;n_ID++) {
16234 for (n_base = 0;n_base < gen_nb_const_xmlChar_ptr;n_base++) {
16235 mem_base = xmlMemBlocks();
16236 URL = gen_const_xmlChar_ptr(n_URL, 0);
16237 ID = gen_const_xmlChar_ptr(n_ID, 1);
16238 base = gen_const_xmlChar_ptr(n_base, 2);
16240 ret_val = xmlCreateEntityParserCtxt((const xmlChar *)URL, (const xmlChar *)ID, (const xmlChar *)base);
16241 desret_xmlParserCtxtPtr(ret_val);
16243 des_const_xmlChar_ptr(n_URL, (const xmlChar *)URL, 0);
16244 des_const_xmlChar_ptr(n_ID, (const xmlChar *)ID, 1);
16245 des_const_xmlChar_ptr(n_base, (const xmlChar *)base, 2);
16246 xmlResetLastError();
16247 if (mem_base != xmlMemBlocks()) {
16248 printf("Leak of %d blocks found in xmlCreateEntityParserCtxt",
16249 xmlMemBlocks() - mem_base);
16251 printf(" %d", n_URL);
16252 printf(" %d", n_ID);
16253 printf(" %d", n_base);
16266 test_xmlCreateFileParserCtxt(void) {
16270 xmlParserCtxtPtr ret_val;
16271 const char * filename; /* the filename */
16274 for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
16275 mem_base = xmlMemBlocks();
16276 filename = gen_fileoutput(n_filename, 0);
16278 ret_val = xmlCreateFileParserCtxt(filename);
16279 desret_xmlParserCtxtPtr(ret_val);
16281 des_fileoutput(n_filename, filename, 0);
16282 xmlResetLastError();
16283 if (mem_base != xmlMemBlocks()) {
16284 printf("Leak of %d blocks found in xmlCreateFileParserCtxt",
16285 xmlMemBlocks() - mem_base);
16287 printf(" %d", n_filename);
16298 test_xmlCreateMemoryParserCtxt(void) {
16302 xmlParserCtxtPtr ret_val;
16303 char * buffer; /* a pointer to a char array */
16305 int size; /* the size of the array */
16308 for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
16309 for (n_size = 0;n_size < gen_nb_int;n_size++) {
16310 mem_base = xmlMemBlocks();
16311 buffer = gen_const_char_ptr(n_buffer, 0);
16312 size = gen_int(n_size, 1);
16314 ret_val = xmlCreateMemoryParserCtxt((const char *)buffer, size);
16315 desret_xmlParserCtxtPtr(ret_val);
16317 des_const_char_ptr(n_buffer, (const char *)buffer, 0);
16318 des_int(n_size, size, 1);
16319 xmlResetLastError();
16320 if (mem_base != xmlMemBlocks()) {
16321 printf("Leak of %d blocks found in xmlCreateMemoryParserCtxt",
16322 xmlMemBlocks() - mem_base);
16324 printf(" %d", n_buffer);
16325 printf(" %d", n_size);
16337 test_xmlCreateURLParserCtxt(void) {
16341 xmlParserCtxtPtr ret_val;
16342 const char * filename; /* the filename or URL */
16344 int options; /* a combination of xmlParserOption */
16347 for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
16348 for (n_options = 0;n_options < gen_nb_int;n_options++) {
16349 mem_base = xmlMemBlocks();
16350 filename = gen_fileoutput(n_filename, 0);
16351 options = gen_int(n_options, 1);
16353 ret_val = xmlCreateURLParserCtxt(filename, options);
16354 desret_xmlParserCtxtPtr(ret_val);
16356 des_fileoutput(n_filename, filename, 0);
16357 des_int(n_options, options, 1);
16358 xmlResetLastError();
16359 if (mem_base != xmlMemBlocks()) {
16360 printf("Leak of %d blocks found in xmlCreateURLParserCtxt",
16361 xmlMemBlocks() - mem_base);
16363 printf(" %d", n_filename);
16364 printf(" %d", n_options);
16376 test_xmlCurrentChar(void) {
16381 xmlParserCtxtPtr ctxt; /* the XML parser context */
16383 int * len; /* pointer to the length of the char read */
16386 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
16387 for (n_len = 0;n_len < gen_nb_int_ptr;n_len++) {
16388 mem_base = xmlMemBlocks();
16389 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
16390 len = gen_int_ptr(n_len, 1);
16392 ret_val = xmlCurrentChar(ctxt, len);
16393 desret_int(ret_val);
16395 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
16396 des_int_ptr(n_len, len, 1);
16397 xmlResetLastError();
16398 if (mem_base != xmlMemBlocks()) {
16399 printf("Leak of %d blocks found in xmlCurrentChar",
16400 xmlMemBlocks() - mem_base);
16402 printf(" %d", n_ctxt);
16403 printf(" %d", n_len);
16415 test_xmlErrMemory(void) {
16419 xmlParserCtxtPtr ctxt; /* an XML parser context */
16421 char * extra; /* extra informations */
16424 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
16425 for (n_extra = 0;n_extra < gen_nb_const_char_ptr;n_extra++) {
16426 mem_base = xmlMemBlocks();
16427 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
16428 extra = gen_const_char_ptr(n_extra, 1);
16430 xmlErrMemory(ctxt, (const char *)extra);
16432 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
16433 des_const_char_ptr(n_extra, (const char *)extra, 1);
16434 xmlResetLastError();
16435 if (mem_base != xmlMemBlocks()) {
16436 printf("Leak of %d blocks found in xmlErrMemory",
16437 xmlMemBlocks() - mem_base);
16439 printf(" %d", n_ctxt);
16440 printf(" %d", n_extra);
16452 test_xmlIsLetter(void) {
16457 int c; /* an unicode character (int) */
16460 for (n_c = 0;n_c < gen_nb_int;n_c++) {
16461 mem_base = xmlMemBlocks();
16462 c = gen_int(n_c, 0);
16464 ret_val = xmlIsLetter(c);
16465 desret_int(ret_val);
16467 des_int(n_c, c, 0);
16468 xmlResetLastError();
16469 if (mem_base != xmlMemBlocks()) {
16470 printf("Leak of %d blocks found in xmlIsLetter",
16471 xmlMemBlocks() - mem_base);
16473 printf(" %d", n_c);
16484 test_xmlNewEntityInputStream(void) {
16488 xmlParserInputPtr ret_val;
16489 xmlParserCtxtPtr ctxt; /* an XML parser context */
16491 xmlEntityPtr entity; /* an Entity pointer */
16494 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
16495 for (n_entity = 0;n_entity < gen_nb_xmlEntityPtr;n_entity++) {
16496 mem_base = xmlMemBlocks();
16497 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
16498 entity = gen_xmlEntityPtr(n_entity, 1);
16500 ret_val = xmlNewEntityInputStream(ctxt, entity);
16501 desret_xmlParserInputPtr(ret_val);
16503 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
16504 des_xmlEntityPtr(n_entity, entity, 1);
16505 xmlResetLastError();
16506 if (mem_base != xmlMemBlocks()) {
16507 printf("Leak of %d blocks found in xmlNewEntityInputStream",
16508 xmlMemBlocks() - mem_base);
16510 printf(" %d", n_ctxt);
16511 printf(" %d", n_entity);
16523 test_xmlNewInputFromFile(void) {
16527 xmlParserInputPtr ret_val;
16528 xmlParserCtxtPtr ctxt; /* an XML parser context */
16530 const char * filename; /* the filename to use as entity */
16533 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
16534 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
16535 mem_base = xmlMemBlocks();
16536 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
16537 filename = gen_filepath(n_filename, 1);
16539 ret_val = xmlNewInputFromFile(ctxt, filename);
16540 desret_xmlParserInputPtr(ret_val);
16542 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
16543 des_filepath(n_filename, filename, 1);
16544 xmlResetLastError();
16545 if (mem_base != xmlMemBlocks()) {
16546 printf("Leak of %d blocks found in xmlNewInputFromFile",
16547 xmlMemBlocks() - mem_base);
16549 printf(" %d", n_ctxt);
16550 printf(" %d", n_filename);
16562 test_xmlNewInputStream(void) {
16566 xmlParserInputPtr ret_val;
16567 xmlParserCtxtPtr ctxt; /* an XML parser context */
16570 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
16571 mem_base = xmlMemBlocks();
16572 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
16574 ret_val = xmlNewInputStream(ctxt);
16575 desret_xmlParserInputPtr(ret_val);
16577 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
16578 xmlResetLastError();
16579 if (mem_base != xmlMemBlocks()) {
16580 printf("Leak of %d blocks found in xmlNewInputStream",
16581 xmlMemBlocks() - mem_base);
16583 printf(" %d", n_ctxt);
16594 test_xmlNewStringInputStream(void) {
16598 xmlParserInputPtr ret_val;
16599 xmlParserCtxtPtr ctxt; /* an XML parser context */
16601 xmlChar * buffer; /* an memory buffer */
16604 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
16605 for (n_buffer = 0;n_buffer < gen_nb_const_xmlChar_ptr;n_buffer++) {
16606 mem_base = xmlMemBlocks();
16607 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
16608 buffer = gen_const_xmlChar_ptr(n_buffer, 1);
16610 ret_val = xmlNewStringInputStream(ctxt, (const xmlChar *)buffer);
16611 desret_xmlParserInputPtr(ret_val);
16613 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
16614 des_const_xmlChar_ptr(n_buffer, (const xmlChar *)buffer, 1);
16615 xmlResetLastError();
16616 if (mem_base != xmlMemBlocks()) {
16617 printf("Leak of %d blocks found in xmlNewStringInputStream",
16618 xmlMemBlocks() - mem_base);
16620 printf(" %d", n_ctxt);
16621 printf(" %d", n_buffer);
16633 test_xmlNextChar(void) {
16637 xmlParserCtxtPtr ctxt; /* the XML parser context */
16640 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
16641 mem_base = xmlMemBlocks();
16642 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
16646 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
16647 xmlResetLastError();
16648 if (mem_base != xmlMemBlocks()) {
16649 printf("Leak of %d blocks found in xmlNextChar",
16650 xmlMemBlocks() - mem_base);
16652 printf(" %d", n_ctxt);
16663 test_xmlParserInputShrink(void) {
16667 xmlParserInputPtr in; /* an XML parser input */
16670 for (n_in = 0;n_in < gen_nb_xmlParserInputPtr;n_in++) {
16671 mem_base = xmlMemBlocks();
16672 in = gen_xmlParserInputPtr(n_in, 0);
16674 xmlParserInputShrink(in);
16676 des_xmlParserInputPtr(n_in, in, 0);
16677 xmlResetLastError();
16678 if (mem_base != xmlMemBlocks()) {
16679 printf("Leak of %d blocks found in xmlParserInputShrink",
16680 xmlMemBlocks() - mem_base);
16682 printf(" %d", n_in);
16693 test_xmlPopInput(void) {
16698 xmlParserCtxtPtr ctxt; /* an XML parser context */
16701 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
16702 mem_base = xmlMemBlocks();
16703 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
16705 ret_val = xmlPopInput(ctxt);
16706 desret_xmlChar(ret_val);
16708 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
16709 xmlResetLastError();
16710 if (mem_base != xmlMemBlocks()) {
16711 printf("Leak of %d blocks found in xmlPopInput",
16712 xmlMemBlocks() - mem_base);
16714 printf(" %d", n_ctxt);
16725 test_xmlPushInput(void) {
16730 xmlParserCtxtPtr ctxt; /* an XML parser context */
16732 xmlParserInputPtr input; /* an XML parser input fragment (entity, XML fragment ...). */
16735 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
16736 for (n_input = 0;n_input < gen_nb_xmlParserInputPtr;n_input++) {
16737 mem_base = xmlMemBlocks();
16738 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
16739 input = gen_xmlParserInputPtr(n_input, 1);
16741 ret_val = xmlPushInput(ctxt, input);
16742 desret_int(ret_val);
16744 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
16745 des_xmlParserInputPtr(n_input, input, 1);
16746 xmlResetLastError();
16747 if (mem_base != xmlMemBlocks()) {
16748 printf("Leak of %d blocks found in xmlPushInput",
16749 xmlMemBlocks() - mem_base);
16751 printf(" %d", n_ctxt);
16752 printf(" %d", n_input);
16764 test_xmlSetEntityReferenceFunc(void) {
16768 /* missing type support */
16774 test_xmlSplitQName(void) {
16779 xmlParserCtxtPtr ctxt; /* an XML parser context */
16781 xmlChar * name; /* an XML parser context */
16783 xmlChar ** prefix; /* a xmlChar ** */
16786 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
16787 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
16788 for (n_prefix = 0;n_prefix < gen_nb_xmlChar_ptr_ptr;n_prefix++) {
16789 mem_base = xmlMemBlocks();
16790 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
16791 name = gen_const_xmlChar_ptr(n_name, 1);
16792 prefix = gen_xmlChar_ptr_ptr(n_prefix, 2);
16794 ret_val = xmlSplitQName(ctxt, (const xmlChar *)name, prefix);
16795 desret_xmlChar_ptr(ret_val);
16797 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
16798 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
16799 des_xmlChar_ptr_ptr(n_prefix, prefix, 2);
16800 xmlResetLastError();
16801 if (mem_base != xmlMemBlocks()) {
16802 printf("Leak of %d blocks found in xmlSplitQName",
16803 xmlMemBlocks() - mem_base);
16805 printf(" %d", n_ctxt);
16806 printf(" %d", n_name);
16807 printf(" %d", n_prefix);
16820 test_xmlStringCurrentChar(void) {
16825 xmlParserCtxtPtr ctxt; /* the XML parser context */
16827 xmlChar * cur; /* pointer to the beginning of the char */
16829 int * len; /* pointer to the length of the char read */
16832 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
16833 for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
16834 for (n_len = 0;n_len < gen_nb_int_ptr;n_len++) {
16835 mem_base = xmlMemBlocks();
16836 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
16837 cur = gen_const_xmlChar_ptr(n_cur, 1);
16838 len = gen_int_ptr(n_len, 2);
16840 ret_val = xmlStringCurrentChar(ctxt, (const xmlChar *)cur, len);
16841 desret_int(ret_val);
16843 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
16844 des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 1);
16845 des_int_ptr(n_len, len, 2);
16846 xmlResetLastError();
16847 if (mem_base != xmlMemBlocks()) {
16848 printf("Leak of %d blocks found in xmlStringCurrentChar",
16849 xmlMemBlocks() - mem_base);
16851 printf(" %d", n_ctxt);
16852 printf(" %d", n_cur);
16853 printf(" %d", n_len);
16866 test_xmlStringDecodeEntities(void) {
16871 xmlParserCtxtPtr ctxt; /* the parser context */
16873 xmlChar * str; /* the input string */
16875 int what; /* combination of XML_SUBSTITUTE_REF and XML_SUBSTITUTE_PEREF */
16877 xmlChar end; /* an end marker xmlChar, 0 if none */
16879 xmlChar end2; /* an end marker xmlChar, 0 if none */
16881 xmlChar end3; /* an end marker xmlChar, 0 if none */
16884 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
16885 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
16886 for (n_what = 0;n_what < gen_nb_int;n_what++) {
16887 for (n_end = 0;n_end < gen_nb_xmlChar;n_end++) {
16888 for (n_end2 = 0;n_end2 < gen_nb_xmlChar;n_end2++) {
16889 for (n_end3 = 0;n_end3 < gen_nb_xmlChar;n_end3++) {
16890 mem_base = xmlMemBlocks();
16891 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
16892 str = gen_const_xmlChar_ptr(n_str, 1);
16893 what = gen_int(n_what, 2);
16894 end = gen_xmlChar(n_end, 3);
16895 end2 = gen_xmlChar(n_end2, 4);
16896 end3 = gen_xmlChar(n_end3, 5);
16898 ret_val = xmlStringDecodeEntities(ctxt, (const xmlChar *)str, what, end, end2, end3);
16899 desret_xmlChar_ptr(ret_val);
16901 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
16902 des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 1);
16903 des_int(n_what, what, 2);
16904 des_xmlChar(n_end, end, 3);
16905 des_xmlChar(n_end2, end2, 4);
16906 des_xmlChar(n_end3, end3, 5);
16907 xmlResetLastError();
16908 if (mem_base != xmlMemBlocks()) {
16909 printf("Leak of %d blocks found in xmlStringDecodeEntities",
16910 xmlMemBlocks() - mem_base);
16912 printf(" %d", n_ctxt);
16913 printf(" %d", n_str);
16914 printf(" %d", n_what);
16915 printf(" %d", n_end);
16916 printf(" %d", n_end2);
16917 printf(" %d", n_end3);
16933 test_xmlStringLenDecodeEntities(void) {
16938 xmlParserCtxtPtr ctxt; /* the parser context */
16940 xmlChar * str; /* the input string */
16942 int len; /* the string length */
16944 int what; /* combination of XML_SUBSTITUTE_REF and XML_SUBSTITUTE_PEREF */
16946 xmlChar end; /* an end marker xmlChar, 0 if none */
16948 xmlChar end2; /* an end marker xmlChar, 0 if none */
16950 xmlChar end3; /* an end marker xmlChar, 0 if none */
16953 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
16954 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
16955 for (n_len = 0;n_len < gen_nb_int;n_len++) {
16956 for (n_what = 0;n_what < gen_nb_int;n_what++) {
16957 for (n_end = 0;n_end < gen_nb_xmlChar;n_end++) {
16958 for (n_end2 = 0;n_end2 < gen_nb_xmlChar;n_end2++) {
16959 for (n_end3 = 0;n_end3 < gen_nb_xmlChar;n_end3++) {
16960 mem_base = xmlMemBlocks();
16961 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
16962 str = gen_const_xmlChar_ptr(n_str, 1);
16963 len = gen_int(n_len, 2);
16964 what = gen_int(n_what, 3);
16965 end = gen_xmlChar(n_end, 4);
16966 end2 = gen_xmlChar(n_end2, 5);
16967 end3 = gen_xmlChar(n_end3, 6);
16969 ret_val = xmlStringLenDecodeEntities(ctxt, (const xmlChar *)str, len, what, end, end2, end3);
16970 desret_xmlChar_ptr(ret_val);
16972 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
16973 des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 1);
16974 des_int(n_len, len, 2);
16975 des_int(n_what, what, 3);
16976 des_xmlChar(n_end, end, 4);
16977 des_xmlChar(n_end2, end2, 5);
16978 des_xmlChar(n_end3, end3, 6);
16979 xmlResetLastError();
16980 if (mem_base != xmlMemBlocks()) {
16981 printf("Leak of %d blocks found in xmlStringLenDecodeEntities",
16982 xmlMemBlocks() - mem_base);
16984 printf(" %d", n_ctxt);
16985 printf(" %d", n_str);
16986 printf(" %d", n_len);
16987 printf(" %d", n_what);
16988 printf(" %d", n_end);
16989 printf(" %d", n_end2);
16990 printf(" %d", n_end3);
17007 test_xmlSwitchEncoding(void) {
17012 xmlParserCtxtPtr ctxt; /* the parser context */
17014 xmlCharEncoding enc; /* the encoding value (number) */
17017 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
17018 for (n_enc = 0;n_enc < gen_nb_xmlCharEncoding;n_enc++) {
17019 mem_base = xmlMemBlocks();
17020 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
17021 enc = gen_xmlCharEncoding(n_enc, 1);
17023 ret_val = xmlSwitchEncoding(ctxt, enc);
17024 desret_int(ret_val);
17026 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
17027 des_xmlCharEncoding(n_enc, enc, 1);
17028 xmlResetLastError();
17029 if (mem_base != xmlMemBlocks()) {
17030 printf("Leak of %d blocks found in xmlSwitchEncoding",
17031 xmlMemBlocks() - mem_base);
17033 printf(" %d", n_ctxt);
17034 printf(" %d", n_enc);
17046 test_xmlSwitchInputEncoding(void) {
17051 xmlParserCtxtPtr ctxt; /* the parser context */
17053 xmlParserInputPtr input; /* the input stream */
17055 xmlCharEncodingHandlerPtr handler; /* the encoding handler */
17058 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
17059 for (n_input = 0;n_input < gen_nb_xmlParserInputPtr;n_input++) {
17060 for (n_handler = 0;n_handler < gen_nb_xmlCharEncodingHandlerPtr;n_handler++) {
17061 mem_base = xmlMemBlocks();
17062 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
17063 input = gen_xmlParserInputPtr(n_input, 1);
17064 handler = gen_xmlCharEncodingHandlerPtr(n_handler, 2);
17066 ret_val = xmlSwitchInputEncoding(ctxt, input, handler);
17067 desret_int(ret_val);
17069 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
17070 des_xmlParserInputPtr(n_input, input, 1);
17071 des_xmlCharEncodingHandlerPtr(n_handler, handler, 2);
17072 xmlResetLastError();
17073 if (mem_base != xmlMemBlocks()) {
17074 printf("Leak of %d blocks found in xmlSwitchInputEncoding",
17075 xmlMemBlocks() - mem_base);
17077 printf(" %d", n_ctxt);
17078 printf(" %d", n_input);
17079 printf(" %d", n_handler);
17092 test_xmlSwitchToEncoding(void) {
17097 xmlParserCtxtPtr ctxt; /* the parser context */
17099 xmlCharEncodingHandlerPtr handler; /* the encoding handler */
17102 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
17103 for (n_handler = 0;n_handler < gen_nb_xmlCharEncodingHandlerPtr;n_handler++) {
17104 mem_base = xmlMemBlocks();
17105 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
17106 handler = gen_xmlCharEncodingHandlerPtr(n_handler, 1);
17108 ret_val = xmlSwitchToEncoding(ctxt, handler);
17109 desret_int(ret_val);
17111 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
17112 des_xmlCharEncodingHandlerPtr(n_handler, handler, 1);
17113 xmlResetLastError();
17114 if (mem_base != xmlMemBlocks()) {
17115 printf("Leak of %d blocks found in xmlSwitchToEncoding",
17116 xmlMemBlocks() - mem_base);
17118 printf(" %d", n_ctxt);
17119 printf(" %d", n_handler);
17130 test_parserInternals(void) {
17134 if (quiet == 0) printf("Testing parserInternals : 33 of 90 functions ...\n");
17135 rc = test_htmlCreateFileParserCtxt();
17136 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17137 rc = test_htmlInitAutoClose();
17138 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17139 rc = test_inputPop();
17140 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17141 rc = test_inputPush();
17142 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17143 rc = test_namePop();
17144 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17145 rc = test_namePush();
17146 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17147 rc = test_nodePop();
17148 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17149 rc = test_nodePush();
17150 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17151 rc = test_xmlCheckLanguageID();
17152 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17153 rc = test_xmlCopyChar();
17154 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17155 rc = test_xmlCopyCharMultiByte();
17156 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17157 rc = test_xmlCreateEntityParserCtxt();
17158 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17159 rc = test_xmlCreateFileParserCtxt();
17160 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17161 rc = test_xmlCreateMemoryParserCtxt();
17162 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17163 rc = test_xmlCreateURLParserCtxt();
17164 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17165 rc = test_xmlCurrentChar();
17166 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17167 rc = test_xmlErrMemory();
17168 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17169 rc = test_xmlIsLetter();
17170 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17171 rc = test_xmlNewEntityInputStream();
17172 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17173 rc = test_xmlNewInputFromFile();
17174 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17175 rc = test_xmlNewInputStream();
17176 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17177 rc = test_xmlNewStringInputStream();
17178 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17179 rc = test_xmlNextChar();
17180 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17181 rc = test_xmlParserInputShrink();
17182 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17183 rc = test_xmlPopInput();
17184 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17185 rc = test_xmlPushInput();
17186 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17187 rc = test_xmlSetEntityReferenceFunc();
17188 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17189 rc = test_xmlSplitQName();
17190 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17191 rc = test_xmlStringCurrentChar();
17192 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17193 rc = test_xmlStringDecodeEntities();
17194 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17195 rc = test_xmlStringLenDecodeEntities();
17196 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17197 rc = test_xmlSwitchEncoding();
17198 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17199 rc = test_xmlSwitchInputEncoding();
17200 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17201 rc = test_xmlSwitchToEncoding();
17202 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17205 printf("Module parserInternals: %d errors\n", test_ret);
17210 test_xmlPatternFromRoot(void) {
17213 #if defined(LIBXML_PATTERN_ENABLED)
17216 xmlPatternPtr comp; /* the precompiled pattern */
17219 for (n_comp = 0;n_comp < gen_nb_xmlPatternPtr;n_comp++) {
17220 mem_base = xmlMemBlocks();
17221 comp = gen_xmlPatternPtr(n_comp, 0);
17223 ret_val = xmlPatternFromRoot(comp);
17224 desret_int(ret_val);
17226 des_xmlPatternPtr(n_comp, comp, 0);
17227 xmlResetLastError();
17228 if (mem_base != xmlMemBlocks()) {
17229 printf("Leak of %d blocks found in xmlPatternFromRoot",
17230 xmlMemBlocks() - mem_base);
17232 printf(" %d", n_comp);
17244 test_xmlPatternGetStreamCtxt(void) {
17248 /* missing type support */
17254 test_xmlPatternMatch(void) {
17257 #if defined(LIBXML_PATTERN_ENABLED)
17260 xmlPatternPtr comp; /* the precompiled pattern */
17262 xmlNodePtr node; /* a node */
17265 for (n_comp = 0;n_comp < gen_nb_xmlPatternPtr;n_comp++) {
17266 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
17267 mem_base = xmlMemBlocks();
17268 comp = gen_xmlPatternPtr(n_comp, 0);
17269 node = gen_xmlNodePtr(n_node, 1);
17271 ret_val = xmlPatternMatch(comp, node);
17272 desret_int(ret_val);
17274 des_xmlPatternPtr(n_comp, comp, 0);
17275 des_xmlNodePtr(n_node, node, 1);
17276 xmlResetLastError();
17277 if (mem_base != xmlMemBlocks()) {
17278 printf("Leak of %d blocks found in xmlPatternMatch",
17279 xmlMemBlocks() - mem_base);
17281 printf(" %d", n_comp);
17282 printf(" %d", n_node);
17295 test_xmlPatternMaxDepth(void) {
17298 #if defined(LIBXML_PATTERN_ENABLED)
17301 xmlPatternPtr comp; /* the precompiled pattern */
17304 for (n_comp = 0;n_comp < gen_nb_xmlPatternPtr;n_comp++) {
17305 mem_base = xmlMemBlocks();
17306 comp = gen_xmlPatternPtr(n_comp, 0);
17308 ret_val = xmlPatternMaxDepth(comp);
17309 desret_int(ret_val);
17311 des_xmlPatternPtr(n_comp, comp, 0);
17312 xmlResetLastError();
17313 if (mem_base != xmlMemBlocks()) {
17314 printf("Leak of %d blocks found in xmlPatternMaxDepth",
17315 xmlMemBlocks() - mem_base);
17317 printf(" %d", n_comp);
17329 test_xmlPatternMinDepth(void) {
17332 #if defined(LIBXML_PATTERN_ENABLED)
17335 xmlPatternPtr comp; /* the precompiled pattern */
17338 for (n_comp = 0;n_comp < gen_nb_xmlPatternPtr;n_comp++) {
17339 mem_base = xmlMemBlocks();
17340 comp = gen_xmlPatternPtr(n_comp, 0);
17342 ret_val = xmlPatternMinDepth(comp);
17343 desret_int(ret_val);
17345 des_xmlPatternPtr(n_comp, comp, 0);
17346 xmlResetLastError();
17347 if (mem_base != xmlMemBlocks()) {
17348 printf("Leak of %d blocks found in xmlPatternMinDepth",
17349 xmlMemBlocks() - mem_base);
17351 printf(" %d", n_comp);
17363 test_xmlPatternStreamable(void) {
17366 #if defined(LIBXML_PATTERN_ENABLED)
17369 xmlPatternPtr comp; /* the precompiled pattern */
17372 for (n_comp = 0;n_comp < gen_nb_xmlPatternPtr;n_comp++) {
17373 mem_base = xmlMemBlocks();
17374 comp = gen_xmlPatternPtr(n_comp, 0);
17376 ret_val = xmlPatternStreamable(comp);
17377 desret_int(ret_val);
17379 des_xmlPatternPtr(n_comp, comp, 0);
17380 xmlResetLastError();
17381 if (mem_base != xmlMemBlocks()) {
17382 printf("Leak of %d blocks found in xmlPatternStreamable",
17383 xmlMemBlocks() - mem_base);
17385 printf(" %d", n_comp);
17397 test_xmlPatterncompile(void) {
17401 /* missing type support */
17405 #ifdef LIBXML_PATTERN_ENABLED
17407 #define gen_nb_xmlStreamCtxtPtr 1
17408 static xmlStreamCtxtPtr gen_xmlStreamCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
17411 static void des_xmlStreamCtxtPtr(int no ATTRIBUTE_UNUSED, xmlStreamCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
17417 test_xmlStreamPop(void) {
17420 #if defined(LIBXML_PATTERN_ENABLED)
17423 xmlStreamCtxtPtr stream; /* the stream context */
17426 for (n_stream = 0;n_stream < gen_nb_xmlStreamCtxtPtr;n_stream++) {
17427 mem_base = xmlMemBlocks();
17428 stream = gen_xmlStreamCtxtPtr(n_stream, 0);
17430 ret_val = xmlStreamPop(stream);
17431 desret_int(ret_val);
17433 des_xmlStreamCtxtPtr(n_stream, stream, 0);
17434 xmlResetLastError();
17435 if (mem_base != xmlMemBlocks()) {
17436 printf("Leak of %d blocks found in xmlStreamPop",
17437 xmlMemBlocks() - mem_base);
17439 printf(" %d", n_stream);
17451 test_xmlStreamPush(void) {
17454 #if defined(LIBXML_PATTERN_ENABLED)
17457 xmlStreamCtxtPtr stream; /* the stream context */
17459 xmlChar * name; /* the current name */
17461 xmlChar * ns; /* the namespace name */
17464 for (n_stream = 0;n_stream < gen_nb_xmlStreamCtxtPtr;n_stream++) {
17465 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
17466 for (n_ns = 0;n_ns < gen_nb_const_xmlChar_ptr;n_ns++) {
17467 mem_base = xmlMemBlocks();
17468 stream = gen_xmlStreamCtxtPtr(n_stream, 0);
17469 name = gen_const_xmlChar_ptr(n_name, 1);
17470 ns = gen_const_xmlChar_ptr(n_ns, 2);
17472 ret_val = xmlStreamPush(stream, (const xmlChar *)name, (const xmlChar *)ns);
17473 desret_int(ret_val);
17475 des_xmlStreamCtxtPtr(n_stream, stream, 0);
17476 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
17477 des_const_xmlChar_ptr(n_ns, (const xmlChar *)ns, 2);
17478 xmlResetLastError();
17479 if (mem_base != xmlMemBlocks()) {
17480 printf("Leak of %d blocks found in xmlStreamPush",
17481 xmlMemBlocks() - mem_base);
17483 printf(" %d", n_stream);
17484 printf(" %d", n_name);
17485 printf(" %d", n_ns);
17499 test_xmlStreamPushAttr(void) {
17502 #if defined(LIBXML_PATTERN_ENABLED)
17505 xmlStreamCtxtPtr stream; /* the stream context */
17507 xmlChar * name; /* the current name */
17509 xmlChar * ns; /* the namespace name */
17512 for (n_stream = 0;n_stream < gen_nb_xmlStreamCtxtPtr;n_stream++) {
17513 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
17514 for (n_ns = 0;n_ns < gen_nb_const_xmlChar_ptr;n_ns++) {
17515 mem_base = xmlMemBlocks();
17516 stream = gen_xmlStreamCtxtPtr(n_stream, 0);
17517 name = gen_const_xmlChar_ptr(n_name, 1);
17518 ns = gen_const_xmlChar_ptr(n_ns, 2);
17520 ret_val = xmlStreamPushAttr(stream, (const xmlChar *)name, (const xmlChar *)ns);
17521 desret_int(ret_val);
17523 des_xmlStreamCtxtPtr(n_stream, stream, 0);
17524 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
17525 des_const_xmlChar_ptr(n_ns, (const xmlChar *)ns, 2);
17526 xmlResetLastError();
17527 if (mem_base != xmlMemBlocks()) {
17528 printf("Leak of %d blocks found in xmlStreamPushAttr",
17529 xmlMemBlocks() - mem_base);
17531 printf(" %d", n_stream);
17532 printf(" %d", n_name);
17533 printf(" %d", n_ns);
17547 test_xmlStreamPushNode(void) {
17550 #if defined(LIBXML_PATTERN_ENABLED)
17553 xmlStreamCtxtPtr stream; /* the stream context */
17555 xmlChar * name; /* the current name */
17557 xmlChar * ns; /* the namespace name */
17559 int nodeType; /* the type of the node being pushed */
17562 for (n_stream = 0;n_stream < gen_nb_xmlStreamCtxtPtr;n_stream++) {
17563 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
17564 for (n_ns = 0;n_ns < gen_nb_const_xmlChar_ptr;n_ns++) {
17565 for (n_nodeType = 0;n_nodeType < gen_nb_int;n_nodeType++) {
17566 mem_base = xmlMemBlocks();
17567 stream = gen_xmlStreamCtxtPtr(n_stream, 0);
17568 name = gen_const_xmlChar_ptr(n_name, 1);
17569 ns = gen_const_xmlChar_ptr(n_ns, 2);
17570 nodeType = gen_int(n_nodeType, 3);
17572 ret_val = xmlStreamPushNode(stream, (const xmlChar *)name, (const xmlChar *)ns, nodeType);
17573 desret_int(ret_val);
17575 des_xmlStreamCtxtPtr(n_stream, stream, 0);
17576 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
17577 des_const_xmlChar_ptr(n_ns, (const xmlChar *)ns, 2);
17578 des_int(n_nodeType, nodeType, 3);
17579 xmlResetLastError();
17580 if (mem_base != xmlMemBlocks()) {
17581 printf("Leak of %d blocks found in xmlStreamPushNode",
17582 xmlMemBlocks() - mem_base);
17584 printf(" %d", n_stream);
17585 printf(" %d", n_name);
17586 printf(" %d", n_ns);
17587 printf(" %d", n_nodeType);
17602 test_xmlStreamWantsAnyNode(void) {
17605 #if defined(LIBXML_PATTERN_ENABLED)
17608 xmlStreamCtxtPtr streamCtxt; /* the stream context */
17611 for (n_streamCtxt = 0;n_streamCtxt < gen_nb_xmlStreamCtxtPtr;n_streamCtxt++) {
17612 mem_base = xmlMemBlocks();
17613 streamCtxt = gen_xmlStreamCtxtPtr(n_streamCtxt, 0);
17615 ret_val = xmlStreamWantsAnyNode(streamCtxt);
17616 desret_int(ret_val);
17618 des_xmlStreamCtxtPtr(n_streamCtxt, streamCtxt, 0);
17619 xmlResetLastError();
17620 if (mem_base != xmlMemBlocks()) {
17621 printf("Leak of %d blocks found in xmlStreamWantsAnyNode",
17622 xmlMemBlocks() - mem_base);
17624 printf(" %d", n_streamCtxt);
17635 test_pattern(void) {
17639 if (quiet == 0) printf("Testing pattern : 10 of 15 functions ...\n");
17640 rc = test_xmlPatternFromRoot();
17641 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17642 rc = test_xmlPatternGetStreamCtxt();
17643 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17644 rc = test_xmlPatternMatch();
17645 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17646 rc = test_xmlPatternMaxDepth();
17647 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17648 rc = test_xmlPatternMinDepth();
17649 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17650 rc = test_xmlPatternStreamable();
17651 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17652 rc = test_xmlPatterncompile();
17653 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17654 rc = test_xmlStreamPop();
17655 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17656 rc = test_xmlStreamPush();
17657 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17658 rc = test_xmlStreamPushAttr();
17659 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17660 rc = test_xmlStreamPushNode();
17661 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17662 rc = test_xmlStreamWantsAnyNode();
17663 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
17666 printf("Module pattern: %d errors\n", test_ret);
17669 #ifdef LIBXML_SCHEMAS_ENABLED
17671 #define gen_nb_xmlRelaxNGPtr 1
17672 static xmlRelaxNGPtr gen_xmlRelaxNGPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
17675 static void des_xmlRelaxNGPtr(int no ATTRIBUTE_UNUSED, xmlRelaxNGPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
17681 test_xmlRelaxNGDump(void) {
17684 #if defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
17686 FILE * output; /* the file output */
17688 xmlRelaxNGPtr schema; /* a schema structure */
17691 for (n_output = 0;n_output < gen_nb_FILE_ptr;n_output++) {
17692 for (n_schema = 0;n_schema < gen_nb_xmlRelaxNGPtr;n_schema++) {
17693 mem_base = xmlMemBlocks();
17694 output = gen_FILE_ptr(n_output, 0);
17695 schema = gen_xmlRelaxNGPtr(n_schema, 1);
17697 xmlRelaxNGDump(output, schema);
17699 des_FILE_ptr(n_output, output, 0);
17700 des_xmlRelaxNGPtr(n_schema, schema, 1);
17701 xmlResetLastError();
17702 if (mem_base != xmlMemBlocks()) {
17703 printf("Leak of %d blocks found in xmlRelaxNGDump",
17704 xmlMemBlocks() - mem_base);
17706 printf(" %d", n_output);
17707 printf(" %d", n_schema);
17720 test_xmlRelaxNGDumpTree(void) {
17723 #if defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
17725 FILE * output; /* the file output */
17727 xmlRelaxNGPtr schema; /* a schema structure */
17730 for (n_output = 0;n_output < gen_nb_FILE_ptr;n_output++) {
17731 for (n_schema = 0;n_schema < gen_nb_xmlRelaxNGPtr;n_schema++) {
17732 mem_base = xmlMemBlocks();
17733 output = gen_FILE_ptr(n_output, 0);
17734 schema = gen_xmlRelaxNGPtr(n_schema, 1);
17736 xmlRelaxNGDumpTree(output, schema);
17738 des_FILE_ptr(n_output, output, 0);
17739 des_xmlRelaxNGPtr(n_schema, schema, 1);
17740 xmlResetLastError();
17741 if (mem_base != xmlMemBlocks()) {
17742 printf("Leak of %d blocks found in xmlRelaxNGDumpTree",
17743 xmlMemBlocks() - mem_base);
17745 printf(" %d", n_output);
17746 printf(" %d", n_schema);
17757 #ifdef LIBXML_SCHEMAS_ENABLED
17759 #define gen_nb_xmlRelaxNGParserCtxtPtr 1
17760 static xmlRelaxNGParserCtxtPtr gen_xmlRelaxNGParserCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
17763 static void des_xmlRelaxNGParserCtxtPtr(int no ATTRIBUTE_UNUSED, xmlRelaxNGParserCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
17767 #ifdef LIBXML_SCHEMAS_ENABLED
17769 #define gen_nb_xmlRelaxNGValidityErrorFunc_ptr 1
17770 static xmlRelaxNGValidityErrorFunc * gen_xmlRelaxNGValidityErrorFunc_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
17773 static void des_xmlRelaxNGValidityErrorFunc_ptr(int no ATTRIBUTE_UNUSED, xmlRelaxNGValidityErrorFunc * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
17777 #ifdef LIBXML_SCHEMAS_ENABLED
17779 #define gen_nb_xmlRelaxNGValidityWarningFunc_ptr 1
17780 static xmlRelaxNGValidityWarningFunc * gen_xmlRelaxNGValidityWarningFunc_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
17783 static void des_xmlRelaxNGValidityWarningFunc_ptr(int no ATTRIBUTE_UNUSED, xmlRelaxNGValidityWarningFunc * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
17789 test_xmlRelaxNGGetParserErrors(void) {
17792 #if defined(LIBXML_SCHEMAS_ENABLED)
17795 xmlRelaxNGParserCtxtPtr ctxt; /* a Relax-NG validation context */
17797 xmlRelaxNGValidityErrorFunc * err; /* the error callback result */
17799 xmlRelaxNGValidityWarningFunc * warn; /* the warning callback result */
17801 void ** ctx; /* contextual data for the callbacks result */
17804 for (n_ctxt = 0;n_ctxt < gen_nb_xmlRelaxNGParserCtxtPtr;n_ctxt++) {
17805 for (n_err = 0;n_err < gen_nb_xmlRelaxNGValidityErrorFunc_ptr;n_err++) {
17806 for (n_warn = 0;n_warn < gen_nb_xmlRelaxNGValidityWarningFunc_ptr;n_warn++) {
17807 for (n_ctx = 0;n_ctx < gen_nb_void_ptr_ptr;n_ctx++) {
17808 mem_base = xmlMemBlocks();
17809 ctxt = gen_xmlRelaxNGParserCtxtPtr(n_ctxt, 0);
17810 err = gen_xmlRelaxNGValidityErrorFunc_ptr(n_err, 1);
17811 warn = gen_xmlRelaxNGValidityWarningFunc_ptr(n_warn, 2);
17812 ctx = gen_void_ptr_ptr(n_ctx, 3);
17814 ret_val = xmlRelaxNGGetParserErrors(ctxt, err, warn, ctx);
17815 desret_int(ret_val);
17817 des_xmlRelaxNGParserCtxtPtr(n_ctxt, ctxt, 0);
17818 des_xmlRelaxNGValidityErrorFunc_ptr(n_err, err, 1);
17819 des_xmlRelaxNGValidityWarningFunc_ptr(n_warn, warn, 2);
17820 des_void_ptr_ptr(n_ctx, ctx, 3);
17821 xmlResetLastError();
17822 if (mem_base != xmlMemBlocks()) {
17823 printf("Leak of %d blocks found in xmlRelaxNGGetParserErrors",
17824 xmlMemBlocks() - mem_base);
17826 printf(" %d", n_ctxt);
17827 printf(" %d", n_err);
17828 printf(" %d", n_warn);
17829 printf(" %d", n_ctx);
17842 #ifdef LIBXML_SCHEMAS_ENABLED
17844 #define gen_nb_xmlRelaxNGValidCtxtPtr 1
17845 static xmlRelaxNGValidCtxtPtr gen_xmlRelaxNGValidCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
17848 static void des_xmlRelaxNGValidCtxtPtr(int no ATTRIBUTE_UNUSED, xmlRelaxNGValidCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
17854 test_xmlRelaxNGGetValidErrors(void) {
17857 #if defined(LIBXML_SCHEMAS_ENABLED)
17860 xmlRelaxNGValidCtxtPtr ctxt; /* a Relax-NG validation context */
17862 xmlRelaxNGValidityErrorFunc * err; /* the error function result */
17864 xmlRelaxNGValidityWarningFunc * warn; /* the warning function result */
17866 void ** ctx; /* the functions context result */
17869 for (n_ctxt = 0;n_ctxt < gen_nb_xmlRelaxNGValidCtxtPtr;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_xmlRelaxNGValidCtxtPtr(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 = xmlRelaxNGGetValidErrors(ctxt, err, warn, ctx);
17880 desret_int(ret_val);
17882 des_xmlRelaxNGValidCtxtPtr(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 xmlRelaxNGGetValidErrors",
17889 xmlMemBlocks() - mem_base);
17891 printf(" %d", n_ctxt);
17892 printf(" %d", n_err);
17893 printf(" %d", n_warn);
17894 printf(" %d", n_ctx);
17909 test_xmlRelaxNGInitTypes(void) {
17912 #if defined(LIBXML_SCHEMAS_ENABLED)
17916 mem_base = xmlMemBlocks();
17918 ret_val = xmlRelaxNGInitTypes();
17919 desret_int(ret_val);
17921 xmlResetLastError();
17922 if (mem_base != xmlMemBlocks()) {
17923 printf("Leak of %d blocks found in xmlRelaxNGInitTypes",
17924 xmlMemBlocks() - mem_base);
17936 test_xmlRelaxNGNewDocParserCtxt(void) {
17939 #if defined(LIBXML_SCHEMAS_ENABLED)
17941 xmlRelaxNGParserCtxtPtr ret_val;
17942 xmlDocPtr doc; /* a preparsed document tree */
17945 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
17946 mem_base = xmlMemBlocks();
17947 doc = gen_xmlDocPtr(n_doc, 0);
17949 ret_val = xmlRelaxNGNewDocParserCtxt(doc);
17950 desret_xmlRelaxNGParserCtxtPtr(ret_val);
17952 des_xmlDocPtr(n_doc, doc, 0);
17953 xmlResetLastError();
17954 if (mem_base != xmlMemBlocks()) {
17955 printf("Leak of %d blocks found in xmlRelaxNGNewDocParserCtxt",
17956 xmlMemBlocks() - mem_base);
17958 printf(" %d", n_doc);
17970 test_xmlRelaxNGNewMemParserCtxt(void) {
17973 #if defined(LIBXML_SCHEMAS_ENABLED)
17975 xmlRelaxNGParserCtxtPtr ret_val;
17976 char * buffer; /* a pointer to a char array containing the schemas */
17978 int size; /* the size of the array */
17981 for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
17982 for (n_size = 0;n_size < gen_nb_int;n_size++) {
17983 mem_base = xmlMemBlocks();
17984 buffer = gen_const_char_ptr(n_buffer, 0);
17985 size = gen_int(n_size, 1);
17987 ret_val = xmlRelaxNGNewMemParserCtxt((const char *)buffer, size);
17988 desret_xmlRelaxNGParserCtxtPtr(ret_val);
17990 des_const_char_ptr(n_buffer, (const char *)buffer, 0);
17991 des_int(n_size, size, 1);
17992 xmlResetLastError();
17993 if (mem_base != xmlMemBlocks()) {
17994 printf("Leak of %d blocks found in xmlRelaxNGNewMemParserCtxt",
17995 xmlMemBlocks() - mem_base);
17997 printf(" %d", n_buffer);
17998 printf(" %d", n_size);
18011 test_xmlRelaxNGNewParserCtxt(void) {
18014 #if defined(LIBXML_SCHEMAS_ENABLED)
18016 xmlRelaxNGParserCtxtPtr ret_val;
18017 char * URL; /* the location of the schema */
18020 for (n_URL = 0;n_URL < gen_nb_const_char_ptr;n_URL++) {
18021 mem_base = xmlMemBlocks();
18022 URL = gen_const_char_ptr(n_URL, 0);
18024 ret_val = xmlRelaxNGNewParserCtxt((const char *)URL);
18025 desret_xmlRelaxNGParserCtxtPtr(ret_val);
18027 des_const_char_ptr(n_URL, (const char *)URL, 0);
18028 xmlResetLastError();
18029 if (mem_base != xmlMemBlocks()) {
18030 printf("Leak of %d blocks found in xmlRelaxNGNewParserCtxt",
18031 xmlMemBlocks() - mem_base);
18033 printf(" %d", n_URL);
18045 test_xmlRelaxNGNewValidCtxt(void) {
18049 /* missing type support */
18055 test_xmlRelaxNGParse(void) {
18059 /* missing type support */
18065 test_xmlRelaxNGSetParserErrors(void) {
18069 /* missing type support */
18075 test_xmlRelaxNGSetParserStructuredErrors(void) {
18079 /* missing type support */
18085 test_xmlRelaxNGSetValidErrors(void) {
18089 /* missing type support */
18095 test_xmlRelaxNGSetValidStructuredErrors(void) {
18099 /* missing type support */
18105 test_xmlRelaxNGValidateDoc(void) {
18108 #if defined(LIBXML_SCHEMAS_ENABLED)
18111 xmlRelaxNGValidCtxtPtr ctxt; /* a Relax-NG validation context */
18113 xmlDocPtr doc; /* a parsed document tree */
18116 for (n_ctxt = 0;n_ctxt < gen_nb_xmlRelaxNGValidCtxtPtr;n_ctxt++) {
18117 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
18118 mem_base = xmlMemBlocks();
18119 ctxt = gen_xmlRelaxNGValidCtxtPtr(n_ctxt, 0);
18120 doc = gen_xmlDocPtr(n_doc, 1);
18122 ret_val = xmlRelaxNGValidateDoc(ctxt, doc);
18123 desret_int(ret_val);
18125 des_xmlRelaxNGValidCtxtPtr(n_ctxt, ctxt, 0);
18126 des_xmlDocPtr(n_doc, doc, 1);
18127 xmlResetLastError();
18128 if (mem_base != xmlMemBlocks()) {
18129 printf("Leak of %d blocks found in xmlRelaxNGValidateDoc",
18130 xmlMemBlocks() - mem_base);
18132 printf(" %d", n_ctxt);
18133 printf(" %d", n_doc);
18146 test_xmlRelaxNGValidateFullElement(void) {
18149 #if defined(LIBXML_SCHEMAS_ENABLED)
18152 xmlRelaxNGValidCtxtPtr ctxt; /* the validation context */
18154 xmlDocPtr doc; /* a document instance */
18156 xmlNodePtr elem; /* an element instance */
18159 for (n_ctxt = 0;n_ctxt < gen_nb_xmlRelaxNGValidCtxtPtr;n_ctxt++) {
18160 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
18161 for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
18162 mem_base = xmlMemBlocks();
18163 ctxt = gen_xmlRelaxNGValidCtxtPtr(n_ctxt, 0);
18164 doc = gen_xmlDocPtr(n_doc, 1);
18165 elem = gen_xmlNodePtr(n_elem, 2);
18167 ret_val = xmlRelaxNGValidateFullElement(ctxt, doc, elem);
18168 desret_int(ret_val);
18170 des_xmlRelaxNGValidCtxtPtr(n_ctxt, ctxt, 0);
18171 des_xmlDocPtr(n_doc, doc, 1);
18172 des_xmlNodePtr(n_elem, elem, 2);
18173 xmlResetLastError();
18174 if (mem_base != xmlMemBlocks()) {
18175 printf("Leak of %d blocks found in xmlRelaxNGValidateFullElement",
18176 xmlMemBlocks() - mem_base);
18178 printf(" %d", n_ctxt);
18179 printf(" %d", n_doc);
18180 printf(" %d", n_elem);
18194 test_xmlRelaxNGValidatePopElement(void) {
18197 #if defined(LIBXML_SCHEMAS_ENABLED)
18200 xmlRelaxNGValidCtxtPtr ctxt; /* the RelaxNG validation context */
18202 xmlDocPtr doc; /* a document instance */
18204 xmlNodePtr elem; /* an element instance */
18207 for (n_ctxt = 0;n_ctxt < gen_nb_xmlRelaxNGValidCtxtPtr;n_ctxt++) {
18208 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
18209 for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
18210 mem_base = xmlMemBlocks();
18211 ctxt = gen_xmlRelaxNGValidCtxtPtr(n_ctxt, 0);
18212 doc = gen_xmlDocPtr(n_doc, 1);
18213 elem = gen_xmlNodePtr(n_elem, 2);
18215 ret_val = xmlRelaxNGValidatePopElement(ctxt, doc, elem);
18216 desret_int(ret_val);
18218 des_xmlRelaxNGValidCtxtPtr(n_ctxt, ctxt, 0);
18219 des_xmlDocPtr(n_doc, doc, 1);
18220 des_xmlNodePtr(n_elem, elem, 2);
18221 xmlResetLastError();
18222 if (mem_base != xmlMemBlocks()) {
18223 printf("Leak of %d blocks found in xmlRelaxNGValidatePopElement",
18224 xmlMemBlocks() - mem_base);
18226 printf(" %d", n_ctxt);
18227 printf(" %d", n_doc);
18228 printf(" %d", n_elem);
18242 test_xmlRelaxNGValidatePushCData(void) {
18245 #if defined(LIBXML_SCHEMAS_ENABLED)
18248 xmlRelaxNGValidCtxtPtr ctxt; /* the RelaxNG validation context */
18250 xmlChar * data; /* some character data read */
18252 int len; /* the length of the data */
18255 for (n_ctxt = 0;n_ctxt < gen_nb_xmlRelaxNGValidCtxtPtr;n_ctxt++) {
18256 for (n_data = 0;n_data < gen_nb_const_xmlChar_ptr;n_data++) {
18257 for (n_len = 0;n_len < gen_nb_int;n_len++) {
18258 mem_base = xmlMemBlocks();
18259 ctxt = gen_xmlRelaxNGValidCtxtPtr(n_ctxt, 0);
18260 data = gen_const_xmlChar_ptr(n_data, 1);
18261 len = gen_int(n_len, 2);
18263 ret_val = xmlRelaxNGValidatePushCData(ctxt, (const xmlChar *)data, len);
18264 desret_int(ret_val);
18266 des_xmlRelaxNGValidCtxtPtr(n_ctxt, ctxt, 0);
18267 des_const_xmlChar_ptr(n_data, (const xmlChar *)data, 1);
18268 des_int(n_len, len, 2);
18269 xmlResetLastError();
18270 if (mem_base != xmlMemBlocks()) {
18271 printf("Leak of %d blocks found in xmlRelaxNGValidatePushCData",
18272 xmlMemBlocks() - mem_base);
18274 printf(" %d", n_ctxt);
18275 printf(" %d", n_data);
18276 printf(" %d", n_len);
18290 test_xmlRelaxNGValidatePushElement(void) {
18293 #if defined(LIBXML_SCHEMAS_ENABLED)
18296 xmlRelaxNGValidCtxtPtr ctxt; /* the validation context */
18298 xmlDocPtr doc; /* a document instance */
18300 xmlNodePtr elem; /* an element instance */
18303 for (n_ctxt = 0;n_ctxt < gen_nb_xmlRelaxNGValidCtxtPtr;n_ctxt++) {
18304 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
18305 for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
18306 mem_base = xmlMemBlocks();
18307 ctxt = gen_xmlRelaxNGValidCtxtPtr(n_ctxt, 0);
18308 doc = gen_xmlDocPtr(n_doc, 1);
18309 elem = gen_xmlNodePtr(n_elem, 2);
18311 ret_val = xmlRelaxNGValidatePushElement(ctxt, doc, elem);
18312 desret_int(ret_val);
18314 des_xmlRelaxNGValidCtxtPtr(n_ctxt, ctxt, 0);
18315 des_xmlDocPtr(n_doc, doc, 1);
18316 des_xmlNodePtr(n_elem, elem, 2);
18317 xmlResetLastError();
18318 if (mem_base != xmlMemBlocks()) {
18319 printf("Leak of %d blocks found in xmlRelaxNGValidatePushElement",
18320 xmlMemBlocks() - mem_base);
18322 printf(" %d", n_ctxt);
18323 printf(" %d", n_doc);
18324 printf(" %d", n_elem);
18338 test_xmlRelaxParserSetFlag(void) {
18341 #if defined(LIBXML_SCHEMAS_ENABLED)
18344 xmlRelaxNGParserCtxtPtr ctxt; /* a RelaxNG parser context */
18346 int flags; /* a set of flags values */
18349 for (n_ctxt = 0;n_ctxt < gen_nb_xmlRelaxNGParserCtxtPtr;n_ctxt++) {
18350 for (n_flags = 0;n_flags < gen_nb_int;n_flags++) {
18351 mem_base = xmlMemBlocks();
18352 ctxt = gen_xmlRelaxNGParserCtxtPtr(n_ctxt, 0);
18353 flags = gen_int(n_flags, 1);
18355 ret_val = xmlRelaxParserSetFlag(ctxt, flags);
18356 desret_int(ret_val);
18358 des_xmlRelaxNGParserCtxtPtr(n_ctxt, ctxt, 0);
18359 des_int(n_flags, flags, 1);
18360 xmlResetLastError();
18361 if (mem_base != xmlMemBlocks()) {
18362 printf("Leak of %d blocks found in xmlRelaxParserSetFlag",
18363 xmlMemBlocks() - mem_base);
18365 printf(" %d", n_ctxt);
18366 printf(" %d", n_flags);
18378 test_relaxng(void) {
18382 if (quiet == 0) printf("Testing relaxng : 14 of 24 functions ...\n");
18383 rc = test_xmlRelaxNGDump();
18384 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18385 rc = test_xmlRelaxNGDumpTree();
18386 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18387 rc = test_xmlRelaxNGGetParserErrors();
18388 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18389 rc = test_xmlRelaxNGGetValidErrors();
18390 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18391 rc = test_xmlRelaxNGInitTypes();
18392 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18393 rc = test_xmlRelaxNGNewDocParserCtxt();
18394 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18395 rc = test_xmlRelaxNGNewMemParserCtxt();
18396 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18397 rc = test_xmlRelaxNGNewParserCtxt();
18398 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18399 rc = test_xmlRelaxNGNewValidCtxt();
18400 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18401 rc = test_xmlRelaxNGParse();
18402 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18403 rc = test_xmlRelaxNGSetParserErrors();
18404 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18405 rc = test_xmlRelaxNGSetParserStructuredErrors();
18406 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18407 rc = test_xmlRelaxNGSetValidErrors();
18408 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18409 rc = test_xmlRelaxNGSetValidStructuredErrors();
18410 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18411 rc = test_xmlRelaxNGValidateDoc();
18412 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18413 rc = test_xmlRelaxNGValidateFullElement();
18414 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18415 rc = test_xmlRelaxNGValidatePopElement();
18416 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18417 rc = test_xmlRelaxNGValidatePushCData();
18418 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18419 rc = test_xmlRelaxNGValidatePushElement();
18420 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18421 rc = test_xmlRelaxParserSetFlag();
18422 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18425 printf("Module relaxng: %d errors\n", test_ret);
18429 test_schemasInternals(void) {
18432 if (quiet == 0) printf("Testing schemasInternals : 0 of 2 functions ...\n");
18435 printf("Module schemasInternals: %d errors\n", test_ret);
18440 test_xmlSchematronNewDocParserCtxt(void) {
18444 /* missing type support */
18450 test_xmlSchematronNewMemParserCtxt(void) {
18454 /* missing type support */
18460 test_xmlSchematronNewParserCtxt(void) {
18464 /* missing type support */
18468 #ifdef LIBXML_SCHEMATRON_ENABLED
18470 #define gen_nb_xmlSchematronPtr 1
18471 static xmlSchematronPtr gen_xmlSchematronPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
18474 static void des_xmlSchematronPtr(int no ATTRIBUTE_UNUSED, xmlSchematronPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
18480 test_xmlSchematronNewValidCtxt(void) {
18484 /* missing type support */
18488 #ifdef LIBXML_SCHEMATRON_ENABLED
18490 #define gen_nb_xmlSchematronParserCtxtPtr 1
18491 static xmlSchematronParserCtxtPtr gen_xmlSchematronParserCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
18494 static void des_xmlSchematronParserCtxtPtr(int no ATTRIBUTE_UNUSED, xmlSchematronParserCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
18500 test_xmlSchematronParse(void) {
18504 /* missing type support */
18508 #ifdef LIBXML_SCHEMATRON_ENABLED
18510 #define gen_nb_xmlSchematronValidCtxtPtr 1
18511 static xmlSchematronValidCtxtPtr gen_xmlSchematronValidCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
18514 static void des_xmlSchematronValidCtxtPtr(int no ATTRIBUTE_UNUSED, xmlSchematronValidCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
18520 test_xmlSchematronSetValidStructuredErrors(void) {
18524 /* missing type support */
18530 test_xmlSchematronValidateDoc(void) {
18533 #if defined(LIBXML_SCHEMATRON_ENABLED)
18536 xmlSchematronValidCtxtPtr ctxt; /* the schema validation context */
18538 xmlDocPtr instance; /* the document instace tree */
18541 for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchematronValidCtxtPtr;n_ctxt++) {
18542 for (n_instance = 0;n_instance < gen_nb_xmlDocPtr;n_instance++) {
18543 mem_base = xmlMemBlocks();
18544 ctxt = gen_xmlSchematronValidCtxtPtr(n_ctxt, 0);
18545 instance = gen_xmlDocPtr(n_instance, 1);
18547 ret_val = xmlSchematronValidateDoc(ctxt, instance);
18548 desret_int(ret_val);
18550 des_xmlSchematronValidCtxtPtr(n_ctxt, ctxt, 0);
18551 des_xmlDocPtr(n_instance, instance, 1);
18552 xmlResetLastError();
18553 if (mem_base != xmlMemBlocks()) {
18554 printf("Leak of %d blocks found in xmlSchematronValidateDoc",
18555 xmlMemBlocks() - mem_base);
18557 printf(" %d", n_ctxt);
18558 printf(" %d", n_instance);
18570 test_schematron(void) {
18574 if (quiet == 0) printf("Testing schematron : 1 of 10 functions ...\n");
18575 rc = test_xmlSchematronNewDocParserCtxt();
18576 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18577 rc = test_xmlSchematronNewMemParserCtxt();
18578 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18579 rc = test_xmlSchematronNewParserCtxt();
18580 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18581 rc = test_xmlSchematronNewValidCtxt();
18582 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18583 rc = test_xmlSchematronParse();
18584 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18585 rc = test_xmlSchematronSetValidStructuredErrors();
18586 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18587 rc = test_xmlSchematronValidateDoc();
18588 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
18591 printf("Module schematron: %d errors\n", test_ret);
18596 test_xmlAddChild(void) {
18600 xmlNodePtr ret_val;
18601 xmlNodePtr parent; /* the parent node */
18603 xmlNodePtr cur; /* the child node */
18606 for (n_parent = 0;n_parent < gen_nb_xmlNodePtr;n_parent++) {
18607 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr_in;n_cur++) {
18608 mem_base = xmlMemBlocks();
18609 parent = gen_xmlNodePtr(n_parent, 0);
18610 cur = gen_xmlNodePtr_in(n_cur, 1);
18612 ret_val = xmlAddChild(parent, cur);
18613 if (ret_val == NULL) { xmlFreeNode(cur) ; cur = NULL ; }
18614 desret_xmlNodePtr(ret_val);
18616 des_xmlNodePtr(n_parent, parent, 0);
18617 des_xmlNodePtr_in(n_cur, cur, 1);
18618 xmlResetLastError();
18619 if (mem_base != xmlMemBlocks()) {
18620 printf("Leak of %d blocks found in xmlAddChild",
18621 xmlMemBlocks() - mem_base);
18623 printf(" %d", n_parent);
18624 printf(" %d", n_cur);
18636 test_xmlAddChildList(void) {
18640 xmlNodePtr ret_val;
18641 xmlNodePtr parent; /* the parent node */
18643 xmlNodePtr cur; /* the first node in the list */
18646 for (n_parent = 0;n_parent < gen_nb_xmlNodePtr;n_parent++) {
18647 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr_in;n_cur++) {
18648 mem_base = xmlMemBlocks();
18649 parent = gen_xmlNodePtr(n_parent, 0);
18650 cur = gen_xmlNodePtr_in(n_cur, 1);
18652 ret_val = xmlAddChildList(parent, cur);
18653 if (ret_val == NULL) { xmlFreeNodeList(cur) ; cur = NULL ; }
18654 desret_xmlNodePtr(ret_val);
18656 des_xmlNodePtr(n_parent, parent, 0);
18657 des_xmlNodePtr_in(n_cur, cur, 1);
18658 xmlResetLastError();
18659 if (mem_base != xmlMemBlocks()) {
18660 printf("Leak of %d blocks found in xmlAddChildList",
18661 xmlMemBlocks() - mem_base);
18663 printf(" %d", n_parent);
18664 printf(" %d", n_cur);
18676 test_xmlAddNextSibling(void) {
18680 xmlNodePtr ret_val;
18681 xmlNodePtr cur; /* the child node */
18683 xmlNodePtr elem; /* the new node */
18686 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
18687 for (n_elem = 0;n_elem < gen_nb_xmlNodePtr_in;n_elem++) {
18688 mem_base = xmlMemBlocks();
18689 cur = gen_xmlNodePtr(n_cur, 0);
18690 elem = gen_xmlNodePtr_in(n_elem, 1);
18692 ret_val = xmlAddNextSibling(cur, elem);
18693 if (ret_val == NULL) { xmlFreeNode(elem) ; elem = NULL ; }
18694 desret_xmlNodePtr(ret_val);
18696 des_xmlNodePtr(n_cur, cur, 0);
18697 des_xmlNodePtr_in(n_elem, elem, 1);
18698 xmlResetLastError();
18699 if (mem_base != xmlMemBlocks()) {
18700 printf("Leak of %d blocks found in xmlAddNextSibling",
18701 xmlMemBlocks() - mem_base);
18703 printf(" %d", n_cur);
18704 printf(" %d", n_elem);
18716 test_xmlAddPrevSibling(void) {
18719 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
18721 xmlNodePtr ret_val;
18722 xmlNodePtr cur; /* the child node */
18724 xmlNodePtr elem; /* the new node */
18727 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
18728 for (n_elem = 0;n_elem < gen_nb_xmlNodePtr_in;n_elem++) {
18729 mem_base = xmlMemBlocks();
18730 cur = gen_xmlNodePtr(n_cur, 0);
18731 elem = gen_xmlNodePtr_in(n_elem, 1);
18733 ret_val = xmlAddPrevSibling(cur, elem);
18734 if (ret_val == NULL) { xmlFreeNode(elem) ; elem = NULL ; }
18735 desret_xmlNodePtr(ret_val);
18737 des_xmlNodePtr(n_cur, cur, 0);
18738 des_xmlNodePtr_in(n_elem, elem, 1);
18739 xmlResetLastError();
18740 if (mem_base != xmlMemBlocks()) {
18741 printf("Leak of %d blocks found in xmlAddPrevSibling",
18742 xmlMemBlocks() - mem_base);
18744 printf(" %d", n_cur);
18745 printf(" %d", n_elem);
18758 test_xmlAddSibling(void) {
18762 xmlNodePtr ret_val;
18763 xmlNodePtr cur; /* the child node */
18765 xmlNodePtr elem; /* the new node */
18768 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
18769 for (n_elem = 0;n_elem < gen_nb_xmlNodePtr_in;n_elem++) {
18770 mem_base = xmlMemBlocks();
18771 cur = gen_xmlNodePtr(n_cur, 0);
18772 elem = gen_xmlNodePtr_in(n_elem, 1);
18774 ret_val = xmlAddSibling(cur, elem);
18775 if (ret_val == NULL) { xmlFreeNode(elem) ; elem = NULL ; }
18776 desret_xmlNodePtr(ret_val);
18778 des_xmlNodePtr(n_cur, cur, 0);
18779 des_xmlNodePtr_in(n_elem, elem, 1);
18780 xmlResetLastError();
18781 if (mem_base != xmlMemBlocks()) {
18782 printf("Leak of %d blocks found in xmlAddSibling",
18783 xmlMemBlocks() - mem_base);
18785 printf(" %d", n_cur);
18786 printf(" %d", n_elem);
18798 test_xmlAttrSerializeTxtContent(void) {
18801 #if defined(LIBXML_OUTPUT_ENABLED)
18802 #ifdef LIBXML_OUTPUT_ENABLED
18804 xmlBufferPtr buf; /* the XML buffer output */
18806 xmlDocPtr doc; /* the document */
18808 xmlAttrPtr attr; /* the attribute node */
18810 xmlChar * string; /* the text content */
18813 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
18814 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
18815 for (n_attr = 0;n_attr < gen_nb_xmlAttrPtr;n_attr++) {
18816 for (n_string = 0;n_string < gen_nb_const_xmlChar_ptr;n_string++) {
18817 mem_base = xmlMemBlocks();
18818 buf = gen_xmlBufferPtr(n_buf, 0);
18819 doc = gen_xmlDocPtr(n_doc, 1);
18820 attr = gen_xmlAttrPtr(n_attr, 2);
18821 string = gen_const_xmlChar_ptr(n_string, 3);
18823 xmlAttrSerializeTxtContent(buf, doc, attr, (const xmlChar *)string);
18825 des_xmlBufferPtr(n_buf, buf, 0);
18826 des_xmlDocPtr(n_doc, doc, 1);
18827 des_xmlAttrPtr(n_attr, attr, 2);
18828 des_const_xmlChar_ptr(n_string, (const xmlChar *)string, 3);
18829 xmlResetLastError();
18830 if (mem_base != xmlMemBlocks()) {
18831 printf("Leak of %d blocks found in xmlAttrSerializeTxtContent",
18832 xmlMemBlocks() - mem_base);
18834 printf(" %d", n_buf);
18835 printf(" %d", n_doc);
18836 printf(" %d", n_attr);
18837 printf(" %d", n_string);
18852 #define gen_nb_const_xmlBuf_ptr 1
18853 static xmlBuf * gen_const_xmlBuf_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
18856 static void des_const_xmlBuf_ptr(int no ATTRIBUTE_UNUSED, const xmlBuf * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
18860 test_xmlBufContent(void) {
18865 xmlBuf * buf; /* the buffer */
18868 for (n_buf = 0;n_buf < gen_nb_const_xmlBuf_ptr;n_buf++) {
18869 mem_base = xmlMemBlocks();
18870 buf = gen_const_xmlBuf_ptr(n_buf, 0);
18872 ret_val = xmlBufContent((const xmlBuf *)buf);
18873 desret_xmlChar_ptr(ret_val);
18875 des_const_xmlBuf_ptr(n_buf, (const xmlBuf *)buf, 0);
18876 xmlResetLastError();
18877 if (mem_base != xmlMemBlocks()) {
18878 printf("Leak of %d blocks found in xmlBufContent",
18879 xmlMemBlocks() - mem_base);
18881 printf(" %d", n_buf);
18891 #define gen_nb_xmlBufPtr 1
18892 static xmlBufPtr gen_xmlBufPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
18895 static void des_xmlBufPtr(int no ATTRIBUTE_UNUSED, xmlBufPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
18899 test_xmlBufEnd(void) {
18904 xmlBufPtr buf; /* the buffer */
18907 for (n_buf = 0;n_buf < gen_nb_xmlBufPtr;n_buf++) {
18908 mem_base = xmlMemBlocks();
18909 buf = gen_xmlBufPtr(n_buf, 0);
18911 ret_val = xmlBufEnd(buf);
18912 desret_xmlChar_ptr(ret_val);
18914 des_xmlBufPtr(n_buf, buf, 0);
18915 xmlResetLastError();
18916 if (mem_base != xmlMemBlocks()) {
18917 printf("Leak of %d blocks found in xmlBufEnd",
18918 xmlMemBlocks() - mem_base);
18920 printf(" %d", n_buf);
18930 #define gen_nb_const_xmlNode_ptr 1
18931 static xmlNode * gen_const_xmlNode_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
18934 static void des_const_xmlNode_ptr(int no ATTRIBUTE_UNUSED, const xmlNode * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
18938 test_xmlBufGetNodeContent(void) {
18943 xmlBufPtr buf; /* a buffer xmlBufPtr */
18945 xmlNode * cur; /* the node being read */
18948 for (n_buf = 0;n_buf < gen_nb_xmlBufPtr;n_buf++) {
18949 for (n_cur = 0;n_cur < gen_nb_const_xmlNode_ptr;n_cur++) {
18950 mem_base = xmlMemBlocks();
18951 buf = gen_xmlBufPtr(n_buf, 0);
18952 cur = gen_const_xmlNode_ptr(n_cur, 1);
18954 ret_val = xmlBufGetNodeContent(buf, (const xmlNode *)cur);
18955 desret_int(ret_val);
18957 des_xmlBufPtr(n_buf, buf, 0);
18958 des_const_xmlNode_ptr(n_cur, (const xmlNode *)cur, 1);
18959 xmlResetLastError();
18960 if (mem_base != xmlMemBlocks()) {
18961 printf("Leak of %d blocks found in xmlBufGetNodeContent",
18962 xmlMemBlocks() - mem_base);
18964 printf(" %d", n_buf);
18965 printf(" %d", n_cur);
18977 test_xmlBufNodeDump(void) {
18981 /* missing type support */
18987 test_xmlBufShrink(void) {
18991 /* missing type support */
18996 #define gen_nb_const_xmlBufPtr 1
18997 static xmlBufPtr gen_const_xmlBufPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
19000 static void des_const_xmlBufPtr(int no ATTRIBUTE_UNUSED, const xmlBufPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
19004 test_xmlBufUse(void) {
19008 /* missing type support */
19014 test_xmlBufferAdd(void) {
19019 xmlBufferPtr buf; /* the buffer to dump */
19021 xmlChar * str; /* the #xmlChar string */
19023 int len; /* the number of #xmlChar to add */
19026 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
19027 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
19028 for (n_len = 0;n_len < gen_nb_int;n_len++) {
19029 mem_base = xmlMemBlocks();
19030 buf = gen_xmlBufferPtr(n_buf, 0);
19031 str = gen_const_xmlChar_ptr(n_str, 1);
19032 len = gen_int(n_len, 2);
19034 ret_val = xmlBufferAdd(buf, (const xmlChar *)str, len);
19035 desret_int(ret_val);
19037 des_xmlBufferPtr(n_buf, buf, 0);
19038 des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 1);
19039 des_int(n_len, len, 2);
19040 xmlResetLastError();
19041 if (mem_base != xmlMemBlocks()) {
19042 printf("Leak of %d blocks found in xmlBufferAdd",
19043 xmlMemBlocks() - mem_base);
19045 printf(" %d", n_buf);
19046 printf(" %d", n_str);
19047 printf(" %d", n_len);
19060 test_xmlBufferAddHead(void) {
19065 xmlBufferPtr buf; /* the buffer */
19067 xmlChar * str; /* the #xmlChar string */
19069 int len; /* the number of #xmlChar to add */
19072 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
19073 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
19074 for (n_len = 0;n_len < gen_nb_int;n_len++) {
19075 mem_base = xmlMemBlocks();
19076 buf = gen_xmlBufferPtr(n_buf, 0);
19077 str = gen_const_xmlChar_ptr(n_str, 1);
19078 len = gen_int(n_len, 2);
19080 ret_val = xmlBufferAddHead(buf, (const xmlChar *)str, len);
19081 desret_int(ret_val);
19083 des_xmlBufferPtr(n_buf, buf, 0);
19084 des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 1);
19085 des_int(n_len, len, 2);
19086 xmlResetLastError();
19087 if (mem_base != xmlMemBlocks()) {
19088 printf("Leak of %d blocks found in xmlBufferAddHead",
19089 xmlMemBlocks() - mem_base);
19091 printf(" %d", n_buf);
19092 printf(" %d", n_str);
19093 printf(" %d", n_len);
19106 test_xmlBufferCCat(void) {
19111 xmlBufferPtr buf; /* the buffer to dump */
19113 char * str; /* the C char string */
19116 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
19117 for (n_str = 0;n_str < gen_nb_const_char_ptr;n_str++) {
19118 mem_base = xmlMemBlocks();
19119 buf = gen_xmlBufferPtr(n_buf, 0);
19120 str = gen_const_char_ptr(n_str, 1);
19122 ret_val = xmlBufferCCat(buf, (const char *)str);
19123 desret_int(ret_val);
19125 des_xmlBufferPtr(n_buf, buf, 0);
19126 des_const_char_ptr(n_str, (const char *)str, 1);
19127 xmlResetLastError();
19128 if (mem_base != xmlMemBlocks()) {
19129 printf("Leak of %d blocks found in xmlBufferCCat",
19130 xmlMemBlocks() - mem_base);
19132 printf(" %d", n_buf);
19133 printf(" %d", n_str);
19145 test_xmlBufferCat(void) {
19150 xmlBufferPtr buf; /* the buffer to add to */
19152 xmlChar * str; /* the #xmlChar string */
19155 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
19156 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
19157 mem_base = xmlMemBlocks();
19158 buf = gen_xmlBufferPtr(n_buf, 0);
19159 str = gen_const_xmlChar_ptr(n_str, 1);
19161 ret_val = xmlBufferCat(buf, (const xmlChar *)str);
19162 desret_int(ret_val);
19164 des_xmlBufferPtr(n_buf, buf, 0);
19165 des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 1);
19166 xmlResetLastError();
19167 if (mem_base != xmlMemBlocks()) {
19168 printf("Leak of %d blocks found in xmlBufferCat",
19169 xmlMemBlocks() - mem_base);
19171 printf(" %d", n_buf);
19172 printf(" %d", n_str);
19183 #define gen_nb_const_xmlBuffer_ptr 1
19184 static xmlBuffer * gen_const_xmlBuffer_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
19187 static void des_const_xmlBuffer_ptr(int no ATTRIBUTE_UNUSED, const xmlBuffer * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
19191 test_xmlBufferContent(void) {
19195 const xmlChar * ret_val;
19196 xmlBuffer * buf; /* the buffer */
19199 for (n_buf = 0;n_buf < gen_nb_const_xmlBuffer_ptr;n_buf++) {
19200 mem_base = xmlMemBlocks();
19201 buf = gen_const_xmlBuffer_ptr(n_buf, 0);
19203 ret_val = xmlBufferContent((const xmlBuffer *)buf);
19204 desret_const_xmlChar_ptr(ret_val);
19206 des_const_xmlBuffer_ptr(n_buf, (const xmlBuffer *)buf, 0);
19207 xmlResetLastError();
19208 if (mem_base != xmlMemBlocks()) {
19209 printf("Leak of %d blocks found in xmlBufferContent",
19210 xmlMemBlocks() - mem_base);
19212 printf(" %d", n_buf);
19223 test_xmlBufferCreate(void) {
19227 xmlBufferPtr ret_val;
19229 mem_base = xmlMemBlocks();
19231 ret_val = xmlBufferCreate();
19232 desret_xmlBufferPtr(ret_val);
19234 xmlResetLastError();
19235 if (mem_base != xmlMemBlocks()) {
19236 printf("Leak of %d blocks found in xmlBufferCreate",
19237 xmlMemBlocks() - mem_base);
19248 test_xmlBufferCreateSize(void) {
19252 /* missing type support */
19258 test_xmlBufferCreateStatic(void) {
19262 /* missing type support */
19268 test_xmlBufferDetach(void) {
19273 xmlBufferPtr buf; /* the buffer */
19276 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
19277 mem_base = xmlMemBlocks();
19278 buf = gen_xmlBufferPtr(n_buf, 0);
19280 ret_val = xmlBufferDetach(buf);
19281 desret_xmlChar_ptr(ret_val);
19283 des_xmlBufferPtr(n_buf, buf, 0);
19284 xmlResetLastError();
19285 if (mem_base != xmlMemBlocks()) {
19286 printf("Leak of %d blocks found in xmlBufferDetach",
19287 xmlMemBlocks() - mem_base);
19289 printf(" %d", n_buf);
19300 test_xmlBufferEmpty(void) {
19304 xmlBufferPtr buf; /* the buffer */
19307 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
19308 mem_base = xmlMemBlocks();
19309 buf = gen_xmlBufferPtr(n_buf, 0);
19311 xmlBufferEmpty(buf);
19313 des_xmlBufferPtr(n_buf, buf, 0);
19314 xmlResetLastError();
19315 if (mem_base != xmlMemBlocks()) {
19316 printf("Leak of %d blocks found in xmlBufferEmpty",
19317 xmlMemBlocks() - mem_base);
19319 printf(" %d", n_buf);
19330 test_xmlBufferGrow(void) {
19335 xmlBufferPtr buf; /* the buffer */
19337 unsigned int len; /* the minimum free size to allocate */
19340 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
19341 for (n_len = 0;n_len < gen_nb_unsigned_int;n_len++) {
19342 mem_base = xmlMemBlocks();
19343 buf = gen_xmlBufferPtr(n_buf, 0);
19344 len = gen_unsigned_int(n_len, 1);
19346 ret_val = xmlBufferGrow(buf, len);
19347 desret_int(ret_val);
19349 des_xmlBufferPtr(n_buf, buf, 0);
19350 des_unsigned_int(n_len, len, 1);
19351 xmlResetLastError();
19352 if (mem_base != xmlMemBlocks()) {
19353 printf("Leak of %d blocks found in xmlBufferGrow",
19354 xmlMemBlocks() - mem_base);
19356 printf(" %d", n_buf);
19357 printf(" %d", n_len);
19369 test_xmlBufferLength(void) {
19374 xmlBuffer * buf; /* the buffer */
19377 for (n_buf = 0;n_buf < gen_nb_const_xmlBuffer_ptr;n_buf++) {
19378 mem_base = xmlMemBlocks();
19379 buf = gen_const_xmlBuffer_ptr(n_buf, 0);
19381 ret_val = xmlBufferLength((const xmlBuffer *)buf);
19382 desret_int(ret_val);
19384 des_const_xmlBuffer_ptr(n_buf, (const xmlBuffer *)buf, 0);
19385 xmlResetLastError();
19386 if (mem_base != xmlMemBlocks()) {
19387 printf("Leak of %d blocks found in xmlBufferLength",
19388 xmlMemBlocks() - mem_base);
19390 printf(" %d", n_buf);
19401 test_xmlBufferResize(void) {
19406 xmlBufferPtr buf; /* the buffer to resize */
19408 unsigned int size; /* the desired size */
19411 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
19412 for (n_size = 0;n_size < gen_nb_unsigned_int;n_size++) {
19413 mem_base = xmlMemBlocks();
19414 buf = gen_xmlBufferPtr(n_buf, 0);
19415 size = gen_unsigned_int(n_size, 1);
19417 ret_val = xmlBufferResize(buf, size);
19418 desret_int(ret_val);
19420 des_xmlBufferPtr(n_buf, buf, 0);
19421 des_unsigned_int(n_size, size, 1);
19422 xmlResetLastError();
19423 if (mem_base != xmlMemBlocks()) {
19424 printf("Leak of %d blocks found in xmlBufferResize",
19425 xmlMemBlocks() - mem_base);
19427 printf(" %d", n_buf);
19428 printf(" %d", n_size);
19440 test_xmlBufferSetAllocationScheme(void) {
19444 xmlBufferPtr buf; /* the buffer to tune */
19446 xmlBufferAllocationScheme scheme; /* allocation scheme to use */
19449 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
19450 for (n_scheme = 0;n_scheme < gen_nb_xmlBufferAllocationScheme;n_scheme++) {
19451 mem_base = xmlMemBlocks();
19452 buf = gen_xmlBufferPtr(n_buf, 0);
19453 scheme = gen_xmlBufferAllocationScheme(n_scheme, 1);
19455 xmlBufferSetAllocationScheme(buf, scheme);
19456 if ((buf != NULL) && (scheme == XML_BUFFER_ALLOC_IMMUTABLE) && (buf->content != NULL) && (buf->content != static_buf_content)) { xmlFree(buf->content); buf->content = NULL;}
19458 des_xmlBufferPtr(n_buf, buf, 0);
19459 des_xmlBufferAllocationScheme(n_scheme, scheme, 1);
19460 xmlResetLastError();
19461 if (mem_base != xmlMemBlocks()) {
19462 printf("Leak of %d blocks found in xmlBufferSetAllocationScheme",
19463 xmlMemBlocks() - mem_base);
19465 printf(" %d", n_buf);
19466 printf(" %d", n_scheme);
19478 test_xmlBufferShrink(void) {
19483 xmlBufferPtr buf; /* the buffer to dump */
19485 unsigned int len; /* the number of xmlChar to remove */
19488 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
19489 for (n_len = 0;n_len < gen_nb_unsigned_int;n_len++) {
19490 mem_base = xmlMemBlocks();
19491 buf = gen_xmlBufferPtr(n_buf, 0);
19492 len = gen_unsigned_int(n_len, 1);
19494 ret_val = xmlBufferShrink(buf, len);
19495 desret_int(ret_val);
19497 des_xmlBufferPtr(n_buf, buf, 0);
19498 des_unsigned_int(n_len, len, 1);
19499 xmlResetLastError();
19500 if (mem_base != xmlMemBlocks()) {
19501 printf("Leak of %d blocks found in xmlBufferShrink",
19502 xmlMemBlocks() - mem_base);
19504 printf(" %d", n_buf);
19505 printf(" %d", n_len);
19517 test_xmlBufferWriteCHAR(void) {
19521 xmlBufferPtr buf; /* the XML buffer */
19523 xmlChar * string; /* the string to add */
19526 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
19527 for (n_string = 0;n_string < gen_nb_const_xmlChar_ptr;n_string++) {
19528 mem_base = xmlMemBlocks();
19529 buf = gen_xmlBufferPtr(n_buf, 0);
19530 string = gen_const_xmlChar_ptr(n_string, 1);
19532 xmlBufferWriteCHAR(buf, (const xmlChar *)string);
19534 des_xmlBufferPtr(n_buf, buf, 0);
19535 des_const_xmlChar_ptr(n_string, (const xmlChar *)string, 1);
19536 xmlResetLastError();
19537 if (mem_base != xmlMemBlocks()) {
19538 printf("Leak of %d blocks found in xmlBufferWriteCHAR",
19539 xmlMemBlocks() - mem_base);
19541 printf(" %d", n_buf);
19542 printf(" %d", n_string);
19554 test_xmlBufferWriteChar(void) {
19558 xmlBufferPtr buf; /* the XML buffer output */
19560 char * string; /* the string to add */
19563 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
19564 for (n_string = 0;n_string < gen_nb_const_char_ptr;n_string++) {
19565 mem_base = xmlMemBlocks();
19566 buf = gen_xmlBufferPtr(n_buf, 0);
19567 string = gen_const_char_ptr(n_string, 1);
19569 xmlBufferWriteChar(buf, (const char *)string);
19571 des_xmlBufferPtr(n_buf, buf, 0);
19572 des_const_char_ptr(n_string, (const char *)string, 1);
19573 xmlResetLastError();
19574 if (mem_base != xmlMemBlocks()) {
19575 printf("Leak of %d blocks found in xmlBufferWriteChar",
19576 xmlMemBlocks() - mem_base);
19578 printf(" %d", n_buf);
19579 printf(" %d", n_string);
19591 test_xmlBufferWriteQuotedString(void) {
19595 xmlBufferPtr buf; /* the XML buffer output */
19597 xmlChar * string; /* the string to add */
19600 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
19601 for (n_string = 0;n_string < gen_nb_const_xmlChar_ptr;n_string++) {
19602 mem_base = xmlMemBlocks();
19603 buf = gen_xmlBufferPtr(n_buf, 0);
19604 string = gen_const_xmlChar_ptr(n_string, 1);
19606 xmlBufferWriteQuotedString(buf, (const xmlChar *)string);
19608 des_xmlBufferPtr(n_buf, buf, 0);
19609 des_const_xmlChar_ptr(n_string, (const xmlChar *)string, 1);
19610 xmlResetLastError();
19611 if (mem_base != xmlMemBlocks()) {
19612 printf("Leak of %d blocks found in xmlBufferWriteQuotedString",
19613 xmlMemBlocks() - mem_base);
19615 printf(" %d", n_buf);
19616 printf(" %d", n_string);
19628 test_xmlBuildQName(void) {
19633 xmlChar * ncname; /* the Name */
19635 xmlChar * prefix; /* the prefix */
19637 xmlChar * memory; /* preallocated memory */
19639 int len; /* preallocated memory length */
19642 for (n_ncname = 0;n_ncname < gen_nb_const_xmlChar_ptr;n_ncname++) {
19643 for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
19644 for (n_memory = 0;n_memory < gen_nb_xmlChar_ptr;n_memory++) {
19645 for (n_len = 0;n_len < gen_nb_int;n_len++) {
19646 mem_base = xmlMemBlocks();
19647 ncname = gen_const_xmlChar_ptr(n_ncname, 0);
19648 prefix = gen_const_xmlChar_ptr(n_prefix, 1);
19649 memory = gen_xmlChar_ptr(n_memory, 2);
19650 len = gen_int(n_len, 3);
19652 ret_val = xmlBuildQName((const xmlChar *)ncname, (const xmlChar *)prefix, memory, len);
19653 if ((ret_val != NULL) && (ret_val != ncname) &&
19654 (ret_val != prefix) && (ret_val != memory))
19657 desret_xmlChar_ptr(ret_val);
19659 des_const_xmlChar_ptr(n_ncname, (const xmlChar *)ncname, 0);
19660 des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 1);
19661 des_xmlChar_ptr(n_memory, memory, 2);
19662 des_int(n_len, len, 3);
19663 xmlResetLastError();
19664 if (mem_base != xmlMemBlocks()) {
19665 printf("Leak of %d blocks found in xmlBuildQName",
19666 xmlMemBlocks() - mem_base);
19668 printf(" %d", n_ncname);
19669 printf(" %d", n_prefix);
19670 printf(" %d", n_memory);
19671 printf(" %d", n_len);
19685 test_xmlChildElementCount(void) {
19688 #if defined(LIBXML_TREE_ENABLED)
19690 unsigned long ret_val;
19691 xmlNodePtr parent; /* the parent node */
19694 for (n_parent = 0;n_parent < gen_nb_xmlNodePtr;n_parent++) {
19695 mem_base = xmlMemBlocks();
19696 parent = gen_xmlNodePtr(n_parent, 0);
19698 ret_val = xmlChildElementCount(parent);
19699 desret_unsigned_long(ret_val);
19701 des_xmlNodePtr(n_parent, parent, 0);
19702 xmlResetLastError();
19703 if (mem_base != xmlMemBlocks()) {
19704 printf("Leak of %d blocks found in xmlChildElementCount",
19705 xmlMemBlocks() - mem_base);
19707 printf(" %d", n_parent);
19719 test_xmlCopyDoc(void) {
19722 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
19725 xmlDocPtr doc; /* the document */
19727 int recursive; /* if not zero do a recursive copy. */
19730 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
19731 for (n_recursive = 0;n_recursive < gen_nb_int;n_recursive++) {
19732 mem_base = xmlMemBlocks();
19733 doc = gen_xmlDocPtr(n_doc, 0);
19734 recursive = gen_int(n_recursive, 1);
19736 ret_val = xmlCopyDoc(doc, recursive);
19737 desret_xmlDocPtr(ret_val);
19739 des_xmlDocPtr(n_doc, doc, 0);
19740 des_int(n_recursive, recursive, 1);
19741 xmlResetLastError();
19742 if (mem_base != xmlMemBlocks()) {
19743 printf("Leak of %d blocks found in xmlCopyDoc",
19744 xmlMemBlocks() - mem_base);
19746 printf(" %d", n_doc);
19747 printf(" %d", n_recursive);
19760 test_xmlCopyDtd(void) {
19763 #if defined(LIBXML_TREE_ENABLED)
19766 xmlDtdPtr dtd; /* the dtd */
19769 for (n_dtd = 0;n_dtd < gen_nb_xmlDtdPtr;n_dtd++) {
19770 mem_base = xmlMemBlocks();
19771 dtd = gen_xmlDtdPtr(n_dtd, 0);
19773 ret_val = xmlCopyDtd(dtd);
19774 desret_xmlDtdPtr(ret_val);
19776 des_xmlDtdPtr(n_dtd, dtd, 0);
19777 xmlResetLastError();
19778 if (mem_base != xmlMemBlocks()) {
19779 printf("Leak of %d blocks found in xmlCopyDtd",
19780 xmlMemBlocks() - mem_base);
19782 printf(" %d", n_dtd);
19794 test_xmlCopyNamespace(void) {
19799 xmlNsPtr cur; /* the namespace */
19802 for (n_cur = 0;n_cur < gen_nb_xmlNsPtr;n_cur++) {
19803 mem_base = xmlMemBlocks();
19804 cur = gen_xmlNsPtr(n_cur, 0);
19806 ret_val = xmlCopyNamespace(cur);
19807 if (ret_val != NULL) xmlFreeNs(ret_val);
19808 desret_xmlNsPtr(ret_val);
19810 des_xmlNsPtr(n_cur, cur, 0);
19811 xmlResetLastError();
19812 if (mem_base != xmlMemBlocks()) {
19813 printf("Leak of %d blocks found in xmlCopyNamespace",
19814 xmlMemBlocks() - mem_base);
19816 printf(" %d", n_cur);
19827 test_xmlCopyNamespaceList(void) {
19832 xmlNsPtr cur; /* the first namespace */
19835 for (n_cur = 0;n_cur < gen_nb_xmlNsPtr;n_cur++) {
19836 mem_base = xmlMemBlocks();
19837 cur = gen_xmlNsPtr(n_cur, 0);
19839 ret_val = xmlCopyNamespaceList(cur);
19840 if (ret_val != NULL) xmlFreeNsList(ret_val);
19841 desret_xmlNsPtr(ret_val);
19843 des_xmlNsPtr(n_cur, cur, 0);
19844 xmlResetLastError();
19845 if (mem_base != xmlMemBlocks()) {
19846 printf("Leak of %d blocks found in xmlCopyNamespaceList",
19847 xmlMemBlocks() - mem_base);
19849 printf(" %d", n_cur);
19860 test_xmlCopyNode(void) {
19864 xmlNodePtr ret_val;
19865 xmlNodePtr node; /* the node */
19867 int extended; /* if 1 do a recursive copy (properties, namespaces and children when applicable) if 2 copy properties and namespaces (when applicable) */
19870 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
19871 for (n_extended = 0;n_extended < gen_nb_int;n_extended++) {
19872 mem_base = xmlMemBlocks();
19873 node = gen_xmlNodePtr(n_node, 0);
19874 extended = gen_int(n_extended, 1);
19876 ret_val = xmlCopyNode(node, extended);
19877 desret_xmlNodePtr(ret_val);
19879 des_xmlNodePtr(n_node, node, 0);
19880 des_int(n_extended, extended, 1);
19881 xmlResetLastError();
19882 if (mem_base != xmlMemBlocks()) {
19883 printf("Leak of %d blocks found in xmlCopyNode",
19884 xmlMemBlocks() - mem_base);
19886 printf(" %d", n_node);
19887 printf(" %d", n_extended);
19899 test_xmlCopyNodeList(void) {
19903 xmlNodePtr ret_val;
19904 xmlNodePtr node; /* the first node in the list. */
19907 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
19908 mem_base = xmlMemBlocks();
19909 node = gen_xmlNodePtr(n_node, 0);
19911 ret_val = xmlCopyNodeList(node);
19912 desret_xmlNodePtr(ret_val);
19914 des_xmlNodePtr(n_node, node, 0);
19915 xmlResetLastError();
19916 if (mem_base != xmlMemBlocks()) {
19917 printf("Leak of %d blocks found in xmlCopyNodeList",
19918 xmlMemBlocks() - mem_base);
19920 printf(" %d", n_node);
19931 test_xmlCopyProp(void) {
19935 xmlAttrPtr ret_val;
19936 xmlNodePtr target; /* the element where the attribute will be grafted */
19938 xmlAttrPtr cur; /* the attribute */
19941 for (n_target = 0;n_target < gen_nb_xmlNodePtr;n_target++) {
19942 for (n_cur = 0;n_cur < gen_nb_xmlAttrPtr;n_cur++) {
19943 mem_base = xmlMemBlocks();
19944 target = gen_xmlNodePtr(n_target, 0);
19945 cur = gen_xmlAttrPtr(n_cur, 1);
19947 ret_val = xmlCopyProp(target, cur);
19948 desret_xmlAttrPtr(ret_val);
19950 des_xmlNodePtr(n_target, target, 0);
19951 des_xmlAttrPtr(n_cur, cur, 1);
19952 xmlResetLastError();
19953 if (mem_base != xmlMemBlocks()) {
19954 printf("Leak of %d blocks found in xmlCopyProp",
19955 xmlMemBlocks() - mem_base);
19957 printf(" %d", n_target);
19958 printf(" %d", n_cur);
19970 test_xmlCopyPropList(void) {
19974 xmlAttrPtr ret_val;
19975 xmlNodePtr target; /* the element where the attributes will be grafted */
19977 xmlAttrPtr cur; /* the first attribute */
19980 for (n_target = 0;n_target < gen_nb_xmlNodePtr;n_target++) {
19981 for (n_cur = 0;n_cur < gen_nb_xmlAttrPtr;n_cur++) {
19982 mem_base = xmlMemBlocks();
19983 target = gen_xmlNodePtr(n_target, 0);
19984 cur = gen_xmlAttrPtr(n_cur, 1);
19986 ret_val = xmlCopyPropList(target, cur);
19987 desret_xmlAttrPtr(ret_val);
19989 des_xmlNodePtr(n_target, target, 0);
19990 des_xmlAttrPtr(n_cur, cur, 1);
19991 xmlResetLastError();
19992 if (mem_base != xmlMemBlocks()) {
19993 printf("Leak of %d blocks found in xmlCopyPropList",
19994 xmlMemBlocks() - mem_base);
19996 printf(" %d", n_target);
19997 printf(" %d", n_cur);
20009 test_xmlCreateIntSubset(void) {
20014 xmlDocPtr doc; /* the document pointer */
20016 xmlChar * name; /* the DTD name */
20018 xmlChar * ExternalID; /* the external (PUBLIC) ID */
20020 xmlChar * SystemID; /* the system ID */
20023 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
20024 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
20025 for (n_ExternalID = 0;n_ExternalID < gen_nb_const_xmlChar_ptr;n_ExternalID++) {
20026 for (n_SystemID = 0;n_SystemID < gen_nb_const_xmlChar_ptr;n_SystemID++) {
20027 mem_base = xmlMemBlocks();
20028 doc = gen_xmlDocPtr(n_doc, 0);
20029 name = gen_const_xmlChar_ptr(n_name, 1);
20030 ExternalID = gen_const_xmlChar_ptr(n_ExternalID, 2);
20031 SystemID = gen_const_xmlChar_ptr(n_SystemID, 3);
20033 ret_val = xmlCreateIntSubset(doc, (const xmlChar *)name, (const xmlChar *)ExternalID, (const xmlChar *)SystemID);
20034 desret_xmlDtdPtr(ret_val);
20036 des_xmlDocPtr(n_doc, doc, 0);
20037 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
20038 des_const_xmlChar_ptr(n_ExternalID, (const xmlChar *)ExternalID, 2);
20039 des_const_xmlChar_ptr(n_SystemID, (const xmlChar *)SystemID, 3);
20040 xmlResetLastError();
20041 if (mem_base != xmlMemBlocks()) {
20042 printf("Leak of %d blocks found in xmlCreateIntSubset",
20043 xmlMemBlocks() - mem_base);
20045 printf(" %d", n_doc);
20046 printf(" %d", n_name);
20047 printf(" %d", n_ExternalID);
20048 printf(" %d", n_SystemID);
20061 #define gen_nb_xmlDOMWrapCtxtPtr 1
20062 static xmlDOMWrapCtxtPtr gen_xmlDOMWrapCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
20065 static void des_xmlDOMWrapCtxtPtr(int no ATTRIBUTE_UNUSED, xmlDOMWrapCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
20069 test_xmlDOMWrapAdoptNode(void) {
20074 xmlDOMWrapCtxtPtr ctxt; /* the optional context for custom processing */
20076 xmlDocPtr sourceDoc; /* the optional sourceDoc */
20078 xmlNodePtr node; /* the node to start with */
20080 xmlDocPtr destDoc; /* the destination doc */
20082 xmlNodePtr destParent; /* the optional new parent of @node in @destDoc */
20084 int options; /* option flags */
20087 for (n_ctxt = 0;n_ctxt < gen_nb_xmlDOMWrapCtxtPtr;n_ctxt++) {
20088 for (n_sourceDoc = 0;n_sourceDoc < gen_nb_xmlDocPtr;n_sourceDoc++) {
20089 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
20090 for (n_destDoc = 0;n_destDoc < gen_nb_xmlDocPtr;n_destDoc++) {
20091 for (n_destParent = 0;n_destParent < gen_nb_xmlNodePtr;n_destParent++) {
20092 for (n_options = 0;n_options < gen_nb_int;n_options++) {
20093 mem_base = xmlMemBlocks();
20094 ctxt = gen_xmlDOMWrapCtxtPtr(n_ctxt, 0);
20095 sourceDoc = gen_xmlDocPtr(n_sourceDoc, 1);
20096 node = gen_xmlNodePtr(n_node, 2);
20097 destDoc = gen_xmlDocPtr(n_destDoc, 3);
20098 destParent = gen_xmlNodePtr(n_destParent, 4);
20099 options = gen_int(n_options, 5);
20101 ret_val = xmlDOMWrapAdoptNode(ctxt, sourceDoc, node, destDoc, destParent, options);
20102 if ((node != NULL) && (node->parent == NULL)) {xmlUnlinkNode(node);xmlFreeNode(node);node = NULL;}
20103 desret_int(ret_val);
20105 des_xmlDOMWrapCtxtPtr(n_ctxt, ctxt, 0);
20106 des_xmlDocPtr(n_sourceDoc, sourceDoc, 1);
20107 des_xmlNodePtr(n_node, node, 2);
20108 des_xmlDocPtr(n_destDoc, destDoc, 3);
20109 des_xmlNodePtr(n_destParent, destParent, 4);
20110 des_int(n_options, options, 5);
20111 xmlResetLastError();
20112 if (mem_base != xmlMemBlocks()) {
20113 printf("Leak of %d blocks found in xmlDOMWrapAdoptNode",
20114 xmlMemBlocks() - mem_base);
20116 printf(" %d", n_ctxt);
20117 printf(" %d", n_sourceDoc);
20118 printf(" %d", n_node);
20119 printf(" %d", n_destDoc);
20120 printf(" %d", n_destParent);
20121 printf(" %d", n_options);
20137 test_xmlDOMWrapCloneNode(void) {
20142 xmlDOMWrapCtxtPtr ctxt; /* the optional context for custom processing */
20144 xmlDocPtr sourceDoc; /* the optional sourceDoc */
20146 xmlNodePtr node; /* the node to start with */
20148 xmlNodePtr * resNode; /* the clone of the given @node */
20150 xmlDocPtr destDoc; /* the destination doc */
20152 xmlNodePtr destParent; /* the optional new parent of @node in @destDoc */
20154 int deep; /* descend into child if set */
20156 int options; /* option flags */
20159 for (n_ctxt = 0;n_ctxt < gen_nb_xmlDOMWrapCtxtPtr;n_ctxt++) {
20160 for (n_sourceDoc = 0;n_sourceDoc < gen_nb_xmlDocPtr;n_sourceDoc++) {
20161 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
20162 for (n_resNode = 0;n_resNode < gen_nb_xmlNodePtr_ptr;n_resNode++) {
20163 for (n_destDoc = 0;n_destDoc < gen_nb_xmlDocPtr;n_destDoc++) {
20164 for (n_destParent = 0;n_destParent < gen_nb_xmlNodePtr;n_destParent++) {
20165 for (n_deep = 0;n_deep < gen_nb_int;n_deep++) {
20166 for (n_options = 0;n_options < gen_nb_int;n_options++) {
20167 mem_base = xmlMemBlocks();
20168 ctxt = gen_xmlDOMWrapCtxtPtr(n_ctxt, 0);
20169 sourceDoc = gen_xmlDocPtr(n_sourceDoc, 1);
20170 node = gen_xmlNodePtr(n_node, 2);
20171 resNode = gen_xmlNodePtr_ptr(n_resNode, 3);
20172 destDoc = gen_xmlDocPtr(n_destDoc, 4);
20173 destParent = gen_xmlNodePtr(n_destParent, 5);
20174 deep = gen_int(n_deep, 6);
20175 options = gen_int(n_options, 7);
20177 ret_val = xmlDOMWrapCloneNode(ctxt, sourceDoc, node, resNode, destDoc, destParent, deep, options);
20178 desret_int(ret_val);
20180 des_xmlDOMWrapCtxtPtr(n_ctxt, ctxt, 0);
20181 des_xmlDocPtr(n_sourceDoc, sourceDoc, 1);
20182 des_xmlNodePtr(n_node, node, 2);
20183 des_xmlNodePtr_ptr(n_resNode, resNode, 3);
20184 des_xmlDocPtr(n_destDoc, destDoc, 4);
20185 des_xmlNodePtr(n_destParent, destParent, 5);
20186 des_int(n_deep, deep, 6);
20187 des_int(n_options, options, 7);
20188 xmlResetLastError();
20189 if (mem_base != xmlMemBlocks()) {
20190 printf("Leak of %d blocks found in xmlDOMWrapCloneNode",
20191 xmlMemBlocks() - mem_base);
20193 printf(" %d", n_ctxt);
20194 printf(" %d", n_sourceDoc);
20195 printf(" %d", n_node);
20196 printf(" %d", n_resNode);
20197 printf(" %d", n_destDoc);
20198 printf(" %d", n_destParent);
20199 printf(" %d", n_deep);
20200 printf(" %d", n_options);
20218 test_xmlDOMWrapNewCtxt(void) {
20222 /* missing type support */
20228 test_xmlDOMWrapReconcileNamespaces(void) {
20233 xmlDOMWrapCtxtPtr ctxt; /* DOM wrapper context, unused at the moment */
20235 xmlNodePtr elem; /* the element-node */
20237 int options; /* option flags */
20240 for (n_ctxt = 0;n_ctxt < gen_nb_xmlDOMWrapCtxtPtr;n_ctxt++) {
20241 for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
20242 for (n_options = 0;n_options < gen_nb_int;n_options++) {
20243 mem_base = xmlMemBlocks();
20244 ctxt = gen_xmlDOMWrapCtxtPtr(n_ctxt, 0);
20245 elem = gen_xmlNodePtr(n_elem, 1);
20246 options = gen_int(n_options, 2);
20248 ret_val = xmlDOMWrapReconcileNamespaces(ctxt, elem, options);
20249 desret_int(ret_val);
20251 des_xmlDOMWrapCtxtPtr(n_ctxt, ctxt, 0);
20252 des_xmlNodePtr(n_elem, elem, 1);
20253 des_int(n_options, options, 2);
20254 xmlResetLastError();
20255 if (mem_base != xmlMemBlocks()) {
20256 printf("Leak of %d blocks found in xmlDOMWrapReconcileNamespaces",
20257 xmlMemBlocks() - mem_base);
20259 printf(" %d", n_ctxt);
20260 printf(" %d", n_elem);
20261 printf(" %d", n_options);
20274 test_xmlDOMWrapRemoveNode(void) {
20279 xmlDOMWrapCtxtPtr ctxt; /* a DOM wrapper context */
20281 xmlDocPtr doc; /* the doc */
20283 xmlNodePtr node; /* the node to be removed. */
20285 int options; /* set of options, unused at the moment */
20288 for (n_ctxt = 0;n_ctxt < gen_nb_xmlDOMWrapCtxtPtr;n_ctxt++) {
20289 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
20290 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
20291 for (n_options = 0;n_options < gen_nb_int;n_options++) {
20292 mem_base = xmlMemBlocks();
20293 ctxt = gen_xmlDOMWrapCtxtPtr(n_ctxt, 0);
20294 doc = gen_xmlDocPtr(n_doc, 1);
20295 node = gen_xmlNodePtr(n_node, 2);
20296 options = gen_int(n_options, 3);
20298 ret_val = xmlDOMWrapRemoveNode(ctxt, doc, node, options);
20299 desret_int(ret_val);
20301 des_xmlDOMWrapCtxtPtr(n_ctxt, ctxt, 0);
20302 des_xmlDocPtr(n_doc, doc, 1);
20303 des_xmlNodePtr(n_node, node, 2);
20304 des_int(n_options, options, 3);
20305 xmlResetLastError();
20306 if (mem_base != xmlMemBlocks()) {
20307 printf("Leak of %d blocks found in xmlDOMWrapRemoveNode",
20308 xmlMemBlocks() - mem_base);
20310 printf(" %d", n_ctxt);
20311 printf(" %d", n_doc);
20312 printf(" %d", n_node);
20313 printf(" %d", n_options);
20327 test_xmlDocCopyNode(void) {
20331 xmlNodePtr ret_val;
20332 xmlNodePtr node; /* the node */
20334 xmlDocPtr doc; /* the document */
20336 int extended; /* if 1 do a recursive copy (properties, namespaces and children when applicable) if 2 copy properties and namespaces (when applicable) */
20339 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
20340 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
20341 for (n_extended = 0;n_extended < gen_nb_int;n_extended++) {
20342 mem_base = xmlMemBlocks();
20343 node = gen_xmlNodePtr(n_node, 0);
20344 doc = gen_xmlDocPtr(n_doc, 1);
20345 extended = gen_int(n_extended, 2);
20347 ret_val = xmlDocCopyNode(node, doc, extended);
20348 desret_xmlNodePtr(ret_val);
20350 des_xmlNodePtr(n_node, node, 0);
20351 des_xmlDocPtr(n_doc, doc, 1);
20352 des_int(n_extended, extended, 2);
20353 xmlResetLastError();
20354 if (mem_base != xmlMemBlocks()) {
20355 printf("Leak of %d blocks found in xmlDocCopyNode",
20356 xmlMemBlocks() - mem_base);
20358 printf(" %d", n_node);
20359 printf(" %d", n_doc);
20360 printf(" %d", n_extended);
20373 test_xmlDocCopyNodeList(void) {
20377 xmlNodePtr ret_val;
20378 xmlDocPtr doc; /* the target document */
20380 xmlNodePtr node; /* the first node in the list. */
20383 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
20384 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
20385 mem_base = xmlMemBlocks();
20386 doc = gen_xmlDocPtr(n_doc, 0);
20387 node = gen_xmlNodePtr(n_node, 1);
20389 ret_val = xmlDocCopyNodeList(doc, node);
20390 desret_xmlNodePtr(ret_val);
20392 des_xmlDocPtr(n_doc, doc, 0);
20393 des_xmlNodePtr(n_node, node, 1);
20394 xmlResetLastError();
20395 if (mem_base != xmlMemBlocks()) {
20396 printf("Leak of %d blocks found in xmlDocCopyNodeList",
20397 xmlMemBlocks() - mem_base);
20399 printf(" %d", n_doc);
20400 printf(" %d", n_node);
20412 test_xmlDocDump(void) {
20415 #if defined(LIBXML_OUTPUT_ENABLED)
20418 FILE * f; /* the FILE* */
20420 xmlDocPtr cur; /* the document */
20423 for (n_f = 0;n_f < gen_nb_FILE_ptr;n_f++) {
20424 for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
20425 mem_base = xmlMemBlocks();
20426 f = gen_FILE_ptr(n_f, 0);
20427 cur = gen_xmlDocPtr(n_cur, 1);
20429 ret_val = xmlDocDump(f, cur);
20430 desret_int(ret_val);
20432 des_FILE_ptr(n_f, f, 0);
20433 des_xmlDocPtr(n_cur, cur, 1);
20434 xmlResetLastError();
20435 if (mem_base != xmlMemBlocks()) {
20436 printf("Leak of %d blocks found in xmlDocDump",
20437 xmlMemBlocks() - mem_base);
20439 printf(" %d", n_f);
20440 printf(" %d", n_cur);
20453 test_xmlDocDumpFormatMemory(void) {
20456 #if defined(LIBXML_OUTPUT_ENABLED)
20458 xmlDocPtr cur; /* the document */
20460 xmlChar ** mem; /* OUT: the memory pointer */
20462 int * size; /* OUT: the memory length */
20464 int format; /* should formatting spaces been added */
20467 for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
20468 for (n_mem = 0;n_mem < gen_nb_xmlChar_ptr_ptr;n_mem++) {
20469 for (n_size = 0;n_size < gen_nb_int_ptr;n_size++) {
20470 for (n_format = 0;n_format < gen_nb_int;n_format++) {
20471 mem_base = xmlMemBlocks();
20472 cur = gen_xmlDocPtr(n_cur, 0);
20473 mem = gen_xmlChar_ptr_ptr(n_mem, 1);
20474 size = gen_int_ptr(n_size, 2);
20475 format = gen_int(n_format, 3);
20477 xmlDocDumpFormatMemory(cur, mem, size, format);
20479 des_xmlDocPtr(n_cur, cur, 0);
20480 des_xmlChar_ptr_ptr(n_mem, mem, 1);
20481 des_int_ptr(n_size, size, 2);
20482 des_int(n_format, format, 3);
20483 xmlResetLastError();
20484 if (mem_base != xmlMemBlocks()) {
20485 printf("Leak of %d blocks found in xmlDocDumpFormatMemory",
20486 xmlMemBlocks() - mem_base);
20488 printf(" %d", n_cur);
20489 printf(" %d", n_mem);
20490 printf(" %d", n_size);
20491 printf(" %d", n_format);
20506 test_xmlDocDumpFormatMemoryEnc(void) {
20509 #if defined(LIBXML_OUTPUT_ENABLED)
20511 xmlDocPtr out_doc; /* Document to generate XML text from */
20513 xmlChar ** doc_txt_ptr; /* Memory pointer for allocated XML text */
20515 int * doc_txt_len; /* Length of the generated XML text */
20517 char * txt_encoding; /* Character encoding to use when generating XML text */
20518 int n_txt_encoding;
20519 int format; /* should formatting spaces been added */
20522 for (n_out_doc = 0;n_out_doc < gen_nb_xmlDocPtr;n_out_doc++) {
20523 for (n_doc_txt_ptr = 0;n_doc_txt_ptr < gen_nb_xmlChar_ptr_ptr;n_doc_txt_ptr++) {
20524 for (n_doc_txt_len = 0;n_doc_txt_len < gen_nb_int_ptr;n_doc_txt_len++) {
20525 for (n_txt_encoding = 0;n_txt_encoding < gen_nb_const_char_ptr;n_txt_encoding++) {
20526 for (n_format = 0;n_format < gen_nb_int;n_format++) {
20527 mem_base = xmlMemBlocks();
20528 out_doc = gen_xmlDocPtr(n_out_doc, 0);
20529 doc_txt_ptr = gen_xmlChar_ptr_ptr(n_doc_txt_ptr, 1);
20530 doc_txt_len = gen_int_ptr(n_doc_txt_len, 2);
20531 txt_encoding = gen_const_char_ptr(n_txt_encoding, 3);
20532 format = gen_int(n_format, 4);
20534 xmlDocDumpFormatMemoryEnc(out_doc, doc_txt_ptr, doc_txt_len, (const char *)txt_encoding, format);
20536 des_xmlDocPtr(n_out_doc, out_doc, 0);
20537 des_xmlChar_ptr_ptr(n_doc_txt_ptr, doc_txt_ptr, 1);
20538 des_int_ptr(n_doc_txt_len, doc_txt_len, 2);
20539 des_const_char_ptr(n_txt_encoding, (const char *)txt_encoding, 3);
20540 des_int(n_format, format, 4);
20541 xmlResetLastError();
20542 if (mem_base != xmlMemBlocks()) {
20543 printf("Leak of %d blocks found in xmlDocDumpFormatMemoryEnc",
20544 xmlMemBlocks() - mem_base);
20546 printf(" %d", n_out_doc);
20547 printf(" %d", n_doc_txt_ptr);
20548 printf(" %d", n_doc_txt_len);
20549 printf(" %d", n_txt_encoding);
20550 printf(" %d", n_format);
20566 test_xmlDocDumpMemory(void) {
20569 #if defined(LIBXML_OUTPUT_ENABLED)
20571 xmlDocPtr cur; /* the document */
20573 xmlChar ** mem; /* OUT: the memory pointer */
20575 int * size; /* OUT: the memory length */
20578 for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
20579 for (n_mem = 0;n_mem < gen_nb_xmlChar_ptr_ptr;n_mem++) {
20580 for (n_size = 0;n_size < gen_nb_int_ptr;n_size++) {
20581 mem_base = xmlMemBlocks();
20582 cur = gen_xmlDocPtr(n_cur, 0);
20583 mem = gen_xmlChar_ptr_ptr(n_mem, 1);
20584 size = gen_int_ptr(n_size, 2);
20586 xmlDocDumpMemory(cur, mem, size);
20588 des_xmlDocPtr(n_cur, cur, 0);
20589 des_xmlChar_ptr_ptr(n_mem, mem, 1);
20590 des_int_ptr(n_size, size, 2);
20591 xmlResetLastError();
20592 if (mem_base != xmlMemBlocks()) {
20593 printf("Leak of %d blocks found in xmlDocDumpMemory",
20594 xmlMemBlocks() - mem_base);
20596 printf(" %d", n_cur);
20597 printf(" %d", n_mem);
20598 printf(" %d", n_size);
20612 test_xmlDocDumpMemoryEnc(void) {
20615 #if defined(LIBXML_OUTPUT_ENABLED)
20617 xmlDocPtr out_doc; /* Document to generate XML text from */
20619 xmlChar ** doc_txt_ptr; /* Memory pointer for allocated XML text */
20621 int * doc_txt_len; /* Length of the generated XML text */
20623 char * txt_encoding; /* Character encoding to use when generating XML text */
20624 int n_txt_encoding;
20626 for (n_out_doc = 0;n_out_doc < gen_nb_xmlDocPtr;n_out_doc++) {
20627 for (n_doc_txt_ptr = 0;n_doc_txt_ptr < gen_nb_xmlChar_ptr_ptr;n_doc_txt_ptr++) {
20628 for (n_doc_txt_len = 0;n_doc_txt_len < gen_nb_int_ptr;n_doc_txt_len++) {
20629 for (n_txt_encoding = 0;n_txt_encoding < gen_nb_const_char_ptr;n_txt_encoding++) {
20630 mem_base = xmlMemBlocks();
20631 out_doc = gen_xmlDocPtr(n_out_doc, 0);
20632 doc_txt_ptr = gen_xmlChar_ptr_ptr(n_doc_txt_ptr, 1);
20633 doc_txt_len = gen_int_ptr(n_doc_txt_len, 2);
20634 txt_encoding = gen_const_char_ptr(n_txt_encoding, 3);
20636 xmlDocDumpMemoryEnc(out_doc, doc_txt_ptr, doc_txt_len, (const char *)txt_encoding);
20638 des_xmlDocPtr(n_out_doc, out_doc, 0);
20639 des_xmlChar_ptr_ptr(n_doc_txt_ptr, doc_txt_ptr, 1);
20640 des_int_ptr(n_doc_txt_len, doc_txt_len, 2);
20641 des_const_char_ptr(n_txt_encoding, (const char *)txt_encoding, 3);
20642 xmlResetLastError();
20643 if (mem_base != xmlMemBlocks()) {
20644 printf("Leak of %d blocks found in xmlDocDumpMemoryEnc",
20645 xmlMemBlocks() - mem_base);
20647 printf(" %d", n_out_doc);
20648 printf(" %d", n_doc_txt_ptr);
20649 printf(" %d", n_doc_txt_len);
20650 printf(" %d", n_txt_encoding);
20665 test_xmlDocFormatDump(void) {
20668 #if defined(LIBXML_OUTPUT_ENABLED)
20671 FILE * f; /* the FILE* */
20673 xmlDocPtr cur; /* the document */
20675 int format; /* should formatting spaces been added */
20678 for (n_f = 0;n_f < gen_nb_FILE_ptr;n_f++) {
20679 for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
20680 for (n_format = 0;n_format < gen_nb_int;n_format++) {
20681 mem_base = xmlMemBlocks();
20682 f = gen_FILE_ptr(n_f, 0);
20683 cur = gen_xmlDocPtr(n_cur, 1);
20684 format = gen_int(n_format, 2);
20686 ret_val = xmlDocFormatDump(f, cur, format);
20687 desret_int(ret_val);
20689 des_FILE_ptr(n_f, f, 0);
20690 des_xmlDocPtr(n_cur, cur, 1);
20691 des_int(n_format, format, 2);
20692 xmlResetLastError();
20693 if (mem_base != xmlMemBlocks()) {
20694 printf("Leak of %d blocks found in xmlDocFormatDump",
20695 xmlMemBlocks() - mem_base);
20697 printf(" %d", n_f);
20698 printf(" %d", n_cur);
20699 printf(" %d", n_format);
20713 test_xmlDocGetRootElement(void) {
20717 xmlNodePtr ret_val;
20718 xmlDoc * doc; /* the document */
20721 for (n_doc = 0;n_doc < gen_nb_const_xmlDoc_ptr;n_doc++) {
20722 mem_base = xmlMemBlocks();
20723 doc = gen_const_xmlDoc_ptr(n_doc, 0);
20725 ret_val = xmlDocGetRootElement((const xmlDoc *)doc);
20726 desret_xmlNodePtr(ret_val);
20728 des_const_xmlDoc_ptr(n_doc, (const xmlDoc *)doc, 0);
20729 xmlResetLastError();
20730 if (mem_base != xmlMemBlocks()) {
20731 printf("Leak of %d blocks found in xmlDocGetRootElement",
20732 xmlMemBlocks() - mem_base);
20734 printf(" %d", n_doc);
20745 test_xmlDocSetRootElement(void) {
20748 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
20750 xmlNodePtr ret_val;
20751 xmlDocPtr doc; /* the document */
20753 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. */
20756 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
20757 for (n_root = 0;n_root < gen_nb_xmlNodePtr_in;n_root++) {
20758 mem_base = xmlMemBlocks();
20759 doc = gen_xmlDocPtr(n_doc, 0);
20760 root = gen_xmlNodePtr_in(n_root, 1);
20762 ret_val = xmlDocSetRootElement(doc, root);
20763 if (doc == NULL) { xmlFreeNode(root) ; root = NULL ; }
20764 desret_xmlNodePtr(ret_val);
20766 des_xmlDocPtr(n_doc, doc, 0);
20767 des_xmlNodePtr_in(n_root, root, 1);
20768 xmlResetLastError();
20769 if (mem_base != xmlMemBlocks()) {
20770 printf("Leak of %d blocks found in xmlDocSetRootElement",
20771 xmlMemBlocks() - mem_base);
20773 printf(" %d", n_doc);
20774 printf(" %d", n_root);
20787 test_xmlElemDump(void) {
20790 #if defined(LIBXML_OUTPUT_ENABLED)
20792 FILE * f; /* the FILE * for the output */
20794 xmlDocPtr doc; /* the document */
20796 xmlNodePtr cur; /* the current node */
20799 for (n_f = 0;n_f < gen_nb_FILE_ptr;n_f++) {
20800 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
20801 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
20802 mem_base = xmlMemBlocks();
20803 f = gen_FILE_ptr(n_f, 0);
20804 doc = gen_xmlDocPtr(n_doc, 1);
20805 cur = gen_xmlNodePtr(n_cur, 2);
20807 xmlElemDump(f, doc, cur);
20809 des_FILE_ptr(n_f, f, 0);
20810 des_xmlDocPtr(n_doc, doc, 1);
20811 des_xmlNodePtr(n_cur, cur, 2);
20812 xmlResetLastError();
20813 if (mem_base != xmlMemBlocks()) {
20814 printf("Leak of %d blocks found in xmlElemDump",
20815 xmlMemBlocks() - mem_base);
20817 printf(" %d", n_f);
20818 printf(" %d", n_doc);
20819 printf(" %d", n_cur);
20833 test_xmlFirstElementChild(void) {
20836 #if defined(LIBXML_TREE_ENABLED)
20838 xmlNodePtr ret_val;
20839 xmlNodePtr parent; /* the parent node */
20842 for (n_parent = 0;n_parent < gen_nb_xmlNodePtr;n_parent++) {
20843 mem_base = xmlMemBlocks();
20844 parent = gen_xmlNodePtr(n_parent, 0);
20846 ret_val = xmlFirstElementChild(parent);
20847 desret_xmlNodePtr(ret_val);
20849 des_xmlNodePtr(n_parent, parent, 0);
20850 xmlResetLastError();
20851 if (mem_base != xmlMemBlocks()) {
20852 printf("Leak of %d blocks found in xmlFirstElementChild",
20853 xmlMemBlocks() - mem_base);
20855 printf(" %d", n_parent);
20867 test_xmlGetBufferAllocationScheme(void) {
20871 xmlBufferAllocationScheme ret_val;
20873 mem_base = xmlMemBlocks();
20875 ret_val = xmlGetBufferAllocationScheme();
20876 desret_xmlBufferAllocationScheme(ret_val);
20878 xmlResetLastError();
20879 if (mem_base != xmlMemBlocks()) {
20880 printf("Leak of %d blocks found in xmlGetBufferAllocationScheme",
20881 xmlMemBlocks() - mem_base);
20892 test_xmlGetCompressMode(void) {
20898 mem_base = xmlMemBlocks();
20900 ret_val = xmlGetCompressMode();
20901 desret_int(ret_val);
20903 xmlResetLastError();
20904 if (mem_base != xmlMemBlocks()) {
20905 printf("Leak of %d blocks found in xmlGetCompressMode",
20906 xmlMemBlocks() - mem_base);
20917 test_xmlGetDocCompressMode(void) {
20922 xmlDoc * doc; /* the document */
20925 for (n_doc = 0;n_doc < gen_nb_const_xmlDoc_ptr;n_doc++) {
20926 mem_base = xmlMemBlocks();
20927 doc = gen_const_xmlDoc_ptr(n_doc, 0);
20929 ret_val = xmlGetDocCompressMode((const xmlDoc *)doc);
20930 desret_int(ret_val);
20932 des_const_xmlDoc_ptr(n_doc, (const xmlDoc *)doc, 0);
20933 xmlResetLastError();
20934 if (mem_base != xmlMemBlocks()) {
20935 printf("Leak of %d blocks found in xmlGetDocCompressMode",
20936 xmlMemBlocks() - mem_base);
20938 printf(" %d", n_doc);
20949 test_xmlGetIntSubset(void) {
20954 xmlDoc * doc; /* the document pointer */
20957 for (n_doc = 0;n_doc < gen_nb_const_xmlDoc_ptr;n_doc++) {
20958 mem_base = xmlMemBlocks();
20959 doc = gen_const_xmlDoc_ptr(n_doc, 0);
20961 ret_val = xmlGetIntSubset((const xmlDoc *)doc);
20962 desret_xmlDtdPtr(ret_val);
20964 des_const_xmlDoc_ptr(n_doc, (const xmlDoc *)doc, 0);
20965 xmlResetLastError();
20966 if (mem_base != xmlMemBlocks()) {
20967 printf("Leak of %d blocks found in xmlGetIntSubset",
20968 xmlMemBlocks() - mem_base);
20970 printf(" %d", n_doc);
20981 test_xmlGetLastChild(void) {
20985 xmlNodePtr ret_val;
20986 xmlNode * parent; /* the parent node */
20989 for (n_parent = 0;n_parent < gen_nb_const_xmlNode_ptr;n_parent++) {
20990 mem_base = xmlMemBlocks();
20991 parent = gen_const_xmlNode_ptr(n_parent, 0);
20993 ret_val = xmlGetLastChild((const xmlNode *)parent);
20994 desret_xmlNodePtr(ret_val);
20996 des_const_xmlNode_ptr(n_parent, (const xmlNode *)parent, 0);
20997 xmlResetLastError();
20998 if (mem_base != xmlMemBlocks()) {
20999 printf("Leak of %d blocks found in xmlGetLastChild",
21000 xmlMemBlocks() - mem_base);
21002 printf(" %d", n_parent);
21013 test_xmlGetLineNo(void) {
21018 xmlNode * node; /* valid node */
21021 for (n_node = 0;n_node < gen_nb_const_xmlNode_ptr;n_node++) {
21022 mem_base = xmlMemBlocks();
21023 node = gen_const_xmlNode_ptr(n_node, 0);
21025 ret_val = xmlGetLineNo((const xmlNode *)node);
21026 desret_long(ret_val);
21028 des_const_xmlNode_ptr(n_node, (const xmlNode *)node, 0);
21029 xmlResetLastError();
21030 if (mem_base != xmlMemBlocks()) {
21031 printf("Leak of %d blocks found in xmlGetLineNo",
21032 xmlMemBlocks() - mem_base);
21034 printf(" %d", n_node);
21045 test_xmlGetNoNsProp(void) {
21050 xmlNode * node; /* the node */
21052 xmlChar * name; /* the attribute name */
21055 for (n_node = 0;n_node < gen_nb_const_xmlNode_ptr;n_node++) {
21056 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
21057 mem_base = xmlMemBlocks();
21058 node = gen_const_xmlNode_ptr(n_node, 0);
21059 name = gen_const_xmlChar_ptr(n_name, 1);
21061 ret_val = xmlGetNoNsProp((const xmlNode *)node, (const xmlChar *)name);
21062 desret_xmlChar_ptr(ret_val);
21064 des_const_xmlNode_ptr(n_node, (const xmlNode *)node, 0);
21065 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
21066 xmlResetLastError();
21067 if (mem_base != xmlMemBlocks()) {
21068 printf("Leak of %d blocks found in xmlGetNoNsProp",
21069 xmlMemBlocks() - mem_base);
21071 printf(" %d", n_node);
21072 printf(" %d", n_name);
21084 test_xmlGetNodePath(void) {
21087 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED)
21090 xmlNode * node; /* a node */
21093 for (n_node = 0;n_node < gen_nb_const_xmlNode_ptr;n_node++) {
21094 mem_base = xmlMemBlocks();
21095 node = gen_const_xmlNode_ptr(n_node, 0);
21097 ret_val = xmlGetNodePath((const xmlNode *)node);
21098 desret_xmlChar_ptr(ret_val);
21100 des_const_xmlNode_ptr(n_node, (const xmlNode *)node, 0);
21101 xmlResetLastError();
21102 if (mem_base != xmlMemBlocks()) {
21103 printf("Leak of %d blocks found in xmlGetNodePath",
21104 xmlMemBlocks() - mem_base);
21106 printf(" %d", n_node);
21118 test_xmlGetNsList(void) {
21122 /* missing type support */
21128 test_xmlGetNsProp(void) {
21133 xmlNode * node; /* the node */
21135 xmlChar * name; /* the attribute name */
21137 xmlChar * nameSpace; /* the URI of the namespace */
21140 for (n_node = 0;n_node < gen_nb_const_xmlNode_ptr;n_node++) {
21141 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
21142 for (n_nameSpace = 0;n_nameSpace < gen_nb_const_xmlChar_ptr;n_nameSpace++) {
21143 mem_base = xmlMemBlocks();
21144 node = gen_const_xmlNode_ptr(n_node, 0);
21145 name = gen_const_xmlChar_ptr(n_name, 1);
21146 nameSpace = gen_const_xmlChar_ptr(n_nameSpace, 2);
21148 ret_val = xmlGetNsProp((const xmlNode *)node, (const xmlChar *)name, (const xmlChar *)nameSpace);
21149 desret_xmlChar_ptr(ret_val);
21151 des_const_xmlNode_ptr(n_node, (const xmlNode *)node, 0);
21152 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
21153 des_const_xmlChar_ptr(n_nameSpace, (const xmlChar *)nameSpace, 2);
21154 xmlResetLastError();
21155 if (mem_base != xmlMemBlocks()) {
21156 printf("Leak of %d blocks found in xmlGetNsProp",
21157 xmlMemBlocks() - mem_base);
21159 printf(" %d", n_node);
21160 printf(" %d", n_name);
21161 printf(" %d", n_nameSpace);
21174 test_xmlGetProp(void) {
21179 xmlNode * node; /* the node */
21181 xmlChar * name; /* the attribute name */
21184 for (n_node = 0;n_node < gen_nb_const_xmlNode_ptr;n_node++) {
21185 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
21186 mem_base = xmlMemBlocks();
21187 node = gen_const_xmlNode_ptr(n_node, 0);
21188 name = gen_const_xmlChar_ptr(n_name, 1);
21190 ret_val = xmlGetProp((const xmlNode *)node, (const xmlChar *)name);
21191 desret_xmlChar_ptr(ret_val);
21193 des_const_xmlNode_ptr(n_node, (const xmlNode *)node, 0);
21194 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
21195 xmlResetLastError();
21196 if (mem_base != xmlMemBlocks()) {
21197 printf("Leak of %d blocks found in xmlGetProp",
21198 xmlMemBlocks() - mem_base);
21200 printf(" %d", n_node);
21201 printf(" %d", n_name);
21213 test_xmlHasNsProp(void) {
21217 xmlAttrPtr ret_val;
21218 xmlNode * node; /* the node */
21220 xmlChar * name; /* the attribute name */
21222 xmlChar * nameSpace; /* the URI of the namespace */
21225 for (n_node = 0;n_node < gen_nb_const_xmlNode_ptr;n_node++) {
21226 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
21227 for (n_nameSpace = 0;n_nameSpace < gen_nb_const_xmlChar_ptr;n_nameSpace++) {
21228 mem_base = xmlMemBlocks();
21229 node = gen_const_xmlNode_ptr(n_node, 0);
21230 name = gen_const_xmlChar_ptr(n_name, 1);
21231 nameSpace = gen_const_xmlChar_ptr(n_nameSpace, 2);
21233 ret_val = xmlHasNsProp((const xmlNode *)node, (const xmlChar *)name, (const xmlChar *)nameSpace);
21234 desret_xmlAttrPtr(ret_val);
21236 des_const_xmlNode_ptr(n_node, (const xmlNode *)node, 0);
21237 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
21238 des_const_xmlChar_ptr(n_nameSpace, (const xmlChar *)nameSpace, 2);
21239 xmlResetLastError();
21240 if (mem_base != xmlMemBlocks()) {
21241 printf("Leak of %d blocks found in xmlHasNsProp",
21242 xmlMemBlocks() - mem_base);
21244 printf(" %d", n_node);
21245 printf(" %d", n_name);
21246 printf(" %d", n_nameSpace);
21259 test_xmlHasProp(void) {
21263 xmlAttrPtr ret_val;
21264 xmlNode * node; /* the node */
21266 xmlChar * name; /* the attribute name */
21269 for (n_node = 0;n_node < gen_nb_const_xmlNode_ptr;n_node++) {
21270 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
21271 mem_base = xmlMemBlocks();
21272 node = gen_const_xmlNode_ptr(n_node, 0);
21273 name = gen_const_xmlChar_ptr(n_name, 1);
21275 ret_val = xmlHasProp((const xmlNode *)node, (const xmlChar *)name);
21276 desret_xmlAttrPtr(ret_val);
21278 des_const_xmlNode_ptr(n_node, (const xmlNode *)node, 0);
21279 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
21280 xmlResetLastError();
21281 if (mem_base != xmlMemBlocks()) {
21282 printf("Leak of %d blocks found in xmlHasProp",
21283 xmlMemBlocks() - mem_base);
21285 printf(" %d", n_node);
21286 printf(" %d", n_name);
21298 test_xmlIsBlankNode(void) {
21303 xmlNode * node; /* the node */
21306 for (n_node = 0;n_node < gen_nb_const_xmlNode_ptr;n_node++) {
21307 mem_base = xmlMemBlocks();
21308 node = gen_const_xmlNode_ptr(n_node, 0);
21310 ret_val = xmlIsBlankNode((const xmlNode *)node);
21311 desret_int(ret_val);
21313 des_const_xmlNode_ptr(n_node, (const xmlNode *)node, 0);
21314 xmlResetLastError();
21315 if (mem_base != xmlMemBlocks()) {
21316 printf("Leak of %d blocks found in xmlIsBlankNode",
21317 xmlMemBlocks() - mem_base);
21319 printf(" %d", n_node);
21330 test_xmlIsXHTML(void) {
21335 xmlChar * systemID; /* the system identifier */
21337 xmlChar * publicID; /* the public identifier */
21340 for (n_systemID = 0;n_systemID < gen_nb_const_xmlChar_ptr;n_systemID++) {
21341 for (n_publicID = 0;n_publicID < gen_nb_const_xmlChar_ptr;n_publicID++) {
21342 mem_base = xmlMemBlocks();
21343 systemID = gen_const_xmlChar_ptr(n_systemID, 0);
21344 publicID = gen_const_xmlChar_ptr(n_publicID, 1);
21346 ret_val = xmlIsXHTML((const xmlChar *)systemID, (const xmlChar *)publicID);
21347 desret_int(ret_val);
21349 des_const_xmlChar_ptr(n_systemID, (const xmlChar *)systemID, 0);
21350 des_const_xmlChar_ptr(n_publicID, (const xmlChar *)publicID, 1);
21351 xmlResetLastError();
21352 if (mem_base != xmlMemBlocks()) {
21353 printf("Leak of %d blocks found in xmlIsXHTML",
21354 xmlMemBlocks() - mem_base);
21356 printf(" %d", n_systemID);
21357 printf(" %d", n_publicID);
21369 test_xmlLastElementChild(void) {
21372 #if defined(LIBXML_TREE_ENABLED)
21374 xmlNodePtr ret_val;
21375 xmlNodePtr parent; /* the parent node */
21378 for (n_parent = 0;n_parent < gen_nb_xmlNodePtr;n_parent++) {
21379 mem_base = xmlMemBlocks();
21380 parent = gen_xmlNodePtr(n_parent, 0);
21382 ret_val = xmlLastElementChild(parent);
21383 desret_xmlNodePtr(ret_val);
21385 des_xmlNodePtr(n_parent, parent, 0);
21386 xmlResetLastError();
21387 if (mem_base != xmlMemBlocks()) {
21388 printf("Leak of %d blocks found in xmlLastElementChild",
21389 xmlMemBlocks() - mem_base);
21391 printf(" %d", n_parent);
21403 test_xmlNewCDataBlock(void) {
21407 xmlNodePtr ret_val;
21408 xmlDocPtr doc; /* the document */
21410 xmlChar * content; /* the CDATA block content content */
21412 int len; /* the length of the block */
21415 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
21416 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
21417 for (n_len = 0;n_len < gen_nb_int;n_len++) {
21418 mem_base = xmlMemBlocks();
21419 doc = gen_xmlDocPtr(n_doc, 0);
21420 content = gen_const_xmlChar_ptr(n_content, 1);
21421 len = gen_int(n_len, 2);
21423 ret_val = xmlNewCDataBlock(doc, (const xmlChar *)content, len);
21424 desret_xmlNodePtr(ret_val);
21426 des_xmlDocPtr(n_doc, doc, 0);
21427 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
21428 des_int(n_len, len, 2);
21429 xmlResetLastError();
21430 if (mem_base != xmlMemBlocks()) {
21431 printf("Leak of %d blocks found in xmlNewCDataBlock",
21432 xmlMemBlocks() - mem_base);
21434 printf(" %d", n_doc);
21435 printf(" %d", n_content);
21436 printf(" %d", n_len);
21449 test_xmlNewCharRef(void) {
21453 xmlNodePtr ret_val;
21454 xmlDocPtr doc; /* the document */
21456 xmlChar * name; /* the char ref string, starting with # or "&# ... ;" */
21459 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
21460 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
21461 mem_base = xmlMemBlocks();
21462 doc = gen_xmlDocPtr(n_doc, 0);
21463 name = gen_const_xmlChar_ptr(n_name, 1);
21465 ret_val = xmlNewCharRef(doc, (const xmlChar *)name);
21466 desret_xmlNodePtr(ret_val);
21468 des_xmlDocPtr(n_doc, doc, 0);
21469 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
21470 xmlResetLastError();
21471 if (mem_base != xmlMemBlocks()) {
21472 printf("Leak of %d blocks found in xmlNewCharRef",
21473 xmlMemBlocks() - mem_base);
21475 printf(" %d", n_doc);
21476 printf(" %d", n_name);
21488 test_xmlNewChild(void) {
21491 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
21492 #ifdef LIBXML_TREE_ENABLED
21494 xmlNodePtr ret_val;
21495 xmlNodePtr parent; /* the parent node */
21497 xmlNsPtr ns; /* a namespace if any */
21499 xmlChar * name; /* the name of the child */
21501 xmlChar * content; /* the XML content of the child if any. */
21504 for (n_parent = 0;n_parent < gen_nb_xmlNodePtr;n_parent++) {
21505 for (n_ns = 0;n_ns < gen_nb_xmlNsPtr;n_ns++) {
21506 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
21507 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
21508 mem_base = xmlMemBlocks();
21509 parent = gen_xmlNodePtr(n_parent, 0);
21510 ns = gen_xmlNsPtr(n_ns, 1);
21511 name = gen_const_xmlChar_ptr(n_name, 2);
21512 content = gen_const_xmlChar_ptr(n_content, 3);
21514 ret_val = xmlNewChild(parent, ns, (const xmlChar *)name, (const xmlChar *)content);
21515 desret_xmlNodePtr(ret_val);
21517 des_xmlNodePtr(n_parent, parent, 0);
21518 des_xmlNsPtr(n_ns, ns, 1);
21519 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
21520 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 3);
21521 xmlResetLastError();
21522 if (mem_base != xmlMemBlocks()) {
21523 printf("Leak of %d blocks found in xmlNewChild",
21524 xmlMemBlocks() - mem_base);
21526 printf(" %d", n_parent);
21527 printf(" %d", n_ns);
21528 printf(" %d", n_name);
21529 printf(" %d", n_content);
21545 test_xmlNewComment(void) {
21549 xmlNodePtr ret_val;
21550 xmlChar * content; /* the comment content */
21553 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
21554 mem_base = xmlMemBlocks();
21555 content = gen_const_xmlChar_ptr(n_content, 0);
21557 ret_val = xmlNewComment((const xmlChar *)content);
21558 desret_xmlNodePtr(ret_val);
21560 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 0);
21561 xmlResetLastError();
21562 if (mem_base != xmlMemBlocks()) {
21563 printf("Leak of %d blocks found in xmlNewComment",
21564 xmlMemBlocks() - mem_base);
21566 printf(" %d", n_content);
21577 test_xmlNewDoc(void) {
21582 xmlChar * version; /* xmlChar string giving the version of XML "1.0" */
21585 for (n_version = 0;n_version < gen_nb_const_xmlChar_ptr;n_version++) {
21586 mem_base = xmlMemBlocks();
21587 version = gen_const_xmlChar_ptr(n_version, 0);
21589 ret_val = xmlNewDoc((const xmlChar *)version);
21590 desret_xmlDocPtr(ret_val);
21592 des_const_xmlChar_ptr(n_version, (const xmlChar *)version, 0);
21593 xmlResetLastError();
21594 if (mem_base != xmlMemBlocks()) {
21595 printf("Leak of %d blocks found in xmlNewDoc",
21596 xmlMemBlocks() - mem_base);
21598 printf(" %d", n_version);
21609 test_xmlNewDocComment(void) {
21613 xmlNodePtr ret_val;
21614 xmlDocPtr doc; /* the document */
21616 xmlChar * content; /* the comment content */
21619 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
21620 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
21621 mem_base = xmlMemBlocks();
21622 doc = gen_xmlDocPtr(n_doc, 0);
21623 content = gen_const_xmlChar_ptr(n_content, 1);
21625 ret_val = xmlNewDocComment(doc, (const xmlChar *)content);
21626 desret_xmlNodePtr(ret_val);
21628 des_xmlDocPtr(n_doc, doc, 0);
21629 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
21630 xmlResetLastError();
21631 if (mem_base != xmlMemBlocks()) {
21632 printf("Leak of %d blocks found in xmlNewDocComment",
21633 xmlMemBlocks() - mem_base);
21635 printf(" %d", n_doc);
21636 printf(" %d", n_content);
21648 test_xmlNewDocFragment(void) {
21651 #if defined(LIBXML_TREE_ENABLED)
21653 xmlNodePtr ret_val;
21654 xmlDocPtr doc; /* the document owning the fragment */
21657 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
21658 mem_base = xmlMemBlocks();
21659 doc = gen_xmlDocPtr(n_doc, 0);
21661 ret_val = xmlNewDocFragment(doc);
21662 desret_xmlNodePtr(ret_val);
21664 des_xmlDocPtr(n_doc, doc, 0);
21665 xmlResetLastError();
21666 if (mem_base != xmlMemBlocks()) {
21667 printf("Leak of %d blocks found in xmlNewDocFragment",
21668 xmlMemBlocks() - mem_base);
21670 printf(" %d", n_doc);
21682 test_xmlNewDocNode(void) {
21686 xmlNodePtr ret_val;
21687 xmlDocPtr doc; /* the document */
21689 xmlNsPtr ns; /* namespace if any */
21691 xmlChar * name; /* the node name */
21693 xmlChar * content; /* the XML text content if any */
21696 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
21697 for (n_ns = 0;n_ns < gen_nb_xmlNsPtr;n_ns++) {
21698 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
21699 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
21700 mem_base = xmlMemBlocks();
21701 doc = gen_xmlDocPtr(n_doc, 0);
21702 ns = gen_xmlNsPtr(n_ns, 1);
21703 name = gen_const_xmlChar_ptr(n_name, 2);
21704 content = gen_const_xmlChar_ptr(n_content, 3);
21706 ret_val = xmlNewDocNode(doc, ns, (const xmlChar *)name, (const xmlChar *)content);
21707 desret_xmlNodePtr(ret_val);
21709 des_xmlDocPtr(n_doc, doc, 0);
21710 des_xmlNsPtr(n_ns, ns, 1);
21711 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
21712 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 3);
21713 xmlResetLastError();
21714 if (mem_base != xmlMemBlocks()) {
21715 printf("Leak of %d blocks found in xmlNewDocNode",
21716 xmlMemBlocks() - mem_base);
21718 printf(" %d", n_doc);
21719 printf(" %d", n_ns);
21720 printf(" %d", n_name);
21721 printf(" %d", n_content);
21735 test_xmlNewDocNodeEatName(void) {
21739 xmlNodePtr ret_val;
21740 xmlDocPtr doc; /* the document */
21742 xmlNsPtr ns; /* namespace if any */
21744 xmlChar * name; /* the node name */
21746 xmlChar * content; /* the XML text content if any */
21749 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
21750 for (n_ns = 0;n_ns < gen_nb_xmlNsPtr;n_ns++) {
21751 for (n_name = 0;n_name < gen_nb_eaten_name;n_name++) {
21752 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
21753 mem_base = xmlMemBlocks();
21754 doc = gen_xmlDocPtr(n_doc, 0);
21755 ns = gen_xmlNsPtr(n_ns, 1);
21756 name = gen_eaten_name(n_name, 2);
21757 content = gen_const_xmlChar_ptr(n_content, 3);
21759 ret_val = xmlNewDocNodeEatName(doc, ns, name, (const xmlChar *)content);
21760 desret_xmlNodePtr(ret_val);
21762 des_xmlDocPtr(n_doc, doc, 0);
21763 des_xmlNsPtr(n_ns, ns, 1);
21764 des_eaten_name(n_name, name, 2);
21765 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 3);
21766 xmlResetLastError();
21767 if (mem_base != xmlMemBlocks()) {
21768 printf("Leak of %d blocks found in xmlNewDocNodeEatName",
21769 xmlMemBlocks() - mem_base);
21771 printf(" %d", n_doc);
21772 printf(" %d", n_ns);
21773 printf(" %d", n_name);
21774 printf(" %d", n_content);
21788 test_xmlNewDocPI(void) {
21792 xmlNodePtr ret_val;
21793 xmlDocPtr doc; /* the target document */
21795 xmlChar * name; /* the processing instruction name */
21797 xmlChar * content; /* the PI content */
21800 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
21801 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
21802 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
21803 mem_base = xmlMemBlocks();
21804 doc = gen_xmlDocPtr(n_doc, 0);
21805 name = gen_const_xmlChar_ptr(n_name, 1);
21806 content = gen_const_xmlChar_ptr(n_content, 2);
21808 ret_val = xmlNewDocPI(doc, (const xmlChar *)name, (const xmlChar *)content);
21809 desret_xmlNodePtr(ret_val);
21811 des_xmlDocPtr(n_doc, doc, 0);
21812 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
21813 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 2);
21814 xmlResetLastError();
21815 if (mem_base != xmlMemBlocks()) {
21816 printf("Leak of %d blocks found in xmlNewDocPI",
21817 xmlMemBlocks() - mem_base);
21819 printf(" %d", n_doc);
21820 printf(" %d", n_name);
21821 printf(" %d", n_content);
21834 test_xmlNewDocProp(void) {
21838 xmlAttrPtr ret_val;
21839 xmlDocPtr doc; /* the document */
21841 xmlChar * name; /* the name of the attribute */
21843 xmlChar * value; /* the value of the attribute */
21846 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
21847 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
21848 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
21849 mem_base = xmlMemBlocks();
21850 doc = gen_xmlDocPtr(n_doc, 0);
21851 name = gen_const_xmlChar_ptr(n_name, 1);
21852 value = gen_const_xmlChar_ptr(n_value, 2);
21854 ret_val = xmlNewDocProp(doc, (const xmlChar *)name, (const xmlChar *)value);
21855 desret_xmlAttrPtr(ret_val);
21857 des_xmlDocPtr(n_doc, doc, 0);
21858 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
21859 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 2);
21860 xmlResetLastError();
21861 if (mem_base != xmlMemBlocks()) {
21862 printf("Leak of %d blocks found in xmlNewDocProp",
21863 xmlMemBlocks() - mem_base);
21865 printf(" %d", n_doc);
21866 printf(" %d", n_name);
21867 printf(" %d", n_value);
21880 test_xmlNewDocRawNode(void) {
21883 #if defined(LIBXML_TREE_ENABLED)
21884 #ifdef LIBXML_TREE_ENABLED
21886 xmlNodePtr ret_val;
21887 xmlDocPtr doc; /* the document */
21889 xmlNsPtr ns; /* namespace if any */
21891 xmlChar * name; /* the node name */
21893 xmlChar * content; /* the text content if any */
21896 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
21897 for (n_ns = 0;n_ns < gen_nb_xmlNsPtr;n_ns++) {
21898 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
21899 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
21900 mem_base = xmlMemBlocks();
21901 doc = gen_xmlDocPtr(n_doc, 0);
21902 ns = gen_xmlNsPtr(n_ns, 1);
21903 name = gen_const_xmlChar_ptr(n_name, 2);
21904 content = gen_const_xmlChar_ptr(n_content, 3);
21906 ret_val = xmlNewDocRawNode(doc, ns, (const xmlChar *)name, (const xmlChar *)content);
21907 desret_xmlNodePtr(ret_val);
21909 des_xmlDocPtr(n_doc, doc, 0);
21910 des_xmlNsPtr(n_ns, ns, 1);
21911 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
21912 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 3);
21913 xmlResetLastError();
21914 if (mem_base != xmlMemBlocks()) {
21915 printf("Leak of %d blocks found in xmlNewDocRawNode",
21916 xmlMemBlocks() - mem_base);
21918 printf(" %d", n_doc);
21919 printf(" %d", n_ns);
21920 printf(" %d", n_name);
21921 printf(" %d", n_content);
21937 test_xmlNewDocText(void) {
21941 xmlNodePtr ret_val;
21942 xmlDoc * doc; /* the document */
21944 xmlChar * content; /* the text content */
21947 for (n_doc = 0;n_doc < gen_nb_const_xmlDoc_ptr;n_doc++) {
21948 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
21949 mem_base = xmlMemBlocks();
21950 doc = gen_const_xmlDoc_ptr(n_doc, 0);
21951 content = gen_const_xmlChar_ptr(n_content, 1);
21953 ret_val = xmlNewDocText((const xmlDoc *)doc, (const xmlChar *)content);
21954 desret_xmlNodePtr(ret_val);
21956 des_const_xmlDoc_ptr(n_doc, (const xmlDoc *)doc, 0);
21957 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
21958 xmlResetLastError();
21959 if (mem_base != xmlMemBlocks()) {
21960 printf("Leak of %d blocks found in xmlNewDocText",
21961 xmlMemBlocks() - mem_base);
21963 printf(" %d", n_doc);
21964 printf(" %d", n_content);
21976 test_xmlNewDocTextLen(void) {
21980 xmlNodePtr ret_val;
21981 xmlDocPtr doc; /* the document */
21983 xmlChar * content; /* the text content */
21985 int len; /* the text len. */
21988 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
21989 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
21990 for (n_len = 0;n_len < gen_nb_int;n_len++) {
21991 mem_base = xmlMemBlocks();
21992 doc = gen_xmlDocPtr(n_doc, 0);
21993 content = gen_const_xmlChar_ptr(n_content, 1);
21994 len = gen_int(n_len, 2);
21996 ret_val = xmlNewDocTextLen(doc, (const xmlChar *)content, len);
21997 desret_xmlNodePtr(ret_val);
21999 des_xmlDocPtr(n_doc, doc, 0);
22000 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
22001 des_int(n_len, len, 2);
22002 xmlResetLastError();
22003 if (mem_base != xmlMemBlocks()) {
22004 printf("Leak of %d blocks found in xmlNewDocTextLen",
22005 xmlMemBlocks() - mem_base);
22007 printf(" %d", n_doc);
22008 printf(" %d", n_content);
22009 printf(" %d", n_len);
22022 test_xmlNewDtd(void) {
22027 xmlDocPtr doc; /* the document pointer */
22029 xmlChar * name; /* the DTD name */
22031 xmlChar * ExternalID; /* the external ID */
22033 xmlChar * SystemID; /* the system ID */
22036 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
22037 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
22038 for (n_ExternalID = 0;n_ExternalID < gen_nb_const_xmlChar_ptr;n_ExternalID++) {
22039 for (n_SystemID = 0;n_SystemID < gen_nb_const_xmlChar_ptr;n_SystemID++) {
22040 mem_base = xmlMemBlocks();
22041 doc = gen_xmlDocPtr(n_doc, 0);
22042 name = gen_const_xmlChar_ptr(n_name, 1);
22043 ExternalID = gen_const_xmlChar_ptr(n_ExternalID, 2);
22044 SystemID = gen_const_xmlChar_ptr(n_SystemID, 3);
22046 ret_val = xmlNewDtd(doc, (const xmlChar *)name, (const xmlChar *)ExternalID, (const xmlChar *)SystemID);
22047 desret_xmlDtdPtr(ret_val);
22049 des_xmlDocPtr(n_doc, doc, 0);
22050 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
22051 des_const_xmlChar_ptr(n_ExternalID, (const xmlChar *)ExternalID, 2);
22052 des_const_xmlChar_ptr(n_SystemID, (const xmlChar *)SystemID, 3);
22053 xmlResetLastError();
22054 if (mem_base != xmlMemBlocks()) {
22055 printf("Leak of %d blocks found in xmlNewDtd",
22056 xmlMemBlocks() - mem_base);
22058 printf(" %d", n_doc);
22059 printf(" %d", n_name);
22060 printf(" %d", n_ExternalID);
22061 printf(" %d", n_SystemID);
22075 test_xmlNewNode(void) {
22079 xmlNodePtr ret_val;
22080 xmlNsPtr ns; /* namespace if any */
22082 xmlChar * name; /* the node name */
22085 for (n_ns = 0;n_ns < gen_nb_xmlNsPtr;n_ns++) {
22086 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
22087 mem_base = xmlMemBlocks();
22088 ns = gen_xmlNsPtr(n_ns, 0);
22089 name = gen_const_xmlChar_ptr(n_name, 1);
22091 ret_val = xmlNewNode(ns, (const xmlChar *)name);
22092 desret_xmlNodePtr(ret_val);
22094 des_xmlNsPtr(n_ns, ns, 0);
22095 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
22096 xmlResetLastError();
22097 if (mem_base != xmlMemBlocks()) {
22098 printf("Leak of %d blocks found in xmlNewNode",
22099 xmlMemBlocks() - mem_base);
22101 printf(" %d", n_ns);
22102 printf(" %d", n_name);
22114 test_xmlNewNodeEatName(void) {
22118 xmlNodePtr ret_val;
22119 xmlNsPtr ns; /* namespace if any */
22121 xmlChar * name; /* the node name */
22124 for (n_ns = 0;n_ns < gen_nb_xmlNsPtr;n_ns++) {
22125 for (n_name = 0;n_name < gen_nb_eaten_name;n_name++) {
22126 mem_base = xmlMemBlocks();
22127 ns = gen_xmlNsPtr(n_ns, 0);
22128 name = gen_eaten_name(n_name, 1);
22130 ret_val = xmlNewNodeEatName(ns, name);
22131 desret_xmlNodePtr(ret_val);
22133 des_xmlNsPtr(n_ns, ns, 0);
22134 des_eaten_name(n_name, name, 1);
22135 xmlResetLastError();
22136 if (mem_base != xmlMemBlocks()) {
22137 printf("Leak of %d blocks found in xmlNewNodeEatName",
22138 xmlMemBlocks() - mem_base);
22140 printf(" %d", n_ns);
22141 printf(" %d", n_name);
22153 test_xmlNewNs(void) {
22158 xmlNodePtr node; /* the element carrying the namespace */
22160 xmlChar * href; /* the URI associated */
22162 xmlChar * prefix; /* the prefix for the namespace */
22165 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
22166 for (n_href = 0;n_href < gen_nb_const_xmlChar_ptr;n_href++) {
22167 for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
22168 mem_base = xmlMemBlocks();
22169 node = gen_xmlNodePtr(n_node, 0);
22170 href = gen_const_xmlChar_ptr(n_href, 1);
22171 prefix = gen_const_xmlChar_ptr(n_prefix, 2);
22173 ret_val = xmlNewNs(node, (const xmlChar *)href, (const xmlChar *)prefix);
22174 if ((node == NULL) && (ret_val != NULL)) xmlFreeNs(ret_val);
22175 desret_xmlNsPtr(ret_val);
22177 des_xmlNodePtr(n_node, node, 0);
22178 des_const_xmlChar_ptr(n_href, (const xmlChar *)href, 1);
22179 des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 2);
22180 xmlResetLastError();
22181 if (mem_base != xmlMemBlocks()) {
22182 printf("Leak of %d blocks found in xmlNewNs",
22183 xmlMemBlocks() - mem_base);
22185 printf(" %d", n_node);
22186 printf(" %d", n_href);
22187 printf(" %d", n_prefix);
22200 test_xmlNewNsProp(void) {
22204 xmlAttrPtr ret_val;
22205 xmlNodePtr node; /* the holding node */
22207 xmlNsPtr ns; /* the namespace */
22209 xmlChar * name; /* the name of the attribute */
22211 xmlChar * value; /* the value of the attribute */
22214 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
22215 for (n_ns = 0;n_ns < gen_nb_xmlNsPtr;n_ns++) {
22216 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
22217 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
22218 mem_base = xmlMemBlocks();
22219 node = gen_xmlNodePtr(n_node, 0);
22220 ns = gen_xmlNsPtr(n_ns, 1);
22221 name = gen_const_xmlChar_ptr(n_name, 2);
22222 value = gen_const_xmlChar_ptr(n_value, 3);
22224 ret_val = xmlNewNsProp(node, ns, (const xmlChar *)name, (const xmlChar *)value);
22225 desret_xmlAttrPtr(ret_val);
22227 des_xmlNodePtr(n_node, node, 0);
22228 des_xmlNsPtr(n_ns, ns, 1);
22229 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
22230 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 3);
22231 xmlResetLastError();
22232 if (mem_base != xmlMemBlocks()) {
22233 printf("Leak of %d blocks found in xmlNewNsProp",
22234 xmlMemBlocks() - mem_base);
22236 printf(" %d", n_node);
22237 printf(" %d", n_ns);
22238 printf(" %d", n_name);
22239 printf(" %d", n_value);
22253 test_xmlNewNsPropEatName(void) {
22257 xmlAttrPtr ret_val;
22258 xmlNodePtr node; /* the holding node */
22260 xmlNsPtr ns; /* the namespace */
22262 xmlChar * name; /* the name of the attribute */
22264 xmlChar * value; /* the value of the attribute */
22267 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
22268 for (n_ns = 0;n_ns < gen_nb_xmlNsPtr;n_ns++) {
22269 for (n_name = 0;n_name < gen_nb_eaten_name;n_name++) {
22270 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
22271 mem_base = xmlMemBlocks();
22272 node = gen_xmlNodePtr(n_node, 0);
22273 ns = gen_xmlNsPtr(n_ns, 1);
22274 name = gen_eaten_name(n_name, 2);
22275 value = gen_const_xmlChar_ptr(n_value, 3);
22277 ret_val = xmlNewNsPropEatName(node, ns, name, (const xmlChar *)value);
22278 desret_xmlAttrPtr(ret_val);
22280 des_xmlNodePtr(n_node, node, 0);
22281 des_xmlNsPtr(n_ns, ns, 1);
22282 des_eaten_name(n_name, name, 2);
22283 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 3);
22284 xmlResetLastError();
22285 if (mem_base != xmlMemBlocks()) {
22286 printf("Leak of %d blocks found in xmlNewNsPropEatName",
22287 xmlMemBlocks() - mem_base);
22289 printf(" %d", n_node);
22290 printf(" %d", n_ns);
22291 printf(" %d", n_name);
22292 printf(" %d", n_value);
22306 test_xmlNewPI(void) {
22310 xmlNodePtr ret_val;
22311 xmlChar * name; /* the processing instruction name */
22313 xmlChar * content; /* the PI content */
22316 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
22317 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
22318 mem_base = xmlMemBlocks();
22319 name = gen_const_xmlChar_ptr(n_name, 0);
22320 content = gen_const_xmlChar_ptr(n_content, 1);
22322 ret_val = xmlNewPI((const xmlChar *)name, (const xmlChar *)content);
22323 desret_xmlNodePtr(ret_val);
22325 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 0);
22326 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
22327 xmlResetLastError();
22328 if (mem_base != xmlMemBlocks()) {
22329 printf("Leak of %d blocks found in xmlNewPI",
22330 xmlMemBlocks() - mem_base);
22332 printf(" %d", n_name);
22333 printf(" %d", n_content);
22345 test_xmlNewProp(void) {
22348 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
22349 #ifdef LIBXML_TREE_ENABLED
22351 xmlAttrPtr ret_val;
22352 xmlNodePtr node; /* the holding node */
22354 xmlChar * name; /* the name of the attribute */
22356 xmlChar * value; /* the value of the attribute */
22359 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
22360 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
22361 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
22362 mem_base = xmlMemBlocks();
22363 node = gen_xmlNodePtr(n_node, 0);
22364 name = gen_const_xmlChar_ptr(n_name, 1);
22365 value = gen_const_xmlChar_ptr(n_value, 2);
22367 ret_val = xmlNewProp(node, (const xmlChar *)name, (const xmlChar *)value);
22368 desret_xmlAttrPtr(ret_val);
22370 des_xmlNodePtr(n_node, node, 0);
22371 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
22372 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 2);
22373 xmlResetLastError();
22374 if (mem_base != xmlMemBlocks()) {
22375 printf("Leak of %d blocks found in xmlNewProp",
22376 xmlMemBlocks() - mem_base);
22378 printf(" %d", n_node);
22379 printf(" %d", n_name);
22380 printf(" %d", n_value);
22395 test_xmlNewReference(void) {
22399 xmlNodePtr ret_val;
22400 xmlDoc * doc; /* the document */
22402 xmlChar * name; /* the reference name, or the reference string with & and ; */
22405 for (n_doc = 0;n_doc < gen_nb_const_xmlDoc_ptr;n_doc++) {
22406 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
22407 mem_base = xmlMemBlocks();
22408 doc = gen_const_xmlDoc_ptr(n_doc, 0);
22409 name = gen_const_xmlChar_ptr(n_name, 1);
22411 ret_val = xmlNewReference((const xmlDoc *)doc, (const xmlChar *)name);
22412 desret_xmlNodePtr(ret_val);
22414 des_const_xmlDoc_ptr(n_doc, (const xmlDoc *)doc, 0);
22415 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
22416 xmlResetLastError();
22417 if (mem_base != xmlMemBlocks()) {
22418 printf("Leak of %d blocks found in xmlNewReference",
22419 xmlMemBlocks() - mem_base);
22421 printf(" %d", n_doc);
22422 printf(" %d", n_name);
22434 test_xmlNewText(void) {
22438 xmlNodePtr ret_val;
22439 xmlChar * content; /* the text content */
22442 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
22443 mem_base = xmlMemBlocks();
22444 content = gen_const_xmlChar_ptr(n_content, 0);
22446 ret_val = xmlNewText((const xmlChar *)content);
22447 desret_xmlNodePtr(ret_val);
22449 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 0);
22450 xmlResetLastError();
22451 if (mem_base != xmlMemBlocks()) {
22452 printf("Leak of %d blocks found in xmlNewText",
22453 xmlMemBlocks() - mem_base);
22455 printf(" %d", n_content);
22466 test_xmlNewTextChild(void) {
22469 #if defined(LIBXML_TREE_ENABLED)
22470 #ifdef LIBXML_TREE_ENABLED
22472 xmlNodePtr ret_val;
22473 xmlNodePtr parent; /* the parent node */
22475 xmlNsPtr ns; /* a namespace if any */
22477 xmlChar * name; /* the name of the child */
22479 xmlChar * content; /* the text content of the child if any. */
22482 for (n_parent = 0;n_parent < gen_nb_xmlNodePtr;n_parent++) {
22483 for (n_ns = 0;n_ns < gen_nb_xmlNsPtr;n_ns++) {
22484 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
22485 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
22486 mem_base = xmlMemBlocks();
22487 parent = gen_xmlNodePtr(n_parent, 0);
22488 ns = gen_xmlNsPtr(n_ns, 1);
22489 name = gen_const_xmlChar_ptr(n_name, 2);
22490 content = gen_const_xmlChar_ptr(n_content, 3);
22492 ret_val = xmlNewTextChild(parent, ns, (const xmlChar *)name, (const xmlChar *)content);
22493 desret_xmlNodePtr(ret_val);
22495 des_xmlNodePtr(n_parent, parent, 0);
22496 des_xmlNsPtr(n_ns, ns, 1);
22497 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
22498 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 3);
22499 xmlResetLastError();
22500 if (mem_base != xmlMemBlocks()) {
22501 printf("Leak of %d blocks found in xmlNewTextChild",
22502 xmlMemBlocks() - mem_base);
22504 printf(" %d", n_parent);
22505 printf(" %d", n_ns);
22506 printf(" %d", n_name);
22507 printf(" %d", n_content);
22523 test_xmlNewTextLen(void) {
22527 xmlNodePtr ret_val;
22528 xmlChar * content; /* the text content */
22530 int len; /* the text len. */
22533 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
22534 for (n_len = 0;n_len < gen_nb_int;n_len++) {
22535 mem_base = xmlMemBlocks();
22536 content = gen_const_xmlChar_ptr(n_content, 0);
22537 len = gen_int(n_len, 1);
22539 ret_val = xmlNewTextLen((const xmlChar *)content, len);
22540 desret_xmlNodePtr(ret_val);
22542 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 0);
22543 des_int(n_len, len, 1);
22544 xmlResetLastError();
22545 if (mem_base != xmlMemBlocks()) {
22546 printf("Leak of %d blocks found in xmlNewTextLen",
22547 xmlMemBlocks() - mem_base);
22549 printf(" %d", n_content);
22550 printf(" %d", n_len);
22562 test_xmlNextElementSibling(void) {
22565 #if defined(LIBXML_TREE_ENABLED)
22567 xmlNodePtr ret_val;
22568 xmlNodePtr node; /* the current node */
22571 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
22572 mem_base = xmlMemBlocks();
22573 node = gen_xmlNodePtr(n_node, 0);
22575 ret_val = xmlNextElementSibling(node);
22576 desret_xmlNodePtr(ret_val);
22578 des_xmlNodePtr(n_node, node, 0);
22579 xmlResetLastError();
22580 if (mem_base != xmlMemBlocks()) {
22581 printf("Leak of %d blocks found in xmlNextElementSibling",
22582 xmlMemBlocks() - mem_base);
22584 printf(" %d", n_node);
22596 test_xmlNodeAddContent(void) {
22600 xmlNodePtr cur; /* the node being modified */
22602 xmlChar * content; /* extra content */
22605 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
22606 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
22607 mem_base = xmlMemBlocks();
22608 cur = gen_xmlNodePtr(n_cur, 0);
22609 content = gen_const_xmlChar_ptr(n_content, 1);
22611 xmlNodeAddContent(cur, (const xmlChar *)content);
22613 des_xmlNodePtr(n_cur, cur, 0);
22614 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
22615 xmlResetLastError();
22616 if (mem_base != xmlMemBlocks()) {
22617 printf("Leak of %d blocks found in xmlNodeAddContent",
22618 xmlMemBlocks() - mem_base);
22620 printf(" %d", n_cur);
22621 printf(" %d", n_content);
22633 test_xmlNodeAddContentLen(void) {
22637 xmlNodePtr cur; /* the node being modified */
22639 xmlChar * content; /* extra content */
22641 int len; /* the size of @content */
22644 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
22645 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
22646 for (n_len = 0;n_len < gen_nb_int;n_len++) {
22647 mem_base = xmlMemBlocks();
22648 cur = gen_xmlNodePtr(n_cur, 0);
22649 content = gen_const_xmlChar_ptr(n_content, 1);
22650 len = gen_int(n_len, 2);
22652 xmlNodeAddContentLen(cur, (const xmlChar *)content, len);
22654 des_xmlNodePtr(n_cur, cur, 0);
22655 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
22656 des_int(n_len, len, 2);
22657 xmlResetLastError();
22658 if (mem_base != xmlMemBlocks()) {
22659 printf("Leak of %d blocks found in xmlNodeAddContentLen",
22660 xmlMemBlocks() - mem_base);
22662 printf(" %d", n_cur);
22663 printf(" %d", n_content);
22664 printf(" %d", n_len);
22677 test_xmlNodeBufGetContent(void) {
22682 xmlBufferPtr buffer; /* a buffer */
22684 xmlNode * cur; /* the node being read */
22687 for (n_buffer = 0;n_buffer < gen_nb_xmlBufferPtr;n_buffer++) {
22688 for (n_cur = 0;n_cur < gen_nb_const_xmlNode_ptr;n_cur++) {
22689 mem_base = xmlMemBlocks();
22690 buffer = gen_xmlBufferPtr(n_buffer, 0);
22691 cur = gen_const_xmlNode_ptr(n_cur, 1);
22693 ret_val = xmlNodeBufGetContent(buffer, (const xmlNode *)cur);
22694 desret_int(ret_val);
22696 des_xmlBufferPtr(n_buffer, buffer, 0);
22697 des_const_xmlNode_ptr(n_cur, (const xmlNode *)cur, 1);
22698 xmlResetLastError();
22699 if (mem_base != xmlMemBlocks()) {
22700 printf("Leak of %d blocks found in xmlNodeBufGetContent",
22701 xmlMemBlocks() - mem_base);
22703 printf(" %d", n_buffer);
22704 printf(" %d", n_cur);
22716 test_xmlNodeDump(void) {
22719 #if defined(LIBXML_OUTPUT_ENABLED)
22722 xmlBufferPtr buf; /* the XML buffer output */
22724 xmlDocPtr doc; /* the document */
22726 xmlNodePtr cur; /* the current node */
22728 int level; /* the imbrication level for indenting */
22730 int format; /* is formatting allowed */
22733 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
22734 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
22735 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
22736 for (n_level = 0;n_level < gen_nb_int;n_level++) {
22737 for (n_format = 0;n_format < gen_nb_int;n_format++) {
22738 mem_base = xmlMemBlocks();
22739 buf = gen_xmlBufferPtr(n_buf, 0);
22740 doc = gen_xmlDocPtr(n_doc, 1);
22741 cur = gen_xmlNodePtr(n_cur, 2);
22742 level = gen_int(n_level, 3);
22743 format = gen_int(n_format, 4);
22745 ret_val = xmlNodeDump(buf, doc, cur, level, format);
22746 desret_int(ret_val);
22748 des_xmlBufferPtr(n_buf, buf, 0);
22749 des_xmlDocPtr(n_doc, doc, 1);
22750 des_xmlNodePtr(n_cur, cur, 2);
22751 des_int(n_level, level, 3);
22752 des_int(n_format, format, 4);
22753 xmlResetLastError();
22754 if (mem_base != xmlMemBlocks()) {
22755 printf("Leak of %d blocks found in xmlNodeDump",
22756 xmlMemBlocks() - mem_base);
22758 printf(" %d", n_buf);
22759 printf(" %d", n_doc);
22760 printf(" %d", n_cur);
22761 printf(" %d", n_level);
22762 printf(" %d", n_format);
22778 test_xmlNodeDumpOutput(void) {
22781 #if defined(LIBXML_OUTPUT_ENABLED)
22783 xmlOutputBufferPtr buf; /* the XML buffer output */
22785 xmlDocPtr doc; /* the document */
22787 xmlNodePtr cur; /* the current node */
22789 int level; /* the imbrication level for indenting */
22791 int format; /* is formatting allowed */
22793 char * encoding; /* an optional encoding string */
22796 for (n_buf = 0;n_buf < gen_nb_xmlOutputBufferPtr;n_buf++) {
22797 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
22798 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
22799 for (n_level = 0;n_level < gen_nb_int;n_level++) {
22800 for (n_format = 0;n_format < gen_nb_int;n_format++) {
22801 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
22802 mem_base = xmlMemBlocks();
22803 buf = gen_xmlOutputBufferPtr(n_buf, 0);
22804 doc = gen_xmlDocPtr(n_doc, 1);
22805 cur = gen_xmlNodePtr(n_cur, 2);
22806 level = gen_int(n_level, 3);
22807 format = gen_int(n_format, 4);
22808 encoding = gen_const_char_ptr(n_encoding, 5);
22810 xmlNodeDumpOutput(buf, doc, cur, level, format, (const char *)encoding);
22812 des_xmlOutputBufferPtr(n_buf, buf, 0);
22813 des_xmlDocPtr(n_doc, doc, 1);
22814 des_xmlNodePtr(n_cur, cur, 2);
22815 des_int(n_level, level, 3);
22816 des_int(n_format, format, 4);
22817 des_const_char_ptr(n_encoding, (const char *)encoding, 5);
22818 xmlResetLastError();
22819 if (mem_base != xmlMemBlocks()) {
22820 printf("Leak of %d blocks found in xmlNodeDumpOutput",
22821 xmlMemBlocks() - mem_base);
22823 printf(" %d", n_buf);
22824 printf(" %d", n_doc);
22825 printf(" %d", n_cur);
22826 printf(" %d", n_level);
22827 printf(" %d", n_format);
22828 printf(" %d", n_encoding);
22845 test_xmlNodeGetBase(void) {
22850 xmlDoc * doc; /* the document the node pertains to */
22852 xmlNode * cur; /* the node being checked */
22855 for (n_doc = 0;n_doc < gen_nb_const_xmlDoc_ptr;n_doc++) {
22856 for (n_cur = 0;n_cur < gen_nb_const_xmlNode_ptr;n_cur++) {
22857 mem_base = xmlMemBlocks();
22858 doc = gen_const_xmlDoc_ptr(n_doc, 0);
22859 cur = gen_const_xmlNode_ptr(n_cur, 1);
22861 ret_val = xmlNodeGetBase((const xmlDoc *)doc, (const xmlNode *)cur);
22862 desret_xmlChar_ptr(ret_val);
22864 des_const_xmlDoc_ptr(n_doc, (const xmlDoc *)doc, 0);
22865 des_const_xmlNode_ptr(n_cur, (const xmlNode *)cur, 1);
22866 xmlResetLastError();
22867 if (mem_base != xmlMemBlocks()) {
22868 printf("Leak of %d blocks found in xmlNodeGetBase",
22869 xmlMemBlocks() - mem_base);
22871 printf(" %d", n_doc);
22872 printf(" %d", n_cur);
22884 test_xmlNodeGetContent(void) {
22889 xmlNode * cur; /* the node being read */
22892 for (n_cur = 0;n_cur < gen_nb_const_xmlNode_ptr;n_cur++) {
22893 mem_base = xmlMemBlocks();
22894 cur = gen_const_xmlNode_ptr(n_cur, 0);
22896 ret_val = xmlNodeGetContent((const xmlNode *)cur);
22897 desret_xmlChar_ptr(ret_val);
22899 des_const_xmlNode_ptr(n_cur, (const xmlNode *)cur, 0);
22900 xmlResetLastError();
22901 if (mem_base != xmlMemBlocks()) {
22902 printf("Leak of %d blocks found in xmlNodeGetContent",
22903 xmlMemBlocks() - mem_base);
22905 printf(" %d", n_cur);
22916 test_xmlNodeGetLang(void) {
22921 xmlNode * cur; /* the node being checked */
22924 for (n_cur = 0;n_cur < gen_nb_const_xmlNode_ptr;n_cur++) {
22925 mem_base = xmlMemBlocks();
22926 cur = gen_const_xmlNode_ptr(n_cur, 0);
22928 ret_val = xmlNodeGetLang((const xmlNode *)cur);
22929 desret_xmlChar_ptr(ret_val);
22931 des_const_xmlNode_ptr(n_cur, (const xmlNode *)cur, 0);
22932 xmlResetLastError();
22933 if (mem_base != xmlMemBlocks()) {
22934 printf("Leak of %d blocks found in xmlNodeGetLang",
22935 xmlMemBlocks() - mem_base);
22937 printf(" %d", n_cur);
22948 test_xmlNodeGetSpacePreserve(void) {
22953 xmlNode * cur; /* the node being checked */
22956 for (n_cur = 0;n_cur < gen_nb_const_xmlNode_ptr;n_cur++) {
22957 mem_base = xmlMemBlocks();
22958 cur = gen_const_xmlNode_ptr(n_cur, 0);
22960 ret_val = xmlNodeGetSpacePreserve((const xmlNode *)cur);
22961 desret_int(ret_val);
22963 des_const_xmlNode_ptr(n_cur, (const xmlNode *)cur, 0);
22964 xmlResetLastError();
22965 if (mem_base != xmlMemBlocks()) {
22966 printf("Leak of %d blocks found in xmlNodeGetSpacePreserve",
22967 xmlMemBlocks() - mem_base);
22969 printf(" %d", n_cur);
22980 test_xmlNodeIsText(void) {
22985 xmlNode * node; /* the node */
22988 for (n_node = 0;n_node < gen_nb_const_xmlNode_ptr;n_node++) {
22989 mem_base = xmlMemBlocks();
22990 node = gen_const_xmlNode_ptr(n_node, 0);
22992 ret_val = xmlNodeIsText((const xmlNode *)node);
22993 desret_int(ret_val);
22995 des_const_xmlNode_ptr(n_node, (const xmlNode *)node, 0);
22996 xmlResetLastError();
22997 if (mem_base != xmlMemBlocks()) {
22998 printf("Leak of %d blocks found in xmlNodeIsText",
22999 xmlMemBlocks() - mem_base);
23001 printf(" %d", n_node);
23012 test_xmlNodeListGetRawString(void) {
23015 #if defined(LIBXML_TREE_ENABLED)
23018 xmlDoc * doc; /* the document */
23020 xmlNode * list; /* a Node list */
23022 int inLine; /* should we replace entity contents or show their external form */
23025 for (n_doc = 0;n_doc < gen_nb_const_xmlDoc_ptr;n_doc++) {
23026 for (n_list = 0;n_list < gen_nb_const_xmlNode_ptr;n_list++) {
23027 for (n_inLine = 0;n_inLine < gen_nb_int;n_inLine++) {
23028 mem_base = xmlMemBlocks();
23029 doc = gen_const_xmlDoc_ptr(n_doc, 0);
23030 list = gen_const_xmlNode_ptr(n_list, 1);
23031 inLine = gen_int(n_inLine, 2);
23033 ret_val = xmlNodeListGetRawString((const xmlDoc *)doc, (const xmlNode *)list, inLine);
23034 desret_xmlChar_ptr(ret_val);
23036 des_const_xmlDoc_ptr(n_doc, (const xmlDoc *)doc, 0);
23037 des_const_xmlNode_ptr(n_list, (const xmlNode *)list, 1);
23038 des_int(n_inLine, inLine, 2);
23039 xmlResetLastError();
23040 if (mem_base != xmlMemBlocks()) {
23041 printf("Leak of %d blocks found in xmlNodeListGetRawString",
23042 xmlMemBlocks() - mem_base);
23044 printf(" %d", n_doc);
23045 printf(" %d", n_list);
23046 printf(" %d", n_inLine);
23060 test_xmlNodeListGetString(void) {
23065 xmlDocPtr doc; /* the document */
23067 xmlNode * list; /* a Node list */
23069 int inLine; /* should we replace entity contents or show their external form */
23072 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
23073 for (n_list = 0;n_list < gen_nb_const_xmlNode_ptr;n_list++) {
23074 for (n_inLine = 0;n_inLine < gen_nb_int;n_inLine++) {
23075 mem_base = xmlMemBlocks();
23076 doc = gen_xmlDocPtr(n_doc, 0);
23077 list = gen_const_xmlNode_ptr(n_list, 1);
23078 inLine = gen_int(n_inLine, 2);
23080 ret_val = xmlNodeListGetString(doc, (const xmlNode *)list, inLine);
23081 desret_xmlChar_ptr(ret_val);
23083 des_xmlDocPtr(n_doc, doc, 0);
23084 des_const_xmlNode_ptr(n_list, (const xmlNode *)list, 1);
23085 des_int(n_inLine, inLine, 2);
23086 xmlResetLastError();
23087 if (mem_base != xmlMemBlocks()) {
23088 printf("Leak of %d blocks found in xmlNodeListGetString",
23089 xmlMemBlocks() - mem_base);
23091 printf(" %d", n_doc);
23092 printf(" %d", n_list);
23093 printf(" %d", n_inLine);
23106 test_xmlNodeSetBase(void) {
23109 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
23111 xmlNodePtr cur; /* the node being changed */
23113 xmlChar * uri; /* the new base URI */
23116 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
23117 for (n_uri = 0;n_uri < gen_nb_const_xmlChar_ptr;n_uri++) {
23118 mem_base = xmlMemBlocks();
23119 cur = gen_xmlNodePtr(n_cur, 0);
23120 uri = gen_const_xmlChar_ptr(n_uri, 1);
23122 xmlNodeSetBase(cur, (const xmlChar *)uri);
23124 des_xmlNodePtr(n_cur, cur, 0);
23125 des_const_xmlChar_ptr(n_uri, (const xmlChar *)uri, 1);
23126 xmlResetLastError();
23127 if (mem_base != xmlMemBlocks()) {
23128 printf("Leak of %d blocks found in xmlNodeSetBase",
23129 xmlMemBlocks() - mem_base);
23131 printf(" %d", n_cur);
23132 printf(" %d", n_uri);
23145 test_xmlNodeSetContent(void) {
23149 xmlNodePtr cur; /* the node being modified */
23151 xmlChar * content; /* the new value of the content */
23154 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
23155 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
23156 mem_base = xmlMemBlocks();
23157 cur = gen_xmlNodePtr(n_cur, 0);
23158 content = gen_const_xmlChar_ptr(n_content, 1);
23160 xmlNodeSetContent(cur, (const xmlChar *)content);
23162 des_xmlNodePtr(n_cur, cur, 0);
23163 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
23164 xmlResetLastError();
23165 if (mem_base != xmlMemBlocks()) {
23166 printf("Leak of %d blocks found in xmlNodeSetContent",
23167 xmlMemBlocks() - mem_base);
23169 printf(" %d", n_cur);
23170 printf(" %d", n_content);
23182 test_xmlNodeSetContentLen(void) {
23185 #if defined(LIBXML_TREE_ENABLED)
23187 xmlNodePtr cur; /* the node being modified */
23189 xmlChar * content; /* the new value of the content */
23191 int len; /* the size of @content */
23194 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
23195 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
23196 for (n_len = 0;n_len < gen_nb_int;n_len++) {
23197 mem_base = xmlMemBlocks();
23198 cur = gen_xmlNodePtr(n_cur, 0);
23199 content = gen_const_xmlChar_ptr(n_content, 1);
23200 len = gen_int(n_len, 2);
23202 xmlNodeSetContentLen(cur, (const xmlChar *)content, len);
23204 des_xmlNodePtr(n_cur, cur, 0);
23205 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
23206 des_int(n_len, len, 2);
23207 xmlResetLastError();
23208 if (mem_base != xmlMemBlocks()) {
23209 printf("Leak of %d blocks found in xmlNodeSetContentLen",
23210 xmlMemBlocks() - mem_base);
23212 printf(" %d", n_cur);
23213 printf(" %d", n_content);
23214 printf(" %d", n_len);
23228 test_xmlNodeSetLang(void) {
23231 #if defined(LIBXML_TREE_ENABLED)
23233 xmlNodePtr cur; /* the node being changed */
23235 xmlChar * lang; /* the language description */
23238 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
23239 for (n_lang = 0;n_lang < gen_nb_const_xmlChar_ptr;n_lang++) {
23240 mem_base = xmlMemBlocks();
23241 cur = gen_xmlNodePtr(n_cur, 0);
23242 lang = gen_const_xmlChar_ptr(n_lang, 1);
23244 xmlNodeSetLang(cur, (const xmlChar *)lang);
23246 des_xmlNodePtr(n_cur, cur, 0);
23247 des_const_xmlChar_ptr(n_lang, (const xmlChar *)lang, 1);
23248 xmlResetLastError();
23249 if (mem_base != xmlMemBlocks()) {
23250 printf("Leak of %d blocks found in xmlNodeSetLang",
23251 xmlMemBlocks() - mem_base);
23253 printf(" %d", n_cur);
23254 printf(" %d", n_lang);
23267 test_xmlNodeSetName(void) {
23270 #if defined(LIBXML_TREE_ENABLED)
23272 xmlNodePtr cur; /* the node being changed */
23274 xmlChar * name; /* the new tag name */
23277 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
23278 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
23279 mem_base = xmlMemBlocks();
23280 cur = gen_xmlNodePtr(n_cur, 0);
23281 name = gen_const_xmlChar_ptr(n_name, 1);
23283 xmlNodeSetName(cur, (const xmlChar *)name);
23285 des_xmlNodePtr(n_cur, cur, 0);
23286 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
23287 xmlResetLastError();
23288 if (mem_base != xmlMemBlocks()) {
23289 printf("Leak of %d blocks found in xmlNodeSetName",
23290 xmlMemBlocks() - mem_base);
23292 printf(" %d", n_cur);
23293 printf(" %d", n_name);
23306 test_xmlNodeSetSpacePreserve(void) {
23309 #if defined(LIBXML_TREE_ENABLED)
23311 xmlNodePtr cur; /* the node being changed */
23313 int val; /* the xml:space value ("0": default, 1: "preserve") */
23316 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
23317 for (n_val = 0;n_val < gen_nb_int;n_val++) {
23318 mem_base = xmlMemBlocks();
23319 cur = gen_xmlNodePtr(n_cur, 0);
23320 val = gen_int(n_val, 1);
23322 xmlNodeSetSpacePreserve(cur, val);
23324 des_xmlNodePtr(n_cur, cur, 0);
23325 des_int(n_val, val, 1);
23326 xmlResetLastError();
23327 if (mem_base != xmlMemBlocks()) {
23328 printf("Leak of %d blocks found in xmlNodeSetSpacePreserve",
23329 xmlMemBlocks() - mem_base);
23331 printf(" %d", n_cur);
23332 printf(" %d", n_val);
23345 test_xmlPreviousElementSibling(void) {
23348 #if defined(LIBXML_TREE_ENABLED)
23350 xmlNodePtr ret_val;
23351 xmlNodePtr node; /* the current node */
23354 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
23355 mem_base = xmlMemBlocks();
23356 node = gen_xmlNodePtr(n_node, 0);
23358 ret_val = xmlPreviousElementSibling(node);
23359 desret_xmlNodePtr(ret_val);
23361 des_xmlNodePtr(n_node, node, 0);
23362 xmlResetLastError();
23363 if (mem_base != xmlMemBlocks()) {
23364 printf("Leak of %d blocks found in xmlPreviousElementSibling",
23365 xmlMemBlocks() - mem_base);
23367 printf(" %d", n_node);
23379 test_xmlReconciliateNs(void) {
23382 #if defined(LIBXML_TREE_ENABLED)
23383 #ifdef LIBXML_TREE_ENABLED
23386 xmlDocPtr doc; /* the document */
23388 xmlNodePtr tree; /* a node defining the subtree to reconciliate */
23391 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
23392 for (n_tree = 0;n_tree < gen_nb_xmlNodePtr;n_tree++) {
23393 mem_base = xmlMemBlocks();
23394 doc = gen_xmlDocPtr(n_doc, 0);
23395 tree = gen_xmlNodePtr(n_tree, 1);
23397 ret_val = xmlReconciliateNs(doc, tree);
23398 desret_int(ret_val);
23400 des_xmlDocPtr(n_doc, doc, 0);
23401 des_xmlNodePtr(n_tree, tree, 1);
23402 xmlResetLastError();
23403 if (mem_base != xmlMemBlocks()) {
23404 printf("Leak of %d blocks found in xmlReconciliateNs",
23405 xmlMemBlocks() - mem_base);
23407 printf(" %d", n_doc);
23408 printf(" %d", n_tree);
23422 test_xmlRemoveProp(void) {
23427 xmlAttrPtr cur; /* an attribute */
23430 for (n_cur = 0;n_cur < gen_nb_xmlAttrPtr;n_cur++) {
23431 mem_base = xmlMemBlocks();
23432 cur = gen_xmlAttrPtr(n_cur, 0);
23434 ret_val = xmlRemoveProp(cur);
23436 desret_int(ret_val);
23438 des_xmlAttrPtr(n_cur, cur, 0);
23439 xmlResetLastError();
23440 if (mem_base != xmlMemBlocks()) {
23441 printf("Leak of %d blocks found in xmlRemoveProp",
23442 xmlMemBlocks() - mem_base);
23444 printf(" %d", n_cur);
23455 test_xmlReplaceNode(void) {
23458 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
23460 xmlNodePtr ret_val;
23461 xmlNodePtr old; /* the old node */
23463 xmlNodePtr cur; /* the node */
23466 for (n_old = 0;n_old < gen_nb_xmlNodePtr;n_old++) {
23467 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr_in;n_cur++) {
23468 mem_base = xmlMemBlocks();
23469 old = gen_xmlNodePtr(n_old, 0);
23470 cur = gen_xmlNodePtr_in(n_cur, 1);
23472 ret_val = xmlReplaceNode(old, cur);
23474 xmlUnlinkNode(cur);
23475 xmlFreeNode(cur) ; cur = NULL ; }
23477 xmlUnlinkNode(old);
23478 xmlFreeNode(old) ; old = NULL ; }
23480 desret_xmlNodePtr(ret_val);
23482 des_xmlNodePtr(n_old, old, 0);
23483 des_xmlNodePtr_in(n_cur, cur, 1);
23484 xmlResetLastError();
23485 if (mem_base != xmlMemBlocks()) {
23486 printf("Leak of %d blocks found in xmlReplaceNode",
23487 xmlMemBlocks() - mem_base);
23489 printf(" %d", n_old);
23490 printf(" %d", n_cur);
23503 test_xmlSaveFile(void) {
23506 #if defined(LIBXML_OUTPUT_ENABLED)
23509 const char * filename; /* the filename (or URL) */
23511 xmlDocPtr cur; /* the document */
23514 for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
23515 for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
23516 mem_base = xmlMemBlocks();
23517 filename = gen_fileoutput(n_filename, 0);
23518 cur = gen_xmlDocPtr(n_cur, 1);
23520 ret_val = xmlSaveFile(filename, cur);
23521 desret_int(ret_val);
23523 des_fileoutput(n_filename, filename, 0);
23524 des_xmlDocPtr(n_cur, cur, 1);
23525 xmlResetLastError();
23526 if (mem_base != xmlMemBlocks()) {
23527 printf("Leak of %d blocks found in xmlSaveFile",
23528 xmlMemBlocks() - mem_base);
23530 printf(" %d", n_filename);
23531 printf(" %d", n_cur);
23544 test_xmlSaveFileEnc(void) {
23547 #if defined(LIBXML_OUTPUT_ENABLED)
23550 const char * filename; /* the filename (or URL) */
23552 xmlDocPtr cur; /* the document */
23554 char * encoding; /* the name of an encoding (or NULL) */
23557 for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
23558 for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
23559 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
23560 mem_base = xmlMemBlocks();
23561 filename = gen_fileoutput(n_filename, 0);
23562 cur = gen_xmlDocPtr(n_cur, 1);
23563 encoding = gen_const_char_ptr(n_encoding, 2);
23565 ret_val = xmlSaveFileEnc(filename, cur, (const char *)encoding);
23566 desret_int(ret_val);
23568 des_fileoutput(n_filename, filename, 0);
23569 des_xmlDocPtr(n_cur, cur, 1);
23570 des_const_char_ptr(n_encoding, (const char *)encoding, 2);
23571 xmlResetLastError();
23572 if (mem_base != xmlMemBlocks()) {
23573 printf("Leak of %d blocks found in xmlSaveFileEnc",
23574 xmlMemBlocks() - mem_base);
23576 printf(" %d", n_filename);
23577 printf(" %d", n_cur);
23578 printf(" %d", n_encoding);
23592 test_xmlSaveFileTo(void) {
23595 #if defined(LIBXML_OUTPUT_ENABLED)
23598 xmlOutputBufferPtr buf; /* an output I/O buffer */
23600 xmlDocPtr cur; /* the document */
23602 char * encoding; /* the encoding if any assuming the I/O layer handles the trancoding */
23605 for (n_buf = 0;n_buf < gen_nb_xmlOutputBufferPtr;n_buf++) {
23606 for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
23607 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
23608 mem_base = xmlMemBlocks();
23609 buf = gen_xmlOutputBufferPtr(n_buf, 0);
23610 cur = gen_xmlDocPtr(n_cur, 1);
23611 encoding = gen_const_char_ptr(n_encoding, 2);
23613 ret_val = xmlSaveFileTo(buf, cur, (const char *)encoding);
23615 desret_int(ret_val);
23617 des_xmlOutputBufferPtr(n_buf, buf, 0);
23618 des_xmlDocPtr(n_cur, cur, 1);
23619 des_const_char_ptr(n_encoding, (const char *)encoding, 2);
23620 xmlResetLastError();
23621 if (mem_base != xmlMemBlocks()) {
23622 printf("Leak of %d blocks found in xmlSaveFileTo",
23623 xmlMemBlocks() - mem_base);
23625 printf(" %d", n_buf);
23626 printf(" %d", n_cur);
23627 printf(" %d", n_encoding);
23641 test_xmlSaveFormatFile(void) {
23644 #if defined(LIBXML_OUTPUT_ENABLED)
23647 const char * filename; /* the filename (or URL) */
23649 xmlDocPtr cur; /* the document */
23651 int format; /* should formatting spaces been added */
23654 for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
23655 for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
23656 for (n_format = 0;n_format < gen_nb_int;n_format++) {
23657 mem_base = xmlMemBlocks();
23658 filename = gen_fileoutput(n_filename, 0);
23659 cur = gen_xmlDocPtr(n_cur, 1);
23660 format = gen_int(n_format, 2);
23662 ret_val = xmlSaveFormatFile(filename, cur, format);
23663 desret_int(ret_val);
23665 des_fileoutput(n_filename, filename, 0);
23666 des_xmlDocPtr(n_cur, cur, 1);
23667 des_int(n_format, format, 2);
23668 xmlResetLastError();
23669 if (mem_base != xmlMemBlocks()) {
23670 printf("Leak of %d blocks found in xmlSaveFormatFile",
23671 xmlMemBlocks() - mem_base);
23673 printf(" %d", n_filename);
23674 printf(" %d", n_cur);
23675 printf(" %d", n_format);
23689 test_xmlSaveFormatFileEnc(void) {
23692 #if defined(LIBXML_OUTPUT_ENABLED)
23695 const char * filename; /* the filename or URL to output */
23697 xmlDocPtr cur; /* the document being saved */
23699 char * encoding; /* the name of the encoding to use or NULL. */
23701 int format; /* should formatting spaces be added. */
23704 for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
23705 for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
23706 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
23707 for (n_format = 0;n_format < gen_nb_int;n_format++) {
23708 mem_base = xmlMemBlocks();
23709 filename = gen_fileoutput(n_filename, 0);
23710 cur = gen_xmlDocPtr(n_cur, 1);
23711 encoding = gen_const_char_ptr(n_encoding, 2);
23712 format = gen_int(n_format, 3);
23714 ret_val = xmlSaveFormatFileEnc(filename, cur, (const char *)encoding, format);
23715 desret_int(ret_val);
23717 des_fileoutput(n_filename, filename, 0);
23718 des_xmlDocPtr(n_cur, cur, 1);
23719 des_const_char_ptr(n_encoding, (const char *)encoding, 2);
23720 des_int(n_format, format, 3);
23721 xmlResetLastError();
23722 if (mem_base != xmlMemBlocks()) {
23723 printf("Leak of %d blocks found in xmlSaveFormatFileEnc",
23724 xmlMemBlocks() - mem_base);
23726 printf(" %d", n_filename);
23727 printf(" %d", n_cur);
23728 printf(" %d", n_encoding);
23729 printf(" %d", n_format);
23744 test_xmlSaveFormatFileTo(void) {
23747 #if defined(LIBXML_OUTPUT_ENABLED)
23750 xmlOutputBufferPtr buf; /* an output I/O buffer */
23752 xmlDocPtr cur; /* the document */
23754 char * encoding; /* the encoding if any assuming the I/O layer handles the trancoding */
23756 int format; /* should formatting spaces been added */
23759 for (n_buf = 0;n_buf < gen_nb_xmlOutputBufferPtr;n_buf++) {
23760 for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
23761 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
23762 for (n_format = 0;n_format < gen_nb_int;n_format++) {
23763 mem_base = xmlMemBlocks();
23764 buf = gen_xmlOutputBufferPtr(n_buf, 0);
23765 cur = gen_xmlDocPtr(n_cur, 1);
23766 encoding = gen_const_char_ptr(n_encoding, 2);
23767 format = gen_int(n_format, 3);
23769 ret_val = xmlSaveFormatFileTo(buf, cur, (const char *)encoding, format);
23771 desret_int(ret_val);
23773 des_xmlOutputBufferPtr(n_buf, buf, 0);
23774 des_xmlDocPtr(n_cur, cur, 1);
23775 des_const_char_ptr(n_encoding, (const char *)encoding, 2);
23776 des_int(n_format, format, 3);
23777 xmlResetLastError();
23778 if (mem_base != xmlMemBlocks()) {
23779 printf("Leak of %d blocks found in xmlSaveFormatFileTo",
23780 xmlMemBlocks() - mem_base);
23782 printf(" %d", n_buf);
23783 printf(" %d", n_cur);
23784 printf(" %d", n_encoding);
23785 printf(" %d", n_format);
23800 test_xmlSearchNs(void) {
23805 xmlDocPtr doc; /* the document */
23807 xmlNodePtr node; /* the current node */
23809 xmlChar * nameSpace; /* the namespace prefix */
23812 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
23813 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
23814 for (n_nameSpace = 0;n_nameSpace < gen_nb_const_xmlChar_ptr;n_nameSpace++) {
23815 mem_base = xmlMemBlocks();
23816 doc = gen_xmlDocPtr(n_doc, 0);
23817 node = gen_xmlNodePtr(n_node, 1);
23818 nameSpace = gen_const_xmlChar_ptr(n_nameSpace, 2);
23820 ret_val = xmlSearchNs(doc, node, (const xmlChar *)nameSpace);
23821 desret_xmlNsPtr(ret_val);
23823 des_xmlDocPtr(n_doc, doc, 0);
23824 des_xmlNodePtr(n_node, node, 1);
23825 des_const_xmlChar_ptr(n_nameSpace, (const xmlChar *)nameSpace, 2);
23826 xmlResetLastError();
23827 if (mem_base != xmlMemBlocks()) {
23828 printf("Leak of %d blocks found in xmlSearchNs",
23829 xmlMemBlocks() - mem_base);
23831 printf(" %d", n_doc);
23832 printf(" %d", n_node);
23833 printf(" %d", n_nameSpace);
23846 test_xmlSearchNsByHref(void) {
23851 xmlDocPtr doc; /* the document */
23853 xmlNodePtr node; /* the current node */
23855 xmlChar * href; /* the namespace value */
23858 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
23859 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
23860 for (n_href = 0;n_href < gen_nb_const_xmlChar_ptr;n_href++) {
23861 mem_base = xmlMemBlocks();
23862 doc = gen_xmlDocPtr(n_doc, 0);
23863 node = gen_xmlNodePtr(n_node, 1);
23864 href = gen_const_xmlChar_ptr(n_href, 2);
23866 ret_val = xmlSearchNsByHref(doc, node, (const xmlChar *)href);
23867 desret_xmlNsPtr(ret_val);
23869 des_xmlDocPtr(n_doc, doc, 0);
23870 des_xmlNodePtr(n_node, node, 1);
23871 des_const_xmlChar_ptr(n_href, (const xmlChar *)href, 2);
23872 xmlResetLastError();
23873 if (mem_base != xmlMemBlocks()) {
23874 printf("Leak of %d blocks found in xmlSearchNsByHref",
23875 xmlMemBlocks() - mem_base);
23877 printf(" %d", n_doc);
23878 printf(" %d", n_node);
23879 printf(" %d", n_href);
23892 test_xmlSetBufferAllocationScheme(void) {
23896 xmlBufferAllocationScheme scheme; /* allocation method to use */
23899 for (n_scheme = 0;n_scheme < gen_nb_xmlBufferAllocationScheme;n_scheme++) {
23900 mem_base = xmlMemBlocks();
23901 scheme = gen_xmlBufferAllocationScheme(n_scheme, 0);
23903 xmlSetBufferAllocationScheme(scheme);
23905 des_xmlBufferAllocationScheme(n_scheme, scheme, 0);
23906 xmlResetLastError();
23907 if (mem_base != xmlMemBlocks()) {
23908 printf("Leak of %d blocks found in xmlSetBufferAllocationScheme",
23909 xmlMemBlocks() - mem_base);
23911 printf(" %d", n_scheme);
23922 test_xmlSetCompressMode(void) {
23926 int mode; /* the compression ratio */
23929 for (n_mode = 0;n_mode < gen_nb_int;n_mode++) {
23930 mem_base = xmlMemBlocks();
23931 mode = gen_int(n_mode, 0);
23933 xmlSetCompressMode(mode);
23935 des_int(n_mode, mode, 0);
23936 xmlResetLastError();
23937 if (mem_base != xmlMemBlocks()) {
23938 printf("Leak of %d blocks found in xmlSetCompressMode",
23939 xmlMemBlocks() - mem_base);
23941 printf(" %d", n_mode);
23952 test_xmlSetDocCompressMode(void) {
23956 xmlDocPtr doc; /* the document */
23958 int mode; /* the compression ratio */
23961 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
23962 for (n_mode = 0;n_mode < gen_nb_int;n_mode++) {
23963 mem_base = xmlMemBlocks();
23964 doc = gen_xmlDocPtr(n_doc, 0);
23965 mode = gen_int(n_mode, 1);
23967 xmlSetDocCompressMode(doc, mode);
23969 des_xmlDocPtr(n_doc, doc, 0);
23970 des_int(n_mode, mode, 1);
23971 xmlResetLastError();
23972 if (mem_base != xmlMemBlocks()) {
23973 printf("Leak of %d blocks found in xmlSetDocCompressMode",
23974 xmlMemBlocks() - mem_base);
23976 printf(" %d", n_doc);
23977 printf(" %d", n_mode);
23989 test_xmlSetNs(void) {
23993 xmlNodePtr node; /* a node in the document */
23995 xmlNsPtr ns; /* a namespace pointer */
23998 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
23999 for (n_ns = 0;n_ns < gen_nb_xmlNsPtr;n_ns++) {
24000 mem_base = xmlMemBlocks();
24001 node = gen_xmlNodePtr(n_node, 0);
24002 ns = gen_xmlNsPtr(n_ns, 1);
24004 xmlSetNs(node, ns);
24006 des_xmlNodePtr(n_node, node, 0);
24007 des_xmlNsPtr(n_ns, ns, 1);
24008 xmlResetLastError();
24009 if (mem_base != xmlMemBlocks()) {
24010 printf("Leak of %d blocks found in xmlSetNs",
24011 xmlMemBlocks() - mem_base);
24013 printf(" %d", n_node);
24014 printf(" %d", n_ns);
24026 test_xmlSetNsProp(void) {
24029 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)
24031 xmlAttrPtr ret_val;
24032 xmlNodePtr node; /* the node */
24034 xmlNsPtr ns; /* the namespace definition */
24036 xmlChar * name; /* the attribute name */
24038 xmlChar * value; /* the attribute value */
24041 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
24042 for (n_ns = 0;n_ns < gen_nb_xmlNsPtr;n_ns++) {
24043 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
24044 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
24045 mem_base = xmlMemBlocks();
24046 node = gen_xmlNodePtr(n_node, 0);
24047 ns = gen_xmlNsPtr(n_ns, 1);
24048 name = gen_const_xmlChar_ptr(n_name, 2);
24049 value = gen_const_xmlChar_ptr(n_value, 3);
24051 ret_val = xmlSetNsProp(node, ns, (const xmlChar *)name, (const xmlChar *)value);
24052 desret_xmlAttrPtr(ret_val);
24054 des_xmlNodePtr(n_node, node, 0);
24055 des_xmlNsPtr(n_ns, ns, 1);
24056 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
24057 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 3);
24058 xmlResetLastError();
24059 if (mem_base != xmlMemBlocks()) {
24060 printf("Leak of %d blocks found in xmlSetNsProp",
24061 xmlMemBlocks() - mem_base);
24063 printf(" %d", n_node);
24064 printf(" %d", n_ns);
24065 printf(" %d", n_name);
24066 printf(" %d", n_value);
24081 test_xmlSetProp(void) {
24084 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)
24086 xmlAttrPtr ret_val;
24087 xmlNodePtr node; /* the node */
24089 xmlChar * name; /* the attribute name (a QName) */
24091 xmlChar * value; /* the attribute value */
24094 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
24095 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
24096 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
24097 mem_base = xmlMemBlocks();
24098 node = gen_xmlNodePtr(n_node, 0);
24099 name = gen_const_xmlChar_ptr(n_name, 1);
24100 value = gen_const_xmlChar_ptr(n_value, 2);
24102 ret_val = xmlSetProp(node, (const xmlChar *)name, (const xmlChar *)value);
24103 desret_xmlAttrPtr(ret_val);
24105 des_xmlNodePtr(n_node, node, 0);
24106 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
24107 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 2);
24108 xmlResetLastError();
24109 if (mem_base != xmlMemBlocks()) {
24110 printf("Leak of %d blocks found in xmlSetProp",
24111 xmlMemBlocks() - mem_base);
24113 printf(" %d", n_node);
24114 printf(" %d", n_name);
24115 printf(" %d", n_value);
24129 test_xmlSplitQName2(void) {
24134 xmlChar * name; /* the full QName */
24136 xmlChar ** prefix; /* a xmlChar ** */
24139 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
24140 for (n_prefix = 0;n_prefix < gen_nb_xmlChar_ptr_ptr;n_prefix++) {
24141 mem_base = xmlMemBlocks();
24142 name = gen_const_xmlChar_ptr(n_name, 0);
24143 prefix = gen_xmlChar_ptr_ptr(n_prefix, 1);
24145 ret_val = xmlSplitQName2((const xmlChar *)name, prefix);
24146 desret_xmlChar_ptr(ret_val);
24148 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 0);
24149 des_xmlChar_ptr_ptr(n_prefix, prefix, 1);
24150 xmlResetLastError();
24151 if (mem_base != xmlMemBlocks()) {
24152 printf("Leak of %d blocks found in xmlSplitQName2",
24153 xmlMemBlocks() - mem_base);
24155 printf(" %d", n_name);
24156 printf(" %d", n_prefix);
24168 test_xmlSplitQName3(void) {
24172 const xmlChar * ret_val;
24173 xmlChar * name; /* the full QName */
24175 int * len; /* an int * */
24178 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
24179 for (n_len = 0;n_len < gen_nb_int_ptr;n_len++) {
24180 mem_base = xmlMemBlocks();
24181 name = gen_const_xmlChar_ptr(n_name, 0);
24182 len = gen_int_ptr(n_len, 1);
24184 ret_val = xmlSplitQName3((const xmlChar *)name, len);
24185 desret_const_xmlChar_ptr(ret_val);
24187 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 0);
24188 des_int_ptr(n_len, len, 1);
24189 xmlResetLastError();
24190 if (mem_base != xmlMemBlocks()) {
24191 printf("Leak of %d blocks found in xmlSplitQName3",
24192 xmlMemBlocks() - mem_base);
24194 printf(" %d", n_name);
24195 printf(" %d", n_len);
24207 test_xmlStringGetNodeList(void) {
24211 xmlNodePtr ret_val;
24212 xmlDoc * doc; /* the document */
24214 xmlChar * value; /* the value of the attribute */
24217 for (n_doc = 0;n_doc < gen_nb_const_xmlDoc_ptr;n_doc++) {
24218 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
24219 mem_base = xmlMemBlocks();
24220 doc = gen_const_xmlDoc_ptr(n_doc, 0);
24221 value = gen_const_xmlChar_ptr(n_value, 1);
24223 ret_val = xmlStringGetNodeList((const xmlDoc *)doc, (const xmlChar *)value);
24224 desret_xmlNodePtr(ret_val);
24226 des_const_xmlDoc_ptr(n_doc, (const xmlDoc *)doc, 0);
24227 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 1);
24228 xmlResetLastError();
24229 if (mem_base != xmlMemBlocks()) {
24230 printf("Leak of %d blocks found in xmlStringGetNodeList",
24231 xmlMemBlocks() - mem_base);
24233 printf(" %d", n_doc);
24234 printf(" %d", n_value);
24246 test_xmlStringLenGetNodeList(void) {
24250 xmlNodePtr ret_val;
24251 xmlDoc * doc; /* the document */
24253 xmlChar * value; /* the value of the text */
24255 int len; /* the length of the string value */
24258 for (n_doc = 0;n_doc < gen_nb_const_xmlDoc_ptr;n_doc++) {
24259 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
24260 for (n_len = 0;n_len < gen_nb_int;n_len++) {
24261 mem_base = xmlMemBlocks();
24262 doc = gen_const_xmlDoc_ptr(n_doc, 0);
24263 value = gen_const_xmlChar_ptr(n_value, 1);
24264 len = gen_int(n_len, 2);
24266 ret_val = xmlStringLenGetNodeList((const xmlDoc *)doc, (const xmlChar *)value, len);
24267 desret_xmlNodePtr(ret_val);
24269 des_const_xmlDoc_ptr(n_doc, (const xmlDoc *)doc, 0);
24270 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 1);
24271 des_int(n_len, len, 2);
24272 xmlResetLastError();
24273 if (mem_base != xmlMemBlocks()) {
24274 printf("Leak of %d blocks found in xmlStringLenGetNodeList",
24275 xmlMemBlocks() - mem_base);
24277 printf(" %d", n_doc);
24278 printf(" %d", n_value);
24279 printf(" %d", n_len);
24292 test_xmlTextConcat(void) {
24297 xmlNodePtr node; /* the node */
24299 xmlChar * content; /* the content */
24301 int len; /* @content length */
24304 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
24305 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
24306 for (n_len = 0;n_len < gen_nb_int;n_len++) {
24307 mem_base = xmlMemBlocks();
24308 node = gen_xmlNodePtr(n_node, 0);
24309 content = gen_const_xmlChar_ptr(n_content, 1);
24310 len = gen_int(n_len, 2);
24312 ret_val = xmlTextConcat(node, (const xmlChar *)content, len);
24313 desret_int(ret_val);
24315 des_xmlNodePtr(n_node, node, 0);
24316 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
24317 des_int(n_len, len, 2);
24318 xmlResetLastError();
24319 if (mem_base != xmlMemBlocks()) {
24320 printf("Leak of %d blocks found in xmlTextConcat",
24321 xmlMemBlocks() - mem_base);
24323 printf(" %d", n_node);
24324 printf(" %d", n_content);
24325 printf(" %d", n_len);
24338 test_xmlTextMerge(void) {
24342 xmlNodePtr ret_val;
24343 xmlNodePtr first; /* the first text node */
24345 xmlNodePtr second; /* the second text node being merged */
24348 for (n_first = 0;n_first < gen_nb_xmlNodePtr_in;n_first++) {
24349 for (n_second = 0;n_second < gen_nb_xmlNodePtr_in;n_second++) {
24350 mem_base = xmlMemBlocks();
24351 first = gen_xmlNodePtr_in(n_first, 0);
24352 second = gen_xmlNodePtr_in(n_second, 1);
24354 ret_val = xmlTextMerge(first, second);
24355 if ((first != NULL) && (first->type != XML_TEXT_NODE)) {
24356 xmlUnlinkNode(second);
24357 xmlFreeNode(second) ; second = NULL ; }
24358 desret_xmlNodePtr(ret_val);
24360 des_xmlNodePtr_in(n_first, first, 0);
24361 des_xmlNodePtr_in(n_second, second, 1);
24362 xmlResetLastError();
24363 if (mem_base != xmlMemBlocks()) {
24364 printf("Leak of %d blocks found in xmlTextMerge",
24365 xmlMemBlocks() - mem_base);
24367 printf(" %d", n_first);
24368 printf(" %d", n_second);
24380 test_xmlUnsetNsProp(void) {
24383 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
24386 xmlNodePtr node; /* the node */
24388 xmlNsPtr ns; /* the namespace definition */
24390 xmlChar * name; /* the attribute name */
24393 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
24394 for (n_ns = 0;n_ns < gen_nb_xmlNsPtr;n_ns++) {
24395 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
24396 mem_base = xmlMemBlocks();
24397 node = gen_xmlNodePtr(n_node, 0);
24398 ns = gen_xmlNsPtr(n_ns, 1);
24399 name = gen_const_xmlChar_ptr(n_name, 2);
24401 ret_val = xmlUnsetNsProp(node, ns, (const xmlChar *)name);
24402 desret_int(ret_val);
24404 des_xmlNodePtr(n_node, node, 0);
24405 des_xmlNsPtr(n_ns, ns, 1);
24406 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
24407 xmlResetLastError();
24408 if (mem_base != xmlMemBlocks()) {
24409 printf("Leak of %d blocks found in xmlUnsetNsProp",
24410 xmlMemBlocks() - mem_base);
24412 printf(" %d", n_node);
24413 printf(" %d", n_ns);
24414 printf(" %d", n_name);
24428 test_xmlUnsetProp(void) {
24431 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
24434 xmlNodePtr node; /* the node */
24436 xmlChar * name; /* the attribute name */
24439 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
24440 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
24441 mem_base = xmlMemBlocks();
24442 node = gen_xmlNodePtr(n_node, 0);
24443 name = gen_const_xmlChar_ptr(n_name, 1);
24445 ret_val = xmlUnsetProp(node, (const xmlChar *)name);
24446 desret_int(ret_val);
24448 des_xmlNodePtr(n_node, node, 0);
24449 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
24450 xmlResetLastError();
24451 if (mem_base != xmlMemBlocks()) {
24452 printf("Leak of %d blocks found in xmlUnsetProp",
24453 xmlMemBlocks() - mem_base);
24455 printf(" %d", n_node);
24456 printf(" %d", n_name);
24469 test_xmlValidateNCName(void) {
24472 #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)
24473 #ifdef LIBXML_TREE_ENABLED
24476 xmlChar * value; /* the value to check */
24478 int space; /* allow spaces in front and end of the string */
24481 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
24482 for (n_space = 0;n_space < gen_nb_int;n_space++) {
24483 mem_base = xmlMemBlocks();
24484 value = gen_const_xmlChar_ptr(n_value, 0);
24485 space = gen_int(n_space, 1);
24487 ret_val = xmlValidateNCName((const xmlChar *)value, space);
24488 desret_int(ret_val);
24490 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 0);
24491 des_int(n_space, space, 1);
24492 xmlResetLastError();
24493 if (mem_base != xmlMemBlocks()) {
24494 printf("Leak of %d blocks found in xmlValidateNCName",
24495 xmlMemBlocks() - mem_base);
24497 printf(" %d", n_value);
24498 printf(" %d", n_space);
24512 test_xmlValidateNMToken(void) {
24515 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
24516 #ifdef LIBXML_TREE_ENABLED
24519 xmlChar * value; /* the value to check */
24521 int space; /* allow spaces in front and end of the string */
24524 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
24525 for (n_space = 0;n_space < gen_nb_int;n_space++) {
24526 mem_base = xmlMemBlocks();
24527 value = gen_const_xmlChar_ptr(n_value, 0);
24528 space = gen_int(n_space, 1);
24530 ret_val = xmlValidateNMToken((const xmlChar *)value, space);
24531 desret_int(ret_val);
24533 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 0);
24534 des_int(n_space, space, 1);
24535 xmlResetLastError();
24536 if (mem_base != xmlMemBlocks()) {
24537 printf("Leak of %d blocks found in xmlValidateNMToken",
24538 xmlMemBlocks() - mem_base);
24540 printf(" %d", n_value);
24541 printf(" %d", n_space);
24555 test_xmlValidateName(void) {
24558 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
24559 #ifdef LIBXML_TREE_ENABLED
24562 xmlChar * value; /* the value to check */
24564 int space; /* allow spaces in front and end of the string */
24567 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
24568 for (n_space = 0;n_space < gen_nb_int;n_space++) {
24569 mem_base = xmlMemBlocks();
24570 value = gen_const_xmlChar_ptr(n_value, 0);
24571 space = gen_int(n_space, 1);
24573 ret_val = xmlValidateName((const xmlChar *)value, space);
24574 desret_int(ret_val);
24576 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 0);
24577 des_int(n_space, space, 1);
24578 xmlResetLastError();
24579 if (mem_base != xmlMemBlocks()) {
24580 printf("Leak of %d blocks found in xmlValidateName",
24581 xmlMemBlocks() - mem_base);
24583 printf(" %d", n_value);
24584 printf(" %d", n_space);
24598 test_xmlValidateQName(void) {
24601 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
24602 #ifdef LIBXML_TREE_ENABLED
24605 xmlChar * value; /* the value to check */
24607 int space; /* allow spaces in front and end of the string */
24610 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
24611 for (n_space = 0;n_space < gen_nb_int;n_space++) {
24612 mem_base = xmlMemBlocks();
24613 value = gen_const_xmlChar_ptr(n_value, 0);
24614 space = gen_int(n_space, 1);
24616 ret_val = xmlValidateQName((const xmlChar *)value, space);
24617 desret_int(ret_val);
24619 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 0);
24620 des_int(n_space, space, 1);
24621 xmlResetLastError();
24622 if (mem_base != xmlMemBlocks()) {
24623 printf("Leak of %d blocks found in xmlValidateQName",
24624 xmlMemBlocks() - mem_base);
24626 printf(" %d", n_value);
24627 printf(" %d", n_space);
24644 if (quiet == 0) printf("Testing tree : 142 of 164 functions ...\n");
24645 rc = test_xmlAddChild();
24646 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24647 rc = test_xmlAddChildList();
24648 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24649 rc = test_xmlAddNextSibling();
24650 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24651 rc = test_xmlAddPrevSibling();
24652 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24653 rc = test_xmlAddSibling();
24654 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24655 rc = test_xmlAttrSerializeTxtContent();
24656 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24657 rc = test_xmlBufContent();
24658 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24659 rc = test_xmlBufEnd();
24660 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24661 rc = test_xmlBufGetNodeContent();
24662 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24663 rc = test_xmlBufNodeDump();
24664 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24665 rc = test_xmlBufShrink();
24666 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24667 rc = test_xmlBufUse();
24668 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24669 rc = test_xmlBufferAdd();
24670 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24671 rc = test_xmlBufferAddHead();
24672 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24673 rc = test_xmlBufferCCat();
24674 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24675 rc = test_xmlBufferCat();
24676 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24677 rc = test_xmlBufferContent();
24678 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24679 rc = test_xmlBufferCreate();
24680 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24681 rc = test_xmlBufferCreateSize();
24682 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24683 rc = test_xmlBufferCreateStatic();
24684 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24685 rc = test_xmlBufferDetach();
24686 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24687 rc = test_xmlBufferEmpty();
24688 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24689 rc = test_xmlBufferGrow();
24690 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24691 rc = test_xmlBufferLength();
24692 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24693 rc = test_xmlBufferResize();
24694 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24695 rc = test_xmlBufferSetAllocationScheme();
24696 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24697 rc = test_xmlBufferShrink();
24698 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24699 rc = test_xmlBufferWriteCHAR();
24700 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24701 rc = test_xmlBufferWriteChar();
24702 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24703 rc = test_xmlBufferWriteQuotedString();
24704 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24705 rc = test_xmlBuildQName();
24706 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24707 rc = test_xmlChildElementCount();
24708 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24709 rc = test_xmlCopyDoc();
24710 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24711 rc = test_xmlCopyDtd();
24712 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24713 rc = test_xmlCopyNamespace();
24714 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24715 rc = test_xmlCopyNamespaceList();
24716 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24717 rc = test_xmlCopyNode();
24718 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24719 rc = test_xmlCopyNodeList();
24720 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24721 rc = test_xmlCopyProp();
24722 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24723 rc = test_xmlCopyPropList();
24724 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24725 rc = test_xmlCreateIntSubset();
24726 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24727 rc = test_xmlDOMWrapAdoptNode();
24728 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24729 rc = test_xmlDOMWrapCloneNode();
24730 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24731 rc = test_xmlDOMWrapNewCtxt();
24732 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24733 rc = test_xmlDOMWrapReconcileNamespaces();
24734 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24735 rc = test_xmlDOMWrapRemoveNode();
24736 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24737 rc = test_xmlDocCopyNode();
24738 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24739 rc = test_xmlDocCopyNodeList();
24740 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24741 rc = test_xmlDocDump();
24742 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24743 rc = test_xmlDocDumpFormatMemory();
24744 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24745 rc = test_xmlDocDumpFormatMemoryEnc();
24746 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24747 rc = test_xmlDocDumpMemory();
24748 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24749 rc = test_xmlDocDumpMemoryEnc();
24750 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24751 rc = test_xmlDocFormatDump();
24752 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24753 rc = test_xmlDocGetRootElement();
24754 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24755 rc = test_xmlDocSetRootElement();
24756 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24757 rc = test_xmlElemDump();
24758 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24759 rc = test_xmlFirstElementChild();
24760 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24761 rc = test_xmlGetBufferAllocationScheme();
24762 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24763 rc = test_xmlGetCompressMode();
24764 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24765 rc = test_xmlGetDocCompressMode();
24766 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24767 rc = test_xmlGetIntSubset();
24768 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24769 rc = test_xmlGetLastChild();
24770 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24771 rc = test_xmlGetLineNo();
24772 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24773 rc = test_xmlGetNoNsProp();
24774 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24775 rc = test_xmlGetNodePath();
24776 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24777 rc = test_xmlGetNsList();
24778 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24779 rc = test_xmlGetNsProp();
24780 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24781 rc = test_xmlGetProp();
24782 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24783 rc = test_xmlHasNsProp();
24784 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24785 rc = test_xmlHasProp();
24786 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24787 rc = test_xmlIsBlankNode();
24788 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24789 rc = test_xmlIsXHTML();
24790 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24791 rc = test_xmlLastElementChild();
24792 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24793 rc = test_xmlNewCDataBlock();
24794 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24795 rc = test_xmlNewCharRef();
24796 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24797 rc = test_xmlNewChild();
24798 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24799 rc = test_xmlNewComment();
24800 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24801 rc = test_xmlNewDoc();
24802 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24803 rc = test_xmlNewDocComment();
24804 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24805 rc = test_xmlNewDocFragment();
24806 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24807 rc = test_xmlNewDocNode();
24808 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24809 rc = test_xmlNewDocNodeEatName();
24810 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24811 rc = test_xmlNewDocPI();
24812 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24813 rc = test_xmlNewDocProp();
24814 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24815 rc = test_xmlNewDocRawNode();
24816 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24817 rc = test_xmlNewDocText();
24818 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24819 rc = test_xmlNewDocTextLen();
24820 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24821 rc = test_xmlNewDtd();
24822 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24823 rc = test_xmlNewNode();
24824 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24825 rc = test_xmlNewNodeEatName();
24826 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24827 rc = test_xmlNewNs();
24828 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24829 rc = test_xmlNewNsProp();
24830 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24831 rc = test_xmlNewNsPropEatName();
24832 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24833 rc = test_xmlNewPI();
24834 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24835 rc = test_xmlNewProp();
24836 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24837 rc = test_xmlNewReference();
24838 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24839 rc = test_xmlNewText();
24840 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24841 rc = test_xmlNewTextChild();
24842 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24843 rc = test_xmlNewTextLen();
24844 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24845 rc = test_xmlNextElementSibling();
24846 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24847 rc = test_xmlNodeAddContent();
24848 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24849 rc = test_xmlNodeAddContentLen();
24850 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24851 rc = test_xmlNodeBufGetContent();
24852 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24853 rc = test_xmlNodeDump();
24854 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24855 rc = test_xmlNodeDumpOutput();
24856 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24857 rc = test_xmlNodeGetBase();
24858 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24859 rc = test_xmlNodeGetContent();
24860 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24861 rc = test_xmlNodeGetLang();
24862 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24863 rc = test_xmlNodeGetSpacePreserve();
24864 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24865 rc = test_xmlNodeIsText();
24866 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24867 rc = test_xmlNodeListGetRawString();
24868 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24869 rc = test_xmlNodeListGetString();
24870 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24871 rc = test_xmlNodeSetBase();
24872 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24873 rc = test_xmlNodeSetContent();
24874 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24875 rc = test_xmlNodeSetContentLen();
24876 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24877 rc = test_xmlNodeSetLang();
24878 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24879 rc = test_xmlNodeSetName();
24880 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24881 rc = test_xmlNodeSetSpacePreserve();
24882 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24883 rc = test_xmlPreviousElementSibling();
24884 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24885 rc = test_xmlReconciliateNs();
24886 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24887 rc = test_xmlRemoveProp();
24888 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24889 rc = test_xmlReplaceNode();
24890 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24891 rc = test_xmlSaveFile();
24892 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24893 rc = test_xmlSaveFileEnc();
24894 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24895 rc = test_xmlSaveFileTo();
24896 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24897 rc = test_xmlSaveFormatFile();
24898 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24899 rc = test_xmlSaveFormatFileEnc();
24900 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24901 rc = test_xmlSaveFormatFileTo();
24902 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24903 rc = test_xmlSearchNs();
24904 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24905 rc = test_xmlSearchNsByHref();
24906 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24907 rc = test_xmlSetBufferAllocationScheme();
24908 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24909 rc = test_xmlSetCompressMode();
24910 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24911 rc = test_xmlSetDocCompressMode();
24912 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24913 rc = test_xmlSetNs();
24914 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24915 rc = test_xmlSetNsProp();
24916 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24917 rc = test_xmlSetProp();
24918 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24919 rc = test_xmlSplitQName2();
24920 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24921 rc = test_xmlSplitQName3();
24922 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24923 rc = test_xmlStringGetNodeList();
24924 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24925 rc = test_xmlStringLenGetNodeList();
24926 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24927 rc = test_xmlTextConcat();
24928 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24929 rc = test_xmlTextMerge();
24930 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24931 rc = test_xmlUnsetNsProp();
24932 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24933 rc = test_xmlUnsetProp();
24934 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24935 rc = test_xmlValidateNCName();
24936 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24937 rc = test_xmlValidateNMToken();
24938 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24939 rc = test_xmlValidateName();
24940 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24941 rc = test_xmlValidateQName();
24942 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
24945 printf("Module tree: %d errors\n", test_ret);
24950 test_xmlBuildRelativeURI(void) {
24955 xmlChar * URI; /* the URI reference under consideration */
24957 xmlChar * base; /* the base value */
24960 for (n_URI = 0;n_URI < gen_nb_const_xmlChar_ptr;n_URI++) {
24961 for (n_base = 0;n_base < gen_nb_const_xmlChar_ptr;n_base++) {
24962 mem_base = xmlMemBlocks();
24963 URI = gen_const_xmlChar_ptr(n_URI, 0);
24964 base = gen_const_xmlChar_ptr(n_base, 1);
24966 ret_val = xmlBuildRelativeURI((const xmlChar *)URI, (const xmlChar *)base);
24967 desret_xmlChar_ptr(ret_val);
24969 des_const_xmlChar_ptr(n_URI, (const xmlChar *)URI, 0);
24970 des_const_xmlChar_ptr(n_base, (const xmlChar *)base, 1);
24971 xmlResetLastError();
24972 if (mem_base != xmlMemBlocks()) {
24973 printf("Leak of %d blocks found in xmlBuildRelativeURI",
24974 xmlMemBlocks() - mem_base);
24976 printf(" %d", n_URI);
24977 printf(" %d", n_base);
24989 test_xmlBuildURI(void) {
24994 xmlChar * URI; /* the URI instance found in the document */
24996 xmlChar * base; /* the base value */
24999 for (n_URI = 0;n_URI < gen_nb_const_xmlChar_ptr;n_URI++) {
25000 for (n_base = 0;n_base < gen_nb_const_xmlChar_ptr;n_base++) {
25001 mem_base = xmlMemBlocks();
25002 URI = gen_const_xmlChar_ptr(n_URI, 0);
25003 base = gen_const_xmlChar_ptr(n_base, 1);
25005 ret_val = xmlBuildURI((const xmlChar *)URI, (const xmlChar *)base);
25006 desret_xmlChar_ptr(ret_val);
25008 des_const_xmlChar_ptr(n_URI, (const xmlChar *)URI, 0);
25009 des_const_xmlChar_ptr(n_base, (const xmlChar *)base, 1);
25010 xmlResetLastError();
25011 if (mem_base != xmlMemBlocks()) {
25012 printf("Leak of %d blocks found in xmlBuildURI",
25013 xmlMemBlocks() - mem_base);
25015 printf(" %d", n_URI);
25016 printf(" %d", n_base);
25028 test_xmlCanonicPath(void) {
25033 xmlChar * path; /* the resource locator in a filesystem notation */
25036 for (n_path = 0;n_path < gen_nb_const_xmlChar_ptr;n_path++) {
25037 mem_base = xmlMemBlocks();
25038 path = gen_const_xmlChar_ptr(n_path, 0);
25040 ret_val = xmlCanonicPath((const xmlChar *)path);
25041 desret_xmlChar_ptr(ret_val);
25043 des_const_xmlChar_ptr(n_path, (const xmlChar *)path, 0);
25044 xmlResetLastError();
25045 if (mem_base != xmlMemBlocks()) {
25046 printf("Leak of %d blocks found in xmlCanonicPath",
25047 xmlMemBlocks() - mem_base);
25049 printf(" %d", n_path);
25060 test_xmlCreateURI(void) {
25064 /* missing type support */
25070 test_xmlNormalizeURIPath(void) {
25075 char * path; /* pointer to the path string */
25078 for (n_path = 0;n_path < gen_nb_char_ptr;n_path++) {
25079 mem_base = xmlMemBlocks();
25080 path = gen_char_ptr(n_path, 0);
25082 ret_val = xmlNormalizeURIPath(path);
25083 desret_int(ret_val);
25085 des_char_ptr(n_path, path, 0);
25086 xmlResetLastError();
25087 if (mem_base != xmlMemBlocks()) {
25088 printf("Leak of %d blocks found in xmlNormalizeURIPath",
25089 xmlMemBlocks() - mem_base);
25091 printf(" %d", n_path);
25102 test_xmlParseURI(void) {
25106 /* missing type support */
25112 test_xmlParseURIRaw(void) {
25116 /* missing type support */
25121 #define gen_nb_xmlURIPtr 1
25122 static xmlURIPtr gen_xmlURIPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
25125 static void des_xmlURIPtr(int no ATTRIBUTE_UNUSED, xmlURIPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
25129 test_xmlParseURIReference(void) {
25134 xmlURIPtr uri; /* pointer to an URI structure */
25136 char * str; /* the string to analyze */
25139 for (n_uri = 0;n_uri < gen_nb_xmlURIPtr;n_uri++) {
25140 for (n_str = 0;n_str < gen_nb_const_char_ptr;n_str++) {
25141 mem_base = xmlMemBlocks();
25142 uri = gen_xmlURIPtr(n_uri, 0);
25143 str = gen_const_char_ptr(n_str, 1);
25145 ret_val = xmlParseURIReference(uri, (const char *)str);
25146 desret_int(ret_val);
25148 des_xmlURIPtr(n_uri, uri, 0);
25149 des_const_char_ptr(n_str, (const char *)str, 1);
25150 xmlResetLastError();
25151 if (mem_base != xmlMemBlocks()) {
25152 printf("Leak of %d blocks found in xmlParseURIReference",
25153 xmlMemBlocks() - mem_base);
25155 printf(" %d", n_uri);
25156 printf(" %d", n_str);
25168 test_xmlPathToURI(void) {
25173 xmlChar * path; /* the resource locator in a filesystem notation */
25176 for (n_path = 0;n_path < gen_nb_const_xmlChar_ptr;n_path++) {
25177 mem_base = xmlMemBlocks();
25178 path = gen_const_xmlChar_ptr(n_path, 0);
25180 ret_val = xmlPathToURI((const xmlChar *)path);
25181 desret_xmlChar_ptr(ret_val);
25183 des_const_xmlChar_ptr(n_path, (const xmlChar *)path, 0);
25184 xmlResetLastError();
25185 if (mem_base != xmlMemBlocks()) {
25186 printf("Leak of %d blocks found in xmlPathToURI",
25187 xmlMemBlocks() - mem_base);
25189 printf(" %d", n_path);
25200 test_xmlPrintURI(void) {
25204 FILE * stream; /* a FILE* for the output */
25206 xmlURIPtr uri; /* pointer to an xmlURI */
25209 for (n_stream = 0;n_stream < gen_nb_FILE_ptr;n_stream++) {
25210 for (n_uri = 0;n_uri < gen_nb_xmlURIPtr;n_uri++) {
25211 mem_base = xmlMemBlocks();
25212 stream = gen_FILE_ptr(n_stream, 0);
25213 uri = gen_xmlURIPtr(n_uri, 1);
25215 xmlPrintURI(stream, uri);
25217 des_FILE_ptr(n_stream, stream, 0);
25218 des_xmlURIPtr(n_uri, uri, 1);
25219 xmlResetLastError();
25220 if (mem_base != xmlMemBlocks()) {
25221 printf("Leak of %d blocks found in xmlPrintURI",
25222 xmlMemBlocks() - mem_base);
25224 printf(" %d", n_stream);
25225 printf(" %d", n_uri);
25237 test_xmlSaveUri(void) {
25242 xmlURIPtr uri; /* pointer to an xmlURI */
25245 for (n_uri = 0;n_uri < gen_nb_xmlURIPtr;n_uri++) {
25246 mem_base = xmlMemBlocks();
25247 uri = gen_xmlURIPtr(n_uri, 0);
25249 ret_val = xmlSaveUri(uri);
25250 desret_xmlChar_ptr(ret_val);
25252 des_xmlURIPtr(n_uri, uri, 0);
25253 xmlResetLastError();
25254 if (mem_base != xmlMemBlocks()) {
25255 printf("Leak of %d blocks found in xmlSaveUri",
25256 xmlMemBlocks() - mem_base);
25258 printf(" %d", n_uri);
25269 test_xmlURIEscape(void) {
25274 xmlChar * str; /* the string of the URI to escape */
25277 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
25278 mem_base = xmlMemBlocks();
25279 str = gen_const_xmlChar_ptr(n_str, 0);
25281 ret_val = xmlURIEscape((const xmlChar *)str);
25282 desret_xmlChar_ptr(ret_val);
25284 des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 0);
25285 xmlResetLastError();
25286 if (mem_base != xmlMemBlocks()) {
25287 printf("Leak of %d blocks found in xmlURIEscape",
25288 xmlMemBlocks() - mem_base);
25290 printf(" %d", n_str);
25301 test_xmlURIEscapeStr(void) {
25306 xmlChar * str; /* string to escape */
25308 xmlChar * list; /* exception list string of chars not to escape */
25311 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
25312 for (n_list = 0;n_list < gen_nb_const_xmlChar_ptr;n_list++) {
25313 mem_base = xmlMemBlocks();
25314 str = gen_const_xmlChar_ptr(n_str, 0);
25315 list = gen_const_xmlChar_ptr(n_list, 1);
25317 ret_val = xmlURIEscapeStr((const xmlChar *)str, (const xmlChar *)list);
25318 desret_xmlChar_ptr(ret_val);
25320 des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 0);
25321 des_const_xmlChar_ptr(n_list, (const xmlChar *)list, 1);
25322 xmlResetLastError();
25323 if (mem_base != xmlMemBlocks()) {
25324 printf("Leak of %d blocks found in xmlURIEscapeStr",
25325 xmlMemBlocks() - mem_base);
25327 printf(" %d", n_str);
25328 printf(" %d", n_list);
25340 test_xmlURIUnescapeString(void) {
25344 /* missing type support */
25353 if (quiet == 0) printf("Testing uri : 10 of 15 functions ...\n");
25354 rc = test_xmlBuildRelativeURI();
25355 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25356 rc = test_xmlBuildURI();
25357 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25358 rc = test_xmlCanonicPath();
25359 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25360 rc = test_xmlCreateURI();
25361 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25362 rc = test_xmlNormalizeURIPath();
25363 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25364 rc = test_xmlParseURI();
25365 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25366 rc = test_xmlParseURIRaw();
25367 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25368 rc = test_xmlParseURIReference();
25369 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25370 rc = test_xmlPathToURI();
25371 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25372 rc = test_xmlPrintURI();
25373 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25374 rc = test_xmlSaveUri();
25375 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25376 rc = test_xmlURIEscape();
25377 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25378 rc = test_xmlURIEscapeStr();
25379 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25380 rc = test_xmlURIUnescapeString();
25381 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
25384 printf("Module uri: %d errors\n", test_ret);
25389 test_xmlAddAttributeDecl(void) {
25393 xmlAttributePtr ret_val;
25394 xmlValidCtxtPtr ctxt; /* the validation context */
25396 xmlDtdPtr dtd; /* pointer to the DTD */
25398 xmlChar * elem; /* the element name */
25400 xmlChar * name; /* the attribute name */
25402 xmlChar * ns; /* the attribute namespace prefix */
25404 xmlAttributeType type; /* the attribute type */
25406 xmlAttributeDefault def; /* the attribute default type */
25408 xmlChar * defaultValue; /* the attribute default value */
25409 int n_defaultValue;
25410 xmlEnumerationPtr tree; /* if it's an enumeration, the associated list */
25413 for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
25414 for (n_dtd = 0;n_dtd < gen_nb_xmlDtdPtr;n_dtd++) {
25415 for (n_elem = 0;n_elem < gen_nb_const_xmlChar_ptr;n_elem++) {
25416 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
25417 for (n_ns = 0;n_ns < gen_nb_const_xmlChar_ptr;n_ns++) {
25418 for (n_type = 0;n_type < gen_nb_xmlAttributeType;n_type++) {
25419 for (n_def = 0;n_def < gen_nb_xmlAttributeDefault;n_def++) {
25420 for (n_defaultValue = 0;n_defaultValue < gen_nb_const_xmlChar_ptr;n_defaultValue++) {
25421 for (n_tree = 0;n_tree < gen_nb_xmlEnumerationPtr;n_tree++) {
25422 mem_base = xmlMemBlocks();
25423 ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
25424 dtd = gen_xmlDtdPtr(n_dtd, 1);
25425 elem = gen_const_xmlChar_ptr(n_elem, 2);
25426 name = gen_const_xmlChar_ptr(n_name, 3);
25427 ns = gen_const_xmlChar_ptr(n_ns, 4);
25428 type = gen_xmlAttributeType(n_type, 5);
25429 def = gen_xmlAttributeDefault(n_def, 6);
25430 defaultValue = gen_const_xmlChar_ptr(n_defaultValue, 7);
25431 tree = gen_xmlEnumerationPtr(n_tree, 8);
25433 ret_val = xmlAddAttributeDecl(ctxt, dtd, (const xmlChar *)elem, (const xmlChar *)name, (const xmlChar *)ns, type, def, (const xmlChar *)defaultValue, tree);
25434 desret_xmlAttributePtr(ret_val);
25436 des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
25437 des_xmlDtdPtr(n_dtd, dtd, 1);
25438 des_const_xmlChar_ptr(n_elem, (const xmlChar *)elem, 2);
25439 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 3);
25440 des_const_xmlChar_ptr(n_ns, (const xmlChar *)ns, 4);
25441 des_xmlAttributeType(n_type, type, 5);
25442 des_xmlAttributeDefault(n_def, def, 6);
25443 des_const_xmlChar_ptr(n_defaultValue, (const xmlChar *)defaultValue, 7);
25444 des_xmlEnumerationPtr(n_tree, tree, 8);
25445 xmlResetLastError();
25446 if (mem_base != xmlMemBlocks()) {
25447 printf("Leak of %d blocks found in xmlAddAttributeDecl",
25448 xmlMemBlocks() - mem_base);
25450 printf(" %d", n_ctxt);
25451 printf(" %d", n_dtd);
25452 printf(" %d", n_elem);
25453 printf(" %d", n_name);
25454 printf(" %d", n_ns);
25455 printf(" %d", n_type);
25456 printf(" %d", n_def);
25457 printf(" %d", n_defaultValue);
25458 printf(" %d", n_tree);
25477 test_xmlAddElementDecl(void) {
25481 xmlElementPtr ret_val;
25482 xmlValidCtxtPtr ctxt; /* the validation context */
25484 xmlDtdPtr dtd; /* pointer to the DTD */
25486 xmlChar * name; /* the entity name */
25488 xmlElementTypeVal type; /* the element type */
25490 xmlElementContentPtr content; /* the element content tree or NULL */
25493 for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
25494 for (n_dtd = 0;n_dtd < gen_nb_xmlDtdPtr;n_dtd++) {
25495 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
25496 for (n_type = 0;n_type < gen_nb_xmlElementTypeVal;n_type++) {
25497 for (n_content = 0;n_content < gen_nb_xmlElementContentPtr;n_content++) {
25498 mem_base = xmlMemBlocks();
25499 ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
25500 dtd = gen_xmlDtdPtr(n_dtd, 1);
25501 name = gen_const_xmlChar_ptr(n_name, 2);
25502 type = gen_xmlElementTypeVal(n_type, 3);
25503 content = gen_xmlElementContentPtr(n_content, 4);
25505 ret_val = xmlAddElementDecl(ctxt, dtd, (const xmlChar *)name, type, content);
25506 desret_xmlElementPtr(ret_val);
25508 des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
25509 des_xmlDtdPtr(n_dtd, dtd, 1);
25510 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
25511 des_xmlElementTypeVal(n_type, type, 3);
25512 des_xmlElementContentPtr(n_content, content, 4);
25513 xmlResetLastError();
25514 if (mem_base != xmlMemBlocks()) {
25515 printf("Leak of %d blocks found in xmlAddElementDecl",
25516 xmlMemBlocks() - mem_base);
25518 printf(" %d", n_ctxt);
25519 printf(" %d", n_dtd);
25520 printf(" %d", n_name);
25521 printf(" %d", n_type);
25522 printf(" %d", n_content);
25537 test_xmlAddID(void) {
25541 /* missing type support */
25547 test_xmlAddNotationDecl(void) {
25551 /* missing type support */
25557 test_xmlAddRef(void) {
25561 /* missing type support */
25566 #define gen_nb_xmlAttributeTablePtr 1
25567 static xmlAttributeTablePtr gen_xmlAttributeTablePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
25570 static void des_xmlAttributeTablePtr(int no ATTRIBUTE_UNUSED, xmlAttributeTablePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
25574 test_xmlCopyAttributeTable(void) {
25578 /* missing type support */
25584 test_xmlCopyDocElementContent(void) {
25588 xmlElementContentPtr ret_val;
25589 xmlDocPtr doc; /* the document owning the element declaration */
25591 xmlElementContentPtr cur; /* An element content pointer. */
25594 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
25595 for (n_cur = 0;n_cur < gen_nb_xmlElementContentPtr;n_cur++) {
25596 mem_base = xmlMemBlocks();
25597 doc = gen_xmlDocPtr(n_doc, 0);
25598 cur = gen_xmlElementContentPtr(n_cur, 1);
25600 ret_val = xmlCopyDocElementContent(doc, cur);
25601 desret_xmlElementContentPtr(ret_val);
25603 des_xmlDocPtr(n_doc, doc, 0);
25604 des_xmlElementContentPtr(n_cur, cur, 1);
25605 xmlResetLastError();
25606 if (mem_base != xmlMemBlocks()) {
25607 printf("Leak of %d blocks found in xmlCopyDocElementContent",
25608 xmlMemBlocks() - mem_base);
25610 printf(" %d", n_doc);
25611 printf(" %d", n_cur);
25623 test_xmlCopyElementContent(void) {
25627 xmlElementContentPtr ret_val;
25628 xmlElementContentPtr cur; /* An element content pointer. */
25631 for (n_cur = 0;n_cur < gen_nb_xmlElementContentPtr;n_cur++) {
25632 mem_base = xmlMemBlocks();
25633 cur = gen_xmlElementContentPtr(n_cur, 0);
25635 ret_val = xmlCopyElementContent(cur);
25636 desret_xmlElementContentPtr(ret_val);
25638 des_xmlElementContentPtr(n_cur, cur, 0);
25639 xmlResetLastError();
25640 if (mem_base != xmlMemBlocks()) {
25641 printf("Leak of %d blocks found in xmlCopyElementContent",
25642 xmlMemBlocks() - mem_base);
25644 printf(" %d", n_cur);
25654 #define gen_nb_xmlElementTablePtr 1
25655 static xmlElementTablePtr gen_xmlElementTablePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
25658 static void des_xmlElementTablePtr(int no ATTRIBUTE_UNUSED, xmlElementTablePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
25662 test_xmlCopyElementTable(void) {
25666 /* missing type support */
25672 test_xmlCopyEnumeration(void) {
25676 /* missing type support */
25681 #define gen_nb_xmlNotationTablePtr 1
25682 static xmlNotationTablePtr gen_xmlNotationTablePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
25685 static void des_xmlNotationTablePtr(int no ATTRIBUTE_UNUSED, xmlNotationTablePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
25689 test_xmlCopyNotationTable(void) {
25693 /* missing type support */
25699 test_xmlCreateEnumeration(void) {
25703 /* missing type support */
25708 #define gen_nb_xmlAttributePtr 1
25709 static xmlAttributePtr gen_xmlAttributePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
25712 static void des_xmlAttributePtr(int no ATTRIBUTE_UNUSED, xmlAttributePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
25716 test_xmlDumpAttributeDecl(void) {
25719 #if defined(LIBXML_OUTPUT_ENABLED)
25721 xmlBufferPtr buf; /* the XML buffer output */
25723 xmlAttributePtr attr; /* An attribute declaration */
25726 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
25727 for (n_attr = 0;n_attr < gen_nb_xmlAttributePtr;n_attr++) {
25728 mem_base = xmlMemBlocks();
25729 buf = gen_xmlBufferPtr(n_buf, 0);
25730 attr = gen_xmlAttributePtr(n_attr, 1);
25732 xmlDumpAttributeDecl(buf, attr);
25734 des_xmlBufferPtr(n_buf, buf, 0);
25735 des_xmlAttributePtr(n_attr, attr, 1);
25736 xmlResetLastError();
25737 if (mem_base != xmlMemBlocks()) {
25738 printf("Leak of %d blocks found in xmlDumpAttributeDecl",
25739 xmlMemBlocks() - mem_base);
25741 printf(" %d", n_buf);
25742 printf(" %d", n_attr);
25755 test_xmlDumpAttributeTable(void) {
25758 #if defined(LIBXML_OUTPUT_ENABLED)
25760 xmlBufferPtr buf; /* the XML buffer output */
25762 xmlAttributeTablePtr table; /* An attribute table */
25765 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
25766 for (n_table = 0;n_table < gen_nb_xmlAttributeTablePtr;n_table++) {
25767 mem_base = xmlMemBlocks();
25768 buf = gen_xmlBufferPtr(n_buf, 0);
25769 table = gen_xmlAttributeTablePtr(n_table, 1);
25771 xmlDumpAttributeTable(buf, table);
25773 des_xmlBufferPtr(n_buf, buf, 0);
25774 des_xmlAttributeTablePtr(n_table, table, 1);
25775 xmlResetLastError();
25776 if (mem_base != xmlMemBlocks()) {
25777 printf("Leak of %d blocks found in xmlDumpAttributeTable",
25778 xmlMemBlocks() - mem_base);
25780 printf(" %d", n_buf);
25781 printf(" %d", n_table);
25793 #define gen_nb_xmlElementPtr 1
25794 static xmlElementPtr gen_xmlElementPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
25797 static void des_xmlElementPtr(int no ATTRIBUTE_UNUSED, xmlElementPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
25801 test_xmlDumpElementDecl(void) {
25804 #if defined(LIBXML_OUTPUT_ENABLED)
25806 xmlBufferPtr buf; /* the XML buffer output */
25808 xmlElementPtr elem; /* An element table */
25811 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
25812 for (n_elem = 0;n_elem < gen_nb_xmlElementPtr;n_elem++) {
25813 mem_base = xmlMemBlocks();
25814 buf = gen_xmlBufferPtr(n_buf, 0);
25815 elem = gen_xmlElementPtr(n_elem, 1);
25817 xmlDumpElementDecl(buf, elem);
25819 des_xmlBufferPtr(n_buf, buf, 0);
25820 des_xmlElementPtr(n_elem, elem, 1);
25821 xmlResetLastError();
25822 if (mem_base != xmlMemBlocks()) {
25823 printf("Leak of %d blocks found in xmlDumpElementDecl",
25824 xmlMemBlocks() - mem_base);
25826 printf(" %d", n_buf);
25827 printf(" %d", n_elem);
25840 test_xmlDumpElementTable(void) {
25843 #if defined(LIBXML_OUTPUT_ENABLED)
25845 xmlBufferPtr buf; /* the XML buffer output */
25847 xmlElementTablePtr table; /* An element table */
25850 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
25851 for (n_table = 0;n_table < gen_nb_xmlElementTablePtr;n_table++) {
25852 mem_base = xmlMemBlocks();
25853 buf = gen_xmlBufferPtr(n_buf, 0);
25854 table = gen_xmlElementTablePtr(n_table, 1);
25856 xmlDumpElementTable(buf, table);
25858 des_xmlBufferPtr(n_buf, buf, 0);
25859 des_xmlElementTablePtr(n_table, table, 1);
25860 xmlResetLastError();
25861 if (mem_base != xmlMemBlocks()) {
25862 printf("Leak of %d blocks found in xmlDumpElementTable",
25863 xmlMemBlocks() - mem_base);
25865 printf(" %d", n_buf);
25866 printf(" %d", n_table);
25878 #define gen_nb_xmlNotationPtr 1
25879 static xmlNotationPtr gen_xmlNotationPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
25882 static void des_xmlNotationPtr(int no ATTRIBUTE_UNUSED, xmlNotationPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
25886 test_xmlDumpNotationDecl(void) {
25889 #if defined(LIBXML_OUTPUT_ENABLED)
25891 xmlBufferPtr buf; /* the XML buffer output */
25893 xmlNotationPtr nota; /* A notation declaration */
25896 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
25897 for (n_nota = 0;n_nota < gen_nb_xmlNotationPtr;n_nota++) {
25898 mem_base = xmlMemBlocks();
25899 buf = gen_xmlBufferPtr(n_buf, 0);
25900 nota = gen_xmlNotationPtr(n_nota, 1);
25902 xmlDumpNotationDecl(buf, nota);
25904 des_xmlBufferPtr(n_buf, buf, 0);
25905 des_xmlNotationPtr(n_nota, nota, 1);
25906 xmlResetLastError();
25907 if (mem_base != xmlMemBlocks()) {
25908 printf("Leak of %d blocks found in xmlDumpNotationDecl",
25909 xmlMemBlocks() - mem_base);
25911 printf(" %d", n_buf);
25912 printf(" %d", n_nota);
25925 test_xmlDumpNotationTable(void) {
25928 #if defined(LIBXML_OUTPUT_ENABLED)
25930 xmlBufferPtr buf; /* the XML buffer output */
25932 xmlNotationTablePtr table; /* A notation table */
25935 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
25936 for (n_table = 0;n_table < gen_nb_xmlNotationTablePtr;n_table++) {
25937 mem_base = xmlMemBlocks();
25938 buf = gen_xmlBufferPtr(n_buf, 0);
25939 table = gen_xmlNotationTablePtr(n_table, 1);
25941 xmlDumpNotationTable(buf, table);
25943 des_xmlBufferPtr(n_buf, buf, 0);
25944 des_xmlNotationTablePtr(n_table, table, 1);
25945 xmlResetLastError();
25946 if (mem_base != xmlMemBlocks()) {
25947 printf("Leak of %d blocks found in xmlDumpNotationTable",
25948 xmlMemBlocks() - mem_base);
25950 printf(" %d", n_buf);
25951 printf(" %d", n_table);
25964 test_xmlGetDtdAttrDesc(void) {
25968 xmlAttributePtr ret_val;
25969 xmlDtdPtr dtd; /* a pointer to the DtD to search */
25971 xmlChar * elem; /* the element name */
25973 xmlChar * name; /* the attribute name */
25976 for (n_dtd = 0;n_dtd < gen_nb_xmlDtdPtr;n_dtd++) {
25977 for (n_elem = 0;n_elem < gen_nb_const_xmlChar_ptr;n_elem++) {
25978 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
25979 mem_base = xmlMemBlocks();
25980 dtd = gen_xmlDtdPtr(n_dtd, 0);
25981 elem = gen_const_xmlChar_ptr(n_elem, 1);
25982 name = gen_const_xmlChar_ptr(n_name, 2);
25984 ret_val = xmlGetDtdAttrDesc(dtd, (const xmlChar *)elem, (const xmlChar *)name);
25985 desret_xmlAttributePtr(ret_val);
25987 des_xmlDtdPtr(n_dtd, dtd, 0);
25988 des_const_xmlChar_ptr(n_elem, (const xmlChar *)elem, 1);
25989 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
25990 xmlResetLastError();
25991 if (mem_base != xmlMemBlocks()) {
25992 printf("Leak of %d blocks found in xmlGetDtdAttrDesc",
25993 xmlMemBlocks() - mem_base);
25995 printf(" %d", n_dtd);
25996 printf(" %d", n_elem);
25997 printf(" %d", n_name);
26010 test_xmlGetDtdElementDesc(void) {
26014 xmlElementPtr ret_val;
26015 xmlDtdPtr dtd; /* a pointer to the DtD to search */
26017 xmlChar * name; /* the element name */
26020 for (n_dtd = 0;n_dtd < gen_nb_xmlDtdPtr;n_dtd++) {
26021 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
26022 mem_base = xmlMemBlocks();
26023 dtd = gen_xmlDtdPtr(n_dtd, 0);
26024 name = gen_const_xmlChar_ptr(n_name, 1);
26026 ret_val = xmlGetDtdElementDesc(dtd, (const xmlChar *)name);
26027 desret_xmlElementPtr(ret_val);
26029 des_xmlDtdPtr(n_dtd, dtd, 0);
26030 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
26031 xmlResetLastError();
26032 if (mem_base != xmlMemBlocks()) {
26033 printf("Leak of %d blocks found in xmlGetDtdElementDesc",
26034 xmlMemBlocks() - mem_base);
26036 printf(" %d", n_dtd);
26037 printf(" %d", n_name);
26049 test_xmlGetDtdNotationDesc(void) {
26053 /* missing type support */
26059 test_xmlGetDtdQAttrDesc(void) {
26063 xmlAttributePtr ret_val;
26064 xmlDtdPtr dtd; /* a pointer to the DtD to search */
26066 xmlChar * elem; /* the element name */
26068 xmlChar * name; /* the attribute name */
26070 xmlChar * prefix; /* the attribute namespace prefix */
26073 for (n_dtd = 0;n_dtd < gen_nb_xmlDtdPtr;n_dtd++) {
26074 for (n_elem = 0;n_elem < gen_nb_const_xmlChar_ptr;n_elem++) {
26075 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
26076 for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
26077 mem_base = xmlMemBlocks();
26078 dtd = gen_xmlDtdPtr(n_dtd, 0);
26079 elem = gen_const_xmlChar_ptr(n_elem, 1);
26080 name = gen_const_xmlChar_ptr(n_name, 2);
26081 prefix = gen_const_xmlChar_ptr(n_prefix, 3);
26083 ret_val = xmlGetDtdQAttrDesc(dtd, (const xmlChar *)elem, (const xmlChar *)name, (const xmlChar *)prefix);
26084 desret_xmlAttributePtr(ret_val);
26086 des_xmlDtdPtr(n_dtd, dtd, 0);
26087 des_const_xmlChar_ptr(n_elem, (const xmlChar *)elem, 1);
26088 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
26089 des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 3);
26090 xmlResetLastError();
26091 if (mem_base != xmlMemBlocks()) {
26092 printf("Leak of %d blocks found in xmlGetDtdQAttrDesc",
26093 xmlMemBlocks() - mem_base);
26095 printf(" %d", n_dtd);
26096 printf(" %d", n_elem);
26097 printf(" %d", n_name);
26098 printf(" %d", n_prefix);
26112 test_xmlGetDtdQElementDesc(void) {
26116 xmlElementPtr ret_val;
26117 xmlDtdPtr dtd; /* a pointer to the DtD to search */
26119 xmlChar * name; /* the element name */
26121 xmlChar * prefix; /* the element namespace prefix */
26124 for (n_dtd = 0;n_dtd < gen_nb_xmlDtdPtr;n_dtd++) {
26125 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
26126 for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
26127 mem_base = xmlMemBlocks();
26128 dtd = gen_xmlDtdPtr(n_dtd, 0);
26129 name = gen_const_xmlChar_ptr(n_name, 1);
26130 prefix = gen_const_xmlChar_ptr(n_prefix, 2);
26132 ret_val = xmlGetDtdQElementDesc(dtd, (const xmlChar *)name, (const xmlChar *)prefix);
26133 desret_xmlElementPtr(ret_val);
26135 des_xmlDtdPtr(n_dtd, dtd, 0);
26136 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
26137 des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 2);
26138 xmlResetLastError();
26139 if (mem_base != xmlMemBlocks()) {
26140 printf("Leak of %d blocks found in xmlGetDtdQElementDesc",
26141 xmlMemBlocks() - mem_base);
26143 printf(" %d", n_dtd);
26144 printf(" %d", n_name);
26145 printf(" %d", n_prefix);
26158 test_xmlGetID(void) {
26162 xmlAttrPtr ret_val;
26163 xmlDocPtr doc; /* pointer to the document */
26165 xmlChar * ID; /* the ID value */
26168 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
26169 for (n_ID = 0;n_ID < gen_nb_const_xmlChar_ptr;n_ID++) {
26170 mem_base = xmlMemBlocks();
26171 doc = gen_xmlDocPtr(n_doc, 0);
26172 ID = gen_const_xmlChar_ptr(n_ID, 1);
26174 ret_val = xmlGetID(doc, (const xmlChar *)ID);
26175 desret_xmlAttrPtr(ret_val);
26177 des_xmlDocPtr(n_doc, doc, 0);
26178 des_const_xmlChar_ptr(n_ID, (const xmlChar *)ID, 1);
26179 xmlResetLastError();
26180 if (mem_base != xmlMemBlocks()) {
26181 printf("Leak of %d blocks found in xmlGetID",
26182 xmlMemBlocks() - mem_base);
26184 printf(" %d", n_doc);
26185 printf(" %d", n_ID);
26197 test_xmlGetRefs(void) {
26201 /* missing type support */
26207 test_xmlIsID(void) {
26212 xmlDocPtr doc; /* the document */
26214 xmlNodePtr elem; /* the element carrying the attribute */
26216 xmlAttrPtr attr; /* the attribute */
26219 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
26220 for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
26221 for (n_attr = 0;n_attr < gen_nb_xmlAttrPtr;n_attr++) {
26222 mem_base = xmlMemBlocks();
26223 doc = gen_xmlDocPtr(n_doc, 0);
26224 elem = gen_xmlNodePtr(n_elem, 1);
26225 attr = gen_xmlAttrPtr(n_attr, 2);
26227 ret_val = xmlIsID(doc, elem, attr);
26228 desret_int(ret_val);
26230 des_xmlDocPtr(n_doc, doc, 0);
26231 des_xmlNodePtr(n_elem, elem, 1);
26232 des_xmlAttrPtr(n_attr, attr, 2);
26233 xmlResetLastError();
26234 if (mem_base != xmlMemBlocks()) {
26235 printf("Leak of %d blocks found in xmlIsID",
26236 xmlMemBlocks() - mem_base);
26238 printf(" %d", n_doc);
26239 printf(" %d", n_elem);
26240 printf(" %d", n_attr);
26253 test_xmlIsMixedElement(void) {
26258 xmlDocPtr doc; /* the document */
26260 xmlChar * name; /* the element name */
26263 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
26264 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
26265 mem_base = xmlMemBlocks();
26266 doc = gen_xmlDocPtr(n_doc, 0);
26267 name = gen_const_xmlChar_ptr(n_name, 1);
26269 ret_val = xmlIsMixedElement(doc, (const xmlChar *)name);
26270 desret_int(ret_val);
26272 des_xmlDocPtr(n_doc, doc, 0);
26273 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
26274 xmlResetLastError();
26275 if (mem_base != xmlMemBlocks()) {
26276 printf("Leak of %d blocks found in xmlIsMixedElement",
26277 xmlMemBlocks() - mem_base);
26279 printf(" %d", n_doc);
26280 printf(" %d", n_name);
26292 test_xmlIsRef(void) {
26297 xmlDocPtr doc; /* the document */
26299 xmlNodePtr elem; /* the element carrying the attribute */
26301 xmlAttrPtr attr; /* the attribute */
26304 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
26305 for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
26306 for (n_attr = 0;n_attr < gen_nb_xmlAttrPtr;n_attr++) {
26307 mem_base = xmlMemBlocks();
26308 doc = gen_xmlDocPtr(n_doc, 0);
26309 elem = gen_xmlNodePtr(n_elem, 1);
26310 attr = gen_xmlAttrPtr(n_attr, 2);
26312 ret_val = xmlIsRef(doc, elem, attr);
26313 desret_int(ret_val);
26315 des_xmlDocPtr(n_doc, doc, 0);
26316 des_xmlNodePtr(n_elem, elem, 1);
26317 des_xmlAttrPtr(n_attr, attr, 2);
26318 xmlResetLastError();
26319 if (mem_base != xmlMemBlocks()) {
26320 printf("Leak of %d blocks found in xmlIsRef",
26321 xmlMemBlocks() - mem_base);
26323 printf(" %d", n_doc);
26324 printf(" %d", n_elem);
26325 printf(" %d", n_attr);
26338 test_xmlNewDocElementContent(void) {
26342 xmlElementContentPtr ret_val;
26343 xmlDocPtr doc; /* the document */
26345 xmlChar * name; /* the subelement name or NULL */
26347 xmlElementContentType type; /* the type of element content decl */
26350 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
26351 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
26352 for (n_type = 0;n_type < gen_nb_xmlElementContentType;n_type++) {
26353 mem_base = xmlMemBlocks();
26354 doc = gen_xmlDocPtr(n_doc, 0);
26355 name = gen_const_xmlChar_ptr(n_name, 1);
26356 type = gen_xmlElementContentType(n_type, 2);
26358 ret_val = xmlNewDocElementContent(doc, (const xmlChar *)name, type);
26359 xmlFreeDocElementContent(doc, ret_val); ret_val = NULL;
26360 desret_xmlElementContentPtr(ret_val);
26362 des_xmlDocPtr(n_doc, doc, 0);
26363 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
26364 des_xmlElementContentType(n_type, type, 2);
26365 xmlResetLastError();
26366 if (mem_base != xmlMemBlocks()) {
26367 printf("Leak of %d blocks found in xmlNewDocElementContent",
26368 xmlMemBlocks() - mem_base);
26370 printf(" %d", n_doc);
26371 printf(" %d", n_name);
26372 printf(" %d", n_type);
26385 test_xmlNewElementContent(void) {
26389 xmlElementContentPtr ret_val;
26390 xmlChar * name; /* the subelement name or NULL */
26392 xmlElementContentType type; /* the type of element content decl */
26395 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
26396 for (n_type = 0;n_type < gen_nb_xmlElementContentType;n_type++) {
26397 mem_base = xmlMemBlocks();
26398 name = gen_const_xmlChar_ptr(n_name, 0);
26399 type = gen_xmlElementContentType(n_type, 1);
26401 ret_val = xmlNewElementContent((const xmlChar *)name, type);
26402 desret_xmlElementContentPtr(ret_val);
26404 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 0);
26405 des_xmlElementContentType(n_type, type, 1);
26406 xmlResetLastError();
26407 if (mem_base != xmlMemBlocks()) {
26408 printf("Leak of %d blocks found in xmlNewElementContent",
26409 xmlMemBlocks() - mem_base);
26411 printf(" %d", n_name);
26412 printf(" %d", n_type);
26424 test_xmlNewValidCtxt(void) {
26428 /* missing type support */
26434 test_xmlRemoveID(void) {
26439 xmlDocPtr doc; /* the document */
26441 xmlAttrPtr attr; /* the attribute */
26444 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
26445 for (n_attr = 0;n_attr < gen_nb_xmlAttrPtr;n_attr++) {
26446 mem_base = xmlMemBlocks();
26447 doc = gen_xmlDocPtr(n_doc, 0);
26448 attr = gen_xmlAttrPtr(n_attr, 1);
26450 ret_val = xmlRemoveID(doc, attr);
26451 desret_int(ret_val);
26453 des_xmlDocPtr(n_doc, doc, 0);
26454 des_xmlAttrPtr(n_attr, attr, 1);
26455 xmlResetLastError();
26456 if (mem_base != xmlMemBlocks()) {
26457 printf("Leak of %d blocks found in xmlRemoveID",
26458 xmlMemBlocks() - mem_base);
26460 printf(" %d", n_doc);
26461 printf(" %d", n_attr);
26473 test_xmlRemoveRef(void) {
26478 xmlDocPtr doc; /* the document */
26480 xmlAttrPtr attr; /* the attribute */
26483 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
26484 for (n_attr = 0;n_attr < gen_nb_xmlAttrPtr;n_attr++) {
26485 mem_base = xmlMemBlocks();
26486 doc = gen_xmlDocPtr(n_doc, 0);
26487 attr = gen_xmlAttrPtr(n_attr, 1);
26489 ret_val = xmlRemoveRef(doc, attr);
26490 desret_int(ret_val);
26492 des_xmlDocPtr(n_doc, doc, 0);
26493 des_xmlAttrPtr(n_attr, attr, 1);
26494 xmlResetLastError();
26495 if (mem_base != xmlMemBlocks()) {
26496 printf("Leak of %d blocks found in xmlRemoveRef",
26497 xmlMemBlocks() - mem_base);
26499 printf(" %d", n_doc);
26500 printf(" %d", n_attr);
26512 test_xmlSnprintfElementContent(void) {
26516 char * buf; /* an output buffer */
26518 int size; /* the buffer size */
26520 xmlElementContentPtr content; /* An element table */
26522 int englob; /* 1 if one must print the englobing parenthesis, 0 otherwise */
26525 for (n_buf = 0;n_buf < gen_nb_char_ptr;n_buf++) {
26526 for (n_size = 0;n_size < gen_nb_int;n_size++) {
26527 for (n_content = 0;n_content < gen_nb_xmlElementContentPtr;n_content++) {
26528 for (n_englob = 0;n_englob < gen_nb_int;n_englob++) {
26529 mem_base = xmlMemBlocks();
26530 buf = gen_char_ptr(n_buf, 0);
26531 size = gen_int(n_size, 1);
26532 content = gen_xmlElementContentPtr(n_content, 2);
26533 englob = gen_int(n_englob, 3);
26535 xmlSnprintfElementContent(buf, size, content, englob);
26537 des_char_ptr(n_buf, buf, 0);
26538 des_int(n_size, size, 1);
26539 des_xmlElementContentPtr(n_content, content, 2);
26540 des_int(n_englob, englob, 3);
26541 xmlResetLastError();
26542 if (mem_base != xmlMemBlocks()) {
26543 printf("Leak of %d blocks found in xmlSnprintfElementContent",
26544 xmlMemBlocks() - mem_base);
26546 printf(" %d", n_buf);
26547 printf(" %d", n_size);
26548 printf(" %d", n_content);
26549 printf(" %d", n_englob);
26563 test_xmlSprintfElementContent(void) {
26566 #if defined(LIBXML_OUTPUT_ENABLED)
26567 #ifdef LIBXML_OUTPUT_ENABLED
26569 char * buf; /* an output buffer */
26571 xmlElementContentPtr content; /* An element table */
26573 int englob; /* 1 if one must print the englobing parenthesis, 0 otherwise */
26576 for (n_buf = 0;n_buf < gen_nb_char_ptr;n_buf++) {
26577 for (n_content = 0;n_content < gen_nb_xmlElementContentPtr;n_content++) {
26578 for (n_englob = 0;n_englob < gen_nb_int;n_englob++) {
26579 mem_base = xmlMemBlocks();
26580 buf = gen_char_ptr(n_buf, 0);
26581 content = gen_xmlElementContentPtr(n_content, 1);
26582 englob = gen_int(n_englob, 2);
26584 xmlSprintfElementContent(buf, content, englob);
26586 des_char_ptr(n_buf, buf, 0);
26587 des_xmlElementContentPtr(n_content, content, 1);
26588 des_int(n_englob, englob, 2);
26589 xmlResetLastError();
26590 if (mem_base != xmlMemBlocks()) {
26591 printf("Leak of %d blocks found in xmlSprintfElementContent",
26592 xmlMemBlocks() - mem_base);
26594 printf(" %d", n_buf);
26595 printf(" %d", n_content);
26596 printf(" %d", n_englob);
26611 test_xmlValidBuildContentModel(void) {
26614 #if defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED)
26617 xmlValidCtxtPtr ctxt; /* a validation context */
26619 xmlElementPtr elem; /* an element declaration node */
26622 for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
26623 for (n_elem = 0;n_elem < gen_nb_xmlElementPtr;n_elem++) {
26624 mem_base = xmlMemBlocks();
26625 ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
26626 elem = gen_xmlElementPtr(n_elem, 1);
26628 ret_val = xmlValidBuildContentModel(ctxt, elem);
26629 desret_int(ret_val);
26631 des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
26632 des_xmlElementPtr(n_elem, elem, 1);
26633 xmlResetLastError();
26634 if (mem_base != xmlMemBlocks()) {
26635 printf("Leak of %d blocks found in xmlValidBuildContentModel",
26636 xmlMemBlocks() - mem_base);
26638 printf(" %d", n_ctxt);
26639 printf(" %d", n_elem);
26652 test_xmlValidCtxtNormalizeAttributeValue(void) {
26655 #if defined(LIBXML_VALID_ENABLED)
26658 xmlValidCtxtPtr ctxt; /* the validation context or NULL */
26660 xmlDocPtr doc; /* the document */
26662 xmlNodePtr elem; /* the parent */
26664 xmlChar * name; /* the attribute name */
26666 xmlChar * value; /* the attribute value */
26669 for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
26670 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
26671 for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
26672 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
26673 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
26674 mem_base = xmlMemBlocks();
26675 ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
26676 doc = gen_xmlDocPtr(n_doc, 1);
26677 elem = gen_xmlNodePtr(n_elem, 2);
26678 name = gen_const_xmlChar_ptr(n_name, 3);
26679 value = gen_const_xmlChar_ptr(n_value, 4);
26681 ret_val = xmlValidCtxtNormalizeAttributeValue(ctxt, doc, elem, (const xmlChar *)name, (const xmlChar *)value);
26682 desret_xmlChar_ptr(ret_val);
26684 des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
26685 des_xmlDocPtr(n_doc, doc, 1);
26686 des_xmlNodePtr(n_elem, elem, 2);
26687 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 3);
26688 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 4);
26689 xmlResetLastError();
26690 if (mem_base != xmlMemBlocks()) {
26691 printf("Leak of %d blocks found in xmlValidCtxtNormalizeAttributeValue",
26692 xmlMemBlocks() - mem_base);
26694 printf(" %d", n_ctxt);
26695 printf(" %d", n_doc);
26696 printf(" %d", n_elem);
26697 printf(" %d", n_name);
26698 printf(" %d", n_value);
26713 #define gen_nb_xmlElementContent_ptr 1
26714 static xmlElementContent * gen_xmlElementContent_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
26717 static void des_xmlElementContent_ptr(int no ATTRIBUTE_UNUSED, xmlElementContent * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
26721 test_xmlValidGetPotentialChildren(void) {
26724 #if defined(LIBXML_VALID_ENABLED)
26725 #ifdef LIBXML_VALID_ENABLED
26728 xmlElementContent * ctree; /* an element content tree */
26730 xmlChar ** names; /* an array to store the list of child names */
26732 int * len; /* a pointer to the number of element in the list */
26734 int max; /* the size of the array */
26737 for (n_ctree = 0;n_ctree < gen_nb_xmlElementContent_ptr;n_ctree++) {
26738 for (n_names = 0;n_names < gen_nb_const_xmlChar_ptr_ptr;n_names++) {
26739 for (n_len = 0;n_len < gen_nb_int_ptr;n_len++) {
26740 for (n_max = 0;n_max < gen_nb_int;n_max++) {
26741 mem_base = xmlMemBlocks();
26742 ctree = gen_xmlElementContent_ptr(n_ctree, 0);
26743 names = gen_const_xmlChar_ptr_ptr(n_names, 1);
26744 len = gen_int_ptr(n_len, 2);
26745 max = gen_int(n_max, 3);
26747 ret_val = xmlValidGetPotentialChildren(ctree, (const xmlChar **)names, len, max);
26748 desret_int(ret_val);
26750 des_xmlElementContent_ptr(n_ctree, ctree, 0);
26751 des_const_xmlChar_ptr_ptr(n_names, (const xmlChar **)names, 1);
26752 des_int_ptr(n_len, len, 2);
26753 des_int(n_max, max, 3);
26754 xmlResetLastError();
26755 if (mem_base != xmlMemBlocks()) {
26756 printf("Leak of %d blocks found in xmlValidGetPotentialChildren",
26757 xmlMemBlocks() - mem_base);
26759 printf(" %d", n_ctree);
26760 printf(" %d", n_names);
26761 printf(" %d", n_len);
26762 printf(" %d", n_max);
26778 test_xmlValidGetValidElements(void) {
26781 #if defined(LIBXML_VALID_ENABLED)
26782 #ifdef LIBXML_VALID_ENABLED
26785 xmlNode * prev; /* an element to insert after */
26787 xmlNode * next; /* an element to insert next */
26789 xmlChar ** names; /* an array to store the list of child names */
26791 int max; /* the size of the array */
26794 for (n_prev = 0;n_prev < gen_nb_xmlNodePtr;n_prev++) {
26795 for (n_next = 0;n_next < gen_nb_xmlNodePtr;n_next++) {
26796 for (n_names = 0;n_names < gen_nb_const_xmlChar_ptr_ptr;n_names++) {
26797 for (n_max = 0;n_max < gen_nb_int;n_max++) {
26798 mem_base = xmlMemBlocks();
26799 prev = gen_xmlNodePtr(n_prev, 0);
26800 next = gen_xmlNodePtr(n_next, 1);
26801 names = gen_const_xmlChar_ptr_ptr(n_names, 2);
26802 max = gen_int(n_max, 3);
26804 ret_val = xmlValidGetValidElements(prev, next, (const xmlChar **)names, max);
26805 desret_int(ret_val);
26807 des_xmlNodePtr(n_prev, prev, 0);
26808 des_xmlNodePtr(n_next, next, 1);
26809 des_const_xmlChar_ptr_ptr(n_names, (const xmlChar **)names, 2);
26810 des_int(n_max, max, 3);
26811 xmlResetLastError();
26812 if (mem_base != xmlMemBlocks()) {
26813 printf("Leak of %d blocks found in xmlValidGetValidElements",
26814 xmlMemBlocks() - mem_base);
26816 printf(" %d", n_prev);
26817 printf(" %d", n_next);
26818 printf(" %d", n_names);
26819 printf(" %d", n_max);
26835 test_xmlValidNormalizeAttributeValue(void) {
26838 #if defined(LIBXML_VALID_ENABLED)
26841 xmlDocPtr doc; /* the document */
26843 xmlNodePtr elem; /* the parent */
26845 xmlChar * name; /* the attribute name */
26847 xmlChar * value; /* the attribute value */
26850 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
26851 for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
26852 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
26853 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
26854 mem_base = xmlMemBlocks();
26855 doc = gen_xmlDocPtr(n_doc, 0);
26856 elem = gen_xmlNodePtr(n_elem, 1);
26857 name = gen_const_xmlChar_ptr(n_name, 2);
26858 value = gen_const_xmlChar_ptr(n_value, 3);
26860 ret_val = xmlValidNormalizeAttributeValue(doc, elem, (const xmlChar *)name, (const xmlChar *)value);
26861 desret_xmlChar_ptr(ret_val);
26863 des_xmlDocPtr(n_doc, doc, 0);
26864 des_xmlNodePtr(n_elem, elem, 1);
26865 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
26866 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 3);
26867 xmlResetLastError();
26868 if (mem_base != xmlMemBlocks()) {
26869 printf("Leak of %d blocks found in xmlValidNormalizeAttributeValue",
26870 xmlMemBlocks() - mem_base);
26872 printf(" %d", n_doc);
26873 printf(" %d", n_elem);
26874 printf(" %d", n_name);
26875 printf(" %d", n_value);
26890 test_xmlValidateAttributeDecl(void) {
26893 #if defined(LIBXML_VALID_ENABLED)
26896 xmlValidCtxtPtr ctxt; /* the validation context */
26898 xmlDocPtr doc; /* a document instance */
26900 xmlAttributePtr attr; /* an attribute definition */
26903 for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
26904 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
26905 for (n_attr = 0;n_attr < gen_nb_xmlAttributePtr;n_attr++) {
26906 mem_base = xmlMemBlocks();
26907 ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
26908 doc = gen_xmlDocPtr(n_doc, 1);
26909 attr = gen_xmlAttributePtr(n_attr, 2);
26911 ret_val = xmlValidateAttributeDecl(ctxt, doc, attr);
26912 desret_int(ret_val);
26914 des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
26915 des_xmlDocPtr(n_doc, doc, 1);
26916 des_xmlAttributePtr(n_attr, attr, 2);
26917 xmlResetLastError();
26918 if (mem_base != xmlMemBlocks()) {
26919 printf("Leak of %d blocks found in xmlValidateAttributeDecl",
26920 xmlMemBlocks() - mem_base);
26922 printf(" %d", n_ctxt);
26923 printf(" %d", n_doc);
26924 printf(" %d", n_attr);
26938 test_xmlValidateAttributeValue(void) {
26941 #if defined(LIBXML_VALID_ENABLED)
26944 xmlAttributeType type; /* an attribute type */
26946 xmlChar * value; /* an attribute value */
26949 for (n_type = 0;n_type < gen_nb_xmlAttributeType;n_type++) {
26950 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
26951 mem_base = xmlMemBlocks();
26952 type = gen_xmlAttributeType(n_type, 0);
26953 value = gen_const_xmlChar_ptr(n_value, 1);
26955 ret_val = xmlValidateAttributeValue(type, (const xmlChar *)value);
26956 desret_int(ret_val);
26958 des_xmlAttributeType(n_type, type, 0);
26959 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 1);
26960 xmlResetLastError();
26961 if (mem_base != xmlMemBlocks()) {
26962 printf("Leak of %d blocks found in xmlValidateAttributeValue",
26963 xmlMemBlocks() - mem_base);
26965 printf(" %d", n_type);
26966 printf(" %d", n_value);
26979 test_xmlValidateDocument(void) {
26982 #if defined(LIBXML_VALID_ENABLED)
26985 xmlValidCtxtPtr ctxt; /* the validation context */
26987 xmlDocPtr doc; /* a document instance */
26990 for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
26991 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
26992 mem_base = xmlMemBlocks();
26993 ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
26994 doc = gen_xmlDocPtr(n_doc, 1);
26996 ret_val = xmlValidateDocument(ctxt, doc);
26997 desret_int(ret_val);
26999 des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
27000 des_xmlDocPtr(n_doc, doc, 1);
27001 xmlResetLastError();
27002 if (mem_base != xmlMemBlocks()) {
27003 printf("Leak of %d blocks found in xmlValidateDocument",
27004 xmlMemBlocks() - mem_base);
27006 printf(" %d", n_ctxt);
27007 printf(" %d", n_doc);
27020 test_xmlValidateDocumentFinal(void) {
27023 #if defined(LIBXML_VALID_ENABLED)
27026 xmlValidCtxtPtr ctxt; /* the validation context */
27028 xmlDocPtr doc; /* a document instance */
27031 for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
27032 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
27033 mem_base = xmlMemBlocks();
27034 ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
27035 doc = gen_xmlDocPtr(n_doc, 1);
27037 ret_val = xmlValidateDocumentFinal(ctxt, doc);
27038 desret_int(ret_val);
27040 des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
27041 des_xmlDocPtr(n_doc, doc, 1);
27042 xmlResetLastError();
27043 if (mem_base != xmlMemBlocks()) {
27044 printf("Leak of %d blocks found in xmlValidateDocumentFinal",
27045 xmlMemBlocks() - mem_base);
27047 printf(" %d", n_ctxt);
27048 printf(" %d", n_doc);
27061 test_xmlValidateDtd(void) {
27064 #if defined(LIBXML_VALID_ENABLED)
27067 xmlValidCtxtPtr ctxt; /* the validation context */
27069 xmlDocPtr doc; /* a document instance */
27071 xmlDtdPtr dtd; /* a dtd instance */
27074 for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
27075 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
27076 for (n_dtd = 0;n_dtd < gen_nb_xmlDtdPtr;n_dtd++) {
27077 mem_base = xmlMemBlocks();
27078 ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
27079 doc = gen_xmlDocPtr(n_doc, 1);
27080 dtd = gen_xmlDtdPtr(n_dtd, 2);
27082 ret_val = xmlValidateDtd(ctxt, doc, dtd);
27083 desret_int(ret_val);
27085 des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
27086 des_xmlDocPtr(n_doc, doc, 1);
27087 des_xmlDtdPtr(n_dtd, dtd, 2);
27088 xmlResetLastError();
27089 if (mem_base != xmlMemBlocks()) {
27090 printf("Leak of %d blocks found in xmlValidateDtd",
27091 xmlMemBlocks() - mem_base);
27093 printf(" %d", n_ctxt);
27094 printf(" %d", n_doc);
27095 printf(" %d", n_dtd);
27109 test_xmlValidateDtdFinal(void) {
27112 #if defined(LIBXML_VALID_ENABLED)
27115 xmlValidCtxtPtr ctxt; /* the validation context */
27117 xmlDocPtr doc; /* a document instance */
27120 for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
27121 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
27122 mem_base = xmlMemBlocks();
27123 ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
27124 doc = gen_xmlDocPtr(n_doc, 1);
27126 ret_val = xmlValidateDtdFinal(ctxt, doc);
27127 desret_int(ret_val);
27129 des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
27130 des_xmlDocPtr(n_doc, doc, 1);
27131 xmlResetLastError();
27132 if (mem_base != xmlMemBlocks()) {
27133 printf("Leak of %d blocks found in xmlValidateDtdFinal",
27134 xmlMemBlocks() - mem_base);
27136 printf(" %d", n_ctxt);
27137 printf(" %d", n_doc);
27150 test_xmlValidateElement(void) {
27153 #if defined(LIBXML_VALID_ENABLED)
27156 xmlValidCtxtPtr ctxt; /* the validation context */
27158 xmlDocPtr doc; /* a document instance */
27160 xmlNodePtr elem; /* an element instance */
27163 for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
27164 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
27165 for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
27166 mem_base = xmlMemBlocks();
27167 ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
27168 doc = gen_xmlDocPtr(n_doc, 1);
27169 elem = gen_xmlNodePtr(n_elem, 2);
27171 ret_val = xmlValidateElement(ctxt, doc, elem);
27172 desret_int(ret_val);
27174 des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
27175 des_xmlDocPtr(n_doc, doc, 1);
27176 des_xmlNodePtr(n_elem, elem, 2);
27177 xmlResetLastError();
27178 if (mem_base != xmlMemBlocks()) {
27179 printf("Leak of %d blocks found in xmlValidateElement",
27180 xmlMemBlocks() - mem_base);
27182 printf(" %d", n_ctxt);
27183 printf(" %d", n_doc);
27184 printf(" %d", n_elem);
27198 test_xmlValidateElementDecl(void) {
27201 #if defined(LIBXML_VALID_ENABLED)
27204 xmlValidCtxtPtr ctxt; /* the validation context */
27206 xmlDocPtr doc; /* a document instance */
27208 xmlElementPtr elem; /* an element definition */
27211 for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
27212 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
27213 for (n_elem = 0;n_elem < gen_nb_xmlElementPtr;n_elem++) {
27214 mem_base = xmlMemBlocks();
27215 ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
27216 doc = gen_xmlDocPtr(n_doc, 1);
27217 elem = gen_xmlElementPtr(n_elem, 2);
27219 ret_val = xmlValidateElementDecl(ctxt, doc, elem);
27220 desret_int(ret_val);
27222 des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
27223 des_xmlDocPtr(n_doc, doc, 1);
27224 des_xmlElementPtr(n_elem, elem, 2);
27225 xmlResetLastError();
27226 if (mem_base != xmlMemBlocks()) {
27227 printf("Leak of %d blocks found in xmlValidateElementDecl",
27228 xmlMemBlocks() - mem_base);
27230 printf(" %d", n_ctxt);
27231 printf(" %d", n_doc);
27232 printf(" %d", n_elem);
27246 test_xmlValidateNameValue(void) {
27249 #if defined(LIBXML_VALID_ENABLED)
27252 xmlChar * value; /* an Name value */
27255 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
27256 mem_base = xmlMemBlocks();
27257 value = gen_const_xmlChar_ptr(n_value, 0);
27259 ret_val = xmlValidateNameValue((const xmlChar *)value);
27260 desret_int(ret_val);
27262 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 0);
27263 xmlResetLastError();
27264 if (mem_base != xmlMemBlocks()) {
27265 printf("Leak of %d blocks found in xmlValidateNameValue",
27266 xmlMemBlocks() - mem_base);
27268 printf(" %d", n_value);
27280 test_xmlValidateNamesValue(void) {
27283 #if defined(LIBXML_VALID_ENABLED)
27286 xmlChar * value; /* an Names value */
27289 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
27290 mem_base = xmlMemBlocks();
27291 value = gen_const_xmlChar_ptr(n_value, 0);
27293 ret_val = xmlValidateNamesValue((const xmlChar *)value);
27294 desret_int(ret_val);
27296 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 0);
27297 xmlResetLastError();
27298 if (mem_base != xmlMemBlocks()) {
27299 printf("Leak of %d blocks found in xmlValidateNamesValue",
27300 xmlMemBlocks() - mem_base);
27302 printf(" %d", n_value);
27314 test_xmlValidateNmtokenValue(void) {
27317 #if defined(LIBXML_VALID_ENABLED)
27320 xmlChar * value; /* an Nmtoken value */
27323 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
27324 mem_base = xmlMemBlocks();
27325 value = gen_const_xmlChar_ptr(n_value, 0);
27327 ret_val = xmlValidateNmtokenValue((const xmlChar *)value);
27328 desret_int(ret_val);
27330 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 0);
27331 xmlResetLastError();
27332 if (mem_base != xmlMemBlocks()) {
27333 printf("Leak of %d blocks found in xmlValidateNmtokenValue",
27334 xmlMemBlocks() - mem_base);
27336 printf(" %d", n_value);
27348 test_xmlValidateNmtokensValue(void) {
27351 #if defined(LIBXML_VALID_ENABLED)
27354 xmlChar * value; /* an Nmtokens value */
27357 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
27358 mem_base = xmlMemBlocks();
27359 value = gen_const_xmlChar_ptr(n_value, 0);
27361 ret_val = xmlValidateNmtokensValue((const xmlChar *)value);
27362 desret_int(ret_val);
27364 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 0);
27365 xmlResetLastError();
27366 if (mem_base != xmlMemBlocks()) {
27367 printf("Leak of %d blocks found in xmlValidateNmtokensValue",
27368 xmlMemBlocks() - mem_base);
27370 printf(" %d", n_value);
27382 test_xmlValidateNotationDecl(void) {
27385 #if defined(LIBXML_VALID_ENABLED)
27388 xmlValidCtxtPtr ctxt; /* the validation context */
27390 xmlDocPtr doc; /* a document instance */
27392 xmlNotationPtr nota; /* a notation definition */
27395 for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
27396 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
27397 for (n_nota = 0;n_nota < gen_nb_xmlNotationPtr;n_nota++) {
27398 mem_base = xmlMemBlocks();
27399 ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
27400 doc = gen_xmlDocPtr(n_doc, 1);
27401 nota = gen_xmlNotationPtr(n_nota, 2);
27403 ret_val = xmlValidateNotationDecl(ctxt, doc, nota);
27404 desret_int(ret_val);
27406 des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
27407 des_xmlDocPtr(n_doc, doc, 1);
27408 des_xmlNotationPtr(n_nota, nota, 2);
27409 xmlResetLastError();
27410 if (mem_base != xmlMemBlocks()) {
27411 printf("Leak of %d blocks found in xmlValidateNotationDecl",
27412 xmlMemBlocks() - mem_base);
27414 printf(" %d", n_ctxt);
27415 printf(" %d", n_doc);
27416 printf(" %d", n_nota);
27430 test_xmlValidateNotationUse(void) {
27433 #if defined(LIBXML_VALID_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
27436 xmlValidCtxtPtr ctxt; /* the validation context */
27438 xmlDocPtr doc; /* the document */
27440 xmlChar * notationName; /* the notation name to check */
27441 int n_notationName;
27443 for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
27444 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
27445 for (n_notationName = 0;n_notationName < gen_nb_const_xmlChar_ptr;n_notationName++) {
27446 mem_base = xmlMemBlocks();
27447 ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
27448 doc = gen_xmlDocPtr(n_doc, 1);
27449 notationName = gen_const_xmlChar_ptr(n_notationName, 2);
27451 ret_val = xmlValidateNotationUse(ctxt, doc, (const xmlChar *)notationName);
27452 desret_int(ret_val);
27454 des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
27455 des_xmlDocPtr(n_doc, doc, 1);
27456 des_const_xmlChar_ptr(n_notationName, (const xmlChar *)notationName, 2);
27457 xmlResetLastError();
27458 if (mem_base != xmlMemBlocks()) {
27459 printf("Leak of %d blocks found in xmlValidateNotationUse",
27460 xmlMemBlocks() - mem_base);
27462 printf(" %d", n_ctxt);
27463 printf(" %d", n_doc);
27464 printf(" %d", n_notationName);
27478 test_xmlValidateOneAttribute(void) {
27481 #if defined(LIBXML_VALID_ENABLED)
27484 xmlValidCtxtPtr ctxt; /* the validation context */
27486 xmlDocPtr doc; /* a document instance */
27488 xmlNodePtr elem; /* an element instance */
27490 xmlAttrPtr attr; /* an attribute instance */
27492 xmlChar * value; /* the attribute value (without entities processing) */
27495 for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
27496 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
27497 for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
27498 for (n_attr = 0;n_attr < gen_nb_xmlAttrPtr;n_attr++) {
27499 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
27500 mem_base = xmlMemBlocks();
27501 ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
27502 doc = gen_xmlDocPtr(n_doc, 1);
27503 elem = gen_xmlNodePtr(n_elem, 2);
27504 attr = gen_xmlAttrPtr(n_attr, 3);
27505 value = gen_const_xmlChar_ptr(n_value, 4);
27507 ret_val = xmlValidateOneAttribute(ctxt, doc, elem, attr, (const xmlChar *)value);
27508 desret_int(ret_val);
27510 des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
27511 des_xmlDocPtr(n_doc, doc, 1);
27512 des_xmlNodePtr(n_elem, elem, 2);
27513 des_xmlAttrPtr(n_attr, attr, 3);
27514 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 4);
27515 xmlResetLastError();
27516 if (mem_base != xmlMemBlocks()) {
27517 printf("Leak of %d blocks found in xmlValidateOneAttribute",
27518 xmlMemBlocks() - mem_base);
27520 printf(" %d", n_ctxt);
27521 printf(" %d", n_doc);
27522 printf(" %d", n_elem);
27523 printf(" %d", n_attr);
27524 printf(" %d", n_value);
27540 test_xmlValidateOneElement(void) {
27543 #if defined(LIBXML_VALID_ENABLED)
27546 xmlValidCtxtPtr ctxt; /* the validation context */
27548 xmlDocPtr doc; /* a document instance */
27550 xmlNodePtr elem; /* an element instance */
27553 for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
27554 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
27555 for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
27556 mem_base = xmlMemBlocks();
27557 ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
27558 doc = gen_xmlDocPtr(n_doc, 1);
27559 elem = gen_xmlNodePtr(n_elem, 2);
27561 ret_val = xmlValidateOneElement(ctxt, doc, elem);
27562 desret_int(ret_val);
27564 des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
27565 des_xmlDocPtr(n_doc, doc, 1);
27566 des_xmlNodePtr(n_elem, elem, 2);
27567 xmlResetLastError();
27568 if (mem_base != xmlMemBlocks()) {
27569 printf("Leak of %d blocks found in xmlValidateOneElement",
27570 xmlMemBlocks() - mem_base);
27572 printf(" %d", n_ctxt);
27573 printf(" %d", n_doc);
27574 printf(" %d", n_elem);
27588 test_xmlValidateOneNamespace(void) {
27591 #if defined(LIBXML_VALID_ENABLED)
27594 xmlValidCtxtPtr ctxt; /* the validation context */
27596 xmlDocPtr doc; /* a document instance */
27598 xmlNodePtr elem; /* an element instance */
27600 xmlChar * prefix; /* the namespace prefix */
27602 xmlNsPtr ns; /* an namespace declaration instance */
27604 xmlChar * value; /* the attribute value (without entities processing) */
27607 for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
27608 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
27609 for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
27610 for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
27611 for (n_ns = 0;n_ns < gen_nb_xmlNsPtr;n_ns++) {
27612 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
27613 mem_base = xmlMemBlocks();
27614 ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
27615 doc = gen_xmlDocPtr(n_doc, 1);
27616 elem = gen_xmlNodePtr(n_elem, 2);
27617 prefix = gen_const_xmlChar_ptr(n_prefix, 3);
27618 ns = gen_xmlNsPtr(n_ns, 4);
27619 value = gen_const_xmlChar_ptr(n_value, 5);
27621 ret_val = xmlValidateOneNamespace(ctxt, doc, elem, (const xmlChar *)prefix, ns, (const xmlChar *)value);
27622 desret_int(ret_val);
27624 des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
27625 des_xmlDocPtr(n_doc, doc, 1);
27626 des_xmlNodePtr(n_elem, elem, 2);
27627 des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 3);
27628 des_xmlNsPtr(n_ns, ns, 4);
27629 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 5);
27630 xmlResetLastError();
27631 if (mem_base != xmlMemBlocks()) {
27632 printf("Leak of %d blocks found in xmlValidateOneNamespace",
27633 xmlMemBlocks() - mem_base);
27635 printf(" %d", n_ctxt);
27636 printf(" %d", n_doc);
27637 printf(" %d", n_elem);
27638 printf(" %d", n_prefix);
27639 printf(" %d", n_ns);
27640 printf(" %d", n_value);
27657 test_xmlValidatePopElement(void) {
27660 #if defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED)
27663 xmlValidCtxtPtr ctxt; /* the validation context */
27665 xmlDocPtr doc; /* a document instance */
27667 xmlNodePtr elem; /* an element instance */
27669 xmlChar * qname; /* the qualified name as appearing in the serialization */
27672 for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
27673 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
27674 for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
27675 for (n_qname = 0;n_qname < gen_nb_const_xmlChar_ptr;n_qname++) {
27676 mem_base = xmlMemBlocks();
27677 ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
27678 doc = gen_xmlDocPtr(n_doc, 1);
27679 elem = gen_xmlNodePtr(n_elem, 2);
27680 qname = gen_const_xmlChar_ptr(n_qname, 3);
27682 ret_val = xmlValidatePopElement(ctxt, doc, elem, (const xmlChar *)qname);
27683 desret_int(ret_val);
27685 des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
27686 des_xmlDocPtr(n_doc, doc, 1);
27687 des_xmlNodePtr(n_elem, elem, 2);
27688 des_const_xmlChar_ptr(n_qname, (const xmlChar *)qname, 3);
27689 xmlResetLastError();
27690 if (mem_base != xmlMemBlocks()) {
27691 printf("Leak of %d blocks found in xmlValidatePopElement",
27692 xmlMemBlocks() - mem_base);
27694 printf(" %d", n_ctxt);
27695 printf(" %d", n_doc);
27696 printf(" %d", n_elem);
27697 printf(" %d", n_qname);
27712 test_xmlValidatePushCData(void) {
27715 #if defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED)
27718 xmlValidCtxtPtr ctxt; /* the validation context */
27720 xmlChar * data; /* some character data read */
27722 int len; /* the length of the data */
27725 for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
27726 for (n_data = 0;n_data < gen_nb_const_xmlChar_ptr;n_data++) {
27727 for (n_len = 0;n_len < gen_nb_int;n_len++) {
27728 mem_base = xmlMemBlocks();
27729 ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
27730 data = gen_const_xmlChar_ptr(n_data, 1);
27731 len = gen_int(n_len, 2);
27733 ret_val = xmlValidatePushCData(ctxt, (const xmlChar *)data, len);
27734 desret_int(ret_val);
27736 des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
27737 des_const_xmlChar_ptr(n_data, (const xmlChar *)data, 1);
27738 des_int(n_len, len, 2);
27739 xmlResetLastError();
27740 if (mem_base != xmlMemBlocks()) {
27741 printf("Leak of %d blocks found in xmlValidatePushCData",
27742 xmlMemBlocks() - mem_base);
27744 printf(" %d", n_ctxt);
27745 printf(" %d", n_data);
27746 printf(" %d", n_len);
27760 test_xmlValidatePushElement(void) {
27763 #if defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED)
27766 xmlValidCtxtPtr ctxt; /* the validation context */
27768 xmlDocPtr doc; /* a document instance */
27770 xmlNodePtr elem; /* an element instance */
27772 xmlChar * qname; /* the qualified name as appearing in the serialization */
27775 for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
27776 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
27777 for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
27778 for (n_qname = 0;n_qname < gen_nb_const_xmlChar_ptr;n_qname++) {
27779 mem_base = xmlMemBlocks();
27780 ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
27781 doc = gen_xmlDocPtr(n_doc, 1);
27782 elem = gen_xmlNodePtr(n_elem, 2);
27783 qname = gen_const_xmlChar_ptr(n_qname, 3);
27785 ret_val = xmlValidatePushElement(ctxt, doc, elem, (const xmlChar *)qname);
27786 desret_int(ret_val);
27788 des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
27789 des_xmlDocPtr(n_doc, doc, 1);
27790 des_xmlNodePtr(n_elem, elem, 2);
27791 des_const_xmlChar_ptr(n_qname, (const xmlChar *)qname, 3);
27792 xmlResetLastError();
27793 if (mem_base != xmlMemBlocks()) {
27794 printf("Leak of %d blocks found in xmlValidatePushElement",
27795 xmlMemBlocks() - mem_base);
27797 printf(" %d", n_ctxt);
27798 printf(" %d", n_doc);
27799 printf(" %d", n_elem);
27800 printf(" %d", n_qname);
27815 test_xmlValidateRoot(void) {
27818 #if defined(LIBXML_VALID_ENABLED)
27821 xmlValidCtxtPtr ctxt; /* the validation context */
27823 xmlDocPtr doc; /* a document instance */
27826 for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
27827 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
27828 mem_base = xmlMemBlocks();
27829 ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
27830 doc = gen_xmlDocPtr(n_doc, 1);
27832 ret_val = xmlValidateRoot(ctxt, doc);
27833 desret_int(ret_val);
27835 des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
27836 des_xmlDocPtr(n_doc, doc, 1);
27837 xmlResetLastError();
27838 if (mem_base != xmlMemBlocks()) {
27839 printf("Leak of %d blocks found in xmlValidateRoot",
27840 xmlMemBlocks() - mem_base);
27842 printf(" %d", n_ctxt);
27843 printf(" %d", n_doc);
27859 if (quiet == 0) printf("Testing valid : 50 of 70 functions ...\n");
27860 rc = test_xmlAddAttributeDecl();
27861 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27862 rc = test_xmlAddElementDecl();
27863 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27864 rc = test_xmlAddID();
27865 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27866 rc = test_xmlAddNotationDecl();
27867 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27868 rc = test_xmlAddRef();
27869 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27870 rc = test_xmlCopyAttributeTable();
27871 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27872 rc = test_xmlCopyDocElementContent();
27873 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27874 rc = test_xmlCopyElementContent();
27875 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27876 rc = test_xmlCopyElementTable();
27877 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27878 rc = test_xmlCopyEnumeration();
27879 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27880 rc = test_xmlCopyNotationTable();
27881 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27882 rc = test_xmlCreateEnumeration();
27883 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27884 rc = test_xmlDumpAttributeDecl();
27885 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27886 rc = test_xmlDumpAttributeTable();
27887 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27888 rc = test_xmlDumpElementDecl();
27889 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27890 rc = test_xmlDumpElementTable();
27891 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27892 rc = test_xmlDumpNotationDecl();
27893 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27894 rc = test_xmlDumpNotationTable();
27895 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27896 rc = test_xmlGetDtdAttrDesc();
27897 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27898 rc = test_xmlGetDtdElementDesc();
27899 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27900 rc = test_xmlGetDtdNotationDesc();
27901 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27902 rc = test_xmlGetDtdQAttrDesc();
27903 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27904 rc = test_xmlGetDtdQElementDesc();
27905 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27906 rc = test_xmlGetID();
27907 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27908 rc = test_xmlGetRefs();
27909 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27910 rc = test_xmlIsID();
27911 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27912 rc = test_xmlIsMixedElement();
27913 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27914 rc = test_xmlIsRef();
27915 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27916 rc = test_xmlNewDocElementContent();
27917 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27918 rc = test_xmlNewElementContent();
27919 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27920 rc = test_xmlNewValidCtxt();
27921 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27922 rc = test_xmlRemoveID();
27923 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27924 rc = test_xmlRemoveRef();
27925 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27926 rc = test_xmlSnprintfElementContent();
27927 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27928 rc = test_xmlSprintfElementContent();
27929 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27930 rc = test_xmlValidBuildContentModel();
27931 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27932 rc = test_xmlValidCtxtNormalizeAttributeValue();
27933 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27934 rc = test_xmlValidGetPotentialChildren();
27935 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27936 rc = test_xmlValidGetValidElements();
27937 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27938 rc = test_xmlValidNormalizeAttributeValue();
27939 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27940 rc = test_xmlValidateAttributeDecl();
27941 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27942 rc = test_xmlValidateAttributeValue();
27943 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27944 rc = test_xmlValidateDocument();
27945 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27946 rc = test_xmlValidateDocumentFinal();
27947 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27948 rc = test_xmlValidateDtd();
27949 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27950 rc = test_xmlValidateDtdFinal();
27951 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27952 rc = test_xmlValidateElement();
27953 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27954 rc = test_xmlValidateElementDecl();
27955 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27956 rc = test_xmlValidateNameValue();
27957 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27958 rc = test_xmlValidateNamesValue();
27959 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27960 rc = test_xmlValidateNmtokenValue();
27961 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27962 rc = test_xmlValidateNmtokensValue();
27963 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27964 rc = test_xmlValidateNotationDecl();
27965 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27966 rc = test_xmlValidateNotationUse();
27967 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27968 rc = test_xmlValidateOneAttribute();
27969 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27970 rc = test_xmlValidateOneElement();
27971 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27972 rc = test_xmlValidateOneNamespace();
27973 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27974 rc = test_xmlValidatePopElement();
27975 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27976 rc = test_xmlValidatePushCData();
27977 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27978 rc = test_xmlValidatePushElement();
27979 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27980 rc = test_xmlValidateRoot();
27981 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
27984 printf("Module valid: %d errors\n", test_ret);
27989 test_xmlXIncludeNewContext(void) {
27993 /* missing type support */
27999 test_xmlXIncludeProcess(void) {
28002 #if defined(LIBXML_XINCLUDE_ENABLED)
28005 xmlDocPtr doc; /* an XML document */
28008 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
28009 mem_base = xmlMemBlocks();
28010 doc = gen_xmlDocPtr(n_doc, 0);
28012 ret_val = xmlXIncludeProcess(doc);
28013 desret_int(ret_val);
28015 des_xmlDocPtr(n_doc, doc, 0);
28016 xmlResetLastError();
28017 if (mem_base != xmlMemBlocks()) {
28018 printf("Leak of %d blocks found in xmlXIncludeProcess",
28019 xmlMemBlocks() - mem_base);
28021 printf(" %d", n_doc);
28033 test_xmlXIncludeProcessFlags(void) {
28036 #if defined(LIBXML_XINCLUDE_ENABLED)
28039 xmlDocPtr doc; /* an XML document */
28041 int flags; /* a set of xmlParserOption used for parsing XML includes */
28044 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
28045 for (n_flags = 0;n_flags < gen_nb_int;n_flags++) {
28046 mem_base = xmlMemBlocks();
28047 doc = gen_xmlDocPtr(n_doc, 0);
28048 flags = gen_int(n_flags, 1);
28050 ret_val = xmlXIncludeProcessFlags(doc, flags);
28051 desret_int(ret_val);
28053 des_xmlDocPtr(n_doc, doc, 0);
28054 des_int(n_flags, flags, 1);
28055 xmlResetLastError();
28056 if (mem_base != xmlMemBlocks()) {
28057 printf("Leak of %d blocks found in xmlXIncludeProcessFlags",
28058 xmlMemBlocks() - mem_base);
28060 printf(" %d", n_doc);
28061 printf(" %d", n_flags);
28074 test_xmlXIncludeProcessFlagsData(void) {
28077 #if defined(LIBXML_XINCLUDE_ENABLED)
28080 xmlDocPtr doc; /* an XML document */
28082 int flags; /* a set of xmlParserOption used for parsing XML includes */
28084 void * data; /* application data that will be passed to the parser context in the _private field of the parser context(s) */
28087 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
28088 for (n_flags = 0;n_flags < gen_nb_int;n_flags++) {
28089 for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
28090 mem_base = xmlMemBlocks();
28091 doc = gen_xmlDocPtr(n_doc, 0);
28092 flags = gen_int(n_flags, 1);
28093 data = gen_userdata(n_data, 2);
28095 ret_val = xmlXIncludeProcessFlagsData(doc, flags, data);
28096 desret_int(ret_val);
28098 des_xmlDocPtr(n_doc, doc, 0);
28099 des_int(n_flags, flags, 1);
28100 des_userdata(n_data, data, 2);
28101 xmlResetLastError();
28102 if (mem_base != xmlMemBlocks()) {
28103 printf("Leak of %d blocks found in xmlXIncludeProcessFlagsData",
28104 xmlMemBlocks() - mem_base);
28106 printf(" %d", n_doc);
28107 printf(" %d", n_flags);
28108 printf(" %d", n_data);
28120 #ifdef LIBXML_XINCLUDE_ENABLED
28122 #define gen_nb_xmlXIncludeCtxtPtr 1
28123 static xmlXIncludeCtxtPtr gen_xmlXIncludeCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
28126 static void des_xmlXIncludeCtxtPtr(int no ATTRIBUTE_UNUSED, xmlXIncludeCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
28132 test_xmlXIncludeProcessNode(void) {
28135 #if defined(LIBXML_XINCLUDE_ENABLED)
28138 xmlXIncludeCtxtPtr ctxt; /* an existing XInclude context */
28140 xmlNodePtr node; /* a node in an XML document */
28143 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXIncludeCtxtPtr;n_ctxt++) {
28144 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
28145 mem_base = xmlMemBlocks();
28146 ctxt = gen_xmlXIncludeCtxtPtr(n_ctxt, 0);
28147 node = gen_xmlNodePtr(n_node, 1);
28149 ret_val = xmlXIncludeProcessNode(ctxt, node);
28150 desret_int(ret_val);
28152 des_xmlXIncludeCtxtPtr(n_ctxt, ctxt, 0);
28153 des_xmlNodePtr(n_node, node, 1);
28154 xmlResetLastError();
28155 if (mem_base != xmlMemBlocks()) {
28156 printf("Leak of %d blocks found in xmlXIncludeProcessNode",
28157 xmlMemBlocks() - mem_base);
28159 printf(" %d", n_ctxt);
28160 printf(" %d", n_node);
28173 test_xmlXIncludeProcessTree(void) {
28176 #if defined(LIBXML_XINCLUDE_ENABLED)
28179 xmlNodePtr tree; /* a node in an XML document */
28182 for (n_tree = 0;n_tree < gen_nb_xmlNodePtr;n_tree++) {
28183 mem_base = xmlMemBlocks();
28184 tree = gen_xmlNodePtr(n_tree, 0);
28186 ret_val = xmlXIncludeProcessTree(tree);
28187 desret_int(ret_val);
28189 des_xmlNodePtr(n_tree, tree, 0);
28190 xmlResetLastError();
28191 if (mem_base != xmlMemBlocks()) {
28192 printf("Leak of %d blocks found in xmlXIncludeProcessTree",
28193 xmlMemBlocks() - mem_base);
28195 printf(" %d", n_tree);
28207 test_xmlXIncludeProcessTreeFlags(void) {
28210 #if defined(LIBXML_XINCLUDE_ENABLED)
28213 xmlNodePtr tree; /* a node in an XML document */
28215 int flags; /* a set of xmlParserOption used for parsing XML includes */
28218 for (n_tree = 0;n_tree < gen_nb_xmlNodePtr;n_tree++) {
28219 for (n_flags = 0;n_flags < gen_nb_int;n_flags++) {
28220 mem_base = xmlMemBlocks();
28221 tree = gen_xmlNodePtr(n_tree, 0);
28222 flags = gen_int(n_flags, 1);
28224 ret_val = xmlXIncludeProcessTreeFlags(tree, flags);
28225 desret_int(ret_val);
28227 des_xmlNodePtr(n_tree, tree, 0);
28228 des_int(n_flags, flags, 1);
28229 xmlResetLastError();
28230 if (mem_base != xmlMemBlocks()) {
28231 printf("Leak of %d blocks found in xmlXIncludeProcessTreeFlags",
28232 xmlMemBlocks() - mem_base);
28234 printf(" %d", n_tree);
28235 printf(" %d", n_flags);
28248 test_xmlXIncludeProcessTreeFlagsData(void) {
28251 #if defined(LIBXML_XINCLUDE_ENABLED)
28254 xmlNodePtr tree; /* an XML node */
28256 int flags; /* a set of xmlParserOption used for parsing XML includes */
28258 void * data; /* application data that will be passed to the parser context in the _private field of the parser context(s) */
28261 for (n_tree = 0;n_tree < gen_nb_xmlNodePtr;n_tree++) {
28262 for (n_flags = 0;n_flags < gen_nb_int;n_flags++) {
28263 for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
28264 mem_base = xmlMemBlocks();
28265 tree = gen_xmlNodePtr(n_tree, 0);
28266 flags = gen_int(n_flags, 1);
28267 data = gen_userdata(n_data, 2);
28269 ret_val = xmlXIncludeProcessTreeFlagsData(tree, flags, data);
28270 desret_int(ret_val);
28272 des_xmlNodePtr(n_tree, tree, 0);
28273 des_int(n_flags, flags, 1);
28274 des_userdata(n_data, data, 2);
28275 xmlResetLastError();
28276 if (mem_base != xmlMemBlocks()) {
28277 printf("Leak of %d blocks found in xmlXIncludeProcessTreeFlagsData",
28278 xmlMemBlocks() - mem_base);
28280 printf(" %d", n_tree);
28281 printf(" %d", n_flags);
28282 printf(" %d", n_data);
28296 test_xmlXIncludeSetFlags(void) {
28299 #if defined(LIBXML_XINCLUDE_ENABLED)
28302 xmlXIncludeCtxtPtr ctxt; /* an XInclude processing context */
28304 int flags; /* a set of xmlParserOption used for parsing XML includes */
28307 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXIncludeCtxtPtr;n_ctxt++) {
28308 for (n_flags = 0;n_flags < gen_nb_int;n_flags++) {
28309 mem_base = xmlMemBlocks();
28310 ctxt = gen_xmlXIncludeCtxtPtr(n_ctxt, 0);
28311 flags = gen_int(n_flags, 1);
28313 ret_val = xmlXIncludeSetFlags(ctxt, flags);
28314 desret_int(ret_val);
28316 des_xmlXIncludeCtxtPtr(n_ctxt, ctxt, 0);
28317 des_int(n_flags, flags, 1);
28318 xmlResetLastError();
28319 if (mem_base != xmlMemBlocks()) {
28320 printf("Leak of %d blocks found in xmlXIncludeSetFlags",
28321 xmlMemBlocks() - mem_base);
28323 printf(" %d", n_ctxt);
28324 printf(" %d", n_flags);
28336 test_xinclude(void) {
28340 if (quiet == 0) printf("Testing xinclude : 8 of 10 functions ...\n");
28341 rc = test_xmlXIncludeNewContext();
28342 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28343 rc = test_xmlXIncludeProcess();
28344 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28345 rc = test_xmlXIncludeProcessFlags();
28346 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28347 rc = test_xmlXIncludeProcessFlagsData();
28348 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28349 rc = test_xmlXIncludeProcessNode();
28350 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28351 rc = test_xmlXIncludeProcessTree();
28352 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28353 rc = test_xmlXIncludeProcessTreeFlags();
28354 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28355 rc = test_xmlXIncludeProcessTreeFlagsData();
28356 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28357 rc = test_xmlXIncludeSetFlags();
28358 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
28361 printf("Module xinclude: %d errors\n", test_ret);
28366 test_xmlAllocOutputBuffer(void) {
28369 #if defined(LIBXML_OUTPUT_ENABLED)
28371 xmlOutputBufferPtr ret_val;
28372 xmlCharEncodingHandlerPtr encoder; /* the encoding converter or NULL */
28375 for (n_encoder = 0;n_encoder < gen_nb_xmlCharEncodingHandlerPtr;n_encoder++) {
28376 mem_base = xmlMemBlocks();
28377 encoder = gen_xmlCharEncodingHandlerPtr(n_encoder, 0);
28379 ret_val = xmlAllocOutputBuffer(encoder);
28380 desret_xmlOutputBufferPtr(ret_val);
28382 des_xmlCharEncodingHandlerPtr(n_encoder, encoder, 0);
28383 xmlResetLastError();
28384 if (mem_base != xmlMemBlocks()) {
28385 printf("Leak of %d blocks found in xmlAllocOutputBuffer",
28386 xmlMemBlocks() - mem_base);
28388 printf(" %d", n_encoder);
28400 test_xmlAllocParserInputBuffer(void) {
28404 xmlParserInputBufferPtr ret_val;
28405 xmlCharEncoding enc; /* the charset encoding if known */
28408 for (n_enc = 0;n_enc < gen_nb_xmlCharEncoding;n_enc++) {
28409 mem_base = xmlMemBlocks();
28410 enc = gen_xmlCharEncoding(n_enc, 0);
28412 ret_val = xmlAllocParserInputBuffer(enc);
28413 desret_xmlParserInputBufferPtr(ret_val);
28415 des_xmlCharEncoding(n_enc, enc, 0);
28416 xmlResetLastError();
28417 if (mem_base != xmlMemBlocks()) {
28418 printf("Leak of %d blocks found in xmlAllocParserInputBuffer",
28419 xmlMemBlocks() - mem_base);
28421 printf(" %d", n_enc);
28432 test_xmlCheckFilename(void) {
28437 char * path; /* the path to check */
28440 for (n_path = 0;n_path < gen_nb_const_char_ptr;n_path++) {
28441 mem_base = xmlMemBlocks();
28442 path = gen_const_char_ptr(n_path, 0);
28444 ret_val = xmlCheckFilename((const char *)path);
28445 desret_int(ret_val);
28447 des_const_char_ptr(n_path, (const char *)path, 0);
28448 xmlResetLastError();
28449 if (mem_base != xmlMemBlocks()) {
28450 printf("Leak of %d blocks found in xmlCheckFilename",
28451 xmlMemBlocks() - mem_base);
28453 printf(" %d", n_path);
28464 test_xmlCheckHTTPInput(void) {
28468 xmlParserInputPtr ret_val;
28469 xmlParserCtxtPtr ctxt; /* an XML parser context */
28471 xmlParserInputPtr ret; /* an XML parser input */
28474 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
28475 for (n_ret = 0;n_ret < gen_nb_xmlParserInputPtr;n_ret++) {
28476 mem_base = xmlMemBlocks();
28477 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
28478 ret = gen_xmlParserInputPtr(n_ret, 1);
28480 ret_val = xmlCheckHTTPInput(ctxt, ret);
28481 desret_xmlParserInputPtr(ret_val);
28483 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
28484 des_xmlParserInputPtr(n_ret, ret, 1);
28485 xmlResetLastError();
28486 if (mem_base != xmlMemBlocks()) {
28487 printf("Leak of %d blocks found in xmlCheckHTTPInput",
28488 xmlMemBlocks() - mem_base);
28490 printf(" %d", n_ctxt);
28491 printf(" %d", n_ret);
28503 test_xmlCleanupInputCallbacks(void) {
28508 mem_base = xmlMemBlocks();
28510 xmlCleanupInputCallbacks();
28512 xmlResetLastError();
28513 if (mem_base != xmlMemBlocks()) {
28514 printf("Leak of %d blocks found in xmlCleanupInputCallbacks",
28515 xmlMemBlocks() - mem_base);
28526 test_xmlCleanupOutputCallbacks(void) {
28529 #if defined(LIBXML_OUTPUT_ENABLED)
28532 mem_base = xmlMemBlocks();
28534 xmlCleanupOutputCallbacks();
28536 xmlResetLastError();
28537 if (mem_base != xmlMemBlocks()) {
28538 printf("Leak of %d blocks found in xmlCleanupOutputCallbacks",
28539 xmlMemBlocks() - mem_base);
28551 test_xmlFileClose(void) {
28556 void * context; /* the I/O context */
28559 for (n_context = 0;n_context < gen_nb_void_ptr;n_context++) {
28560 mem_base = xmlMemBlocks();
28561 context = gen_void_ptr(n_context, 0);
28563 ret_val = xmlFileClose(context);
28564 desret_int(ret_val);
28566 des_void_ptr(n_context, context, 0);
28567 xmlResetLastError();
28568 if (mem_base != xmlMemBlocks()) {
28569 printf("Leak of %d blocks found in xmlFileClose",
28570 xmlMemBlocks() - mem_base);
28572 printf(" %d", n_context);
28583 test_xmlFileMatch(void) {
28588 const char * filename; /* the URI for matching */
28591 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
28592 mem_base = xmlMemBlocks();
28593 filename = gen_filepath(n_filename, 0);
28595 ret_val = xmlFileMatch(filename);
28596 desret_int(ret_val);
28598 des_filepath(n_filename, filename, 0);
28599 xmlResetLastError();
28600 if (mem_base != xmlMemBlocks()) {
28601 printf("Leak of %d blocks found in xmlFileMatch",
28602 xmlMemBlocks() - mem_base);
28604 printf(" %d", n_filename);
28615 test_xmlFileOpen(void) {
28620 const char * filename; /* the URI for matching */
28623 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
28624 mem_base = xmlMemBlocks();
28625 filename = gen_filepath(n_filename, 0);
28627 ret_val = xmlFileOpen(filename);
28628 desret_void_ptr(ret_val);
28630 des_filepath(n_filename, filename, 0);
28631 xmlResetLastError();
28632 if (mem_base != xmlMemBlocks()) {
28633 printf("Leak of %d blocks found in xmlFileOpen",
28634 xmlMemBlocks() - mem_base);
28636 printf(" %d", n_filename);
28647 test_xmlFileRead(void) {
28652 void * context; /* the I/O context */
28654 char * buffer; /* where to drop data */
28656 int len; /* number of bytes to write */
28659 for (n_context = 0;n_context < gen_nb_void_ptr;n_context++) {
28660 for (n_buffer = 0;n_buffer < gen_nb_char_ptr;n_buffer++) {
28661 for (n_len = 0;n_len < gen_nb_int;n_len++) {
28662 mem_base = xmlMemBlocks();
28663 context = gen_void_ptr(n_context, 0);
28664 buffer = gen_char_ptr(n_buffer, 1);
28665 len = gen_int(n_len, 2);
28667 ret_val = xmlFileRead(context, buffer, len);
28668 desret_int(ret_val);
28670 des_void_ptr(n_context, context, 0);
28671 des_char_ptr(n_buffer, buffer, 1);
28672 des_int(n_len, len, 2);
28673 xmlResetLastError();
28674 if (mem_base != xmlMemBlocks()) {
28675 printf("Leak of %d blocks found in xmlFileRead",
28676 xmlMemBlocks() - mem_base);
28678 printf(" %d", n_context);
28679 printf(" %d", n_buffer);
28680 printf(" %d", n_len);
28693 test_xmlIOFTPClose(void) {
28696 #if defined(LIBXML_FTP_ENABLED)
28699 void * context; /* the I/O context */
28702 for (n_context = 0;n_context < gen_nb_void_ptr;n_context++) {
28703 mem_base = xmlMemBlocks();
28704 context = gen_void_ptr(n_context, 0);
28706 ret_val = xmlIOFTPClose(context);
28707 desret_int(ret_val);
28709 des_void_ptr(n_context, context, 0);
28710 xmlResetLastError();
28711 if (mem_base != xmlMemBlocks()) {
28712 printf("Leak of %d blocks found in xmlIOFTPClose",
28713 xmlMemBlocks() - mem_base);
28715 printf(" %d", n_context);
28727 test_xmlIOFTPMatch(void) {
28730 #if defined(LIBXML_FTP_ENABLED)
28733 const char * filename; /* the URI for matching */
28736 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
28737 mem_base = xmlMemBlocks();
28738 filename = gen_filepath(n_filename, 0);
28740 ret_val = xmlIOFTPMatch(filename);
28741 desret_int(ret_val);
28743 des_filepath(n_filename, filename, 0);
28744 xmlResetLastError();
28745 if (mem_base != xmlMemBlocks()) {
28746 printf("Leak of %d blocks found in xmlIOFTPMatch",
28747 xmlMemBlocks() - mem_base);
28749 printf(" %d", n_filename);
28761 test_xmlIOFTPOpen(void) {
28764 #if defined(LIBXML_FTP_ENABLED)
28767 const char * filename; /* the URI for matching */
28770 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
28771 mem_base = xmlMemBlocks();
28772 filename = gen_filepath(n_filename, 0);
28774 ret_val = xmlIOFTPOpen(filename);
28775 desret_void_ptr(ret_val);
28777 des_filepath(n_filename, filename, 0);
28778 xmlResetLastError();
28779 if (mem_base != xmlMemBlocks()) {
28780 printf("Leak of %d blocks found in xmlIOFTPOpen",
28781 xmlMemBlocks() - mem_base);
28783 printf(" %d", n_filename);
28795 test_xmlIOFTPRead(void) {
28798 #if defined(LIBXML_FTP_ENABLED)
28801 void * context; /* the I/O context */
28803 char * buffer; /* where to drop data */
28805 int len; /* number of bytes to write */
28808 for (n_context = 0;n_context < gen_nb_void_ptr;n_context++) {
28809 for (n_buffer = 0;n_buffer < gen_nb_char_ptr;n_buffer++) {
28810 for (n_len = 0;n_len < gen_nb_int;n_len++) {
28811 mem_base = xmlMemBlocks();
28812 context = gen_void_ptr(n_context, 0);
28813 buffer = gen_char_ptr(n_buffer, 1);
28814 len = gen_int(n_len, 2);
28816 ret_val = xmlIOFTPRead(context, buffer, len);
28817 desret_int(ret_val);
28819 des_void_ptr(n_context, context, 0);
28820 des_char_ptr(n_buffer, buffer, 1);
28821 des_int(n_len, len, 2);
28822 xmlResetLastError();
28823 if (mem_base != xmlMemBlocks()) {
28824 printf("Leak of %d blocks found in xmlIOFTPRead",
28825 xmlMemBlocks() - mem_base);
28827 printf(" %d", n_context);
28828 printf(" %d", n_buffer);
28829 printf(" %d", n_len);
28843 test_xmlIOHTTPClose(void) {
28846 #if defined(LIBXML_HTTP_ENABLED)
28849 void * context; /* the I/O context */
28852 for (n_context = 0;n_context < gen_nb_void_ptr;n_context++) {
28853 mem_base = xmlMemBlocks();
28854 context = gen_void_ptr(n_context, 0);
28856 ret_val = xmlIOHTTPClose(context);
28857 desret_int(ret_val);
28859 des_void_ptr(n_context, context, 0);
28860 xmlResetLastError();
28861 if (mem_base != xmlMemBlocks()) {
28862 printf("Leak of %d blocks found in xmlIOHTTPClose",
28863 xmlMemBlocks() - mem_base);
28865 printf(" %d", n_context);
28877 test_xmlIOHTTPMatch(void) {
28880 #if defined(LIBXML_HTTP_ENABLED)
28883 const char * filename; /* the URI for matching */
28886 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
28887 mem_base = xmlMemBlocks();
28888 filename = gen_filepath(n_filename, 0);
28890 ret_val = xmlIOHTTPMatch(filename);
28891 desret_int(ret_val);
28893 des_filepath(n_filename, filename, 0);
28894 xmlResetLastError();
28895 if (mem_base != xmlMemBlocks()) {
28896 printf("Leak of %d blocks found in xmlIOHTTPMatch",
28897 xmlMemBlocks() - mem_base);
28899 printf(" %d", n_filename);
28911 test_xmlIOHTTPOpen(void) {
28914 #if defined(LIBXML_HTTP_ENABLED)
28917 const char * filename; /* the URI for matching */
28920 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
28921 mem_base = xmlMemBlocks();
28922 filename = gen_filepath(n_filename, 0);
28924 ret_val = xmlIOHTTPOpen(filename);
28925 desret_xmlNanoHTTPCtxtPtr(ret_val);
28927 des_filepath(n_filename, filename, 0);
28928 xmlResetLastError();
28929 if (mem_base != xmlMemBlocks()) {
28930 printf("Leak of %d blocks found in xmlIOHTTPOpen",
28931 xmlMemBlocks() - mem_base);
28933 printf(" %d", n_filename);
28945 test_xmlIOHTTPRead(void) {
28948 #if defined(LIBXML_HTTP_ENABLED)
28951 void * context; /* the I/O context */
28953 char * buffer; /* where to drop data */
28955 int len; /* number of bytes to write */
28958 for (n_context = 0;n_context < gen_nb_void_ptr;n_context++) {
28959 for (n_buffer = 0;n_buffer < gen_nb_char_ptr;n_buffer++) {
28960 for (n_len = 0;n_len < gen_nb_int;n_len++) {
28961 mem_base = xmlMemBlocks();
28962 context = gen_void_ptr(n_context, 0);
28963 buffer = gen_char_ptr(n_buffer, 1);
28964 len = gen_int(n_len, 2);
28966 ret_val = xmlIOHTTPRead(context, buffer, len);
28967 desret_int(ret_val);
28969 des_void_ptr(n_context, context, 0);
28970 des_char_ptr(n_buffer, buffer, 1);
28971 des_int(n_len, len, 2);
28972 xmlResetLastError();
28973 if (mem_base != xmlMemBlocks()) {
28974 printf("Leak of %d blocks found in xmlIOHTTPRead",
28975 xmlMemBlocks() - mem_base);
28977 printf(" %d", n_context);
28978 printf(" %d", n_buffer);
28979 printf(" %d", n_len);
28993 test_xmlNoNetExternalEntityLoader(void) {
28997 xmlParserInputPtr ret_val;
28998 const char * URL; /* the URL for the entity to load */
29000 char * ID; /* the System ID for the entity to load */
29002 xmlParserCtxtPtr ctxt; /* the context in which the entity is called or NULL */
29005 for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
29006 for (n_ID = 0;n_ID < gen_nb_const_char_ptr;n_ID++) {
29007 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
29008 mem_base = xmlMemBlocks();
29009 URL = gen_filepath(n_URL, 0);
29010 ID = gen_const_char_ptr(n_ID, 1);
29011 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 2);
29013 ret_val = xmlNoNetExternalEntityLoader(URL, (const char *)ID, ctxt);
29014 desret_xmlParserInputPtr(ret_val);
29016 des_filepath(n_URL, URL, 0);
29017 des_const_char_ptr(n_ID, (const char *)ID, 1);
29018 des_xmlParserCtxtPtr(n_ctxt, ctxt, 2);
29019 xmlResetLastError();
29020 if (mem_base != xmlMemBlocks()) {
29021 printf("Leak of %d blocks found in xmlNoNetExternalEntityLoader",
29022 xmlMemBlocks() - mem_base);
29024 printf(" %d", n_URL);
29025 printf(" %d", n_ID);
29026 printf(" %d", n_ctxt);
29039 test_xmlNormalizeWindowsPath(void) {
29044 xmlChar * path; /* the input file path */
29047 for (n_path = 0;n_path < gen_nb_const_xmlChar_ptr;n_path++) {
29048 mem_base = xmlMemBlocks();
29049 path = gen_const_xmlChar_ptr(n_path, 0);
29051 ret_val = xmlNormalizeWindowsPath((const xmlChar *)path);
29052 desret_xmlChar_ptr(ret_val);
29054 des_const_xmlChar_ptr(n_path, (const xmlChar *)path, 0);
29055 xmlResetLastError();
29056 if (mem_base != xmlMemBlocks()) {
29057 printf("Leak of %d blocks found in xmlNormalizeWindowsPath",
29058 xmlMemBlocks() - mem_base);
29060 printf(" %d", n_path);
29071 test_xmlOutputBufferCreateBuffer(void) {
29074 #if defined(LIBXML_OUTPUT_ENABLED)
29076 xmlOutputBufferPtr ret_val;
29077 xmlBufferPtr buffer; /* a xmlBufferPtr */
29079 xmlCharEncodingHandlerPtr encoder; /* the encoding converter or NULL */
29082 for (n_buffer = 0;n_buffer < gen_nb_xmlBufferPtr;n_buffer++) {
29083 for (n_encoder = 0;n_encoder < gen_nb_xmlCharEncodingHandlerPtr;n_encoder++) {
29084 mem_base = xmlMemBlocks();
29085 buffer = gen_xmlBufferPtr(n_buffer, 0);
29086 encoder = gen_xmlCharEncodingHandlerPtr(n_encoder, 1);
29088 ret_val = xmlOutputBufferCreateBuffer(buffer, encoder);
29089 desret_xmlOutputBufferPtr(ret_val);
29091 des_xmlBufferPtr(n_buffer, buffer, 0);
29092 des_xmlCharEncodingHandlerPtr(n_encoder, encoder, 1);
29093 xmlResetLastError();
29094 if (mem_base != xmlMemBlocks()) {
29095 printf("Leak of %d blocks found in xmlOutputBufferCreateBuffer",
29096 xmlMemBlocks() - mem_base);
29098 printf(" %d", n_buffer);
29099 printf(" %d", n_encoder);
29112 test_xmlOutputBufferCreateFd(void) {
29115 #if defined(LIBXML_OUTPUT_ENABLED)
29117 xmlOutputBufferPtr ret_val;
29118 int fd; /* a file descriptor number */
29120 xmlCharEncodingHandlerPtr encoder; /* the encoding converter or NULL */
29123 for (n_fd = 0;n_fd < gen_nb_int;n_fd++) {
29124 for (n_encoder = 0;n_encoder < gen_nb_xmlCharEncodingHandlerPtr;n_encoder++) {
29125 mem_base = xmlMemBlocks();
29126 fd = gen_int(n_fd, 0);
29127 encoder = gen_xmlCharEncodingHandlerPtr(n_encoder, 1);
29129 ret_val = xmlOutputBufferCreateFd(fd, encoder);
29130 desret_xmlOutputBufferPtr(ret_val);
29132 des_int(n_fd, fd, 0);
29133 des_xmlCharEncodingHandlerPtr(n_encoder, encoder, 1);
29134 xmlResetLastError();
29135 if (mem_base != xmlMemBlocks()) {
29136 printf("Leak of %d blocks found in xmlOutputBufferCreateFd",
29137 xmlMemBlocks() - mem_base);
29139 printf(" %d", n_fd);
29140 printf(" %d", n_encoder);
29153 test_xmlOutputBufferCreateFile(void) {
29156 #if defined(LIBXML_OUTPUT_ENABLED)
29158 xmlOutputBufferPtr ret_val;
29159 FILE * file; /* a FILE* */
29161 xmlCharEncodingHandlerPtr encoder; /* the encoding converter or NULL */
29164 for (n_file = 0;n_file < gen_nb_FILE_ptr;n_file++) {
29165 for (n_encoder = 0;n_encoder < gen_nb_xmlCharEncodingHandlerPtr;n_encoder++) {
29166 mem_base = xmlMemBlocks();
29167 file = gen_FILE_ptr(n_file, 0);
29168 encoder = gen_xmlCharEncodingHandlerPtr(n_encoder, 1);
29170 ret_val = xmlOutputBufferCreateFile(file, encoder);
29171 desret_xmlOutputBufferPtr(ret_val);
29173 des_FILE_ptr(n_file, file, 0);
29174 des_xmlCharEncodingHandlerPtr(n_encoder, encoder, 1);
29175 xmlResetLastError();
29176 if (mem_base != xmlMemBlocks()) {
29177 printf("Leak of %d blocks found in xmlOutputBufferCreateFile",
29178 xmlMemBlocks() - mem_base);
29180 printf(" %d", n_file);
29181 printf(" %d", n_encoder);
29194 test_xmlOutputBufferCreateFilename(void) {
29197 #if defined(LIBXML_OUTPUT_ENABLED)
29199 xmlOutputBufferPtr ret_val;
29200 const char * URI; /* a C string containing the URI or filename */
29202 xmlCharEncodingHandlerPtr encoder; /* the encoding converter or NULL */
29204 int compression; /* the compression ration (0 none, 9 max). */
29207 for (n_URI = 0;n_URI < gen_nb_fileoutput;n_URI++) {
29208 for (n_encoder = 0;n_encoder < gen_nb_xmlCharEncodingHandlerPtr;n_encoder++) {
29209 for (n_compression = 0;n_compression < gen_nb_int;n_compression++) {
29210 mem_base = xmlMemBlocks();
29211 URI = gen_fileoutput(n_URI, 0);
29212 encoder = gen_xmlCharEncodingHandlerPtr(n_encoder, 1);
29213 compression = gen_int(n_compression, 2);
29215 ret_val = xmlOutputBufferCreateFilename(URI, encoder, compression);
29216 desret_xmlOutputBufferPtr(ret_val);
29218 des_fileoutput(n_URI, URI, 0);
29219 des_xmlCharEncodingHandlerPtr(n_encoder, encoder, 1);
29220 des_int(n_compression, compression, 2);
29221 xmlResetLastError();
29222 if (mem_base != xmlMemBlocks()) {
29223 printf("Leak of %d blocks found in xmlOutputBufferCreateFilename",
29224 xmlMemBlocks() - mem_base);
29226 printf(" %d", n_URI);
29227 printf(" %d", n_encoder);
29228 printf(" %d", n_compression);
29242 test_xmlOutputBufferFlush(void) {
29245 #if defined(LIBXML_OUTPUT_ENABLED)
29248 xmlOutputBufferPtr out; /* a buffered output */
29251 for (n_out = 0;n_out < gen_nb_xmlOutputBufferPtr;n_out++) {
29252 mem_base = xmlMemBlocks();
29253 out = gen_xmlOutputBufferPtr(n_out, 0);
29255 ret_val = xmlOutputBufferFlush(out);
29256 desret_int(ret_val);
29258 des_xmlOutputBufferPtr(n_out, out, 0);
29259 xmlResetLastError();
29260 if (mem_base != xmlMemBlocks()) {
29261 printf("Leak of %d blocks found in xmlOutputBufferFlush",
29262 xmlMemBlocks() - mem_base);
29264 printf(" %d", n_out);
29276 test_xmlOutputBufferGetContent(void) {
29279 #if defined(LIBXML_OUTPUT_ENABLED)
29281 const xmlChar * ret_val;
29282 xmlOutputBufferPtr out; /* an xmlOutputBufferPtr */
29285 for (n_out = 0;n_out < gen_nb_xmlOutputBufferPtr;n_out++) {
29286 mem_base = xmlMemBlocks();
29287 out = gen_xmlOutputBufferPtr(n_out, 0);
29289 ret_val = xmlOutputBufferGetContent(out);
29290 desret_const_xmlChar_ptr(ret_val);
29292 des_xmlOutputBufferPtr(n_out, out, 0);
29293 xmlResetLastError();
29294 if (mem_base != xmlMemBlocks()) {
29295 printf("Leak of %d blocks found in xmlOutputBufferGetContent",
29296 xmlMemBlocks() - mem_base);
29298 printf(" %d", n_out);
29310 test_xmlOutputBufferGetSize(void) {
29314 /* missing type support */
29320 test_xmlOutputBufferWrite(void) {
29323 #if defined(LIBXML_OUTPUT_ENABLED)
29326 xmlOutputBufferPtr out; /* a buffered parser output */
29328 int len; /* the size in bytes of the array. */
29330 char * buf; /* an char array */
29333 for (n_out = 0;n_out < gen_nb_xmlOutputBufferPtr;n_out++) {
29334 for (n_len = 0;n_len < gen_nb_int;n_len++) {
29335 for (n_buf = 0;n_buf < gen_nb_const_char_ptr;n_buf++) {
29336 mem_base = xmlMemBlocks();
29337 out = gen_xmlOutputBufferPtr(n_out, 0);
29338 len = gen_int(n_len, 1);
29339 buf = gen_const_char_ptr(n_buf, 2);
29341 ret_val = xmlOutputBufferWrite(out, len, (const char *)buf);
29342 desret_int(ret_val);
29344 des_xmlOutputBufferPtr(n_out, out, 0);
29345 des_int(n_len, len, 1);
29346 des_const_char_ptr(n_buf, (const char *)buf, 2);
29347 xmlResetLastError();
29348 if (mem_base != xmlMemBlocks()) {
29349 printf("Leak of %d blocks found in xmlOutputBufferWrite",
29350 xmlMemBlocks() - mem_base);
29352 printf(" %d", n_out);
29353 printf(" %d", n_len);
29354 printf(" %d", n_buf);
29368 test_xmlOutputBufferWriteEscape(void) {
29372 /* missing type support */
29378 test_xmlOutputBufferWriteString(void) {
29381 #if defined(LIBXML_OUTPUT_ENABLED)
29384 xmlOutputBufferPtr out; /* a buffered parser output */
29386 char * str; /* a zero terminated C string */
29389 for (n_out = 0;n_out < gen_nb_xmlOutputBufferPtr;n_out++) {
29390 for (n_str = 0;n_str < gen_nb_const_char_ptr;n_str++) {
29391 mem_base = xmlMemBlocks();
29392 out = gen_xmlOutputBufferPtr(n_out, 0);
29393 str = gen_const_char_ptr(n_str, 1);
29395 ret_val = xmlOutputBufferWriteString(out, (const char *)str);
29396 desret_int(ret_val);
29398 des_xmlOutputBufferPtr(n_out, out, 0);
29399 des_const_char_ptr(n_str, (const char *)str, 1);
29400 xmlResetLastError();
29401 if (mem_base != xmlMemBlocks()) {
29402 printf("Leak of %d blocks found in xmlOutputBufferWriteString",
29403 xmlMemBlocks() - mem_base);
29405 printf(" %d", n_out);
29406 printf(" %d", n_str);
29419 test_xmlParserGetDirectory(void) {
29423 /* missing type support */
29429 test_xmlParserInputBufferCreateFd(void) {
29433 xmlParserInputBufferPtr ret_val;
29434 int fd; /* a file descriptor number */
29436 xmlCharEncoding enc; /* the charset encoding if known */
29439 for (n_fd = 0;n_fd < gen_nb_int;n_fd++) {
29440 for (n_enc = 0;n_enc < gen_nb_xmlCharEncoding;n_enc++) {
29441 mem_base = xmlMemBlocks();
29442 fd = gen_int(n_fd, 0);
29443 enc = gen_xmlCharEncoding(n_enc, 1);
29444 if (fd >= 0) fd = -1;
29446 ret_val = xmlParserInputBufferCreateFd(fd, enc);
29447 desret_xmlParserInputBufferPtr(ret_val);
29449 des_int(n_fd, fd, 0);
29450 des_xmlCharEncoding(n_enc, enc, 1);
29451 xmlResetLastError();
29452 if (mem_base != xmlMemBlocks()) {
29453 printf("Leak of %d blocks found in xmlParserInputBufferCreateFd",
29454 xmlMemBlocks() - mem_base);
29456 printf(" %d", n_fd);
29457 printf(" %d", n_enc);
29469 test_xmlParserInputBufferCreateFile(void) {
29473 xmlParserInputBufferPtr ret_val;
29474 FILE * file; /* a FILE* */
29476 xmlCharEncoding enc; /* the charset encoding if known */
29479 for (n_file = 0;n_file < gen_nb_FILE_ptr;n_file++) {
29480 for (n_enc = 0;n_enc < gen_nb_xmlCharEncoding;n_enc++) {
29481 mem_base = xmlMemBlocks();
29482 file = gen_FILE_ptr(n_file, 0);
29483 enc = gen_xmlCharEncoding(n_enc, 1);
29485 ret_val = xmlParserInputBufferCreateFile(file, enc);
29486 desret_xmlParserInputBufferPtr(ret_val);
29488 des_FILE_ptr(n_file, file, 0);
29489 des_xmlCharEncoding(n_enc, enc, 1);
29490 xmlResetLastError();
29491 if (mem_base != xmlMemBlocks()) {
29492 printf("Leak of %d blocks found in xmlParserInputBufferCreateFile",
29493 xmlMemBlocks() - mem_base);
29495 printf(" %d", n_file);
29496 printf(" %d", n_enc);
29508 test_xmlParserInputBufferCreateFilename(void) {
29512 xmlParserInputBufferPtr ret_val;
29513 const char * URI; /* a C string containing the URI or filename */
29515 xmlCharEncoding enc; /* the charset encoding if known */
29518 for (n_URI = 0;n_URI < gen_nb_fileoutput;n_URI++) {
29519 for (n_enc = 0;n_enc < gen_nb_xmlCharEncoding;n_enc++) {
29520 mem_base = xmlMemBlocks();
29521 URI = gen_fileoutput(n_URI, 0);
29522 enc = gen_xmlCharEncoding(n_enc, 1);
29524 ret_val = xmlParserInputBufferCreateFilename(URI, enc);
29525 desret_xmlParserInputBufferPtr(ret_val);
29527 des_fileoutput(n_URI, URI, 0);
29528 des_xmlCharEncoding(n_enc, enc, 1);
29529 xmlResetLastError();
29530 if (mem_base != xmlMemBlocks()) {
29531 printf("Leak of %d blocks found in xmlParserInputBufferCreateFilename",
29532 xmlMemBlocks() - mem_base);
29534 printf(" %d", n_URI);
29535 printf(" %d", n_enc);
29547 test_xmlParserInputBufferCreateMem(void) {
29551 xmlParserInputBufferPtr ret_val;
29552 char * mem; /* the memory input */
29554 int size; /* the length of the memory block */
29556 xmlCharEncoding enc; /* the charset encoding if known */
29559 for (n_mem = 0;n_mem < gen_nb_const_char_ptr;n_mem++) {
29560 for (n_size = 0;n_size < gen_nb_int;n_size++) {
29561 for (n_enc = 0;n_enc < gen_nb_xmlCharEncoding;n_enc++) {
29562 mem_base = xmlMemBlocks();
29563 mem = gen_const_char_ptr(n_mem, 0);
29564 size = gen_int(n_size, 1);
29565 enc = gen_xmlCharEncoding(n_enc, 2);
29567 ret_val = xmlParserInputBufferCreateMem((const char *)mem, size, enc);
29568 desret_xmlParserInputBufferPtr(ret_val);
29570 des_const_char_ptr(n_mem, (const char *)mem, 0);
29571 des_int(n_size, size, 1);
29572 des_xmlCharEncoding(n_enc, enc, 2);
29573 xmlResetLastError();
29574 if (mem_base != xmlMemBlocks()) {
29575 printf("Leak of %d blocks found in xmlParserInputBufferCreateMem",
29576 xmlMemBlocks() - mem_base);
29578 printf(" %d", n_mem);
29579 printf(" %d", n_size);
29580 printf(" %d", n_enc);
29593 test_xmlParserInputBufferCreateStatic(void) {
29597 xmlParserInputBufferPtr ret_val;
29598 char * mem; /* the memory input */
29600 int size; /* the length of the memory block */
29602 xmlCharEncoding enc; /* the charset encoding if known */
29605 for (n_mem = 0;n_mem < gen_nb_const_char_ptr;n_mem++) {
29606 for (n_size = 0;n_size < gen_nb_int;n_size++) {
29607 for (n_enc = 0;n_enc < gen_nb_xmlCharEncoding;n_enc++) {
29608 mem_base = xmlMemBlocks();
29609 mem = gen_const_char_ptr(n_mem, 0);
29610 size = gen_int(n_size, 1);
29611 enc = gen_xmlCharEncoding(n_enc, 2);
29613 ret_val = xmlParserInputBufferCreateStatic((const char *)mem, size, enc);
29614 desret_xmlParserInputBufferPtr(ret_val);
29616 des_const_char_ptr(n_mem, (const char *)mem, 0);
29617 des_int(n_size, size, 1);
29618 des_xmlCharEncoding(n_enc, enc, 2);
29619 xmlResetLastError();
29620 if (mem_base != xmlMemBlocks()) {
29621 printf("Leak of %d blocks found in xmlParserInputBufferCreateStatic",
29622 xmlMemBlocks() - mem_base);
29624 printf(" %d", n_mem);
29625 printf(" %d", n_size);
29626 printf(" %d", n_enc);
29639 test_xmlParserInputBufferGrow(void) {
29644 xmlParserInputBufferPtr in; /* a buffered parser input */
29646 int len; /* indicative value of the amount of chars to read */
29649 for (n_in = 0;n_in < gen_nb_xmlParserInputBufferPtr;n_in++) {
29650 for (n_len = 0;n_len < gen_nb_int;n_len++) {
29651 mem_base = xmlMemBlocks();
29652 in = gen_xmlParserInputBufferPtr(n_in, 0);
29653 len = gen_int(n_len, 1);
29655 ret_val = xmlParserInputBufferGrow(in, len);
29656 desret_int(ret_val);
29658 des_xmlParserInputBufferPtr(n_in, in, 0);
29659 des_int(n_len, len, 1);
29660 xmlResetLastError();
29661 if (mem_base != xmlMemBlocks()) {
29662 printf("Leak of %d blocks found in xmlParserInputBufferGrow",
29663 xmlMemBlocks() - mem_base);
29665 printf(" %d", n_in);
29666 printf(" %d", n_len);
29678 test_xmlParserInputBufferPush(void) {
29683 xmlParserInputBufferPtr in; /* a buffered parser input */
29685 int len; /* the size in bytes of the array. */
29687 char * buf; /* an char array */
29690 for (n_in = 0;n_in < gen_nb_xmlParserInputBufferPtr;n_in++) {
29691 for (n_len = 0;n_len < gen_nb_int;n_len++) {
29692 for (n_buf = 0;n_buf < gen_nb_const_char_ptr;n_buf++) {
29693 mem_base = xmlMemBlocks();
29694 in = gen_xmlParserInputBufferPtr(n_in, 0);
29695 len = gen_int(n_len, 1);
29696 buf = gen_const_char_ptr(n_buf, 2);
29698 ret_val = xmlParserInputBufferPush(in, len, (const char *)buf);
29699 desret_int(ret_val);
29701 des_xmlParserInputBufferPtr(n_in, in, 0);
29702 des_int(n_len, len, 1);
29703 des_const_char_ptr(n_buf, (const char *)buf, 2);
29704 xmlResetLastError();
29705 if (mem_base != xmlMemBlocks()) {
29706 printf("Leak of %d blocks found in xmlParserInputBufferPush",
29707 xmlMemBlocks() - mem_base);
29709 printf(" %d", n_in);
29710 printf(" %d", n_len);
29711 printf(" %d", n_buf);
29724 test_xmlParserInputBufferRead(void) {
29729 xmlParserInputBufferPtr in; /* a buffered parser input */
29731 int len; /* indicative value of the amount of chars to read */
29734 for (n_in = 0;n_in < gen_nb_xmlParserInputBufferPtr;n_in++) {
29735 for (n_len = 0;n_len < gen_nb_int;n_len++) {
29736 mem_base = xmlMemBlocks();
29737 in = gen_xmlParserInputBufferPtr(n_in, 0);
29738 len = gen_int(n_len, 1);
29740 ret_val = xmlParserInputBufferRead(in, len);
29741 desret_int(ret_val);
29743 des_xmlParserInputBufferPtr(n_in, in, 0);
29744 des_int(n_len, len, 1);
29745 xmlResetLastError();
29746 if (mem_base != xmlMemBlocks()) {
29747 printf("Leak of %d blocks found in xmlParserInputBufferRead",
29748 xmlMemBlocks() - mem_base);
29750 printf(" %d", n_in);
29751 printf(" %d", n_len);
29763 test_xmlPopInputCallbacks(void) {
29769 mem_base = xmlMemBlocks();
29771 ret_val = xmlPopInputCallbacks();
29772 desret_int(ret_val);
29774 xmlResetLastError();
29775 if (mem_base != xmlMemBlocks()) {
29776 printf("Leak of %d blocks found in xmlPopInputCallbacks",
29777 xmlMemBlocks() - mem_base);
29788 test_xmlRegisterDefaultInputCallbacks(void) {
29793 mem_base = xmlMemBlocks();
29795 xmlRegisterDefaultInputCallbacks();
29797 xmlResetLastError();
29798 if (mem_base != xmlMemBlocks()) {
29799 printf("Leak of %d blocks found in xmlRegisterDefaultInputCallbacks",
29800 xmlMemBlocks() - mem_base);
29811 test_xmlRegisterDefaultOutputCallbacks(void) {
29814 #if defined(LIBXML_OUTPUT_ENABLED)
29817 mem_base = xmlMemBlocks();
29819 xmlRegisterDefaultOutputCallbacks();
29821 xmlResetLastError();
29822 if (mem_base != xmlMemBlocks()) {
29823 printf("Leak of %d blocks found in xmlRegisterDefaultOutputCallbacks",
29824 xmlMemBlocks() - mem_base);
29836 test_xmlRegisterHTTPPostCallbacks(void) {
29839 #if defined(LIBXML_OUTPUT_ENABLED) && defined(LIBXML_HTTP_ENABLED)
29842 mem_base = xmlMemBlocks();
29844 xmlRegisterHTTPPostCallbacks();
29846 xmlResetLastError();
29847 if (mem_base != xmlMemBlocks()) {
29848 printf("Leak of %d blocks found in xmlRegisterHTTPPostCallbacks",
29849 xmlMemBlocks() - mem_base);
29864 if (quiet == 0) printf("Testing xmlIO : 40 of 50 functions ...\n");
29865 rc = test_xmlAllocOutputBuffer();
29866 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29867 rc = test_xmlAllocParserInputBuffer();
29868 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29869 rc = test_xmlCheckFilename();
29870 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29871 rc = test_xmlCheckHTTPInput();
29872 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29873 rc = test_xmlCleanupInputCallbacks();
29874 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29875 rc = test_xmlCleanupOutputCallbacks();
29876 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29877 rc = test_xmlFileClose();
29878 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29879 rc = test_xmlFileMatch();
29880 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29881 rc = test_xmlFileOpen();
29882 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29883 rc = test_xmlFileRead();
29884 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29885 rc = test_xmlIOFTPClose();
29886 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29887 rc = test_xmlIOFTPMatch();
29888 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29889 rc = test_xmlIOFTPOpen();
29890 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29891 rc = test_xmlIOFTPRead();
29892 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29893 rc = test_xmlIOHTTPClose();
29894 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29895 rc = test_xmlIOHTTPMatch();
29896 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29897 rc = test_xmlIOHTTPOpen();
29898 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29899 rc = test_xmlIOHTTPRead();
29900 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29901 rc = test_xmlNoNetExternalEntityLoader();
29902 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29903 rc = test_xmlNormalizeWindowsPath();
29904 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29905 rc = test_xmlOutputBufferCreateBuffer();
29906 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29907 rc = test_xmlOutputBufferCreateFd();
29908 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29909 rc = test_xmlOutputBufferCreateFile();
29910 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29911 rc = test_xmlOutputBufferCreateFilename();
29912 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29913 rc = test_xmlOutputBufferFlush();
29914 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29915 rc = test_xmlOutputBufferGetContent();
29916 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29917 rc = test_xmlOutputBufferGetSize();
29918 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29919 rc = test_xmlOutputBufferWrite();
29920 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29921 rc = test_xmlOutputBufferWriteEscape();
29922 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29923 rc = test_xmlOutputBufferWriteString();
29924 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29925 rc = test_xmlParserGetDirectory();
29926 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29927 rc = test_xmlParserInputBufferCreateFd();
29928 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29929 rc = test_xmlParserInputBufferCreateFile();
29930 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29931 rc = test_xmlParserInputBufferCreateFilename();
29932 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29933 rc = test_xmlParserInputBufferCreateMem();
29934 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29935 rc = test_xmlParserInputBufferCreateStatic();
29936 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29937 rc = test_xmlParserInputBufferGrow();
29938 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29939 rc = test_xmlParserInputBufferPush();
29940 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29941 rc = test_xmlParserInputBufferRead();
29942 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29943 rc = test_xmlPopInputCallbacks();
29944 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29945 rc = test_xmlRegisterDefaultInputCallbacks();
29946 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29947 rc = test_xmlRegisterDefaultOutputCallbacks();
29948 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29949 rc = test_xmlRegisterHTTPPostCallbacks();
29950 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
29953 printf("Module xmlIO: %d errors\n", test_ret);
29956 #ifdef LIBXML_AUTOMATA_ENABLED
29958 #define gen_nb_xmlAutomataPtr 1
29959 static xmlAutomataPtr gen_xmlAutomataPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
29962 static void des_xmlAutomataPtr(int no ATTRIBUTE_UNUSED, xmlAutomataPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
29968 test_xmlAutomataCompile(void) {
29972 /* missing type support */
29978 test_xmlAutomataGetInitState(void) {
29982 /* missing type support */
29988 test_xmlAutomataIsDeterminist(void) {
29991 #if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
29994 xmlAutomataPtr am; /* an automata */
29997 for (n_am = 0;n_am < gen_nb_xmlAutomataPtr;n_am++) {
29998 mem_base = xmlMemBlocks();
29999 am = gen_xmlAutomataPtr(n_am, 0);
30001 ret_val = xmlAutomataIsDeterminist(am);
30002 desret_int(ret_val);
30004 des_xmlAutomataPtr(n_am, am, 0);
30005 xmlResetLastError();
30006 if (mem_base != xmlMemBlocks()) {
30007 printf("Leak of %d blocks found in xmlAutomataIsDeterminist",
30008 xmlMemBlocks() - mem_base);
30010 printf(" %d", n_am);
30020 #ifdef LIBXML_AUTOMATA_ENABLED
30022 #define gen_nb_xmlAutomataStatePtr 1
30023 static xmlAutomataStatePtr gen_xmlAutomataStatePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
30026 static void des_xmlAutomataStatePtr(int no ATTRIBUTE_UNUSED, xmlAutomataStatePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
30032 test_xmlAutomataNewAllTrans(void) {
30036 /* missing type support */
30042 test_xmlAutomataNewCountTrans(void) {
30046 /* missing type support */
30052 test_xmlAutomataNewCountTrans2(void) {
30056 /* missing type support */
30062 test_xmlAutomataNewCountedTrans(void) {
30066 /* missing type support */
30072 test_xmlAutomataNewCounter(void) {
30075 #if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
30078 xmlAutomataPtr am; /* an automata */
30080 int min; /* the minimal value on the counter */
30082 int max; /* the maximal value on the counter */
30085 for (n_am = 0;n_am < gen_nb_xmlAutomataPtr;n_am++) {
30086 for (n_min = 0;n_min < gen_nb_int;n_min++) {
30087 for (n_max = 0;n_max < gen_nb_int;n_max++) {
30088 mem_base = xmlMemBlocks();
30089 am = gen_xmlAutomataPtr(n_am, 0);
30090 min = gen_int(n_min, 1);
30091 max = gen_int(n_max, 2);
30093 ret_val = xmlAutomataNewCounter(am, min, max);
30094 desret_int(ret_val);
30096 des_xmlAutomataPtr(n_am, am, 0);
30097 des_int(n_min, min, 1);
30098 des_int(n_max, max, 2);
30099 xmlResetLastError();
30100 if (mem_base != xmlMemBlocks()) {
30101 printf("Leak of %d blocks found in xmlAutomataNewCounter",
30102 xmlMemBlocks() - mem_base);
30104 printf(" %d", n_am);
30105 printf(" %d", n_min);
30106 printf(" %d", n_max);
30120 test_xmlAutomataNewCounterTrans(void) {
30124 /* missing type support */
30130 test_xmlAutomataNewEpsilon(void) {
30134 /* missing type support */
30140 test_xmlAutomataNewNegTrans(void) {
30144 /* missing type support */
30150 test_xmlAutomataNewOnceTrans(void) {
30154 /* missing type support */
30160 test_xmlAutomataNewOnceTrans2(void) {
30164 /* missing type support */
30170 test_xmlAutomataNewState(void) {
30174 /* missing type support */
30180 test_xmlAutomataNewTransition(void) {
30184 /* missing type support */
30190 test_xmlAutomataNewTransition2(void) {
30194 /* missing type support */
30200 test_xmlAutomataSetFinalState(void) {
30203 #if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
30206 xmlAutomataPtr am; /* an automata */
30208 xmlAutomataStatePtr state; /* a state in this automata */
30211 for (n_am = 0;n_am < gen_nb_xmlAutomataPtr;n_am++) {
30212 for (n_state = 0;n_state < gen_nb_xmlAutomataStatePtr;n_state++) {
30213 mem_base = xmlMemBlocks();
30214 am = gen_xmlAutomataPtr(n_am, 0);
30215 state = gen_xmlAutomataStatePtr(n_state, 1);
30217 ret_val = xmlAutomataSetFinalState(am, state);
30218 desret_int(ret_val);
30220 des_xmlAutomataPtr(n_am, am, 0);
30221 des_xmlAutomataStatePtr(n_state, state, 1);
30222 xmlResetLastError();
30223 if (mem_base != xmlMemBlocks()) {
30224 printf("Leak of %d blocks found in xmlAutomataSetFinalState",
30225 xmlMemBlocks() - mem_base);
30227 printf(" %d", n_am);
30228 printf(" %d", n_state);
30241 test_xmlNewAutomata(void) {
30245 /* missing type support */
30250 test_xmlautomata(void) {
30254 if (quiet == 0) printf("Testing xmlautomata : 3 of 19 functions ...\n");
30255 rc = test_xmlAutomataCompile();
30256 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30257 rc = test_xmlAutomataGetInitState();
30258 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30259 rc = test_xmlAutomataIsDeterminist();
30260 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30261 rc = test_xmlAutomataNewAllTrans();
30262 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30263 rc = test_xmlAutomataNewCountTrans();
30264 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30265 rc = test_xmlAutomataNewCountTrans2();
30266 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30267 rc = test_xmlAutomataNewCountedTrans();
30268 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30269 rc = test_xmlAutomataNewCounter();
30270 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30271 rc = test_xmlAutomataNewCounterTrans();
30272 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30273 rc = test_xmlAutomataNewEpsilon();
30274 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30275 rc = test_xmlAutomataNewNegTrans();
30276 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30277 rc = test_xmlAutomataNewOnceTrans();
30278 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30279 rc = test_xmlAutomataNewOnceTrans2();
30280 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30281 rc = test_xmlAutomataNewState();
30282 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30283 rc = test_xmlAutomataNewTransition();
30284 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30285 rc = test_xmlAutomataNewTransition2();
30286 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30287 rc = test_xmlAutomataSetFinalState();
30288 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30289 rc = test_xmlNewAutomata();
30290 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30293 printf("Module xmlautomata: %d errors\n", test_ret);
30297 #define gen_nb_xmlGenericErrorFunc_ptr 1
30298 static xmlGenericErrorFunc * gen_xmlGenericErrorFunc_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
30301 static void des_xmlGenericErrorFunc_ptr(int no ATTRIBUTE_UNUSED, xmlGenericErrorFunc * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
30305 test_initGenericErrorDefaultFunc(void) {
30309 xmlGenericErrorFunc * handler; /* the handler */
30312 for (n_handler = 0;n_handler < gen_nb_xmlGenericErrorFunc_ptr;n_handler++) {
30313 mem_base = xmlMemBlocks();
30314 handler = gen_xmlGenericErrorFunc_ptr(n_handler, 0);
30316 initGenericErrorDefaultFunc(handler);
30318 des_xmlGenericErrorFunc_ptr(n_handler, handler, 0);
30319 xmlResetLastError();
30320 if (mem_base != xmlMemBlocks()) {
30321 printf("Leak of %d blocks found in initGenericErrorDefaultFunc",
30322 xmlMemBlocks() - mem_base);
30324 printf(" %d", n_handler);
30334 #define gen_nb_xmlErrorPtr 1
30335 static xmlErrorPtr gen_xmlErrorPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
30338 static void des_xmlErrorPtr(int no ATTRIBUTE_UNUSED, xmlErrorPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
30342 test_xmlCopyError(void) {
30347 xmlErrorPtr from; /* a source error */
30349 xmlErrorPtr to; /* a target error */
30352 for (n_from = 0;n_from < gen_nb_xmlErrorPtr;n_from++) {
30353 for (n_to = 0;n_to < gen_nb_xmlErrorPtr;n_to++) {
30354 mem_base = xmlMemBlocks();
30355 from = gen_xmlErrorPtr(n_from, 0);
30356 to = gen_xmlErrorPtr(n_to, 1);
30358 ret_val = xmlCopyError(from, to);
30359 desret_int(ret_val);
30361 des_xmlErrorPtr(n_from, from, 0);
30362 des_xmlErrorPtr(n_to, to, 1);
30363 xmlResetLastError();
30364 if (mem_base != xmlMemBlocks()) {
30365 printf("Leak of %d blocks found in xmlCopyError",
30366 xmlMemBlocks() - mem_base);
30368 printf(" %d", n_from);
30369 printf(" %d", n_to);
30381 test_xmlCtxtGetLastError(void) {
30385 /* missing type support */
30391 test_xmlCtxtResetLastError(void) {
30395 void * ctx; /* an XML parser context */
30398 for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
30399 mem_base = xmlMemBlocks();
30400 ctx = gen_void_ptr(n_ctx, 0);
30402 xmlCtxtResetLastError(ctx);
30404 des_void_ptr(n_ctx, ctx, 0);
30405 xmlResetLastError();
30406 if (mem_base != xmlMemBlocks()) {
30407 printf("Leak of %d blocks found in xmlCtxtResetLastError",
30408 xmlMemBlocks() - mem_base);
30410 printf(" %d", n_ctx);
30421 test_xmlGetLastError(void) {
30425 /* missing type support */
30431 test_xmlParserError(void) {
30435 /* missing type support */
30441 test_xmlParserPrintFileContext(void) {
30445 xmlParserInputPtr input; /* an xmlParserInputPtr input */
30448 for (n_input = 0;n_input < gen_nb_xmlParserInputPtr;n_input++) {
30449 mem_base = xmlMemBlocks();
30450 input = gen_xmlParserInputPtr(n_input, 0);
30452 xmlParserPrintFileContext(input);
30454 des_xmlParserInputPtr(n_input, input, 0);
30455 xmlResetLastError();
30456 if (mem_base != xmlMemBlocks()) {
30457 printf("Leak of %d blocks found in xmlParserPrintFileContext",
30458 xmlMemBlocks() - mem_base);
30460 printf(" %d", n_input);
30471 test_xmlParserPrintFileInfo(void) {
30475 xmlParserInputPtr input; /* an xmlParserInputPtr input */
30478 for (n_input = 0;n_input < gen_nb_xmlParserInputPtr;n_input++) {
30479 mem_base = xmlMemBlocks();
30480 input = gen_xmlParserInputPtr(n_input, 0);
30482 xmlParserPrintFileInfo(input);
30484 des_xmlParserInputPtr(n_input, input, 0);
30485 xmlResetLastError();
30486 if (mem_base != xmlMemBlocks()) {
30487 printf("Leak of %d blocks found in xmlParserPrintFileInfo",
30488 xmlMemBlocks() - mem_base);
30490 printf(" %d", n_input);
30501 test_xmlParserValidityError(void) {
30505 /* missing type support */
30511 test_xmlParserValidityWarning(void) {
30515 /* missing type support */
30521 test_xmlParserWarning(void) {
30525 /* missing type support */
30531 test_xmlResetError(void) {
30535 xmlErrorPtr err; /* pointer to the error. */
30538 for (n_err = 0;n_err < gen_nb_xmlErrorPtr;n_err++) {
30539 mem_base = xmlMemBlocks();
30540 err = gen_xmlErrorPtr(n_err, 0);
30542 xmlResetError(err);
30544 des_xmlErrorPtr(n_err, err, 0);
30545 xmlResetLastError();
30546 if (mem_base != xmlMemBlocks()) {
30547 printf("Leak of %d blocks found in xmlResetError",
30548 xmlMemBlocks() - mem_base);
30550 printf(" %d", n_err);
30561 test_xmlResetLastError(void) {
30566 xmlResetLastError();
30568 xmlResetLastError();
30576 test_xmlSetGenericErrorFunc(void) {
30580 /* missing type support */
30586 test_xmlSetStructuredErrorFunc(void) {
30590 /* missing type support */
30595 test_xmlerror(void) {
30599 if (quiet == 0) printf("Testing xmlerror : 7 of 15 functions ...\n");
30600 rc = test_initGenericErrorDefaultFunc();
30601 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30602 rc = test_xmlCopyError();
30603 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30604 rc = test_xmlCtxtGetLastError();
30605 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30606 rc = test_xmlCtxtResetLastError();
30607 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30608 rc = test_xmlGetLastError();
30609 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30610 rc = test_xmlParserError();
30611 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30612 rc = test_xmlParserPrintFileContext();
30613 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30614 rc = test_xmlParserPrintFileInfo();
30615 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30616 rc = test_xmlParserValidityError();
30617 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30618 rc = test_xmlParserValidityWarning();
30619 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30620 rc = test_xmlParserWarning();
30621 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30622 rc = test_xmlResetError();
30623 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30624 rc = test_xmlResetLastError();
30625 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30626 rc = test_xmlSetGenericErrorFunc();
30627 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30628 rc = test_xmlSetStructuredErrorFunc();
30629 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30632 printf("Module xmlerror: %d errors\n", test_ret);
30635 #ifdef LIBXML_MODULES_ENABLED
30637 #define gen_nb_xmlModulePtr 1
30638 static xmlModulePtr gen_xmlModulePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
30641 static void des_xmlModulePtr(int no ATTRIBUTE_UNUSED, xmlModulePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
30647 test_xmlModuleClose(void) {
30650 #if defined(LIBXML_MODULES_ENABLED)
30653 xmlModulePtr module; /* the module handle */
30656 for (n_module = 0;n_module < gen_nb_xmlModulePtr;n_module++) {
30657 mem_base = xmlMemBlocks();
30658 module = gen_xmlModulePtr(n_module, 0);
30660 ret_val = xmlModuleClose(module);
30661 desret_int(ret_val);
30663 des_xmlModulePtr(n_module, module, 0);
30664 xmlResetLastError();
30665 if (mem_base != xmlMemBlocks()) {
30666 printf("Leak of %d blocks found in xmlModuleClose",
30667 xmlMemBlocks() - mem_base);
30669 printf(" %d", n_module);
30681 test_xmlModuleOpen(void) {
30685 /* missing type support */
30691 test_xmlModuleSymbol(void) {
30694 #if defined(LIBXML_MODULES_ENABLED)
30697 xmlModulePtr module; /* the module */
30699 char * name; /* the name of the symbol */
30701 void ** symbol; /* the resulting symbol address */
30704 for (n_module = 0;n_module < gen_nb_xmlModulePtr;n_module++) {
30705 for (n_name = 0;n_name < gen_nb_const_char_ptr;n_name++) {
30706 for (n_symbol = 0;n_symbol < gen_nb_void_ptr_ptr;n_symbol++) {
30707 mem_base = xmlMemBlocks();
30708 module = gen_xmlModulePtr(n_module, 0);
30709 name = gen_const_char_ptr(n_name, 1);
30710 symbol = gen_void_ptr_ptr(n_symbol, 2);
30712 ret_val = xmlModuleSymbol(module, (const char *)name, symbol);
30713 desret_int(ret_val);
30715 des_xmlModulePtr(n_module, module, 0);
30716 des_const_char_ptr(n_name, (const char *)name, 1);
30717 des_void_ptr_ptr(n_symbol, symbol, 2);
30718 xmlResetLastError();
30719 if (mem_base != xmlMemBlocks()) {
30720 printf("Leak of %d blocks found in xmlModuleSymbol",
30721 xmlMemBlocks() - mem_base);
30723 printf(" %d", n_module);
30724 printf(" %d", n_name);
30725 printf(" %d", n_symbol);
30738 test_xmlmodule(void) {
30742 if (quiet == 0) printf("Testing xmlmodule : 2 of 4 functions ...\n");
30743 rc = test_xmlModuleClose();
30744 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30745 rc = test_xmlModuleOpen();
30746 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30747 rc = test_xmlModuleSymbol();
30748 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
30751 printf("Module xmlmodule: %d errors\n", test_ret);
30756 test_xmlNewTextReader(void) {
30759 #if defined(LIBXML_READER_ENABLED)
30761 xmlTextReaderPtr ret_val;
30762 xmlParserInputBufferPtr input; /* the xmlParserInputBufferPtr used to read data */
30764 const char * URI; /* the URI information for the source if available */
30767 for (n_input = 0;n_input < gen_nb_xmlParserInputBufferPtr;n_input++) {
30768 for (n_URI = 0;n_URI < gen_nb_filepath;n_URI++) {
30769 mem_base = xmlMemBlocks();
30770 input = gen_xmlParserInputBufferPtr(n_input, 0);
30771 URI = gen_filepath(n_URI, 1);
30773 ret_val = xmlNewTextReader(input, URI);
30774 desret_xmlTextReaderPtr(ret_val);
30776 des_xmlParserInputBufferPtr(n_input, input, 0);
30777 des_filepath(n_URI, URI, 1);
30778 xmlResetLastError();
30779 if (mem_base != xmlMemBlocks()) {
30780 printf("Leak of %d blocks found in xmlNewTextReader",
30781 xmlMemBlocks() - mem_base);
30783 printf(" %d", n_input);
30784 printf(" %d", n_URI);
30797 test_xmlNewTextReaderFilename(void) {
30800 #if defined(LIBXML_READER_ENABLED)
30802 xmlTextReaderPtr ret_val;
30803 const char * URI; /* the URI of the resource to process */
30806 for (n_URI = 0;n_URI < gen_nb_filepath;n_URI++) {
30807 mem_base = xmlMemBlocks();
30808 URI = gen_filepath(n_URI, 0);
30810 ret_val = xmlNewTextReaderFilename(URI);
30811 desret_xmlTextReaderPtr(ret_val);
30813 des_filepath(n_URI, URI, 0);
30814 xmlResetLastError();
30815 if (mem_base != xmlMemBlocks()) {
30816 printf("Leak of %d blocks found in xmlNewTextReaderFilename",
30817 xmlMemBlocks() - mem_base);
30819 printf(" %d", n_URI);
30831 test_xmlReaderForDoc(void) {
30834 #if defined(LIBXML_READER_ENABLED)
30836 xmlTextReaderPtr ret_val;
30837 xmlChar * cur; /* a pointer to a zero terminated string */
30839 const char * URL; /* the base URL to use for the document */
30841 char * encoding; /* the document encoding, or NULL */
30843 int options; /* a combination of xmlParserOption */
30846 for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
30847 for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
30848 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
30849 for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
30850 mem_base = xmlMemBlocks();
30851 cur = gen_const_xmlChar_ptr(n_cur, 0);
30852 URL = gen_filepath(n_URL, 1);
30853 encoding = gen_const_char_ptr(n_encoding, 2);
30854 options = gen_parseroptions(n_options, 3);
30856 ret_val = xmlReaderForDoc((const xmlChar *)cur, URL, (const char *)encoding, options);
30857 desret_xmlTextReaderPtr(ret_val);
30859 des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 0);
30860 des_filepath(n_URL, URL, 1);
30861 des_const_char_ptr(n_encoding, (const char *)encoding, 2);
30862 des_parseroptions(n_options, options, 3);
30863 xmlResetLastError();
30864 if (mem_base != xmlMemBlocks()) {
30865 printf("Leak of %d blocks found in xmlReaderForDoc",
30866 xmlMemBlocks() - mem_base);
30868 printf(" %d", n_cur);
30869 printf(" %d", n_URL);
30870 printf(" %d", n_encoding);
30871 printf(" %d", n_options);
30886 test_xmlReaderForFile(void) {
30889 #if defined(LIBXML_READER_ENABLED)
30891 xmlTextReaderPtr ret_val;
30892 const char * filename; /* a file or URL */
30894 char * encoding; /* the document encoding, or NULL */
30896 int options; /* a combination of xmlParserOption */
30899 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
30900 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
30901 for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
30902 mem_base = xmlMemBlocks();
30903 filename = gen_filepath(n_filename, 0);
30904 encoding = gen_const_char_ptr(n_encoding, 1);
30905 options = gen_parseroptions(n_options, 2);
30907 ret_val = xmlReaderForFile(filename, (const char *)encoding, options);
30908 desret_xmlTextReaderPtr(ret_val);
30910 des_filepath(n_filename, filename, 0);
30911 des_const_char_ptr(n_encoding, (const char *)encoding, 1);
30912 des_parseroptions(n_options, options, 2);
30913 xmlResetLastError();
30914 if (mem_base != xmlMemBlocks()) {
30915 printf("Leak of %d blocks found in xmlReaderForFile",
30916 xmlMemBlocks() - mem_base);
30918 printf(" %d", n_filename);
30919 printf(" %d", n_encoding);
30920 printf(" %d", n_options);
30934 test_xmlReaderForMemory(void) {
30937 #if defined(LIBXML_READER_ENABLED)
30939 xmlTextReaderPtr ret_val;
30940 char * buffer; /* a pointer to a char array */
30942 int size; /* the size of the array */
30944 const char * URL; /* the base URL to use for the document */
30946 char * encoding; /* the document encoding, or NULL */
30948 int options; /* a combination of xmlParserOption */
30951 for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
30952 for (n_size = 0;n_size < gen_nb_int;n_size++) {
30953 for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
30954 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
30955 for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
30956 mem_base = xmlMemBlocks();
30957 buffer = gen_const_char_ptr(n_buffer, 0);
30958 size = gen_int(n_size, 1);
30959 URL = gen_filepath(n_URL, 2);
30960 encoding = gen_const_char_ptr(n_encoding, 3);
30961 options = gen_parseroptions(n_options, 4);
30963 ret_val = xmlReaderForMemory((const char *)buffer, size, URL, (const char *)encoding, options);
30964 desret_xmlTextReaderPtr(ret_val);
30966 des_const_char_ptr(n_buffer, (const char *)buffer, 0);
30967 des_int(n_size, size, 1);
30968 des_filepath(n_URL, URL, 2);
30969 des_const_char_ptr(n_encoding, (const char *)encoding, 3);
30970 des_parseroptions(n_options, options, 4);
30971 xmlResetLastError();
30972 if (mem_base != xmlMemBlocks()) {
30973 printf("Leak of %d blocks found in xmlReaderForMemory",
30974 xmlMemBlocks() - mem_base);
30976 printf(" %d", n_buffer);
30977 printf(" %d", n_size);
30978 printf(" %d", n_URL);
30979 printf(" %d", n_encoding);
30980 printf(" %d", n_options);
30996 test_xmlReaderNewDoc(void) {
30999 #if defined(LIBXML_READER_ENABLED)
31002 xmlTextReaderPtr reader; /* an XML reader */
31004 xmlChar * cur; /* a pointer to a zero terminated string */
31006 const char * URL; /* the base URL to use for the document */
31008 char * encoding; /* the document encoding, or NULL */
31010 int options; /* a combination of xmlParserOption */
31013 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31014 for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
31015 for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
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 reader = gen_xmlTextReaderPtr(n_reader, 0);
31020 cur = gen_const_xmlChar_ptr(n_cur, 1);
31021 URL = gen_filepath(n_URL, 2);
31022 encoding = gen_const_char_ptr(n_encoding, 3);
31023 options = gen_parseroptions(n_options, 4);
31025 ret_val = xmlReaderNewDoc(reader, (const xmlChar *)cur, URL, (const char *)encoding, options);
31026 desret_int(ret_val);
31028 des_xmlTextReaderPtr(n_reader, reader, 0);
31029 des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 1);
31030 des_filepath(n_URL, URL, 2);
31031 des_const_char_ptr(n_encoding, (const char *)encoding, 3);
31032 des_parseroptions(n_options, options, 4);
31033 xmlResetLastError();
31034 if (mem_base != xmlMemBlocks()) {
31035 printf("Leak of %d blocks found in xmlReaderNewDoc",
31036 xmlMemBlocks() - mem_base);
31038 printf(" %d", n_reader);
31039 printf(" %d", n_cur);
31040 printf(" %d", n_URL);
31041 printf(" %d", n_encoding);
31042 printf(" %d", n_options);
31058 test_xmlReaderNewFile(void) {
31061 #if defined(LIBXML_READER_ENABLED)
31064 xmlTextReaderPtr reader; /* an XML reader */
31066 const char * filename; /* a file or URL */
31068 char * encoding; /* the document encoding, or NULL */
31070 int options; /* a combination of xmlParserOption */
31073 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31074 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
31075 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
31076 for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
31077 mem_base = xmlMemBlocks();
31078 reader = gen_xmlTextReaderPtr(n_reader, 0);
31079 filename = gen_filepath(n_filename, 1);
31080 encoding = gen_const_char_ptr(n_encoding, 2);
31081 options = gen_parseroptions(n_options, 3);
31083 ret_val = xmlReaderNewFile(reader, filename, (const char *)encoding, options);
31084 desret_int(ret_val);
31086 des_xmlTextReaderPtr(n_reader, reader, 0);
31087 des_filepath(n_filename, filename, 1);
31088 des_const_char_ptr(n_encoding, (const char *)encoding, 2);
31089 des_parseroptions(n_options, options, 3);
31090 xmlResetLastError();
31091 if (mem_base != xmlMemBlocks()) {
31092 printf("Leak of %d blocks found in xmlReaderNewFile",
31093 xmlMemBlocks() - mem_base);
31095 printf(" %d", n_reader);
31096 printf(" %d", n_filename);
31097 printf(" %d", n_encoding);
31098 printf(" %d", n_options);
31113 test_xmlReaderNewMemory(void) {
31116 #if defined(LIBXML_READER_ENABLED)
31119 xmlTextReaderPtr reader; /* an XML reader */
31121 char * buffer; /* a pointer to a char array */
31123 int size; /* the size of the array */
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_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
31134 for (n_size = 0;n_size < gen_nb_int;n_size++) {
31135 for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
31136 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
31137 for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
31138 mem_base = xmlMemBlocks();
31139 reader = gen_xmlTextReaderPtr(n_reader, 0);
31140 buffer = gen_const_char_ptr(n_buffer, 1);
31141 size = gen_int(n_size, 2);
31142 URL = gen_filepath(n_URL, 3);
31143 encoding = gen_const_char_ptr(n_encoding, 4);
31144 options = gen_parseroptions(n_options, 5);
31146 ret_val = xmlReaderNewMemory(reader, (const char *)buffer, size, URL, (const char *)encoding, options);
31147 desret_int(ret_val);
31149 des_xmlTextReaderPtr(n_reader, reader, 0);
31150 des_const_char_ptr(n_buffer, (const char *)buffer, 1);
31151 des_int(n_size, size, 2);
31152 des_filepath(n_URL, URL, 3);
31153 des_const_char_ptr(n_encoding, (const char *)encoding, 4);
31154 des_parseroptions(n_options, options, 5);
31155 xmlResetLastError();
31156 if (mem_base != xmlMemBlocks()) {
31157 printf("Leak of %d blocks found in xmlReaderNewMemory",
31158 xmlMemBlocks() - mem_base);
31160 printf(" %d", n_reader);
31161 printf(" %d", n_buffer);
31162 printf(" %d", n_size);
31163 printf(" %d", n_URL);
31164 printf(" %d", n_encoding);
31165 printf(" %d", n_options);
31182 test_xmlReaderNewWalker(void) {
31185 #if defined(LIBXML_READER_ENABLED)
31188 xmlTextReaderPtr reader; /* an XML reader */
31190 xmlDocPtr doc; /* a preparsed document */
31193 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31194 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
31195 mem_base = xmlMemBlocks();
31196 reader = gen_xmlTextReaderPtr(n_reader, 0);
31197 doc = gen_xmlDocPtr(n_doc, 1);
31199 ret_val = xmlReaderNewWalker(reader, doc);
31200 desret_int(ret_val);
31202 des_xmlTextReaderPtr(n_reader, reader, 0);
31203 des_xmlDocPtr(n_doc, doc, 1);
31204 xmlResetLastError();
31205 if (mem_base != xmlMemBlocks()) {
31206 printf("Leak of %d blocks found in xmlReaderNewWalker",
31207 xmlMemBlocks() - mem_base);
31209 printf(" %d", n_reader);
31210 printf(" %d", n_doc);
31223 test_xmlReaderWalker(void) {
31226 #if defined(LIBXML_READER_ENABLED)
31228 xmlTextReaderPtr ret_val;
31229 xmlDocPtr doc; /* a preparsed document */
31232 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
31233 mem_base = xmlMemBlocks();
31234 doc = gen_xmlDocPtr(n_doc, 0);
31236 ret_val = xmlReaderWalker(doc);
31237 desret_xmlTextReaderPtr(ret_val);
31239 des_xmlDocPtr(n_doc, doc, 0);
31240 xmlResetLastError();
31241 if (mem_base != xmlMemBlocks()) {
31242 printf("Leak of %d blocks found in xmlReaderWalker",
31243 xmlMemBlocks() - mem_base);
31245 printf(" %d", n_doc);
31257 test_xmlTextReaderAttributeCount(void) {
31260 #if defined(LIBXML_READER_ENABLED)
31263 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
31266 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31267 mem_base = xmlMemBlocks();
31268 reader = gen_xmlTextReaderPtr(n_reader, 0);
31270 ret_val = xmlTextReaderAttributeCount(reader);
31271 desret_int(ret_val);
31273 des_xmlTextReaderPtr(n_reader, reader, 0);
31274 xmlResetLastError();
31275 if (mem_base != xmlMemBlocks()) {
31276 printf("Leak of %d blocks found in xmlTextReaderAttributeCount",
31277 xmlMemBlocks() - mem_base);
31279 printf(" %d", n_reader);
31291 test_xmlTextReaderBaseUri(void) {
31294 #if defined(LIBXML_READER_ENABLED)
31297 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
31300 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31301 mem_base = xmlMemBlocks();
31302 reader = gen_xmlTextReaderPtr(n_reader, 0);
31304 ret_val = xmlTextReaderBaseUri(reader);
31305 desret_xmlChar_ptr(ret_val);
31307 des_xmlTextReaderPtr(n_reader, reader, 0);
31308 xmlResetLastError();
31309 if (mem_base != xmlMemBlocks()) {
31310 printf("Leak of %d blocks found in xmlTextReaderBaseUri",
31311 xmlMemBlocks() - mem_base);
31313 printf(" %d", n_reader);
31325 test_xmlTextReaderByteConsumed(void) {
31328 #if defined(LIBXML_READER_ENABLED)
31331 xmlTextReaderPtr reader; /* an XML reader */
31334 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31335 mem_base = xmlMemBlocks();
31336 reader = gen_xmlTextReaderPtr(n_reader, 0);
31338 ret_val = xmlTextReaderByteConsumed(reader);
31339 desret_long(ret_val);
31341 des_xmlTextReaderPtr(n_reader, reader, 0);
31342 xmlResetLastError();
31343 if (mem_base != xmlMemBlocks()) {
31344 printf("Leak of %d blocks found in xmlTextReaderByteConsumed",
31345 xmlMemBlocks() - mem_base);
31347 printf(" %d", n_reader);
31359 test_xmlTextReaderClose(void) {
31362 #if defined(LIBXML_READER_ENABLED)
31365 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
31368 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31369 mem_base = xmlMemBlocks();
31370 reader = gen_xmlTextReaderPtr(n_reader, 0);
31372 ret_val = xmlTextReaderClose(reader);
31373 desret_int(ret_val);
31375 des_xmlTextReaderPtr(n_reader, reader, 0);
31376 xmlResetLastError();
31377 if (mem_base != xmlMemBlocks()) {
31378 printf("Leak of %d blocks found in xmlTextReaderClose",
31379 xmlMemBlocks() - mem_base);
31381 printf(" %d", n_reader);
31393 test_xmlTextReaderConstBaseUri(void) {
31396 #if defined(LIBXML_READER_ENABLED)
31398 const xmlChar * ret_val;
31399 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
31402 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31403 mem_base = xmlMemBlocks();
31404 reader = gen_xmlTextReaderPtr(n_reader, 0);
31406 ret_val = xmlTextReaderConstBaseUri(reader);
31407 desret_const_xmlChar_ptr(ret_val);
31409 des_xmlTextReaderPtr(n_reader, reader, 0);
31410 xmlResetLastError();
31411 if (mem_base != xmlMemBlocks()) {
31412 printf("Leak of %d blocks found in xmlTextReaderConstBaseUri",
31413 xmlMemBlocks() - mem_base);
31415 printf(" %d", n_reader);
31427 test_xmlTextReaderConstEncoding(void) {
31430 #if defined(LIBXML_READER_ENABLED)
31432 const xmlChar * ret_val;
31433 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
31436 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31437 mem_base = xmlMemBlocks();
31438 reader = gen_xmlTextReaderPtr(n_reader, 0);
31440 ret_val = xmlTextReaderConstEncoding(reader);
31441 desret_const_xmlChar_ptr(ret_val);
31443 des_xmlTextReaderPtr(n_reader, reader, 0);
31444 xmlResetLastError();
31445 if (mem_base != xmlMemBlocks()) {
31446 printf("Leak of %d blocks found in xmlTextReaderConstEncoding",
31447 xmlMemBlocks() - mem_base);
31449 printf(" %d", n_reader);
31461 test_xmlTextReaderConstLocalName(void) {
31464 #if defined(LIBXML_READER_ENABLED)
31466 const xmlChar * ret_val;
31467 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
31470 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31471 mem_base = xmlMemBlocks();
31472 reader = gen_xmlTextReaderPtr(n_reader, 0);
31474 ret_val = xmlTextReaderConstLocalName(reader);
31475 desret_const_xmlChar_ptr(ret_val);
31477 des_xmlTextReaderPtr(n_reader, reader, 0);
31478 xmlResetLastError();
31479 if (mem_base != xmlMemBlocks()) {
31480 printf("Leak of %d blocks found in xmlTextReaderConstLocalName",
31481 xmlMemBlocks() - mem_base);
31483 printf(" %d", n_reader);
31495 test_xmlTextReaderConstName(void) {
31498 #if defined(LIBXML_READER_ENABLED)
31500 const xmlChar * ret_val;
31501 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
31504 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31505 mem_base = xmlMemBlocks();
31506 reader = gen_xmlTextReaderPtr(n_reader, 0);
31508 ret_val = xmlTextReaderConstName(reader);
31509 desret_const_xmlChar_ptr(ret_val);
31511 des_xmlTextReaderPtr(n_reader, reader, 0);
31512 xmlResetLastError();
31513 if (mem_base != xmlMemBlocks()) {
31514 printf("Leak of %d blocks found in xmlTextReaderConstName",
31515 xmlMemBlocks() - mem_base);
31517 printf(" %d", n_reader);
31529 test_xmlTextReaderConstNamespaceUri(void) {
31532 #if defined(LIBXML_READER_ENABLED)
31534 const xmlChar * ret_val;
31535 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
31538 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31539 mem_base = xmlMemBlocks();
31540 reader = gen_xmlTextReaderPtr(n_reader, 0);
31542 ret_val = xmlTextReaderConstNamespaceUri(reader);
31543 desret_const_xmlChar_ptr(ret_val);
31545 des_xmlTextReaderPtr(n_reader, reader, 0);
31546 xmlResetLastError();
31547 if (mem_base != xmlMemBlocks()) {
31548 printf("Leak of %d blocks found in xmlTextReaderConstNamespaceUri",
31549 xmlMemBlocks() - mem_base);
31551 printf(" %d", n_reader);
31563 test_xmlTextReaderConstPrefix(void) {
31566 #if defined(LIBXML_READER_ENABLED)
31568 const xmlChar * ret_val;
31569 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
31572 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31573 mem_base = xmlMemBlocks();
31574 reader = gen_xmlTextReaderPtr(n_reader, 0);
31576 ret_val = xmlTextReaderConstPrefix(reader);
31577 desret_const_xmlChar_ptr(ret_val);
31579 des_xmlTextReaderPtr(n_reader, reader, 0);
31580 xmlResetLastError();
31581 if (mem_base != xmlMemBlocks()) {
31582 printf("Leak of %d blocks found in xmlTextReaderConstPrefix",
31583 xmlMemBlocks() - mem_base);
31585 printf(" %d", n_reader);
31597 test_xmlTextReaderConstString(void) {
31600 #if defined(LIBXML_READER_ENABLED)
31602 const xmlChar * ret_val;
31603 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
31605 xmlChar * str; /* the string to intern. */
31608 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31609 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
31610 mem_base = xmlMemBlocks();
31611 reader = gen_xmlTextReaderPtr(n_reader, 0);
31612 str = gen_const_xmlChar_ptr(n_str, 1);
31614 ret_val = xmlTextReaderConstString(reader, (const xmlChar *)str);
31615 desret_const_xmlChar_ptr(ret_val);
31617 des_xmlTextReaderPtr(n_reader, reader, 0);
31618 des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 1);
31619 xmlResetLastError();
31620 if (mem_base != xmlMemBlocks()) {
31621 printf("Leak of %d blocks found in xmlTextReaderConstString",
31622 xmlMemBlocks() - mem_base);
31624 printf(" %d", n_reader);
31625 printf(" %d", n_str);
31638 test_xmlTextReaderConstValue(void) {
31641 #if defined(LIBXML_READER_ENABLED)
31643 const xmlChar * ret_val;
31644 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
31647 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31648 mem_base = xmlMemBlocks();
31649 reader = gen_xmlTextReaderPtr(n_reader, 0);
31651 ret_val = xmlTextReaderConstValue(reader);
31652 desret_const_xmlChar_ptr(ret_val);
31654 des_xmlTextReaderPtr(n_reader, reader, 0);
31655 xmlResetLastError();
31656 if (mem_base != xmlMemBlocks()) {
31657 printf("Leak of %d blocks found in xmlTextReaderConstValue",
31658 xmlMemBlocks() - mem_base);
31660 printf(" %d", n_reader);
31672 test_xmlTextReaderConstXmlLang(void) {
31675 #if defined(LIBXML_READER_ENABLED)
31677 const xmlChar * ret_val;
31678 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
31681 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31682 mem_base = xmlMemBlocks();
31683 reader = gen_xmlTextReaderPtr(n_reader, 0);
31685 ret_val = xmlTextReaderConstXmlLang(reader);
31686 desret_const_xmlChar_ptr(ret_val);
31688 des_xmlTextReaderPtr(n_reader, reader, 0);
31689 xmlResetLastError();
31690 if (mem_base != xmlMemBlocks()) {
31691 printf("Leak of %d blocks found in xmlTextReaderConstXmlLang",
31692 xmlMemBlocks() - mem_base);
31694 printf(" %d", n_reader);
31706 test_xmlTextReaderConstXmlVersion(void) {
31709 #if defined(LIBXML_READER_ENABLED)
31711 const xmlChar * ret_val;
31712 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
31715 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31716 mem_base = xmlMemBlocks();
31717 reader = gen_xmlTextReaderPtr(n_reader, 0);
31719 ret_val = xmlTextReaderConstXmlVersion(reader);
31720 desret_const_xmlChar_ptr(ret_val);
31722 des_xmlTextReaderPtr(n_reader, reader, 0);
31723 xmlResetLastError();
31724 if (mem_base != xmlMemBlocks()) {
31725 printf("Leak of %d blocks found in xmlTextReaderConstXmlVersion",
31726 xmlMemBlocks() - mem_base);
31728 printf(" %d", n_reader);
31740 test_xmlTextReaderCurrentDoc(void) {
31743 #if defined(LIBXML_READER_ENABLED)
31746 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
31749 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31750 mem_base = xmlMemBlocks();
31751 reader = gen_xmlTextReaderPtr(n_reader, 0);
31753 ret_val = xmlTextReaderCurrentDoc(reader);
31754 desret_xmlDocPtr(ret_val);
31756 des_xmlTextReaderPtr(n_reader, reader, 0);
31757 xmlResetLastError();
31758 if (mem_base != xmlMemBlocks()) {
31759 printf("Leak of %d blocks found in xmlTextReaderCurrentDoc",
31760 xmlMemBlocks() - mem_base);
31762 printf(" %d", n_reader);
31774 test_xmlTextReaderCurrentNode(void) {
31777 #if defined(LIBXML_READER_ENABLED)
31779 xmlNodePtr ret_val;
31780 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
31783 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31784 mem_base = xmlMemBlocks();
31785 reader = gen_xmlTextReaderPtr(n_reader, 0);
31787 ret_val = xmlTextReaderCurrentNode(reader);
31788 desret_xmlNodePtr(ret_val);
31790 des_xmlTextReaderPtr(n_reader, reader, 0);
31791 xmlResetLastError();
31792 if (mem_base != xmlMemBlocks()) {
31793 printf("Leak of %d blocks found in xmlTextReaderCurrentNode",
31794 xmlMemBlocks() - mem_base);
31796 printf(" %d", n_reader);
31808 test_xmlTextReaderDepth(void) {
31811 #if defined(LIBXML_READER_ENABLED)
31814 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
31817 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31818 mem_base = xmlMemBlocks();
31819 reader = gen_xmlTextReaderPtr(n_reader, 0);
31821 ret_val = xmlTextReaderDepth(reader);
31822 desret_int(ret_val);
31824 des_xmlTextReaderPtr(n_reader, reader, 0);
31825 xmlResetLastError();
31826 if (mem_base != xmlMemBlocks()) {
31827 printf("Leak of %d blocks found in xmlTextReaderDepth",
31828 xmlMemBlocks() - mem_base);
31830 printf(" %d", n_reader);
31842 test_xmlTextReaderExpand(void) {
31845 #if defined(LIBXML_READER_ENABLED)
31847 xmlNodePtr ret_val;
31848 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
31851 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31852 mem_base = xmlMemBlocks();
31853 reader = gen_xmlTextReaderPtr(n_reader, 0);
31855 ret_val = xmlTextReaderExpand(reader);
31856 desret_xmlNodePtr(ret_val);
31858 des_xmlTextReaderPtr(n_reader, reader, 0);
31859 xmlResetLastError();
31860 if (mem_base != xmlMemBlocks()) {
31861 printf("Leak of %d blocks found in xmlTextReaderExpand",
31862 xmlMemBlocks() - mem_base);
31864 printf(" %d", n_reader);
31876 test_xmlTextReaderGetAttribute(void) {
31879 #if defined(LIBXML_READER_ENABLED)
31882 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
31884 xmlChar * name; /* the qualified name of the attribute. */
31887 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31888 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
31889 mem_base = xmlMemBlocks();
31890 reader = gen_xmlTextReaderPtr(n_reader, 0);
31891 name = gen_const_xmlChar_ptr(n_name, 1);
31893 ret_val = xmlTextReaderGetAttribute(reader, (const xmlChar *)name);
31894 desret_xmlChar_ptr(ret_val);
31896 des_xmlTextReaderPtr(n_reader, reader, 0);
31897 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
31898 xmlResetLastError();
31899 if (mem_base != xmlMemBlocks()) {
31900 printf("Leak of %d blocks found in xmlTextReaderGetAttribute",
31901 xmlMemBlocks() - mem_base);
31903 printf(" %d", n_reader);
31904 printf(" %d", n_name);
31917 test_xmlTextReaderGetAttributeNo(void) {
31920 #if defined(LIBXML_READER_ENABLED)
31923 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
31925 int no; /* the zero-based index of the attribute relative to the containing element */
31928 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31929 for (n_no = 0;n_no < gen_nb_int;n_no++) {
31930 mem_base = xmlMemBlocks();
31931 reader = gen_xmlTextReaderPtr(n_reader, 0);
31932 no = gen_int(n_no, 1);
31934 ret_val = xmlTextReaderGetAttributeNo(reader, no);
31935 desret_xmlChar_ptr(ret_val);
31937 des_xmlTextReaderPtr(n_reader, reader, 0);
31938 des_int(n_no, no, 1);
31939 xmlResetLastError();
31940 if (mem_base != xmlMemBlocks()) {
31941 printf("Leak of %d blocks found in xmlTextReaderGetAttributeNo",
31942 xmlMemBlocks() - mem_base);
31944 printf(" %d", n_reader);
31945 printf(" %d", n_no);
31958 test_xmlTextReaderGetAttributeNs(void) {
31961 #if defined(LIBXML_READER_ENABLED)
31964 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
31966 xmlChar * localName; /* the local name of the attribute. */
31968 xmlChar * namespaceURI; /* the namespace URI of the attribute. */
31969 int n_namespaceURI;
31971 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
31972 for (n_localName = 0;n_localName < gen_nb_const_xmlChar_ptr;n_localName++) {
31973 for (n_namespaceURI = 0;n_namespaceURI < gen_nb_const_xmlChar_ptr;n_namespaceURI++) {
31974 mem_base = xmlMemBlocks();
31975 reader = gen_xmlTextReaderPtr(n_reader, 0);
31976 localName = gen_const_xmlChar_ptr(n_localName, 1);
31977 namespaceURI = gen_const_xmlChar_ptr(n_namespaceURI, 2);
31979 ret_val = xmlTextReaderGetAttributeNs(reader, (const xmlChar *)localName, (const xmlChar *)namespaceURI);
31980 desret_xmlChar_ptr(ret_val);
31982 des_xmlTextReaderPtr(n_reader, reader, 0);
31983 des_const_xmlChar_ptr(n_localName, (const xmlChar *)localName, 1);
31984 des_const_xmlChar_ptr(n_namespaceURI, (const xmlChar *)namespaceURI, 2);
31985 xmlResetLastError();
31986 if (mem_base != xmlMemBlocks()) {
31987 printf("Leak of %d blocks found in xmlTextReaderGetAttributeNs",
31988 xmlMemBlocks() - mem_base);
31990 printf(" %d", n_reader);
31991 printf(" %d", n_localName);
31992 printf(" %d", n_namespaceURI);
32004 #ifdef LIBXML_READER_ENABLED
32006 #define gen_nb_xmlTextReaderErrorFunc_ptr 1
32007 static xmlTextReaderErrorFunc * gen_xmlTextReaderErrorFunc_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
32010 static void des_xmlTextReaderErrorFunc_ptr(int no ATTRIBUTE_UNUSED, xmlTextReaderErrorFunc * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
32016 test_xmlTextReaderGetErrorHandler(void) {
32019 #if defined(LIBXML_READER_ENABLED)
32021 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32023 xmlTextReaderErrorFunc * f; /* the callback function or NULL is no callback has been registered */
32025 void ** arg; /* a user argument */
32028 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32029 for (n_f = 0;n_f < gen_nb_xmlTextReaderErrorFunc_ptr;n_f++) {
32030 for (n_arg = 0;n_arg < gen_nb_void_ptr_ptr;n_arg++) {
32031 mem_base = xmlMemBlocks();
32032 reader = gen_xmlTextReaderPtr(n_reader, 0);
32033 f = gen_xmlTextReaderErrorFunc_ptr(n_f, 1);
32034 arg = gen_void_ptr_ptr(n_arg, 2);
32036 xmlTextReaderGetErrorHandler(reader, f, arg);
32038 des_xmlTextReaderPtr(n_reader, reader, 0);
32039 des_xmlTextReaderErrorFunc_ptr(n_f, f, 1);
32040 des_void_ptr_ptr(n_arg, arg, 2);
32041 xmlResetLastError();
32042 if (mem_base != xmlMemBlocks()) {
32043 printf("Leak of %d blocks found in xmlTextReaderGetErrorHandler",
32044 xmlMemBlocks() - mem_base);
32046 printf(" %d", n_reader);
32047 printf(" %d", n_f);
32048 printf(" %d", n_arg);
32062 test_xmlTextReaderGetParserColumnNumber(void) {
32065 #if defined(LIBXML_READER_ENABLED)
32068 xmlTextReaderPtr reader; /* the user data (XML reader context) */
32071 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32072 mem_base = xmlMemBlocks();
32073 reader = gen_xmlTextReaderPtr(n_reader, 0);
32075 ret_val = xmlTextReaderGetParserColumnNumber(reader);
32076 desret_int(ret_val);
32078 des_xmlTextReaderPtr(n_reader, reader, 0);
32079 xmlResetLastError();
32080 if (mem_base != xmlMemBlocks()) {
32081 printf("Leak of %d blocks found in xmlTextReaderGetParserColumnNumber",
32082 xmlMemBlocks() - mem_base);
32084 printf(" %d", n_reader);
32096 test_xmlTextReaderGetParserLineNumber(void) {
32099 #if defined(LIBXML_READER_ENABLED)
32102 xmlTextReaderPtr reader; /* the user data (XML reader context) */
32105 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32106 mem_base = xmlMemBlocks();
32107 reader = gen_xmlTextReaderPtr(n_reader, 0);
32109 ret_val = xmlTextReaderGetParserLineNumber(reader);
32110 desret_int(ret_val);
32112 des_xmlTextReaderPtr(n_reader, reader, 0);
32113 xmlResetLastError();
32114 if (mem_base != xmlMemBlocks()) {
32115 printf("Leak of %d blocks found in xmlTextReaderGetParserLineNumber",
32116 xmlMemBlocks() - mem_base);
32118 printf(" %d", n_reader);
32130 test_xmlTextReaderGetParserProp(void) {
32133 #if defined(LIBXML_READER_ENABLED)
32136 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32138 int prop; /* the xmlParserProperties to get */
32141 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32142 for (n_prop = 0;n_prop < gen_nb_int;n_prop++) {
32143 mem_base = xmlMemBlocks();
32144 reader = gen_xmlTextReaderPtr(n_reader, 0);
32145 prop = gen_int(n_prop, 1);
32147 ret_val = xmlTextReaderGetParserProp(reader, prop);
32148 desret_int(ret_val);
32150 des_xmlTextReaderPtr(n_reader, reader, 0);
32151 des_int(n_prop, prop, 1);
32152 xmlResetLastError();
32153 if (mem_base != xmlMemBlocks()) {
32154 printf("Leak of %d blocks found in xmlTextReaderGetParserProp",
32155 xmlMemBlocks() - mem_base);
32157 printf(" %d", n_reader);
32158 printf(" %d", n_prop);
32171 test_xmlTextReaderGetRemainder(void) {
32174 #if defined(LIBXML_READER_ENABLED)
32176 xmlParserInputBufferPtr ret_val;
32177 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32180 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32181 mem_base = xmlMemBlocks();
32182 reader = gen_xmlTextReaderPtr(n_reader, 0);
32184 ret_val = xmlTextReaderGetRemainder(reader);
32185 desret_xmlParserInputBufferPtr(ret_val);
32187 des_xmlTextReaderPtr(n_reader, reader, 0);
32188 xmlResetLastError();
32189 if (mem_base != xmlMemBlocks()) {
32190 printf("Leak of %d blocks found in xmlTextReaderGetRemainder",
32191 xmlMemBlocks() - mem_base);
32193 printf(" %d", n_reader);
32205 test_xmlTextReaderHasAttributes(void) {
32208 #if defined(LIBXML_READER_ENABLED)
32211 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32214 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32215 mem_base = xmlMemBlocks();
32216 reader = gen_xmlTextReaderPtr(n_reader, 0);
32218 ret_val = xmlTextReaderHasAttributes(reader);
32219 desret_int(ret_val);
32221 des_xmlTextReaderPtr(n_reader, reader, 0);
32222 xmlResetLastError();
32223 if (mem_base != xmlMemBlocks()) {
32224 printf("Leak of %d blocks found in xmlTextReaderHasAttributes",
32225 xmlMemBlocks() - mem_base);
32227 printf(" %d", n_reader);
32239 test_xmlTextReaderHasValue(void) {
32242 #if defined(LIBXML_READER_ENABLED)
32245 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32248 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32249 mem_base = xmlMemBlocks();
32250 reader = gen_xmlTextReaderPtr(n_reader, 0);
32252 ret_val = xmlTextReaderHasValue(reader);
32253 desret_int(ret_val);
32255 des_xmlTextReaderPtr(n_reader, reader, 0);
32256 xmlResetLastError();
32257 if (mem_base != xmlMemBlocks()) {
32258 printf("Leak of %d blocks found in xmlTextReaderHasValue",
32259 xmlMemBlocks() - mem_base);
32261 printf(" %d", n_reader);
32273 test_xmlTextReaderIsDefault(void) {
32276 #if defined(LIBXML_READER_ENABLED)
32279 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32282 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32283 mem_base = xmlMemBlocks();
32284 reader = gen_xmlTextReaderPtr(n_reader, 0);
32286 ret_val = xmlTextReaderIsDefault(reader);
32287 desret_int(ret_val);
32289 des_xmlTextReaderPtr(n_reader, reader, 0);
32290 xmlResetLastError();
32291 if (mem_base != xmlMemBlocks()) {
32292 printf("Leak of %d blocks found in xmlTextReaderIsDefault",
32293 xmlMemBlocks() - mem_base);
32295 printf(" %d", n_reader);
32307 test_xmlTextReaderIsEmptyElement(void) {
32310 #if defined(LIBXML_READER_ENABLED)
32313 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32316 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32317 mem_base = xmlMemBlocks();
32318 reader = gen_xmlTextReaderPtr(n_reader, 0);
32320 ret_val = xmlTextReaderIsEmptyElement(reader);
32321 desret_int(ret_val);
32323 des_xmlTextReaderPtr(n_reader, reader, 0);
32324 xmlResetLastError();
32325 if (mem_base != xmlMemBlocks()) {
32326 printf("Leak of %d blocks found in xmlTextReaderIsEmptyElement",
32327 xmlMemBlocks() - mem_base);
32329 printf(" %d", n_reader);
32341 test_xmlTextReaderIsNamespaceDecl(void) {
32344 #if defined(LIBXML_READER_ENABLED)
32347 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32350 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32351 mem_base = xmlMemBlocks();
32352 reader = gen_xmlTextReaderPtr(n_reader, 0);
32354 ret_val = xmlTextReaderIsNamespaceDecl(reader);
32355 desret_int(ret_val);
32357 des_xmlTextReaderPtr(n_reader, reader, 0);
32358 xmlResetLastError();
32359 if (mem_base != xmlMemBlocks()) {
32360 printf("Leak of %d blocks found in xmlTextReaderIsNamespaceDecl",
32361 xmlMemBlocks() - mem_base);
32363 printf(" %d", n_reader);
32375 test_xmlTextReaderIsValid(void) {
32378 #if defined(LIBXML_READER_ENABLED)
32381 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32384 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32385 mem_base = xmlMemBlocks();
32386 reader = gen_xmlTextReaderPtr(n_reader, 0);
32388 ret_val = xmlTextReaderIsValid(reader);
32389 desret_int(ret_val);
32391 des_xmlTextReaderPtr(n_reader, reader, 0);
32392 xmlResetLastError();
32393 if (mem_base != xmlMemBlocks()) {
32394 printf("Leak of %d blocks found in xmlTextReaderIsValid",
32395 xmlMemBlocks() - mem_base);
32397 printf(" %d", n_reader);
32409 test_xmlTextReaderLocalName(void) {
32412 #if defined(LIBXML_READER_ENABLED)
32415 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32418 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32419 mem_base = xmlMemBlocks();
32420 reader = gen_xmlTextReaderPtr(n_reader, 0);
32422 ret_val = xmlTextReaderLocalName(reader);
32423 desret_xmlChar_ptr(ret_val);
32425 des_xmlTextReaderPtr(n_reader, reader, 0);
32426 xmlResetLastError();
32427 if (mem_base != xmlMemBlocks()) {
32428 printf("Leak of %d blocks found in xmlTextReaderLocalName",
32429 xmlMemBlocks() - mem_base);
32431 printf(" %d", n_reader);
32441 #ifdef LIBXML_READER_ENABLED
32443 #define gen_nb_xmlTextReaderLocatorPtr 1
32444 static xmlTextReaderLocatorPtr gen_xmlTextReaderLocatorPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
32447 static void des_xmlTextReaderLocatorPtr(int no ATTRIBUTE_UNUSED, xmlTextReaderLocatorPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
32453 test_xmlTextReaderLocatorBaseURI(void) {
32456 #if defined(LIBXML_READER_ENABLED)
32459 xmlTextReaderLocatorPtr locator; /* the xmlTextReaderLocatorPtr used */
32462 for (n_locator = 0;n_locator < gen_nb_xmlTextReaderLocatorPtr;n_locator++) {
32463 mem_base = xmlMemBlocks();
32464 locator = gen_xmlTextReaderLocatorPtr(n_locator, 0);
32466 ret_val = xmlTextReaderLocatorBaseURI(locator);
32467 desret_xmlChar_ptr(ret_val);
32469 des_xmlTextReaderLocatorPtr(n_locator, locator, 0);
32470 xmlResetLastError();
32471 if (mem_base != xmlMemBlocks()) {
32472 printf("Leak of %d blocks found in xmlTextReaderLocatorBaseURI",
32473 xmlMemBlocks() - mem_base);
32475 printf(" %d", n_locator);
32487 test_xmlTextReaderLocatorLineNumber(void) {
32490 #if defined(LIBXML_READER_ENABLED)
32493 xmlTextReaderLocatorPtr locator; /* the xmlTextReaderLocatorPtr used */
32496 for (n_locator = 0;n_locator < gen_nb_xmlTextReaderLocatorPtr;n_locator++) {
32497 mem_base = xmlMemBlocks();
32498 locator = gen_xmlTextReaderLocatorPtr(n_locator, 0);
32500 ret_val = xmlTextReaderLocatorLineNumber(locator);
32501 desret_int(ret_val);
32503 des_xmlTextReaderLocatorPtr(n_locator, locator, 0);
32504 xmlResetLastError();
32505 if (mem_base != xmlMemBlocks()) {
32506 printf("Leak of %d blocks found in xmlTextReaderLocatorLineNumber",
32507 xmlMemBlocks() - mem_base);
32509 printf(" %d", n_locator);
32521 test_xmlTextReaderLookupNamespace(void) {
32524 #if defined(LIBXML_READER_ENABLED)
32527 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32529 xmlChar * prefix; /* the prefix whose namespace URI is to be resolved. To return the default namespace, specify NULL */
32532 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32533 for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
32534 mem_base = xmlMemBlocks();
32535 reader = gen_xmlTextReaderPtr(n_reader, 0);
32536 prefix = gen_const_xmlChar_ptr(n_prefix, 1);
32538 ret_val = xmlTextReaderLookupNamespace(reader, (const xmlChar *)prefix);
32539 desret_xmlChar_ptr(ret_val);
32541 des_xmlTextReaderPtr(n_reader, reader, 0);
32542 des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 1);
32543 xmlResetLastError();
32544 if (mem_base != xmlMemBlocks()) {
32545 printf("Leak of %d blocks found in xmlTextReaderLookupNamespace",
32546 xmlMemBlocks() - mem_base);
32548 printf(" %d", n_reader);
32549 printf(" %d", n_prefix);
32562 test_xmlTextReaderMoveToAttribute(void) {
32565 #if defined(LIBXML_READER_ENABLED)
32568 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32570 xmlChar * name; /* the qualified name of the attribute. */
32573 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32574 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
32575 mem_base = xmlMemBlocks();
32576 reader = gen_xmlTextReaderPtr(n_reader, 0);
32577 name = gen_const_xmlChar_ptr(n_name, 1);
32579 ret_val = xmlTextReaderMoveToAttribute(reader, (const xmlChar *)name);
32580 desret_int(ret_val);
32582 des_xmlTextReaderPtr(n_reader, reader, 0);
32583 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
32584 xmlResetLastError();
32585 if (mem_base != xmlMemBlocks()) {
32586 printf("Leak of %d blocks found in xmlTextReaderMoveToAttribute",
32587 xmlMemBlocks() - mem_base);
32589 printf(" %d", n_reader);
32590 printf(" %d", n_name);
32603 test_xmlTextReaderMoveToAttributeNo(void) {
32606 #if defined(LIBXML_READER_ENABLED)
32609 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32611 int no; /* the zero-based index of the attribute relative to the containing element. */
32614 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32615 for (n_no = 0;n_no < gen_nb_int;n_no++) {
32616 mem_base = xmlMemBlocks();
32617 reader = gen_xmlTextReaderPtr(n_reader, 0);
32618 no = gen_int(n_no, 1);
32620 ret_val = xmlTextReaderMoveToAttributeNo(reader, no);
32621 desret_int(ret_val);
32623 des_xmlTextReaderPtr(n_reader, reader, 0);
32624 des_int(n_no, no, 1);
32625 xmlResetLastError();
32626 if (mem_base != xmlMemBlocks()) {
32627 printf("Leak of %d blocks found in xmlTextReaderMoveToAttributeNo",
32628 xmlMemBlocks() - mem_base);
32630 printf(" %d", n_reader);
32631 printf(" %d", n_no);
32644 test_xmlTextReaderMoveToAttributeNs(void) {
32647 #if defined(LIBXML_READER_ENABLED)
32650 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32652 xmlChar * localName; /* the local name of the attribute. */
32654 xmlChar * namespaceURI; /* the namespace URI of the attribute. */
32655 int n_namespaceURI;
32657 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32658 for (n_localName = 0;n_localName < gen_nb_const_xmlChar_ptr;n_localName++) {
32659 for (n_namespaceURI = 0;n_namespaceURI < gen_nb_const_xmlChar_ptr;n_namespaceURI++) {
32660 mem_base = xmlMemBlocks();
32661 reader = gen_xmlTextReaderPtr(n_reader, 0);
32662 localName = gen_const_xmlChar_ptr(n_localName, 1);
32663 namespaceURI = gen_const_xmlChar_ptr(n_namespaceURI, 2);
32665 ret_val = xmlTextReaderMoveToAttributeNs(reader, (const xmlChar *)localName, (const xmlChar *)namespaceURI);
32666 desret_int(ret_val);
32668 des_xmlTextReaderPtr(n_reader, reader, 0);
32669 des_const_xmlChar_ptr(n_localName, (const xmlChar *)localName, 1);
32670 des_const_xmlChar_ptr(n_namespaceURI, (const xmlChar *)namespaceURI, 2);
32671 xmlResetLastError();
32672 if (mem_base != xmlMemBlocks()) {
32673 printf("Leak of %d blocks found in xmlTextReaderMoveToAttributeNs",
32674 xmlMemBlocks() - mem_base);
32676 printf(" %d", n_reader);
32677 printf(" %d", n_localName);
32678 printf(" %d", n_namespaceURI);
32692 test_xmlTextReaderMoveToElement(void) {
32695 #if defined(LIBXML_READER_ENABLED)
32698 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32701 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32702 mem_base = xmlMemBlocks();
32703 reader = gen_xmlTextReaderPtr(n_reader, 0);
32705 ret_val = xmlTextReaderMoveToElement(reader);
32706 desret_int(ret_val);
32708 des_xmlTextReaderPtr(n_reader, reader, 0);
32709 xmlResetLastError();
32710 if (mem_base != xmlMemBlocks()) {
32711 printf("Leak of %d blocks found in xmlTextReaderMoveToElement",
32712 xmlMemBlocks() - mem_base);
32714 printf(" %d", n_reader);
32726 test_xmlTextReaderMoveToFirstAttribute(void) {
32729 #if defined(LIBXML_READER_ENABLED)
32732 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32735 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32736 mem_base = xmlMemBlocks();
32737 reader = gen_xmlTextReaderPtr(n_reader, 0);
32739 ret_val = xmlTextReaderMoveToFirstAttribute(reader);
32740 desret_int(ret_val);
32742 des_xmlTextReaderPtr(n_reader, reader, 0);
32743 xmlResetLastError();
32744 if (mem_base != xmlMemBlocks()) {
32745 printf("Leak of %d blocks found in xmlTextReaderMoveToFirstAttribute",
32746 xmlMemBlocks() - mem_base);
32748 printf(" %d", n_reader);
32760 test_xmlTextReaderMoveToNextAttribute(void) {
32763 #if defined(LIBXML_READER_ENABLED)
32766 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32769 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32770 mem_base = xmlMemBlocks();
32771 reader = gen_xmlTextReaderPtr(n_reader, 0);
32773 ret_val = xmlTextReaderMoveToNextAttribute(reader);
32774 desret_int(ret_val);
32776 des_xmlTextReaderPtr(n_reader, reader, 0);
32777 xmlResetLastError();
32778 if (mem_base != xmlMemBlocks()) {
32779 printf("Leak of %d blocks found in xmlTextReaderMoveToNextAttribute",
32780 xmlMemBlocks() - mem_base);
32782 printf(" %d", n_reader);
32794 test_xmlTextReaderName(void) {
32797 #if defined(LIBXML_READER_ENABLED)
32800 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32803 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32804 mem_base = xmlMemBlocks();
32805 reader = gen_xmlTextReaderPtr(n_reader, 0);
32807 ret_val = xmlTextReaderName(reader);
32808 desret_xmlChar_ptr(ret_val);
32810 des_xmlTextReaderPtr(n_reader, reader, 0);
32811 xmlResetLastError();
32812 if (mem_base != xmlMemBlocks()) {
32813 printf("Leak of %d blocks found in xmlTextReaderName",
32814 xmlMemBlocks() - mem_base);
32816 printf(" %d", n_reader);
32828 test_xmlTextReaderNamespaceUri(void) {
32831 #if defined(LIBXML_READER_ENABLED)
32834 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32837 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32838 mem_base = xmlMemBlocks();
32839 reader = gen_xmlTextReaderPtr(n_reader, 0);
32841 ret_val = xmlTextReaderNamespaceUri(reader);
32842 desret_xmlChar_ptr(ret_val);
32844 des_xmlTextReaderPtr(n_reader, reader, 0);
32845 xmlResetLastError();
32846 if (mem_base != xmlMemBlocks()) {
32847 printf("Leak of %d blocks found in xmlTextReaderNamespaceUri",
32848 xmlMemBlocks() - mem_base);
32850 printf(" %d", n_reader);
32862 test_xmlTextReaderNext(void) {
32865 #if defined(LIBXML_READER_ENABLED)
32868 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32871 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32872 mem_base = xmlMemBlocks();
32873 reader = gen_xmlTextReaderPtr(n_reader, 0);
32875 ret_val = xmlTextReaderNext(reader);
32876 desret_int(ret_val);
32878 des_xmlTextReaderPtr(n_reader, reader, 0);
32879 xmlResetLastError();
32880 if (mem_base != xmlMemBlocks()) {
32881 printf("Leak of %d blocks found in xmlTextReaderNext",
32882 xmlMemBlocks() - mem_base);
32884 printf(" %d", n_reader);
32896 test_xmlTextReaderNextSibling(void) {
32899 #if defined(LIBXML_READER_ENABLED)
32902 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32905 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32906 mem_base = xmlMemBlocks();
32907 reader = gen_xmlTextReaderPtr(n_reader, 0);
32909 ret_val = xmlTextReaderNextSibling(reader);
32910 desret_int(ret_val);
32912 des_xmlTextReaderPtr(n_reader, reader, 0);
32913 xmlResetLastError();
32914 if (mem_base != xmlMemBlocks()) {
32915 printf("Leak of %d blocks found in xmlTextReaderNextSibling",
32916 xmlMemBlocks() - mem_base);
32918 printf(" %d", n_reader);
32930 test_xmlTextReaderNodeType(void) {
32933 #if defined(LIBXML_READER_ENABLED)
32936 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32939 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32940 mem_base = xmlMemBlocks();
32941 reader = gen_xmlTextReaderPtr(n_reader, 0);
32943 ret_val = xmlTextReaderNodeType(reader);
32944 desret_int(ret_val);
32946 des_xmlTextReaderPtr(n_reader, reader, 0);
32947 xmlResetLastError();
32948 if (mem_base != xmlMemBlocks()) {
32949 printf("Leak of %d blocks found in xmlTextReaderNodeType",
32950 xmlMemBlocks() - mem_base);
32952 printf(" %d", n_reader);
32964 test_xmlTextReaderNormalization(void) {
32967 #if defined(LIBXML_READER_ENABLED)
32970 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
32973 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
32974 mem_base = xmlMemBlocks();
32975 reader = gen_xmlTextReaderPtr(n_reader, 0);
32977 ret_val = xmlTextReaderNormalization(reader);
32978 desret_int(ret_val);
32980 des_xmlTextReaderPtr(n_reader, reader, 0);
32981 xmlResetLastError();
32982 if (mem_base != xmlMemBlocks()) {
32983 printf("Leak of %d blocks found in xmlTextReaderNormalization",
32984 xmlMemBlocks() - mem_base);
32986 printf(" %d", n_reader);
32998 test_xmlTextReaderPrefix(void) {
33001 #if defined(LIBXML_READER_ENABLED)
33004 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
33007 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
33008 mem_base = xmlMemBlocks();
33009 reader = gen_xmlTextReaderPtr(n_reader, 0);
33011 ret_val = xmlTextReaderPrefix(reader);
33012 desret_xmlChar_ptr(ret_val);
33014 des_xmlTextReaderPtr(n_reader, reader, 0);
33015 xmlResetLastError();
33016 if (mem_base != xmlMemBlocks()) {
33017 printf("Leak of %d blocks found in xmlTextReaderPrefix",
33018 xmlMemBlocks() - mem_base);
33020 printf(" %d", n_reader);
33032 test_xmlTextReaderPreserve(void) {
33035 #if defined(LIBXML_READER_ENABLED)
33037 xmlNodePtr ret_val;
33038 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
33041 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
33042 mem_base = xmlMemBlocks();
33043 reader = gen_xmlTextReaderPtr(n_reader, 0);
33045 ret_val = xmlTextReaderPreserve(reader);
33046 desret_xmlNodePtr(ret_val);
33048 des_xmlTextReaderPtr(n_reader, reader, 0);
33049 xmlResetLastError();
33050 if (mem_base != xmlMemBlocks()) {
33051 printf("Leak of %d blocks found in xmlTextReaderPreserve",
33052 xmlMemBlocks() - mem_base);
33054 printf(" %d", n_reader);
33066 test_xmlTextReaderPreservePattern(void) {
33069 #if defined(LIBXML_READER_ENABLED) && defined(LIBXML_PATTERN_ENABLED)
33070 #ifdef LIBXML_PATTERN_ENABLED
33073 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
33075 xmlChar * pattern; /* an XPath subset pattern */
33077 xmlChar ** namespaces; /* the prefix definitions, array of [URI, prefix] or NULL */
33080 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
33081 for (n_pattern = 0;n_pattern < gen_nb_const_xmlChar_ptr;n_pattern++) {
33082 for (n_namespaces = 0;n_namespaces < gen_nb_const_xmlChar_ptr_ptr;n_namespaces++) {
33083 mem_base = xmlMemBlocks();
33084 reader = gen_xmlTextReaderPtr(n_reader, 0);
33085 pattern = gen_const_xmlChar_ptr(n_pattern, 1);
33086 namespaces = gen_const_xmlChar_ptr_ptr(n_namespaces, 2);
33088 ret_val = xmlTextReaderPreservePattern(reader, (const xmlChar *)pattern, (const xmlChar **)namespaces);
33089 desret_int(ret_val);
33091 des_xmlTextReaderPtr(n_reader, reader, 0);
33092 des_const_xmlChar_ptr(n_pattern, (const xmlChar *)pattern, 1);
33093 des_const_xmlChar_ptr_ptr(n_namespaces, (const xmlChar **)namespaces, 2);
33094 xmlResetLastError();
33095 if (mem_base != xmlMemBlocks()) {
33096 printf("Leak of %d blocks found in xmlTextReaderPreservePattern",
33097 xmlMemBlocks() - mem_base);
33099 printf(" %d", n_reader);
33100 printf(" %d", n_pattern);
33101 printf(" %d", n_namespaces);
33116 test_xmlTextReaderQuoteChar(void) {
33119 #if defined(LIBXML_READER_ENABLED)
33122 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
33125 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
33126 mem_base = xmlMemBlocks();
33127 reader = gen_xmlTextReaderPtr(n_reader, 0);
33129 ret_val = xmlTextReaderQuoteChar(reader);
33130 desret_int(ret_val);
33132 des_xmlTextReaderPtr(n_reader, reader, 0);
33133 xmlResetLastError();
33134 if (mem_base != xmlMemBlocks()) {
33135 printf("Leak of %d blocks found in xmlTextReaderQuoteChar",
33136 xmlMemBlocks() - mem_base);
33138 printf(" %d", n_reader);
33150 test_xmlTextReaderRead(void) {
33153 #if defined(LIBXML_READER_ENABLED)
33156 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
33159 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
33160 mem_base = xmlMemBlocks();
33161 reader = gen_xmlTextReaderPtr(n_reader, 0);
33163 ret_val = xmlTextReaderRead(reader);
33164 desret_int(ret_val);
33166 des_xmlTextReaderPtr(n_reader, reader, 0);
33167 xmlResetLastError();
33168 if (mem_base != xmlMemBlocks()) {
33169 printf("Leak of %d blocks found in xmlTextReaderRead",
33170 xmlMemBlocks() - mem_base);
33172 printf(" %d", n_reader);
33184 test_xmlTextReaderReadAttributeValue(void) {
33187 #if defined(LIBXML_READER_ENABLED)
33190 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
33193 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
33194 mem_base = xmlMemBlocks();
33195 reader = gen_xmlTextReaderPtr(n_reader, 0);
33197 ret_val = xmlTextReaderReadAttributeValue(reader);
33198 desret_int(ret_val);
33200 des_xmlTextReaderPtr(n_reader, reader, 0);
33201 xmlResetLastError();
33202 if (mem_base != xmlMemBlocks()) {
33203 printf("Leak of %d blocks found in xmlTextReaderReadAttributeValue",
33204 xmlMemBlocks() - mem_base);
33206 printf(" %d", n_reader);
33218 test_xmlTextReaderReadState(void) {
33221 #if defined(LIBXML_READER_ENABLED)
33224 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
33227 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
33228 mem_base = xmlMemBlocks();
33229 reader = gen_xmlTextReaderPtr(n_reader, 0);
33231 ret_val = xmlTextReaderReadState(reader);
33232 desret_int(ret_val);
33234 des_xmlTextReaderPtr(n_reader, reader, 0);
33235 xmlResetLastError();
33236 if (mem_base != xmlMemBlocks()) {
33237 printf("Leak of %d blocks found in xmlTextReaderReadState",
33238 xmlMemBlocks() - mem_base);
33240 printf(" %d", n_reader);
33252 test_xmlTextReaderRelaxNGSetSchema(void) {
33255 #if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
33258 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
33260 xmlRelaxNGPtr schema; /* a precompiled RelaxNG schema */
33263 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
33264 for (n_schema = 0;n_schema < gen_nb_xmlRelaxNGPtr;n_schema++) {
33265 mem_base = xmlMemBlocks();
33266 reader = gen_xmlTextReaderPtr(n_reader, 0);
33267 schema = gen_xmlRelaxNGPtr(n_schema, 1);
33269 ret_val = xmlTextReaderRelaxNGSetSchema(reader, schema);
33270 desret_int(ret_val);
33272 des_xmlTextReaderPtr(n_reader, reader, 0);
33273 des_xmlRelaxNGPtr(n_schema, schema, 1);
33274 xmlResetLastError();
33275 if (mem_base != xmlMemBlocks()) {
33276 printf("Leak of %d blocks found in xmlTextReaderRelaxNGSetSchema",
33277 xmlMemBlocks() - mem_base);
33279 printf(" %d", n_reader);
33280 printf(" %d", n_schema);
33293 test_xmlTextReaderRelaxNGValidate(void) {
33296 #if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
33299 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
33301 char * rng; /* the path to a RelaxNG schema or NULL */
33304 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
33305 for (n_rng = 0;n_rng < gen_nb_const_char_ptr;n_rng++) {
33306 mem_base = xmlMemBlocks();
33307 reader = gen_xmlTextReaderPtr(n_reader, 0);
33308 rng = gen_const_char_ptr(n_rng, 1);
33310 ret_val = xmlTextReaderRelaxNGValidate(reader, (const char *)rng);
33311 desret_int(ret_val);
33313 des_xmlTextReaderPtr(n_reader, reader, 0);
33314 des_const_char_ptr(n_rng, (const char *)rng, 1);
33315 xmlResetLastError();
33316 if (mem_base != xmlMemBlocks()) {
33317 printf("Leak of %d blocks found in xmlTextReaderRelaxNGValidate",
33318 xmlMemBlocks() - mem_base);
33320 printf(" %d", n_reader);
33321 printf(" %d", n_rng);
33334 test_xmlTextReaderRelaxNGValidateCtxt(void) {
33337 #if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
33340 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
33342 xmlRelaxNGValidCtxtPtr ctxt; /* the RelaxNG schema validation context or NULL */
33344 int options; /* options (not used yet) */
33347 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
33348 for (n_ctxt = 0;n_ctxt < gen_nb_xmlRelaxNGValidCtxtPtr;n_ctxt++) {
33349 for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
33350 mem_base = xmlMemBlocks();
33351 reader = gen_xmlTextReaderPtr(n_reader, 0);
33352 ctxt = gen_xmlRelaxNGValidCtxtPtr(n_ctxt, 1);
33353 options = gen_parseroptions(n_options, 2);
33355 ret_val = xmlTextReaderRelaxNGValidateCtxt(reader, ctxt, options);
33356 desret_int(ret_val);
33358 des_xmlTextReaderPtr(n_reader, reader, 0);
33359 des_xmlRelaxNGValidCtxtPtr(n_ctxt, ctxt, 1);
33360 des_parseroptions(n_options, options, 2);
33361 xmlResetLastError();
33362 if (mem_base != xmlMemBlocks()) {
33363 printf("Leak of %d blocks found in xmlTextReaderRelaxNGValidateCtxt",
33364 xmlMemBlocks() - mem_base);
33366 printf(" %d", n_reader);
33367 printf(" %d", n_ctxt);
33368 printf(" %d", n_options);
33382 test_xmlTextReaderSchemaValidate(void) {
33385 #if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
33387 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
33389 char * xsd; /* the path to a W3C XSD schema or NULL */
33392 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
33393 for (n_xsd = 0;n_xsd < gen_nb_const_char_ptr;n_xsd++) {
33394 reader = gen_xmlTextReaderPtr(n_reader, 0);
33395 xsd = gen_const_char_ptr(n_xsd, 1);
33397 ret_val = xmlTextReaderSchemaValidate(reader, (const char *)xsd);
33398 desret_int(ret_val);
33400 des_xmlTextReaderPtr(n_reader, reader, 0);
33401 des_const_char_ptr(n_xsd, (const char *)xsd, 1);
33402 xmlResetLastError();
33413 test_xmlTextReaderSchemaValidateCtxt(void) {
33416 #if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
33419 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
33421 xmlSchemaValidCtxtPtr ctxt; /* the XML Schema validation context or NULL */
33423 int options; /* options (not used yet) */
33426 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
33427 for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) {
33428 for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
33429 mem_base = xmlMemBlocks();
33430 reader = gen_xmlTextReaderPtr(n_reader, 0);
33431 ctxt = gen_xmlSchemaValidCtxtPtr(n_ctxt, 1);
33432 options = gen_parseroptions(n_options, 2);
33434 ret_val = xmlTextReaderSchemaValidateCtxt(reader, ctxt, options);
33435 desret_int(ret_val);
33437 des_xmlTextReaderPtr(n_reader, reader, 0);
33438 des_xmlSchemaValidCtxtPtr(n_ctxt, ctxt, 1);
33439 des_parseroptions(n_options, options, 2);
33440 xmlResetLastError();
33441 if (mem_base != xmlMemBlocks()) {
33442 printf("Leak of %d blocks found in xmlTextReaderSchemaValidateCtxt",
33443 xmlMemBlocks() - mem_base);
33445 printf(" %d", n_reader);
33446 printf(" %d", n_ctxt);
33447 printf(" %d", n_options);
33461 test_xmlTextReaderSetErrorHandler(void) {
33465 /* missing type support */
33471 test_xmlTextReaderSetParserProp(void) {
33474 #if defined(LIBXML_READER_ENABLED)
33477 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
33479 int prop; /* the xmlParserProperties to set */
33481 int value; /* usually 0 or 1 to (de)activate it */
33484 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
33485 for (n_prop = 0;n_prop < gen_nb_int;n_prop++) {
33486 for (n_value = 0;n_value < gen_nb_int;n_value++) {
33487 mem_base = xmlMemBlocks();
33488 reader = gen_xmlTextReaderPtr(n_reader, 0);
33489 prop = gen_int(n_prop, 1);
33490 value = gen_int(n_value, 2);
33492 ret_val = xmlTextReaderSetParserProp(reader, prop, value);
33493 desret_int(ret_val);
33495 des_xmlTextReaderPtr(n_reader, reader, 0);
33496 des_int(n_prop, prop, 1);
33497 des_int(n_value, value, 2);
33498 xmlResetLastError();
33499 if (mem_base != xmlMemBlocks()) {
33500 printf("Leak of %d blocks found in xmlTextReaderSetParserProp",
33501 xmlMemBlocks() - mem_base);
33503 printf(" %d", n_reader);
33504 printf(" %d", n_prop);
33505 printf(" %d", n_value);
33519 test_xmlTextReaderSetSchema(void) {
33522 #if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
33525 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
33527 xmlSchemaPtr schema; /* a precompiled Schema schema */
33530 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
33531 for (n_schema = 0;n_schema < gen_nb_xmlSchemaPtr;n_schema++) {
33532 mem_base = xmlMemBlocks();
33533 reader = gen_xmlTextReaderPtr(n_reader, 0);
33534 schema = gen_xmlSchemaPtr(n_schema, 1);
33536 ret_val = xmlTextReaderSetSchema(reader, schema);
33537 desret_int(ret_val);
33539 des_xmlTextReaderPtr(n_reader, reader, 0);
33540 des_xmlSchemaPtr(n_schema, schema, 1);
33541 xmlResetLastError();
33542 if (mem_base != xmlMemBlocks()) {
33543 printf("Leak of %d blocks found in xmlTextReaderSetSchema",
33544 xmlMemBlocks() - mem_base);
33546 printf(" %d", n_reader);
33547 printf(" %d", n_schema);
33560 test_xmlTextReaderSetStructuredErrorHandler(void) {
33564 /* missing type support */
33570 test_xmlTextReaderSetup(void) {
33573 #if defined(LIBXML_READER_ENABLED)
33576 xmlTextReaderPtr reader; /* an XML reader */
33578 xmlParserInputBufferPtr input; /* xmlParserInputBufferPtr used to feed the reader, will be destroyed with it. */
33580 const char * URL; /* the base URL to use for the document */
33582 char * encoding; /* the document encoding, or NULL */
33584 int options; /* a combination of xmlParserOption */
33587 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
33588 for (n_input = 0;n_input < gen_nb_xmlParserInputBufferPtr;n_input++) {
33589 for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
33590 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
33591 for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
33592 mem_base = xmlMemBlocks();
33593 reader = gen_xmlTextReaderPtr(n_reader, 0);
33594 input = gen_xmlParserInputBufferPtr(n_input, 1);
33595 URL = gen_filepath(n_URL, 2);
33596 encoding = gen_const_char_ptr(n_encoding, 3);
33597 options = gen_parseroptions(n_options, 4);
33599 ret_val = xmlTextReaderSetup(reader, input, URL, (const char *)encoding, options);
33600 desret_int(ret_val);
33602 des_xmlTextReaderPtr(n_reader, reader, 0);
33603 des_filepath(n_URL, URL, 2);
33604 des_const_char_ptr(n_encoding, (const char *)encoding, 3);
33605 des_parseroptions(n_options, options, 4);
33606 xmlResetLastError();
33607 if (mem_base != xmlMemBlocks()) {
33608 printf("Leak of %d blocks found in xmlTextReaderSetup",
33609 xmlMemBlocks() - mem_base);
33611 printf(" %d", n_reader);
33612 printf(" %d", n_input);
33613 printf(" %d", n_URL);
33614 printf(" %d", n_encoding);
33615 printf(" %d", n_options);
33631 test_xmlTextReaderStandalone(void) {
33634 #if defined(LIBXML_READER_ENABLED)
33637 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
33640 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
33641 mem_base = xmlMemBlocks();
33642 reader = gen_xmlTextReaderPtr(n_reader, 0);
33644 ret_val = xmlTextReaderStandalone(reader);
33645 desret_int(ret_val);
33647 des_xmlTextReaderPtr(n_reader, reader, 0);
33648 xmlResetLastError();
33649 if (mem_base != xmlMemBlocks()) {
33650 printf("Leak of %d blocks found in xmlTextReaderStandalone",
33651 xmlMemBlocks() - mem_base);
33653 printf(" %d", n_reader);
33665 test_xmlTextReaderValue(void) {
33668 #if defined(LIBXML_READER_ENABLED)
33671 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
33674 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
33675 mem_base = xmlMemBlocks();
33676 reader = gen_xmlTextReaderPtr(n_reader, 0);
33678 ret_val = xmlTextReaderValue(reader);
33679 desret_xmlChar_ptr(ret_val);
33681 des_xmlTextReaderPtr(n_reader, reader, 0);
33682 xmlResetLastError();
33683 if (mem_base != xmlMemBlocks()) {
33684 printf("Leak of %d blocks found in xmlTextReaderValue",
33685 xmlMemBlocks() - mem_base);
33687 printf(" %d", n_reader);
33699 test_xmlTextReaderXmlLang(void) {
33702 #if defined(LIBXML_READER_ENABLED)
33705 xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
33708 for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
33709 mem_base = xmlMemBlocks();
33710 reader = gen_xmlTextReaderPtr(n_reader, 0);
33712 ret_val = xmlTextReaderXmlLang(reader);
33713 desret_xmlChar_ptr(ret_val);
33715 des_xmlTextReaderPtr(n_reader, reader, 0);
33716 xmlResetLastError();
33717 if (mem_base != xmlMemBlocks()) {
33718 printf("Leak of %d blocks found in xmlTextReaderXmlLang",
33719 xmlMemBlocks() - mem_base);
33721 printf(" %d", n_reader);
33732 test_xmlreader(void) {
33736 if (quiet == 0) printf("Testing xmlreader : 76 of 86 functions ...\n");
33737 rc = test_xmlNewTextReader();
33738 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33739 rc = test_xmlNewTextReaderFilename();
33740 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33741 rc = test_xmlReaderForDoc();
33742 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33743 rc = test_xmlReaderForFile();
33744 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33745 rc = test_xmlReaderForMemory();
33746 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33747 rc = test_xmlReaderNewDoc();
33748 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33749 rc = test_xmlReaderNewFile();
33750 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33751 rc = test_xmlReaderNewMemory();
33752 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33753 rc = test_xmlReaderNewWalker();
33754 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33755 rc = test_xmlReaderWalker();
33756 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33757 rc = test_xmlTextReaderAttributeCount();
33758 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33759 rc = test_xmlTextReaderBaseUri();
33760 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33761 rc = test_xmlTextReaderByteConsumed();
33762 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33763 rc = test_xmlTextReaderClose();
33764 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33765 rc = test_xmlTextReaderConstBaseUri();
33766 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33767 rc = test_xmlTextReaderConstEncoding();
33768 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33769 rc = test_xmlTextReaderConstLocalName();
33770 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33771 rc = test_xmlTextReaderConstName();
33772 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33773 rc = test_xmlTextReaderConstNamespaceUri();
33774 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33775 rc = test_xmlTextReaderConstPrefix();
33776 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33777 rc = test_xmlTextReaderConstString();
33778 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33779 rc = test_xmlTextReaderConstValue();
33780 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33781 rc = test_xmlTextReaderConstXmlLang();
33782 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33783 rc = test_xmlTextReaderConstXmlVersion();
33784 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33785 rc = test_xmlTextReaderCurrentDoc();
33786 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33787 rc = test_xmlTextReaderCurrentNode();
33788 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33789 rc = test_xmlTextReaderDepth();
33790 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33791 rc = test_xmlTextReaderExpand();
33792 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33793 rc = test_xmlTextReaderGetAttribute();
33794 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33795 rc = test_xmlTextReaderGetAttributeNo();
33796 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33797 rc = test_xmlTextReaderGetAttributeNs();
33798 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33799 rc = test_xmlTextReaderGetErrorHandler();
33800 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33801 rc = test_xmlTextReaderGetParserColumnNumber();
33802 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33803 rc = test_xmlTextReaderGetParserLineNumber();
33804 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33805 rc = test_xmlTextReaderGetParserProp();
33806 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33807 rc = test_xmlTextReaderGetRemainder();
33808 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33809 rc = test_xmlTextReaderHasAttributes();
33810 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33811 rc = test_xmlTextReaderHasValue();
33812 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33813 rc = test_xmlTextReaderIsDefault();
33814 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33815 rc = test_xmlTextReaderIsEmptyElement();
33816 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33817 rc = test_xmlTextReaderIsNamespaceDecl();
33818 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33819 rc = test_xmlTextReaderIsValid();
33820 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33821 rc = test_xmlTextReaderLocalName();
33822 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33823 rc = test_xmlTextReaderLocatorBaseURI();
33824 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33825 rc = test_xmlTextReaderLocatorLineNumber();
33826 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33827 rc = test_xmlTextReaderLookupNamespace();
33828 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33829 rc = test_xmlTextReaderMoveToAttribute();
33830 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33831 rc = test_xmlTextReaderMoveToAttributeNo();
33832 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33833 rc = test_xmlTextReaderMoveToAttributeNs();
33834 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33835 rc = test_xmlTextReaderMoveToElement();
33836 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33837 rc = test_xmlTextReaderMoveToFirstAttribute();
33838 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33839 rc = test_xmlTextReaderMoveToNextAttribute();
33840 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33841 rc = test_xmlTextReaderName();
33842 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33843 rc = test_xmlTextReaderNamespaceUri();
33844 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33845 rc = test_xmlTextReaderNext();
33846 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33847 rc = test_xmlTextReaderNextSibling();
33848 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33849 rc = test_xmlTextReaderNodeType();
33850 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33851 rc = test_xmlTextReaderNormalization();
33852 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33853 rc = test_xmlTextReaderPrefix();
33854 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33855 rc = test_xmlTextReaderPreserve();
33856 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33857 rc = test_xmlTextReaderPreservePattern();
33858 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33859 rc = test_xmlTextReaderQuoteChar();
33860 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33861 rc = test_xmlTextReaderRead();
33862 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33863 rc = test_xmlTextReaderReadAttributeValue();
33864 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33865 rc = test_xmlTextReaderReadState();
33866 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33867 rc = test_xmlTextReaderRelaxNGSetSchema();
33868 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33869 rc = test_xmlTextReaderRelaxNGValidate();
33870 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33871 rc = test_xmlTextReaderRelaxNGValidateCtxt();
33872 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33873 rc = test_xmlTextReaderSchemaValidate();
33874 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33875 rc = test_xmlTextReaderSchemaValidateCtxt();
33876 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33877 rc = test_xmlTextReaderSetErrorHandler();
33878 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33879 rc = test_xmlTextReaderSetParserProp();
33880 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33881 rc = test_xmlTextReaderSetSchema();
33882 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33883 rc = test_xmlTextReaderSetStructuredErrorHandler();
33884 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33885 rc = test_xmlTextReaderSetup();
33886 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33887 rc = test_xmlTextReaderStandalone();
33888 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33889 rc = test_xmlTextReaderValue();
33890 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33891 rc = test_xmlTextReaderXmlLang();
33892 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
33895 printf("Module xmlreader: %d errors\n", test_ret);
33900 test_xmlExpCtxtNbCons(void) {
33903 #if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
33906 xmlExpCtxtPtr ctxt; /* an expression context */
33909 for (n_ctxt = 0;n_ctxt < gen_nb_xmlExpCtxtPtr;n_ctxt++) {
33910 mem_base = xmlMemBlocks();
33911 ctxt = gen_xmlExpCtxtPtr(n_ctxt, 0);
33913 ret_val = xmlExpCtxtNbCons(ctxt);
33914 desret_int(ret_val);
33916 des_xmlExpCtxtPtr(n_ctxt, ctxt, 0);
33917 xmlResetLastError();
33918 if (mem_base != xmlMemBlocks()) {
33919 printf("Leak of %d blocks found in xmlExpCtxtNbCons",
33920 xmlMemBlocks() - mem_base);
33922 printf(" %d", n_ctxt);
33934 test_xmlExpCtxtNbNodes(void) {
33937 #if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
33940 xmlExpCtxtPtr ctxt; /* an expression context */
33943 for (n_ctxt = 0;n_ctxt < gen_nb_xmlExpCtxtPtr;n_ctxt++) {
33944 mem_base = xmlMemBlocks();
33945 ctxt = gen_xmlExpCtxtPtr(n_ctxt, 0);
33947 ret_val = xmlExpCtxtNbNodes(ctxt);
33948 desret_int(ret_val);
33950 des_xmlExpCtxtPtr(n_ctxt, ctxt, 0);
33951 xmlResetLastError();
33952 if (mem_base != xmlMemBlocks()) {
33953 printf("Leak of %d blocks found in xmlExpCtxtNbNodes",
33954 xmlMemBlocks() - mem_base);
33956 printf(" %d", n_ctxt);
33968 test_xmlExpDump(void) {
33971 #if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
33973 xmlBufferPtr buf; /* a buffer to receive the output */
33975 xmlExpNodePtr expr; /* the compiled expression */
33978 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
33979 for (n_expr = 0;n_expr < gen_nb_xmlExpNodePtr;n_expr++) {
33980 mem_base = xmlMemBlocks();
33981 buf = gen_xmlBufferPtr(n_buf, 0);
33982 expr = gen_xmlExpNodePtr(n_expr, 1);
33984 xmlExpDump(buf, expr);
33986 des_xmlBufferPtr(n_buf, buf, 0);
33987 des_xmlExpNodePtr(n_expr, expr, 1);
33988 xmlResetLastError();
33989 if (mem_base != xmlMemBlocks()) {
33990 printf("Leak of %d blocks found in xmlExpDump",
33991 xmlMemBlocks() - mem_base);
33993 printf(" %d", n_buf);
33994 printf(" %d", n_expr);
34007 test_xmlExpExpDerive(void) {
34011 /* missing type support */
34017 test_xmlExpGetLanguage(void) {
34020 #if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
34023 xmlExpCtxtPtr ctxt; /* the expression context */
34025 xmlExpNodePtr exp; /* the expression */
34027 xmlChar ** langList; /* where to store the tokens */
34029 int len; /* the allocated length of @list */
34032 for (n_ctxt = 0;n_ctxt < gen_nb_xmlExpCtxtPtr;n_ctxt++) {
34033 for (n_exp = 0;n_exp < gen_nb_xmlExpNodePtr;n_exp++) {
34034 for (n_langList = 0;n_langList < gen_nb_const_xmlChar_ptr_ptr;n_langList++) {
34035 for (n_len = 0;n_len < gen_nb_int;n_len++) {
34036 mem_base = xmlMemBlocks();
34037 ctxt = gen_xmlExpCtxtPtr(n_ctxt, 0);
34038 exp = gen_xmlExpNodePtr(n_exp, 1);
34039 langList = gen_const_xmlChar_ptr_ptr(n_langList, 2);
34040 len = gen_int(n_len, 3);
34042 ret_val = xmlExpGetLanguage(ctxt, exp, (const xmlChar **)langList, len);
34043 desret_int(ret_val);
34045 des_xmlExpCtxtPtr(n_ctxt, ctxt, 0);
34046 des_xmlExpNodePtr(n_exp, exp, 1);
34047 des_const_xmlChar_ptr_ptr(n_langList, (const xmlChar **)langList, 2);
34048 des_int(n_len, len, 3);
34049 xmlResetLastError();
34050 if (mem_base != xmlMemBlocks()) {
34051 printf("Leak of %d blocks found in xmlExpGetLanguage",
34052 xmlMemBlocks() - mem_base);
34054 printf(" %d", n_ctxt);
34055 printf(" %d", n_exp);
34056 printf(" %d", n_langList);
34057 printf(" %d", n_len);
34072 test_xmlExpGetStart(void) {
34075 #if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
34078 xmlExpCtxtPtr ctxt; /* the expression context */
34080 xmlExpNodePtr exp; /* the expression */
34082 xmlChar ** tokList; /* where to store the tokens */
34084 int len; /* the allocated length of @list */
34087 for (n_ctxt = 0;n_ctxt < gen_nb_xmlExpCtxtPtr;n_ctxt++) {
34088 for (n_exp = 0;n_exp < gen_nb_xmlExpNodePtr;n_exp++) {
34089 for (n_tokList = 0;n_tokList < gen_nb_const_xmlChar_ptr_ptr;n_tokList++) {
34090 for (n_len = 0;n_len < gen_nb_int;n_len++) {
34091 mem_base = xmlMemBlocks();
34092 ctxt = gen_xmlExpCtxtPtr(n_ctxt, 0);
34093 exp = gen_xmlExpNodePtr(n_exp, 1);
34094 tokList = gen_const_xmlChar_ptr_ptr(n_tokList, 2);
34095 len = gen_int(n_len, 3);
34097 ret_val = xmlExpGetStart(ctxt, exp, (const xmlChar **)tokList, len);
34098 desret_int(ret_val);
34100 des_xmlExpCtxtPtr(n_ctxt, ctxt, 0);
34101 des_xmlExpNodePtr(n_exp, exp, 1);
34102 des_const_xmlChar_ptr_ptr(n_tokList, (const xmlChar **)tokList, 2);
34103 des_int(n_len, len, 3);
34104 xmlResetLastError();
34105 if (mem_base != xmlMemBlocks()) {
34106 printf("Leak of %d blocks found in xmlExpGetStart",
34107 xmlMemBlocks() - mem_base);
34109 printf(" %d", n_ctxt);
34110 printf(" %d", n_exp);
34111 printf(" %d", n_tokList);
34112 printf(" %d", n_len);
34127 test_xmlExpIsNillable(void) {
34130 #if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
34133 xmlExpNodePtr exp; /* the expression */
34136 for (n_exp = 0;n_exp < gen_nb_xmlExpNodePtr;n_exp++) {
34137 mem_base = xmlMemBlocks();
34138 exp = gen_xmlExpNodePtr(n_exp, 0);
34140 ret_val = xmlExpIsNillable(exp);
34141 desret_int(ret_val);
34143 des_xmlExpNodePtr(n_exp, exp, 0);
34144 xmlResetLastError();
34145 if (mem_base != xmlMemBlocks()) {
34146 printf("Leak of %d blocks found in xmlExpIsNillable",
34147 xmlMemBlocks() - mem_base);
34149 printf(" %d", n_exp);
34161 test_xmlExpMaxToken(void) {
34164 #if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
34167 xmlExpNodePtr expr; /* a compiled expression */
34170 for (n_expr = 0;n_expr < gen_nb_xmlExpNodePtr;n_expr++) {
34171 mem_base = xmlMemBlocks();
34172 expr = gen_xmlExpNodePtr(n_expr, 0);
34174 ret_val = xmlExpMaxToken(expr);
34175 desret_int(ret_val);
34177 des_xmlExpNodePtr(n_expr, expr, 0);
34178 xmlResetLastError();
34179 if (mem_base != xmlMemBlocks()) {
34180 printf("Leak of %d blocks found in xmlExpMaxToken",
34181 xmlMemBlocks() - mem_base);
34183 printf(" %d", n_expr);
34195 test_xmlExpNewAtom(void) {
34199 /* missing type support */
34205 test_xmlExpNewCtxt(void) {
34209 /* missing type support */
34215 test_xmlExpNewOr(void) {
34219 /* missing type support */
34225 test_xmlExpNewRange(void) {
34229 /* missing type support */
34235 test_xmlExpNewSeq(void) {
34239 /* missing type support */
34245 test_xmlExpParse(void) {
34249 /* missing type support */
34255 test_xmlExpRef(void) {
34258 #if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
34260 xmlExpNodePtr exp; /* the expression */
34263 for (n_exp = 0;n_exp < gen_nb_xmlExpNodePtr;n_exp++) {
34264 mem_base = xmlMemBlocks();
34265 exp = gen_xmlExpNodePtr(n_exp, 0);
34269 des_xmlExpNodePtr(n_exp, exp, 0);
34270 xmlResetLastError();
34271 if (mem_base != xmlMemBlocks()) {
34272 printf("Leak of %d blocks found in xmlExpRef",
34273 xmlMemBlocks() - mem_base);
34275 printf(" %d", n_exp);
34287 test_xmlExpStringDerive(void) {
34291 /* missing type support */
34297 test_xmlExpSubsume(void) {
34300 #if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
34303 xmlExpCtxtPtr ctxt; /* the expressions context */
34305 xmlExpNodePtr exp; /* the englobing expression */
34307 xmlExpNodePtr sub; /* the subexpression */
34310 for (n_ctxt = 0;n_ctxt < gen_nb_xmlExpCtxtPtr;n_ctxt++) {
34311 for (n_exp = 0;n_exp < gen_nb_xmlExpNodePtr;n_exp++) {
34312 for (n_sub = 0;n_sub < gen_nb_xmlExpNodePtr;n_sub++) {
34313 mem_base = xmlMemBlocks();
34314 ctxt = gen_xmlExpCtxtPtr(n_ctxt, 0);
34315 exp = gen_xmlExpNodePtr(n_exp, 1);
34316 sub = gen_xmlExpNodePtr(n_sub, 2);
34318 ret_val = xmlExpSubsume(ctxt, exp, sub);
34319 desret_int(ret_val);
34321 des_xmlExpCtxtPtr(n_ctxt, ctxt, 0);
34322 des_xmlExpNodePtr(n_exp, exp, 1);
34323 des_xmlExpNodePtr(n_sub, sub, 2);
34324 xmlResetLastError();
34325 if (mem_base != xmlMemBlocks()) {
34326 printf("Leak of %d blocks found in xmlExpSubsume",
34327 xmlMemBlocks() - mem_base);
34329 printf(" %d", n_ctxt);
34330 printf(" %d", n_exp);
34331 printf(" %d", n_sub);
34343 #ifdef LIBXML_REGEXP_ENABLED
34345 #define gen_nb_xmlRegExecCtxtPtr 1
34346 static xmlRegExecCtxtPtr gen_xmlRegExecCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
34349 static void des_xmlRegExecCtxtPtr(int no ATTRIBUTE_UNUSED, xmlRegExecCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
34355 test_xmlRegExecErrInfo(void) {
34358 #if defined(LIBXML_REGEXP_ENABLED)
34361 xmlRegExecCtxtPtr exec; /* a regexp execution context generating an error */
34363 xmlChar ** string; /* return value for the error string */
34365 int * nbval; /* pointer to the number of accepted values IN/OUT */
34367 int * nbneg; /* return number of negative transitions */
34369 xmlChar ** values; /* pointer to the array of acceptable values */
34371 int * terminal; /* return value if this was a terminal state */
34374 for (n_exec = 0;n_exec < gen_nb_xmlRegExecCtxtPtr;n_exec++) {
34375 for (n_string = 0;n_string < gen_nb_const_xmlChar_ptr_ptr;n_string++) {
34376 for (n_nbval = 0;n_nbval < gen_nb_int_ptr;n_nbval++) {
34377 for (n_nbneg = 0;n_nbneg < gen_nb_int_ptr;n_nbneg++) {
34378 for (n_values = 0;n_values < gen_nb_xmlChar_ptr_ptr;n_values++) {
34379 for (n_terminal = 0;n_terminal < gen_nb_int_ptr;n_terminal++) {
34380 mem_base = xmlMemBlocks();
34381 exec = gen_xmlRegExecCtxtPtr(n_exec, 0);
34382 string = gen_const_xmlChar_ptr_ptr(n_string, 1);
34383 nbval = gen_int_ptr(n_nbval, 2);
34384 nbneg = gen_int_ptr(n_nbneg, 3);
34385 values = gen_xmlChar_ptr_ptr(n_values, 4);
34386 terminal = gen_int_ptr(n_terminal, 5);
34388 ret_val = xmlRegExecErrInfo(exec, (const xmlChar **)string, nbval, nbneg, values, terminal);
34389 desret_int(ret_val);
34391 des_xmlRegExecCtxtPtr(n_exec, exec, 0);
34392 des_const_xmlChar_ptr_ptr(n_string, (const xmlChar **)string, 1);
34393 des_int_ptr(n_nbval, nbval, 2);
34394 des_int_ptr(n_nbneg, nbneg, 3);
34395 des_xmlChar_ptr_ptr(n_values, values, 4);
34396 des_int_ptr(n_terminal, terminal, 5);
34397 xmlResetLastError();
34398 if (mem_base != xmlMemBlocks()) {
34399 printf("Leak of %d blocks found in xmlRegExecErrInfo",
34400 xmlMemBlocks() - mem_base);
34402 printf(" %d", n_exec);
34403 printf(" %d", n_string);
34404 printf(" %d", n_nbval);
34405 printf(" %d", n_nbneg);
34406 printf(" %d", n_values);
34407 printf(" %d", n_terminal);
34424 test_xmlRegExecNextValues(void) {
34427 #if defined(LIBXML_REGEXP_ENABLED)
34430 xmlRegExecCtxtPtr exec; /* a regexp execution context */
34432 int * nbval; /* pointer to the number of accepted values IN/OUT */
34434 int * nbneg; /* return number of negative transitions */
34436 xmlChar ** values; /* pointer to the array of acceptable values */
34438 int * terminal; /* return value if this was a terminal state */
34441 for (n_exec = 0;n_exec < gen_nb_xmlRegExecCtxtPtr;n_exec++) {
34442 for (n_nbval = 0;n_nbval < gen_nb_int_ptr;n_nbval++) {
34443 for (n_nbneg = 0;n_nbneg < gen_nb_int_ptr;n_nbneg++) {
34444 for (n_values = 0;n_values < gen_nb_xmlChar_ptr_ptr;n_values++) {
34445 for (n_terminal = 0;n_terminal < gen_nb_int_ptr;n_terminal++) {
34446 mem_base = xmlMemBlocks();
34447 exec = gen_xmlRegExecCtxtPtr(n_exec, 0);
34448 nbval = gen_int_ptr(n_nbval, 1);
34449 nbneg = gen_int_ptr(n_nbneg, 2);
34450 values = gen_xmlChar_ptr_ptr(n_values, 3);
34451 terminal = gen_int_ptr(n_terminal, 4);
34453 ret_val = xmlRegExecNextValues(exec, nbval, nbneg, values, terminal);
34454 desret_int(ret_val);
34456 des_xmlRegExecCtxtPtr(n_exec, exec, 0);
34457 des_int_ptr(n_nbval, nbval, 1);
34458 des_int_ptr(n_nbneg, nbneg, 2);
34459 des_xmlChar_ptr_ptr(n_values, values, 3);
34460 des_int_ptr(n_terminal, terminal, 4);
34461 xmlResetLastError();
34462 if (mem_base != xmlMemBlocks()) {
34463 printf("Leak of %d blocks found in xmlRegExecNextValues",
34464 xmlMemBlocks() - mem_base);
34466 printf(" %d", n_exec);
34467 printf(" %d", n_nbval);
34468 printf(" %d", n_nbneg);
34469 printf(" %d", n_values);
34470 printf(" %d", n_terminal);
34486 test_xmlRegExecPushString(void) {
34489 #if defined(LIBXML_REGEXP_ENABLED)
34492 xmlRegExecCtxtPtr exec; /* a regexp execution context or NULL to indicate the end */
34494 xmlChar * value; /* a string token input */
34496 void * data; /* data associated to the token to reuse in callbacks */
34499 for (n_exec = 0;n_exec < gen_nb_xmlRegExecCtxtPtr;n_exec++) {
34500 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
34501 for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
34502 mem_base = xmlMemBlocks();
34503 exec = gen_xmlRegExecCtxtPtr(n_exec, 0);
34504 value = gen_const_xmlChar_ptr(n_value, 1);
34505 data = gen_userdata(n_data, 2);
34507 ret_val = xmlRegExecPushString(exec, (const xmlChar *)value, data);
34508 desret_int(ret_val);
34510 des_xmlRegExecCtxtPtr(n_exec, exec, 0);
34511 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 1);
34512 des_userdata(n_data, data, 2);
34513 xmlResetLastError();
34514 if (mem_base != xmlMemBlocks()) {
34515 printf("Leak of %d blocks found in xmlRegExecPushString",
34516 xmlMemBlocks() - mem_base);
34518 printf(" %d", n_exec);
34519 printf(" %d", n_value);
34520 printf(" %d", n_data);
34534 test_xmlRegExecPushString2(void) {
34537 #if defined(LIBXML_REGEXP_ENABLED)
34540 xmlRegExecCtxtPtr exec; /* a regexp execution context or NULL to indicate the end */
34542 xmlChar * value; /* the first string token input */
34544 xmlChar * value2; /* the second string token input */
34546 void * data; /* data associated to the token to reuse in callbacks */
34549 for (n_exec = 0;n_exec < gen_nb_xmlRegExecCtxtPtr;n_exec++) {
34550 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
34551 for (n_value2 = 0;n_value2 < gen_nb_const_xmlChar_ptr;n_value2++) {
34552 for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
34553 mem_base = xmlMemBlocks();
34554 exec = gen_xmlRegExecCtxtPtr(n_exec, 0);
34555 value = gen_const_xmlChar_ptr(n_value, 1);
34556 value2 = gen_const_xmlChar_ptr(n_value2, 2);
34557 data = gen_userdata(n_data, 3);
34559 ret_val = xmlRegExecPushString2(exec, (const xmlChar *)value, (const xmlChar *)value2, data);
34560 desret_int(ret_val);
34562 des_xmlRegExecCtxtPtr(n_exec, exec, 0);
34563 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 1);
34564 des_const_xmlChar_ptr(n_value2, (const xmlChar *)value2, 2);
34565 des_userdata(n_data, data, 3);
34566 xmlResetLastError();
34567 if (mem_base != xmlMemBlocks()) {
34568 printf("Leak of %d blocks found in xmlRegExecPushString2",
34569 xmlMemBlocks() - mem_base);
34571 printf(" %d", n_exec);
34572 printf(" %d", n_value);
34573 printf(" %d", n_value2);
34574 printf(" %d", n_data);
34587 #ifdef LIBXML_REGEXP_ENABLED
34589 #define gen_nb_xmlRegexpPtr 1
34590 static xmlRegexpPtr gen_xmlRegexpPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
34593 static void des_xmlRegexpPtr(int no ATTRIBUTE_UNUSED, xmlRegexpPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
34599 test_xmlRegNewExecCtxt(void) {
34603 /* missing type support */
34609 test_xmlRegexpCompile(void) {
34613 /* missing type support */
34619 test_xmlRegexpExec(void) {
34622 #if defined(LIBXML_REGEXP_ENABLED)
34625 xmlRegexpPtr comp; /* the compiled regular expression */
34627 xmlChar * content; /* the value to check against the regular expression */
34630 for (n_comp = 0;n_comp < gen_nb_xmlRegexpPtr;n_comp++) {
34631 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
34632 mem_base = xmlMemBlocks();
34633 comp = gen_xmlRegexpPtr(n_comp, 0);
34634 content = gen_const_xmlChar_ptr(n_content, 1);
34636 ret_val = xmlRegexpExec(comp, (const xmlChar *)content);
34637 desret_int(ret_val);
34639 des_xmlRegexpPtr(n_comp, comp, 0);
34640 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
34641 xmlResetLastError();
34642 if (mem_base != xmlMemBlocks()) {
34643 printf("Leak of %d blocks found in xmlRegexpExec",
34644 xmlMemBlocks() - mem_base);
34646 printf(" %d", n_comp);
34647 printf(" %d", n_content);
34660 test_xmlRegexpIsDeterminist(void) {
34663 #if defined(LIBXML_REGEXP_ENABLED)
34666 xmlRegexpPtr comp; /* the compiled regular expression */
34669 for (n_comp = 0;n_comp < gen_nb_xmlRegexpPtr;n_comp++) {
34670 mem_base = xmlMemBlocks();
34671 comp = gen_xmlRegexpPtr(n_comp, 0);
34673 ret_val = xmlRegexpIsDeterminist(comp);
34674 desret_int(ret_val);
34676 des_xmlRegexpPtr(n_comp, comp, 0);
34677 xmlResetLastError();
34678 if (mem_base != xmlMemBlocks()) {
34679 printf("Leak of %d blocks found in xmlRegexpIsDeterminist",
34680 xmlMemBlocks() - mem_base);
34682 printf(" %d", n_comp);
34694 test_xmlRegexpPrint(void) {
34697 #if defined(LIBXML_REGEXP_ENABLED)
34699 FILE * output; /* the file for the output debug */
34701 xmlRegexpPtr regexp; /* the compiled regexp */
34704 for (n_output = 0;n_output < gen_nb_FILE_ptr;n_output++) {
34705 for (n_regexp = 0;n_regexp < gen_nb_xmlRegexpPtr;n_regexp++) {
34706 mem_base = xmlMemBlocks();
34707 output = gen_FILE_ptr(n_output, 0);
34708 regexp = gen_xmlRegexpPtr(n_regexp, 1);
34710 xmlRegexpPrint(output, regexp);
34712 des_FILE_ptr(n_output, output, 0);
34713 des_xmlRegexpPtr(n_regexp, regexp, 1);
34714 xmlResetLastError();
34715 if (mem_base != xmlMemBlocks()) {
34716 printf("Leak of %d blocks found in xmlRegexpPrint",
34717 xmlMemBlocks() - mem_base);
34719 printf(" %d", n_output);
34720 printf(" %d", n_regexp);
34732 test_xmlregexp(void) {
34736 if (quiet == 0) printf("Testing xmlregexp : 16 of 30 functions ...\n");
34737 rc = test_xmlExpCtxtNbCons();
34738 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34739 rc = test_xmlExpCtxtNbNodes();
34740 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34741 rc = test_xmlExpDump();
34742 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34743 rc = test_xmlExpExpDerive();
34744 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34745 rc = test_xmlExpGetLanguage();
34746 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34747 rc = test_xmlExpGetStart();
34748 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34749 rc = test_xmlExpIsNillable();
34750 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34751 rc = test_xmlExpMaxToken();
34752 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34753 rc = test_xmlExpNewAtom();
34754 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34755 rc = test_xmlExpNewCtxt();
34756 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34757 rc = test_xmlExpNewOr();
34758 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34759 rc = test_xmlExpNewRange();
34760 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34761 rc = test_xmlExpNewSeq();
34762 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34763 rc = test_xmlExpParse();
34764 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34765 rc = test_xmlExpRef();
34766 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34767 rc = test_xmlExpStringDerive();
34768 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34769 rc = test_xmlExpSubsume();
34770 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34771 rc = test_xmlRegExecErrInfo();
34772 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34773 rc = test_xmlRegExecNextValues();
34774 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34775 rc = test_xmlRegExecPushString();
34776 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34777 rc = test_xmlRegExecPushString2();
34778 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34779 rc = test_xmlRegNewExecCtxt();
34780 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34781 rc = test_xmlRegexpCompile();
34782 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34783 rc = test_xmlRegexpExec();
34784 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34785 rc = test_xmlRegexpIsDeterminist();
34786 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34787 rc = test_xmlRegexpPrint();
34788 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
34791 printf("Module xmlregexp: %d errors\n", test_ret);
34794 #ifdef LIBXML_OUTPUT_ENABLED
34796 #define gen_nb_xmlSaveCtxtPtr 1
34797 static xmlSaveCtxtPtr gen_xmlSaveCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
34800 static void des_xmlSaveCtxtPtr(int no ATTRIBUTE_UNUSED, xmlSaveCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
34806 test_xmlSaveClose(void) {
34809 #if defined(LIBXML_OUTPUT_ENABLED)
34812 xmlSaveCtxtPtr ctxt; /* a document saving context */
34815 for (n_ctxt = 0;n_ctxt < gen_nb_xmlSaveCtxtPtr;n_ctxt++) {
34816 mem_base = xmlMemBlocks();
34817 ctxt = gen_xmlSaveCtxtPtr(n_ctxt, 0);
34819 ret_val = xmlSaveClose(ctxt);
34820 desret_int(ret_val);
34822 des_xmlSaveCtxtPtr(n_ctxt, ctxt, 0);
34823 xmlResetLastError();
34824 if (mem_base != xmlMemBlocks()) {
34825 printf("Leak of %d blocks found in xmlSaveClose",
34826 xmlMemBlocks() - mem_base);
34828 printf(" %d", n_ctxt);
34840 test_xmlSaveDoc(void) {
34843 #if defined(LIBXML_OUTPUT_ENABLED)
34846 xmlSaveCtxtPtr ctxt; /* a document saving context */
34848 xmlDocPtr doc; /* a document */
34851 for (n_ctxt = 0;n_ctxt < gen_nb_xmlSaveCtxtPtr;n_ctxt++) {
34852 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
34853 mem_base = xmlMemBlocks();
34854 ctxt = gen_xmlSaveCtxtPtr(n_ctxt, 0);
34855 doc = gen_xmlDocPtr(n_doc, 1);
34857 ret_val = xmlSaveDoc(ctxt, doc);
34858 desret_long(ret_val);
34860 des_xmlSaveCtxtPtr(n_ctxt, ctxt, 0);
34861 des_xmlDocPtr(n_doc, doc, 1);
34862 xmlResetLastError();
34863 if (mem_base != xmlMemBlocks()) {
34864 printf("Leak of %d blocks found in xmlSaveDoc",
34865 xmlMemBlocks() - mem_base);
34867 printf(" %d", n_ctxt);
34868 printf(" %d", n_doc);
34881 test_xmlSaveFlush(void) {
34884 #if defined(LIBXML_OUTPUT_ENABLED)
34887 xmlSaveCtxtPtr ctxt; /* a document saving context */
34890 for (n_ctxt = 0;n_ctxt < gen_nb_xmlSaveCtxtPtr;n_ctxt++) {
34891 mem_base = xmlMemBlocks();
34892 ctxt = gen_xmlSaveCtxtPtr(n_ctxt, 0);
34894 ret_val = xmlSaveFlush(ctxt);
34895 desret_int(ret_val);
34897 des_xmlSaveCtxtPtr(n_ctxt, ctxt, 0);
34898 xmlResetLastError();
34899 if (mem_base != xmlMemBlocks()) {
34900 printf("Leak of %d blocks found in xmlSaveFlush",
34901 xmlMemBlocks() - mem_base);
34903 printf(" %d", n_ctxt);
34915 test_xmlSaveSetAttrEscape(void) {
34919 /* missing type support */
34925 test_xmlSaveSetEscape(void) {
34929 /* missing type support */
34935 test_xmlSaveToBuffer(void) {
34939 /* missing type support */
34945 test_xmlSaveToFd(void) {
34949 /* missing type support */
34955 test_xmlSaveToFilename(void) {
34959 /* missing type support */
34965 test_xmlSaveTree(void) {
34968 #if defined(LIBXML_OUTPUT_ENABLED)
34971 xmlSaveCtxtPtr ctxt; /* a document saving context */
34973 xmlNodePtr node; /* the top node of the subtree to save */
34976 for (n_ctxt = 0;n_ctxt < gen_nb_xmlSaveCtxtPtr;n_ctxt++) {
34977 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
34978 mem_base = xmlMemBlocks();
34979 ctxt = gen_xmlSaveCtxtPtr(n_ctxt, 0);
34980 node = gen_xmlNodePtr(n_node, 1);
34982 ret_val = xmlSaveTree(ctxt, node);
34983 desret_long(ret_val);
34985 des_xmlSaveCtxtPtr(n_ctxt, ctxt, 0);
34986 des_xmlNodePtr(n_node, node, 1);
34987 xmlResetLastError();
34988 if (mem_base != xmlMemBlocks()) {
34989 printf("Leak of %d blocks found in xmlSaveTree",
34990 xmlMemBlocks() - mem_base);
34992 printf(" %d", n_ctxt);
34993 printf(" %d", n_node);
35005 test_xmlsave(void) {
35009 if (quiet == 0) printf("Testing xmlsave : 4 of 10 functions ...\n");
35010 rc = test_xmlSaveClose();
35011 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35012 rc = test_xmlSaveDoc();
35013 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35014 rc = test_xmlSaveFlush();
35015 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35016 rc = test_xmlSaveSetAttrEscape();
35017 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35018 rc = test_xmlSaveSetEscape();
35019 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35020 rc = test_xmlSaveToBuffer();
35021 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35022 rc = test_xmlSaveToFd();
35023 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35024 rc = test_xmlSaveToFilename();
35025 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35026 rc = test_xmlSaveTree();
35027 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35030 printf("Module xmlsave: %d errors\n", test_ret);
35035 test_xmlSchemaDump(void) {
35038 #if defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
35040 FILE * output; /* the file output */
35042 xmlSchemaPtr schema; /* a schema structure */
35045 for (n_output = 0;n_output < gen_nb_FILE_ptr;n_output++) {
35046 for (n_schema = 0;n_schema < gen_nb_xmlSchemaPtr;n_schema++) {
35047 mem_base = xmlMemBlocks();
35048 output = gen_FILE_ptr(n_output, 0);
35049 schema = gen_xmlSchemaPtr(n_schema, 1);
35051 xmlSchemaDump(output, schema);
35053 des_FILE_ptr(n_output, output, 0);
35054 des_xmlSchemaPtr(n_schema, schema, 1);
35055 xmlResetLastError();
35056 if (mem_base != xmlMemBlocks()) {
35057 printf("Leak of %d blocks found in xmlSchemaDump",
35058 xmlMemBlocks() - mem_base);
35060 printf(" %d", n_output);
35061 printf(" %d", n_schema);
35072 #ifdef LIBXML_SCHEMAS_ENABLED
35074 #define gen_nb_xmlSchemaParserCtxtPtr 1
35075 static xmlSchemaParserCtxtPtr gen_xmlSchemaParserCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
35078 static void des_xmlSchemaParserCtxtPtr(int no ATTRIBUTE_UNUSED, xmlSchemaParserCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
35082 #ifdef LIBXML_SCHEMAS_ENABLED
35084 #define gen_nb_xmlSchemaValidityErrorFunc_ptr 1
35085 static xmlSchemaValidityErrorFunc * gen_xmlSchemaValidityErrorFunc_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
35088 static void des_xmlSchemaValidityErrorFunc_ptr(int no ATTRIBUTE_UNUSED, xmlSchemaValidityErrorFunc * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
35092 #ifdef LIBXML_SCHEMAS_ENABLED
35094 #define gen_nb_xmlSchemaValidityWarningFunc_ptr 1
35095 static xmlSchemaValidityWarningFunc * gen_xmlSchemaValidityWarningFunc_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
35098 static void des_xmlSchemaValidityWarningFunc_ptr(int no ATTRIBUTE_UNUSED, xmlSchemaValidityWarningFunc * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
35104 test_xmlSchemaGetParserErrors(void) {
35107 #if defined(LIBXML_SCHEMAS_ENABLED)
35110 xmlSchemaParserCtxtPtr ctxt; /* a XMl-Schema parser context */
35112 xmlSchemaValidityErrorFunc * err; /* the error callback result */
35114 xmlSchemaValidityWarningFunc * warn; /* the warning callback result */
35116 void ** ctx; /* contextual data for the callbacks result */
35119 for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaParserCtxtPtr;n_ctxt++) {
35120 for (n_err = 0;n_err < gen_nb_xmlSchemaValidityErrorFunc_ptr;n_err++) {
35121 for (n_warn = 0;n_warn < gen_nb_xmlSchemaValidityWarningFunc_ptr;n_warn++) {
35122 for (n_ctx = 0;n_ctx < gen_nb_void_ptr_ptr;n_ctx++) {
35123 mem_base = xmlMemBlocks();
35124 ctxt = gen_xmlSchemaParserCtxtPtr(n_ctxt, 0);
35125 err = gen_xmlSchemaValidityErrorFunc_ptr(n_err, 1);
35126 warn = gen_xmlSchemaValidityWarningFunc_ptr(n_warn, 2);
35127 ctx = gen_void_ptr_ptr(n_ctx, 3);
35129 ret_val = xmlSchemaGetParserErrors(ctxt, err, warn, ctx);
35130 desret_int(ret_val);
35132 des_xmlSchemaParserCtxtPtr(n_ctxt, ctxt, 0);
35133 des_xmlSchemaValidityErrorFunc_ptr(n_err, err, 1);
35134 des_xmlSchemaValidityWarningFunc_ptr(n_warn, warn, 2);
35135 des_void_ptr_ptr(n_ctx, ctx, 3);
35136 xmlResetLastError();
35137 if (mem_base != xmlMemBlocks()) {
35138 printf("Leak of %d blocks found in xmlSchemaGetParserErrors",
35139 xmlMemBlocks() - mem_base);
35141 printf(" %d", n_ctxt);
35142 printf(" %d", n_err);
35143 printf(" %d", n_warn);
35144 printf(" %d", n_ctx);
35159 test_xmlSchemaGetValidErrors(void) {
35162 #if defined(LIBXML_SCHEMAS_ENABLED)
35165 xmlSchemaValidCtxtPtr ctxt; /* a XML-Schema validation context */
35167 xmlSchemaValidityErrorFunc * err; /* the error function result */
35169 xmlSchemaValidityWarningFunc * warn; /* the warning function result */
35171 void ** ctx; /* the functions context result */
35174 for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) {
35175 for (n_err = 0;n_err < gen_nb_xmlSchemaValidityErrorFunc_ptr;n_err++) {
35176 for (n_warn = 0;n_warn < gen_nb_xmlSchemaValidityWarningFunc_ptr;n_warn++) {
35177 for (n_ctx = 0;n_ctx < gen_nb_void_ptr_ptr;n_ctx++) {
35178 mem_base = xmlMemBlocks();
35179 ctxt = gen_xmlSchemaValidCtxtPtr(n_ctxt, 0);
35180 err = gen_xmlSchemaValidityErrorFunc_ptr(n_err, 1);
35181 warn = gen_xmlSchemaValidityWarningFunc_ptr(n_warn, 2);
35182 ctx = gen_void_ptr_ptr(n_ctx, 3);
35184 ret_val = xmlSchemaGetValidErrors(ctxt, err, warn, ctx);
35185 desret_int(ret_val);
35187 des_xmlSchemaValidCtxtPtr(n_ctxt, ctxt, 0);
35188 des_xmlSchemaValidityErrorFunc_ptr(n_err, err, 1);
35189 des_xmlSchemaValidityWarningFunc_ptr(n_warn, warn, 2);
35190 des_void_ptr_ptr(n_ctx, ctx, 3);
35191 xmlResetLastError();
35192 if (mem_base != xmlMemBlocks()) {
35193 printf("Leak of %d blocks found in xmlSchemaGetValidErrors",
35194 xmlMemBlocks() - mem_base);
35196 printf(" %d", n_ctxt);
35197 printf(" %d", n_err);
35198 printf(" %d", n_warn);
35199 printf(" %d", n_ctx);
35214 test_xmlSchemaIsValid(void) {
35217 #if defined(LIBXML_SCHEMAS_ENABLED)
35220 xmlSchemaValidCtxtPtr ctxt; /* the schema validation context */
35223 for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) {
35224 mem_base = xmlMemBlocks();
35225 ctxt = gen_xmlSchemaValidCtxtPtr(n_ctxt, 0);
35227 ret_val = xmlSchemaIsValid(ctxt);
35228 desret_int(ret_val);
35230 des_xmlSchemaValidCtxtPtr(n_ctxt, ctxt, 0);
35231 xmlResetLastError();
35232 if (mem_base != xmlMemBlocks()) {
35233 printf("Leak of %d blocks found in xmlSchemaIsValid",
35234 xmlMemBlocks() - mem_base);
35236 printf(" %d", n_ctxt);
35248 test_xmlSchemaNewDocParserCtxt(void) {
35251 #if defined(LIBXML_SCHEMAS_ENABLED)
35253 xmlSchemaParserCtxtPtr ret_val;
35254 xmlDocPtr doc; /* a preparsed document tree */
35257 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
35258 mem_base = xmlMemBlocks();
35259 doc = gen_xmlDocPtr(n_doc, 0);
35261 ret_val = xmlSchemaNewDocParserCtxt(doc);
35262 desret_xmlSchemaParserCtxtPtr(ret_val);
35264 des_xmlDocPtr(n_doc, doc, 0);
35265 xmlResetLastError();
35266 if (mem_base != xmlMemBlocks()) {
35267 printf("Leak of %d blocks found in xmlSchemaNewDocParserCtxt",
35268 xmlMemBlocks() - mem_base);
35270 printf(" %d", n_doc);
35282 test_xmlSchemaNewMemParserCtxt(void) {
35285 #if defined(LIBXML_SCHEMAS_ENABLED)
35287 xmlSchemaParserCtxtPtr ret_val;
35288 char * buffer; /* a pointer to a char array containing the schemas */
35290 int size; /* the size of the array */
35293 for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
35294 for (n_size = 0;n_size < gen_nb_int;n_size++) {
35295 mem_base = xmlMemBlocks();
35296 buffer = gen_const_char_ptr(n_buffer, 0);
35297 size = gen_int(n_size, 1);
35299 ret_val = xmlSchemaNewMemParserCtxt((const char *)buffer, size);
35300 desret_xmlSchemaParserCtxtPtr(ret_val);
35302 des_const_char_ptr(n_buffer, (const char *)buffer, 0);
35303 des_int(n_size, size, 1);
35304 xmlResetLastError();
35305 if (mem_base != xmlMemBlocks()) {
35306 printf("Leak of %d blocks found in xmlSchemaNewMemParserCtxt",
35307 xmlMemBlocks() - mem_base);
35309 printf(" %d", n_buffer);
35310 printf(" %d", n_size);
35323 test_xmlSchemaNewParserCtxt(void) {
35326 #if defined(LIBXML_SCHEMAS_ENABLED)
35328 xmlSchemaParserCtxtPtr ret_val;
35329 char * URL; /* the location of the schema */
35332 for (n_URL = 0;n_URL < gen_nb_const_char_ptr;n_URL++) {
35333 mem_base = xmlMemBlocks();
35334 URL = gen_const_char_ptr(n_URL, 0);
35336 ret_val = xmlSchemaNewParserCtxt((const char *)URL);
35337 desret_xmlSchemaParserCtxtPtr(ret_val);
35339 des_const_char_ptr(n_URL, (const char *)URL, 0);
35340 xmlResetLastError();
35341 if (mem_base != xmlMemBlocks()) {
35342 printf("Leak of %d blocks found in xmlSchemaNewParserCtxt",
35343 xmlMemBlocks() - mem_base);
35345 printf(" %d", n_URL);
35357 test_xmlSchemaNewValidCtxt(void) {
35361 /* missing type support */
35367 test_xmlSchemaParse(void) {
35371 /* missing type support */
35375 #ifdef LIBXML_SCHEMAS_ENABLED
35377 #define gen_nb_xmlSAXHandlerPtr_ptr 1
35378 static xmlSAXHandlerPtr * gen_xmlSAXHandlerPtr_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
35381 static void des_xmlSAXHandlerPtr_ptr(int no ATTRIBUTE_UNUSED, xmlSAXHandlerPtr * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
35387 test_xmlSchemaSAXPlug(void) {
35391 /* missing type support */
35395 #ifdef LIBXML_SCHEMAS_ENABLED
35397 #define gen_nb_xmlSchemaSAXPlugPtr 1
35398 static xmlSchemaSAXPlugPtr gen_xmlSchemaSAXPlugPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
35401 static void des_xmlSchemaSAXPlugPtr(int no ATTRIBUTE_UNUSED, xmlSchemaSAXPlugPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
35407 test_xmlSchemaSAXUnplug(void) {
35410 #if defined(LIBXML_SCHEMAS_ENABLED)
35413 xmlSchemaSAXPlugPtr plug; /* a data structure returned by xmlSchemaSAXPlug */
35416 for (n_plug = 0;n_plug < gen_nb_xmlSchemaSAXPlugPtr;n_plug++) {
35417 mem_base = xmlMemBlocks();
35418 plug = gen_xmlSchemaSAXPlugPtr(n_plug, 0);
35420 ret_val = xmlSchemaSAXUnplug(plug);
35421 desret_int(ret_val);
35423 des_xmlSchemaSAXPlugPtr(n_plug, plug, 0);
35424 xmlResetLastError();
35425 if (mem_base != xmlMemBlocks()) {
35426 printf("Leak of %d blocks found in xmlSchemaSAXUnplug",
35427 xmlMemBlocks() - mem_base);
35429 printf(" %d", n_plug);
35441 test_xmlSchemaSetParserErrors(void) {
35445 /* missing type support */
35451 test_xmlSchemaSetParserStructuredErrors(void) {
35455 /* missing type support */
35461 test_xmlSchemaSetValidErrors(void) {
35465 /* missing type support */
35471 test_xmlSchemaSetValidOptions(void) {
35474 #if defined(LIBXML_SCHEMAS_ENABLED)
35477 xmlSchemaValidCtxtPtr ctxt; /* a schema validation context */
35479 int options; /* a combination of xmlSchemaValidOption */
35482 for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) {
35483 for (n_options = 0;n_options < gen_nb_int;n_options++) {
35484 mem_base = xmlMemBlocks();
35485 ctxt = gen_xmlSchemaValidCtxtPtr(n_ctxt, 0);
35486 options = gen_int(n_options, 1);
35488 ret_val = xmlSchemaSetValidOptions(ctxt, options);
35489 desret_int(ret_val);
35491 des_xmlSchemaValidCtxtPtr(n_ctxt, ctxt, 0);
35492 des_int(n_options, options, 1);
35493 xmlResetLastError();
35494 if (mem_base != xmlMemBlocks()) {
35495 printf("Leak of %d blocks found in xmlSchemaSetValidOptions",
35496 xmlMemBlocks() - mem_base);
35498 printf(" %d", n_ctxt);
35499 printf(" %d", n_options);
35512 test_xmlSchemaSetValidStructuredErrors(void) {
35516 /* missing type support */
35522 test_xmlSchemaValidCtxtGetOptions(void) {
35525 #if defined(LIBXML_SCHEMAS_ENABLED)
35528 xmlSchemaValidCtxtPtr ctxt; /* a schema validation context */
35531 for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) {
35532 mem_base = xmlMemBlocks();
35533 ctxt = gen_xmlSchemaValidCtxtPtr(n_ctxt, 0);
35535 ret_val = xmlSchemaValidCtxtGetOptions(ctxt);
35536 desret_int(ret_val);
35538 des_xmlSchemaValidCtxtPtr(n_ctxt, ctxt, 0);
35539 xmlResetLastError();
35540 if (mem_base != xmlMemBlocks()) {
35541 printf("Leak of %d blocks found in xmlSchemaValidCtxtGetOptions",
35542 xmlMemBlocks() - mem_base);
35544 printf(" %d", n_ctxt);
35556 test_xmlSchemaValidCtxtGetParserCtxt(void) {
35559 #if defined(LIBXML_SCHEMAS_ENABLED)
35561 xmlParserCtxtPtr ret_val;
35562 xmlSchemaValidCtxtPtr ctxt; /* a schema validation context */
35565 for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) {
35566 mem_base = xmlMemBlocks();
35567 ctxt = gen_xmlSchemaValidCtxtPtr(n_ctxt, 0);
35569 ret_val = xmlSchemaValidCtxtGetParserCtxt(ctxt);
35570 desret_xmlParserCtxtPtr(ret_val);
35572 des_xmlSchemaValidCtxtPtr(n_ctxt, ctxt, 0);
35573 xmlResetLastError();
35574 if (mem_base != xmlMemBlocks()) {
35575 printf("Leak of %d blocks found in xmlSchemaValidCtxtGetParserCtxt",
35576 xmlMemBlocks() - mem_base);
35578 printf(" %d", n_ctxt);
35590 test_xmlSchemaValidateDoc(void) {
35593 #if defined(LIBXML_SCHEMAS_ENABLED)
35596 xmlSchemaValidCtxtPtr ctxt; /* a schema validation context */
35598 xmlDocPtr doc; /* a parsed document tree */
35601 for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) {
35602 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
35603 mem_base = xmlMemBlocks();
35604 ctxt = gen_xmlSchemaValidCtxtPtr(n_ctxt, 0);
35605 doc = gen_xmlDocPtr(n_doc, 1);
35607 ret_val = xmlSchemaValidateDoc(ctxt, doc);
35608 desret_int(ret_val);
35610 des_xmlSchemaValidCtxtPtr(n_ctxt, ctxt, 0);
35611 des_xmlDocPtr(n_doc, doc, 1);
35612 xmlResetLastError();
35613 if (mem_base != xmlMemBlocks()) {
35614 printf("Leak of %d blocks found in xmlSchemaValidateDoc",
35615 xmlMemBlocks() - mem_base);
35617 printf(" %d", n_ctxt);
35618 printf(" %d", n_doc);
35631 test_xmlSchemaValidateFile(void) {
35634 #if defined(LIBXML_SCHEMAS_ENABLED)
35637 xmlSchemaValidCtxtPtr ctxt; /* a schema validation context */
35639 const char * filename; /* the URI of the instance */
35641 int options; /* a future set of options, currently unused */
35644 for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) {
35645 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
35646 for (n_options = 0;n_options < gen_nb_int;n_options++) {
35647 mem_base = xmlMemBlocks();
35648 ctxt = gen_xmlSchemaValidCtxtPtr(n_ctxt, 0);
35649 filename = gen_filepath(n_filename, 1);
35650 options = gen_int(n_options, 2);
35652 ret_val = xmlSchemaValidateFile(ctxt, filename, options);
35653 desret_int(ret_val);
35655 des_xmlSchemaValidCtxtPtr(n_ctxt, ctxt, 0);
35656 des_filepath(n_filename, filename, 1);
35657 des_int(n_options, options, 2);
35658 xmlResetLastError();
35659 if (mem_base != xmlMemBlocks()) {
35660 printf("Leak of %d blocks found in xmlSchemaValidateFile",
35661 xmlMemBlocks() - mem_base);
35663 printf(" %d", n_ctxt);
35664 printf(" %d", n_filename);
35665 printf(" %d", n_options);
35679 test_xmlSchemaValidateOneElement(void) {
35682 #if defined(LIBXML_SCHEMAS_ENABLED)
35685 xmlSchemaValidCtxtPtr ctxt; /* a schema validation context */
35687 xmlNodePtr elem; /* an element node */
35690 for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) {
35691 for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
35692 mem_base = xmlMemBlocks();
35693 ctxt = gen_xmlSchemaValidCtxtPtr(n_ctxt, 0);
35694 elem = gen_xmlNodePtr(n_elem, 1);
35696 ret_val = xmlSchemaValidateOneElement(ctxt, elem);
35697 desret_int(ret_val);
35699 des_xmlSchemaValidCtxtPtr(n_ctxt, ctxt, 0);
35700 des_xmlNodePtr(n_elem, elem, 1);
35701 xmlResetLastError();
35702 if (mem_base != xmlMemBlocks()) {
35703 printf("Leak of %d blocks found in xmlSchemaValidateOneElement",
35704 xmlMemBlocks() - mem_base);
35706 printf(" %d", n_ctxt);
35707 printf(" %d", n_elem);
35720 test_xmlSchemaValidateSetFilename(void) {
35723 #if defined(LIBXML_SCHEMAS_ENABLED)
35725 xmlSchemaValidCtxtPtr vctxt; /* the schema validation context */
35727 const char * filename; /* the file name */
35730 for (n_vctxt = 0;n_vctxt < gen_nb_xmlSchemaValidCtxtPtr;n_vctxt++) {
35731 for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
35732 mem_base = xmlMemBlocks();
35733 vctxt = gen_xmlSchemaValidCtxtPtr(n_vctxt, 0);
35734 filename = gen_filepath(n_filename, 1);
35736 xmlSchemaValidateSetFilename(vctxt, filename);
35738 des_xmlSchemaValidCtxtPtr(n_vctxt, vctxt, 0);
35739 des_filepath(n_filename, filename, 1);
35740 xmlResetLastError();
35741 if (mem_base != xmlMemBlocks()) {
35742 printf("Leak of %d blocks found in xmlSchemaValidateSetFilename",
35743 xmlMemBlocks() - mem_base);
35745 printf(" %d", n_vctxt);
35746 printf(" %d", n_filename);
35759 test_xmlSchemaValidateSetLocator(void) {
35763 /* missing type support */
35769 test_xmlSchemaValidateStream(void) {
35772 #if defined(LIBXML_SCHEMAS_ENABLED)
35775 xmlSchemaValidCtxtPtr ctxt; /* a schema validation context */
35777 xmlParserInputBufferPtr input; /* the input to use for reading the data */
35779 xmlCharEncoding enc; /* an optional encoding information */
35781 xmlSAXHandlerPtr sax; /* a SAX handler for the resulting events */
35783 void * user_data; /* the context to provide to the SAX handler. */
35786 for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) {
35787 for (n_input = 0;n_input < gen_nb_xmlParserInputBufferPtr;n_input++) {
35788 for (n_enc = 0;n_enc < gen_nb_xmlCharEncoding;n_enc++) {
35789 for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
35790 for (n_user_data = 0;n_user_data < gen_nb_userdata;n_user_data++) {
35791 mem_base = xmlMemBlocks();
35792 ctxt = gen_xmlSchemaValidCtxtPtr(n_ctxt, 0);
35793 input = gen_xmlParserInputBufferPtr(n_input, 1);
35794 enc = gen_xmlCharEncoding(n_enc, 2);
35795 sax = gen_xmlSAXHandlerPtr(n_sax, 3);
35796 user_data = gen_userdata(n_user_data, 4);
35798 ret_val = xmlSchemaValidateStream(ctxt, input, enc, sax, user_data);
35799 desret_int(ret_val);
35801 des_xmlSchemaValidCtxtPtr(n_ctxt, ctxt, 0);
35802 des_xmlParserInputBufferPtr(n_input, input, 1);
35803 des_xmlCharEncoding(n_enc, enc, 2);
35804 des_xmlSAXHandlerPtr(n_sax, sax, 3);
35805 des_userdata(n_user_data, user_data, 4);
35806 xmlResetLastError();
35807 if (mem_base != xmlMemBlocks()) {
35808 printf("Leak of %d blocks found in xmlSchemaValidateStream",
35809 xmlMemBlocks() - mem_base);
35811 printf(" %d", n_ctxt);
35812 printf(" %d", n_input);
35813 printf(" %d", n_enc);
35814 printf(" %d", n_sax);
35815 printf(" %d", n_user_data);
35830 test_xmlschemas(void) {
35834 if (quiet == 0) printf("Testing xmlschemas : 16 of 27 functions ...\n");
35835 rc = test_xmlSchemaDump();
35836 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35837 rc = test_xmlSchemaGetParserErrors();
35838 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35839 rc = test_xmlSchemaGetValidErrors();
35840 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35841 rc = test_xmlSchemaIsValid();
35842 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35843 rc = test_xmlSchemaNewDocParserCtxt();
35844 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35845 rc = test_xmlSchemaNewMemParserCtxt();
35846 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35847 rc = test_xmlSchemaNewParserCtxt();
35848 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35849 rc = test_xmlSchemaNewValidCtxt();
35850 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35851 rc = test_xmlSchemaParse();
35852 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35853 rc = test_xmlSchemaSAXPlug();
35854 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35855 rc = test_xmlSchemaSAXUnplug();
35856 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35857 rc = test_xmlSchemaSetParserErrors();
35858 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35859 rc = test_xmlSchemaSetParserStructuredErrors();
35860 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35861 rc = test_xmlSchemaSetValidErrors();
35862 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35863 rc = test_xmlSchemaSetValidOptions();
35864 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35865 rc = test_xmlSchemaSetValidStructuredErrors();
35866 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35867 rc = test_xmlSchemaValidCtxtGetOptions();
35868 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35869 rc = test_xmlSchemaValidCtxtGetParserCtxt();
35870 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35871 rc = test_xmlSchemaValidateDoc();
35872 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35873 rc = test_xmlSchemaValidateFile();
35874 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35875 rc = test_xmlSchemaValidateOneElement();
35876 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35877 rc = test_xmlSchemaValidateSetFilename();
35878 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35879 rc = test_xmlSchemaValidateSetLocator();
35880 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35881 rc = test_xmlSchemaValidateStream();
35882 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
35885 printf("Module xmlschemas: %d errors\n", test_ret);
35888 #ifdef LIBXML_SCHEMAS_ENABLED
35890 #define gen_nb_xmlSchemaFacetPtr 1
35891 static xmlSchemaFacetPtr gen_xmlSchemaFacetPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
35894 static void des_xmlSchemaFacetPtr(int no ATTRIBUTE_UNUSED, xmlSchemaFacetPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
35898 #ifdef LIBXML_SCHEMAS_ENABLED
35900 #define gen_nb_xmlSchemaTypePtr 1
35901 static xmlSchemaTypePtr gen_xmlSchemaTypePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
35904 static void des_xmlSchemaTypePtr(int no ATTRIBUTE_UNUSED, xmlSchemaTypePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
35910 test_xmlSchemaCheckFacet(void) {
35913 #if defined(LIBXML_SCHEMAS_ENABLED)
35916 xmlSchemaFacetPtr facet; /* the facet */
35918 xmlSchemaTypePtr typeDecl; /* the schema type definition */
35920 xmlSchemaParserCtxtPtr pctxt; /* the schema parser context or NULL */
35922 xmlChar * name; /* the optional name of the type */
35925 for (n_facet = 0;n_facet < gen_nb_xmlSchemaFacetPtr;n_facet++) {
35926 for (n_typeDecl = 0;n_typeDecl < gen_nb_xmlSchemaTypePtr;n_typeDecl++) {
35927 for (n_pctxt = 0;n_pctxt < gen_nb_xmlSchemaParserCtxtPtr;n_pctxt++) {
35928 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
35929 mem_base = xmlMemBlocks();
35930 facet = gen_xmlSchemaFacetPtr(n_facet, 0);
35931 typeDecl = gen_xmlSchemaTypePtr(n_typeDecl, 1);
35932 pctxt = gen_xmlSchemaParserCtxtPtr(n_pctxt, 2);
35933 name = gen_const_xmlChar_ptr(n_name, 3);
35935 ret_val = xmlSchemaCheckFacet(facet, typeDecl, pctxt, (const xmlChar *)name);
35936 desret_int(ret_val);
35938 des_xmlSchemaFacetPtr(n_facet, facet, 0);
35939 des_xmlSchemaTypePtr(n_typeDecl, typeDecl, 1);
35940 des_xmlSchemaParserCtxtPtr(n_pctxt, pctxt, 2);
35941 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 3);
35942 xmlResetLastError();
35943 if (mem_base != xmlMemBlocks()) {
35944 printf("Leak of %d blocks found in xmlSchemaCheckFacet",
35945 xmlMemBlocks() - mem_base);
35947 printf(" %d", n_facet);
35948 printf(" %d", n_typeDecl);
35949 printf(" %d", n_pctxt);
35950 printf(" %d", n_name);
35965 test_xmlSchemaCleanupTypes(void) {
35968 #if defined(LIBXML_SCHEMAS_ENABLED)
35971 xmlSchemaCleanupTypes();
35973 xmlResetLastError();
35982 test_xmlSchemaCollapseString(void) {
35985 #if defined(LIBXML_SCHEMAS_ENABLED)
35988 xmlChar * value; /* a value */
35991 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
35992 mem_base = xmlMemBlocks();
35993 value = gen_const_xmlChar_ptr(n_value, 0);
35995 ret_val = xmlSchemaCollapseString((const xmlChar *)value);
35996 desret_xmlChar_ptr(ret_val);
35998 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 0);
35999 xmlResetLastError();
36000 if (mem_base != xmlMemBlocks()) {
36001 printf("Leak of %d blocks found in xmlSchemaCollapseString",
36002 xmlMemBlocks() - mem_base);
36004 printf(" %d", n_value);
36014 #ifdef LIBXML_SCHEMAS_ENABLED
36016 #define gen_nb_xmlSchemaValPtr 1
36017 static xmlSchemaValPtr gen_xmlSchemaValPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
36020 static void des_xmlSchemaValPtr(int no ATTRIBUTE_UNUSED, xmlSchemaValPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
36026 test_xmlSchemaCompareValues(void) {
36029 #if defined(LIBXML_SCHEMAS_ENABLED)
36032 xmlSchemaValPtr x; /* a first value */
36034 xmlSchemaValPtr y; /* a second value */
36037 for (n_x = 0;n_x < gen_nb_xmlSchemaValPtr;n_x++) {
36038 for (n_y = 0;n_y < gen_nb_xmlSchemaValPtr;n_y++) {
36039 mem_base = xmlMemBlocks();
36040 x = gen_xmlSchemaValPtr(n_x, 0);
36041 y = gen_xmlSchemaValPtr(n_y, 1);
36043 ret_val = xmlSchemaCompareValues(x, y);
36044 desret_int(ret_val);
36046 des_xmlSchemaValPtr(n_x, x, 0);
36047 des_xmlSchemaValPtr(n_y, y, 1);
36048 xmlResetLastError();
36049 if (mem_base != xmlMemBlocks()) {
36050 printf("Leak of %d blocks found in xmlSchemaCompareValues",
36051 xmlMemBlocks() - mem_base);
36053 printf(" %d", n_x);
36054 printf(" %d", n_y);
36067 test_xmlSchemaCompareValuesWhtsp(void) {
36070 #if defined(LIBXML_SCHEMAS_ENABLED)
36073 xmlSchemaValPtr x; /* a first value */
36075 xmlSchemaWhitespaceValueType xws; /* the whitespace value of x */
36077 xmlSchemaValPtr y; /* a second value */
36079 xmlSchemaWhitespaceValueType yws; /* the whitespace value of y */
36082 for (n_x = 0;n_x < gen_nb_xmlSchemaValPtr;n_x++) {
36083 for (n_xws = 0;n_xws < gen_nb_xmlSchemaWhitespaceValueType;n_xws++) {
36084 for (n_y = 0;n_y < gen_nb_xmlSchemaValPtr;n_y++) {
36085 for (n_yws = 0;n_yws < gen_nb_xmlSchemaWhitespaceValueType;n_yws++) {
36086 mem_base = xmlMemBlocks();
36087 x = gen_xmlSchemaValPtr(n_x, 0);
36088 xws = gen_xmlSchemaWhitespaceValueType(n_xws, 1);
36089 y = gen_xmlSchemaValPtr(n_y, 2);
36090 yws = gen_xmlSchemaWhitespaceValueType(n_yws, 3);
36092 ret_val = xmlSchemaCompareValuesWhtsp(x, xws, y, yws);
36093 desret_int(ret_val);
36095 des_xmlSchemaValPtr(n_x, x, 0);
36096 des_xmlSchemaWhitespaceValueType(n_xws, xws, 1);
36097 des_xmlSchemaValPtr(n_y, y, 2);
36098 des_xmlSchemaWhitespaceValueType(n_yws, yws, 3);
36099 xmlResetLastError();
36100 if (mem_base != xmlMemBlocks()) {
36101 printf("Leak of %d blocks found in xmlSchemaCompareValuesWhtsp",
36102 xmlMemBlocks() - mem_base);
36104 printf(" %d", n_x);
36105 printf(" %d", n_xws);
36106 printf(" %d", n_y);
36107 printf(" %d", n_yws);
36122 test_xmlSchemaCopyValue(void) {
36126 /* missing type support */
36132 test_xmlSchemaGetBuiltInListSimpleTypeItemType(void) {
36135 #if defined(LIBXML_SCHEMAS_ENABLED)
36137 xmlSchemaTypePtr ret_val;
36138 xmlSchemaTypePtr type; /* the built-in simple type. */
36141 for (n_type = 0;n_type < gen_nb_xmlSchemaTypePtr;n_type++) {
36142 mem_base = xmlMemBlocks();
36143 type = gen_xmlSchemaTypePtr(n_type, 0);
36145 ret_val = xmlSchemaGetBuiltInListSimpleTypeItemType(type);
36146 desret_xmlSchemaTypePtr(ret_val);
36148 des_xmlSchemaTypePtr(n_type, type, 0);
36149 xmlResetLastError();
36150 if (mem_base != xmlMemBlocks()) {
36151 printf("Leak of %d blocks found in xmlSchemaGetBuiltInListSimpleTypeItemType",
36152 xmlMemBlocks() - mem_base);
36154 printf(" %d", n_type);
36166 test_xmlSchemaGetBuiltInType(void) {
36169 #if defined(LIBXML_SCHEMAS_ENABLED)
36170 xmlSchemaTypePtr ret_val;
36171 xmlSchemaValType type; /* the type of the built in type */
36174 for (n_type = 0;n_type < gen_nb_xmlSchemaValType;n_type++) {
36175 type = gen_xmlSchemaValType(n_type, 0);
36177 ret_val = xmlSchemaGetBuiltInType(type);
36178 desret_xmlSchemaTypePtr(ret_val);
36180 des_xmlSchemaValType(n_type, type, 0);
36181 xmlResetLastError();
36191 test_xmlSchemaGetCanonValue(void) {
36194 #if defined(LIBXML_SCHEMAS_ENABLED)
36197 xmlSchemaValPtr val; /* the precomputed value */
36199 xmlChar ** retValue; /* the returned value */
36202 for (n_val = 0;n_val < gen_nb_xmlSchemaValPtr;n_val++) {
36203 for (n_retValue = 0;n_retValue < gen_nb_const_xmlChar_ptr_ptr;n_retValue++) {
36204 mem_base = xmlMemBlocks();
36205 val = gen_xmlSchemaValPtr(n_val, 0);
36206 retValue = gen_const_xmlChar_ptr_ptr(n_retValue, 1);
36208 ret_val = xmlSchemaGetCanonValue(val, (const xmlChar **)retValue);
36209 desret_int(ret_val);
36211 des_xmlSchemaValPtr(n_val, val, 0);
36212 des_const_xmlChar_ptr_ptr(n_retValue, (const xmlChar **)retValue, 1);
36213 xmlResetLastError();
36214 if (mem_base != xmlMemBlocks()) {
36215 printf("Leak of %d blocks found in xmlSchemaGetCanonValue",
36216 xmlMemBlocks() - mem_base);
36218 printf(" %d", n_val);
36219 printf(" %d", n_retValue);
36232 test_xmlSchemaGetCanonValueWhtsp(void) {
36235 #if defined(LIBXML_SCHEMAS_ENABLED)
36238 xmlSchemaValPtr val; /* the precomputed value */
36240 xmlChar ** retValue; /* the returned value */
36242 xmlSchemaWhitespaceValueType ws; /* the whitespace type of the value */
36245 for (n_val = 0;n_val < gen_nb_xmlSchemaValPtr;n_val++) {
36246 for (n_retValue = 0;n_retValue < gen_nb_const_xmlChar_ptr_ptr;n_retValue++) {
36247 for (n_ws = 0;n_ws < gen_nb_xmlSchemaWhitespaceValueType;n_ws++) {
36248 mem_base = xmlMemBlocks();
36249 val = gen_xmlSchemaValPtr(n_val, 0);
36250 retValue = gen_const_xmlChar_ptr_ptr(n_retValue, 1);
36251 ws = gen_xmlSchemaWhitespaceValueType(n_ws, 2);
36253 ret_val = xmlSchemaGetCanonValueWhtsp(val, (const xmlChar **)retValue, ws);
36254 desret_int(ret_val);
36256 des_xmlSchemaValPtr(n_val, val, 0);
36257 des_const_xmlChar_ptr_ptr(n_retValue, (const xmlChar **)retValue, 1);
36258 des_xmlSchemaWhitespaceValueType(n_ws, ws, 2);
36259 xmlResetLastError();
36260 if (mem_base != xmlMemBlocks()) {
36261 printf("Leak of %d blocks found in xmlSchemaGetCanonValueWhtsp",
36262 xmlMemBlocks() - mem_base);
36264 printf(" %d", n_val);
36265 printf(" %d", n_retValue);
36266 printf(" %d", n_ws);
36280 test_xmlSchemaGetFacetValueAsULong(void) {
36283 #if defined(LIBXML_SCHEMAS_ENABLED)
36285 unsigned long ret_val;
36286 xmlSchemaFacetPtr facet; /* an schemas type facet */
36289 for (n_facet = 0;n_facet < gen_nb_xmlSchemaFacetPtr;n_facet++) {
36290 mem_base = xmlMemBlocks();
36291 facet = gen_xmlSchemaFacetPtr(n_facet, 0);
36293 ret_val = xmlSchemaGetFacetValueAsULong(facet);
36294 desret_unsigned_long(ret_val);
36296 des_xmlSchemaFacetPtr(n_facet, facet, 0);
36297 xmlResetLastError();
36298 if (mem_base != xmlMemBlocks()) {
36299 printf("Leak of %d blocks found in xmlSchemaGetFacetValueAsULong",
36300 xmlMemBlocks() - mem_base);
36302 printf(" %d", n_facet);
36314 test_xmlSchemaGetPredefinedType(void) {
36317 #if defined(LIBXML_SCHEMAS_ENABLED)
36319 xmlSchemaTypePtr ret_val;
36320 xmlChar * name; /* the type name */
36322 xmlChar * ns; /* the URI of the namespace usually "http://www.w3.org/2001/XMLSchema" */
36325 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
36326 for (n_ns = 0;n_ns < gen_nb_const_xmlChar_ptr;n_ns++) {
36327 mem_base = xmlMemBlocks();
36328 name = gen_const_xmlChar_ptr(n_name, 0);
36329 ns = gen_const_xmlChar_ptr(n_ns, 1);
36331 ret_val = xmlSchemaGetPredefinedType((const xmlChar *)name, (const xmlChar *)ns);
36332 desret_xmlSchemaTypePtr(ret_val);
36334 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 0);
36335 des_const_xmlChar_ptr(n_ns, (const xmlChar *)ns, 1);
36336 xmlResetLastError();
36337 if (mem_base != xmlMemBlocks()) {
36338 printf("Leak of %d blocks found in xmlSchemaGetPredefinedType",
36339 xmlMemBlocks() - mem_base);
36341 printf(" %d", n_name);
36342 printf(" %d", n_ns);
36355 test_xmlSchemaGetValType(void) {
36358 #if defined(LIBXML_SCHEMAS_ENABLED)
36360 xmlSchemaValType ret_val;
36361 xmlSchemaValPtr val; /* a schemas value */
36364 for (n_val = 0;n_val < gen_nb_xmlSchemaValPtr;n_val++) {
36365 mem_base = xmlMemBlocks();
36366 val = gen_xmlSchemaValPtr(n_val, 0);
36368 ret_val = xmlSchemaGetValType(val);
36369 desret_xmlSchemaValType(ret_val);
36371 des_xmlSchemaValPtr(n_val, val, 0);
36372 xmlResetLastError();
36373 if (mem_base != xmlMemBlocks()) {
36374 printf("Leak of %d blocks found in xmlSchemaGetValType",
36375 xmlMemBlocks() - mem_base);
36377 printf(" %d", n_val);
36389 test_xmlSchemaInitTypes(void) {
36392 #if defined(LIBXML_SCHEMAS_ENABLED)
36395 xmlSchemaInitTypes();
36397 xmlResetLastError();
36406 test_xmlSchemaIsBuiltInTypeFacet(void) {
36409 #if defined(LIBXML_SCHEMAS_ENABLED)
36412 xmlSchemaTypePtr type; /* the built-in type */
36414 int facetType; /* the facet type */
36417 for (n_type = 0;n_type < gen_nb_xmlSchemaTypePtr;n_type++) {
36418 for (n_facetType = 0;n_facetType < gen_nb_int;n_facetType++) {
36419 mem_base = xmlMemBlocks();
36420 type = gen_xmlSchemaTypePtr(n_type, 0);
36421 facetType = gen_int(n_facetType, 1);
36423 ret_val = xmlSchemaIsBuiltInTypeFacet(type, facetType);
36424 desret_int(ret_val);
36426 des_xmlSchemaTypePtr(n_type, type, 0);
36427 des_int(n_facetType, facetType, 1);
36428 xmlResetLastError();
36429 if (mem_base != xmlMemBlocks()) {
36430 printf("Leak of %d blocks found in xmlSchemaIsBuiltInTypeFacet",
36431 xmlMemBlocks() - mem_base);
36433 printf(" %d", n_type);
36434 printf(" %d", n_facetType);
36447 test_xmlSchemaNewFacet(void) {
36451 /* missing type support */
36457 test_xmlSchemaNewNOTATIONValue(void) {
36461 /* missing type support */
36467 test_xmlSchemaNewQNameValue(void) {
36471 /* missing type support */
36477 test_xmlSchemaNewStringValue(void) {
36481 /* missing type support */
36485 #ifdef LIBXML_SCHEMAS_ENABLED
36487 #define gen_nb_xmlSchemaValPtr_ptr 1
36488 static xmlSchemaValPtr * gen_xmlSchemaValPtr_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
36491 static void des_xmlSchemaValPtr_ptr(int no ATTRIBUTE_UNUSED, xmlSchemaValPtr * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
36497 test_xmlSchemaValPredefTypeNode(void) {
36500 #if defined(LIBXML_SCHEMAS_ENABLED)
36503 xmlSchemaTypePtr type; /* the predefined type */
36505 xmlChar * value; /* the value to check */
36507 xmlSchemaValPtr * val; /* the return computed value */
36509 xmlNodePtr node; /* the node containing the value */
36512 for (n_type = 0;n_type < gen_nb_xmlSchemaTypePtr;n_type++) {
36513 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
36514 for (n_val = 0;n_val < gen_nb_xmlSchemaValPtr_ptr;n_val++) {
36515 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
36516 mem_base = xmlMemBlocks();
36517 type = gen_xmlSchemaTypePtr(n_type, 0);
36518 value = gen_const_xmlChar_ptr(n_value, 1);
36519 val = gen_xmlSchemaValPtr_ptr(n_val, 2);
36520 node = gen_xmlNodePtr(n_node, 3);
36522 ret_val = xmlSchemaValPredefTypeNode(type, (const xmlChar *)value, val, node);
36523 desret_int(ret_val);
36525 des_xmlSchemaTypePtr(n_type, type, 0);
36526 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 1);
36527 des_xmlSchemaValPtr_ptr(n_val, val, 2);
36528 des_xmlNodePtr(n_node, node, 3);
36529 xmlResetLastError();
36530 if (mem_base != xmlMemBlocks()) {
36531 printf("Leak of %d blocks found in xmlSchemaValPredefTypeNode",
36532 xmlMemBlocks() - mem_base);
36534 printf(" %d", n_type);
36535 printf(" %d", n_value);
36536 printf(" %d", n_val);
36537 printf(" %d", n_node);
36552 test_xmlSchemaValPredefTypeNodeNoNorm(void) {
36555 #if defined(LIBXML_SCHEMAS_ENABLED)
36558 xmlSchemaTypePtr type; /* the predefined type */
36560 xmlChar * value; /* the value to check */
36562 xmlSchemaValPtr * val; /* the return computed value */
36564 xmlNodePtr node; /* the node containing the value */
36567 for (n_type = 0;n_type < gen_nb_xmlSchemaTypePtr;n_type++) {
36568 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
36569 for (n_val = 0;n_val < gen_nb_xmlSchemaValPtr_ptr;n_val++) {
36570 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
36571 mem_base = xmlMemBlocks();
36572 type = gen_xmlSchemaTypePtr(n_type, 0);
36573 value = gen_const_xmlChar_ptr(n_value, 1);
36574 val = gen_xmlSchemaValPtr_ptr(n_val, 2);
36575 node = gen_xmlNodePtr(n_node, 3);
36577 ret_val = xmlSchemaValPredefTypeNodeNoNorm(type, (const xmlChar *)value, val, node);
36578 desret_int(ret_val);
36580 des_xmlSchemaTypePtr(n_type, type, 0);
36581 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 1);
36582 des_xmlSchemaValPtr_ptr(n_val, val, 2);
36583 des_xmlNodePtr(n_node, node, 3);
36584 xmlResetLastError();
36585 if (mem_base != xmlMemBlocks()) {
36586 printf("Leak of %d blocks found in xmlSchemaValPredefTypeNodeNoNorm",
36587 xmlMemBlocks() - mem_base);
36589 printf(" %d", n_type);
36590 printf(" %d", n_value);
36591 printf(" %d", n_val);
36592 printf(" %d", n_node);
36607 test_xmlSchemaValidateFacet(void) {
36610 #if defined(LIBXML_SCHEMAS_ENABLED)
36613 xmlSchemaTypePtr base; /* the base type */
36615 xmlSchemaFacetPtr facet; /* the facet to check */
36617 xmlChar * value; /* the lexical repr of the value to validate */
36619 xmlSchemaValPtr val; /* the precomputed value */
36622 for (n_base = 0;n_base < gen_nb_xmlSchemaTypePtr;n_base++) {
36623 for (n_facet = 0;n_facet < gen_nb_xmlSchemaFacetPtr;n_facet++) {
36624 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
36625 for (n_val = 0;n_val < gen_nb_xmlSchemaValPtr;n_val++) {
36626 mem_base = xmlMemBlocks();
36627 base = gen_xmlSchemaTypePtr(n_base, 0);
36628 facet = gen_xmlSchemaFacetPtr(n_facet, 1);
36629 value = gen_const_xmlChar_ptr(n_value, 2);
36630 val = gen_xmlSchemaValPtr(n_val, 3);
36632 ret_val = xmlSchemaValidateFacet(base, facet, (const xmlChar *)value, val);
36633 desret_int(ret_val);
36635 des_xmlSchemaTypePtr(n_base, base, 0);
36636 des_xmlSchemaFacetPtr(n_facet, facet, 1);
36637 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 2);
36638 des_xmlSchemaValPtr(n_val, val, 3);
36639 xmlResetLastError();
36640 if (mem_base != xmlMemBlocks()) {
36641 printf("Leak of %d blocks found in xmlSchemaValidateFacet",
36642 xmlMemBlocks() - mem_base);
36644 printf(" %d", n_base);
36645 printf(" %d", n_facet);
36646 printf(" %d", n_value);
36647 printf(" %d", n_val);
36662 test_xmlSchemaValidateFacetWhtsp(void) {
36665 #if defined(LIBXML_SCHEMAS_ENABLED)
36668 xmlSchemaFacetPtr facet; /* the facet to check */
36670 xmlSchemaWhitespaceValueType fws; /* the whitespace type of the facet's value */
36672 xmlSchemaValType valType; /* the built-in type of the value */
36674 xmlChar * value; /* the lexical (or normalized for pattern) repr of the value to validate */
36676 xmlSchemaValPtr val; /* the precomputed value */
36678 xmlSchemaWhitespaceValueType ws; /* the whitespace type of the value */
36681 for (n_facet = 0;n_facet < gen_nb_xmlSchemaFacetPtr;n_facet++) {
36682 for (n_fws = 0;n_fws < gen_nb_xmlSchemaWhitespaceValueType;n_fws++) {
36683 for (n_valType = 0;n_valType < gen_nb_xmlSchemaValType;n_valType++) {
36684 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
36685 for (n_val = 0;n_val < gen_nb_xmlSchemaValPtr;n_val++) {
36686 for (n_ws = 0;n_ws < gen_nb_xmlSchemaWhitespaceValueType;n_ws++) {
36687 mem_base = xmlMemBlocks();
36688 facet = gen_xmlSchemaFacetPtr(n_facet, 0);
36689 fws = gen_xmlSchemaWhitespaceValueType(n_fws, 1);
36690 valType = gen_xmlSchemaValType(n_valType, 2);
36691 value = gen_const_xmlChar_ptr(n_value, 3);
36692 val = gen_xmlSchemaValPtr(n_val, 4);
36693 ws = gen_xmlSchemaWhitespaceValueType(n_ws, 5);
36695 ret_val = xmlSchemaValidateFacetWhtsp(facet, fws, valType, (const xmlChar *)value, val, ws);
36696 desret_int(ret_val);
36698 des_xmlSchemaFacetPtr(n_facet, facet, 0);
36699 des_xmlSchemaWhitespaceValueType(n_fws, fws, 1);
36700 des_xmlSchemaValType(n_valType, valType, 2);
36701 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 3);
36702 des_xmlSchemaValPtr(n_val, val, 4);
36703 des_xmlSchemaWhitespaceValueType(n_ws, ws, 5);
36704 xmlResetLastError();
36705 if (mem_base != xmlMemBlocks()) {
36706 printf("Leak of %d blocks found in xmlSchemaValidateFacetWhtsp",
36707 xmlMemBlocks() - mem_base);
36709 printf(" %d", n_facet);
36710 printf(" %d", n_fws);
36711 printf(" %d", n_valType);
36712 printf(" %d", n_value);
36713 printf(" %d", n_val);
36714 printf(" %d", n_ws);
36731 test_xmlSchemaValidateLengthFacet(void) {
36734 #if defined(LIBXML_SCHEMAS_ENABLED)
36737 xmlSchemaTypePtr type; /* the built-in type */
36739 xmlSchemaFacetPtr facet; /* the facet to check */
36741 xmlChar * value; /* the lexical repr. of the value to be validated */
36743 xmlSchemaValPtr val; /* the precomputed value */
36745 unsigned long * length; /* the actual length of the value */
36748 for (n_type = 0;n_type < gen_nb_xmlSchemaTypePtr;n_type++) {
36749 for (n_facet = 0;n_facet < gen_nb_xmlSchemaFacetPtr;n_facet++) {
36750 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
36751 for (n_val = 0;n_val < gen_nb_xmlSchemaValPtr;n_val++) {
36752 for (n_length = 0;n_length < gen_nb_unsigned_long_ptr;n_length++) {
36753 mem_base = xmlMemBlocks();
36754 type = gen_xmlSchemaTypePtr(n_type, 0);
36755 facet = gen_xmlSchemaFacetPtr(n_facet, 1);
36756 value = gen_const_xmlChar_ptr(n_value, 2);
36757 val = gen_xmlSchemaValPtr(n_val, 3);
36758 length = gen_unsigned_long_ptr(n_length, 4);
36760 ret_val = xmlSchemaValidateLengthFacet(type, facet, (const xmlChar *)value, val, length);
36761 desret_int(ret_val);
36763 des_xmlSchemaTypePtr(n_type, type, 0);
36764 des_xmlSchemaFacetPtr(n_facet, facet, 1);
36765 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 2);
36766 des_xmlSchemaValPtr(n_val, val, 3);
36767 des_unsigned_long_ptr(n_length, length, 4);
36768 xmlResetLastError();
36769 if (mem_base != xmlMemBlocks()) {
36770 printf("Leak of %d blocks found in xmlSchemaValidateLengthFacet",
36771 xmlMemBlocks() - mem_base);
36773 printf(" %d", n_type);
36774 printf(" %d", n_facet);
36775 printf(" %d", n_value);
36776 printf(" %d", n_val);
36777 printf(" %d", n_length);
36793 test_xmlSchemaValidateLengthFacetWhtsp(void) {
36796 #if defined(LIBXML_SCHEMAS_ENABLED)
36799 xmlSchemaFacetPtr facet; /* the facet to check */
36801 xmlSchemaValType valType; /* the built-in type */
36803 xmlChar * value; /* the lexical repr. of the value to be validated */
36805 xmlSchemaValPtr val; /* the precomputed value */
36807 unsigned long * length; /* the actual length of the value */
36809 xmlSchemaWhitespaceValueType ws; /* the whitespace type of the value */
36812 for (n_facet = 0;n_facet < gen_nb_xmlSchemaFacetPtr;n_facet++) {
36813 for (n_valType = 0;n_valType < gen_nb_xmlSchemaValType;n_valType++) {
36814 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
36815 for (n_val = 0;n_val < gen_nb_xmlSchemaValPtr;n_val++) {
36816 for (n_length = 0;n_length < gen_nb_unsigned_long_ptr;n_length++) {
36817 for (n_ws = 0;n_ws < gen_nb_xmlSchemaWhitespaceValueType;n_ws++) {
36818 mem_base = xmlMemBlocks();
36819 facet = gen_xmlSchemaFacetPtr(n_facet, 0);
36820 valType = gen_xmlSchemaValType(n_valType, 1);
36821 value = gen_const_xmlChar_ptr(n_value, 2);
36822 val = gen_xmlSchemaValPtr(n_val, 3);
36823 length = gen_unsigned_long_ptr(n_length, 4);
36824 ws = gen_xmlSchemaWhitespaceValueType(n_ws, 5);
36826 ret_val = xmlSchemaValidateLengthFacetWhtsp(facet, valType, (const xmlChar *)value, val, length, ws);
36827 desret_int(ret_val);
36829 des_xmlSchemaFacetPtr(n_facet, facet, 0);
36830 des_xmlSchemaValType(n_valType, valType, 1);
36831 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 2);
36832 des_xmlSchemaValPtr(n_val, val, 3);
36833 des_unsigned_long_ptr(n_length, length, 4);
36834 des_xmlSchemaWhitespaceValueType(n_ws, ws, 5);
36835 xmlResetLastError();
36836 if (mem_base != xmlMemBlocks()) {
36837 printf("Leak of %d blocks found in xmlSchemaValidateLengthFacetWhtsp",
36838 xmlMemBlocks() - mem_base);
36840 printf(" %d", n_facet);
36841 printf(" %d", n_valType);
36842 printf(" %d", n_value);
36843 printf(" %d", n_val);
36844 printf(" %d", n_length);
36845 printf(" %d", n_ws);
36862 test_xmlSchemaValidateListSimpleTypeFacet(void) {
36865 #if defined(LIBXML_SCHEMAS_ENABLED)
36868 xmlSchemaFacetPtr facet; /* the facet to check */
36870 xmlChar * value; /* the lexical repr of the value to validate */
36872 unsigned long actualLen; /* the number of list items */
36874 unsigned long * expectedLen; /* the resulting expected number of list items */
36877 for (n_facet = 0;n_facet < gen_nb_xmlSchemaFacetPtr;n_facet++) {
36878 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
36879 for (n_actualLen = 0;n_actualLen < gen_nb_unsigned_long;n_actualLen++) {
36880 for (n_expectedLen = 0;n_expectedLen < gen_nb_unsigned_long_ptr;n_expectedLen++) {
36881 mem_base = xmlMemBlocks();
36882 facet = gen_xmlSchemaFacetPtr(n_facet, 0);
36883 value = gen_const_xmlChar_ptr(n_value, 1);
36884 actualLen = gen_unsigned_long(n_actualLen, 2);
36885 expectedLen = gen_unsigned_long_ptr(n_expectedLen, 3);
36887 ret_val = xmlSchemaValidateListSimpleTypeFacet(facet, (const xmlChar *)value, actualLen, expectedLen);
36888 desret_int(ret_val);
36890 des_xmlSchemaFacetPtr(n_facet, facet, 0);
36891 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 1);
36892 des_unsigned_long(n_actualLen, actualLen, 2);
36893 des_unsigned_long_ptr(n_expectedLen, expectedLen, 3);
36894 xmlResetLastError();
36895 if (mem_base != xmlMemBlocks()) {
36896 printf("Leak of %d blocks found in xmlSchemaValidateListSimpleTypeFacet",
36897 xmlMemBlocks() - mem_base);
36899 printf(" %d", n_facet);
36900 printf(" %d", n_value);
36901 printf(" %d", n_actualLen);
36902 printf(" %d", n_expectedLen);
36917 test_xmlSchemaValidatePredefinedType(void) {
36920 #if defined(LIBXML_SCHEMAS_ENABLED)
36923 xmlSchemaTypePtr type; /* the predefined type */
36925 xmlChar * value; /* the value to check */
36927 xmlSchemaValPtr * val; /* the return computed value */
36930 for (n_type = 0;n_type < gen_nb_xmlSchemaTypePtr;n_type++) {
36931 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
36932 for (n_val = 0;n_val < gen_nb_xmlSchemaValPtr_ptr;n_val++) {
36933 mem_base = xmlMemBlocks();
36934 type = gen_xmlSchemaTypePtr(n_type, 0);
36935 value = gen_const_xmlChar_ptr(n_value, 1);
36936 val = gen_xmlSchemaValPtr_ptr(n_val, 2);
36938 ret_val = xmlSchemaValidatePredefinedType(type, (const xmlChar *)value, val);
36939 desret_int(ret_val);
36941 des_xmlSchemaTypePtr(n_type, type, 0);
36942 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 1);
36943 des_xmlSchemaValPtr_ptr(n_val, val, 2);
36944 xmlResetLastError();
36945 if (mem_base != xmlMemBlocks()) {
36946 printf("Leak of %d blocks found in xmlSchemaValidatePredefinedType",
36947 xmlMemBlocks() - mem_base);
36949 printf(" %d", n_type);
36950 printf(" %d", n_value);
36951 printf(" %d", n_val);
36965 test_xmlSchemaValueAppend(void) {
36968 #if defined(LIBXML_SCHEMAS_ENABLED)
36971 xmlSchemaValPtr prev; /* the value */
36973 xmlSchemaValPtr cur; /* the value to be appended */
36976 for (n_prev = 0;n_prev < gen_nb_xmlSchemaValPtr;n_prev++) {
36977 for (n_cur = 0;n_cur < gen_nb_xmlSchemaValPtr;n_cur++) {
36978 mem_base = xmlMemBlocks();
36979 prev = gen_xmlSchemaValPtr(n_prev, 0);
36980 cur = gen_xmlSchemaValPtr(n_cur, 1);
36982 ret_val = xmlSchemaValueAppend(prev, cur);
36983 desret_int(ret_val);
36985 des_xmlSchemaValPtr(n_prev, prev, 0);
36986 des_xmlSchemaValPtr(n_cur, cur, 1);
36987 xmlResetLastError();
36988 if (mem_base != xmlMemBlocks()) {
36989 printf("Leak of %d blocks found in xmlSchemaValueAppend",
36990 xmlMemBlocks() - mem_base);
36992 printf(" %d", n_prev);
36993 printf(" %d", n_cur);
37006 test_xmlSchemaValueGetAsBoolean(void) {
37009 #if defined(LIBXML_SCHEMAS_ENABLED)
37012 xmlSchemaValPtr val; /* the value */
37015 for (n_val = 0;n_val < gen_nb_xmlSchemaValPtr;n_val++) {
37016 mem_base = xmlMemBlocks();
37017 val = gen_xmlSchemaValPtr(n_val, 0);
37019 ret_val = xmlSchemaValueGetAsBoolean(val);
37020 desret_int(ret_val);
37022 des_xmlSchemaValPtr(n_val, val, 0);
37023 xmlResetLastError();
37024 if (mem_base != xmlMemBlocks()) {
37025 printf("Leak of %d blocks found in xmlSchemaValueGetAsBoolean",
37026 xmlMemBlocks() - mem_base);
37028 printf(" %d", n_val);
37040 test_xmlSchemaValueGetAsString(void) {
37043 #if defined(LIBXML_SCHEMAS_ENABLED)
37045 const xmlChar * ret_val;
37046 xmlSchemaValPtr val; /* the value */
37049 for (n_val = 0;n_val < gen_nb_xmlSchemaValPtr;n_val++) {
37050 mem_base = xmlMemBlocks();
37051 val = gen_xmlSchemaValPtr(n_val, 0);
37053 ret_val = xmlSchemaValueGetAsString(val);
37054 desret_const_xmlChar_ptr(ret_val);
37056 des_xmlSchemaValPtr(n_val, val, 0);
37057 xmlResetLastError();
37058 if (mem_base != xmlMemBlocks()) {
37059 printf("Leak of %d blocks found in xmlSchemaValueGetAsString",
37060 xmlMemBlocks() - mem_base);
37062 printf(" %d", n_val);
37074 test_xmlSchemaValueGetNext(void) {
37078 /* missing type support */
37084 test_xmlSchemaWhiteSpaceReplace(void) {
37087 #if defined(LIBXML_SCHEMAS_ENABLED)
37090 xmlChar * value; /* a value */
37093 for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
37094 mem_base = xmlMemBlocks();
37095 value = gen_const_xmlChar_ptr(n_value, 0);
37097 ret_val = xmlSchemaWhiteSpaceReplace((const xmlChar *)value);
37098 desret_xmlChar_ptr(ret_val);
37100 des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 0);
37101 xmlResetLastError();
37102 if (mem_base != xmlMemBlocks()) {
37103 printf("Leak of %d blocks found in xmlSchemaWhiteSpaceReplace",
37104 xmlMemBlocks() - mem_base);
37106 printf(" %d", n_value);
37117 test_xmlschemastypes(void) {
37121 if (quiet == 0) printf("Testing xmlschemastypes : 26 of 34 functions ...\n");
37122 rc = test_xmlSchemaCheckFacet();
37123 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37124 rc = test_xmlSchemaCleanupTypes();
37125 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37126 rc = test_xmlSchemaCollapseString();
37127 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37128 rc = test_xmlSchemaCompareValues();
37129 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37130 rc = test_xmlSchemaCompareValuesWhtsp();
37131 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37132 rc = test_xmlSchemaCopyValue();
37133 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37134 rc = test_xmlSchemaGetBuiltInListSimpleTypeItemType();
37135 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37136 rc = test_xmlSchemaGetBuiltInType();
37137 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37138 rc = test_xmlSchemaGetCanonValue();
37139 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37140 rc = test_xmlSchemaGetCanonValueWhtsp();
37141 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37142 rc = test_xmlSchemaGetFacetValueAsULong();
37143 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37144 rc = test_xmlSchemaGetPredefinedType();
37145 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37146 rc = test_xmlSchemaGetValType();
37147 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37148 rc = test_xmlSchemaInitTypes();
37149 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37150 rc = test_xmlSchemaIsBuiltInTypeFacet();
37151 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37152 rc = test_xmlSchemaNewFacet();
37153 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37154 rc = test_xmlSchemaNewNOTATIONValue();
37155 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37156 rc = test_xmlSchemaNewQNameValue();
37157 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37158 rc = test_xmlSchemaNewStringValue();
37159 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37160 rc = test_xmlSchemaValPredefTypeNode();
37161 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37162 rc = test_xmlSchemaValPredefTypeNodeNoNorm();
37163 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37164 rc = test_xmlSchemaValidateFacet();
37165 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37166 rc = test_xmlSchemaValidateFacetWhtsp();
37167 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37168 rc = test_xmlSchemaValidateLengthFacet();
37169 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37170 rc = test_xmlSchemaValidateLengthFacetWhtsp();
37171 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37172 rc = test_xmlSchemaValidateListSimpleTypeFacet();
37173 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37174 rc = test_xmlSchemaValidatePredefinedType();
37175 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37176 rc = test_xmlSchemaValueAppend();
37177 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37178 rc = test_xmlSchemaValueGetAsBoolean();
37179 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37180 rc = test_xmlSchemaValueGetAsString();
37181 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37182 rc = test_xmlSchemaValueGetNext();
37183 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37184 rc = test_xmlSchemaWhiteSpaceReplace();
37185 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
37188 printf("Module xmlschemastypes: %d errors\n", test_ret);
37193 test_xmlCharStrdup(void) {
37198 char * cur; /* the input char * */
37201 for (n_cur = 0;n_cur < gen_nb_const_char_ptr;n_cur++) {
37202 mem_base = xmlMemBlocks();
37203 cur = gen_const_char_ptr(n_cur, 0);
37205 ret_val = xmlCharStrdup((const char *)cur);
37206 desret_xmlChar_ptr(ret_val);
37208 des_const_char_ptr(n_cur, (const char *)cur, 0);
37209 xmlResetLastError();
37210 if (mem_base != xmlMemBlocks()) {
37211 printf("Leak of %d blocks found in xmlCharStrdup",
37212 xmlMemBlocks() - mem_base);
37214 printf(" %d", n_cur);
37225 test_xmlCharStrndup(void) {
37230 char * cur; /* the input char * */
37232 int len; /* the len of @cur */
37235 for (n_cur = 0;n_cur < gen_nb_const_char_ptr;n_cur++) {
37236 for (n_len = 0;n_len < gen_nb_int;n_len++) {
37237 mem_base = xmlMemBlocks();
37238 cur = gen_const_char_ptr(n_cur, 0);
37239 len = gen_int(n_len, 1);
37241 ret_val = xmlCharStrndup((const char *)cur, len);
37242 desret_xmlChar_ptr(ret_val);
37244 des_const_char_ptr(n_cur, (const char *)cur, 0);
37245 des_int(n_len, len, 1);
37246 xmlResetLastError();
37247 if (mem_base != xmlMemBlocks()) {
37248 printf("Leak of %d blocks found in xmlCharStrndup",
37249 xmlMemBlocks() - mem_base);
37251 printf(" %d", n_cur);
37252 printf(" %d", n_len);
37264 test_xmlCheckUTF8(void) {
37269 unsigned char * utf; /* Pointer to putative UTF-8 encoded string. */
37272 for (n_utf = 0;n_utf < gen_nb_const_unsigned_char_ptr;n_utf++) {
37273 mem_base = xmlMemBlocks();
37274 utf = gen_const_unsigned_char_ptr(n_utf, 0);
37276 ret_val = xmlCheckUTF8((const unsigned char *)utf);
37277 desret_int(ret_val);
37279 des_const_unsigned_char_ptr(n_utf, (const unsigned char *)utf, 0);
37280 xmlResetLastError();
37281 if (mem_base != xmlMemBlocks()) {
37282 printf("Leak of %d blocks found in xmlCheckUTF8",
37283 xmlMemBlocks() - mem_base);
37285 printf(" %d", n_utf);
37296 test_xmlGetUTF8Char(void) {
37301 unsigned char * utf; /* a sequence of UTF-8 encoded bytes */
37303 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. */
37306 for (n_utf = 0;n_utf < gen_nb_const_unsigned_char_ptr;n_utf++) {
37307 for (n_len = 0;n_len < gen_nb_int_ptr;n_len++) {
37308 mem_base = xmlMemBlocks();
37309 utf = gen_const_unsigned_char_ptr(n_utf, 0);
37310 len = gen_int_ptr(n_len, 1);
37312 ret_val = xmlGetUTF8Char((const unsigned char *)utf, len);
37313 desret_int(ret_val);
37315 des_const_unsigned_char_ptr(n_utf, (const unsigned char *)utf, 0);
37316 des_int_ptr(n_len, len, 1);
37317 xmlResetLastError();
37318 if (mem_base != xmlMemBlocks()) {
37319 printf("Leak of %d blocks found in xmlGetUTF8Char",
37320 xmlMemBlocks() - mem_base);
37322 printf(" %d", n_utf);
37323 printf(" %d", n_len);
37335 test_xmlStrEqual(void) {
37340 xmlChar * str1; /* the first xmlChar * */
37342 xmlChar * str2; /* the second xmlChar * */
37345 for (n_str1 = 0;n_str1 < gen_nb_const_xmlChar_ptr;n_str1++) {
37346 for (n_str2 = 0;n_str2 < gen_nb_const_xmlChar_ptr;n_str2++) {
37347 mem_base = xmlMemBlocks();
37348 str1 = gen_const_xmlChar_ptr(n_str1, 0);
37349 str2 = gen_const_xmlChar_ptr(n_str2, 1);
37351 ret_val = xmlStrEqual((const xmlChar *)str1, (const xmlChar *)str2);
37352 desret_int(ret_val);
37354 des_const_xmlChar_ptr(n_str1, (const xmlChar *)str1, 0);
37355 des_const_xmlChar_ptr(n_str2, (const xmlChar *)str2, 1);
37356 xmlResetLastError();
37357 if (mem_base != xmlMemBlocks()) {
37358 printf("Leak of %d blocks found in xmlStrEqual",
37359 xmlMemBlocks() - mem_base);
37361 printf(" %d", n_str1);
37362 printf(" %d", n_str2);
37374 test_xmlStrPrintf(void) {
37378 /* missing type support */
37384 test_xmlStrQEqual(void) {
37389 xmlChar * pref; /* the prefix of the QName */
37391 xmlChar * name; /* the localname of the QName */
37393 xmlChar * str; /* the second xmlChar * */
37396 for (n_pref = 0;n_pref < gen_nb_const_xmlChar_ptr;n_pref++) {
37397 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
37398 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
37399 mem_base = xmlMemBlocks();
37400 pref = gen_const_xmlChar_ptr(n_pref, 0);
37401 name = gen_const_xmlChar_ptr(n_name, 1);
37402 str = gen_const_xmlChar_ptr(n_str, 2);
37404 ret_val = xmlStrQEqual((const xmlChar *)pref, (const xmlChar *)name, (const xmlChar *)str);
37405 desret_int(ret_val);
37407 des_const_xmlChar_ptr(n_pref, (const xmlChar *)pref, 0);
37408 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
37409 des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 2);
37410 xmlResetLastError();
37411 if (mem_base != xmlMemBlocks()) {
37412 printf("Leak of %d blocks found in xmlStrQEqual",
37413 xmlMemBlocks() - mem_base);
37415 printf(" %d", n_pref);
37416 printf(" %d", n_name);
37417 printf(" %d", n_str);
37430 test_xmlStrVPrintf(void) {
37434 /* missing type support */
37440 test_xmlStrcasecmp(void) {
37445 xmlChar * str1; /* the first xmlChar * */
37447 xmlChar * str2; /* the second xmlChar * */
37450 for (n_str1 = 0;n_str1 < gen_nb_const_xmlChar_ptr;n_str1++) {
37451 for (n_str2 = 0;n_str2 < gen_nb_const_xmlChar_ptr;n_str2++) {
37452 mem_base = xmlMemBlocks();
37453 str1 = gen_const_xmlChar_ptr(n_str1, 0);
37454 str2 = gen_const_xmlChar_ptr(n_str2, 1);
37456 ret_val = xmlStrcasecmp((const xmlChar *)str1, (const xmlChar *)str2);
37457 desret_int(ret_val);
37459 des_const_xmlChar_ptr(n_str1, (const xmlChar *)str1, 0);
37460 des_const_xmlChar_ptr(n_str2, (const xmlChar *)str2, 1);
37461 xmlResetLastError();
37462 if (mem_base != xmlMemBlocks()) {
37463 printf("Leak of %d blocks found in xmlStrcasecmp",
37464 xmlMemBlocks() - mem_base);
37466 printf(" %d", n_str1);
37467 printf(" %d", n_str2);
37479 test_xmlStrcasestr(void) {
37483 const xmlChar * ret_val;
37484 xmlChar * str; /* the xmlChar * array (haystack) */
37486 xmlChar * val; /* the xmlChar to search (needle) */
37489 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
37490 for (n_val = 0;n_val < gen_nb_const_xmlChar_ptr;n_val++) {
37491 mem_base = xmlMemBlocks();
37492 str = gen_const_xmlChar_ptr(n_str, 0);
37493 val = gen_const_xmlChar_ptr(n_val, 1);
37495 ret_val = xmlStrcasestr((const xmlChar *)str, (const xmlChar *)val);
37496 desret_const_xmlChar_ptr(ret_val);
37498 des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 0);
37499 des_const_xmlChar_ptr(n_val, (const xmlChar *)val, 1);
37500 xmlResetLastError();
37501 if (mem_base != xmlMemBlocks()) {
37502 printf("Leak of %d blocks found in xmlStrcasestr",
37503 xmlMemBlocks() - mem_base);
37505 printf(" %d", n_str);
37506 printf(" %d", n_val);
37518 test_xmlStrchr(void) {
37522 const xmlChar * ret_val;
37523 xmlChar * str; /* the xmlChar * array */
37525 xmlChar val; /* the xmlChar to search */
37528 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
37529 for (n_val = 0;n_val < gen_nb_xmlChar;n_val++) {
37530 mem_base = xmlMemBlocks();
37531 str = gen_const_xmlChar_ptr(n_str, 0);
37532 val = gen_xmlChar(n_val, 1);
37534 ret_val = xmlStrchr((const xmlChar *)str, val);
37535 desret_const_xmlChar_ptr(ret_val);
37537 des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 0);
37538 des_xmlChar(n_val, val, 1);
37539 xmlResetLastError();
37540 if (mem_base != xmlMemBlocks()) {
37541 printf("Leak of %d blocks found in xmlStrchr",
37542 xmlMemBlocks() - mem_base);
37544 printf(" %d", n_str);
37545 printf(" %d", n_val);
37557 test_xmlStrcmp(void) {
37562 xmlChar * str1; /* the first xmlChar * */
37564 xmlChar * str2; /* the second xmlChar * */
37567 for (n_str1 = 0;n_str1 < gen_nb_const_xmlChar_ptr;n_str1++) {
37568 for (n_str2 = 0;n_str2 < gen_nb_const_xmlChar_ptr;n_str2++) {
37569 mem_base = xmlMemBlocks();
37570 str1 = gen_const_xmlChar_ptr(n_str1, 0);
37571 str2 = gen_const_xmlChar_ptr(n_str2, 1);
37573 ret_val = xmlStrcmp((const xmlChar *)str1, (const xmlChar *)str2);
37574 desret_int(ret_val);
37576 des_const_xmlChar_ptr(n_str1, (const xmlChar *)str1, 0);
37577 des_const_xmlChar_ptr(n_str2, (const xmlChar *)str2, 1);
37578 xmlResetLastError();
37579 if (mem_base != xmlMemBlocks()) {
37580 printf("Leak of %d blocks found in xmlStrcmp",
37581 xmlMemBlocks() - mem_base);
37583 printf(" %d", n_str1);
37584 printf(" %d", n_str2);
37596 test_xmlStrdup(void) {
37601 xmlChar * cur; /* the input xmlChar * */
37604 for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
37605 mem_base = xmlMemBlocks();
37606 cur = gen_const_xmlChar_ptr(n_cur, 0);
37608 ret_val = xmlStrdup((const xmlChar *)cur);
37609 desret_xmlChar_ptr(ret_val);
37611 des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 0);
37612 xmlResetLastError();
37613 if (mem_base != xmlMemBlocks()) {
37614 printf("Leak of %d blocks found in xmlStrdup",
37615 xmlMemBlocks() - mem_base);
37617 printf(" %d", n_cur);
37628 test_xmlStrlen(void) {
37633 xmlChar * str; /* the xmlChar * array */
37636 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
37637 mem_base = xmlMemBlocks();
37638 str = gen_const_xmlChar_ptr(n_str, 0);
37640 ret_val = xmlStrlen((const xmlChar *)str);
37641 desret_int(ret_val);
37643 des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 0);
37644 xmlResetLastError();
37645 if (mem_base != xmlMemBlocks()) {
37646 printf("Leak of %d blocks found in xmlStrlen",
37647 xmlMemBlocks() - mem_base);
37649 printf(" %d", n_str);
37660 test_xmlStrncasecmp(void) {
37665 xmlChar * str1; /* the first xmlChar * */
37667 xmlChar * str2; /* the second xmlChar * */
37669 int len; /* the max comparison length */
37672 for (n_str1 = 0;n_str1 < gen_nb_const_xmlChar_ptr;n_str1++) {
37673 for (n_str2 = 0;n_str2 < gen_nb_const_xmlChar_ptr;n_str2++) {
37674 for (n_len = 0;n_len < gen_nb_int;n_len++) {
37675 mem_base = xmlMemBlocks();
37676 str1 = gen_const_xmlChar_ptr(n_str1, 0);
37677 str2 = gen_const_xmlChar_ptr(n_str2, 1);
37678 len = gen_int(n_len, 2);
37680 ret_val = xmlStrncasecmp((const xmlChar *)str1, (const xmlChar *)str2, len);
37681 desret_int(ret_val);
37683 des_const_xmlChar_ptr(n_str1, (const xmlChar *)str1, 0);
37684 des_const_xmlChar_ptr(n_str2, (const xmlChar *)str2, 1);
37685 des_int(n_len, len, 2);
37686 xmlResetLastError();
37687 if (mem_base != xmlMemBlocks()) {
37688 printf("Leak of %d blocks found in xmlStrncasecmp",
37689 xmlMemBlocks() - mem_base);
37691 printf(" %d", n_str1);
37692 printf(" %d", n_str2);
37693 printf(" %d", n_len);
37706 test_xmlStrncatNew(void) {
37711 xmlChar * str1; /* first xmlChar string */
37713 xmlChar * str2; /* second xmlChar string */
37715 int len; /* the len of @str2 or < 0 */
37718 for (n_str1 = 0;n_str1 < gen_nb_const_xmlChar_ptr;n_str1++) {
37719 for (n_str2 = 0;n_str2 < gen_nb_const_xmlChar_ptr;n_str2++) {
37720 for (n_len = 0;n_len < gen_nb_int;n_len++) {
37721 mem_base = xmlMemBlocks();
37722 str1 = gen_const_xmlChar_ptr(n_str1, 0);
37723 str2 = gen_const_xmlChar_ptr(n_str2, 1);
37724 len = gen_int(n_len, 2);
37726 ret_val = xmlStrncatNew((const xmlChar *)str1, (const xmlChar *)str2, len);
37727 desret_xmlChar_ptr(ret_val);
37729 des_const_xmlChar_ptr(n_str1, (const xmlChar *)str1, 0);
37730 des_const_xmlChar_ptr(n_str2, (const xmlChar *)str2, 1);
37731 des_int(n_len, len, 2);
37732 xmlResetLastError();
37733 if (mem_base != xmlMemBlocks()) {
37734 printf("Leak of %d blocks found in xmlStrncatNew",
37735 xmlMemBlocks() - mem_base);
37737 printf(" %d", n_str1);
37738 printf(" %d", n_str2);
37739 printf(" %d", n_len);
37752 test_xmlStrncmp(void) {
37757 xmlChar * str1; /* the first xmlChar * */
37759 xmlChar * str2; /* the second xmlChar * */
37761 int len; /* the max comparison length */
37764 for (n_str1 = 0;n_str1 < gen_nb_const_xmlChar_ptr;n_str1++) {
37765 for (n_str2 = 0;n_str2 < gen_nb_const_xmlChar_ptr;n_str2++) {
37766 for (n_len = 0;n_len < gen_nb_int;n_len++) {
37767 mem_base = xmlMemBlocks();
37768 str1 = gen_const_xmlChar_ptr(n_str1, 0);
37769 str2 = gen_const_xmlChar_ptr(n_str2, 1);
37770 len = gen_int(n_len, 2);
37772 ret_val = xmlStrncmp((const xmlChar *)str1, (const xmlChar *)str2, len);
37773 desret_int(ret_val);
37775 des_const_xmlChar_ptr(n_str1, (const xmlChar *)str1, 0);
37776 des_const_xmlChar_ptr(n_str2, (const xmlChar *)str2, 1);
37777 des_int(n_len, len, 2);
37778 xmlResetLastError();
37779 if (mem_base != xmlMemBlocks()) {
37780 printf("Leak of %d blocks found in xmlStrncmp",
37781 xmlMemBlocks() - mem_base);
37783 printf(" %d", n_str1);
37784 printf(" %d", n_str2);
37785 printf(" %d", n_len);
37798 test_xmlStrndup(void) {
37803 xmlChar * cur; /* the input xmlChar * */
37805 int len; /* the len of @cur */
37808 for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
37809 for (n_len = 0;n_len < gen_nb_int;n_len++) {
37810 mem_base = xmlMemBlocks();
37811 cur = gen_const_xmlChar_ptr(n_cur, 0);
37812 len = gen_int(n_len, 1);
37814 ret_val = xmlStrndup((const xmlChar *)cur, len);
37815 desret_xmlChar_ptr(ret_val);
37817 des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 0);
37818 des_int(n_len, len, 1);
37819 xmlResetLastError();
37820 if (mem_base != xmlMemBlocks()) {
37821 printf("Leak of %d blocks found in xmlStrndup",
37822 xmlMemBlocks() - mem_base);
37824 printf(" %d", n_cur);
37825 printf(" %d", n_len);
37837 test_xmlStrstr(void) {
37841 const xmlChar * ret_val;
37842 xmlChar * str; /* the xmlChar * array (haystack) */
37844 xmlChar * val; /* the xmlChar to search (needle) */
37847 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
37848 for (n_val = 0;n_val < gen_nb_const_xmlChar_ptr;n_val++) {
37849 mem_base = xmlMemBlocks();
37850 str = gen_const_xmlChar_ptr(n_str, 0);
37851 val = gen_const_xmlChar_ptr(n_val, 1);
37853 ret_val = xmlStrstr((const xmlChar *)str, (const xmlChar *)val);
37854 desret_const_xmlChar_ptr(ret_val);
37856 des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 0);
37857 des_const_xmlChar_ptr(n_val, (const xmlChar *)val, 1);
37858 xmlResetLastError();
37859 if (mem_base != xmlMemBlocks()) {
37860 printf("Leak of %d blocks found in xmlStrstr",
37861 xmlMemBlocks() - mem_base);
37863 printf(" %d", n_str);
37864 printf(" %d", n_val);
37876 test_xmlStrsub(void) {
37881 xmlChar * str; /* the xmlChar * array (haystack) */
37883 int start; /* the index of the first char (zero based) */
37885 int len; /* the length of the substring */
37888 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
37889 for (n_start = 0;n_start < gen_nb_int;n_start++) {
37890 for (n_len = 0;n_len < gen_nb_int;n_len++) {
37891 mem_base = xmlMemBlocks();
37892 str = gen_const_xmlChar_ptr(n_str, 0);
37893 start = gen_int(n_start, 1);
37894 len = gen_int(n_len, 2);
37896 ret_val = xmlStrsub((const xmlChar *)str, start, len);
37897 desret_xmlChar_ptr(ret_val);
37899 des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 0);
37900 des_int(n_start, start, 1);
37901 des_int(n_len, len, 2);
37902 xmlResetLastError();
37903 if (mem_base != xmlMemBlocks()) {
37904 printf("Leak of %d blocks found in xmlStrsub",
37905 xmlMemBlocks() - mem_base);
37907 printf(" %d", n_str);
37908 printf(" %d", n_start);
37909 printf(" %d", n_len);
37922 test_xmlUTF8Charcmp(void) {
37927 xmlChar * utf1; /* pointer to first UTF8 char */
37929 xmlChar * utf2; /* pointer to second UTF8 char */
37932 for (n_utf1 = 0;n_utf1 < gen_nb_const_xmlChar_ptr;n_utf1++) {
37933 for (n_utf2 = 0;n_utf2 < gen_nb_const_xmlChar_ptr;n_utf2++) {
37934 mem_base = xmlMemBlocks();
37935 utf1 = gen_const_xmlChar_ptr(n_utf1, 0);
37936 utf2 = gen_const_xmlChar_ptr(n_utf2, 1);
37938 ret_val = xmlUTF8Charcmp((const xmlChar *)utf1, (const xmlChar *)utf2);
37939 desret_int(ret_val);
37941 des_const_xmlChar_ptr(n_utf1, (const xmlChar *)utf1, 0);
37942 des_const_xmlChar_ptr(n_utf2, (const xmlChar *)utf2, 1);
37943 xmlResetLastError();
37944 if (mem_base != xmlMemBlocks()) {
37945 printf("Leak of %d blocks found in xmlUTF8Charcmp",
37946 xmlMemBlocks() - mem_base);
37948 printf(" %d", n_utf1);
37949 printf(" %d", n_utf2);
37961 test_xmlUTF8Size(void) {
37966 xmlChar * utf; /* pointer to the UTF8 character */
37969 for (n_utf = 0;n_utf < gen_nb_const_xmlChar_ptr;n_utf++) {
37970 mem_base = xmlMemBlocks();
37971 utf = gen_const_xmlChar_ptr(n_utf, 0);
37973 ret_val = xmlUTF8Size((const xmlChar *)utf);
37974 desret_int(ret_val);
37976 des_const_xmlChar_ptr(n_utf, (const xmlChar *)utf, 0);
37977 xmlResetLastError();
37978 if (mem_base != xmlMemBlocks()) {
37979 printf("Leak of %d blocks found in xmlUTF8Size",
37980 xmlMemBlocks() - mem_base);
37982 printf(" %d", n_utf);
37993 test_xmlUTF8Strlen(void) {
37998 xmlChar * utf; /* a sequence of UTF-8 encoded bytes */
38001 for (n_utf = 0;n_utf < gen_nb_const_xmlChar_ptr;n_utf++) {
38002 mem_base = xmlMemBlocks();
38003 utf = gen_const_xmlChar_ptr(n_utf, 0);
38005 ret_val = xmlUTF8Strlen((const xmlChar *)utf);
38006 desret_int(ret_val);
38008 des_const_xmlChar_ptr(n_utf, (const xmlChar *)utf, 0);
38009 xmlResetLastError();
38010 if (mem_base != xmlMemBlocks()) {
38011 printf("Leak of %d blocks found in xmlUTF8Strlen",
38012 xmlMemBlocks() - mem_base);
38014 printf(" %d", n_utf);
38025 test_xmlUTF8Strloc(void) {
38030 xmlChar * utf; /* the input UTF8 * */
38032 xmlChar * utfchar; /* the UTF8 character to be found */
38035 for (n_utf = 0;n_utf < gen_nb_const_xmlChar_ptr;n_utf++) {
38036 for (n_utfchar = 0;n_utfchar < gen_nb_const_xmlChar_ptr;n_utfchar++) {
38037 mem_base = xmlMemBlocks();
38038 utf = gen_const_xmlChar_ptr(n_utf, 0);
38039 utfchar = gen_const_xmlChar_ptr(n_utfchar, 1);
38041 ret_val = xmlUTF8Strloc((const xmlChar *)utf, (const xmlChar *)utfchar);
38042 desret_int(ret_val);
38044 des_const_xmlChar_ptr(n_utf, (const xmlChar *)utf, 0);
38045 des_const_xmlChar_ptr(n_utfchar, (const xmlChar *)utfchar, 1);
38046 xmlResetLastError();
38047 if (mem_base != xmlMemBlocks()) {
38048 printf("Leak of %d blocks found in xmlUTF8Strloc",
38049 xmlMemBlocks() - mem_base);
38051 printf(" %d", n_utf);
38052 printf(" %d", n_utfchar);
38064 test_xmlUTF8Strndup(void) {
38069 xmlChar * utf; /* the input UTF8 * */
38071 int len; /* the len of @utf (in chars) */
38074 for (n_utf = 0;n_utf < gen_nb_const_xmlChar_ptr;n_utf++) {
38075 for (n_len = 0;n_len < gen_nb_int;n_len++) {
38076 mem_base = xmlMemBlocks();
38077 utf = gen_const_xmlChar_ptr(n_utf, 0);
38078 len = gen_int(n_len, 1);
38080 ret_val = xmlUTF8Strndup((const xmlChar *)utf, len);
38081 desret_xmlChar_ptr(ret_val);
38083 des_const_xmlChar_ptr(n_utf, (const xmlChar *)utf, 0);
38084 des_int(n_len, len, 1);
38085 xmlResetLastError();
38086 if (mem_base != xmlMemBlocks()) {
38087 printf("Leak of %d blocks found in xmlUTF8Strndup",
38088 xmlMemBlocks() - mem_base);
38090 printf(" %d", n_utf);
38091 printf(" %d", n_len);
38103 test_xmlUTF8Strpos(void) {
38107 const xmlChar * ret_val;
38108 xmlChar * utf; /* the input UTF8 * */
38110 int pos; /* the position of the desired UTF8 char (in chars) */
38113 for (n_utf = 0;n_utf < gen_nb_const_xmlChar_ptr;n_utf++) {
38114 for (n_pos = 0;n_pos < gen_nb_int;n_pos++) {
38115 mem_base = xmlMemBlocks();
38116 utf = gen_const_xmlChar_ptr(n_utf, 0);
38117 pos = gen_int(n_pos, 1);
38119 ret_val = xmlUTF8Strpos((const xmlChar *)utf, pos);
38120 desret_const_xmlChar_ptr(ret_val);
38122 des_const_xmlChar_ptr(n_utf, (const xmlChar *)utf, 0);
38123 des_int(n_pos, pos, 1);
38124 xmlResetLastError();
38125 if (mem_base != xmlMemBlocks()) {
38126 printf("Leak of %d blocks found in xmlUTF8Strpos",
38127 xmlMemBlocks() - mem_base);
38129 printf(" %d", n_utf);
38130 printf(" %d", n_pos);
38142 test_xmlUTF8Strsize(void) {
38147 xmlChar * utf; /* a sequence of UTF-8 encoded bytes */
38149 int len; /* the number of characters in the array */
38152 for (n_utf = 0;n_utf < gen_nb_const_xmlChar_ptr;n_utf++) {
38153 for (n_len = 0;n_len < gen_nb_int;n_len++) {
38154 mem_base = xmlMemBlocks();
38155 utf = gen_const_xmlChar_ptr(n_utf, 0);
38156 len = gen_int(n_len, 1);
38158 ret_val = xmlUTF8Strsize((const xmlChar *)utf, len);
38159 desret_int(ret_val);
38161 des_const_xmlChar_ptr(n_utf, (const xmlChar *)utf, 0);
38162 des_int(n_len, len, 1);
38163 xmlResetLastError();
38164 if (mem_base != xmlMemBlocks()) {
38165 printf("Leak of %d blocks found in xmlUTF8Strsize",
38166 xmlMemBlocks() - mem_base);
38168 printf(" %d", n_utf);
38169 printf(" %d", n_len);
38181 test_xmlUTF8Strsub(void) {
38186 xmlChar * utf; /* a sequence of UTF-8 encoded bytes */
38188 int start; /* relative pos of first char */
38190 int len; /* total number to copy */
38193 for (n_utf = 0;n_utf < gen_nb_const_xmlChar_ptr;n_utf++) {
38194 for (n_start = 0;n_start < gen_nb_int;n_start++) {
38195 for (n_len = 0;n_len < gen_nb_int;n_len++) {
38196 mem_base = xmlMemBlocks();
38197 utf = gen_const_xmlChar_ptr(n_utf, 0);
38198 start = gen_int(n_start, 1);
38199 len = gen_int(n_len, 2);
38201 ret_val = xmlUTF8Strsub((const xmlChar *)utf, start, len);
38202 desret_xmlChar_ptr(ret_val);
38204 des_const_xmlChar_ptr(n_utf, (const xmlChar *)utf, 0);
38205 des_int(n_start, start, 1);
38206 des_int(n_len, len, 2);
38207 xmlResetLastError();
38208 if (mem_base != xmlMemBlocks()) {
38209 printf("Leak of %d blocks found in xmlUTF8Strsub",
38210 xmlMemBlocks() - mem_base);
38212 printf(" %d", n_utf);
38213 printf(" %d", n_start);
38214 printf(" %d", n_len);
38226 test_xmlstring(void) {
38230 if (quiet == 0) printf("Testing xmlstring : 26 of 30 functions ...\n");
38231 rc = test_xmlCharStrdup();
38232 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38233 rc = test_xmlCharStrndup();
38234 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38235 rc = test_xmlCheckUTF8();
38236 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38237 rc = test_xmlGetUTF8Char();
38238 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38239 rc = test_xmlStrEqual();
38240 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38241 rc = test_xmlStrPrintf();
38242 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38243 rc = test_xmlStrQEqual();
38244 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38245 rc = test_xmlStrVPrintf();
38246 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38247 rc = test_xmlStrcasecmp();
38248 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38249 rc = test_xmlStrcasestr();
38250 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38251 rc = test_xmlStrchr();
38252 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38253 rc = test_xmlStrcmp();
38254 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38255 rc = test_xmlStrdup();
38256 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38257 rc = test_xmlStrlen();
38258 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38259 rc = test_xmlStrncasecmp();
38260 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38261 rc = test_xmlStrncatNew();
38262 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38263 rc = test_xmlStrncmp();
38264 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38265 rc = test_xmlStrndup();
38266 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38267 rc = test_xmlStrstr();
38268 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38269 rc = test_xmlStrsub();
38270 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38271 rc = test_xmlUTF8Charcmp();
38272 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38273 rc = test_xmlUTF8Size();
38274 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38275 rc = test_xmlUTF8Strlen();
38276 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38277 rc = test_xmlUTF8Strloc();
38278 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38279 rc = test_xmlUTF8Strndup();
38280 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38281 rc = test_xmlUTF8Strpos();
38282 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38283 rc = test_xmlUTF8Strsize();
38284 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38285 rc = test_xmlUTF8Strsub();
38286 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
38289 printf("Module xmlstring: %d errors\n", test_ret);
38294 test_xmlUCSIsAegeanNumbers(void) {
38297 #if defined(LIBXML_UNICODE_ENABLED)
38300 int code; /* UCS code point */
38303 for (n_code = 0;n_code < gen_nb_int;n_code++) {
38304 mem_base = xmlMemBlocks();
38305 code = gen_int(n_code, 0);
38307 ret_val = xmlUCSIsAegeanNumbers(code);
38308 desret_int(ret_val);
38310 des_int(n_code, code, 0);
38311 xmlResetLastError();
38312 if (mem_base != xmlMemBlocks()) {
38313 printf("Leak of %d blocks found in xmlUCSIsAegeanNumbers",
38314 xmlMemBlocks() - mem_base);
38316 printf(" %d", n_code);
38328 test_xmlUCSIsAlphabeticPresentationForms(void) {
38331 #if defined(LIBXML_UNICODE_ENABLED)
38334 int code; /* UCS code point */
38337 for (n_code = 0;n_code < gen_nb_int;n_code++) {
38338 mem_base = xmlMemBlocks();
38339 code = gen_int(n_code, 0);
38341 ret_val = xmlUCSIsAlphabeticPresentationForms(code);
38342 desret_int(ret_val);
38344 des_int(n_code, code, 0);
38345 xmlResetLastError();
38346 if (mem_base != xmlMemBlocks()) {
38347 printf("Leak of %d blocks found in xmlUCSIsAlphabeticPresentationForms",
38348 xmlMemBlocks() - mem_base);
38350 printf(" %d", n_code);
38362 test_xmlUCSIsArabic(void) {
38365 #if defined(LIBXML_UNICODE_ENABLED)
38368 int code; /* UCS code point */
38371 for (n_code = 0;n_code < gen_nb_int;n_code++) {
38372 mem_base = xmlMemBlocks();
38373 code = gen_int(n_code, 0);
38375 ret_val = xmlUCSIsArabic(code);
38376 desret_int(ret_val);
38378 des_int(n_code, code, 0);
38379 xmlResetLastError();
38380 if (mem_base != xmlMemBlocks()) {
38381 printf("Leak of %d blocks found in xmlUCSIsArabic",
38382 xmlMemBlocks() - mem_base);
38384 printf(" %d", n_code);
38396 test_xmlUCSIsArabicPresentationFormsA(void) {
38399 #if defined(LIBXML_UNICODE_ENABLED)
38402 int code; /* UCS code point */
38405 for (n_code = 0;n_code < gen_nb_int;n_code++) {
38406 mem_base = xmlMemBlocks();
38407 code = gen_int(n_code, 0);
38409 ret_val = xmlUCSIsArabicPresentationFormsA(code);
38410 desret_int(ret_val);
38412 des_int(n_code, code, 0);
38413 xmlResetLastError();
38414 if (mem_base != xmlMemBlocks()) {
38415 printf("Leak of %d blocks found in xmlUCSIsArabicPresentationFormsA",
38416 xmlMemBlocks() - mem_base);
38418 printf(" %d", n_code);
38430 test_xmlUCSIsArabicPresentationFormsB(void) {
38433 #if defined(LIBXML_UNICODE_ENABLED)
38436 int code; /* UCS code point */
38439 for (n_code = 0;n_code < gen_nb_int;n_code++) {
38440 mem_base = xmlMemBlocks();
38441 code = gen_int(n_code, 0);
38443 ret_val = xmlUCSIsArabicPresentationFormsB(code);
38444 desret_int(ret_val);
38446 des_int(n_code, code, 0);
38447 xmlResetLastError();
38448 if (mem_base != xmlMemBlocks()) {
38449 printf("Leak of %d blocks found in xmlUCSIsArabicPresentationFormsB",
38450 xmlMemBlocks() - mem_base);
38452 printf(" %d", n_code);
38464 test_xmlUCSIsArmenian(void) {
38467 #if defined(LIBXML_UNICODE_ENABLED)
38470 int code; /* UCS code point */
38473 for (n_code = 0;n_code < gen_nb_int;n_code++) {
38474 mem_base = xmlMemBlocks();
38475 code = gen_int(n_code, 0);
38477 ret_val = xmlUCSIsArmenian(code);
38478 desret_int(ret_val);
38480 des_int(n_code, code, 0);
38481 xmlResetLastError();
38482 if (mem_base != xmlMemBlocks()) {
38483 printf("Leak of %d blocks found in xmlUCSIsArmenian",
38484 xmlMemBlocks() - mem_base);
38486 printf(" %d", n_code);
38498 test_xmlUCSIsArrows(void) {
38501 #if defined(LIBXML_UNICODE_ENABLED)
38504 int code; /* UCS code point */
38507 for (n_code = 0;n_code < gen_nb_int;n_code++) {
38508 mem_base = xmlMemBlocks();
38509 code = gen_int(n_code, 0);
38511 ret_val = xmlUCSIsArrows(code);
38512 desret_int(ret_val);
38514 des_int(n_code, code, 0);
38515 xmlResetLastError();
38516 if (mem_base != xmlMemBlocks()) {
38517 printf("Leak of %d blocks found in xmlUCSIsArrows",
38518 xmlMemBlocks() - mem_base);
38520 printf(" %d", n_code);
38532 test_xmlUCSIsBasicLatin(void) {
38535 #if defined(LIBXML_UNICODE_ENABLED)
38538 int code; /* UCS code point */
38541 for (n_code = 0;n_code < gen_nb_int;n_code++) {
38542 mem_base = xmlMemBlocks();
38543 code = gen_int(n_code, 0);
38545 ret_val = xmlUCSIsBasicLatin(code);
38546 desret_int(ret_val);
38548 des_int(n_code, code, 0);
38549 xmlResetLastError();
38550 if (mem_base != xmlMemBlocks()) {
38551 printf("Leak of %d blocks found in xmlUCSIsBasicLatin",
38552 xmlMemBlocks() - mem_base);
38554 printf(" %d", n_code);
38566 test_xmlUCSIsBengali(void) {
38569 #if defined(LIBXML_UNICODE_ENABLED)
38572 int code; /* UCS code point */
38575 for (n_code = 0;n_code < gen_nb_int;n_code++) {
38576 mem_base = xmlMemBlocks();
38577 code = gen_int(n_code, 0);
38579 ret_val = xmlUCSIsBengali(code);
38580 desret_int(ret_val);
38582 des_int(n_code, code, 0);
38583 xmlResetLastError();
38584 if (mem_base != xmlMemBlocks()) {
38585 printf("Leak of %d blocks found in xmlUCSIsBengali",
38586 xmlMemBlocks() - mem_base);
38588 printf(" %d", n_code);
38600 test_xmlUCSIsBlock(void) {
38603 #if defined(LIBXML_UNICODE_ENABLED)
38606 int code; /* UCS code point */
38608 char * block; /* UCS block name */
38611 for (n_code = 0;n_code < gen_nb_int;n_code++) {
38612 for (n_block = 0;n_block < gen_nb_const_char_ptr;n_block++) {
38613 mem_base = xmlMemBlocks();
38614 code = gen_int(n_code, 0);
38615 block = gen_const_char_ptr(n_block, 1);
38617 ret_val = xmlUCSIsBlock(code, (const char *)block);
38618 desret_int(ret_val);
38620 des_int(n_code, code, 0);
38621 des_const_char_ptr(n_block, (const char *)block, 1);
38622 xmlResetLastError();
38623 if (mem_base != xmlMemBlocks()) {
38624 printf("Leak of %d blocks found in xmlUCSIsBlock",
38625 xmlMemBlocks() - mem_base);
38627 printf(" %d", n_code);
38628 printf(" %d", n_block);
38641 test_xmlUCSIsBlockElements(void) {
38644 #if defined(LIBXML_UNICODE_ENABLED)
38647 int code; /* UCS code point */
38650 for (n_code = 0;n_code < gen_nb_int;n_code++) {
38651 mem_base = xmlMemBlocks();
38652 code = gen_int(n_code, 0);
38654 ret_val = xmlUCSIsBlockElements(code);
38655 desret_int(ret_val);
38657 des_int(n_code, code, 0);
38658 xmlResetLastError();
38659 if (mem_base != xmlMemBlocks()) {
38660 printf("Leak of %d blocks found in xmlUCSIsBlockElements",
38661 xmlMemBlocks() - mem_base);
38663 printf(" %d", n_code);
38675 test_xmlUCSIsBopomofo(void) {
38678 #if defined(LIBXML_UNICODE_ENABLED)
38681 int code; /* UCS code point */
38684 for (n_code = 0;n_code < gen_nb_int;n_code++) {
38685 mem_base = xmlMemBlocks();
38686 code = gen_int(n_code, 0);
38688 ret_val = xmlUCSIsBopomofo(code);
38689 desret_int(ret_val);
38691 des_int(n_code, code, 0);
38692 xmlResetLastError();
38693 if (mem_base != xmlMemBlocks()) {
38694 printf("Leak of %d blocks found in xmlUCSIsBopomofo",
38695 xmlMemBlocks() - mem_base);
38697 printf(" %d", n_code);
38709 test_xmlUCSIsBopomofoExtended(void) {
38712 #if defined(LIBXML_UNICODE_ENABLED)
38715 int code; /* UCS code point */
38718 for (n_code = 0;n_code < gen_nb_int;n_code++) {
38719 mem_base = xmlMemBlocks();
38720 code = gen_int(n_code, 0);
38722 ret_val = xmlUCSIsBopomofoExtended(code);
38723 desret_int(ret_val);
38725 des_int(n_code, code, 0);
38726 xmlResetLastError();
38727 if (mem_base != xmlMemBlocks()) {
38728 printf("Leak of %d blocks found in xmlUCSIsBopomofoExtended",
38729 xmlMemBlocks() - mem_base);
38731 printf(" %d", n_code);
38743 test_xmlUCSIsBoxDrawing(void) {
38746 #if defined(LIBXML_UNICODE_ENABLED)
38749 int code; /* UCS code point */
38752 for (n_code = 0;n_code < gen_nb_int;n_code++) {
38753 mem_base = xmlMemBlocks();
38754 code = gen_int(n_code, 0);
38756 ret_val = xmlUCSIsBoxDrawing(code);
38757 desret_int(ret_val);
38759 des_int(n_code, code, 0);
38760 xmlResetLastError();
38761 if (mem_base != xmlMemBlocks()) {
38762 printf("Leak of %d blocks found in xmlUCSIsBoxDrawing",
38763 xmlMemBlocks() - mem_base);
38765 printf(" %d", n_code);
38777 test_xmlUCSIsBraillePatterns(void) {
38780 #if defined(LIBXML_UNICODE_ENABLED)
38783 int code; /* UCS code point */
38786 for (n_code = 0;n_code < gen_nb_int;n_code++) {
38787 mem_base = xmlMemBlocks();
38788 code = gen_int(n_code, 0);
38790 ret_val = xmlUCSIsBraillePatterns(code);
38791 desret_int(ret_val);
38793 des_int(n_code, code, 0);
38794 xmlResetLastError();
38795 if (mem_base != xmlMemBlocks()) {
38796 printf("Leak of %d blocks found in xmlUCSIsBraillePatterns",
38797 xmlMemBlocks() - mem_base);
38799 printf(" %d", n_code);
38811 test_xmlUCSIsBuhid(void) {
38814 #if defined(LIBXML_UNICODE_ENABLED)
38817 int code; /* UCS code point */
38820 for (n_code = 0;n_code < gen_nb_int;n_code++) {
38821 mem_base = xmlMemBlocks();
38822 code = gen_int(n_code, 0);
38824 ret_val = xmlUCSIsBuhid(code);
38825 desret_int(ret_val);
38827 des_int(n_code, code, 0);
38828 xmlResetLastError();
38829 if (mem_base != xmlMemBlocks()) {
38830 printf("Leak of %d blocks found in xmlUCSIsBuhid",
38831 xmlMemBlocks() - mem_base);
38833 printf(" %d", n_code);
38845 test_xmlUCSIsByzantineMusicalSymbols(void) {
38848 #if defined(LIBXML_UNICODE_ENABLED)
38851 int code; /* UCS code point */
38854 for (n_code = 0;n_code < gen_nb_int;n_code++) {
38855 mem_base = xmlMemBlocks();
38856 code = gen_int(n_code, 0);
38858 ret_val = xmlUCSIsByzantineMusicalSymbols(code);
38859 desret_int(ret_val);
38861 des_int(n_code, code, 0);
38862 xmlResetLastError();
38863 if (mem_base != xmlMemBlocks()) {
38864 printf("Leak of %d blocks found in xmlUCSIsByzantineMusicalSymbols",
38865 xmlMemBlocks() - mem_base);
38867 printf(" %d", n_code);
38879 test_xmlUCSIsCJKCompatibility(void) {
38882 #if defined(LIBXML_UNICODE_ENABLED)
38885 int code; /* UCS code point */
38888 for (n_code = 0;n_code < gen_nb_int;n_code++) {
38889 mem_base = xmlMemBlocks();
38890 code = gen_int(n_code, 0);
38892 ret_val = xmlUCSIsCJKCompatibility(code);
38893 desret_int(ret_val);
38895 des_int(n_code, code, 0);
38896 xmlResetLastError();
38897 if (mem_base != xmlMemBlocks()) {
38898 printf("Leak of %d blocks found in xmlUCSIsCJKCompatibility",
38899 xmlMemBlocks() - mem_base);
38901 printf(" %d", n_code);
38913 test_xmlUCSIsCJKCompatibilityForms(void) {
38916 #if defined(LIBXML_UNICODE_ENABLED)
38919 int code; /* UCS code point */
38922 for (n_code = 0;n_code < gen_nb_int;n_code++) {
38923 mem_base = xmlMemBlocks();
38924 code = gen_int(n_code, 0);
38926 ret_val = xmlUCSIsCJKCompatibilityForms(code);
38927 desret_int(ret_val);
38929 des_int(n_code, code, 0);
38930 xmlResetLastError();
38931 if (mem_base != xmlMemBlocks()) {
38932 printf("Leak of %d blocks found in xmlUCSIsCJKCompatibilityForms",
38933 xmlMemBlocks() - mem_base);
38935 printf(" %d", n_code);
38947 test_xmlUCSIsCJKCompatibilityIdeographs(void) {
38950 #if defined(LIBXML_UNICODE_ENABLED)
38953 int code; /* UCS code point */
38956 for (n_code = 0;n_code < gen_nb_int;n_code++) {
38957 mem_base = xmlMemBlocks();
38958 code = gen_int(n_code, 0);
38960 ret_val = xmlUCSIsCJKCompatibilityIdeographs(code);
38961 desret_int(ret_val);
38963 des_int(n_code, code, 0);
38964 xmlResetLastError();
38965 if (mem_base != xmlMemBlocks()) {
38966 printf("Leak of %d blocks found in xmlUCSIsCJKCompatibilityIdeographs",
38967 xmlMemBlocks() - mem_base);
38969 printf(" %d", n_code);
38981 test_xmlUCSIsCJKCompatibilityIdeographsSupplement(void) {
38984 #if defined(LIBXML_UNICODE_ENABLED)
38987 int code; /* UCS code point */
38990 for (n_code = 0;n_code < gen_nb_int;n_code++) {
38991 mem_base = xmlMemBlocks();
38992 code = gen_int(n_code, 0);
38994 ret_val = xmlUCSIsCJKCompatibilityIdeographsSupplement(code);
38995 desret_int(ret_val);
38997 des_int(n_code, code, 0);
38998 xmlResetLastError();
38999 if (mem_base != xmlMemBlocks()) {
39000 printf("Leak of %d blocks found in xmlUCSIsCJKCompatibilityIdeographsSupplement",
39001 xmlMemBlocks() - mem_base);
39003 printf(" %d", n_code);
39015 test_xmlUCSIsCJKRadicalsSupplement(void) {
39018 #if defined(LIBXML_UNICODE_ENABLED)
39021 int code; /* UCS code point */
39024 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39025 mem_base = xmlMemBlocks();
39026 code = gen_int(n_code, 0);
39028 ret_val = xmlUCSIsCJKRadicalsSupplement(code);
39029 desret_int(ret_val);
39031 des_int(n_code, code, 0);
39032 xmlResetLastError();
39033 if (mem_base != xmlMemBlocks()) {
39034 printf("Leak of %d blocks found in xmlUCSIsCJKRadicalsSupplement",
39035 xmlMemBlocks() - mem_base);
39037 printf(" %d", n_code);
39049 test_xmlUCSIsCJKSymbolsandPunctuation(void) {
39052 #if defined(LIBXML_UNICODE_ENABLED)
39055 int code; /* UCS code point */
39058 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39059 mem_base = xmlMemBlocks();
39060 code = gen_int(n_code, 0);
39062 ret_val = xmlUCSIsCJKSymbolsandPunctuation(code);
39063 desret_int(ret_val);
39065 des_int(n_code, code, 0);
39066 xmlResetLastError();
39067 if (mem_base != xmlMemBlocks()) {
39068 printf("Leak of %d blocks found in xmlUCSIsCJKSymbolsandPunctuation",
39069 xmlMemBlocks() - mem_base);
39071 printf(" %d", n_code);
39083 test_xmlUCSIsCJKUnifiedIdeographs(void) {
39086 #if defined(LIBXML_UNICODE_ENABLED)
39089 int code; /* UCS code point */
39092 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39093 mem_base = xmlMemBlocks();
39094 code = gen_int(n_code, 0);
39096 ret_val = xmlUCSIsCJKUnifiedIdeographs(code);
39097 desret_int(ret_val);
39099 des_int(n_code, code, 0);
39100 xmlResetLastError();
39101 if (mem_base != xmlMemBlocks()) {
39102 printf("Leak of %d blocks found in xmlUCSIsCJKUnifiedIdeographs",
39103 xmlMemBlocks() - mem_base);
39105 printf(" %d", n_code);
39117 test_xmlUCSIsCJKUnifiedIdeographsExtensionA(void) {
39120 #if defined(LIBXML_UNICODE_ENABLED)
39123 int code; /* UCS code point */
39126 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39127 mem_base = xmlMemBlocks();
39128 code = gen_int(n_code, 0);
39130 ret_val = xmlUCSIsCJKUnifiedIdeographsExtensionA(code);
39131 desret_int(ret_val);
39133 des_int(n_code, code, 0);
39134 xmlResetLastError();
39135 if (mem_base != xmlMemBlocks()) {
39136 printf("Leak of %d blocks found in xmlUCSIsCJKUnifiedIdeographsExtensionA",
39137 xmlMemBlocks() - mem_base);
39139 printf(" %d", n_code);
39151 test_xmlUCSIsCJKUnifiedIdeographsExtensionB(void) {
39154 #if defined(LIBXML_UNICODE_ENABLED)
39157 int code; /* UCS code point */
39160 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39161 mem_base = xmlMemBlocks();
39162 code = gen_int(n_code, 0);
39164 ret_val = xmlUCSIsCJKUnifiedIdeographsExtensionB(code);
39165 desret_int(ret_val);
39167 des_int(n_code, code, 0);
39168 xmlResetLastError();
39169 if (mem_base != xmlMemBlocks()) {
39170 printf("Leak of %d blocks found in xmlUCSIsCJKUnifiedIdeographsExtensionB",
39171 xmlMemBlocks() - mem_base);
39173 printf(" %d", n_code);
39185 test_xmlUCSIsCat(void) {
39188 #if defined(LIBXML_UNICODE_ENABLED)
39191 int code; /* UCS code point */
39193 char * cat; /* UCS Category name */
39196 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39197 for (n_cat = 0;n_cat < gen_nb_const_char_ptr;n_cat++) {
39198 mem_base = xmlMemBlocks();
39199 code = gen_int(n_code, 0);
39200 cat = gen_const_char_ptr(n_cat, 1);
39202 ret_val = xmlUCSIsCat(code, (const char *)cat);
39203 desret_int(ret_val);
39205 des_int(n_code, code, 0);
39206 des_const_char_ptr(n_cat, (const char *)cat, 1);
39207 xmlResetLastError();
39208 if (mem_base != xmlMemBlocks()) {
39209 printf("Leak of %d blocks found in xmlUCSIsCat",
39210 xmlMemBlocks() - mem_base);
39212 printf(" %d", n_code);
39213 printf(" %d", n_cat);
39226 test_xmlUCSIsCatC(void) {
39229 #if defined(LIBXML_UNICODE_ENABLED)
39232 int code; /* UCS code point */
39235 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39236 mem_base = xmlMemBlocks();
39237 code = gen_int(n_code, 0);
39239 ret_val = xmlUCSIsCatC(code);
39240 desret_int(ret_val);
39242 des_int(n_code, code, 0);
39243 xmlResetLastError();
39244 if (mem_base != xmlMemBlocks()) {
39245 printf("Leak of %d blocks found in xmlUCSIsCatC",
39246 xmlMemBlocks() - mem_base);
39248 printf(" %d", n_code);
39260 test_xmlUCSIsCatCc(void) {
39263 #if defined(LIBXML_UNICODE_ENABLED)
39266 int code; /* UCS code point */
39269 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39270 mem_base = xmlMemBlocks();
39271 code = gen_int(n_code, 0);
39273 ret_val = xmlUCSIsCatCc(code);
39274 desret_int(ret_val);
39276 des_int(n_code, code, 0);
39277 xmlResetLastError();
39278 if (mem_base != xmlMemBlocks()) {
39279 printf("Leak of %d blocks found in xmlUCSIsCatCc",
39280 xmlMemBlocks() - mem_base);
39282 printf(" %d", n_code);
39294 test_xmlUCSIsCatCf(void) {
39297 #if defined(LIBXML_UNICODE_ENABLED)
39300 int code; /* UCS code point */
39303 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39304 mem_base = xmlMemBlocks();
39305 code = gen_int(n_code, 0);
39307 ret_val = xmlUCSIsCatCf(code);
39308 desret_int(ret_val);
39310 des_int(n_code, code, 0);
39311 xmlResetLastError();
39312 if (mem_base != xmlMemBlocks()) {
39313 printf("Leak of %d blocks found in xmlUCSIsCatCf",
39314 xmlMemBlocks() - mem_base);
39316 printf(" %d", n_code);
39328 test_xmlUCSIsCatCo(void) {
39331 #if defined(LIBXML_UNICODE_ENABLED)
39334 int code; /* UCS code point */
39337 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39338 mem_base = xmlMemBlocks();
39339 code = gen_int(n_code, 0);
39341 ret_val = xmlUCSIsCatCo(code);
39342 desret_int(ret_val);
39344 des_int(n_code, code, 0);
39345 xmlResetLastError();
39346 if (mem_base != xmlMemBlocks()) {
39347 printf("Leak of %d blocks found in xmlUCSIsCatCo",
39348 xmlMemBlocks() - mem_base);
39350 printf(" %d", n_code);
39362 test_xmlUCSIsCatCs(void) {
39365 #if defined(LIBXML_UNICODE_ENABLED)
39368 int code; /* UCS code point */
39371 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39372 mem_base = xmlMemBlocks();
39373 code = gen_int(n_code, 0);
39375 ret_val = xmlUCSIsCatCs(code);
39376 desret_int(ret_val);
39378 des_int(n_code, code, 0);
39379 xmlResetLastError();
39380 if (mem_base != xmlMemBlocks()) {
39381 printf("Leak of %d blocks found in xmlUCSIsCatCs",
39382 xmlMemBlocks() - mem_base);
39384 printf(" %d", n_code);
39396 test_xmlUCSIsCatL(void) {
39399 #if defined(LIBXML_UNICODE_ENABLED)
39402 int code; /* UCS code point */
39405 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39406 mem_base = xmlMemBlocks();
39407 code = gen_int(n_code, 0);
39409 ret_val = xmlUCSIsCatL(code);
39410 desret_int(ret_val);
39412 des_int(n_code, code, 0);
39413 xmlResetLastError();
39414 if (mem_base != xmlMemBlocks()) {
39415 printf("Leak of %d blocks found in xmlUCSIsCatL",
39416 xmlMemBlocks() - mem_base);
39418 printf(" %d", n_code);
39430 test_xmlUCSIsCatLl(void) {
39433 #if defined(LIBXML_UNICODE_ENABLED)
39436 int code; /* UCS code point */
39439 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39440 mem_base = xmlMemBlocks();
39441 code = gen_int(n_code, 0);
39443 ret_val = xmlUCSIsCatLl(code);
39444 desret_int(ret_val);
39446 des_int(n_code, code, 0);
39447 xmlResetLastError();
39448 if (mem_base != xmlMemBlocks()) {
39449 printf("Leak of %d blocks found in xmlUCSIsCatLl",
39450 xmlMemBlocks() - mem_base);
39452 printf(" %d", n_code);
39464 test_xmlUCSIsCatLm(void) {
39467 #if defined(LIBXML_UNICODE_ENABLED)
39470 int code; /* UCS code point */
39473 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39474 mem_base = xmlMemBlocks();
39475 code = gen_int(n_code, 0);
39477 ret_val = xmlUCSIsCatLm(code);
39478 desret_int(ret_val);
39480 des_int(n_code, code, 0);
39481 xmlResetLastError();
39482 if (mem_base != xmlMemBlocks()) {
39483 printf("Leak of %d blocks found in xmlUCSIsCatLm",
39484 xmlMemBlocks() - mem_base);
39486 printf(" %d", n_code);
39498 test_xmlUCSIsCatLo(void) {
39501 #if defined(LIBXML_UNICODE_ENABLED)
39504 int code; /* UCS code point */
39507 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39508 mem_base = xmlMemBlocks();
39509 code = gen_int(n_code, 0);
39511 ret_val = xmlUCSIsCatLo(code);
39512 desret_int(ret_val);
39514 des_int(n_code, code, 0);
39515 xmlResetLastError();
39516 if (mem_base != xmlMemBlocks()) {
39517 printf("Leak of %d blocks found in xmlUCSIsCatLo",
39518 xmlMemBlocks() - mem_base);
39520 printf(" %d", n_code);
39532 test_xmlUCSIsCatLt(void) {
39535 #if defined(LIBXML_UNICODE_ENABLED)
39538 int code; /* UCS code point */
39541 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39542 mem_base = xmlMemBlocks();
39543 code = gen_int(n_code, 0);
39545 ret_val = xmlUCSIsCatLt(code);
39546 desret_int(ret_val);
39548 des_int(n_code, code, 0);
39549 xmlResetLastError();
39550 if (mem_base != xmlMemBlocks()) {
39551 printf("Leak of %d blocks found in xmlUCSIsCatLt",
39552 xmlMemBlocks() - mem_base);
39554 printf(" %d", n_code);
39566 test_xmlUCSIsCatLu(void) {
39569 #if defined(LIBXML_UNICODE_ENABLED)
39572 int code; /* UCS code point */
39575 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39576 mem_base = xmlMemBlocks();
39577 code = gen_int(n_code, 0);
39579 ret_val = xmlUCSIsCatLu(code);
39580 desret_int(ret_val);
39582 des_int(n_code, code, 0);
39583 xmlResetLastError();
39584 if (mem_base != xmlMemBlocks()) {
39585 printf("Leak of %d blocks found in xmlUCSIsCatLu",
39586 xmlMemBlocks() - mem_base);
39588 printf(" %d", n_code);
39600 test_xmlUCSIsCatM(void) {
39603 #if defined(LIBXML_UNICODE_ENABLED)
39606 int code; /* UCS code point */
39609 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39610 mem_base = xmlMemBlocks();
39611 code = gen_int(n_code, 0);
39613 ret_val = xmlUCSIsCatM(code);
39614 desret_int(ret_val);
39616 des_int(n_code, code, 0);
39617 xmlResetLastError();
39618 if (mem_base != xmlMemBlocks()) {
39619 printf("Leak of %d blocks found in xmlUCSIsCatM",
39620 xmlMemBlocks() - mem_base);
39622 printf(" %d", n_code);
39634 test_xmlUCSIsCatMc(void) {
39637 #if defined(LIBXML_UNICODE_ENABLED)
39640 int code; /* UCS code point */
39643 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39644 mem_base = xmlMemBlocks();
39645 code = gen_int(n_code, 0);
39647 ret_val = xmlUCSIsCatMc(code);
39648 desret_int(ret_val);
39650 des_int(n_code, code, 0);
39651 xmlResetLastError();
39652 if (mem_base != xmlMemBlocks()) {
39653 printf("Leak of %d blocks found in xmlUCSIsCatMc",
39654 xmlMemBlocks() - mem_base);
39656 printf(" %d", n_code);
39668 test_xmlUCSIsCatMe(void) {
39671 #if defined(LIBXML_UNICODE_ENABLED)
39674 int code; /* UCS code point */
39677 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39678 mem_base = xmlMemBlocks();
39679 code = gen_int(n_code, 0);
39681 ret_val = xmlUCSIsCatMe(code);
39682 desret_int(ret_val);
39684 des_int(n_code, code, 0);
39685 xmlResetLastError();
39686 if (mem_base != xmlMemBlocks()) {
39687 printf("Leak of %d blocks found in xmlUCSIsCatMe",
39688 xmlMemBlocks() - mem_base);
39690 printf(" %d", n_code);
39702 test_xmlUCSIsCatMn(void) {
39705 #if defined(LIBXML_UNICODE_ENABLED)
39708 int code; /* UCS code point */
39711 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39712 mem_base = xmlMemBlocks();
39713 code = gen_int(n_code, 0);
39715 ret_val = xmlUCSIsCatMn(code);
39716 desret_int(ret_val);
39718 des_int(n_code, code, 0);
39719 xmlResetLastError();
39720 if (mem_base != xmlMemBlocks()) {
39721 printf("Leak of %d blocks found in xmlUCSIsCatMn",
39722 xmlMemBlocks() - mem_base);
39724 printf(" %d", n_code);
39736 test_xmlUCSIsCatN(void) {
39739 #if defined(LIBXML_UNICODE_ENABLED)
39742 int code; /* UCS code point */
39745 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39746 mem_base = xmlMemBlocks();
39747 code = gen_int(n_code, 0);
39749 ret_val = xmlUCSIsCatN(code);
39750 desret_int(ret_val);
39752 des_int(n_code, code, 0);
39753 xmlResetLastError();
39754 if (mem_base != xmlMemBlocks()) {
39755 printf("Leak of %d blocks found in xmlUCSIsCatN",
39756 xmlMemBlocks() - mem_base);
39758 printf(" %d", n_code);
39770 test_xmlUCSIsCatNd(void) {
39773 #if defined(LIBXML_UNICODE_ENABLED)
39776 int code; /* UCS code point */
39779 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39780 mem_base = xmlMemBlocks();
39781 code = gen_int(n_code, 0);
39783 ret_val = xmlUCSIsCatNd(code);
39784 desret_int(ret_val);
39786 des_int(n_code, code, 0);
39787 xmlResetLastError();
39788 if (mem_base != xmlMemBlocks()) {
39789 printf("Leak of %d blocks found in xmlUCSIsCatNd",
39790 xmlMemBlocks() - mem_base);
39792 printf(" %d", n_code);
39804 test_xmlUCSIsCatNl(void) {
39807 #if defined(LIBXML_UNICODE_ENABLED)
39810 int code; /* UCS code point */
39813 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39814 mem_base = xmlMemBlocks();
39815 code = gen_int(n_code, 0);
39817 ret_val = xmlUCSIsCatNl(code);
39818 desret_int(ret_val);
39820 des_int(n_code, code, 0);
39821 xmlResetLastError();
39822 if (mem_base != xmlMemBlocks()) {
39823 printf("Leak of %d blocks found in xmlUCSIsCatNl",
39824 xmlMemBlocks() - mem_base);
39826 printf(" %d", n_code);
39838 test_xmlUCSIsCatNo(void) {
39841 #if defined(LIBXML_UNICODE_ENABLED)
39844 int code; /* UCS code point */
39847 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39848 mem_base = xmlMemBlocks();
39849 code = gen_int(n_code, 0);
39851 ret_val = xmlUCSIsCatNo(code);
39852 desret_int(ret_val);
39854 des_int(n_code, code, 0);
39855 xmlResetLastError();
39856 if (mem_base != xmlMemBlocks()) {
39857 printf("Leak of %d blocks found in xmlUCSIsCatNo",
39858 xmlMemBlocks() - mem_base);
39860 printf(" %d", n_code);
39872 test_xmlUCSIsCatP(void) {
39875 #if defined(LIBXML_UNICODE_ENABLED)
39878 int code; /* UCS code point */
39881 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39882 mem_base = xmlMemBlocks();
39883 code = gen_int(n_code, 0);
39885 ret_val = xmlUCSIsCatP(code);
39886 desret_int(ret_val);
39888 des_int(n_code, code, 0);
39889 xmlResetLastError();
39890 if (mem_base != xmlMemBlocks()) {
39891 printf("Leak of %d blocks found in xmlUCSIsCatP",
39892 xmlMemBlocks() - mem_base);
39894 printf(" %d", n_code);
39906 test_xmlUCSIsCatPc(void) {
39909 #if defined(LIBXML_UNICODE_ENABLED)
39912 int code; /* UCS code point */
39915 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39916 mem_base = xmlMemBlocks();
39917 code = gen_int(n_code, 0);
39919 ret_val = xmlUCSIsCatPc(code);
39920 desret_int(ret_val);
39922 des_int(n_code, code, 0);
39923 xmlResetLastError();
39924 if (mem_base != xmlMemBlocks()) {
39925 printf("Leak of %d blocks found in xmlUCSIsCatPc",
39926 xmlMemBlocks() - mem_base);
39928 printf(" %d", n_code);
39940 test_xmlUCSIsCatPd(void) {
39943 #if defined(LIBXML_UNICODE_ENABLED)
39946 int code; /* UCS code point */
39949 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39950 mem_base = xmlMemBlocks();
39951 code = gen_int(n_code, 0);
39953 ret_val = xmlUCSIsCatPd(code);
39954 desret_int(ret_val);
39956 des_int(n_code, code, 0);
39957 xmlResetLastError();
39958 if (mem_base != xmlMemBlocks()) {
39959 printf("Leak of %d blocks found in xmlUCSIsCatPd",
39960 xmlMemBlocks() - mem_base);
39962 printf(" %d", n_code);
39974 test_xmlUCSIsCatPe(void) {
39977 #if defined(LIBXML_UNICODE_ENABLED)
39980 int code; /* UCS code point */
39983 for (n_code = 0;n_code < gen_nb_int;n_code++) {
39984 mem_base = xmlMemBlocks();
39985 code = gen_int(n_code, 0);
39987 ret_val = xmlUCSIsCatPe(code);
39988 desret_int(ret_val);
39990 des_int(n_code, code, 0);
39991 xmlResetLastError();
39992 if (mem_base != xmlMemBlocks()) {
39993 printf("Leak of %d blocks found in xmlUCSIsCatPe",
39994 xmlMemBlocks() - mem_base);
39996 printf(" %d", n_code);
40008 test_xmlUCSIsCatPf(void) {
40011 #if defined(LIBXML_UNICODE_ENABLED)
40014 int code; /* UCS code point */
40017 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40018 mem_base = xmlMemBlocks();
40019 code = gen_int(n_code, 0);
40021 ret_val = xmlUCSIsCatPf(code);
40022 desret_int(ret_val);
40024 des_int(n_code, code, 0);
40025 xmlResetLastError();
40026 if (mem_base != xmlMemBlocks()) {
40027 printf("Leak of %d blocks found in xmlUCSIsCatPf",
40028 xmlMemBlocks() - mem_base);
40030 printf(" %d", n_code);
40042 test_xmlUCSIsCatPi(void) {
40045 #if defined(LIBXML_UNICODE_ENABLED)
40048 int code; /* UCS code point */
40051 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40052 mem_base = xmlMemBlocks();
40053 code = gen_int(n_code, 0);
40055 ret_val = xmlUCSIsCatPi(code);
40056 desret_int(ret_val);
40058 des_int(n_code, code, 0);
40059 xmlResetLastError();
40060 if (mem_base != xmlMemBlocks()) {
40061 printf("Leak of %d blocks found in xmlUCSIsCatPi",
40062 xmlMemBlocks() - mem_base);
40064 printf(" %d", n_code);
40076 test_xmlUCSIsCatPo(void) {
40079 #if defined(LIBXML_UNICODE_ENABLED)
40082 int code; /* UCS code point */
40085 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40086 mem_base = xmlMemBlocks();
40087 code = gen_int(n_code, 0);
40089 ret_val = xmlUCSIsCatPo(code);
40090 desret_int(ret_val);
40092 des_int(n_code, code, 0);
40093 xmlResetLastError();
40094 if (mem_base != xmlMemBlocks()) {
40095 printf("Leak of %d blocks found in xmlUCSIsCatPo",
40096 xmlMemBlocks() - mem_base);
40098 printf(" %d", n_code);
40110 test_xmlUCSIsCatPs(void) {
40113 #if defined(LIBXML_UNICODE_ENABLED)
40116 int code; /* UCS code point */
40119 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40120 mem_base = xmlMemBlocks();
40121 code = gen_int(n_code, 0);
40123 ret_val = xmlUCSIsCatPs(code);
40124 desret_int(ret_val);
40126 des_int(n_code, code, 0);
40127 xmlResetLastError();
40128 if (mem_base != xmlMemBlocks()) {
40129 printf("Leak of %d blocks found in xmlUCSIsCatPs",
40130 xmlMemBlocks() - mem_base);
40132 printf(" %d", n_code);
40144 test_xmlUCSIsCatS(void) {
40147 #if defined(LIBXML_UNICODE_ENABLED)
40150 int code; /* UCS code point */
40153 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40154 mem_base = xmlMemBlocks();
40155 code = gen_int(n_code, 0);
40157 ret_val = xmlUCSIsCatS(code);
40158 desret_int(ret_val);
40160 des_int(n_code, code, 0);
40161 xmlResetLastError();
40162 if (mem_base != xmlMemBlocks()) {
40163 printf("Leak of %d blocks found in xmlUCSIsCatS",
40164 xmlMemBlocks() - mem_base);
40166 printf(" %d", n_code);
40178 test_xmlUCSIsCatSc(void) {
40181 #if defined(LIBXML_UNICODE_ENABLED)
40184 int code; /* UCS code point */
40187 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40188 mem_base = xmlMemBlocks();
40189 code = gen_int(n_code, 0);
40191 ret_val = xmlUCSIsCatSc(code);
40192 desret_int(ret_val);
40194 des_int(n_code, code, 0);
40195 xmlResetLastError();
40196 if (mem_base != xmlMemBlocks()) {
40197 printf("Leak of %d blocks found in xmlUCSIsCatSc",
40198 xmlMemBlocks() - mem_base);
40200 printf(" %d", n_code);
40212 test_xmlUCSIsCatSk(void) {
40215 #if defined(LIBXML_UNICODE_ENABLED)
40218 int code; /* UCS code point */
40221 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40222 mem_base = xmlMemBlocks();
40223 code = gen_int(n_code, 0);
40225 ret_val = xmlUCSIsCatSk(code);
40226 desret_int(ret_val);
40228 des_int(n_code, code, 0);
40229 xmlResetLastError();
40230 if (mem_base != xmlMemBlocks()) {
40231 printf("Leak of %d blocks found in xmlUCSIsCatSk",
40232 xmlMemBlocks() - mem_base);
40234 printf(" %d", n_code);
40246 test_xmlUCSIsCatSm(void) {
40249 #if defined(LIBXML_UNICODE_ENABLED)
40252 int code; /* UCS code point */
40255 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40256 mem_base = xmlMemBlocks();
40257 code = gen_int(n_code, 0);
40259 ret_val = xmlUCSIsCatSm(code);
40260 desret_int(ret_val);
40262 des_int(n_code, code, 0);
40263 xmlResetLastError();
40264 if (mem_base != xmlMemBlocks()) {
40265 printf("Leak of %d blocks found in xmlUCSIsCatSm",
40266 xmlMemBlocks() - mem_base);
40268 printf(" %d", n_code);
40280 test_xmlUCSIsCatSo(void) {
40283 #if defined(LIBXML_UNICODE_ENABLED)
40286 int code; /* UCS code point */
40289 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40290 mem_base = xmlMemBlocks();
40291 code = gen_int(n_code, 0);
40293 ret_val = xmlUCSIsCatSo(code);
40294 desret_int(ret_val);
40296 des_int(n_code, code, 0);
40297 xmlResetLastError();
40298 if (mem_base != xmlMemBlocks()) {
40299 printf("Leak of %d blocks found in xmlUCSIsCatSo",
40300 xmlMemBlocks() - mem_base);
40302 printf(" %d", n_code);
40314 test_xmlUCSIsCatZ(void) {
40317 #if defined(LIBXML_UNICODE_ENABLED)
40320 int code; /* UCS code point */
40323 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40324 mem_base = xmlMemBlocks();
40325 code = gen_int(n_code, 0);
40327 ret_val = xmlUCSIsCatZ(code);
40328 desret_int(ret_val);
40330 des_int(n_code, code, 0);
40331 xmlResetLastError();
40332 if (mem_base != xmlMemBlocks()) {
40333 printf("Leak of %d blocks found in xmlUCSIsCatZ",
40334 xmlMemBlocks() - mem_base);
40336 printf(" %d", n_code);
40348 test_xmlUCSIsCatZl(void) {
40351 #if defined(LIBXML_UNICODE_ENABLED)
40354 int code; /* UCS code point */
40357 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40358 mem_base = xmlMemBlocks();
40359 code = gen_int(n_code, 0);
40361 ret_val = xmlUCSIsCatZl(code);
40362 desret_int(ret_val);
40364 des_int(n_code, code, 0);
40365 xmlResetLastError();
40366 if (mem_base != xmlMemBlocks()) {
40367 printf("Leak of %d blocks found in xmlUCSIsCatZl",
40368 xmlMemBlocks() - mem_base);
40370 printf(" %d", n_code);
40382 test_xmlUCSIsCatZp(void) {
40385 #if defined(LIBXML_UNICODE_ENABLED)
40388 int code; /* UCS code point */
40391 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40392 mem_base = xmlMemBlocks();
40393 code = gen_int(n_code, 0);
40395 ret_val = xmlUCSIsCatZp(code);
40396 desret_int(ret_val);
40398 des_int(n_code, code, 0);
40399 xmlResetLastError();
40400 if (mem_base != xmlMemBlocks()) {
40401 printf("Leak of %d blocks found in xmlUCSIsCatZp",
40402 xmlMemBlocks() - mem_base);
40404 printf(" %d", n_code);
40416 test_xmlUCSIsCatZs(void) {
40419 #if defined(LIBXML_UNICODE_ENABLED)
40422 int code; /* UCS code point */
40425 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40426 mem_base = xmlMemBlocks();
40427 code = gen_int(n_code, 0);
40429 ret_val = xmlUCSIsCatZs(code);
40430 desret_int(ret_val);
40432 des_int(n_code, code, 0);
40433 xmlResetLastError();
40434 if (mem_base != xmlMemBlocks()) {
40435 printf("Leak of %d blocks found in xmlUCSIsCatZs",
40436 xmlMemBlocks() - mem_base);
40438 printf(" %d", n_code);
40450 test_xmlUCSIsCherokee(void) {
40453 #if defined(LIBXML_UNICODE_ENABLED)
40456 int code; /* UCS code point */
40459 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40460 mem_base = xmlMemBlocks();
40461 code = gen_int(n_code, 0);
40463 ret_val = xmlUCSIsCherokee(code);
40464 desret_int(ret_val);
40466 des_int(n_code, code, 0);
40467 xmlResetLastError();
40468 if (mem_base != xmlMemBlocks()) {
40469 printf("Leak of %d blocks found in xmlUCSIsCherokee",
40470 xmlMemBlocks() - mem_base);
40472 printf(" %d", n_code);
40484 test_xmlUCSIsCombiningDiacriticalMarks(void) {
40487 #if defined(LIBXML_UNICODE_ENABLED)
40490 int code; /* UCS code point */
40493 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40494 mem_base = xmlMemBlocks();
40495 code = gen_int(n_code, 0);
40497 ret_val = xmlUCSIsCombiningDiacriticalMarks(code);
40498 desret_int(ret_val);
40500 des_int(n_code, code, 0);
40501 xmlResetLastError();
40502 if (mem_base != xmlMemBlocks()) {
40503 printf("Leak of %d blocks found in xmlUCSIsCombiningDiacriticalMarks",
40504 xmlMemBlocks() - mem_base);
40506 printf(" %d", n_code);
40518 test_xmlUCSIsCombiningDiacriticalMarksforSymbols(void) {
40521 #if defined(LIBXML_UNICODE_ENABLED)
40524 int code; /* UCS code point */
40527 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40528 mem_base = xmlMemBlocks();
40529 code = gen_int(n_code, 0);
40531 ret_val = xmlUCSIsCombiningDiacriticalMarksforSymbols(code);
40532 desret_int(ret_val);
40534 des_int(n_code, code, 0);
40535 xmlResetLastError();
40536 if (mem_base != xmlMemBlocks()) {
40537 printf("Leak of %d blocks found in xmlUCSIsCombiningDiacriticalMarksforSymbols",
40538 xmlMemBlocks() - mem_base);
40540 printf(" %d", n_code);
40552 test_xmlUCSIsCombiningHalfMarks(void) {
40555 #if defined(LIBXML_UNICODE_ENABLED)
40558 int code; /* UCS code point */
40561 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40562 mem_base = xmlMemBlocks();
40563 code = gen_int(n_code, 0);
40565 ret_val = xmlUCSIsCombiningHalfMarks(code);
40566 desret_int(ret_val);
40568 des_int(n_code, code, 0);
40569 xmlResetLastError();
40570 if (mem_base != xmlMemBlocks()) {
40571 printf("Leak of %d blocks found in xmlUCSIsCombiningHalfMarks",
40572 xmlMemBlocks() - mem_base);
40574 printf(" %d", n_code);
40586 test_xmlUCSIsCombiningMarksforSymbols(void) {
40589 #if defined(LIBXML_UNICODE_ENABLED)
40592 int code; /* UCS code point */
40595 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40596 mem_base = xmlMemBlocks();
40597 code = gen_int(n_code, 0);
40599 ret_val = xmlUCSIsCombiningMarksforSymbols(code);
40600 desret_int(ret_val);
40602 des_int(n_code, code, 0);
40603 xmlResetLastError();
40604 if (mem_base != xmlMemBlocks()) {
40605 printf("Leak of %d blocks found in xmlUCSIsCombiningMarksforSymbols",
40606 xmlMemBlocks() - mem_base);
40608 printf(" %d", n_code);
40620 test_xmlUCSIsControlPictures(void) {
40623 #if defined(LIBXML_UNICODE_ENABLED)
40626 int code; /* UCS code point */
40629 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40630 mem_base = xmlMemBlocks();
40631 code = gen_int(n_code, 0);
40633 ret_val = xmlUCSIsControlPictures(code);
40634 desret_int(ret_val);
40636 des_int(n_code, code, 0);
40637 xmlResetLastError();
40638 if (mem_base != xmlMemBlocks()) {
40639 printf("Leak of %d blocks found in xmlUCSIsControlPictures",
40640 xmlMemBlocks() - mem_base);
40642 printf(" %d", n_code);
40654 test_xmlUCSIsCurrencySymbols(void) {
40657 #if defined(LIBXML_UNICODE_ENABLED)
40660 int code; /* UCS code point */
40663 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40664 mem_base = xmlMemBlocks();
40665 code = gen_int(n_code, 0);
40667 ret_val = xmlUCSIsCurrencySymbols(code);
40668 desret_int(ret_val);
40670 des_int(n_code, code, 0);
40671 xmlResetLastError();
40672 if (mem_base != xmlMemBlocks()) {
40673 printf("Leak of %d blocks found in xmlUCSIsCurrencySymbols",
40674 xmlMemBlocks() - mem_base);
40676 printf(" %d", n_code);
40688 test_xmlUCSIsCypriotSyllabary(void) {
40691 #if defined(LIBXML_UNICODE_ENABLED)
40694 int code; /* UCS code point */
40697 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40698 mem_base = xmlMemBlocks();
40699 code = gen_int(n_code, 0);
40701 ret_val = xmlUCSIsCypriotSyllabary(code);
40702 desret_int(ret_val);
40704 des_int(n_code, code, 0);
40705 xmlResetLastError();
40706 if (mem_base != xmlMemBlocks()) {
40707 printf("Leak of %d blocks found in xmlUCSIsCypriotSyllabary",
40708 xmlMemBlocks() - mem_base);
40710 printf(" %d", n_code);
40722 test_xmlUCSIsCyrillic(void) {
40725 #if defined(LIBXML_UNICODE_ENABLED)
40728 int code; /* UCS code point */
40731 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40732 mem_base = xmlMemBlocks();
40733 code = gen_int(n_code, 0);
40735 ret_val = xmlUCSIsCyrillic(code);
40736 desret_int(ret_val);
40738 des_int(n_code, code, 0);
40739 xmlResetLastError();
40740 if (mem_base != xmlMemBlocks()) {
40741 printf("Leak of %d blocks found in xmlUCSIsCyrillic",
40742 xmlMemBlocks() - mem_base);
40744 printf(" %d", n_code);
40756 test_xmlUCSIsCyrillicSupplement(void) {
40759 #if defined(LIBXML_UNICODE_ENABLED)
40762 int code; /* UCS code point */
40765 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40766 mem_base = xmlMemBlocks();
40767 code = gen_int(n_code, 0);
40769 ret_val = xmlUCSIsCyrillicSupplement(code);
40770 desret_int(ret_val);
40772 des_int(n_code, code, 0);
40773 xmlResetLastError();
40774 if (mem_base != xmlMemBlocks()) {
40775 printf("Leak of %d blocks found in xmlUCSIsCyrillicSupplement",
40776 xmlMemBlocks() - mem_base);
40778 printf(" %d", n_code);
40790 test_xmlUCSIsDeseret(void) {
40793 #if defined(LIBXML_UNICODE_ENABLED)
40796 int code; /* UCS code point */
40799 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40800 mem_base = xmlMemBlocks();
40801 code = gen_int(n_code, 0);
40803 ret_val = xmlUCSIsDeseret(code);
40804 desret_int(ret_val);
40806 des_int(n_code, code, 0);
40807 xmlResetLastError();
40808 if (mem_base != xmlMemBlocks()) {
40809 printf("Leak of %d blocks found in xmlUCSIsDeseret",
40810 xmlMemBlocks() - mem_base);
40812 printf(" %d", n_code);
40824 test_xmlUCSIsDevanagari(void) {
40827 #if defined(LIBXML_UNICODE_ENABLED)
40830 int code; /* UCS code point */
40833 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40834 mem_base = xmlMemBlocks();
40835 code = gen_int(n_code, 0);
40837 ret_val = xmlUCSIsDevanagari(code);
40838 desret_int(ret_val);
40840 des_int(n_code, code, 0);
40841 xmlResetLastError();
40842 if (mem_base != xmlMemBlocks()) {
40843 printf("Leak of %d blocks found in xmlUCSIsDevanagari",
40844 xmlMemBlocks() - mem_base);
40846 printf(" %d", n_code);
40858 test_xmlUCSIsDingbats(void) {
40861 #if defined(LIBXML_UNICODE_ENABLED)
40864 int code; /* UCS code point */
40867 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40868 mem_base = xmlMemBlocks();
40869 code = gen_int(n_code, 0);
40871 ret_val = xmlUCSIsDingbats(code);
40872 desret_int(ret_val);
40874 des_int(n_code, code, 0);
40875 xmlResetLastError();
40876 if (mem_base != xmlMemBlocks()) {
40877 printf("Leak of %d blocks found in xmlUCSIsDingbats",
40878 xmlMemBlocks() - mem_base);
40880 printf(" %d", n_code);
40892 test_xmlUCSIsEnclosedAlphanumerics(void) {
40895 #if defined(LIBXML_UNICODE_ENABLED)
40898 int code; /* UCS code point */
40901 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40902 mem_base = xmlMemBlocks();
40903 code = gen_int(n_code, 0);
40905 ret_val = xmlUCSIsEnclosedAlphanumerics(code);
40906 desret_int(ret_val);
40908 des_int(n_code, code, 0);
40909 xmlResetLastError();
40910 if (mem_base != xmlMemBlocks()) {
40911 printf("Leak of %d blocks found in xmlUCSIsEnclosedAlphanumerics",
40912 xmlMemBlocks() - mem_base);
40914 printf(" %d", n_code);
40926 test_xmlUCSIsEnclosedCJKLettersandMonths(void) {
40929 #if defined(LIBXML_UNICODE_ENABLED)
40932 int code; /* UCS code point */
40935 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40936 mem_base = xmlMemBlocks();
40937 code = gen_int(n_code, 0);
40939 ret_val = xmlUCSIsEnclosedCJKLettersandMonths(code);
40940 desret_int(ret_val);
40942 des_int(n_code, code, 0);
40943 xmlResetLastError();
40944 if (mem_base != xmlMemBlocks()) {
40945 printf("Leak of %d blocks found in xmlUCSIsEnclosedCJKLettersandMonths",
40946 xmlMemBlocks() - mem_base);
40948 printf(" %d", n_code);
40960 test_xmlUCSIsEthiopic(void) {
40963 #if defined(LIBXML_UNICODE_ENABLED)
40966 int code; /* UCS code point */
40969 for (n_code = 0;n_code < gen_nb_int;n_code++) {
40970 mem_base = xmlMemBlocks();
40971 code = gen_int(n_code, 0);
40973 ret_val = xmlUCSIsEthiopic(code);
40974 desret_int(ret_val);
40976 des_int(n_code, code, 0);
40977 xmlResetLastError();
40978 if (mem_base != xmlMemBlocks()) {
40979 printf("Leak of %d blocks found in xmlUCSIsEthiopic",
40980 xmlMemBlocks() - mem_base);
40982 printf(" %d", n_code);
40994 test_xmlUCSIsGeneralPunctuation(void) {
40997 #if defined(LIBXML_UNICODE_ENABLED)
41000 int code; /* UCS code point */
41003 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41004 mem_base = xmlMemBlocks();
41005 code = gen_int(n_code, 0);
41007 ret_val = xmlUCSIsGeneralPunctuation(code);
41008 desret_int(ret_val);
41010 des_int(n_code, code, 0);
41011 xmlResetLastError();
41012 if (mem_base != xmlMemBlocks()) {
41013 printf("Leak of %d blocks found in xmlUCSIsGeneralPunctuation",
41014 xmlMemBlocks() - mem_base);
41016 printf(" %d", n_code);
41028 test_xmlUCSIsGeometricShapes(void) {
41031 #if defined(LIBXML_UNICODE_ENABLED)
41034 int code; /* UCS code point */
41037 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41038 mem_base = xmlMemBlocks();
41039 code = gen_int(n_code, 0);
41041 ret_val = xmlUCSIsGeometricShapes(code);
41042 desret_int(ret_val);
41044 des_int(n_code, code, 0);
41045 xmlResetLastError();
41046 if (mem_base != xmlMemBlocks()) {
41047 printf("Leak of %d blocks found in xmlUCSIsGeometricShapes",
41048 xmlMemBlocks() - mem_base);
41050 printf(" %d", n_code);
41062 test_xmlUCSIsGeorgian(void) {
41065 #if defined(LIBXML_UNICODE_ENABLED)
41068 int code; /* UCS code point */
41071 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41072 mem_base = xmlMemBlocks();
41073 code = gen_int(n_code, 0);
41075 ret_val = xmlUCSIsGeorgian(code);
41076 desret_int(ret_val);
41078 des_int(n_code, code, 0);
41079 xmlResetLastError();
41080 if (mem_base != xmlMemBlocks()) {
41081 printf("Leak of %d blocks found in xmlUCSIsGeorgian",
41082 xmlMemBlocks() - mem_base);
41084 printf(" %d", n_code);
41096 test_xmlUCSIsGothic(void) {
41099 #if defined(LIBXML_UNICODE_ENABLED)
41102 int code; /* UCS code point */
41105 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41106 mem_base = xmlMemBlocks();
41107 code = gen_int(n_code, 0);
41109 ret_val = xmlUCSIsGothic(code);
41110 desret_int(ret_val);
41112 des_int(n_code, code, 0);
41113 xmlResetLastError();
41114 if (mem_base != xmlMemBlocks()) {
41115 printf("Leak of %d blocks found in xmlUCSIsGothic",
41116 xmlMemBlocks() - mem_base);
41118 printf(" %d", n_code);
41130 test_xmlUCSIsGreek(void) {
41133 #if defined(LIBXML_UNICODE_ENABLED)
41136 int code; /* UCS code point */
41139 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41140 mem_base = xmlMemBlocks();
41141 code = gen_int(n_code, 0);
41143 ret_val = xmlUCSIsGreek(code);
41144 desret_int(ret_val);
41146 des_int(n_code, code, 0);
41147 xmlResetLastError();
41148 if (mem_base != xmlMemBlocks()) {
41149 printf("Leak of %d blocks found in xmlUCSIsGreek",
41150 xmlMemBlocks() - mem_base);
41152 printf(" %d", n_code);
41164 test_xmlUCSIsGreekExtended(void) {
41167 #if defined(LIBXML_UNICODE_ENABLED)
41170 int code; /* UCS code point */
41173 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41174 mem_base = xmlMemBlocks();
41175 code = gen_int(n_code, 0);
41177 ret_val = xmlUCSIsGreekExtended(code);
41178 desret_int(ret_val);
41180 des_int(n_code, code, 0);
41181 xmlResetLastError();
41182 if (mem_base != xmlMemBlocks()) {
41183 printf("Leak of %d blocks found in xmlUCSIsGreekExtended",
41184 xmlMemBlocks() - mem_base);
41186 printf(" %d", n_code);
41198 test_xmlUCSIsGreekandCoptic(void) {
41201 #if defined(LIBXML_UNICODE_ENABLED)
41204 int code; /* UCS code point */
41207 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41208 mem_base = xmlMemBlocks();
41209 code = gen_int(n_code, 0);
41211 ret_val = xmlUCSIsGreekandCoptic(code);
41212 desret_int(ret_val);
41214 des_int(n_code, code, 0);
41215 xmlResetLastError();
41216 if (mem_base != xmlMemBlocks()) {
41217 printf("Leak of %d blocks found in xmlUCSIsGreekandCoptic",
41218 xmlMemBlocks() - mem_base);
41220 printf(" %d", n_code);
41232 test_xmlUCSIsGujarati(void) {
41235 #if defined(LIBXML_UNICODE_ENABLED)
41238 int code; /* UCS code point */
41241 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41242 mem_base = xmlMemBlocks();
41243 code = gen_int(n_code, 0);
41245 ret_val = xmlUCSIsGujarati(code);
41246 desret_int(ret_val);
41248 des_int(n_code, code, 0);
41249 xmlResetLastError();
41250 if (mem_base != xmlMemBlocks()) {
41251 printf("Leak of %d blocks found in xmlUCSIsGujarati",
41252 xmlMemBlocks() - mem_base);
41254 printf(" %d", n_code);
41266 test_xmlUCSIsGurmukhi(void) {
41269 #if defined(LIBXML_UNICODE_ENABLED)
41272 int code; /* UCS code point */
41275 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41276 mem_base = xmlMemBlocks();
41277 code = gen_int(n_code, 0);
41279 ret_val = xmlUCSIsGurmukhi(code);
41280 desret_int(ret_val);
41282 des_int(n_code, code, 0);
41283 xmlResetLastError();
41284 if (mem_base != xmlMemBlocks()) {
41285 printf("Leak of %d blocks found in xmlUCSIsGurmukhi",
41286 xmlMemBlocks() - mem_base);
41288 printf(" %d", n_code);
41300 test_xmlUCSIsHalfwidthandFullwidthForms(void) {
41303 #if defined(LIBXML_UNICODE_ENABLED)
41306 int code; /* UCS code point */
41309 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41310 mem_base = xmlMemBlocks();
41311 code = gen_int(n_code, 0);
41313 ret_val = xmlUCSIsHalfwidthandFullwidthForms(code);
41314 desret_int(ret_val);
41316 des_int(n_code, code, 0);
41317 xmlResetLastError();
41318 if (mem_base != xmlMemBlocks()) {
41319 printf("Leak of %d blocks found in xmlUCSIsHalfwidthandFullwidthForms",
41320 xmlMemBlocks() - mem_base);
41322 printf(" %d", n_code);
41334 test_xmlUCSIsHangulCompatibilityJamo(void) {
41337 #if defined(LIBXML_UNICODE_ENABLED)
41340 int code; /* UCS code point */
41343 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41344 mem_base = xmlMemBlocks();
41345 code = gen_int(n_code, 0);
41347 ret_val = xmlUCSIsHangulCompatibilityJamo(code);
41348 desret_int(ret_val);
41350 des_int(n_code, code, 0);
41351 xmlResetLastError();
41352 if (mem_base != xmlMemBlocks()) {
41353 printf("Leak of %d blocks found in xmlUCSIsHangulCompatibilityJamo",
41354 xmlMemBlocks() - mem_base);
41356 printf(" %d", n_code);
41368 test_xmlUCSIsHangulJamo(void) {
41371 #if defined(LIBXML_UNICODE_ENABLED)
41374 int code; /* UCS code point */
41377 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41378 mem_base = xmlMemBlocks();
41379 code = gen_int(n_code, 0);
41381 ret_val = xmlUCSIsHangulJamo(code);
41382 desret_int(ret_val);
41384 des_int(n_code, code, 0);
41385 xmlResetLastError();
41386 if (mem_base != xmlMemBlocks()) {
41387 printf("Leak of %d blocks found in xmlUCSIsHangulJamo",
41388 xmlMemBlocks() - mem_base);
41390 printf(" %d", n_code);
41402 test_xmlUCSIsHangulSyllables(void) {
41405 #if defined(LIBXML_UNICODE_ENABLED)
41408 int code; /* UCS code point */
41411 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41412 mem_base = xmlMemBlocks();
41413 code = gen_int(n_code, 0);
41415 ret_val = xmlUCSIsHangulSyllables(code);
41416 desret_int(ret_val);
41418 des_int(n_code, code, 0);
41419 xmlResetLastError();
41420 if (mem_base != xmlMemBlocks()) {
41421 printf("Leak of %d blocks found in xmlUCSIsHangulSyllables",
41422 xmlMemBlocks() - mem_base);
41424 printf(" %d", n_code);
41436 test_xmlUCSIsHanunoo(void) {
41439 #if defined(LIBXML_UNICODE_ENABLED)
41442 int code; /* UCS code point */
41445 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41446 mem_base = xmlMemBlocks();
41447 code = gen_int(n_code, 0);
41449 ret_val = xmlUCSIsHanunoo(code);
41450 desret_int(ret_val);
41452 des_int(n_code, code, 0);
41453 xmlResetLastError();
41454 if (mem_base != xmlMemBlocks()) {
41455 printf("Leak of %d blocks found in xmlUCSIsHanunoo",
41456 xmlMemBlocks() - mem_base);
41458 printf(" %d", n_code);
41470 test_xmlUCSIsHebrew(void) {
41473 #if defined(LIBXML_UNICODE_ENABLED)
41476 int code; /* UCS code point */
41479 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41480 mem_base = xmlMemBlocks();
41481 code = gen_int(n_code, 0);
41483 ret_val = xmlUCSIsHebrew(code);
41484 desret_int(ret_val);
41486 des_int(n_code, code, 0);
41487 xmlResetLastError();
41488 if (mem_base != xmlMemBlocks()) {
41489 printf("Leak of %d blocks found in xmlUCSIsHebrew",
41490 xmlMemBlocks() - mem_base);
41492 printf(" %d", n_code);
41504 test_xmlUCSIsHighPrivateUseSurrogates(void) {
41507 #if defined(LIBXML_UNICODE_ENABLED)
41510 int code; /* UCS code point */
41513 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41514 mem_base = xmlMemBlocks();
41515 code = gen_int(n_code, 0);
41517 ret_val = xmlUCSIsHighPrivateUseSurrogates(code);
41518 desret_int(ret_val);
41520 des_int(n_code, code, 0);
41521 xmlResetLastError();
41522 if (mem_base != xmlMemBlocks()) {
41523 printf("Leak of %d blocks found in xmlUCSIsHighPrivateUseSurrogates",
41524 xmlMemBlocks() - mem_base);
41526 printf(" %d", n_code);
41538 test_xmlUCSIsHighSurrogates(void) {
41541 #if defined(LIBXML_UNICODE_ENABLED)
41544 int code; /* UCS code point */
41547 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41548 mem_base = xmlMemBlocks();
41549 code = gen_int(n_code, 0);
41551 ret_val = xmlUCSIsHighSurrogates(code);
41552 desret_int(ret_val);
41554 des_int(n_code, code, 0);
41555 xmlResetLastError();
41556 if (mem_base != xmlMemBlocks()) {
41557 printf("Leak of %d blocks found in xmlUCSIsHighSurrogates",
41558 xmlMemBlocks() - mem_base);
41560 printf(" %d", n_code);
41572 test_xmlUCSIsHiragana(void) {
41575 #if defined(LIBXML_UNICODE_ENABLED)
41578 int code; /* UCS code point */
41581 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41582 mem_base = xmlMemBlocks();
41583 code = gen_int(n_code, 0);
41585 ret_val = xmlUCSIsHiragana(code);
41586 desret_int(ret_val);
41588 des_int(n_code, code, 0);
41589 xmlResetLastError();
41590 if (mem_base != xmlMemBlocks()) {
41591 printf("Leak of %d blocks found in xmlUCSIsHiragana",
41592 xmlMemBlocks() - mem_base);
41594 printf(" %d", n_code);
41606 test_xmlUCSIsIPAExtensions(void) {
41609 #if defined(LIBXML_UNICODE_ENABLED)
41612 int code; /* UCS code point */
41615 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41616 mem_base = xmlMemBlocks();
41617 code = gen_int(n_code, 0);
41619 ret_val = xmlUCSIsIPAExtensions(code);
41620 desret_int(ret_val);
41622 des_int(n_code, code, 0);
41623 xmlResetLastError();
41624 if (mem_base != xmlMemBlocks()) {
41625 printf("Leak of %d blocks found in xmlUCSIsIPAExtensions",
41626 xmlMemBlocks() - mem_base);
41628 printf(" %d", n_code);
41640 test_xmlUCSIsIdeographicDescriptionCharacters(void) {
41643 #if defined(LIBXML_UNICODE_ENABLED)
41646 int code; /* UCS code point */
41649 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41650 mem_base = xmlMemBlocks();
41651 code = gen_int(n_code, 0);
41653 ret_val = xmlUCSIsIdeographicDescriptionCharacters(code);
41654 desret_int(ret_val);
41656 des_int(n_code, code, 0);
41657 xmlResetLastError();
41658 if (mem_base != xmlMemBlocks()) {
41659 printf("Leak of %d blocks found in xmlUCSIsIdeographicDescriptionCharacters",
41660 xmlMemBlocks() - mem_base);
41662 printf(" %d", n_code);
41674 test_xmlUCSIsKanbun(void) {
41677 #if defined(LIBXML_UNICODE_ENABLED)
41680 int code; /* UCS code point */
41683 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41684 mem_base = xmlMemBlocks();
41685 code = gen_int(n_code, 0);
41687 ret_val = xmlUCSIsKanbun(code);
41688 desret_int(ret_val);
41690 des_int(n_code, code, 0);
41691 xmlResetLastError();
41692 if (mem_base != xmlMemBlocks()) {
41693 printf("Leak of %d blocks found in xmlUCSIsKanbun",
41694 xmlMemBlocks() - mem_base);
41696 printf(" %d", n_code);
41708 test_xmlUCSIsKangxiRadicals(void) {
41711 #if defined(LIBXML_UNICODE_ENABLED)
41714 int code; /* UCS code point */
41717 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41718 mem_base = xmlMemBlocks();
41719 code = gen_int(n_code, 0);
41721 ret_val = xmlUCSIsKangxiRadicals(code);
41722 desret_int(ret_val);
41724 des_int(n_code, code, 0);
41725 xmlResetLastError();
41726 if (mem_base != xmlMemBlocks()) {
41727 printf("Leak of %d blocks found in xmlUCSIsKangxiRadicals",
41728 xmlMemBlocks() - mem_base);
41730 printf(" %d", n_code);
41742 test_xmlUCSIsKannada(void) {
41745 #if defined(LIBXML_UNICODE_ENABLED)
41748 int code; /* UCS code point */
41751 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41752 mem_base = xmlMemBlocks();
41753 code = gen_int(n_code, 0);
41755 ret_val = xmlUCSIsKannada(code);
41756 desret_int(ret_val);
41758 des_int(n_code, code, 0);
41759 xmlResetLastError();
41760 if (mem_base != xmlMemBlocks()) {
41761 printf("Leak of %d blocks found in xmlUCSIsKannada",
41762 xmlMemBlocks() - mem_base);
41764 printf(" %d", n_code);
41776 test_xmlUCSIsKatakana(void) {
41779 #if defined(LIBXML_UNICODE_ENABLED)
41782 int code; /* UCS code point */
41785 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41786 mem_base = xmlMemBlocks();
41787 code = gen_int(n_code, 0);
41789 ret_val = xmlUCSIsKatakana(code);
41790 desret_int(ret_val);
41792 des_int(n_code, code, 0);
41793 xmlResetLastError();
41794 if (mem_base != xmlMemBlocks()) {
41795 printf("Leak of %d blocks found in xmlUCSIsKatakana",
41796 xmlMemBlocks() - mem_base);
41798 printf(" %d", n_code);
41810 test_xmlUCSIsKatakanaPhoneticExtensions(void) {
41813 #if defined(LIBXML_UNICODE_ENABLED)
41816 int code; /* UCS code point */
41819 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41820 mem_base = xmlMemBlocks();
41821 code = gen_int(n_code, 0);
41823 ret_val = xmlUCSIsKatakanaPhoneticExtensions(code);
41824 desret_int(ret_val);
41826 des_int(n_code, code, 0);
41827 xmlResetLastError();
41828 if (mem_base != xmlMemBlocks()) {
41829 printf("Leak of %d blocks found in xmlUCSIsKatakanaPhoneticExtensions",
41830 xmlMemBlocks() - mem_base);
41832 printf(" %d", n_code);
41844 test_xmlUCSIsKhmer(void) {
41847 #if defined(LIBXML_UNICODE_ENABLED)
41850 int code; /* UCS code point */
41853 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41854 mem_base = xmlMemBlocks();
41855 code = gen_int(n_code, 0);
41857 ret_val = xmlUCSIsKhmer(code);
41858 desret_int(ret_val);
41860 des_int(n_code, code, 0);
41861 xmlResetLastError();
41862 if (mem_base != xmlMemBlocks()) {
41863 printf("Leak of %d blocks found in xmlUCSIsKhmer",
41864 xmlMemBlocks() - mem_base);
41866 printf(" %d", n_code);
41878 test_xmlUCSIsKhmerSymbols(void) {
41881 #if defined(LIBXML_UNICODE_ENABLED)
41884 int code; /* UCS code point */
41887 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41888 mem_base = xmlMemBlocks();
41889 code = gen_int(n_code, 0);
41891 ret_val = xmlUCSIsKhmerSymbols(code);
41892 desret_int(ret_val);
41894 des_int(n_code, code, 0);
41895 xmlResetLastError();
41896 if (mem_base != xmlMemBlocks()) {
41897 printf("Leak of %d blocks found in xmlUCSIsKhmerSymbols",
41898 xmlMemBlocks() - mem_base);
41900 printf(" %d", n_code);
41912 test_xmlUCSIsLao(void) {
41915 #if defined(LIBXML_UNICODE_ENABLED)
41918 int code; /* UCS code point */
41921 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41922 mem_base = xmlMemBlocks();
41923 code = gen_int(n_code, 0);
41925 ret_val = xmlUCSIsLao(code);
41926 desret_int(ret_val);
41928 des_int(n_code, code, 0);
41929 xmlResetLastError();
41930 if (mem_base != xmlMemBlocks()) {
41931 printf("Leak of %d blocks found in xmlUCSIsLao",
41932 xmlMemBlocks() - mem_base);
41934 printf(" %d", n_code);
41946 test_xmlUCSIsLatin1Supplement(void) {
41949 #if defined(LIBXML_UNICODE_ENABLED)
41952 int code; /* UCS code point */
41955 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41956 mem_base = xmlMemBlocks();
41957 code = gen_int(n_code, 0);
41959 ret_val = xmlUCSIsLatin1Supplement(code);
41960 desret_int(ret_val);
41962 des_int(n_code, code, 0);
41963 xmlResetLastError();
41964 if (mem_base != xmlMemBlocks()) {
41965 printf("Leak of %d blocks found in xmlUCSIsLatin1Supplement",
41966 xmlMemBlocks() - mem_base);
41968 printf(" %d", n_code);
41980 test_xmlUCSIsLatinExtendedA(void) {
41983 #if defined(LIBXML_UNICODE_ENABLED)
41986 int code; /* UCS code point */
41989 for (n_code = 0;n_code < gen_nb_int;n_code++) {
41990 mem_base = xmlMemBlocks();
41991 code = gen_int(n_code, 0);
41993 ret_val = xmlUCSIsLatinExtendedA(code);
41994 desret_int(ret_val);
41996 des_int(n_code, code, 0);
41997 xmlResetLastError();
41998 if (mem_base != xmlMemBlocks()) {
41999 printf("Leak of %d blocks found in xmlUCSIsLatinExtendedA",
42000 xmlMemBlocks() - mem_base);
42002 printf(" %d", n_code);
42014 test_xmlUCSIsLatinExtendedAdditional(void) {
42017 #if defined(LIBXML_UNICODE_ENABLED)
42020 int code; /* UCS code point */
42023 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42024 mem_base = xmlMemBlocks();
42025 code = gen_int(n_code, 0);
42027 ret_val = xmlUCSIsLatinExtendedAdditional(code);
42028 desret_int(ret_val);
42030 des_int(n_code, code, 0);
42031 xmlResetLastError();
42032 if (mem_base != xmlMemBlocks()) {
42033 printf("Leak of %d blocks found in xmlUCSIsLatinExtendedAdditional",
42034 xmlMemBlocks() - mem_base);
42036 printf(" %d", n_code);
42048 test_xmlUCSIsLatinExtendedB(void) {
42051 #if defined(LIBXML_UNICODE_ENABLED)
42054 int code; /* UCS code point */
42057 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42058 mem_base = xmlMemBlocks();
42059 code = gen_int(n_code, 0);
42061 ret_val = xmlUCSIsLatinExtendedB(code);
42062 desret_int(ret_val);
42064 des_int(n_code, code, 0);
42065 xmlResetLastError();
42066 if (mem_base != xmlMemBlocks()) {
42067 printf("Leak of %d blocks found in xmlUCSIsLatinExtendedB",
42068 xmlMemBlocks() - mem_base);
42070 printf(" %d", n_code);
42082 test_xmlUCSIsLetterlikeSymbols(void) {
42085 #if defined(LIBXML_UNICODE_ENABLED)
42088 int code; /* UCS code point */
42091 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42092 mem_base = xmlMemBlocks();
42093 code = gen_int(n_code, 0);
42095 ret_val = xmlUCSIsLetterlikeSymbols(code);
42096 desret_int(ret_val);
42098 des_int(n_code, code, 0);
42099 xmlResetLastError();
42100 if (mem_base != xmlMemBlocks()) {
42101 printf("Leak of %d blocks found in xmlUCSIsLetterlikeSymbols",
42102 xmlMemBlocks() - mem_base);
42104 printf(" %d", n_code);
42116 test_xmlUCSIsLimbu(void) {
42119 #if defined(LIBXML_UNICODE_ENABLED)
42122 int code; /* UCS code point */
42125 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42126 mem_base = xmlMemBlocks();
42127 code = gen_int(n_code, 0);
42129 ret_val = xmlUCSIsLimbu(code);
42130 desret_int(ret_val);
42132 des_int(n_code, code, 0);
42133 xmlResetLastError();
42134 if (mem_base != xmlMemBlocks()) {
42135 printf("Leak of %d blocks found in xmlUCSIsLimbu",
42136 xmlMemBlocks() - mem_base);
42138 printf(" %d", n_code);
42150 test_xmlUCSIsLinearBIdeograms(void) {
42153 #if defined(LIBXML_UNICODE_ENABLED)
42156 int code; /* UCS code point */
42159 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42160 mem_base = xmlMemBlocks();
42161 code = gen_int(n_code, 0);
42163 ret_val = xmlUCSIsLinearBIdeograms(code);
42164 desret_int(ret_val);
42166 des_int(n_code, code, 0);
42167 xmlResetLastError();
42168 if (mem_base != xmlMemBlocks()) {
42169 printf("Leak of %d blocks found in xmlUCSIsLinearBIdeograms",
42170 xmlMemBlocks() - mem_base);
42172 printf(" %d", n_code);
42184 test_xmlUCSIsLinearBSyllabary(void) {
42187 #if defined(LIBXML_UNICODE_ENABLED)
42190 int code; /* UCS code point */
42193 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42194 mem_base = xmlMemBlocks();
42195 code = gen_int(n_code, 0);
42197 ret_val = xmlUCSIsLinearBSyllabary(code);
42198 desret_int(ret_val);
42200 des_int(n_code, code, 0);
42201 xmlResetLastError();
42202 if (mem_base != xmlMemBlocks()) {
42203 printf("Leak of %d blocks found in xmlUCSIsLinearBSyllabary",
42204 xmlMemBlocks() - mem_base);
42206 printf(" %d", n_code);
42218 test_xmlUCSIsLowSurrogates(void) {
42221 #if defined(LIBXML_UNICODE_ENABLED)
42224 int code; /* UCS code point */
42227 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42228 mem_base = xmlMemBlocks();
42229 code = gen_int(n_code, 0);
42231 ret_val = xmlUCSIsLowSurrogates(code);
42232 desret_int(ret_val);
42234 des_int(n_code, code, 0);
42235 xmlResetLastError();
42236 if (mem_base != xmlMemBlocks()) {
42237 printf("Leak of %d blocks found in xmlUCSIsLowSurrogates",
42238 xmlMemBlocks() - mem_base);
42240 printf(" %d", n_code);
42252 test_xmlUCSIsMalayalam(void) {
42255 #if defined(LIBXML_UNICODE_ENABLED)
42258 int code; /* UCS code point */
42261 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42262 mem_base = xmlMemBlocks();
42263 code = gen_int(n_code, 0);
42265 ret_val = xmlUCSIsMalayalam(code);
42266 desret_int(ret_val);
42268 des_int(n_code, code, 0);
42269 xmlResetLastError();
42270 if (mem_base != xmlMemBlocks()) {
42271 printf("Leak of %d blocks found in xmlUCSIsMalayalam",
42272 xmlMemBlocks() - mem_base);
42274 printf(" %d", n_code);
42286 test_xmlUCSIsMathematicalAlphanumericSymbols(void) {
42289 #if defined(LIBXML_UNICODE_ENABLED)
42292 int code; /* UCS code point */
42295 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42296 mem_base = xmlMemBlocks();
42297 code = gen_int(n_code, 0);
42299 ret_val = xmlUCSIsMathematicalAlphanumericSymbols(code);
42300 desret_int(ret_val);
42302 des_int(n_code, code, 0);
42303 xmlResetLastError();
42304 if (mem_base != xmlMemBlocks()) {
42305 printf("Leak of %d blocks found in xmlUCSIsMathematicalAlphanumericSymbols",
42306 xmlMemBlocks() - mem_base);
42308 printf(" %d", n_code);
42320 test_xmlUCSIsMathematicalOperators(void) {
42323 #if defined(LIBXML_UNICODE_ENABLED)
42326 int code; /* UCS code point */
42329 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42330 mem_base = xmlMemBlocks();
42331 code = gen_int(n_code, 0);
42333 ret_val = xmlUCSIsMathematicalOperators(code);
42334 desret_int(ret_val);
42336 des_int(n_code, code, 0);
42337 xmlResetLastError();
42338 if (mem_base != xmlMemBlocks()) {
42339 printf("Leak of %d blocks found in xmlUCSIsMathematicalOperators",
42340 xmlMemBlocks() - mem_base);
42342 printf(" %d", n_code);
42354 test_xmlUCSIsMiscellaneousMathematicalSymbolsA(void) {
42357 #if defined(LIBXML_UNICODE_ENABLED)
42360 int code; /* UCS code point */
42363 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42364 mem_base = xmlMemBlocks();
42365 code = gen_int(n_code, 0);
42367 ret_val = xmlUCSIsMiscellaneousMathematicalSymbolsA(code);
42368 desret_int(ret_val);
42370 des_int(n_code, code, 0);
42371 xmlResetLastError();
42372 if (mem_base != xmlMemBlocks()) {
42373 printf("Leak of %d blocks found in xmlUCSIsMiscellaneousMathematicalSymbolsA",
42374 xmlMemBlocks() - mem_base);
42376 printf(" %d", n_code);
42388 test_xmlUCSIsMiscellaneousMathematicalSymbolsB(void) {
42391 #if defined(LIBXML_UNICODE_ENABLED)
42394 int code; /* UCS code point */
42397 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42398 mem_base = xmlMemBlocks();
42399 code = gen_int(n_code, 0);
42401 ret_val = xmlUCSIsMiscellaneousMathematicalSymbolsB(code);
42402 desret_int(ret_val);
42404 des_int(n_code, code, 0);
42405 xmlResetLastError();
42406 if (mem_base != xmlMemBlocks()) {
42407 printf("Leak of %d blocks found in xmlUCSIsMiscellaneousMathematicalSymbolsB",
42408 xmlMemBlocks() - mem_base);
42410 printf(" %d", n_code);
42422 test_xmlUCSIsMiscellaneousSymbols(void) {
42425 #if defined(LIBXML_UNICODE_ENABLED)
42428 int code; /* UCS code point */
42431 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42432 mem_base = xmlMemBlocks();
42433 code = gen_int(n_code, 0);
42435 ret_val = xmlUCSIsMiscellaneousSymbols(code);
42436 desret_int(ret_val);
42438 des_int(n_code, code, 0);
42439 xmlResetLastError();
42440 if (mem_base != xmlMemBlocks()) {
42441 printf("Leak of %d blocks found in xmlUCSIsMiscellaneousSymbols",
42442 xmlMemBlocks() - mem_base);
42444 printf(" %d", n_code);
42456 test_xmlUCSIsMiscellaneousSymbolsandArrows(void) {
42459 #if defined(LIBXML_UNICODE_ENABLED)
42462 int code; /* UCS code point */
42465 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42466 mem_base = xmlMemBlocks();
42467 code = gen_int(n_code, 0);
42469 ret_val = xmlUCSIsMiscellaneousSymbolsandArrows(code);
42470 desret_int(ret_val);
42472 des_int(n_code, code, 0);
42473 xmlResetLastError();
42474 if (mem_base != xmlMemBlocks()) {
42475 printf("Leak of %d blocks found in xmlUCSIsMiscellaneousSymbolsandArrows",
42476 xmlMemBlocks() - mem_base);
42478 printf(" %d", n_code);
42490 test_xmlUCSIsMiscellaneousTechnical(void) {
42493 #if defined(LIBXML_UNICODE_ENABLED)
42496 int code; /* UCS code point */
42499 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42500 mem_base = xmlMemBlocks();
42501 code = gen_int(n_code, 0);
42503 ret_val = xmlUCSIsMiscellaneousTechnical(code);
42504 desret_int(ret_val);
42506 des_int(n_code, code, 0);
42507 xmlResetLastError();
42508 if (mem_base != xmlMemBlocks()) {
42509 printf("Leak of %d blocks found in xmlUCSIsMiscellaneousTechnical",
42510 xmlMemBlocks() - mem_base);
42512 printf(" %d", n_code);
42524 test_xmlUCSIsMongolian(void) {
42527 #if defined(LIBXML_UNICODE_ENABLED)
42530 int code; /* UCS code point */
42533 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42534 mem_base = xmlMemBlocks();
42535 code = gen_int(n_code, 0);
42537 ret_val = xmlUCSIsMongolian(code);
42538 desret_int(ret_val);
42540 des_int(n_code, code, 0);
42541 xmlResetLastError();
42542 if (mem_base != xmlMemBlocks()) {
42543 printf("Leak of %d blocks found in xmlUCSIsMongolian",
42544 xmlMemBlocks() - mem_base);
42546 printf(" %d", n_code);
42558 test_xmlUCSIsMusicalSymbols(void) {
42561 #if defined(LIBXML_UNICODE_ENABLED)
42564 int code; /* UCS code point */
42567 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42568 mem_base = xmlMemBlocks();
42569 code = gen_int(n_code, 0);
42571 ret_val = xmlUCSIsMusicalSymbols(code);
42572 desret_int(ret_val);
42574 des_int(n_code, code, 0);
42575 xmlResetLastError();
42576 if (mem_base != xmlMemBlocks()) {
42577 printf("Leak of %d blocks found in xmlUCSIsMusicalSymbols",
42578 xmlMemBlocks() - mem_base);
42580 printf(" %d", n_code);
42592 test_xmlUCSIsMyanmar(void) {
42595 #if defined(LIBXML_UNICODE_ENABLED)
42598 int code; /* UCS code point */
42601 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42602 mem_base = xmlMemBlocks();
42603 code = gen_int(n_code, 0);
42605 ret_val = xmlUCSIsMyanmar(code);
42606 desret_int(ret_val);
42608 des_int(n_code, code, 0);
42609 xmlResetLastError();
42610 if (mem_base != xmlMemBlocks()) {
42611 printf("Leak of %d blocks found in xmlUCSIsMyanmar",
42612 xmlMemBlocks() - mem_base);
42614 printf(" %d", n_code);
42626 test_xmlUCSIsNumberForms(void) {
42629 #if defined(LIBXML_UNICODE_ENABLED)
42632 int code; /* UCS code point */
42635 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42636 mem_base = xmlMemBlocks();
42637 code = gen_int(n_code, 0);
42639 ret_val = xmlUCSIsNumberForms(code);
42640 desret_int(ret_val);
42642 des_int(n_code, code, 0);
42643 xmlResetLastError();
42644 if (mem_base != xmlMemBlocks()) {
42645 printf("Leak of %d blocks found in xmlUCSIsNumberForms",
42646 xmlMemBlocks() - mem_base);
42648 printf(" %d", n_code);
42660 test_xmlUCSIsOgham(void) {
42663 #if defined(LIBXML_UNICODE_ENABLED)
42666 int code; /* UCS code point */
42669 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42670 mem_base = xmlMemBlocks();
42671 code = gen_int(n_code, 0);
42673 ret_val = xmlUCSIsOgham(code);
42674 desret_int(ret_val);
42676 des_int(n_code, code, 0);
42677 xmlResetLastError();
42678 if (mem_base != xmlMemBlocks()) {
42679 printf("Leak of %d blocks found in xmlUCSIsOgham",
42680 xmlMemBlocks() - mem_base);
42682 printf(" %d", n_code);
42694 test_xmlUCSIsOldItalic(void) {
42697 #if defined(LIBXML_UNICODE_ENABLED)
42700 int code; /* UCS code point */
42703 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42704 mem_base = xmlMemBlocks();
42705 code = gen_int(n_code, 0);
42707 ret_val = xmlUCSIsOldItalic(code);
42708 desret_int(ret_val);
42710 des_int(n_code, code, 0);
42711 xmlResetLastError();
42712 if (mem_base != xmlMemBlocks()) {
42713 printf("Leak of %d blocks found in xmlUCSIsOldItalic",
42714 xmlMemBlocks() - mem_base);
42716 printf(" %d", n_code);
42728 test_xmlUCSIsOpticalCharacterRecognition(void) {
42731 #if defined(LIBXML_UNICODE_ENABLED)
42734 int code; /* UCS code point */
42737 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42738 mem_base = xmlMemBlocks();
42739 code = gen_int(n_code, 0);
42741 ret_val = xmlUCSIsOpticalCharacterRecognition(code);
42742 desret_int(ret_val);
42744 des_int(n_code, code, 0);
42745 xmlResetLastError();
42746 if (mem_base != xmlMemBlocks()) {
42747 printf("Leak of %d blocks found in xmlUCSIsOpticalCharacterRecognition",
42748 xmlMemBlocks() - mem_base);
42750 printf(" %d", n_code);
42762 test_xmlUCSIsOriya(void) {
42765 #if defined(LIBXML_UNICODE_ENABLED)
42768 int code; /* UCS code point */
42771 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42772 mem_base = xmlMemBlocks();
42773 code = gen_int(n_code, 0);
42775 ret_val = xmlUCSIsOriya(code);
42776 desret_int(ret_val);
42778 des_int(n_code, code, 0);
42779 xmlResetLastError();
42780 if (mem_base != xmlMemBlocks()) {
42781 printf("Leak of %d blocks found in xmlUCSIsOriya",
42782 xmlMemBlocks() - mem_base);
42784 printf(" %d", n_code);
42796 test_xmlUCSIsOsmanya(void) {
42799 #if defined(LIBXML_UNICODE_ENABLED)
42802 int code; /* UCS code point */
42805 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42806 mem_base = xmlMemBlocks();
42807 code = gen_int(n_code, 0);
42809 ret_val = xmlUCSIsOsmanya(code);
42810 desret_int(ret_val);
42812 des_int(n_code, code, 0);
42813 xmlResetLastError();
42814 if (mem_base != xmlMemBlocks()) {
42815 printf("Leak of %d blocks found in xmlUCSIsOsmanya",
42816 xmlMemBlocks() - mem_base);
42818 printf(" %d", n_code);
42830 test_xmlUCSIsPhoneticExtensions(void) {
42833 #if defined(LIBXML_UNICODE_ENABLED)
42836 int code; /* UCS code point */
42839 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42840 mem_base = xmlMemBlocks();
42841 code = gen_int(n_code, 0);
42843 ret_val = xmlUCSIsPhoneticExtensions(code);
42844 desret_int(ret_val);
42846 des_int(n_code, code, 0);
42847 xmlResetLastError();
42848 if (mem_base != xmlMemBlocks()) {
42849 printf("Leak of %d blocks found in xmlUCSIsPhoneticExtensions",
42850 xmlMemBlocks() - mem_base);
42852 printf(" %d", n_code);
42864 test_xmlUCSIsPrivateUse(void) {
42867 #if defined(LIBXML_UNICODE_ENABLED)
42870 int code; /* UCS code point */
42873 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42874 mem_base = xmlMemBlocks();
42875 code = gen_int(n_code, 0);
42877 ret_val = xmlUCSIsPrivateUse(code);
42878 desret_int(ret_val);
42880 des_int(n_code, code, 0);
42881 xmlResetLastError();
42882 if (mem_base != xmlMemBlocks()) {
42883 printf("Leak of %d blocks found in xmlUCSIsPrivateUse",
42884 xmlMemBlocks() - mem_base);
42886 printf(" %d", n_code);
42898 test_xmlUCSIsPrivateUseArea(void) {
42901 #if defined(LIBXML_UNICODE_ENABLED)
42904 int code; /* UCS code point */
42907 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42908 mem_base = xmlMemBlocks();
42909 code = gen_int(n_code, 0);
42911 ret_val = xmlUCSIsPrivateUseArea(code);
42912 desret_int(ret_val);
42914 des_int(n_code, code, 0);
42915 xmlResetLastError();
42916 if (mem_base != xmlMemBlocks()) {
42917 printf("Leak of %d blocks found in xmlUCSIsPrivateUseArea",
42918 xmlMemBlocks() - mem_base);
42920 printf(" %d", n_code);
42932 test_xmlUCSIsRunic(void) {
42935 #if defined(LIBXML_UNICODE_ENABLED)
42938 int code; /* UCS code point */
42941 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42942 mem_base = xmlMemBlocks();
42943 code = gen_int(n_code, 0);
42945 ret_val = xmlUCSIsRunic(code);
42946 desret_int(ret_val);
42948 des_int(n_code, code, 0);
42949 xmlResetLastError();
42950 if (mem_base != xmlMemBlocks()) {
42951 printf("Leak of %d blocks found in xmlUCSIsRunic",
42952 xmlMemBlocks() - mem_base);
42954 printf(" %d", n_code);
42966 test_xmlUCSIsShavian(void) {
42969 #if defined(LIBXML_UNICODE_ENABLED)
42972 int code; /* UCS code point */
42975 for (n_code = 0;n_code < gen_nb_int;n_code++) {
42976 mem_base = xmlMemBlocks();
42977 code = gen_int(n_code, 0);
42979 ret_val = xmlUCSIsShavian(code);
42980 desret_int(ret_val);
42982 des_int(n_code, code, 0);
42983 xmlResetLastError();
42984 if (mem_base != xmlMemBlocks()) {
42985 printf("Leak of %d blocks found in xmlUCSIsShavian",
42986 xmlMemBlocks() - mem_base);
42988 printf(" %d", n_code);
43000 test_xmlUCSIsSinhala(void) {
43003 #if defined(LIBXML_UNICODE_ENABLED)
43006 int code; /* UCS code point */
43009 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43010 mem_base = xmlMemBlocks();
43011 code = gen_int(n_code, 0);
43013 ret_val = xmlUCSIsSinhala(code);
43014 desret_int(ret_val);
43016 des_int(n_code, code, 0);
43017 xmlResetLastError();
43018 if (mem_base != xmlMemBlocks()) {
43019 printf("Leak of %d blocks found in xmlUCSIsSinhala",
43020 xmlMemBlocks() - mem_base);
43022 printf(" %d", n_code);
43034 test_xmlUCSIsSmallFormVariants(void) {
43037 #if defined(LIBXML_UNICODE_ENABLED)
43040 int code; /* UCS code point */
43043 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43044 mem_base = xmlMemBlocks();
43045 code = gen_int(n_code, 0);
43047 ret_val = xmlUCSIsSmallFormVariants(code);
43048 desret_int(ret_val);
43050 des_int(n_code, code, 0);
43051 xmlResetLastError();
43052 if (mem_base != xmlMemBlocks()) {
43053 printf("Leak of %d blocks found in xmlUCSIsSmallFormVariants",
43054 xmlMemBlocks() - mem_base);
43056 printf(" %d", n_code);
43068 test_xmlUCSIsSpacingModifierLetters(void) {
43071 #if defined(LIBXML_UNICODE_ENABLED)
43074 int code; /* UCS code point */
43077 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43078 mem_base = xmlMemBlocks();
43079 code = gen_int(n_code, 0);
43081 ret_val = xmlUCSIsSpacingModifierLetters(code);
43082 desret_int(ret_val);
43084 des_int(n_code, code, 0);
43085 xmlResetLastError();
43086 if (mem_base != xmlMemBlocks()) {
43087 printf("Leak of %d blocks found in xmlUCSIsSpacingModifierLetters",
43088 xmlMemBlocks() - mem_base);
43090 printf(" %d", n_code);
43102 test_xmlUCSIsSpecials(void) {
43105 #if defined(LIBXML_UNICODE_ENABLED)
43108 int code; /* UCS code point */
43111 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43112 mem_base = xmlMemBlocks();
43113 code = gen_int(n_code, 0);
43115 ret_val = xmlUCSIsSpecials(code);
43116 desret_int(ret_val);
43118 des_int(n_code, code, 0);
43119 xmlResetLastError();
43120 if (mem_base != xmlMemBlocks()) {
43121 printf("Leak of %d blocks found in xmlUCSIsSpecials",
43122 xmlMemBlocks() - mem_base);
43124 printf(" %d", n_code);
43136 test_xmlUCSIsSuperscriptsandSubscripts(void) {
43139 #if defined(LIBXML_UNICODE_ENABLED)
43142 int code; /* UCS code point */
43145 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43146 mem_base = xmlMemBlocks();
43147 code = gen_int(n_code, 0);
43149 ret_val = xmlUCSIsSuperscriptsandSubscripts(code);
43150 desret_int(ret_val);
43152 des_int(n_code, code, 0);
43153 xmlResetLastError();
43154 if (mem_base != xmlMemBlocks()) {
43155 printf("Leak of %d blocks found in xmlUCSIsSuperscriptsandSubscripts",
43156 xmlMemBlocks() - mem_base);
43158 printf(" %d", n_code);
43170 test_xmlUCSIsSupplementalArrowsA(void) {
43173 #if defined(LIBXML_UNICODE_ENABLED)
43176 int code; /* UCS code point */
43179 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43180 mem_base = xmlMemBlocks();
43181 code = gen_int(n_code, 0);
43183 ret_val = xmlUCSIsSupplementalArrowsA(code);
43184 desret_int(ret_val);
43186 des_int(n_code, code, 0);
43187 xmlResetLastError();
43188 if (mem_base != xmlMemBlocks()) {
43189 printf("Leak of %d blocks found in xmlUCSIsSupplementalArrowsA",
43190 xmlMemBlocks() - mem_base);
43192 printf(" %d", n_code);
43204 test_xmlUCSIsSupplementalArrowsB(void) {
43207 #if defined(LIBXML_UNICODE_ENABLED)
43210 int code; /* UCS code point */
43213 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43214 mem_base = xmlMemBlocks();
43215 code = gen_int(n_code, 0);
43217 ret_val = xmlUCSIsSupplementalArrowsB(code);
43218 desret_int(ret_val);
43220 des_int(n_code, code, 0);
43221 xmlResetLastError();
43222 if (mem_base != xmlMemBlocks()) {
43223 printf("Leak of %d blocks found in xmlUCSIsSupplementalArrowsB",
43224 xmlMemBlocks() - mem_base);
43226 printf(" %d", n_code);
43238 test_xmlUCSIsSupplementalMathematicalOperators(void) {
43241 #if defined(LIBXML_UNICODE_ENABLED)
43244 int code; /* UCS code point */
43247 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43248 mem_base = xmlMemBlocks();
43249 code = gen_int(n_code, 0);
43251 ret_val = xmlUCSIsSupplementalMathematicalOperators(code);
43252 desret_int(ret_val);
43254 des_int(n_code, code, 0);
43255 xmlResetLastError();
43256 if (mem_base != xmlMemBlocks()) {
43257 printf("Leak of %d blocks found in xmlUCSIsSupplementalMathematicalOperators",
43258 xmlMemBlocks() - mem_base);
43260 printf(" %d", n_code);
43272 test_xmlUCSIsSupplementaryPrivateUseAreaA(void) {
43275 #if defined(LIBXML_UNICODE_ENABLED)
43278 int code; /* UCS code point */
43281 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43282 mem_base = xmlMemBlocks();
43283 code = gen_int(n_code, 0);
43285 ret_val = xmlUCSIsSupplementaryPrivateUseAreaA(code);
43286 desret_int(ret_val);
43288 des_int(n_code, code, 0);
43289 xmlResetLastError();
43290 if (mem_base != xmlMemBlocks()) {
43291 printf("Leak of %d blocks found in xmlUCSIsSupplementaryPrivateUseAreaA",
43292 xmlMemBlocks() - mem_base);
43294 printf(" %d", n_code);
43306 test_xmlUCSIsSupplementaryPrivateUseAreaB(void) {
43309 #if defined(LIBXML_UNICODE_ENABLED)
43312 int code; /* UCS code point */
43315 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43316 mem_base = xmlMemBlocks();
43317 code = gen_int(n_code, 0);
43319 ret_val = xmlUCSIsSupplementaryPrivateUseAreaB(code);
43320 desret_int(ret_val);
43322 des_int(n_code, code, 0);
43323 xmlResetLastError();
43324 if (mem_base != xmlMemBlocks()) {
43325 printf("Leak of %d blocks found in xmlUCSIsSupplementaryPrivateUseAreaB",
43326 xmlMemBlocks() - mem_base);
43328 printf(" %d", n_code);
43340 test_xmlUCSIsSyriac(void) {
43343 #if defined(LIBXML_UNICODE_ENABLED)
43346 int code; /* UCS code point */
43349 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43350 mem_base = xmlMemBlocks();
43351 code = gen_int(n_code, 0);
43353 ret_val = xmlUCSIsSyriac(code);
43354 desret_int(ret_val);
43356 des_int(n_code, code, 0);
43357 xmlResetLastError();
43358 if (mem_base != xmlMemBlocks()) {
43359 printf("Leak of %d blocks found in xmlUCSIsSyriac",
43360 xmlMemBlocks() - mem_base);
43362 printf(" %d", n_code);
43374 test_xmlUCSIsTagalog(void) {
43377 #if defined(LIBXML_UNICODE_ENABLED)
43380 int code; /* UCS code point */
43383 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43384 mem_base = xmlMemBlocks();
43385 code = gen_int(n_code, 0);
43387 ret_val = xmlUCSIsTagalog(code);
43388 desret_int(ret_val);
43390 des_int(n_code, code, 0);
43391 xmlResetLastError();
43392 if (mem_base != xmlMemBlocks()) {
43393 printf("Leak of %d blocks found in xmlUCSIsTagalog",
43394 xmlMemBlocks() - mem_base);
43396 printf(" %d", n_code);
43408 test_xmlUCSIsTagbanwa(void) {
43411 #if defined(LIBXML_UNICODE_ENABLED)
43414 int code; /* UCS code point */
43417 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43418 mem_base = xmlMemBlocks();
43419 code = gen_int(n_code, 0);
43421 ret_val = xmlUCSIsTagbanwa(code);
43422 desret_int(ret_val);
43424 des_int(n_code, code, 0);
43425 xmlResetLastError();
43426 if (mem_base != xmlMemBlocks()) {
43427 printf("Leak of %d blocks found in xmlUCSIsTagbanwa",
43428 xmlMemBlocks() - mem_base);
43430 printf(" %d", n_code);
43442 test_xmlUCSIsTags(void) {
43445 #if defined(LIBXML_UNICODE_ENABLED)
43448 int code; /* UCS code point */
43451 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43452 mem_base = xmlMemBlocks();
43453 code = gen_int(n_code, 0);
43455 ret_val = xmlUCSIsTags(code);
43456 desret_int(ret_val);
43458 des_int(n_code, code, 0);
43459 xmlResetLastError();
43460 if (mem_base != xmlMemBlocks()) {
43461 printf("Leak of %d blocks found in xmlUCSIsTags",
43462 xmlMemBlocks() - mem_base);
43464 printf(" %d", n_code);
43476 test_xmlUCSIsTaiLe(void) {
43479 #if defined(LIBXML_UNICODE_ENABLED)
43482 int code; /* UCS code point */
43485 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43486 mem_base = xmlMemBlocks();
43487 code = gen_int(n_code, 0);
43489 ret_val = xmlUCSIsTaiLe(code);
43490 desret_int(ret_val);
43492 des_int(n_code, code, 0);
43493 xmlResetLastError();
43494 if (mem_base != xmlMemBlocks()) {
43495 printf("Leak of %d blocks found in xmlUCSIsTaiLe",
43496 xmlMemBlocks() - mem_base);
43498 printf(" %d", n_code);
43510 test_xmlUCSIsTaiXuanJingSymbols(void) {
43513 #if defined(LIBXML_UNICODE_ENABLED)
43516 int code; /* UCS code point */
43519 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43520 mem_base = xmlMemBlocks();
43521 code = gen_int(n_code, 0);
43523 ret_val = xmlUCSIsTaiXuanJingSymbols(code);
43524 desret_int(ret_val);
43526 des_int(n_code, code, 0);
43527 xmlResetLastError();
43528 if (mem_base != xmlMemBlocks()) {
43529 printf("Leak of %d blocks found in xmlUCSIsTaiXuanJingSymbols",
43530 xmlMemBlocks() - mem_base);
43532 printf(" %d", n_code);
43544 test_xmlUCSIsTamil(void) {
43547 #if defined(LIBXML_UNICODE_ENABLED)
43550 int code; /* UCS code point */
43553 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43554 mem_base = xmlMemBlocks();
43555 code = gen_int(n_code, 0);
43557 ret_val = xmlUCSIsTamil(code);
43558 desret_int(ret_val);
43560 des_int(n_code, code, 0);
43561 xmlResetLastError();
43562 if (mem_base != xmlMemBlocks()) {
43563 printf("Leak of %d blocks found in xmlUCSIsTamil",
43564 xmlMemBlocks() - mem_base);
43566 printf(" %d", n_code);
43578 test_xmlUCSIsTelugu(void) {
43581 #if defined(LIBXML_UNICODE_ENABLED)
43584 int code; /* UCS code point */
43587 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43588 mem_base = xmlMemBlocks();
43589 code = gen_int(n_code, 0);
43591 ret_val = xmlUCSIsTelugu(code);
43592 desret_int(ret_val);
43594 des_int(n_code, code, 0);
43595 xmlResetLastError();
43596 if (mem_base != xmlMemBlocks()) {
43597 printf("Leak of %d blocks found in xmlUCSIsTelugu",
43598 xmlMemBlocks() - mem_base);
43600 printf(" %d", n_code);
43612 test_xmlUCSIsThaana(void) {
43615 #if defined(LIBXML_UNICODE_ENABLED)
43618 int code; /* UCS code point */
43621 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43622 mem_base = xmlMemBlocks();
43623 code = gen_int(n_code, 0);
43625 ret_val = xmlUCSIsThaana(code);
43626 desret_int(ret_val);
43628 des_int(n_code, code, 0);
43629 xmlResetLastError();
43630 if (mem_base != xmlMemBlocks()) {
43631 printf("Leak of %d blocks found in xmlUCSIsThaana",
43632 xmlMemBlocks() - mem_base);
43634 printf(" %d", n_code);
43646 test_xmlUCSIsThai(void) {
43649 #if defined(LIBXML_UNICODE_ENABLED)
43652 int code; /* UCS code point */
43655 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43656 mem_base = xmlMemBlocks();
43657 code = gen_int(n_code, 0);
43659 ret_val = xmlUCSIsThai(code);
43660 desret_int(ret_val);
43662 des_int(n_code, code, 0);
43663 xmlResetLastError();
43664 if (mem_base != xmlMemBlocks()) {
43665 printf("Leak of %d blocks found in xmlUCSIsThai",
43666 xmlMemBlocks() - mem_base);
43668 printf(" %d", n_code);
43680 test_xmlUCSIsTibetan(void) {
43683 #if defined(LIBXML_UNICODE_ENABLED)
43686 int code; /* UCS code point */
43689 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43690 mem_base = xmlMemBlocks();
43691 code = gen_int(n_code, 0);
43693 ret_val = xmlUCSIsTibetan(code);
43694 desret_int(ret_val);
43696 des_int(n_code, code, 0);
43697 xmlResetLastError();
43698 if (mem_base != xmlMemBlocks()) {
43699 printf("Leak of %d blocks found in xmlUCSIsTibetan",
43700 xmlMemBlocks() - mem_base);
43702 printf(" %d", n_code);
43714 test_xmlUCSIsUgaritic(void) {
43717 #if defined(LIBXML_UNICODE_ENABLED)
43720 int code; /* UCS code point */
43723 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43724 mem_base = xmlMemBlocks();
43725 code = gen_int(n_code, 0);
43727 ret_val = xmlUCSIsUgaritic(code);
43728 desret_int(ret_val);
43730 des_int(n_code, code, 0);
43731 xmlResetLastError();
43732 if (mem_base != xmlMemBlocks()) {
43733 printf("Leak of %d blocks found in xmlUCSIsUgaritic",
43734 xmlMemBlocks() - mem_base);
43736 printf(" %d", n_code);
43748 test_xmlUCSIsUnifiedCanadianAboriginalSyllabics(void) {
43751 #if defined(LIBXML_UNICODE_ENABLED)
43754 int code; /* UCS code point */
43757 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43758 mem_base = xmlMemBlocks();
43759 code = gen_int(n_code, 0);
43761 ret_val = xmlUCSIsUnifiedCanadianAboriginalSyllabics(code);
43762 desret_int(ret_val);
43764 des_int(n_code, code, 0);
43765 xmlResetLastError();
43766 if (mem_base != xmlMemBlocks()) {
43767 printf("Leak of %d blocks found in xmlUCSIsUnifiedCanadianAboriginalSyllabics",
43768 xmlMemBlocks() - mem_base);
43770 printf(" %d", n_code);
43782 test_xmlUCSIsVariationSelectors(void) {
43785 #if defined(LIBXML_UNICODE_ENABLED)
43788 int code; /* UCS code point */
43791 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43792 mem_base = xmlMemBlocks();
43793 code = gen_int(n_code, 0);
43795 ret_val = xmlUCSIsVariationSelectors(code);
43796 desret_int(ret_val);
43798 des_int(n_code, code, 0);
43799 xmlResetLastError();
43800 if (mem_base != xmlMemBlocks()) {
43801 printf("Leak of %d blocks found in xmlUCSIsVariationSelectors",
43802 xmlMemBlocks() - mem_base);
43804 printf(" %d", n_code);
43816 test_xmlUCSIsVariationSelectorsSupplement(void) {
43819 #if defined(LIBXML_UNICODE_ENABLED)
43822 int code; /* UCS code point */
43825 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43826 mem_base = xmlMemBlocks();
43827 code = gen_int(n_code, 0);
43829 ret_val = xmlUCSIsVariationSelectorsSupplement(code);
43830 desret_int(ret_val);
43832 des_int(n_code, code, 0);
43833 xmlResetLastError();
43834 if (mem_base != xmlMemBlocks()) {
43835 printf("Leak of %d blocks found in xmlUCSIsVariationSelectorsSupplement",
43836 xmlMemBlocks() - mem_base);
43838 printf(" %d", n_code);
43850 test_xmlUCSIsYiRadicals(void) {
43853 #if defined(LIBXML_UNICODE_ENABLED)
43856 int code; /* UCS code point */
43859 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43860 mem_base = xmlMemBlocks();
43861 code = gen_int(n_code, 0);
43863 ret_val = xmlUCSIsYiRadicals(code);
43864 desret_int(ret_val);
43866 des_int(n_code, code, 0);
43867 xmlResetLastError();
43868 if (mem_base != xmlMemBlocks()) {
43869 printf("Leak of %d blocks found in xmlUCSIsYiRadicals",
43870 xmlMemBlocks() - mem_base);
43872 printf(" %d", n_code);
43884 test_xmlUCSIsYiSyllables(void) {
43887 #if defined(LIBXML_UNICODE_ENABLED)
43890 int code; /* UCS code point */
43893 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43894 mem_base = xmlMemBlocks();
43895 code = gen_int(n_code, 0);
43897 ret_val = xmlUCSIsYiSyllables(code);
43898 desret_int(ret_val);
43900 des_int(n_code, code, 0);
43901 xmlResetLastError();
43902 if (mem_base != xmlMemBlocks()) {
43903 printf("Leak of %d blocks found in xmlUCSIsYiSyllables",
43904 xmlMemBlocks() - mem_base);
43906 printf(" %d", n_code);
43918 test_xmlUCSIsYijingHexagramSymbols(void) {
43921 #if defined(LIBXML_UNICODE_ENABLED)
43924 int code; /* UCS code point */
43927 for (n_code = 0;n_code < gen_nb_int;n_code++) {
43928 mem_base = xmlMemBlocks();
43929 code = gen_int(n_code, 0);
43931 ret_val = xmlUCSIsYijingHexagramSymbols(code);
43932 desret_int(ret_val);
43934 des_int(n_code, code, 0);
43935 xmlResetLastError();
43936 if (mem_base != xmlMemBlocks()) {
43937 printf("Leak of %d blocks found in xmlUCSIsYijingHexagramSymbols",
43938 xmlMemBlocks() - mem_base);
43940 printf(" %d", n_code);
43951 test_xmlunicode(void) {
43955 if (quiet == 0) printf("Testing xmlunicode : 166 of 166 functions ...\n");
43956 rc = test_xmlUCSIsAegeanNumbers();
43957 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
43958 rc = test_xmlUCSIsAlphabeticPresentationForms();
43959 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
43960 rc = test_xmlUCSIsArabic();
43961 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
43962 rc = test_xmlUCSIsArabicPresentationFormsA();
43963 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
43964 rc = test_xmlUCSIsArabicPresentationFormsB();
43965 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
43966 rc = test_xmlUCSIsArmenian();
43967 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
43968 rc = test_xmlUCSIsArrows();
43969 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
43970 rc = test_xmlUCSIsBasicLatin();
43971 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
43972 rc = test_xmlUCSIsBengali();
43973 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
43974 rc = test_xmlUCSIsBlock();
43975 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
43976 rc = test_xmlUCSIsBlockElements();
43977 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
43978 rc = test_xmlUCSIsBopomofo();
43979 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
43980 rc = test_xmlUCSIsBopomofoExtended();
43981 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
43982 rc = test_xmlUCSIsBoxDrawing();
43983 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
43984 rc = test_xmlUCSIsBraillePatterns();
43985 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
43986 rc = test_xmlUCSIsBuhid();
43987 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
43988 rc = test_xmlUCSIsByzantineMusicalSymbols();
43989 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
43990 rc = test_xmlUCSIsCJKCompatibility();
43991 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
43992 rc = test_xmlUCSIsCJKCompatibilityForms();
43993 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
43994 rc = test_xmlUCSIsCJKCompatibilityIdeographs();
43995 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
43996 rc = test_xmlUCSIsCJKCompatibilityIdeographsSupplement();
43997 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
43998 rc = test_xmlUCSIsCJKRadicalsSupplement();
43999 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44000 rc = test_xmlUCSIsCJKSymbolsandPunctuation();
44001 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44002 rc = test_xmlUCSIsCJKUnifiedIdeographs();
44003 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44004 rc = test_xmlUCSIsCJKUnifiedIdeographsExtensionA();
44005 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44006 rc = test_xmlUCSIsCJKUnifiedIdeographsExtensionB();
44007 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44008 rc = test_xmlUCSIsCat();
44009 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44010 rc = test_xmlUCSIsCatC();
44011 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44012 rc = test_xmlUCSIsCatCc();
44013 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44014 rc = test_xmlUCSIsCatCf();
44015 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44016 rc = test_xmlUCSIsCatCo();
44017 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44018 rc = test_xmlUCSIsCatCs();
44019 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44020 rc = test_xmlUCSIsCatL();
44021 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44022 rc = test_xmlUCSIsCatLl();
44023 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44024 rc = test_xmlUCSIsCatLm();
44025 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44026 rc = test_xmlUCSIsCatLo();
44027 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44028 rc = test_xmlUCSIsCatLt();
44029 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44030 rc = test_xmlUCSIsCatLu();
44031 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44032 rc = test_xmlUCSIsCatM();
44033 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44034 rc = test_xmlUCSIsCatMc();
44035 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44036 rc = test_xmlUCSIsCatMe();
44037 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44038 rc = test_xmlUCSIsCatMn();
44039 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44040 rc = test_xmlUCSIsCatN();
44041 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44042 rc = test_xmlUCSIsCatNd();
44043 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44044 rc = test_xmlUCSIsCatNl();
44045 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44046 rc = test_xmlUCSIsCatNo();
44047 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44048 rc = test_xmlUCSIsCatP();
44049 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44050 rc = test_xmlUCSIsCatPc();
44051 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44052 rc = test_xmlUCSIsCatPd();
44053 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44054 rc = test_xmlUCSIsCatPe();
44055 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44056 rc = test_xmlUCSIsCatPf();
44057 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44058 rc = test_xmlUCSIsCatPi();
44059 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44060 rc = test_xmlUCSIsCatPo();
44061 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44062 rc = test_xmlUCSIsCatPs();
44063 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44064 rc = test_xmlUCSIsCatS();
44065 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44066 rc = test_xmlUCSIsCatSc();
44067 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44068 rc = test_xmlUCSIsCatSk();
44069 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44070 rc = test_xmlUCSIsCatSm();
44071 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44072 rc = test_xmlUCSIsCatSo();
44073 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44074 rc = test_xmlUCSIsCatZ();
44075 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44076 rc = test_xmlUCSIsCatZl();
44077 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44078 rc = test_xmlUCSIsCatZp();
44079 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44080 rc = test_xmlUCSIsCatZs();
44081 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44082 rc = test_xmlUCSIsCherokee();
44083 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44084 rc = test_xmlUCSIsCombiningDiacriticalMarks();
44085 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44086 rc = test_xmlUCSIsCombiningDiacriticalMarksforSymbols();
44087 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44088 rc = test_xmlUCSIsCombiningHalfMarks();
44089 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44090 rc = test_xmlUCSIsCombiningMarksforSymbols();
44091 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44092 rc = test_xmlUCSIsControlPictures();
44093 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44094 rc = test_xmlUCSIsCurrencySymbols();
44095 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44096 rc = test_xmlUCSIsCypriotSyllabary();
44097 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44098 rc = test_xmlUCSIsCyrillic();
44099 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44100 rc = test_xmlUCSIsCyrillicSupplement();
44101 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44102 rc = test_xmlUCSIsDeseret();
44103 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44104 rc = test_xmlUCSIsDevanagari();
44105 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44106 rc = test_xmlUCSIsDingbats();
44107 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44108 rc = test_xmlUCSIsEnclosedAlphanumerics();
44109 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44110 rc = test_xmlUCSIsEnclosedCJKLettersandMonths();
44111 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44112 rc = test_xmlUCSIsEthiopic();
44113 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44114 rc = test_xmlUCSIsGeneralPunctuation();
44115 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44116 rc = test_xmlUCSIsGeometricShapes();
44117 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44118 rc = test_xmlUCSIsGeorgian();
44119 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44120 rc = test_xmlUCSIsGothic();
44121 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44122 rc = test_xmlUCSIsGreek();
44123 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44124 rc = test_xmlUCSIsGreekExtended();
44125 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44126 rc = test_xmlUCSIsGreekandCoptic();
44127 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44128 rc = test_xmlUCSIsGujarati();
44129 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44130 rc = test_xmlUCSIsGurmukhi();
44131 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44132 rc = test_xmlUCSIsHalfwidthandFullwidthForms();
44133 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44134 rc = test_xmlUCSIsHangulCompatibilityJamo();
44135 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44136 rc = test_xmlUCSIsHangulJamo();
44137 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44138 rc = test_xmlUCSIsHangulSyllables();
44139 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44140 rc = test_xmlUCSIsHanunoo();
44141 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44142 rc = test_xmlUCSIsHebrew();
44143 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44144 rc = test_xmlUCSIsHighPrivateUseSurrogates();
44145 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44146 rc = test_xmlUCSIsHighSurrogates();
44147 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44148 rc = test_xmlUCSIsHiragana();
44149 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44150 rc = test_xmlUCSIsIPAExtensions();
44151 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44152 rc = test_xmlUCSIsIdeographicDescriptionCharacters();
44153 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44154 rc = test_xmlUCSIsKanbun();
44155 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44156 rc = test_xmlUCSIsKangxiRadicals();
44157 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44158 rc = test_xmlUCSIsKannada();
44159 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44160 rc = test_xmlUCSIsKatakana();
44161 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44162 rc = test_xmlUCSIsKatakanaPhoneticExtensions();
44163 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44164 rc = test_xmlUCSIsKhmer();
44165 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44166 rc = test_xmlUCSIsKhmerSymbols();
44167 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44168 rc = test_xmlUCSIsLao();
44169 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44170 rc = test_xmlUCSIsLatin1Supplement();
44171 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44172 rc = test_xmlUCSIsLatinExtendedA();
44173 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44174 rc = test_xmlUCSIsLatinExtendedAdditional();
44175 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44176 rc = test_xmlUCSIsLatinExtendedB();
44177 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44178 rc = test_xmlUCSIsLetterlikeSymbols();
44179 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44180 rc = test_xmlUCSIsLimbu();
44181 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44182 rc = test_xmlUCSIsLinearBIdeograms();
44183 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44184 rc = test_xmlUCSIsLinearBSyllabary();
44185 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44186 rc = test_xmlUCSIsLowSurrogates();
44187 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44188 rc = test_xmlUCSIsMalayalam();
44189 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44190 rc = test_xmlUCSIsMathematicalAlphanumericSymbols();
44191 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44192 rc = test_xmlUCSIsMathematicalOperators();
44193 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44194 rc = test_xmlUCSIsMiscellaneousMathematicalSymbolsA();
44195 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44196 rc = test_xmlUCSIsMiscellaneousMathematicalSymbolsB();
44197 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44198 rc = test_xmlUCSIsMiscellaneousSymbols();
44199 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44200 rc = test_xmlUCSIsMiscellaneousSymbolsandArrows();
44201 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44202 rc = test_xmlUCSIsMiscellaneousTechnical();
44203 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44204 rc = test_xmlUCSIsMongolian();
44205 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44206 rc = test_xmlUCSIsMusicalSymbols();
44207 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44208 rc = test_xmlUCSIsMyanmar();
44209 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44210 rc = test_xmlUCSIsNumberForms();
44211 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44212 rc = test_xmlUCSIsOgham();
44213 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44214 rc = test_xmlUCSIsOldItalic();
44215 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44216 rc = test_xmlUCSIsOpticalCharacterRecognition();
44217 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44218 rc = test_xmlUCSIsOriya();
44219 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44220 rc = test_xmlUCSIsOsmanya();
44221 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44222 rc = test_xmlUCSIsPhoneticExtensions();
44223 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44224 rc = test_xmlUCSIsPrivateUse();
44225 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44226 rc = test_xmlUCSIsPrivateUseArea();
44227 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44228 rc = test_xmlUCSIsRunic();
44229 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44230 rc = test_xmlUCSIsShavian();
44231 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44232 rc = test_xmlUCSIsSinhala();
44233 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44234 rc = test_xmlUCSIsSmallFormVariants();
44235 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44236 rc = test_xmlUCSIsSpacingModifierLetters();
44237 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44238 rc = test_xmlUCSIsSpecials();
44239 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44240 rc = test_xmlUCSIsSuperscriptsandSubscripts();
44241 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44242 rc = test_xmlUCSIsSupplementalArrowsA();
44243 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44244 rc = test_xmlUCSIsSupplementalArrowsB();
44245 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44246 rc = test_xmlUCSIsSupplementalMathematicalOperators();
44247 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44248 rc = test_xmlUCSIsSupplementaryPrivateUseAreaA();
44249 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44250 rc = test_xmlUCSIsSupplementaryPrivateUseAreaB();
44251 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44252 rc = test_xmlUCSIsSyriac();
44253 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44254 rc = test_xmlUCSIsTagalog();
44255 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44256 rc = test_xmlUCSIsTagbanwa();
44257 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44258 rc = test_xmlUCSIsTags();
44259 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44260 rc = test_xmlUCSIsTaiLe();
44261 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44262 rc = test_xmlUCSIsTaiXuanJingSymbols();
44263 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44264 rc = test_xmlUCSIsTamil();
44265 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44266 rc = test_xmlUCSIsTelugu();
44267 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44268 rc = test_xmlUCSIsThaana();
44269 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44270 rc = test_xmlUCSIsThai();
44271 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44272 rc = test_xmlUCSIsTibetan();
44273 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44274 rc = test_xmlUCSIsUgaritic();
44275 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44276 rc = test_xmlUCSIsUnifiedCanadianAboriginalSyllabics();
44277 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44278 rc = test_xmlUCSIsVariationSelectors();
44279 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44280 rc = test_xmlUCSIsVariationSelectorsSupplement();
44281 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44282 rc = test_xmlUCSIsYiRadicals();
44283 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44284 rc = test_xmlUCSIsYiSyllables();
44285 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44286 rc = test_xmlUCSIsYijingHexagramSymbols();
44287 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
44290 printf("Module xmlunicode: %d errors\n", test_ret);
44295 test_xmlNewTextWriter(void) {
44298 #if defined(LIBXML_WRITER_ENABLED)
44300 xmlTextWriterPtr ret_val;
44301 xmlOutputBufferPtr out; /* an xmlOutputBufferPtr */
44304 for (n_out = 0;n_out < gen_nb_xmlOutputBufferPtr;n_out++) {
44305 mem_base = xmlMemBlocks();
44306 out = gen_xmlOutputBufferPtr(n_out, 0);
44308 ret_val = xmlNewTextWriter(out);
44309 if (ret_val != NULL) out = NULL;
44310 desret_xmlTextWriterPtr(ret_val);
44312 des_xmlOutputBufferPtr(n_out, out, 0);
44313 xmlResetLastError();
44314 if (mem_base != xmlMemBlocks()) {
44315 printf("Leak of %d blocks found in xmlNewTextWriter",
44316 xmlMemBlocks() - mem_base);
44318 printf(" %d", n_out);
44330 test_xmlNewTextWriterFilename(void) {
44333 #if defined(LIBXML_WRITER_ENABLED)
44335 xmlTextWriterPtr ret_val;
44336 const char * uri; /* the URI of the resource for the output */
44338 int compression; /* compress the output? */
44341 for (n_uri = 0;n_uri < gen_nb_fileoutput;n_uri++) {
44342 for (n_compression = 0;n_compression < gen_nb_int;n_compression++) {
44343 mem_base = xmlMemBlocks();
44344 uri = gen_fileoutput(n_uri, 0);
44345 compression = gen_int(n_compression, 1);
44347 ret_val = xmlNewTextWriterFilename(uri, compression);
44348 desret_xmlTextWriterPtr(ret_val);
44350 des_fileoutput(n_uri, uri, 0);
44351 des_int(n_compression, compression, 1);
44352 xmlResetLastError();
44353 if (mem_base != xmlMemBlocks()) {
44354 printf("Leak of %d blocks found in xmlNewTextWriterFilename",
44355 xmlMemBlocks() - mem_base);
44357 printf(" %d", n_uri);
44358 printf(" %d", n_compression);
44371 test_xmlNewTextWriterMemory(void) {
44374 #if defined(LIBXML_WRITER_ENABLED)
44376 xmlTextWriterPtr ret_val;
44377 xmlBufferPtr buf; /* xmlBufferPtr */
44379 int compression; /* compress the output? */
44382 for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
44383 for (n_compression = 0;n_compression < gen_nb_int;n_compression++) {
44384 mem_base = xmlMemBlocks();
44385 buf = gen_xmlBufferPtr(n_buf, 0);
44386 compression = gen_int(n_compression, 1);
44388 ret_val = xmlNewTextWriterMemory(buf, compression);
44389 desret_xmlTextWriterPtr(ret_val);
44391 des_xmlBufferPtr(n_buf, buf, 0);
44392 des_int(n_compression, compression, 1);
44393 xmlResetLastError();
44394 if (mem_base != xmlMemBlocks()) {
44395 printf("Leak of %d blocks found in xmlNewTextWriterMemory",
44396 xmlMemBlocks() - mem_base);
44398 printf(" %d", n_buf);
44399 printf(" %d", n_compression);
44412 test_xmlNewTextWriterPushParser(void) {
44415 #if defined(LIBXML_WRITER_ENABLED)
44417 xmlTextWriterPtr ret_val;
44418 xmlParserCtxtPtr ctxt; /* xmlParserCtxtPtr to hold the new XML document tree */
44420 int compression; /* compress the output? */
44423 for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
44424 for (n_compression = 0;n_compression < gen_nb_int;n_compression++) {
44425 mem_base = xmlMemBlocks();
44426 ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
44427 compression = gen_int(n_compression, 1);
44429 ret_val = xmlNewTextWriterPushParser(ctxt, compression);
44430 if (ctxt != NULL) {xmlFreeDoc(ctxt->myDoc); ctxt->myDoc = NULL;} if (ret_val != NULL) ctxt = NULL;
44431 desret_xmlTextWriterPtr(ret_val);
44433 des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
44434 des_int(n_compression, compression, 1);
44435 xmlResetLastError();
44436 if (mem_base != xmlMemBlocks()) {
44437 printf("Leak of %d blocks found in xmlNewTextWriterPushParser",
44438 xmlMemBlocks() - mem_base);
44440 printf(" %d", n_ctxt);
44441 printf(" %d", n_compression);
44454 test_xmlNewTextWriterTree(void) {
44457 #if defined(LIBXML_WRITER_ENABLED)
44459 xmlTextWriterPtr ret_val;
44460 xmlDocPtr doc; /* xmlDocPtr */
44462 xmlNodePtr node; /* xmlNodePtr or NULL for doc->children */
44464 int compression; /* compress the output? */
44467 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
44468 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
44469 for (n_compression = 0;n_compression < gen_nb_int;n_compression++) {
44470 mem_base = xmlMemBlocks();
44471 doc = gen_xmlDocPtr(n_doc, 0);
44472 node = gen_xmlNodePtr(n_node, 1);
44473 compression = gen_int(n_compression, 2);
44475 ret_val = xmlNewTextWriterTree(doc, node, compression);
44476 desret_xmlTextWriterPtr(ret_val);
44478 des_xmlDocPtr(n_doc, doc, 0);
44479 des_xmlNodePtr(n_node, node, 1);
44480 des_int(n_compression, compression, 2);
44481 xmlResetLastError();
44482 if (mem_base != xmlMemBlocks()) {
44483 printf("Leak of %d blocks found in xmlNewTextWriterTree",
44484 xmlMemBlocks() - mem_base);
44486 printf(" %d", n_doc);
44487 printf(" %d", n_node);
44488 printf(" %d", n_compression);
44502 test_xmlTextWriterEndAttribute(void) {
44505 #if defined(LIBXML_WRITER_ENABLED)
44508 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
44511 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
44512 mem_base = xmlMemBlocks();
44513 writer = gen_xmlTextWriterPtr(n_writer, 0);
44515 ret_val = xmlTextWriterEndAttribute(writer);
44516 desret_int(ret_val);
44518 des_xmlTextWriterPtr(n_writer, writer, 0);
44519 xmlResetLastError();
44520 if (mem_base != xmlMemBlocks()) {
44521 printf("Leak of %d blocks found in xmlTextWriterEndAttribute",
44522 xmlMemBlocks() - mem_base);
44524 printf(" %d", n_writer);
44536 test_xmlTextWriterEndCDATA(void) {
44539 #if defined(LIBXML_WRITER_ENABLED)
44542 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
44545 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
44546 mem_base = xmlMemBlocks();
44547 writer = gen_xmlTextWriterPtr(n_writer, 0);
44549 ret_val = xmlTextWriterEndCDATA(writer);
44550 desret_int(ret_val);
44552 des_xmlTextWriterPtr(n_writer, writer, 0);
44553 xmlResetLastError();
44554 if (mem_base != xmlMemBlocks()) {
44555 printf("Leak of %d blocks found in xmlTextWriterEndCDATA",
44556 xmlMemBlocks() - mem_base);
44558 printf(" %d", n_writer);
44570 test_xmlTextWriterEndComment(void) {
44573 #if defined(LIBXML_WRITER_ENABLED)
44576 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
44579 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
44580 mem_base = xmlMemBlocks();
44581 writer = gen_xmlTextWriterPtr(n_writer, 0);
44583 ret_val = xmlTextWriterEndComment(writer);
44584 desret_int(ret_val);
44586 des_xmlTextWriterPtr(n_writer, writer, 0);
44587 xmlResetLastError();
44588 if (mem_base != xmlMemBlocks()) {
44589 printf("Leak of %d blocks found in xmlTextWriterEndComment",
44590 xmlMemBlocks() - mem_base);
44592 printf(" %d", n_writer);
44604 test_xmlTextWriterEndDTD(void) {
44607 #if defined(LIBXML_WRITER_ENABLED)
44610 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
44613 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
44614 mem_base = xmlMemBlocks();
44615 writer = gen_xmlTextWriterPtr(n_writer, 0);
44617 ret_val = xmlTextWriterEndDTD(writer);
44618 desret_int(ret_val);
44620 des_xmlTextWriterPtr(n_writer, writer, 0);
44621 xmlResetLastError();
44622 if (mem_base != xmlMemBlocks()) {
44623 printf("Leak of %d blocks found in xmlTextWriterEndDTD",
44624 xmlMemBlocks() - mem_base);
44626 printf(" %d", n_writer);
44638 test_xmlTextWriterEndDTDAttlist(void) {
44641 #if defined(LIBXML_WRITER_ENABLED)
44644 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
44647 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
44648 mem_base = xmlMemBlocks();
44649 writer = gen_xmlTextWriterPtr(n_writer, 0);
44651 ret_val = xmlTextWriterEndDTDAttlist(writer);
44652 desret_int(ret_val);
44654 des_xmlTextWriterPtr(n_writer, writer, 0);
44655 xmlResetLastError();
44656 if (mem_base != xmlMemBlocks()) {
44657 printf("Leak of %d blocks found in xmlTextWriterEndDTDAttlist",
44658 xmlMemBlocks() - mem_base);
44660 printf(" %d", n_writer);
44672 test_xmlTextWriterEndDTDElement(void) {
44675 #if defined(LIBXML_WRITER_ENABLED)
44678 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
44681 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
44682 mem_base = xmlMemBlocks();
44683 writer = gen_xmlTextWriterPtr(n_writer, 0);
44685 ret_val = xmlTextWriterEndDTDElement(writer);
44686 desret_int(ret_val);
44688 des_xmlTextWriterPtr(n_writer, writer, 0);
44689 xmlResetLastError();
44690 if (mem_base != xmlMemBlocks()) {
44691 printf("Leak of %d blocks found in xmlTextWriterEndDTDElement",
44692 xmlMemBlocks() - mem_base);
44694 printf(" %d", n_writer);
44706 test_xmlTextWriterEndDTDEntity(void) {
44709 #if defined(LIBXML_WRITER_ENABLED)
44712 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
44715 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
44716 mem_base = xmlMemBlocks();
44717 writer = gen_xmlTextWriterPtr(n_writer, 0);
44719 ret_val = xmlTextWriterEndDTDEntity(writer);
44720 desret_int(ret_val);
44722 des_xmlTextWriterPtr(n_writer, writer, 0);
44723 xmlResetLastError();
44724 if (mem_base != xmlMemBlocks()) {
44725 printf("Leak of %d blocks found in xmlTextWriterEndDTDEntity",
44726 xmlMemBlocks() - mem_base);
44728 printf(" %d", n_writer);
44740 test_xmlTextWriterEndDocument(void) {
44743 #if defined(LIBXML_WRITER_ENABLED)
44746 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
44749 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
44750 mem_base = xmlMemBlocks();
44751 writer = gen_xmlTextWriterPtr(n_writer, 0);
44753 ret_val = xmlTextWriterEndDocument(writer);
44754 desret_int(ret_val);
44756 des_xmlTextWriterPtr(n_writer, writer, 0);
44757 xmlResetLastError();
44758 if (mem_base != xmlMemBlocks()) {
44759 printf("Leak of %d blocks found in xmlTextWriterEndDocument",
44760 xmlMemBlocks() - mem_base);
44762 printf(" %d", n_writer);
44774 test_xmlTextWriterEndElement(void) {
44777 #if defined(LIBXML_WRITER_ENABLED)
44780 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
44783 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
44784 mem_base = xmlMemBlocks();
44785 writer = gen_xmlTextWriterPtr(n_writer, 0);
44787 ret_val = xmlTextWriterEndElement(writer);
44788 desret_int(ret_val);
44790 des_xmlTextWriterPtr(n_writer, writer, 0);
44791 xmlResetLastError();
44792 if (mem_base != xmlMemBlocks()) {
44793 printf("Leak of %d blocks found in xmlTextWriterEndElement",
44794 xmlMemBlocks() - mem_base);
44796 printf(" %d", n_writer);
44808 test_xmlTextWriterEndPI(void) {
44811 #if defined(LIBXML_WRITER_ENABLED)
44814 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
44817 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
44818 mem_base = xmlMemBlocks();
44819 writer = gen_xmlTextWriterPtr(n_writer, 0);
44821 ret_val = xmlTextWriterEndPI(writer);
44822 desret_int(ret_val);
44824 des_xmlTextWriterPtr(n_writer, writer, 0);
44825 xmlResetLastError();
44826 if (mem_base != xmlMemBlocks()) {
44827 printf("Leak of %d blocks found in xmlTextWriterEndPI",
44828 xmlMemBlocks() - mem_base);
44830 printf(" %d", n_writer);
44842 test_xmlTextWriterFlush(void) {
44845 #if defined(LIBXML_WRITER_ENABLED)
44848 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
44851 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
44852 mem_base = xmlMemBlocks();
44853 writer = gen_xmlTextWriterPtr(n_writer, 0);
44855 ret_val = xmlTextWriterFlush(writer);
44856 desret_int(ret_val);
44858 des_xmlTextWriterPtr(n_writer, writer, 0);
44859 xmlResetLastError();
44860 if (mem_base != xmlMemBlocks()) {
44861 printf("Leak of %d blocks found in xmlTextWriterFlush",
44862 xmlMemBlocks() - mem_base);
44864 printf(" %d", n_writer);
44876 test_xmlTextWriterFullEndElement(void) {
44879 #if defined(LIBXML_WRITER_ENABLED)
44882 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
44885 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
44886 mem_base = xmlMemBlocks();
44887 writer = gen_xmlTextWriterPtr(n_writer, 0);
44889 ret_val = xmlTextWriterFullEndElement(writer);
44890 desret_int(ret_val);
44892 des_xmlTextWriterPtr(n_writer, writer, 0);
44893 xmlResetLastError();
44894 if (mem_base != xmlMemBlocks()) {
44895 printf("Leak of %d blocks found in xmlTextWriterFullEndElement",
44896 xmlMemBlocks() - mem_base);
44898 printf(" %d", n_writer);
44910 test_xmlTextWriterSetIndent(void) {
44913 #if defined(LIBXML_WRITER_ENABLED)
44916 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
44918 int indent; /* do indentation? */
44921 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
44922 for (n_indent = 0;n_indent < gen_nb_int;n_indent++) {
44923 mem_base = xmlMemBlocks();
44924 writer = gen_xmlTextWriterPtr(n_writer, 0);
44925 indent = gen_int(n_indent, 1);
44927 ret_val = xmlTextWriterSetIndent(writer, indent);
44928 desret_int(ret_val);
44930 des_xmlTextWriterPtr(n_writer, writer, 0);
44931 des_int(n_indent, indent, 1);
44932 xmlResetLastError();
44933 if (mem_base != xmlMemBlocks()) {
44934 printf("Leak of %d blocks found in xmlTextWriterSetIndent",
44935 xmlMemBlocks() - mem_base);
44937 printf(" %d", n_writer);
44938 printf(" %d", n_indent);
44951 test_xmlTextWriterSetIndentString(void) {
44954 #if defined(LIBXML_WRITER_ENABLED)
44957 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
44959 xmlChar * str; /* the xmlChar string */
44962 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
44963 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
44964 mem_base = xmlMemBlocks();
44965 writer = gen_xmlTextWriterPtr(n_writer, 0);
44966 str = gen_const_xmlChar_ptr(n_str, 1);
44968 ret_val = xmlTextWriterSetIndentString(writer, (const xmlChar *)str);
44969 desret_int(ret_val);
44971 des_xmlTextWriterPtr(n_writer, writer, 0);
44972 des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 1);
44973 xmlResetLastError();
44974 if (mem_base != xmlMemBlocks()) {
44975 printf("Leak of %d blocks found in xmlTextWriterSetIndentString",
44976 xmlMemBlocks() - mem_base);
44978 printf(" %d", n_writer);
44979 printf(" %d", n_str);
44992 test_xmlTextWriterSetQuoteChar(void) {
44995 #if defined(LIBXML_WRITER_ENABLED)
44998 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
45000 xmlChar quotechar; /* the quote character */
45003 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
45004 for (n_quotechar = 0;n_quotechar < gen_nb_xmlChar;n_quotechar++) {
45005 mem_base = xmlMemBlocks();
45006 writer = gen_xmlTextWriterPtr(n_writer, 0);
45007 quotechar = gen_xmlChar(n_quotechar, 1);
45009 ret_val = xmlTextWriterSetQuoteChar(writer, quotechar);
45010 desret_int(ret_val);
45012 des_xmlTextWriterPtr(n_writer, writer, 0);
45013 des_xmlChar(n_quotechar, quotechar, 1);
45014 xmlResetLastError();
45015 if (mem_base != xmlMemBlocks()) {
45016 printf("Leak of %d blocks found in xmlTextWriterSetQuoteChar",
45017 xmlMemBlocks() - mem_base);
45019 printf(" %d", n_writer);
45020 printf(" %d", n_quotechar);
45033 test_xmlTextWriterStartAttribute(void) {
45036 #if defined(LIBXML_WRITER_ENABLED)
45039 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
45041 xmlChar * name; /* element name */
45044 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
45045 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
45046 mem_base = xmlMemBlocks();
45047 writer = gen_xmlTextWriterPtr(n_writer, 0);
45048 name = gen_const_xmlChar_ptr(n_name, 1);
45050 ret_val = xmlTextWriterStartAttribute(writer, (const xmlChar *)name);
45051 desret_int(ret_val);
45053 des_xmlTextWriterPtr(n_writer, writer, 0);
45054 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
45055 xmlResetLastError();
45056 if (mem_base != xmlMemBlocks()) {
45057 printf("Leak of %d blocks found in xmlTextWriterStartAttribute",
45058 xmlMemBlocks() - mem_base);
45060 printf(" %d", n_writer);
45061 printf(" %d", n_name);
45074 test_xmlTextWriterStartAttributeNS(void) {
45077 #if defined(LIBXML_WRITER_ENABLED)
45080 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
45082 xmlChar * prefix; /* namespace prefix or NULL */
45084 xmlChar * name; /* element local name */
45086 xmlChar * namespaceURI; /* namespace URI or NULL */
45087 int n_namespaceURI;
45089 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
45090 for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
45091 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
45092 for (n_namespaceURI = 0;n_namespaceURI < gen_nb_const_xmlChar_ptr;n_namespaceURI++) {
45093 mem_base = xmlMemBlocks();
45094 writer = gen_xmlTextWriterPtr(n_writer, 0);
45095 prefix = gen_const_xmlChar_ptr(n_prefix, 1);
45096 name = gen_const_xmlChar_ptr(n_name, 2);
45097 namespaceURI = gen_const_xmlChar_ptr(n_namespaceURI, 3);
45099 ret_val = xmlTextWriterStartAttributeNS(writer, (const xmlChar *)prefix, (const xmlChar *)name, (const xmlChar *)namespaceURI);
45100 desret_int(ret_val);
45102 des_xmlTextWriterPtr(n_writer, writer, 0);
45103 des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 1);
45104 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
45105 des_const_xmlChar_ptr(n_namespaceURI, (const xmlChar *)namespaceURI, 3);
45106 xmlResetLastError();
45107 if (mem_base != xmlMemBlocks()) {
45108 printf("Leak of %d blocks found in xmlTextWriterStartAttributeNS",
45109 xmlMemBlocks() - mem_base);
45111 printf(" %d", n_writer);
45112 printf(" %d", n_prefix);
45113 printf(" %d", n_name);
45114 printf(" %d", n_namespaceURI);
45129 test_xmlTextWriterStartCDATA(void) {
45132 #if defined(LIBXML_WRITER_ENABLED)
45135 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
45138 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
45139 mem_base = xmlMemBlocks();
45140 writer = gen_xmlTextWriterPtr(n_writer, 0);
45142 ret_val = xmlTextWriterStartCDATA(writer);
45143 desret_int(ret_val);
45145 des_xmlTextWriterPtr(n_writer, writer, 0);
45146 xmlResetLastError();
45147 if (mem_base != xmlMemBlocks()) {
45148 printf("Leak of %d blocks found in xmlTextWriterStartCDATA",
45149 xmlMemBlocks() - mem_base);
45151 printf(" %d", n_writer);
45163 test_xmlTextWriterStartComment(void) {
45166 #if defined(LIBXML_WRITER_ENABLED)
45169 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
45172 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
45173 mem_base = xmlMemBlocks();
45174 writer = gen_xmlTextWriterPtr(n_writer, 0);
45176 ret_val = xmlTextWriterStartComment(writer);
45177 desret_int(ret_val);
45179 des_xmlTextWriterPtr(n_writer, writer, 0);
45180 xmlResetLastError();
45181 if (mem_base != xmlMemBlocks()) {
45182 printf("Leak of %d blocks found in xmlTextWriterStartComment",
45183 xmlMemBlocks() - mem_base);
45185 printf(" %d", n_writer);
45197 test_xmlTextWriterStartDTD(void) {
45200 #if defined(LIBXML_WRITER_ENABLED)
45203 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
45205 xmlChar * name; /* the name of the DTD */
45207 xmlChar * pubid; /* the public identifier, which is an alternative to the system identifier */
45209 xmlChar * sysid; /* the system identifier, which is the URI of the DTD */
45212 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
45213 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
45214 for (n_pubid = 0;n_pubid < gen_nb_const_xmlChar_ptr;n_pubid++) {
45215 for (n_sysid = 0;n_sysid < gen_nb_const_xmlChar_ptr;n_sysid++) {
45216 mem_base = xmlMemBlocks();
45217 writer = gen_xmlTextWriterPtr(n_writer, 0);
45218 name = gen_const_xmlChar_ptr(n_name, 1);
45219 pubid = gen_const_xmlChar_ptr(n_pubid, 2);
45220 sysid = gen_const_xmlChar_ptr(n_sysid, 3);
45222 ret_val = xmlTextWriterStartDTD(writer, (const xmlChar *)name, (const xmlChar *)pubid, (const xmlChar *)sysid);
45223 desret_int(ret_val);
45225 des_xmlTextWriterPtr(n_writer, writer, 0);
45226 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
45227 des_const_xmlChar_ptr(n_pubid, (const xmlChar *)pubid, 2);
45228 des_const_xmlChar_ptr(n_sysid, (const xmlChar *)sysid, 3);
45229 xmlResetLastError();
45230 if (mem_base != xmlMemBlocks()) {
45231 printf("Leak of %d blocks found in xmlTextWriterStartDTD",
45232 xmlMemBlocks() - mem_base);
45234 printf(" %d", n_writer);
45235 printf(" %d", n_name);
45236 printf(" %d", n_pubid);
45237 printf(" %d", n_sysid);
45252 test_xmlTextWriterStartDTDAttlist(void) {
45255 #if defined(LIBXML_WRITER_ENABLED)
45258 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
45260 xmlChar * name; /* the name of the DTD ATTLIST */
45263 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
45264 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
45265 mem_base = xmlMemBlocks();
45266 writer = gen_xmlTextWriterPtr(n_writer, 0);
45267 name = gen_const_xmlChar_ptr(n_name, 1);
45269 ret_val = xmlTextWriterStartDTDAttlist(writer, (const xmlChar *)name);
45270 desret_int(ret_val);
45272 des_xmlTextWriterPtr(n_writer, writer, 0);
45273 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
45274 xmlResetLastError();
45275 if (mem_base != xmlMemBlocks()) {
45276 printf("Leak of %d blocks found in xmlTextWriterStartDTDAttlist",
45277 xmlMemBlocks() - mem_base);
45279 printf(" %d", n_writer);
45280 printf(" %d", n_name);
45293 test_xmlTextWriterStartDTDElement(void) {
45296 #if defined(LIBXML_WRITER_ENABLED)
45299 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
45301 xmlChar * name; /* the name of the DTD element */
45304 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
45305 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
45306 mem_base = xmlMemBlocks();
45307 writer = gen_xmlTextWriterPtr(n_writer, 0);
45308 name = gen_const_xmlChar_ptr(n_name, 1);
45310 ret_val = xmlTextWriterStartDTDElement(writer, (const xmlChar *)name);
45311 desret_int(ret_val);
45313 des_xmlTextWriterPtr(n_writer, writer, 0);
45314 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
45315 xmlResetLastError();
45316 if (mem_base != xmlMemBlocks()) {
45317 printf("Leak of %d blocks found in xmlTextWriterStartDTDElement",
45318 xmlMemBlocks() - mem_base);
45320 printf(" %d", n_writer);
45321 printf(" %d", n_name);
45334 test_xmlTextWriterStartDTDEntity(void) {
45337 #if defined(LIBXML_WRITER_ENABLED)
45340 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
45342 int pe; /* TRUE if this is a parameter entity, FALSE if not */
45344 xmlChar * name; /* the name of the DTD ATTLIST */
45347 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
45348 for (n_pe = 0;n_pe < gen_nb_int;n_pe++) {
45349 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
45350 mem_base = xmlMemBlocks();
45351 writer = gen_xmlTextWriterPtr(n_writer, 0);
45352 pe = gen_int(n_pe, 1);
45353 name = gen_const_xmlChar_ptr(n_name, 2);
45355 ret_val = xmlTextWriterStartDTDEntity(writer, pe, (const xmlChar *)name);
45356 desret_int(ret_val);
45358 des_xmlTextWriterPtr(n_writer, writer, 0);
45359 des_int(n_pe, pe, 1);
45360 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
45361 xmlResetLastError();
45362 if (mem_base != xmlMemBlocks()) {
45363 printf("Leak of %d blocks found in xmlTextWriterStartDTDEntity",
45364 xmlMemBlocks() - mem_base);
45366 printf(" %d", n_writer);
45367 printf(" %d", n_pe);
45368 printf(" %d", n_name);
45382 test_xmlTextWriterStartDocument(void) {
45385 #if defined(LIBXML_WRITER_ENABLED)
45388 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
45390 char * version; /* the xml version ("1.0") or NULL for default ("1.0") */
45392 char * encoding; /* the encoding or NULL for default */
45394 char * standalone; /* "yes" or "no" or NULL for default */
45397 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
45398 for (n_version = 0;n_version < gen_nb_const_char_ptr;n_version++) {
45399 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
45400 for (n_standalone = 0;n_standalone < gen_nb_const_char_ptr;n_standalone++) {
45401 mem_base = xmlMemBlocks();
45402 writer = gen_xmlTextWriterPtr(n_writer, 0);
45403 version = gen_const_char_ptr(n_version, 1);
45404 encoding = gen_const_char_ptr(n_encoding, 2);
45405 standalone = gen_const_char_ptr(n_standalone, 3);
45407 ret_val = xmlTextWriterStartDocument(writer, (const char *)version, (const char *)encoding, (const char *)standalone);
45408 desret_int(ret_val);
45410 des_xmlTextWriterPtr(n_writer, writer, 0);
45411 des_const_char_ptr(n_version, (const char *)version, 1);
45412 des_const_char_ptr(n_encoding, (const char *)encoding, 2);
45413 des_const_char_ptr(n_standalone, (const char *)standalone, 3);
45414 xmlResetLastError();
45415 if (mem_base != xmlMemBlocks()) {
45416 printf("Leak of %d blocks found in xmlTextWriterStartDocument",
45417 xmlMemBlocks() - mem_base);
45419 printf(" %d", n_writer);
45420 printf(" %d", n_version);
45421 printf(" %d", n_encoding);
45422 printf(" %d", n_standalone);
45437 test_xmlTextWriterStartElement(void) {
45440 #if defined(LIBXML_WRITER_ENABLED)
45443 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
45445 xmlChar * name; /* element name */
45448 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
45449 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
45450 mem_base = xmlMemBlocks();
45451 writer = gen_xmlTextWriterPtr(n_writer, 0);
45452 name = gen_const_xmlChar_ptr(n_name, 1);
45454 ret_val = xmlTextWriterStartElement(writer, (const xmlChar *)name);
45455 desret_int(ret_val);
45457 des_xmlTextWriterPtr(n_writer, writer, 0);
45458 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
45459 xmlResetLastError();
45460 if (mem_base != xmlMemBlocks()) {
45461 printf("Leak of %d blocks found in xmlTextWriterStartElement",
45462 xmlMemBlocks() - mem_base);
45464 printf(" %d", n_writer);
45465 printf(" %d", n_name);
45478 test_xmlTextWriterStartElementNS(void) {
45481 #if defined(LIBXML_WRITER_ENABLED)
45484 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
45486 xmlChar * prefix; /* namespace prefix or NULL */
45488 xmlChar * name; /* element local name */
45490 xmlChar * namespaceURI; /* namespace URI or NULL */
45491 int n_namespaceURI;
45493 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
45494 for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
45495 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
45496 for (n_namespaceURI = 0;n_namespaceURI < gen_nb_const_xmlChar_ptr;n_namespaceURI++) {
45497 mem_base = xmlMemBlocks();
45498 writer = gen_xmlTextWriterPtr(n_writer, 0);
45499 prefix = gen_const_xmlChar_ptr(n_prefix, 1);
45500 name = gen_const_xmlChar_ptr(n_name, 2);
45501 namespaceURI = gen_const_xmlChar_ptr(n_namespaceURI, 3);
45503 ret_val = xmlTextWriterStartElementNS(writer, (const xmlChar *)prefix, (const xmlChar *)name, (const xmlChar *)namespaceURI);
45504 desret_int(ret_val);
45506 des_xmlTextWriterPtr(n_writer, writer, 0);
45507 des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 1);
45508 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
45509 des_const_xmlChar_ptr(n_namespaceURI, (const xmlChar *)namespaceURI, 3);
45510 xmlResetLastError();
45511 if (mem_base != xmlMemBlocks()) {
45512 printf("Leak of %d blocks found in xmlTextWriterStartElementNS",
45513 xmlMemBlocks() - mem_base);
45515 printf(" %d", n_writer);
45516 printf(" %d", n_prefix);
45517 printf(" %d", n_name);
45518 printf(" %d", n_namespaceURI);
45533 test_xmlTextWriterStartPI(void) {
45536 #if defined(LIBXML_WRITER_ENABLED)
45539 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
45541 xmlChar * target; /* PI target */
45544 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
45545 for (n_target = 0;n_target < gen_nb_const_xmlChar_ptr;n_target++) {
45546 mem_base = xmlMemBlocks();
45547 writer = gen_xmlTextWriterPtr(n_writer, 0);
45548 target = gen_const_xmlChar_ptr(n_target, 1);
45550 ret_val = xmlTextWriterStartPI(writer, (const xmlChar *)target);
45551 desret_int(ret_val);
45553 des_xmlTextWriterPtr(n_writer, writer, 0);
45554 des_const_xmlChar_ptr(n_target, (const xmlChar *)target, 1);
45555 xmlResetLastError();
45556 if (mem_base != xmlMemBlocks()) {
45557 printf("Leak of %d blocks found in xmlTextWriterStartPI",
45558 xmlMemBlocks() - mem_base);
45560 printf(" %d", n_writer);
45561 printf(" %d", n_target);
45574 test_xmlTextWriterWriteAttribute(void) {
45577 #if defined(LIBXML_WRITER_ENABLED)
45580 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
45582 xmlChar * name; /* attribute name */
45584 xmlChar * content; /* attribute content */
45587 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
45588 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
45589 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
45590 mem_base = xmlMemBlocks();
45591 writer = gen_xmlTextWriterPtr(n_writer, 0);
45592 name = gen_const_xmlChar_ptr(n_name, 1);
45593 content = gen_const_xmlChar_ptr(n_content, 2);
45595 ret_val = xmlTextWriterWriteAttribute(writer, (const xmlChar *)name, (const xmlChar *)content);
45596 desret_int(ret_val);
45598 des_xmlTextWriterPtr(n_writer, writer, 0);
45599 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
45600 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 2);
45601 xmlResetLastError();
45602 if (mem_base != xmlMemBlocks()) {
45603 printf("Leak of %d blocks found in xmlTextWriterWriteAttribute",
45604 xmlMemBlocks() - mem_base);
45606 printf(" %d", n_writer);
45607 printf(" %d", n_name);
45608 printf(" %d", n_content);
45622 test_xmlTextWriterWriteAttributeNS(void) {
45625 #if defined(LIBXML_WRITER_ENABLED)
45628 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
45630 xmlChar * prefix; /* namespace prefix */
45632 xmlChar * name; /* attribute local name */
45634 xmlChar * namespaceURI; /* namespace URI */
45635 int n_namespaceURI;
45636 xmlChar * content; /* attribute content */
45639 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
45640 for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
45641 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
45642 for (n_namespaceURI = 0;n_namespaceURI < gen_nb_const_xmlChar_ptr;n_namespaceURI++) {
45643 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
45644 mem_base = xmlMemBlocks();
45645 writer = gen_xmlTextWriterPtr(n_writer, 0);
45646 prefix = gen_const_xmlChar_ptr(n_prefix, 1);
45647 name = gen_const_xmlChar_ptr(n_name, 2);
45648 namespaceURI = gen_const_xmlChar_ptr(n_namespaceURI, 3);
45649 content = gen_const_xmlChar_ptr(n_content, 4);
45651 ret_val = xmlTextWriterWriteAttributeNS(writer, (const xmlChar *)prefix, (const xmlChar *)name, (const xmlChar *)namespaceURI, (const xmlChar *)content);
45652 desret_int(ret_val);
45654 des_xmlTextWriterPtr(n_writer, writer, 0);
45655 des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 1);
45656 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
45657 des_const_xmlChar_ptr(n_namespaceURI, (const xmlChar *)namespaceURI, 3);
45658 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 4);
45659 xmlResetLastError();
45660 if (mem_base != xmlMemBlocks()) {
45661 printf("Leak of %d blocks found in xmlTextWriterWriteAttributeNS",
45662 xmlMemBlocks() - mem_base);
45664 printf(" %d", n_writer);
45665 printf(" %d", n_prefix);
45666 printf(" %d", n_name);
45667 printf(" %d", n_namespaceURI);
45668 printf(" %d", n_content);
45684 test_xmlTextWriterWriteBase64(void) {
45687 #if defined(LIBXML_WRITER_ENABLED)
45690 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
45692 char * data; /* binary data */
45694 int start; /* the position within the data of the first byte to encode */
45696 int len; /* the number of bytes to encode */
45699 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
45700 for (n_data = 0;n_data < gen_nb_const_char_ptr;n_data++) {
45701 for (n_start = 0;n_start < gen_nb_int;n_start++) {
45702 for (n_len = 0;n_len < gen_nb_int;n_len++) {
45703 mem_base = xmlMemBlocks();
45704 writer = gen_xmlTextWriterPtr(n_writer, 0);
45705 data = gen_const_char_ptr(n_data, 1);
45706 start = gen_int(n_start, 2);
45707 len = gen_int(n_len, 3);
45709 ret_val = xmlTextWriterWriteBase64(writer, (const char *)data, start, len);
45710 desret_int(ret_val);
45712 des_xmlTextWriterPtr(n_writer, writer, 0);
45713 des_const_char_ptr(n_data, (const char *)data, 1);
45714 des_int(n_start, start, 2);
45715 des_int(n_len, len, 3);
45716 xmlResetLastError();
45717 if (mem_base != xmlMemBlocks()) {
45718 printf("Leak of %d blocks found in xmlTextWriterWriteBase64",
45719 xmlMemBlocks() - mem_base);
45721 printf(" %d", n_writer);
45722 printf(" %d", n_data);
45723 printf(" %d", n_start);
45724 printf(" %d", n_len);
45739 test_xmlTextWriterWriteBinHex(void) {
45742 #if defined(LIBXML_WRITER_ENABLED)
45745 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
45747 char * data; /* binary data */
45749 int start; /* the position within the data of the first byte to encode */
45751 int len; /* the number of bytes to encode */
45754 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
45755 for (n_data = 0;n_data < gen_nb_const_char_ptr;n_data++) {
45756 for (n_start = 0;n_start < gen_nb_int;n_start++) {
45757 for (n_len = 0;n_len < gen_nb_int;n_len++) {
45758 mem_base = xmlMemBlocks();
45759 writer = gen_xmlTextWriterPtr(n_writer, 0);
45760 data = gen_const_char_ptr(n_data, 1);
45761 start = gen_int(n_start, 2);
45762 len = gen_int(n_len, 3);
45764 ret_val = xmlTextWriterWriteBinHex(writer, (const char *)data, start, len);
45765 desret_int(ret_val);
45767 des_xmlTextWriterPtr(n_writer, writer, 0);
45768 des_const_char_ptr(n_data, (const char *)data, 1);
45769 des_int(n_start, start, 2);
45770 des_int(n_len, len, 3);
45771 xmlResetLastError();
45772 if (mem_base != xmlMemBlocks()) {
45773 printf("Leak of %d blocks found in xmlTextWriterWriteBinHex",
45774 xmlMemBlocks() - mem_base);
45776 printf(" %d", n_writer);
45777 printf(" %d", n_data);
45778 printf(" %d", n_start);
45779 printf(" %d", n_len);
45794 test_xmlTextWriterWriteCDATA(void) {
45797 #if defined(LIBXML_WRITER_ENABLED)
45800 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
45802 xmlChar * content; /* CDATA content */
45805 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
45806 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
45807 mem_base = xmlMemBlocks();
45808 writer = gen_xmlTextWriterPtr(n_writer, 0);
45809 content = gen_const_xmlChar_ptr(n_content, 1);
45811 ret_val = xmlTextWriterWriteCDATA(writer, (const xmlChar *)content);
45812 desret_int(ret_val);
45814 des_xmlTextWriterPtr(n_writer, writer, 0);
45815 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
45816 xmlResetLastError();
45817 if (mem_base != xmlMemBlocks()) {
45818 printf("Leak of %d blocks found in xmlTextWriterWriteCDATA",
45819 xmlMemBlocks() - mem_base);
45821 printf(" %d", n_writer);
45822 printf(" %d", n_content);
45835 test_xmlTextWriterWriteComment(void) {
45838 #if defined(LIBXML_WRITER_ENABLED)
45841 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
45843 xmlChar * content; /* comment string */
45846 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
45847 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
45848 mem_base = xmlMemBlocks();
45849 writer = gen_xmlTextWriterPtr(n_writer, 0);
45850 content = gen_const_xmlChar_ptr(n_content, 1);
45852 ret_val = xmlTextWriterWriteComment(writer, (const xmlChar *)content);
45853 desret_int(ret_val);
45855 des_xmlTextWriterPtr(n_writer, writer, 0);
45856 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
45857 xmlResetLastError();
45858 if (mem_base != xmlMemBlocks()) {
45859 printf("Leak of %d blocks found in xmlTextWriterWriteComment",
45860 xmlMemBlocks() - mem_base);
45862 printf(" %d", n_writer);
45863 printf(" %d", n_content);
45876 test_xmlTextWriterWriteDTD(void) {
45879 #if defined(LIBXML_WRITER_ENABLED)
45882 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
45884 xmlChar * name; /* the name of the DTD */
45886 xmlChar * pubid; /* the public identifier, which is an alternative to the system identifier */
45888 xmlChar * sysid; /* the system identifier, which is the URI of the DTD */
45890 xmlChar * subset; /* string content of the DTD */
45893 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
45894 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
45895 for (n_pubid = 0;n_pubid < gen_nb_const_xmlChar_ptr;n_pubid++) {
45896 for (n_sysid = 0;n_sysid < gen_nb_const_xmlChar_ptr;n_sysid++) {
45897 for (n_subset = 0;n_subset < gen_nb_const_xmlChar_ptr;n_subset++) {
45898 mem_base = xmlMemBlocks();
45899 writer = gen_xmlTextWriterPtr(n_writer, 0);
45900 name = gen_const_xmlChar_ptr(n_name, 1);
45901 pubid = gen_const_xmlChar_ptr(n_pubid, 2);
45902 sysid = gen_const_xmlChar_ptr(n_sysid, 3);
45903 subset = gen_const_xmlChar_ptr(n_subset, 4);
45905 ret_val = xmlTextWriterWriteDTD(writer, (const xmlChar *)name, (const xmlChar *)pubid, (const xmlChar *)sysid, (const xmlChar *)subset);
45906 desret_int(ret_val);
45908 des_xmlTextWriterPtr(n_writer, writer, 0);
45909 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
45910 des_const_xmlChar_ptr(n_pubid, (const xmlChar *)pubid, 2);
45911 des_const_xmlChar_ptr(n_sysid, (const xmlChar *)sysid, 3);
45912 des_const_xmlChar_ptr(n_subset, (const xmlChar *)subset, 4);
45913 xmlResetLastError();
45914 if (mem_base != xmlMemBlocks()) {
45915 printf("Leak of %d blocks found in xmlTextWriterWriteDTD",
45916 xmlMemBlocks() - mem_base);
45918 printf(" %d", n_writer);
45919 printf(" %d", n_name);
45920 printf(" %d", n_pubid);
45921 printf(" %d", n_sysid);
45922 printf(" %d", n_subset);
45938 test_xmlTextWriterWriteDTDAttlist(void) {
45941 #if defined(LIBXML_WRITER_ENABLED)
45944 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
45946 xmlChar * name; /* the name of the DTD ATTLIST */
45948 xmlChar * content; /* content of the ATTLIST */
45951 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
45952 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
45953 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
45954 mem_base = xmlMemBlocks();
45955 writer = gen_xmlTextWriterPtr(n_writer, 0);
45956 name = gen_const_xmlChar_ptr(n_name, 1);
45957 content = gen_const_xmlChar_ptr(n_content, 2);
45959 ret_val = xmlTextWriterWriteDTDAttlist(writer, (const xmlChar *)name, (const xmlChar *)content);
45960 desret_int(ret_val);
45962 des_xmlTextWriterPtr(n_writer, writer, 0);
45963 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
45964 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 2);
45965 xmlResetLastError();
45966 if (mem_base != xmlMemBlocks()) {
45967 printf("Leak of %d blocks found in xmlTextWriterWriteDTDAttlist",
45968 xmlMemBlocks() - mem_base);
45970 printf(" %d", n_writer);
45971 printf(" %d", n_name);
45972 printf(" %d", n_content);
45986 test_xmlTextWriterWriteDTDElement(void) {
45989 #if defined(LIBXML_WRITER_ENABLED)
45992 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
45994 xmlChar * name; /* the name of the DTD element */
45996 xmlChar * content; /* content of the element */
45999 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
46000 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
46001 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
46002 mem_base = xmlMemBlocks();
46003 writer = gen_xmlTextWriterPtr(n_writer, 0);
46004 name = gen_const_xmlChar_ptr(n_name, 1);
46005 content = gen_const_xmlChar_ptr(n_content, 2);
46007 ret_val = xmlTextWriterWriteDTDElement(writer, (const xmlChar *)name, (const xmlChar *)content);
46008 desret_int(ret_val);
46010 des_xmlTextWriterPtr(n_writer, writer, 0);
46011 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
46012 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 2);
46013 xmlResetLastError();
46014 if (mem_base != xmlMemBlocks()) {
46015 printf("Leak of %d blocks found in xmlTextWriterWriteDTDElement",
46016 xmlMemBlocks() - mem_base);
46018 printf(" %d", n_writer);
46019 printf(" %d", n_name);
46020 printf(" %d", n_content);
46034 test_xmlTextWriterWriteDTDEntity(void) {
46037 #if defined(LIBXML_WRITER_ENABLED)
46040 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
46042 int pe; /* TRUE if this is a parameter entity, FALSE if not */
46044 xmlChar * name; /* the name of the DTD entity */
46046 xmlChar * pubid; /* the public identifier, which is an alternative to the system identifier */
46048 xmlChar * sysid; /* the system identifier, which is the URI of the DTD */
46050 xmlChar * ndataid; /* the xml notation name. */
46052 xmlChar * content; /* content of the entity */
46055 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
46056 for (n_pe = 0;n_pe < gen_nb_int;n_pe++) {
46057 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
46058 for (n_pubid = 0;n_pubid < gen_nb_const_xmlChar_ptr;n_pubid++) {
46059 for (n_sysid = 0;n_sysid < gen_nb_const_xmlChar_ptr;n_sysid++) {
46060 for (n_ndataid = 0;n_ndataid < gen_nb_const_xmlChar_ptr;n_ndataid++) {
46061 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
46062 mem_base = xmlMemBlocks();
46063 writer = gen_xmlTextWriterPtr(n_writer, 0);
46064 pe = gen_int(n_pe, 1);
46065 name = gen_const_xmlChar_ptr(n_name, 2);
46066 pubid = gen_const_xmlChar_ptr(n_pubid, 3);
46067 sysid = gen_const_xmlChar_ptr(n_sysid, 4);
46068 ndataid = gen_const_xmlChar_ptr(n_ndataid, 5);
46069 content = gen_const_xmlChar_ptr(n_content, 6);
46071 ret_val = xmlTextWriterWriteDTDEntity(writer, pe, (const xmlChar *)name, (const xmlChar *)pubid, (const xmlChar *)sysid, (const xmlChar *)ndataid, (const xmlChar *)content);
46072 desret_int(ret_val);
46074 des_xmlTextWriterPtr(n_writer, writer, 0);
46075 des_int(n_pe, pe, 1);
46076 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
46077 des_const_xmlChar_ptr(n_pubid, (const xmlChar *)pubid, 3);
46078 des_const_xmlChar_ptr(n_sysid, (const xmlChar *)sysid, 4);
46079 des_const_xmlChar_ptr(n_ndataid, (const xmlChar *)ndataid, 5);
46080 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 6);
46081 xmlResetLastError();
46082 if (mem_base != xmlMemBlocks()) {
46083 printf("Leak of %d blocks found in xmlTextWriterWriteDTDEntity",
46084 xmlMemBlocks() - mem_base);
46086 printf(" %d", n_writer);
46087 printf(" %d", n_pe);
46088 printf(" %d", n_name);
46089 printf(" %d", n_pubid);
46090 printf(" %d", n_sysid);
46091 printf(" %d", n_ndataid);
46092 printf(" %d", n_content);
46110 test_xmlTextWriterWriteDTDExternalEntity(void) {
46113 #if defined(LIBXML_WRITER_ENABLED)
46116 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
46118 int pe; /* TRUE if this is a parameter entity, FALSE if not */
46120 xmlChar * name; /* the name of the DTD entity */
46122 xmlChar * pubid; /* the public identifier, which is an alternative to the system identifier */
46124 xmlChar * sysid; /* the system identifier, which is the URI of the DTD */
46126 xmlChar * ndataid; /* the xml notation name. */
46129 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
46130 for (n_pe = 0;n_pe < gen_nb_int;n_pe++) {
46131 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
46132 for (n_pubid = 0;n_pubid < gen_nb_const_xmlChar_ptr;n_pubid++) {
46133 for (n_sysid = 0;n_sysid < gen_nb_const_xmlChar_ptr;n_sysid++) {
46134 for (n_ndataid = 0;n_ndataid < gen_nb_const_xmlChar_ptr;n_ndataid++) {
46135 mem_base = xmlMemBlocks();
46136 writer = gen_xmlTextWriterPtr(n_writer, 0);
46137 pe = gen_int(n_pe, 1);
46138 name = gen_const_xmlChar_ptr(n_name, 2);
46139 pubid = gen_const_xmlChar_ptr(n_pubid, 3);
46140 sysid = gen_const_xmlChar_ptr(n_sysid, 4);
46141 ndataid = gen_const_xmlChar_ptr(n_ndataid, 5);
46143 ret_val = xmlTextWriterWriteDTDExternalEntity(writer, pe, (const xmlChar *)name, (const xmlChar *)pubid, (const xmlChar *)sysid, (const xmlChar *)ndataid);
46144 desret_int(ret_val);
46146 des_xmlTextWriterPtr(n_writer, writer, 0);
46147 des_int(n_pe, pe, 1);
46148 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
46149 des_const_xmlChar_ptr(n_pubid, (const xmlChar *)pubid, 3);
46150 des_const_xmlChar_ptr(n_sysid, (const xmlChar *)sysid, 4);
46151 des_const_xmlChar_ptr(n_ndataid, (const xmlChar *)ndataid, 5);
46152 xmlResetLastError();
46153 if (mem_base != xmlMemBlocks()) {
46154 printf("Leak of %d blocks found in xmlTextWriterWriteDTDExternalEntity",
46155 xmlMemBlocks() - mem_base);
46157 printf(" %d", n_writer);
46158 printf(" %d", n_pe);
46159 printf(" %d", n_name);
46160 printf(" %d", n_pubid);
46161 printf(" %d", n_sysid);
46162 printf(" %d", n_ndataid);
46179 test_xmlTextWriterWriteDTDExternalEntityContents(void) {
46182 #if defined(LIBXML_WRITER_ENABLED)
46185 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
46187 xmlChar * pubid; /* the public identifier, which is an alternative to the system identifier */
46189 xmlChar * sysid; /* the system identifier, which is the URI of the DTD */
46191 xmlChar * ndataid; /* the xml notation name. */
46194 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
46195 for (n_pubid = 0;n_pubid < gen_nb_const_xmlChar_ptr;n_pubid++) {
46196 for (n_sysid = 0;n_sysid < gen_nb_const_xmlChar_ptr;n_sysid++) {
46197 for (n_ndataid = 0;n_ndataid < gen_nb_const_xmlChar_ptr;n_ndataid++) {
46198 mem_base = xmlMemBlocks();
46199 writer = gen_xmlTextWriterPtr(n_writer, 0);
46200 pubid = gen_const_xmlChar_ptr(n_pubid, 1);
46201 sysid = gen_const_xmlChar_ptr(n_sysid, 2);
46202 ndataid = gen_const_xmlChar_ptr(n_ndataid, 3);
46204 ret_val = xmlTextWriterWriteDTDExternalEntityContents(writer, (const xmlChar *)pubid, (const xmlChar *)sysid, (const xmlChar *)ndataid);
46205 desret_int(ret_val);
46207 des_xmlTextWriterPtr(n_writer, writer, 0);
46208 des_const_xmlChar_ptr(n_pubid, (const xmlChar *)pubid, 1);
46209 des_const_xmlChar_ptr(n_sysid, (const xmlChar *)sysid, 2);
46210 des_const_xmlChar_ptr(n_ndataid, (const xmlChar *)ndataid, 3);
46211 xmlResetLastError();
46212 if (mem_base != xmlMemBlocks()) {
46213 printf("Leak of %d blocks found in xmlTextWriterWriteDTDExternalEntityContents",
46214 xmlMemBlocks() - mem_base);
46216 printf(" %d", n_writer);
46217 printf(" %d", n_pubid);
46218 printf(" %d", n_sysid);
46219 printf(" %d", n_ndataid);
46234 test_xmlTextWriterWriteDTDInternalEntity(void) {
46237 #if defined(LIBXML_WRITER_ENABLED)
46240 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
46242 int pe; /* TRUE if this is a parameter entity, FALSE if not */
46244 xmlChar * name; /* the name of the DTD entity */
46246 xmlChar * content; /* content of the entity */
46249 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
46250 for (n_pe = 0;n_pe < gen_nb_int;n_pe++) {
46251 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
46252 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
46253 mem_base = xmlMemBlocks();
46254 writer = gen_xmlTextWriterPtr(n_writer, 0);
46255 pe = gen_int(n_pe, 1);
46256 name = gen_const_xmlChar_ptr(n_name, 2);
46257 content = gen_const_xmlChar_ptr(n_content, 3);
46259 ret_val = xmlTextWriterWriteDTDInternalEntity(writer, pe, (const xmlChar *)name, (const xmlChar *)content);
46260 desret_int(ret_val);
46262 des_xmlTextWriterPtr(n_writer, writer, 0);
46263 des_int(n_pe, pe, 1);
46264 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
46265 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 3);
46266 xmlResetLastError();
46267 if (mem_base != xmlMemBlocks()) {
46268 printf("Leak of %d blocks found in xmlTextWriterWriteDTDInternalEntity",
46269 xmlMemBlocks() - mem_base);
46271 printf(" %d", n_writer);
46272 printf(" %d", n_pe);
46273 printf(" %d", n_name);
46274 printf(" %d", n_content);
46289 test_xmlTextWriterWriteDTDNotation(void) {
46292 #if defined(LIBXML_WRITER_ENABLED)
46295 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
46297 xmlChar * name; /* the name of the xml notation */
46299 xmlChar * pubid; /* the public identifier, which is an alternative to the system identifier */
46301 xmlChar * sysid; /* the system identifier, which is the URI of the DTD */
46304 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
46305 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
46306 for (n_pubid = 0;n_pubid < gen_nb_const_xmlChar_ptr;n_pubid++) {
46307 for (n_sysid = 0;n_sysid < gen_nb_const_xmlChar_ptr;n_sysid++) {
46308 mem_base = xmlMemBlocks();
46309 writer = gen_xmlTextWriterPtr(n_writer, 0);
46310 name = gen_const_xmlChar_ptr(n_name, 1);
46311 pubid = gen_const_xmlChar_ptr(n_pubid, 2);
46312 sysid = gen_const_xmlChar_ptr(n_sysid, 3);
46314 ret_val = xmlTextWriterWriteDTDNotation(writer, (const xmlChar *)name, (const xmlChar *)pubid, (const xmlChar *)sysid);
46315 desret_int(ret_val);
46317 des_xmlTextWriterPtr(n_writer, writer, 0);
46318 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
46319 des_const_xmlChar_ptr(n_pubid, (const xmlChar *)pubid, 2);
46320 des_const_xmlChar_ptr(n_sysid, (const xmlChar *)sysid, 3);
46321 xmlResetLastError();
46322 if (mem_base != xmlMemBlocks()) {
46323 printf("Leak of %d blocks found in xmlTextWriterWriteDTDNotation",
46324 xmlMemBlocks() - mem_base);
46326 printf(" %d", n_writer);
46327 printf(" %d", n_name);
46328 printf(" %d", n_pubid);
46329 printf(" %d", n_sysid);
46344 test_xmlTextWriterWriteElement(void) {
46347 #if defined(LIBXML_WRITER_ENABLED)
46350 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
46352 xmlChar * name; /* element name */
46354 xmlChar * content; /* element content */
46357 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
46358 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
46359 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
46360 mem_base = xmlMemBlocks();
46361 writer = gen_xmlTextWriterPtr(n_writer, 0);
46362 name = gen_const_xmlChar_ptr(n_name, 1);
46363 content = gen_const_xmlChar_ptr(n_content, 2);
46365 ret_val = xmlTextWriterWriteElement(writer, (const xmlChar *)name, (const xmlChar *)content);
46366 desret_int(ret_val);
46368 des_xmlTextWriterPtr(n_writer, writer, 0);
46369 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
46370 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 2);
46371 xmlResetLastError();
46372 if (mem_base != xmlMemBlocks()) {
46373 printf("Leak of %d blocks found in xmlTextWriterWriteElement",
46374 xmlMemBlocks() - mem_base);
46376 printf(" %d", n_writer);
46377 printf(" %d", n_name);
46378 printf(" %d", n_content);
46392 test_xmlTextWriterWriteElementNS(void) {
46395 #if defined(LIBXML_WRITER_ENABLED)
46398 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
46400 xmlChar * prefix; /* namespace prefix */
46402 xmlChar * name; /* element local name */
46404 xmlChar * namespaceURI; /* namespace URI */
46405 int n_namespaceURI;
46406 xmlChar * content; /* element content */
46409 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
46410 for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
46411 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
46412 for (n_namespaceURI = 0;n_namespaceURI < gen_nb_const_xmlChar_ptr;n_namespaceURI++) {
46413 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
46414 mem_base = xmlMemBlocks();
46415 writer = gen_xmlTextWriterPtr(n_writer, 0);
46416 prefix = gen_const_xmlChar_ptr(n_prefix, 1);
46417 name = gen_const_xmlChar_ptr(n_name, 2);
46418 namespaceURI = gen_const_xmlChar_ptr(n_namespaceURI, 3);
46419 content = gen_const_xmlChar_ptr(n_content, 4);
46421 ret_val = xmlTextWriterWriteElementNS(writer, (const xmlChar *)prefix, (const xmlChar *)name, (const xmlChar *)namespaceURI, (const xmlChar *)content);
46422 desret_int(ret_val);
46424 des_xmlTextWriterPtr(n_writer, writer, 0);
46425 des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 1);
46426 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
46427 des_const_xmlChar_ptr(n_namespaceURI, (const xmlChar *)namespaceURI, 3);
46428 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 4);
46429 xmlResetLastError();
46430 if (mem_base != xmlMemBlocks()) {
46431 printf("Leak of %d blocks found in xmlTextWriterWriteElementNS",
46432 xmlMemBlocks() - mem_base);
46434 printf(" %d", n_writer);
46435 printf(" %d", n_prefix);
46436 printf(" %d", n_name);
46437 printf(" %d", n_namespaceURI);
46438 printf(" %d", n_content);
46454 test_xmlTextWriterWriteFormatAttribute(void) {
46458 /* missing type support */
46464 test_xmlTextWriterWriteFormatAttributeNS(void) {
46468 /* missing type support */
46474 test_xmlTextWriterWriteFormatCDATA(void) {
46478 /* missing type support */
46484 test_xmlTextWriterWriteFormatComment(void) {
46488 /* missing type support */
46494 test_xmlTextWriterWriteFormatDTD(void) {
46498 /* missing type support */
46504 test_xmlTextWriterWriteFormatDTDAttlist(void) {
46508 /* missing type support */
46514 test_xmlTextWriterWriteFormatDTDElement(void) {
46518 /* missing type support */
46524 test_xmlTextWriterWriteFormatDTDInternalEntity(void) {
46528 /* missing type support */
46534 test_xmlTextWriterWriteFormatElement(void) {
46538 /* missing type support */
46544 test_xmlTextWriterWriteFormatElementNS(void) {
46548 /* missing type support */
46554 test_xmlTextWriterWriteFormatPI(void) {
46558 /* missing type support */
46564 test_xmlTextWriterWriteFormatRaw(void) {
46568 /* missing type support */
46574 test_xmlTextWriterWriteFormatString(void) {
46578 /* missing type support */
46584 test_xmlTextWriterWritePI(void) {
46587 #if defined(LIBXML_WRITER_ENABLED)
46590 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
46592 xmlChar * target; /* PI target */
46594 xmlChar * content; /* PI content */
46597 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
46598 for (n_target = 0;n_target < gen_nb_const_xmlChar_ptr;n_target++) {
46599 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
46600 mem_base = xmlMemBlocks();
46601 writer = gen_xmlTextWriterPtr(n_writer, 0);
46602 target = gen_const_xmlChar_ptr(n_target, 1);
46603 content = gen_const_xmlChar_ptr(n_content, 2);
46605 ret_val = xmlTextWriterWritePI(writer, (const xmlChar *)target, (const xmlChar *)content);
46606 desret_int(ret_val);
46608 des_xmlTextWriterPtr(n_writer, writer, 0);
46609 des_const_xmlChar_ptr(n_target, (const xmlChar *)target, 1);
46610 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 2);
46611 xmlResetLastError();
46612 if (mem_base != xmlMemBlocks()) {
46613 printf("Leak of %d blocks found in xmlTextWriterWritePI",
46614 xmlMemBlocks() - mem_base);
46616 printf(" %d", n_writer);
46617 printf(" %d", n_target);
46618 printf(" %d", n_content);
46632 test_xmlTextWriterWriteRaw(void) {
46635 #if defined(LIBXML_WRITER_ENABLED)
46638 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
46640 xmlChar * content; /* text string */
46643 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
46644 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
46645 mem_base = xmlMemBlocks();
46646 writer = gen_xmlTextWriterPtr(n_writer, 0);
46647 content = gen_const_xmlChar_ptr(n_content, 1);
46649 ret_val = xmlTextWriterWriteRaw(writer, (const xmlChar *)content);
46650 desret_int(ret_val);
46652 des_xmlTextWriterPtr(n_writer, writer, 0);
46653 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
46654 xmlResetLastError();
46655 if (mem_base != xmlMemBlocks()) {
46656 printf("Leak of %d blocks found in xmlTextWriterWriteRaw",
46657 xmlMemBlocks() - mem_base);
46659 printf(" %d", n_writer);
46660 printf(" %d", n_content);
46673 test_xmlTextWriterWriteRawLen(void) {
46676 #if defined(LIBXML_WRITER_ENABLED)
46679 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
46681 xmlChar * content; /* text string */
46683 int len; /* length of the text string */
46686 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
46687 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
46688 for (n_len = 0;n_len < gen_nb_int;n_len++) {
46689 mem_base = xmlMemBlocks();
46690 writer = gen_xmlTextWriterPtr(n_writer, 0);
46691 content = gen_const_xmlChar_ptr(n_content, 1);
46692 len = gen_int(n_len, 2);
46694 ret_val = xmlTextWriterWriteRawLen(writer, (const xmlChar *)content, len);
46695 desret_int(ret_val);
46697 des_xmlTextWriterPtr(n_writer, writer, 0);
46698 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
46699 des_int(n_len, len, 2);
46700 xmlResetLastError();
46701 if (mem_base != xmlMemBlocks()) {
46702 printf("Leak of %d blocks found in xmlTextWriterWriteRawLen",
46703 xmlMemBlocks() - mem_base);
46705 printf(" %d", n_writer);
46706 printf(" %d", n_content);
46707 printf(" %d", n_len);
46721 test_xmlTextWriterWriteString(void) {
46724 #if defined(LIBXML_WRITER_ENABLED)
46727 xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
46729 xmlChar * content; /* text string */
46732 for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
46733 for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
46734 mem_base = xmlMemBlocks();
46735 writer = gen_xmlTextWriterPtr(n_writer, 0);
46736 content = gen_const_xmlChar_ptr(n_content, 1);
46738 ret_val = xmlTextWriterWriteString(writer, (const xmlChar *)content);
46739 desret_int(ret_val);
46741 des_xmlTextWriterPtr(n_writer, writer, 0);
46742 des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
46743 xmlResetLastError();
46744 if (mem_base != xmlMemBlocks()) {
46745 printf("Leak of %d blocks found in xmlTextWriterWriteString",
46746 xmlMemBlocks() - mem_base);
46748 printf(" %d", n_writer);
46749 printf(" %d", n_content);
46762 test_xmlTextWriterWriteVFormatAttribute(void) {
46766 /* missing type support */
46772 test_xmlTextWriterWriteVFormatAttributeNS(void) {
46776 /* missing type support */
46782 test_xmlTextWriterWriteVFormatCDATA(void) {
46786 /* missing type support */
46792 test_xmlTextWriterWriteVFormatComment(void) {
46796 /* missing type support */
46802 test_xmlTextWriterWriteVFormatDTD(void) {
46806 /* missing type support */
46812 test_xmlTextWriterWriteVFormatDTDAttlist(void) {
46816 /* missing type support */
46822 test_xmlTextWriterWriteVFormatDTDElement(void) {
46826 /* missing type support */
46832 test_xmlTextWriterWriteVFormatDTDInternalEntity(void) {
46836 /* missing type support */
46842 test_xmlTextWriterWriteVFormatElement(void) {
46846 /* missing type support */
46852 test_xmlTextWriterWriteVFormatElementNS(void) {
46856 /* missing type support */
46862 test_xmlTextWriterWriteVFormatPI(void) {
46866 /* missing type support */
46872 test_xmlTextWriterWriteVFormatRaw(void) {
46876 /* missing type support */
46882 test_xmlTextWriterWriteVFormatString(void) {
46886 /* missing type support */
46891 test_xmlwriter(void) {
46895 if (quiet == 0) printf("Testing xmlwriter : 52 of 80 functions ...\n");
46896 rc = test_xmlNewTextWriter();
46897 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46898 rc = test_xmlNewTextWriterFilename();
46899 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46900 rc = test_xmlNewTextWriterMemory();
46901 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46902 rc = test_xmlNewTextWriterPushParser();
46903 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46904 rc = test_xmlNewTextWriterTree();
46905 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46906 rc = test_xmlTextWriterEndAttribute();
46907 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46908 rc = test_xmlTextWriterEndCDATA();
46909 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46910 rc = test_xmlTextWriterEndComment();
46911 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46912 rc = test_xmlTextWriterEndDTD();
46913 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46914 rc = test_xmlTextWriterEndDTDAttlist();
46915 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46916 rc = test_xmlTextWriterEndDTDElement();
46917 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46918 rc = test_xmlTextWriterEndDTDEntity();
46919 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46920 rc = test_xmlTextWriterEndDocument();
46921 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46922 rc = test_xmlTextWriterEndElement();
46923 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46924 rc = test_xmlTextWriterEndPI();
46925 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46926 rc = test_xmlTextWriterFlush();
46927 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46928 rc = test_xmlTextWriterFullEndElement();
46929 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46930 rc = test_xmlTextWriterSetIndent();
46931 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46932 rc = test_xmlTextWriterSetIndentString();
46933 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46934 rc = test_xmlTextWriterSetQuoteChar();
46935 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46936 rc = test_xmlTextWriterStartAttribute();
46937 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46938 rc = test_xmlTextWriterStartAttributeNS();
46939 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46940 rc = test_xmlTextWriterStartCDATA();
46941 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46942 rc = test_xmlTextWriterStartComment();
46943 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46944 rc = test_xmlTextWriterStartDTD();
46945 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46946 rc = test_xmlTextWriterStartDTDAttlist();
46947 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46948 rc = test_xmlTextWriterStartDTDElement();
46949 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46950 rc = test_xmlTextWriterStartDTDEntity();
46951 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46952 rc = test_xmlTextWriterStartDocument();
46953 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46954 rc = test_xmlTextWriterStartElement();
46955 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46956 rc = test_xmlTextWriterStartElementNS();
46957 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46958 rc = test_xmlTextWriterStartPI();
46959 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46960 rc = test_xmlTextWriterWriteAttribute();
46961 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46962 rc = test_xmlTextWriterWriteAttributeNS();
46963 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46964 rc = test_xmlTextWriterWriteBase64();
46965 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46966 rc = test_xmlTextWriterWriteBinHex();
46967 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46968 rc = test_xmlTextWriterWriteCDATA();
46969 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46970 rc = test_xmlTextWriterWriteComment();
46971 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46972 rc = test_xmlTextWriterWriteDTD();
46973 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46974 rc = test_xmlTextWriterWriteDTDAttlist();
46975 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46976 rc = test_xmlTextWriterWriteDTDElement();
46977 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46978 rc = test_xmlTextWriterWriteDTDEntity();
46979 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46980 rc = test_xmlTextWriterWriteDTDExternalEntity();
46981 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46982 rc = test_xmlTextWriterWriteDTDExternalEntityContents();
46983 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46984 rc = test_xmlTextWriterWriteDTDInternalEntity();
46985 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46986 rc = test_xmlTextWriterWriteDTDNotation();
46987 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46988 rc = test_xmlTextWriterWriteElement();
46989 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46990 rc = test_xmlTextWriterWriteElementNS();
46991 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46992 rc = test_xmlTextWriterWriteFormatAttribute();
46993 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46994 rc = test_xmlTextWriterWriteFormatAttributeNS();
46995 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46996 rc = test_xmlTextWriterWriteFormatCDATA();
46997 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
46998 rc = test_xmlTextWriterWriteFormatComment();
46999 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47000 rc = test_xmlTextWriterWriteFormatDTD();
47001 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47002 rc = test_xmlTextWriterWriteFormatDTDAttlist();
47003 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47004 rc = test_xmlTextWriterWriteFormatDTDElement();
47005 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47006 rc = test_xmlTextWriterWriteFormatDTDInternalEntity();
47007 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47008 rc = test_xmlTextWriterWriteFormatElement();
47009 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47010 rc = test_xmlTextWriterWriteFormatElementNS();
47011 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47012 rc = test_xmlTextWriterWriteFormatPI();
47013 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47014 rc = test_xmlTextWriterWriteFormatRaw();
47015 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47016 rc = test_xmlTextWriterWriteFormatString();
47017 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47018 rc = test_xmlTextWriterWritePI();
47019 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47020 rc = test_xmlTextWriterWriteRaw();
47021 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47022 rc = test_xmlTextWriterWriteRawLen();
47023 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47024 rc = test_xmlTextWriterWriteString();
47025 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47026 rc = test_xmlTextWriterWriteVFormatAttribute();
47027 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47028 rc = test_xmlTextWriterWriteVFormatAttributeNS();
47029 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47030 rc = test_xmlTextWriterWriteVFormatCDATA();
47031 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47032 rc = test_xmlTextWriterWriteVFormatComment();
47033 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47034 rc = test_xmlTextWriterWriteVFormatDTD();
47035 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47036 rc = test_xmlTextWriterWriteVFormatDTDAttlist();
47037 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47038 rc = test_xmlTextWriterWriteVFormatDTDElement();
47039 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47040 rc = test_xmlTextWriterWriteVFormatDTDInternalEntity();
47041 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47042 rc = test_xmlTextWriterWriteVFormatElement();
47043 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47044 rc = test_xmlTextWriterWriteVFormatElementNS();
47045 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47046 rc = test_xmlTextWriterWriteVFormatPI();
47047 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47048 rc = test_xmlTextWriterWriteVFormatRaw();
47049 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47050 rc = test_xmlTextWriterWriteVFormatString();
47051 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
47054 printf("Module xmlwriter: %d errors\n", test_ret);
47059 test_xmlXPathCastBooleanToNumber(void) {
47062 #if defined(LIBXML_XPATH_ENABLED)
47065 int val; /* a boolean */
47068 for (n_val = 0;n_val < gen_nb_int;n_val++) {
47069 mem_base = xmlMemBlocks();
47070 val = gen_int(n_val, 0);
47072 ret_val = xmlXPathCastBooleanToNumber(val);
47073 desret_double(ret_val);
47075 des_int(n_val, val, 0);
47076 xmlResetLastError();
47077 if (mem_base != xmlMemBlocks()) {
47078 printf("Leak of %d blocks found in xmlXPathCastBooleanToNumber",
47079 xmlMemBlocks() - mem_base);
47081 printf(" %d", n_val);
47093 test_xmlXPathCastBooleanToString(void) {
47096 #if defined(LIBXML_XPATH_ENABLED)
47099 int val; /* a boolean */
47102 for (n_val = 0;n_val < gen_nb_int;n_val++) {
47103 mem_base = xmlMemBlocks();
47104 val = gen_int(n_val, 0);
47106 ret_val = xmlXPathCastBooleanToString(val);
47107 desret_xmlChar_ptr(ret_val);
47109 des_int(n_val, val, 0);
47110 xmlResetLastError();
47111 if (mem_base != xmlMemBlocks()) {
47112 printf("Leak of %d blocks found in xmlXPathCastBooleanToString",
47113 xmlMemBlocks() - mem_base);
47115 printf(" %d", n_val);
47127 test_xmlXPathCastNodeSetToBoolean(void) {
47130 #if defined(LIBXML_XPATH_ENABLED)
47133 xmlNodeSetPtr ns; /* a node-set */
47136 for (n_ns = 0;n_ns < gen_nb_xmlNodeSetPtr;n_ns++) {
47137 mem_base = xmlMemBlocks();
47138 ns = gen_xmlNodeSetPtr(n_ns, 0);
47140 ret_val = xmlXPathCastNodeSetToBoolean(ns);
47141 desret_int(ret_val);
47143 des_xmlNodeSetPtr(n_ns, ns, 0);
47144 xmlResetLastError();
47145 if (mem_base != xmlMemBlocks()) {
47146 printf("Leak of %d blocks found in xmlXPathCastNodeSetToBoolean",
47147 xmlMemBlocks() - mem_base);
47149 printf(" %d", n_ns);
47161 test_xmlXPathCastNodeSetToNumber(void) {
47164 #if defined(LIBXML_XPATH_ENABLED)
47167 xmlNodeSetPtr ns; /* a node-set */
47170 for (n_ns = 0;n_ns < gen_nb_xmlNodeSetPtr;n_ns++) {
47171 mem_base = xmlMemBlocks();
47172 ns = gen_xmlNodeSetPtr(n_ns, 0);
47174 ret_val = xmlXPathCastNodeSetToNumber(ns);
47175 desret_double(ret_val);
47177 des_xmlNodeSetPtr(n_ns, ns, 0);
47178 xmlResetLastError();
47179 if (mem_base != xmlMemBlocks()) {
47180 printf("Leak of %d blocks found in xmlXPathCastNodeSetToNumber",
47181 xmlMemBlocks() - mem_base);
47183 printf(" %d", n_ns);
47195 test_xmlXPathCastNodeSetToString(void) {
47198 #if defined(LIBXML_XPATH_ENABLED)
47201 xmlNodeSetPtr ns; /* a node-set */
47204 for (n_ns = 0;n_ns < gen_nb_xmlNodeSetPtr;n_ns++) {
47205 mem_base = xmlMemBlocks();
47206 ns = gen_xmlNodeSetPtr(n_ns, 0);
47208 ret_val = xmlXPathCastNodeSetToString(ns);
47209 desret_xmlChar_ptr(ret_val);
47211 des_xmlNodeSetPtr(n_ns, ns, 0);
47212 xmlResetLastError();
47213 if (mem_base != xmlMemBlocks()) {
47214 printf("Leak of %d blocks found in xmlXPathCastNodeSetToString",
47215 xmlMemBlocks() - mem_base);
47217 printf(" %d", n_ns);
47229 test_xmlXPathCastNodeToNumber(void) {
47232 #if defined(LIBXML_XPATH_ENABLED)
47235 xmlNodePtr node; /* a node */
47238 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
47239 mem_base = xmlMemBlocks();
47240 node = gen_xmlNodePtr(n_node, 0);
47242 ret_val = xmlXPathCastNodeToNumber(node);
47243 desret_double(ret_val);
47245 des_xmlNodePtr(n_node, node, 0);
47246 xmlResetLastError();
47247 if (mem_base != xmlMemBlocks()) {
47248 printf("Leak of %d blocks found in xmlXPathCastNodeToNumber",
47249 xmlMemBlocks() - mem_base);
47251 printf(" %d", n_node);
47263 test_xmlXPathCastNodeToString(void) {
47266 #if defined(LIBXML_XPATH_ENABLED)
47269 xmlNodePtr node; /* a node */
47272 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
47273 mem_base = xmlMemBlocks();
47274 node = gen_xmlNodePtr(n_node, 0);
47276 ret_val = xmlXPathCastNodeToString(node);
47277 desret_xmlChar_ptr(ret_val);
47279 des_xmlNodePtr(n_node, node, 0);
47280 xmlResetLastError();
47281 if (mem_base != xmlMemBlocks()) {
47282 printf("Leak of %d blocks found in xmlXPathCastNodeToString",
47283 xmlMemBlocks() - mem_base);
47285 printf(" %d", n_node);
47297 test_xmlXPathCastNumberToBoolean(void) {
47300 #if defined(LIBXML_XPATH_ENABLED)
47303 double val; /* a number */
47306 for (n_val = 0;n_val < gen_nb_double;n_val++) {
47307 mem_base = xmlMemBlocks();
47308 val = gen_double(n_val, 0);
47310 ret_val = xmlXPathCastNumberToBoolean(val);
47311 desret_int(ret_val);
47313 des_double(n_val, val, 0);
47314 xmlResetLastError();
47315 if (mem_base != xmlMemBlocks()) {
47316 printf("Leak of %d blocks found in xmlXPathCastNumberToBoolean",
47317 xmlMemBlocks() - mem_base);
47319 printf(" %d", n_val);
47331 test_xmlXPathCastNumberToString(void) {
47334 #if defined(LIBXML_XPATH_ENABLED)
47337 double val; /* a number */
47340 for (n_val = 0;n_val < gen_nb_double;n_val++) {
47341 mem_base = xmlMemBlocks();
47342 val = gen_double(n_val, 0);
47344 ret_val = xmlXPathCastNumberToString(val);
47345 desret_xmlChar_ptr(ret_val);
47347 des_double(n_val, val, 0);
47348 xmlResetLastError();
47349 if (mem_base != xmlMemBlocks()) {
47350 printf("Leak of %d blocks found in xmlXPathCastNumberToString",
47351 xmlMemBlocks() - mem_base);
47353 printf(" %d", n_val);
47365 test_xmlXPathCastStringToBoolean(void) {
47368 #if defined(LIBXML_XPATH_ENABLED)
47371 xmlChar * val; /* a string */
47374 for (n_val = 0;n_val < gen_nb_const_xmlChar_ptr;n_val++) {
47375 mem_base = xmlMemBlocks();
47376 val = gen_const_xmlChar_ptr(n_val, 0);
47378 ret_val = xmlXPathCastStringToBoolean((const xmlChar *)val);
47379 desret_int(ret_val);
47381 des_const_xmlChar_ptr(n_val, (const xmlChar *)val, 0);
47382 xmlResetLastError();
47383 if (mem_base != xmlMemBlocks()) {
47384 printf("Leak of %d blocks found in xmlXPathCastStringToBoolean",
47385 xmlMemBlocks() - mem_base);
47387 printf(" %d", n_val);
47399 test_xmlXPathCastStringToNumber(void) {
47402 #if defined(LIBXML_XPATH_ENABLED)
47405 xmlChar * val; /* a string */
47408 for (n_val = 0;n_val < gen_nb_const_xmlChar_ptr;n_val++) {
47409 mem_base = xmlMemBlocks();
47410 val = gen_const_xmlChar_ptr(n_val, 0);
47412 ret_val = xmlXPathCastStringToNumber((const xmlChar *)val);
47413 desret_double(ret_val);
47415 des_const_xmlChar_ptr(n_val, (const xmlChar *)val, 0);
47416 xmlResetLastError();
47417 if (mem_base != xmlMemBlocks()) {
47418 printf("Leak of %d blocks found in xmlXPathCastStringToNumber",
47419 xmlMemBlocks() - mem_base);
47421 printf(" %d", n_val);
47433 test_xmlXPathCastToBoolean(void) {
47436 #if defined(LIBXML_XPATH_ENABLED)
47439 xmlXPathObjectPtr val; /* an XPath object */
47442 for (n_val = 0;n_val < gen_nb_xmlXPathObjectPtr;n_val++) {
47443 mem_base = xmlMemBlocks();
47444 val = gen_xmlXPathObjectPtr(n_val, 0);
47446 ret_val = xmlXPathCastToBoolean(val);
47447 desret_int(ret_val);
47449 des_xmlXPathObjectPtr(n_val, val, 0);
47450 xmlResetLastError();
47451 if (mem_base != xmlMemBlocks()) {
47452 printf("Leak of %d blocks found in xmlXPathCastToBoolean",
47453 xmlMemBlocks() - mem_base);
47455 printf(" %d", n_val);
47467 test_xmlXPathCastToNumber(void) {
47470 #if defined(LIBXML_XPATH_ENABLED)
47473 xmlXPathObjectPtr val; /* an XPath object */
47476 for (n_val = 0;n_val < gen_nb_xmlXPathObjectPtr;n_val++) {
47477 mem_base = xmlMemBlocks();
47478 val = gen_xmlXPathObjectPtr(n_val, 0);
47480 ret_val = xmlXPathCastToNumber(val);
47481 desret_double(ret_val);
47483 des_xmlXPathObjectPtr(n_val, val, 0);
47484 xmlResetLastError();
47485 if (mem_base != xmlMemBlocks()) {
47486 printf("Leak of %d blocks found in xmlXPathCastToNumber",
47487 xmlMemBlocks() - mem_base);
47489 printf(" %d", n_val);
47501 test_xmlXPathCastToString(void) {
47504 #if defined(LIBXML_XPATH_ENABLED)
47507 xmlXPathObjectPtr val; /* an XPath object */
47510 for (n_val = 0;n_val < gen_nb_xmlXPathObjectPtr;n_val++) {
47511 mem_base = xmlMemBlocks();
47512 val = gen_xmlXPathObjectPtr(n_val, 0);
47514 ret_val = xmlXPathCastToString(val);
47515 desret_xmlChar_ptr(ret_val);
47517 des_xmlXPathObjectPtr(n_val, val, 0);
47518 xmlResetLastError();
47519 if (mem_base != xmlMemBlocks()) {
47520 printf("Leak of %d blocks found in xmlXPathCastToString",
47521 xmlMemBlocks() - mem_base);
47523 printf(" %d", n_val);
47535 test_xmlXPathCmpNodes(void) {
47538 #if defined(LIBXML_XPATH_ENABLED)
47541 xmlNodePtr node1; /* the first node */
47543 xmlNodePtr node2; /* the second node */
47546 for (n_node1 = 0;n_node1 < gen_nb_xmlNodePtr;n_node1++) {
47547 for (n_node2 = 0;n_node2 < gen_nb_xmlNodePtr;n_node2++) {
47548 mem_base = xmlMemBlocks();
47549 node1 = gen_xmlNodePtr(n_node1, 0);
47550 node2 = gen_xmlNodePtr(n_node2, 1);
47552 ret_val = xmlXPathCmpNodes(node1, node2);
47553 desret_int(ret_val);
47555 des_xmlNodePtr(n_node1, node1, 0);
47556 des_xmlNodePtr(n_node2, node2, 1);
47557 xmlResetLastError();
47558 if (mem_base != xmlMemBlocks()) {
47559 printf("Leak of %d blocks found in xmlXPathCmpNodes",
47560 xmlMemBlocks() - mem_base);
47562 printf(" %d", n_node1);
47563 printf(" %d", n_node2);
47576 test_xmlXPathCompile(void) {
47580 /* missing type support */
47584 #ifdef LIBXML_XPATH_ENABLED
47586 #define gen_nb_xmlXPathCompExprPtr 1
47587 static xmlXPathCompExprPtr gen_xmlXPathCompExprPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
47590 static void des_xmlXPathCompExprPtr(int no ATTRIBUTE_UNUSED, xmlXPathCompExprPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
47594 #ifdef LIBXML_XPATH_ENABLED
47596 #define gen_nb_xmlXPathContextPtr 1
47597 static xmlXPathContextPtr gen_xmlXPathContextPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
47600 static void des_xmlXPathContextPtr(int no ATTRIBUTE_UNUSED, xmlXPathContextPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
47606 test_xmlXPathCompiledEval(void) {
47609 #if defined(LIBXML_XPATH_ENABLED)
47611 xmlXPathObjectPtr ret_val;
47612 xmlXPathCompExprPtr comp; /* the compiled XPath expression */
47614 xmlXPathContextPtr ctx; /* the XPath context */
47617 for (n_comp = 0;n_comp < gen_nb_xmlXPathCompExprPtr;n_comp++) {
47618 for (n_ctx = 0;n_ctx < gen_nb_xmlXPathContextPtr;n_ctx++) {
47619 mem_base = xmlMemBlocks();
47620 comp = gen_xmlXPathCompExprPtr(n_comp, 0);
47621 ctx = gen_xmlXPathContextPtr(n_ctx, 1);
47623 ret_val = xmlXPathCompiledEval(comp, ctx);
47624 desret_xmlXPathObjectPtr(ret_val);
47626 des_xmlXPathCompExprPtr(n_comp, comp, 0);
47627 des_xmlXPathContextPtr(n_ctx, ctx, 1);
47628 xmlResetLastError();
47629 if (mem_base != xmlMemBlocks()) {
47630 printf("Leak of %d blocks found in xmlXPathCompiledEval",
47631 xmlMemBlocks() - mem_base);
47633 printf(" %d", n_comp);
47634 printf(" %d", n_ctx);
47647 test_xmlXPathCompiledEvalToBoolean(void) {
47650 #if defined(LIBXML_XPATH_ENABLED)
47653 xmlXPathCompExprPtr comp; /* the compiled XPath expression */
47655 xmlXPathContextPtr ctxt; /* the XPath context */
47658 for (n_comp = 0;n_comp < gen_nb_xmlXPathCompExprPtr;n_comp++) {
47659 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathContextPtr;n_ctxt++) {
47660 mem_base = xmlMemBlocks();
47661 comp = gen_xmlXPathCompExprPtr(n_comp, 0);
47662 ctxt = gen_xmlXPathContextPtr(n_ctxt, 1);
47664 ret_val = xmlXPathCompiledEvalToBoolean(comp, ctxt);
47665 desret_int(ret_val);
47667 des_xmlXPathCompExprPtr(n_comp, comp, 0);
47668 des_xmlXPathContextPtr(n_ctxt, ctxt, 1);
47669 xmlResetLastError();
47670 if (mem_base != xmlMemBlocks()) {
47671 printf("Leak of %d blocks found in xmlXPathCompiledEvalToBoolean",
47672 xmlMemBlocks() - mem_base);
47674 printf(" %d", n_comp);
47675 printf(" %d", n_ctxt);
47688 test_xmlXPathContextSetCache(void) {
47691 #if defined(LIBXML_XPATH_ENABLED)
47694 xmlXPathContextPtr ctxt; /* the XPath context */
47696 int active; /* enables/disables (creates/frees) the cache */
47698 int value; /* a value with semantics dependant on @options */
47700 int options; /* options (currently only the value 0 is used) */
47703 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathContextPtr;n_ctxt++) {
47704 for (n_active = 0;n_active < gen_nb_int;n_active++) {
47705 for (n_value = 0;n_value < gen_nb_int;n_value++) {
47706 for (n_options = 0;n_options < gen_nb_int;n_options++) {
47707 mem_base = xmlMemBlocks();
47708 ctxt = gen_xmlXPathContextPtr(n_ctxt, 0);
47709 active = gen_int(n_active, 1);
47710 value = gen_int(n_value, 2);
47711 options = gen_int(n_options, 3);
47713 ret_val = xmlXPathContextSetCache(ctxt, active, value, options);
47714 desret_int(ret_val);
47716 des_xmlXPathContextPtr(n_ctxt, ctxt, 0);
47717 des_int(n_active, active, 1);
47718 des_int(n_value, value, 2);
47719 des_int(n_options, options, 3);
47720 xmlResetLastError();
47721 if (mem_base != xmlMemBlocks()) {
47722 printf("Leak of %d blocks found in xmlXPathContextSetCache",
47723 xmlMemBlocks() - mem_base);
47725 printf(" %d", n_ctxt);
47726 printf(" %d", n_active);
47727 printf(" %d", n_value);
47728 printf(" %d", n_options);
47743 test_xmlXPathConvertBoolean(void) {
47746 #if defined(LIBXML_XPATH_ENABLED)
47748 xmlXPathObjectPtr ret_val;
47749 xmlXPathObjectPtr val; /* an XPath object */
47752 for (n_val = 0;n_val < gen_nb_xmlXPathObjectPtr;n_val++) {
47753 mem_base = xmlMemBlocks();
47754 val = gen_xmlXPathObjectPtr(n_val, 0);
47756 ret_val = xmlXPathConvertBoolean(val);
47758 desret_xmlXPathObjectPtr(ret_val);
47760 des_xmlXPathObjectPtr(n_val, val, 0);
47761 xmlResetLastError();
47762 if (mem_base != xmlMemBlocks()) {
47763 printf("Leak of %d blocks found in xmlXPathConvertBoolean",
47764 xmlMemBlocks() - mem_base);
47766 printf(" %d", n_val);
47778 test_xmlXPathConvertNumber(void) {
47781 #if defined(LIBXML_XPATH_ENABLED)
47783 xmlXPathObjectPtr ret_val;
47784 xmlXPathObjectPtr val; /* an XPath object */
47787 for (n_val = 0;n_val < gen_nb_xmlXPathObjectPtr;n_val++) {
47788 mem_base = xmlMemBlocks();
47789 val = gen_xmlXPathObjectPtr(n_val, 0);
47791 ret_val = xmlXPathConvertNumber(val);
47793 desret_xmlXPathObjectPtr(ret_val);
47795 des_xmlXPathObjectPtr(n_val, val, 0);
47796 xmlResetLastError();
47797 if (mem_base != xmlMemBlocks()) {
47798 printf("Leak of %d blocks found in xmlXPathConvertNumber",
47799 xmlMemBlocks() - mem_base);
47801 printf(" %d", n_val);
47813 test_xmlXPathConvertString(void) {
47816 #if defined(LIBXML_XPATH_ENABLED)
47818 xmlXPathObjectPtr ret_val;
47819 xmlXPathObjectPtr val; /* an XPath object */
47822 for (n_val = 0;n_val < gen_nb_xmlXPathObjectPtr;n_val++) {
47823 mem_base = xmlMemBlocks();
47824 val = gen_xmlXPathObjectPtr(n_val, 0);
47826 ret_val = xmlXPathConvertString(val);
47828 desret_xmlXPathObjectPtr(ret_val);
47830 des_xmlXPathObjectPtr(n_val, val, 0);
47831 xmlResetLastError();
47832 if (mem_base != xmlMemBlocks()) {
47833 printf("Leak of %d blocks found in xmlXPathConvertString",
47834 xmlMemBlocks() - mem_base);
47836 printf(" %d", n_val);
47848 test_xmlXPathCtxtCompile(void) {
47852 /* missing type support */
47858 test_xmlXPathEval(void) {
47861 #if defined(LIBXML_XPATH_ENABLED)
47863 xmlXPathObjectPtr ret_val;
47864 xmlChar * str; /* the XPath expression */
47866 xmlXPathContextPtr ctx; /* the XPath context */
47869 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
47870 for (n_ctx = 0;n_ctx < gen_nb_xmlXPathContextPtr;n_ctx++) {
47871 mem_base = xmlMemBlocks();
47872 str = gen_const_xmlChar_ptr(n_str, 0);
47873 ctx = gen_xmlXPathContextPtr(n_ctx, 1);
47875 ret_val = xmlXPathEval((const xmlChar *)str, ctx);
47876 desret_xmlXPathObjectPtr(ret_val);
47878 des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 0);
47879 des_xmlXPathContextPtr(n_ctx, ctx, 1);
47880 xmlResetLastError();
47881 if (mem_base != xmlMemBlocks()) {
47882 printf("Leak of %d blocks found in xmlXPathEval",
47883 xmlMemBlocks() - mem_base);
47885 printf(" %d", n_str);
47886 printf(" %d", n_ctx);
47899 test_xmlXPathEvalExpression(void) {
47902 #if defined(LIBXML_XPATH_ENABLED)
47904 xmlXPathObjectPtr ret_val;
47905 xmlChar * str; /* the XPath expression */
47907 xmlXPathContextPtr ctxt; /* the XPath context */
47910 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
47911 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathContextPtr;n_ctxt++) {
47912 mem_base = xmlMemBlocks();
47913 str = gen_const_xmlChar_ptr(n_str, 0);
47914 ctxt = gen_xmlXPathContextPtr(n_ctxt, 1);
47916 ret_val = xmlXPathEvalExpression((const xmlChar *)str, ctxt);
47917 desret_xmlXPathObjectPtr(ret_val);
47919 des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 0);
47920 des_xmlXPathContextPtr(n_ctxt, ctxt, 1);
47921 xmlResetLastError();
47922 if (mem_base != xmlMemBlocks()) {
47923 printf("Leak of %d blocks found in xmlXPathEvalExpression",
47924 xmlMemBlocks() - mem_base);
47926 printf(" %d", n_str);
47927 printf(" %d", n_ctxt);
47940 test_xmlXPathEvalPredicate(void) {
47943 #if defined(LIBXML_XPATH_ENABLED)
47946 xmlXPathContextPtr ctxt; /* the XPath context */
47948 xmlXPathObjectPtr res; /* the Predicate Expression evaluation result */
47951 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathContextPtr;n_ctxt++) {
47952 for (n_res = 0;n_res < gen_nb_xmlXPathObjectPtr;n_res++) {
47953 mem_base = xmlMemBlocks();
47954 ctxt = gen_xmlXPathContextPtr(n_ctxt, 0);
47955 res = gen_xmlXPathObjectPtr(n_res, 1);
47957 ret_val = xmlXPathEvalPredicate(ctxt, res);
47958 desret_int(ret_val);
47960 des_xmlXPathContextPtr(n_ctxt, ctxt, 0);
47961 des_xmlXPathObjectPtr(n_res, res, 1);
47962 xmlResetLastError();
47963 if (mem_base != xmlMemBlocks()) {
47964 printf("Leak of %d blocks found in xmlXPathEvalPredicate",
47965 xmlMemBlocks() - mem_base);
47967 printf(" %d", n_ctxt);
47968 printf(" %d", n_res);
47981 test_xmlXPathInit(void) {
47984 #if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
47987 mem_base = xmlMemBlocks();
47991 xmlResetLastError();
47992 if (mem_base != xmlMemBlocks()) {
47993 printf("Leak of %d blocks found in xmlXPathInit",
47994 xmlMemBlocks() - mem_base);
48006 test_xmlXPathIsInf(void) {
48009 #if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
48012 double val; /* a double value */
48015 for (n_val = 0;n_val < gen_nb_double;n_val++) {
48016 mem_base = xmlMemBlocks();
48017 val = gen_double(n_val, 0);
48019 ret_val = xmlXPathIsInf(val);
48020 desret_int(ret_val);
48022 des_double(n_val, val, 0);
48023 xmlResetLastError();
48024 if (mem_base != xmlMemBlocks()) {
48025 printf("Leak of %d blocks found in xmlXPathIsInf",
48026 xmlMemBlocks() - mem_base);
48028 printf(" %d", n_val);
48040 test_xmlXPathIsNaN(void) {
48043 #if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
48046 double val; /* a double value */
48049 for (n_val = 0;n_val < gen_nb_double;n_val++) {
48050 mem_base = xmlMemBlocks();
48051 val = gen_double(n_val, 0);
48053 ret_val = xmlXPathIsNaN(val);
48054 desret_int(ret_val);
48056 des_double(n_val, val, 0);
48057 xmlResetLastError();
48058 if (mem_base != xmlMemBlocks()) {
48059 printf("Leak of %d blocks found in xmlXPathIsNaN",
48060 xmlMemBlocks() - mem_base);
48062 printf(" %d", n_val);
48074 test_xmlXPathNewContext(void) {
48078 /* missing type support */
48084 test_xmlXPathNodeEval(void) {
48087 #if defined(LIBXML_XPATH_ENABLED)
48089 xmlXPathObjectPtr ret_val;
48090 xmlNodePtr node; /* the node to to use as the context node */
48092 xmlChar * str; /* the XPath expression */
48094 xmlXPathContextPtr ctx; /* the XPath context */
48097 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
48098 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
48099 for (n_ctx = 0;n_ctx < gen_nb_xmlXPathContextPtr;n_ctx++) {
48100 mem_base = xmlMemBlocks();
48101 node = gen_xmlNodePtr(n_node, 0);
48102 str = gen_const_xmlChar_ptr(n_str, 1);
48103 ctx = gen_xmlXPathContextPtr(n_ctx, 2);
48105 ret_val = xmlXPathNodeEval(node, (const xmlChar *)str, ctx);
48106 desret_xmlXPathObjectPtr(ret_val);
48108 des_xmlNodePtr(n_node, node, 0);
48109 des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 1);
48110 des_xmlXPathContextPtr(n_ctx, ctx, 2);
48111 xmlResetLastError();
48112 if (mem_base != xmlMemBlocks()) {
48113 printf("Leak of %d blocks found in xmlXPathNodeEval",
48114 xmlMemBlocks() - mem_base);
48116 printf(" %d", n_node);
48117 printf(" %d", n_str);
48118 printf(" %d", n_ctx);
48132 test_xmlXPathNodeSetCreate(void) {
48135 #if defined(LIBXML_XPATH_ENABLED)
48137 xmlNodeSetPtr ret_val;
48138 xmlNodePtr val; /* an initial xmlNodePtr, or NULL */
48141 for (n_val = 0;n_val < gen_nb_xmlNodePtr;n_val++) {
48142 mem_base = xmlMemBlocks();
48143 val = gen_xmlNodePtr(n_val, 0);
48145 ret_val = xmlXPathNodeSetCreate(val);
48146 desret_xmlNodeSetPtr(ret_val);
48148 des_xmlNodePtr(n_val, val, 0);
48149 xmlResetLastError();
48150 if (mem_base != xmlMemBlocks()) {
48151 printf("Leak of %d blocks found in xmlXPathNodeSetCreate",
48152 xmlMemBlocks() - mem_base);
48154 printf(" %d", n_val);
48166 test_xmlXPathObjectCopy(void) {
48169 #if defined(LIBXML_XPATH_ENABLED)
48171 xmlXPathObjectPtr ret_val;
48172 xmlXPathObjectPtr val; /* the original object */
48175 for (n_val = 0;n_val < gen_nb_xmlXPathObjectPtr;n_val++) {
48176 mem_base = xmlMemBlocks();
48177 val = gen_xmlXPathObjectPtr(n_val, 0);
48179 ret_val = xmlXPathObjectCopy(val);
48180 desret_xmlXPathObjectPtr(ret_val);
48182 des_xmlXPathObjectPtr(n_val, val, 0);
48183 xmlResetLastError();
48184 if (mem_base != xmlMemBlocks()) {
48185 printf("Leak of %d blocks found in xmlXPathObjectCopy",
48186 xmlMemBlocks() - mem_base);
48188 printf(" %d", n_val);
48200 test_xmlXPathOrderDocElems(void) {
48203 #if defined(LIBXML_XPATH_ENABLED)
48206 xmlDocPtr doc; /* an input document */
48209 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
48210 mem_base = xmlMemBlocks();
48211 doc = gen_xmlDocPtr(n_doc, 0);
48213 ret_val = xmlXPathOrderDocElems(doc);
48214 desret_long(ret_val);
48216 des_xmlDocPtr(n_doc, doc, 0);
48217 xmlResetLastError();
48218 if (mem_base != xmlMemBlocks()) {
48219 printf("Leak of %d blocks found in xmlXPathOrderDocElems",
48220 xmlMemBlocks() - mem_base);
48222 printf(" %d", n_doc);
48234 test_xmlXPathSetContextNode(void) {
48237 #if defined(LIBXML_XPATH_ENABLED)
48240 xmlNodePtr node; /* the node to to use as the context node */
48242 xmlXPathContextPtr ctx; /* the XPath context */
48245 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
48246 for (n_ctx = 0;n_ctx < gen_nb_xmlXPathContextPtr;n_ctx++) {
48247 mem_base = xmlMemBlocks();
48248 node = gen_xmlNodePtr(n_node, 0);
48249 ctx = gen_xmlXPathContextPtr(n_ctx, 1);
48251 ret_val = xmlXPathSetContextNode(node, ctx);
48252 desret_int(ret_val);
48254 des_xmlNodePtr(n_node, node, 0);
48255 des_xmlXPathContextPtr(n_ctx, ctx, 1);
48256 xmlResetLastError();
48257 if (mem_base != xmlMemBlocks()) {
48258 printf("Leak of %d blocks found in xmlXPathSetContextNode",
48259 xmlMemBlocks() - mem_base);
48261 printf(" %d", n_node);
48262 printf(" %d", n_ctx);
48278 if (quiet == 0) printf("Testing xpath : 32 of 40 functions ...\n");
48279 rc = test_xmlXPathCastBooleanToNumber();
48280 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48281 rc = test_xmlXPathCastBooleanToString();
48282 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48283 rc = test_xmlXPathCastNodeSetToBoolean();
48284 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48285 rc = test_xmlXPathCastNodeSetToNumber();
48286 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48287 rc = test_xmlXPathCastNodeSetToString();
48288 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48289 rc = test_xmlXPathCastNodeToNumber();
48290 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48291 rc = test_xmlXPathCastNodeToString();
48292 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48293 rc = test_xmlXPathCastNumberToBoolean();
48294 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48295 rc = test_xmlXPathCastNumberToString();
48296 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48297 rc = test_xmlXPathCastStringToBoolean();
48298 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48299 rc = test_xmlXPathCastStringToNumber();
48300 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48301 rc = test_xmlXPathCastToBoolean();
48302 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48303 rc = test_xmlXPathCastToNumber();
48304 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48305 rc = test_xmlXPathCastToString();
48306 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48307 rc = test_xmlXPathCmpNodes();
48308 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48309 rc = test_xmlXPathCompile();
48310 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48311 rc = test_xmlXPathCompiledEval();
48312 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48313 rc = test_xmlXPathCompiledEvalToBoolean();
48314 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48315 rc = test_xmlXPathContextSetCache();
48316 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48317 rc = test_xmlXPathConvertBoolean();
48318 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48319 rc = test_xmlXPathConvertNumber();
48320 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48321 rc = test_xmlXPathConvertString();
48322 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48323 rc = test_xmlXPathCtxtCompile();
48324 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48325 rc = test_xmlXPathEval();
48326 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48327 rc = test_xmlXPathEvalExpression();
48328 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48329 rc = test_xmlXPathEvalPredicate();
48330 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48331 rc = test_xmlXPathInit();
48332 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48333 rc = test_xmlXPathIsInf();
48334 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48335 rc = test_xmlXPathIsNaN();
48336 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48337 rc = test_xmlXPathNewContext();
48338 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48339 rc = test_xmlXPathNodeEval();
48340 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48341 rc = test_xmlXPathNodeSetCreate();
48342 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48343 rc = test_xmlXPathObjectCopy();
48344 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48345 rc = test_xmlXPathOrderDocElems();
48346 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48347 rc = test_xmlXPathSetContextNode();
48348 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
48351 printf("Module xpath: %d errors\n", test_ret);
48354 #ifdef LIBXML_XPATH_ENABLED
48356 #define gen_nb_xmlXPathParserContextPtr 1
48357 static xmlXPathParserContextPtr gen_xmlXPathParserContextPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
48360 static void des_xmlXPathParserContextPtr(int no ATTRIBUTE_UNUSED, xmlXPathParserContextPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
48366 test_valuePop(void) {
48369 #if defined(LIBXML_XPATH_ENABLED)
48371 xmlXPathObjectPtr ret_val;
48372 xmlXPathParserContextPtr ctxt; /* an XPath evaluation context */
48375 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
48376 mem_base = xmlMemBlocks();
48377 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
48379 ret_val = valuePop(ctxt);
48380 desret_xmlXPathObjectPtr(ret_val);
48382 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
48383 xmlResetLastError();
48384 if (mem_base != xmlMemBlocks()) {
48385 printf("Leak of %d blocks found in valuePop",
48386 xmlMemBlocks() - mem_base);
48388 printf(" %d", n_ctxt);
48400 test_valuePush(void) {
48403 #if defined(LIBXML_XPATH_ENABLED)
48406 xmlXPathParserContextPtr ctxt; /* an XPath evaluation context */
48408 xmlXPathObjectPtr value; /* the XPath object */
48411 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
48412 for (n_value = 0;n_value < gen_nb_xmlXPathObjectPtr;n_value++) {
48413 mem_base = xmlMemBlocks();
48414 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
48415 value = gen_xmlXPathObjectPtr(n_value, 1);
48417 ret_val = valuePush(ctxt, value);
48418 desret_int(ret_val);
48420 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
48421 des_xmlXPathObjectPtr(n_value, value, 1);
48422 xmlResetLastError();
48423 if (mem_base != xmlMemBlocks()) {
48424 printf("Leak of %d blocks found in valuePush",
48425 xmlMemBlocks() - mem_base);
48427 printf(" %d", n_ctxt);
48428 printf(" %d", n_value);
48441 test_xmlXPathAddValues(void) {
48444 #if defined(LIBXML_XPATH_ENABLED)
48446 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
48449 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
48450 mem_base = xmlMemBlocks();
48451 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
48453 xmlXPathAddValues(ctxt);
48455 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
48456 xmlResetLastError();
48457 if (mem_base != xmlMemBlocks()) {
48458 printf("Leak of %d blocks found in xmlXPathAddValues",
48459 xmlMemBlocks() - mem_base);
48461 printf(" %d", n_ctxt);
48473 test_xmlXPathBooleanFunction(void) {
48476 #if defined(LIBXML_XPATH_ENABLED)
48478 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
48480 int nargs; /* the number of arguments */
48483 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
48484 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
48485 mem_base = xmlMemBlocks();
48486 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
48487 nargs = gen_int(n_nargs, 1);
48489 xmlXPathBooleanFunction(ctxt, nargs);
48491 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
48492 des_int(n_nargs, nargs, 1);
48493 xmlResetLastError();
48494 if (mem_base != xmlMemBlocks()) {
48495 printf("Leak of %d blocks found in xmlXPathBooleanFunction",
48496 xmlMemBlocks() - mem_base);
48498 printf(" %d", n_ctxt);
48499 printf(" %d", n_nargs);
48512 test_xmlXPathCeilingFunction(void) {
48515 #if defined(LIBXML_XPATH_ENABLED)
48517 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
48519 int nargs; /* the number of arguments */
48522 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
48523 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
48524 mem_base = xmlMemBlocks();
48525 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
48526 nargs = gen_int(n_nargs, 1);
48528 xmlXPathCeilingFunction(ctxt, nargs);
48530 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
48531 des_int(n_nargs, nargs, 1);
48532 xmlResetLastError();
48533 if (mem_base != xmlMemBlocks()) {
48534 printf("Leak of %d blocks found in xmlXPathCeilingFunction",
48535 xmlMemBlocks() - mem_base);
48537 printf(" %d", n_ctxt);
48538 printf(" %d", n_nargs);
48551 test_xmlXPathCompareValues(void) {
48554 #if defined(LIBXML_XPATH_ENABLED)
48557 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
48559 int inf; /* less than (1) or greater than (0) */
48561 int strict; /* is the comparison strict */
48564 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
48565 for (n_inf = 0;n_inf < gen_nb_int;n_inf++) {
48566 for (n_strict = 0;n_strict < gen_nb_int;n_strict++) {
48567 mem_base = xmlMemBlocks();
48568 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
48569 inf = gen_int(n_inf, 1);
48570 strict = gen_int(n_strict, 2);
48572 ret_val = xmlXPathCompareValues(ctxt, inf, strict);
48573 desret_int(ret_val);
48575 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
48576 des_int(n_inf, inf, 1);
48577 des_int(n_strict, strict, 2);
48578 xmlResetLastError();
48579 if (mem_base != xmlMemBlocks()) {
48580 printf("Leak of %d blocks found in xmlXPathCompareValues",
48581 xmlMemBlocks() - mem_base);
48583 printf(" %d", n_ctxt);
48584 printf(" %d", n_inf);
48585 printf(" %d", n_strict);
48599 test_xmlXPathConcatFunction(void) {
48602 #if defined(LIBXML_XPATH_ENABLED)
48604 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
48606 int nargs; /* the number of arguments */
48609 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
48610 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
48611 mem_base = xmlMemBlocks();
48612 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
48613 nargs = gen_int(n_nargs, 1);
48615 xmlXPathConcatFunction(ctxt, nargs);
48617 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
48618 des_int(n_nargs, nargs, 1);
48619 xmlResetLastError();
48620 if (mem_base != xmlMemBlocks()) {
48621 printf("Leak of %d blocks found in xmlXPathConcatFunction",
48622 xmlMemBlocks() - mem_base);
48624 printf(" %d", n_ctxt);
48625 printf(" %d", n_nargs);
48638 test_xmlXPathContainsFunction(void) {
48641 #if defined(LIBXML_XPATH_ENABLED)
48643 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
48645 int nargs; /* the number of arguments */
48648 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
48649 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
48650 mem_base = xmlMemBlocks();
48651 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
48652 nargs = gen_int(n_nargs, 1);
48654 xmlXPathContainsFunction(ctxt, nargs);
48656 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
48657 des_int(n_nargs, nargs, 1);
48658 xmlResetLastError();
48659 if (mem_base != xmlMemBlocks()) {
48660 printf("Leak of %d blocks found in xmlXPathContainsFunction",
48661 xmlMemBlocks() - mem_base);
48663 printf(" %d", n_ctxt);
48664 printf(" %d", n_nargs);
48677 test_xmlXPathCountFunction(void) {
48680 #if defined(LIBXML_XPATH_ENABLED)
48682 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
48684 int nargs; /* the number of arguments */
48687 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
48688 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
48689 mem_base = xmlMemBlocks();
48690 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
48691 nargs = gen_int(n_nargs, 1);
48693 xmlXPathCountFunction(ctxt, nargs);
48695 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
48696 des_int(n_nargs, nargs, 1);
48697 xmlResetLastError();
48698 if (mem_base != xmlMemBlocks()) {
48699 printf("Leak of %d blocks found in xmlXPathCountFunction",
48700 xmlMemBlocks() - mem_base);
48702 printf(" %d", n_ctxt);
48703 printf(" %d", n_nargs);
48716 test_xmlXPathDebugDumpCompExpr(void) {
48719 #if defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_DEBUG_ENABLED)
48721 FILE * output; /* the FILE * for the output */
48723 xmlXPathCompExprPtr comp; /* the precompiled XPath expression */
48725 int depth; /* the indentation level. */
48728 for (n_output = 0;n_output < gen_nb_FILE_ptr;n_output++) {
48729 for (n_comp = 0;n_comp < gen_nb_xmlXPathCompExprPtr;n_comp++) {
48730 for (n_depth = 0;n_depth < gen_nb_int;n_depth++) {
48731 mem_base = xmlMemBlocks();
48732 output = gen_FILE_ptr(n_output, 0);
48733 comp = gen_xmlXPathCompExprPtr(n_comp, 1);
48734 depth = gen_int(n_depth, 2);
48736 xmlXPathDebugDumpCompExpr(output, comp, depth);
48738 des_FILE_ptr(n_output, output, 0);
48739 des_xmlXPathCompExprPtr(n_comp, comp, 1);
48740 des_int(n_depth, depth, 2);
48741 xmlResetLastError();
48742 if (mem_base != xmlMemBlocks()) {
48743 printf("Leak of %d blocks found in xmlXPathDebugDumpCompExpr",
48744 xmlMemBlocks() - mem_base);
48746 printf(" %d", n_output);
48747 printf(" %d", n_comp);
48748 printf(" %d", n_depth);
48762 test_xmlXPathDebugDumpObject(void) {
48765 #if defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_DEBUG_ENABLED)
48767 FILE * output; /* the FILE * to dump the output */
48769 xmlXPathObjectPtr cur; /* the object to inspect */
48771 int depth; /* indentation level */
48774 for (n_output = 0;n_output < gen_nb_FILE_ptr;n_output++) {
48775 for (n_cur = 0;n_cur < gen_nb_xmlXPathObjectPtr;n_cur++) {
48776 for (n_depth = 0;n_depth < gen_nb_int;n_depth++) {
48777 mem_base = xmlMemBlocks();
48778 output = gen_FILE_ptr(n_output, 0);
48779 cur = gen_xmlXPathObjectPtr(n_cur, 1);
48780 depth = gen_int(n_depth, 2);
48782 xmlXPathDebugDumpObject(output, cur, depth);
48784 des_FILE_ptr(n_output, output, 0);
48785 des_xmlXPathObjectPtr(n_cur, cur, 1);
48786 des_int(n_depth, depth, 2);
48787 xmlResetLastError();
48788 if (mem_base != xmlMemBlocks()) {
48789 printf("Leak of %d blocks found in xmlXPathDebugDumpObject",
48790 xmlMemBlocks() - mem_base);
48792 printf(" %d", n_output);
48793 printf(" %d", n_cur);
48794 printf(" %d", n_depth);
48808 test_xmlXPathDifference(void) {
48811 #if defined(LIBXML_XPATH_ENABLED)
48813 xmlNodeSetPtr ret_val;
48814 xmlNodeSetPtr nodes1; /* a node-set */
48816 xmlNodeSetPtr nodes2; /* a node-set */
48819 for (n_nodes1 = 0;n_nodes1 < gen_nb_xmlNodeSetPtr;n_nodes1++) {
48820 for (n_nodes2 = 0;n_nodes2 < gen_nb_xmlNodeSetPtr;n_nodes2++) {
48821 mem_base = xmlMemBlocks();
48822 nodes1 = gen_xmlNodeSetPtr(n_nodes1, 0);
48823 nodes2 = gen_xmlNodeSetPtr(n_nodes2, 1);
48825 ret_val = xmlXPathDifference(nodes1, nodes2);
48826 desret_xmlNodeSetPtr(ret_val);
48828 des_xmlNodeSetPtr(n_nodes1, nodes1, 0);
48829 des_xmlNodeSetPtr(n_nodes2, nodes2, 1);
48830 xmlResetLastError();
48831 if (mem_base != xmlMemBlocks()) {
48832 printf("Leak of %d blocks found in xmlXPathDifference",
48833 xmlMemBlocks() - mem_base);
48835 printf(" %d", n_nodes1);
48836 printf(" %d", n_nodes2);
48849 test_xmlXPathDistinct(void) {
48852 #if defined(LIBXML_XPATH_ENABLED)
48854 xmlNodeSetPtr ret_val;
48855 xmlNodeSetPtr nodes; /* a node-set */
48858 for (n_nodes = 0;n_nodes < gen_nb_xmlNodeSetPtr;n_nodes++) {
48859 mem_base = xmlMemBlocks();
48860 nodes = gen_xmlNodeSetPtr(n_nodes, 0);
48862 ret_val = xmlXPathDistinct(nodes);
48863 desret_xmlNodeSetPtr(ret_val);
48865 des_xmlNodeSetPtr(n_nodes, nodes, 0);
48866 xmlResetLastError();
48867 if (mem_base != xmlMemBlocks()) {
48868 printf("Leak of %d blocks found in xmlXPathDistinct",
48869 xmlMemBlocks() - mem_base);
48871 printf(" %d", n_nodes);
48883 test_xmlXPathDistinctSorted(void) {
48886 #if defined(LIBXML_XPATH_ENABLED)
48888 xmlNodeSetPtr ret_val;
48889 xmlNodeSetPtr nodes; /* a node-set, sorted by document order */
48892 for (n_nodes = 0;n_nodes < gen_nb_xmlNodeSetPtr;n_nodes++) {
48893 mem_base = xmlMemBlocks();
48894 nodes = gen_xmlNodeSetPtr(n_nodes, 0);
48896 ret_val = xmlXPathDistinctSorted(nodes);
48897 desret_xmlNodeSetPtr(ret_val);
48899 des_xmlNodeSetPtr(n_nodes, nodes, 0);
48900 xmlResetLastError();
48901 if (mem_base != xmlMemBlocks()) {
48902 printf("Leak of %d blocks found in xmlXPathDistinctSorted",
48903 xmlMemBlocks() - mem_base);
48905 printf(" %d", n_nodes);
48917 test_xmlXPathDivValues(void) {
48920 #if defined(LIBXML_XPATH_ENABLED)
48922 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
48925 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
48926 mem_base = xmlMemBlocks();
48927 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
48929 xmlXPathDivValues(ctxt);
48931 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
48932 xmlResetLastError();
48933 if (mem_base != xmlMemBlocks()) {
48934 printf("Leak of %d blocks found in xmlXPathDivValues",
48935 xmlMemBlocks() - mem_base);
48937 printf(" %d", n_ctxt);
48949 test_xmlXPathEqualValues(void) {
48952 #if defined(LIBXML_XPATH_ENABLED)
48955 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
48958 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
48959 mem_base = xmlMemBlocks();
48960 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
48962 ret_val = xmlXPathEqualValues(ctxt);
48963 desret_int(ret_val);
48965 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
48966 xmlResetLastError();
48967 if (mem_base != xmlMemBlocks()) {
48968 printf("Leak of %d blocks found in xmlXPathEqualValues",
48969 xmlMemBlocks() - mem_base);
48971 printf(" %d", n_ctxt);
48983 test_xmlXPathErr(void) {
48986 #if defined(LIBXML_XPATH_ENABLED)
48988 xmlXPathParserContextPtr ctxt; /* a XPath parser context */
48990 int error; /* the error code */
48993 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
48994 for (n_error = 0;n_error < gen_nb_int;n_error++) {
48995 mem_base = xmlMemBlocks();
48996 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
48997 error = gen_int(n_error, 1);
48999 xmlXPathErr(ctxt, error);
49001 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
49002 des_int(n_error, error, 1);
49003 xmlResetLastError();
49004 if (mem_base != xmlMemBlocks()) {
49005 printf("Leak of %d blocks found in xmlXPathErr",
49006 xmlMemBlocks() - mem_base);
49008 printf(" %d", n_ctxt);
49009 printf(" %d", n_error);
49022 test_xmlXPathEvalExpr(void) {
49025 #if defined(LIBXML_XPATH_ENABLED)
49027 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
49030 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
49031 mem_base = xmlMemBlocks();
49032 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
49034 xmlXPathEvalExpr(ctxt);
49036 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
49037 xmlResetLastError();
49038 if (mem_base != xmlMemBlocks()) {
49039 printf("Leak of %d blocks found in xmlXPathEvalExpr",
49040 xmlMemBlocks() - mem_base);
49042 printf(" %d", n_ctxt);
49054 test_xmlXPathEvaluatePredicateResult(void) {
49057 #if defined(LIBXML_XPATH_ENABLED)
49060 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
49062 xmlXPathObjectPtr res; /* the Predicate Expression evaluation result */
49065 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
49066 for (n_res = 0;n_res < gen_nb_xmlXPathObjectPtr;n_res++) {
49067 mem_base = xmlMemBlocks();
49068 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
49069 res = gen_xmlXPathObjectPtr(n_res, 1);
49071 ret_val = xmlXPathEvaluatePredicateResult(ctxt, res);
49072 desret_int(ret_val);
49074 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
49075 des_xmlXPathObjectPtr(n_res, res, 1);
49076 xmlResetLastError();
49077 if (mem_base != xmlMemBlocks()) {
49078 printf("Leak of %d blocks found in xmlXPathEvaluatePredicateResult",
49079 xmlMemBlocks() - mem_base);
49081 printf(" %d", n_ctxt);
49082 printf(" %d", n_res);
49095 test_xmlXPathFalseFunction(void) {
49098 #if defined(LIBXML_XPATH_ENABLED)
49100 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
49102 int nargs; /* the number of arguments */
49105 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
49106 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
49107 mem_base = xmlMemBlocks();
49108 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
49109 nargs = gen_int(n_nargs, 1);
49111 xmlXPathFalseFunction(ctxt, nargs);
49113 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
49114 des_int(n_nargs, nargs, 1);
49115 xmlResetLastError();
49116 if (mem_base != xmlMemBlocks()) {
49117 printf("Leak of %d blocks found in xmlXPathFalseFunction",
49118 xmlMemBlocks() - mem_base);
49120 printf(" %d", n_ctxt);
49121 printf(" %d", n_nargs);
49134 test_xmlXPathFloorFunction(void) {
49137 #if defined(LIBXML_XPATH_ENABLED)
49139 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
49141 int nargs; /* the number of arguments */
49144 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
49145 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
49146 mem_base = xmlMemBlocks();
49147 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
49148 nargs = gen_int(n_nargs, 1);
49150 xmlXPathFloorFunction(ctxt, nargs);
49152 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
49153 des_int(n_nargs, nargs, 1);
49154 xmlResetLastError();
49155 if (mem_base != xmlMemBlocks()) {
49156 printf("Leak of %d blocks found in xmlXPathFloorFunction",
49157 xmlMemBlocks() - mem_base);
49159 printf(" %d", n_ctxt);
49160 printf(" %d", n_nargs);
49173 test_xmlXPathFunctionLookup(void) {
49177 /* missing type support */
49183 test_xmlXPathFunctionLookupNS(void) {
49187 /* missing type support */
49193 test_xmlXPathHasSameNodes(void) {
49196 #if defined(LIBXML_XPATH_ENABLED)
49199 xmlNodeSetPtr nodes1; /* a node-set */
49201 xmlNodeSetPtr nodes2; /* a node-set */
49204 for (n_nodes1 = 0;n_nodes1 < gen_nb_xmlNodeSetPtr;n_nodes1++) {
49205 for (n_nodes2 = 0;n_nodes2 < gen_nb_xmlNodeSetPtr;n_nodes2++) {
49206 mem_base = xmlMemBlocks();
49207 nodes1 = gen_xmlNodeSetPtr(n_nodes1, 0);
49208 nodes2 = gen_xmlNodeSetPtr(n_nodes2, 1);
49210 ret_val = xmlXPathHasSameNodes(nodes1, nodes2);
49211 desret_int(ret_val);
49213 des_xmlNodeSetPtr(n_nodes1, nodes1, 0);
49214 des_xmlNodeSetPtr(n_nodes2, nodes2, 1);
49215 xmlResetLastError();
49216 if (mem_base != xmlMemBlocks()) {
49217 printf("Leak of %d blocks found in xmlXPathHasSameNodes",
49218 xmlMemBlocks() - mem_base);
49220 printf(" %d", n_nodes1);
49221 printf(" %d", n_nodes2);
49234 test_xmlXPathIdFunction(void) {
49237 #if defined(LIBXML_XPATH_ENABLED)
49239 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
49241 int nargs; /* the number of arguments */
49244 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
49245 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
49246 mem_base = xmlMemBlocks();
49247 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
49248 nargs = gen_int(n_nargs, 1);
49250 xmlXPathIdFunction(ctxt, nargs);
49252 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
49253 des_int(n_nargs, nargs, 1);
49254 xmlResetLastError();
49255 if (mem_base != xmlMemBlocks()) {
49256 printf("Leak of %d blocks found in xmlXPathIdFunction",
49257 xmlMemBlocks() - mem_base);
49259 printf(" %d", n_ctxt);
49260 printf(" %d", n_nargs);
49273 test_xmlXPathIntersection(void) {
49276 #if defined(LIBXML_XPATH_ENABLED)
49278 xmlNodeSetPtr ret_val;
49279 xmlNodeSetPtr nodes1; /* a node-set */
49281 xmlNodeSetPtr nodes2; /* a node-set */
49284 for (n_nodes1 = 0;n_nodes1 < gen_nb_xmlNodeSetPtr;n_nodes1++) {
49285 for (n_nodes2 = 0;n_nodes2 < gen_nb_xmlNodeSetPtr;n_nodes2++) {
49286 mem_base = xmlMemBlocks();
49287 nodes1 = gen_xmlNodeSetPtr(n_nodes1, 0);
49288 nodes2 = gen_xmlNodeSetPtr(n_nodes2, 1);
49290 ret_val = xmlXPathIntersection(nodes1, nodes2);
49291 desret_xmlNodeSetPtr(ret_val);
49293 des_xmlNodeSetPtr(n_nodes1, nodes1, 0);
49294 des_xmlNodeSetPtr(n_nodes2, nodes2, 1);
49295 xmlResetLastError();
49296 if (mem_base != xmlMemBlocks()) {
49297 printf("Leak of %d blocks found in xmlXPathIntersection",
49298 xmlMemBlocks() - mem_base);
49300 printf(" %d", n_nodes1);
49301 printf(" %d", n_nodes2);
49314 test_xmlXPathIsNodeType(void) {
49317 #if defined(LIBXML_XPATH_ENABLED)
49320 xmlChar * name; /* a name string */
49323 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
49324 mem_base = xmlMemBlocks();
49325 name = gen_const_xmlChar_ptr(n_name, 0);
49327 ret_val = xmlXPathIsNodeType((const xmlChar *)name);
49328 desret_int(ret_val);
49330 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 0);
49331 xmlResetLastError();
49332 if (mem_base != xmlMemBlocks()) {
49333 printf("Leak of %d blocks found in xmlXPathIsNodeType",
49334 xmlMemBlocks() - mem_base);
49336 printf(" %d", n_name);
49348 test_xmlXPathLangFunction(void) {
49351 #if defined(LIBXML_XPATH_ENABLED)
49353 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
49355 int nargs; /* the number of arguments */
49358 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
49359 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
49360 mem_base = xmlMemBlocks();
49361 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
49362 nargs = gen_int(n_nargs, 1);
49364 xmlXPathLangFunction(ctxt, nargs);
49366 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
49367 des_int(n_nargs, nargs, 1);
49368 xmlResetLastError();
49369 if (mem_base != xmlMemBlocks()) {
49370 printf("Leak of %d blocks found in xmlXPathLangFunction",
49371 xmlMemBlocks() - mem_base);
49373 printf(" %d", n_ctxt);
49374 printf(" %d", n_nargs);
49387 test_xmlXPathLastFunction(void) {
49390 #if defined(LIBXML_XPATH_ENABLED)
49392 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
49394 int nargs; /* the number of arguments */
49397 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
49398 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
49399 mem_base = xmlMemBlocks();
49400 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
49401 nargs = gen_int(n_nargs, 1);
49403 xmlXPathLastFunction(ctxt, nargs);
49405 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
49406 des_int(n_nargs, nargs, 1);
49407 xmlResetLastError();
49408 if (mem_base != xmlMemBlocks()) {
49409 printf("Leak of %d blocks found in xmlXPathLastFunction",
49410 xmlMemBlocks() - mem_base);
49412 printf(" %d", n_ctxt);
49413 printf(" %d", n_nargs);
49426 test_xmlXPathLeading(void) {
49429 #if defined(LIBXML_XPATH_ENABLED)
49431 xmlNodeSetPtr ret_val;
49432 xmlNodeSetPtr nodes1; /* a node-set */
49434 xmlNodeSetPtr nodes2; /* a node-set */
49437 for (n_nodes1 = 0;n_nodes1 < gen_nb_xmlNodeSetPtr;n_nodes1++) {
49438 for (n_nodes2 = 0;n_nodes2 < gen_nb_xmlNodeSetPtr;n_nodes2++) {
49439 mem_base = xmlMemBlocks();
49440 nodes1 = gen_xmlNodeSetPtr(n_nodes1, 0);
49441 nodes2 = gen_xmlNodeSetPtr(n_nodes2, 1);
49443 ret_val = xmlXPathLeading(nodes1, nodes2);
49444 desret_xmlNodeSetPtr(ret_val);
49446 des_xmlNodeSetPtr(n_nodes1, nodes1, 0);
49447 des_xmlNodeSetPtr(n_nodes2, nodes2, 1);
49448 xmlResetLastError();
49449 if (mem_base != xmlMemBlocks()) {
49450 printf("Leak of %d blocks found in xmlXPathLeading",
49451 xmlMemBlocks() - mem_base);
49453 printf(" %d", n_nodes1);
49454 printf(" %d", n_nodes2);
49467 test_xmlXPathLeadingSorted(void) {
49470 #if defined(LIBXML_XPATH_ENABLED)
49472 xmlNodeSetPtr ret_val;
49473 xmlNodeSetPtr nodes1; /* a node-set, sorted by document order */
49475 xmlNodeSetPtr nodes2; /* a node-set, sorted by document order */
49478 for (n_nodes1 = 0;n_nodes1 < gen_nb_xmlNodeSetPtr;n_nodes1++) {
49479 for (n_nodes2 = 0;n_nodes2 < gen_nb_xmlNodeSetPtr;n_nodes2++) {
49480 mem_base = xmlMemBlocks();
49481 nodes1 = gen_xmlNodeSetPtr(n_nodes1, 0);
49482 nodes2 = gen_xmlNodeSetPtr(n_nodes2, 1);
49484 ret_val = xmlXPathLeadingSorted(nodes1, nodes2);
49485 desret_xmlNodeSetPtr(ret_val);
49487 des_xmlNodeSetPtr(n_nodes1, nodes1, 0);
49488 des_xmlNodeSetPtr(n_nodes2, nodes2, 1);
49489 xmlResetLastError();
49490 if (mem_base != xmlMemBlocks()) {
49491 printf("Leak of %d blocks found in xmlXPathLeadingSorted",
49492 xmlMemBlocks() - mem_base);
49494 printf(" %d", n_nodes1);
49495 printf(" %d", n_nodes2);
49508 test_xmlXPathLocalNameFunction(void) {
49511 #if defined(LIBXML_XPATH_ENABLED)
49513 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
49515 int nargs; /* the number of arguments */
49518 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
49519 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
49520 mem_base = xmlMemBlocks();
49521 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
49522 nargs = gen_int(n_nargs, 1);
49524 xmlXPathLocalNameFunction(ctxt, nargs);
49526 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
49527 des_int(n_nargs, nargs, 1);
49528 xmlResetLastError();
49529 if (mem_base != xmlMemBlocks()) {
49530 printf("Leak of %d blocks found in xmlXPathLocalNameFunction",
49531 xmlMemBlocks() - mem_base);
49533 printf(" %d", n_ctxt);
49534 printf(" %d", n_nargs);
49547 test_xmlXPathModValues(void) {
49550 #if defined(LIBXML_XPATH_ENABLED)
49552 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
49555 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
49556 mem_base = xmlMemBlocks();
49557 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
49559 xmlXPathModValues(ctxt);
49561 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
49562 xmlResetLastError();
49563 if (mem_base != xmlMemBlocks()) {
49564 printf("Leak of %d blocks found in xmlXPathModValues",
49565 xmlMemBlocks() - mem_base);
49567 printf(" %d", n_ctxt);
49579 test_xmlXPathMultValues(void) {
49582 #if defined(LIBXML_XPATH_ENABLED)
49584 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
49587 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
49588 mem_base = xmlMemBlocks();
49589 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
49591 xmlXPathMultValues(ctxt);
49593 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
49594 xmlResetLastError();
49595 if (mem_base != xmlMemBlocks()) {
49596 printf("Leak of %d blocks found in xmlXPathMultValues",
49597 xmlMemBlocks() - mem_base);
49599 printf(" %d", n_ctxt);
49611 test_xmlXPathNamespaceURIFunction(void) {
49614 #if defined(LIBXML_XPATH_ENABLED)
49616 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
49618 int nargs; /* the number of arguments */
49621 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
49622 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
49623 mem_base = xmlMemBlocks();
49624 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
49625 nargs = gen_int(n_nargs, 1);
49627 xmlXPathNamespaceURIFunction(ctxt, nargs);
49629 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
49630 des_int(n_nargs, nargs, 1);
49631 xmlResetLastError();
49632 if (mem_base != xmlMemBlocks()) {
49633 printf("Leak of %d blocks found in xmlXPathNamespaceURIFunction",
49634 xmlMemBlocks() - mem_base);
49636 printf(" %d", n_ctxt);
49637 printf(" %d", n_nargs);
49650 test_xmlXPathNewBoolean(void) {
49653 #if defined(LIBXML_XPATH_ENABLED)
49655 xmlXPathObjectPtr ret_val;
49656 int val; /* the boolean value */
49659 for (n_val = 0;n_val < gen_nb_int;n_val++) {
49660 mem_base = xmlMemBlocks();
49661 val = gen_int(n_val, 0);
49663 ret_val = xmlXPathNewBoolean(val);
49664 desret_xmlXPathObjectPtr(ret_val);
49666 des_int(n_val, val, 0);
49667 xmlResetLastError();
49668 if (mem_base != xmlMemBlocks()) {
49669 printf("Leak of %d blocks found in xmlXPathNewBoolean",
49670 xmlMemBlocks() - mem_base);
49672 printf(" %d", n_val);
49684 test_xmlXPathNewCString(void) {
49687 #if defined(LIBXML_XPATH_ENABLED)
49689 xmlXPathObjectPtr ret_val;
49690 char * val; /* the char * value */
49693 for (n_val = 0;n_val < gen_nb_const_char_ptr;n_val++) {
49694 mem_base = xmlMemBlocks();
49695 val = gen_const_char_ptr(n_val, 0);
49697 ret_val = xmlXPathNewCString((const char *)val);
49698 desret_xmlXPathObjectPtr(ret_val);
49700 des_const_char_ptr(n_val, (const char *)val, 0);
49701 xmlResetLastError();
49702 if (mem_base != xmlMemBlocks()) {
49703 printf("Leak of %d blocks found in xmlXPathNewCString",
49704 xmlMemBlocks() - mem_base);
49706 printf(" %d", n_val);
49718 test_xmlXPathNewFloat(void) {
49721 #if defined(LIBXML_XPATH_ENABLED)
49723 xmlXPathObjectPtr ret_val;
49724 double val; /* the double value */
49727 for (n_val = 0;n_val < gen_nb_double;n_val++) {
49728 mem_base = xmlMemBlocks();
49729 val = gen_double(n_val, 0);
49731 ret_val = xmlXPathNewFloat(val);
49732 desret_xmlXPathObjectPtr(ret_val);
49734 des_double(n_val, val, 0);
49735 xmlResetLastError();
49736 if (mem_base != xmlMemBlocks()) {
49737 printf("Leak of %d blocks found in xmlXPathNewFloat",
49738 xmlMemBlocks() - mem_base);
49740 printf(" %d", n_val);
49752 test_xmlXPathNewNodeSet(void) {
49755 #if defined(LIBXML_XPATH_ENABLED)
49757 xmlXPathObjectPtr ret_val;
49758 xmlNodePtr val; /* the NodePtr value */
49761 for (n_val = 0;n_val < gen_nb_xmlNodePtr;n_val++) {
49762 mem_base = xmlMemBlocks();
49763 val = gen_xmlNodePtr(n_val, 0);
49765 ret_val = xmlXPathNewNodeSet(val);
49766 desret_xmlXPathObjectPtr(ret_val);
49768 des_xmlNodePtr(n_val, val, 0);
49769 xmlResetLastError();
49770 if (mem_base != xmlMemBlocks()) {
49771 printf("Leak of %d blocks found in xmlXPathNewNodeSet",
49772 xmlMemBlocks() - mem_base);
49774 printf(" %d", n_val);
49786 test_xmlXPathNewNodeSetList(void) {
49789 #if defined(LIBXML_XPATH_ENABLED)
49791 xmlXPathObjectPtr ret_val;
49792 xmlNodeSetPtr val; /* an existing NodeSet */
49795 for (n_val = 0;n_val < gen_nb_xmlNodeSetPtr;n_val++) {
49796 mem_base = xmlMemBlocks();
49797 val = gen_xmlNodeSetPtr(n_val, 0);
49799 ret_val = xmlXPathNewNodeSetList(val);
49800 desret_xmlXPathObjectPtr(ret_val);
49802 des_xmlNodeSetPtr(n_val, val, 0);
49803 xmlResetLastError();
49804 if (mem_base != xmlMemBlocks()) {
49805 printf("Leak of %d blocks found in xmlXPathNewNodeSetList",
49806 xmlMemBlocks() - mem_base);
49808 printf(" %d", n_val);
49820 test_xmlXPathNewParserContext(void) {
49824 /* missing type support */
49830 test_xmlXPathNewString(void) {
49833 #if defined(LIBXML_XPATH_ENABLED)
49835 xmlXPathObjectPtr ret_val;
49836 xmlChar * val; /* the xmlChar * value */
49839 for (n_val = 0;n_val < gen_nb_const_xmlChar_ptr;n_val++) {
49840 mem_base = xmlMemBlocks();
49841 val = gen_const_xmlChar_ptr(n_val, 0);
49843 ret_val = xmlXPathNewString((const xmlChar *)val);
49844 desret_xmlXPathObjectPtr(ret_val);
49846 des_const_xmlChar_ptr(n_val, (const xmlChar *)val, 0);
49847 xmlResetLastError();
49848 if (mem_base != xmlMemBlocks()) {
49849 printf("Leak of %d blocks found in xmlXPathNewString",
49850 xmlMemBlocks() - mem_base);
49852 printf(" %d", n_val);
49864 test_xmlXPathNextAncestor(void) {
49867 #if defined(LIBXML_XPATH_ENABLED)
49869 xmlNodePtr ret_val;
49870 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
49872 xmlNodePtr cur; /* the current node in the traversal */
49875 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
49876 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
49877 mem_base = xmlMemBlocks();
49878 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
49879 cur = gen_xmlNodePtr(n_cur, 1);
49881 ret_val = xmlXPathNextAncestor(ctxt, cur);
49882 desret_xmlNodePtr(ret_val);
49884 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
49885 des_xmlNodePtr(n_cur, cur, 1);
49886 xmlResetLastError();
49887 if (mem_base != xmlMemBlocks()) {
49888 printf("Leak of %d blocks found in xmlXPathNextAncestor",
49889 xmlMemBlocks() - mem_base);
49891 printf(" %d", n_ctxt);
49892 printf(" %d", n_cur);
49905 test_xmlXPathNextAncestorOrSelf(void) {
49908 #if defined(LIBXML_XPATH_ENABLED)
49910 xmlNodePtr ret_val;
49911 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
49913 xmlNodePtr cur; /* the current node in the traversal */
49916 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
49917 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
49918 mem_base = xmlMemBlocks();
49919 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
49920 cur = gen_xmlNodePtr(n_cur, 1);
49922 ret_val = xmlXPathNextAncestorOrSelf(ctxt, cur);
49923 desret_xmlNodePtr(ret_val);
49925 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
49926 des_xmlNodePtr(n_cur, cur, 1);
49927 xmlResetLastError();
49928 if (mem_base != xmlMemBlocks()) {
49929 printf("Leak of %d blocks found in xmlXPathNextAncestorOrSelf",
49930 xmlMemBlocks() - mem_base);
49932 printf(" %d", n_ctxt);
49933 printf(" %d", n_cur);
49946 test_xmlXPathNextAttribute(void) {
49949 #if defined(LIBXML_XPATH_ENABLED)
49951 xmlNodePtr ret_val;
49952 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
49954 xmlNodePtr cur; /* the current attribute in the traversal */
49957 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
49958 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
49959 mem_base = xmlMemBlocks();
49960 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
49961 cur = gen_xmlNodePtr(n_cur, 1);
49963 ret_val = xmlXPathNextAttribute(ctxt, cur);
49964 desret_xmlNodePtr(ret_val);
49966 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
49967 des_xmlNodePtr(n_cur, cur, 1);
49968 xmlResetLastError();
49969 if (mem_base != xmlMemBlocks()) {
49970 printf("Leak of %d blocks found in xmlXPathNextAttribute",
49971 xmlMemBlocks() - mem_base);
49973 printf(" %d", n_ctxt);
49974 printf(" %d", n_cur);
49987 test_xmlXPathNextChild(void) {
49990 #if defined(LIBXML_XPATH_ENABLED)
49992 xmlNodePtr ret_val;
49993 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
49995 xmlNodePtr cur; /* the current node in the traversal */
49998 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
49999 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
50000 mem_base = xmlMemBlocks();
50001 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
50002 cur = gen_xmlNodePtr(n_cur, 1);
50004 ret_val = xmlXPathNextChild(ctxt, cur);
50005 desret_xmlNodePtr(ret_val);
50007 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
50008 des_xmlNodePtr(n_cur, cur, 1);
50009 xmlResetLastError();
50010 if (mem_base != xmlMemBlocks()) {
50011 printf("Leak of %d blocks found in xmlXPathNextChild",
50012 xmlMemBlocks() - mem_base);
50014 printf(" %d", n_ctxt);
50015 printf(" %d", n_cur);
50028 test_xmlXPathNextDescendant(void) {
50031 #if defined(LIBXML_XPATH_ENABLED)
50033 xmlNodePtr ret_val;
50034 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
50036 xmlNodePtr cur; /* the current node in the traversal */
50039 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
50040 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
50041 mem_base = xmlMemBlocks();
50042 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
50043 cur = gen_xmlNodePtr(n_cur, 1);
50045 ret_val = xmlXPathNextDescendant(ctxt, cur);
50046 desret_xmlNodePtr(ret_val);
50048 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
50049 des_xmlNodePtr(n_cur, cur, 1);
50050 xmlResetLastError();
50051 if (mem_base != xmlMemBlocks()) {
50052 printf("Leak of %d blocks found in xmlXPathNextDescendant",
50053 xmlMemBlocks() - mem_base);
50055 printf(" %d", n_ctxt);
50056 printf(" %d", n_cur);
50069 test_xmlXPathNextDescendantOrSelf(void) {
50072 #if defined(LIBXML_XPATH_ENABLED)
50074 xmlNodePtr ret_val;
50075 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
50077 xmlNodePtr cur; /* the current node in the traversal */
50080 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
50081 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
50082 mem_base = xmlMemBlocks();
50083 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
50084 cur = gen_xmlNodePtr(n_cur, 1);
50086 ret_val = xmlXPathNextDescendantOrSelf(ctxt, cur);
50087 desret_xmlNodePtr(ret_val);
50089 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
50090 des_xmlNodePtr(n_cur, cur, 1);
50091 xmlResetLastError();
50092 if (mem_base != xmlMemBlocks()) {
50093 printf("Leak of %d blocks found in xmlXPathNextDescendantOrSelf",
50094 xmlMemBlocks() - mem_base);
50096 printf(" %d", n_ctxt);
50097 printf(" %d", n_cur);
50110 test_xmlXPathNextFollowing(void) {
50113 #if defined(LIBXML_XPATH_ENABLED)
50115 xmlNodePtr ret_val;
50116 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
50118 xmlNodePtr cur; /* the current node in the traversal */
50121 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
50122 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
50123 mem_base = xmlMemBlocks();
50124 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
50125 cur = gen_xmlNodePtr(n_cur, 1);
50127 ret_val = xmlXPathNextFollowing(ctxt, cur);
50128 desret_xmlNodePtr(ret_val);
50130 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
50131 des_xmlNodePtr(n_cur, cur, 1);
50132 xmlResetLastError();
50133 if (mem_base != xmlMemBlocks()) {
50134 printf("Leak of %d blocks found in xmlXPathNextFollowing",
50135 xmlMemBlocks() - mem_base);
50137 printf(" %d", n_ctxt);
50138 printf(" %d", n_cur);
50151 test_xmlXPathNextFollowingSibling(void) {
50154 #if defined(LIBXML_XPATH_ENABLED)
50156 xmlNodePtr ret_val;
50157 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
50159 xmlNodePtr cur; /* the current node in the traversal */
50162 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
50163 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
50164 mem_base = xmlMemBlocks();
50165 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
50166 cur = gen_xmlNodePtr(n_cur, 1);
50168 ret_val = xmlXPathNextFollowingSibling(ctxt, cur);
50169 desret_xmlNodePtr(ret_val);
50171 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
50172 des_xmlNodePtr(n_cur, cur, 1);
50173 xmlResetLastError();
50174 if (mem_base != xmlMemBlocks()) {
50175 printf("Leak of %d blocks found in xmlXPathNextFollowingSibling",
50176 xmlMemBlocks() - mem_base);
50178 printf(" %d", n_ctxt);
50179 printf(" %d", n_cur);
50192 test_xmlXPathNextNamespace(void) {
50195 #if defined(LIBXML_XPATH_ENABLED)
50197 xmlNodePtr ret_val;
50198 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
50200 xmlNodePtr cur; /* the current attribute in the traversal */
50203 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
50204 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
50205 mem_base = xmlMemBlocks();
50206 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
50207 cur = gen_xmlNodePtr(n_cur, 1);
50209 ret_val = xmlXPathNextNamespace(ctxt, cur);
50210 desret_xmlNodePtr(ret_val);
50212 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
50213 des_xmlNodePtr(n_cur, cur, 1);
50214 xmlResetLastError();
50215 if (mem_base != xmlMemBlocks()) {
50216 printf("Leak of %d blocks found in xmlXPathNextNamespace",
50217 xmlMemBlocks() - mem_base);
50219 printf(" %d", n_ctxt);
50220 printf(" %d", n_cur);
50233 test_xmlXPathNextParent(void) {
50236 #if defined(LIBXML_XPATH_ENABLED)
50238 xmlNodePtr ret_val;
50239 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
50241 xmlNodePtr cur; /* the current node in the traversal */
50244 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
50245 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
50246 mem_base = xmlMemBlocks();
50247 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
50248 cur = gen_xmlNodePtr(n_cur, 1);
50250 ret_val = xmlXPathNextParent(ctxt, cur);
50251 desret_xmlNodePtr(ret_val);
50253 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
50254 des_xmlNodePtr(n_cur, cur, 1);
50255 xmlResetLastError();
50256 if (mem_base != xmlMemBlocks()) {
50257 printf("Leak of %d blocks found in xmlXPathNextParent",
50258 xmlMemBlocks() - mem_base);
50260 printf(" %d", n_ctxt);
50261 printf(" %d", n_cur);
50274 test_xmlXPathNextPreceding(void) {
50277 #if defined(LIBXML_XPATH_ENABLED)
50279 xmlNodePtr ret_val;
50280 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
50282 xmlNodePtr cur; /* the current node in the traversal */
50285 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
50286 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
50287 mem_base = xmlMemBlocks();
50288 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
50289 cur = gen_xmlNodePtr(n_cur, 1);
50291 ret_val = xmlXPathNextPreceding(ctxt, cur);
50292 desret_xmlNodePtr(ret_val);
50294 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
50295 des_xmlNodePtr(n_cur, cur, 1);
50296 xmlResetLastError();
50297 if (mem_base != xmlMemBlocks()) {
50298 printf("Leak of %d blocks found in xmlXPathNextPreceding",
50299 xmlMemBlocks() - mem_base);
50301 printf(" %d", n_ctxt);
50302 printf(" %d", n_cur);
50315 test_xmlXPathNextPrecedingSibling(void) {
50318 #if defined(LIBXML_XPATH_ENABLED)
50320 xmlNodePtr ret_val;
50321 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
50323 xmlNodePtr cur; /* the current node in the traversal */
50326 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
50327 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
50328 mem_base = xmlMemBlocks();
50329 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
50330 cur = gen_xmlNodePtr(n_cur, 1);
50332 ret_val = xmlXPathNextPrecedingSibling(ctxt, cur);
50333 desret_xmlNodePtr(ret_val);
50335 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
50336 des_xmlNodePtr(n_cur, cur, 1);
50337 xmlResetLastError();
50338 if (mem_base != xmlMemBlocks()) {
50339 printf("Leak of %d blocks found in xmlXPathNextPrecedingSibling",
50340 xmlMemBlocks() - mem_base);
50342 printf(" %d", n_ctxt);
50343 printf(" %d", n_cur);
50356 test_xmlXPathNextSelf(void) {
50359 #if defined(LIBXML_XPATH_ENABLED)
50361 xmlNodePtr ret_val;
50362 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
50364 xmlNodePtr cur; /* the current node in the traversal */
50367 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
50368 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
50369 mem_base = xmlMemBlocks();
50370 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
50371 cur = gen_xmlNodePtr(n_cur, 1);
50373 ret_val = xmlXPathNextSelf(ctxt, cur);
50374 desret_xmlNodePtr(ret_val);
50376 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
50377 des_xmlNodePtr(n_cur, cur, 1);
50378 xmlResetLastError();
50379 if (mem_base != xmlMemBlocks()) {
50380 printf("Leak of %d blocks found in xmlXPathNextSelf",
50381 xmlMemBlocks() - mem_base);
50383 printf(" %d", n_ctxt);
50384 printf(" %d", n_cur);
50397 test_xmlXPathNodeLeading(void) {
50400 #if defined(LIBXML_XPATH_ENABLED)
50402 xmlNodeSetPtr ret_val;
50403 xmlNodeSetPtr nodes; /* a node-set */
50405 xmlNodePtr node; /* a node */
50408 for (n_nodes = 0;n_nodes < gen_nb_xmlNodeSetPtr;n_nodes++) {
50409 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
50410 mem_base = xmlMemBlocks();
50411 nodes = gen_xmlNodeSetPtr(n_nodes, 0);
50412 node = gen_xmlNodePtr(n_node, 1);
50414 ret_val = xmlXPathNodeLeading(nodes, node);
50415 desret_xmlNodeSetPtr(ret_val);
50417 des_xmlNodeSetPtr(n_nodes, nodes, 0);
50418 des_xmlNodePtr(n_node, node, 1);
50419 xmlResetLastError();
50420 if (mem_base != xmlMemBlocks()) {
50421 printf("Leak of %d blocks found in xmlXPathNodeLeading",
50422 xmlMemBlocks() - mem_base);
50424 printf(" %d", n_nodes);
50425 printf(" %d", n_node);
50438 test_xmlXPathNodeLeadingSorted(void) {
50441 #if defined(LIBXML_XPATH_ENABLED)
50443 xmlNodeSetPtr ret_val;
50444 xmlNodeSetPtr nodes; /* a node-set, sorted by document order */
50446 xmlNodePtr node; /* a node */
50449 for (n_nodes = 0;n_nodes < gen_nb_xmlNodeSetPtr;n_nodes++) {
50450 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
50451 mem_base = xmlMemBlocks();
50452 nodes = gen_xmlNodeSetPtr(n_nodes, 0);
50453 node = gen_xmlNodePtr(n_node, 1);
50455 ret_val = xmlXPathNodeLeadingSorted(nodes, node);
50456 desret_xmlNodeSetPtr(ret_val);
50458 des_xmlNodeSetPtr(n_nodes, nodes, 0);
50459 des_xmlNodePtr(n_node, node, 1);
50460 xmlResetLastError();
50461 if (mem_base != xmlMemBlocks()) {
50462 printf("Leak of %d blocks found in xmlXPathNodeLeadingSorted",
50463 xmlMemBlocks() - mem_base);
50465 printf(" %d", n_nodes);
50466 printf(" %d", n_node);
50479 test_xmlXPathNodeSetAdd(void) {
50482 #if defined(LIBXML_XPATH_ENABLED)
50485 xmlNodeSetPtr cur; /* the initial node set */
50487 xmlNodePtr val; /* a new xmlNodePtr */
50490 for (n_cur = 0;n_cur < gen_nb_xmlNodeSetPtr;n_cur++) {
50491 for (n_val = 0;n_val < gen_nb_xmlNodePtr;n_val++) {
50492 mem_base = xmlMemBlocks();
50493 cur = gen_xmlNodeSetPtr(n_cur, 0);
50494 val = gen_xmlNodePtr(n_val, 1);
50496 ret_val = xmlXPathNodeSetAdd(cur, val);
50497 desret_int(ret_val);
50499 des_xmlNodeSetPtr(n_cur, cur, 0);
50500 des_xmlNodePtr(n_val, val, 1);
50501 xmlResetLastError();
50502 if (mem_base != xmlMemBlocks()) {
50503 printf("Leak of %d blocks found in xmlXPathNodeSetAdd",
50504 xmlMemBlocks() - mem_base);
50506 printf(" %d", n_cur);
50507 printf(" %d", n_val);
50520 test_xmlXPathNodeSetAddNs(void) {
50523 #if defined(LIBXML_XPATH_ENABLED)
50526 xmlNodeSetPtr cur; /* the initial node set */
50528 xmlNodePtr node; /* the hosting node */
50530 xmlNsPtr ns; /* a the namespace node */
50533 for (n_cur = 0;n_cur < gen_nb_xmlNodeSetPtr;n_cur++) {
50534 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
50535 for (n_ns = 0;n_ns < gen_nb_xmlNsPtr;n_ns++) {
50536 mem_base = xmlMemBlocks();
50537 cur = gen_xmlNodeSetPtr(n_cur, 0);
50538 node = gen_xmlNodePtr(n_node, 1);
50539 ns = gen_xmlNsPtr(n_ns, 2);
50541 ret_val = xmlXPathNodeSetAddNs(cur, node, ns);
50542 desret_int(ret_val);
50544 des_xmlNodeSetPtr(n_cur, cur, 0);
50545 des_xmlNodePtr(n_node, node, 1);
50546 des_xmlNsPtr(n_ns, ns, 2);
50547 xmlResetLastError();
50548 if (mem_base != xmlMemBlocks()) {
50549 printf("Leak of %d blocks found in xmlXPathNodeSetAddNs",
50550 xmlMemBlocks() - mem_base);
50552 printf(" %d", n_cur);
50553 printf(" %d", n_node);
50554 printf(" %d", n_ns);
50568 test_xmlXPathNodeSetAddUnique(void) {
50571 #if defined(LIBXML_XPATH_ENABLED)
50574 xmlNodeSetPtr cur; /* the initial node set */
50576 xmlNodePtr val; /* a new xmlNodePtr */
50579 for (n_cur = 0;n_cur < gen_nb_xmlNodeSetPtr;n_cur++) {
50580 for (n_val = 0;n_val < gen_nb_xmlNodePtr;n_val++) {
50581 mem_base = xmlMemBlocks();
50582 cur = gen_xmlNodeSetPtr(n_cur, 0);
50583 val = gen_xmlNodePtr(n_val, 1);
50585 ret_val = xmlXPathNodeSetAddUnique(cur, val);
50586 desret_int(ret_val);
50588 des_xmlNodeSetPtr(n_cur, cur, 0);
50589 des_xmlNodePtr(n_val, val, 1);
50590 xmlResetLastError();
50591 if (mem_base != xmlMemBlocks()) {
50592 printf("Leak of %d blocks found in xmlXPathNodeSetAddUnique",
50593 xmlMemBlocks() - mem_base);
50595 printf(" %d", n_cur);
50596 printf(" %d", n_val);
50609 test_xmlXPathNodeSetContains(void) {
50612 #if defined(LIBXML_XPATH_ENABLED)
50615 xmlNodeSetPtr cur; /* the node-set */
50617 xmlNodePtr val; /* the node */
50620 for (n_cur = 0;n_cur < gen_nb_xmlNodeSetPtr;n_cur++) {
50621 for (n_val = 0;n_val < gen_nb_xmlNodePtr;n_val++) {
50622 mem_base = xmlMemBlocks();
50623 cur = gen_xmlNodeSetPtr(n_cur, 0);
50624 val = gen_xmlNodePtr(n_val, 1);
50626 ret_val = xmlXPathNodeSetContains(cur, val);
50627 desret_int(ret_val);
50629 des_xmlNodeSetPtr(n_cur, cur, 0);
50630 des_xmlNodePtr(n_val, val, 1);
50631 xmlResetLastError();
50632 if (mem_base != xmlMemBlocks()) {
50633 printf("Leak of %d blocks found in xmlXPathNodeSetContains",
50634 xmlMemBlocks() - mem_base);
50636 printf(" %d", n_cur);
50637 printf(" %d", n_val);
50650 test_xmlXPathNodeSetDel(void) {
50653 #if defined(LIBXML_XPATH_ENABLED)
50655 xmlNodeSetPtr cur; /* the initial node set */
50657 xmlNodePtr val; /* an xmlNodePtr */
50660 for (n_cur = 0;n_cur < gen_nb_xmlNodeSetPtr;n_cur++) {
50661 for (n_val = 0;n_val < gen_nb_xmlNodePtr;n_val++) {
50662 mem_base = xmlMemBlocks();
50663 cur = gen_xmlNodeSetPtr(n_cur, 0);
50664 val = gen_xmlNodePtr(n_val, 1);
50666 xmlXPathNodeSetDel(cur, val);
50668 des_xmlNodeSetPtr(n_cur, cur, 0);
50669 des_xmlNodePtr(n_val, val, 1);
50670 xmlResetLastError();
50671 if (mem_base != xmlMemBlocks()) {
50672 printf("Leak of %d blocks found in xmlXPathNodeSetDel",
50673 xmlMemBlocks() - mem_base);
50675 printf(" %d", n_cur);
50676 printf(" %d", n_val);
50689 test_xmlXPathNodeSetMerge(void) {
50692 #if defined(LIBXML_XPATH_ENABLED)
50694 xmlNodeSetPtr ret_val;
50695 xmlNodeSetPtr val1; /* the first NodeSet or NULL */
50697 xmlNodeSetPtr val2; /* the second NodeSet */
50700 for (n_val1 = 0;n_val1 < gen_nb_xmlNodeSetPtr;n_val1++) {
50701 for (n_val2 = 0;n_val2 < gen_nb_xmlNodeSetPtr;n_val2++) {
50702 mem_base = xmlMemBlocks();
50703 val1 = gen_xmlNodeSetPtr(n_val1, 0);
50704 val2 = gen_xmlNodeSetPtr(n_val2, 1);
50706 ret_val = xmlXPathNodeSetMerge(val1, val2);
50707 desret_xmlNodeSetPtr(ret_val);
50709 des_xmlNodeSetPtr(n_val1, val1, 0);
50710 des_xmlNodeSetPtr(n_val2, val2, 1);
50711 xmlResetLastError();
50712 if (mem_base != xmlMemBlocks()) {
50713 printf("Leak of %d blocks found in xmlXPathNodeSetMerge",
50714 xmlMemBlocks() - mem_base);
50716 printf(" %d", n_val1);
50717 printf(" %d", n_val2);
50730 test_xmlXPathNodeSetRemove(void) {
50733 #if defined(LIBXML_XPATH_ENABLED)
50735 xmlNodeSetPtr cur; /* the initial node set */
50737 int val; /* the index to remove */
50740 for (n_cur = 0;n_cur < gen_nb_xmlNodeSetPtr;n_cur++) {
50741 for (n_val = 0;n_val < gen_nb_int;n_val++) {
50742 mem_base = xmlMemBlocks();
50743 cur = gen_xmlNodeSetPtr(n_cur, 0);
50744 val = gen_int(n_val, 1);
50746 xmlXPathNodeSetRemove(cur, val);
50748 des_xmlNodeSetPtr(n_cur, cur, 0);
50749 des_int(n_val, val, 1);
50750 xmlResetLastError();
50751 if (mem_base != xmlMemBlocks()) {
50752 printf("Leak of %d blocks found in xmlXPathNodeSetRemove",
50753 xmlMemBlocks() - mem_base);
50755 printf(" %d", n_cur);
50756 printf(" %d", n_val);
50769 test_xmlXPathNodeSetSort(void) {
50772 #if defined(LIBXML_XPATH_ENABLED)
50774 xmlNodeSetPtr set; /* the node set */
50777 for (n_set = 0;n_set < gen_nb_xmlNodeSetPtr;n_set++) {
50778 mem_base = xmlMemBlocks();
50779 set = gen_xmlNodeSetPtr(n_set, 0);
50781 xmlXPathNodeSetSort(set);
50783 des_xmlNodeSetPtr(n_set, set, 0);
50784 xmlResetLastError();
50785 if (mem_base != xmlMemBlocks()) {
50786 printf("Leak of %d blocks found in xmlXPathNodeSetSort",
50787 xmlMemBlocks() - mem_base);
50789 printf(" %d", n_set);
50801 test_xmlXPathNodeTrailing(void) {
50804 #if defined(LIBXML_XPATH_ENABLED)
50806 xmlNodeSetPtr ret_val;
50807 xmlNodeSetPtr nodes; /* a node-set */
50809 xmlNodePtr node; /* a node */
50812 for (n_nodes = 0;n_nodes < gen_nb_xmlNodeSetPtr;n_nodes++) {
50813 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
50814 mem_base = xmlMemBlocks();
50815 nodes = gen_xmlNodeSetPtr(n_nodes, 0);
50816 node = gen_xmlNodePtr(n_node, 1);
50818 ret_val = xmlXPathNodeTrailing(nodes, node);
50819 desret_xmlNodeSetPtr(ret_val);
50821 des_xmlNodeSetPtr(n_nodes, nodes, 0);
50822 des_xmlNodePtr(n_node, node, 1);
50823 xmlResetLastError();
50824 if (mem_base != xmlMemBlocks()) {
50825 printf("Leak of %d blocks found in xmlXPathNodeTrailing",
50826 xmlMemBlocks() - mem_base);
50828 printf(" %d", n_nodes);
50829 printf(" %d", n_node);
50842 test_xmlXPathNodeTrailingSorted(void) {
50845 #if defined(LIBXML_XPATH_ENABLED)
50847 xmlNodeSetPtr ret_val;
50848 xmlNodeSetPtr nodes; /* a node-set, sorted by document order */
50850 xmlNodePtr node; /* a node */
50853 for (n_nodes = 0;n_nodes < gen_nb_xmlNodeSetPtr;n_nodes++) {
50854 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
50855 mem_base = xmlMemBlocks();
50856 nodes = gen_xmlNodeSetPtr(n_nodes, 0);
50857 node = gen_xmlNodePtr(n_node, 1);
50859 ret_val = xmlXPathNodeTrailingSorted(nodes, node);
50860 desret_xmlNodeSetPtr(ret_val);
50862 des_xmlNodeSetPtr(n_nodes, nodes, 0);
50863 des_xmlNodePtr(n_node, node, 1);
50864 xmlResetLastError();
50865 if (mem_base != xmlMemBlocks()) {
50866 printf("Leak of %d blocks found in xmlXPathNodeTrailingSorted",
50867 xmlMemBlocks() - mem_base);
50869 printf(" %d", n_nodes);
50870 printf(" %d", n_node);
50883 test_xmlXPathNormalizeFunction(void) {
50886 #if defined(LIBXML_XPATH_ENABLED)
50888 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
50890 int nargs; /* the number of arguments */
50893 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
50894 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
50895 mem_base = xmlMemBlocks();
50896 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
50897 nargs = gen_int(n_nargs, 1);
50899 xmlXPathNormalizeFunction(ctxt, nargs);
50901 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
50902 des_int(n_nargs, nargs, 1);
50903 xmlResetLastError();
50904 if (mem_base != xmlMemBlocks()) {
50905 printf("Leak of %d blocks found in xmlXPathNormalizeFunction",
50906 xmlMemBlocks() - mem_base);
50908 printf(" %d", n_ctxt);
50909 printf(" %d", n_nargs);
50922 test_xmlXPathNotEqualValues(void) {
50925 #if defined(LIBXML_XPATH_ENABLED)
50928 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
50931 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
50932 mem_base = xmlMemBlocks();
50933 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
50935 ret_val = xmlXPathNotEqualValues(ctxt);
50936 desret_int(ret_val);
50938 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
50939 xmlResetLastError();
50940 if (mem_base != xmlMemBlocks()) {
50941 printf("Leak of %d blocks found in xmlXPathNotEqualValues",
50942 xmlMemBlocks() - mem_base);
50944 printf(" %d", n_ctxt);
50956 test_xmlXPathNotFunction(void) {
50959 #if defined(LIBXML_XPATH_ENABLED)
50961 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
50963 int nargs; /* the number of arguments */
50966 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
50967 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
50968 mem_base = xmlMemBlocks();
50969 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
50970 nargs = gen_int(n_nargs, 1);
50972 xmlXPathNotFunction(ctxt, nargs);
50974 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
50975 des_int(n_nargs, nargs, 1);
50976 xmlResetLastError();
50977 if (mem_base != xmlMemBlocks()) {
50978 printf("Leak of %d blocks found in xmlXPathNotFunction",
50979 xmlMemBlocks() - mem_base);
50981 printf(" %d", n_ctxt);
50982 printf(" %d", n_nargs);
50995 test_xmlXPathNsLookup(void) {
50998 #if defined(LIBXML_XPATH_ENABLED)
51000 const xmlChar * ret_val;
51001 xmlXPathContextPtr ctxt; /* the XPath context */
51003 xmlChar * prefix; /* the namespace prefix value */
51006 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathContextPtr;n_ctxt++) {
51007 for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
51008 mem_base = xmlMemBlocks();
51009 ctxt = gen_xmlXPathContextPtr(n_ctxt, 0);
51010 prefix = gen_const_xmlChar_ptr(n_prefix, 1);
51012 ret_val = xmlXPathNsLookup(ctxt, (const xmlChar *)prefix);
51013 desret_const_xmlChar_ptr(ret_val);
51015 des_xmlXPathContextPtr(n_ctxt, ctxt, 0);
51016 des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 1);
51017 xmlResetLastError();
51018 if (mem_base != xmlMemBlocks()) {
51019 printf("Leak of %d blocks found in xmlXPathNsLookup",
51020 xmlMemBlocks() - mem_base);
51022 printf(" %d", n_ctxt);
51023 printf(" %d", n_prefix);
51036 test_xmlXPathNumberFunction(void) {
51039 #if defined(LIBXML_XPATH_ENABLED)
51041 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
51043 int nargs; /* the number of arguments */
51046 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
51047 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
51048 mem_base = xmlMemBlocks();
51049 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
51050 nargs = gen_int(n_nargs, 1);
51052 xmlXPathNumberFunction(ctxt, nargs);
51054 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
51055 des_int(n_nargs, nargs, 1);
51056 xmlResetLastError();
51057 if (mem_base != xmlMemBlocks()) {
51058 printf("Leak of %d blocks found in xmlXPathNumberFunction",
51059 xmlMemBlocks() - mem_base);
51061 printf(" %d", n_ctxt);
51062 printf(" %d", n_nargs);
51075 test_xmlXPathParseNCName(void) {
51078 #if defined(LIBXML_XPATH_ENABLED)
51081 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
51084 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
51085 mem_base = xmlMemBlocks();
51086 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
51088 ret_val = xmlXPathParseNCName(ctxt);
51089 desret_xmlChar_ptr(ret_val);
51091 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
51092 xmlResetLastError();
51093 if (mem_base != xmlMemBlocks()) {
51094 printf("Leak of %d blocks found in xmlXPathParseNCName",
51095 xmlMemBlocks() - mem_base);
51097 printf(" %d", n_ctxt);
51109 test_xmlXPathParseName(void) {
51112 #if defined(LIBXML_XPATH_ENABLED)
51115 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
51118 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
51119 mem_base = xmlMemBlocks();
51120 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
51122 ret_val = xmlXPathParseName(ctxt);
51123 desret_xmlChar_ptr(ret_val);
51125 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
51126 xmlResetLastError();
51127 if (mem_base != xmlMemBlocks()) {
51128 printf("Leak of %d blocks found in xmlXPathParseName",
51129 xmlMemBlocks() - mem_base);
51131 printf(" %d", n_ctxt);
51143 test_xmlXPathPopBoolean(void) {
51146 #if defined(LIBXML_XPATH_ENABLED)
51149 xmlXPathParserContextPtr ctxt; /* an XPath parser context */
51152 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
51153 mem_base = xmlMemBlocks();
51154 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
51156 ret_val = xmlXPathPopBoolean(ctxt);
51157 desret_int(ret_val);
51159 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
51160 xmlResetLastError();
51161 if (mem_base != xmlMemBlocks()) {
51162 printf("Leak of %d blocks found in xmlXPathPopBoolean",
51163 xmlMemBlocks() - mem_base);
51165 printf(" %d", n_ctxt);
51177 test_xmlXPathPopExternal(void) {
51180 #if defined(LIBXML_XPATH_ENABLED)
51183 xmlXPathParserContextPtr ctxt; /* an XPath parser context */
51186 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
51187 mem_base = xmlMemBlocks();
51188 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
51190 ret_val = xmlXPathPopExternal(ctxt);
51191 desret_void_ptr(ret_val);
51193 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
51194 xmlResetLastError();
51195 if (mem_base != xmlMemBlocks()) {
51196 printf("Leak of %d blocks found in xmlXPathPopExternal",
51197 xmlMemBlocks() - mem_base);
51199 printf(" %d", n_ctxt);
51211 test_xmlXPathPopNodeSet(void) {
51214 #if defined(LIBXML_XPATH_ENABLED)
51216 xmlNodeSetPtr ret_val;
51217 xmlXPathParserContextPtr ctxt; /* an XPath parser context */
51220 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
51221 mem_base = xmlMemBlocks();
51222 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
51224 ret_val = xmlXPathPopNodeSet(ctxt);
51225 desret_xmlNodeSetPtr(ret_val);
51227 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
51228 xmlResetLastError();
51229 if (mem_base != xmlMemBlocks()) {
51230 printf("Leak of %d blocks found in xmlXPathPopNodeSet",
51231 xmlMemBlocks() - mem_base);
51233 printf(" %d", n_ctxt);
51245 test_xmlXPathPopNumber(void) {
51248 #if defined(LIBXML_XPATH_ENABLED)
51251 xmlXPathParserContextPtr ctxt; /* an XPath parser context */
51254 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
51255 mem_base = xmlMemBlocks();
51256 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
51258 ret_val = xmlXPathPopNumber(ctxt);
51259 desret_double(ret_val);
51261 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
51262 xmlResetLastError();
51263 if (mem_base != xmlMemBlocks()) {
51264 printf("Leak of %d blocks found in xmlXPathPopNumber",
51265 xmlMemBlocks() - mem_base);
51267 printf(" %d", n_ctxt);
51279 test_xmlXPathPopString(void) {
51282 #if defined(LIBXML_XPATH_ENABLED)
51285 xmlXPathParserContextPtr ctxt; /* an XPath parser context */
51288 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
51289 mem_base = xmlMemBlocks();
51290 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
51292 ret_val = xmlXPathPopString(ctxt);
51293 desret_xmlChar_ptr(ret_val);
51295 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
51296 xmlResetLastError();
51297 if (mem_base != xmlMemBlocks()) {
51298 printf("Leak of %d blocks found in xmlXPathPopString",
51299 xmlMemBlocks() - mem_base);
51301 printf(" %d", n_ctxt);
51313 test_xmlXPathPositionFunction(void) {
51316 #if defined(LIBXML_XPATH_ENABLED)
51318 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
51320 int nargs; /* the number of arguments */
51323 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
51324 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
51325 mem_base = xmlMemBlocks();
51326 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
51327 nargs = gen_int(n_nargs, 1);
51329 xmlXPathPositionFunction(ctxt, nargs);
51331 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
51332 des_int(n_nargs, nargs, 1);
51333 xmlResetLastError();
51334 if (mem_base != xmlMemBlocks()) {
51335 printf("Leak of %d blocks found in xmlXPathPositionFunction",
51336 xmlMemBlocks() - mem_base);
51338 printf(" %d", n_ctxt);
51339 printf(" %d", n_nargs);
51352 test_xmlXPathRegisterAllFunctions(void) {
51355 #if defined(LIBXML_XPATH_ENABLED)
51357 xmlXPathContextPtr ctxt; /* the XPath context */
51360 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathContextPtr;n_ctxt++) {
51361 mem_base = xmlMemBlocks();
51362 ctxt = gen_xmlXPathContextPtr(n_ctxt, 0);
51364 xmlXPathRegisterAllFunctions(ctxt);
51366 des_xmlXPathContextPtr(n_ctxt, ctxt, 0);
51367 xmlResetLastError();
51368 if (mem_base != xmlMemBlocks()) {
51369 printf("Leak of %d blocks found in xmlXPathRegisterAllFunctions",
51370 xmlMemBlocks() - mem_base);
51372 printf(" %d", n_ctxt);
51384 test_xmlXPathRegisterFunc(void) {
51388 /* missing type support */
51394 test_xmlXPathRegisterFuncLookup(void) {
51398 /* missing type support */
51404 test_xmlXPathRegisterFuncNS(void) {
51408 /* missing type support */
51414 test_xmlXPathRegisterNs(void) {
51417 #if defined(LIBXML_XPATH_ENABLED)
51420 xmlXPathContextPtr ctxt; /* the XPath context */
51422 xmlChar * prefix; /* the namespace prefix cannot be NULL or empty string */
51424 xmlChar * ns_uri; /* the namespace name */
51427 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathContextPtr;n_ctxt++) {
51428 for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
51429 for (n_ns_uri = 0;n_ns_uri < gen_nb_const_xmlChar_ptr;n_ns_uri++) {
51430 mem_base = xmlMemBlocks();
51431 ctxt = gen_xmlXPathContextPtr(n_ctxt, 0);
51432 prefix = gen_const_xmlChar_ptr(n_prefix, 1);
51433 ns_uri = gen_const_xmlChar_ptr(n_ns_uri, 2);
51435 ret_val = xmlXPathRegisterNs(ctxt, (const xmlChar *)prefix, (const xmlChar *)ns_uri);
51436 desret_int(ret_val);
51438 des_xmlXPathContextPtr(n_ctxt, ctxt, 0);
51439 des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 1);
51440 des_const_xmlChar_ptr(n_ns_uri, (const xmlChar *)ns_uri, 2);
51441 xmlResetLastError();
51442 if (mem_base != xmlMemBlocks()) {
51443 printf("Leak of %d blocks found in xmlXPathRegisterNs",
51444 xmlMemBlocks() - mem_base);
51446 printf(" %d", n_ctxt);
51447 printf(" %d", n_prefix);
51448 printf(" %d", n_ns_uri);
51462 test_xmlXPathRegisterVariable(void) {
51465 #if defined(LIBXML_XPATH_ENABLED)
51468 xmlXPathContextPtr ctxt; /* the XPath context */
51470 xmlChar * name; /* the variable name */
51472 xmlXPathObjectPtr value; /* the variable value or NULL */
51475 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathContextPtr;n_ctxt++) {
51476 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
51477 for (n_value = 0;n_value < gen_nb_xmlXPathObjectPtr;n_value++) {
51478 mem_base = xmlMemBlocks();
51479 ctxt = gen_xmlXPathContextPtr(n_ctxt, 0);
51480 name = gen_const_xmlChar_ptr(n_name, 1);
51481 value = gen_xmlXPathObjectPtr(n_value, 2);
51483 ret_val = xmlXPathRegisterVariable(ctxt, (const xmlChar *)name, value);
51484 desret_int(ret_val);
51486 des_xmlXPathContextPtr(n_ctxt, ctxt, 0);
51487 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
51488 des_xmlXPathObjectPtr(n_value, value, 2);
51489 xmlResetLastError();
51490 if (mem_base != xmlMemBlocks()) {
51491 printf("Leak of %d blocks found in xmlXPathRegisterVariable",
51492 xmlMemBlocks() - mem_base);
51494 printf(" %d", n_ctxt);
51495 printf(" %d", n_name);
51496 printf(" %d", n_value);
51510 test_xmlXPathRegisterVariableLookup(void) {
51514 /* missing type support */
51520 test_xmlXPathRegisterVariableNS(void) {
51523 #if defined(LIBXML_XPATH_ENABLED)
51526 xmlXPathContextPtr ctxt; /* the XPath context */
51528 xmlChar * name; /* the variable name */
51530 xmlChar * ns_uri; /* the variable namespace URI */
51532 xmlXPathObjectPtr value; /* the variable value or NULL */
51535 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathContextPtr;n_ctxt++) {
51536 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
51537 for (n_ns_uri = 0;n_ns_uri < gen_nb_const_xmlChar_ptr;n_ns_uri++) {
51538 for (n_value = 0;n_value < gen_nb_xmlXPathObjectPtr;n_value++) {
51539 mem_base = xmlMemBlocks();
51540 ctxt = gen_xmlXPathContextPtr(n_ctxt, 0);
51541 name = gen_const_xmlChar_ptr(n_name, 1);
51542 ns_uri = gen_const_xmlChar_ptr(n_ns_uri, 2);
51543 value = gen_xmlXPathObjectPtr(n_value, 3);
51545 ret_val = xmlXPathRegisterVariableNS(ctxt, (const xmlChar *)name, (const xmlChar *)ns_uri, value);
51546 desret_int(ret_val);
51548 des_xmlXPathContextPtr(n_ctxt, ctxt, 0);
51549 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
51550 des_const_xmlChar_ptr(n_ns_uri, (const xmlChar *)ns_uri, 2);
51551 des_xmlXPathObjectPtr(n_value, value, 3);
51552 xmlResetLastError();
51553 if (mem_base != xmlMemBlocks()) {
51554 printf("Leak of %d blocks found in xmlXPathRegisterVariableNS",
51555 xmlMemBlocks() - mem_base);
51557 printf(" %d", n_ctxt);
51558 printf(" %d", n_name);
51559 printf(" %d", n_ns_uri);
51560 printf(" %d", n_value);
51575 test_xmlXPathRegisteredFuncsCleanup(void) {
51578 #if defined(LIBXML_XPATH_ENABLED)
51580 xmlXPathContextPtr ctxt; /* the XPath context */
51583 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathContextPtr;n_ctxt++) {
51584 mem_base = xmlMemBlocks();
51585 ctxt = gen_xmlXPathContextPtr(n_ctxt, 0);
51587 xmlXPathRegisteredFuncsCleanup(ctxt);
51589 des_xmlXPathContextPtr(n_ctxt, ctxt, 0);
51590 xmlResetLastError();
51591 if (mem_base != xmlMemBlocks()) {
51592 printf("Leak of %d blocks found in xmlXPathRegisteredFuncsCleanup",
51593 xmlMemBlocks() - mem_base);
51595 printf(" %d", n_ctxt);
51607 test_xmlXPathRegisteredNsCleanup(void) {
51610 #if defined(LIBXML_XPATH_ENABLED)
51612 xmlXPathContextPtr ctxt; /* the XPath context */
51615 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathContextPtr;n_ctxt++) {
51616 mem_base = xmlMemBlocks();
51617 ctxt = gen_xmlXPathContextPtr(n_ctxt, 0);
51619 xmlXPathRegisteredNsCleanup(ctxt);
51621 des_xmlXPathContextPtr(n_ctxt, ctxt, 0);
51622 xmlResetLastError();
51623 if (mem_base != xmlMemBlocks()) {
51624 printf("Leak of %d blocks found in xmlXPathRegisteredNsCleanup",
51625 xmlMemBlocks() - mem_base);
51627 printf(" %d", n_ctxt);
51639 test_xmlXPathRegisteredVariablesCleanup(void) {
51642 #if defined(LIBXML_XPATH_ENABLED)
51644 xmlXPathContextPtr ctxt; /* the XPath context */
51647 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathContextPtr;n_ctxt++) {
51648 mem_base = xmlMemBlocks();
51649 ctxt = gen_xmlXPathContextPtr(n_ctxt, 0);
51651 xmlXPathRegisteredVariablesCleanup(ctxt);
51653 des_xmlXPathContextPtr(n_ctxt, ctxt, 0);
51654 xmlResetLastError();
51655 if (mem_base != xmlMemBlocks()) {
51656 printf("Leak of %d blocks found in xmlXPathRegisteredVariablesCleanup",
51657 xmlMemBlocks() - mem_base);
51659 printf(" %d", n_ctxt);
51671 test_xmlXPathRoot(void) {
51674 #if defined(LIBXML_XPATH_ENABLED)
51676 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
51679 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
51680 mem_base = xmlMemBlocks();
51681 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
51683 xmlXPathRoot(ctxt);
51685 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
51686 xmlResetLastError();
51687 if (mem_base != xmlMemBlocks()) {
51688 printf("Leak of %d blocks found in xmlXPathRoot",
51689 xmlMemBlocks() - mem_base);
51691 printf(" %d", n_ctxt);
51703 test_xmlXPathRoundFunction(void) {
51706 #if defined(LIBXML_XPATH_ENABLED)
51708 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
51710 int nargs; /* the number of arguments */
51713 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
51714 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
51715 mem_base = xmlMemBlocks();
51716 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
51717 nargs = gen_int(n_nargs, 1);
51719 xmlXPathRoundFunction(ctxt, nargs);
51721 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
51722 des_int(n_nargs, nargs, 1);
51723 xmlResetLastError();
51724 if (mem_base != xmlMemBlocks()) {
51725 printf("Leak of %d blocks found in xmlXPathRoundFunction",
51726 xmlMemBlocks() - mem_base);
51728 printf(" %d", n_ctxt);
51729 printf(" %d", n_nargs);
51742 test_xmlXPathStartsWithFunction(void) {
51745 #if defined(LIBXML_XPATH_ENABLED)
51747 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
51749 int nargs; /* the number of arguments */
51752 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
51753 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
51754 mem_base = xmlMemBlocks();
51755 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
51756 nargs = gen_int(n_nargs, 1);
51758 xmlXPathStartsWithFunction(ctxt, nargs);
51760 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
51761 des_int(n_nargs, nargs, 1);
51762 xmlResetLastError();
51763 if (mem_base != xmlMemBlocks()) {
51764 printf("Leak of %d blocks found in xmlXPathStartsWithFunction",
51765 xmlMemBlocks() - mem_base);
51767 printf(" %d", n_ctxt);
51768 printf(" %d", n_nargs);
51781 test_xmlXPathStringEvalNumber(void) {
51784 #if defined(LIBXML_XPATH_ENABLED)
51787 xmlChar * str; /* A string to scan */
51790 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
51791 mem_base = xmlMemBlocks();
51792 str = gen_const_xmlChar_ptr(n_str, 0);
51794 ret_val = xmlXPathStringEvalNumber((const xmlChar *)str);
51795 desret_double(ret_val);
51797 des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 0);
51798 xmlResetLastError();
51799 if (mem_base != xmlMemBlocks()) {
51800 printf("Leak of %d blocks found in xmlXPathStringEvalNumber",
51801 xmlMemBlocks() - mem_base);
51803 printf(" %d", n_str);
51815 test_xmlXPathStringFunction(void) {
51818 #if defined(LIBXML_XPATH_ENABLED)
51820 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
51822 int nargs; /* the number of arguments */
51825 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
51826 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
51827 mem_base = xmlMemBlocks();
51828 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
51829 nargs = gen_int(n_nargs, 1);
51831 xmlXPathStringFunction(ctxt, nargs);
51833 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
51834 des_int(n_nargs, nargs, 1);
51835 xmlResetLastError();
51836 if (mem_base != xmlMemBlocks()) {
51837 printf("Leak of %d blocks found in xmlXPathStringFunction",
51838 xmlMemBlocks() - mem_base);
51840 printf(" %d", n_ctxt);
51841 printf(" %d", n_nargs);
51854 test_xmlXPathStringLengthFunction(void) {
51857 #if defined(LIBXML_XPATH_ENABLED)
51859 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
51861 int nargs; /* the number of arguments */
51864 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
51865 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
51866 mem_base = xmlMemBlocks();
51867 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
51868 nargs = gen_int(n_nargs, 1);
51870 xmlXPathStringLengthFunction(ctxt, nargs);
51872 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
51873 des_int(n_nargs, nargs, 1);
51874 xmlResetLastError();
51875 if (mem_base != xmlMemBlocks()) {
51876 printf("Leak of %d blocks found in xmlXPathStringLengthFunction",
51877 xmlMemBlocks() - mem_base);
51879 printf(" %d", n_ctxt);
51880 printf(" %d", n_nargs);
51893 test_xmlXPathSubValues(void) {
51896 #if defined(LIBXML_XPATH_ENABLED)
51898 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
51901 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
51902 mem_base = xmlMemBlocks();
51903 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
51905 xmlXPathSubValues(ctxt);
51907 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
51908 xmlResetLastError();
51909 if (mem_base != xmlMemBlocks()) {
51910 printf("Leak of %d blocks found in xmlXPathSubValues",
51911 xmlMemBlocks() - mem_base);
51913 printf(" %d", n_ctxt);
51925 test_xmlXPathSubstringAfterFunction(void) {
51928 #if defined(LIBXML_XPATH_ENABLED)
51930 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
51932 int nargs; /* the number of arguments */
51935 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
51936 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
51937 mem_base = xmlMemBlocks();
51938 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
51939 nargs = gen_int(n_nargs, 1);
51941 xmlXPathSubstringAfterFunction(ctxt, nargs);
51943 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
51944 des_int(n_nargs, nargs, 1);
51945 xmlResetLastError();
51946 if (mem_base != xmlMemBlocks()) {
51947 printf("Leak of %d blocks found in xmlXPathSubstringAfterFunction",
51948 xmlMemBlocks() - mem_base);
51950 printf(" %d", n_ctxt);
51951 printf(" %d", n_nargs);
51964 test_xmlXPathSubstringBeforeFunction(void) {
51967 #if defined(LIBXML_XPATH_ENABLED)
51969 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
51971 int nargs; /* the number of arguments */
51974 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
51975 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
51976 mem_base = xmlMemBlocks();
51977 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
51978 nargs = gen_int(n_nargs, 1);
51980 xmlXPathSubstringBeforeFunction(ctxt, nargs);
51982 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
51983 des_int(n_nargs, nargs, 1);
51984 xmlResetLastError();
51985 if (mem_base != xmlMemBlocks()) {
51986 printf("Leak of %d blocks found in xmlXPathSubstringBeforeFunction",
51987 xmlMemBlocks() - mem_base);
51989 printf(" %d", n_ctxt);
51990 printf(" %d", n_nargs);
52003 test_xmlXPathSubstringFunction(void) {
52006 #if defined(LIBXML_XPATH_ENABLED)
52008 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
52010 int nargs; /* the number of arguments */
52013 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
52014 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
52015 mem_base = xmlMemBlocks();
52016 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
52017 nargs = gen_int(n_nargs, 1);
52019 xmlXPathSubstringFunction(ctxt, nargs);
52021 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
52022 des_int(n_nargs, nargs, 1);
52023 xmlResetLastError();
52024 if (mem_base != xmlMemBlocks()) {
52025 printf("Leak of %d blocks found in xmlXPathSubstringFunction",
52026 xmlMemBlocks() - mem_base);
52028 printf(" %d", n_ctxt);
52029 printf(" %d", n_nargs);
52042 test_xmlXPathSumFunction(void) {
52045 #if defined(LIBXML_XPATH_ENABLED)
52047 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
52049 int nargs; /* the number of arguments */
52052 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
52053 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
52054 mem_base = xmlMemBlocks();
52055 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
52056 nargs = gen_int(n_nargs, 1);
52058 xmlXPathSumFunction(ctxt, nargs);
52060 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
52061 des_int(n_nargs, nargs, 1);
52062 xmlResetLastError();
52063 if (mem_base != xmlMemBlocks()) {
52064 printf("Leak of %d blocks found in xmlXPathSumFunction",
52065 xmlMemBlocks() - mem_base);
52067 printf(" %d", n_ctxt);
52068 printf(" %d", n_nargs);
52081 test_xmlXPathTrailing(void) {
52084 #if defined(LIBXML_XPATH_ENABLED)
52086 xmlNodeSetPtr ret_val;
52087 xmlNodeSetPtr nodes1; /* a node-set */
52089 xmlNodeSetPtr nodes2; /* a node-set */
52092 for (n_nodes1 = 0;n_nodes1 < gen_nb_xmlNodeSetPtr;n_nodes1++) {
52093 for (n_nodes2 = 0;n_nodes2 < gen_nb_xmlNodeSetPtr;n_nodes2++) {
52094 mem_base = xmlMemBlocks();
52095 nodes1 = gen_xmlNodeSetPtr(n_nodes1, 0);
52096 nodes2 = gen_xmlNodeSetPtr(n_nodes2, 1);
52098 ret_val = xmlXPathTrailing(nodes1, nodes2);
52099 desret_xmlNodeSetPtr(ret_val);
52101 des_xmlNodeSetPtr(n_nodes1, nodes1, 0);
52102 des_xmlNodeSetPtr(n_nodes2, nodes2, 1);
52103 xmlResetLastError();
52104 if (mem_base != xmlMemBlocks()) {
52105 printf("Leak of %d blocks found in xmlXPathTrailing",
52106 xmlMemBlocks() - mem_base);
52108 printf(" %d", n_nodes1);
52109 printf(" %d", n_nodes2);
52122 test_xmlXPathTrailingSorted(void) {
52125 #if defined(LIBXML_XPATH_ENABLED)
52127 xmlNodeSetPtr ret_val;
52128 xmlNodeSetPtr nodes1; /* a node-set, sorted by document order */
52130 xmlNodeSetPtr nodes2; /* a node-set, sorted by document order */
52133 for (n_nodes1 = 0;n_nodes1 < gen_nb_xmlNodeSetPtr;n_nodes1++) {
52134 for (n_nodes2 = 0;n_nodes2 < gen_nb_xmlNodeSetPtr;n_nodes2++) {
52135 mem_base = xmlMemBlocks();
52136 nodes1 = gen_xmlNodeSetPtr(n_nodes1, 0);
52137 nodes2 = gen_xmlNodeSetPtr(n_nodes2, 1);
52139 ret_val = xmlXPathTrailingSorted(nodes1, nodes2);
52140 desret_xmlNodeSetPtr(ret_val);
52142 des_xmlNodeSetPtr(n_nodes1, nodes1, 0);
52143 des_xmlNodeSetPtr(n_nodes2, nodes2, 1);
52144 xmlResetLastError();
52145 if (mem_base != xmlMemBlocks()) {
52146 printf("Leak of %d blocks found in xmlXPathTrailingSorted",
52147 xmlMemBlocks() - mem_base);
52149 printf(" %d", n_nodes1);
52150 printf(" %d", n_nodes2);
52163 test_xmlXPathTranslateFunction(void) {
52166 #if defined(LIBXML_XPATH_ENABLED)
52168 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
52170 int nargs; /* the number of arguments */
52173 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
52174 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
52175 mem_base = xmlMemBlocks();
52176 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
52177 nargs = gen_int(n_nargs, 1);
52179 xmlXPathTranslateFunction(ctxt, nargs);
52181 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
52182 des_int(n_nargs, nargs, 1);
52183 xmlResetLastError();
52184 if (mem_base != xmlMemBlocks()) {
52185 printf("Leak of %d blocks found in xmlXPathTranslateFunction",
52186 xmlMemBlocks() - mem_base);
52188 printf(" %d", n_ctxt);
52189 printf(" %d", n_nargs);
52202 test_xmlXPathTrueFunction(void) {
52205 #if defined(LIBXML_XPATH_ENABLED)
52207 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
52209 int nargs; /* the number of arguments */
52212 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
52213 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
52214 mem_base = xmlMemBlocks();
52215 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
52216 nargs = gen_int(n_nargs, 1);
52218 xmlXPathTrueFunction(ctxt, nargs);
52220 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
52221 des_int(n_nargs, nargs, 1);
52222 xmlResetLastError();
52223 if (mem_base != xmlMemBlocks()) {
52224 printf("Leak of %d blocks found in xmlXPathTrueFunction",
52225 xmlMemBlocks() - mem_base);
52227 printf(" %d", n_ctxt);
52228 printf(" %d", n_nargs);
52241 test_xmlXPathValueFlipSign(void) {
52244 #if defined(LIBXML_XPATH_ENABLED)
52246 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
52249 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
52250 mem_base = xmlMemBlocks();
52251 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
52253 xmlXPathValueFlipSign(ctxt);
52255 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
52256 xmlResetLastError();
52257 if (mem_base != xmlMemBlocks()) {
52258 printf("Leak of %d blocks found in xmlXPathValueFlipSign",
52259 xmlMemBlocks() - mem_base);
52261 printf(" %d", n_ctxt);
52273 test_xmlXPathVariableLookup(void) {
52276 #if defined(LIBXML_XPATH_ENABLED)
52278 xmlXPathObjectPtr ret_val;
52279 xmlXPathContextPtr ctxt; /* the XPath context */
52281 xmlChar * name; /* the variable name */
52284 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathContextPtr;n_ctxt++) {
52285 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
52286 mem_base = xmlMemBlocks();
52287 ctxt = gen_xmlXPathContextPtr(n_ctxt, 0);
52288 name = gen_const_xmlChar_ptr(n_name, 1);
52290 ret_val = xmlXPathVariableLookup(ctxt, (const xmlChar *)name);
52291 desret_xmlXPathObjectPtr(ret_val);
52293 des_xmlXPathContextPtr(n_ctxt, ctxt, 0);
52294 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
52295 xmlResetLastError();
52296 if (mem_base != xmlMemBlocks()) {
52297 printf("Leak of %d blocks found in xmlXPathVariableLookup",
52298 xmlMemBlocks() - mem_base);
52300 printf(" %d", n_ctxt);
52301 printf(" %d", n_name);
52314 test_xmlXPathVariableLookupNS(void) {
52317 #if defined(LIBXML_XPATH_ENABLED)
52319 xmlXPathObjectPtr ret_val;
52320 xmlXPathContextPtr ctxt; /* the XPath context */
52322 xmlChar * name; /* the variable name */
52324 xmlChar * ns_uri; /* the variable namespace URI */
52327 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathContextPtr;n_ctxt++) {
52328 for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
52329 for (n_ns_uri = 0;n_ns_uri < gen_nb_const_xmlChar_ptr;n_ns_uri++) {
52330 mem_base = xmlMemBlocks();
52331 ctxt = gen_xmlXPathContextPtr(n_ctxt, 0);
52332 name = gen_const_xmlChar_ptr(n_name, 1);
52333 ns_uri = gen_const_xmlChar_ptr(n_ns_uri, 2);
52335 ret_val = xmlXPathVariableLookupNS(ctxt, (const xmlChar *)name, (const xmlChar *)ns_uri);
52336 desret_xmlXPathObjectPtr(ret_val);
52338 des_xmlXPathContextPtr(n_ctxt, ctxt, 0);
52339 des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
52340 des_const_xmlChar_ptr(n_ns_uri, (const xmlChar *)ns_uri, 2);
52341 xmlResetLastError();
52342 if (mem_base != xmlMemBlocks()) {
52343 printf("Leak of %d blocks found in xmlXPathVariableLookupNS",
52344 xmlMemBlocks() - mem_base);
52346 printf(" %d", n_ctxt);
52347 printf(" %d", n_name);
52348 printf(" %d", n_ns_uri);
52362 test_xmlXPathWrapCString(void) {
52365 #if defined(LIBXML_XPATH_ENABLED)
52367 xmlXPathObjectPtr ret_val;
52368 char * val; /* the char * value */
52371 for (n_val = 0;n_val < gen_nb_char_ptr;n_val++) {
52372 mem_base = xmlMemBlocks();
52373 val = gen_char_ptr(n_val, 0);
52375 ret_val = xmlXPathWrapCString(val);
52376 desret_xmlXPathObjectPtr(ret_val);
52378 des_char_ptr(n_val, val, 0);
52379 xmlResetLastError();
52380 if (mem_base != xmlMemBlocks()) {
52381 printf("Leak of %d blocks found in xmlXPathWrapCString",
52382 xmlMemBlocks() - mem_base);
52384 printf(" %d", n_val);
52396 test_xmlXPathWrapExternal(void) {
52399 #if defined(LIBXML_XPATH_ENABLED)
52401 xmlXPathObjectPtr ret_val;
52402 void * val; /* the user data */
52405 for (n_val = 0;n_val < gen_nb_void_ptr;n_val++) {
52406 mem_base = xmlMemBlocks();
52407 val = gen_void_ptr(n_val, 0);
52409 ret_val = xmlXPathWrapExternal(val);
52410 desret_xmlXPathObjectPtr(ret_val);
52412 des_void_ptr(n_val, val, 0);
52413 xmlResetLastError();
52414 if (mem_base != xmlMemBlocks()) {
52415 printf("Leak of %d blocks found in xmlXPathWrapExternal",
52416 xmlMemBlocks() - mem_base);
52418 printf(" %d", n_val);
52430 test_xmlXPathWrapNodeSet(void) {
52433 #if defined(LIBXML_XPATH_ENABLED)
52435 xmlXPathObjectPtr ret_val;
52436 xmlNodeSetPtr val; /* the NodePtr value */
52439 for (n_val = 0;n_val < gen_nb_xmlNodeSetPtr;n_val++) {
52440 mem_base = xmlMemBlocks();
52441 val = gen_xmlNodeSetPtr(n_val, 0);
52443 ret_val = xmlXPathWrapNodeSet(val);
52444 desret_xmlXPathObjectPtr(ret_val);
52446 des_xmlNodeSetPtr(n_val, val, 0);
52447 xmlResetLastError();
52448 if (mem_base != xmlMemBlocks()) {
52449 printf("Leak of %d blocks found in xmlXPathWrapNodeSet",
52450 xmlMemBlocks() - mem_base);
52452 printf(" %d", n_val);
52464 test_xmlXPatherror(void) {
52467 #if defined(LIBXML_XPATH_ENABLED)
52469 xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
52471 const char * file; /* the file name */
52473 int line; /* the line number */
52475 int no; /* the error number */
52478 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
52479 for (n_file = 0;n_file < gen_nb_filepath;n_file++) {
52480 for (n_line = 0;n_line < gen_nb_int;n_line++) {
52481 for (n_no = 0;n_no < gen_nb_int;n_no++) {
52482 mem_base = xmlMemBlocks();
52483 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
52484 file = gen_filepath(n_file, 1);
52485 line = gen_int(n_line, 2);
52486 no = gen_int(n_no, 3);
52488 xmlXPatherror(ctxt, file, line, no);
52490 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
52491 des_filepath(n_file, file, 1);
52492 des_int(n_line, line, 2);
52493 des_int(n_no, no, 3);
52494 xmlResetLastError();
52495 if (mem_base != xmlMemBlocks()) {
52496 printf("Leak of %d blocks found in xmlXPatherror",
52497 xmlMemBlocks() - mem_base);
52499 printf(" %d", n_ctxt);
52500 printf(" %d", n_file);
52501 printf(" %d", n_line);
52502 printf(" %d", n_no);
52516 test_xpathInternals(void) {
52520 if (quiet == 0) printf("Testing xpathInternals : 106 of 117 functions ...\n");
52521 rc = test_valuePop();
52522 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52523 rc = test_valuePush();
52524 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52525 rc = test_xmlXPathAddValues();
52526 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52527 rc = test_xmlXPathBooleanFunction();
52528 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52529 rc = test_xmlXPathCeilingFunction();
52530 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52531 rc = test_xmlXPathCompareValues();
52532 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52533 rc = test_xmlXPathConcatFunction();
52534 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52535 rc = test_xmlXPathContainsFunction();
52536 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52537 rc = test_xmlXPathCountFunction();
52538 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52539 rc = test_xmlXPathDebugDumpCompExpr();
52540 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52541 rc = test_xmlXPathDebugDumpObject();
52542 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52543 rc = test_xmlXPathDifference();
52544 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52545 rc = test_xmlXPathDistinct();
52546 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52547 rc = test_xmlXPathDistinctSorted();
52548 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52549 rc = test_xmlXPathDivValues();
52550 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52551 rc = test_xmlXPathEqualValues();
52552 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52553 rc = test_xmlXPathErr();
52554 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52555 rc = test_xmlXPathEvalExpr();
52556 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52557 rc = test_xmlXPathEvaluatePredicateResult();
52558 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52559 rc = test_xmlXPathFalseFunction();
52560 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52561 rc = test_xmlXPathFloorFunction();
52562 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52563 rc = test_xmlXPathFunctionLookup();
52564 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52565 rc = test_xmlXPathFunctionLookupNS();
52566 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52567 rc = test_xmlXPathHasSameNodes();
52568 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52569 rc = test_xmlXPathIdFunction();
52570 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52571 rc = test_xmlXPathIntersection();
52572 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52573 rc = test_xmlXPathIsNodeType();
52574 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52575 rc = test_xmlXPathLangFunction();
52576 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52577 rc = test_xmlXPathLastFunction();
52578 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52579 rc = test_xmlXPathLeading();
52580 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52581 rc = test_xmlXPathLeadingSorted();
52582 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52583 rc = test_xmlXPathLocalNameFunction();
52584 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52585 rc = test_xmlXPathModValues();
52586 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52587 rc = test_xmlXPathMultValues();
52588 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52589 rc = test_xmlXPathNamespaceURIFunction();
52590 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52591 rc = test_xmlXPathNewBoolean();
52592 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52593 rc = test_xmlXPathNewCString();
52594 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52595 rc = test_xmlXPathNewFloat();
52596 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52597 rc = test_xmlXPathNewNodeSet();
52598 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52599 rc = test_xmlXPathNewNodeSetList();
52600 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52601 rc = test_xmlXPathNewParserContext();
52602 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52603 rc = test_xmlXPathNewString();
52604 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52605 rc = test_xmlXPathNextAncestor();
52606 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52607 rc = test_xmlXPathNextAncestorOrSelf();
52608 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52609 rc = test_xmlXPathNextAttribute();
52610 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52611 rc = test_xmlXPathNextChild();
52612 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52613 rc = test_xmlXPathNextDescendant();
52614 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52615 rc = test_xmlXPathNextDescendantOrSelf();
52616 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52617 rc = test_xmlXPathNextFollowing();
52618 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52619 rc = test_xmlXPathNextFollowingSibling();
52620 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52621 rc = test_xmlXPathNextNamespace();
52622 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52623 rc = test_xmlXPathNextParent();
52624 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52625 rc = test_xmlXPathNextPreceding();
52626 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52627 rc = test_xmlXPathNextPrecedingSibling();
52628 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52629 rc = test_xmlXPathNextSelf();
52630 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52631 rc = test_xmlXPathNodeLeading();
52632 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52633 rc = test_xmlXPathNodeLeadingSorted();
52634 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52635 rc = test_xmlXPathNodeSetAdd();
52636 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52637 rc = test_xmlXPathNodeSetAddNs();
52638 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52639 rc = test_xmlXPathNodeSetAddUnique();
52640 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52641 rc = test_xmlXPathNodeSetContains();
52642 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52643 rc = test_xmlXPathNodeSetDel();
52644 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52645 rc = test_xmlXPathNodeSetMerge();
52646 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52647 rc = test_xmlXPathNodeSetRemove();
52648 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52649 rc = test_xmlXPathNodeSetSort();
52650 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52651 rc = test_xmlXPathNodeTrailing();
52652 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52653 rc = test_xmlXPathNodeTrailingSorted();
52654 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52655 rc = test_xmlXPathNormalizeFunction();
52656 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52657 rc = test_xmlXPathNotEqualValues();
52658 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52659 rc = test_xmlXPathNotFunction();
52660 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52661 rc = test_xmlXPathNsLookup();
52662 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52663 rc = test_xmlXPathNumberFunction();
52664 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52665 rc = test_xmlXPathParseNCName();
52666 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52667 rc = test_xmlXPathParseName();
52668 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52669 rc = test_xmlXPathPopBoolean();
52670 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52671 rc = test_xmlXPathPopExternal();
52672 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52673 rc = test_xmlXPathPopNodeSet();
52674 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52675 rc = test_xmlXPathPopNumber();
52676 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52677 rc = test_xmlXPathPopString();
52678 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52679 rc = test_xmlXPathPositionFunction();
52680 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52681 rc = test_xmlXPathRegisterAllFunctions();
52682 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52683 rc = test_xmlXPathRegisterFunc();
52684 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52685 rc = test_xmlXPathRegisterFuncLookup();
52686 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52687 rc = test_xmlXPathRegisterFuncNS();
52688 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52689 rc = test_xmlXPathRegisterNs();
52690 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52691 rc = test_xmlXPathRegisterVariable();
52692 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52693 rc = test_xmlXPathRegisterVariableLookup();
52694 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52695 rc = test_xmlXPathRegisterVariableNS();
52696 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52697 rc = test_xmlXPathRegisteredFuncsCleanup();
52698 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52699 rc = test_xmlXPathRegisteredNsCleanup();
52700 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52701 rc = test_xmlXPathRegisteredVariablesCleanup();
52702 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52703 rc = test_xmlXPathRoot();
52704 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52705 rc = test_xmlXPathRoundFunction();
52706 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52707 rc = test_xmlXPathStartsWithFunction();
52708 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52709 rc = test_xmlXPathStringEvalNumber();
52710 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52711 rc = test_xmlXPathStringFunction();
52712 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52713 rc = test_xmlXPathStringLengthFunction();
52714 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52715 rc = test_xmlXPathSubValues();
52716 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52717 rc = test_xmlXPathSubstringAfterFunction();
52718 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52719 rc = test_xmlXPathSubstringBeforeFunction();
52720 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52721 rc = test_xmlXPathSubstringFunction();
52722 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52723 rc = test_xmlXPathSumFunction();
52724 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52725 rc = test_xmlXPathTrailing();
52726 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52727 rc = test_xmlXPathTrailingSorted();
52728 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52729 rc = test_xmlXPathTranslateFunction();
52730 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52731 rc = test_xmlXPathTrueFunction();
52732 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52733 rc = test_xmlXPathValueFlipSign();
52734 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52735 rc = test_xmlXPathVariableLookup();
52736 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52737 rc = test_xmlXPathVariableLookupNS();
52738 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52739 rc = test_xmlXPathWrapCString();
52740 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52741 rc = test_xmlXPathWrapExternal();
52742 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52743 rc = test_xmlXPathWrapNodeSet();
52744 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52745 rc = test_xmlXPatherror();
52746 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
52749 printf("Module xpathInternals: %d errors\n", test_ret);
52754 test_xmlXPtrBuildNodeList(void) {
52757 #if defined(LIBXML_XPTR_ENABLED)
52759 xmlNodePtr ret_val;
52760 xmlXPathObjectPtr obj; /* the XPointer result from the evaluation. */
52763 for (n_obj = 0;n_obj < gen_nb_xmlXPathObjectPtr;n_obj++) {
52764 mem_base = xmlMemBlocks();
52765 obj = gen_xmlXPathObjectPtr(n_obj, 0);
52767 ret_val = xmlXPtrBuildNodeList(obj);
52768 desret_xmlNodePtr(ret_val);
52770 des_xmlXPathObjectPtr(n_obj, obj, 0);
52771 xmlResetLastError();
52772 if (mem_base != xmlMemBlocks()) {
52773 printf("Leak of %d blocks found in xmlXPtrBuildNodeList",
52774 xmlMemBlocks() - mem_base);
52776 printf(" %d", n_obj);
52788 test_xmlXPtrEval(void) {
52791 #if defined(LIBXML_XPTR_ENABLED)
52793 xmlXPathObjectPtr ret_val;
52794 xmlChar * str; /* the XPointer expression */
52796 xmlXPathContextPtr ctx; /* the XPointer context */
52799 for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
52800 for (n_ctx = 0;n_ctx < gen_nb_xmlXPathContextPtr;n_ctx++) {
52801 mem_base = xmlMemBlocks();
52802 str = gen_const_xmlChar_ptr(n_str, 0);
52803 ctx = gen_xmlXPathContextPtr(n_ctx, 1);
52805 ret_val = xmlXPtrEval((const xmlChar *)str, ctx);
52806 desret_xmlXPathObjectPtr(ret_val);
52808 des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 0);
52809 des_xmlXPathContextPtr(n_ctx, ctx, 1);
52810 xmlResetLastError();
52811 if (mem_base != xmlMemBlocks()) {
52812 printf("Leak of %d blocks found in xmlXPtrEval",
52813 xmlMemBlocks() - mem_base);
52815 printf(" %d", n_str);
52816 printf(" %d", n_ctx);
52829 test_xmlXPtrEvalRangePredicate(void) {
52832 #if defined(LIBXML_XPTR_ENABLED)
52834 xmlXPathParserContextPtr ctxt; /* the XPointer Parser context */
52837 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
52838 mem_base = xmlMemBlocks();
52839 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
52841 xmlXPtrEvalRangePredicate(ctxt);
52843 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
52844 xmlResetLastError();
52845 if (mem_base != xmlMemBlocks()) {
52846 printf("Leak of %d blocks found in xmlXPtrEvalRangePredicate",
52847 xmlMemBlocks() - mem_base);
52849 printf(" %d", n_ctxt);
52859 #ifdef LIBXML_XPTR_ENABLED
52861 #define gen_nb_xmlLocationSetPtr 1
52862 static xmlLocationSetPtr gen_xmlLocationSetPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
52865 static void des_xmlLocationSetPtr(int no ATTRIBUTE_UNUSED, xmlLocationSetPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
52871 test_xmlXPtrLocationSetAdd(void) {
52874 #if defined(LIBXML_XPTR_ENABLED)
52876 xmlLocationSetPtr cur; /* the initial range set */
52878 xmlXPathObjectPtr val; /* a new xmlXPathObjectPtr */
52881 for (n_cur = 0;n_cur < gen_nb_xmlLocationSetPtr;n_cur++) {
52882 for (n_val = 0;n_val < gen_nb_xmlXPathObjectPtr;n_val++) {
52883 mem_base = xmlMemBlocks();
52884 cur = gen_xmlLocationSetPtr(n_cur, 0);
52885 val = gen_xmlXPathObjectPtr(n_val, 1);
52887 xmlXPtrLocationSetAdd(cur, val);
52889 des_xmlLocationSetPtr(n_cur, cur, 0);
52890 des_xmlXPathObjectPtr(n_val, val, 1);
52891 xmlResetLastError();
52892 if (mem_base != xmlMemBlocks()) {
52893 printf("Leak of %d blocks found in xmlXPtrLocationSetAdd",
52894 xmlMemBlocks() - mem_base);
52896 printf(" %d", n_cur);
52897 printf(" %d", n_val);
52910 test_xmlXPtrLocationSetCreate(void) {
52914 /* missing type support */
52920 test_xmlXPtrLocationSetDel(void) {
52923 #if defined(LIBXML_XPTR_ENABLED)
52925 xmlLocationSetPtr cur; /* the initial range set */
52927 xmlXPathObjectPtr val; /* an xmlXPathObjectPtr */
52930 for (n_cur = 0;n_cur < gen_nb_xmlLocationSetPtr;n_cur++) {
52931 for (n_val = 0;n_val < gen_nb_xmlXPathObjectPtr;n_val++) {
52932 mem_base = xmlMemBlocks();
52933 cur = gen_xmlLocationSetPtr(n_cur, 0);
52934 val = gen_xmlXPathObjectPtr(n_val, 1);
52936 xmlXPtrLocationSetDel(cur, val);
52938 des_xmlLocationSetPtr(n_cur, cur, 0);
52939 des_xmlXPathObjectPtr(n_val, val, 1);
52940 xmlResetLastError();
52941 if (mem_base != xmlMemBlocks()) {
52942 printf("Leak of %d blocks found in xmlXPtrLocationSetDel",
52943 xmlMemBlocks() - mem_base);
52945 printf(" %d", n_cur);
52946 printf(" %d", n_val);
52959 test_xmlXPtrLocationSetMerge(void) {
52963 /* missing type support */
52969 test_xmlXPtrLocationSetRemove(void) {
52972 #if defined(LIBXML_XPTR_ENABLED)
52974 xmlLocationSetPtr cur; /* the initial range set */
52976 int val; /* the index to remove */
52979 for (n_cur = 0;n_cur < gen_nb_xmlLocationSetPtr;n_cur++) {
52980 for (n_val = 0;n_val < gen_nb_int;n_val++) {
52981 mem_base = xmlMemBlocks();
52982 cur = gen_xmlLocationSetPtr(n_cur, 0);
52983 val = gen_int(n_val, 1);
52985 xmlXPtrLocationSetRemove(cur, val);
52987 des_xmlLocationSetPtr(n_cur, cur, 0);
52988 des_int(n_val, val, 1);
52989 xmlResetLastError();
52990 if (mem_base != xmlMemBlocks()) {
52991 printf("Leak of %d blocks found in xmlXPtrLocationSetRemove",
52992 xmlMemBlocks() - mem_base);
52994 printf(" %d", n_cur);
52995 printf(" %d", n_val);
53008 test_xmlXPtrNewCollapsedRange(void) {
53011 #if defined(LIBXML_XPTR_ENABLED)
53013 xmlXPathObjectPtr ret_val;
53014 xmlNodePtr start; /* the starting and ending node */
53017 for (n_start = 0;n_start < gen_nb_xmlNodePtr;n_start++) {
53018 mem_base = xmlMemBlocks();
53019 start = gen_xmlNodePtr(n_start, 0);
53021 ret_val = xmlXPtrNewCollapsedRange(start);
53022 desret_xmlXPathObjectPtr(ret_val);
53024 des_xmlNodePtr(n_start, start, 0);
53025 xmlResetLastError();
53026 if (mem_base != xmlMemBlocks()) {
53027 printf("Leak of %d blocks found in xmlXPtrNewCollapsedRange",
53028 xmlMemBlocks() - mem_base);
53030 printf(" %d", n_start);
53042 test_xmlXPtrNewContext(void) {
53046 /* missing type support */
53052 test_xmlXPtrNewLocationSetNodeSet(void) {
53055 #if defined(LIBXML_XPTR_ENABLED)
53057 xmlXPathObjectPtr ret_val;
53058 xmlNodeSetPtr set; /* a node set */
53061 for (n_set = 0;n_set < gen_nb_xmlNodeSetPtr;n_set++) {
53062 mem_base = xmlMemBlocks();
53063 set = gen_xmlNodeSetPtr(n_set, 0);
53065 ret_val = xmlXPtrNewLocationSetNodeSet(set);
53066 desret_xmlXPathObjectPtr(ret_val);
53068 des_xmlNodeSetPtr(n_set, set, 0);
53069 xmlResetLastError();
53070 if (mem_base != xmlMemBlocks()) {
53071 printf("Leak of %d blocks found in xmlXPtrNewLocationSetNodeSet",
53072 xmlMemBlocks() - mem_base);
53074 printf(" %d", n_set);
53086 test_xmlXPtrNewLocationSetNodes(void) {
53089 #if defined(LIBXML_XPTR_ENABLED)
53091 xmlXPathObjectPtr ret_val;
53092 xmlNodePtr start; /* the start NodePtr value */
53094 xmlNodePtr end; /* the end NodePtr value or NULL */
53097 for (n_start = 0;n_start < gen_nb_xmlNodePtr;n_start++) {
53098 for (n_end = 0;n_end < gen_nb_xmlNodePtr;n_end++) {
53099 mem_base = xmlMemBlocks();
53100 start = gen_xmlNodePtr(n_start, 0);
53101 end = gen_xmlNodePtr(n_end, 1);
53103 ret_val = xmlXPtrNewLocationSetNodes(start, end);
53104 desret_xmlXPathObjectPtr(ret_val);
53106 des_xmlNodePtr(n_start, start, 0);
53107 des_xmlNodePtr(n_end, end, 1);
53108 xmlResetLastError();
53109 if (mem_base != xmlMemBlocks()) {
53110 printf("Leak of %d blocks found in xmlXPtrNewLocationSetNodes",
53111 xmlMemBlocks() - mem_base);
53113 printf(" %d", n_start);
53114 printf(" %d", n_end);
53127 test_xmlXPtrNewRange(void) {
53130 #if defined(LIBXML_XPTR_ENABLED)
53132 xmlXPathObjectPtr ret_val;
53133 xmlNodePtr start; /* the starting node */
53135 int startindex; /* the start index */
53137 xmlNodePtr end; /* the ending point */
53139 int endindex; /* the ending index */
53142 for (n_start = 0;n_start < gen_nb_xmlNodePtr;n_start++) {
53143 for (n_startindex = 0;n_startindex < gen_nb_int;n_startindex++) {
53144 for (n_end = 0;n_end < gen_nb_xmlNodePtr;n_end++) {
53145 for (n_endindex = 0;n_endindex < gen_nb_int;n_endindex++) {
53146 mem_base = xmlMemBlocks();
53147 start = gen_xmlNodePtr(n_start, 0);
53148 startindex = gen_int(n_startindex, 1);
53149 end = gen_xmlNodePtr(n_end, 2);
53150 endindex = gen_int(n_endindex, 3);
53152 ret_val = xmlXPtrNewRange(start, startindex, end, endindex);
53153 desret_xmlXPathObjectPtr(ret_val);
53155 des_xmlNodePtr(n_start, start, 0);
53156 des_int(n_startindex, startindex, 1);
53157 des_xmlNodePtr(n_end, end, 2);
53158 des_int(n_endindex, endindex, 3);
53159 xmlResetLastError();
53160 if (mem_base != xmlMemBlocks()) {
53161 printf("Leak of %d blocks found in xmlXPtrNewRange",
53162 xmlMemBlocks() - mem_base);
53164 printf(" %d", n_start);
53165 printf(" %d", n_startindex);
53166 printf(" %d", n_end);
53167 printf(" %d", n_endindex);
53182 test_xmlXPtrNewRangeNodeObject(void) {
53185 #if defined(LIBXML_XPTR_ENABLED)
53187 xmlXPathObjectPtr ret_val;
53188 xmlNodePtr start; /* the starting node */
53190 xmlXPathObjectPtr end; /* the ending object */
53193 for (n_start = 0;n_start < gen_nb_xmlNodePtr;n_start++) {
53194 for (n_end = 0;n_end < gen_nb_xmlXPathObjectPtr;n_end++) {
53195 mem_base = xmlMemBlocks();
53196 start = gen_xmlNodePtr(n_start, 0);
53197 end = gen_xmlXPathObjectPtr(n_end, 1);
53199 ret_val = xmlXPtrNewRangeNodeObject(start, end);
53200 desret_xmlXPathObjectPtr(ret_val);
53202 des_xmlNodePtr(n_start, start, 0);
53203 des_xmlXPathObjectPtr(n_end, end, 1);
53204 xmlResetLastError();
53205 if (mem_base != xmlMemBlocks()) {
53206 printf("Leak of %d blocks found in xmlXPtrNewRangeNodeObject",
53207 xmlMemBlocks() - mem_base);
53209 printf(" %d", n_start);
53210 printf(" %d", n_end);
53223 test_xmlXPtrNewRangeNodePoint(void) {
53226 #if defined(LIBXML_XPTR_ENABLED)
53228 xmlXPathObjectPtr ret_val;
53229 xmlNodePtr start; /* the starting node */
53231 xmlXPathObjectPtr end; /* the ending point */
53234 for (n_start = 0;n_start < gen_nb_xmlNodePtr;n_start++) {
53235 for (n_end = 0;n_end < gen_nb_xmlXPathObjectPtr;n_end++) {
53236 mem_base = xmlMemBlocks();
53237 start = gen_xmlNodePtr(n_start, 0);
53238 end = gen_xmlXPathObjectPtr(n_end, 1);
53240 ret_val = xmlXPtrNewRangeNodePoint(start, end);
53241 desret_xmlXPathObjectPtr(ret_val);
53243 des_xmlNodePtr(n_start, start, 0);
53244 des_xmlXPathObjectPtr(n_end, end, 1);
53245 xmlResetLastError();
53246 if (mem_base != xmlMemBlocks()) {
53247 printf("Leak of %d blocks found in xmlXPtrNewRangeNodePoint",
53248 xmlMemBlocks() - mem_base);
53250 printf(" %d", n_start);
53251 printf(" %d", n_end);
53264 test_xmlXPtrNewRangeNodes(void) {
53267 #if defined(LIBXML_XPTR_ENABLED)
53269 xmlXPathObjectPtr ret_val;
53270 xmlNodePtr start; /* the starting node */
53272 xmlNodePtr end; /* the ending node */
53275 for (n_start = 0;n_start < gen_nb_xmlNodePtr;n_start++) {
53276 for (n_end = 0;n_end < gen_nb_xmlNodePtr;n_end++) {
53277 mem_base = xmlMemBlocks();
53278 start = gen_xmlNodePtr(n_start, 0);
53279 end = gen_xmlNodePtr(n_end, 1);
53281 ret_val = xmlXPtrNewRangeNodes(start, end);
53282 desret_xmlXPathObjectPtr(ret_val);
53284 des_xmlNodePtr(n_start, start, 0);
53285 des_xmlNodePtr(n_end, end, 1);
53286 xmlResetLastError();
53287 if (mem_base != xmlMemBlocks()) {
53288 printf("Leak of %d blocks found in xmlXPtrNewRangeNodes",
53289 xmlMemBlocks() - mem_base);
53291 printf(" %d", n_start);
53292 printf(" %d", n_end);
53305 test_xmlXPtrNewRangePointNode(void) {
53308 #if defined(LIBXML_XPTR_ENABLED)
53310 xmlXPathObjectPtr ret_val;
53311 xmlXPathObjectPtr start; /* the starting point */
53313 xmlNodePtr end; /* the ending node */
53316 for (n_start = 0;n_start < gen_nb_xmlXPathObjectPtr;n_start++) {
53317 for (n_end = 0;n_end < gen_nb_xmlNodePtr;n_end++) {
53318 mem_base = xmlMemBlocks();
53319 start = gen_xmlXPathObjectPtr(n_start, 0);
53320 end = gen_xmlNodePtr(n_end, 1);
53322 ret_val = xmlXPtrNewRangePointNode(start, end);
53323 desret_xmlXPathObjectPtr(ret_val);
53325 des_xmlXPathObjectPtr(n_start, start, 0);
53326 des_xmlNodePtr(n_end, end, 1);
53327 xmlResetLastError();
53328 if (mem_base != xmlMemBlocks()) {
53329 printf("Leak of %d blocks found in xmlXPtrNewRangePointNode",
53330 xmlMemBlocks() - mem_base);
53332 printf(" %d", n_start);
53333 printf(" %d", n_end);
53346 test_xmlXPtrNewRangePoints(void) {
53349 #if defined(LIBXML_XPTR_ENABLED)
53351 xmlXPathObjectPtr ret_val;
53352 xmlXPathObjectPtr start; /* the starting point */
53354 xmlXPathObjectPtr end; /* the ending point */
53357 for (n_start = 0;n_start < gen_nb_xmlXPathObjectPtr;n_start++) {
53358 for (n_end = 0;n_end < gen_nb_xmlXPathObjectPtr;n_end++) {
53359 mem_base = xmlMemBlocks();
53360 start = gen_xmlXPathObjectPtr(n_start, 0);
53361 end = gen_xmlXPathObjectPtr(n_end, 1);
53363 ret_val = xmlXPtrNewRangePoints(start, end);
53364 desret_xmlXPathObjectPtr(ret_val);
53366 des_xmlXPathObjectPtr(n_start, start, 0);
53367 des_xmlXPathObjectPtr(n_end, end, 1);
53368 xmlResetLastError();
53369 if (mem_base != xmlMemBlocks()) {
53370 printf("Leak of %d blocks found in xmlXPtrNewRangePoints",
53371 xmlMemBlocks() - mem_base);
53373 printf(" %d", n_start);
53374 printf(" %d", n_end);
53387 test_xmlXPtrRangeToFunction(void) {
53390 #if defined(LIBXML_XPTR_ENABLED)
53392 xmlXPathParserContextPtr ctxt; /* the XPointer Parser context */
53394 int nargs; /* the number of args */
53397 for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
53398 for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
53399 mem_base = xmlMemBlocks();
53400 ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
53401 nargs = gen_int(n_nargs, 1);
53403 xmlXPtrRangeToFunction(ctxt, nargs);
53405 des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
53406 des_int(n_nargs, nargs, 1);
53407 xmlResetLastError();
53408 if (mem_base != xmlMemBlocks()) {
53409 printf("Leak of %d blocks found in xmlXPtrRangeToFunction",
53410 xmlMemBlocks() - mem_base);
53412 printf(" %d", n_ctxt);
53413 printf(" %d", n_nargs);
53426 test_xmlXPtrWrapLocationSet(void) {
53429 #if defined(LIBXML_XPTR_ENABLED)
53431 xmlXPathObjectPtr ret_val;
53432 xmlLocationSetPtr val; /* the LocationSet value */
53435 for (n_val = 0;n_val < gen_nb_xmlLocationSetPtr;n_val++) {
53436 mem_base = xmlMemBlocks();
53437 val = gen_xmlLocationSetPtr(n_val, 0);
53439 ret_val = xmlXPtrWrapLocationSet(val);
53440 desret_xmlXPathObjectPtr(ret_val);
53442 des_xmlLocationSetPtr(n_val, val, 0);
53443 xmlResetLastError();
53444 if (mem_base != xmlMemBlocks()) {
53445 printf("Leak of %d blocks found in xmlXPtrWrapLocationSet",
53446 xmlMemBlocks() - mem_base);
53448 printf(" %d", n_val);
53459 test_xpointer(void) {
53463 if (quiet == 0) printf("Testing xpointer : 17 of 21 functions ...\n");
53464 rc = test_xmlXPtrBuildNodeList();
53465 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
53466 rc = test_xmlXPtrEval();
53467 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
53468 rc = test_xmlXPtrEvalRangePredicate();
53469 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
53470 rc = test_xmlXPtrLocationSetAdd();
53471 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
53472 rc = test_xmlXPtrLocationSetCreate();
53473 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
53474 rc = test_xmlXPtrLocationSetDel();
53475 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
53476 rc = test_xmlXPtrLocationSetMerge();
53477 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
53478 rc = test_xmlXPtrLocationSetRemove();
53479 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
53480 rc = test_xmlXPtrNewCollapsedRange();
53481 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
53482 rc = test_xmlXPtrNewContext();
53483 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
53484 rc = test_xmlXPtrNewLocationSetNodeSet();
53485 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
53486 rc = test_xmlXPtrNewLocationSetNodes();
53487 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
53488 rc = test_xmlXPtrNewRange();
53489 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
53490 rc = test_xmlXPtrNewRangeNodeObject();
53491 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
53492 rc = test_xmlXPtrNewRangeNodePoint();
53493 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
53494 rc = test_xmlXPtrNewRangeNodes();
53495 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
53496 rc = test_xmlXPtrNewRangePointNode();
53497 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
53498 rc = test_xmlXPtrNewRangePoints();
53499 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
53500 rc = test_xmlXPtrRangeToFunction();
53501 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
53502 rc = test_xmlXPtrWrapLocationSet();
53503 if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
53506 printf("Module xpointer: %d errors\n", test_ret);
53510 test_module(const char *module) {
53511 if (!strcmp(module, "HTMLparser")) return(test_HTMLparser());
53512 if (!strcmp(module, "HTMLtree")) return(test_HTMLtree());
53513 if (!strcmp(module, "SAX2")) return(test_SAX2());
53514 if (!strcmp(module, "c14n")) return(test_c14n());
53515 if (!strcmp(module, "catalog")) return(test_catalog());
53516 if (!strcmp(module, "chvalid")) return(test_chvalid());
53517 if (!strcmp(module, "debugXML")) return(test_debugXML());
53518 if (!strcmp(module, "dict")) return(test_dict());
53519 if (!strcmp(module, "encoding")) return(test_encoding());
53520 if (!strcmp(module, "entities")) return(test_entities());
53521 if (!strcmp(module, "hash")) return(test_hash());
53522 if (!strcmp(module, "list")) return(test_list());
53523 if (!strcmp(module, "nanoftp")) return(test_nanoftp());
53524 if (!strcmp(module, "nanohttp")) return(test_nanohttp());
53525 if (!strcmp(module, "parser")) return(test_parser());
53526 if (!strcmp(module, "parserInternals")) return(test_parserInternals());
53527 if (!strcmp(module, "pattern")) return(test_pattern());
53528 if (!strcmp(module, "relaxng")) return(test_relaxng());
53529 if (!strcmp(module, "schemasInternals")) return(test_schemasInternals());
53530 if (!strcmp(module, "schematron")) return(test_schematron());
53531 if (!strcmp(module, "tree")) return(test_tree());
53532 if (!strcmp(module, "uri")) return(test_uri());
53533 if (!strcmp(module, "valid")) return(test_valid());
53534 if (!strcmp(module, "xinclude")) return(test_xinclude());
53535 if (!strcmp(module, "xmlIO")) return(test_xmlIO());
53536 if (!strcmp(module, "xmlautomata")) return(test_xmlautomata());
53537 if (!strcmp(module, "xmlerror")) return(test_xmlerror());
53538 if (!strcmp(module, "xmlmodule")) return(test_xmlmodule());
53539 if (!strcmp(module, "xmlreader")) return(test_xmlreader());
53540 if (!strcmp(module, "xmlregexp")) return(test_xmlregexp());
53541 if (!strcmp(module, "xmlsave")) return(test_xmlsave());
53542 if (!strcmp(module, "xmlschemas")) return(test_xmlschemas());
53543 if (!strcmp(module, "xmlschemastypes")) return(test_xmlschemastypes());
53544 if (!strcmp(module, "xmlstring")) return(test_xmlstring());
53545 if (!strcmp(module, "xmlunicode")) return(test_xmlunicode());
53546 if (!strcmp(module, "xmlwriter")) return(test_xmlwriter());
53547 if (!strcmp(module, "xpath")) return(test_xpath());
53548 if (!strcmp(module, "xpathInternals")) return(test_xpathInternals());
53549 if (!strcmp(module, "xpointer")) return(test_xpointer());