testapi.c revision b1b3a3e924d919d20cc25b29ad48fc38dae066ee
1/*
2 * testapi.c: libxml2 API tester program.
3 *
4 * Automatically generated by gentest.py from libxml2-api.xml
5 *
6 * See Copyright for the status of this software.
7 *
8 * daniel@veillard.com
9 */
10
11#include <stdio.h>
12#include <libxml/xmlerror.h>
13
14static int testlibxml2(void);
15
16static int generic_errors = 0;
17static int call_tests = 0;
18
19static xmlChar chartab[1024] = "  chartab\n";
20
21static void
22structured_errors(void *userData ATTRIBUTE_UNUSED,
23                  xmlErrorPtr error ATTRIBUTE_UNUSED) {
24    generic_errors++;
25}
26
27int main(void) {
28    int ret;
29    int blocks, mem;
30
31    xmlInitParser();
32    xmlRelaxNGInitTypes();
33
34    LIBXML_TEST_VERSION
35
36    xmlSetStructuredErrorFunc(NULL, structured_errors);
37
38    ret = testlibxml2();
39
40    xmlCleanupParser();
41    blocks = xmlMemBlocks();
42    mem = xmlMemUsed();
43    if ((blocks != 0) || (mem != 0)) {
44        printf("testapi leaked %d bytes in %d blocks\n", mem, blocks);
45    }
46    xmlMemoryDump();
47
48    return (ret != 0);
49}
50
51#include <libxml/HTMLparser.h>
52#include <libxml/HTMLtree.h>
53#include <libxml/c14n.h>
54#include <libxml/catalog.h>
55#include <libxml/chvalid.h>
56#include <libxml/dict.h>
57#include <libxml/encoding.h>
58#include <libxml/entities.h>
59#include <libxml/hash.h>
60#include <libxml/list.h>
61#include <libxml/nanoftp.h>
62#include <libxml/nanohttp.h>
63#include <libxml/parser.h>
64#include <libxml/pattern.h>
65#include <libxml/relaxng.h>
66#include <libxml/schemasInternals.h>
67#include <libxml/tree.h>
68#include <libxml/uri.h>
69#include <libxml/valid.h>
70#include <libxml/xinclude.h>
71#include <libxml/xmlIO.h>
72#include <libxml/xmlerror.h>
73#include <libxml/xmlreader.h>
74#include <libxml/xmlsave.h>
75#include <libxml/xmlschemas.h>
76#include <libxml/xmlschemastypes.h>
77#include <libxml/xmlstring.h>
78#include <libxml/xmlwriter.h>
79#include <libxml/xpath.h>
80#include <libxml/xpointer.h>
81static int test_HTMLparser(void);
82static int test_HTMLtree(void);
83static int test_c14n(void);
84static int test_catalog(void);
85static int test_chvalid(void);
86static int test_dict(void);
87static int test_encoding(void);
88static int test_entities(void);
89static int test_hash(void);
90static int test_list(void);
91static int test_nanoftp(void);
92static int test_nanohttp(void);
93static int test_parser(void);
94static int test_pattern(void);
95static int test_relaxng(void);
96static int test_schemasInternals(void);
97static int test_tree(void);
98static int test_uri(void);
99static int test_valid(void);
100static int test_xinclude(void);
101static int test_xmlIO(void);
102static int test_xmlerror(void);
103static int test_xmlreader(void);
104static int test_xmlsave(void);
105static int test_xmlschemas(void);
106static int test_xmlschemastypes(void);
107static int test_xmlstring(void);
108static int test_xmlwriter(void);
109static int test_xpath(void);
110static int test_xpointer(void);
111
112#define gen_nb_void_ptr 1
113
114static void *gen_void_ptr(int no) {
115    return(NULL);
116}
117static void des_void_ptr(int no ATTRIBUTE_UNUSED, void *val ATTRIBUTE_UNUSED) {
118}
119
120#define gen_nb_userdata 3
121
122static void *gen_userdata(int no) {
123    if (no == 0) return((void *) &call_tests);
124    if (no == 1) return((void *) -1);
125    return(NULL);
126}
127static void des_userdata(int no ATTRIBUTE_UNUSED, void *val ATTRIBUTE_UNUSED) {
128}
129
130
131#define gen_nb_int 4
132
133static int gen_int(int no) {
134    if (no == 0) return(0);
135    if (no == 1) return(1);
136    if (no == 2) return(122);
137    return(-1);
138}
139
140static void des_int(int no ATTRIBUTE_UNUSED, int val ATTRIBUTE_UNUSED) {
141}
142
143#define gen_nb_const_char_ptr 4
144
145static const char *gen_const_char_ptr(int no) {
146    if (no == 0) return("foo");
147    if (no == 1) return("<foo/>");
148    if (no == 2) return("test/ent2");
149    return(NULL);
150}
151static void des_const_char_ptr(int no ATTRIBUTE_UNUSED, const char *val ATTRIBUTE_UNUSED) {
152}
153
154#define gen_nb_xmlChar_ptr 2
155
156static xmlChar *gen_xmlChar_ptr(int no) {
157    if (no == 0) return(&chartab[0]);
158    return(NULL);
159}
160static void des_xmlChar_ptr(int no ATTRIBUTE_UNUSED, xmlChar *val ATTRIBUTE_UNUSED) {
161}
162
163#define gen_nb_const_xmlChar_ptr 5
164
165static const xmlChar *gen_const_xmlChar_ptr(int no) {
166    if (no == 0) return((const xmlChar *) "foo");
167    if (no == 1) return((const xmlChar *) "<foo/>");
168    if (no == 2) return((const xmlChar *) "n�ne");
169    if (no == 3) return((const xmlChar *) " 2ab ");
170    return(NULL);
171}
172static void des_const_xmlChar_ptr(int no ATTRIBUTE_UNUSED, const xmlChar *val ATTRIBUTE_UNUSED) {
173}
174
175#define gen_nb_filepath 8
176
177static const char *gen_filepath(int no) {
178    if (no == 0) return("missing.xml");
179    if (no == 1) return("<foo/>");
180    if (no == 2) return("test/ent2");
181    if (no == 3) return("test/valid/REC-xml-19980210.xml");
182    if (no == 4) return("test/valid/xhtml1-strict.dtd");
183    if (no == 5) return("http://missing.example.org/");
184    if (no == 6) return("http://missing. example.org/");
185    return(NULL);
186}
187static void des_filepath(int no ATTRIBUTE_UNUSED, const char *val ATTRIBUTE_UNUSED) {
188}
189
190#define gen_nb_fileoutput 6
191
192static const char *gen_fileoutput(int no) {
193    if (no == 0) return("/missing.xml");
194    if (no == 1) return("<foo/>");
195    if (no == 2) return("ftp://missing.example.org/foo");
196    if (no == 3) return("http://missing.example.org/");
197    if (no == 4) return("http://missing. example.org/");
198    return(NULL);
199}
200static void des_fileoutput(int no ATTRIBUTE_UNUSED, const char *val ATTRIBUTE_UNUSED) {
201}
202
203#define gen_nb_xmlParserCtxtPtr 2
204static xmlParserCtxtPtr gen_xmlParserCtxtPtr(int no) {
205    if (no == 0) return(xmlNewParserCtxt());
206    return(NULL);
207}
208static void des_xmlParserCtxtPtr(int no ATTRIBUTE_UNUSED, xmlParserCtxtPtr val) {
209    if (val != NULL)
210        xmlFreeParserCtxt(val);
211}
212
213#define gen_nb_xmlValidCtxtPtr 2
214static xmlValidCtxtPtr gen_xmlValidCtxtPtr(int no) {
215    if (no == 0) return(xmlNewValidCtxt());
216    return(NULL);
217}
218static void des_xmlValidCtxtPtr(int no ATTRIBUTE_UNUSED, xmlValidCtxtPtr val) {
219    if (val != NULL)
220        xmlFreeValidCtxt(val);
221}
222
223#define gen_nb_xmlDocPtr 3
224static xmlDocPtr gen_xmlDocPtr(int no) {
225    if (no == 0) return(xmlNewDoc(BAD_CAST "1.0"));
226    if (no == 1) return(xmlReadMemory("<foo/>", 6, "test", NULL, 0));
227    return(NULL);
228}
229static void des_xmlDocPtr(int no ATTRIBUTE_UNUSED, xmlDocPtr val) {
230    if (val != NULL)
231        xmlFreeDoc(val);
232}
233
234#define gen_nb_xmlNodePtr 2
235static xmlNodePtr gen_xmlNodePtr(int no) {
236    if (no == 0) return(xmlNewPI(BAD_CAST "test", NULL));
237    return(NULL);
238}
239static void des_xmlNodePtr(int no ATTRIBUTE_UNUSED, xmlNodePtr val) {
240    if (val != NULL) {
241        xmlUnlinkNode(val);
242        xmlFreeNode(val);
243    }
244}
245
246#define gen_nb_xmlNodePtr_in 3
247static xmlNodePtr gen_xmlNodePtr_in(int no) {
248    if (no == 0) return(xmlNewPI(BAD_CAST "test", NULL));
249    if (no == 0) return(xmlNewText(BAD_CAST "text"));
250    return(NULL);
251}
252static void des_xmlNodePtr_in(int no ATTRIBUTE_UNUSED, xmlNodePtr val ATTRIBUTE_UNUSED) {
253}
254
255#define gen_nb_xmlTextWriterPtr 2
256static xmlTextWriterPtr gen_xmlTextWriterPtr(int no) {
257    if (no == 0) return(xmlNewTextWriterFilename("test.out", 0));
258    return(NULL);
259}
260static void des_xmlTextWriterPtr(int no ATTRIBUTE_UNUSED, xmlTextWriterPtr val) {
261    if (val != NULL) xmlFreeTextWriter(val);
262}
263
264#define gen_nb_xmlTextReaderPtr 4
265static xmlTextReaderPtr gen_xmlTextReaderPtr(int no) {
266    if (no == 0) return(xmlNewTextReaderFilename("test/ent2"));
267    if (no == 1) return(xmlNewTextReaderFilename("test/valid/REC-xml-19980210.xml"));
268    if (no == 2) return(xmlNewTextReaderFilename("test/valid/dtds/xhtml1-strict.dtd"));
269    return(NULL);
270}
271static void des_xmlTextReaderPtr(int no ATTRIBUTE_UNUSED, xmlTextReaderPtr val) {
272    if (val != NULL) xmlFreeTextReader(val);
273}
274
275#define gen_nb_xmlBufferPtr 2
276static xmlBufferPtr gen_xmlBufferPtr(int no) {
277    if (no == 0) return(xmlBufferCreate());
278    return(NULL);
279}
280static void des_xmlBufferPtr(int no ATTRIBUTE_UNUSED, xmlBufferPtr val) {
281    if (val != NULL) {
282        xmlBufferFree(val);
283    }
284}
285
286#define gen_nb_xmlListPtr 2
287static xmlListPtr gen_xmlListPtr(int no) {
288    if (no == 0) return(xmlListCreate(NULL, NULL));
289    return(NULL);
290}
291static void des_xmlListPtr(int no ATTRIBUTE_UNUSED, xmlListPtr val) {
292    if (val != NULL) {
293        xmlListDelete(val);
294    }
295}
296
297#define gen_nb_xmlHashTablePtr 2
298static xmlHashTablePtr gen_xmlHashTablePtr(int no) {
299    if (no == 0) return(xmlHashCreate(10));
300    return(NULL);
301}
302static void des_xmlHashTablePtr(int no ATTRIBUTE_UNUSED, xmlHashTablePtr val) {
303    if (val != NULL) {
304        xmlHashFree(val, NULL);
305    }
306}
307
308#include <libxml/xpathInternals.h>
309
310#define gen_nb_xmlXPathObjectPtr 5
311static xmlXPathObjectPtr gen_xmlXPathObjectPtr(int no) {
312    if (no == 0) return(xmlXPathNewString(BAD_CAST "string object"));
313    if (no == 1) return(xmlXPathNewFloat(1.1));
314    if (no == 2) return(xmlXPathNewBoolean(1));
315    if (no == 3) return(xmlXPathNewNodeSet(NULL));
316    return(NULL);
317}
318static void des_xmlXPathObjectPtr(int no ATTRIBUTE_UNUSED, xmlXPathObjectPtr val) {
319    if (val != NULL) {
320        xmlXPathFreeObject(val);
321    }
322}
323
324
325static void desret_int(int val ATTRIBUTE_UNUSED) {
326}
327static void desret_void_ptr(void *val ATTRIBUTE_UNUSED) {
328}
329static void desret_const_char_ptr(const char *val ATTRIBUTE_UNUSED) {
330}
331static void desret_const_xmlChar_ptr(const xmlChar *val ATTRIBUTE_UNUSED) {
332}
333static void desret_xmlChar_ptr(xmlChar *val) {
334    if (val != NULL)
335	xmlFree(val);
336}
337static void desret_xmlDocPtr(xmlDocPtr val) {
338    xmlFreeDoc(val);
339}
340static void desret_xmlNodePtr(xmlNodePtr val) {
341    xmlUnlinkNode(val);
342    xmlFreeNode(val);
343}
344
345/**
346 * testlibxml2:
347 *
348 * Main entry point of the tester for the full libxml2 module,
349 * it calls all the tester entry point for each module.
350 *
351 * Returns the number of error found
352 */
353static int
354testlibxml2(void)
355{
356    int ret = 0;
357
358    ret += test_HTMLparser();
359    ret += test_HTMLtree();
360    ret += test_c14n();
361    ret += test_catalog();
362    ret += test_chvalid();
363    ret += test_dict();
364    ret += test_encoding();
365    ret += test_entities();
366    ret += test_hash();
367    ret += test_list();
368    ret += test_nanoftp();
369    ret += test_nanohttp();
370    ret += test_parser();
371    ret += test_pattern();
372    ret += test_relaxng();
373    ret += test_schemasInternals();
374    ret += test_tree();
375    ret += test_uri();
376    ret += test_valid();
377    ret += test_xinclude();
378    ret += test_xmlIO();
379    ret += test_xmlerror();
380    ret += test_xmlreader();
381    ret += test_xmlsave();
382    ret += test_xmlschemas();
383    ret += test_xmlschemastypes();
384    ret += test_xmlstring();
385    ret += test_xmlwriter();
386    ret += test_xpath();
387    ret += test_xpointer();
388
389    printf("Total: %d tests, %d errors\n", call_tests, ret);
390    return(ret);
391}
392
393
394static int
395test_UTF8ToHtml(void) {
396    int ret = 0;
397
398
399    /* missing type support */
400    return(ret);
401}
402
403
404static int
405test_htmlAttrAllowed(void) {
406    int ret = 0;
407
408
409    /* missing type support */
410    return(ret);
411}
412
413
414static int
415test_htmlAutoCloseTag(void) {
416    int ret = 0;
417
418#ifdef LIBXML_HTML_ENABLED
419    int mem_base;
420    int ret_val;
421    htmlDocPtr doc; /* the HTML document */
422    int n_doc;
423    const xmlChar * name; /* The tag name */
424    int n_name;
425    htmlNodePtr elem; /* the HTML element */
426    int n_elem;
427
428    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
429    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
430    for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
431        mem_base = xmlMemBlocks();
432        doc = gen_xmlDocPtr(n_doc);
433        name = gen_const_xmlChar_ptr(n_name);
434        elem = gen_xmlNodePtr(n_elem);
435
436        ret_val = htmlAutoCloseTag(doc, name, elem);
437        desret_int(ret_val);
438        call_tests++;
439        des_xmlDocPtr(n_doc, doc);
440        des_const_xmlChar_ptr(n_name, name);
441        des_xmlNodePtr(n_elem, elem);
442        xmlResetLastError();
443        if (mem_base != xmlMemBlocks()) {
444            printf("Leak of %d blocks found in htmlAutoCloseTag",
445	           xmlMemBlocks() - mem_base);
446	    ret++;
447            printf(" %d", n_doc);
448            printf(" %d", n_name);
449            printf(" %d", n_elem);
450            printf("\n");
451        }
452    }
453    }
454    }
455#endif
456
457    return(ret);
458}
459
460
461static int
462test_htmlCreateMemoryParserCtxt(void) {
463    int ret = 0;
464
465
466    /* missing type support */
467    return(ret);
468}
469
470
471static int
472test_htmlCreatePushParserCtxt(void) {
473    int ret = 0;
474
475
476    /* missing type support */
477    return(ret);
478}
479
480
481static int
482test_htmlCtxtReadDoc(void) {
483    int ret = 0;
484
485#ifdef LIBXML_HTML_ENABLED
486    int mem_base;
487    htmlDocPtr ret_val;
488    htmlParserCtxtPtr ctxt; /* an HTML parser context */
489    int n_ctxt;
490    const xmlChar * cur; /* a pointer to a zero terminated string */
491    int n_cur;
492    const char * URL; /* the base URL to use for the document */
493    int n_URL;
494    const char * encoding; /* the document encoding, or NULL */
495    int n_encoding;
496    int options; /* a combination of htmlParserOption(s) */
497    int n_options;
498
499    for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
500    for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
501    for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
502    for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
503    for (n_options = 0;n_options < gen_nb_int;n_options++) {
504        mem_base = xmlMemBlocks();
505        ctxt = gen_xmlParserCtxtPtr(n_ctxt);
506        cur = gen_const_xmlChar_ptr(n_cur);
507        URL = gen_filepath(n_URL);
508        encoding = gen_const_char_ptr(n_encoding);
509        options = gen_int(n_options);
510
511        ret_val = htmlCtxtReadDoc(ctxt, cur, URL, encoding, options);
512        desret_xmlDocPtr(ret_val);
513        call_tests++;
514        des_xmlParserCtxtPtr(n_ctxt, ctxt);
515        des_const_xmlChar_ptr(n_cur, cur);
516        des_filepath(n_URL, URL);
517        des_const_char_ptr(n_encoding, encoding);
518        des_int(n_options, options);
519        xmlResetLastError();
520        if (mem_base != xmlMemBlocks()) {
521            printf("Leak of %d blocks found in htmlCtxtReadDoc",
522	           xmlMemBlocks() - mem_base);
523	    ret++;
524            printf(" %d", n_ctxt);
525            printf(" %d", n_cur);
526            printf(" %d", n_URL);
527            printf(" %d", n_encoding);
528            printf(" %d", n_options);
529            printf("\n");
530        }
531    }
532    }
533    }
534    }
535    }
536#endif
537
538    return(ret);
539}
540
541
542static int
543test_htmlCtxtReadFile(void) {
544    int ret = 0;
545
546#ifdef LIBXML_HTML_ENABLED
547    int mem_base;
548    htmlDocPtr ret_val;
549    htmlParserCtxtPtr ctxt; /* an HTML parser context */
550    int n_ctxt;
551    const char * filename; /* a file or URL */
552    int n_filename;
553    const char * encoding; /* the document encoding, or NULL */
554    int n_encoding;
555    int options; /* a combination of htmlParserOption(s) */
556    int n_options;
557
558    for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
559    for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
560    for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
561    for (n_options = 0;n_options < gen_nb_int;n_options++) {
562        mem_base = xmlMemBlocks();
563        ctxt = gen_xmlParserCtxtPtr(n_ctxt);
564        filename = gen_filepath(n_filename);
565        encoding = gen_const_char_ptr(n_encoding);
566        options = gen_int(n_options);
567
568        ret_val = htmlCtxtReadFile(ctxt, filename, encoding, options);
569        desret_xmlDocPtr(ret_val);
570        call_tests++;
571        des_xmlParserCtxtPtr(n_ctxt, ctxt);
572        des_filepath(n_filename, filename);
573        des_const_char_ptr(n_encoding, encoding);
574        des_int(n_options, options);
575        xmlResetLastError();
576        if (mem_base != xmlMemBlocks()) {
577            printf("Leak of %d blocks found in htmlCtxtReadFile",
578	           xmlMemBlocks() - mem_base);
579	    ret++;
580            printf(" %d", n_ctxt);
581            printf(" %d", n_filename);
582            printf(" %d", n_encoding);
583            printf(" %d", n_options);
584            printf("\n");
585        }
586    }
587    }
588    }
589    }
590#endif
591
592    return(ret);
593}
594
595
596static int
597test_htmlCtxtReadMemory(void) {
598    int ret = 0;
599
600#ifdef LIBXML_HTML_ENABLED
601    int mem_base;
602    htmlDocPtr ret_val;
603    htmlParserCtxtPtr ctxt; /* an HTML parser context */
604    int n_ctxt;
605    const char * buffer; /* a pointer to a char array */
606    int n_buffer;
607    int size; /* the size of the array */
608    int n_size;
609    const char * URL; /* the base URL to use for the document */
610    int n_URL;
611    const char * encoding; /* the document encoding, or NULL */
612    int n_encoding;
613    int options; /* a combination of htmlParserOption(s) */
614    int n_options;
615
616    for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
617    for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
618    for (n_size = 0;n_size < gen_nb_int;n_size++) {
619    for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
620    for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
621    for (n_options = 0;n_options < gen_nb_int;n_options++) {
622        mem_base = xmlMemBlocks();
623        ctxt = gen_xmlParserCtxtPtr(n_ctxt);
624        buffer = gen_const_char_ptr(n_buffer);
625        size = gen_int(n_size);
626        URL = gen_filepath(n_URL);
627        encoding = gen_const_char_ptr(n_encoding);
628        options = gen_int(n_options);
629
630        ret_val = htmlCtxtReadMemory(ctxt, buffer, size, URL, encoding, options);
631        desret_xmlDocPtr(ret_val);
632        call_tests++;
633        des_xmlParserCtxtPtr(n_ctxt, ctxt);
634        des_const_char_ptr(n_buffer, buffer);
635        des_int(n_size, size);
636        des_filepath(n_URL, URL);
637        des_const_char_ptr(n_encoding, encoding);
638        des_int(n_options, options);
639        xmlResetLastError();
640        if (mem_base != xmlMemBlocks()) {
641            printf("Leak of %d blocks found in htmlCtxtReadMemory",
642	           xmlMemBlocks() - mem_base);
643	    ret++;
644            printf(" %d", n_ctxt);
645            printf(" %d", n_buffer);
646            printf(" %d", n_size);
647            printf(" %d", n_URL);
648            printf(" %d", n_encoding);
649            printf(" %d", n_options);
650            printf("\n");
651        }
652    }
653    }
654    }
655    }
656    }
657    }
658#endif
659
660    return(ret);
661}
662
663
664static int
665test_htmlCtxtReset(void) {
666    int ret = 0;
667
668#ifdef LIBXML_HTML_ENABLED
669    int mem_base;
670    htmlParserCtxtPtr ctxt; /* an HTML parser context */
671    int n_ctxt;
672
673    for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
674        mem_base = xmlMemBlocks();
675        ctxt = gen_xmlParserCtxtPtr(n_ctxt);
676
677        htmlCtxtReset(ctxt);
678        call_tests++;
679        des_xmlParserCtxtPtr(n_ctxt, ctxt);
680        xmlResetLastError();
681        if (mem_base != xmlMemBlocks()) {
682            printf("Leak of %d blocks found in htmlCtxtReset",
683	           xmlMemBlocks() - mem_base);
684	    ret++;
685            printf(" %d", n_ctxt);
686            printf("\n");
687        }
688    }
689#endif
690
691    return(ret);
692}
693
694
695static int
696test_htmlCtxtUseOptions(void) {
697    int ret = 0;
698
699#ifdef LIBXML_HTML_ENABLED
700    int mem_base;
701    int ret_val;
702    htmlParserCtxtPtr ctxt; /* an HTML parser context */
703    int n_ctxt;
704    int options; /* a combination of htmlParserOption(s) */
705    int n_options;
706
707    for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
708    for (n_options = 0;n_options < gen_nb_int;n_options++) {
709        mem_base = xmlMemBlocks();
710        ctxt = gen_xmlParserCtxtPtr(n_ctxt);
711        options = gen_int(n_options);
712
713        ret_val = htmlCtxtUseOptions(ctxt, options);
714        desret_int(ret_val);
715        call_tests++;
716        des_xmlParserCtxtPtr(n_ctxt, ctxt);
717        des_int(n_options, options);
718        xmlResetLastError();
719        if (mem_base != xmlMemBlocks()) {
720            printf("Leak of %d blocks found in htmlCtxtUseOptions",
721	           xmlMemBlocks() - mem_base);
722	    ret++;
723            printf(" %d", n_ctxt);
724            printf(" %d", n_options);
725            printf("\n");
726        }
727    }
728    }
729#endif
730
731    return(ret);
732}
733
734
735static int
736test_htmlElementAllowedHere(void) {
737    int ret = 0;
738
739
740    /* missing type support */
741    return(ret);
742}
743
744
745static int
746test_htmlElementStatusHere(void) {
747    int ret = 0;
748
749
750    /* missing type support */
751    return(ret);
752}
753
754
755static int
756test_htmlEncodeEntities(void) {
757    int ret = 0;
758
759
760    /* missing type support */
761    return(ret);
762}
763
764
765static int
766test_htmlEntityLookup(void) {
767    int ret = 0;
768
769
770    /* missing type support */
771    return(ret);
772}
773
774
775static int
776test_htmlEntityValueLookup(void) {
777    int ret = 0;
778
779
780    /* missing type support */
781    return(ret);
782}
783
784
785static int
786test_htmlHandleOmittedElem(void) {
787    int ret = 0;
788
789#ifdef LIBXML_HTML_ENABLED
790    int mem_base;
791    int ret_val;
792    int val; /* int 0 or 1 */
793    int n_val;
794
795    for (n_val = 0;n_val < gen_nb_int;n_val++) {
796        mem_base = xmlMemBlocks();
797        val = gen_int(n_val);
798
799        ret_val = htmlHandleOmittedElem(val);
800        desret_int(ret_val);
801        call_tests++;
802        des_int(n_val, val);
803        xmlResetLastError();
804        if (mem_base != xmlMemBlocks()) {
805            printf("Leak of %d blocks found in htmlHandleOmittedElem",
806	           xmlMemBlocks() - mem_base);
807	    ret++;
808            printf(" %d", n_val);
809            printf("\n");
810        }
811    }
812#endif
813
814    return(ret);
815}
816
817
818static int
819test_htmlIsAutoClosed(void) {
820    int ret = 0;
821
822#ifdef LIBXML_HTML_ENABLED
823    int mem_base;
824    int ret_val;
825    htmlDocPtr doc; /* the HTML document */
826    int n_doc;
827    htmlNodePtr elem; /* the HTML element */
828    int n_elem;
829
830    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
831    for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
832        mem_base = xmlMemBlocks();
833        doc = gen_xmlDocPtr(n_doc);
834        elem = gen_xmlNodePtr(n_elem);
835
836        ret_val = htmlIsAutoClosed(doc, elem);
837        desret_int(ret_val);
838        call_tests++;
839        des_xmlDocPtr(n_doc, doc);
840        des_xmlNodePtr(n_elem, elem);
841        xmlResetLastError();
842        if (mem_base != xmlMemBlocks()) {
843            printf("Leak of %d blocks found in htmlIsAutoClosed",
844	           xmlMemBlocks() - mem_base);
845	    ret++;
846            printf(" %d", n_doc);
847            printf(" %d", n_elem);
848            printf("\n");
849        }
850    }
851    }
852#endif
853
854    return(ret);
855}
856
857
858static int
859test_htmlIsScriptAttribute(void) {
860    int ret = 0;
861
862#ifdef LIBXML_HTML_ENABLED
863    int mem_base;
864    int ret_val;
865    const xmlChar * name; /* an attribute name */
866    int n_name;
867
868    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
869        mem_base = xmlMemBlocks();
870        name = gen_const_xmlChar_ptr(n_name);
871
872        ret_val = htmlIsScriptAttribute(name);
873        desret_int(ret_val);
874        call_tests++;
875        des_const_xmlChar_ptr(n_name, name);
876        xmlResetLastError();
877        if (mem_base != xmlMemBlocks()) {
878            printf("Leak of %d blocks found in htmlIsScriptAttribute",
879	           xmlMemBlocks() - mem_base);
880	    ret++;
881            printf(" %d", n_name);
882            printf("\n");
883        }
884    }
885#endif
886
887    return(ret);
888}
889
890
891static int
892test_htmlNodeStatus(void) {
893    int ret = 0;
894
895
896    /* missing type support */
897    return(ret);
898}
899
900
901static int
902test_htmlParseCharRef(void) {
903    int ret = 0;
904
905#ifdef LIBXML_HTML_ENABLED
906    int mem_base;
907    int ret_val;
908    htmlParserCtxtPtr ctxt; /* an HTML parser context */
909    int n_ctxt;
910
911    for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
912        mem_base = xmlMemBlocks();
913        ctxt = gen_xmlParserCtxtPtr(n_ctxt);
914
915        ret_val = htmlParseCharRef(ctxt);
916        desret_int(ret_val);
917        call_tests++;
918        des_xmlParserCtxtPtr(n_ctxt, ctxt);
919        xmlResetLastError();
920        if (mem_base != xmlMemBlocks()) {
921            printf("Leak of %d blocks found in htmlParseCharRef",
922	           xmlMemBlocks() - mem_base);
923	    ret++;
924            printf(" %d", n_ctxt);
925            printf("\n");
926        }
927    }
928#endif
929
930    return(ret);
931}
932
933
934static int
935test_htmlParseChunk(void) {
936    int ret = 0;
937
938#ifdef LIBXML_HTML_ENABLED
939#ifdef LIBXML_PUSH_ENABLED
940    int mem_base;
941    int ret_val;
942    htmlParserCtxtPtr ctxt; /* an HTML parser context */
943    int n_ctxt;
944    const char * chunk; /* an char array */
945    int n_chunk;
946    int size; /* the size in byte of the chunk */
947    int n_size;
948    int terminate; /* last chunk indicator */
949    int n_terminate;
950
951    for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
952    for (n_chunk = 0;n_chunk < gen_nb_const_char_ptr;n_chunk++) {
953    for (n_size = 0;n_size < gen_nb_int;n_size++) {
954    for (n_terminate = 0;n_terminate < gen_nb_int;n_terminate++) {
955        mem_base = xmlMemBlocks();
956        ctxt = gen_xmlParserCtxtPtr(n_ctxt);
957        chunk = gen_const_char_ptr(n_chunk);
958        size = gen_int(n_size);
959        terminate = gen_int(n_terminate);
960
961        ret_val = htmlParseChunk(ctxt, chunk, size, terminate);
962        desret_int(ret_val);
963        call_tests++;
964        des_xmlParserCtxtPtr(n_ctxt, ctxt);
965        des_const_char_ptr(n_chunk, chunk);
966        des_int(n_size, size);
967        des_int(n_terminate, terminate);
968        xmlResetLastError();
969        if (mem_base != xmlMemBlocks()) {
970            printf("Leak of %d blocks found in htmlParseChunk",
971	           xmlMemBlocks() - mem_base);
972	    ret++;
973            printf(" %d", n_ctxt);
974            printf(" %d", n_chunk);
975            printf(" %d", n_size);
976            printf(" %d", n_terminate);
977            printf("\n");
978        }
979    }
980    }
981    }
982    }
983#endif
984#endif
985
986    return(ret);
987}
988
989
990static int
991test_htmlParseDoc(void) {
992    int ret = 0;
993
994#ifdef LIBXML_HTML_ENABLED
995    int mem_base;
996    htmlDocPtr ret_val;
997    xmlChar * cur; /* a pointer to an array of xmlChar */
998    int n_cur;
999    const char * encoding; /* a free form C string describing the HTML document encoding, or NULL */
1000    int n_encoding;
1001
1002    for (n_cur = 0;n_cur < gen_nb_xmlChar_ptr;n_cur++) {
1003    for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
1004        mem_base = xmlMemBlocks();
1005        cur = gen_xmlChar_ptr(n_cur);
1006        encoding = gen_const_char_ptr(n_encoding);
1007
1008        ret_val = htmlParseDoc(cur, encoding);
1009        desret_xmlDocPtr(ret_val);
1010        call_tests++;
1011        des_xmlChar_ptr(n_cur, cur);
1012        des_const_char_ptr(n_encoding, encoding);
1013        xmlResetLastError();
1014        if (mem_base != xmlMemBlocks()) {
1015            printf("Leak of %d blocks found in htmlParseDoc",
1016	           xmlMemBlocks() - mem_base);
1017	    ret++;
1018            printf(" %d", n_cur);
1019            printf(" %d", n_encoding);
1020            printf("\n");
1021        }
1022    }
1023    }
1024#endif
1025
1026    return(ret);
1027}
1028
1029
1030static int
1031test_htmlParseDocument(void) {
1032    int ret = 0;
1033
1034#ifdef LIBXML_HTML_ENABLED
1035    int mem_base;
1036    int ret_val;
1037    htmlParserCtxtPtr ctxt; /* an HTML parser context */
1038    int n_ctxt;
1039
1040    for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
1041        mem_base = xmlMemBlocks();
1042        ctxt = gen_xmlParserCtxtPtr(n_ctxt);
1043
1044        ret_val = htmlParseDocument(ctxt);
1045        desret_int(ret_val);
1046        call_tests++;
1047        des_xmlParserCtxtPtr(n_ctxt, ctxt);
1048        xmlResetLastError();
1049        if (mem_base != xmlMemBlocks()) {
1050            printf("Leak of %d blocks found in htmlParseDocument",
1051	           xmlMemBlocks() - mem_base);
1052	    ret++;
1053            printf(" %d", n_ctxt);
1054            printf("\n");
1055        }
1056    }
1057#endif
1058
1059    return(ret);
1060}
1061
1062
1063static int
1064test_htmlParseElement(void) {
1065    int ret = 0;
1066
1067#ifdef LIBXML_HTML_ENABLED
1068    int mem_base;
1069    htmlParserCtxtPtr ctxt; /* an HTML parser context */
1070    int n_ctxt;
1071
1072    for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
1073        mem_base = xmlMemBlocks();
1074        ctxt = gen_xmlParserCtxtPtr(n_ctxt);
1075
1076        htmlParseElement(ctxt);
1077        call_tests++;
1078        des_xmlParserCtxtPtr(n_ctxt, ctxt);
1079        xmlResetLastError();
1080        if (mem_base != xmlMemBlocks()) {
1081            printf("Leak of %d blocks found in htmlParseElement",
1082	           xmlMemBlocks() - mem_base);
1083	    ret++;
1084            printf(" %d", n_ctxt);
1085            printf("\n");
1086        }
1087    }
1088#endif
1089
1090    return(ret);
1091}
1092
1093
1094static int
1095test_htmlParseEntityRef(void) {
1096    int ret = 0;
1097
1098
1099    /* missing type support */
1100    return(ret);
1101}
1102
1103
1104static int
1105test_htmlParseFile(void) {
1106    int ret = 0;
1107
1108#ifdef LIBXML_HTML_ENABLED
1109    htmlDocPtr ret_val;
1110    const char * filename; /* the filename */
1111    int n_filename;
1112    const char * encoding; /* a free form C string describing the HTML document encoding, or NULL */
1113    int n_encoding;
1114
1115    for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
1116    for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
1117        filename = gen_filepath(n_filename);
1118        encoding = gen_const_char_ptr(n_encoding);
1119
1120        ret_val = htmlParseFile(filename, encoding);
1121        desret_xmlDocPtr(ret_val);
1122        call_tests++;
1123        des_filepath(n_filename, filename);
1124        des_const_char_ptr(n_encoding, encoding);
1125        xmlResetLastError();
1126    }
1127    }
1128#endif
1129
1130    return(ret);
1131}
1132
1133
1134static int
1135test_htmlReadDoc(void) {
1136    int ret = 0;
1137
1138#ifdef LIBXML_HTML_ENABLED
1139    int mem_base;
1140    htmlDocPtr ret_val;
1141    const xmlChar * cur; /* a pointer to a zero terminated string */
1142    int n_cur;
1143    const char * URL; /* the base URL to use for the document */
1144    int n_URL;
1145    const char * encoding; /* the document encoding, or NULL */
1146    int n_encoding;
1147    int options; /* a combination of htmlParserOption(s) */
1148    int n_options;
1149
1150    for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
1151    for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
1152    for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
1153    for (n_options = 0;n_options < gen_nb_int;n_options++) {
1154        mem_base = xmlMemBlocks();
1155        cur = gen_const_xmlChar_ptr(n_cur);
1156        URL = gen_filepath(n_URL);
1157        encoding = gen_const_char_ptr(n_encoding);
1158        options = gen_int(n_options);
1159
1160        ret_val = htmlReadDoc(cur, URL, encoding, options);
1161        desret_xmlDocPtr(ret_val);
1162        call_tests++;
1163        des_const_xmlChar_ptr(n_cur, cur);
1164        des_filepath(n_URL, URL);
1165        des_const_char_ptr(n_encoding, encoding);
1166        des_int(n_options, options);
1167        xmlResetLastError();
1168        if (mem_base != xmlMemBlocks()) {
1169            printf("Leak of %d blocks found in htmlReadDoc",
1170	           xmlMemBlocks() - mem_base);
1171	    ret++;
1172            printf(" %d", n_cur);
1173            printf(" %d", n_URL);
1174            printf(" %d", n_encoding);
1175            printf(" %d", n_options);
1176            printf("\n");
1177        }
1178    }
1179    }
1180    }
1181    }
1182#endif
1183
1184    return(ret);
1185}
1186
1187
1188static int
1189test_htmlReadFile(void) {
1190    int ret = 0;
1191
1192#ifdef LIBXML_HTML_ENABLED
1193    int mem_base;
1194    htmlDocPtr ret_val;
1195    const char * filename; /* a file or URL */
1196    int n_filename;
1197    const char * encoding; /* the document encoding, or NULL */
1198    int n_encoding;
1199    int options; /* a combination of htmlParserOption(s) */
1200    int n_options;
1201
1202    for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
1203    for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
1204    for (n_options = 0;n_options < gen_nb_int;n_options++) {
1205        mem_base = xmlMemBlocks();
1206        filename = gen_filepath(n_filename);
1207        encoding = gen_const_char_ptr(n_encoding);
1208        options = gen_int(n_options);
1209
1210        ret_val = htmlReadFile(filename, encoding, options);
1211        desret_xmlDocPtr(ret_val);
1212        call_tests++;
1213        des_filepath(n_filename, filename);
1214        des_const_char_ptr(n_encoding, encoding);
1215        des_int(n_options, options);
1216        xmlResetLastError();
1217        if (mem_base != xmlMemBlocks()) {
1218            printf("Leak of %d blocks found in htmlReadFile",
1219	           xmlMemBlocks() - mem_base);
1220	    ret++;
1221            printf(" %d", n_filename);
1222            printf(" %d", n_encoding);
1223            printf(" %d", n_options);
1224            printf("\n");
1225        }
1226    }
1227    }
1228    }
1229#endif
1230
1231    return(ret);
1232}
1233
1234
1235static int
1236test_htmlReadMemory(void) {
1237    int ret = 0;
1238
1239#ifdef LIBXML_HTML_ENABLED
1240    int mem_base;
1241    htmlDocPtr ret_val;
1242    const char * buffer; /* a pointer to a char array */
1243    int n_buffer;
1244    int size; /* the size of the array */
1245    int n_size;
1246    const char * URL; /* the base URL to use for the document */
1247    int n_URL;
1248    const char * encoding; /* the document encoding, or NULL */
1249    int n_encoding;
1250    int options; /* a combination of htmlParserOption(s) */
1251    int n_options;
1252
1253    for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
1254    for (n_size = 0;n_size < gen_nb_int;n_size++) {
1255    for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
1256    for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
1257    for (n_options = 0;n_options < gen_nb_int;n_options++) {
1258        mem_base = xmlMemBlocks();
1259        buffer = gen_const_char_ptr(n_buffer);
1260        size = gen_int(n_size);
1261        URL = gen_filepath(n_URL);
1262        encoding = gen_const_char_ptr(n_encoding);
1263        options = gen_int(n_options);
1264
1265        ret_val = htmlReadMemory(buffer, size, URL, encoding, options);
1266        desret_xmlDocPtr(ret_val);
1267        call_tests++;
1268        des_const_char_ptr(n_buffer, buffer);
1269        des_int(n_size, size);
1270        des_filepath(n_URL, URL);
1271        des_const_char_ptr(n_encoding, encoding);
1272        des_int(n_options, options);
1273        xmlResetLastError();
1274        if (mem_base != xmlMemBlocks()) {
1275            printf("Leak of %d blocks found in htmlReadMemory",
1276	           xmlMemBlocks() - mem_base);
1277	    ret++;
1278            printf(" %d", n_buffer);
1279            printf(" %d", n_size);
1280            printf(" %d", n_URL);
1281            printf(" %d", n_encoding);
1282            printf(" %d", n_options);
1283            printf("\n");
1284        }
1285    }
1286    }
1287    }
1288    }
1289    }
1290#endif
1291
1292    return(ret);
1293}
1294
1295
1296static int
1297test_htmlSAXParseDoc(void) {
1298    int ret = 0;
1299
1300
1301    /* missing type support */
1302    return(ret);
1303}
1304
1305
1306static int
1307test_htmlSAXParseFile(void) {
1308    int ret = 0;
1309
1310
1311    /* missing type support */
1312    return(ret);
1313}
1314
1315
1316static int
1317test_htmlTagLookup(void) {
1318    int ret = 0;
1319
1320
1321    /* missing type support */
1322    return(ret);
1323}
1324
1325static int
1326test_HTMLparser(void) {
1327    int ret = 0;
1328
1329    printf("Testing HTMLparser ...\n");
1330    ret += test_UTF8ToHtml();
1331    ret += test_htmlAttrAllowed();
1332    ret += test_htmlAutoCloseTag();
1333    ret += test_htmlCreateMemoryParserCtxt();
1334    ret += test_htmlCreatePushParserCtxt();
1335    ret += test_htmlCtxtReadDoc();
1336    ret += test_htmlCtxtReadFile();
1337    ret += test_htmlCtxtReadMemory();
1338    ret += test_htmlCtxtReset();
1339    ret += test_htmlCtxtUseOptions();
1340    ret += test_htmlElementAllowedHere();
1341    ret += test_htmlElementStatusHere();
1342    ret += test_htmlEncodeEntities();
1343    ret += test_htmlEntityLookup();
1344    ret += test_htmlEntityValueLookup();
1345    ret += test_htmlHandleOmittedElem();
1346    ret += test_htmlIsAutoClosed();
1347    ret += test_htmlIsScriptAttribute();
1348    ret += test_htmlNodeStatus();
1349    ret += test_htmlParseCharRef();
1350    ret += test_htmlParseChunk();
1351    ret += test_htmlParseDoc();
1352    ret += test_htmlParseDocument();
1353    ret += test_htmlParseElement();
1354    ret += test_htmlParseEntityRef();
1355    ret += test_htmlParseFile();
1356    ret += test_htmlReadDoc();
1357    ret += test_htmlReadFile();
1358    ret += test_htmlReadMemory();
1359    ret += test_htmlSAXParseDoc();
1360    ret += test_htmlSAXParseFile();
1361    ret += test_htmlTagLookup();
1362
1363    if (ret != 0)
1364	printf("Module HTMLparser: %d errors\n", ret);
1365    return(ret);
1366}
1367
1368static int
1369test_htmlDocContentDumpFormatOutput(void) {
1370    int ret = 0;
1371
1372
1373    /* missing type support */
1374    return(ret);
1375}
1376
1377
1378static int
1379test_htmlDocContentDumpOutput(void) {
1380    int ret = 0;
1381
1382
1383    /* missing type support */
1384    return(ret);
1385}
1386
1387
1388static int
1389test_htmlDocDump(void) {
1390    int ret = 0;
1391
1392
1393    /* missing type support */
1394    return(ret);
1395}
1396
1397
1398static int
1399test_htmlDocDumpMemory(void) {
1400    int ret = 0;
1401
1402
1403    /* missing type support */
1404    return(ret);
1405}
1406
1407
1408static int
1409test_htmlGetMetaEncoding(void) {
1410    int ret = 0;
1411
1412#ifdef LIBXML_HTML_ENABLED
1413    int mem_base;
1414    const xmlChar * ret_val;
1415    htmlDocPtr doc; /* the document */
1416    int n_doc;
1417
1418    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
1419        mem_base = xmlMemBlocks();
1420        doc = gen_xmlDocPtr(n_doc);
1421
1422        ret_val = htmlGetMetaEncoding(doc);
1423        desret_const_xmlChar_ptr(ret_val);
1424        call_tests++;
1425        des_xmlDocPtr(n_doc, doc);
1426        xmlResetLastError();
1427        if (mem_base != xmlMemBlocks()) {
1428            printf("Leak of %d blocks found in htmlGetMetaEncoding",
1429	           xmlMemBlocks() - mem_base);
1430	    ret++;
1431            printf(" %d", n_doc);
1432            printf("\n");
1433        }
1434    }
1435#endif
1436
1437    return(ret);
1438}
1439
1440
1441static int
1442test_htmlIsBooleanAttr(void) {
1443    int ret = 0;
1444
1445#ifdef LIBXML_HTML_ENABLED
1446    int mem_base;
1447    int ret_val;
1448    const xmlChar * name; /* the name of the attribute to check */
1449    int n_name;
1450
1451    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
1452        mem_base = xmlMemBlocks();
1453        name = gen_const_xmlChar_ptr(n_name);
1454
1455        ret_val = htmlIsBooleanAttr(name);
1456        desret_int(ret_val);
1457        call_tests++;
1458        des_const_xmlChar_ptr(n_name, name);
1459        xmlResetLastError();
1460        if (mem_base != xmlMemBlocks()) {
1461            printf("Leak of %d blocks found in htmlIsBooleanAttr",
1462	           xmlMemBlocks() - mem_base);
1463	    ret++;
1464            printf(" %d", n_name);
1465            printf("\n");
1466        }
1467    }
1468#endif
1469
1470    return(ret);
1471}
1472
1473
1474static int
1475test_htmlNewDoc(void) {
1476    int ret = 0;
1477
1478#ifdef LIBXML_HTML_ENABLED
1479    int mem_base;
1480    htmlDocPtr ret_val;
1481    const xmlChar * URI; /* URI for the dtd, or NULL */
1482    int n_URI;
1483    const xmlChar * ExternalID; /* the external ID of the DTD, or NULL */
1484    int n_ExternalID;
1485
1486    for (n_URI = 0;n_URI < gen_nb_const_xmlChar_ptr;n_URI++) {
1487    for (n_ExternalID = 0;n_ExternalID < gen_nb_const_xmlChar_ptr;n_ExternalID++) {
1488        mem_base = xmlMemBlocks();
1489        URI = gen_const_xmlChar_ptr(n_URI);
1490        ExternalID = gen_const_xmlChar_ptr(n_ExternalID);
1491
1492        ret_val = htmlNewDoc(URI, ExternalID);
1493        desret_xmlDocPtr(ret_val);
1494        call_tests++;
1495        des_const_xmlChar_ptr(n_URI, URI);
1496        des_const_xmlChar_ptr(n_ExternalID, ExternalID);
1497        xmlResetLastError();
1498        if (mem_base != xmlMemBlocks()) {
1499            printf("Leak of %d blocks found in htmlNewDoc",
1500	           xmlMemBlocks() - mem_base);
1501	    ret++;
1502            printf(" %d", n_URI);
1503            printf(" %d", n_ExternalID);
1504            printf("\n");
1505        }
1506    }
1507    }
1508#endif
1509
1510    return(ret);
1511}
1512
1513
1514static int
1515test_htmlNewDocNoDtD(void) {
1516    int ret = 0;
1517
1518#ifdef LIBXML_HTML_ENABLED
1519    int mem_base;
1520    htmlDocPtr ret_val;
1521    const xmlChar * URI; /* URI for the dtd, or NULL */
1522    int n_URI;
1523    const xmlChar * ExternalID; /* the external ID of the DTD, or NULL */
1524    int n_ExternalID;
1525
1526    for (n_URI = 0;n_URI < gen_nb_const_xmlChar_ptr;n_URI++) {
1527    for (n_ExternalID = 0;n_ExternalID < gen_nb_const_xmlChar_ptr;n_ExternalID++) {
1528        mem_base = xmlMemBlocks();
1529        URI = gen_const_xmlChar_ptr(n_URI);
1530        ExternalID = gen_const_xmlChar_ptr(n_ExternalID);
1531
1532        ret_val = htmlNewDocNoDtD(URI, ExternalID);
1533        desret_xmlDocPtr(ret_val);
1534        call_tests++;
1535        des_const_xmlChar_ptr(n_URI, URI);
1536        des_const_xmlChar_ptr(n_ExternalID, ExternalID);
1537        xmlResetLastError();
1538        if (mem_base != xmlMemBlocks()) {
1539            printf("Leak of %d blocks found in htmlNewDocNoDtD",
1540	           xmlMemBlocks() - mem_base);
1541	    ret++;
1542            printf(" %d", n_URI);
1543            printf(" %d", n_ExternalID);
1544            printf("\n");
1545        }
1546    }
1547    }
1548#endif
1549
1550    return(ret);
1551}
1552
1553
1554static int
1555test_htmlNodeDump(void) {
1556    int ret = 0;
1557
1558#ifdef LIBXML_HTML_ENABLED
1559#ifdef LIBXML_OUTPUT_ENABLED
1560    int mem_base;
1561    int ret_val;
1562    xmlBufferPtr buf; /* the HTML buffer output */
1563    int n_buf;
1564    xmlDocPtr doc; /* the document */
1565    int n_doc;
1566    xmlNodePtr cur; /* the current node */
1567    int n_cur;
1568
1569    for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
1570    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
1571    for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
1572        mem_base = xmlMemBlocks();
1573        buf = gen_xmlBufferPtr(n_buf);
1574        doc = gen_xmlDocPtr(n_doc);
1575        cur = gen_xmlNodePtr(n_cur);
1576
1577        ret_val = htmlNodeDump(buf, doc, cur);
1578        desret_int(ret_val);
1579        call_tests++;
1580        des_xmlBufferPtr(n_buf, buf);
1581        des_xmlDocPtr(n_doc, doc);
1582        des_xmlNodePtr(n_cur, cur);
1583        xmlResetLastError();
1584        if (mem_base != xmlMemBlocks()) {
1585            printf("Leak of %d blocks found in htmlNodeDump",
1586	           xmlMemBlocks() - mem_base);
1587	    ret++;
1588            printf(" %d", n_buf);
1589            printf(" %d", n_doc);
1590            printf(" %d", n_cur);
1591            printf("\n");
1592        }
1593    }
1594    }
1595    }
1596#endif
1597#endif
1598
1599    return(ret);
1600}
1601
1602
1603static int
1604test_htmlNodeDumpFile(void) {
1605    int ret = 0;
1606
1607
1608    /* missing type support */
1609    return(ret);
1610}
1611
1612
1613static int
1614test_htmlNodeDumpFileFormat(void) {
1615    int ret = 0;
1616
1617
1618    /* missing type support */
1619    return(ret);
1620}
1621
1622
1623static int
1624test_htmlNodeDumpFormatOutput(void) {
1625    int ret = 0;
1626
1627
1628    /* missing type support */
1629    return(ret);
1630}
1631
1632
1633static int
1634test_htmlNodeDumpOutput(void) {
1635    int ret = 0;
1636
1637
1638    /* missing type support */
1639    return(ret);
1640}
1641
1642
1643static int
1644test_htmlSaveFile(void) {
1645    int ret = 0;
1646
1647#ifdef LIBXML_HTML_ENABLED
1648#ifdef LIBXML_OUTPUT_ENABLED
1649    int mem_base;
1650    int ret_val;
1651    const char * filename; /* the filename (or URL) */
1652    int n_filename;
1653    xmlDocPtr cur; /* the document */
1654    int n_cur;
1655
1656    for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
1657    for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
1658        mem_base = xmlMemBlocks();
1659        filename = gen_fileoutput(n_filename);
1660        cur = gen_xmlDocPtr(n_cur);
1661
1662        ret_val = htmlSaveFile(filename, cur);
1663        desret_int(ret_val);
1664        call_tests++;
1665        des_fileoutput(n_filename, filename);
1666        des_xmlDocPtr(n_cur, cur);
1667        xmlResetLastError();
1668        if (mem_base != xmlMemBlocks()) {
1669            printf("Leak of %d blocks found in htmlSaveFile",
1670	           xmlMemBlocks() - mem_base);
1671	    ret++;
1672            printf(" %d", n_filename);
1673            printf(" %d", n_cur);
1674            printf("\n");
1675        }
1676    }
1677    }
1678#endif
1679#endif
1680
1681    return(ret);
1682}
1683
1684
1685static int
1686test_htmlSaveFileEnc(void) {
1687    int ret = 0;
1688
1689#ifdef LIBXML_HTML_ENABLED
1690#ifdef LIBXML_OUTPUT_ENABLED
1691    int mem_base;
1692    int ret_val;
1693    const char * filename; /* the filename */
1694    int n_filename;
1695    xmlDocPtr cur; /* the document */
1696    int n_cur;
1697    const char * encoding; /* the document encoding */
1698    int n_encoding;
1699
1700    for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
1701    for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
1702    for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
1703        mem_base = xmlMemBlocks();
1704        filename = gen_fileoutput(n_filename);
1705        cur = gen_xmlDocPtr(n_cur);
1706        encoding = gen_const_char_ptr(n_encoding);
1707
1708        ret_val = htmlSaveFileEnc(filename, cur, encoding);
1709        desret_int(ret_val);
1710        call_tests++;
1711        des_fileoutput(n_filename, filename);
1712        des_xmlDocPtr(n_cur, cur);
1713        des_const_char_ptr(n_encoding, encoding);
1714        xmlResetLastError();
1715        if (mem_base != xmlMemBlocks()) {
1716            printf("Leak of %d blocks found in htmlSaveFileEnc",
1717	           xmlMemBlocks() - mem_base);
1718	    ret++;
1719            printf(" %d", n_filename);
1720            printf(" %d", n_cur);
1721            printf(" %d", n_encoding);
1722            printf("\n");
1723        }
1724    }
1725    }
1726    }
1727#endif
1728#endif
1729
1730    return(ret);
1731}
1732
1733
1734static int
1735test_htmlSaveFileFormat(void) {
1736    int ret = 0;
1737
1738#ifdef LIBXML_HTML_ENABLED
1739#ifdef LIBXML_OUTPUT_ENABLED
1740    int mem_base;
1741    int ret_val;
1742    const char * filename; /* the filename */
1743    int n_filename;
1744    xmlDocPtr cur; /* the document */
1745    int n_cur;
1746    const char * encoding; /* the document encoding */
1747    int n_encoding;
1748    int format; /* should formatting spaces been added */
1749    int n_format;
1750
1751    for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
1752    for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
1753    for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
1754    for (n_format = 0;n_format < gen_nb_int;n_format++) {
1755        mem_base = xmlMemBlocks();
1756        filename = gen_fileoutput(n_filename);
1757        cur = gen_xmlDocPtr(n_cur);
1758        encoding = gen_const_char_ptr(n_encoding);
1759        format = gen_int(n_format);
1760
1761        ret_val = htmlSaveFileFormat(filename, cur, encoding, format);
1762        desret_int(ret_val);
1763        call_tests++;
1764        des_fileoutput(n_filename, filename);
1765        des_xmlDocPtr(n_cur, cur);
1766        des_const_char_ptr(n_encoding, encoding);
1767        des_int(n_format, format);
1768        xmlResetLastError();
1769        if (mem_base != xmlMemBlocks()) {
1770            printf("Leak of %d blocks found in htmlSaveFileFormat",
1771	           xmlMemBlocks() - mem_base);
1772	    ret++;
1773            printf(" %d", n_filename);
1774            printf(" %d", n_cur);
1775            printf(" %d", n_encoding);
1776            printf(" %d", n_format);
1777            printf("\n");
1778        }
1779    }
1780    }
1781    }
1782    }
1783#endif
1784#endif
1785
1786    return(ret);
1787}
1788
1789
1790static int
1791test_htmlSetMetaEncoding(void) {
1792    int ret = 0;
1793
1794#ifdef LIBXML_HTML_ENABLED
1795    int mem_base;
1796    int ret_val;
1797    htmlDocPtr doc; /* the document */
1798    int n_doc;
1799    const xmlChar * encoding; /* the encoding string */
1800    int n_encoding;
1801
1802    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
1803    for (n_encoding = 0;n_encoding < gen_nb_const_xmlChar_ptr;n_encoding++) {
1804        mem_base = xmlMemBlocks();
1805        doc = gen_xmlDocPtr(n_doc);
1806        encoding = gen_const_xmlChar_ptr(n_encoding);
1807
1808        ret_val = htmlSetMetaEncoding(doc, encoding);
1809        desret_int(ret_val);
1810        call_tests++;
1811        des_xmlDocPtr(n_doc, doc);
1812        des_const_xmlChar_ptr(n_encoding, encoding);
1813        xmlResetLastError();
1814        if (mem_base != xmlMemBlocks()) {
1815            printf("Leak of %d blocks found in htmlSetMetaEncoding",
1816	           xmlMemBlocks() - mem_base);
1817	    ret++;
1818            printf(" %d", n_doc);
1819            printf(" %d", n_encoding);
1820            printf("\n");
1821        }
1822    }
1823    }
1824#endif
1825
1826    return(ret);
1827}
1828
1829static int
1830test_HTMLtree(void) {
1831    int ret = 0;
1832
1833    printf("Testing HTMLtree ...\n");
1834    ret += test_htmlDocContentDumpFormatOutput();
1835    ret += test_htmlDocContentDumpOutput();
1836    ret += test_htmlDocDump();
1837    ret += test_htmlDocDumpMemory();
1838    ret += test_htmlGetMetaEncoding();
1839    ret += test_htmlIsBooleanAttr();
1840    ret += test_htmlNewDoc();
1841    ret += test_htmlNewDocNoDtD();
1842    ret += test_htmlNodeDump();
1843    ret += test_htmlNodeDumpFile();
1844    ret += test_htmlNodeDumpFileFormat();
1845    ret += test_htmlNodeDumpFormatOutput();
1846    ret += test_htmlNodeDumpOutput();
1847    ret += test_htmlSaveFile();
1848    ret += test_htmlSaveFileEnc();
1849    ret += test_htmlSaveFileFormat();
1850    ret += test_htmlSetMetaEncoding();
1851
1852    if (ret != 0)
1853	printf("Module HTMLtree: %d errors\n", ret);
1854    return(ret);
1855}
1856
1857static int
1858test_xmlC14NDocDumpMemory(void) {
1859    int ret = 0;
1860
1861
1862    /* missing type support */
1863    return(ret);
1864}
1865
1866
1867static int
1868test_xmlC14NDocSave(void) {
1869    int ret = 0;
1870
1871
1872    /* missing type support */
1873    return(ret);
1874}
1875
1876
1877static int
1878test_xmlC14NDocSaveTo(void) {
1879    int ret = 0;
1880
1881
1882    /* missing type support */
1883    return(ret);
1884}
1885
1886
1887static int
1888test_xmlC14NExecute(void) {
1889    int ret = 0;
1890
1891
1892    /* missing type support */
1893    return(ret);
1894}
1895
1896static int
1897test_c14n(void) {
1898    int ret = 0;
1899
1900    printf("Testing c14n ...\n");
1901    ret += test_xmlC14NDocDumpMemory();
1902    ret += test_xmlC14NDocSave();
1903    ret += test_xmlC14NDocSaveTo();
1904    ret += test_xmlC14NExecute();
1905
1906    if (ret != 0)
1907	printf("Module c14n: %d errors\n", ret);
1908    return(ret);
1909}
1910
1911static int
1912test_xmlACatalogAdd(void) {
1913    int ret = 0;
1914
1915
1916    /* missing type support */
1917    return(ret);
1918}
1919
1920
1921static int
1922test_xmlACatalogDump(void) {
1923    int ret = 0;
1924
1925
1926    /* missing type support */
1927    return(ret);
1928}
1929
1930
1931static int
1932test_xmlACatalogRemove(void) {
1933    int ret = 0;
1934
1935
1936    /* missing type support */
1937    return(ret);
1938}
1939
1940
1941static int
1942test_xmlACatalogResolve(void) {
1943    int ret = 0;
1944
1945
1946    /* missing type support */
1947    return(ret);
1948}
1949
1950
1951static int
1952test_xmlACatalogResolvePublic(void) {
1953    int ret = 0;
1954
1955
1956    /* missing type support */
1957    return(ret);
1958}
1959
1960
1961static int
1962test_xmlACatalogResolveSystem(void) {
1963    int ret = 0;
1964
1965
1966    /* missing type support */
1967    return(ret);
1968}
1969
1970
1971static int
1972test_xmlACatalogResolveURI(void) {
1973    int ret = 0;
1974
1975
1976    /* missing type support */
1977    return(ret);
1978}
1979
1980
1981static int
1982test_xmlCatalogAdd(void) {
1983    int ret = 0;
1984
1985#ifdef LIBXML_CATALOG_ENABLED
1986    int mem_base;
1987    int ret_val;
1988    const xmlChar * type; /* the type of record to add to the catalog */
1989    int n_type;
1990    const xmlChar * orig; /* the system, public or prefix to match */
1991    int n_orig;
1992    const xmlChar * replace; /* the replacement value for the match */
1993    int n_replace;
1994
1995    for (n_type = 0;n_type < gen_nb_const_xmlChar_ptr;n_type++) {
1996    for (n_orig = 0;n_orig < gen_nb_const_xmlChar_ptr;n_orig++) {
1997    for (n_replace = 0;n_replace < gen_nb_const_xmlChar_ptr;n_replace++) {
1998        mem_base = xmlMemBlocks();
1999        type = gen_const_xmlChar_ptr(n_type);
2000        orig = gen_const_xmlChar_ptr(n_orig);
2001        replace = gen_const_xmlChar_ptr(n_replace);
2002
2003        ret_val = xmlCatalogAdd(type, orig, replace);
2004        desret_int(ret_val);
2005        call_tests++;
2006        des_const_xmlChar_ptr(n_type, type);
2007        des_const_xmlChar_ptr(n_orig, orig);
2008        des_const_xmlChar_ptr(n_replace, replace);
2009        xmlResetLastError();
2010        if (mem_base != xmlMemBlocks()) {
2011            printf("Leak of %d blocks found in xmlCatalogAdd",
2012	           xmlMemBlocks() - mem_base);
2013	    ret++;
2014            printf(" %d", n_type);
2015            printf(" %d", n_orig);
2016            printf(" %d", n_replace);
2017            printf("\n");
2018        }
2019    }
2020    }
2021    }
2022#endif
2023
2024    return(ret);
2025}
2026
2027
2028static int
2029test_xmlCatalogCleanup(void) {
2030    int ret = 0;
2031
2032#ifdef LIBXML_CATALOG_ENABLED
2033
2034
2035        xmlCatalogCleanup();
2036        call_tests++;
2037        xmlResetLastError();
2038#endif
2039
2040    return(ret);
2041}
2042
2043
2044static int
2045test_xmlCatalogConvert(void) {
2046    int ret = 0;
2047
2048#ifdef LIBXML_CATALOG_ENABLED
2049    int ret_val;
2050
2051
2052        ret_val = xmlCatalogConvert();
2053        desret_int(ret_val);
2054        call_tests++;
2055        xmlResetLastError();
2056#endif
2057
2058    return(ret);
2059}
2060
2061
2062static int
2063test_xmlCatalogDump(void) {
2064    int ret = 0;
2065
2066
2067    /* missing type support */
2068    return(ret);
2069}
2070
2071
2072static int
2073test_xmlCatalogGetDefaults(void) {
2074    int ret = 0;
2075
2076
2077    /* missing type support */
2078    return(ret);
2079}
2080
2081
2082static int
2083test_xmlCatalogIsEmpty(void) {
2084    int ret = 0;
2085
2086
2087    /* missing type support */
2088    return(ret);
2089}
2090
2091
2092static int
2093test_xmlCatalogLocalResolve(void) {
2094    int ret = 0;
2095
2096#ifdef LIBXML_CATALOG_ENABLED
2097    int mem_base;
2098    xmlChar * ret_val;
2099    void * catalogs; /* a document's list of catalogs */
2100    int n_catalogs;
2101    const xmlChar * pubID; /* the public ID string */
2102    int n_pubID;
2103    const xmlChar * sysID; /* the system ID string */
2104    int n_sysID;
2105
2106    for (n_catalogs = 0;n_catalogs < gen_nb_void_ptr;n_catalogs++) {
2107    for (n_pubID = 0;n_pubID < gen_nb_const_xmlChar_ptr;n_pubID++) {
2108    for (n_sysID = 0;n_sysID < gen_nb_const_xmlChar_ptr;n_sysID++) {
2109        mem_base = xmlMemBlocks();
2110        catalogs = gen_void_ptr(n_catalogs);
2111        pubID = gen_const_xmlChar_ptr(n_pubID);
2112        sysID = gen_const_xmlChar_ptr(n_sysID);
2113
2114        ret_val = xmlCatalogLocalResolve(catalogs, pubID, sysID);
2115        desret_xmlChar_ptr(ret_val);
2116        call_tests++;
2117        des_void_ptr(n_catalogs, catalogs);
2118        des_const_xmlChar_ptr(n_pubID, pubID);
2119        des_const_xmlChar_ptr(n_sysID, sysID);
2120        xmlResetLastError();
2121        if (mem_base != xmlMemBlocks()) {
2122            printf("Leak of %d blocks found in xmlCatalogLocalResolve",
2123	           xmlMemBlocks() - mem_base);
2124	    ret++;
2125            printf(" %d", n_catalogs);
2126            printf(" %d", n_pubID);
2127            printf(" %d", n_sysID);
2128            printf("\n");
2129        }
2130    }
2131    }
2132    }
2133#endif
2134
2135    return(ret);
2136}
2137
2138
2139static int
2140test_xmlCatalogLocalResolveURI(void) {
2141    int ret = 0;
2142
2143#ifdef LIBXML_CATALOG_ENABLED
2144    int mem_base;
2145    xmlChar * ret_val;
2146    void * catalogs; /* a document's list of catalogs */
2147    int n_catalogs;
2148    const xmlChar * URI; /* the URI */
2149    int n_URI;
2150
2151    for (n_catalogs = 0;n_catalogs < gen_nb_void_ptr;n_catalogs++) {
2152    for (n_URI = 0;n_URI < gen_nb_const_xmlChar_ptr;n_URI++) {
2153        mem_base = xmlMemBlocks();
2154        catalogs = gen_void_ptr(n_catalogs);
2155        URI = gen_const_xmlChar_ptr(n_URI);
2156
2157        ret_val = xmlCatalogLocalResolveURI(catalogs, URI);
2158        desret_xmlChar_ptr(ret_val);
2159        call_tests++;
2160        des_void_ptr(n_catalogs, catalogs);
2161        des_const_xmlChar_ptr(n_URI, URI);
2162        xmlResetLastError();
2163        if (mem_base != xmlMemBlocks()) {
2164            printf("Leak of %d blocks found in xmlCatalogLocalResolveURI",
2165	           xmlMemBlocks() - mem_base);
2166	    ret++;
2167            printf(" %d", n_catalogs);
2168            printf(" %d", n_URI);
2169            printf("\n");
2170        }
2171    }
2172    }
2173#endif
2174
2175    return(ret);
2176}
2177
2178
2179static int
2180test_xmlCatalogRemove(void) {
2181    int ret = 0;
2182
2183#ifdef LIBXML_CATALOG_ENABLED
2184    int ret_val;
2185    const xmlChar * value; /* the value to remove */
2186    int n_value;
2187
2188    for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
2189        value = gen_const_xmlChar_ptr(n_value);
2190
2191        ret_val = xmlCatalogRemove(value);
2192        desret_int(ret_val);
2193        call_tests++;
2194        des_const_xmlChar_ptr(n_value, value);
2195        xmlResetLastError();
2196    }
2197#endif
2198
2199    return(ret);
2200}
2201
2202
2203static int
2204test_xmlCatalogResolve(void) {
2205    int ret = 0;
2206
2207#ifdef LIBXML_CATALOG_ENABLED
2208    int mem_base;
2209    xmlChar * ret_val;
2210    const xmlChar * pubID; /* the public ID string */
2211    int n_pubID;
2212    const xmlChar * sysID; /* the system ID string */
2213    int n_sysID;
2214
2215    for (n_pubID = 0;n_pubID < gen_nb_const_xmlChar_ptr;n_pubID++) {
2216    for (n_sysID = 0;n_sysID < gen_nb_const_xmlChar_ptr;n_sysID++) {
2217        mem_base = xmlMemBlocks();
2218        pubID = gen_const_xmlChar_ptr(n_pubID);
2219        sysID = gen_const_xmlChar_ptr(n_sysID);
2220
2221        ret_val = xmlCatalogResolve(pubID, sysID);
2222        desret_xmlChar_ptr(ret_val);
2223        call_tests++;
2224        des_const_xmlChar_ptr(n_pubID, pubID);
2225        des_const_xmlChar_ptr(n_sysID, sysID);
2226        xmlResetLastError();
2227        if (mem_base != xmlMemBlocks()) {
2228            printf("Leak of %d blocks found in xmlCatalogResolve",
2229	           xmlMemBlocks() - mem_base);
2230	    ret++;
2231            printf(" %d", n_pubID);
2232            printf(" %d", n_sysID);
2233            printf("\n");
2234        }
2235    }
2236    }
2237#endif
2238
2239    return(ret);
2240}
2241
2242
2243static int
2244test_xmlCatalogResolvePublic(void) {
2245    int ret = 0;
2246
2247#ifdef LIBXML_CATALOG_ENABLED
2248    int mem_base;
2249    xmlChar * ret_val;
2250    const xmlChar * pubID; /* the public ID string */
2251    int n_pubID;
2252
2253    for (n_pubID = 0;n_pubID < gen_nb_const_xmlChar_ptr;n_pubID++) {
2254        mem_base = xmlMemBlocks();
2255        pubID = gen_const_xmlChar_ptr(n_pubID);
2256
2257        ret_val = xmlCatalogResolvePublic(pubID);
2258        desret_xmlChar_ptr(ret_val);
2259        call_tests++;
2260        des_const_xmlChar_ptr(n_pubID, pubID);
2261        xmlResetLastError();
2262        if (mem_base != xmlMemBlocks()) {
2263            printf("Leak of %d blocks found in xmlCatalogResolvePublic",
2264	           xmlMemBlocks() - mem_base);
2265	    ret++;
2266            printf(" %d", n_pubID);
2267            printf("\n");
2268        }
2269    }
2270#endif
2271
2272    return(ret);
2273}
2274
2275
2276static int
2277test_xmlCatalogResolveSystem(void) {
2278    int ret = 0;
2279
2280#ifdef LIBXML_CATALOG_ENABLED
2281    int mem_base;
2282    xmlChar * ret_val;
2283    const xmlChar * sysID; /* the system ID string */
2284    int n_sysID;
2285
2286    for (n_sysID = 0;n_sysID < gen_nb_const_xmlChar_ptr;n_sysID++) {
2287        mem_base = xmlMemBlocks();
2288        sysID = gen_const_xmlChar_ptr(n_sysID);
2289
2290        ret_val = xmlCatalogResolveSystem(sysID);
2291        desret_xmlChar_ptr(ret_val);
2292        call_tests++;
2293        des_const_xmlChar_ptr(n_sysID, sysID);
2294        xmlResetLastError();
2295        if (mem_base != xmlMemBlocks()) {
2296            printf("Leak of %d blocks found in xmlCatalogResolveSystem",
2297	           xmlMemBlocks() - mem_base);
2298	    ret++;
2299            printf(" %d", n_sysID);
2300            printf("\n");
2301        }
2302    }
2303#endif
2304
2305    return(ret);
2306}
2307
2308
2309static int
2310test_xmlCatalogResolveURI(void) {
2311    int ret = 0;
2312
2313#ifdef LIBXML_CATALOG_ENABLED
2314    int mem_base;
2315    xmlChar * ret_val;
2316    const xmlChar * URI; /* the URI */
2317    int n_URI;
2318
2319    for (n_URI = 0;n_URI < gen_nb_const_xmlChar_ptr;n_URI++) {
2320        mem_base = xmlMemBlocks();
2321        URI = gen_const_xmlChar_ptr(n_URI);
2322
2323        ret_val = xmlCatalogResolveURI(URI);
2324        desret_xmlChar_ptr(ret_val);
2325        call_tests++;
2326        des_const_xmlChar_ptr(n_URI, URI);
2327        xmlResetLastError();
2328        if (mem_base != xmlMemBlocks()) {
2329            printf("Leak of %d blocks found in xmlCatalogResolveURI",
2330	           xmlMemBlocks() - mem_base);
2331	    ret++;
2332            printf(" %d", n_URI);
2333            printf("\n");
2334        }
2335    }
2336#endif
2337
2338    return(ret);
2339}
2340
2341
2342static int
2343test_xmlCatalogSetDebug(void) {
2344    int ret = 0;
2345
2346#ifdef LIBXML_CATALOG_ENABLED
2347    int mem_base;
2348    int ret_val;
2349    int level; /* the debug level of catalogs required */
2350    int n_level;
2351
2352    for (n_level = 0;n_level < gen_nb_int;n_level++) {
2353        mem_base = xmlMemBlocks();
2354        level = gen_int(n_level);
2355
2356        ret_val = xmlCatalogSetDebug(level);
2357        desret_int(ret_val);
2358        call_tests++;
2359        des_int(n_level, level);
2360        xmlResetLastError();
2361        if (mem_base != xmlMemBlocks()) {
2362            printf("Leak of %d blocks found in xmlCatalogSetDebug",
2363	           xmlMemBlocks() - mem_base);
2364	    ret++;
2365            printf(" %d", n_level);
2366            printf("\n");
2367        }
2368    }
2369#endif
2370
2371    return(ret);
2372}
2373
2374
2375static int
2376test_xmlCatalogSetDefaultPrefer(void) {
2377    int ret = 0;
2378
2379
2380    /* missing type support */
2381    return(ret);
2382}
2383
2384
2385static int
2386test_xmlCatalogSetDefaults(void) {
2387    int ret = 0;
2388
2389
2390    /* missing type support */
2391    return(ret);
2392}
2393
2394
2395static int
2396test_xmlConvertSGMLCatalog(void) {
2397    int ret = 0;
2398
2399
2400    /* missing type support */
2401    return(ret);
2402}
2403
2404
2405static int
2406test_xmlInitializeCatalog(void) {
2407    int ret = 0;
2408
2409#ifdef LIBXML_CATALOG_ENABLED
2410    int mem_base;
2411
2412        mem_base = xmlMemBlocks();
2413
2414        xmlInitializeCatalog();
2415        call_tests++;
2416        xmlResetLastError();
2417        if (mem_base != xmlMemBlocks()) {
2418            printf("Leak of %d blocks found in xmlInitializeCatalog",
2419	           xmlMemBlocks() - mem_base);
2420	    ret++;
2421            printf("\n");
2422        }
2423#endif
2424
2425    return(ret);
2426}
2427
2428
2429static int
2430test_xmlLoadACatalog(void) {
2431    int ret = 0;
2432
2433
2434    /* missing type support */
2435    return(ret);
2436}
2437
2438
2439static int
2440test_xmlLoadCatalog(void) {
2441    int ret = 0;
2442
2443#ifdef LIBXML_CATALOG_ENABLED
2444    int ret_val;
2445    const char * filename; /* a file path */
2446    int n_filename;
2447
2448    for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
2449        filename = gen_filepath(n_filename);
2450
2451        ret_val = xmlLoadCatalog(filename);
2452        desret_int(ret_val);
2453        call_tests++;
2454        des_filepath(n_filename, filename);
2455        xmlResetLastError();
2456    }
2457#endif
2458
2459    return(ret);
2460}
2461
2462
2463static int
2464test_xmlLoadCatalogs(void) {
2465    int ret = 0;
2466
2467#ifdef LIBXML_CATALOG_ENABLED
2468    const char * pathss; /* a list of directories separated by a colon or a space. */
2469    int n_pathss;
2470
2471    for (n_pathss = 0;n_pathss < gen_nb_const_char_ptr;n_pathss++) {
2472        pathss = gen_const_char_ptr(n_pathss);
2473
2474        xmlLoadCatalogs(pathss);
2475        call_tests++;
2476        des_const_char_ptr(n_pathss, pathss);
2477        xmlResetLastError();
2478    }
2479#endif
2480
2481    return(ret);
2482}
2483
2484
2485static int
2486test_xmlLoadSGMLSuperCatalog(void) {
2487    int ret = 0;
2488
2489
2490    /* missing type support */
2491    return(ret);
2492}
2493
2494
2495static int
2496test_xmlNewCatalog(void) {
2497    int ret = 0;
2498
2499
2500    /* missing type support */
2501    return(ret);
2502}
2503
2504
2505static int
2506test_xmlParseCatalogFile(void) {
2507    int ret = 0;
2508
2509#ifdef LIBXML_CATALOG_ENABLED
2510    int mem_base;
2511    xmlDocPtr ret_val;
2512    const char * filename; /* the filename */
2513    int n_filename;
2514
2515    for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
2516        mem_base = xmlMemBlocks();
2517        filename = gen_filepath(n_filename);
2518
2519        ret_val = xmlParseCatalogFile(filename);
2520        desret_xmlDocPtr(ret_val);
2521        call_tests++;
2522        des_filepath(n_filename, filename);
2523        xmlResetLastError();
2524        if (mem_base != xmlMemBlocks()) {
2525            printf("Leak of %d blocks found in xmlParseCatalogFile",
2526	           xmlMemBlocks() - mem_base);
2527	    ret++;
2528            printf(" %d", n_filename);
2529            printf("\n");
2530        }
2531    }
2532#endif
2533
2534    return(ret);
2535}
2536
2537static int
2538test_catalog(void) {
2539    int ret = 0;
2540
2541    printf("Testing catalog ...\n");
2542    ret += test_xmlACatalogAdd();
2543    ret += test_xmlACatalogDump();
2544    ret += test_xmlACatalogRemove();
2545    ret += test_xmlACatalogResolve();
2546    ret += test_xmlACatalogResolvePublic();
2547    ret += test_xmlACatalogResolveSystem();
2548    ret += test_xmlACatalogResolveURI();
2549    ret += test_xmlCatalogAdd();
2550    ret += test_xmlCatalogCleanup();
2551    ret += test_xmlCatalogConvert();
2552    ret += test_xmlCatalogDump();
2553    ret += test_xmlCatalogGetDefaults();
2554    ret += test_xmlCatalogIsEmpty();
2555    ret += test_xmlCatalogLocalResolve();
2556    ret += test_xmlCatalogLocalResolveURI();
2557    ret += test_xmlCatalogRemove();
2558    ret += test_xmlCatalogResolve();
2559    ret += test_xmlCatalogResolvePublic();
2560    ret += test_xmlCatalogResolveSystem();
2561    ret += test_xmlCatalogResolveURI();
2562    ret += test_xmlCatalogSetDebug();
2563    ret += test_xmlCatalogSetDefaultPrefer();
2564    ret += test_xmlCatalogSetDefaults();
2565    ret += test_xmlConvertSGMLCatalog();
2566    ret += test_xmlInitializeCatalog();
2567    ret += test_xmlLoadACatalog();
2568    ret += test_xmlLoadCatalog();
2569    ret += test_xmlLoadCatalogs();
2570    ret += test_xmlLoadSGMLSuperCatalog();
2571    ret += test_xmlNewCatalog();
2572    ret += test_xmlParseCatalogFile();
2573
2574    if (ret != 0)
2575	printf("Module catalog: %d errors\n", ret);
2576    return(ret);
2577}
2578
2579static int
2580test_xmlCharInRange(void) {
2581    int ret = 0;
2582
2583
2584    /* missing type support */
2585    return(ret);
2586}
2587
2588
2589static int
2590test_xmlIsBaseChar(void) {
2591    int ret = 0;
2592
2593
2594    /* missing type support */
2595    return(ret);
2596}
2597
2598
2599static int
2600test_xmlIsBlank(void) {
2601    int ret = 0;
2602
2603
2604    /* missing type support */
2605    return(ret);
2606}
2607
2608
2609static int
2610test_xmlIsChar(void) {
2611    int ret = 0;
2612
2613
2614    /* missing type support */
2615    return(ret);
2616}
2617
2618
2619static int
2620test_xmlIsCombining(void) {
2621    int ret = 0;
2622
2623
2624    /* missing type support */
2625    return(ret);
2626}
2627
2628
2629static int
2630test_xmlIsDigit(void) {
2631    int ret = 0;
2632
2633
2634    /* missing type support */
2635    return(ret);
2636}
2637
2638
2639static int
2640test_xmlIsExtender(void) {
2641    int ret = 0;
2642
2643
2644    /* missing type support */
2645    return(ret);
2646}
2647
2648
2649static int
2650test_xmlIsIdeographic(void) {
2651    int ret = 0;
2652
2653
2654    /* missing type support */
2655    return(ret);
2656}
2657
2658
2659static int
2660test_xmlIsPubidChar(void) {
2661    int ret = 0;
2662
2663
2664    /* missing type support */
2665    return(ret);
2666}
2667
2668static int
2669test_chvalid(void) {
2670    int ret = 0;
2671
2672    printf("Testing chvalid ...\n");
2673    ret += test_xmlCharInRange();
2674    ret += test_xmlIsBaseChar();
2675    ret += test_xmlIsBlank();
2676    ret += test_xmlIsChar();
2677    ret += test_xmlIsCombining();
2678    ret += test_xmlIsDigit();
2679    ret += test_xmlIsExtender();
2680    ret += test_xmlIsIdeographic();
2681    ret += test_xmlIsPubidChar();
2682
2683    if (ret != 0)
2684	printf("Module chvalid: %d errors\n", ret);
2685    return(ret);
2686}
2687
2688static int
2689test_xmlDictCreate(void) {
2690    int ret = 0;
2691
2692
2693    /* missing type support */
2694    return(ret);
2695}
2696
2697
2698static int
2699test_xmlDictCreateSub(void) {
2700    int ret = 0;
2701
2702
2703    /* missing type support */
2704    return(ret);
2705}
2706
2707
2708static int
2709test_xmlDictLookup(void) {
2710    int ret = 0;
2711
2712
2713    /* missing type support */
2714    return(ret);
2715}
2716
2717
2718static int
2719test_xmlDictOwns(void) {
2720    int ret = 0;
2721
2722
2723    /* missing type support */
2724    return(ret);
2725}
2726
2727
2728static int
2729test_xmlDictQLookup(void) {
2730    int ret = 0;
2731
2732
2733    /* missing type support */
2734    return(ret);
2735}
2736
2737
2738static int
2739test_xmlDictReference(void) {
2740    int ret = 0;
2741
2742
2743    /* missing type support */
2744    return(ret);
2745}
2746
2747
2748static int
2749test_xmlDictSize(void) {
2750    int ret = 0;
2751
2752
2753    /* missing type support */
2754    return(ret);
2755}
2756
2757static int
2758test_dict(void) {
2759    int ret = 0;
2760
2761    printf("Testing dict ...\n");
2762    ret += test_xmlDictCreate();
2763    ret += test_xmlDictCreateSub();
2764    ret += test_xmlDictLookup();
2765    ret += test_xmlDictOwns();
2766    ret += test_xmlDictQLookup();
2767    ret += test_xmlDictReference();
2768    ret += test_xmlDictSize();
2769
2770    if (ret != 0)
2771	printf("Module dict: %d errors\n", ret);
2772    return(ret);
2773}
2774
2775static int
2776test_UTF8Toisolat1(void) {
2777    int ret = 0;
2778
2779
2780    /* missing type support */
2781    return(ret);
2782}
2783
2784
2785static int
2786test_isolat1ToUTF8(void) {
2787    int ret = 0;
2788
2789
2790    /* missing type support */
2791    return(ret);
2792}
2793
2794
2795static int
2796test_xmlAddEncodingAlias(void) {
2797    int ret = 0;
2798
2799    int ret_val;
2800    const char * name; /* the encoding name as parsed, in UTF-8 format (ASCII actually) */
2801    int n_name;
2802    const char * alias; /* the alias name as parsed, in UTF-8 format (ASCII actually) */
2803    int n_alias;
2804
2805    for (n_name = 0;n_name < gen_nb_const_char_ptr;n_name++) {
2806    for (n_alias = 0;n_alias < gen_nb_const_char_ptr;n_alias++) {
2807        name = gen_const_char_ptr(n_name);
2808        alias = gen_const_char_ptr(n_alias);
2809
2810        ret_val = xmlAddEncodingAlias(name, alias);
2811        desret_int(ret_val);
2812        call_tests++;
2813        des_const_char_ptr(n_name, name);
2814        des_const_char_ptr(n_alias, alias);
2815        xmlResetLastError();
2816    }
2817    }
2818
2819    return(ret);
2820}
2821
2822
2823static int
2824test_xmlCharEncCloseFunc(void) {
2825    int ret = 0;
2826
2827
2828    /* missing type support */
2829    return(ret);
2830}
2831
2832
2833static int
2834test_xmlCharEncFirstLine(void) {
2835    int ret = 0;
2836
2837
2838    /* missing type support */
2839    return(ret);
2840}
2841
2842
2843static int
2844test_xmlCharEncInFunc(void) {
2845    int ret = 0;
2846
2847
2848    /* missing type support */
2849    return(ret);
2850}
2851
2852
2853static int
2854test_xmlCharEncOutFunc(void) {
2855    int ret = 0;
2856
2857
2858    /* missing type support */
2859    return(ret);
2860}
2861
2862
2863static int
2864test_xmlCleanupCharEncodingHandlers(void) {
2865    int ret = 0;
2866
2867
2868
2869        xmlCleanupCharEncodingHandlers();
2870        call_tests++;
2871        xmlResetLastError();
2872
2873    return(ret);
2874}
2875
2876
2877static int
2878test_xmlCleanupEncodingAliases(void) {
2879    int ret = 0;
2880
2881    int mem_base;
2882
2883        mem_base = xmlMemBlocks();
2884
2885        xmlCleanupEncodingAliases();
2886        call_tests++;
2887        xmlResetLastError();
2888        if (mem_base != xmlMemBlocks()) {
2889            printf("Leak of %d blocks found in xmlCleanupEncodingAliases",
2890	           xmlMemBlocks() - mem_base);
2891	    ret++;
2892            printf("\n");
2893        }
2894
2895    return(ret);
2896}
2897
2898
2899static int
2900test_xmlDelEncodingAlias(void) {
2901    int ret = 0;
2902
2903    int mem_base;
2904    int ret_val;
2905    const char * alias; /* the alias name as parsed, in UTF-8 format (ASCII actually) */
2906    int n_alias;
2907
2908    for (n_alias = 0;n_alias < gen_nb_const_char_ptr;n_alias++) {
2909        mem_base = xmlMemBlocks();
2910        alias = gen_const_char_ptr(n_alias);
2911
2912        ret_val = xmlDelEncodingAlias(alias);
2913        desret_int(ret_val);
2914        call_tests++;
2915        des_const_char_ptr(n_alias, alias);
2916        xmlResetLastError();
2917        if (mem_base != xmlMemBlocks()) {
2918            printf("Leak of %d blocks found in xmlDelEncodingAlias",
2919	           xmlMemBlocks() - mem_base);
2920	    ret++;
2921            printf(" %d", n_alias);
2922            printf("\n");
2923        }
2924    }
2925
2926    return(ret);
2927}
2928
2929
2930static int
2931test_xmlDetectCharEncoding(void) {
2932    int ret = 0;
2933
2934
2935    /* missing type support */
2936    return(ret);
2937}
2938
2939
2940static int
2941test_xmlFindCharEncodingHandler(void) {
2942    int ret = 0;
2943
2944
2945    /* missing type support */
2946    return(ret);
2947}
2948
2949
2950static int
2951test_xmlGetCharEncodingHandler(void) {
2952    int ret = 0;
2953
2954
2955    /* missing type support */
2956    return(ret);
2957}
2958
2959
2960static int
2961test_xmlGetCharEncodingName(void) {
2962    int ret = 0;
2963
2964
2965    /* missing type support */
2966    return(ret);
2967}
2968
2969
2970static int
2971test_xmlGetEncodingAlias(void) {
2972    int ret = 0;
2973
2974    int mem_base;
2975    const char * ret_val;
2976    const char * alias; /* the alias name as parsed, in UTF-8 format (ASCII actually) */
2977    int n_alias;
2978
2979    for (n_alias = 0;n_alias < gen_nb_const_char_ptr;n_alias++) {
2980        mem_base = xmlMemBlocks();
2981        alias = gen_const_char_ptr(n_alias);
2982
2983        ret_val = xmlGetEncodingAlias(alias);
2984        desret_const_char_ptr(ret_val);
2985        call_tests++;
2986        des_const_char_ptr(n_alias, alias);
2987        xmlResetLastError();
2988        if (mem_base != xmlMemBlocks()) {
2989            printf("Leak of %d blocks found in xmlGetEncodingAlias",
2990	           xmlMemBlocks() - mem_base);
2991	    ret++;
2992            printf(" %d", n_alias);
2993            printf("\n");
2994        }
2995    }
2996
2997    return(ret);
2998}
2999
3000
3001static int
3002test_xmlInitCharEncodingHandlers(void) {
3003    int ret = 0;
3004
3005
3006
3007        xmlInitCharEncodingHandlers();
3008        call_tests++;
3009        xmlResetLastError();
3010
3011    return(ret);
3012}
3013
3014
3015static int
3016test_xmlNewCharEncodingHandler(void) {
3017    int ret = 0;
3018
3019
3020    /* missing type support */
3021    return(ret);
3022}
3023
3024
3025static int
3026test_xmlParseCharEncoding(void) {
3027    int ret = 0;
3028
3029
3030    /* missing type support */
3031    return(ret);
3032}
3033
3034
3035static int
3036test_xmlRegisterCharEncodingHandler(void) {
3037    int ret = 0;
3038
3039
3040    /* missing type support */
3041    return(ret);
3042}
3043
3044static int
3045test_encoding(void) {
3046    int ret = 0;
3047
3048    printf("Testing encoding ...\n");
3049    ret += test_UTF8Toisolat1();
3050    ret += test_isolat1ToUTF8();
3051    ret += test_xmlAddEncodingAlias();
3052    ret += test_xmlCharEncCloseFunc();
3053    ret += test_xmlCharEncFirstLine();
3054    ret += test_xmlCharEncInFunc();
3055    ret += test_xmlCharEncOutFunc();
3056    ret += test_xmlCleanupCharEncodingHandlers();
3057    ret += test_xmlCleanupEncodingAliases();
3058    ret += test_xmlDelEncodingAlias();
3059    ret += test_xmlDetectCharEncoding();
3060    ret += test_xmlFindCharEncodingHandler();
3061    ret += test_xmlGetCharEncodingHandler();
3062    ret += test_xmlGetCharEncodingName();
3063    ret += test_xmlGetEncodingAlias();
3064    ret += test_xmlInitCharEncodingHandlers();
3065    ret += test_xmlNewCharEncodingHandler();
3066    ret += test_xmlParseCharEncoding();
3067    ret += test_xmlRegisterCharEncodingHandler();
3068
3069    if (ret != 0)
3070	printf("Module encoding: %d errors\n", ret);
3071    return(ret);
3072}
3073
3074static int
3075test_xmlAddDocEntity(void) {
3076    int ret = 0;
3077
3078
3079    /* missing type support */
3080    return(ret);
3081}
3082
3083
3084static int
3085test_xmlAddDtdEntity(void) {
3086    int ret = 0;
3087
3088
3089    /* missing type support */
3090    return(ret);
3091}
3092
3093
3094static int
3095test_xmlCleanupPredefinedEntities(void) {
3096    int ret = 0;
3097
3098    int mem_base;
3099
3100        mem_base = xmlMemBlocks();
3101
3102        xmlCleanupPredefinedEntities();
3103        call_tests++;
3104        xmlResetLastError();
3105        if (mem_base != xmlMemBlocks()) {
3106            printf("Leak of %d blocks found in xmlCleanupPredefinedEntities",
3107	           xmlMemBlocks() - mem_base);
3108	    ret++;
3109            printf("\n");
3110        }
3111
3112    return(ret);
3113}
3114
3115
3116static int
3117test_xmlCopyEntitiesTable(void) {
3118    int ret = 0;
3119
3120
3121    /* missing type support */
3122    return(ret);
3123}
3124
3125
3126static int
3127test_xmlCreateEntitiesTable(void) {
3128    int ret = 0;
3129
3130
3131    /* missing type support */
3132    return(ret);
3133}
3134
3135
3136static int
3137test_xmlDumpEntitiesTable(void) {
3138    int ret = 0;
3139
3140
3141    /* missing type support */
3142    return(ret);
3143}
3144
3145
3146static int
3147test_xmlDumpEntityDecl(void) {
3148    int ret = 0;
3149
3150
3151    /* missing type support */
3152    return(ret);
3153}
3154
3155
3156static int
3157test_xmlEncodeEntitiesReentrant(void) {
3158    int ret = 0;
3159
3160    int mem_base;
3161    xmlChar * ret_val;
3162    xmlDocPtr doc; /* the document containing the string */
3163    int n_doc;
3164    const xmlChar * input; /* A string to convert to XML. */
3165    int n_input;
3166
3167    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
3168    for (n_input = 0;n_input < gen_nb_const_xmlChar_ptr;n_input++) {
3169        mem_base = xmlMemBlocks();
3170        doc = gen_xmlDocPtr(n_doc);
3171        input = gen_const_xmlChar_ptr(n_input);
3172
3173        ret_val = xmlEncodeEntitiesReentrant(doc, input);
3174        desret_xmlChar_ptr(ret_val);
3175        call_tests++;
3176        des_xmlDocPtr(n_doc, doc);
3177        des_const_xmlChar_ptr(n_input, input);
3178        xmlResetLastError();
3179        if (mem_base != xmlMemBlocks()) {
3180            printf("Leak of %d blocks found in xmlEncodeEntitiesReentrant",
3181	           xmlMemBlocks() - mem_base);
3182	    ret++;
3183            printf(" %d", n_doc);
3184            printf(" %d", n_input);
3185            printf("\n");
3186        }
3187    }
3188    }
3189
3190    return(ret);
3191}
3192
3193
3194static int
3195test_xmlEncodeSpecialChars(void) {
3196    int ret = 0;
3197
3198    int mem_base;
3199    xmlChar * ret_val;
3200    xmlDocPtr doc; /* the document containing the string */
3201    int n_doc;
3202    const xmlChar * input; /* A string to convert to XML. */
3203    int n_input;
3204
3205    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
3206    for (n_input = 0;n_input < gen_nb_const_xmlChar_ptr;n_input++) {
3207        mem_base = xmlMemBlocks();
3208        doc = gen_xmlDocPtr(n_doc);
3209        input = gen_const_xmlChar_ptr(n_input);
3210
3211        ret_val = xmlEncodeSpecialChars(doc, input);
3212        desret_xmlChar_ptr(ret_val);
3213        call_tests++;
3214        des_xmlDocPtr(n_doc, doc);
3215        des_const_xmlChar_ptr(n_input, input);
3216        xmlResetLastError();
3217        if (mem_base != xmlMemBlocks()) {
3218            printf("Leak of %d blocks found in xmlEncodeSpecialChars",
3219	           xmlMemBlocks() - mem_base);
3220	    ret++;
3221            printf(" %d", n_doc);
3222            printf(" %d", n_input);
3223            printf("\n");
3224        }
3225    }
3226    }
3227
3228    return(ret);
3229}
3230
3231
3232static int
3233test_xmlGetDocEntity(void) {
3234    int ret = 0;
3235
3236
3237    /* missing type support */
3238    return(ret);
3239}
3240
3241
3242static int
3243test_xmlGetDtdEntity(void) {
3244    int ret = 0;
3245
3246
3247    /* missing type support */
3248    return(ret);
3249}
3250
3251
3252static int
3253test_xmlGetParameterEntity(void) {
3254    int ret = 0;
3255
3256
3257    /* missing type support */
3258    return(ret);
3259}
3260
3261
3262static int
3263test_xmlGetPredefinedEntity(void) {
3264    int ret = 0;
3265
3266
3267    /* missing type support */
3268    return(ret);
3269}
3270
3271
3272static int
3273test_xmlInitializePredefinedEntities(void) {
3274    int ret = 0;
3275
3276    int mem_base;
3277
3278        mem_base = xmlMemBlocks();
3279
3280        xmlInitializePredefinedEntities();
3281        call_tests++;
3282        xmlResetLastError();
3283        if (mem_base != xmlMemBlocks()) {
3284            printf("Leak of %d blocks found in xmlInitializePredefinedEntities",
3285	           xmlMemBlocks() - mem_base);
3286	    ret++;
3287            printf("\n");
3288        }
3289
3290    return(ret);
3291}
3292
3293static int
3294test_entities(void) {
3295    int ret = 0;
3296
3297    printf("Testing entities ...\n");
3298    ret += test_xmlAddDocEntity();
3299    ret += test_xmlAddDtdEntity();
3300    ret += test_xmlCleanupPredefinedEntities();
3301    ret += test_xmlCopyEntitiesTable();
3302    ret += test_xmlCreateEntitiesTable();
3303    ret += test_xmlDumpEntitiesTable();
3304    ret += test_xmlDumpEntityDecl();
3305    ret += test_xmlEncodeEntitiesReentrant();
3306    ret += test_xmlEncodeSpecialChars();
3307    ret += test_xmlGetDocEntity();
3308    ret += test_xmlGetDtdEntity();
3309    ret += test_xmlGetParameterEntity();
3310    ret += test_xmlGetPredefinedEntity();
3311    ret += test_xmlInitializePredefinedEntities();
3312
3313    if (ret != 0)
3314	printf("Module entities: %d errors\n", ret);
3315    return(ret);
3316}
3317
3318static int
3319test_xmlHashAddEntry(void) {
3320    int ret = 0;
3321
3322    int mem_base;
3323    int ret_val;
3324    xmlHashTablePtr table; /* the hash table */
3325    int n_table;
3326    const xmlChar * name; /* the name of the userdata */
3327    int n_name;
3328    void * userdata; /* a pointer to the userdata */
3329    int n_userdata;
3330
3331    for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
3332    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
3333    for (n_userdata = 0;n_userdata < gen_nb_userdata;n_userdata++) {
3334        mem_base = xmlMemBlocks();
3335        table = gen_xmlHashTablePtr(n_table);
3336        name = gen_const_xmlChar_ptr(n_name);
3337        userdata = gen_userdata(n_userdata);
3338
3339        ret_val = xmlHashAddEntry(table, name, userdata);
3340        desret_int(ret_val);
3341        call_tests++;
3342        des_xmlHashTablePtr(n_table, table);
3343        des_const_xmlChar_ptr(n_name, name);
3344        des_userdata(n_userdata, userdata);
3345        xmlResetLastError();
3346        if (mem_base != xmlMemBlocks()) {
3347            printf("Leak of %d blocks found in xmlHashAddEntry",
3348	           xmlMemBlocks() - mem_base);
3349	    ret++;
3350            printf(" %d", n_table);
3351            printf(" %d", n_name);
3352            printf(" %d", n_userdata);
3353            printf("\n");
3354        }
3355    }
3356    }
3357    }
3358
3359    return(ret);
3360}
3361
3362
3363static int
3364test_xmlHashAddEntry2(void) {
3365    int ret = 0;
3366
3367    int mem_base;
3368    int ret_val;
3369    xmlHashTablePtr table; /* the hash table */
3370    int n_table;
3371    const xmlChar * name; /* the name of the userdata */
3372    int n_name;
3373    const xmlChar * name2; /* a second name of the userdata */
3374    int n_name2;
3375    void * userdata; /* a pointer to the userdata */
3376    int n_userdata;
3377
3378    for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
3379    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
3380    for (n_name2 = 0;n_name2 < gen_nb_const_xmlChar_ptr;n_name2++) {
3381    for (n_userdata = 0;n_userdata < gen_nb_userdata;n_userdata++) {
3382        mem_base = xmlMemBlocks();
3383        table = gen_xmlHashTablePtr(n_table);
3384        name = gen_const_xmlChar_ptr(n_name);
3385        name2 = gen_const_xmlChar_ptr(n_name2);
3386        userdata = gen_userdata(n_userdata);
3387
3388        ret_val = xmlHashAddEntry2(table, name, name2, userdata);
3389        desret_int(ret_val);
3390        call_tests++;
3391        des_xmlHashTablePtr(n_table, table);
3392        des_const_xmlChar_ptr(n_name, name);
3393        des_const_xmlChar_ptr(n_name2, name2);
3394        des_userdata(n_userdata, userdata);
3395        xmlResetLastError();
3396        if (mem_base != xmlMemBlocks()) {
3397            printf("Leak of %d blocks found in xmlHashAddEntry2",
3398	           xmlMemBlocks() - mem_base);
3399	    ret++;
3400            printf(" %d", n_table);
3401            printf(" %d", n_name);
3402            printf(" %d", n_name2);
3403            printf(" %d", n_userdata);
3404            printf("\n");
3405        }
3406    }
3407    }
3408    }
3409    }
3410
3411    return(ret);
3412}
3413
3414
3415static int
3416test_xmlHashAddEntry3(void) {
3417    int ret = 0;
3418
3419    int mem_base;
3420    int ret_val;
3421    xmlHashTablePtr table; /* the hash table */
3422    int n_table;
3423    const xmlChar * name; /* the name of the userdata */
3424    int n_name;
3425    const xmlChar * name2; /* a second name of the userdata */
3426    int n_name2;
3427    const xmlChar * name3; /* a third name of the userdata */
3428    int n_name3;
3429    void * userdata; /* a pointer to the userdata */
3430    int n_userdata;
3431
3432    for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
3433    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
3434    for (n_name2 = 0;n_name2 < gen_nb_const_xmlChar_ptr;n_name2++) {
3435    for (n_name3 = 0;n_name3 < gen_nb_const_xmlChar_ptr;n_name3++) {
3436    for (n_userdata = 0;n_userdata < gen_nb_userdata;n_userdata++) {
3437        mem_base = xmlMemBlocks();
3438        table = gen_xmlHashTablePtr(n_table);
3439        name = gen_const_xmlChar_ptr(n_name);
3440        name2 = gen_const_xmlChar_ptr(n_name2);
3441        name3 = gen_const_xmlChar_ptr(n_name3);
3442        userdata = gen_userdata(n_userdata);
3443
3444        ret_val = xmlHashAddEntry3(table, name, name2, name3, userdata);
3445        desret_int(ret_val);
3446        call_tests++;
3447        des_xmlHashTablePtr(n_table, table);
3448        des_const_xmlChar_ptr(n_name, name);
3449        des_const_xmlChar_ptr(n_name2, name2);
3450        des_const_xmlChar_ptr(n_name3, name3);
3451        des_userdata(n_userdata, userdata);
3452        xmlResetLastError();
3453        if (mem_base != xmlMemBlocks()) {
3454            printf("Leak of %d blocks found in xmlHashAddEntry3",
3455	           xmlMemBlocks() - mem_base);
3456	    ret++;
3457            printf(" %d", n_table);
3458            printf(" %d", n_name);
3459            printf(" %d", n_name2);
3460            printf(" %d", n_name3);
3461            printf(" %d", n_userdata);
3462            printf("\n");
3463        }
3464    }
3465    }
3466    }
3467    }
3468    }
3469
3470    return(ret);
3471}
3472
3473
3474static int
3475test_xmlHashCopy(void) {
3476    int ret = 0;
3477
3478
3479    /* missing type support */
3480    return(ret);
3481}
3482
3483
3484static int
3485test_xmlHashCreate(void) {
3486    int ret = 0;
3487
3488
3489    /* missing type support */
3490    return(ret);
3491}
3492
3493
3494static int
3495test_xmlHashLookup(void) {
3496    int ret = 0;
3497
3498    int mem_base;
3499    void * ret_val;
3500    xmlHashTablePtr table; /* the hash table */
3501    int n_table;
3502    const xmlChar * name; /* the name of the userdata */
3503    int n_name;
3504
3505    for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
3506    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
3507        mem_base = xmlMemBlocks();
3508        table = gen_xmlHashTablePtr(n_table);
3509        name = gen_const_xmlChar_ptr(n_name);
3510
3511        ret_val = xmlHashLookup(table, name);
3512        desret_void_ptr(ret_val);
3513        call_tests++;
3514        des_xmlHashTablePtr(n_table, table);
3515        des_const_xmlChar_ptr(n_name, name);
3516        xmlResetLastError();
3517        if (mem_base != xmlMemBlocks()) {
3518            printf("Leak of %d blocks found in xmlHashLookup",
3519	           xmlMemBlocks() - mem_base);
3520	    ret++;
3521            printf(" %d", n_table);
3522            printf(" %d", n_name);
3523            printf("\n");
3524        }
3525    }
3526    }
3527
3528    return(ret);
3529}
3530
3531
3532static int
3533test_xmlHashLookup2(void) {
3534    int ret = 0;
3535
3536    int mem_base;
3537    void * ret_val;
3538    xmlHashTablePtr table; /* the hash table */
3539    int n_table;
3540    const xmlChar * name; /* the name of the userdata */
3541    int n_name;
3542    const xmlChar * name2; /* a second name of the userdata */
3543    int n_name2;
3544
3545    for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
3546    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
3547    for (n_name2 = 0;n_name2 < gen_nb_const_xmlChar_ptr;n_name2++) {
3548        mem_base = xmlMemBlocks();
3549        table = gen_xmlHashTablePtr(n_table);
3550        name = gen_const_xmlChar_ptr(n_name);
3551        name2 = gen_const_xmlChar_ptr(n_name2);
3552
3553        ret_val = xmlHashLookup2(table, name, name2);
3554        desret_void_ptr(ret_val);
3555        call_tests++;
3556        des_xmlHashTablePtr(n_table, table);
3557        des_const_xmlChar_ptr(n_name, name);
3558        des_const_xmlChar_ptr(n_name2, name2);
3559        xmlResetLastError();
3560        if (mem_base != xmlMemBlocks()) {
3561            printf("Leak of %d blocks found in xmlHashLookup2",
3562	           xmlMemBlocks() - mem_base);
3563	    ret++;
3564            printf(" %d", n_table);
3565            printf(" %d", n_name);
3566            printf(" %d", n_name2);
3567            printf("\n");
3568        }
3569    }
3570    }
3571    }
3572
3573    return(ret);
3574}
3575
3576
3577static int
3578test_xmlHashLookup3(void) {
3579    int ret = 0;
3580
3581    int mem_base;
3582    void * ret_val;
3583    xmlHashTablePtr table; /* the hash table */
3584    int n_table;
3585    const xmlChar * name; /* the name of the userdata */
3586    int n_name;
3587    const xmlChar * name2; /* a second name of the userdata */
3588    int n_name2;
3589    const xmlChar * name3; /* a third name of the userdata */
3590    int n_name3;
3591
3592    for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
3593    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
3594    for (n_name2 = 0;n_name2 < gen_nb_const_xmlChar_ptr;n_name2++) {
3595    for (n_name3 = 0;n_name3 < gen_nb_const_xmlChar_ptr;n_name3++) {
3596        mem_base = xmlMemBlocks();
3597        table = gen_xmlHashTablePtr(n_table);
3598        name = gen_const_xmlChar_ptr(n_name);
3599        name2 = gen_const_xmlChar_ptr(n_name2);
3600        name3 = gen_const_xmlChar_ptr(n_name3);
3601
3602        ret_val = xmlHashLookup3(table, name, name2, name3);
3603        desret_void_ptr(ret_val);
3604        call_tests++;
3605        des_xmlHashTablePtr(n_table, table);
3606        des_const_xmlChar_ptr(n_name, name);
3607        des_const_xmlChar_ptr(n_name2, name2);
3608        des_const_xmlChar_ptr(n_name3, name3);
3609        xmlResetLastError();
3610        if (mem_base != xmlMemBlocks()) {
3611            printf("Leak of %d blocks found in xmlHashLookup3",
3612	           xmlMemBlocks() - mem_base);
3613	    ret++;
3614            printf(" %d", n_table);
3615            printf(" %d", n_name);
3616            printf(" %d", n_name2);
3617            printf(" %d", n_name3);
3618            printf("\n");
3619        }
3620    }
3621    }
3622    }
3623    }
3624
3625    return(ret);
3626}
3627
3628
3629static int
3630test_xmlHashQLookup(void) {
3631    int ret = 0;
3632
3633    int mem_base;
3634    void * ret_val;
3635    xmlHashTablePtr table; /* the hash table */
3636    int n_table;
3637    const xmlChar * prefix; /* the prefix of the userdata */
3638    int n_prefix;
3639    const xmlChar * name; /* the name of the userdata */
3640    int n_name;
3641
3642    for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
3643    for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
3644    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
3645        mem_base = xmlMemBlocks();
3646        table = gen_xmlHashTablePtr(n_table);
3647        prefix = gen_const_xmlChar_ptr(n_prefix);
3648        name = gen_const_xmlChar_ptr(n_name);
3649
3650        ret_val = xmlHashQLookup(table, prefix, name);
3651        desret_void_ptr(ret_val);
3652        call_tests++;
3653        des_xmlHashTablePtr(n_table, table);
3654        des_const_xmlChar_ptr(n_prefix, prefix);
3655        des_const_xmlChar_ptr(n_name, name);
3656        xmlResetLastError();
3657        if (mem_base != xmlMemBlocks()) {
3658            printf("Leak of %d blocks found in xmlHashQLookup",
3659	           xmlMemBlocks() - mem_base);
3660	    ret++;
3661            printf(" %d", n_table);
3662            printf(" %d", n_prefix);
3663            printf(" %d", n_name);
3664            printf("\n");
3665        }
3666    }
3667    }
3668    }
3669
3670    return(ret);
3671}
3672
3673
3674static int
3675test_xmlHashQLookup2(void) {
3676    int ret = 0;
3677
3678    int mem_base;
3679    void * ret_val;
3680    xmlHashTablePtr table; /* the hash table */
3681    int n_table;
3682    const xmlChar * prefix; /* the prefix of the userdata */
3683    int n_prefix;
3684    const xmlChar * name; /* the name of the userdata */
3685    int n_name;
3686    const xmlChar * prefix2; /* the second prefix of the userdata */
3687    int n_prefix2;
3688    const xmlChar * name2; /* a second name of the userdata */
3689    int n_name2;
3690
3691    for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
3692    for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
3693    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
3694    for (n_prefix2 = 0;n_prefix2 < gen_nb_const_xmlChar_ptr;n_prefix2++) {
3695    for (n_name2 = 0;n_name2 < gen_nb_const_xmlChar_ptr;n_name2++) {
3696        mem_base = xmlMemBlocks();
3697        table = gen_xmlHashTablePtr(n_table);
3698        prefix = gen_const_xmlChar_ptr(n_prefix);
3699        name = gen_const_xmlChar_ptr(n_name);
3700        prefix2 = gen_const_xmlChar_ptr(n_prefix2);
3701        name2 = gen_const_xmlChar_ptr(n_name2);
3702
3703        ret_val = xmlHashQLookup2(table, prefix, name, prefix2, name2);
3704        desret_void_ptr(ret_val);
3705        call_tests++;
3706        des_xmlHashTablePtr(n_table, table);
3707        des_const_xmlChar_ptr(n_prefix, prefix);
3708        des_const_xmlChar_ptr(n_name, name);
3709        des_const_xmlChar_ptr(n_prefix2, prefix2);
3710        des_const_xmlChar_ptr(n_name2, name2);
3711        xmlResetLastError();
3712        if (mem_base != xmlMemBlocks()) {
3713            printf("Leak of %d blocks found in xmlHashQLookup2",
3714	           xmlMemBlocks() - mem_base);
3715	    ret++;
3716            printf(" %d", n_table);
3717            printf(" %d", n_prefix);
3718            printf(" %d", n_name);
3719            printf(" %d", n_prefix2);
3720            printf(" %d", n_name2);
3721            printf("\n");
3722        }
3723    }
3724    }
3725    }
3726    }
3727    }
3728
3729    return(ret);
3730}
3731
3732
3733static int
3734test_xmlHashQLookup3(void) {
3735    int ret = 0;
3736
3737    int mem_base;
3738    void * ret_val;
3739    xmlHashTablePtr table; /* the hash table */
3740    int n_table;
3741    const xmlChar * prefix; /* the prefix of the userdata */
3742    int n_prefix;
3743    const xmlChar * name; /* the name of the userdata */
3744    int n_name;
3745    const xmlChar * prefix2; /* the second prefix of the userdata */
3746    int n_prefix2;
3747    const xmlChar * name2; /* a second name of the userdata */
3748    int n_name2;
3749    const xmlChar * prefix3; /* the third prefix of the userdata */
3750    int n_prefix3;
3751    const xmlChar * name3; /* a third name of the userdata */
3752    int n_name3;
3753
3754    for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
3755    for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
3756    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
3757    for (n_prefix2 = 0;n_prefix2 < gen_nb_const_xmlChar_ptr;n_prefix2++) {
3758    for (n_name2 = 0;n_name2 < gen_nb_const_xmlChar_ptr;n_name2++) {
3759    for (n_prefix3 = 0;n_prefix3 < gen_nb_const_xmlChar_ptr;n_prefix3++) {
3760    for (n_name3 = 0;n_name3 < gen_nb_const_xmlChar_ptr;n_name3++) {
3761        mem_base = xmlMemBlocks();
3762        table = gen_xmlHashTablePtr(n_table);
3763        prefix = gen_const_xmlChar_ptr(n_prefix);
3764        name = gen_const_xmlChar_ptr(n_name);
3765        prefix2 = gen_const_xmlChar_ptr(n_prefix2);
3766        name2 = gen_const_xmlChar_ptr(n_name2);
3767        prefix3 = gen_const_xmlChar_ptr(n_prefix3);
3768        name3 = gen_const_xmlChar_ptr(n_name3);
3769
3770        ret_val = xmlHashQLookup3(table, prefix, name, prefix2, name2, prefix3, name3);
3771        desret_void_ptr(ret_val);
3772        call_tests++;
3773        des_xmlHashTablePtr(n_table, table);
3774        des_const_xmlChar_ptr(n_prefix, prefix);
3775        des_const_xmlChar_ptr(n_name, name);
3776        des_const_xmlChar_ptr(n_prefix2, prefix2);
3777        des_const_xmlChar_ptr(n_name2, name2);
3778        des_const_xmlChar_ptr(n_prefix3, prefix3);
3779        des_const_xmlChar_ptr(n_name3, name3);
3780        xmlResetLastError();
3781        if (mem_base != xmlMemBlocks()) {
3782            printf("Leak of %d blocks found in xmlHashQLookup3",
3783	           xmlMemBlocks() - mem_base);
3784	    ret++;
3785            printf(" %d", n_table);
3786            printf(" %d", n_prefix);
3787            printf(" %d", n_name);
3788            printf(" %d", n_prefix2);
3789            printf(" %d", n_name2);
3790            printf(" %d", n_prefix3);
3791            printf(" %d", n_name3);
3792            printf("\n");
3793        }
3794    }
3795    }
3796    }
3797    }
3798    }
3799    }
3800    }
3801
3802    return(ret);
3803}
3804
3805
3806static int
3807test_xmlHashRemoveEntry(void) {
3808    int ret = 0;
3809
3810
3811    /* missing type support */
3812    return(ret);
3813}
3814
3815
3816static int
3817test_xmlHashRemoveEntry2(void) {
3818    int ret = 0;
3819
3820
3821    /* missing type support */
3822    return(ret);
3823}
3824
3825
3826static int
3827test_xmlHashRemoveEntry3(void) {
3828    int ret = 0;
3829
3830
3831    /* missing type support */
3832    return(ret);
3833}
3834
3835
3836static int
3837test_xmlHashScan(void) {
3838    int ret = 0;
3839
3840
3841    /* missing type support */
3842    return(ret);
3843}
3844
3845
3846static int
3847test_xmlHashScan3(void) {
3848    int ret = 0;
3849
3850
3851    /* missing type support */
3852    return(ret);
3853}
3854
3855
3856static int
3857test_xmlHashScanFull(void) {
3858    int ret = 0;
3859
3860
3861    /* missing type support */
3862    return(ret);
3863}
3864
3865
3866static int
3867test_xmlHashScanFull3(void) {
3868    int ret = 0;
3869
3870
3871    /* missing type support */
3872    return(ret);
3873}
3874
3875
3876static int
3877test_xmlHashSize(void) {
3878    int ret = 0;
3879
3880    int mem_base;
3881    int ret_val;
3882    xmlHashTablePtr table; /* the hash table */
3883    int n_table;
3884
3885    for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
3886        mem_base = xmlMemBlocks();
3887        table = gen_xmlHashTablePtr(n_table);
3888
3889        ret_val = xmlHashSize(table);
3890        desret_int(ret_val);
3891        call_tests++;
3892        des_xmlHashTablePtr(n_table, table);
3893        xmlResetLastError();
3894        if (mem_base != xmlMemBlocks()) {
3895            printf("Leak of %d blocks found in xmlHashSize",
3896	           xmlMemBlocks() - mem_base);
3897	    ret++;
3898            printf(" %d", n_table);
3899            printf("\n");
3900        }
3901    }
3902
3903    return(ret);
3904}
3905
3906
3907static int
3908test_xmlHashUpdateEntry(void) {
3909    int ret = 0;
3910
3911
3912    /* missing type support */
3913    return(ret);
3914}
3915
3916
3917static int
3918test_xmlHashUpdateEntry2(void) {
3919    int ret = 0;
3920
3921
3922    /* missing type support */
3923    return(ret);
3924}
3925
3926
3927static int
3928test_xmlHashUpdateEntry3(void) {
3929    int ret = 0;
3930
3931
3932    /* missing type support */
3933    return(ret);
3934}
3935
3936static int
3937test_hash(void) {
3938    int ret = 0;
3939
3940    printf("Testing hash ...\n");
3941    ret += test_xmlHashAddEntry();
3942    ret += test_xmlHashAddEntry2();
3943    ret += test_xmlHashAddEntry3();
3944    ret += test_xmlHashCopy();
3945    ret += test_xmlHashCreate();
3946    ret += test_xmlHashLookup();
3947    ret += test_xmlHashLookup2();
3948    ret += test_xmlHashLookup3();
3949    ret += test_xmlHashQLookup();
3950    ret += test_xmlHashQLookup2();
3951    ret += test_xmlHashQLookup3();
3952    ret += test_xmlHashRemoveEntry();
3953    ret += test_xmlHashRemoveEntry2();
3954    ret += test_xmlHashRemoveEntry3();
3955    ret += test_xmlHashScan();
3956    ret += test_xmlHashScan3();
3957    ret += test_xmlHashScanFull();
3958    ret += test_xmlHashScanFull3();
3959    ret += test_xmlHashSize();
3960    ret += test_xmlHashUpdateEntry();
3961    ret += test_xmlHashUpdateEntry2();
3962    ret += test_xmlHashUpdateEntry3();
3963
3964    if (ret != 0)
3965	printf("Module hash: %d errors\n", ret);
3966    return(ret);
3967}
3968
3969static int
3970test_xmlLinkGetData(void) {
3971    int ret = 0;
3972
3973
3974    /* missing type support */
3975    return(ret);
3976}
3977
3978
3979static int
3980test_xmlListAppend(void) {
3981    int ret = 0;
3982
3983    int mem_base;
3984    int ret_val;
3985    xmlListPtr l; /* a list */
3986    int n_l;
3987    void * data; /* the data */
3988    int n_data;
3989
3990    for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
3991    for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
3992        mem_base = xmlMemBlocks();
3993        l = gen_xmlListPtr(n_l);
3994        data = gen_userdata(n_data);
3995
3996        ret_val = xmlListAppend(l, data);
3997        desret_int(ret_val);
3998        call_tests++;
3999        des_xmlListPtr(n_l, l);
4000        des_userdata(n_data, data);
4001        xmlResetLastError();
4002        if (mem_base != xmlMemBlocks()) {
4003            printf("Leak of %d blocks found in xmlListAppend",
4004	           xmlMemBlocks() - mem_base);
4005	    ret++;
4006            printf(" %d", n_l);
4007            printf(" %d", n_data);
4008            printf("\n");
4009        }
4010    }
4011    }
4012
4013    return(ret);
4014}
4015
4016
4017static int
4018test_xmlListClear(void) {
4019    int ret = 0;
4020
4021    int mem_base;
4022    xmlListPtr l; /* a list */
4023    int n_l;
4024
4025    for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
4026        mem_base = xmlMemBlocks();
4027        l = gen_xmlListPtr(n_l);
4028
4029        xmlListClear(l);
4030        call_tests++;
4031        des_xmlListPtr(n_l, l);
4032        xmlResetLastError();
4033        if (mem_base != xmlMemBlocks()) {
4034            printf("Leak of %d blocks found in xmlListClear",
4035	           xmlMemBlocks() - mem_base);
4036	    ret++;
4037            printf(" %d", n_l);
4038            printf("\n");
4039        }
4040    }
4041
4042    return(ret);
4043}
4044
4045
4046static int
4047test_xmlListCopy(void) {
4048    int ret = 0;
4049
4050
4051    /* missing type support */
4052    return(ret);
4053}
4054
4055
4056static int
4057test_xmlListCreate(void) {
4058    int ret = 0;
4059
4060
4061    /* missing type support */
4062    return(ret);
4063}
4064
4065
4066static int
4067test_xmlListDup(void) {
4068    int ret = 0;
4069
4070
4071    /* missing type support */
4072    return(ret);
4073}
4074
4075
4076static int
4077test_xmlListEmpty(void) {
4078    int ret = 0;
4079
4080    int mem_base;
4081    int ret_val;
4082    xmlListPtr l; /* a list */
4083    int n_l;
4084
4085    for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
4086        mem_base = xmlMemBlocks();
4087        l = gen_xmlListPtr(n_l);
4088
4089        ret_val = xmlListEmpty(l);
4090        desret_int(ret_val);
4091        call_tests++;
4092        des_xmlListPtr(n_l, l);
4093        xmlResetLastError();
4094        if (mem_base != xmlMemBlocks()) {
4095            printf("Leak of %d blocks found in xmlListEmpty",
4096	           xmlMemBlocks() - mem_base);
4097	    ret++;
4098            printf(" %d", n_l);
4099            printf("\n");
4100        }
4101    }
4102
4103    return(ret);
4104}
4105
4106
4107static int
4108test_xmlListEnd(void) {
4109    int ret = 0;
4110
4111
4112    /* missing type support */
4113    return(ret);
4114}
4115
4116
4117static int
4118test_xmlListFront(void) {
4119    int ret = 0;
4120
4121
4122    /* missing type support */
4123    return(ret);
4124}
4125
4126
4127static int
4128test_xmlListInsert(void) {
4129    int ret = 0;
4130
4131    int mem_base;
4132    int ret_val;
4133    xmlListPtr l; /* a list */
4134    int n_l;
4135    void * data; /* the data */
4136    int n_data;
4137
4138    for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
4139    for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
4140        mem_base = xmlMemBlocks();
4141        l = gen_xmlListPtr(n_l);
4142        data = gen_userdata(n_data);
4143
4144        ret_val = xmlListInsert(l, data);
4145        desret_int(ret_val);
4146        call_tests++;
4147        des_xmlListPtr(n_l, l);
4148        des_userdata(n_data, data);
4149        xmlResetLastError();
4150        if (mem_base != xmlMemBlocks()) {
4151            printf("Leak of %d blocks found in xmlListInsert",
4152	           xmlMemBlocks() - mem_base);
4153	    ret++;
4154            printf(" %d", n_l);
4155            printf(" %d", n_data);
4156            printf("\n");
4157        }
4158    }
4159    }
4160
4161    return(ret);
4162}
4163
4164
4165static int
4166test_xmlListMerge(void) {
4167    int ret = 0;
4168
4169    int mem_base;
4170    xmlListPtr l1; /* the original list */
4171    int n_l1;
4172    xmlListPtr l2; /* the new list */
4173    int n_l2;
4174
4175    for (n_l1 = 0;n_l1 < gen_nb_xmlListPtr;n_l1++) {
4176    for (n_l2 = 0;n_l2 < gen_nb_xmlListPtr;n_l2++) {
4177        mem_base = xmlMemBlocks();
4178        l1 = gen_xmlListPtr(n_l1);
4179        l2 = gen_xmlListPtr(n_l2);
4180
4181        xmlListMerge(l1, l2);
4182        call_tests++;
4183        des_xmlListPtr(n_l1, l1);
4184        des_xmlListPtr(n_l2, l2);
4185        xmlResetLastError();
4186        if (mem_base != xmlMemBlocks()) {
4187            printf("Leak of %d blocks found in xmlListMerge",
4188	           xmlMemBlocks() - mem_base);
4189	    ret++;
4190            printf(" %d", n_l1);
4191            printf(" %d", n_l2);
4192            printf("\n");
4193        }
4194    }
4195    }
4196
4197    return(ret);
4198}
4199
4200
4201static int
4202test_xmlListPopBack(void) {
4203    int ret = 0;
4204
4205    int mem_base;
4206    xmlListPtr l; /* a list */
4207    int n_l;
4208
4209    for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
4210        mem_base = xmlMemBlocks();
4211        l = gen_xmlListPtr(n_l);
4212
4213        xmlListPopBack(l);
4214        call_tests++;
4215        des_xmlListPtr(n_l, l);
4216        xmlResetLastError();
4217        if (mem_base != xmlMemBlocks()) {
4218            printf("Leak of %d blocks found in xmlListPopBack",
4219	           xmlMemBlocks() - mem_base);
4220	    ret++;
4221            printf(" %d", n_l);
4222            printf("\n");
4223        }
4224    }
4225
4226    return(ret);
4227}
4228
4229
4230static int
4231test_xmlListPopFront(void) {
4232    int ret = 0;
4233
4234    int mem_base;
4235    xmlListPtr l; /* a list */
4236    int n_l;
4237
4238    for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
4239        mem_base = xmlMemBlocks();
4240        l = gen_xmlListPtr(n_l);
4241
4242        xmlListPopFront(l);
4243        call_tests++;
4244        des_xmlListPtr(n_l, l);
4245        xmlResetLastError();
4246        if (mem_base != xmlMemBlocks()) {
4247            printf("Leak of %d blocks found in xmlListPopFront",
4248	           xmlMemBlocks() - mem_base);
4249	    ret++;
4250            printf(" %d", n_l);
4251            printf("\n");
4252        }
4253    }
4254
4255    return(ret);
4256}
4257
4258
4259static int
4260test_xmlListPushBack(void) {
4261    int ret = 0;
4262
4263    int mem_base;
4264    int ret_val;
4265    xmlListPtr l; /* a list */
4266    int n_l;
4267    void * data; /* new data */
4268    int n_data;
4269
4270    for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
4271    for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
4272        mem_base = xmlMemBlocks();
4273        l = gen_xmlListPtr(n_l);
4274        data = gen_userdata(n_data);
4275
4276        ret_val = xmlListPushBack(l, data);
4277        desret_int(ret_val);
4278        call_tests++;
4279        des_xmlListPtr(n_l, l);
4280        des_userdata(n_data, data);
4281        xmlResetLastError();
4282        if (mem_base != xmlMemBlocks()) {
4283            printf("Leak of %d blocks found in xmlListPushBack",
4284	           xmlMemBlocks() - mem_base);
4285	    ret++;
4286            printf(" %d", n_l);
4287            printf(" %d", n_data);
4288            printf("\n");
4289        }
4290    }
4291    }
4292
4293    return(ret);
4294}
4295
4296
4297static int
4298test_xmlListPushFront(void) {
4299    int ret = 0;
4300
4301    int mem_base;
4302    int ret_val;
4303    xmlListPtr l; /* a list */
4304    int n_l;
4305    void * data; /* new data */
4306    int n_data;
4307
4308    for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
4309    for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
4310        mem_base = xmlMemBlocks();
4311        l = gen_xmlListPtr(n_l);
4312        data = gen_userdata(n_data);
4313
4314        ret_val = xmlListPushFront(l, data);
4315        desret_int(ret_val);
4316        call_tests++;
4317        des_xmlListPtr(n_l, l);
4318        des_userdata(n_data, data);
4319        xmlResetLastError();
4320        if (mem_base != xmlMemBlocks()) {
4321            printf("Leak of %d blocks found in xmlListPushFront",
4322	           xmlMemBlocks() - mem_base);
4323	    ret++;
4324            printf(" %d", n_l);
4325            printf(" %d", n_data);
4326            printf("\n");
4327        }
4328    }
4329    }
4330
4331    return(ret);
4332}
4333
4334
4335static int
4336test_xmlListRemoveAll(void) {
4337    int ret = 0;
4338
4339    int mem_base;
4340    int ret_val;
4341    xmlListPtr l; /* a list */
4342    int n_l;
4343    void * data; /* list data */
4344    int n_data;
4345
4346    for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
4347    for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
4348        mem_base = xmlMemBlocks();
4349        l = gen_xmlListPtr(n_l);
4350        data = gen_userdata(n_data);
4351
4352        ret_val = xmlListRemoveAll(l, data);
4353        desret_int(ret_val);
4354        call_tests++;
4355        des_xmlListPtr(n_l, l);
4356        des_userdata(n_data, data);
4357        xmlResetLastError();
4358        if (mem_base != xmlMemBlocks()) {
4359            printf("Leak of %d blocks found in xmlListRemoveAll",
4360	           xmlMemBlocks() - mem_base);
4361	    ret++;
4362            printf(" %d", n_l);
4363            printf(" %d", n_data);
4364            printf("\n");
4365        }
4366    }
4367    }
4368
4369    return(ret);
4370}
4371
4372
4373static int
4374test_xmlListRemoveFirst(void) {
4375    int ret = 0;
4376
4377    int mem_base;
4378    int ret_val;
4379    xmlListPtr l; /* a list */
4380    int n_l;
4381    void * data; /* list data */
4382    int n_data;
4383
4384    for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
4385    for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
4386        mem_base = xmlMemBlocks();
4387        l = gen_xmlListPtr(n_l);
4388        data = gen_userdata(n_data);
4389
4390        ret_val = xmlListRemoveFirst(l, data);
4391        desret_int(ret_val);
4392        call_tests++;
4393        des_xmlListPtr(n_l, l);
4394        des_userdata(n_data, data);
4395        xmlResetLastError();
4396        if (mem_base != xmlMemBlocks()) {
4397            printf("Leak of %d blocks found in xmlListRemoveFirst",
4398	           xmlMemBlocks() - mem_base);
4399	    ret++;
4400            printf(" %d", n_l);
4401            printf(" %d", n_data);
4402            printf("\n");
4403        }
4404    }
4405    }
4406
4407    return(ret);
4408}
4409
4410
4411static int
4412test_xmlListRemoveLast(void) {
4413    int ret = 0;
4414
4415    int mem_base;
4416    int ret_val;
4417    xmlListPtr l; /* a list */
4418    int n_l;
4419    void * data; /* list data */
4420    int n_data;
4421
4422    for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
4423    for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
4424        mem_base = xmlMemBlocks();
4425        l = gen_xmlListPtr(n_l);
4426        data = gen_userdata(n_data);
4427
4428        ret_val = xmlListRemoveLast(l, data);
4429        desret_int(ret_val);
4430        call_tests++;
4431        des_xmlListPtr(n_l, l);
4432        des_userdata(n_data, data);
4433        xmlResetLastError();
4434        if (mem_base != xmlMemBlocks()) {
4435            printf("Leak of %d blocks found in xmlListRemoveLast",
4436	           xmlMemBlocks() - mem_base);
4437	    ret++;
4438            printf(" %d", n_l);
4439            printf(" %d", n_data);
4440            printf("\n");
4441        }
4442    }
4443    }
4444
4445    return(ret);
4446}
4447
4448
4449static int
4450test_xmlListReverse(void) {
4451    int ret = 0;
4452
4453    int mem_base;
4454    xmlListPtr l; /* a list */
4455    int n_l;
4456
4457    for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
4458        mem_base = xmlMemBlocks();
4459        l = gen_xmlListPtr(n_l);
4460
4461        xmlListReverse(l);
4462        call_tests++;
4463        des_xmlListPtr(n_l, l);
4464        xmlResetLastError();
4465        if (mem_base != xmlMemBlocks()) {
4466            printf("Leak of %d blocks found in xmlListReverse",
4467	           xmlMemBlocks() - mem_base);
4468	    ret++;
4469            printf(" %d", n_l);
4470            printf("\n");
4471        }
4472    }
4473
4474    return(ret);
4475}
4476
4477
4478static int
4479test_xmlListReverseSearch(void) {
4480    int ret = 0;
4481
4482    int mem_base;
4483    void * ret_val;
4484    xmlListPtr l; /* a list */
4485    int n_l;
4486    void * data; /* a search value */
4487    int n_data;
4488
4489    for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
4490    for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
4491        mem_base = xmlMemBlocks();
4492        l = gen_xmlListPtr(n_l);
4493        data = gen_userdata(n_data);
4494
4495        ret_val = xmlListReverseSearch(l, data);
4496        desret_void_ptr(ret_val);
4497        call_tests++;
4498        des_xmlListPtr(n_l, l);
4499        des_userdata(n_data, data);
4500        xmlResetLastError();
4501        if (mem_base != xmlMemBlocks()) {
4502            printf("Leak of %d blocks found in xmlListReverseSearch",
4503	           xmlMemBlocks() - mem_base);
4504	    ret++;
4505            printf(" %d", n_l);
4506            printf(" %d", n_data);
4507            printf("\n");
4508        }
4509    }
4510    }
4511
4512    return(ret);
4513}
4514
4515
4516static int
4517test_xmlListReverseWalk(void) {
4518    int ret = 0;
4519
4520
4521    /* missing type support */
4522    return(ret);
4523}
4524
4525
4526static int
4527test_xmlListSearch(void) {
4528    int ret = 0;
4529
4530    int mem_base;
4531    void * ret_val;
4532    xmlListPtr l; /* a list */
4533    int n_l;
4534    void * data; /* a search value */
4535    int n_data;
4536
4537    for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
4538    for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
4539        mem_base = xmlMemBlocks();
4540        l = gen_xmlListPtr(n_l);
4541        data = gen_userdata(n_data);
4542
4543        ret_val = xmlListSearch(l, data);
4544        desret_void_ptr(ret_val);
4545        call_tests++;
4546        des_xmlListPtr(n_l, l);
4547        des_userdata(n_data, data);
4548        xmlResetLastError();
4549        if (mem_base != xmlMemBlocks()) {
4550            printf("Leak of %d blocks found in xmlListSearch",
4551	           xmlMemBlocks() - mem_base);
4552	    ret++;
4553            printf(" %d", n_l);
4554            printf(" %d", n_data);
4555            printf("\n");
4556        }
4557    }
4558    }
4559
4560    return(ret);
4561}
4562
4563
4564static int
4565test_xmlListSize(void) {
4566    int ret = 0;
4567
4568    int mem_base;
4569    int ret_val;
4570    xmlListPtr l; /* a list */
4571    int n_l;
4572
4573    for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
4574        mem_base = xmlMemBlocks();
4575        l = gen_xmlListPtr(n_l);
4576
4577        ret_val = xmlListSize(l);
4578        desret_int(ret_val);
4579        call_tests++;
4580        des_xmlListPtr(n_l, l);
4581        xmlResetLastError();
4582        if (mem_base != xmlMemBlocks()) {
4583            printf("Leak of %d blocks found in xmlListSize",
4584	           xmlMemBlocks() - mem_base);
4585	    ret++;
4586            printf(" %d", n_l);
4587            printf("\n");
4588        }
4589    }
4590
4591    return(ret);
4592}
4593
4594
4595static int
4596test_xmlListSort(void) {
4597    int ret = 0;
4598
4599    int mem_base;
4600    xmlListPtr l; /* a list */
4601    int n_l;
4602
4603    for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
4604        mem_base = xmlMemBlocks();
4605        l = gen_xmlListPtr(n_l);
4606
4607        xmlListSort(l);
4608        call_tests++;
4609        des_xmlListPtr(n_l, l);
4610        xmlResetLastError();
4611        if (mem_base != xmlMemBlocks()) {
4612            printf("Leak of %d blocks found in xmlListSort",
4613	           xmlMemBlocks() - mem_base);
4614	    ret++;
4615            printf(" %d", n_l);
4616            printf("\n");
4617        }
4618    }
4619
4620    return(ret);
4621}
4622
4623
4624static int
4625test_xmlListWalk(void) {
4626    int ret = 0;
4627
4628
4629    /* missing type support */
4630    return(ret);
4631}
4632
4633static int
4634test_list(void) {
4635    int ret = 0;
4636
4637    printf("Testing list ...\n");
4638    ret += test_xmlLinkGetData();
4639    ret += test_xmlListAppend();
4640    ret += test_xmlListClear();
4641    ret += test_xmlListCopy();
4642    ret += test_xmlListCreate();
4643    ret += test_xmlListDup();
4644    ret += test_xmlListEmpty();
4645    ret += test_xmlListEnd();
4646    ret += test_xmlListFront();
4647    ret += test_xmlListInsert();
4648    ret += test_xmlListMerge();
4649    ret += test_xmlListPopBack();
4650    ret += test_xmlListPopFront();
4651    ret += test_xmlListPushBack();
4652    ret += test_xmlListPushFront();
4653    ret += test_xmlListRemoveAll();
4654    ret += test_xmlListRemoveFirst();
4655    ret += test_xmlListRemoveLast();
4656    ret += test_xmlListReverse();
4657    ret += test_xmlListReverseSearch();
4658    ret += test_xmlListReverseWalk();
4659    ret += test_xmlListSearch();
4660    ret += test_xmlListSize();
4661    ret += test_xmlListSort();
4662    ret += test_xmlListWalk();
4663
4664    if (ret != 0)
4665	printf("Module list: %d errors\n", ret);
4666    return(ret);
4667}
4668
4669static int
4670test_xmlNanoFTPCheckResponse(void) {
4671    int ret = 0;
4672
4673
4674    /* missing type support */
4675    return(ret);
4676}
4677
4678
4679static int
4680test_xmlNanoFTPCleanup(void) {
4681    int ret = 0;
4682
4683#ifdef LIBXML_FTP_ENABLED
4684    int mem_base;
4685
4686        mem_base = xmlMemBlocks();
4687
4688        xmlNanoFTPCleanup();
4689        call_tests++;
4690        xmlResetLastError();
4691        if (mem_base != xmlMemBlocks()) {
4692            printf("Leak of %d blocks found in xmlNanoFTPCleanup",
4693	           xmlMemBlocks() - mem_base);
4694	    ret++;
4695            printf("\n");
4696        }
4697#endif
4698
4699    return(ret);
4700}
4701
4702
4703static int
4704test_xmlNanoFTPClose(void) {
4705    int ret = 0;
4706
4707
4708    /* missing type support */
4709    return(ret);
4710}
4711
4712
4713static int
4714test_xmlNanoFTPCloseConnection(void) {
4715    int ret = 0;
4716
4717
4718    /* missing type support */
4719    return(ret);
4720}
4721
4722
4723static int
4724test_xmlNanoFTPConnect(void) {
4725    int ret = 0;
4726
4727
4728    /* missing type support */
4729    return(ret);
4730}
4731
4732
4733static int
4734test_xmlNanoFTPConnectTo(void) {
4735    int ret = 0;
4736
4737#ifdef LIBXML_FTP_ENABLED
4738    int mem_base;
4739    void * ret_val;
4740    const char * server; /* an FTP server name */
4741    int n_server;
4742    int port; /* the port (use 21 if 0) */
4743    int n_port;
4744
4745    for (n_server = 0;n_server < gen_nb_const_char_ptr;n_server++) {
4746    for (n_port = 0;n_port < gen_nb_int;n_port++) {
4747        mem_base = xmlMemBlocks();
4748        server = gen_const_char_ptr(n_server);
4749        port = gen_int(n_port);
4750
4751        ret_val = xmlNanoFTPConnectTo(server, port);
4752        desret_void_ptr(ret_val);
4753        call_tests++;
4754        des_const_char_ptr(n_server, server);
4755        des_int(n_port, port);
4756        xmlResetLastError();
4757        if (mem_base != xmlMemBlocks()) {
4758            printf("Leak of %d blocks found in xmlNanoFTPConnectTo",
4759	           xmlMemBlocks() - mem_base);
4760	    ret++;
4761            printf(" %d", n_server);
4762            printf(" %d", n_port);
4763            printf("\n");
4764        }
4765    }
4766    }
4767#endif
4768
4769    return(ret);
4770}
4771
4772
4773static int
4774test_xmlNanoFTPCwd(void) {
4775    int ret = 0;
4776
4777
4778    /* missing type support */
4779    return(ret);
4780}
4781
4782
4783static int
4784test_xmlNanoFTPDele(void) {
4785    int ret = 0;
4786
4787
4788    /* missing type support */
4789    return(ret);
4790}
4791
4792
4793static int
4794test_xmlNanoFTPGet(void) {
4795    int ret = 0;
4796
4797
4798    /* missing type support */
4799    return(ret);
4800}
4801
4802
4803static int
4804test_xmlNanoFTPGetConnection(void) {
4805    int ret = 0;
4806
4807
4808    /* missing type support */
4809    return(ret);
4810}
4811
4812
4813static int
4814test_xmlNanoFTPGetResponse(void) {
4815    int ret = 0;
4816
4817
4818    /* missing type support */
4819    return(ret);
4820}
4821
4822
4823static int
4824test_xmlNanoFTPGetSocket(void) {
4825    int ret = 0;
4826
4827
4828    /* missing type support */
4829    return(ret);
4830}
4831
4832
4833static int
4834test_xmlNanoFTPInit(void) {
4835    int ret = 0;
4836
4837#ifdef LIBXML_FTP_ENABLED
4838    int mem_base;
4839
4840        mem_base = xmlMemBlocks();
4841
4842        xmlNanoFTPInit();
4843        call_tests++;
4844        xmlResetLastError();
4845        if (mem_base != xmlMemBlocks()) {
4846            printf("Leak of %d blocks found in xmlNanoFTPInit",
4847	           xmlMemBlocks() - mem_base);
4848	    ret++;
4849            printf("\n");
4850        }
4851#endif
4852
4853    return(ret);
4854}
4855
4856
4857static int
4858test_xmlNanoFTPList(void) {
4859    int ret = 0;
4860
4861
4862    /* missing type support */
4863    return(ret);
4864}
4865
4866
4867static int
4868test_xmlNanoFTPNewCtxt(void) {
4869    int ret = 0;
4870
4871
4872    /* missing type support */
4873    return(ret);
4874}
4875
4876
4877static int
4878test_xmlNanoFTPOpen(void) {
4879    int ret = 0;
4880
4881#ifdef LIBXML_FTP_ENABLED
4882    int mem_base;
4883    void * ret_val;
4884    const char * URL; /* the URL to the resource */
4885    int n_URL;
4886
4887    for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
4888        mem_base = xmlMemBlocks();
4889        URL = gen_filepath(n_URL);
4890
4891        ret_val = xmlNanoFTPOpen(URL);
4892        desret_void_ptr(ret_val);
4893        call_tests++;
4894        des_filepath(n_URL, URL);
4895        xmlResetLastError();
4896        if (mem_base != xmlMemBlocks()) {
4897            printf("Leak of %d blocks found in xmlNanoFTPOpen",
4898	           xmlMemBlocks() - mem_base);
4899	    ret++;
4900            printf(" %d", n_URL);
4901            printf("\n");
4902        }
4903    }
4904#endif
4905
4906    return(ret);
4907}
4908
4909
4910static int
4911test_xmlNanoFTPProxy(void) {
4912    int ret = 0;
4913
4914#ifdef LIBXML_FTP_ENABLED
4915    const char * host; /* the proxy host name */
4916    int n_host;
4917    int port; /* the proxy port */
4918    int n_port;
4919    const char * user; /* the proxy user name */
4920    int n_user;
4921    const char * passwd; /* the proxy password */
4922    int n_passwd;
4923    int type; /* the type of proxy 1 for using SITE, 2 for USER a@b */
4924    int n_type;
4925
4926    for (n_host = 0;n_host < gen_nb_const_char_ptr;n_host++) {
4927    for (n_port = 0;n_port < gen_nb_int;n_port++) {
4928    for (n_user = 0;n_user < gen_nb_const_char_ptr;n_user++) {
4929    for (n_passwd = 0;n_passwd < gen_nb_const_char_ptr;n_passwd++) {
4930    for (n_type = 0;n_type < gen_nb_int;n_type++) {
4931        host = gen_const_char_ptr(n_host);
4932        port = gen_int(n_port);
4933        user = gen_const_char_ptr(n_user);
4934        passwd = gen_const_char_ptr(n_passwd);
4935        type = gen_int(n_type);
4936
4937        xmlNanoFTPProxy(host, port, user, passwd, type);
4938        call_tests++;
4939        des_const_char_ptr(n_host, host);
4940        des_int(n_port, port);
4941        des_const_char_ptr(n_user, user);
4942        des_const_char_ptr(n_passwd, passwd);
4943        des_int(n_type, type);
4944        xmlResetLastError();
4945    }
4946    }
4947    }
4948    }
4949    }
4950#endif
4951
4952    return(ret);
4953}
4954
4955
4956static int
4957test_xmlNanoFTPQuit(void) {
4958    int ret = 0;
4959
4960
4961    /* missing type support */
4962    return(ret);
4963}
4964
4965
4966static int
4967test_xmlNanoFTPRead(void) {
4968    int ret = 0;
4969
4970
4971    /* missing type support */
4972    return(ret);
4973}
4974
4975
4976static int
4977test_xmlNanoFTPScanProxy(void) {
4978    int ret = 0;
4979
4980#ifdef LIBXML_FTP_ENABLED
4981    const char * URL; /* The proxy URL used to initialize the proxy context */
4982    int n_URL;
4983
4984    for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
4985        URL = gen_filepath(n_URL);
4986
4987        xmlNanoFTPScanProxy(URL);
4988        call_tests++;
4989        des_filepath(n_URL, URL);
4990        xmlResetLastError();
4991    }
4992#endif
4993
4994    return(ret);
4995}
4996
4997
4998static int
4999test_xmlNanoFTPUpdateURL(void) {
5000    int ret = 0;
5001
5002
5003    /* missing type support */
5004    return(ret);
5005}
5006
5007static int
5008test_nanoftp(void) {
5009    int ret = 0;
5010
5011    printf("Testing nanoftp ...\n");
5012    ret += test_xmlNanoFTPCheckResponse();
5013    ret += test_xmlNanoFTPCleanup();
5014    ret += test_xmlNanoFTPClose();
5015    ret += test_xmlNanoFTPCloseConnection();
5016    ret += test_xmlNanoFTPConnect();
5017    ret += test_xmlNanoFTPConnectTo();
5018    ret += test_xmlNanoFTPCwd();
5019    ret += test_xmlNanoFTPDele();
5020    ret += test_xmlNanoFTPGet();
5021    ret += test_xmlNanoFTPGetConnection();
5022    ret += test_xmlNanoFTPGetResponse();
5023    ret += test_xmlNanoFTPGetSocket();
5024    ret += test_xmlNanoFTPInit();
5025    ret += test_xmlNanoFTPList();
5026    ret += test_xmlNanoFTPNewCtxt();
5027    ret += test_xmlNanoFTPOpen();
5028    ret += test_xmlNanoFTPProxy();
5029    ret += test_xmlNanoFTPQuit();
5030    ret += test_xmlNanoFTPRead();
5031    ret += test_xmlNanoFTPScanProxy();
5032    ret += test_xmlNanoFTPUpdateURL();
5033
5034    if (ret != 0)
5035	printf("Module nanoftp: %d errors\n", ret);
5036    return(ret);
5037}
5038
5039static int
5040test_xmlNanoHTTPAuthHeader(void) {
5041    int ret = 0;
5042
5043
5044    /* missing type support */
5045    return(ret);
5046}
5047
5048
5049static int
5050test_xmlNanoHTTPCleanup(void) {
5051    int ret = 0;
5052
5053#ifdef LIBXML_HTTP_ENABLED
5054    int mem_base;
5055
5056        mem_base = xmlMemBlocks();
5057
5058        xmlNanoHTTPCleanup();
5059        call_tests++;
5060        xmlResetLastError();
5061        if (mem_base != xmlMemBlocks()) {
5062            printf("Leak of %d blocks found in xmlNanoHTTPCleanup",
5063	           xmlMemBlocks() - mem_base);
5064	    ret++;
5065            printf("\n");
5066        }
5067#endif
5068
5069    return(ret);
5070}
5071
5072
5073static int
5074test_xmlNanoHTTPClose(void) {
5075    int ret = 0;
5076
5077
5078    /* missing type support */
5079    return(ret);
5080}
5081
5082
5083static int
5084test_xmlNanoHTTPContentLength(void) {
5085    int ret = 0;
5086
5087
5088    /* missing type support */
5089    return(ret);
5090}
5091
5092
5093static int
5094test_xmlNanoHTTPEncoding(void) {
5095    int ret = 0;
5096
5097
5098    /* missing type support */
5099    return(ret);
5100}
5101
5102
5103static int
5104test_xmlNanoHTTPFetch(void) {
5105    int ret = 0;
5106
5107
5108    /* missing type support */
5109    return(ret);
5110}
5111
5112
5113static int
5114test_xmlNanoHTTPInit(void) {
5115    int ret = 0;
5116
5117#ifdef LIBXML_HTTP_ENABLED
5118    int mem_base;
5119
5120        mem_base = xmlMemBlocks();
5121
5122        xmlNanoHTTPInit();
5123        call_tests++;
5124        xmlResetLastError();
5125        if (mem_base != xmlMemBlocks()) {
5126            printf("Leak of %d blocks found in xmlNanoHTTPInit",
5127	           xmlMemBlocks() - mem_base);
5128	    ret++;
5129            printf("\n");
5130        }
5131#endif
5132
5133    return(ret);
5134}
5135
5136
5137static int
5138test_xmlNanoHTTPMethod(void) {
5139    int ret = 0;
5140
5141
5142    /* missing type support */
5143    return(ret);
5144}
5145
5146
5147static int
5148test_xmlNanoHTTPMethodRedir(void) {
5149    int ret = 0;
5150
5151
5152    /* missing type support */
5153    return(ret);
5154}
5155
5156
5157static int
5158test_xmlNanoHTTPMimeType(void) {
5159    int ret = 0;
5160
5161
5162    /* missing type support */
5163    return(ret);
5164}
5165
5166
5167static int
5168test_xmlNanoHTTPOpen(void) {
5169    int ret = 0;
5170
5171
5172    /* missing type support */
5173    return(ret);
5174}
5175
5176
5177static int
5178test_xmlNanoHTTPOpenRedir(void) {
5179    int ret = 0;
5180
5181
5182    /* missing type support */
5183    return(ret);
5184}
5185
5186
5187static int
5188test_xmlNanoHTTPRead(void) {
5189    int ret = 0;
5190
5191
5192    /* missing type support */
5193    return(ret);
5194}
5195
5196
5197static int
5198test_xmlNanoHTTPRedir(void) {
5199    int ret = 0;
5200
5201
5202    /* missing type support */
5203    return(ret);
5204}
5205
5206
5207static int
5208test_xmlNanoHTTPReturnCode(void) {
5209    int ret = 0;
5210
5211
5212    /* missing type support */
5213    return(ret);
5214}
5215
5216
5217static int
5218test_xmlNanoHTTPSave(void) {
5219    int ret = 0;
5220
5221#ifdef LIBXML_HTTP_ENABLED
5222#ifdef LIBXML_OUTPUT_ENABLED
5223    int mem_base;
5224    int ret_val;
5225    void * ctxt; /* the HTTP context */
5226    int n_ctxt;
5227    const char * filename; /* the filename where the content should be saved */
5228    int n_filename;
5229
5230    for (n_ctxt = 0;n_ctxt < gen_nb_void_ptr;n_ctxt++) {
5231    for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
5232        mem_base = xmlMemBlocks();
5233        ctxt = gen_void_ptr(n_ctxt);
5234        filename = gen_fileoutput(n_filename);
5235
5236        ret_val = xmlNanoHTTPSave(ctxt, filename);
5237        desret_int(ret_val);
5238        call_tests++;
5239        des_void_ptr(n_ctxt, ctxt);
5240        des_fileoutput(n_filename, filename);
5241        xmlResetLastError();
5242        if (mem_base != xmlMemBlocks()) {
5243            printf("Leak of %d blocks found in xmlNanoHTTPSave",
5244	           xmlMemBlocks() - mem_base);
5245	    ret++;
5246            printf(" %d", n_ctxt);
5247            printf(" %d", n_filename);
5248            printf("\n");
5249        }
5250    }
5251    }
5252#endif
5253#endif
5254
5255    return(ret);
5256}
5257
5258
5259static int
5260test_xmlNanoHTTPScanProxy(void) {
5261    int ret = 0;
5262
5263#ifdef LIBXML_HTTP_ENABLED
5264    const char * URL; /* The proxy URL used to initialize the proxy context */
5265    int n_URL;
5266
5267    for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
5268        URL = gen_filepath(n_URL);
5269
5270        xmlNanoHTTPScanProxy(URL);
5271        call_tests++;
5272        des_filepath(n_URL, URL);
5273        xmlResetLastError();
5274    }
5275#endif
5276
5277    return(ret);
5278}
5279
5280static int
5281test_nanohttp(void) {
5282    int ret = 0;
5283
5284    printf("Testing nanohttp ...\n");
5285    ret += test_xmlNanoHTTPAuthHeader();
5286    ret += test_xmlNanoHTTPCleanup();
5287    ret += test_xmlNanoHTTPClose();
5288    ret += test_xmlNanoHTTPContentLength();
5289    ret += test_xmlNanoHTTPEncoding();
5290    ret += test_xmlNanoHTTPFetch();
5291    ret += test_xmlNanoHTTPInit();
5292    ret += test_xmlNanoHTTPMethod();
5293    ret += test_xmlNanoHTTPMethodRedir();
5294    ret += test_xmlNanoHTTPMimeType();
5295    ret += test_xmlNanoHTTPOpen();
5296    ret += test_xmlNanoHTTPOpenRedir();
5297    ret += test_xmlNanoHTTPRead();
5298    ret += test_xmlNanoHTTPRedir();
5299    ret += test_xmlNanoHTTPReturnCode();
5300    ret += test_xmlNanoHTTPSave();
5301    ret += test_xmlNanoHTTPScanProxy();
5302
5303    if (ret != 0)
5304	printf("Module nanohttp: %d errors\n", ret);
5305    return(ret);
5306}
5307
5308static int
5309test_xmlByteConsumed(void) {
5310    int ret = 0;
5311
5312
5313    /* missing type support */
5314    return(ret);
5315}
5316
5317
5318static int
5319test_xmlClearNodeInfoSeq(void) {
5320    int ret = 0;
5321
5322
5323    /* missing type support */
5324    return(ret);
5325}
5326
5327
5328static int
5329test_xmlClearParserCtxt(void) {
5330    int ret = 0;
5331
5332    int mem_base;
5333    xmlParserCtxtPtr ctxt; /* an XML parser context */
5334    int n_ctxt;
5335
5336    for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
5337        mem_base = xmlMemBlocks();
5338        ctxt = gen_xmlParserCtxtPtr(n_ctxt);
5339
5340        xmlClearParserCtxt(ctxt);
5341        call_tests++;
5342        des_xmlParserCtxtPtr(n_ctxt, ctxt);
5343        xmlResetLastError();
5344        if (mem_base != xmlMemBlocks()) {
5345            printf("Leak of %d blocks found in xmlClearParserCtxt",
5346	           xmlMemBlocks() - mem_base);
5347	    ret++;
5348            printf(" %d", n_ctxt);
5349            printf("\n");
5350        }
5351    }
5352
5353    return(ret);
5354}
5355
5356
5357static int
5358test_xmlCreateDocParserCtxt(void) {
5359    int ret = 0;
5360
5361
5362    /* missing type support */
5363    return(ret);
5364}
5365
5366
5367static int
5368test_xmlCreateIOParserCtxt(void) {
5369    int ret = 0;
5370
5371
5372    /* missing type support */
5373    return(ret);
5374}
5375
5376
5377static int
5378test_xmlCreatePushParserCtxt(void) {
5379    int ret = 0;
5380
5381
5382    /* missing type support */
5383    return(ret);
5384}
5385
5386
5387static int
5388test_xmlCtxtReadDoc(void) {
5389    int ret = 0;
5390
5391    int mem_base;
5392    xmlDocPtr ret_val;
5393    xmlParserCtxtPtr ctxt; /* an XML parser context */
5394    int n_ctxt;
5395    const xmlChar * cur; /* a pointer to a zero terminated string */
5396    int n_cur;
5397    const char * URL; /* the base URL to use for the document */
5398    int n_URL;
5399    const char * encoding; /* the document encoding, or NULL */
5400    int n_encoding;
5401    int options; /* a combination of xmlParserOption */
5402    int n_options;
5403
5404    for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
5405    for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
5406    for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
5407    for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
5408    for (n_options = 0;n_options < gen_nb_int;n_options++) {
5409        mem_base = xmlMemBlocks();
5410        ctxt = gen_xmlParserCtxtPtr(n_ctxt);
5411        cur = gen_const_xmlChar_ptr(n_cur);
5412        URL = gen_filepath(n_URL);
5413        encoding = gen_const_char_ptr(n_encoding);
5414        options = gen_int(n_options);
5415
5416        ret_val = xmlCtxtReadDoc(ctxt, cur, URL, encoding, options);
5417        desret_xmlDocPtr(ret_val);
5418        call_tests++;
5419        des_xmlParserCtxtPtr(n_ctxt, ctxt);
5420        des_const_xmlChar_ptr(n_cur, cur);
5421        des_filepath(n_URL, URL);
5422        des_const_char_ptr(n_encoding, encoding);
5423        des_int(n_options, options);
5424        xmlResetLastError();
5425        if (mem_base != xmlMemBlocks()) {
5426            printf("Leak of %d blocks found in xmlCtxtReadDoc",
5427	           xmlMemBlocks() - mem_base);
5428	    ret++;
5429            printf(" %d", n_ctxt);
5430            printf(" %d", n_cur);
5431            printf(" %d", n_URL);
5432            printf(" %d", n_encoding);
5433            printf(" %d", n_options);
5434            printf("\n");
5435        }
5436    }
5437    }
5438    }
5439    }
5440    }
5441
5442    return(ret);
5443}
5444
5445
5446static int
5447test_xmlCtxtReadFile(void) {
5448    int ret = 0;
5449
5450    int mem_base;
5451    xmlDocPtr ret_val;
5452    xmlParserCtxtPtr ctxt; /* an XML parser context */
5453    int n_ctxt;
5454    const char * filename; /* a file or URL */
5455    int n_filename;
5456    const char * encoding; /* the document encoding, or NULL */
5457    int n_encoding;
5458    int options; /* a combination of xmlParserOption */
5459    int n_options;
5460
5461    for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
5462    for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
5463    for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
5464    for (n_options = 0;n_options < gen_nb_int;n_options++) {
5465        mem_base = xmlMemBlocks();
5466        ctxt = gen_xmlParserCtxtPtr(n_ctxt);
5467        filename = gen_filepath(n_filename);
5468        encoding = gen_const_char_ptr(n_encoding);
5469        options = gen_int(n_options);
5470
5471        ret_val = xmlCtxtReadFile(ctxt, filename, encoding, options);
5472        desret_xmlDocPtr(ret_val);
5473        call_tests++;
5474        des_xmlParserCtxtPtr(n_ctxt, ctxt);
5475        des_filepath(n_filename, filename);
5476        des_const_char_ptr(n_encoding, encoding);
5477        des_int(n_options, options);
5478        xmlResetLastError();
5479        if (mem_base != xmlMemBlocks()) {
5480            printf("Leak of %d blocks found in xmlCtxtReadFile",
5481	           xmlMemBlocks() - mem_base);
5482	    ret++;
5483            printf(" %d", n_ctxt);
5484            printf(" %d", n_filename);
5485            printf(" %d", n_encoding);
5486            printf(" %d", n_options);
5487            printf("\n");
5488        }
5489    }
5490    }
5491    }
5492    }
5493
5494    return(ret);
5495}
5496
5497
5498static int
5499test_xmlCtxtReadMemory(void) {
5500    int ret = 0;
5501
5502    int mem_base;
5503    xmlDocPtr ret_val;
5504    xmlParserCtxtPtr ctxt; /* an XML parser context */
5505    int n_ctxt;
5506    const char * buffer; /* a pointer to a char array */
5507    int n_buffer;
5508    int size; /* the size of the array */
5509    int n_size;
5510    const char * URL; /* the base URL to use for the document */
5511    int n_URL;
5512    const char * encoding; /* the document encoding, or NULL */
5513    int n_encoding;
5514    int options; /* a combination of xmlParserOption */
5515    int n_options;
5516
5517    for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
5518    for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
5519    for (n_size = 0;n_size < gen_nb_int;n_size++) {
5520    for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
5521    for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
5522    for (n_options = 0;n_options < gen_nb_int;n_options++) {
5523        mem_base = xmlMemBlocks();
5524        ctxt = gen_xmlParserCtxtPtr(n_ctxt);
5525        buffer = gen_const_char_ptr(n_buffer);
5526        size = gen_int(n_size);
5527        URL = gen_filepath(n_URL);
5528        encoding = gen_const_char_ptr(n_encoding);
5529        options = gen_int(n_options);
5530
5531        ret_val = xmlCtxtReadMemory(ctxt, buffer, size, URL, encoding, options);
5532        desret_xmlDocPtr(ret_val);
5533        call_tests++;
5534        des_xmlParserCtxtPtr(n_ctxt, ctxt);
5535        des_const_char_ptr(n_buffer, buffer);
5536        des_int(n_size, size);
5537        des_filepath(n_URL, URL);
5538        des_const_char_ptr(n_encoding, encoding);
5539        des_int(n_options, options);
5540        xmlResetLastError();
5541        if (mem_base != xmlMemBlocks()) {
5542            printf("Leak of %d blocks found in xmlCtxtReadMemory",
5543	           xmlMemBlocks() - mem_base);
5544	    ret++;
5545            printf(" %d", n_ctxt);
5546            printf(" %d", n_buffer);
5547            printf(" %d", n_size);
5548            printf(" %d", n_URL);
5549            printf(" %d", n_encoding);
5550            printf(" %d", n_options);
5551            printf("\n");
5552        }
5553    }
5554    }
5555    }
5556    }
5557    }
5558    }
5559
5560    return(ret);
5561}
5562
5563
5564static int
5565test_xmlCtxtReset(void) {
5566    int ret = 0;
5567
5568    int mem_base;
5569    xmlParserCtxtPtr ctxt; /* an XML parser context */
5570    int n_ctxt;
5571
5572    for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
5573        mem_base = xmlMemBlocks();
5574        ctxt = gen_xmlParserCtxtPtr(n_ctxt);
5575
5576        xmlCtxtReset(ctxt);
5577        call_tests++;
5578        des_xmlParserCtxtPtr(n_ctxt, ctxt);
5579        xmlResetLastError();
5580        if (mem_base != xmlMemBlocks()) {
5581            printf("Leak of %d blocks found in xmlCtxtReset",
5582	           xmlMemBlocks() - mem_base);
5583	    ret++;
5584            printf(" %d", n_ctxt);
5585            printf("\n");
5586        }
5587    }
5588
5589    return(ret);
5590}
5591
5592
5593static int
5594test_xmlCtxtResetPush(void) {
5595    int ret = 0;
5596
5597    int mem_base;
5598    int ret_val;
5599    xmlParserCtxtPtr ctxt; /* an XML parser context */
5600    int n_ctxt;
5601    const char * chunk; /* a pointer to an array of chars */
5602    int n_chunk;
5603    int size; /* number of chars in the array */
5604    int n_size;
5605    const char * filename; /* an optional file name or URI */
5606    int n_filename;
5607    const char * encoding; /* the document encoding, or NULL */
5608    int n_encoding;
5609
5610    for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
5611    for (n_chunk = 0;n_chunk < gen_nb_const_char_ptr;n_chunk++) {
5612    for (n_size = 0;n_size < gen_nb_int;n_size++) {
5613    for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
5614    for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
5615        mem_base = xmlMemBlocks();
5616        ctxt = gen_xmlParserCtxtPtr(n_ctxt);
5617        chunk = gen_const_char_ptr(n_chunk);
5618        size = gen_int(n_size);
5619        filename = gen_filepath(n_filename);
5620        encoding = gen_const_char_ptr(n_encoding);
5621
5622        ret_val = xmlCtxtResetPush(ctxt, chunk, size, filename, encoding);
5623        desret_int(ret_val);
5624        call_tests++;
5625        des_xmlParserCtxtPtr(n_ctxt, ctxt);
5626        des_const_char_ptr(n_chunk, chunk);
5627        des_int(n_size, size);
5628        des_filepath(n_filename, filename);
5629        des_const_char_ptr(n_encoding, encoding);
5630        xmlResetLastError();
5631        if (mem_base != xmlMemBlocks()) {
5632            printf("Leak of %d blocks found in xmlCtxtResetPush",
5633	           xmlMemBlocks() - mem_base);
5634	    ret++;
5635            printf(" %d", n_ctxt);
5636            printf(" %d", n_chunk);
5637            printf(" %d", n_size);
5638            printf(" %d", n_filename);
5639            printf(" %d", n_encoding);
5640            printf("\n");
5641        }
5642    }
5643    }
5644    }
5645    }
5646    }
5647
5648    return(ret);
5649}
5650
5651
5652static int
5653test_xmlCtxtUseOptions(void) {
5654    int ret = 0;
5655
5656    int mem_base;
5657    int ret_val;
5658    xmlParserCtxtPtr ctxt; /* an XML parser context */
5659    int n_ctxt;
5660    int options; /* a combination of xmlParserOption */
5661    int n_options;
5662
5663    for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
5664    for (n_options = 0;n_options < gen_nb_int;n_options++) {
5665        mem_base = xmlMemBlocks();
5666        ctxt = gen_xmlParserCtxtPtr(n_ctxt);
5667        options = gen_int(n_options);
5668
5669        ret_val = xmlCtxtUseOptions(ctxt, options);
5670        desret_int(ret_val);
5671        call_tests++;
5672        des_xmlParserCtxtPtr(n_ctxt, ctxt);
5673        des_int(n_options, options);
5674        xmlResetLastError();
5675        if (mem_base != xmlMemBlocks()) {
5676            printf("Leak of %d blocks found in xmlCtxtUseOptions",
5677	           xmlMemBlocks() - mem_base);
5678	    ret++;
5679            printf(" %d", n_ctxt);
5680            printf(" %d", n_options);
5681            printf("\n");
5682        }
5683    }
5684    }
5685
5686    return(ret);
5687}
5688
5689
5690static int
5691test_xmlGetExternalEntityLoader(void) {
5692    int ret = 0;
5693
5694
5695    /* missing type support */
5696    return(ret);
5697}
5698
5699
5700static int
5701test_xmlGetFeature(void) {
5702    int ret = 0;
5703
5704    int mem_base;
5705    int ret_val;
5706    xmlParserCtxtPtr ctxt; /* an XML/HTML parser context */
5707    int n_ctxt;
5708    const char * name; /* the feature name */
5709    int n_name;
5710    void * result; /* location to store the result */
5711    int n_result;
5712
5713    for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
5714    for (n_name = 0;n_name < gen_nb_const_char_ptr;n_name++) {
5715    for (n_result = 0;n_result < gen_nb_void_ptr;n_result++) {
5716        mem_base = xmlMemBlocks();
5717        ctxt = gen_xmlParserCtxtPtr(n_ctxt);
5718        name = gen_const_char_ptr(n_name);
5719        result = gen_void_ptr(n_result);
5720
5721        ret_val = xmlGetFeature(ctxt, name, result);
5722        desret_int(ret_val);
5723        call_tests++;
5724        des_xmlParserCtxtPtr(n_ctxt, ctxt);
5725        des_const_char_ptr(n_name, name);
5726        des_void_ptr(n_result, result);
5727        xmlResetLastError();
5728        if (mem_base != xmlMemBlocks()) {
5729            printf("Leak of %d blocks found in xmlGetFeature",
5730	           xmlMemBlocks() - mem_base);
5731	    ret++;
5732            printf(" %d", n_ctxt);
5733            printf(" %d", n_name);
5734            printf(" %d", n_result);
5735            printf("\n");
5736        }
5737    }
5738    }
5739    }
5740
5741    return(ret);
5742}
5743
5744
5745static int
5746test_xmlGetFeaturesList(void) {
5747    int ret = 0;
5748
5749
5750    /* missing type support */
5751    return(ret);
5752}
5753
5754
5755static int
5756test_xmlIOParseDTD(void) {
5757    int ret = 0;
5758
5759
5760    /* missing type support */
5761    return(ret);
5762}
5763
5764
5765static int
5766test_xmlInitNodeInfoSeq(void) {
5767    int ret = 0;
5768
5769
5770    /* missing type support */
5771    return(ret);
5772}
5773
5774
5775static int
5776test_xmlInitParser(void) {
5777    int ret = 0;
5778
5779    int mem_base;
5780
5781        mem_base = xmlMemBlocks();
5782
5783        xmlInitParser();
5784        call_tests++;
5785        xmlResetLastError();
5786        if (mem_base != xmlMemBlocks()) {
5787            printf("Leak of %d blocks found in xmlInitParser",
5788	           xmlMemBlocks() - mem_base);
5789	    ret++;
5790            printf("\n");
5791        }
5792
5793    return(ret);
5794}
5795
5796
5797static int
5798test_xmlInitParserCtxt(void) {
5799    int ret = 0;
5800
5801    int mem_base;
5802    int ret_val;
5803    xmlParserCtxtPtr ctxt; /* an XML parser context */
5804    int n_ctxt;
5805
5806    for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
5807        mem_base = xmlMemBlocks();
5808        ctxt = gen_xmlParserCtxtPtr(n_ctxt);
5809
5810        ret_val = xmlInitParserCtxt(ctxt);
5811        desret_int(ret_val);
5812        call_tests++;
5813        des_xmlParserCtxtPtr(n_ctxt, ctxt);
5814        xmlResetLastError();
5815        if (mem_base != xmlMemBlocks()) {
5816            printf("Leak of %d blocks found in xmlInitParserCtxt",
5817	           xmlMemBlocks() - mem_base);
5818	    ret++;
5819            printf(" %d", n_ctxt);
5820            printf("\n");
5821        }
5822    }
5823
5824    return(ret);
5825}
5826
5827
5828static int
5829test_xmlKeepBlanksDefault(void) {
5830    int ret = 0;
5831
5832    int mem_base;
5833    int ret_val;
5834    int val; /* int 0 or 1 */
5835    int n_val;
5836
5837    for (n_val = 0;n_val < gen_nb_int;n_val++) {
5838        mem_base = xmlMemBlocks();
5839        val = gen_int(n_val);
5840
5841        ret_val = xmlKeepBlanksDefault(val);
5842        desret_int(ret_val);
5843        call_tests++;
5844        des_int(n_val, val);
5845        xmlResetLastError();
5846        if (mem_base != xmlMemBlocks()) {
5847            printf("Leak of %d blocks found in xmlKeepBlanksDefault",
5848	           xmlMemBlocks() - mem_base);
5849	    ret++;
5850            printf(" %d", n_val);
5851            printf("\n");
5852        }
5853    }
5854
5855    return(ret);
5856}
5857
5858
5859static int
5860test_xmlLineNumbersDefault(void) {
5861    int ret = 0;
5862
5863    int mem_base;
5864    int ret_val;
5865    int val; /* int 0 or 1 */
5866    int n_val;
5867
5868    for (n_val = 0;n_val < gen_nb_int;n_val++) {
5869        mem_base = xmlMemBlocks();
5870        val = gen_int(n_val);
5871
5872        ret_val = xmlLineNumbersDefault(val);
5873        desret_int(ret_val);
5874        call_tests++;
5875        des_int(n_val, val);
5876        xmlResetLastError();
5877        if (mem_base != xmlMemBlocks()) {
5878            printf("Leak of %d blocks found in xmlLineNumbersDefault",
5879	           xmlMemBlocks() - mem_base);
5880	    ret++;
5881            printf(" %d", n_val);
5882            printf("\n");
5883        }
5884    }
5885
5886    return(ret);
5887}
5888
5889
5890static int
5891test_xmlLoadExternalEntity(void) {
5892    int ret = 0;
5893
5894
5895    /* missing type support */
5896    return(ret);
5897}
5898
5899
5900static int
5901test_xmlNewIOInputStream(void) {
5902    int ret = 0;
5903
5904
5905    /* missing type support */
5906    return(ret);
5907}
5908
5909
5910static int
5911test_xmlNewParserCtxt(void) {
5912    int ret = 0;
5913
5914
5915    /* missing type support */
5916    return(ret);
5917}
5918
5919
5920static int
5921test_xmlParseBalancedChunkMemory(void) {
5922    int ret = 0;
5923
5924
5925    /* missing type support */
5926    return(ret);
5927}
5928
5929
5930static int
5931test_xmlParseBalancedChunkMemoryRecover(void) {
5932    int ret = 0;
5933
5934
5935    /* missing type support */
5936    return(ret);
5937}
5938
5939
5940static int
5941test_xmlParseChunk(void) {
5942    int ret = 0;
5943
5944#ifdef LIBXML_PUSH_ENABLED
5945    int mem_base;
5946    int ret_val;
5947    xmlParserCtxtPtr ctxt; /* an XML parser context */
5948    int n_ctxt;
5949    const char * chunk; /* an char array */
5950    int n_chunk;
5951    int size; /* the size in byte of the chunk */
5952    int n_size;
5953    int terminate; /* last chunk indicator */
5954    int n_terminate;
5955
5956    for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
5957    for (n_chunk = 0;n_chunk < gen_nb_const_char_ptr;n_chunk++) {
5958    for (n_size = 0;n_size < gen_nb_int;n_size++) {
5959    for (n_terminate = 0;n_terminate < gen_nb_int;n_terminate++) {
5960        mem_base = xmlMemBlocks();
5961        ctxt = gen_xmlParserCtxtPtr(n_ctxt);
5962        chunk = gen_const_char_ptr(n_chunk);
5963        size = gen_int(n_size);
5964        terminate = gen_int(n_terminate);
5965
5966        ret_val = xmlParseChunk(ctxt, chunk, size, terminate);
5967        desret_int(ret_val);
5968        call_tests++;
5969        des_xmlParserCtxtPtr(n_ctxt, ctxt);
5970        des_const_char_ptr(n_chunk, chunk);
5971        des_int(n_size, size);
5972        des_int(n_terminate, terminate);
5973        xmlResetLastError();
5974        if (mem_base != xmlMemBlocks()) {
5975            printf("Leak of %d blocks found in xmlParseChunk",
5976	           xmlMemBlocks() - mem_base);
5977	    ret++;
5978            printf(" %d", n_ctxt);
5979            printf(" %d", n_chunk);
5980            printf(" %d", n_size);
5981            printf(" %d", n_terminate);
5982            printf("\n");
5983        }
5984    }
5985    }
5986    }
5987    }
5988#endif
5989
5990    return(ret);
5991}
5992
5993
5994static int
5995test_xmlParseCtxtExternalEntity(void) {
5996    int ret = 0;
5997
5998
5999    /* missing type support */
6000    return(ret);
6001}
6002
6003
6004static int
6005test_xmlParseDTD(void) {
6006    int ret = 0;
6007
6008
6009    /* missing type support */
6010    return(ret);
6011}
6012
6013
6014static int
6015test_xmlParseDoc(void) {
6016    int ret = 0;
6017
6018    int mem_base;
6019    xmlDocPtr ret_val;
6020    xmlChar * cur; /* a pointer to an array of xmlChar */
6021    int n_cur;
6022
6023    for (n_cur = 0;n_cur < gen_nb_xmlChar_ptr;n_cur++) {
6024        mem_base = xmlMemBlocks();
6025        cur = gen_xmlChar_ptr(n_cur);
6026
6027        ret_val = xmlParseDoc(cur);
6028        desret_xmlDocPtr(ret_val);
6029        call_tests++;
6030        des_xmlChar_ptr(n_cur, cur);
6031        xmlResetLastError();
6032        if (mem_base != xmlMemBlocks()) {
6033            printf("Leak of %d blocks found in xmlParseDoc",
6034	           xmlMemBlocks() - mem_base);
6035	    ret++;
6036            printf(" %d", n_cur);
6037            printf("\n");
6038        }
6039    }
6040
6041    return(ret);
6042}
6043
6044
6045static int
6046test_xmlParseDocument(void) {
6047    int ret = 0;
6048
6049    int mem_base;
6050    int ret_val;
6051    xmlParserCtxtPtr ctxt; /* an XML parser context */
6052    int n_ctxt;
6053
6054    for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
6055        mem_base = xmlMemBlocks();
6056        ctxt = gen_xmlParserCtxtPtr(n_ctxt);
6057
6058        ret_val = xmlParseDocument(ctxt);
6059        desret_int(ret_val);
6060        call_tests++;
6061        des_xmlParserCtxtPtr(n_ctxt, ctxt);
6062        xmlResetLastError();
6063        if (mem_base != xmlMemBlocks()) {
6064            printf("Leak of %d blocks found in xmlParseDocument",
6065	           xmlMemBlocks() - mem_base);
6066	    ret++;
6067            printf(" %d", n_ctxt);
6068            printf("\n");
6069        }
6070    }
6071
6072    return(ret);
6073}
6074
6075
6076static int
6077test_xmlParseEntity(void) {
6078    int ret = 0;
6079
6080    int mem_base;
6081    xmlDocPtr ret_val;
6082    const char * filename; /* the filename */
6083    int n_filename;
6084
6085    for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
6086        mem_base = xmlMemBlocks();
6087        filename = gen_filepath(n_filename);
6088
6089        ret_val = xmlParseEntity(filename);
6090        desret_xmlDocPtr(ret_val);
6091        call_tests++;
6092        des_filepath(n_filename, filename);
6093        xmlResetLastError();
6094        if (mem_base != xmlMemBlocks()) {
6095            printf("Leak of %d blocks found in xmlParseEntity",
6096	           xmlMemBlocks() - mem_base);
6097	    ret++;
6098            printf(" %d", n_filename);
6099            printf("\n");
6100        }
6101    }
6102
6103    return(ret);
6104}
6105
6106
6107static int
6108test_xmlParseExtParsedEnt(void) {
6109    int ret = 0;
6110
6111    int mem_base;
6112    int ret_val;
6113    xmlParserCtxtPtr ctxt; /* an XML parser context */
6114    int n_ctxt;
6115
6116    for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
6117        mem_base = xmlMemBlocks();
6118        ctxt = gen_xmlParserCtxtPtr(n_ctxt);
6119
6120        ret_val = xmlParseExtParsedEnt(ctxt);
6121        desret_int(ret_val);
6122        call_tests++;
6123        des_xmlParserCtxtPtr(n_ctxt, ctxt);
6124        xmlResetLastError();
6125        if (mem_base != xmlMemBlocks()) {
6126            printf("Leak of %d blocks found in xmlParseExtParsedEnt",
6127	           xmlMemBlocks() - mem_base);
6128	    ret++;
6129            printf(" %d", n_ctxt);
6130            printf("\n");
6131        }
6132    }
6133
6134    return(ret);
6135}
6136
6137
6138static int
6139test_xmlParseExternalEntity(void) {
6140    int ret = 0;
6141
6142
6143    /* missing type support */
6144    return(ret);
6145}
6146
6147
6148static int
6149test_xmlParseFile(void) {
6150    int ret = 0;
6151
6152    int mem_base;
6153    xmlDocPtr ret_val;
6154    const char * filename; /* the filename */
6155    int n_filename;
6156
6157    for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
6158        mem_base = xmlMemBlocks();
6159        filename = gen_filepath(n_filename);
6160
6161        ret_val = xmlParseFile(filename);
6162        desret_xmlDocPtr(ret_val);
6163        call_tests++;
6164        des_filepath(n_filename, filename);
6165        xmlResetLastError();
6166        if (mem_base != xmlMemBlocks()) {
6167            printf("Leak of %d blocks found in xmlParseFile",
6168	           xmlMemBlocks() - mem_base);
6169	    ret++;
6170            printf(" %d", n_filename);
6171            printf("\n");
6172        }
6173    }
6174
6175    return(ret);
6176}
6177
6178
6179static int
6180test_xmlParseInNodeContext(void) {
6181    int ret = 0;
6182
6183
6184    /* missing type support */
6185    return(ret);
6186}
6187
6188
6189static int
6190test_xmlParseMemory(void) {
6191    int ret = 0;
6192
6193    int mem_base;
6194    xmlDocPtr ret_val;
6195    const char * buffer; /* an pointer to a char array */
6196    int n_buffer;
6197    int size; /* the size of the array */
6198    int n_size;
6199
6200    for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
6201    for (n_size = 0;n_size < gen_nb_int;n_size++) {
6202        mem_base = xmlMemBlocks();
6203        buffer = gen_const_char_ptr(n_buffer);
6204        size = gen_int(n_size);
6205
6206        ret_val = xmlParseMemory(buffer, size);
6207        desret_xmlDocPtr(ret_val);
6208        call_tests++;
6209        des_const_char_ptr(n_buffer, buffer);
6210        des_int(n_size, size);
6211        xmlResetLastError();
6212        if (mem_base != xmlMemBlocks()) {
6213            printf("Leak of %d blocks found in xmlParseMemory",
6214	           xmlMemBlocks() - mem_base);
6215	    ret++;
6216            printf(" %d", n_buffer);
6217            printf(" %d", n_size);
6218            printf("\n");
6219        }
6220    }
6221    }
6222
6223    return(ret);
6224}
6225
6226
6227static int
6228test_xmlParserAddNodeInfo(void) {
6229    int ret = 0;
6230
6231
6232    /* missing type support */
6233    return(ret);
6234}
6235
6236
6237static int
6238test_xmlParserFindNodeInfo(void) {
6239    int ret = 0;
6240
6241
6242    /* missing type support */
6243    return(ret);
6244}
6245
6246
6247static int
6248test_xmlParserFindNodeInfoIndex(void) {
6249    int ret = 0;
6250
6251
6252    /* missing type support */
6253    return(ret);
6254}
6255
6256
6257static int
6258test_xmlParserInputGrow(void) {
6259    int ret = 0;
6260
6261
6262    /* missing type support */
6263    return(ret);
6264}
6265
6266
6267static int
6268test_xmlParserInputRead(void) {
6269    int ret = 0;
6270
6271
6272    /* missing type support */
6273    return(ret);
6274}
6275
6276
6277static int
6278test_xmlPedanticParserDefault(void) {
6279    int ret = 0;
6280
6281    int mem_base;
6282    int ret_val;
6283    int val; /* int 0 or 1 */
6284    int n_val;
6285
6286    for (n_val = 0;n_val < gen_nb_int;n_val++) {
6287        mem_base = xmlMemBlocks();
6288        val = gen_int(n_val);
6289
6290        ret_val = xmlPedanticParserDefault(val);
6291        desret_int(ret_val);
6292        call_tests++;
6293        des_int(n_val, val);
6294        xmlResetLastError();
6295        if (mem_base != xmlMemBlocks()) {
6296            printf("Leak of %d blocks found in xmlPedanticParserDefault",
6297	           xmlMemBlocks() - mem_base);
6298	    ret++;
6299            printf(" %d", n_val);
6300            printf("\n");
6301        }
6302    }
6303
6304    return(ret);
6305}
6306
6307
6308static int
6309test_xmlReadDoc(void) {
6310    int ret = 0;
6311
6312    int mem_base;
6313    xmlDocPtr ret_val;
6314    const xmlChar * cur; /* a pointer to a zero terminated string */
6315    int n_cur;
6316    const char * URL; /* the base URL to use for the document */
6317    int n_URL;
6318    const char * encoding; /* the document encoding, or NULL */
6319    int n_encoding;
6320    int options; /* a combination of xmlParserOption */
6321    int n_options;
6322
6323    for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
6324    for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
6325    for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
6326    for (n_options = 0;n_options < gen_nb_int;n_options++) {
6327        mem_base = xmlMemBlocks();
6328        cur = gen_const_xmlChar_ptr(n_cur);
6329        URL = gen_filepath(n_URL);
6330        encoding = gen_const_char_ptr(n_encoding);
6331        options = gen_int(n_options);
6332
6333        ret_val = xmlReadDoc(cur, URL, encoding, options);
6334        desret_xmlDocPtr(ret_val);
6335        call_tests++;
6336        des_const_xmlChar_ptr(n_cur, cur);
6337        des_filepath(n_URL, URL);
6338        des_const_char_ptr(n_encoding, encoding);
6339        des_int(n_options, options);
6340        xmlResetLastError();
6341        if (mem_base != xmlMemBlocks()) {
6342            printf("Leak of %d blocks found in xmlReadDoc",
6343	           xmlMemBlocks() - mem_base);
6344	    ret++;
6345            printf(" %d", n_cur);
6346            printf(" %d", n_URL);
6347            printf(" %d", n_encoding);
6348            printf(" %d", n_options);
6349            printf("\n");
6350        }
6351    }
6352    }
6353    }
6354    }
6355
6356    return(ret);
6357}
6358
6359
6360static int
6361test_xmlReadFile(void) {
6362    int ret = 0;
6363
6364    int mem_base;
6365    xmlDocPtr ret_val;
6366    const char * filename; /* a file or URL */
6367    int n_filename;
6368    const char * encoding; /* the document encoding, or NULL */
6369    int n_encoding;
6370    int options; /* a combination of xmlParserOption */
6371    int n_options;
6372
6373    for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
6374    for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
6375    for (n_options = 0;n_options < gen_nb_int;n_options++) {
6376        mem_base = xmlMemBlocks();
6377        filename = gen_filepath(n_filename);
6378        encoding = gen_const_char_ptr(n_encoding);
6379        options = gen_int(n_options);
6380
6381        ret_val = xmlReadFile(filename, encoding, options);
6382        desret_xmlDocPtr(ret_val);
6383        call_tests++;
6384        des_filepath(n_filename, filename);
6385        des_const_char_ptr(n_encoding, encoding);
6386        des_int(n_options, options);
6387        xmlResetLastError();
6388        if (mem_base != xmlMemBlocks()) {
6389            printf("Leak of %d blocks found in xmlReadFile",
6390	           xmlMemBlocks() - mem_base);
6391	    ret++;
6392            printf(" %d", n_filename);
6393            printf(" %d", n_encoding);
6394            printf(" %d", n_options);
6395            printf("\n");
6396        }
6397    }
6398    }
6399    }
6400
6401    return(ret);
6402}
6403
6404
6405static int
6406test_xmlReadMemory(void) {
6407    int ret = 0;
6408
6409    int mem_base;
6410    xmlDocPtr ret_val;
6411    const char * buffer; /* a pointer to a char array */
6412    int n_buffer;
6413    int size; /* the size of the array */
6414    int n_size;
6415    const char * URL; /* the base URL to use for the document */
6416    int n_URL;
6417    const char * encoding; /* the document encoding, or NULL */
6418    int n_encoding;
6419    int options; /* a combination of xmlParserOption */
6420    int n_options;
6421
6422    for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
6423    for (n_size = 0;n_size < gen_nb_int;n_size++) {
6424    for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
6425    for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
6426    for (n_options = 0;n_options < gen_nb_int;n_options++) {
6427        mem_base = xmlMemBlocks();
6428        buffer = gen_const_char_ptr(n_buffer);
6429        size = gen_int(n_size);
6430        URL = gen_filepath(n_URL);
6431        encoding = gen_const_char_ptr(n_encoding);
6432        options = gen_int(n_options);
6433
6434        ret_val = xmlReadMemory(buffer, size, URL, encoding, options);
6435        desret_xmlDocPtr(ret_val);
6436        call_tests++;
6437        des_const_char_ptr(n_buffer, buffer);
6438        des_int(n_size, size);
6439        des_filepath(n_URL, URL);
6440        des_const_char_ptr(n_encoding, encoding);
6441        des_int(n_options, options);
6442        xmlResetLastError();
6443        if (mem_base != xmlMemBlocks()) {
6444            printf("Leak of %d blocks found in xmlReadMemory",
6445	           xmlMemBlocks() - mem_base);
6446	    ret++;
6447            printf(" %d", n_buffer);
6448            printf(" %d", n_size);
6449            printf(" %d", n_URL);
6450            printf(" %d", n_encoding);
6451            printf(" %d", n_options);
6452            printf("\n");
6453        }
6454    }
6455    }
6456    }
6457    }
6458    }
6459
6460    return(ret);
6461}
6462
6463
6464static int
6465test_xmlRecoverDoc(void) {
6466    int ret = 0;
6467
6468    int mem_base;
6469    xmlDocPtr ret_val;
6470    xmlChar * cur; /* a pointer to an array of xmlChar */
6471    int n_cur;
6472
6473    for (n_cur = 0;n_cur < gen_nb_xmlChar_ptr;n_cur++) {
6474        mem_base = xmlMemBlocks();
6475        cur = gen_xmlChar_ptr(n_cur);
6476
6477        ret_val = xmlRecoverDoc(cur);
6478        desret_xmlDocPtr(ret_val);
6479        call_tests++;
6480        des_xmlChar_ptr(n_cur, cur);
6481        xmlResetLastError();
6482        if (mem_base != xmlMemBlocks()) {
6483            printf("Leak of %d blocks found in xmlRecoverDoc",
6484	           xmlMemBlocks() - mem_base);
6485	    ret++;
6486            printf(" %d", n_cur);
6487            printf("\n");
6488        }
6489    }
6490
6491    return(ret);
6492}
6493
6494
6495static int
6496test_xmlRecoverFile(void) {
6497    int ret = 0;
6498
6499    int mem_base;
6500    xmlDocPtr ret_val;
6501    const char * filename; /* the filename */
6502    int n_filename;
6503
6504    for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
6505        mem_base = xmlMemBlocks();
6506        filename = gen_filepath(n_filename);
6507
6508        ret_val = xmlRecoverFile(filename);
6509        desret_xmlDocPtr(ret_val);
6510        call_tests++;
6511        des_filepath(n_filename, filename);
6512        xmlResetLastError();
6513        if (mem_base != xmlMemBlocks()) {
6514            printf("Leak of %d blocks found in xmlRecoverFile",
6515	           xmlMemBlocks() - mem_base);
6516	    ret++;
6517            printf(" %d", n_filename);
6518            printf("\n");
6519        }
6520    }
6521
6522    return(ret);
6523}
6524
6525
6526static int
6527test_xmlRecoverMemory(void) {
6528    int ret = 0;
6529
6530    int mem_base;
6531    xmlDocPtr ret_val;
6532    const char * buffer; /* an pointer to a char array */
6533    int n_buffer;
6534    int size; /* the size of the array */
6535    int n_size;
6536
6537    for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
6538    for (n_size = 0;n_size < gen_nb_int;n_size++) {
6539        mem_base = xmlMemBlocks();
6540        buffer = gen_const_char_ptr(n_buffer);
6541        size = gen_int(n_size);
6542
6543        ret_val = xmlRecoverMemory(buffer, size);
6544        desret_xmlDocPtr(ret_val);
6545        call_tests++;
6546        des_const_char_ptr(n_buffer, buffer);
6547        des_int(n_size, size);
6548        xmlResetLastError();
6549        if (mem_base != xmlMemBlocks()) {
6550            printf("Leak of %d blocks found in xmlRecoverMemory",
6551	           xmlMemBlocks() - mem_base);
6552	    ret++;
6553            printf(" %d", n_buffer);
6554            printf(" %d", n_size);
6555            printf("\n");
6556        }
6557    }
6558    }
6559
6560    return(ret);
6561}
6562
6563
6564static int
6565test_xmlSAXParseDTD(void) {
6566    int ret = 0;
6567
6568
6569    /* missing type support */
6570    return(ret);
6571}
6572
6573
6574static int
6575test_xmlSAXParseDoc(void) {
6576    int ret = 0;
6577
6578
6579    /* missing type support */
6580    return(ret);
6581}
6582
6583
6584static int
6585test_xmlSAXParseEntity(void) {
6586    int ret = 0;
6587
6588
6589    /* missing type support */
6590    return(ret);
6591}
6592
6593
6594static int
6595test_xmlSAXParseFile(void) {
6596    int ret = 0;
6597
6598
6599    /* missing type support */
6600    return(ret);
6601}
6602
6603
6604static int
6605test_xmlSAXParseFileWithData(void) {
6606    int ret = 0;
6607
6608
6609    /* missing type support */
6610    return(ret);
6611}
6612
6613
6614static int
6615test_xmlSAXParseMemory(void) {
6616    int ret = 0;
6617
6618
6619    /* missing type support */
6620    return(ret);
6621}
6622
6623
6624static int
6625test_xmlSAXParseMemoryWithData(void) {
6626    int ret = 0;
6627
6628
6629    /* missing type support */
6630    return(ret);
6631}
6632
6633
6634static int
6635test_xmlSAXUserParseFile(void) {
6636    int ret = 0;
6637
6638
6639    /* missing type support */
6640    return(ret);
6641}
6642
6643
6644static int
6645test_xmlSAXUserParseMemory(void) {
6646    int ret = 0;
6647
6648
6649    /* missing type support */
6650    return(ret);
6651}
6652
6653
6654static int
6655test_xmlSetExternalEntityLoader(void) {
6656    int ret = 0;
6657
6658
6659    /* missing type support */
6660    return(ret);
6661}
6662
6663
6664static int
6665test_xmlSetFeature(void) {
6666    int ret = 0;
6667
6668    int mem_base;
6669    int ret_val;
6670    xmlParserCtxtPtr ctxt; /* an XML/HTML parser context */
6671    int n_ctxt;
6672    const char * name; /* the feature name */
6673    int n_name;
6674    void * value; /* pointer to the location of the new value */
6675    int n_value;
6676
6677    for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
6678    for (n_name = 0;n_name < gen_nb_const_char_ptr;n_name++) {
6679    for (n_value = 0;n_value < gen_nb_void_ptr;n_value++) {
6680        mem_base = xmlMemBlocks();
6681        ctxt = gen_xmlParserCtxtPtr(n_ctxt);
6682        name = gen_const_char_ptr(n_name);
6683        value = gen_void_ptr(n_value);
6684
6685        ret_val = xmlSetFeature(ctxt, name, value);
6686        desret_int(ret_val);
6687        call_tests++;
6688        des_xmlParserCtxtPtr(n_ctxt, ctxt);
6689        des_const_char_ptr(n_name, name);
6690        des_void_ptr(n_value, value);
6691        xmlResetLastError();
6692        if (mem_base != xmlMemBlocks()) {
6693            printf("Leak of %d blocks found in xmlSetFeature",
6694	           xmlMemBlocks() - mem_base);
6695	    ret++;
6696            printf(" %d", n_ctxt);
6697            printf(" %d", n_name);
6698            printf(" %d", n_value);
6699            printf("\n");
6700        }
6701    }
6702    }
6703    }
6704
6705    return(ret);
6706}
6707
6708
6709static int
6710test_xmlSetupParserForBuffer(void) {
6711    int ret = 0;
6712
6713    int mem_base;
6714    xmlParserCtxtPtr ctxt; /* an XML parser context */
6715    int n_ctxt;
6716    const xmlChar * buffer; /* a xmlChar * buffer */
6717    int n_buffer;
6718    const char * filename; /* a file name */
6719    int n_filename;
6720
6721    for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
6722    for (n_buffer = 0;n_buffer < gen_nb_const_xmlChar_ptr;n_buffer++) {
6723    for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
6724        mem_base = xmlMemBlocks();
6725        ctxt = gen_xmlParserCtxtPtr(n_ctxt);
6726        buffer = gen_const_xmlChar_ptr(n_buffer);
6727        filename = gen_filepath(n_filename);
6728
6729        xmlSetupParserForBuffer(ctxt, buffer, filename);
6730        call_tests++;
6731        des_xmlParserCtxtPtr(n_ctxt, ctxt);
6732        des_const_xmlChar_ptr(n_buffer, buffer);
6733        des_filepath(n_filename, filename);
6734        xmlResetLastError();
6735        if (mem_base != xmlMemBlocks()) {
6736            printf("Leak of %d blocks found in xmlSetupParserForBuffer",
6737	           xmlMemBlocks() - mem_base);
6738	    ret++;
6739            printf(" %d", n_ctxt);
6740            printf(" %d", n_buffer);
6741            printf(" %d", n_filename);
6742            printf("\n");
6743        }
6744    }
6745    }
6746    }
6747
6748    return(ret);
6749}
6750
6751
6752static int
6753test_xmlStopParser(void) {
6754    int ret = 0;
6755
6756    int mem_base;
6757    xmlParserCtxtPtr ctxt; /* an XML parser context */
6758    int n_ctxt;
6759
6760    for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
6761        mem_base = xmlMemBlocks();
6762        ctxt = gen_xmlParserCtxtPtr(n_ctxt);
6763
6764        xmlStopParser(ctxt);
6765        call_tests++;
6766        des_xmlParserCtxtPtr(n_ctxt, ctxt);
6767        xmlResetLastError();
6768        if (mem_base != xmlMemBlocks()) {
6769            printf("Leak of %d blocks found in xmlStopParser",
6770	           xmlMemBlocks() - mem_base);
6771	    ret++;
6772            printf(" %d", n_ctxt);
6773            printf("\n");
6774        }
6775    }
6776
6777    return(ret);
6778}
6779
6780
6781static int
6782test_xmlSubstituteEntitiesDefault(void) {
6783    int ret = 0;
6784
6785    int mem_base;
6786    int ret_val;
6787    int val; /* int 0 or 1 */
6788    int n_val;
6789
6790    for (n_val = 0;n_val < gen_nb_int;n_val++) {
6791        mem_base = xmlMemBlocks();
6792        val = gen_int(n_val);
6793
6794        ret_val = xmlSubstituteEntitiesDefault(val);
6795        desret_int(ret_val);
6796        call_tests++;
6797        des_int(n_val, val);
6798        xmlResetLastError();
6799        if (mem_base != xmlMemBlocks()) {
6800            printf("Leak of %d blocks found in xmlSubstituteEntitiesDefault",
6801	           xmlMemBlocks() - mem_base);
6802	    ret++;
6803            printf(" %d", n_val);
6804            printf("\n");
6805        }
6806    }
6807
6808    return(ret);
6809}
6810
6811static int
6812test_parser(void) {
6813    int ret = 0;
6814
6815    printf("Testing parser ...\n");
6816    ret += test_xmlByteConsumed();
6817    ret += test_xmlClearNodeInfoSeq();
6818    ret += test_xmlClearParserCtxt();
6819    ret += test_xmlCreateDocParserCtxt();
6820    ret += test_xmlCreateIOParserCtxt();
6821    ret += test_xmlCreatePushParserCtxt();
6822    ret += test_xmlCtxtReadDoc();
6823    ret += test_xmlCtxtReadFile();
6824    ret += test_xmlCtxtReadMemory();
6825    ret += test_xmlCtxtReset();
6826    ret += test_xmlCtxtResetPush();
6827    ret += test_xmlCtxtUseOptions();
6828    ret += test_xmlGetExternalEntityLoader();
6829    ret += test_xmlGetFeature();
6830    ret += test_xmlGetFeaturesList();
6831    ret += test_xmlIOParseDTD();
6832    ret += test_xmlInitNodeInfoSeq();
6833    ret += test_xmlInitParser();
6834    ret += test_xmlInitParserCtxt();
6835    ret += test_xmlKeepBlanksDefault();
6836    ret += test_xmlLineNumbersDefault();
6837    ret += test_xmlLoadExternalEntity();
6838    ret += test_xmlNewIOInputStream();
6839    ret += test_xmlNewParserCtxt();
6840    ret += test_xmlParseBalancedChunkMemory();
6841    ret += test_xmlParseBalancedChunkMemoryRecover();
6842    ret += test_xmlParseChunk();
6843    ret += test_xmlParseCtxtExternalEntity();
6844    ret += test_xmlParseDTD();
6845    ret += test_xmlParseDoc();
6846    ret += test_xmlParseDocument();
6847    ret += test_xmlParseEntity();
6848    ret += test_xmlParseExtParsedEnt();
6849    ret += test_xmlParseExternalEntity();
6850    ret += test_xmlParseFile();
6851    ret += test_xmlParseInNodeContext();
6852    ret += test_xmlParseMemory();
6853    ret += test_xmlParserAddNodeInfo();
6854    ret += test_xmlParserFindNodeInfo();
6855    ret += test_xmlParserFindNodeInfoIndex();
6856    ret += test_xmlParserInputGrow();
6857    ret += test_xmlParserInputRead();
6858    ret += test_xmlPedanticParserDefault();
6859    ret += test_xmlReadDoc();
6860    ret += test_xmlReadFile();
6861    ret += test_xmlReadMemory();
6862    ret += test_xmlRecoverDoc();
6863    ret += test_xmlRecoverFile();
6864    ret += test_xmlRecoverMemory();
6865    ret += test_xmlSAXParseDTD();
6866    ret += test_xmlSAXParseDoc();
6867    ret += test_xmlSAXParseEntity();
6868    ret += test_xmlSAXParseFile();
6869    ret += test_xmlSAXParseFileWithData();
6870    ret += test_xmlSAXParseMemory();
6871    ret += test_xmlSAXParseMemoryWithData();
6872    ret += test_xmlSAXUserParseFile();
6873    ret += test_xmlSAXUserParseMemory();
6874    ret += test_xmlSetExternalEntityLoader();
6875    ret += test_xmlSetFeature();
6876    ret += test_xmlSetupParserForBuffer();
6877    ret += test_xmlStopParser();
6878    ret += test_xmlSubstituteEntitiesDefault();
6879
6880    if (ret != 0)
6881	printf("Module parser: %d errors\n", ret);
6882    return(ret);
6883}
6884
6885static int
6886test_xmlPatternMatch(void) {
6887    int ret = 0;
6888
6889
6890    /* missing type support */
6891    return(ret);
6892}
6893
6894
6895static int
6896test_xmlPatterncompile(void) {
6897    int ret = 0;
6898
6899
6900    /* missing type support */
6901    return(ret);
6902}
6903
6904static int
6905test_pattern(void) {
6906    int ret = 0;
6907
6908    printf("Testing pattern ...\n");
6909    ret += test_xmlPatternMatch();
6910    ret += test_xmlPatterncompile();
6911
6912    if (ret != 0)
6913	printf("Module pattern: %d errors\n", ret);
6914    return(ret);
6915}
6916
6917static int
6918test_xmlRelaxNGDump(void) {
6919    int ret = 0;
6920
6921
6922    /* missing type support */
6923    return(ret);
6924}
6925
6926
6927static int
6928test_xmlRelaxNGDumpTree(void) {
6929    int ret = 0;
6930
6931
6932    /* missing type support */
6933    return(ret);
6934}
6935
6936
6937static int
6938test_xmlRelaxNGGetParserErrors(void) {
6939    int ret = 0;
6940
6941
6942    /* missing type support */
6943    return(ret);
6944}
6945
6946
6947static int
6948test_xmlRelaxNGGetValidErrors(void) {
6949    int ret = 0;
6950
6951
6952    /* missing type support */
6953    return(ret);
6954}
6955
6956
6957static int
6958test_xmlRelaxNGNewDocParserCtxt(void) {
6959    int ret = 0;
6960
6961
6962    /* missing type support */
6963    return(ret);
6964}
6965
6966
6967static int
6968test_xmlRelaxNGNewMemParserCtxt(void) {
6969    int ret = 0;
6970
6971
6972    /* missing type support */
6973    return(ret);
6974}
6975
6976
6977static int
6978test_xmlRelaxNGNewParserCtxt(void) {
6979    int ret = 0;
6980
6981
6982    /* missing type support */
6983    return(ret);
6984}
6985
6986
6987static int
6988test_xmlRelaxNGNewValidCtxt(void) {
6989    int ret = 0;
6990
6991
6992    /* missing type support */
6993    return(ret);
6994}
6995
6996
6997static int
6998test_xmlRelaxNGParse(void) {
6999    int ret = 0;
7000
7001
7002    /* missing type support */
7003    return(ret);
7004}
7005
7006
7007static int
7008test_xmlRelaxNGSetParserErrors(void) {
7009    int ret = 0;
7010
7011
7012    /* missing type support */
7013    return(ret);
7014}
7015
7016
7017static int
7018test_xmlRelaxNGSetValidErrors(void) {
7019    int ret = 0;
7020
7021
7022    /* missing type support */
7023    return(ret);
7024}
7025
7026
7027static int
7028test_xmlRelaxNGValidateDoc(void) {
7029    int ret = 0;
7030
7031
7032    /* missing type support */
7033    return(ret);
7034}
7035
7036
7037static int
7038test_xmlRelaxNGValidateFullElement(void) {
7039    int ret = 0;
7040
7041
7042    /* missing type support */
7043    return(ret);
7044}
7045
7046
7047static int
7048test_xmlRelaxNGValidatePopElement(void) {
7049    int ret = 0;
7050
7051
7052    /* missing type support */
7053    return(ret);
7054}
7055
7056
7057static int
7058test_xmlRelaxNGValidatePushCData(void) {
7059    int ret = 0;
7060
7061
7062    /* missing type support */
7063    return(ret);
7064}
7065
7066
7067static int
7068test_xmlRelaxNGValidatePushElement(void) {
7069    int ret = 0;
7070
7071
7072    /* missing type support */
7073    return(ret);
7074}
7075
7076
7077static int
7078test_xmlRelaxParserSetFlag(void) {
7079    int ret = 0;
7080
7081
7082    /* missing type support */
7083    return(ret);
7084}
7085
7086static int
7087test_relaxng(void) {
7088    int ret = 0;
7089
7090    printf("Testing relaxng ...\n");
7091    ret += test_xmlRelaxNGDump();
7092    ret += test_xmlRelaxNGDumpTree();
7093    ret += test_xmlRelaxNGGetParserErrors();
7094    ret += test_xmlRelaxNGGetValidErrors();
7095    ret += test_xmlRelaxNGNewDocParserCtxt();
7096    ret += test_xmlRelaxNGNewMemParserCtxt();
7097    ret += test_xmlRelaxNGNewParserCtxt();
7098    ret += test_xmlRelaxNGNewValidCtxt();
7099    ret += test_xmlRelaxNGParse();
7100    ret += test_xmlRelaxNGSetParserErrors();
7101    ret += test_xmlRelaxNGSetValidErrors();
7102    ret += test_xmlRelaxNGValidateDoc();
7103    ret += test_xmlRelaxNGValidateFullElement();
7104    ret += test_xmlRelaxNGValidatePopElement();
7105    ret += test_xmlRelaxNGValidatePushCData();
7106    ret += test_xmlRelaxNGValidatePushElement();
7107    ret += test_xmlRelaxParserSetFlag();
7108
7109    if (ret != 0)
7110	printf("Module relaxng: %d errors\n", ret);
7111    return(ret);
7112}
7113static int
7114test_schemasInternals(void) {
7115    int ret = 0;
7116
7117    printf("Testing schemasInternals ...\n");
7118
7119    if (ret != 0)
7120	printf("Module schemasInternals: %d errors\n", ret);
7121    return(ret);
7122}
7123
7124static int
7125test_xmlAddChild(void) {
7126    int ret = 0;
7127
7128    int mem_base;
7129    xmlNodePtr ret_val;
7130    xmlNodePtr parent; /* the parent node */
7131    int n_parent;
7132    xmlNodePtr cur; /* the child node */
7133    int n_cur;
7134
7135    for (n_parent = 0;n_parent < gen_nb_xmlNodePtr;n_parent++) {
7136    for (n_cur = 0;n_cur < gen_nb_xmlNodePtr_in;n_cur++) {
7137        mem_base = xmlMemBlocks();
7138        parent = gen_xmlNodePtr(n_parent);
7139        cur = gen_xmlNodePtr_in(n_cur);
7140
7141        ret_val = xmlAddChild(parent, cur);
7142        if (ret_val == NULL) { xmlFreeNode(cur) ; cur = NULL ; }
7143        desret_xmlNodePtr(ret_val);
7144        call_tests++;
7145        des_xmlNodePtr(n_parent, parent);
7146        des_xmlNodePtr_in(n_cur, cur);
7147        xmlResetLastError();
7148        if (mem_base != xmlMemBlocks()) {
7149            printf("Leak of %d blocks found in xmlAddChild",
7150	           xmlMemBlocks() - mem_base);
7151	    ret++;
7152            printf(" %d", n_parent);
7153            printf(" %d", n_cur);
7154            printf("\n");
7155        }
7156    }
7157    }
7158
7159    return(ret);
7160}
7161
7162
7163static int
7164test_xmlAddChildList(void) {
7165    int ret = 0;
7166
7167    int mem_base;
7168    xmlNodePtr ret_val;
7169    xmlNodePtr parent; /* the parent node */
7170    int n_parent;
7171    xmlNodePtr cur; /* the first node in the list */
7172    int n_cur;
7173
7174    for (n_parent = 0;n_parent < gen_nb_xmlNodePtr;n_parent++) {
7175    for (n_cur = 0;n_cur < gen_nb_xmlNodePtr_in;n_cur++) {
7176        mem_base = xmlMemBlocks();
7177        parent = gen_xmlNodePtr(n_parent);
7178        cur = gen_xmlNodePtr_in(n_cur);
7179
7180        ret_val = xmlAddChildList(parent, cur);
7181        if (ret_val == NULL) { xmlFreeNodeList(cur) ; cur = NULL ; }
7182        desret_xmlNodePtr(ret_val);
7183        call_tests++;
7184        des_xmlNodePtr(n_parent, parent);
7185        des_xmlNodePtr_in(n_cur, cur);
7186        xmlResetLastError();
7187        if (mem_base != xmlMemBlocks()) {
7188            printf("Leak of %d blocks found in xmlAddChildList",
7189	           xmlMemBlocks() - mem_base);
7190	    ret++;
7191            printf(" %d", n_parent);
7192            printf(" %d", n_cur);
7193            printf("\n");
7194        }
7195    }
7196    }
7197
7198    return(ret);
7199}
7200
7201
7202static int
7203test_xmlAddNextSibling(void) {
7204    int ret = 0;
7205
7206    int mem_base;
7207    xmlNodePtr ret_val;
7208    xmlNodePtr cur; /* the child node */
7209    int n_cur;
7210    xmlNodePtr elem; /* the new node */
7211    int n_elem;
7212
7213    for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
7214    for (n_elem = 0;n_elem < gen_nb_xmlNodePtr_in;n_elem++) {
7215        mem_base = xmlMemBlocks();
7216        cur = gen_xmlNodePtr(n_cur);
7217        elem = gen_xmlNodePtr_in(n_elem);
7218
7219        ret_val = xmlAddNextSibling(cur, elem);
7220        if (ret_val == NULL) { xmlFreeNode(elem) ; elem = NULL ; }
7221        desret_xmlNodePtr(ret_val);
7222        call_tests++;
7223        des_xmlNodePtr(n_cur, cur);
7224        des_xmlNodePtr_in(n_elem, elem);
7225        xmlResetLastError();
7226        if (mem_base != xmlMemBlocks()) {
7227            printf("Leak of %d blocks found in xmlAddNextSibling",
7228	           xmlMemBlocks() - mem_base);
7229	    ret++;
7230            printf(" %d", n_cur);
7231            printf(" %d", n_elem);
7232            printf("\n");
7233        }
7234    }
7235    }
7236
7237    return(ret);
7238}
7239
7240
7241static int
7242test_xmlAddPrevSibling(void) {
7243    int ret = 0;
7244
7245#ifdef LIBXML_TREE_ENABLED
7246    int mem_base;
7247    xmlNodePtr ret_val;
7248    xmlNodePtr cur; /* the child node */
7249    int n_cur;
7250    xmlNodePtr elem; /* the new node */
7251    int n_elem;
7252
7253    for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
7254    for (n_elem = 0;n_elem < gen_nb_xmlNodePtr_in;n_elem++) {
7255        mem_base = xmlMemBlocks();
7256        cur = gen_xmlNodePtr(n_cur);
7257        elem = gen_xmlNodePtr_in(n_elem);
7258
7259        ret_val = xmlAddPrevSibling(cur, elem);
7260        if (ret_val == NULL) { xmlFreeNode(elem) ; elem = NULL ; }
7261        desret_xmlNodePtr(ret_val);
7262        call_tests++;
7263        des_xmlNodePtr(n_cur, cur);
7264        des_xmlNodePtr_in(n_elem, elem);
7265        xmlResetLastError();
7266        if (mem_base != xmlMemBlocks()) {
7267            printf("Leak of %d blocks found in xmlAddPrevSibling",
7268	           xmlMemBlocks() - mem_base);
7269	    ret++;
7270            printf(" %d", n_cur);
7271            printf(" %d", n_elem);
7272            printf("\n");
7273        }
7274    }
7275    }
7276#endif
7277
7278    return(ret);
7279}
7280
7281
7282static int
7283test_xmlAddSibling(void) {
7284    int ret = 0;
7285
7286    int mem_base;
7287    xmlNodePtr ret_val;
7288    xmlNodePtr cur; /* the child node */
7289    int n_cur;
7290    xmlNodePtr elem; /* the new node */
7291    int n_elem;
7292
7293    for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
7294    for (n_elem = 0;n_elem < gen_nb_xmlNodePtr_in;n_elem++) {
7295        mem_base = xmlMemBlocks();
7296        cur = gen_xmlNodePtr(n_cur);
7297        elem = gen_xmlNodePtr_in(n_elem);
7298
7299        ret_val = xmlAddSibling(cur, elem);
7300        if (ret_val == NULL) { xmlFreeNode(elem) ; elem = NULL ; }
7301        desret_xmlNodePtr(ret_val);
7302        call_tests++;
7303        des_xmlNodePtr(n_cur, cur);
7304        des_xmlNodePtr_in(n_elem, elem);
7305        xmlResetLastError();
7306        if (mem_base != xmlMemBlocks()) {
7307            printf("Leak of %d blocks found in xmlAddSibling",
7308	           xmlMemBlocks() - mem_base);
7309	    ret++;
7310            printf(" %d", n_cur);
7311            printf(" %d", n_elem);
7312            printf("\n");
7313        }
7314    }
7315    }
7316
7317    return(ret);
7318}
7319
7320
7321static int
7322test_xmlAttrSerializeTxtContent(void) {
7323    int ret = 0;
7324
7325
7326    /* missing type support */
7327    return(ret);
7328}
7329
7330
7331static int
7332test_xmlBufferAdd(void) {
7333    int ret = 0;
7334
7335    int mem_base;
7336    int ret_val;
7337    xmlBufferPtr buf; /* the buffer to dump */
7338    int n_buf;
7339    const xmlChar * str; /* the #xmlChar string */
7340    int n_str;
7341    int len; /* the number of #xmlChar to add */
7342    int n_len;
7343
7344    for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
7345    for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
7346    for (n_len = 0;n_len < gen_nb_int;n_len++) {
7347        mem_base = xmlMemBlocks();
7348        buf = gen_xmlBufferPtr(n_buf);
7349        str = gen_const_xmlChar_ptr(n_str);
7350        len = gen_int(n_len);
7351
7352        ret_val = xmlBufferAdd(buf, str, len);
7353        desret_int(ret_val);
7354        call_tests++;
7355        des_xmlBufferPtr(n_buf, buf);
7356        des_const_xmlChar_ptr(n_str, str);
7357        des_int(n_len, len);
7358        xmlResetLastError();
7359        if (mem_base != xmlMemBlocks()) {
7360            printf("Leak of %d blocks found in xmlBufferAdd",
7361	           xmlMemBlocks() - mem_base);
7362	    ret++;
7363            printf(" %d", n_buf);
7364            printf(" %d", n_str);
7365            printf(" %d", n_len);
7366            printf("\n");
7367        }
7368    }
7369    }
7370    }
7371
7372    return(ret);
7373}
7374
7375
7376static int
7377test_xmlBufferAddHead(void) {
7378    int ret = 0;
7379
7380    int mem_base;
7381    int ret_val;
7382    xmlBufferPtr buf; /* the buffer */
7383    int n_buf;
7384    const xmlChar * str; /* the #xmlChar string */
7385    int n_str;
7386    int len; /* the number of #xmlChar to add */
7387    int n_len;
7388
7389    for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
7390    for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
7391    for (n_len = 0;n_len < gen_nb_int;n_len++) {
7392        mem_base = xmlMemBlocks();
7393        buf = gen_xmlBufferPtr(n_buf);
7394        str = gen_const_xmlChar_ptr(n_str);
7395        len = gen_int(n_len);
7396
7397        ret_val = xmlBufferAddHead(buf, str, len);
7398        desret_int(ret_val);
7399        call_tests++;
7400        des_xmlBufferPtr(n_buf, buf);
7401        des_const_xmlChar_ptr(n_str, str);
7402        des_int(n_len, len);
7403        xmlResetLastError();
7404        if (mem_base != xmlMemBlocks()) {
7405            printf("Leak of %d blocks found in xmlBufferAddHead",
7406	           xmlMemBlocks() - mem_base);
7407	    ret++;
7408            printf(" %d", n_buf);
7409            printf(" %d", n_str);
7410            printf(" %d", n_len);
7411            printf("\n");
7412        }
7413    }
7414    }
7415    }
7416
7417    return(ret);
7418}
7419
7420
7421static int
7422test_xmlBufferCCat(void) {
7423    int ret = 0;
7424
7425    int mem_base;
7426    int ret_val;
7427    xmlBufferPtr buf; /* the buffer to dump */
7428    int n_buf;
7429    const char * str; /* the C char string */
7430    int n_str;
7431
7432    for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
7433    for (n_str = 0;n_str < gen_nb_const_char_ptr;n_str++) {
7434        mem_base = xmlMemBlocks();
7435        buf = gen_xmlBufferPtr(n_buf);
7436        str = gen_const_char_ptr(n_str);
7437
7438        ret_val = xmlBufferCCat(buf, str);
7439        desret_int(ret_val);
7440        call_tests++;
7441        des_xmlBufferPtr(n_buf, buf);
7442        des_const_char_ptr(n_str, str);
7443        xmlResetLastError();
7444        if (mem_base != xmlMemBlocks()) {
7445            printf("Leak of %d blocks found in xmlBufferCCat",
7446	           xmlMemBlocks() - mem_base);
7447	    ret++;
7448            printf(" %d", n_buf);
7449            printf(" %d", n_str);
7450            printf("\n");
7451        }
7452    }
7453    }
7454
7455    return(ret);
7456}
7457
7458
7459static int
7460test_xmlBufferCat(void) {
7461    int ret = 0;
7462
7463    int mem_base;
7464    int ret_val;
7465    xmlBufferPtr buf; /* the buffer to add to */
7466    int n_buf;
7467    const xmlChar * str; /* the #xmlChar string */
7468    int n_str;
7469
7470    for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
7471    for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
7472        mem_base = xmlMemBlocks();
7473        buf = gen_xmlBufferPtr(n_buf);
7474        str = gen_const_xmlChar_ptr(n_str);
7475
7476        ret_val = xmlBufferCat(buf, str);
7477        desret_int(ret_val);
7478        call_tests++;
7479        des_xmlBufferPtr(n_buf, buf);
7480        des_const_xmlChar_ptr(n_str, str);
7481        xmlResetLastError();
7482        if (mem_base != xmlMemBlocks()) {
7483            printf("Leak of %d blocks found in xmlBufferCat",
7484	           xmlMemBlocks() - mem_base);
7485	    ret++;
7486            printf(" %d", n_buf);
7487            printf(" %d", n_str);
7488            printf("\n");
7489        }
7490    }
7491    }
7492
7493    return(ret);
7494}
7495
7496
7497static int
7498test_xmlBufferContent(void) {
7499    int ret = 0;
7500
7501
7502    /* missing type support */
7503    return(ret);
7504}
7505
7506
7507static int
7508test_xmlBufferCreate(void) {
7509    int ret = 0;
7510
7511
7512    /* missing type support */
7513    return(ret);
7514}
7515
7516
7517static int
7518test_xmlBufferCreateSize(void) {
7519    int ret = 0;
7520
7521
7522    /* missing type support */
7523    return(ret);
7524}
7525
7526
7527static int
7528test_xmlBufferCreateStatic(void) {
7529    int ret = 0;
7530
7531
7532    /* missing type support */
7533    return(ret);
7534}
7535
7536
7537static int
7538test_xmlBufferDump(void) {
7539    int ret = 0;
7540
7541
7542    /* missing type support */
7543    return(ret);
7544}
7545
7546
7547static int
7548test_xmlBufferEmpty(void) {
7549    int ret = 0;
7550
7551    int mem_base;
7552    xmlBufferPtr buf; /* the buffer */
7553    int n_buf;
7554
7555    for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
7556        mem_base = xmlMemBlocks();
7557        buf = gen_xmlBufferPtr(n_buf);
7558
7559        xmlBufferEmpty(buf);
7560        call_tests++;
7561        des_xmlBufferPtr(n_buf, buf);
7562        xmlResetLastError();
7563        if (mem_base != xmlMemBlocks()) {
7564            printf("Leak of %d blocks found in xmlBufferEmpty",
7565	           xmlMemBlocks() - mem_base);
7566	    ret++;
7567            printf(" %d", n_buf);
7568            printf("\n");
7569        }
7570    }
7571
7572    return(ret);
7573}
7574
7575
7576static int
7577test_xmlBufferGrow(void) {
7578    int ret = 0;
7579
7580
7581    /* missing type support */
7582    return(ret);
7583}
7584
7585
7586static int
7587test_xmlBufferLength(void) {
7588    int ret = 0;
7589
7590
7591    /* missing type support */
7592    return(ret);
7593}
7594
7595
7596static int
7597test_xmlBufferResize(void) {
7598    int ret = 0;
7599
7600
7601    /* missing type support */
7602    return(ret);
7603}
7604
7605
7606static int
7607test_xmlBufferSetAllocationScheme(void) {
7608    int ret = 0;
7609
7610
7611    /* missing type support */
7612    return(ret);
7613}
7614
7615
7616static int
7617test_xmlBufferShrink(void) {
7618    int ret = 0;
7619
7620
7621    /* missing type support */
7622    return(ret);
7623}
7624
7625
7626static int
7627test_xmlBufferWriteCHAR(void) {
7628    int ret = 0;
7629
7630    int mem_base;
7631    xmlBufferPtr buf; /* the XML buffer */
7632    int n_buf;
7633    const xmlChar * string; /* the string to add */
7634    int n_string;
7635
7636    for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
7637    for (n_string = 0;n_string < gen_nb_const_xmlChar_ptr;n_string++) {
7638        mem_base = xmlMemBlocks();
7639        buf = gen_xmlBufferPtr(n_buf);
7640        string = gen_const_xmlChar_ptr(n_string);
7641
7642        xmlBufferWriteCHAR(buf, string);
7643        call_tests++;
7644        des_xmlBufferPtr(n_buf, buf);
7645        des_const_xmlChar_ptr(n_string, string);
7646        xmlResetLastError();
7647        if (mem_base != xmlMemBlocks()) {
7648            printf("Leak of %d blocks found in xmlBufferWriteCHAR",
7649	           xmlMemBlocks() - mem_base);
7650	    ret++;
7651            printf(" %d", n_buf);
7652            printf(" %d", n_string);
7653            printf("\n");
7654        }
7655    }
7656    }
7657
7658    return(ret);
7659}
7660
7661
7662static int
7663test_xmlBufferWriteChar(void) {
7664    int ret = 0;
7665
7666    int mem_base;
7667    xmlBufferPtr buf; /* the XML buffer output */
7668    int n_buf;
7669    const char * string; /* the string to add */
7670    int n_string;
7671
7672    for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
7673    for (n_string = 0;n_string < gen_nb_const_char_ptr;n_string++) {
7674        mem_base = xmlMemBlocks();
7675        buf = gen_xmlBufferPtr(n_buf);
7676        string = gen_const_char_ptr(n_string);
7677
7678        xmlBufferWriteChar(buf, string);
7679        call_tests++;
7680        des_xmlBufferPtr(n_buf, buf);
7681        des_const_char_ptr(n_string, string);
7682        xmlResetLastError();
7683        if (mem_base != xmlMemBlocks()) {
7684            printf("Leak of %d blocks found in xmlBufferWriteChar",
7685	           xmlMemBlocks() - mem_base);
7686	    ret++;
7687            printf(" %d", n_buf);
7688            printf(" %d", n_string);
7689            printf("\n");
7690        }
7691    }
7692    }
7693
7694    return(ret);
7695}
7696
7697
7698static int
7699test_xmlBufferWriteQuotedString(void) {
7700    int ret = 0;
7701
7702    int mem_base;
7703    xmlBufferPtr buf; /* the XML buffer output */
7704    int n_buf;
7705    const xmlChar * string; /* the string to add */
7706    int n_string;
7707
7708    for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
7709    for (n_string = 0;n_string < gen_nb_const_xmlChar_ptr;n_string++) {
7710        mem_base = xmlMemBlocks();
7711        buf = gen_xmlBufferPtr(n_buf);
7712        string = gen_const_xmlChar_ptr(n_string);
7713
7714        xmlBufferWriteQuotedString(buf, string);
7715        call_tests++;
7716        des_xmlBufferPtr(n_buf, buf);
7717        des_const_xmlChar_ptr(n_string, string);
7718        xmlResetLastError();
7719        if (mem_base != xmlMemBlocks()) {
7720            printf("Leak of %d blocks found in xmlBufferWriteQuotedString",
7721	           xmlMemBlocks() - mem_base);
7722	    ret++;
7723            printf(" %d", n_buf);
7724            printf(" %d", n_string);
7725            printf("\n");
7726        }
7727    }
7728    }
7729
7730    return(ret);
7731}
7732
7733
7734static int
7735test_xmlBuildQName(void) {
7736    int ret = 0;
7737
7738    int mem_base;
7739    xmlChar * ret_val;
7740    const xmlChar * ncname; /* the Name */
7741    int n_ncname;
7742    const xmlChar * prefix; /* the prefix */
7743    int n_prefix;
7744    xmlChar * memory; /* preallocated memory */
7745    int n_memory;
7746    int len; /* preallocated memory length */
7747    int n_len;
7748
7749    for (n_ncname = 0;n_ncname < gen_nb_const_xmlChar_ptr;n_ncname++) {
7750    for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
7751    for (n_memory = 0;n_memory < gen_nb_xmlChar_ptr;n_memory++) {
7752    for (n_len = 0;n_len < gen_nb_int;n_len++) {
7753        mem_base = xmlMemBlocks();
7754        ncname = gen_const_xmlChar_ptr(n_ncname);
7755        prefix = gen_const_xmlChar_ptr(n_prefix);
7756        memory = gen_xmlChar_ptr(n_memory);
7757        len = gen_int(n_len);
7758
7759        ret_val = xmlBuildQName(ncname, prefix, memory, len);
7760        if ((ret_val != NULL) && (ret_val != ncname) &&
7761              (ret_val != prefix) && (ret_val != memory))
7762              xmlFree(ret_val);
7763	  ret_val = NULL;
7764        desret_xmlChar_ptr(ret_val);
7765        call_tests++;
7766        des_const_xmlChar_ptr(n_ncname, ncname);
7767        des_const_xmlChar_ptr(n_prefix, prefix);
7768        des_xmlChar_ptr(n_memory, memory);
7769        des_int(n_len, len);
7770        xmlResetLastError();
7771        if (mem_base != xmlMemBlocks()) {
7772            printf("Leak of %d blocks found in xmlBuildQName",
7773	           xmlMemBlocks() - mem_base);
7774	    ret++;
7775            printf(" %d", n_ncname);
7776            printf(" %d", n_prefix);
7777            printf(" %d", n_memory);
7778            printf(" %d", n_len);
7779            printf("\n");
7780        }
7781    }
7782    }
7783    }
7784    }
7785
7786    return(ret);
7787}
7788
7789
7790static int
7791test_xmlCopyDoc(void) {
7792    int ret = 0;
7793
7794#ifdef LIBXML_TREE_ENABLED
7795    int mem_base;
7796    xmlDocPtr ret_val;
7797    xmlDocPtr doc; /* the document */
7798    int n_doc;
7799    int recursive; /* if not zero do a recursive copy. */
7800    int n_recursive;
7801
7802    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
7803    for (n_recursive = 0;n_recursive < gen_nb_int;n_recursive++) {
7804        mem_base = xmlMemBlocks();
7805        doc = gen_xmlDocPtr(n_doc);
7806        recursive = gen_int(n_recursive);
7807
7808        ret_val = xmlCopyDoc(doc, recursive);
7809        desret_xmlDocPtr(ret_val);
7810        call_tests++;
7811        des_xmlDocPtr(n_doc, doc);
7812        des_int(n_recursive, recursive);
7813        xmlResetLastError();
7814        if (mem_base != xmlMemBlocks()) {
7815            printf("Leak of %d blocks found in xmlCopyDoc",
7816	           xmlMemBlocks() - mem_base);
7817	    ret++;
7818            printf(" %d", n_doc);
7819            printf(" %d", n_recursive);
7820            printf("\n");
7821        }
7822    }
7823    }
7824#endif
7825
7826    return(ret);
7827}
7828
7829
7830static int
7831test_xmlCopyDtd(void) {
7832    int ret = 0;
7833
7834
7835    /* missing type support */
7836    return(ret);
7837}
7838
7839
7840static int
7841test_xmlCopyNamespace(void) {
7842    int ret = 0;
7843
7844
7845    /* missing type support */
7846    return(ret);
7847}
7848
7849
7850static int
7851test_xmlCopyNamespaceList(void) {
7852    int ret = 0;
7853
7854
7855    /* missing type support */
7856    return(ret);
7857}
7858
7859
7860static int
7861test_xmlCopyNode(void) {
7862    int ret = 0;
7863
7864
7865    /* missing type support */
7866    return(ret);
7867}
7868
7869
7870static int
7871test_xmlCopyNodeList(void) {
7872    int ret = 0;
7873
7874
7875    /* missing type support */
7876    return(ret);
7877}
7878
7879
7880static int
7881test_xmlCopyProp(void) {
7882    int ret = 0;
7883
7884
7885    /* missing type support */
7886    return(ret);
7887}
7888
7889
7890static int
7891test_xmlCopyPropList(void) {
7892    int ret = 0;
7893
7894
7895    /* missing type support */
7896    return(ret);
7897}
7898
7899
7900static int
7901test_xmlCreateIntSubset(void) {
7902    int ret = 0;
7903
7904
7905    /* missing type support */
7906    return(ret);
7907}
7908
7909
7910static int
7911test_xmlDocCopyNode(void) {
7912    int ret = 0;
7913
7914
7915    /* missing type support */
7916    return(ret);
7917}
7918
7919
7920static int
7921test_xmlDocCopyNodeList(void) {
7922    int ret = 0;
7923
7924
7925    /* missing type support */
7926    return(ret);
7927}
7928
7929
7930static int
7931test_xmlDocDump(void) {
7932    int ret = 0;
7933
7934
7935    /* missing type support */
7936    return(ret);
7937}
7938
7939
7940static int
7941test_xmlDocDumpFormatMemory(void) {
7942    int ret = 0;
7943
7944
7945    /* missing type support */
7946    return(ret);
7947}
7948
7949
7950static int
7951test_xmlDocDumpFormatMemoryEnc(void) {
7952    int ret = 0;
7953
7954
7955    /* missing type support */
7956    return(ret);
7957}
7958
7959
7960static int
7961test_xmlDocDumpMemory(void) {
7962    int ret = 0;
7963
7964
7965    /* missing type support */
7966    return(ret);
7967}
7968
7969
7970static int
7971test_xmlDocDumpMemoryEnc(void) {
7972    int ret = 0;
7973
7974
7975    /* missing type support */
7976    return(ret);
7977}
7978
7979
7980static int
7981test_xmlDocFormatDump(void) {
7982    int ret = 0;
7983
7984
7985    /* missing type support */
7986    return(ret);
7987}
7988
7989
7990static int
7991test_xmlDocGetRootElement(void) {
7992    int ret = 0;
7993
7994    int mem_base;
7995    xmlNodePtr ret_val;
7996    xmlDocPtr doc; /* the document */
7997    int n_doc;
7998
7999    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
8000        mem_base = xmlMemBlocks();
8001        doc = gen_xmlDocPtr(n_doc);
8002
8003        ret_val = xmlDocGetRootElement(doc);
8004        desret_xmlNodePtr(ret_val);
8005        call_tests++;
8006        des_xmlDocPtr(n_doc, doc);
8007        xmlResetLastError();
8008        if (mem_base != xmlMemBlocks()) {
8009            printf("Leak of %d blocks found in xmlDocGetRootElement",
8010	           xmlMemBlocks() - mem_base);
8011	    ret++;
8012            printf(" %d", n_doc);
8013            printf("\n");
8014        }
8015    }
8016
8017    return(ret);
8018}
8019
8020
8021static int
8022test_xmlDocSetRootElement(void) {
8023    int ret = 0;
8024
8025#ifdef LIBXML_TREE_ENABLED
8026    int mem_base;
8027    xmlNodePtr ret_val;
8028    xmlDocPtr doc; /* the document */
8029    int n_doc;
8030    xmlNodePtr root; /* the new document root element */
8031    int n_root;
8032
8033    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
8034    for (n_root = 0;n_root < gen_nb_xmlNodePtr_in;n_root++) {
8035        mem_base = xmlMemBlocks();
8036        doc = gen_xmlDocPtr(n_doc);
8037        root = gen_xmlNodePtr_in(n_root);
8038
8039        ret_val = xmlDocSetRootElement(doc, root);
8040        if (doc == NULL) { xmlFreeNode(root) ; root = NULL ; }
8041        desret_xmlNodePtr(ret_val);
8042        call_tests++;
8043        des_xmlDocPtr(n_doc, doc);
8044        des_xmlNodePtr_in(n_root, root);
8045        xmlResetLastError();
8046        if (mem_base != xmlMemBlocks()) {
8047            printf("Leak of %d blocks found in xmlDocSetRootElement",
8048	           xmlMemBlocks() - mem_base);
8049	    ret++;
8050            printf(" %d", n_doc);
8051            printf(" %d", n_root);
8052            printf("\n");
8053        }
8054    }
8055    }
8056#endif
8057
8058    return(ret);
8059}
8060
8061
8062static int
8063test_xmlElemDump(void) {
8064    int ret = 0;
8065
8066
8067    /* missing type support */
8068    return(ret);
8069}
8070
8071
8072static int
8073test_xmlGetBufferAllocationScheme(void) {
8074    int ret = 0;
8075
8076
8077    /* missing type support */
8078    return(ret);
8079}
8080
8081
8082static int
8083test_xmlGetCompressMode(void) {
8084    int ret = 0;
8085
8086    int mem_base;
8087    int ret_val;
8088
8089        mem_base = xmlMemBlocks();
8090
8091        ret_val = xmlGetCompressMode();
8092        desret_int(ret_val);
8093        call_tests++;
8094        xmlResetLastError();
8095        if (mem_base != xmlMemBlocks()) {
8096            printf("Leak of %d blocks found in xmlGetCompressMode",
8097	           xmlMemBlocks() - mem_base);
8098	    ret++;
8099            printf("\n");
8100        }
8101
8102    return(ret);
8103}
8104
8105
8106static int
8107test_xmlGetDocCompressMode(void) {
8108    int ret = 0;
8109
8110    int mem_base;
8111    int ret_val;
8112    xmlDocPtr doc; /* the document */
8113    int n_doc;
8114
8115    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
8116        mem_base = xmlMemBlocks();
8117        doc = gen_xmlDocPtr(n_doc);
8118
8119        ret_val = xmlGetDocCompressMode(doc);
8120        desret_int(ret_val);
8121        call_tests++;
8122        des_xmlDocPtr(n_doc, doc);
8123        xmlResetLastError();
8124        if (mem_base != xmlMemBlocks()) {
8125            printf("Leak of %d blocks found in xmlGetDocCompressMode",
8126	           xmlMemBlocks() - mem_base);
8127	    ret++;
8128            printf(" %d", n_doc);
8129            printf("\n");
8130        }
8131    }
8132
8133    return(ret);
8134}
8135
8136
8137static int
8138test_xmlGetIntSubset(void) {
8139    int ret = 0;
8140
8141
8142    /* missing type support */
8143    return(ret);
8144}
8145
8146
8147static int
8148test_xmlGetLastChild(void) {
8149    int ret = 0;
8150
8151    int mem_base;
8152    xmlNodePtr ret_val;
8153    xmlNodePtr parent; /* the parent node */
8154    int n_parent;
8155
8156    for (n_parent = 0;n_parent < gen_nb_xmlNodePtr;n_parent++) {
8157        mem_base = xmlMemBlocks();
8158        parent = gen_xmlNodePtr(n_parent);
8159
8160        ret_val = xmlGetLastChild(parent);
8161        desret_xmlNodePtr(ret_val);
8162        call_tests++;
8163        des_xmlNodePtr(n_parent, parent);
8164        xmlResetLastError();
8165        if (mem_base != xmlMemBlocks()) {
8166            printf("Leak of %d blocks found in xmlGetLastChild",
8167	           xmlMemBlocks() - mem_base);
8168	    ret++;
8169            printf(" %d", n_parent);
8170            printf("\n");
8171        }
8172    }
8173
8174    return(ret);
8175}
8176
8177
8178static int
8179test_xmlGetLineNo(void) {
8180    int ret = 0;
8181
8182
8183    /* missing type support */
8184    return(ret);
8185}
8186
8187
8188static int
8189test_xmlGetNoNsProp(void) {
8190    int ret = 0;
8191
8192    int mem_base;
8193    xmlChar * ret_val;
8194    xmlNodePtr node; /* the node */
8195    int n_node;
8196    const xmlChar * name; /* the attribute name */
8197    int n_name;
8198
8199    for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
8200    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
8201        mem_base = xmlMemBlocks();
8202        node = gen_xmlNodePtr(n_node);
8203        name = gen_const_xmlChar_ptr(n_name);
8204
8205        ret_val = xmlGetNoNsProp(node, name);
8206        desret_xmlChar_ptr(ret_val);
8207        call_tests++;
8208        des_xmlNodePtr(n_node, node);
8209        des_const_xmlChar_ptr(n_name, name);
8210        xmlResetLastError();
8211        if (mem_base != xmlMemBlocks()) {
8212            printf("Leak of %d blocks found in xmlGetNoNsProp",
8213	           xmlMemBlocks() - mem_base);
8214	    ret++;
8215            printf(" %d", n_node);
8216            printf(" %d", n_name);
8217            printf("\n");
8218        }
8219    }
8220    }
8221
8222    return(ret);
8223}
8224
8225
8226static int
8227test_xmlGetNodePath(void) {
8228    int ret = 0;
8229
8230#ifdef LIBXML_TREE_ENABLED
8231    int mem_base;
8232    xmlChar * ret_val;
8233    xmlNodePtr node; /* a node */
8234    int n_node;
8235
8236    for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
8237        mem_base = xmlMemBlocks();
8238        node = gen_xmlNodePtr(n_node);
8239
8240        ret_val = xmlGetNodePath(node);
8241        desret_xmlChar_ptr(ret_val);
8242        call_tests++;
8243        des_xmlNodePtr(n_node, node);
8244        xmlResetLastError();
8245        if (mem_base != xmlMemBlocks()) {
8246            printf("Leak of %d blocks found in xmlGetNodePath",
8247	           xmlMemBlocks() - mem_base);
8248	    ret++;
8249            printf(" %d", n_node);
8250            printf("\n");
8251        }
8252    }
8253#endif
8254
8255    return(ret);
8256}
8257
8258
8259static int
8260test_xmlGetNsList(void) {
8261    int ret = 0;
8262
8263
8264    /* missing type support */
8265    return(ret);
8266}
8267
8268
8269static int
8270test_xmlGetNsProp(void) {
8271    int ret = 0;
8272
8273    int mem_base;
8274    xmlChar * ret_val;
8275    xmlNodePtr node; /* the node */
8276    int n_node;
8277    const xmlChar * name; /* the attribute name */
8278    int n_name;
8279    const xmlChar * nameSpace; /* the URI of the namespace */
8280    int n_nameSpace;
8281
8282    for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
8283    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
8284    for (n_nameSpace = 0;n_nameSpace < gen_nb_const_xmlChar_ptr;n_nameSpace++) {
8285        mem_base = xmlMemBlocks();
8286        node = gen_xmlNodePtr(n_node);
8287        name = gen_const_xmlChar_ptr(n_name);
8288        nameSpace = gen_const_xmlChar_ptr(n_nameSpace);
8289
8290        ret_val = xmlGetNsProp(node, name, nameSpace);
8291        desret_xmlChar_ptr(ret_val);
8292        call_tests++;
8293        des_xmlNodePtr(n_node, node);
8294        des_const_xmlChar_ptr(n_name, name);
8295        des_const_xmlChar_ptr(n_nameSpace, nameSpace);
8296        xmlResetLastError();
8297        if (mem_base != xmlMemBlocks()) {
8298            printf("Leak of %d blocks found in xmlGetNsProp",
8299	           xmlMemBlocks() - mem_base);
8300	    ret++;
8301            printf(" %d", n_node);
8302            printf(" %d", n_name);
8303            printf(" %d", n_nameSpace);
8304            printf("\n");
8305        }
8306    }
8307    }
8308    }
8309
8310    return(ret);
8311}
8312
8313
8314static int
8315test_xmlGetProp(void) {
8316    int ret = 0;
8317
8318    int mem_base;
8319    xmlChar * ret_val;
8320    xmlNodePtr node; /* the node */
8321    int n_node;
8322    const xmlChar * name; /* the attribute name */
8323    int n_name;
8324
8325    for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
8326    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
8327        mem_base = xmlMemBlocks();
8328        node = gen_xmlNodePtr(n_node);
8329        name = gen_const_xmlChar_ptr(n_name);
8330
8331        ret_val = xmlGetProp(node, name);
8332        desret_xmlChar_ptr(ret_val);
8333        call_tests++;
8334        des_xmlNodePtr(n_node, node);
8335        des_const_xmlChar_ptr(n_name, name);
8336        xmlResetLastError();
8337        if (mem_base != xmlMemBlocks()) {
8338            printf("Leak of %d blocks found in xmlGetProp",
8339	           xmlMemBlocks() - mem_base);
8340	    ret++;
8341            printf(" %d", n_node);
8342            printf(" %d", n_name);
8343            printf("\n");
8344        }
8345    }
8346    }
8347
8348    return(ret);
8349}
8350
8351
8352static int
8353test_xmlHasNsProp(void) {
8354    int ret = 0;
8355
8356
8357    /* missing type support */
8358    return(ret);
8359}
8360
8361
8362static int
8363test_xmlHasProp(void) {
8364    int ret = 0;
8365
8366
8367    /* missing type support */
8368    return(ret);
8369}
8370
8371
8372static int
8373test_xmlIsBlankNode(void) {
8374    int ret = 0;
8375
8376    int mem_base;
8377    int ret_val;
8378    xmlNodePtr node; /* the node */
8379    int n_node;
8380
8381    for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
8382        mem_base = xmlMemBlocks();
8383        node = gen_xmlNodePtr(n_node);
8384
8385        ret_val = xmlIsBlankNode(node);
8386        desret_int(ret_val);
8387        call_tests++;
8388        des_xmlNodePtr(n_node, node);
8389        xmlResetLastError();
8390        if (mem_base != xmlMemBlocks()) {
8391            printf("Leak of %d blocks found in xmlIsBlankNode",
8392	           xmlMemBlocks() - mem_base);
8393	    ret++;
8394            printf(" %d", n_node);
8395            printf("\n");
8396        }
8397    }
8398
8399    return(ret);
8400}
8401
8402
8403static int
8404test_xmlIsXHTML(void) {
8405    int ret = 0;
8406
8407    int mem_base;
8408    int ret_val;
8409    const xmlChar * systemID; /* the system identifier */
8410    int n_systemID;
8411    const xmlChar * publicID; /* the public identifier */
8412    int n_publicID;
8413
8414    for (n_systemID = 0;n_systemID < gen_nb_const_xmlChar_ptr;n_systemID++) {
8415    for (n_publicID = 0;n_publicID < gen_nb_const_xmlChar_ptr;n_publicID++) {
8416        mem_base = xmlMemBlocks();
8417        systemID = gen_const_xmlChar_ptr(n_systemID);
8418        publicID = gen_const_xmlChar_ptr(n_publicID);
8419
8420        ret_val = xmlIsXHTML(systemID, publicID);
8421        desret_int(ret_val);
8422        call_tests++;
8423        des_const_xmlChar_ptr(n_systemID, systemID);
8424        des_const_xmlChar_ptr(n_publicID, publicID);
8425        xmlResetLastError();
8426        if (mem_base != xmlMemBlocks()) {
8427            printf("Leak of %d blocks found in xmlIsXHTML",
8428	           xmlMemBlocks() - mem_base);
8429	    ret++;
8430            printf(" %d", n_systemID);
8431            printf(" %d", n_publicID);
8432            printf("\n");
8433        }
8434    }
8435    }
8436
8437    return(ret);
8438}
8439
8440
8441static int
8442test_xmlNewCDataBlock(void) {
8443    int ret = 0;
8444
8445    int mem_base;
8446    xmlNodePtr ret_val;
8447    xmlDocPtr doc; /* the document */
8448    int n_doc;
8449    const xmlChar * content; /* the CDATA block content content */
8450    int n_content;
8451    int len; /* the length of the block */
8452    int n_len;
8453
8454    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
8455    for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
8456    for (n_len = 0;n_len < gen_nb_int;n_len++) {
8457        mem_base = xmlMemBlocks();
8458        doc = gen_xmlDocPtr(n_doc);
8459        content = gen_const_xmlChar_ptr(n_content);
8460        len = gen_int(n_len);
8461
8462        ret_val = xmlNewCDataBlock(doc, content, len);
8463        desret_xmlNodePtr(ret_val);
8464        call_tests++;
8465        des_xmlDocPtr(n_doc, doc);
8466        des_const_xmlChar_ptr(n_content, content);
8467        des_int(n_len, len);
8468        xmlResetLastError();
8469        if (mem_base != xmlMemBlocks()) {
8470            printf("Leak of %d blocks found in xmlNewCDataBlock",
8471	           xmlMemBlocks() - mem_base);
8472	    ret++;
8473            printf(" %d", n_doc);
8474            printf(" %d", n_content);
8475            printf(" %d", n_len);
8476            printf("\n");
8477        }
8478    }
8479    }
8480    }
8481
8482    return(ret);
8483}
8484
8485
8486static int
8487test_xmlNewCharRef(void) {
8488    int ret = 0;
8489
8490    int mem_base;
8491    xmlNodePtr ret_val;
8492    xmlDocPtr doc; /* the document */
8493    int n_doc;
8494    const xmlChar * name; /* the char ref string, starting with # or "&# ... ;" */
8495    int n_name;
8496
8497    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
8498    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
8499        mem_base = xmlMemBlocks();
8500        doc = gen_xmlDocPtr(n_doc);
8501        name = gen_const_xmlChar_ptr(n_name);
8502
8503        ret_val = xmlNewCharRef(doc, name);
8504        desret_xmlNodePtr(ret_val);
8505        call_tests++;
8506        des_xmlDocPtr(n_doc, doc);
8507        des_const_xmlChar_ptr(n_name, name);
8508        xmlResetLastError();
8509        if (mem_base != xmlMemBlocks()) {
8510            printf("Leak of %d blocks found in xmlNewCharRef",
8511	           xmlMemBlocks() - mem_base);
8512	    ret++;
8513            printf(" %d", n_doc);
8514            printf(" %d", n_name);
8515            printf("\n");
8516        }
8517    }
8518    }
8519
8520    return(ret);
8521}
8522
8523
8524static int
8525test_xmlNewChild(void) {
8526    int ret = 0;
8527
8528
8529    /* missing type support */
8530    return(ret);
8531}
8532
8533
8534static int
8535test_xmlNewComment(void) {
8536    int ret = 0;
8537
8538    int mem_base;
8539    xmlNodePtr ret_val;
8540    const xmlChar * content; /* the comment content */
8541    int n_content;
8542
8543    for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
8544        mem_base = xmlMemBlocks();
8545        content = gen_const_xmlChar_ptr(n_content);
8546
8547        ret_val = xmlNewComment(content);
8548        desret_xmlNodePtr(ret_val);
8549        call_tests++;
8550        des_const_xmlChar_ptr(n_content, content);
8551        xmlResetLastError();
8552        if (mem_base != xmlMemBlocks()) {
8553            printf("Leak of %d blocks found in xmlNewComment",
8554	           xmlMemBlocks() - mem_base);
8555	    ret++;
8556            printf(" %d", n_content);
8557            printf("\n");
8558        }
8559    }
8560
8561    return(ret);
8562}
8563
8564
8565static int
8566test_xmlNewDoc(void) {
8567    int ret = 0;
8568
8569    int mem_base;
8570    xmlDocPtr ret_val;
8571    const xmlChar * version; /* xmlChar string giving the version of XML "1.0" */
8572    int n_version;
8573
8574    for (n_version = 0;n_version < gen_nb_const_xmlChar_ptr;n_version++) {
8575        mem_base = xmlMemBlocks();
8576        version = gen_const_xmlChar_ptr(n_version);
8577
8578        ret_val = xmlNewDoc(version);
8579        desret_xmlDocPtr(ret_val);
8580        call_tests++;
8581        des_const_xmlChar_ptr(n_version, version);
8582        xmlResetLastError();
8583        if (mem_base != xmlMemBlocks()) {
8584            printf("Leak of %d blocks found in xmlNewDoc",
8585	           xmlMemBlocks() - mem_base);
8586	    ret++;
8587            printf(" %d", n_version);
8588            printf("\n");
8589        }
8590    }
8591
8592    return(ret);
8593}
8594
8595
8596static int
8597test_xmlNewDocComment(void) {
8598    int ret = 0;
8599
8600    int mem_base;
8601    xmlNodePtr ret_val;
8602    xmlDocPtr doc; /* the document */
8603    int n_doc;
8604    const xmlChar * content; /* the comment content */
8605    int n_content;
8606
8607    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
8608    for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
8609        mem_base = xmlMemBlocks();
8610        doc = gen_xmlDocPtr(n_doc);
8611        content = gen_const_xmlChar_ptr(n_content);
8612
8613        ret_val = xmlNewDocComment(doc, content);
8614        desret_xmlNodePtr(ret_val);
8615        call_tests++;
8616        des_xmlDocPtr(n_doc, doc);
8617        des_const_xmlChar_ptr(n_content, content);
8618        xmlResetLastError();
8619        if (mem_base != xmlMemBlocks()) {
8620            printf("Leak of %d blocks found in xmlNewDocComment",
8621	           xmlMemBlocks() - mem_base);
8622	    ret++;
8623            printf(" %d", n_doc);
8624            printf(" %d", n_content);
8625            printf("\n");
8626        }
8627    }
8628    }
8629
8630    return(ret);
8631}
8632
8633
8634static int
8635test_xmlNewDocFragment(void) {
8636    int ret = 0;
8637
8638#ifdef LIBXML_TREE_ENABLED
8639    int mem_base;
8640    xmlNodePtr ret_val;
8641    xmlDocPtr doc; /* the document owning the fragment */
8642    int n_doc;
8643
8644    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
8645        mem_base = xmlMemBlocks();
8646        doc = gen_xmlDocPtr(n_doc);
8647
8648        ret_val = xmlNewDocFragment(doc);
8649        desret_xmlNodePtr(ret_val);
8650        call_tests++;
8651        des_xmlDocPtr(n_doc, doc);
8652        xmlResetLastError();
8653        if (mem_base != xmlMemBlocks()) {
8654            printf("Leak of %d blocks found in xmlNewDocFragment",
8655	           xmlMemBlocks() - mem_base);
8656	    ret++;
8657            printf(" %d", n_doc);
8658            printf("\n");
8659        }
8660    }
8661#endif
8662
8663    return(ret);
8664}
8665
8666
8667static int
8668test_xmlNewDocNode(void) {
8669    int ret = 0;
8670
8671
8672    /* missing type support */
8673    return(ret);
8674}
8675
8676
8677static int
8678test_xmlNewDocNodeEatName(void) {
8679    int ret = 0;
8680
8681
8682    /* missing type support */
8683    return(ret);
8684}
8685
8686
8687static int
8688test_xmlNewDocPI(void) {
8689    int ret = 0;
8690
8691    int mem_base;
8692    xmlNodePtr ret_val;
8693    xmlDocPtr doc; /* the target document */
8694    int n_doc;
8695    const xmlChar * name; /* the processing instruction name */
8696    int n_name;
8697    const xmlChar * content; /* the PI content */
8698    int n_content;
8699
8700    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
8701    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
8702    for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
8703        mem_base = xmlMemBlocks();
8704        doc = gen_xmlDocPtr(n_doc);
8705        name = gen_const_xmlChar_ptr(n_name);
8706        content = gen_const_xmlChar_ptr(n_content);
8707
8708        ret_val = xmlNewDocPI(doc, name, content);
8709        desret_xmlNodePtr(ret_val);
8710        call_tests++;
8711        des_xmlDocPtr(n_doc, doc);
8712        des_const_xmlChar_ptr(n_name, name);
8713        des_const_xmlChar_ptr(n_content, content);
8714        xmlResetLastError();
8715        if (mem_base != xmlMemBlocks()) {
8716            printf("Leak of %d blocks found in xmlNewDocPI",
8717	           xmlMemBlocks() - mem_base);
8718	    ret++;
8719            printf(" %d", n_doc);
8720            printf(" %d", n_name);
8721            printf(" %d", n_content);
8722            printf("\n");
8723        }
8724    }
8725    }
8726    }
8727
8728    return(ret);
8729}
8730
8731
8732static int
8733test_xmlNewDocProp(void) {
8734    int ret = 0;
8735
8736
8737    /* missing type support */
8738    return(ret);
8739}
8740
8741
8742static int
8743test_xmlNewDocRawNode(void) {
8744    int ret = 0;
8745
8746
8747    /* missing type support */
8748    return(ret);
8749}
8750
8751
8752static int
8753test_xmlNewDocText(void) {
8754    int ret = 0;
8755
8756    int mem_base;
8757    xmlNodePtr ret_val;
8758    xmlDocPtr doc; /* the document */
8759    int n_doc;
8760    const xmlChar * content; /* the text content */
8761    int n_content;
8762
8763    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
8764    for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
8765        mem_base = xmlMemBlocks();
8766        doc = gen_xmlDocPtr(n_doc);
8767        content = gen_const_xmlChar_ptr(n_content);
8768
8769        ret_val = xmlNewDocText(doc, content);
8770        desret_xmlNodePtr(ret_val);
8771        call_tests++;
8772        des_xmlDocPtr(n_doc, doc);
8773        des_const_xmlChar_ptr(n_content, content);
8774        xmlResetLastError();
8775        if (mem_base != xmlMemBlocks()) {
8776            printf("Leak of %d blocks found in xmlNewDocText",
8777	           xmlMemBlocks() - mem_base);
8778	    ret++;
8779            printf(" %d", n_doc);
8780            printf(" %d", n_content);
8781            printf("\n");
8782        }
8783    }
8784    }
8785
8786    return(ret);
8787}
8788
8789
8790static int
8791test_xmlNewDocTextLen(void) {
8792    int ret = 0;
8793
8794    int mem_base;
8795    xmlNodePtr ret_val;
8796    xmlDocPtr doc; /* the document */
8797    int n_doc;
8798    const xmlChar * content; /* the text content */
8799    int n_content;
8800    int len; /* the text len. */
8801    int n_len;
8802
8803    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
8804    for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
8805    for (n_len = 0;n_len < gen_nb_int;n_len++) {
8806        mem_base = xmlMemBlocks();
8807        doc = gen_xmlDocPtr(n_doc);
8808        content = gen_const_xmlChar_ptr(n_content);
8809        len = gen_int(n_len);
8810
8811        ret_val = xmlNewDocTextLen(doc, content, len);
8812        desret_xmlNodePtr(ret_val);
8813        call_tests++;
8814        des_xmlDocPtr(n_doc, doc);
8815        des_const_xmlChar_ptr(n_content, content);
8816        des_int(n_len, len);
8817        xmlResetLastError();
8818        if (mem_base != xmlMemBlocks()) {
8819            printf("Leak of %d blocks found in xmlNewDocTextLen",
8820	           xmlMemBlocks() - mem_base);
8821	    ret++;
8822            printf(" %d", n_doc);
8823            printf(" %d", n_content);
8824            printf(" %d", n_len);
8825            printf("\n");
8826        }
8827    }
8828    }
8829    }
8830
8831    return(ret);
8832}
8833
8834
8835static int
8836test_xmlNewDtd(void) {
8837    int ret = 0;
8838
8839
8840    /* missing type support */
8841    return(ret);
8842}
8843
8844
8845static int
8846test_xmlNewGlobalNs(void) {
8847    int ret = 0;
8848
8849
8850    /* missing type support */
8851    return(ret);
8852}
8853
8854
8855static int
8856test_xmlNewNode(void) {
8857    int ret = 0;
8858
8859
8860    /* missing type support */
8861    return(ret);
8862}
8863
8864
8865static int
8866test_xmlNewNodeEatName(void) {
8867    int ret = 0;
8868
8869
8870    /* missing type support */
8871    return(ret);
8872}
8873
8874
8875static int
8876test_xmlNewNs(void) {
8877    int ret = 0;
8878
8879
8880    /* missing type support */
8881    return(ret);
8882}
8883
8884
8885static int
8886test_xmlNewNsProp(void) {
8887    int ret = 0;
8888
8889
8890    /* missing type support */
8891    return(ret);
8892}
8893
8894
8895static int
8896test_xmlNewNsPropEatName(void) {
8897    int ret = 0;
8898
8899
8900    /* missing type support */
8901    return(ret);
8902}
8903
8904
8905static int
8906test_xmlNewPI(void) {
8907    int ret = 0;
8908
8909    int mem_base;
8910    xmlNodePtr ret_val;
8911    const xmlChar * name; /* the processing instruction name */
8912    int n_name;
8913    const xmlChar * content; /* the PI content */
8914    int n_content;
8915
8916    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
8917    for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
8918        mem_base = xmlMemBlocks();
8919        name = gen_const_xmlChar_ptr(n_name);
8920        content = gen_const_xmlChar_ptr(n_content);
8921
8922        ret_val = xmlNewPI(name, content);
8923        desret_xmlNodePtr(ret_val);
8924        call_tests++;
8925        des_const_xmlChar_ptr(n_name, name);
8926        des_const_xmlChar_ptr(n_content, content);
8927        xmlResetLastError();
8928        if (mem_base != xmlMemBlocks()) {
8929            printf("Leak of %d blocks found in xmlNewPI",
8930	           xmlMemBlocks() - mem_base);
8931	    ret++;
8932            printf(" %d", n_name);
8933            printf(" %d", n_content);
8934            printf("\n");
8935        }
8936    }
8937    }
8938
8939    return(ret);
8940}
8941
8942
8943static int
8944test_xmlNewProp(void) {
8945    int ret = 0;
8946
8947
8948    /* missing type support */
8949    return(ret);
8950}
8951
8952
8953static int
8954test_xmlNewReference(void) {
8955    int ret = 0;
8956
8957    int mem_base;
8958    xmlNodePtr ret_val;
8959    xmlDocPtr doc; /* the document */
8960    int n_doc;
8961    const xmlChar * name; /* the reference name, or the reference string with & and ; */
8962    int n_name;
8963
8964    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
8965    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
8966        mem_base = xmlMemBlocks();
8967        doc = gen_xmlDocPtr(n_doc);
8968        name = gen_const_xmlChar_ptr(n_name);
8969
8970        ret_val = xmlNewReference(doc, name);
8971        desret_xmlNodePtr(ret_val);
8972        call_tests++;
8973        des_xmlDocPtr(n_doc, doc);
8974        des_const_xmlChar_ptr(n_name, name);
8975        xmlResetLastError();
8976        if (mem_base != xmlMemBlocks()) {
8977            printf("Leak of %d blocks found in xmlNewReference",
8978	           xmlMemBlocks() - mem_base);
8979	    ret++;
8980            printf(" %d", n_doc);
8981            printf(" %d", n_name);
8982            printf("\n");
8983        }
8984    }
8985    }
8986
8987    return(ret);
8988}
8989
8990
8991static int
8992test_xmlNewText(void) {
8993    int ret = 0;
8994
8995    int mem_base;
8996    xmlNodePtr ret_val;
8997    const xmlChar * content; /* the text content */
8998    int n_content;
8999
9000    for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
9001        mem_base = xmlMemBlocks();
9002        content = gen_const_xmlChar_ptr(n_content);
9003
9004        ret_val = xmlNewText(content);
9005        desret_xmlNodePtr(ret_val);
9006        call_tests++;
9007        des_const_xmlChar_ptr(n_content, content);
9008        xmlResetLastError();
9009        if (mem_base != xmlMemBlocks()) {
9010            printf("Leak of %d blocks found in xmlNewText",
9011	           xmlMemBlocks() - mem_base);
9012	    ret++;
9013            printf(" %d", n_content);
9014            printf("\n");
9015        }
9016    }
9017
9018    return(ret);
9019}
9020
9021
9022static int
9023test_xmlNewTextChild(void) {
9024    int ret = 0;
9025
9026
9027    /* missing type support */
9028    return(ret);
9029}
9030
9031
9032static int
9033test_xmlNewTextLen(void) {
9034    int ret = 0;
9035
9036    int mem_base;
9037    xmlNodePtr ret_val;
9038    const xmlChar * content; /* the text content */
9039    int n_content;
9040    int len; /* the text len. */
9041    int n_len;
9042
9043    for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
9044    for (n_len = 0;n_len < gen_nb_int;n_len++) {
9045        mem_base = xmlMemBlocks();
9046        content = gen_const_xmlChar_ptr(n_content);
9047        len = gen_int(n_len);
9048
9049        ret_val = xmlNewTextLen(content, len);
9050        desret_xmlNodePtr(ret_val);
9051        call_tests++;
9052        des_const_xmlChar_ptr(n_content, content);
9053        des_int(n_len, len);
9054        xmlResetLastError();
9055        if (mem_base != xmlMemBlocks()) {
9056            printf("Leak of %d blocks found in xmlNewTextLen",
9057	           xmlMemBlocks() - mem_base);
9058	    ret++;
9059            printf(" %d", n_content);
9060            printf(" %d", n_len);
9061            printf("\n");
9062        }
9063    }
9064    }
9065
9066    return(ret);
9067}
9068
9069
9070static int
9071test_xmlNodeAddContent(void) {
9072    int ret = 0;
9073
9074    int mem_base;
9075    xmlNodePtr cur; /* the node being modified */
9076    int n_cur;
9077    const xmlChar * content; /* extra content */
9078    int n_content;
9079
9080    for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
9081    for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
9082        mem_base = xmlMemBlocks();
9083        cur = gen_xmlNodePtr(n_cur);
9084        content = gen_const_xmlChar_ptr(n_content);
9085
9086        xmlNodeAddContent(cur, content);
9087        call_tests++;
9088        des_xmlNodePtr(n_cur, cur);
9089        des_const_xmlChar_ptr(n_content, content);
9090        xmlResetLastError();
9091        if (mem_base != xmlMemBlocks()) {
9092            printf("Leak of %d blocks found in xmlNodeAddContent",
9093	           xmlMemBlocks() - mem_base);
9094	    ret++;
9095            printf(" %d", n_cur);
9096            printf(" %d", n_content);
9097            printf("\n");
9098        }
9099    }
9100    }
9101
9102    return(ret);
9103}
9104
9105
9106static int
9107test_xmlNodeAddContentLen(void) {
9108    int ret = 0;
9109
9110    int mem_base;
9111    xmlNodePtr cur; /* the node being modified */
9112    int n_cur;
9113    const xmlChar * content; /* extra content */
9114    int n_content;
9115    int len; /* the size of @content */
9116    int n_len;
9117
9118    for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
9119    for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
9120    for (n_len = 0;n_len < gen_nb_int;n_len++) {
9121        mem_base = xmlMemBlocks();
9122        cur = gen_xmlNodePtr(n_cur);
9123        content = gen_const_xmlChar_ptr(n_content);
9124        len = gen_int(n_len);
9125
9126        xmlNodeAddContentLen(cur, content, len);
9127        call_tests++;
9128        des_xmlNodePtr(n_cur, cur);
9129        des_const_xmlChar_ptr(n_content, content);
9130        des_int(n_len, len);
9131        xmlResetLastError();
9132        if (mem_base != xmlMemBlocks()) {
9133            printf("Leak of %d blocks found in xmlNodeAddContentLen",
9134	           xmlMemBlocks() - mem_base);
9135	    ret++;
9136            printf(" %d", n_cur);
9137            printf(" %d", n_content);
9138            printf(" %d", n_len);
9139            printf("\n");
9140        }
9141    }
9142    }
9143    }
9144
9145    return(ret);
9146}
9147
9148
9149static int
9150test_xmlNodeBufGetContent(void) {
9151    int ret = 0;
9152
9153    int mem_base;
9154    int ret_val;
9155    xmlBufferPtr buffer; /* a buffer */
9156    int n_buffer;
9157    xmlNodePtr cur; /* the node being read */
9158    int n_cur;
9159
9160    for (n_buffer = 0;n_buffer < gen_nb_xmlBufferPtr;n_buffer++) {
9161    for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
9162        mem_base = xmlMemBlocks();
9163        buffer = gen_xmlBufferPtr(n_buffer);
9164        cur = gen_xmlNodePtr(n_cur);
9165
9166        ret_val = xmlNodeBufGetContent(buffer, cur);
9167        desret_int(ret_val);
9168        call_tests++;
9169        des_xmlBufferPtr(n_buffer, buffer);
9170        des_xmlNodePtr(n_cur, cur);
9171        xmlResetLastError();
9172        if (mem_base != xmlMemBlocks()) {
9173            printf("Leak of %d blocks found in xmlNodeBufGetContent",
9174	           xmlMemBlocks() - mem_base);
9175	    ret++;
9176            printf(" %d", n_buffer);
9177            printf(" %d", n_cur);
9178            printf("\n");
9179        }
9180    }
9181    }
9182
9183    return(ret);
9184}
9185
9186
9187static int
9188test_xmlNodeDump(void) {
9189    int ret = 0;
9190
9191#ifdef LIBXML_OUTPUT_ENABLED
9192    int mem_base;
9193    int ret_val;
9194    xmlBufferPtr buf; /* the XML buffer output */
9195    int n_buf;
9196    xmlDocPtr doc; /* the document */
9197    int n_doc;
9198    xmlNodePtr cur; /* the current node */
9199    int n_cur;
9200    int level; /* the imbrication level for indenting */
9201    int n_level;
9202    int format; /* is formatting allowed */
9203    int n_format;
9204
9205    for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
9206    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
9207    for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
9208    for (n_level = 0;n_level < gen_nb_int;n_level++) {
9209    for (n_format = 0;n_format < gen_nb_int;n_format++) {
9210        mem_base = xmlMemBlocks();
9211        buf = gen_xmlBufferPtr(n_buf);
9212        doc = gen_xmlDocPtr(n_doc);
9213        cur = gen_xmlNodePtr(n_cur);
9214        level = gen_int(n_level);
9215        format = gen_int(n_format);
9216
9217        ret_val = xmlNodeDump(buf, doc, cur, level, format);
9218        desret_int(ret_val);
9219        call_tests++;
9220        des_xmlBufferPtr(n_buf, buf);
9221        des_xmlDocPtr(n_doc, doc);
9222        des_xmlNodePtr(n_cur, cur);
9223        des_int(n_level, level);
9224        des_int(n_format, format);
9225        xmlResetLastError();
9226        if (mem_base != xmlMemBlocks()) {
9227            printf("Leak of %d blocks found in xmlNodeDump",
9228	           xmlMemBlocks() - mem_base);
9229	    ret++;
9230            printf(" %d", n_buf);
9231            printf(" %d", n_doc);
9232            printf(" %d", n_cur);
9233            printf(" %d", n_level);
9234            printf(" %d", n_format);
9235            printf("\n");
9236        }
9237    }
9238    }
9239    }
9240    }
9241    }
9242#endif
9243
9244    return(ret);
9245}
9246
9247
9248static int
9249test_xmlNodeDumpOutput(void) {
9250    int ret = 0;
9251
9252
9253    /* missing type support */
9254    return(ret);
9255}
9256
9257
9258static int
9259test_xmlNodeGetBase(void) {
9260    int ret = 0;
9261
9262    int mem_base;
9263    xmlChar * ret_val;
9264    xmlDocPtr doc; /* the document the node pertains to */
9265    int n_doc;
9266    xmlNodePtr cur; /* the node being checked */
9267    int n_cur;
9268
9269    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
9270    for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
9271        mem_base = xmlMemBlocks();
9272        doc = gen_xmlDocPtr(n_doc);
9273        cur = gen_xmlNodePtr(n_cur);
9274
9275        ret_val = xmlNodeGetBase(doc, cur);
9276        desret_xmlChar_ptr(ret_val);
9277        call_tests++;
9278        des_xmlDocPtr(n_doc, doc);
9279        des_xmlNodePtr(n_cur, cur);
9280        xmlResetLastError();
9281        if (mem_base != xmlMemBlocks()) {
9282            printf("Leak of %d blocks found in xmlNodeGetBase",
9283	           xmlMemBlocks() - mem_base);
9284	    ret++;
9285            printf(" %d", n_doc);
9286            printf(" %d", n_cur);
9287            printf("\n");
9288        }
9289    }
9290    }
9291
9292    return(ret);
9293}
9294
9295
9296static int
9297test_xmlNodeGetContent(void) {
9298    int ret = 0;
9299
9300    int mem_base;
9301    xmlChar * ret_val;
9302    xmlNodePtr cur; /* the node being read */
9303    int n_cur;
9304
9305    for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
9306        mem_base = xmlMemBlocks();
9307        cur = gen_xmlNodePtr(n_cur);
9308
9309        ret_val = xmlNodeGetContent(cur);
9310        desret_xmlChar_ptr(ret_val);
9311        call_tests++;
9312        des_xmlNodePtr(n_cur, cur);
9313        xmlResetLastError();
9314        if (mem_base != xmlMemBlocks()) {
9315            printf("Leak of %d blocks found in xmlNodeGetContent",
9316	           xmlMemBlocks() - mem_base);
9317	    ret++;
9318            printf(" %d", n_cur);
9319            printf("\n");
9320        }
9321    }
9322
9323    return(ret);
9324}
9325
9326
9327static int
9328test_xmlNodeGetLang(void) {
9329    int ret = 0;
9330
9331    int mem_base;
9332    xmlChar * ret_val;
9333    xmlNodePtr cur; /* the node being checked */
9334    int n_cur;
9335
9336    for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
9337        mem_base = xmlMemBlocks();
9338        cur = gen_xmlNodePtr(n_cur);
9339
9340        ret_val = xmlNodeGetLang(cur);
9341        desret_xmlChar_ptr(ret_val);
9342        call_tests++;
9343        des_xmlNodePtr(n_cur, cur);
9344        xmlResetLastError();
9345        if (mem_base != xmlMemBlocks()) {
9346            printf("Leak of %d blocks found in xmlNodeGetLang",
9347	           xmlMemBlocks() - mem_base);
9348	    ret++;
9349            printf(" %d", n_cur);
9350            printf("\n");
9351        }
9352    }
9353
9354    return(ret);
9355}
9356
9357
9358static int
9359test_xmlNodeGetSpacePreserve(void) {
9360    int ret = 0;
9361
9362    int mem_base;
9363    int ret_val;
9364    xmlNodePtr cur; /* the node being checked */
9365    int n_cur;
9366
9367    for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
9368        mem_base = xmlMemBlocks();
9369        cur = gen_xmlNodePtr(n_cur);
9370
9371        ret_val = xmlNodeGetSpacePreserve(cur);
9372        desret_int(ret_val);
9373        call_tests++;
9374        des_xmlNodePtr(n_cur, cur);
9375        xmlResetLastError();
9376        if (mem_base != xmlMemBlocks()) {
9377            printf("Leak of %d blocks found in xmlNodeGetSpacePreserve",
9378	           xmlMemBlocks() - mem_base);
9379	    ret++;
9380            printf(" %d", n_cur);
9381            printf("\n");
9382        }
9383    }
9384
9385    return(ret);
9386}
9387
9388
9389static int
9390test_xmlNodeIsText(void) {
9391    int ret = 0;
9392
9393    int mem_base;
9394    int ret_val;
9395    xmlNodePtr node; /* the node */
9396    int n_node;
9397
9398    for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
9399        mem_base = xmlMemBlocks();
9400        node = gen_xmlNodePtr(n_node);
9401
9402        ret_val = xmlNodeIsText(node);
9403        desret_int(ret_val);
9404        call_tests++;
9405        des_xmlNodePtr(n_node, node);
9406        xmlResetLastError();
9407        if (mem_base != xmlMemBlocks()) {
9408            printf("Leak of %d blocks found in xmlNodeIsText",
9409	           xmlMemBlocks() - mem_base);
9410	    ret++;
9411            printf(" %d", n_node);
9412            printf("\n");
9413        }
9414    }
9415
9416    return(ret);
9417}
9418
9419
9420static int
9421test_xmlNodeListGetRawString(void) {
9422    int ret = 0;
9423
9424#ifdef LIBXML_TREE_ENABLED
9425    int mem_base;
9426    xmlChar * ret_val;
9427    xmlDocPtr doc; /* the document */
9428    int n_doc;
9429    xmlNodePtr list; /* a Node list */
9430    int n_list;
9431    int inLine; /* should we replace entity contents or show their external form */
9432    int n_inLine;
9433
9434    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
9435    for (n_list = 0;n_list < gen_nb_xmlNodePtr;n_list++) {
9436    for (n_inLine = 0;n_inLine < gen_nb_int;n_inLine++) {
9437        mem_base = xmlMemBlocks();
9438        doc = gen_xmlDocPtr(n_doc);
9439        list = gen_xmlNodePtr(n_list);
9440        inLine = gen_int(n_inLine);
9441
9442        ret_val = xmlNodeListGetRawString(doc, list, inLine);
9443        desret_xmlChar_ptr(ret_val);
9444        call_tests++;
9445        des_xmlDocPtr(n_doc, doc);
9446        des_xmlNodePtr(n_list, list);
9447        des_int(n_inLine, inLine);
9448        xmlResetLastError();
9449        if (mem_base != xmlMemBlocks()) {
9450            printf("Leak of %d blocks found in xmlNodeListGetRawString",
9451	           xmlMemBlocks() - mem_base);
9452	    ret++;
9453            printf(" %d", n_doc);
9454            printf(" %d", n_list);
9455            printf(" %d", n_inLine);
9456            printf("\n");
9457        }
9458    }
9459    }
9460    }
9461#endif
9462
9463    return(ret);
9464}
9465
9466
9467static int
9468test_xmlNodeListGetString(void) {
9469    int ret = 0;
9470
9471    int mem_base;
9472    xmlChar * ret_val;
9473    xmlDocPtr doc; /* the document */
9474    int n_doc;
9475    xmlNodePtr list; /* a Node list */
9476    int n_list;
9477    int inLine; /* should we replace entity contents or show their external form */
9478    int n_inLine;
9479
9480    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
9481    for (n_list = 0;n_list < gen_nb_xmlNodePtr;n_list++) {
9482    for (n_inLine = 0;n_inLine < gen_nb_int;n_inLine++) {
9483        mem_base = xmlMemBlocks();
9484        doc = gen_xmlDocPtr(n_doc);
9485        list = gen_xmlNodePtr(n_list);
9486        inLine = gen_int(n_inLine);
9487
9488        ret_val = xmlNodeListGetString(doc, list, inLine);
9489        desret_xmlChar_ptr(ret_val);
9490        call_tests++;
9491        des_xmlDocPtr(n_doc, doc);
9492        des_xmlNodePtr(n_list, list);
9493        des_int(n_inLine, inLine);
9494        xmlResetLastError();
9495        if (mem_base != xmlMemBlocks()) {
9496            printf("Leak of %d blocks found in xmlNodeListGetString",
9497	           xmlMemBlocks() - mem_base);
9498	    ret++;
9499            printf(" %d", n_doc);
9500            printf(" %d", n_list);
9501            printf(" %d", n_inLine);
9502            printf("\n");
9503        }
9504    }
9505    }
9506    }
9507
9508    return(ret);
9509}
9510
9511
9512static int
9513test_xmlNodeSetBase(void) {
9514    int ret = 0;
9515
9516#ifdef LIBXML_TREE_ENABLED
9517    int mem_base;
9518    xmlNodePtr cur; /* the node being changed */
9519    int n_cur;
9520    const xmlChar * uri; /* the new base URI */
9521    int n_uri;
9522
9523    for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
9524    for (n_uri = 0;n_uri < gen_nb_const_xmlChar_ptr;n_uri++) {
9525        mem_base = xmlMemBlocks();
9526        cur = gen_xmlNodePtr(n_cur);
9527        uri = gen_const_xmlChar_ptr(n_uri);
9528
9529        xmlNodeSetBase(cur, uri);
9530        call_tests++;
9531        des_xmlNodePtr(n_cur, cur);
9532        des_const_xmlChar_ptr(n_uri, uri);
9533        xmlResetLastError();
9534        if (mem_base != xmlMemBlocks()) {
9535            printf("Leak of %d blocks found in xmlNodeSetBase",
9536	           xmlMemBlocks() - mem_base);
9537	    ret++;
9538            printf(" %d", n_cur);
9539            printf(" %d", n_uri);
9540            printf("\n");
9541        }
9542    }
9543    }
9544#endif
9545
9546    return(ret);
9547}
9548
9549
9550static int
9551test_xmlNodeSetContent(void) {
9552    int ret = 0;
9553
9554    int mem_base;
9555    xmlNodePtr cur; /* the node being modified */
9556    int n_cur;
9557    const xmlChar * content; /* the new value of the content */
9558    int n_content;
9559
9560    for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
9561    for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
9562        mem_base = xmlMemBlocks();
9563        cur = gen_xmlNodePtr(n_cur);
9564        content = gen_const_xmlChar_ptr(n_content);
9565
9566        xmlNodeSetContent(cur, content);
9567        call_tests++;
9568        des_xmlNodePtr(n_cur, cur);
9569        des_const_xmlChar_ptr(n_content, content);
9570        xmlResetLastError();
9571        if (mem_base != xmlMemBlocks()) {
9572            printf("Leak of %d blocks found in xmlNodeSetContent",
9573	           xmlMemBlocks() - mem_base);
9574	    ret++;
9575            printf(" %d", n_cur);
9576            printf(" %d", n_content);
9577            printf("\n");
9578        }
9579    }
9580    }
9581
9582    return(ret);
9583}
9584
9585
9586static int
9587test_xmlNodeSetContentLen(void) {
9588    int ret = 0;
9589
9590#ifdef LIBXML_TREE_ENABLED
9591    int mem_base;
9592    xmlNodePtr cur; /* the node being modified */
9593    int n_cur;
9594    const xmlChar * content; /* the new value of the content */
9595    int n_content;
9596    int len; /* the size of @content */
9597    int n_len;
9598
9599    for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
9600    for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
9601    for (n_len = 0;n_len < gen_nb_int;n_len++) {
9602        mem_base = xmlMemBlocks();
9603        cur = gen_xmlNodePtr(n_cur);
9604        content = gen_const_xmlChar_ptr(n_content);
9605        len = gen_int(n_len);
9606
9607        xmlNodeSetContentLen(cur, content, len);
9608        call_tests++;
9609        des_xmlNodePtr(n_cur, cur);
9610        des_const_xmlChar_ptr(n_content, content);
9611        des_int(n_len, len);
9612        xmlResetLastError();
9613        if (mem_base != xmlMemBlocks()) {
9614            printf("Leak of %d blocks found in xmlNodeSetContentLen",
9615	           xmlMemBlocks() - mem_base);
9616	    ret++;
9617            printf(" %d", n_cur);
9618            printf(" %d", n_content);
9619            printf(" %d", n_len);
9620            printf("\n");
9621        }
9622    }
9623    }
9624    }
9625#endif
9626
9627    return(ret);
9628}
9629
9630
9631static int
9632test_xmlNodeSetLang(void) {
9633    int ret = 0;
9634
9635#ifdef LIBXML_TREE_ENABLED
9636    int mem_base;
9637    xmlNodePtr cur; /* the node being changed */
9638    int n_cur;
9639    const xmlChar * lang; /* the language description */
9640    int n_lang;
9641
9642    for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
9643    for (n_lang = 0;n_lang < gen_nb_const_xmlChar_ptr;n_lang++) {
9644        mem_base = xmlMemBlocks();
9645        cur = gen_xmlNodePtr(n_cur);
9646        lang = gen_const_xmlChar_ptr(n_lang);
9647
9648        xmlNodeSetLang(cur, lang);
9649        call_tests++;
9650        des_xmlNodePtr(n_cur, cur);
9651        des_const_xmlChar_ptr(n_lang, lang);
9652        xmlResetLastError();
9653        if (mem_base != xmlMemBlocks()) {
9654            printf("Leak of %d blocks found in xmlNodeSetLang",
9655	           xmlMemBlocks() - mem_base);
9656	    ret++;
9657            printf(" %d", n_cur);
9658            printf(" %d", n_lang);
9659            printf("\n");
9660        }
9661    }
9662    }
9663#endif
9664
9665    return(ret);
9666}
9667
9668
9669static int
9670test_xmlNodeSetName(void) {
9671    int ret = 0;
9672
9673#ifdef LIBXML_TREE_ENABLED
9674    int mem_base;
9675    xmlNodePtr cur; /* the node being changed */
9676    int n_cur;
9677    const xmlChar * name; /* the new tag name */
9678    int n_name;
9679
9680    for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
9681    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
9682        mem_base = xmlMemBlocks();
9683        cur = gen_xmlNodePtr(n_cur);
9684        name = gen_const_xmlChar_ptr(n_name);
9685
9686        xmlNodeSetName(cur, name);
9687        call_tests++;
9688        des_xmlNodePtr(n_cur, cur);
9689        des_const_xmlChar_ptr(n_name, name);
9690        xmlResetLastError();
9691        if (mem_base != xmlMemBlocks()) {
9692            printf("Leak of %d blocks found in xmlNodeSetName",
9693	           xmlMemBlocks() - mem_base);
9694	    ret++;
9695            printf(" %d", n_cur);
9696            printf(" %d", n_name);
9697            printf("\n");
9698        }
9699    }
9700    }
9701#endif
9702
9703    return(ret);
9704}
9705
9706
9707static int
9708test_xmlNodeSetSpacePreserve(void) {
9709    int ret = 0;
9710
9711#ifdef LIBXML_TREE_ENABLED
9712    int mem_base;
9713    xmlNodePtr cur; /* the node being changed */
9714    int n_cur;
9715    int val; /* the xml:space value ("0": default, 1: "preserve") */
9716    int n_val;
9717
9718    for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
9719    for (n_val = 0;n_val < gen_nb_int;n_val++) {
9720        mem_base = xmlMemBlocks();
9721        cur = gen_xmlNodePtr(n_cur);
9722        val = gen_int(n_val);
9723
9724        xmlNodeSetSpacePreserve(cur, val);
9725        call_tests++;
9726        des_xmlNodePtr(n_cur, cur);
9727        des_int(n_val, val);
9728        xmlResetLastError();
9729        if (mem_base != xmlMemBlocks()) {
9730            printf("Leak of %d blocks found in xmlNodeSetSpacePreserve",
9731	           xmlMemBlocks() - mem_base);
9732	    ret++;
9733            printf(" %d", n_cur);
9734            printf(" %d", n_val);
9735            printf("\n");
9736        }
9737    }
9738    }
9739#endif
9740
9741    return(ret);
9742}
9743
9744
9745static int
9746test_xmlReconciliateNs(void) {
9747    int ret = 0;
9748
9749    int mem_base;
9750    int ret_val;
9751    xmlDocPtr doc; /* the document */
9752    int n_doc;
9753    xmlNodePtr tree; /* a node defining the subtree to reconciliate */
9754    int n_tree;
9755
9756    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
9757    for (n_tree = 0;n_tree < gen_nb_xmlNodePtr;n_tree++) {
9758        mem_base = xmlMemBlocks();
9759        doc = gen_xmlDocPtr(n_doc);
9760        tree = gen_xmlNodePtr(n_tree);
9761
9762        ret_val = xmlReconciliateNs(doc, tree);
9763        desret_int(ret_val);
9764        call_tests++;
9765        des_xmlDocPtr(n_doc, doc);
9766        des_xmlNodePtr(n_tree, tree);
9767        xmlResetLastError();
9768        if (mem_base != xmlMemBlocks()) {
9769            printf("Leak of %d blocks found in xmlReconciliateNs",
9770	           xmlMemBlocks() - mem_base);
9771	    ret++;
9772            printf(" %d", n_doc);
9773            printf(" %d", n_tree);
9774            printf("\n");
9775        }
9776    }
9777    }
9778
9779    return(ret);
9780}
9781
9782
9783static int
9784test_xmlRemoveProp(void) {
9785    int ret = 0;
9786
9787
9788    /* missing type support */
9789    return(ret);
9790}
9791
9792
9793static int
9794test_xmlReplaceNode(void) {
9795    int ret = 0;
9796
9797#ifdef LIBXML_TREE_ENABLED
9798    int mem_base;
9799    xmlNodePtr ret_val;
9800    xmlNodePtr old; /* the old node */
9801    int n_old;
9802    xmlNodePtr cur; /* the node */
9803    int n_cur;
9804
9805    for (n_old = 0;n_old < gen_nb_xmlNodePtr;n_old++) {
9806    for (n_cur = 0;n_cur < gen_nb_xmlNodePtr_in;n_cur++) {
9807        mem_base = xmlMemBlocks();
9808        old = gen_xmlNodePtr(n_old);
9809        cur = gen_xmlNodePtr_in(n_cur);
9810
9811        ret_val = xmlReplaceNode(old, cur);
9812        if ((old == NULL) || (old->parent == NULL)) {
9813              xmlFreeNode(cur) ; cur = NULL ; }
9814        desret_xmlNodePtr(ret_val);
9815        call_tests++;
9816        des_xmlNodePtr(n_old, old);
9817        des_xmlNodePtr_in(n_cur, cur);
9818        xmlResetLastError();
9819        if (mem_base != xmlMemBlocks()) {
9820            printf("Leak of %d blocks found in xmlReplaceNode",
9821	           xmlMemBlocks() - mem_base);
9822	    ret++;
9823            printf(" %d", n_old);
9824            printf(" %d", n_cur);
9825            printf("\n");
9826        }
9827    }
9828    }
9829#endif
9830
9831    return(ret);
9832}
9833
9834
9835static int
9836test_xmlSaveFile(void) {
9837    int ret = 0;
9838
9839#ifdef LIBXML_OUTPUT_ENABLED
9840    int mem_base;
9841    int ret_val;
9842    const char * filename; /* the filename (or URL) */
9843    int n_filename;
9844    xmlDocPtr cur; /* the document */
9845    int n_cur;
9846
9847    for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
9848    for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
9849        mem_base = xmlMemBlocks();
9850        filename = gen_fileoutput(n_filename);
9851        cur = gen_xmlDocPtr(n_cur);
9852
9853        ret_val = xmlSaveFile(filename, cur);
9854        desret_int(ret_val);
9855        call_tests++;
9856        des_fileoutput(n_filename, filename);
9857        des_xmlDocPtr(n_cur, cur);
9858        xmlResetLastError();
9859        if (mem_base != xmlMemBlocks()) {
9860            printf("Leak of %d blocks found in xmlSaveFile",
9861	           xmlMemBlocks() - mem_base);
9862	    ret++;
9863            printf(" %d", n_filename);
9864            printf(" %d", n_cur);
9865            printf("\n");
9866        }
9867    }
9868    }
9869#endif
9870
9871    return(ret);
9872}
9873
9874
9875static int
9876test_xmlSaveFileEnc(void) {
9877    int ret = 0;
9878
9879#ifdef LIBXML_OUTPUT_ENABLED
9880    int mem_base;
9881    int ret_val;
9882    const char * filename; /* the filename (or URL) */
9883    int n_filename;
9884    xmlDocPtr cur; /* the document */
9885    int n_cur;
9886    const char * encoding; /* the name of an encoding (or NULL) */
9887    int n_encoding;
9888
9889    for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
9890    for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
9891    for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
9892        mem_base = xmlMemBlocks();
9893        filename = gen_fileoutput(n_filename);
9894        cur = gen_xmlDocPtr(n_cur);
9895        encoding = gen_const_char_ptr(n_encoding);
9896
9897        ret_val = xmlSaveFileEnc(filename, cur, encoding);
9898        desret_int(ret_val);
9899        call_tests++;
9900        des_fileoutput(n_filename, filename);
9901        des_xmlDocPtr(n_cur, cur);
9902        des_const_char_ptr(n_encoding, encoding);
9903        xmlResetLastError();
9904        if (mem_base != xmlMemBlocks()) {
9905            printf("Leak of %d blocks found in xmlSaveFileEnc",
9906	           xmlMemBlocks() - mem_base);
9907	    ret++;
9908            printf(" %d", n_filename);
9909            printf(" %d", n_cur);
9910            printf(" %d", n_encoding);
9911            printf("\n");
9912        }
9913    }
9914    }
9915    }
9916#endif
9917
9918    return(ret);
9919}
9920
9921
9922static int
9923test_xmlSaveFileTo(void) {
9924    int ret = 0;
9925
9926
9927    /* missing type support */
9928    return(ret);
9929}
9930
9931
9932static int
9933test_xmlSaveFormatFile(void) {
9934    int ret = 0;
9935
9936#ifdef LIBXML_OUTPUT_ENABLED
9937    int mem_base;
9938    int ret_val;
9939    const char * filename; /* the filename (or URL) */
9940    int n_filename;
9941    xmlDocPtr cur; /* the document */
9942    int n_cur;
9943    int format; /* should formatting spaces been added */
9944    int n_format;
9945
9946    for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
9947    for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
9948    for (n_format = 0;n_format < gen_nb_int;n_format++) {
9949        mem_base = xmlMemBlocks();
9950        filename = gen_fileoutput(n_filename);
9951        cur = gen_xmlDocPtr(n_cur);
9952        format = gen_int(n_format);
9953
9954        ret_val = xmlSaveFormatFile(filename, cur, format);
9955        desret_int(ret_val);
9956        call_tests++;
9957        des_fileoutput(n_filename, filename);
9958        des_xmlDocPtr(n_cur, cur);
9959        des_int(n_format, format);
9960        xmlResetLastError();
9961        if (mem_base != xmlMemBlocks()) {
9962            printf("Leak of %d blocks found in xmlSaveFormatFile",
9963	           xmlMemBlocks() - mem_base);
9964	    ret++;
9965            printf(" %d", n_filename);
9966            printf(" %d", n_cur);
9967            printf(" %d", n_format);
9968            printf("\n");
9969        }
9970    }
9971    }
9972    }
9973#endif
9974
9975    return(ret);
9976}
9977
9978
9979static int
9980test_xmlSaveFormatFileEnc(void) {
9981    int ret = 0;
9982
9983#ifdef LIBXML_OUTPUT_ENABLED
9984    int mem_base;
9985    int ret_val;
9986    const char * filename; /* the filename or URL to output */
9987    int n_filename;
9988    xmlDocPtr cur; /* the document being saved */
9989    int n_cur;
9990    const char * encoding; /* the name of the encoding to use or NULL. */
9991    int n_encoding;
9992    int format; /* should formatting spaces be added. */
9993    int n_format;
9994
9995    for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
9996    for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
9997    for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
9998    for (n_format = 0;n_format < gen_nb_int;n_format++) {
9999        mem_base = xmlMemBlocks();
10000        filename = gen_fileoutput(n_filename);
10001        cur = gen_xmlDocPtr(n_cur);
10002        encoding = gen_const_char_ptr(n_encoding);
10003        format = gen_int(n_format);
10004
10005        ret_val = xmlSaveFormatFileEnc(filename, cur, encoding, format);
10006        desret_int(ret_val);
10007        call_tests++;
10008        des_fileoutput(n_filename, filename);
10009        des_xmlDocPtr(n_cur, cur);
10010        des_const_char_ptr(n_encoding, encoding);
10011        des_int(n_format, format);
10012        xmlResetLastError();
10013        if (mem_base != xmlMemBlocks()) {
10014            printf("Leak of %d blocks found in xmlSaveFormatFileEnc",
10015	           xmlMemBlocks() - mem_base);
10016	    ret++;
10017            printf(" %d", n_filename);
10018            printf(" %d", n_cur);
10019            printf(" %d", n_encoding);
10020            printf(" %d", n_format);
10021            printf("\n");
10022        }
10023    }
10024    }
10025    }
10026    }
10027#endif
10028
10029    return(ret);
10030}
10031
10032
10033static int
10034test_xmlSaveFormatFileTo(void) {
10035    int ret = 0;
10036
10037
10038    /* missing type support */
10039    return(ret);
10040}
10041
10042
10043static int
10044test_xmlSearchNs(void) {
10045    int ret = 0;
10046
10047
10048    /* missing type support */
10049    return(ret);
10050}
10051
10052
10053static int
10054test_xmlSearchNsByHref(void) {
10055    int ret = 0;
10056
10057
10058    /* missing type support */
10059    return(ret);
10060}
10061
10062
10063static int
10064test_xmlSetBufferAllocationScheme(void) {
10065    int ret = 0;
10066
10067
10068    /* missing type support */
10069    return(ret);
10070}
10071
10072
10073static int
10074test_xmlSetCompressMode(void) {
10075    int ret = 0;
10076
10077    int mem_base;
10078    int mode; /* the compression ratio */
10079    int n_mode;
10080
10081    for (n_mode = 0;n_mode < gen_nb_int;n_mode++) {
10082        mem_base = xmlMemBlocks();
10083        mode = gen_int(n_mode);
10084
10085        xmlSetCompressMode(mode);
10086        call_tests++;
10087        des_int(n_mode, mode);
10088        xmlResetLastError();
10089        if (mem_base != xmlMemBlocks()) {
10090            printf("Leak of %d blocks found in xmlSetCompressMode",
10091	           xmlMemBlocks() - mem_base);
10092	    ret++;
10093            printf(" %d", n_mode);
10094            printf("\n");
10095        }
10096    }
10097
10098    return(ret);
10099}
10100
10101
10102static int
10103test_xmlSetDocCompressMode(void) {
10104    int ret = 0;
10105
10106    int mem_base;
10107    xmlDocPtr doc; /* the document */
10108    int n_doc;
10109    int mode; /* the compression ratio */
10110    int n_mode;
10111
10112    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
10113    for (n_mode = 0;n_mode < gen_nb_int;n_mode++) {
10114        mem_base = xmlMemBlocks();
10115        doc = gen_xmlDocPtr(n_doc);
10116        mode = gen_int(n_mode);
10117
10118        xmlSetDocCompressMode(doc, mode);
10119        call_tests++;
10120        des_xmlDocPtr(n_doc, doc);
10121        des_int(n_mode, mode);
10122        xmlResetLastError();
10123        if (mem_base != xmlMemBlocks()) {
10124            printf("Leak of %d blocks found in xmlSetDocCompressMode",
10125	           xmlMemBlocks() - mem_base);
10126	    ret++;
10127            printf(" %d", n_doc);
10128            printf(" %d", n_mode);
10129            printf("\n");
10130        }
10131    }
10132    }
10133
10134    return(ret);
10135}
10136
10137
10138static int
10139test_xmlSetListDoc(void) {
10140    int ret = 0;
10141
10142    int mem_base;
10143    xmlNodePtr list; /* the first element */
10144    int n_list;
10145    xmlDocPtr doc; /* the document */
10146    int n_doc;
10147
10148    for (n_list = 0;n_list < gen_nb_xmlNodePtr;n_list++) {
10149    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
10150        mem_base = xmlMemBlocks();
10151        list = gen_xmlNodePtr(n_list);
10152        doc = gen_xmlDocPtr(n_doc);
10153
10154        xmlSetListDoc(list, doc);
10155        call_tests++;
10156        des_xmlNodePtr(n_list, list);
10157        des_xmlDocPtr(n_doc, doc);
10158        xmlResetLastError();
10159        if (mem_base != xmlMemBlocks()) {
10160            printf("Leak of %d blocks found in xmlSetListDoc",
10161	           xmlMemBlocks() - mem_base);
10162	    ret++;
10163            printf(" %d", n_list);
10164            printf(" %d", n_doc);
10165            printf("\n");
10166        }
10167    }
10168    }
10169
10170    return(ret);
10171}
10172
10173
10174static int
10175test_xmlSetNs(void) {
10176    int ret = 0;
10177
10178
10179    /* missing type support */
10180    return(ret);
10181}
10182
10183
10184static int
10185test_xmlSetNsProp(void) {
10186    int ret = 0;
10187
10188
10189    /* missing type support */
10190    return(ret);
10191}
10192
10193
10194static int
10195test_xmlSetProp(void) {
10196    int ret = 0;
10197
10198
10199    /* missing type support */
10200    return(ret);
10201}
10202
10203
10204static int
10205test_xmlSetTreeDoc(void) {
10206    int ret = 0;
10207
10208    int mem_base;
10209    xmlNodePtr tree; /* the top element */
10210    int n_tree;
10211    xmlDocPtr doc; /* the document */
10212    int n_doc;
10213
10214    for (n_tree = 0;n_tree < gen_nb_xmlNodePtr;n_tree++) {
10215    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
10216        mem_base = xmlMemBlocks();
10217        tree = gen_xmlNodePtr(n_tree);
10218        doc = gen_xmlDocPtr(n_doc);
10219
10220        xmlSetTreeDoc(tree, doc);
10221        call_tests++;
10222        des_xmlNodePtr(n_tree, tree);
10223        des_xmlDocPtr(n_doc, doc);
10224        xmlResetLastError();
10225        if (mem_base != xmlMemBlocks()) {
10226            printf("Leak of %d blocks found in xmlSetTreeDoc",
10227	           xmlMemBlocks() - mem_base);
10228	    ret++;
10229            printf(" %d", n_tree);
10230            printf(" %d", n_doc);
10231            printf("\n");
10232        }
10233    }
10234    }
10235
10236    return(ret);
10237}
10238
10239
10240static int
10241test_xmlSplitQName2(void) {
10242    int ret = 0;
10243
10244
10245    /* missing type support */
10246    return(ret);
10247}
10248
10249
10250static int
10251test_xmlSplitQName3(void) {
10252    int ret = 0;
10253
10254
10255    /* missing type support */
10256    return(ret);
10257}
10258
10259
10260static int
10261test_xmlStringGetNodeList(void) {
10262    int ret = 0;
10263
10264    int mem_base;
10265    xmlNodePtr ret_val;
10266    xmlDocPtr doc; /* the document */
10267    int n_doc;
10268    const xmlChar * value; /* the value of the attribute */
10269    int n_value;
10270
10271    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
10272    for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
10273        mem_base = xmlMemBlocks();
10274        doc = gen_xmlDocPtr(n_doc);
10275        value = gen_const_xmlChar_ptr(n_value);
10276
10277        ret_val = xmlStringGetNodeList(doc, value);
10278        desret_xmlNodePtr(ret_val);
10279        call_tests++;
10280        des_xmlDocPtr(n_doc, doc);
10281        des_const_xmlChar_ptr(n_value, value);
10282        xmlResetLastError();
10283        if (mem_base != xmlMemBlocks()) {
10284            printf("Leak of %d blocks found in xmlStringGetNodeList",
10285	           xmlMemBlocks() - mem_base);
10286	    ret++;
10287            printf(" %d", n_doc);
10288            printf(" %d", n_value);
10289            printf("\n");
10290        }
10291    }
10292    }
10293
10294    return(ret);
10295}
10296
10297
10298static int
10299test_xmlStringLenGetNodeList(void) {
10300    int ret = 0;
10301
10302    int mem_base;
10303    xmlNodePtr ret_val;
10304    xmlDocPtr doc; /* the document */
10305    int n_doc;
10306    const xmlChar * value; /* the value of the text */
10307    int n_value;
10308    int len; /* the length of the string value */
10309    int n_len;
10310
10311    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
10312    for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
10313    for (n_len = 0;n_len < gen_nb_int;n_len++) {
10314        mem_base = xmlMemBlocks();
10315        doc = gen_xmlDocPtr(n_doc);
10316        value = gen_const_xmlChar_ptr(n_value);
10317        len = gen_int(n_len);
10318
10319        ret_val = xmlStringLenGetNodeList(doc, value, len);
10320        desret_xmlNodePtr(ret_val);
10321        call_tests++;
10322        des_xmlDocPtr(n_doc, doc);
10323        des_const_xmlChar_ptr(n_value, value);
10324        des_int(n_len, len);
10325        xmlResetLastError();
10326        if (mem_base != xmlMemBlocks()) {
10327            printf("Leak of %d blocks found in xmlStringLenGetNodeList",
10328	           xmlMemBlocks() - mem_base);
10329	    ret++;
10330            printf(" %d", n_doc);
10331            printf(" %d", n_value);
10332            printf(" %d", n_len);
10333            printf("\n");
10334        }
10335    }
10336    }
10337    }
10338
10339    return(ret);
10340}
10341
10342
10343static int
10344test_xmlTextConcat(void) {
10345    int ret = 0;
10346
10347    int mem_base;
10348    int ret_val;
10349    xmlNodePtr node; /* the node */
10350    int n_node;
10351    const xmlChar * content; /* the content */
10352    int n_content;
10353    int len; /* @content length */
10354    int n_len;
10355
10356    for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
10357    for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
10358    for (n_len = 0;n_len < gen_nb_int;n_len++) {
10359        mem_base = xmlMemBlocks();
10360        node = gen_xmlNodePtr(n_node);
10361        content = gen_const_xmlChar_ptr(n_content);
10362        len = gen_int(n_len);
10363
10364        ret_val = xmlTextConcat(node, content, len);
10365        desret_int(ret_val);
10366        call_tests++;
10367        des_xmlNodePtr(n_node, node);
10368        des_const_xmlChar_ptr(n_content, content);
10369        des_int(n_len, len);
10370        xmlResetLastError();
10371        if (mem_base != xmlMemBlocks()) {
10372            printf("Leak of %d blocks found in xmlTextConcat",
10373	           xmlMemBlocks() - mem_base);
10374	    ret++;
10375            printf(" %d", n_node);
10376            printf(" %d", n_content);
10377            printf(" %d", n_len);
10378            printf("\n");
10379        }
10380    }
10381    }
10382    }
10383
10384    return(ret);
10385}
10386
10387
10388static int
10389test_xmlTextMerge(void) {
10390    int ret = 0;
10391
10392    int mem_base;
10393    xmlNodePtr ret_val;
10394    xmlNodePtr first; /* the first text node */
10395    int n_first;
10396    xmlNodePtr second; /* the second text node being merged */
10397    int n_second;
10398
10399    for (n_first = 0;n_first < gen_nb_xmlNodePtr_in;n_first++) {
10400    for (n_second = 0;n_second < gen_nb_xmlNodePtr_in;n_second++) {
10401        mem_base = xmlMemBlocks();
10402        first = gen_xmlNodePtr_in(n_first);
10403        second = gen_xmlNodePtr_in(n_second);
10404
10405        ret_val = xmlTextMerge(first, second);
10406        if ((first != NULL) && (first->type != XML_TEXT_NODE)) {
10407              xmlFreeNode(second) ; second = NULL ; }
10408        desret_xmlNodePtr(ret_val);
10409        call_tests++;
10410        des_xmlNodePtr_in(n_first, first);
10411        des_xmlNodePtr_in(n_second, second);
10412        xmlResetLastError();
10413        if (mem_base != xmlMemBlocks()) {
10414            printf("Leak of %d blocks found in xmlTextMerge",
10415	           xmlMemBlocks() - mem_base);
10416	    ret++;
10417            printf(" %d", n_first);
10418            printf(" %d", n_second);
10419            printf("\n");
10420        }
10421    }
10422    }
10423
10424    return(ret);
10425}
10426
10427
10428static int
10429test_xmlUnlinkNode(void) {
10430    int ret = 0;
10431
10432    int mem_base;
10433    xmlNodePtr cur; /* the node */
10434    int n_cur;
10435
10436    for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
10437        mem_base = xmlMemBlocks();
10438        cur = gen_xmlNodePtr(n_cur);
10439
10440        xmlUnlinkNode(cur);
10441        call_tests++;
10442        des_xmlNodePtr(n_cur, cur);
10443        xmlResetLastError();
10444        if (mem_base != xmlMemBlocks()) {
10445            printf("Leak of %d blocks found in xmlUnlinkNode",
10446	           xmlMemBlocks() - mem_base);
10447	    ret++;
10448            printf(" %d", n_cur);
10449            printf("\n");
10450        }
10451    }
10452
10453    return(ret);
10454}
10455
10456
10457static int
10458test_xmlUnsetNsProp(void) {
10459    int ret = 0;
10460
10461
10462    /* missing type support */
10463    return(ret);
10464}
10465
10466
10467static int
10468test_xmlUnsetProp(void) {
10469    int ret = 0;
10470
10471#ifdef LIBXML_TREE_ENABLED
10472    int mem_base;
10473    int ret_val;
10474    xmlNodePtr node; /* the node */
10475    int n_node;
10476    const xmlChar * name; /* the attribute name */
10477    int n_name;
10478
10479    for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
10480    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
10481        mem_base = xmlMemBlocks();
10482        node = gen_xmlNodePtr(n_node);
10483        name = gen_const_xmlChar_ptr(n_name);
10484
10485        ret_val = xmlUnsetProp(node, name);
10486        desret_int(ret_val);
10487        call_tests++;
10488        des_xmlNodePtr(n_node, node);
10489        des_const_xmlChar_ptr(n_name, name);
10490        xmlResetLastError();
10491        if (mem_base != xmlMemBlocks()) {
10492            printf("Leak of %d blocks found in xmlUnsetProp",
10493	           xmlMemBlocks() - mem_base);
10494	    ret++;
10495            printf(" %d", n_node);
10496            printf(" %d", n_name);
10497            printf("\n");
10498        }
10499    }
10500    }
10501#endif
10502
10503    return(ret);
10504}
10505
10506
10507static int
10508test_xmlValidateNCName(void) {
10509    int ret = 0;
10510
10511    int mem_base;
10512    int ret_val;
10513    const xmlChar * value; /* the value to check */
10514    int n_value;
10515    int space; /* allow spaces in front and end of the string */
10516    int n_space;
10517
10518    for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
10519    for (n_space = 0;n_space < gen_nb_int;n_space++) {
10520        mem_base = xmlMemBlocks();
10521        value = gen_const_xmlChar_ptr(n_value);
10522        space = gen_int(n_space);
10523
10524        ret_val = xmlValidateNCName(value, space);
10525        desret_int(ret_val);
10526        call_tests++;
10527        des_const_xmlChar_ptr(n_value, value);
10528        des_int(n_space, space);
10529        xmlResetLastError();
10530        if (mem_base != xmlMemBlocks()) {
10531            printf("Leak of %d blocks found in xmlValidateNCName",
10532	           xmlMemBlocks() - mem_base);
10533	    ret++;
10534            printf(" %d", n_value);
10535            printf(" %d", n_space);
10536            printf("\n");
10537        }
10538    }
10539    }
10540
10541    return(ret);
10542}
10543
10544
10545static int
10546test_xmlValidateNMToken(void) {
10547    int ret = 0;
10548
10549    int mem_base;
10550    int ret_val;
10551    const xmlChar * value; /* the value to check */
10552    int n_value;
10553    int space; /* allow spaces in front and end of the string */
10554    int n_space;
10555
10556    for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
10557    for (n_space = 0;n_space < gen_nb_int;n_space++) {
10558        mem_base = xmlMemBlocks();
10559        value = gen_const_xmlChar_ptr(n_value);
10560        space = gen_int(n_space);
10561
10562        ret_val = xmlValidateNMToken(value, space);
10563        desret_int(ret_val);
10564        call_tests++;
10565        des_const_xmlChar_ptr(n_value, value);
10566        des_int(n_space, space);
10567        xmlResetLastError();
10568        if (mem_base != xmlMemBlocks()) {
10569            printf("Leak of %d blocks found in xmlValidateNMToken",
10570	           xmlMemBlocks() - mem_base);
10571	    ret++;
10572            printf(" %d", n_value);
10573            printf(" %d", n_space);
10574            printf("\n");
10575        }
10576    }
10577    }
10578
10579    return(ret);
10580}
10581
10582
10583static int
10584test_xmlValidateName(void) {
10585    int ret = 0;
10586
10587    int mem_base;
10588    int ret_val;
10589    const xmlChar * value; /* the value to check */
10590    int n_value;
10591    int space; /* allow spaces in front and end of the string */
10592    int n_space;
10593
10594    for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
10595    for (n_space = 0;n_space < gen_nb_int;n_space++) {
10596        mem_base = xmlMemBlocks();
10597        value = gen_const_xmlChar_ptr(n_value);
10598        space = gen_int(n_space);
10599
10600        ret_val = xmlValidateName(value, space);
10601        desret_int(ret_val);
10602        call_tests++;
10603        des_const_xmlChar_ptr(n_value, value);
10604        des_int(n_space, space);
10605        xmlResetLastError();
10606        if (mem_base != xmlMemBlocks()) {
10607            printf("Leak of %d blocks found in xmlValidateName",
10608	           xmlMemBlocks() - mem_base);
10609	    ret++;
10610            printf(" %d", n_value);
10611            printf(" %d", n_space);
10612            printf("\n");
10613        }
10614    }
10615    }
10616
10617    return(ret);
10618}
10619
10620
10621static int
10622test_xmlValidateQName(void) {
10623    int ret = 0;
10624
10625    int mem_base;
10626    int ret_val;
10627    const xmlChar * value; /* the value to check */
10628    int n_value;
10629    int space; /* allow spaces in front and end of the string */
10630    int n_space;
10631
10632    for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
10633    for (n_space = 0;n_space < gen_nb_int;n_space++) {
10634        mem_base = xmlMemBlocks();
10635        value = gen_const_xmlChar_ptr(n_value);
10636        space = gen_int(n_space);
10637
10638        ret_val = xmlValidateQName(value, space);
10639        desret_int(ret_val);
10640        call_tests++;
10641        des_const_xmlChar_ptr(n_value, value);
10642        des_int(n_space, space);
10643        xmlResetLastError();
10644        if (mem_base != xmlMemBlocks()) {
10645            printf("Leak of %d blocks found in xmlValidateQName",
10646	           xmlMemBlocks() - mem_base);
10647	    ret++;
10648            printf(" %d", n_value);
10649            printf(" %d", n_space);
10650            printf("\n");
10651        }
10652    }
10653    }
10654
10655    return(ret);
10656}
10657
10658static int
10659test_tree(void) {
10660    int ret = 0;
10661
10662    printf("Testing tree ...\n");
10663    ret += test_xmlAddChild();
10664    ret += test_xmlAddChildList();
10665    ret += test_xmlAddNextSibling();
10666    ret += test_xmlAddPrevSibling();
10667    ret += test_xmlAddSibling();
10668    ret += test_xmlAttrSerializeTxtContent();
10669    ret += test_xmlBufferAdd();
10670    ret += test_xmlBufferAddHead();
10671    ret += test_xmlBufferCCat();
10672    ret += test_xmlBufferCat();
10673    ret += test_xmlBufferContent();
10674    ret += test_xmlBufferCreate();
10675    ret += test_xmlBufferCreateSize();
10676    ret += test_xmlBufferCreateStatic();
10677    ret += test_xmlBufferDump();
10678    ret += test_xmlBufferEmpty();
10679    ret += test_xmlBufferGrow();
10680    ret += test_xmlBufferLength();
10681    ret += test_xmlBufferResize();
10682    ret += test_xmlBufferSetAllocationScheme();
10683    ret += test_xmlBufferShrink();
10684    ret += test_xmlBufferWriteCHAR();
10685    ret += test_xmlBufferWriteChar();
10686    ret += test_xmlBufferWriteQuotedString();
10687    ret += test_xmlBuildQName();
10688    ret += test_xmlCopyDoc();
10689    ret += test_xmlCopyDtd();
10690    ret += test_xmlCopyNamespace();
10691    ret += test_xmlCopyNamespaceList();
10692    ret += test_xmlCopyNode();
10693    ret += test_xmlCopyNodeList();
10694    ret += test_xmlCopyProp();
10695    ret += test_xmlCopyPropList();
10696    ret += test_xmlCreateIntSubset();
10697    ret += test_xmlDocCopyNode();
10698    ret += test_xmlDocCopyNodeList();
10699    ret += test_xmlDocDump();
10700    ret += test_xmlDocDumpFormatMemory();
10701    ret += test_xmlDocDumpFormatMemoryEnc();
10702    ret += test_xmlDocDumpMemory();
10703    ret += test_xmlDocDumpMemoryEnc();
10704    ret += test_xmlDocFormatDump();
10705    ret += test_xmlDocGetRootElement();
10706    ret += test_xmlDocSetRootElement();
10707    ret += test_xmlElemDump();
10708    ret += test_xmlGetBufferAllocationScheme();
10709    ret += test_xmlGetCompressMode();
10710    ret += test_xmlGetDocCompressMode();
10711    ret += test_xmlGetIntSubset();
10712    ret += test_xmlGetLastChild();
10713    ret += test_xmlGetLineNo();
10714    ret += test_xmlGetNoNsProp();
10715    ret += test_xmlGetNodePath();
10716    ret += test_xmlGetNsList();
10717    ret += test_xmlGetNsProp();
10718    ret += test_xmlGetProp();
10719    ret += test_xmlHasNsProp();
10720    ret += test_xmlHasProp();
10721    ret += test_xmlIsBlankNode();
10722    ret += test_xmlIsXHTML();
10723    ret += test_xmlNewCDataBlock();
10724    ret += test_xmlNewCharRef();
10725    ret += test_xmlNewChild();
10726    ret += test_xmlNewComment();
10727    ret += test_xmlNewDoc();
10728    ret += test_xmlNewDocComment();
10729    ret += test_xmlNewDocFragment();
10730    ret += test_xmlNewDocNode();
10731    ret += test_xmlNewDocNodeEatName();
10732    ret += test_xmlNewDocPI();
10733    ret += test_xmlNewDocProp();
10734    ret += test_xmlNewDocRawNode();
10735    ret += test_xmlNewDocText();
10736    ret += test_xmlNewDocTextLen();
10737    ret += test_xmlNewDtd();
10738    ret += test_xmlNewGlobalNs();
10739    ret += test_xmlNewNode();
10740    ret += test_xmlNewNodeEatName();
10741    ret += test_xmlNewNs();
10742    ret += test_xmlNewNsProp();
10743    ret += test_xmlNewNsPropEatName();
10744    ret += test_xmlNewPI();
10745    ret += test_xmlNewProp();
10746    ret += test_xmlNewReference();
10747    ret += test_xmlNewText();
10748    ret += test_xmlNewTextChild();
10749    ret += test_xmlNewTextLen();
10750    ret += test_xmlNodeAddContent();
10751    ret += test_xmlNodeAddContentLen();
10752    ret += test_xmlNodeBufGetContent();
10753    ret += test_xmlNodeDump();
10754    ret += test_xmlNodeDumpOutput();
10755    ret += test_xmlNodeGetBase();
10756    ret += test_xmlNodeGetContent();
10757    ret += test_xmlNodeGetLang();
10758    ret += test_xmlNodeGetSpacePreserve();
10759    ret += test_xmlNodeIsText();
10760    ret += test_xmlNodeListGetRawString();
10761    ret += test_xmlNodeListGetString();
10762    ret += test_xmlNodeSetBase();
10763    ret += test_xmlNodeSetContent();
10764    ret += test_xmlNodeSetContentLen();
10765    ret += test_xmlNodeSetLang();
10766    ret += test_xmlNodeSetName();
10767    ret += test_xmlNodeSetSpacePreserve();
10768    ret += test_xmlReconciliateNs();
10769    ret += test_xmlRemoveProp();
10770    ret += test_xmlReplaceNode();
10771    ret += test_xmlSaveFile();
10772    ret += test_xmlSaveFileEnc();
10773    ret += test_xmlSaveFileTo();
10774    ret += test_xmlSaveFormatFile();
10775    ret += test_xmlSaveFormatFileEnc();
10776    ret += test_xmlSaveFormatFileTo();
10777    ret += test_xmlSearchNs();
10778    ret += test_xmlSearchNsByHref();
10779    ret += test_xmlSetBufferAllocationScheme();
10780    ret += test_xmlSetCompressMode();
10781    ret += test_xmlSetDocCompressMode();
10782    ret += test_xmlSetListDoc();
10783    ret += test_xmlSetNs();
10784    ret += test_xmlSetNsProp();
10785    ret += test_xmlSetProp();
10786    ret += test_xmlSetTreeDoc();
10787    ret += test_xmlSplitQName2();
10788    ret += test_xmlSplitQName3();
10789    ret += test_xmlStringGetNodeList();
10790    ret += test_xmlStringLenGetNodeList();
10791    ret += test_xmlTextConcat();
10792    ret += test_xmlTextMerge();
10793    ret += test_xmlUnlinkNode();
10794    ret += test_xmlUnsetNsProp();
10795    ret += test_xmlUnsetProp();
10796    ret += test_xmlValidateNCName();
10797    ret += test_xmlValidateNMToken();
10798    ret += test_xmlValidateName();
10799    ret += test_xmlValidateQName();
10800
10801    if (ret != 0)
10802	printf("Module tree: %d errors\n", ret);
10803    return(ret);
10804}
10805
10806static int
10807test_xmlBuildRelativeURI(void) {
10808    int ret = 0;
10809
10810    int mem_base;
10811    xmlChar * ret_val;
10812    const xmlChar * URI; /* the URI reference under consideration */
10813    int n_URI;
10814    const xmlChar * base; /* the base value */
10815    int n_base;
10816
10817    for (n_URI = 0;n_URI < gen_nb_const_xmlChar_ptr;n_URI++) {
10818    for (n_base = 0;n_base < gen_nb_const_xmlChar_ptr;n_base++) {
10819        mem_base = xmlMemBlocks();
10820        URI = gen_const_xmlChar_ptr(n_URI);
10821        base = gen_const_xmlChar_ptr(n_base);
10822
10823        ret_val = xmlBuildRelativeURI(URI, base);
10824        desret_xmlChar_ptr(ret_val);
10825        call_tests++;
10826        des_const_xmlChar_ptr(n_URI, URI);
10827        des_const_xmlChar_ptr(n_base, base);
10828        xmlResetLastError();
10829        if (mem_base != xmlMemBlocks()) {
10830            printf("Leak of %d blocks found in xmlBuildRelativeURI",
10831	           xmlMemBlocks() - mem_base);
10832	    ret++;
10833            printf(" %d", n_URI);
10834            printf(" %d", n_base);
10835            printf("\n");
10836        }
10837    }
10838    }
10839
10840    return(ret);
10841}
10842
10843
10844static int
10845test_xmlBuildURI(void) {
10846    int ret = 0;
10847
10848    int mem_base;
10849    xmlChar * ret_val;
10850    const xmlChar * URI; /* the URI instance found in the document */
10851    int n_URI;
10852    const xmlChar * base; /* the base value */
10853    int n_base;
10854
10855    for (n_URI = 0;n_URI < gen_nb_const_xmlChar_ptr;n_URI++) {
10856    for (n_base = 0;n_base < gen_nb_const_xmlChar_ptr;n_base++) {
10857        mem_base = xmlMemBlocks();
10858        URI = gen_const_xmlChar_ptr(n_URI);
10859        base = gen_const_xmlChar_ptr(n_base);
10860
10861        ret_val = xmlBuildURI(URI, base);
10862        desret_xmlChar_ptr(ret_val);
10863        call_tests++;
10864        des_const_xmlChar_ptr(n_URI, URI);
10865        des_const_xmlChar_ptr(n_base, base);
10866        xmlResetLastError();
10867        if (mem_base != xmlMemBlocks()) {
10868            printf("Leak of %d blocks found in xmlBuildURI",
10869	           xmlMemBlocks() - mem_base);
10870	    ret++;
10871            printf(" %d", n_URI);
10872            printf(" %d", n_base);
10873            printf("\n");
10874        }
10875    }
10876    }
10877
10878    return(ret);
10879}
10880
10881
10882static int
10883test_xmlCanonicPath(void) {
10884    int ret = 0;
10885
10886    int mem_base;
10887    xmlChar * ret_val;
10888    const xmlChar * path; /* the resource locator in a filesystem notation */
10889    int n_path;
10890
10891    for (n_path = 0;n_path < gen_nb_const_xmlChar_ptr;n_path++) {
10892        mem_base = xmlMemBlocks();
10893        path = gen_const_xmlChar_ptr(n_path);
10894
10895        ret_val = xmlCanonicPath(path);
10896        desret_xmlChar_ptr(ret_val);
10897        call_tests++;
10898        des_const_xmlChar_ptr(n_path, path);
10899        xmlResetLastError();
10900        if (mem_base != xmlMemBlocks()) {
10901            printf("Leak of %d blocks found in xmlCanonicPath",
10902	           xmlMemBlocks() - mem_base);
10903	    ret++;
10904            printf(" %d", n_path);
10905            printf("\n");
10906        }
10907    }
10908
10909    return(ret);
10910}
10911
10912
10913static int
10914test_xmlCreateURI(void) {
10915    int ret = 0;
10916
10917
10918    /* missing type support */
10919    return(ret);
10920}
10921
10922
10923static int
10924test_xmlNormalizeURIPath(void) {
10925    int ret = 0;
10926
10927
10928    /* missing type support */
10929    return(ret);
10930}
10931
10932
10933static int
10934test_xmlParseURI(void) {
10935    int ret = 0;
10936
10937
10938    /* missing type support */
10939    return(ret);
10940}
10941
10942
10943static int
10944test_xmlParseURIReference(void) {
10945    int ret = 0;
10946
10947
10948    /* missing type support */
10949    return(ret);
10950}
10951
10952
10953static int
10954test_xmlPrintURI(void) {
10955    int ret = 0;
10956
10957
10958    /* missing type support */
10959    return(ret);
10960}
10961
10962
10963static int
10964test_xmlSaveUri(void) {
10965    int ret = 0;
10966
10967
10968    /* missing type support */
10969    return(ret);
10970}
10971
10972
10973static int
10974test_xmlURIEscape(void) {
10975    int ret = 0;
10976
10977    int mem_base;
10978    xmlChar * ret_val;
10979    const xmlChar * str; /* the string of the URI to escape */
10980    int n_str;
10981
10982    for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
10983        mem_base = xmlMemBlocks();
10984        str = gen_const_xmlChar_ptr(n_str);
10985
10986        ret_val = xmlURIEscape(str);
10987        desret_xmlChar_ptr(ret_val);
10988        call_tests++;
10989        des_const_xmlChar_ptr(n_str, str);
10990        xmlResetLastError();
10991        if (mem_base != xmlMemBlocks()) {
10992            printf("Leak of %d blocks found in xmlURIEscape",
10993	           xmlMemBlocks() - mem_base);
10994	    ret++;
10995            printf(" %d", n_str);
10996            printf("\n");
10997        }
10998    }
10999
11000    return(ret);
11001}
11002
11003
11004static int
11005test_xmlURIEscapeStr(void) {
11006    int ret = 0;
11007
11008    int mem_base;
11009    xmlChar * ret_val;
11010    const xmlChar * str; /* string to escape */
11011    int n_str;
11012    const xmlChar * list; /* exception list string of chars not to escape */
11013    int n_list;
11014
11015    for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
11016    for (n_list = 0;n_list < gen_nb_const_xmlChar_ptr;n_list++) {
11017        mem_base = xmlMemBlocks();
11018        str = gen_const_xmlChar_ptr(n_str);
11019        list = gen_const_xmlChar_ptr(n_list);
11020
11021        ret_val = xmlURIEscapeStr(str, list);
11022        desret_xmlChar_ptr(ret_val);
11023        call_tests++;
11024        des_const_xmlChar_ptr(n_str, str);
11025        des_const_xmlChar_ptr(n_list, list);
11026        xmlResetLastError();
11027        if (mem_base != xmlMemBlocks()) {
11028            printf("Leak of %d blocks found in xmlURIEscapeStr",
11029	           xmlMemBlocks() - mem_base);
11030	    ret++;
11031            printf(" %d", n_str);
11032            printf(" %d", n_list);
11033            printf("\n");
11034        }
11035    }
11036    }
11037
11038    return(ret);
11039}
11040
11041
11042static int
11043test_xmlURIUnescapeString(void) {
11044    int ret = 0;
11045
11046
11047    /* missing type support */
11048    return(ret);
11049}
11050
11051static int
11052test_uri(void) {
11053    int ret = 0;
11054
11055    printf("Testing uri ...\n");
11056    ret += test_xmlBuildRelativeURI();
11057    ret += test_xmlBuildURI();
11058    ret += test_xmlCanonicPath();
11059    ret += test_xmlCreateURI();
11060    ret += test_xmlNormalizeURIPath();
11061    ret += test_xmlParseURI();
11062    ret += test_xmlParseURIReference();
11063    ret += test_xmlPrintURI();
11064    ret += test_xmlSaveUri();
11065    ret += test_xmlURIEscape();
11066    ret += test_xmlURIEscapeStr();
11067    ret += test_xmlURIUnescapeString();
11068
11069    if (ret != 0)
11070	printf("Module uri: %d errors\n", ret);
11071    return(ret);
11072}
11073
11074static int
11075test_xmlAddAttributeDecl(void) {
11076    int ret = 0;
11077
11078
11079    /* missing type support */
11080    return(ret);
11081}
11082
11083
11084static int
11085test_xmlAddElementDecl(void) {
11086    int ret = 0;
11087
11088
11089    /* missing type support */
11090    return(ret);
11091}
11092
11093
11094static int
11095test_xmlAddID(void) {
11096    int ret = 0;
11097
11098
11099    /* missing type support */
11100    return(ret);
11101}
11102
11103
11104static int
11105test_xmlAddNotationDecl(void) {
11106    int ret = 0;
11107
11108
11109    /* missing type support */
11110    return(ret);
11111}
11112
11113
11114static int
11115test_xmlAddRef(void) {
11116    int ret = 0;
11117
11118
11119    /* missing type support */
11120    return(ret);
11121}
11122
11123
11124static int
11125test_xmlCopyAttributeTable(void) {
11126    int ret = 0;
11127
11128
11129    /* missing type support */
11130    return(ret);
11131}
11132
11133
11134static int
11135test_xmlCopyElementContent(void) {
11136    int ret = 0;
11137
11138
11139    /* missing type support */
11140    return(ret);
11141}
11142
11143
11144static int
11145test_xmlCopyElementTable(void) {
11146    int ret = 0;
11147
11148
11149    /* missing type support */
11150    return(ret);
11151}
11152
11153
11154static int
11155test_xmlCopyEnumeration(void) {
11156    int ret = 0;
11157
11158
11159    /* missing type support */
11160    return(ret);
11161}
11162
11163
11164static int
11165test_xmlCopyNotationTable(void) {
11166    int ret = 0;
11167
11168
11169    /* missing type support */
11170    return(ret);
11171}
11172
11173
11174static int
11175test_xmlCreateEnumeration(void) {
11176    int ret = 0;
11177
11178
11179    /* missing type support */
11180    return(ret);
11181}
11182
11183
11184static int
11185test_xmlDumpAttributeDecl(void) {
11186    int ret = 0;
11187
11188
11189    /* missing type support */
11190    return(ret);
11191}
11192
11193
11194static int
11195test_xmlDumpAttributeTable(void) {
11196    int ret = 0;
11197
11198
11199    /* missing type support */
11200    return(ret);
11201}
11202
11203
11204static int
11205test_xmlDumpElementDecl(void) {
11206    int ret = 0;
11207
11208
11209    /* missing type support */
11210    return(ret);
11211}
11212
11213
11214static int
11215test_xmlDumpElementTable(void) {
11216    int ret = 0;
11217
11218
11219    /* missing type support */
11220    return(ret);
11221}
11222
11223
11224static int
11225test_xmlDumpNotationDecl(void) {
11226    int ret = 0;
11227
11228
11229    /* missing type support */
11230    return(ret);
11231}
11232
11233
11234static int
11235test_xmlDumpNotationTable(void) {
11236    int ret = 0;
11237
11238
11239    /* missing type support */
11240    return(ret);
11241}
11242
11243
11244static int
11245test_xmlGetDtdAttrDesc(void) {
11246    int ret = 0;
11247
11248
11249    /* missing type support */
11250    return(ret);
11251}
11252
11253
11254static int
11255test_xmlGetDtdElementDesc(void) {
11256    int ret = 0;
11257
11258
11259    /* missing type support */
11260    return(ret);
11261}
11262
11263
11264static int
11265test_xmlGetDtdNotationDesc(void) {
11266    int ret = 0;
11267
11268
11269    /* missing type support */
11270    return(ret);
11271}
11272
11273
11274static int
11275test_xmlGetDtdQAttrDesc(void) {
11276    int ret = 0;
11277
11278
11279    /* missing type support */
11280    return(ret);
11281}
11282
11283
11284static int
11285test_xmlGetDtdQElementDesc(void) {
11286    int ret = 0;
11287
11288
11289    /* missing type support */
11290    return(ret);
11291}
11292
11293
11294static int
11295test_xmlGetID(void) {
11296    int ret = 0;
11297
11298
11299    /* missing type support */
11300    return(ret);
11301}
11302
11303
11304static int
11305test_xmlGetRefs(void) {
11306    int ret = 0;
11307
11308
11309    /* missing type support */
11310    return(ret);
11311}
11312
11313
11314static int
11315test_xmlIsID(void) {
11316    int ret = 0;
11317
11318
11319    /* missing type support */
11320    return(ret);
11321}
11322
11323
11324static int
11325test_xmlIsMixedElement(void) {
11326    int ret = 0;
11327
11328    int mem_base;
11329    int ret_val;
11330    xmlDocPtr doc; /* the document */
11331    int n_doc;
11332    const xmlChar * name; /* the element name */
11333    int n_name;
11334
11335    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
11336    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
11337        mem_base = xmlMemBlocks();
11338        doc = gen_xmlDocPtr(n_doc);
11339        name = gen_const_xmlChar_ptr(n_name);
11340
11341        ret_val = xmlIsMixedElement(doc, name);
11342        desret_int(ret_val);
11343        call_tests++;
11344        des_xmlDocPtr(n_doc, doc);
11345        des_const_xmlChar_ptr(n_name, name);
11346        xmlResetLastError();
11347        if (mem_base != xmlMemBlocks()) {
11348            printf("Leak of %d blocks found in xmlIsMixedElement",
11349	           xmlMemBlocks() - mem_base);
11350	    ret++;
11351            printf(" %d", n_doc);
11352            printf(" %d", n_name);
11353            printf("\n");
11354        }
11355    }
11356    }
11357
11358    return(ret);
11359}
11360
11361
11362static int
11363test_xmlIsRef(void) {
11364    int ret = 0;
11365
11366
11367    /* missing type support */
11368    return(ret);
11369}
11370
11371
11372static int
11373test_xmlNewElementContent(void) {
11374    int ret = 0;
11375
11376
11377    /* missing type support */
11378    return(ret);
11379}
11380
11381
11382static int
11383test_xmlNewValidCtxt(void) {
11384    int ret = 0;
11385
11386
11387    /* missing type support */
11388    return(ret);
11389}
11390
11391
11392static int
11393test_xmlRemoveID(void) {
11394    int ret = 0;
11395
11396
11397    /* missing type support */
11398    return(ret);
11399}
11400
11401
11402static int
11403test_xmlRemoveRef(void) {
11404    int ret = 0;
11405
11406
11407    /* missing type support */
11408    return(ret);
11409}
11410
11411
11412static int
11413test_xmlSnprintfElementContent(void) {
11414    int ret = 0;
11415
11416
11417    /* missing type support */
11418    return(ret);
11419}
11420
11421
11422static int
11423test_xmlSprintfElementContent(void) {
11424    int ret = 0;
11425
11426
11427    /* missing type support */
11428    return(ret);
11429}
11430
11431
11432static int
11433test_xmlValidBuildContentModel(void) {
11434    int ret = 0;
11435
11436
11437    /* missing type support */
11438    return(ret);
11439}
11440
11441
11442static int
11443test_xmlValidCtxtNormalizeAttributeValue(void) {
11444    int ret = 0;
11445
11446#ifdef LIBXML_VALID_ENABLED
11447    int mem_base;
11448    xmlChar * ret_val;
11449    xmlValidCtxtPtr ctxt; /* the validation context or NULL */
11450    int n_ctxt;
11451    xmlDocPtr doc; /* the document */
11452    int n_doc;
11453    xmlNodePtr elem; /* the parent */
11454    int n_elem;
11455    const xmlChar * name; /* the attribute name */
11456    int n_name;
11457    const xmlChar * value; /* the attribute value */
11458    int n_value;
11459
11460    for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
11461    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
11462    for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
11463    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
11464    for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
11465        mem_base = xmlMemBlocks();
11466        ctxt = gen_xmlValidCtxtPtr(n_ctxt);
11467        doc = gen_xmlDocPtr(n_doc);
11468        elem = gen_xmlNodePtr(n_elem);
11469        name = gen_const_xmlChar_ptr(n_name);
11470        value = gen_const_xmlChar_ptr(n_value);
11471
11472        ret_val = xmlValidCtxtNormalizeAttributeValue(ctxt, doc, elem, name, value);
11473        desret_xmlChar_ptr(ret_val);
11474        call_tests++;
11475        des_xmlValidCtxtPtr(n_ctxt, ctxt);
11476        des_xmlDocPtr(n_doc, doc);
11477        des_xmlNodePtr(n_elem, elem);
11478        des_const_xmlChar_ptr(n_name, name);
11479        des_const_xmlChar_ptr(n_value, value);
11480        xmlResetLastError();
11481        if (mem_base != xmlMemBlocks()) {
11482            printf("Leak of %d blocks found in xmlValidCtxtNormalizeAttributeValue",
11483	           xmlMemBlocks() - mem_base);
11484	    ret++;
11485            printf(" %d", n_ctxt);
11486            printf(" %d", n_doc);
11487            printf(" %d", n_elem);
11488            printf(" %d", n_name);
11489            printf(" %d", n_value);
11490            printf("\n");
11491        }
11492    }
11493    }
11494    }
11495    }
11496    }
11497#endif
11498
11499    return(ret);
11500}
11501
11502
11503static int
11504test_xmlValidGetPotentialChildren(void) {
11505    int ret = 0;
11506
11507
11508    /* missing type support */
11509    return(ret);
11510}
11511
11512
11513static int
11514test_xmlValidGetValidElements(void) {
11515    int ret = 0;
11516
11517
11518    /* missing type support */
11519    return(ret);
11520}
11521
11522
11523static int
11524test_xmlValidNormalizeAttributeValue(void) {
11525    int ret = 0;
11526
11527#ifdef LIBXML_VALID_ENABLED
11528    int mem_base;
11529    xmlChar * ret_val;
11530    xmlDocPtr doc; /* the document */
11531    int n_doc;
11532    xmlNodePtr elem; /* the parent */
11533    int n_elem;
11534    const xmlChar * name; /* the attribute name */
11535    int n_name;
11536    const xmlChar * value; /* the attribute value */
11537    int n_value;
11538
11539    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
11540    for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
11541    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
11542    for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
11543        mem_base = xmlMemBlocks();
11544        doc = gen_xmlDocPtr(n_doc);
11545        elem = gen_xmlNodePtr(n_elem);
11546        name = gen_const_xmlChar_ptr(n_name);
11547        value = gen_const_xmlChar_ptr(n_value);
11548
11549        ret_val = xmlValidNormalizeAttributeValue(doc, elem, name, value);
11550        desret_xmlChar_ptr(ret_val);
11551        call_tests++;
11552        des_xmlDocPtr(n_doc, doc);
11553        des_xmlNodePtr(n_elem, elem);
11554        des_const_xmlChar_ptr(n_name, name);
11555        des_const_xmlChar_ptr(n_value, value);
11556        xmlResetLastError();
11557        if (mem_base != xmlMemBlocks()) {
11558            printf("Leak of %d blocks found in xmlValidNormalizeAttributeValue",
11559	           xmlMemBlocks() - mem_base);
11560	    ret++;
11561            printf(" %d", n_doc);
11562            printf(" %d", n_elem);
11563            printf(" %d", n_name);
11564            printf(" %d", n_value);
11565            printf("\n");
11566        }
11567    }
11568    }
11569    }
11570    }
11571#endif
11572
11573    return(ret);
11574}
11575
11576
11577static int
11578test_xmlValidateAttributeDecl(void) {
11579    int ret = 0;
11580
11581
11582    /* missing type support */
11583    return(ret);
11584}
11585
11586
11587static int
11588test_xmlValidateAttributeValue(void) {
11589    int ret = 0;
11590
11591
11592    /* missing type support */
11593    return(ret);
11594}
11595
11596
11597static int
11598test_xmlValidateDocument(void) {
11599    int ret = 0;
11600
11601#ifdef LIBXML_VALID_ENABLED
11602    int mem_base;
11603    int ret_val;
11604    xmlValidCtxtPtr ctxt; /* the validation context */
11605    int n_ctxt;
11606    xmlDocPtr doc; /* a document instance */
11607    int n_doc;
11608
11609    for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
11610    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
11611        mem_base = xmlMemBlocks();
11612        ctxt = gen_xmlValidCtxtPtr(n_ctxt);
11613        doc = gen_xmlDocPtr(n_doc);
11614
11615        ret_val = xmlValidateDocument(ctxt, doc);
11616        desret_int(ret_val);
11617        call_tests++;
11618        des_xmlValidCtxtPtr(n_ctxt, ctxt);
11619        des_xmlDocPtr(n_doc, doc);
11620        xmlResetLastError();
11621        if (mem_base != xmlMemBlocks()) {
11622            printf("Leak of %d blocks found in xmlValidateDocument",
11623	           xmlMemBlocks() - mem_base);
11624	    ret++;
11625            printf(" %d", n_ctxt);
11626            printf(" %d", n_doc);
11627            printf("\n");
11628        }
11629    }
11630    }
11631#endif
11632
11633    return(ret);
11634}
11635
11636
11637static int
11638test_xmlValidateDocumentFinal(void) {
11639    int ret = 0;
11640
11641#ifdef LIBXML_VALID_ENABLED
11642    int mem_base;
11643    int ret_val;
11644    xmlValidCtxtPtr ctxt; /* the validation context */
11645    int n_ctxt;
11646    xmlDocPtr doc; /* a document instance */
11647    int n_doc;
11648
11649    for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
11650    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
11651        mem_base = xmlMemBlocks();
11652        ctxt = gen_xmlValidCtxtPtr(n_ctxt);
11653        doc = gen_xmlDocPtr(n_doc);
11654
11655        ret_val = xmlValidateDocumentFinal(ctxt, doc);
11656        desret_int(ret_val);
11657        call_tests++;
11658        des_xmlValidCtxtPtr(n_ctxt, ctxt);
11659        des_xmlDocPtr(n_doc, doc);
11660        xmlResetLastError();
11661        if (mem_base != xmlMemBlocks()) {
11662            printf("Leak of %d blocks found in xmlValidateDocumentFinal",
11663	           xmlMemBlocks() - mem_base);
11664	    ret++;
11665            printf(" %d", n_ctxt);
11666            printf(" %d", n_doc);
11667            printf("\n");
11668        }
11669    }
11670    }
11671#endif
11672
11673    return(ret);
11674}
11675
11676
11677static int
11678test_xmlValidateDtd(void) {
11679    int ret = 0;
11680
11681
11682    /* missing type support */
11683    return(ret);
11684}
11685
11686
11687static int
11688test_xmlValidateDtdFinal(void) {
11689    int ret = 0;
11690
11691#ifdef LIBXML_VALID_ENABLED
11692    int mem_base;
11693    int ret_val;
11694    xmlValidCtxtPtr ctxt; /* the validation context */
11695    int n_ctxt;
11696    xmlDocPtr doc; /* a document instance */
11697    int n_doc;
11698
11699    for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
11700    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
11701        mem_base = xmlMemBlocks();
11702        ctxt = gen_xmlValidCtxtPtr(n_ctxt);
11703        doc = gen_xmlDocPtr(n_doc);
11704
11705        ret_val = xmlValidateDtdFinal(ctxt, doc);
11706        desret_int(ret_val);
11707        call_tests++;
11708        des_xmlValidCtxtPtr(n_ctxt, ctxt);
11709        des_xmlDocPtr(n_doc, doc);
11710        xmlResetLastError();
11711        if (mem_base != xmlMemBlocks()) {
11712            printf("Leak of %d blocks found in xmlValidateDtdFinal",
11713	           xmlMemBlocks() - mem_base);
11714	    ret++;
11715            printf(" %d", n_ctxt);
11716            printf(" %d", n_doc);
11717            printf("\n");
11718        }
11719    }
11720    }
11721#endif
11722
11723    return(ret);
11724}
11725
11726
11727static int
11728test_xmlValidateElement(void) {
11729    int ret = 0;
11730
11731#ifdef LIBXML_VALID_ENABLED
11732    int mem_base;
11733    int ret_val;
11734    xmlValidCtxtPtr ctxt; /* the validation context */
11735    int n_ctxt;
11736    xmlDocPtr doc; /* a document instance */
11737    int n_doc;
11738    xmlNodePtr elem; /* an element instance */
11739    int n_elem;
11740
11741    for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
11742    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
11743    for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
11744        mem_base = xmlMemBlocks();
11745        ctxt = gen_xmlValidCtxtPtr(n_ctxt);
11746        doc = gen_xmlDocPtr(n_doc);
11747        elem = gen_xmlNodePtr(n_elem);
11748
11749        ret_val = xmlValidateElement(ctxt, doc, elem);
11750        desret_int(ret_val);
11751        call_tests++;
11752        des_xmlValidCtxtPtr(n_ctxt, ctxt);
11753        des_xmlDocPtr(n_doc, doc);
11754        des_xmlNodePtr(n_elem, elem);
11755        xmlResetLastError();
11756        if (mem_base != xmlMemBlocks()) {
11757            printf("Leak of %d blocks found in xmlValidateElement",
11758	           xmlMemBlocks() - mem_base);
11759	    ret++;
11760            printf(" %d", n_ctxt);
11761            printf(" %d", n_doc);
11762            printf(" %d", n_elem);
11763            printf("\n");
11764        }
11765    }
11766    }
11767    }
11768#endif
11769
11770    return(ret);
11771}
11772
11773
11774static int
11775test_xmlValidateElementDecl(void) {
11776    int ret = 0;
11777
11778
11779    /* missing type support */
11780    return(ret);
11781}
11782
11783
11784static int
11785test_xmlValidateNameValue(void) {
11786    int ret = 0;
11787
11788#ifdef LIBXML_VALID_ENABLED
11789    int mem_base;
11790    int ret_val;
11791    const xmlChar * value; /* an Name value */
11792    int n_value;
11793
11794    for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
11795        mem_base = xmlMemBlocks();
11796        value = gen_const_xmlChar_ptr(n_value);
11797
11798        ret_val = xmlValidateNameValue(value);
11799        desret_int(ret_val);
11800        call_tests++;
11801        des_const_xmlChar_ptr(n_value, value);
11802        xmlResetLastError();
11803        if (mem_base != xmlMemBlocks()) {
11804            printf("Leak of %d blocks found in xmlValidateNameValue",
11805	           xmlMemBlocks() - mem_base);
11806	    ret++;
11807            printf(" %d", n_value);
11808            printf("\n");
11809        }
11810    }
11811#endif
11812
11813    return(ret);
11814}
11815
11816
11817static int
11818test_xmlValidateNamesValue(void) {
11819    int ret = 0;
11820
11821#ifdef LIBXML_VALID_ENABLED
11822    int mem_base;
11823    int ret_val;
11824    const xmlChar * value; /* an Names value */
11825    int n_value;
11826
11827    for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
11828        mem_base = xmlMemBlocks();
11829        value = gen_const_xmlChar_ptr(n_value);
11830
11831        ret_val = xmlValidateNamesValue(value);
11832        desret_int(ret_val);
11833        call_tests++;
11834        des_const_xmlChar_ptr(n_value, value);
11835        xmlResetLastError();
11836        if (mem_base != xmlMemBlocks()) {
11837            printf("Leak of %d blocks found in xmlValidateNamesValue",
11838	           xmlMemBlocks() - mem_base);
11839	    ret++;
11840            printf(" %d", n_value);
11841            printf("\n");
11842        }
11843    }
11844#endif
11845
11846    return(ret);
11847}
11848
11849
11850static int
11851test_xmlValidateNmtokenValue(void) {
11852    int ret = 0;
11853
11854#ifdef LIBXML_VALID_ENABLED
11855    int mem_base;
11856    int ret_val;
11857    const xmlChar * value; /* an Nmtoken value */
11858    int n_value;
11859
11860    for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
11861        mem_base = xmlMemBlocks();
11862        value = gen_const_xmlChar_ptr(n_value);
11863
11864        ret_val = xmlValidateNmtokenValue(value);
11865        desret_int(ret_val);
11866        call_tests++;
11867        des_const_xmlChar_ptr(n_value, value);
11868        xmlResetLastError();
11869        if (mem_base != xmlMemBlocks()) {
11870            printf("Leak of %d blocks found in xmlValidateNmtokenValue",
11871	           xmlMemBlocks() - mem_base);
11872	    ret++;
11873            printf(" %d", n_value);
11874            printf("\n");
11875        }
11876    }
11877#endif
11878
11879    return(ret);
11880}
11881
11882
11883static int
11884test_xmlValidateNmtokensValue(void) {
11885    int ret = 0;
11886
11887#ifdef LIBXML_VALID_ENABLED
11888    int mem_base;
11889    int ret_val;
11890    const xmlChar * value; /* an Nmtokens value */
11891    int n_value;
11892
11893    for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
11894        mem_base = xmlMemBlocks();
11895        value = gen_const_xmlChar_ptr(n_value);
11896
11897        ret_val = xmlValidateNmtokensValue(value);
11898        desret_int(ret_val);
11899        call_tests++;
11900        des_const_xmlChar_ptr(n_value, value);
11901        xmlResetLastError();
11902        if (mem_base != xmlMemBlocks()) {
11903            printf("Leak of %d blocks found in xmlValidateNmtokensValue",
11904	           xmlMemBlocks() - mem_base);
11905	    ret++;
11906            printf(" %d", n_value);
11907            printf("\n");
11908        }
11909    }
11910#endif
11911
11912    return(ret);
11913}
11914
11915
11916static int
11917test_xmlValidateNotationDecl(void) {
11918    int ret = 0;
11919
11920
11921    /* missing type support */
11922    return(ret);
11923}
11924
11925
11926static int
11927test_xmlValidateNotationUse(void) {
11928    int ret = 0;
11929
11930#ifdef LIBXML_VALID_ENABLED
11931    int mem_base;
11932    int ret_val;
11933    xmlValidCtxtPtr ctxt; /* the validation context */
11934    int n_ctxt;
11935    xmlDocPtr doc; /* the document */
11936    int n_doc;
11937    const xmlChar * notationName; /* the notation name to check */
11938    int n_notationName;
11939
11940    for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
11941    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
11942    for (n_notationName = 0;n_notationName < gen_nb_const_xmlChar_ptr;n_notationName++) {
11943        mem_base = xmlMemBlocks();
11944        ctxt = gen_xmlValidCtxtPtr(n_ctxt);
11945        doc = gen_xmlDocPtr(n_doc);
11946        notationName = gen_const_xmlChar_ptr(n_notationName);
11947
11948        ret_val = xmlValidateNotationUse(ctxt, doc, notationName);
11949        desret_int(ret_val);
11950        call_tests++;
11951        des_xmlValidCtxtPtr(n_ctxt, ctxt);
11952        des_xmlDocPtr(n_doc, doc);
11953        des_const_xmlChar_ptr(n_notationName, notationName);
11954        xmlResetLastError();
11955        if (mem_base != xmlMemBlocks()) {
11956            printf("Leak of %d blocks found in xmlValidateNotationUse",
11957	           xmlMemBlocks() - mem_base);
11958	    ret++;
11959            printf(" %d", n_ctxt);
11960            printf(" %d", n_doc);
11961            printf(" %d", n_notationName);
11962            printf("\n");
11963        }
11964    }
11965    }
11966    }
11967#endif
11968
11969    return(ret);
11970}
11971
11972
11973static int
11974test_xmlValidateOneAttribute(void) {
11975    int ret = 0;
11976
11977
11978    /* missing type support */
11979    return(ret);
11980}
11981
11982
11983static int
11984test_xmlValidateOneElement(void) {
11985    int ret = 0;
11986
11987#ifdef LIBXML_VALID_ENABLED
11988    int mem_base;
11989    int ret_val;
11990    xmlValidCtxtPtr ctxt; /* the validation context */
11991    int n_ctxt;
11992    xmlDocPtr doc; /* a document instance */
11993    int n_doc;
11994    xmlNodePtr elem; /* an element instance */
11995    int n_elem;
11996
11997    for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
11998    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
11999    for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
12000        mem_base = xmlMemBlocks();
12001        ctxt = gen_xmlValidCtxtPtr(n_ctxt);
12002        doc = gen_xmlDocPtr(n_doc);
12003        elem = gen_xmlNodePtr(n_elem);
12004
12005        ret_val = xmlValidateOneElement(ctxt, doc, elem);
12006        desret_int(ret_val);
12007        call_tests++;
12008        des_xmlValidCtxtPtr(n_ctxt, ctxt);
12009        des_xmlDocPtr(n_doc, doc);
12010        des_xmlNodePtr(n_elem, elem);
12011        xmlResetLastError();
12012        if (mem_base != xmlMemBlocks()) {
12013            printf("Leak of %d blocks found in xmlValidateOneElement",
12014	           xmlMemBlocks() - mem_base);
12015	    ret++;
12016            printf(" %d", n_ctxt);
12017            printf(" %d", n_doc);
12018            printf(" %d", n_elem);
12019            printf("\n");
12020        }
12021    }
12022    }
12023    }
12024#endif
12025
12026    return(ret);
12027}
12028
12029
12030static int
12031test_xmlValidateOneNamespace(void) {
12032    int ret = 0;
12033
12034
12035    /* missing type support */
12036    return(ret);
12037}
12038
12039
12040static int
12041test_xmlValidatePopElement(void) {
12042    int ret = 0;
12043
12044#ifdef LIBXML_REGEXP_ENABLED
12045    int mem_base;
12046    int ret_val;
12047    xmlValidCtxtPtr ctxt; /* the validation context */
12048    int n_ctxt;
12049    xmlDocPtr doc; /* a document instance */
12050    int n_doc;
12051    xmlNodePtr elem; /* an element instance */
12052    int n_elem;
12053    const xmlChar * qname; /* the qualified name as appearing in the serialization */
12054    int n_qname;
12055
12056    for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
12057    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
12058    for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
12059    for (n_qname = 0;n_qname < gen_nb_const_xmlChar_ptr;n_qname++) {
12060        mem_base = xmlMemBlocks();
12061        ctxt = gen_xmlValidCtxtPtr(n_ctxt);
12062        doc = gen_xmlDocPtr(n_doc);
12063        elem = gen_xmlNodePtr(n_elem);
12064        qname = gen_const_xmlChar_ptr(n_qname);
12065
12066        ret_val = xmlValidatePopElement(ctxt, doc, elem, qname);
12067        desret_int(ret_val);
12068        call_tests++;
12069        des_xmlValidCtxtPtr(n_ctxt, ctxt);
12070        des_xmlDocPtr(n_doc, doc);
12071        des_xmlNodePtr(n_elem, elem);
12072        des_const_xmlChar_ptr(n_qname, qname);
12073        xmlResetLastError();
12074        if (mem_base != xmlMemBlocks()) {
12075            printf("Leak of %d blocks found in xmlValidatePopElement",
12076	           xmlMemBlocks() - mem_base);
12077	    ret++;
12078            printf(" %d", n_ctxt);
12079            printf(" %d", n_doc);
12080            printf(" %d", n_elem);
12081            printf(" %d", n_qname);
12082            printf("\n");
12083        }
12084    }
12085    }
12086    }
12087    }
12088#endif
12089
12090    return(ret);
12091}
12092
12093
12094static int
12095test_xmlValidatePushCData(void) {
12096    int ret = 0;
12097
12098#ifdef LIBXML_REGEXP_ENABLED
12099    int mem_base;
12100    int ret_val;
12101    xmlValidCtxtPtr ctxt; /* the validation context */
12102    int n_ctxt;
12103    const xmlChar * data; /* some character data read */
12104    int n_data;
12105    int len; /* the lenght of the data */
12106    int n_len;
12107
12108    for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
12109    for (n_data = 0;n_data < gen_nb_const_xmlChar_ptr;n_data++) {
12110    for (n_len = 0;n_len < gen_nb_int;n_len++) {
12111        mem_base = xmlMemBlocks();
12112        ctxt = gen_xmlValidCtxtPtr(n_ctxt);
12113        data = gen_const_xmlChar_ptr(n_data);
12114        len = gen_int(n_len);
12115
12116        ret_val = xmlValidatePushCData(ctxt, data, len);
12117        desret_int(ret_val);
12118        call_tests++;
12119        des_xmlValidCtxtPtr(n_ctxt, ctxt);
12120        des_const_xmlChar_ptr(n_data, data);
12121        des_int(n_len, len);
12122        xmlResetLastError();
12123        if (mem_base != xmlMemBlocks()) {
12124            printf("Leak of %d blocks found in xmlValidatePushCData",
12125	           xmlMemBlocks() - mem_base);
12126	    ret++;
12127            printf(" %d", n_ctxt);
12128            printf(" %d", n_data);
12129            printf(" %d", n_len);
12130            printf("\n");
12131        }
12132    }
12133    }
12134    }
12135#endif
12136
12137    return(ret);
12138}
12139
12140
12141static int
12142test_xmlValidatePushElement(void) {
12143    int ret = 0;
12144
12145#ifdef LIBXML_REGEXP_ENABLED
12146    int mem_base;
12147    int ret_val;
12148    xmlValidCtxtPtr ctxt; /* the validation context */
12149    int n_ctxt;
12150    xmlDocPtr doc; /* a document instance */
12151    int n_doc;
12152    xmlNodePtr elem; /* an element instance */
12153    int n_elem;
12154    const xmlChar * qname; /* the qualified name as appearing in the serialization */
12155    int n_qname;
12156
12157    for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
12158    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
12159    for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
12160    for (n_qname = 0;n_qname < gen_nb_const_xmlChar_ptr;n_qname++) {
12161        mem_base = xmlMemBlocks();
12162        ctxt = gen_xmlValidCtxtPtr(n_ctxt);
12163        doc = gen_xmlDocPtr(n_doc);
12164        elem = gen_xmlNodePtr(n_elem);
12165        qname = gen_const_xmlChar_ptr(n_qname);
12166
12167        ret_val = xmlValidatePushElement(ctxt, doc, elem, qname);
12168        desret_int(ret_val);
12169        call_tests++;
12170        des_xmlValidCtxtPtr(n_ctxt, ctxt);
12171        des_xmlDocPtr(n_doc, doc);
12172        des_xmlNodePtr(n_elem, elem);
12173        des_const_xmlChar_ptr(n_qname, qname);
12174        xmlResetLastError();
12175        if (mem_base != xmlMemBlocks()) {
12176            printf("Leak of %d blocks found in xmlValidatePushElement",
12177	           xmlMemBlocks() - mem_base);
12178	    ret++;
12179            printf(" %d", n_ctxt);
12180            printf(" %d", n_doc);
12181            printf(" %d", n_elem);
12182            printf(" %d", n_qname);
12183            printf("\n");
12184        }
12185    }
12186    }
12187    }
12188    }
12189#endif
12190
12191    return(ret);
12192}
12193
12194
12195static int
12196test_xmlValidateRoot(void) {
12197    int ret = 0;
12198
12199#ifdef LIBXML_VALID_ENABLED
12200    int mem_base;
12201    int ret_val;
12202    xmlValidCtxtPtr ctxt; /* the validation context */
12203    int n_ctxt;
12204    xmlDocPtr doc; /* a document instance */
12205    int n_doc;
12206
12207    for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
12208    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
12209        mem_base = xmlMemBlocks();
12210        ctxt = gen_xmlValidCtxtPtr(n_ctxt);
12211        doc = gen_xmlDocPtr(n_doc);
12212
12213        ret_val = xmlValidateRoot(ctxt, doc);
12214        desret_int(ret_val);
12215        call_tests++;
12216        des_xmlValidCtxtPtr(n_ctxt, ctxt);
12217        des_xmlDocPtr(n_doc, doc);
12218        xmlResetLastError();
12219        if (mem_base != xmlMemBlocks()) {
12220            printf("Leak of %d blocks found in xmlValidateRoot",
12221	           xmlMemBlocks() - mem_base);
12222	    ret++;
12223            printf(" %d", n_ctxt);
12224            printf(" %d", n_doc);
12225            printf("\n");
12226        }
12227    }
12228    }
12229#endif
12230
12231    return(ret);
12232}
12233
12234static int
12235test_valid(void) {
12236    int ret = 0;
12237
12238    printf("Testing valid ...\n");
12239    ret += test_xmlAddAttributeDecl();
12240    ret += test_xmlAddElementDecl();
12241    ret += test_xmlAddID();
12242    ret += test_xmlAddNotationDecl();
12243    ret += test_xmlAddRef();
12244    ret += test_xmlCopyAttributeTable();
12245    ret += test_xmlCopyElementContent();
12246    ret += test_xmlCopyElementTable();
12247    ret += test_xmlCopyEnumeration();
12248    ret += test_xmlCopyNotationTable();
12249    ret += test_xmlCreateEnumeration();
12250    ret += test_xmlDumpAttributeDecl();
12251    ret += test_xmlDumpAttributeTable();
12252    ret += test_xmlDumpElementDecl();
12253    ret += test_xmlDumpElementTable();
12254    ret += test_xmlDumpNotationDecl();
12255    ret += test_xmlDumpNotationTable();
12256    ret += test_xmlGetDtdAttrDesc();
12257    ret += test_xmlGetDtdElementDesc();
12258    ret += test_xmlGetDtdNotationDesc();
12259    ret += test_xmlGetDtdQAttrDesc();
12260    ret += test_xmlGetDtdQElementDesc();
12261    ret += test_xmlGetID();
12262    ret += test_xmlGetRefs();
12263    ret += test_xmlIsID();
12264    ret += test_xmlIsMixedElement();
12265    ret += test_xmlIsRef();
12266    ret += test_xmlNewElementContent();
12267    ret += test_xmlNewValidCtxt();
12268    ret += test_xmlRemoveID();
12269    ret += test_xmlRemoveRef();
12270    ret += test_xmlSnprintfElementContent();
12271    ret += test_xmlSprintfElementContent();
12272    ret += test_xmlValidBuildContentModel();
12273    ret += test_xmlValidCtxtNormalizeAttributeValue();
12274    ret += test_xmlValidGetPotentialChildren();
12275    ret += test_xmlValidGetValidElements();
12276    ret += test_xmlValidNormalizeAttributeValue();
12277    ret += test_xmlValidateAttributeDecl();
12278    ret += test_xmlValidateAttributeValue();
12279    ret += test_xmlValidateDocument();
12280    ret += test_xmlValidateDocumentFinal();
12281    ret += test_xmlValidateDtd();
12282    ret += test_xmlValidateDtdFinal();
12283    ret += test_xmlValidateElement();
12284    ret += test_xmlValidateElementDecl();
12285    ret += test_xmlValidateNameValue();
12286    ret += test_xmlValidateNamesValue();
12287    ret += test_xmlValidateNmtokenValue();
12288    ret += test_xmlValidateNmtokensValue();
12289    ret += test_xmlValidateNotationDecl();
12290    ret += test_xmlValidateNotationUse();
12291    ret += test_xmlValidateOneAttribute();
12292    ret += test_xmlValidateOneElement();
12293    ret += test_xmlValidateOneNamespace();
12294    ret += test_xmlValidatePopElement();
12295    ret += test_xmlValidatePushCData();
12296    ret += test_xmlValidatePushElement();
12297    ret += test_xmlValidateRoot();
12298
12299    if (ret != 0)
12300	printf("Module valid: %d errors\n", ret);
12301    return(ret);
12302}
12303
12304static int
12305test_xmlXIncludeNewContext(void) {
12306    int ret = 0;
12307
12308
12309    /* missing type support */
12310    return(ret);
12311}
12312
12313
12314static int
12315test_xmlXIncludeProcess(void) {
12316    int ret = 0;
12317
12318#ifdef LIBXML_XINCLUDE_ENABLED
12319    int mem_base;
12320    int ret_val;
12321    xmlDocPtr doc; /* an XML document */
12322    int n_doc;
12323
12324    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
12325        mem_base = xmlMemBlocks();
12326        doc = gen_xmlDocPtr(n_doc);
12327
12328        ret_val = xmlXIncludeProcess(doc);
12329        desret_int(ret_val);
12330        call_tests++;
12331        des_xmlDocPtr(n_doc, doc);
12332        xmlResetLastError();
12333        if (mem_base != xmlMemBlocks()) {
12334            printf("Leak of %d blocks found in xmlXIncludeProcess",
12335	           xmlMemBlocks() - mem_base);
12336	    ret++;
12337            printf(" %d", n_doc);
12338            printf("\n");
12339        }
12340    }
12341#endif
12342
12343    return(ret);
12344}
12345
12346
12347static int
12348test_xmlXIncludeProcessFlags(void) {
12349    int ret = 0;
12350
12351#ifdef LIBXML_XINCLUDE_ENABLED
12352    int mem_base;
12353    int ret_val;
12354    xmlDocPtr doc; /* an XML document */
12355    int n_doc;
12356    int flags; /* a set of xmlParserOption used for parsing XML includes */
12357    int n_flags;
12358
12359    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
12360    for (n_flags = 0;n_flags < gen_nb_int;n_flags++) {
12361        mem_base = xmlMemBlocks();
12362        doc = gen_xmlDocPtr(n_doc);
12363        flags = gen_int(n_flags);
12364
12365        ret_val = xmlXIncludeProcessFlags(doc, flags);
12366        desret_int(ret_val);
12367        call_tests++;
12368        des_xmlDocPtr(n_doc, doc);
12369        des_int(n_flags, flags);
12370        xmlResetLastError();
12371        if (mem_base != xmlMemBlocks()) {
12372            printf("Leak of %d blocks found in xmlXIncludeProcessFlags",
12373	           xmlMemBlocks() - mem_base);
12374	    ret++;
12375            printf(" %d", n_doc);
12376            printf(" %d", n_flags);
12377            printf("\n");
12378        }
12379    }
12380    }
12381#endif
12382
12383    return(ret);
12384}
12385
12386
12387static int
12388test_xmlXIncludeProcessNode(void) {
12389    int ret = 0;
12390
12391
12392    /* missing type support */
12393    return(ret);
12394}
12395
12396
12397static int
12398test_xmlXIncludeProcessTree(void) {
12399    int ret = 0;
12400
12401#ifdef LIBXML_XINCLUDE_ENABLED
12402    int mem_base;
12403    int ret_val;
12404    xmlNodePtr tree; /* a node in an XML document */
12405    int n_tree;
12406
12407    for (n_tree = 0;n_tree < gen_nb_xmlNodePtr;n_tree++) {
12408        mem_base = xmlMemBlocks();
12409        tree = gen_xmlNodePtr(n_tree);
12410
12411        ret_val = xmlXIncludeProcessTree(tree);
12412        desret_int(ret_val);
12413        call_tests++;
12414        des_xmlNodePtr(n_tree, tree);
12415        xmlResetLastError();
12416        if (mem_base != xmlMemBlocks()) {
12417            printf("Leak of %d blocks found in xmlXIncludeProcessTree",
12418	           xmlMemBlocks() - mem_base);
12419	    ret++;
12420            printf(" %d", n_tree);
12421            printf("\n");
12422        }
12423    }
12424#endif
12425
12426    return(ret);
12427}
12428
12429
12430static int
12431test_xmlXIncludeProcessTreeFlags(void) {
12432    int ret = 0;
12433
12434#ifdef LIBXML_XINCLUDE_ENABLED
12435    int mem_base;
12436    int ret_val;
12437    xmlNodePtr tree; /* a node in an XML document */
12438    int n_tree;
12439    int flags; /* a set of xmlParserOption used for parsing XML includes */
12440    int n_flags;
12441
12442    for (n_tree = 0;n_tree < gen_nb_xmlNodePtr;n_tree++) {
12443    for (n_flags = 0;n_flags < gen_nb_int;n_flags++) {
12444        mem_base = xmlMemBlocks();
12445        tree = gen_xmlNodePtr(n_tree);
12446        flags = gen_int(n_flags);
12447
12448        ret_val = xmlXIncludeProcessTreeFlags(tree, flags);
12449        desret_int(ret_val);
12450        call_tests++;
12451        des_xmlNodePtr(n_tree, tree);
12452        des_int(n_flags, flags);
12453        xmlResetLastError();
12454        if (mem_base != xmlMemBlocks()) {
12455            printf("Leak of %d blocks found in xmlXIncludeProcessTreeFlags",
12456	           xmlMemBlocks() - mem_base);
12457	    ret++;
12458            printf(" %d", n_tree);
12459            printf(" %d", n_flags);
12460            printf("\n");
12461        }
12462    }
12463    }
12464#endif
12465
12466    return(ret);
12467}
12468
12469
12470static int
12471test_xmlXIncludeSetFlags(void) {
12472    int ret = 0;
12473
12474
12475    /* missing type support */
12476    return(ret);
12477}
12478
12479static int
12480test_xinclude(void) {
12481    int ret = 0;
12482
12483    printf("Testing xinclude ...\n");
12484    ret += test_xmlXIncludeNewContext();
12485    ret += test_xmlXIncludeProcess();
12486    ret += test_xmlXIncludeProcessFlags();
12487    ret += test_xmlXIncludeProcessNode();
12488    ret += test_xmlXIncludeProcessTree();
12489    ret += test_xmlXIncludeProcessTreeFlags();
12490    ret += test_xmlXIncludeSetFlags();
12491
12492    if (ret != 0)
12493	printf("Module xinclude: %d errors\n", ret);
12494    return(ret);
12495}
12496
12497static int
12498test_xmlAllocOutputBuffer(void) {
12499    int ret = 0;
12500
12501
12502    /* missing type support */
12503    return(ret);
12504}
12505
12506
12507static int
12508test_xmlAllocParserInputBuffer(void) {
12509    int ret = 0;
12510
12511
12512    /* missing type support */
12513    return(ret);
12514}
12515
12516
12517static int
12518test_xmlCheckFilename(void) {
12519    int ret = 0;
12520
12521    int mem_base;
12522    int ret_val;
12523    const char * path; /* the path to check */
12524    int n_path;
12525
12526    for (n_path = 0;n_path < gen_nb_const_char_ptr;n_path++) {
12527        mem_base = xmlMemBlocks();
12528        path = gen_const_char_ptr(n_path);
12529
12530        ret_val = xmlCheckFilename(path);
12531        desret_int(ret_val);
12532        call_tests++;
12533        des_const_char_ptr(n_path, path);
12534        xmlResetLastError();
12535        if (mem_base != xmlMemBlocks()) {
12536            printf("Leak of %d blocks found in xmlCheckFilename",
12537	           xmlMemBlocks() - mem_base);
12538	    ret++;
12539            printf(" %d", n_path);
12540            printf("\n");
12541        }
12542    }
12543
12544    return(ret);
12545}
12546
12547
12548static int
12549test_xmlCheckHTTPInput(void) {
12550    int ret = 0;
12551
12552
12553    /* missing type support */
12554    return(ret);
12555}
12556
12557
12558static int
12559test_xmlCleanupInputCallbacks(void) {
12560    int ret = 0;
12561
12562    int mem_base;
12563
12564        mem_base = xmlMemBlocks();
12565
12566        xmlCleanupInputCallbacks();
12567        call_tests++;
12568        xmlResetLastError();
12569        if (mem_base != xmlMemBlocks()) {
12570            printf("Leak of %d blocks found in xmlCleanupInputCallbacks",
12571	           xmlMemBlocks() - mem_base);
12572	    ret++;
12573            printf("\n");
12574        }
12575
12576    return(ret);
12577}
12578
12579
12580static int
12581test_xmlCleanupOutputCallbacks(void) {
12582    int ret = 0;
12583
12584#ifdef LIBXML_OUTPUT_ENABLED
12585    int mem_base;
12586
12587        mem_base = xmlMemBlocks();
12588
12589        xmlCleanupOutputCallbacks();
12590        call_tests++;
12591        xmlResetLastError();
12592        if (mem_base != xmlMemBlocks()) {
12593            printf("Leak of %d blocks found in xmlCleanupOutputCallbacks",
12594	           xmlMemBlocks() - mem_base);
12595	    ret++;
12596            printf("\n");
12597        }
12598#endif
12599
12600    return(ret);
12601}
12602
12603
12604static int
12605test_xmlFileClose(void) {
12606    int ret = 0;
12607
12608    int mem_base;
12609    int ret_val;
12610    void * context; /* the I/O context */
12611    int n_context;
12612
12613    for (n_context = 0;n_context < gen_nb_void_ptr;n_context++) {
12614        mem_base = xmlMemBlocks();
12615        context = gen_void_ptr(n_context);
12616
12617        ret_val = xmlFileClose(context);
12618        desret_int(ret_val);
12619        call_tests++;
12620        des_void_ptr(n_context, context);
12621        xmlResetLastError();
12622        if (mem_base != xmlMemBlocks()) {
12623            printf("Leak of %d blocks found in xmlFileClose",
12624	           xmlMemBlocks() - mem_base);
12625	    ret++;
12626            printf(" %d", n_context);
12627            printf("\n");
12628        }
12629    }
12630
12631    return(ret);
12632}
12633
12634
12635static int
12636test_xmlFileMatch(void) {
12637    int ret = 0;
12638
12639    int mem_base;
12640    int ret_val;
12641    const char * filename; /* the URI for matching */
12642    int n_filename;
12643
12644    for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
12645        mem_base = xmlMemBlocks();
12646        filename = gen_filepath(n_filename);
12647
12648        ret_val = xmlFileMatch(filename);
12649        desret_int(ret_val);
12650        call_tests++;
12651        des_filepath(n_filename, filename);
12652        xmlResetLastError();
12653        if (mem_base != xmlMemBlocks()) {
12654            printf("Leak of %d blocks found in xmlFileMatch",
12655	           xmlMemBlocks() - mem_base);
12656	    ret++;
12657            printf(" %d", n_filename);
12658            printf("\n");
12659        }
12660    }
12661
12662    return(ret);
12663}
12664
12665
12666static int
12667test_xmlFileOpen(void) {
12668    int ret = 0;
12669
12670    int mem_base;
12671    void * ret_val;
12672    const char * filename; /* the URI for matching */
12673    int n_filename;
12674
12675    for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
12676        mem_base = xmlMemBlocks();
12677        filename = gen_filepath(n_filename);
12678
12679        ret_val = xmlFileOpen(filename);
12680        desret_void_ptr(ret_val);
12681        call_tests++;
12682        des_filepath(n_filename, filename);
12683        xmlResetLastError();
12684        if (mem_base != xmlMemBlocks()) {
12685            printf("Leak of %d blocks found in xmlFileOpen",
12686	           xmlMemBlocks() - mem_base);
12687	    ret++;
12688            printf(" %d", n_filename);
12689            printf("\n");
12690        }
12691    }
12692
12693    return(ret);
12694}
12695
12696
12697static int
12698test_xmlFileRead(void) {
12699    int ret = 0;
12700
12701
12702    /* missing type support */
12703    return(ret);
12704}
12705
12706
12707static int
12708test_xmlIOFTPClose(void) {
12709    int ret = 0;
12710
12711#ifdef LIBXML_FTP_ENABLED
12712    int mem_base;
12713    int ret_val;
12714    void * context; /* the I/O context */
12715    int n_context;
12716
12717    for (n_context = 0;n_context < gen_nb_void_ptr;n_context++) {
12718        mem_base = xmlMemBlocks();
12719        context = gen_void_ptr(n_context);
12720
12721        ret_val = xmlIOFTPClose(context);
12722        desret_int(ret_val);
12723        call_tests++;
12724        des_void_ptr(n_context, context);
12725        xmlResetLastError();
12726        if (mem_base != xmlMemBlocks()) {
12727            printf("Leak of %d blocks found in xmlIOFTPClose",
12728	           xmlMemBlocks() - mem_base);
12729	    ret++;
12730            printf(" %d", n_context);
12731            printf("\n");
12732        }
12733    }
12734#endif
12735
12736    return(ret);
12737}
12738
12739
12740static int
12741test_xmlIOFTPMatch(void) {
12742    int ret = 0;
12743
12744#ifdef LIBXML_FTP_ENABLED
12745    int mem_base;
12746    int ret_val;
12747    const char * filename; /* the URI for matching */
12748    int n_filename;
12749
12750    for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
12751        mem_base = xmlMemBlocks();
12752        filename = gen_filepath(n_filename);
12753
12754        ret_val = xmlIOFTPMatch(filename);
12755        desret_int(ret_val);
12756        call_tests++;
12757        des_filepath(n_filename, filename);
12758        xmlResetLastError();
12759        if (mem_base != xmlMemBlocks()) {
12760            printf("Leak of %d blocks found in xmlIOFTPMatch",
12761	           xmlMemBlocks() - mem_base);
12762	    ret++;
12763            printf(" %d", n_filename);
12764            printf("\n");
12765        }
12766    }
12767#endif
12768
12769    return(ret);
12770}
12771
12772
12773static int
12774test_xmlIOFTPOpen(void) {
12775    int ret = 0;
12776
12777#ifdef LIBXML_FTP_ENABLED
12778    int mem_base;
12779    void * ret_val;
12780    const char * filename; /* the URI for matching */
12781    int n_filename;
12782
12783    for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
12784        mem_base = xmlMemBlocks();
12785        filename = gen_filepath(n_filename);
12786
12787        ret_val = xmlIOFTPOpen(filename);
12788        desret_void_ptr(ret_val);
12789        call_tests++;
12790        des_filepath(n_filename, filename);
12791        xmlResetLastError();
12792        if (mem_base != xmlMemBlocks()) {
12793            printf("Leak of %d blocks found in xmlIOFTPOpen",
12794	           xmlMemBlocks() - mem_base);
12795	    ret++;
12796            printf(" %d", n_filename);
12797            printf("\n");
12798        }
12799    }
12800#endif
12801
12802    return(ret);
12803}
12804
12805
12806static int
12807test_xmlIOFTPRead(void) {
12808    int ret = 0;
12809
12810
12811    /* missing type support */
12812    return(ret);
12813}
12814
12815
12816static int
12817test_xmlIOHTTPClose(void) {
12818    int ret = 0;
12819
12820#ifdef LIBXML_HTTP_ENABLED
12821    int mem_base;
12822    int ret_val;
12823    void * context; /* the I/O context */
12824    int n_context;
12825
12826    for (n_context = 0;n_context < gen_nb_void_ptr;n_context++) {
12827        mem_base = xmlMemBlocks();
12828        context = gen_void_ptr(n_context);
12829
12830        ret_val = xmlIOHTTPClose(context);
12831        desret_int(ret_val);
12832        call_tests++;
12833        des_void_ptr(n_context, context);
12834        xmlResetLastError();
12835        if (mem_base != xmlMemBlocks()) {
12836            printf("Leak of %d blocks found in xmlIOHTTPClose",
12837	           xmlMemBlocks() - mem_base);
12838	    ret++;
12839            printf(" %d", n_context);
12840            printf("\n");
12841        }
12842    }
12843#endif
12844
12845    return(ret);
12846}
12847
12848
12849static int
12850test_xmlIOHTTPMatch(void) {
12851    int ret = 0;
12852
12853#ifdef LIBXML_HTTP_ENABLED
12854    int mem_base;
12855    int ret_val;
12856    const char * filename; /* the URI for matching */
12857    int n_filename;
12858
12859    for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
12860        mem_base = xmlMemBlocks();
12861        filename = gen_filepath(n_filename);
12862
12863        ret_val = xmlIOHTTPMatch(filename);
12864        desret_int(ret_val);
12865        call_tests++;
12866        des_filepath(n_filename, filename);
12867        xmlResetLastError();
12868        if (mem_base != xmlMemBlocks()) {
12869            printf("Leak of %d blocks found in xmlIOHTTPMatch",
12870	           xmlMemBlocks() - mem_base);
12871	    ret++;
12872            printf(" %d", n_filename);
12873            printf("\n");
12874        }
12875    }
12876#endif
12877
12878    return(ret);
12879}
12880
12881
12882static int
12883test_xmlIOHTTPOpen(void) {
12884    int ret = 0;
12885
12886#ifdef LIBXML_HTTP_ENABLED
12887    int mem_base;
12888    void * ret_val;
12889    const char * filename; /* the URI for matching */
12890    int n_filename;
12891
12892    for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
12893        mem_base = xmlMemBlocks();
12894        filename = gen_filepath(n_filename);
12895
12896        ret_val = xmlIOHTTPOpen(filename);
12897        desret_void_ptr(ret_val);
12898        call_tests++;
12899        des_filepath(n_filename, filename);
12900        xmlResetLastError();
12901        if (mem_base != xmlMemBlocks()) {
12902            printf("Leak of %d blocks found in xmlIOHTTPOpen",
12903	           xmlMemBlocks() - mem_base);
12904	    ret++;
12905            printf(" %d", n_filename);
12906            printf("\n");
12907        }
12908    }
12909#endif
12910
12911    return(ret);
12912}
12913
12914
12915static int
12916test_xmlIOHTTPOpenW(void) {
12917    int ret = 0;
12918
12919
12920    /* missing type support */
12921    return(ret);
12922}
12923
12924
12925static int
12926test_xmlIOHTTPRead(void) {
12927    int ret = 0;
12928
12929
12930    /* missing type support */
12931    return(ret);
12932}
12933
12934
12935static int
12936test_xmlNoNetExternalEntityLoader(void) {
12937    int ret = 0;
12938
12939
12940    /* missing type support */
12941    return(ret);
12942}
12943
12944
12945static int
12946test_xmlNormalizeWindowsPath(void) {
12947    int ret = 0;
12948
12949    int mem_base;
12950    xmlChar * ret_val;
12951    const xmlChar * path; /* the input file path */
12952    int n_path;
12953
12954    for (n_path = 0;n_path < gen_nb_const_xmlChar_ptr;n_path++) {
12955        mem_base = xmlMemBlocks();
12956        path = gen_const_xmlChar_ptr(n_path);
12957
12958        ret_val = xmlNormalizeWindowsPath(path);
12959        desret_xmlChar_ptr(ret_val);
12960        call_tests++;
12961        des_const_xmlChar_ptr(n_path, path);
12962        xmlResetLastError();
12963        if (mem_base != xmlMemBlocks()) {
12964            printf("Leak of %d blocks found in xmlNormalizeWindowsPath",
12965	           xmlMemBlocks() - mem_base);
12966	    ret++;
12967            printf(" %d", n_path);
12968            printf("\n");
12969        }
12970    }
12971
12972    return(ret);
12973}
12974
12975
12976static int
12977test_xmlOutputBufferClose(void) {
12978    int ret = 0;
12979
12980
12981    /* missing type support */
12982    return(ret);
12983}
12984
12985
12986static int
12987test_xmlOutputBufferCreateFd(void) {
12988    int ret = 0;
12989
12990
12991    /* missing type support */
12992    return(ret);
12993}
12994
12995
12996static int
12997test_xmlOutputBufferCreateFile(void) {
12998    int ret = 0;
12999
13000
13001    /* missing type support */
13002    return(ret);
13003}
13004
13005
13006static int
13007test_xmlOutputBufferCreateFilename(void) {
13008    int ret = 0;
13009
13010
13011    /* missing type support */
13012    return(ret);
13013}
13014
13015
13016static int
13017test_xmlOutputBufferCreateIO(void) {
13018    int ret = 0;
13019
13020
13021    /* missing type support */
13022    return(ret);
13023}
13024
13025
13026static int
13027test_xmlOutputBufferFlush(void) {
13028    int ret = 0;
13029
13030
13031    /* missing type support */
13032    return(ret);
13033}
13034
13035
13036static int
13037test_xmlOutputBufferWrite(void) {
13038    int ret = 0;
13039
13040
13041    /* missing type support */
13042    return(ret);
13043}
13044
13045
13046static int
13047test_xmlOutputBufferWriteEscape(void) {
13048    int ret = 0;
13049
13050
13051    /* missing type support */
13052    return(ret);
13053}
13054
13055
13056static int
13057test_xmlOutputBufferWriteString(void) {
13058    int ret = 0;
13059
13060
13061    /* missing type support */
13062    return(ret);
13063}
13064
13065
13066static int
13067test_xmlParserGetDirectory(void) {
13068    int ret = 0;
13069
13070
13071    /* missing type support */
13072    return(ret);
13073}
13074
13075
13076static int
13077test_xmlParserInputBufferCreateFd(void) {
13078    int ret = 0;
13079
13080
13081    /* missing type support */
13082    return(ret);
13083}
13084
13085
13086static int
13087test_xmlParserInputBufferCreateFile(void) {
13088    int ret = 0;
13089
13090
13091    /* missing type support */
13092    return(ret);
13093}
13094
13095
13096static int
13097test_xmlParserInputBufferCreateFilename(void) {
13098    int ret = 0;
13099
13100
13101    /* missing type support */
13102    return(ret);
13103}
13104
13105
13106static int
13107test_xmlParserInputBufferCreateIO(void) {
13108    int ret = 0;
13109
13110
13111    /* missing type support */
13112    return(ret);
13113}
13114
13115
13116static int
13117test_xmlParserInputBufferCreateMem(void) {
13118    int ret = 0;
13119
13120
13121    /* missing type support */
13122    return(ret);
13123}
13124
13125
13126static int
13127test_xmlParserInputBufferCreateStatic(void) {
13128    int ret = 0;
13129
13130
13131    /* missing type support */
13132    return(ret);
13133}
13134
13135
13136static int
13137test_xmlParserInputBufferGrow(void) {
13138    int ret = 0;
13139
13140
13141    /* missing type support */
13142    return(ret);
13143}
13144
13145
13146static int
13147test_xmlParserInputBufferPush(void) {
13148    int ret = 0;
13149
13150
13151    /* missing type support */
13152    return(ret);
13153}
13154
13155
13156static int
13157test_xmlParserInputBufferRead(void) {
13158    int ret = 0;
13159
13160
13161    /* missing type support */
13162    return(ret);
13163}
13164
13165
13166static int
13167test_xmlPopInputCallbacks(void) {
13168    int ret = 0;
13169
13170    int mem_base;
13171    int ret_val;
13172
13173        mem_base = xmlMemBlocks();
13174
13175        ret_val = xmlPopInputCallbacks();
13176        desret_int(ret_val);
13177        call_tests++;
13178        xmlResetLastError();
13179        if (mem_base != xmlMemBlocks()) {
13180            printf("Leak of %d blocks found in xmlPopInputCallbacks",
13181	           xmlMemBlocks() - mem_base);
13182	    ret++;
13183            printf("\n");
13184        }
13185
13186    return(ret);
13187}
13188
13189
13190static int
13191test_xmlRegisterDefaultInputCallbacks(void) {
13192    int ret = 0;
13193
13194    int mem_base;
13195
13196        mem_base = xmlMemBlocks();
13197
13198        xmlRegisterDefaultInputCallbacks();
13199        call_tests++;
13200        xmlResetLastError();
13201        if (mem_base != xmlMemBlocks()) {
13202            printf("Leak of %d blocks found in xmlRegisterDefaultInputCallbacks",
13203	           xmlMemBlocks() - mem_base);
13204	    ret++;
13205            printf("\n");
13206        }
13207
13208    return(ret);
13209}
13210
13211
13212static int
13213test_xmlRegisterDefaultOutputCallbacks(void) {
13214    int ret = 0;
13215
13216#ifdef LIBXML_OUTPUT_ENABLED
13217    int mem_base;
13218
13219        mem_base = xmlMemBlocks();
13220
13221        xmlRegisterDefaultOutputCallbacks();
13222        call_tests++;
13223        xmlResetLastError();
13224        if (mem_base != xmlMemBlocks()) {
13225            printf("Leak of %d blocks found in xmlRegisterDefaultOutputCallbacks",
13226	           xmlMemBlocks() - mem_base);
13227	    ret++;
13228            printf("\n");
13229        }
13230#endif
13231
13232    return(ret);
13233}
13234
13235
13236static int
13237test_xmlRegisterHTTPPostCallbacks(void) {
13238    int ret = 0;
13239
13240#ifdef LIBXML_HTTP_ENABLED
13241    int mem_base;
13242
13243        mem_base = xmlMemBlocks();
13244
13245        xmlRegisterHTTPPostCallbacks();
13246        call_tests++;
13247        xmlResetLastError();
13248        if (mem_base != xmlMemBlocks()) {
13249            printf("Leak of %d blocks found in xmlRegisterHTTPPostCallbacks",
13250	           xmlMemBlocks() - mem_base);
13251	    ret++;
13252            printf("\n");
13253        }
13254#endif
13255
13256    return(ret);
13257}
13258
13259
13260static int
13261test_xmlRegisterInputCallbacks(void) {
13262    int ret = 0;
13263
13264
13265    /* missing type support */
13266    return(ret);
13267}
13268
13269
13270static int
13271test_xmlRegisterOutputCallbacks(void) {
13272    int ret = 0;
13273
13274
13275    /* missing type support */
13276    return(ret);
13277}
13278
13279static int
13280test_xmlIO(void) {
13281    int ret = 0;
13282
13283    printf("Testing xmlIO ...\n");
13284    ret += test_xmlAllocOutputBuffer();
13285    ret += test_xmlAllocParserInputBuffer();
13286    ret += test_xmlCheckFilename();
13287    ret += test_xmlCheckHTTPInput();
13288    ret += test_xmlCleanupInputCallbacks();
13289    ret += test_xmlCleanupOutputCallbacks();
13290    ret += test_xmlFileClose();
13291    ret += test_xmlFileMatch();
13292    ret += test_xmlFileOpen();
13293    ret += test_xmlFileRead();
13294    ret += test_xmlIOFTPClose();
13295    ret += test_xmlIOFTPMatch();
13296    ret += test_xmlIOFTPOpen();
13297    ret += test_xmlIOFTPRead();
13298    ret += test_xmlIOHTTPClose();
13299    ret += test_xmlIOHTTPMatch();
13300    ret += test_xmlIOHTTPOpen();
13301    ret += test_xmlIOHTTPOpenW();
13302    ret += test_xmlIOHTTPRead();
13303    ret += test_xmlNoNetExternalEntityLoader();
13304    ret += test_xmlNormalizeWindowsPath();
13305    ret += test_xmlOutputBufferClose();
13306    ret += test_xmlOutputBufferCreateFd();
13307    ret += test_xmlOutputBufferCreateFile();
13308    ret += test_xmlOutputBufferCreateFilename();
13309    ret += test_xmlOutputBufferCreateIO();
13310    ret += test_xmlOutputBufferFlush();
13311    ret += test_xmlOutputBufferWrite();
13312    ret += test_xmlOutputBufferWriteEscape();
13313    ret += test_xmlOutputBufferWriteString();
13314    ret += test_xmlParserGetDirectory();
13315    ret += test_xmlParserInputBufferCreateFd();
13316    ret += test_xmlParserInputBufferCreateFile();
13317    ret += test_xmlParserInputBufferCreateFilename();
13318    ret += test_xmlParserInputBufferCreateIO();
13319    ret += test_xmlParserInputBufferCreateMem();
13320    ret += test_xmlParserInputBufferCreateStatic();
13321    ret += test_xmlParserInputBufferGrow();
13322    ret += test_xmlParserInputBufferPush();
13323    ret += test_xmlParserInputBufferRead();
13324    ret += test_xmlPopInputCallbacks();
13325    ret += test_xmlRegisterDefaultInputCallbacks();
13326    ret += test_xmlRegisterDefaultOutputCallbacks();
13327    ret += test_xmlRegisterHTTPPostCallbacks();
13328    ret += test_xmlRegisterInputCallbacks();
13329    ret += test_xmlRegisterOutputCallbacks();
13330
13331    if (ret != 0)
13332	printf("Module xmlIO: %d errors\n", ret);
13333    return(ret);
13334}
13335
13336static int
13337test_initGenericErrorDefaultFunc(void) {
13338    int ret = 0;
13339
13340
13341    /* missing type support */
13342    return(ret);
13343}
13344
13345
13346static int
13347test_xmlCopyError(void) {
13348    int ret = 0;
13349
13350
13351    /* missing type support */
13352    return(ret);
13353}
13354
13355
13356static int
13357test_xmlCtxtGetLastError(void) {
13358    int ret = 0;
13359
13360
13361    /* missing type support */
13362    return(ret);
13363}
13364
13365
13366static int
13367test_xmlCtxtResetLastError(void) {
13368    int ret = 0;
13369
13370    int mem_base;
13371    void * ctx; /* an XML parser context */
13372    int n_ctx;
13373
13374    for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
13375        mem_base = xmlMemBlocks();
13376        ctx = gen_void_ptr(n_ctx);
13377
13378        xmlCtxtResetLastError(ctx);
13379        call_tests++;
13380        des_void_ptr(n_ctx, ctx);
13381        xmlResetLastError();
13382        if (mem_base != xmlMemBlocks()) {
13383            printf("Leak of %d blocks found in xmlCtxtResetLastError",
13384	           xmlMemBlocks() - mem_base);
13385	    ret++;
13386            printf(" %d", n_ctx);
13387            printf("\n");
13388        }
13389    }
13390
13391    return(ret);
13392}
13393
13394
13395static int
13396test_xmlGetLastError(void) {
13397    int ret = 0;
13398
13399
13400    /* missing type support */
13401    return(ret);
13402}
13403
13404
13405static int
13406test_xmlParserError(void) {
13407    int ret = 0;
13408
13409
13410    /* missing type support */
13411    return(ret);
13412}
13413
13414
13415static int
13416test_xmlParserPrintFileContext(void) {
13417    int ret = 0;
13418
13419
13420    /* missing type support */
13421    return(ret);
13422}
13423
13424
13425static int
13426test_xmlParserPrintFileInfo(void) {
13427    int ret = 0;
13428
13429
13430    /* missing type support */
13431    return(ret);
13432}
13433
13434
13435static int
13436test_xmlParserValidityError(void) {
13437    int ret = 0;
13438
13439
13440    /* missing type support */
13441    return(ret);
13442}
13443
13444
13445static int
13446test_xmlParserValidityWarning(void) {
13447    int ret = 0;
13448
13449
13450    /* missing type support */
13451    return(ret);
13452}
13453
13454
13455static int
13456test_xmlParserWarning(void) {
13457    int ret = 0;
13458
13459
13460    /* missing type support */
13461    return(ret);
13462}
13463
13464
13465static int
13466test_xmlResetError(void) {
13467    int ret = 0;
13468
13469
13470    /* missing type support */
13471    return(ret);
13472}
13473
13474
13475static int
13476test_xmlResetLastError(void) {
13477    int ret = 0;
13478
13479
13480
13481        xmlResetLastError();
13482        call_tests++;
13483        xmlResetLastError();
13484
13485    return(ret);
13486}
13487
13488
13489static int
13490test_xmlSetGenericErrorFunc(void) {
13491    int ret = 0;
13492
13493
13494    /* missing type support */
13495    return(ret);
13496}
13497
13498
13499static int
13500test_xmlSetStructuredErrorFunc(void) {
13501    int ret = 0;
13502
13503
13504    /* missing type support */
13505    return(ret);
13506}
13507
13508static int
13509test_xmlerror(void) {
13510    int ret = 0;
13511
13512    printf("Testing xmlerror ...\n");
13513    ret += test_initGenericErrorDefaultFunc();
13514    ret += test_xmlCopyError();
13515    ret += test_xmlCtxtGetLastError();
13516    ret += test_xmlCtxtResetLastError();
13517    ret += test_xmlGetLastError();
13518    ret += test_xmlParserError();
13519    ret += test_xmlParserPrintFileContext();
13520    ret += test_xmlParserPrintFileInfo();
13521    ret += test_xmlParserValidityError();
13522    ret += test_xmlParserValidityWarning();
13523    ret += test_xmlParserWarning();
13524    ret += test_xmlResetError();
13525    ret += test_xmlResetLastError();
13526    ret += test_xmlSetGenericErrorFunc();
13527    ret += test_xmlSetStructuredErrorFunc();
13528
13529    if (ret != 0)
13530	printf("Module xmlerror: %d errors\n", ret);
13531    return(ret);
13532}
13533
13534static int
13535test_xmlNewTextReader(void) {
13536    int ret = 0;
13537
13538
13539    /* missing type support */
13540    return(ret);
13541}
13542
13543
13544static int
13545test_xmlNewTextReaderFilename(void) {
13546    int ret = 0;
13547
13548
13549    /* missing type support */
13550    return(ret);
13551}
13552
13553
13554static int
13555test_xmlReaderForDoc(void) {
13556    int ret = 0;
13557
13558
13559    /* missing type support */
13560    return(ret);
13561}
13562
13563
13564static int
13565test_xmlReaderForFd(void) {
13566    int ret = 0;
13567
13568
13569    /* missing type support */
13570    return(ret);
13571}
13572
13573
13574static int
13575test_xmlReaderForFile(void) {
13576    int ret = 0;
13577
13578
13579    /* missing type support */
13580    return(ret);
13581}
13582
13583
13584static int
13585test_xmlReaderForIO(void) {
13586    int ret = 0;
13587
13588
13589    /* missing type support */
13590    return(ret);
13591}
13592
13593
13594static int
13595test_xmlReaderForMemory(void) {
13596    int ret = 0;
13597
13598
13599    /* missing type support */
13600    return(ret);
13601}
13602
13603
13604static int
13605test_xmlReaderNewDoc(void) {
13606    int ret = 0;
13607
13608#ifdef LIBXML_READER_ENABLED
13609    int mem_base;
13610    int ret_val;
13611    xmlTextReaderPtr reader; /* an XML reader */
13612    int n_reader;
13613    const xmlChar * cur; /* a pointer to a zero terminated string */
13614    int n_cur;
13615    const char * URL; /* the base URL to use for the document */
13616    int n_URL;
13617    const char * encoding; /* the document encoding, or NULL */
13618    int n_encoding;
13619    int options; /* a combination of xmlParserOption */
13620    int n_options;
13621
13622    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
13623    for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
13624    for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
13625    for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
13626    for (n_options = 0;n_options < gen_nb_int;n_options++) {
13627        mem_base = xmlMemBlocks();
13628        reader = gen_xmlTextReaderPtr(n_reader);
13629        cur = gen_const_xmlChar_ptr(n_cur);
13630        URL = gen_filepath(n_URL);
13631        encoding = gen_const_char_ptr(n_encoding);
13632        options = gen_int(n_options);
13633
13634        ret_val = xmlReaderNewDoc(reader, cur, URL, encoding, options);
13635        desret_int(ret_val);
13636        call_tests++;
13637        des_xmlTextReaderPtr(n_reader, reader);
13638        des_const_xmlChar_ptr(n_cur, cur);
13639        des_filepath(n_URL, URL);
13640        des_const_char_ptr(n_encoding, encoding);
13641        des_int(n_options, options);
13642        xmlResetLastError();
13643        if (mem_base != xmlMemBlocks()) {
13644            printf("Leak of %d blocks found in xmlReaderNewDoc",
13645	           xmlMemBlocks() - mem_base);
13646	    ret++;
13647            printf(" %d", n_reader);
13648            printf(" %d", n_cur);
13649            printf(" %d", n_URL);
13650            printf(" %d", n_encoding);
13651            printf(" %d", n_options);
13652            printf("\n");
13653        }
13654    }
13655    }
13656    }
13657    }
13658    }
13659#endif
13660
13661    return(ret);
13662}
13663
13664
13665static int
13666test_xmlReaderNewFile(void) {
13667    int ret = 0;
13668
13669#ifdef LIBXML_READER_ENABLED
13670    int mem_base;
13671    int ret_val;
13672    xmlTextReaderPtr reader; /* an XML reader */
13673    int n_reader;
13674    const char * filename; /* a file or URL */
13675    int n_filename;
13676    const char * encoding; /* the document encoding, or NULL */
13677    int n_encoding;
13678    int options; /* a combination of xmlParserOption */
13679    int n_options;
13680
13681    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
13682    for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
13683    for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
13684    for (n_options = 0;n_options < gen_nb_int;n_options++) {
13685        mem_base = xmlMemBlocks();
13686        reader = gen_xmlTextReaderPtr(n_reader);
13687        filename = gen_filepath(n_filename);
13688        encoding = gen_const_char_ptr(n_encoding);
13689        options = gen_int(n_options);
13690
13691        ret_val = xmlReaderNewFile(reader, filename, encoding, options);
13692        desret_int(ret_val);
13693        call_tests++;
13694        des_xmlTextReaderPtr(n_reader, reader);
13695        des_filepath(n_filename, filename);
13696        des_const_char_ptr(n_encoding, encoding);
13697        des_int(n_options, options);
13698        xmlResetLastError();
13699        if (mem_base != xmlMemBlocks()) {
13700            printf("Leak of %d blocks found in xmlReaderNewFile",
13701	           xmlMemBlocks() - mem_base);
13702	    ret++;
13703            printf(" %d", n_reader);
13704            printf(" %d", n_filename);
13705            printf(" %d", n_encoding);
13706            printf(" %d", n_options);
13707            printf("\n");
13708        }
13709    }
13710    }
13711    }
13712    }
13713#endif
13714
13715    return(ret);
13716}
13717
13718
13719static int
13720test_xmlReaderNewMemory(void) {
13721    int ret = 0;
13722
13723#ifdef LIBXML_READER_ENABLED
13724    int mem_base;
13725    int ret_val;
13726    xmlTextReaderPtr reader; /* an XML reader */
13727    int n_reader;
13728    const char * buffer; /* a pointer to a char array */
13729    int n_buffer;
13730    int size; /* the size of the array */
13731    int n_size;
13732    const char * URL; /* the base URL to use for the document */
13733    int n_URL;
13734    const char * encoding; /* the document encoding, or NULL */
13735    int n_encoding;
13736    int options; /* a combination of xmlParserOption */
13737    int n_options;
13738
13739    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
13740    for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
13741    for (n_size = 0;n_size < gen_nb_int;n_size++) {
13742    for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
13743    for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
13744    for (n_options = 0;n_options < gen_nb_int;n_options++) {
13745        mem_base = xmlMemBlocks();
13746        reader = gen_xmlTextReaderPtr(n_reader);
13747        buffer = gen_const_char_ptr(n_buffer);
13748        size = gen_int(n_size);
13749        URL = gen_filepath(n_URL);
13750        encoding = gen_const_char_ptr(n_encoding);
13751        options = gen_int(n_options);
13752
13753        ret_val = xmlReaderNewMemory(reader, buffer, size, URL, encoding, options);
13754        desret_int(ret_val);
13755        call_tests++;
13756        des_xmlTextReaderPtr(n_reader, reader);
13757        des_const_char_ptr(n_buffer, buffer);
13758        des_int(n_size, size);
13759        des_filepath(n_URL, URL);
13760        des_const_char_ptr(n_encoding, encoding);
13761        des_int(n_options, options);
13762        xmlResetLastError();
13763        if (mem_base != xmlMemBlocks()) {
13764            printf("Leak of %d blocks found in xmlReaderNewMemory",
13765	           xmlMemBlocks() - mem_base);
13766	    ret++;
13767            printf(" %d", n_reader);
13768            printf(" %d", n_buffer);
13769            printf(" %d", n_size);
13770            printf(" %d", n_URL);
13771            printf(" %d", n_encoding);
13772            printf(" %d", n_options);
13773            printf("\n");
13774        }
13775    }
13776    }
13777    }
13778    }
13779    }
13780    }
13781#endif
13782
13783    return(ret);
13784}
13785
13786
13787static int
13788test_xmlReaderNewWalker(void) {
13789    int ret = 0;
13790
13791#ifdef LIBXML_READER_ENABLED
13792    int mem_base;
13793    int ret_val;
13794    xmlTextReaderPtr reader; /* an XML reader */
13795    int n_reader;
13796    xmlDocPtr doc; /* a preparsed document */
13797    int n_doc;
13798
13799    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
13800    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
13801        mem_base = xmlMemBlocks();
13802        reader = gen_xmlTextReaderPtr(n_reader);
13803        doc = gen_xmlDocPtr(n_doc);
13804
13805        ret_val = xmlReaderNewWalker(reader, doc);
13806        desret_int(ret_val);
13807        call_tests++;
13808        des_xmlTextReaderPtr(n_reader, reader);
13809        des_xmlDocPtr(n_doc, doc);
13810        xmlResetLastError();
13811        if (mem_base != xmlMemBlocks()) {
13812            printf("Leak of %d blocks found in xmlReaderNewWalker",
13813	           xmlMemBlocks() - mem_base);
13814	    ret++;
13815            printf(" %d", n_reader);
13816            printf(" %d", n_doc);
13817            printf("\n");
13818        }
13819    }
13820    }
13821#endif
13822
13823    return(ret);
13824}
13825
13826
13827static int
13828test_xmlReaderWalker(void) {
13829    int ret = 0;
13830
13831
13832    /* missing type support */
13833    return(ret);
13834}
13835
13836
13837static int
13838test_xmlTextReaderAttributeCount(void) {
13839    int ret = 0;
13840
13841#ifdef LIBXML_READER_ENABLED
13842    int mem_base;
13843    int ret_val;
13844    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
13845    int n_reader;
13846
13847    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
13848        mem_base = xmlMemBlocks();
13849        reader = gen_xmlTextReaderPtr(n_reader);
13850
13851        ret_val = xmlTextReaderAttributeCount(reader);
13852        desret_int(ret_val);
13853        call_tests++;
13854        des_xmlTextReaderPtr(n_reader, reader);
13855        xmlResetLastError();
13856        if (mem_base != xmlMemBlocks()) {
13857            printf("Leak of %d blocks found in xmlTextReaderAttributeCount",
13858	           xmlMemBlocks() - mem_base);
13859	    ret++;
13860            printf(" %d", n_reader);
13861            printf("\n");
13862        }
13863    }
13864#endif
13865
13866    return(ret);
13867}
13868
13869
13870static int
13871test_xmlTextReaderBaseUri(void) {
13872    int ret = 0;
13873
13874#ifdef LIBXML_READER_ENABLED
13875    int mem_base;
13876    xmlChar * ret_val;
13877    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
13878    int n_reader;
13879
13880    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
13881        mem_base = xmlMemBlocks();
13882        reader = gen_xmlTextReaderPtr(n_reader);
13883
13884        ret_val = xmlTextReaderBaseUri(reader);
13885        desret_xmlChar_ptr(ret_val);
13886        call_tests++;
13887        des_xmlTextReaderPtr(n_reader, reader);
13888        xmlResetLastError();
13889        if (mem_base != xmlMemBlocks()) {
13890            printf("Leak of %d blocks found in xmlTextReaderBaseUri",
13891	           xmlMemBlocks() - mem_base);
13892	    ret++;
13893            printf(" %d", n_reader);
13894            printf("\n");
13895        }
13896    }
13897#endif
13898
13899    return(ret);
13900}
13901
13902
13903static int
13904test_xmlTextReaderClose(void) {
13905    int ret = 0;
13906
13907#ifdef LIBXML_READER_ENABLED
13908    int mem_base;
13909    int ret_val;
13910    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
13911    int n_reader;
13912
13913    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
13914        mem_base = xmlMemBlocks();
13915        reader = gen_xmlTextReaderPtr(n_reader);
13916
13917        ret_val = xmlTextReaderClose(reader);
13918        desret_int(ret_val);
13919        call_tests++;
13920        des_xmlTextReaderPtr(n_reader, reader);
13921        xmlResetLastError();
13922        if (mem_base != xmlMemBlocks()) {
13923            printf("Leak of %d blocks found in xmlTextReaderClose",
13924	           xmlMemBlocks() - mem_base);
13925	    ret++;
13926            printf(" %d", n_reader);
13927            printf("\n");
13928        }
13929    }
13930#endif
13931
13932    return(ret);
13933}
13934
13935
13936static int
13937test_xmlTextReaderConstBaseUri(void) {
13938    int ret = 0;
13939
13940#ifdef LIBXML_READER_ENABLED
13941    int mem_base;
13942    const xmlChar * ret_val;
13943    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
13944    int n_reader;
13945
13946    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
13947        mem_base = xmlMemBlocks();
13948        reader = gen_xmlTextReaderPtr(n_reader);
13949
13950        ret_val = xmlTextReaderConstBaseUri(reader);
13951        desret_const_xmlChar_ptr(ret_val);
13952        call_tests++;
13953        des_xmlTextReaderPtr(n_reader, reader);
13954        xmlResetLastError();
13955        if (mem_base != xmlMemBlocks()) {
13956            printf("Leak of %d blocks found in xmlTextReaderConstBaseUri",
13957	           xmlMemBlocks() - mem_base);
13958	    ret++;
13959            printf(" %d", n_reader);
13960            printf("\n");
13961        }
13962    }
13963#endif
13964
13965    return(ret);
13966}
13967
13968
13969static int
13970test_xmlTextReaderConstEncoding(void) {
13971    int ret = 0;
13972
13973#ifdef LIBXML_READER_ENABLED
13974    int mem_base;
13975    const xmlChar * ret_val;
13976    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
13977    int n_reader;
13978
13979    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
13980        mem_base = xmlMemBlocks();
13981        reader = gen_xmlTextReaderPtr(n_reader);
13982
13983        ret_val = xmlTextReaderConstEncoding(reader);
13984        desret_const_xmlChar_ptr(ret_val);
13985        call_tests++;
13986        des_xmlTextReaderPtr(n_reader, reader);
13987        xmlResetLastError();
13988        if (mem_base != xmlMemBlocks()) {
13989            printf("Leak of %d blocks found in xmlTextReaderConstEncoding",
13990	           xmlMemBlocks() - mem_base);
13991	    ret++;
13992            printf(" %d", n_reader);
13993            printf("\n");
13994        }
13995    }
13996#endif
13997
13998    return(ret);
13999}
14000
14001
14002static int
14003test_xmlTextReaderConstLocalName(void) {
14004    int ret = 0;
14005
14006#ifdef LIBXML_READER_ENABLED
14007    int mem_base;
14008    const xmlChar * ret_val;
14009    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
14010    int n_reader;
14011
14012    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
14013        mem_base = xmlMemBlocks();
14014        reader = gen_xmlTextReaderPtr(n_reader);
14015
14016        ret_val = xmlTextReaderConstLocalName(reader);
14017        desret_const_xmlChar_ptr(ret_val);
14018        call_tests++;
14019        des_xmlTextReaderPtr(n_reader, reader);
14020        xmlResetLastError();
14021        if (mem_base != xmlMemBlocks()) {
14022            printf("Leak of %d blocks found in xmlTextReaderConstLocalName",
14023	           xmlMemBlocks() - mem_base);
14024	    ret++;
14025            printf(" %d", n_reader);
14026            printf("\n");
14027        }
14028    }
14029#endif
14030
14031    return(ret);
14032}
14033
14034
14035static int
14036test_xmlTextReaderConstName(void) {
14037    int ret = 0;
14038
14039#ifdef LIBXML_READER_ENABLED
14040    int mem_base;
14041    const xmlChar * ret_val;
14042    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
14043    int n_reader;
14044
14045    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
14046        mem_base = xmlMemBlocks();
14047        reader = gen_xmlTextReaderPtr(n_reader);
14048
14049        ret_val = xmlTextReaderConstName(reader);
14050        desret_const_xmlChar_ptr(ret_val);
14051        call_tests++;
14052        des_xmlTextReaderPtr(n_reader, reader);
14053        xmlResetLastError();
14054        if (mem_base != xmlMemBlocks()) {
14055            printf("Leak of %d blocks found in xmlTextReaderConstName",
14056	           xmlMemBlocks() - mem_base);
14057	    ret++;
14058            printf(" %d", n_reader);
14059            printf("\n");
14060        }
14061    }
14062#endif
14063
14064    return(ret);
14065}
14066
14067
14068static int
14069test_xmlTextReaderConstNamespaceUri(void) {
14070    int ret = 0;
14071
14072#ifdef LIBXML_READER_ENABLED
14073    int mem_base;
14074    const xmlChar * ret_val;
14075    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
14076    int n_reader;
14077
14078    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
14079        mem_base = xmlMemBlocks();
14080        reader = gen_xmlTextReaderPtr(n_reader);
14081
14082        ret_val = xmlTextReaderConstNamespaceUri(reader);
14083        desret_const_xmlChar_ptr(ret_val);
14084        call_tests++;
14085        des_xmlTextReaderPtr(n_reader, reader);
14086        xmlResetLastError();
14087        if (mem_base != xmlMemBlocks()) {
14088            printf("Leak of %d blocks found in xmlTextReaderConstNamespaceUri",
14089	           xmlMemBlocks() - mem_base);
14090	    ret++;
14091            printf(" %d", n_reader);
14092            printf("\n");
14093        }
14094    }
14095#endif
14096
14097    return(ret);
14098}
14099
14100
14101static int
14102test_xmlTextReaderConstPrefix(void) {
14103    int ret = 0;
14104
14105#ifdef LIBXML_READER_ENABLED
14106    int mem_base;
14107    const xmlChar * ret_val;
14108    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
14109    int n_reader;
14110
14111    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
14112        mem_base = xmlMemBlocks();
14113        reader = gen_xmlTextReaderPtr(n_reader);
14114
14115        ret_val = xmlTextReaderConstPrefix(reader);
14116        desret_const_xmlChar_ptr(ret_val);
14117        call_tests++;
14118        des_xmlTextReaderPtr(n_reader, reader);
14119        xmlResetLastError();
14120        if (mem_base != xmlMemBlocks()) {
14121            printf("Leak of %d blocks found in xmlTextReaderConstPrefix",
14122	           xmlMemBlocks() - mem_base);
14123	    ret++;
14124            printf(" %d", n_reader);
14125            printf("\n");
14126        }
14127    }
14128#endif
14129
14130    return(ret);
14131}
14132
14133
14134static int
14135test_xmlTextReaderConstString(void) {
14136    int ret = 0;
14137
14138#ifdef LIBXML_READER_ENABLED
14139    int mem_base;
14140    const xmlChar * ret_val;
14141    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
14142    int n_reader;
14143    const xmlChar * str; /* the string to intern. */
14144    int n_str;
14145
14146    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
14147    for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
14148        mem_base = xmlMemBlocks();
14149        reader = gen_xmlTextReaderPtr(n_reader);
14150        str = gen_const_xmlChar_ptr(n_str);
14151
14152        ret_val = xmlTextReaderConstString(reader, str);
14153        desret_const_xmlChar_ptr(ret_val);
14154        call_tests++;
14155        des_xmlTextReaderPtr(n_reader, reader);
14156        des_const_xmlChar_ptr(n_str, str);
14157        xmlResetLastError();
14158        if (mem_base != xmlMemBlocks()) {
14159            printf("Leak of %d blocks found in xmlTextReaderConstString",
14160	           xmlMemBlocks() - mem_base);
14161	    ret++;
14162            printf(" %d", n_reader);
14163            printf(" %d", n_str);
14164            printf("\n");
14165        }
14166    }
14167    }
14168#endif
14169
14170    return(ret);
14171}
14172
14173
14174static int
14175test_xmlTextReaderConstValue(void) {
14176    int ret = 0;
14177
14178#ifdef LIBXML_READER_ENABLED
14179    int mem_base;
14180    const xmlChar * ret_val;
14181    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
14182    int n_reader;
14183
14184    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
14185        mem_base = xmlMemBlocks();
14186        reader = gen_xmlTextReaderPtr(n_reader);
14187
14188        ret_val = xmlTextReaderConstValue(reader);
14189        desret_const_xmlChar_ptr(ret_val);
14190        call_tests++;
14191        des_xmlTextReaderPtr(n_reader, reader);
14192        xmlResetLastError();
14193        if (mem_base != xmlMemBlocks()) {
14194            printf("Leak of %d blocks found in xmlTextReaderConstValue",
14195	           xmlMemBlocks() - mem_base);
14196	    ret++;
14197            printf(" %d", n_reader);
14198            printf("\n");
14199        }
14200    }
14201#endif
14202
14203    return(ret);
14204}
14205
14206
14207static int
14208test_xmlTextReaderConstXmlLang(void) {
14209    int ret = 0;
14210
14211#ifdef LIBXML_READER_ENABLED
14212    int mem_base;
14213    const xmlChar * ret_val;
14214    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
14215    int n_reader;
14216
14217    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
14218        mem_base = xmlMemBlocks();
14219        reader = gen_xmlTextReaderPtr(n_reader);
14220
14221        ret_val = xmlTextReaderConstXmlLang(reader);
14222        desret_const_xmlChar_ptr(ret_val);
14223        call_tests++;
14224        des_xmlTextReaderPtr(n_reader, reader);
14225        xmlResetLastError();
14226        if (mem_base != xmlMemBlocks()) {
14227            printf("Leak of %d blocks found in xmlTextReaderConstXmlLang",
14228	           xmlMemBlocks() - mem_base);
14229	    ret++;
14230            printf(" %d", n_reader);
14231            printf("\n");
14232        }
14233    }
14234#endif
14235
14236    return(ret);
14237}
14238
14239
14240static int
14241test_xmlTextReaderConstXmlVersion(void) {
14242    int ret = 0;
14243
14244#ifdef LIBXML_READER_ENABLED
14245    int mem_base;
14246    const xmlChar * ret_val;
14247    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
14248    int n_reader;
14249
14250    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
14251        mem_base = xmlMemBlocks();
14252        reader = gen_xmlTextReaderPtr(n_reader);
14253
14254        ret_val = xmlTextReaderConstXmlVersion(reader);
14255        desret_const_xmlChar_ptr(ret_val);
14256        call_tests++;
14257        des_xmlTextReaderPtr(n_reader, reader);
14258        xmlResetLastError();
14259        if (mem_base != xmlMemBlocks()) {
14260            printf("Leak of %d blocks found in xmlTextReaderConstXmlVersion",
14261	           xmlMemBlocks() - mem_base);
14262	    ret++;
14263            printf(" %d", n_reader);
14264            printf("\n");
14265        }
14266    }
14267#endif
14268
14269    return(ret);
14270}
14271
14272
14273static int
14274test_xmlTextReaderCurrentDoc(void) {
14275    int ret = 0;
14276
14277#ifdef LIBXML_READER_ENABLED
14278    int mem_base;
14279    xmlDocPtr ret_val;
14280    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
14281    int n_reader;
14282
14283    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
14284        mem_base = xmlMemBlocks();
14285        reader = gen_xmlTextReaderPtr(n_reader);
14286
14287        ret_val = xmlTextReaderCurrentDoc(reader);
14288        desret_xmlDocPtr(ret_val);
14289        call_tests++;
14290        des_xmlTextReaderPtr(n_reader, reader);
14291        xmlResetLastError();
14292        if (mem_base != xmlMemBlocks()) {
14293            printf("Leak of %d blocks found in xmlTextReaderCurrentDoc",
14294	           xmlMemBlocks() - mem_base);
14295	    ret++;
14296            printf(" %d", n_reader);
14297            printf("\n");
14298        }
14299    }
14300#endif
14301
14302    return(ret);
14303}
14304
14305
14306static int
14307test_xmlTextReaderCurrentNode(void) {
14308    int ret = 0;
14309
14310#ifdef LIBXML_READER_ENABLED
14311    int mem_base;
14312    xmlNodePtr ret_val;
14313    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
14314    int n_reader;
14315
14316    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
14317        mem_base = xmlMemBlocks();
14318        reader = gen_xmlTextReaderPtr(n_reader);
14319
14320        ret_val = xmlTextReaderCurrentNode(reader);
14321        desret_xmlNodePtr(ret_val);
14322        call_tests++;
14323        des_xmlTextReaderPtr(n_reader, reader);
14324        xmlResetLastError();
14325        if (mem_base != xmlMemBlocks()) {
14326            printf("Leak of %d blocks found in xmlTextReaderCurrentNode",
14327	           xmlMemBlocks() - mem_base);
14328	    ret++;
14329            printf(" %d", n_reader);
14330            printf("\n");
14331        }
14332    }
14333#endif
14334
14335    return(ret);
14336}
14337
14338
14339static int
14340test_xmlTextReaderDepth(void) {
14341    int ret = 0;
14342
14343#ifdef LIBXML_READER_ENABLED
14344    int mem_base;
14345    int ret_val;
14346    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
14347    int n_reader;
14348
14349    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
14350        mem_base = xmlMemBlocks();
14351        reader = gen_xmlTextReaderPtr(n_reader);
14352
14353        ret_val = xmlTextReaderDepth(reader);
14354        desret_int(ret_val);
14355        call_tests++;
14356        des_xmlTextReaderPtr(n_reader, reader);
14357        xmlResetLastError();
14358        if (mem_base != xmlMemBlocks()) {
14359            printf("Leak of %d blocks found in xmlTextReaderDepth",
14360	           xmlMemBlocks() - mem_base);
14361	    ret++;
14362            printf(" %d", n_reader);
14363            printf("\n");
14364        }
14365    }
14366#endif
14367
14368    return(ret);
14369}
14370
14371
14372static int
14373test_xmlTextReaderExpand(void) {
14374    int ret = 0;
14375
14376#ifdef LIBXML_READER_ENABLED
14377    int mem_base;
14378    xmlNodePtr ret_val;
14379    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
14380    int n_reader;
14381
14382    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
14383        mem_base = xmlMemBlocks();
14384        reader = gen_xmlTextReaderPtr(n_reader);
14385
14386        ret_val = xmlTextReaderExpand(reader);
14387        desret_xmlNodePtr(ret_val);
14388        call_tests++;
14389        des_xmlTextReaderPtr(n_reader, reader);
14390        xmlResetLastError();
14391        if (mem_base != xmlMemBlocks()) {
14392            printf("Leak of %d blocks found in xmlTextReaderExpand",
14393	           xmlMemBlocks() - mem_base);
14394	    ret++;
14395            printf(" %d", n_reader);
14396            printf("\n");
14397        }
14398    }
14399#endif
14400
14401    return(ret);
14402}
14403
14404
14405static int
14406test_xmlTextReaderGetAttribute(void) {
14407    int ret = 0;
14408
14409#ifdef LIBXML_READER_ENABLED
14410    int mem_base;
14411    xmlChar * ret_val;
14412    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
14413    int n_reader;
14414    const xmlChar * name; /* the qualified name of the attribute. */
14415    int n_name;
14416
14417    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
14418    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
14419        mem_base = xmlMemBlocks();
14420        reader = gen_xmlTextReaderPtr(n_reader);
14421        name = gen_const_xmlChar_ptr(n_name);
14422
14423        ret_val = xmlTextReaderGetAttribute(reader, name);
14424        desret_xmlChar_ptr(ret_val);
14425        call_tests++;
14426        des_xmlTextReaderPtr(n_reader, reader);
14427        des_const_xmlChar_ptr(n_name, name);
14428        xmlResetLastError();
14429        if (mem_base != xmlMemBlocks()) {
14430            printf("Leak of %d blocks found in xmlTextReaderGetAttribute",
14431	           xmlMemBlocks() - mem_base);
14432	    ret++;
14433            printf(" %d", n_reader);
14434            printf(" %d", n_name);
14435            printf("\n");
14436        }
14437    }
14438    }
14439#endif
14440
14441    return(ret);
14442}
14443
14444
14445static int
14446test_xmlTextReaderGetAttributeNo(void) {
14447    int ret = 0;
14448
14449#ifdef LIBXML_READER_ENABLED
14450    int mem_base;
14451    xmlChar * ret_val;
14452    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
14453    int n_reader;
14454    int no; /* the zero-based index of the attribute relative to the containing element */
14455    int n_no;
14456
14457    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
14458    for (n_no = 0;n_no < gen_nb_int;n_no++) {
14459        mem_base = xmlMemBlocks();
14460        reader = gen_xmlTextReaderPtr(n_reader);
14461        no = gen_int(n_no);
14462
14463        ret_val = xmlTextReaderGetAttributeNo(reader, no);
14464        desret_xmlChar_ptr(ret_val);
14465        call_tests++;
14466        des_xmlTextReaderPtr(n_reader, reader);
14467        des_int(n_no, no);
14468        xmlResetLastError();
14469        if (mem_base != xmlMemBlocks()) {
14470            printf("Leak of %d blocks found in xmlTextReaderGetAttributeNo",
14471	           xmlMemBlocks() - mem_base);
14472	    ret++;
14473            printf(" %d", n_reader);
14474            printf(" %d", n_no);
14475            printf("\n");
14476        }
14477    }
14478    }
14479#endif
14480
14481    return(ret);
14482}
14483
14484
14485static int
14486test_xmlTextReaderGetAttributeNs(void) {
14487    int ret = 0;
14488
14489#ifdef LIBXML_READER_ENABLED
14490    int mem_base;
14491    xmlChar * ret_val;
14492    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
14493    int n_reader;
14494    const xmlChar * localName; /* the local name of the attribute. */
14495    int n_localName;
14496    const xmlChar * namespaceURI; /* the namespace URI of the attribute. */
14497    int n_namespaceURI;
14498
14499    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
14500    for (n_localName = 0;n_localName < gen_nb_const_xmlChar_ptr;n_localName++) {
14501    for (n_namespaceURI = 0;n_namespaceURI < gen_nb_const_xmlChar_ptr;n_namespaceURI++) {
14502        mem_base = xmlMemBlocks();
14503        reader = gen_xmlTextReaderPtr(n_reader);
14504        localName = gen_const_xmlChar_ptr(n_localName);
14505        namespaceURI = gen_const_xmlChar_ptr(n_namespaceURI);
14506
14507        ret_val = xmlTextReaderGetAttributeNs(reader, localName, namespaceURI);
14508        desret_xmlChar_ptr(ret_val);
14509        call_tests++;
14510        des_xmlTextReaderPtr(n_reader, reader);
14511        des_const_xmlChar_ptr(n_localName, localName);
14512        des_const_xmlChar_ptr(n_namespaceURI, namespaceURI);
14513        xmlResetLastError();
14514        if (mem_base != xmlMemBlocks()) {
14515            printf("Leak of %d blocks found in xmlTextReaderGetAttributeNs",
14516	           xmlMemBlocks() - mem_base);
14517	    ret++;
14518            printf(" %d", n_reader);
14519            printf(" %d", n_localName);
14520            printf(" %d", n_namespaceURI);
14521            printf("\n");
14522        }
14523    }
14524    }
14525    }
14526#endif
14527
14528    return(ret);
14529}
14530
14531
14532static int
14533test_xmlTextReaderGetErrorHandler(void) {
14534    int ret = 0;
14535
14536
14537    /* missing type support */
14538    return(ret);
14539}
14540
14541
14542static int
14543test_xmlTextReaderGetParserProp(void) {
14544    int ret = 0;
14545
14546#ifdef LIBXML_READER_ENABLED
14547    int mem_base;
14548    int ret_val;
14549    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
14550    int n_reader;
14551    int prop; /* the xmlParserProperties to get */
14552    int n_prop;
14553
14554    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
14555    for (n_prop = 0;n_prop < gen_nb_int;n_prop++) {
14556        mem_base = xmlMemBlocks();
14557        reader = gen_xmlTextReaderPtr(n_reader);
14558        prop = gen_int(n_prop);
14559
14560        ret_val = xmlTextReaderGetParserProp(reader, prop);
14561        desret_int(ret_val);
14562        call_tests++;
14563        des_xmlTextReaderPtr(n_reader, reader);
14564        des_int(n_prop, prop);
14565        xmlResetLastError();
14566        if (mem_base != xmlMemBlocks()) {
14567            printf("Leak of %d blocks found in xmlTextReaderGetParserProp",
14568	           xmlMemBlocks() - mem_base);
14569	    ret++;
14570            printf(" %d", n_reader);
14571            printf(" %d", n_prop);
14572            printf("\n");
14573        }
14574    }
14575    }
14576#endif
14577
14578    return(ret);
14579}
14580
14581
14582static int
14583test_xmlTextReaderGetRemainder(void) {
14584    int ret = 0;
14585
14586
14587    /* missing type support */
14588    return(ret);
14589}
14590
14591
14592static int
14593test_xmlTextReaderHasAttributes(void) {
14594    int ret = 0;
14595
14596#ifdef LIBXML_READER_ENABLED
14597    int mem_base;
14598    int ret_val;
14599    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
14600    int n_reader;
14601
14602    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
14603        mem_base = xmlMemBlocks();
14604        reader = gen_xmlTextReaderPtr(n_reader);
14605
14606        ret_val = xmlTextReaderHasAttributes(reader);
14607        desret_int(ret_val);
14608        call_tests++;
14609        des_xmlTextReaderPtr(n_reader, reader);
14610        xmlResetLastError();
14611        if (mem_base != xmlMemBlocks()) {
14612            printf("Leak of %d blocks found in xmlTextReaderHasAttributes",
14613	           xmlMemBlocks() - mem_base);
14614	    ret++;
14615            printf(" %d", n_reader);
14616            printf("\n");
14617        }
14618    }
14619#endif
14620
14621    return(ret);
14622}
14623
14624
14625static int
14626test_xmlTextReaderHasValue(void) {
14627    int ret = 0;
14628
14629#ifdef LIBXML_READER_ENABLED
14630    int mem_base;
14631    int ret_val;
14632    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
14633    int n_reader;
14634
14635    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
14636        mem_base = xmlMemBlocks();
14637        reader = gen_xmlTextReaderPtr(n_reader);
14638
14639        ret_val = xmlTextReaderHasValue(reader);
14640        desret_int(ret_val);
14641        call_tests++;
14642        des_xmlTextReaderPtr(n_reader, reader);
14643        xmlResetLastError();
14644        if (mem_base != xmlMemBlocks()) {
14645            printf("Leak of %d blocks found in xmlTextReaderHasValue",
14646	           xmlMemBlocks() - mem_base);
14647	    ret++;
14648            printf(" %d", n_reader);
14649            printf("\n");
14650        }
14651    }
14652#endif
14653
14654    return(ret);
14655}
14656
14657
14658static int
14659test_xmlTextReaderIsDefault(void) {
14660    int ret = 0;
14661
14662#ifdef LIBXML_READER_ENABLED
14663    int mem_base;
14664    int ret_val;
14665    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
14666    int n_reader;
14667
14668    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
14669        mem_base = xmlMemBlocks();
14670        reader = gen_xmlTextReaderPtr(n_reader);
14671
14672        ret_val = xmlTextReaderIsDefault(reader);
14673        desret_int(ret_val);
14674        call_tests++;
14675        des_xmlTextReaderPtr(n_reader, reader);
14676        xmlResetLastError();
14677        if (mem_base != xmlMemBlocks()) {
14678            printf("Leak of %d blocks found in xmlTextReaderIsDefault",
14679	           xmlMemBlocks() - mem_base);
14680	    ret++;
14681            printf(" %d", n_reader);
14682            printf("\n");
14683        }
14684    }
14685#endif
14686
14687    return(ret);
14688}
14689
14690
14691static int
14692test_xmlTextReaderIsEmptyElement(void) {
14693    int ret = 0;
14694
14695#ifdef LIBXML_READER_ENABLED
14696    int mem_base;
14697    int ret_val;
14698    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
14699    int n_reader;
14700
14701    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
14702        mem_base = xmlMemBlocks();
14703        reader = gen_xmlTextReaderPtr(n_reader);
14704
14705        ret_val = xmlTextReaderIsEmptyElement(reader);
14706        desret_int(ret_val);
14707        call_tests++;
14708        des_xmlTextReaderPtr(n_reader, reader);
14709        xmlResetLastError();
14710        if (mem_base != xmlMemBlocks()) {
14711            printf("Leak of %d blocks found in xmlTextReaderIsEmptyElement",
14712	           xmlMemBlocks() - mem_base);
14713	    ret++;
14714            printf(" %d", n_reader);
14715            printf("\n");
14716        }
14717    }
14718#endif
14719
14720    return(ret);
14721}
14722
14723
14724static int
14725test_xmlTextReaderIsNamespaceDecl(void) {
14726    int ret = 0;
14727
14728#ifdef LIBXML_READER_ENABLED
14729    int mem_base;
14730    int ret_val;
14731    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
14732    int n_reader;
14733
14734    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
14735        mem_base = xmlMemBlocks();
14736        reader = gen_xmlTextReaderPtr(n_reader);
14737
14738        ret_val = xmlTextReaderIsNamespaceDecl(reader);
14739        desret_int(ret_val);
14740        call_tests++;
14741        des_xmlTextReaderPtr(n_reader, reader);
14742        xmlResetLastError();
14743        if (mem_base != xmlMemBlocks()) {
14744            printf("Leak of %d blocks found in xmlTextReaderIsNamespaceDecl",
14745	           xmlMemBlocks() - mem_base);
14746	    ret++;
14747            printf(" %d", n_reader);
14748            printf("\n");
14749        }
14750    }
14751#endif
14752
14753    return(ret);
14754}
14755
14756
14757static int
14758test_xmlTextReaderIsValid(void) {
14759    int ret = 0;
14760
14761#ifdef LIBXML_READER_ENABLED
14762    int mem_base;
14763    int ret_val;
14764    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
14765    int n_reader;
14766
14767    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
14768        mem_base = xmlMemBlocks();
14769        reader = gen_xmlTextReaderPtr(n_reader);
14770
14771        ret_val = xmlTextReaderIsValid(reader);
14772        desret_int(ret_val);
14773        call_tests++;
14774        des_xmlTextReaderPtr(n_reader, reader);
14775        xmlResetLastError();
14776        if (mem_base != xmlMemBlocks()) {
14777            printf("Leak of %d blocks found in xmlTextReaderIsValid",
14778	           xmlMemBlocks() - mem_base);
14779	    ret++;
14780            printf(" %d", n_reader);
14781            printf("\n");
14782        }
14783    }
14784#endif
14785
14786    return(ret);
14787}
14788
14789
14790static int
14791test_xmlTextReaderLocalName(void) {
14792    int ret = 0;
14793
14794#ifdef LIBXML_READER_ENABLED
14795    int mem_base;
14796    xmlChar * ret_val;
14797    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
14798    int n_reader;
14799
14800    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
14801        mem_base = xmlMemBlocks();
14802        reader = gen_xmlTextReaderPtr(n_reader);
14803
14804        ret_val = xmlTextReaderLocalName(reader);
14805        desret_xmlChar_ptr(ret_val);
14806        call_tests++;
14807        des_xmlTextReaderPtr(n_reader, reader);
14808        xmlResetLastError();
14809        if (mem_base != xmlMemBlocks()) {
14810            printf("Leak of %d blocks found in xmlTextReaderLocalName",
14811	           xmlMemBlocks() - mem_base);
14812	    ret++;
14813            printf(" %d", n_reader);
14814            printf("\n");
14815        }
14816    }
14817#endif
14818
14819    return(ret);
14820}
14821
14822
14823static int
14824test_xmlTextReaderLocatorBaseURI(void) {
14825    int ret = 0;
14826
14827
14828    /* missing type support */
14829    return(ret);
14830}
14831
14832
14833static int
14834test_xmlTextReaderLocatorLineNumber(void) {
14835    int ret = 0;
14836
14837
14838    /* missing type support */
14839    return(ret);
14840}
14841
14842
14843static int
14844test_xmlTextReaderLookupNamespace(void) {
14845    int ret = 0;
14846
14847#ifdef LIBXML_READER_ENABLED
14848    int mem_base;
14849    xmlChar * ret_val;
14850    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
14851    int n_reader;
14852    const xmlChar * prefix; /* the prefix whose namespace URI is to be resolved. To return the default namespace, specify NULL */
14853    int n_prefix;
14854
14855    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
14856    for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
14857        mem_base = xmlMemBlocks();
14858        reader = gen_xmlTextReaderPtr(n_reader);
14859        prefix = gen_const_xmlChar_ptr(n_prefix);
14860
14861        ret_val = xmlTextReaderLookupNamespace(reader, prefix);
14862        desret_xmlChar_ptr(ret_val);
14863        call_tests++;
14864        des_xmlTextReaderPtr(n_reader, reader);
14865        des_const_xmlChar_ptr(n_prefix, prefix);
14866        xmlResetLastError();
14867        if (mem_base != xmlMemBlocks()) {
14868            printf("Leak of %d blocks found in xmlTextReaderLookupNamespace",
14869	           xmlMemBlocks() - mem_base);
14870	    ret++;
14871            printf(" %d", n_reader);
14872            printf(" %d", n_prefix);
14873            printf("\n");
14874        }
14875    }
14876    }
14877#endif
14878
14879    return(ret);
14880}
14881
14882
14883static int
14884test_xmlTextReaderMoveToAttribute(void) {
14885    int ret = 0;
14886
14887#ifdef LIBXML_READER_ENABLED
14888    int mem_base;
14889    int ret_val;
14890    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
14891    int n_reader;
14892    const xmlChar * name; /* the qualified name of the attribute. */
14893    int n_name;
14894
14895    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
14896    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
14897        mem_base = xmlMemBlocks();
14898        reader = gen_xmlTextReaderPtr(n_reader);
14899        name = gen_const_xmlChar_ptr(n_name);
14900
14901        ret_val = xmlTextReaderMoveToAttribute(reader, name);
14902        desret_int(ret_val);
14903        call_tests++;
14904        des_xmlTextReaderPtr(n_reader, reader);
14905        des_const_xmlChar_ptr(n_name, name);
14906        xmlResetLastError();
14907        if (mem_base != xmlMemBlocks()) {
14908            printf("Leak of %d blocks found in xmlTextReaderMoveToAttribute",
14909	           xmlMemBlocks() - mem_base);
14910	    ret++;
14911            printf(" %d", n_reader);
14912            printf(" %d", n_name);
14913            printf("\n");
14914        }
14915    }
14916    }
14917#endif
14918
14919    return(ret);
14920}
14921
14922
14923static int
14924test_xmlTextReaderMoveToAttributeNo(void) {
14925    int ret = 0;
14926
14927#ifdef LIBXML_READER_ENABLED
14928    int mem_base;
14929    int ret_val;
14930    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
14931    int n_reader;
14932    int no; /* the zero-based index of the attribute relative to the containing element. */
14933    int n_no;
14934
14935    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
14936    for (n_no = 0;n_no < gen_nb_int;n_no++) {
14937        mem_base = xmlMemBlocks();
14938        reader = gen_xmlTextReaderPtr(n_reader);
14939        no = gen_int(n_no);
14940
14941        ret_val = xmlTextReaderMoveToAttributeNo(reader, no);
14942        desret_int(ret_val);
14943        call_tests++;
14944        des_xmlTextReaderPtr(n_reader, reader);
14945        des_int(n_no, no);
14946        xmlResetLastError();
14947        if (mem_base != xmlMemBlocks()) {
14948            printf("Leak of %d blocks found in xmlTextReaderMoveToAttributeNo",
14949	           xmlMemBlocks() - mem_base);
14950	    ret++;
14951            printf(" %d", n_reader);
14952            printf(" %d", n_no);
14953            printf("\n");
14954        }
14955    }
14956    }
14957#endif
14958
14959    return(ret);
14960}
14961
14962
14963static int
14964test_xmlTextReaderMoveToAttributeNs(void) {
14965    int ret = 0;
14966
14967#ifdef LIBXML_READER_ENABLED
14968    int mem_base;
14969    int ret_val;
14970    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
14971    int n_reader;
14972    const xmlChar * localName; /* the local name of the attribute. */
14973    int n_localName;
14974    const xmlChar * namespaceURI; /* the namespace URI of the attribute. */
14975    int n_namespaceURI;
14976
14977    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
14978    for (n_localName = 0;n_localName < gen_nb_const_xmlChar_ptr;n_localName++) {
14979    for (n_namespaceURI = 0;n_namespaceURI < gen_nb_const_xmlChar_ptr;n_namespaceURI++) {
14980        mem_base = xmlMemBlocks();
14981        reader = gen_xmlTextReaderPtr(n_reader);
14982        localName = gen_const_xmlChar_ptr(n_localName);
14983        namespaceURI = gen_const_xmlChar_ptr(n_namespaceURI);
14984
14985        ret_val = xmlTextReaderMoveToAttributeNs(reader, localName, namespaceURI);
14986        desret_int(ret_val);
14987        call_tests++;
14988        des_xmlTextReaderPtr(n_reader, reader);
14989        des_const_xmlChar_ptr(n_localName, localName);
14990        des_const_xmlChar_ptr(n_namespaceURI, namespaceURI);
14991        xmlResetLastError();
14992        if (mem_base != xmlMemBlocks()) {
14993            printf("Leak of %d blocks found in xmlTextReaderMoveToAttributeNs",
14994	           xmlMemBlocks() - mem_base);
14995	    ret++;
14996            printf(" %d", n_reader);
14997            printf(" %d", n_localName);
14998            printf(" %d", n_namespaceURI);
14999            printf("\n");
15000        }
15001    }
15002    }
15003    }
15004#endif
15005
15006    return(ret);
15007}
15008
15009
15010static int
15011test_xmlTextReaderMoveToElement(void) {
15012    int ret = 0;
15013
15014#ifdef LIBXML_READER_ENABLED
15015    int mem_base;
15016    int ret_val;
15017    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
15018    int n_reader;
15019
15020    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
15021        mem_base = xmlMemBlocks();
15022        reader = gen_xmlTextReaderPtr(n_reader);
15023
15024        ret_val = xmlTextReaderMoveToElement(reader);
15025        desret_int(ret_val);
15026        call_tests++;
15027        des_xmlTextReaderPtr(n_reader, reader);
15028        xmlResetLastError();
15029        if (mem_base != xmlMemBlocks()) {
15030            printf("Leak of %d blocks found in xmlTextReaderMoveToElement",
15031	           xmlMemBlocks() - mem_base);
15032	    ret++;
15033            printf(" %d", n_reader);
15034            printf("\n");
15035        }
15036    }
15037#endif
15038
15039    return(ret);
15040}
15041
15042
15043static int
15044test_xmlTextReaderMoveToFirstAttribute(void) {
15045    int ret = 0;
15046
15047#ifdef LIBXML_READER_ENABLED
15048    int mem_base;
15049    int ret_val;
15050    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
15051    int n_reader;
15052
15053    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
15054        mem_base = xmlMemBlocks();
15055        reader = gen_xmlTextReaderPtr(n_reader);
15056
15057        ret_val = xmlTextReaderMoveToFirstAttribute(reader);
15058        desret_int(ret_val);
15059        call_tests++;
15060        des_xmlTextReaderPtr(n_reader, reader);
15061        xmlResetLastError();
15062        if (mem_base != xmlMemBlocks()) {
15063            printf("Leak of %d blocks found in xmlTextReaderMoveToFirstAttribute",
15064	           xmlMemBlocks() - mem_base);
15065	    ret++;
15066            printf(" %d", n_reader);
15067            printf("\n");
15068        }
15069    }
15070#endif
15071
15072    return(ret);
15073}
15074
15075
15076static int
15077test_xmlTextReaderMoveToNextAttribute(void) {
15078    int ret = 0;
15079
15080#ifdef LIBXML_READER_ENABLED
15081    int mem_base;
15082    int ret_val;
15083    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
15084    int n_reader;
15085
15086    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
15087        mem_base = xmlMemBlocks();
15088        reader = gen_xmlTextReaderPtr(n_reader);
15089
15090        ret_val = xmlTextReaderMoveToNextAttribute(reader);
15091        desret_int(ret_val);
15092        call_tests++;
15093        des_xmlTextReaderPtr(n_reader, reader);
15094        xmlResetLastError();
15095        if (mem_base != xmlMemBlocks()) {
15096            printf("Leak of %d blocks found in xmlTextReaderMoveToNextAttribute",
15097	           xmlMemBlocks() - mem_base);
15098	    ret++;
15099            printf(" %d", n_reader);
15100            printf("\n");
15101        }
15102    }
15103#endif
15104
15105    return(ret);
15106}
15107
15108
15109static int
15110test_xmlTextReaderName(void) {
15111    int ret = 0;
15112
15113#ifdef LIBXML_READER_ENABLED
15114    int mem_base;
15115    xmlChar * ret_val;
15116    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
15117    int n_reader;
15118
15119    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
15120        mem_base = xmlMemBlocks();
15121        reader = gen_xmlTextReaderPtr(n_reader);
15122
15123        ret_val = xmlTextReaderName(reader);
15124        desret_xmlChar_ptr(ret_val);
15125        call_tests++;
15126        des_xmlTextReaderPtr(n_reader, reader);
15127        xmlResetLastError();
15128        if (mem_base != xmlMemBlocks()) {
15129            printf("Leak of %d blocks found in xmlTextReaderName",
15130	           xmlMemBlocks() - mem_base);
15131	    ret++;
15132            printf(" %d", n_reader);
15133            printf("\n");
15134        }
15135    }
15136#endif
15137
15138    return(ret);
15139}
15140
15141
15142static int
15143test_xmlTextReaderNamespaceUri(void) {
15144    int ret = 0;
15145
15146#ifdef LIBXML_READER_ENABLED
15147    int mem_base;
15148    xmlChar * ret_val;
15149    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
15150    int n_reader;
15151
15152    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
15153        mem_base = xmlMemBlocks();
15154        reader = gen_xmlTextReaderPtr(n_reader);
15155
15156        ret_val = xmlTextReaderNamespaceUri(reader);
15157        desret_xmlChar_ptr(ret_val);
15158        call_tests++;
15159        des_xmlTextReaderPtr(n_reader, reader);
15160        xmlResetLastError();
15161        if (mem_base != xmlMemBlocks()) {
15162            printf("Leak of %d blocks found in xmlTextReaderNamespaceUri",
15163	           xmlMemBlocks() - mem_base);
15164	    ret++;
15165            printf(" %d", n_reader);
15166            printf("\n");
15167        }
15168    }
15169#endif
15170
15171    return(ret);
15172}
15173
15174
15175static int
15176test_xmlTextReaderNext(void) {
15177    int ret = 0;
15178
15179#ifdef LIBXML_READER_ENABLED
15180    int mem_base;
15181    int ret_val;
15182    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
15183    int n_reader;
15184
15185    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
15186        mem_base = xmlMemBlocks();
15187        reader = gen_xmlTextReaderPtr(n_reader);
15188
15189        ret_val = xmlTextReaderNext(reader);
15190        desret_int(ret_val);
15191        call_tests++;
15192        des_xmlTextReaderPtr(n_reader, reader);
15193        xmlResetLastError();
15194        if (mem_base != xmlMemBlocks()) {
15195            printf("Leak of %d blocks found in xmlTextReaderNext",
15196	           xmlMemBlocks() - mem_base);
15197	    ret++;
15198            printf(" %d", n_reader);
15199            printf("\n");
15200        }
15201    }
15202#endif
15203
15204    return(ret);
15205}
15206
15207
15208static int
15209test_xmlTextReaderNextSibling(void) {
15210    int ret = 0;
15211
15212#ifdef LIBXML_READER_ENABLED
15213    int mem_base;
15214    int ret_val;
15215    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
15216    int n_reader;
15217
15218    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
15219        mem_base = xmlMemBlocks();
15220        reader = gen_xmlTextReaderPtr(n_reader);
15221
15222        ret_val = xmlTextReaderNextSibling(reader);
15223        desret_int(ret_val);
15224        call_tests++;
15225        des_xmlTextReaderPtr(n_reader, reader);
15226        xmlResetLastError();
15227        if (mem_base != xmlMemBlocks()) {
15228            printf("Leak of %d blocks found in xmlTextReaderNextSibling",
15229	           xmlMemBlocks() - mem_base);
15230	    ret++;
15231            printf(" %d", n_reader);
15232            printf("\n");
15233        }
15234    }
15235#endif
15236
15237    return(ret);
15238}
15239
15240
15241static int
15242test_xmlTextReaderNodeType(void) {
15243    int ret = 0;
15244
15245#ifdef LIBXML_READER_ENABLED
15246    int mem_base;
15247    int ret_val;
15248    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
15249    int n_reader;
15250
15251    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
15252        mem_base = xmlMemBlocks();
15253        reader = gen_xmlTextReaderPtr(n_reader);
15254
15255        ret_val = xmlTextReaderNodeType(reader);
15256        desret_int(ret_val);
15257        call_tests++;
15258        des_xmlTextReaderPtr(n_reader, reader);
15259        xmlResetLastError();
15260        if (mem_base != xmlMemBlocks()) {
15261            printf("Leak of %d blocks found in xmlTextReaderNodeType",
15262	           xmlMemBlocks() - mem_base);
15263	    ret++;
15264            printf(" %d", n_reader);
15265            printf("\n");
15266        }
15267    }
15268#endif
15269
15270    return(ret);
15271}
15272
15273
15274static int
15275test_xmlTextReaderNormalization(void) {
15276    int ret = 0;
15277
15278#ifdef LIBXML_READER_ENABLED
15279    int mem_base;
15280    int ret_val;
15281    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
15282    int n_reader;
15283
15284    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
15285        mem_base = xmlMemBlocks();
15286        reader = gen_xmlTextReaderPtr(n_reader);
15287
15288        ret_val = xmlTextReaderNormalization(reader);
15289        desret_int(ret_val);
15290        call_tests++;
15291        des_xmlTextReaderPtr(n_reader, reader);
15292        xmlResetLastError();
15293        if (mem_base != xmlMemBlocks()) {
15294            printf("Leak of %d blocks found in xmlTextReaderNormalization",
15295	           xmlMemBlocks() - mem_base);
15296	    ret++;
15297            printf(" %d", n_reader);
15298            printf("\n");
15299        }
15300    }
15301#endif
15302
15303    return(ret);
15304}
15305
15306
15307static int
15308test_xmlTextReaderPrefix(void) {
15309    int ret = 0;
15310
15311#ifdef LIBXML_READER_ENABLED
15312    int mem_base;
15313    xmlChar * ret_val;
15314    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
15315    int n_reader;
15316
15317    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
15318        mem_base = xmlMemBlocks();
15319        reader = gen_xmlTextReaderPtr(n_reader);
15320
15321        ret_val = xmlTextReaderPrefix(reader);
15322        desret_xmlChar_ptr(ret_val);
15323        call_tests++;
15324        des_xmlTextReaderPtr(n_reader, reader);
15325        xmlResetLastError();
15326        if (mem_base != xmlMemBlocks()) {
15327            printf("Leak of %d blocks found in xmlTextReaderPrefix",
15328	           xmlMemBlocks() - mem_base);
15329	    ret++;
15330            printf(" %d", n_reader);
15331            printf("\n");
15332        }
15333    }
15334#endif
15335
15336    return(ret);
15337}
15338
15339
15340static int
15341test_xmlTextReaderPreserve(void) {
15342    int ret = 0;
15343
15344#ifdef LIBXML_READER_ENABLED
15345    int mem_base;
15346    xmlNodePtr ret_val;
15347    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
15348    int n_reader;
15349
15350    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
15351        mem_base = xmlMemBlocks();
15352        reader = gen_xmlTextReaderPtr(n_reader);
15353
15354        ret_val = xmlTextReaderPreserve(reader);
15355        desret_xmlNodePtr(ret_val);
15356        call_tests++;
15357        des_xmlTextReaderPtr(n_reader, reader);
15358        xmlResetLastError();
15359        if (mem_base != xmlMemBlocks()) {
15360            printf("Leak of %d blocks found in xmlTextReaderPreserve",
15361	           xmlMemBlocks() - mem_base);
15362	    ret++;
15363            printf(" %d", n_reader);
15364            printf("\n");
15365        }
15366    }
15367#endif
15368
15369    return(ret);
15370}
15371
15372
15373static int
15374test_xmlTextReaderPreservePattern(void) {
15375    int ret = 0;
15376
15377
15378    /* missing type support */
15379    return(ret);
15380}
15381
15382
15383static int
15384test_xmlTextReaderQuoteChar(void) {
15385    int ret = 0;
15386
15387#ifdef LIBXML_READER_ENABLED
15388    int mem_base;
15389    int ret_val;
15390    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
15391    int n_reader;
15392
15393    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
15394        mem_base = xmlMemBlocks();
15395        reader = gen_xmlTextReaderPtr(n_reader);
15396
15397        ret_val = xmlTextReaderQuoteChar(reader);
15398        desret_int(ret_val);
15399        call_tests++;
15400        des_xmlTextReaderPtr(n_reader, reader);
15401        xmlResetLastError();
15402        if (mem_base != xmlMemBlocks()) {
15403            printf("Leak of %d blocks found in xmlTextReaderQuoteChar",
15404	           xmlMemBlocks() - mem_base);
15405	    ret++;
15406            printf(" %d", n_reader);
15407            printf("\n");
15408        }
15409    }
15410#endif
15411
15412    return(ret);
15413}
15414
15415
15416static int
15417test_xmlTextReaderRead(void) {
15418    int ret = 0;
15419
15420#ifdef LIBXML_READER_ENABLED
15421    int mem_base;
15422    int ret_val;
15423    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
15424    int n_reader;
15425
15426    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
15427        mem_base = xmlMemBlocks();
15428        reader = gen_xmlTextReaderPtr(n_reader);
15429
15430        ret_val = xmlTextReaderRead(reader);
15431        desret_int(ret_val);
15432        call_tests++;
15433        des_xmlTextReaderPtr(n_reader, reader);
15434        xmlResetLastError();
15435        if (mem_base != xmlMemBlocks()) {
15436            printf("Leak of %d blocks found in xmlTextReaderRead",
15437	           xmlMemBlocks() - mem_base);
15438	    ret++;
15439            printf(" %d", n_reader);
15440            printf("\n");
15441        }
15442    }
15443#endif
15444
15445    return(ret);
15446}
15447
15448
15449static int
15450test_xmlTextReaderReadAttributeValue(void) {
15451    int ret = 0;
15452
15453#ifdef LIBXML_READER_ENABLED
15454    int mem_base;
15455    int ret_val;
15456    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
15457    int n_reader;
15458
15459    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
15460        mem_base = xmlMemBlocks();
15461        reader = gen_xmlTextReaderPtr(n_reader);
15462
15463        ret_val = xmlTextReaderReadAttributeValue(reader);
15464        desret_int(ret_val);
15465        call_tests++;
15466        des_xmlTextReaderPtr(n_reader, reader);
15467        xmlResetLastError();
15468        if (mem_base != xmlMemBlocks()) {
15469            printf("Leak of %d blocks found in xmlTextReaderReadAttributeValue",
15470	           xmlMemBlocks() - mem_base);
15471	    ret++;
15472            printf(" %d", n_reader);
15473            printf("\n");
15474        }
15475    }
15476#endif
15477
15478    return(ret);
15479}
15480
15481
15482static int
15483test_xmlTextReaderReadState(void) {
15484    int ret = 0;
15485
15486#ifdef LIBXML_READER_ENABLED
15487    int mem_base;
15488    int ret_val;
15489    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
15490    int n_reader;
15491
15492    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
15493        mem_base = xmlMemBlocks();
15494        reader = gen_xmlTextReaderPtr(n_reader);
15495
15496        ret_val = xmlTextReaderReadState(reader);
15497        desret_int(ret_val);
15498        call_tests++;
15499        des_xmlTextReaderPtr(n_reader, reader);
15500        xmlResetLastError();
15501        if (mem_base != xmlMemBlocks()) {
15502            printf("Leak of %d blocks found in xmlTextReaderReadState",
15503	           xmlMemBlocks() - mem_base);
15504	    ret++;
15505            printf(" %d", n_reader);
15506            printf("\n");
15507        }
15508    }
15509#endif
15510
15511    return(ret);
15512}
15513
15514
15515static int
15516test_xmlTextReaderRelaxNGSetSchema(void) {
15517    int ret = 0;
15518
15519
15520    /* missing type support */
15521    return(ret);
15522}
15523
15524
15525static int
15526test_xmlTextReaderRelaxNGValidate(void) {
15527    int ret = 0;
15528
15529#ifdef LIBXML_READER_ENABLED
15530#ifdef LIBXML_SCHEMAS_ENABLED
15531    int mem_base;
15532    int ret_val;
15533    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
15534    int n_reader;
15535    const char * rng; /* the path to a RelaxNG schema or NULL */
15536    int n_rng;
15537
15538    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
15539    for (n_rng = 0;n_rng < gen_nb_const_char_ptr;n_rng++) {
15540        mem_base = xmlMemBlocks();
15541        reader = gen_xmlTextReaderPtr(n_reader);
15542        rng = gen_const_char_ptr(n_rng);
15543
15544        ret_val = xmlTextReaderRelaxNGValidate(reader, rng);
15545        desret_int(ret_val);
15546        call_tests++;
15547        des_xmlTextReaderPtr(n_reader, reader);
15548        des_const_char_ptr(n_rng, rng);
15549        xmlResetLastError();
15550        if (mem_base != xmlMemBlocks()) {
15551            printf("Leak of %d blocks found in xmlTextReaderRelaxNGValidate",
15552	           xmlMemBlocks() - mem_base);
15553	    ret++;
15554            printf(" %d", n_reader);
15555            printf(" %d", n_rng);
15556            printf("\n");
15557        }
15558    }
15559    }
15560#endif
15561#endif
15562
15563    return(ret);
15564}
15565
15566
15567static int
15568test_xmlTextReaderSetErrorHandler(void) {
15569    int ret = 0;
15570
15571
15572    /* missing type support */
15573    return(ret);
15574}
15575
15576
15577static int
15578test_xmlTextReaderSetParserProp(void) {
15579    int ret = 0;
15580
15581#ifdef LIBXML_READER_ENABLED
15582    int mem_base;
15583    int ret_val;
15584    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
15585    int n_reader;
15586    int prop; /* the xmlParserProperties to set */
15587    int n_prop;
15588    int value; /* usually 0 or 1 to (de)activate it */
15589    int n_value;
15590
15591    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
15592    for (n_prop = 0;n_prop < gen_nb_int;n_prop++) {
15593    for (n_value = 0;n_value < gen_nb_int;n_value++) {
15594        mem_base = xmlMemBlocks();
15595        reader = gen_xmlTextReaderPtr(n_reader);
15596        prop = gen_int(n_prop);
15597        value = gen_int(n_value);
15598
15599        ret_val = xmlTextReaderSetParserProp(reader, prop, value);
15600        desret_int(ret_val);
15601        call_tests++;
15602        des_xmlTextReaderPtr(n_reader, reader);
15603        des_int(n_prop, prop);
15604        des_int(n_value, value);
15605        xmlResetLastError();
15606        if (mem_base != xmlMemBlocks()) {
15607            printf("Leak of %d blocks found in xmlTextReaderSetParserProp",
15608	           xmlMemBlocks() - mem_base);
15609	    ret++;
15610            printf(" %d", n_reader);
15611            printf(" %d", n_prop);
15612            printf(" %d", n_value);
15613            printf("\n");
15614        }
15615    }
15616    }
15617    }
15618#endif
15619
15620    return(ret);
15621}
15622
15623
15624static int
15625test_xmlTextReaderSetStructuredErrorHandler(void) {
15626    int ret = 0;
15627
15628
15629    /* missing type support */
15630    return(ret);
15631}
15632
15633
15634static int
15635test_xmlTextReaderStandalone(void) {
15636    int ret = 0;
15637
15638#ifdef LIBXML_READER_ENABLED
15639    int mem_base;
15640    int ret_val;
15641    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
15642    int n_reader;
15643
15644    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
15645        mem_base = xmlMemBlocks();
15646        reader = gen_xmlTextReaderPtr(n_reader);
15647
15648        ret_val = xmlTextReaderStandalone(reader);
15649        desret_int(ret_val);
15650        call_tests++;
15651        des_xmlTextReaderPtr(n_reader, reader);
15652        xmlResetLastError();
15653        if (mem_base != xmlMemBlocks()) {
15654            printf("Leak of %d blocks found in xmlTextReaderStandalone",
15655	           xmlMemBlocks() - mem_base);
15656	    ret++;
15657            printf(" %d", n_reader);
15658            printf("\n");
15659        }
15660    }
15661#endif
15662
15663    return(ret);
15664}
15665
15666
15667static int
15668test_xmlTextReaderValue(void) {
15669    int ret = 0;
15670
15671#ifdef LIBXML_READER_ENABLED
15672    int mem_base;
15673    xmlChar * ret_val;
15674    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
15675    int n_reader;
15676
15677    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
15678        mem_base = xmlMemBlocks();
15679        reader = gen_xmlTextReaderPtr(n_reader);
15680
15681        ret_val = xmlTextReaderValue(reader);
15682        desret_xmlChar_ptr(ret_val);
15683        call_tests++;
15684        des_xmlTextReaderPtr(n_reader, reader);
15685        xmlResetLastError();
15686        if (mem_base != xmlMemBlocks()) {
15687            printf("Leak of %d blocks found in xmlTextReaderValue",
15688	           xmlMemBlocks() - mem_base);
15689	    ret++;
15690            printf(" %d", n_reader);
15691            printf("\n");
15692        }
15693    }
15694#endif
15695
15696    return(ret);
15697}
15698
15699
15700static int
15701test_xmlTextReaderXmlLang(void) {
15702    int ret = 0;
15703
15704#ifdef LIBXML_READER_ENABLED
15705    int mem_base;
15706    xmlChar * ret_val;
15707    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
15708    int n_reader;
15709
15710    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
15711        mem_base = xmlMemBlocks();
15712        reader = gen_xmlTextReaderPtr(n_reader);
15713
15714        ret_val = xmlTextReaderXmlLang(reader);
15715        desret_xmlChar_ptr(ret_val);
15716        call_tests++;
15717        des_xmlTextReaderPtr(n_reader, reader);
15718        xmlResetLastError();
15719        if (mem_base != xmlMemBlocks()) {
15720            printf("Leak of %d blocks found in xmlTextReaderXmlLang",
15721	           xmlMemBlocks() - mem_base);
15722	    ret++;
15723            printf(" %d", n_reader);
15724            printf("\n");
15725        }
15726    }
15727#endif
15728
15729    return(ret);
15730}
15731
15732static int
15733test_xmlreader(void) {
15734    int ret = 0;
15735
15736    printf("Testing xmlreader ...\n");
15737    ret += test_xmlNewTextReader();
15738    ret += test_xmlNewTextReaderFilename();
15739    ret += test_xmlReaderForDoc();
15740    ret += test_xmlReaderForFd();
15741    ret += test_xmlReaderForFile();
15742    ret += test_xmlReaderForIO();
15743    ret += test_xmlReaderForMemory();
15744    ret += test_xmlReaderNewDoc();
15745    ret += test_xmlReaderNewFile();
15746    ret += test_xmlReaderNewMemory();
15747    ret += test_xmlReaderNewWalker();
15748    ret += test_xmlReaderWalker();
15749    ret += test_xmlTextReaderAttributeCount();
15750    ret += test_xmlTextReaderBaseUri();
15751    ret += test_xmlTextReaderClose();
15752    ret += test_xmlTextReaderConstBaseUri();
15753    ret += test_xmlTextReaderConstEncoding();
15754    ret += test_xmlTextReaderConstLocalName();
15755    ret += test_xmlTextReaderConstName();
15756    ret += test_xmlTextReaderConstNamespaceUri();
15757    ret += test_xmlTextReaderConstPrefix();
15758    ret += test_xmlTextReaderConstString();
15759    ret += test_xmlTextReaderConstValue();
15760    ret += test_xmlTextReaderConstXmlLang();
15761    ret += test_xmlTextReaderConstXmlVersion();
15762    ret += test_xmlTextReaderCurrentDoc();
15763    ret += test_xmlTextReaderCurrentNode();
15764    ret += test_xmlTextReaderDepth();
15765    ret += test_xmlTextReaderExpand();
15766    ret += test_xmlTextReaderGetAttribute();
15767    ret += test_xmlTextReaderGetAttributeNo();
15768    ret += test_xmlTextReaderGetAttributeNs();
15769    ret += test_xmlTextReaderGetErrorHandler();
15770    ret += test_xmlTextReaderGetParserProp();
15771    ret += test_xmlTextReaderGetRemainder();
15772    ret += test_xmlTextReaderHasAttributes();
15773    ret += test_xmlTextReaderHasValue();
15774    ret += test_xmlTextReaderIsDefault();
15775    ret += test_xmlTextReaderIsEmptyElement();
15776    ret += test_xmlTextReaderIsNamespaceDecl();
15777    ret += test_xmlTextReaderIsValid();
15778    ret += test_xmlTextReaderLocalName();
15779    ret += test_xmlTextReaderLocatorBaseURI();
15780    ret += test_xmlTextReaderLocatorLineNumber();
15781    ret += test_xmlTextReaderLookupNamespace();
15782    ret += test_xmlTextReaderMoveToAttribute();
15783    ret += test_xmlTextReaderMoveToAttributeNo();
15784    ret += test_xmlTextReaderMoveToAttributeNs();
15785    ret += test_xmlTextReaderMoveToElement();
15786    ret += test_xmlTextReaderMoveToFirstAttribute();
15787    ret += test_xmlTextReaderMoveToNextAttribute();
15788    ret += test_xmlTextReaderName();
15789    ret += test_xmlTextReaderNamespaceUri();
15790    ret += test_xmlTextReaderNext();
15791    ret += test_xmlTextReaderNextSibling();
15792    ret += test_xmlTextReaderNodeType();
15793    ret += test_xmlTextReaderNormalization();
15794    ret += test_xmlTextReaderPrefix();
15795    ret += test_xmlTextReaderPreserve();
15796    ret += test_xmlTextReaderPreservePattern();
15797    ret += test_xmlTextReaderQuoteChar();
15798    ret += test_xmlTextReaderRead();
15799    ret += test_xmlTextReaderReadAttributeValue();
15800    ret += test_xmlTextReaderReadState();
15801    ret += test_xmlTextReaderRelaxNGSetSchema();
15802    ret += test_xmlTextReaderRelaxNGValidate();
15803    ret += test_xmlTextReaderSetErrorHandler();
15804    ret += test_xmlTextReaderSetParserProp();
15805    ret += test_xmlTextReaderSetStructuredErrorHandler();
15806    ret += test_xmlTextReaderStandalone();
15807    ret += test_xmlTextReaderValue();
15808    ret += test_xmlTextReaderXmlLang();
15809
15810    if (ret != 0)
15811	printf("Module xmlreader: %d errors\n", ret);
15812    return(ret);
15813}
15814
15815static int
15816test_xmlSaveClose(void) {
15817    int ret = 0;
15818
15819
15820    /* missing type support */
15821    return(ret);
15822}
15823
15824
15825static int
15826test_xmlSaveDoc(void) {
15827    int ret = 0;
15828
15829
15830    /* missing type support */
15831    return(ret);
15832}
15833
15834
15835static int
15836test_xmlSaveFlush(void) {
15837    int ret = 0;
15838
15839
15840    /* missing type support */
15841    return(ret);
15842}
15843
15844
15845static int
15846test_xmlSaveSetAttrEscape(void) {
15847    int ret = 0;
15848
15849
15850    /* missing type support */
15851    return(ret);
15852}
15853
15854
15855static int
15856test_xmlSaveSetEscape(void) {
15857    int ret = 0;
15858
15859
15860    /* missing type support */
15861    return(ret);
15862}
15863
15864
15865static int
15866test_xmlSaveToFd(void) {
15867    int ret = 0;
15868
15869
15870    /* missing type support */
15871    return(ret);
15872}
15873
15874
15875static int
15876test_xmlSaveToFilename(void) {
15877    int ret = 0;
15878
15879
15880    /* missing type support */
15881    return(ret);
15882}
15883
15884
15885static int
15886test_xmlSaveToIO(void) {
15887    int ret = 0;
15888
15889
15890    /* missing type support */
15891    return(ret);
15892}
15893
15894
15895static int
15896test_xmlSaveTree(void) {
15897    int ret = 0;
15898
15899
15900    /* missing type support */
15901    return(ret);
15902}
15903
15904static int
15905test_xmlsave(void) {
15906    int ret = 0;
15907
15908    printf("Testing xmlsave ...\n");
15909    ret += test_xmlSaveClose();
15910    ret += test_xmlSaveDoc();
15911    ret += test_xmlSaveFlush();
15912    ret += test_xmlSaveSetAttrEscape();
15913    ret += test_xmlSaveSetEscape();
15914    ret += test_xmlSaveToFd();
15915    ret += test_xmlSaveToFilename();
15916    ret += test_xmlSaveToIO();
15917    ret += test_xmlSaveTree();
15918
15919    if (ret != 0)
15920	printf("Module xmlsave: %d errors\n", ret);
15921    return(ret);
15922}
15923
15924static int
15925test_xmlSchemaDump(void) {
15926    int ret = 0;
15927
15928
15929    /* missing type support */
15930    return(ret);
15931}
15932
15933
15934static int
15935test_xmlSchemaGetParserErrors(void) {
15936    int ret = 0;
15937
15938
15939    /* missing type support */
15940    return(ret);
15941}
15942
15943
15944static int
15945test_xmlSchemaGetValidErrors(void) {
15946    int ret = 0;
15947
15948
15949    /* missing type support */
15950    return(ret);
15951}
15952
15953
15954static int
15955test_xmlSchemaNewDocParserCtxt(void) {
15956    int ret = 0;
15957
15958
15959    /* missing type support */
15960    return(ret);
15961}
15962
15963
15964static int
15965test_xmlSchemaNewMemParserCtxt(void) {
15966    int ret = 0;
15967
15968
15969    /* missing type support */
15970    return(ret);
15971}
15972
15973
15974static int
15975test_xmlSchemaNewParserCtxt(void) {
15976    int ret = 0;
15977
15978
15979    /* missing type support */
15980    return(ret);
15981}
15982
15983
15984static int
15985test_xmlSchemaNewValidCtxt(void) {
15986    int ret = 0;
15987
15988
15989    /* missing type support */
15990    return(ret);
15991}
15992
15993
15994static int
15995test_xmlSchemaParse(void) {
15996    int ret = 0;
15997
15998
15999    /* missing type support */
16000    return(ret);
16001}
16002
16003
16004static int
16005test_xmlSchemaSetParserErrors(void) {
16006    int ret = 0;
16007
16008
16009    /* missing type support */
16010    return(ret);
16011}
16012
16013
16014static int
16015test_xmlSchemaSetValidErrors(void) {
16016    int ret = 0;
16017
16018
16019    /* missing type support */
16020    return(ret);
16021}
16022
16023
16024static int
16025test_xmlSchemaSetValidOptions(void) {
16026    int ret = 0;
16027
16028
16029    /* missing type support */
16030    return(ret);
16031}
16032
16033
16034static int
16035test_xmlSchemaValidCtxtGetOptions(void) {
16036    int ret = 0;
16037
16038
16039    /* missing type support */
16040    return(ret);
16041}
16042
16043
16044static int
16045test_xmlSchemaValidateDoc(void) {
16046    int ret = 0;
16047
16048
16049    /* missing type support */
16050    return(ret);
16051}
16052
16053
16054static int
16055test_xmlSchemaValidateOneElement(void) {
16056    int ret = 0;
16057
16058
16059    /* missing type support */
16060    return(ret);
16061}
16062
16063
16064static int
16065test_xmlSchemaValidateStream(void) {
16066    int ret = 0;
16067
16068
16069    /* missing type support */
16070    return(ret);
16071}
16072
16073static int
16074test_xmlschemas(void) {
16075    int ret = 0;
16076
16077    printf("Testing xmlschemas ...\n");
16078    ret += test_xmlSchemaDump();
16079    ret += test_xmlSchemaGetParserErrors();
16080    ret += test_xmlSchemaGetValidErrors();
16081    ret += test_xmlSchemaNewDocParserCtxt();
16082    ret += test_xmlSchemaNewMemParserCtxt();
16083    ret += test_xmlSchemaNewParserCtxt();
16084    ret += test_xmlSchemaNewValidCtxt();
16085    ret += test_xmlSchemaParse();
16086    ret += test_xmlSchemaSetParserErrors();
16087    ret += test_xmlSchemaSetValidErrors();
16088    ret += test_xmlSchemaSetValidOptions();
16089    ret += test_xmlSchemaValidCtxtGetOptions();
16090    ret += test_xmlSchemaValidateDoc();
16091    ret += test_xmlSchemaValidateOneElement();
16092    ret += test_xmlSchemaValidateStream();
16093
16094    if (ret != 0)
16095	printf("Module xmlschemas: %d errors\n", ret);
16096    return(ret);
16097}
16098
16099static int
16100test_xmlSchemaCheckFacet(void) {
16101    int ret = 0;
16102
16103
16104    /* missing type support */
16105    return(ret);
16106}
16107
16108
16109static int
16110test_xmlSchemaCleanupTypes(void) {
16111    int ret = 0;
16112
16113#ifdef LIBXML_SCHEMAS_ENABLED
16114    int mem_base;
16115
16116        mem_base = xmlMemBlocks();
16117
16118        xmlSchemaCleanupTypes();
16119        call_tests++;
16120        xmlResetLastError();
16121        if (mem_base != xmlMemBlocks()) {
16122            printf("Leak of %d blocks found in xmlSchemaCleanupTypes",
16123	           xmlMemBlocks() - mem_base);
16124	    ret++;
16125            printf("\n");
16126        }
16127#endif
16128
16129    return(ret);
16130}
16131
16132
16133static int
16134test_xmlSchemaCollapseString(void) {
16135    int ret = 0;
16136
16137#ifdef LIBXML_SCHEMAS_ENABLED
16138    int mem_base;
16139    xmlChar * ret_val;
16140    const xmlChar * value; /* a value */
16141    int n_value;
16142
16143    for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
16144        mem_base = xmlMemBlocks();
16145        value = gen_const_xmlChar_ptr(n_value);
16146
16147        ret_val = xmlSchemaCollapseString(value);
16148        desret_xmlChar_ptr(ret_val);
16149        call_tests++;
16150        des_const_xmlChar_ptr(n_value, value);
16151        xmlResetLastError();
16152        if (mem_base != xmlMemBlocks()) {
16153            printf("Leak of %d blocks found in xmlSchemaCollapseString",
16154	           xmlMemBlocks() - mem_base);
16155	    ret++;
16156            printf(" %d", n_value);
16157            printf("\n");
16158        }
16159    }
16160#endif
16161
16162    return(ret);
16163}
16164
16165
16166static int
16167test_xmlSchemaCompareValues(void) {
16168    int ret = 0;
16169
16170
16171    /* missing type support */
16172    return(ret);
16173}
16174
16175
16176static int
16177test_xmlSchemaGetBuiltInListSimpleTypeItemType(void) {
16178    int ret = 0;
16179
16180
16181    /* missing type support */
16182    return(ret);
16183}
16184
16185
16186static int
16187test_xmlSchemaGetBuiltInType(void) {
16188    int ret = 0;
16189
16190
16191    /* missing type support */
16192    return(ret);
16193}
16194
16195
16196static int
16197test_xmlSchemaGetFacetValueAsULong(void) {
16198    int ret = 0;
16199
16200
16201    /* missing type support */
16202    return(ret);
16203}
16204
16205
16206static int
16207test_xmlSchemaGetPredefinedType(void) {
16208    int ret = 0;
16209
16210
16211    /* missing type support */
16212    return(ret);
16213}
16214
16215
16216static int
16217test_xmlSchemaInitTypes(void) {
16218    int ret = 0;
16219
16220#ifdef LIBXML_SCHEMAS_ENABLED
16221
16222
16223        xmlSchemaInitTypes();
16224        call_tests++;
16225        xmlResetLastError();
16226#endif
16227
16228    return(ret);
16229}
16230
16231
16232static int
16233test_xmlSchemaIsBuiltInTypeFacet(void) {
16234    int ret = 0;
16235
16236
16237    /* missing type support */
16238    return(ret);
16239}
16240
16241
16242static int
16243test_xmlSchemaNewFacet(void) {
16244    int ret = 0;
16245
16246
16247    /* missing type support */
16248    return(ret);
16249}
16250
16251
16252static int
16253test_xmlSchemaValPredefTypeNode(void) {
16254    int ret = 0;
16255
16256
16257    /* missing type support */
16258    return(ret);
16259}
16260
16261
16262static int
16263test_xmlSchemaValPredefTypeNodeNoNorm(void) {
16264    int ret = 0;
16265
16266
16267    /* missing type support */
16268    return(ret);
16269}
16270
16271
16272static int
16273test_xmlSchemaValidateFacet(void) {
16274    int ret = 0;
16275
16276
16277    /* missing type support */
16278    return(ret);
16279}
16280
16281
16282static int
16283test_xmlSchemaValidateLengthFacet(void) {
16284    int ret = 0;
16285
16286
16287    /* missing type support */
16288    return(ret);
16289}
16290
16291
16292static int
16293test_xmlSchemaValidateListSimpleTypeFacet(void) {
16294    int ret = 0;
16295
16296
16297    /* missing type support */
16298    return(ret);
16299}
16300
16301
16302static int
16303test_xmlSchemaValidatePredefinedType(void) {
16304    int ret = 0;
16305
16306
16307    /* missing type support */
16308    return(ret);
16309}
16310
16311static int
16312test_xmlschemastypes(void) {
16313    int ret = 0;
16314
16315    printf("Testing xmlschemastypes ...\n");
16316    ret += test_xmlSchemaCheckFacet();
16317    ret += test_xmlSchemaCleanupTypes();
16318    ret += test_xmlSchemaCollapseString();
16319    ret += test_xmlSchemaCompareValues();
16320    ret += test_xmlSchemaGetBuiltInListSimpleTypeItemType();
16321    ret += test_xmlSchemaGetBuiltInType();
16322    ret += test_xmlSchemaGetFacetValueAsULong();
16323    ret += test_xmlSchemaGetPredefinedType();
16324    ret += test_xmlSchemaInitTypes();
16325    ret += test_xmlSchemaIsBuiltInTypeFacet();
16326    ret += test_xmlSchemaNewFacet();
16327    ret += test_xmlSchemaValPredefTypeNode();
16328    ret += test_xmlSchemaValPredefTypeNodeNoNorm();
16329    ret += test_xmlSchemaValidateFacet();
16330    ret += test_xmlSchemaValidateLengthFacet();
16331    ret += test_xmlSchemaValidateListSimpleTypeFacet();
16332    ret += test_xmlSchemaValidatePredefinedType();
16333
16334    if (ret != 0)
16335	printf("Module xmlschemastypes: %d errors\n", ret);
16336    return(ret);
16337}
16338
16339static int
16340test_xmlCharStrdup(void) {
16341    int ret = 0;
16342
16343    int mem_base;
16344    xmlChar * ret_val;
16345    const char * cur; /* the input char * */
16346    int n_cur;
16347
16348    for (n_cur = 0;n_cur < gen_nb_const_char_ptr;n_cur++) {
16349        mem_base = xmlMemBlocks();
16350        cur = gen_const_char_ptr(n_cur);
16351
16352        ret_val = xmlCharStrdup(cur);
16353        desret_xmlChar_ptr(ret_val);
16354        call_tests++;
16355        des_const_char_ptr(n_cur, cur);
16356        xmlResetLastError();
16357        if (mem_base != xmlMemBlocks()) {
16358            printf("Leak of %d blocks found in xmlCharStrdup",
16359	           xmlMemBlocks() - mem_base);
16360	    ret++;
16361            printf(" %d", n_cur);
16362            printf("\n");
16363        }
16364    }
16365
16366    return(ret);
16367}
16368
16369
16370static int
16371test_xmlCharStrndup(void) {
16372    int ret = 0;
16373
16374    int mem_base;
16375    xmlChar * ret_val;
16376    const char * cur; /* the input char * */
16377    int n_cur;
16378    int len; /* the len of @cur */
16379    int n_len;
16380
16381    for (n_cur = 0;n_cur < gen_nb_const_char_ptr;n_cur++) {
16382    for (n_len = 0;n_len < gen_nb_int;n_len++) {
16383        mem_base = xmlMemBlocks();
16384        cur = gen_const_char_ptr(n_cur);
16385        len = gen_int(n_len);
16386
16387        ret_val = xmlCharStrndup(cur, len);
16388        desret_xmlChar_ptr(ret_val);
16389        call_tests++;
16390        des_const_char_ptr(n_cur, cur);
16391        des_int(n_len, len);
16392        xmlResetLastError();
16393        if (mem_base != xmlMemBlocks()) {
16394            printf("Leak of %d blocks found in xmlCharStrndup",
16395	           xmlMemBlocks() - mem_base);
16396	    ret++;
16397            printf(" %d", n_cur);
16398            printf(" %d", n_len);
16399            printf("\n");
16400        }
16401    }
16402    }
16403
16404    return(ret);
16405}
16406
16407
16408static int
16409test_xmlCheckUTF8(void) {
16410    int ret = 0;
16411
16412
16413    /* missing type support */
16414    return(ret);
16415}
16416
16417
16418static int
16419test_xmlGetUTF8Char(void) {
16420    int ret = 0;
16421
16422
16423    /* missing type support */
16424    return(ret);
16425}
16426
16427
16428static int
16429test_xmlStrEqual(void) {
16430    int ret = 0;
16431
16432    int mem_base;
16433    int ret_val;
16434    const xmlChar * str1; /* the first xmlChar * */
16435    int n_str1;
16436    const xmlChar * str2; /* the second xmlChar * */
16437    int n_str2;
16438
16439    for (n_str1 = 0;n_str1 < gen_nb_const_xmlChar_ptr;n_str1++) {
16440    for (n_str2 = 0;n_str2 < gen_nb_const_xmlChar_ptr;n_str2++) {
16441        mem_base = xmlMemBlocks();
16442        str1 = gen_const_xmlChar_ptr(n_str1);
16443        str2 = gen_const_xmlChar_ptr(n_str2);
16444
16445        ret_val = xmlStrEqual(str1, str2);
16446        desret_int(ret_val);
16447        call_tests++;
16448        des_const_xmlChar_ptr(n_str1, str1);
16449        des_const_xmlChar_ptr(n_str2, str2);
16450        xmlResetLastError();
16451        if (mem_base != xmlMemBlocks()) {
16452            printf("Leak of %d blocks found in xmlStrEqual",
16453	           xmlMemBlocks() - mem_base);
16454	    ret++;
16455            printf(" %d", n_str1);
16456            printf(" %d", n_str2);
16457            printf("\n");
16458        }
16459    }
16460    }
16461
16462    return(ret);
16463}
16464
16465
16466static int
16467test_xmlStrPrintf(void) {
16468    int ret = 0;
16469
16470
16471    /* missing type support */
16472    return(ret);
16473}
16474
16475
16476static int
16477test_xmlStrQEqual(void) {
16478    int ret = 0;
16479
16480    int mem_base;
16481    int ret_val;
16482    const xmlChar * pref; /* the prefix of the QName */
16483    int n_pref;
16484    const xmlChar * name; /* the localname of the QName */
16485    int n_name;
16486    const xmlChar * str; /* the second xmlChar * */
16487    int n_str;
16488
16489    for (n_pref = 0;n_pref < gen_nb_const_xmlChar_ptr;n_pref++) {
16490    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
16491    for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
16492        mem_base = xmlMemBlocks();
16493        pref = gen_const_xmlChar_ptr(n_pref);
16494        name = gen_const_xmlChar_ptr(n_name);
16495        str = gen_const_xmlChar_ptr(n_str);
16496
16497        ret_val = xmlStrQEqual(pref, name, str);
16498        desret_int(ret_val);
16499        call_tests++;
16500        des_const_xmlChar_ptr(n_pref, pref);
16501        des_const_xmlChar_ptr(n_name, name);
16502        des_const_xmlChar_ptr(n_str, str);
16503        xmlResetLastError();
16504        if (mem_base != xmlMemBlocks()) {
16505            printf("Leak of %d blocks found in xmlStrQEqual",
16506	           xmlMemBlocks() - mem_base);
16507	    ret++;
16508            printf(" %d", n_pref);
16509            printf(" %d", n_name);
16510            printf(" %d", n_str);
16511            printf("\n");
16512        }
16513    }
16514    }
16515    }
16516
16517    return(ret);
16518}
16519
16520
16521static int
16522test_xmlStrVPrintf(void) {
16523    int ret = 0;
16524
16525
16526    /* missing type support */
16527    return(ret);
16528}
16529
16530
16531static int
16532test_xmlStrcasecmp(void) {
16533    int ret = 0;
16534
16535    int mem_base;
16536    int ret_val;
16537    const xmlChar * str1; /* the first xmlChar * */
16538    int n_str1;
16539    const xmlChar * str2; /* the second xmlChar * */
16540    int n_str2;
16541
16542    for (n_str1 = 0;n_str1 < gen_nb_const_xmlChar_ptr;n_str1++) {
16543    for (n_str2 = 0;n_str2 < gen_nb_const_xmlChar_ptr;n_str2++) {
16544        mem_base = xmlMemBlocks();
16545        str1 = gen_const_xmlChar_ptr(n_str1);
16546        str2 = gen_const_xmlChar_ptr(n_str2);
16547
16548        ret_val = xmlStrcasecmp(str1, str2);
16549        desret_int(ret_val);
16550        call_tests++;
16551        des_const_xmlChar_ptr(n_str1, str1);
16552        des_const_xmlChar_ptr(n_str2, str2);
16553        xmlResetLastError();
16554        if (mem_base != xmlMemBlocks()) {
16555            printf("Leak of %d blocks found in xmlStrcasecmp",
16556	           xmlMemBlocks() - mem_base);
16557	    ret++;
16558            printf(" %d", n_str1);
16559            printf(" %d", n_str2);
16560            printf("\n");
16561        }
16562    }
16563    }
16564
16565    return(ret);
16566}
16567
16568
16569static int
16570test_xmlStrcasestr(void) {
16571    int ret = 0;
16572
16573    int mem_base;
16574    const xmlChar * ret_val;
16575    const xmlChar * str; /* the xmlChar * array (haystack) */
16576    int n_str;
16577    xmlChar * val; /* the xmlChar to search (needle) */
16578    int n_val;
16579
16580    for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
16581    for (n_val = 0;n_val < gen_nb_xmlChar_ptr;n_val++) {
16582        mem_base = xmlMemBlocks();
16583        str = gen_const_xmlChar_ptr(n_str);
16584        val = gen_xmlChar_ptr(n_val);
16585
16586        ret_val = xmlStrcasestr(str, val);
16587        desret_const_xmlChar_ptr(ret_val);
16588        call_tests++;
16589        des_const_xmlChar_ptr(n_str, str);
16590        des_xmlChar_ptr(n_val, val);
16591        xmlResetLastError();
16592        if (mem_base != xmlMemBlocks()) {
16593            printf("Leak of %d blocks found in xmlStrcasestr",
16594	           xmlMemBlocks() - mem_base);
16595	    ret++;
16596            printf(" %d", n_str);
16597            printf(" %d", n_val);
16598            printf("\n");
16599        }
16600    }
16601    }
16602
16603    return(ret);
16604}
16605
16606
16607static int
16608test_xmlStrchr(void) {
16609    int ret = 0;
16610
16611
16612    /* missing type support */
16613    return(ret);
16614}
16615
16616
16617static int
16618test_xmlStrcmp(void) {
16619    int ret = 0;
16620
16621    int mem_base;
16622    int ret_val;
16623    const xmlChar * str1; /* the first xmlChar * */
16624    int n_str1;
16625    const xmlChar * str2; /* the second xmlChar * */
16626    int n_str2;
16627
16628    for (n_str1 = 0;n_str1 < gen_nb_const_xmlChar_ptr;n_str1++) {
16629    for (n_str2 = 0;n_str2 < gen_nb_const_xmlChar_ptr;n_str2++) {
16630        mem_base = xmlMemBlocks();
16631        str1 = gen_const_xmlChar_ptr(n_str1);
16632        str2 = gen_const_xmlChar_ptr(n_str2);
16633
16634        ret_val = xmlStrcmp(str1, str2);
16635        desret_int(ret_val);
16636        call_tests++;
16637        des_const_xmlChar_ptr(n_str1, str1);
16638        des_const_xmlChar_ptr(n_str2, str2);
16639        xmlResetLastError();
16640        if (mem_base != xmlMemBlocks()) {
16641            printf("Leak of %d blocks found in xmlStrcmp",
16642	           xmlMemBlocks() - mem_base);
16643	    ret++;
16644            printf(" %d", n_str1);
16645            printf(" %d", n_str2);
16646            printf("\n");
16647        }
16648    }
16649    }
16650
16651    return(ret);
16652}
16653
16654
16655static int
16656test_xmlStrdup(void) {
16657    int ret = 0;
16658
16659    int mem_base;
16660    xmlChar * ret_val;
16661    const xmlChar * cur; /* the input xmlChar * */
16662    int n_cur;
16663
16664    for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
16665        mem_base = xmlMemBlocks();
16666        cur = gen_const_xmlChar_ptr(n_cur);
16667
16668        ret_val = xmlStrdup(cur);
16669        desret_xmlChar_ptr(ret_val);
16670        call_tests++;
16671        des_const_xmlChar_ptr(n_cur, cur);
16672        xmlResetLastError();
16673        if (mem_base != xmlMemBlocks()) {
16674            printf("Leak of %d blocks found in xmlStrdup",
16675	           xmlMemBlocks() - mem_base);
16676	    ret++;
16677            printf(" %d", n_cur);
16678            printf("\n");
16679        }
16680    }
16681
16682    return(ret);
16683}
16684
16685
16686static int
16687test_xmlStrlen(void) {
16688    int ret = 0;
16689
16690    int mem_base;
16691    int ret_val;
16692    const xmlChar * str; /* the xmlChar * array */
16693    int n_str;
16694
16695    for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
16696        mem_base = xmlMemBlocks();
16697        str = gen_const_xmlChar_ptr(n_str);
16698
16699        ret_val = xmlStrlen(str);
16700        desret_int(ret_val);
16701        call_tests++;
16702        des_const_xmlChar_ptr(n_str, str);
16703        xmlResetLastError();
16704        if (mem_base != xmlMemBlocks()) {
16705            printf("Leak of %d blocks found in xmlStrlen",
16706	           xmlMemBlocks() - mem_base);
16707	    ret++;
16708            printf(" %d", n_str);
16709            printf("\n");
16710        }
16711    }
16712
16713    return(ret);
16714}
16715
16716
16717static int
16718test_xmlStrncasecmp(void) {
16719    int ret = 0;
16720
16721    int mem_base;
16722    int ret_val;
16723    const xmlChar * str1; /* the first xmlChar * */
16724    int n_str1;
16725    const xmlChar * str2; /* the second xmlChar * */
16726    int n_str2;
16727    int len; /* the max comparison length */
16728    int n_len;
16729
16730    for (n_str1 = 0;n_str1 < gen_nb_const_xmlChar_ptr;n_str1++) {
16731    for (n_str2 = 0;n_str2 < gen_nb_const_xmlChar_ptr;n_str2++) {
16732    for (n_len = 0;n_len < gen_nb_int;n_len++) {
16733        mem_base = xmlMemBlocks();
16734        str1 = gen_const_xmlChar_ptr(n_str1);
16735        str2 = gen_const_xmlChar_ptr(n_str2);
16736        len = gen_int(n_len);
16737
16738        ret_val = xmlStrncasecmp(str1, str2, len);
16739        desret_int(ret_val);
16740        call_tests++;
16741        des_const_xmlChar_ptr(n_str1, str1);
16742        des_const_xmlChar_ptr(n_str2, str2);
16743        des_int(n_len, len);
16744        xmlResetLastError();
16745        if (mem_base != xmlMemBlocks()) {
16746            printf("Leak of %d blocks found in xmlStrncasecmp",
16747	           xmlMemBlocks() - mem_base);
16748	    ret++;
16749            printf(" %d", n_str1);
16750            printf(" %d", n_str2);
16751            printf(" %d", n_len);
16752            printf("\n");
16753        }
16754    }
16755    }
16756    }
16757
16758    return(ret);
16759}
16760
16761
16762static int
16763test_xmlStrncatNew(void) {
16764    int ret = 0;
16765
16766    int mem_base;
16767    xmlChar * ret_val;
16768    const xmlChar * str1; /* first xmlChar string */
16769    int n_str1;
16770    const xmlChar * str2; /* second xmlChar string */
16771    int n_str2;
16772    int len; /* the len of @str2 */
16773    int n_len;
16774
16775    for (n_str1 = 0;n_str1 < gen_nb_const_xmlChar_ptr;n_str1++) {
16776    for (n_str2 = 0;n_str2 < gen_nb_const_xmlChar_ptr;n_str2++) {
16777    for (n_len = 0;n_len < gen_nb_int;n_len++) {
16778        mem_base = xmlMemBlocks();
16779        str1 = gen_const_xmlChar_ptr(n_str1);
16780        str2 = gen_const_xmlChar_ptr(n_str2);
16781        len = gen_int(n_len);
16782
16783        ret_val = xmlStrncatNew(str1, str2, len);
16784        desret_xmlChar_ptr(ret_val);
16785        call_tests++;
16786        des_const_xmlChar_ptr(n_str1, str1);
16787        des_const_xmlChar_ptr(n_str2, str2);
16788        des_int(n_len, len);
16789        xmlResetLastError();
16790        if (mem_base != xmlMemBlocks()) {
16791            printf("Leak of %d blocks found in xmlStrncatNew",
16792	           xmlMemBlocks() - mem_base);
16793	    ret++;
16794            printf(" %d", n_str1);
16795            printf(" %d", n_str2);
16796            printf(" %d", n_len);
16797            printf("\n");
16798        }
16799    }
16800    }
16801    }
16802
16803    return(ret);
16804}
16805
16806
16807static int
16808test_xmlStrncmp(void) {
16809    int ret = 0;
16810
16811    int mem_base;
16812    int ret_val;
16813    const xmlChar * str1; /* the first xmlChar * */
16814    int n_str1;
16815    const xmlChar * str2; /* the second xmlChar * */
16816    int n_str2;
16817    int len; /* the max comparison length */
16818    int n_len;
16819
16820    for (n_str1 = 0;n_str1 < gen_nb_const_xmlChar_ptr;n_str1++) {
16821    for (n_str2 = 0;n_str2 < gen_nb_const_xmlChar_ptr;n_str2++) {
16822    for (n_len = 0;n_len < gen_nb_int;n_len++) {
16823        mem_base = xmlMemBlocks();
16824        str1 = gen_const_xmlChar_ptr(n_str1);
16825        str2 = gen_const_xmlChar_ptr(n_str2);
16826        len = gen_int(n_len);
16827
16828        ret_val = xmlStrncmp(str1, str2, len);
16829        desret_int(ret_val);
16830        call_tests++;
16831        des_const_xmlChar_ptr(n_str1, str1);
16832        des_const_xmlChar_ptr(n_str2, str2);
16833        des_int(n_len, len);
16834        xmlResetLastError();
16835        if (mem_base != xmlMemBlocks()) {
16836            printf("Leak of %d blocks found in xmlStrncmp",
16837	           xmlMemBlocks() - mem_base);
16838	    ret++;
16839            printf(" %d", n_str1);
16840            printf(" %d", n_str2);
16841            printf(" %d", n_len);
16842            printf("\n");
16843        }
16844    }
16845    }
16846    }
16847
16848    return(ret);
16849}
16850
16851
16852static int
16853test_xmlStrndup(void) {
16854    int ret = 0;
16855
16856    int mem_base;
16857    xmlChar * ret_val;
16858    const xmlChar * cur; /* the input xmlChar * */
16859    int n_cur;
16860    int len; /* the len of @cur */
16861    int n_len;
16862
16863    for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
16864    for (n_len = 0;n_len < gen_nb_int;n_len++) {
16865        mem_base = xmlMemBlocks();
16866        cur = gen_const_xmlChar_ptr(n_cur);
16867        len = gen_int(n_len);
16868
16869        ret_val = xmlStrndup(cur, len);
16870        desret_xmlChar_ptr(ret_val);
16871        call_tests++;
16872        des_const_xmlChar_ptr(n_cur, cur);
16873        des_int(n_len, len);
16874        xmlResetLastError();
16875        if (mem_base != xmlMemBlocks()) {
16876            printf("Leak of %d blocks found in xmlStrndup",
16877	           xmlMemBlocks() - mem_base);
16878	    ret++;
16879            printf(" %d", n_cur);
16880            printf(" %d", n_len);
16881            printf("\n");
16882        }
16883    }
16884    }
16885
16886    return(ret);
16887}
16888
16889
16890static int
16891test_xmlStrstr(void) {
16892    int ret = 0;
16893
16894    int mem_base;
16895    const xmlChar * ret_val;
16896    const xmlChar * str; /* the xmlChar * array (haystack) */
16897    int n_str;
16898    const xmlChar * val; /* the xmlChar to search (needle) */
16899    int n_val;
16900
16901    for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
16902    for (n_val = 0;n_val < gen_nb_const_xmlChar_ptr;n_val++) {
16903        mem_base = xmlMemBlocks();
16904        str = gen_const_xmlChar_ptr(n_str);
16905        val = gen_const_xmlChar_ptr(n_val);
16906
16907        ret_val = xmlStrstr(str, val);
16908        desret_const_xmlChar_ptr(ret_val);
16909        call_tests++;
16910        des_const_xmlChar_ptr(n_str, str);
16911        des_const_xmlChar_ptr(n_val, val);
16912        xmlResetLastError();
16913        if (mem_base != xmlMemBlocks()) {
16914            printf("Leak of %d blocks found in xmlStrstr",
16915	           xmlMemBlocks() - mem_base);
16916	    ret++;
16917            printf(" %d", n_str);
16918            printf(" %d", n_val);
16919            printf("\n");
16920        }
16921    }
16922    }
16923
16924    return(ret);
16925}
16926
16927
16928static int
16929test_xmlStrsub(void) {
16930    int ret = 0;
16931
16932    int mem_base;
16933    xmlChar * ret_val;
16934    const xmlChar * str; /* the xmlChar * array (haystack) */
16935    int n_str;
16936    int start; /* the index of the first char (zero based) */
16937    int n_start;
16938    int len; /* the length of the substring */
16939    int n_len;
16940
16941    for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
16942    for (n_start = 0;n_start < gen_nb_int;n_start++) {
16943    for (n_len = 0;n_len < gen_nb_int;n_len++) {
16944        mem_base = xmlMemBlocks();
16945        str = gen_const_xmlChar_ptr(n_str);
16946        start = gen_int(n_start);
16947        len = gen_int(n_len);
16948
16949        ret_val = xmlStrsub(str, start, len);
16950        desret_xmlChar_ptr(ret_val);
16951        call_tests++;
16952        des_const_xmlChar_ptr(n_str, str);
16953        des_int(n_start, start);
16954        des_int(n_len, len);
16955        xmlResetLastError();
16956        if (mem_base != xmlMemBlocks()) {
16957            printf("Leak of %d blocks found in xmlStrsub",
16958	           xmlMemBlocks() - mem_base);
16959	    ret++;
16960            printf(" %d", n_str);
16961            printf(" %d", n_start);
16962            printf(" %d", n_len);
16963            printf("\n");
16964        }
16965    }
16966    }
16967    }
16968
16969    return(ret);
16970}
16971
16972
16973static int
16974test_xmlUTF8Charcmp(void) {
16975    int ret = 0;
16976
16977    int mem_base;
16978    int ret_val;
16979    const xmlChar * utf1; /* pointer to first UTF8 char */
16980    int n_utf1;
16981    const xmlChar * utf2; /* pointer to second UTF8 char */
16982    int n_utf2;
16983
16984    for (n_utf1 = 0;n_utf1 < gen_nb_const_xmlChar_ptr;n_utf1++) {
16985    for (n_utf2 = 0;n_utf2 < gen_nb_const_xmlChar_ptr;n_utf2++) {
16986        mem_base = xmlMemBlocks();
16987        utf1 = gen_const_xmlChar_ptr(n_utf1);
16988        utf2 = gen_const_xmlChar_ptr(n_utf2);
16989
16990        ret_val = xmlUTF8Charcmp(utf1, utf2);
16991        desret_int(ret_val);
16992        call_tests++;
16993        des_const_xmlChar_ptr(n_utf1, utf1);
16994        des_const_xmlChar_ptr(n_utf2, utf2);
16995        xmlResetLastError();
16996        if (mem_base != xmlMemBlocks()) {
16997            printf("Leak of %d blocks found in xmlUTF8Charcmp",
16998	           xmlMemBlocks() - mem_base);
16999	    ret++;
17000            printf(" %d", n_utf1);
17001            printf(" %d", n_utf2);
17002            printf("\n");
17003        }
17004    }
17005    }
17006
17007    return(ret);
17008}
17009
17010
17011static int
17012test_xmlUTF8Size(void) {
17013    int ret = 0;
17014
17015    int mem_base;
17016    int ret_val;
17017    const xmlChar * utf; /* pointer to the UTF8 character */
17018    int n_utf;
17019
17020    for (n_utf = 0;n_utf < gen_nb_const_xmlChar_ptr;n_utf++) {
17021        mem_base = xmlMemBlocks();
17022        utf = gen_const_xmlChar_ptr(n_utf);
17023
17024        ret_val = xmlUTF8Size(utf);
17025        desret_int(ret_val);
17026        call_tests++;
17027        des_const_xmlChar_ptr(n_utf, utf);
17028        xmlResetLastError();
17029        if (mem_base != xmlMemBlocks()) {
17030            printf("Leak of %d blocks found in xmlUTF8Size",
17031	           xmlMemBlocks() - mem_base);
17032	    ret++;
17033            printf(" %d", n_utf);
17034            printf("\n");
17035        }
17036    }
17037
17038    return(ret);
17039}
17040
17041
17042static int
17043test_xmlUTF8Strlen(void) {
17044    int ret = 0;
17045
17046    int mem_base;
17047    int ret_val;
17048    const xmlChar * utf; /* a sequence of UTF-8 encoded bytes */
17049    int n_utf;
17050
17051    for (n_utf = 0;n_utf < gen_nb_const_xmlChar_ptr;n_utf++) {
17052        mem_base = xmlMemBlocks();
17053        utf = gen_const_xmlChar_ptr(n_utf);
17054
17055        ret_val = xmlUTF8Strlen(utf);
17056        desret_int(ret_val);
17057        call_tests++;
17058        des_const_xmlChar_ptr(n_utf, utf);
17059        xmlResetLastError();
17060        if (mem_base != xmlMemBlocks()) {
17061            printf("Leak of %d blocks found in xmlUTF8Strlen",
17062	           xmlMemBlocks() - mem_base);
17063	    ret++;
17064            printf(" %d", n_utf);
17065            printf("\n");
17066        }
17067    }
17068
17069    return(ret);
17070}
17071
17072
17073static int
17074test_xmlUTF8Strloc(void) {
17075    int ret = 0;
17076
17077    int mem_base;
17078    int ret_val;
17079    const xmlChar * utf; /* the input UTF8 * */
17080    int n_utf;
17081    const xmlChar * utfchar; /* the UTF8 character to be found */
17082    int n_utfchar;
17083
17084    for (n_utf = 0;n_utf < gen_nb_const_xmlChar_ptr;n_utf++) {
17085    for (n_utfchar = 0;n_utfchar < gen_nb_const_xmlChar_ptr;n_utfchar++) {
17086        mem_base = xmlMemBlocks();
17087        utf = gen_const_xmlChar_ptr(n_utf);
17088        utfchar = gen_const_xmlChar_ptr(n_utfchar);
17089
17090        ret_val = xmlUTF8Strloc(utf, utfchar);
17091        desret_int(ret_val);
17092        call_tests++;
17093        des_const_xmlChar_ptr(n_utf, utf);
17094        des_const_xmlChar_ptr(n_utfchar, utfchar);
17095        xmlResetLastError();
17096        if (mem_base != xmlMemBlocks()) {
17097            printf("Leak of %d blocks found in xmlUTF8Strloc",
17098	           xmlMemBlocks() - mem_base);
17099	    ret++;
17100            printf(" %d", n_utf);
17101            printf(" %d", n_utfchar);
17102            printf("\n");
17103        }
17104    }
17105    }
17106
17107    return(ret);
17108}
17109
17110
17111static int
17112test_xmlUTF8Strndup(void) {
17113    int ret = 0;
17114
17115    int mem_base;
17116    xmlChar * ret_val;
17117    const xmlChar * utf; /* the input UTF8 * */
17118    int n_utf;
17119    int len; /* the len of @utf (in chars) */
17120    int n_len;
17121
17122    for (n_utf = 0;n_utf < gen_nb_const_xmlChar_ptr;n_utf++) {
17123    for (n_len = 0;n_len < gen_nb_int;n_len++) {
17124        mem_base = xmlMemBlocks();
17125        utf = gen_const_xmlChar_ptr(n_utf);
17126        len = gen_int(n_len);
17127
17128        ret_val = xmlUTF8Strndup(utf, len);
17129        desret_xmlChar_ptr(ret_val);
17130        call_tests++;
17131        des_const_xmlChar_ptr(n_utf, utf);
17132        des_int(n_len, len);
17133        xmlResetLastError();
17134        if (mem_base != xmlMemBlocks()) {
17135            printf("Leak of %d blocks found in xmlUTF8Strndup",
17136	           xmlMemBlocks() - mem_base);
17137	    ret++;
17138            printf(" %d", n_utf);
17139            printf(" %d", n_len);
17140            printf("\n");
17141        }
17142    }
17143    }
17144
17145    return(ret);
17146}
17147
17148
17149static int
17150test_xmlUTF8Strpos(void) {
17151    int ret = 0;
17152
17153    int mem_base;
17154    const xmlChar * ret_val;
17155    const xmlChar * utf; /* the input UTF8 * */
17156    int n_utf;
17157    int pos; /* the position of the desired UTF8 char (in chars) */
17158    int n_pos;
17159
17160    for (n_utf = 0;n_utf < gen_nb_const_xmlChar_ptr;n_utf++) {
17161    for (n_pos = 0;n_pos < gen_nb_int;n_pos++) {
17162        mem_base = xmlMemBlocks();
17163        utf = gen_const_xmlChar_ptr(n_utf);
17164        pos = gen_int(n_pos);
17165
17166        ret_val = xmlUTF8Strpos(utf, pos);
17167        desret_const_xmlChar_ptr(ret_val);
17168        call_tests++;
17169        des_const_xmlChar_ptr(n_utf, utf);
17170        des_int(n_pos, pos);
17171        xmlResetLastError();
17172        if (mem_base != xmlMemBlocks()) {
17173            printf("Leak of %d blocks found in xmlUTF8Strpos",
17174	           xmlMemBlocks() - mem_base);
17175	    ret++;
17176            printf(" %d", n_utf);
17177            printf(" %d", n_pos);
17178            printf("\n");
17179        }
17180    }
17181    }
17182
17183    return(ret);
17184}
17185
17186
17187static int
17188test_xmlUTF8Strsize(void) {
17189    int ret = 0;
17190
17191    int mem_base;
17192    int ret_val;
17193    const xmlChar * utf; /* a sequence of UTF-8 encoded bytes */
17194    int n_utf;
17195    int len; /* the number of characters in the array */
17196    int n_len;
17197
17198    for (n_utf = 0;n_utf < gen_nb_const_xmlChar_ptr;n_utf++) {
17199    for (n_len = 0;n_len < gen_nb_int;n_len++) {
17200        mem_base = xmlMemBlocks();
17201        utf = gen_const_xmlChar_ptr(n_utf);
17202        len = gen_int(n_len);
17203
17204        ret_val = xmlUTF8Strsize(utf, len);
17205        desret_int(ret_val);
17206        call_tests++;
17207        des_const_xmlChar_ptr(n_utf, utf);
17208        des_int(n_len, len);
17209        xmlResetLastError();
17210        if (mem_base != xmlMemBlocks()) {
17211            printf("Leak of %d blocks found in xmlUTF8Strsize",
17212	           xmlMemBlocks() - mem_base);
17213	    ret++;
17214            printf(" %d", n_utf);
17215            printf(" %d", n_len);
17216            printf("\n");
17217        }
17218    }
17219    }
17220
17221    return(ret);
17222}
17223
17224
17225static int
17226test_xmlUTF8Strsub(void) {
17227    int ret = 0;
17228
17229    int mem_base;
17230    xmlChar * ret_val;
17231    const xmlChar * utf; /* a sequence of UTF-8 encoded bytes */
17232    int n_utf;
17233    int start; /* relative pos of first char */
17234    int n_start;
17235    int len; /* total number to copy */
17236    int n_len;
17237
17238    for (n_utf = 0;n_utf < gen_nb_const_xmlChar_ptr;n_utf++) {
17239    for (n_start = 0;n_start < gen_nb_int;n_start++) {
17240    for (n_len = 0;n_len < gen_nb_int;n_len++) {
17241        mem_base = xmlMemBlocks();
17242        utf = gen_const_xmlChar_ptr(n_utf);
17243        start = gen_int(n_start);
17244        len = gen_int(n_len);
17245
17246        ret_val = xmlUTF8Strsub(utf, start, len);
17247        desret_xmlChar_ptr(ret_val);
17248        call_tests++;
17249        des_const_xmlChar_ptr(n_utf, utf);
17250        des_int(n_start, start);
17251        des_int(n_len, len);
17252        xmlResetLastError();
17253        if (mem_base != xmlMemBlocks()) {
17254            printf("Leak of %d blocks found in xmlUTF8Strsub",
17255	           xmlMemBlocks() - mem_base);
17256	    ret++;
17257            printf(" %d", n_utf);
17258            printf(" %d", n_start);
17259            printf(" %d", n_len);
17260            printf("\n");
17261        }
17262    }
17263    }
17264    }
17265
17266    return(ret);
17267}
17268
17269static int
17270test_xmlstring(void) {
17271    int ret = 0;
17272
17273    printf("Testing xmlstring ...\n");
17274    ret += test_xmlCharStrdup();
17275    ret += test_xmlCharStrndup();
17276    ret += test_xmlCheckUTF8();
17277    ret += test_xmlGetUTF8Char();
17278    ret += test_xmlStrEqual();
17279    ret += test_xmlStrPrintf();
17280    ret += test_xmlStrQEqual();
17281    ret += test_xmlStrVPrintf();
17282    ret += test_xmlStrcasecmp();
17283    ret += test_xmlStrcasestr();
17284    ret += test_xmlStrchr();
17285    ret += test_xmlStrcmp();
17286    ret += test_xmlStrdup();
17287    ret += test_xmlStrlen();
17288    ret += test_xmlStrncasecmp();
17289    ret += test_xmlStrncatNew();
17290    ret += test_xmlStrncmp();
17291    ret += test_xmlStrndup();
17292    ret += test_xmlStrstr();
17293    ret += test_xmlStrsub();
17294    ret += test_xmlUTF8Charcmp();
17295    ret += test_xmlUTF8Size();
17296    ret += test_xmlUTF8Strlen();
17297    ret += test_xmlUTF8Strloc();
17298    ret += test_xmlUTF8Strndup();
17299    ret += test_xmlUTF8Strpos();
17300    ret += test_xmlUTF8Strsize();
17301    ret += test_xmlUTF8Strsub();
17302
17303    if (ret != 0)
17304	printf("Module xmlstring: %d errors\n", ret);
17305    return(ret);
17306}
17307
17308static int
17309test_xmlNewTextWriter(void) {
17310    int ret = 0;
17311
17312
17313    /* missing type support */
17314    return(ret);
17315}
17316
17317
17318static int
17319test_xmlNewTextWriterDoc(void) {
17320    int ret = 0;
17321
17322
17323    /* missing type support */
17324    return(ret);
17325}
17326
17327
17328static int
17329test_xmlNewTextWriterFilename(void) {
17330    int ret = 0;
17331
17332
17333    /* missing type support */
17334    return(ret);
17335}
17336
17337
17338static int
17339test_xmlNewTextWriterMemory(void) {
17340    int ret = 0;
17341
17342
17343    /* missing type support */
17344    return(ret);
17345}
17346
17347
17348static int
17349test_xmlNewTextWriterPushParser(void) {
17350    int ret = 0;
17351
17352
17353    /* missing type support */
17354    return(ret);
17355}
17356
17357
17358static int
17359test_xmlNewTextWriterTree(void) {
17360    int ret = 0;
17361
17362
17363    /* missing type support */
17364    return(ret);
17365}
17366
17367
17368static int
17369test_xmlTextWriterEndAttribute(void) {
17370    int ret = 0;
17371
17372#ifdef LIBXML_WRITER_ENABLED
17373    int mem_base;
17374    int ret_val;
17375    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
17376    int n_writer;
17377
17378    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
17379        mem_base = xmlMemBlocks();
17380        writer = gen_xmlTextWriterPtr(n_writer);
17381
17382        ret_val = xmlTextWriterEndAttribute(writer);
17383        desret_int(ret_val);
17384        call_tests++;
17385        des_xmlTextWriterPtr(n_writer, writer);
17386        xmlResetLastError();
17387        if (mem_base != xmlMemBlocks()) {
17388            printf("Leak of %d blocks found in xmlTextWriterEndAttribute",
17389	           xmlMemBlocks() - mem_base);
17390	    ret++;
17391            printf(" %d", n_writer);
17392            printf("\n");
17393        }
17394    }
17395#endif
17396
17397    return(ret);
17398}
17399
17400
17401static int
17402test_xmlTextWriterEndCDATA(void) {
17403    int ret = 0;
17404
17405#ifdef LIBXML_WRITER_ENABLED
17406    int mem_base;
17407    int ret_val;
17408    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
17409    int n_writer;
17410
17411    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
17412        mem_base = xmlMemBlocks();
17413        writer = gen_xmlTextWriterPtr(n_writer);
17414
17415        ret_val = xmlTextWriterEndCDATA(writer);
17416        desret_int(ret_val);
17417        call_tests++;
17418        des_xmlTextWriterPtr(n_writer, writer);
17419        xmlResetLastError();
17420        if (mem_base != xmlMemBlocks()) {
17421            printf("Leak of %d blocks found in xmlTextWriterEndCDATA",
17422	           xmlMemBlocks() - mem_base);
17423	    ret++;
17424            printf(" %d", n_writer);
17425            printf("\n");
17426        }
17427    }
17428#endif
17429
17430    return(ret);
17431}
17432
17433
17434static int
17435test_xmlTextWriterEndComment(void) {
17436    int ret = 0;
17437
17438#ifdef LIBXML_WRITER_ENABLED
17439    int mem_base;
17440    int ret_val;
17441    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
17442    int n_writer;
17443
17444    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
17445        mem_base = xmlMemBlocks();
17446        writer = gen_xmlTextWriterPtr(n_writer);
17447
17448        ret_val = xmlTextWriterEndComment(writer);
17449        desret_int(ret_val);
17450        call_tests++;
17451        des_xmlTextWriterPtr(n_writer, writer);
17452        xmlResetLastError();
17453        if (mem_base != xmlMemBlocks()) {
17454            printf("Leak of %d blocks found in xmlTextWriterEndComment",
17455	           xmlMemBlocks() - mem_base);
17456	    ret++;
17457            printf(" %d", n_writer);
17458            printf("\n");
17459        }
17460    }
17461#endif
17462
17463    return(ret);
17464}
17465
17466
17467static int
17468test_xmlTextWriterEndDTD(void) {
17469    int ret = 0;
17470
17471#ifdef LIBXML_WRITER_ENABLED
17472    int mem_base;
17473    int ret_val;
17474    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
17475    int n_writer;
17476
17477    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
17478        mem_base = xmlMemBlocks();
17479        writer = gen_xmlTextWriterPtr(n_writer);
17480
17481        ret_val = xmlTextWriterEndDTD(writer);
17482        desret_int(ret_val);
17483        call_tests++;
17484        des_xmlTextWriterPtr(n_writer, writer);
17485        xmlResetLastError();
17486        if (mem_base != xmlMemBlocks()) {
17487            printf("Leak of %d blocks found in xmlTextWriterEndDTD",
17488	           xmlMemBlocks() - mem_base);
17489	    ret++;
17490            printf(" %d", n_writer);
17491            printf("\n");
17492        }
17493    }
17494#endif
17495
17496    return(ret);
17497}
17498
17499
17500static int
17501test_xmlTextWriterEndDTDAttlist(void) {
17502    int ret = 0;
17503
17504#ifdef LIBXML_WRITER_ENABLED
17505    int mem_base;
17506    int ret_val;
17507    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
17508    int n_writer;
17509
17510    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
17511        mem_base = xmlMemBlocks();
17512        writer = gen_xmlTextWriterPtr(n_writer);
17513
17514        ret_val = xmlTextWriterEndDTDAttlist(writer);
17515        desret_int(ret_val);
17516        call_tests++;
17517        des_xmlTextWriterPtr(n_writer, writer);
17518        xmlResetLastError();
17519        if (mem_base != xmlMemBlocks()) {
17520            printf("Leak of %d blocks found in xmlTextWriterEndDTDAttlist",
17521	           xmlMemBlocks() - mem_base);
17522	    ret++;
17523            printf(" %d", n_writer);
17524            printf("\n");
17525        }
17526    }
17527#endif
17528
17529    return(ret);
17530}
17531
17532
17533static int
17534test_xmlTextWriterEndDTDElement(void) {
17535    int ret = 0;
17536
17537#ifdef LIBXML_WRITER_ENABLED
17538    int mem_base;
17539    int ret_val;
17540    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
17541    int n_writer;
17542
17543    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
17544        mem_base = xmlMemBlocks();
17545        writer = gen_xmlTextWriterPtr(n_writer);
17546
17547        ret_val = xmlTextWriterEndDTDElement(writer);
17548        desret_int(ret_val);
17549        call_tests++;
17550        des_xmlTextWriterPtr(n_writer, writer);
17551        xmlResetLastError();
17552        if (mem_base != xmlMemBlocks()) {
17553            printf("Leak of %d blocks found in xmlTextWriterEndDTDElement",
17554	           xmlMemBlocks() - mem_base);
17555	    ret++;
17556            printf(" %d", n_writer);
17557            printf("\n");
17558        }
17559    }
17560#endif
17561
17562    return(ret);
17563}
17564
17565
17566static int
17567test_xmlTextWriterEndDTDEntity(void) {
17568    int ret = 0;
17569
17570#ifdef LIBXML_WRITER_ENABLED
17571    int mem_base;
17572    int ret_val;
17573    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
17574    int n_writer;
17575
17576    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
17577        mem_base = xmlMemBlocks();
17578        writer = gen_xmlTextWriterPtr(n_writer);
17579
17580        ret_val = xmlTextWriterEndDTDEntity(writer);
17581        desret_int(ret_val);
17582        call_tests++;
17583        des_xmlTextWriterPtr(n_writer, writer);
17584        xmlResetLastError();
17585        if (mem_base != xmlMemBlocks()) {
17586            printf("Leak of %d blocks found in xmlTextWriterEndDTDEntity",
17587	           xmlMemBlocks() - mem_base);
17588	    ret++;
17589            printf(" %d", n_writer);
17590            printf("\n");
17591        }
17592    }
17593#endif
17594
17595    return(ret);
17596}
17597
17598
17599static int
17600test_xmlTextWriterEndDocument(void) {
17601    int ret = 0;
17602
17603#ifdef LIBXML_WRITER_ENABLED
17604    int mem_base;
17605    int ret_val;
17606    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
17607    int n_writer;
17608
17609    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
17610        mem_base = xmlMemBlocks();
17611        writer = gen_xmlTextWriterPtr(n_writer);
17612
17613        ret_val = xmlTextWriterEndDocument(writer);
17614        desret_int(ret_val);
17615        call_tests++;
17616        des_xmlTextWriterPtr(n_writer, writer);
17617        xmlResetLastError();
17618        if (mem_base != xmlMemBlocks()) {
17619            printf("Leak of %d blocks found in xmlTextWriterEndDocument",
17620	           xmlMemBlocks() - mem_base);
17621	    ret++;
17622            printf(" %d", n_writer);
17623            printf("\n");
17624        }
17625    }
17626#endif
17627
17628    return(ret);
17629}
17630
17631
17632static int
17633test_xmlTextWriterEndElement(void) {
17634    int ret = 0;
17635
17636#ifdef LIBXML_WRITER_ENABLED
17637    int mem_base;
17638    int ret_val;
17639    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
17640    int n_writer;
17641
17642    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
17643        mem_base = xmlMemBlocks();
17644        writer = gen_xmlTextWriterPtr(n_writer);
17645
17646        ret_val = xmlTextWriterEndElement(writer);
17647        desret_int(ret_val);
17648        call_tests++;
17649        des_xmlTextWriterPtr(n_writer, writer);
17650        xmlResetLastError();
17651        if (mem_base != xmlMemBlocks()) {
17652            printf("Leak of %d blocks found in xmlTextWriterEndElement",
17653	           xmlMemBlocks() - mem_base);
17654	    ret++;
17655            printf(" %d", n_writer);
17656            printf("\n");
17657        }
17658    }
17659#endif
17660
17661    return(ret);
17662}
17663
17664
17665static int
17666test_xmlTextWriterEndPI(void) {
17667    int ret = 0;
17668
17669#ifdef LIBXML_WRITER_ENABLED
17670    int mem_base;
17671    int ret_val;
17672    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
17673    int n_writer;
17674
17675    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
17676        mem_base = xmlMemBlocks();
17677        writer = gen_xmlTextWriterPtr(n_writer);
17678
17679        ret_val = xmlTextWriterEndPI(writer);
17680        desret_int(ret_val);
17681        call_tests++;
17682        des_xmlTextWriterPtr(n_writer, writer);
17683        xmlResetLastError();
17684        if (mem_base != xmlMemBlocks()) {
17685            printf("Leak of %d blocks found in xmlTextWriterEndPI",
17686	           xmlMemBlocks() - mem_base);
17687	    ret++;
17688            printf(" %d", n_writer);
17689            printf("\n");
17690        }
17691    }
17692#endif
17693
17694    return(ret);
17695}
17696
17697
17698static int
17699test_xmlTextWriterFlush(void) {
17700    int ret = 0;
17701
17702#ifdef LIBXML_WRITER_ENABLED
17703    int mem_base;
17704    int ret_val;
17705    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
17706    int n_writer;
17707
17708    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
17709        mem_base = xmlMemBlocks();
17710        writer = gen_xmlTextWriterPtr(n_writer);
17711
17712        ret_val = xmlTextWriterFlush(writer);
17713        desret_int(ret_val);
17714        call_tests++;
17715        des_xmlTextWriterPtr(n_writer, writer);
17716        xmlResetLastError();
17717        if (mem_base != xmlMemBlocks()) {
17718            printf("Leak of %d blocks found in xmlTextWriterFlush",
17719	           xmlMemBlocks() - mem_base);
17720	    ret++;
17721            printf(" %d", n_writer);
17722            printf("\n");
17723        }
17724    }
17725#endif
17726
17727    return(ret);
17728}
17729
17730
17731static int
17732test_xmlTextWriterFullEndElement(void) {
17733    int ret = 0;
17734
17735#ifdef LIBXML_WRITER_ENABLED
17736    int mem_base;
17737    int ret_val;
17738    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
17739    int n_writer;
17740
17741    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
17742        mem_base = xmlMemBlocks();
17743        writer = gen_xmlTextWriterPtr(n_writer);
17744
17745        ret_val = xmlTextWriterFullEndElement(writer);
17746        desret_int(ret_val);
17747        call_tests++;
17748        des_xmlTextWriterPtr(n_writer, writer);
17749        xmlResetLastError();
17750        if (mem_base != xmlMemBlocks()) {
17751            printf("Leak of %d blocks found in xmlTextWriterFullEndElement",
17752	           xmlMemBlocks() - mem_base);
17753	    ret++;
17754            printf(" %d", n_writer);
17755            printf("\n");
17756        }
17757    }
17758#endif
17759
17760    return(ret);
17761}
17762
17763
17764static int
17765test_xmlTextWriterSetIndent(void) {
17766    int ret = 0;
17767
17768#ifdef LIBXML_WRITER_ENABLED
17769    int mem_base;
17770    int ret_val;
17771    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
17772    int n_writer;
17773    int indent; /* do indentation? */
17774    int n_indent;
17775
17776    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
17777    for (n_indent = 0;n_indent < gen_nb_int;n_indent++) {
17778        mem_base = xmlMemBlocks();
17779        writer = gen_xmlTextWriterPtr(n_writer);
17780        indent = gen_int(n_indent);
17781
17782        ret_val = xmlTextWriterSetIndent(writer, indent);
17783        desret_int(ret_val);
17784        call_tests++;
17785        des_xmlTextWriterPtr(n_writer, writer);
17786        des_int(n_indent, indent);
17787        xmlResetLastError();
17788        if (mem_base != xmlMemBlocks()) {
17789            printf("Leak of %d blocks found in xmlTextWriterSetIndent",
17790	           xmlMemBlocks() - mem_base);
17791	    ret++;
17792            printf(" %d", n_writer);
17793            printf(" %d", n_indent);
17794            printf("\n");
17795        }
17796    }
17797    }
17798#endif
17799
17800    return(ret);
17801}
17802
17803
17804static int
17805test_xmlTextWriterSetIndentString(void) {
17806    int ret = 0;
17807
17808#ifdef LIBXML_WRITER_ENABLED
17809    int mem_base;
17810    int ret_val;
17811    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
17812    int n_writer;
17813    const xmlChar * str; /* the xmlChar string */
17814    int n_str;
17815
17816    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
17817    for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
17818        mem_base = xmlMemBlocks();
17819        writer = gen_xmlTextWriterPtr(n_writer);
17820        str = gen_const_xmlChar_ptr(n_str);
17821
17822        ret_val = xmlTextWriterSetIndentString(writer, str);
17823        desret_int(ret_val);
17824        call_tests++;
17825        des_xmlTextWriterPtr(n_writer, writer);
17826        des_const_xmlChar_ptr(n_str, str);
17827        xmlResetLastError();
17828        if (mem_base != xmlMemBlocks()) {
17829            printf("Leak of %d blocks found in xmlTextWriterSetIndentString",
17830	           xmlMemBlocks() - mem_base);
17831	    ret++;
17832            printf(" %d", n_writer);
17833            printf(" %d", n_str);
17834            printf("\n");
17835        }
17836    }
17837    }
17838#endif
17839
17840    return(ret);
17841}
17842
17843
17844static int
17845test_xmlTextWriterStartAttribute(void) {
17846    int ret = 0;
17847
17848#ifdef LIBXML_WRITER_ENABLED
17849    int mem_base;
17850    int ret_val;
17851    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
17852    int n_writer;
17853    const xmlChar * name; /* element name */
17854    int n_name;
17855
17856    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
17857    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
17858        mem_base = xmlMemBlocks();
17859        writer = gen_xmlTextWriterPtr(n_writer);
17860        name = gen_const_xmlChar_ptr(n_name);
17861
17862        ret_val = xmlTextWriterStartAttribute(writer, name);
17863        desret_int(ret_val);
17864        call_tests++;
17865        des_xmlTextWriterPtr(n_writer, writer);
17866        des_const_xmlChar_ptr(n_name, name);
17867        xmlResetLastError();
17868        if (mem_base != xmlMemBlocks()) {
17869            printf("Leak of %d blocks found in xmlTextWriterStartAttribute",
17870	           xmlMemBlocks() - mem_base);
17871	    ret++;
17872            printf(" %d", n_writer);
17873            printf(" %d", n_name);
17874            printf("\n");
17875        }
17876    }
17877    }
17878#endif
17879
17880    return(ret);
17881}
17882
17883
17884static int
17885test_xmlTextWriterStartAttributeNS(void) {
17886    int ret = 0;
17887
17888#ifdef LIBXML_WRITER_ENABLED
17889    int mem_base;
17890    int ret_val;
17891    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
17892    int n_writer;
17893    const xmlChar * prefix; /* namespace prefix or NULL */
17894    int n_prefix;
17895    const xmlChar * name; /* element local name */
17896    int n_name;
17897    const xmlChar * namespaceURI; /* namespace URI or NULL */
17898    int n_namespaceURI;
17899
17900    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
17901    for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
17902    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
17903    for (n_namespaceURI = 0;n_namespaceURI < gen_nb_const_xmlChar_ptr;n_namespaceURI++) {
17904        mem_base = xmlMemBlocks();
17905        writer = gen_xmlTextWriterPtr(n_writer);
17906        prefix = gen_const_xmlChar_ptr(n_prefix);
17907        name = gen_const_xmlChar_ptr(n_name);
17908        namespaceURI = gen_const_xmlChar_ptr(n_namespaceURI);
17909
17910        ret_val = xmlTextWriterStartAttributeNS(writer, prefix, name, namespaceURI);
17911        desret_int(ret_val);
17912        call_tests++;
17913        des_xmlTextWriterPtr(n_writer, writer);
17914        des_const_xmlChar_ptr(n_prefix, prefix);
17915        des_const_xmlChar_ptr(n_name, name);
17916        des_const_xmlChar_ptr(n_namespaceURI, namespaceURI);
17917        xmlResetLastError();
17918        if (mem_base != xmlMemBlocks()) {
17919            printf("Leak of %d blocks found in xmlTextWriterStartAttributeNS",
17920	           xmlMemBlocks() - mem_base);
17921	    ret++;
17922            printf(" %d", n_writer);
17923            printf(" %d", n_prefix);
17924            printf(" %d", n_name);
17925            printf(" %d", n_namespaceURI);
17926            printf("\n");
17927        }
17928    }
17929    }
17930    }
17931    }
17932#endif
17933
17934    return(ret);
17935}
17936
17937
17938static int
17939test_xmlTextWriterStartCDATA(void) {
17940    int ret = 0;
17941
17942#ifdef LIBXML_WRITER_ENABLED
17943    int mem_base;
17944    int ret_val;
17945    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
17946    int n_writer;
17947
17948    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
17949        mem_base = xmlMemBlocks();
17950        writer = gen_xmlTextWriterPtr(n_writer);
17951
17952        ret_val = xmlTextWriterStartCDATA(writer);
17953        desret_int(ret_val);
17954        call_tests++;
17955        des_xmlTextWriterPtr(n_writer, writer);
17956        xmlResetLastError();
17957        if (mem_base != xmlMemBlocks()) {
17958            printf("Leak of %d blocks found in xmlTextWriterStartCDATA",
17959	           xmlMemBlocks() - mem_base);
17960	    ret++;
17961            printf(" %d", n_writer);
17962            printf("\n");
17963        }
17964    }
17965#endif
17966
17967    return(ret);
17968}
17969
17970
17971static int
17972test_xmlTextWriterStartComment(void) {
17973    int ret = 0;
17974
17975#ifdef LIBXML_WRITER_ENABLED
17976    int mem_base;
17977    int ret_val;
17978    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
17979    int n_writer;
17980
17981    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
17982        mem_base = xmlMemBlocks();
17983        writer = gen_xmlTextWriterPtr(n_writer);
17984
17985        ret_val = xmlTextWriterStartComment(writer);
17986        desret_int(ret_val);
17987        call_tests++;
17988        des_xmlTextWriterPtr(n_writer, writer);
17989        xmlResetLastError();
17990        if (mem_base != xmlMemBlocks()) {
17991            printf("Leak of %d blocks found in xmlTextWriterStartComment",
17992	           xmlMemBlocks() - mem_base);
17993	    ret++;
17994            printf(" %d", n_writer);
17995            printf("\n");
17996        }
17997    }
17998#endif
17999
18000    return(ret);
18001}
18002
18003
18004static int
18005test_xmlTextWriterStartDTD(void) {
18006    int ret = 0;
18007
18008#ifdef LIBXML_WRITER_ENABLED
18009    int mem_base;
18010    int ret_val;
18011    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
18012    int n_writer;
18013    const xmlChar * name; /* the name of the DTD */
18014    int n_name;
18015    const xmlChar * pubid; /* the public identifier, which is an alternative to the system identifier */
18016    int n_pubid;
18017    const xmlChar * sysid; /* the system identifier, which is the URI of the DTD */
18018    int n_sysid;
18019
18020    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
18021    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
18022    for (n_pubid = 0;n_pubid < gen_nb_const_xmlChar_ptr;n_pubid++) {
18023    for (n_sysid = 0;n_sysid < gen_nb_const_xmlChar_ptr;n_sysid++) {
18024        mem_base = xmlMemBlocks();
18025        writer = gen_xmlTextWriterPtr(n_writer);
18026        name = gen_const_xmlChar_ptr(n_name);
18027        pubid = gen_const_xmlChar_ptr(n_pubid);
18028        sysid = gen_const_xmlChar_ptr(n_sysid);
18029
18030        ret_val = xmlTextWriterStartDTD(writer, name, pubid, sysid);
18031        desret_int(ret_val);
18032        call_tests++;
18033        des_xmlTextWriterPtr(n_writer, writer);
18034        des_const_xmlChar_ptr(n_name, name);
18035        des_const_xmlChar_ptr(n_pubid, pubid);
18036        des_const_xmlChar_ptr(n_sysid, sysid);
18037        xmlResetLastError();
18038        if (mem_base != xmlMemBlocks()) {
18039            printf("Leak of %d blocks found in xmlTextWriterStartDTD",
18040	           xmlMemBlocks() - mem_base);
18041	    ret++;
18042            printf(" %d", n_writer);
18043            printf(" %d", n_name);
18044            printf(" %d", n_pubid);
18045            printf(" %d", n_sysid);
18046            printf("\n");
18047        }
18048    }
18049    }
18050    }
18051    }
18052#endif
18053
18054    return(ret);
18055}
18056
18057
18058static int
18059test_xmlTextWriterStartDTDAttlist(void) {
18060    int ret = 0;
18061
18062#ifdef LIBXML_WRITER_ENABLED
18063    int mem_base;
18064    int ret_val;
18065    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
18066    int n_writer;
18067    const xmlChar * name; /* the name of the DTD ATTLIST */
18068    int n_name;
18069
18070    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
18071    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
18072        mem_base = xmlMemBlocks();
18073        writer = gen_xmlTextWriterPtr(n_writer);
18074        name = gen_const_xmlChar_ptr(n_name);
18075
18076        ret_val = xmlTextWriterStartDTDAttlist(writer, name);
18077        desret_int(ret_val);
18078        call_tests++;
18079        des_xmlTextWriterPtr(n_writer, writer);
18080        des_const_xmlChar_ptr(n_name, name);
18081        xmlResetLastError();
18082        if (mem_base != xmlMemBlocks()) {
18083            printf("Leak of %d blocks found in xmlTextWriterStartDTDAttlist",
18084	           xmlMemBlocks() - mem_base);
18085	    ret++;
18086            printf(" %d", n_writer);
18087            printf(" %d", n_name);
18088            printf("\n");
18089        }
18090    }
18091    }
18092#endif
18093
18094    return(ret);
18095}
18096
18097
18098static int
18099test_xmlTextWriterStartDTDElement(void) {
18100    int ret = 0;
18101
18102#ifdef LIBXML_WRITER_ENABLED
18103    int mem_base;
18104    int ret_val;
18105    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
18106    int n_writer;
18107    const xmlChar * name; /* the name of the DTD element */
18108    int n_name;
18109
18110    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
18111    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
18112        mem_base = xmlMemBlocks();
18113        writer = gen_xmlTextWriterPtr(n_writer);
18114        name = gen_const_xmlChar_ptr(n_name);
18115
18116        ret_val = xmlTextWriterStartDTDElement(writer, name);
18117        desret_int(ret_val);
18118        call_tests++;
18119        des_xmlTextWriterPtr(n_writer, writer);
18120        des_const_xmlChar_ptr(n_name, name);
18121        xmlResetLastError();
18122        if (mem_base != xmlMemBlocks()) {
18123            printf("Leak of %d blocks found in xmlTextWriterStartDTDElement",
18124	           xmlMemBlocks() - mem_base);
18125	    ret++;
18126            printf(" %d", n_writer);
18127            printf(" %d", n_name);
18128            printf("\n");
18129        }
18130    }
18131    }
18132#endif
18133
18134    return(ret);
18135}
18136
18137
18138static int
18139test_xmlTextWriterStartDTDEntity(void) {
18140    int ret = 0;
18141
18142#ifdef LIBXML_WRITER_ENABLED
18143    int mem_base;
18144    int ret_val;
18145    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
18146    int n_writer;
18147    int pe; /* TRUE if this is a parameter entity, FALSE if not */
18148    int n_pe;
18149    const xmlChar * name; /* the name of the DTD ATTLIST */
18150    int n_name;
18151
18152    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
18153    for (n_pe = 0;n_pe < gen_nb_int;n_pe++) {
18154    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
18155        mem_base = xmlMemBlocks();
18156        writer = gen_xmlTextWriterPtr(n_writer);
18157        pe = gen_int(n_pe);
18158        name = gen_const_xmlChar_ptr(n_name);
18159
18160        ret_val = xmlTextWriterStartDTDEntity(writer, pe, name);
18161        desret_int(ret_val);
18162        call_tests++;
18163        des_xmlTextWriterPtr(n_writer, writer);
18164        des_int(n_pe, pe);
18165        des_const_xmlChar_ptr(n_name, name);
18166        xmlResetLastError();
18167        if (mem_base != xmlMemBlocks()) {
18168            printf("Leak of %d blocks found in xmlTextWriterStartDTDEntity",
18169	           xmlMemBlocks() - mem_base);
18170	    ret++;
18171            printf(" %d", n_writer);
18172            printf(" %d", n_pe);
18173            printf(" %d", n_name);
18174            printf("\n");
18175        }
18176    }
18177    }
18178    }
18179#endif
18180
18181    return(ret);
18182}
18183
18184
18185static int
18186test_xmlTextWriterStartDocument(void) {
18187    int ret = 0;
18188
18189#ifdef LIBXML_WRITER_ENABLED
18190    int mem_base;
18191    int ret_val;
18192    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
18193    int n_writer;
18194    const char * version; /* the xml version ("1.0") or NULL for default ("1.0") */
18195    int n_version;
18196    const char * encoding; /* the encoding or NULL for default */
18197    int n_encoding;
18198    const char * standalone; /* "yes" or "no" or NULL for default */
18199    int n_standalone;
18200
18201    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
18202    for (n_version = 0;n_version < gen_nb_const_char_ptr;n_version++) {
18203    for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
18204    for (n_standalone = 0;n_standalone < gen_nb_const_char_ptr;n_standalone++) {
18205        mem_base = xmlMemBlocks();
18206        writer = gen_xmlTextWriterPtr(n_writer);
18207        version = gen_const_char_ptr(n_version);
18208        encoding = gen_const_char_ptr(n_encoding);
18209        standalone = gen_const_char_ptr(n_standalone);
18210
18211        ret_val = xmlTextWriterStartDocument(writer, version, encoding, standalone);
18212        desret_int(ret_val);
18213        call_tests++;
18214        des_xmlTextWriterPtr(n_writer, writer);
18215        des_const_char_ptr(n_version, version);
18216        des_const_char_ptr(n_encoding, encoding);
18217        des_const_char_ptr(n_standalone, standalone);
18218        xmlResetLastError();
18219        if (mem_base != xmlMemBlocks()) {
18220            printf("Leak of %d blocks found in xmlTextWriterStartDocument",
18221	           xmlMemBlocks() - mem_base);
18222	    ret++;
18223            printf(" %d", n_writer);
18224            printf(" %d", n_version);
18225            printf(" %d", n_encoding);
18226            printf(" %d", n_standalone);
18227            printf("\n");
18228        }
18229    }
18230    }
18231    }
18232    }
18233#endif
18234
18235    return(ret);
18236}
18237
18238
18239static int
18240test_xmlTextWriterStartElement(void) {
18241    int ret = 0;
18242
18243#ifdef LIBXML_WRITER_ENABLED
18244    int mem_base;
18245    int ret_val;
18246    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
18247    int n_writer;
18248    const xmlChar * name; /* element name */
18249    int n_name;
18250
18251    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
18252    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
18253        mem_base = xmlMemBlocks();
18254        writer = gen_xmlTextWriterPtr(n_writer);
18255        name = gen_const_xmlChar_ptr(n_name);
18256
18257        ret_val = xmlTextWriterStartElement(writer, name);
18258        desret_int(ret_val);
18259        call_tests++;
18260        des_xmlTextWriterPtr(n_writer, writer);
18261        des_const_xmlChar_ptr(n_name, name);
18262        xmlResetLastError();
18263        if (mem_base != xmlMemBlocks()) {
18264            printf("Leak of %d blocks found in xmlTextWriterStartElement",
18265	           xmlMemBlocks() - mem_base);
18266	    ret++;
18267            printf(" %d", n_writer);
18268            printf(" %d", n_name);
18269            printf("\n");
18270        }
18271    }
18272    }
18273#endif
18274
18275    return(ret);
18276}
18277
18278
18279static int
18280test_xmlTextWriterStartElementNS(void) {
18281    int ret = 0;
18282
18283#ifdef LIBXML_WRITER_ENABLED
18284    int mem_base;
18285    int ret_val;
18286    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
18287    int n_writer;
18288    const xmlChar * prefix; /* namespace prefix or NULL */
18289    int n_prefix;
18290    const xmlChar * name; /* element local name */
18291    int n_name;
18292    const xmlChar * namespaceURI; /* namespace URI or NULL */
18293    int n_namespaceURI;
18294
18295    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
18296    for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
18297    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
18298    for (n_namespaceURI = 0;n_namespaceURI < gen_nb_const_xmlChar_ptr;n_namespaceURI++) {
18299        mem_base = xmlMemBlocks();
18300        writer = gen_xmlTextWriterPtr(n_writer);
18301        prefix = gen_const_xmlChar_ptr(n_prefix);
18302        name = gen_const_xmlChar_ptr(n_name);
18303        namespaceURI = gen_const_xmlChar_ptr(n_namespaceURI);
18304
18305        ret_val = xmlTextWriterStartElementNS(writer, prefix, name, namespaceURI);
18306        desret_int(ret_val);
18307        call_tests++;
18308        des_xmlTextWriterPtr(n_writer, writer);
18309        des_const_xmlChar_ptr(n_prefix, prefix);
18310        des_const_xmlChar_ptr(n_name, name);
18311        des_const_xmlChar_ptr(n_namespaceURI, namespaceURI);
18312        xmlResetLastError();
18313        if (mem_base != xmlMemBlocks()) {
18314            printf("Leak of %d blocks found in xmlTextWriterStartElementNS",
18315	           xmlMemBlocks() - mem_base);
18316	    ret++;
18317            printf(" %d", n_writer);
18318            printf(" %d", n_prefix);
18319            printf(" %d", n_name);
18320            printf(" %d", n_namespaceURI);
18321            printf("\n");
18322        }
18323    }
18324    }
18325    }
18326    }
18327#endif
18328
18329    return(ret);
18330}
18331
18332
18333static int
18334test_xmlTextWriterStartPI(void) {
18335    int ret = 0;
18336
18337#ifdef LIBXML_WRITER_ENABLED
18338    int mem_base;
18339    int ret_val;
18340    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
18341    int n_writer;
18342    const xmlChar * target; /* PI target */
18343    int n_target;
18344
18345    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
18346    for (n_target = 0;n_target < gen_nb_const_xmlChar_ptr;n_target++) {
18347        mem_base = xmlMemBlocks();
18348        writer = gen_xmlTextWriterPtr(n_writer);
18349        target = gen_const_xmlChar_ptr(n_target);
18350
18351        ret_val = xmlTextWriterStartPI(writer, target);
18352        desret_int(ret_val);
18353        call_tests++;
18354        des_xmlTextWriterPtr(n_writer, writer);
18355        des_const_xmlChar_ptr(n_target, target);
18356        xmlResetLastError();
18357        if (mem_base != xmlMemBlocks()) {
18358            printf("Leak of %d blocks found in xmlTextWriterStartPI",
18359	           xmlMemBlocks() - mem_base);
18360	    ret++;
18361            printf(" %d", n_writer);
18362            printf(" %d", n_target);
18363            printf("\n");
18364        }
18365    }
18366    }
18367#endif
18368
18369    return(ret);
18370}
18371
18372
18373static int
18374test_xmlTextWriterWriteAttribute(void) {
18375    int ret = 0;
18376
18377#ifdef LIBXML_WRITER_ENABLED
18378    int mem_base;
18379    int ret_val;
18380    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
18381    int n_writer;
18382    const xmlChar * name; /* attribute name */
18383    int n_name;
18384    const xmlChar * content; /* attribute content */
18385    int n_content;
18386
18387    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
18388    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
18389    for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
18390        mem_base = xmlMemBlocks();
18391        writer = gen_xmlTextWriterPtr(n_writer);
18392        name = gen_const_xmlChar_ptr(n_name);
18393        content = gen_const_xmlChar_ptr(n_content);
18394
18395        ret_val = xmlTextWriterWriteAttribute(writer, name, content);
18396        desret_int(ret_val);
18397        call_tests++;
18398        des_xmlTextWriterPtr(n_writer, writer);
18399        des_const_xmlChar_ptr(n_name, name);
18400        des_const_xmlChar_ptr(n_content, content);
18401        xmlResetLastError();
18402        if (mem_base != xmlMemBlocks()) {
18403            printf("Leak of %d blocks found in xmlTextWriterWriteAttribute",
18404	           xmlMemBlocks() - mem_base);
18405	    ret++;
18406            printf(" %d", n_writer);
18407            printf(" %d", n_name);
18408            printf(" %d", n_content);
18409            printf("\n");
18410        }
18411    }
18412    }
18413    }
18414#endif
18415
18416    return(ret);
18417}
18418
18419
18420static int
18421test_xmlTextWriterWriteAttributeNS(void) {
18422    int ret = 0;
18423
18424#ifdef LIBXML_WRITER_ENABLED
18425    int mem_base;
18426    int ret_val;
18427    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
18428    int n_writer;
18429    const xmlChar * prefix; /* namespace prefix */
18430    int n_prefix;
18431    const xmlChar * name; /* attribute local name */
18432    int n_name;
18433    const xmlChar * namespaceURI; /* namespace URI */
18434    int n_namespaceURI;
18435    const xmlChar * content; /* attribute content */
18436    int n_content;
18437
18438    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
18439    for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
18440    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
18441    for (n_namespaceURI = 0;n_namespaceURI < gen_nb_const_xmlChar_ptr;n_namespaceURI++) {
18442    for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
18443        mem_base = xmlMemBlocks();
18444        writer = gen_xmlTextWriterPtr(n_writer);
18445        prefix = gen_const_xmlChar_ptr(n_prefix);
18446        name = gen_const_xmlChar_ptr(n_name);
18447        namespaceURI = gen_const_xmlChar_ptr(n_namespaceURI);
18448        content = gen_const_xmlChar_ptr(n_content);
18449
18450        ret_val = xmlTextWriterWriteAttributeNS(writer, prefix, name, namespaceURI, content);
18451        desret_int(ret_val);
18452        call_tests++;
18453        des_xmlTextWriterPtr(n_writer, writer);
18454        des_const_xmlChar_ptr(n_prefix, prefix);
18455        des_const_xmlChar_ptr(n_name, name);
18456        des_const_xmlChar_ptr(n_namespaceURI, namespaceURI);
18457        des_const_xmlChar_ptr(n_content, content);
18458        xmlResetLastError();
18459        if (mem_base != xmlMemBlocks()) {
18460            printf("Leak of %d blocks found in xmlTextWriterWriteAttributeNS",
18461	           xmlMemBlocks() - mem_base);
18462	    ret++;
18463            printf(" %d", n_writer);
18464            printf(" %d", n_prefix);
18465            printf(" %d", n_name);
18466            printf(" %d", n_namespaceURI);
18467            printf(" %d", n_content);
18468            printf("\n");
18469        }
18470    }
18471    }
18472    }
18473    }
18474    }
18475#endif
18476
18477    return(ret);
18478}
18479
18480
18481static int
18482test_xmlTextWriterWriteBase64(void) {
18483    int ret = 0;
18484
18485#ifdef LIBXML_WRITER_ENABLED
18486    int mem_base;
18487    int ret_val;
18488    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
18489    int n_writer;
18490    const char * data; /* binary data */
18491    int n_data;
18492    int start; /* the position within the data of the first byte to encode */
18493    int n_start;
18494    int len; /* the number of bytes to encode */
18495    int n_len;
18496
18497    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
18498    for (n_data = 0;n_data < gen_nb_const_char_ptr;n_data++) {
18499    for (n_start = 0;n_start < gen_nb_int;n_start++) {
18500    for (n_len = 0;n_len < gen_nb_int;n_len++) {
18501        mem_base = xmlMemBlocks();
18502        writer = gen_xmlTextWriterPtr(n_writer);
18503        data = gen_const_char_ptr(n_data);
18504        start = gen_int(n_start);
18505        len = gen_int(n_len);
18506
18507        ret_val = xmlTextWriterWriteBase64(writer, data, start, len);
18508        desret_int(ret_val);
18509        call_tests++;
18510        des_xmlTextWriterPtr(n_writer, writer);
18511        des_const_char_ptr(n_data, data);
18512        des_int(n_start, start);
18513        des_int(n_len, len);
18514        xmlResetLastError();
18515        if (mem_base != xmlMemBlocks()) {
18516            printf("Leak of %d blocks found in xmlTextWriterWriteBase64",
18517	           xmlMemBlocks() - mem_base);
18518	    ret++;
18519            printf(" %d", n_writer);
18520            printf(" %d", n_data);
18521            printf(" %d", n_start);
18522            printf(" %d", n_len);
18523            printf("\n");
18524        }
18525    }
18526    }
18527    }
18528    }
18529#endif
18530
18531    return(ret);
18532}
18533
18534
18535static int
18536test_xmlTextWriterWriteBinHex(void) {
18537    int ret = 0;
18538
18539#ifdef LIBXML_WRITER_ENABLED
18540    int mem_base;
18541    int ret_val;
18542    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
18543    int n_writer;
18544    const char * data; /* binary data */
18545    int n_data;
18546    int start; /* the position within the data of the first byte to encode */
18547    int n_start;
18548    int len; /* the number of bytes to encode */
18549    int n_len;
18550
18551    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
18552    for (n_data = 0;n_data < gen_nb_const_char_ptr;n_data++) {
18553    for (n_start = 0;n_start < gen_nb_int;n_start++) {
18554    for (n_len = 0;n_len < gen_nb_int;n_len++) {
18555        mem_base = xmlMemBlocks();
18556        writer = gen_xmlTextWriterPtr(n_writer);
18557        data = gen_const_char_ptr(n_data);
18558        start = gen_int(n_start);
18559        len = gen_int(n_len);
18560
18561        ret_val = xmlTextWriterWriteBinHex(writer, data, start, len);
18562        desret_int(ret_val);
18563        call_tests++;
18564        des_xmlTextWriterPtr(n_writer, writer);
18565        des_const_char_ptr(n_data, data);
18566        des_int(n_start, start);
18567        des_int(n_len, len);
18568        xmlResetLastError();
18569        if (mem_base != xmlMemBlocks()) {
18570            printf("Leak of %d blocks found in xmlTextWriterWriteBinHex",
18571	           xmlMemBlocks() - mem_base);
18572	    ret++;
18573            printf(" %d", n_writer);
18574            printf(" %d", n_data);
18575            printf(" %d", n_start);
18576            printf(" %d", n_len);
18577            printf("\n");
18578        }
18579    }
18580    }
18581    }
18582    }
18583#endif
18584
18585    return(ret);
18586}
18587
18588
18589static int
18590test_xmlTextWriterWriteCDATA(void) {
18591    int ret = 0;
18592
18593#ifdef LIBXML_WRITER_ENABLED
18594    int mem_base;
18595    int ret_val;
18596    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
18597    int n_writer;
18598    const xmlChar * content; /* CDATA content */
18599    int n_content;
18600
18601    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
18602    for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
18603        mem_base = xmlMemBlocks();
18604        writer = gen_xmlTextWriterPtr(n_writer);
18605        content = gen_const_xmlChar_ptr(n_content);
18606
18607        ret_val = xmlTextWriterWriteCDATA(writer, content);
18608        desret_int(ret_val);
18609        call_tests++;
18610        des_xmlTextWriterPtr(n_writer, writer);
18611        des_const_xmlChar_ptr(n_content, content);
18612        xmlResetLastError();
18613        if (mem_base != xmlMemBlocks()) {
18614            printf("Leak of %d blocks found in xmlTextWriterWriteCDATA",
18615	           xmlMemBlocks() - mem_base);
18616	    ret++;
18617            printf(" %d", n_writer);
18618            printf(" %d", n_content);
18619            printf("\n");
18620        }
18621    }
18622    }
18623#endif
18624
18625    return(ret);
18626}
18627
18628
18629static int
18630test_xmlTextWriterWriteComment(void) {
18631    int ret = 0;
18632
18633#ifdef LIBXML_WRITER_ENABLED
18634    int mem_base;
18635    int ret_val;
18636    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
18637    int n_writer;
18638    const xmlChar * content; /* comment string */
18639    int n_content;
18640
18641    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
18642    for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
18643        mem_base = xmlMemBlocks();
18644        writer = gen_xmlTextWriterPtr(n_writer);
18645        content = gen_const_xmlChar_ptr(n_content);
18646
18647        ret_val = xmlTextWriterWriteComment(writer, content);
18648        desret_int(ret_val);
18649        call_tests++;
18650        des_xmlTextWriterPtr(n_writer, writer);
18651        des_const_xmlChar_ptr(n_content, content);
18652        xmlResetLastError();
18653        if (mem_base != xmlMemBlocks()) {
18654            printf("Leak of %d blocks found in xmlTextWriterWriteComment",
18655	           xmlMemBlocks() - mem_base);
18656	    ret++;
18657            printf(" %d", n_writer);
18658            printf(" %d", n_content);
18659            printf("\n");
18660        }
18661    }
18662    }
18663#endif
18664
18665    return(ret);
18666}
18667
18668
18669static int
18670test_xmlTextWriterWriteDTD(void) {
18671    int ret = 0;
18672
18673#ifdef LIBXML_WRITER_ENABLED
18674    int mem_base;
18675    int ret_val;
18676    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
18677    int n_writer;
18678    const xmlChar * name; /* the name of the DTD */
18679    int n_name;
18680    const xmlChar * pubid; /* the public identifier, which is an alternative to the system identifier */
18681    int n_pubid;
18682    const xmlChar * sysid; /* the system identifier, which is the URI of the DTD */
18683    int n_sysid;
18684    const xmlChar * subset; /* string content of the DTD */
18685    int n_subset;
18686
18687    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
18688    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
18689    for (n_pubid = 0;n_pubid < gen_nb_const_xmlChar_ptr;n_pubid++) {
18690    for (n_sysid = 0;n_sysid < gen_nb_const_xmlChar_ptr;n_sysid++) {
18691    for (n_subset = 0;n_subset < gen_nb_const_xmlChar_ptr;n_subset++) {
18692        mem_base = xmlMemBlocks();
18693        writer = gen_xmlTextWriterPtr(n_writer);
18694        name = gen_const_xmlChar_ptr(n_name);
18695        pubid = gen_const_xmlChar_ptr(n_pubid);
18696        sysid = gen_const_xmlChar_ptr(n_sysid);
18697        subset = gen_const_xmlChar_ptr(n_subset);
18698
18699        ret_val = xmlTextWriterWriteDTD(writer, name, pubid, sysid, subset);
18700        desret_int(ret_val);
18701        call_tests++;
18702        des_xmlTextWriterPtr(n_writer, writer);
18703        des_const_xmlChar_ptr(n_name, name);
18704        des_const_xmlChar_ptr(n_pubid, pubid);
18705        des_const_xmlChar_ptr(n_sysid, sysid);
18706        des_const_xmlChar_ptr(n_subset, subset);
18707        xmlResetLastError();
18708        if (mem_base != xmlMemBlocks()) {
18709            printf("Leak of %d blocks found in xmlTextWriterWriteDTD",
18710	           xmlMemBlocks() - mem_base);
18711	    ret++;
18712            printf(" %d", n_writer);
18713            printf(" %d", n_name);
18714            printf(" %d", n_pubid);
18715            printf(" %d", n_sysid);
18716            printf(" %d", n_subset);
18717            printf("\n");
18718        }
18719    }
18720    }
18721    }
18722    }
18723    }
18724#endif
18725
18726    return(ret);
18727}
18728
18729
18730static int
18731test_xmlTextWriterWriteDTDAttlist(void) {
18732    int ret = 0;
18733
18734#ifdef LIBXML_WRITER_ENABLED
18735    int mem_base;
18736    int ret_val;
18737    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
18738    int n_writer;
18739    const xmlChar * name; /* the name of the DTD ATTLIST */
18740    int n_name;
18741    const xmlChar * content; /* content of the ATTLIST */
18742    int n_content;
18743
18744    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
18745    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
18746    for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
18747        mem_base = xmlMemBlocks();
18748        writer = gen_xmlTextWriterPtr(n_writer);
18749        name = gen_const_xmlChar_ptr(n_name);
18750        content = gen_const_xmlChar_ptr(n_content);
18751
18752        ret_val = xmlTextWriterWriteDTDAttlist(writer, name, content);
18753        desret_int(ret_val);
18754        call_tests++;
18755        des_xmlTextWriterPtr(n_writer, writer);
18756        des_const_xmlChar_ptr(n_name, name);
18757        des_const_xmlChar_ptr(n_content, content);
18758        xmlResetLastError();
18759        if (mem_base != xmlMemBlocks()) {
18760            printf("Leak of %d blocks found in xmlTextWriterWriteDTDAttlist",
18761	           xmlMemBlocks() - mem_base);
18762	    ret++;
18763            printf(" %d", n_writer);
18764            printf(" %d", n_name);
18765            printf(" %d", n_content);
18766            printf("\n");
18767        }
18768    }
18769    }
18770    }
18771#endif
18772
18773    return(ret);
18774}
18775
18776
18777static int
18778test_xmlTextWriterWriteDTDElement(void) {
18779    int ret = 0;
18780
18781#ifdef LIBXML_WRITER_ENABLED
18782    int mem_base;
18783    int ret_val;
18784    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
18785    int n_writer;
18786    const xmlChar * name; /* the name of the DTD element */
18787    int n_name;
18788    const xmlChar * content; /* content of the element */
18789    int n_content;
18790
18791    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
18792    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
18793    for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
18794        mem_base = xmlMemBlocks();
18795        writer = gen_xmlTextWriterPtr(n_writer);
18796        name = gen_const_xmlChar_ptr(n_name);
18797        content = gen_const_xmlChar_ptr(n_content);
18798
18799        ret_val = xmlTextWriterWriteDTDElement(writer, name, content);
18800        desret_int(ret_val);
18801        call_tests++;
18802        des_xmlTextWriterPtr(n_writer, writer);
18803        des_const_xmlChar_ptr(n_name, name);
18804        des_const_xmlChar_ptr(n_content, content);
18805        xmlResetLastError();
18806        if (mem_base != xmlMemBlocks()) {
18807            printf("Leak of %d blocks found in xmlTextWriterWriteDTDElement",
18808	           xmlMemBlocks() - mem_base);
18809	    ret++;
18810            printf(" %d", n_writer);
18811            printf(" %d", n_name);
18812            printf(" %d", n_content);
18813            printf("\n");
18814        }
18815    }
18816    }
18817    }
18818#endif
18819
18820    return(ret);
18821}
18822
18823
18824static int
18825test_xmlTextWriterWriteDTDEntity(void) {
18826    int ret = 0;
18827
18828#ifdef LIBXML_WRITER_ENABLED
18829    int mem_base;
18830    int ret_val;
18831    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
18832    int n_writer;
18833    int pe; /* TRUE if this is a parameter entity, FALSE if not */
18834    int n_pe;
18835    const xmlChar * name; /* the name of the DTD entity */
18836    int n_name;
18837    const xmlChar * pubid; /* the public identifier, which is an alternative to the system identifier */
18838    int n_pubid;
18839    const xmlChar * sysid; /* the system identifier, which is the URI of the DTD */
18840    int n_sysid;
18841    const xmlChar * ndataid; /* the xml notation name. */
18842    int n_ndataid;
18843    const xmlChar * content; /* content of the entity */
18844    int n_content;
18845
18846    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
18847    for (n_pe = 0;n_pe < gen_nb_int;n_pe++) {
18848    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
18849    for (n_pubid = 0;n_pubid < gen_nb_const_xmlChar_ptr;n_pubid++) {
18850    for (n_sysid = 0;n_sysid < gen_nb_const_xmlChar_ptr;n_sysid++) {
18851    for (n_ndataid = 0;n_ndataid < gen_nb_const_xmlChar_ptr;n_ndataid++) {
18852    for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
18853        mem_base = xmlMemBlocks();
18854        writer = gen_xmlTextWriterPtr(n_writer);
18855        pe = gen_int(n_pe);
18856        name = gen_const_xmlChar_ptr(n_name);
18857        pubid = gen_const_xmlChar_ptr(n_pubid);
18858        sysid = gen_const_xmlChar_ptr(n_sysid);
18859        ndataid = gen_const_xmlChar_ptr(n_ndataid);
18860        content = gen_const_xmlChar_ptr(n_content);
18861
18862        ret_val = xmlTextWriterWriteDTDEntity(writer, pe, name, pubid, sysid, ndataid, content);
18863        desret_int(ret_val);
18864        call_tests++;
18865        des_xmlTextWriterPtr(n_writer, writer);
18866        des_int(n_pe, pe);
18867        des_const_xmlChar_ptr(n_name, name);
18868        des_const_xmlChar_ptr(n_pubid, pubid);
18869        des_const_xmlChar_ptr(n_sysid, sysid);
18870        des_const_xmlChar_ptr(n_ndataid, ndataid);
18871        des_const_xmlChar_ptr(n_content, content);
18872        xmlResetLastError();
18873        if (mem_base != xmlMemBlocks()) {
18874            printf("Leak of %d blocks found in xmlTextWriterWriteDTDEntity",
18875	           xmlMemBlocks() - mem_base);
18876	    ret++;
18877            printf(" %d", n_writer);
18878            printf(" %d", n_pe);
18879            printf(" %d", n_name);
18880            printf(" %d", n_pubid);
18881            printf(" %d", n_sysid);
18882            printf(" %d", n_ndataid);
18883            printf(" %d", n_content);
18884            printf("\n");
18885        }
18886    }
18887    }
18888    }
18889    }
18890    }
18891    }
18892    }
18893#endif
18894
18895    return(ret);
18896}
18897
18898
18899static int
18900test_xmlTextWriterWriteDTDExternalEntity(void) {
18901    int ret = 0;
18902
18903#ifdef LIBXML_WRITER_ENABLED
18904    int mem_base;
18905    int ret_val;
18906    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
18907    int n_writer;
18908    int pe; /* TRUE if this is a parameter entity, FALSE if not */
18909    int n_pe;
18910    const xmlChar * name; /* the name of the DTD entity */
18911    int n_name;
18912    const xmlChar * pubid; /* the public identifier, which is an alternative to the system identifier */
18913    int n_pubid;
18914    const xmlChar * sysid; /* the system identifier, which is the URI of the DTD */
18915    int n_sysid;
18916    const xmlChar * ndataid; /* the xml notation name. */
18917    int n_ndataid;
18918
18919    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
18920    for (n_pe = 0;n_pe < gen_nb_int;n_pe++) {
18921    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
18922    for (n_pubid = 0;n_pubid < gen_nb_const_xmlChar_ptr;n_pubid++) {
18923    for (n_sysid = 0;n_sysid < gen_nb_const_xmlChar_ptr;n_sysid++) {
18924    for (n_ndataid = 0;n_ndataid < gen_nb_const_xmlChar_ptr;n_ndataid++) {
18925        mem_base = xmlMemBlocks();
18926        writer = gen_xmlTextWriterPtr(n_writer);
18927        pe = gen_int(n_pe);
18928        name = gen_const_xmlChar_ptr(n_name);
18929        pubid = gen_const_xmlChar_ptr(n_pubid);
18930        sysid = gen_const_xmlChar_ptr(n_sysid);
18931        ndataid = gen_const_xmlChar_ptr(n_ndataid);
18932
18933        ret_val = xmlTextWriterWriteDTDExternalEntity(writer, pe, name, pubid, sysid, ndataid);
18934        desret_int(ret_val);
18935        call_tests++;
18936        des_xmlTextWriterPtr(n_writer, writer);
18937        des_int(n_pe, pe);
18938        des_const_xmlChar_ptr(n_name, name);
18939        des_const_xmlChar_ptr(n_pubid, pubid);
18940        des_const_xmlChar_ptr(n_sysid, sysid);
18941        des_const_xmlChar_ptr(n_ndataid, ndataid);
18942        xmlResetLastError();
18943        if (mem_base != xmlMemBlocks()) {
18944            printf("Leak of %d blocks found in xmlTextWriterWriteDTDExternalEntity",
18945	           xmlMemBlocks() - mem_base);
18946	    ret++;
18947            printf(" %d", n_writer);
18948            printf(" %d", n_pe);
18949            printf(" %d", n_name);
18950            printf(" %d", n_pubid);
18951            printf(" %d", n_sysid);
18952            printf(" %d", n_ndataid);
18953            printf("\n");
18954        }
18955    }
18956    }
18957    }
18958    }
18959    }
18960    }
18961#endif
18962
18963    return(ret);
18964}
18965
18966
18967static int
18968test_xmlTextWriterWriteDTDExternalEntityContents(void) {
18969    int ret = 0;
18970
18971#ifdef LIBXML_WRITER_ENABLED
18972    int mem_base;
18973    int ret_val;
18974    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
18975    int n_writer;
18976    const xmlChar * pubid; /* the public identifier, which is an alternative to the system identifier */
18977    int n_pubid;
18978    const xmlChar * sysid; /* the system identifier, which is the URI of the DTD */
18979    int n_sysid;
18980    const xmlChar * ndataid; /* the xml notation name. */
18981    int n_ndataid;
18982
18983    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
18984    for (n_pubid = 0;n_pubid < gen_nb_const_xmlChar_ptr;n_pubid++) {
18985    for (n_sysid = 0;n_sysid < gen_nb_const_xmlChar_ptr;n_sysid++) {
18986    for (n_ndataid = 0;n_ndataid < gen_nb_const_xmlChar_ptr;n_ndataid++) {
18987        mem_base = xmlMemBlocks();
18988        writer = gen_xmlTextWriterPtr(n_writer);
18989        pubid = gen_const_xmlChar_ptr(n_pubid);
18990        sysid = gen_const_xmlChar_ptr(n_sysid);
18991        ndataid = gen_const_xmlChar_ptr(n_ndataid);
18992
18993        ret_val = xmlTextWriterWriteDTDExternalEntityContents(writer, pubid, sysid, ndataid);
18994        desret_int(ret_val);
18995        call_tests++;
18996        des_xmlTextWriterPtr(n_writer, writer);
18997        des_const_xmlChar_ptr(n_pubid, pubid);
18998        des_const_xmlChar_ptr(n_sysid, sysid);
18999        des_const_xmlChar_ptr(n_ndataid, ndataid);
19000        xmlResetLastError();
19001        if (mem_base != xmlMemBlocks()) {
19002            printf("Leak of %d blocks found in xmlTextWriterWriteDTDExternalEntityContents",
19003	           xmlMemBlocks() - mem_base);
19004	    ret++;
19005            printf(" %d", n_writer);
19006            printf(" %d", n_pubid);
19007            printf(" %d", n_sysid);
19008            printf(" %d", n_ndataid);
19009            printf("\n");
19010        }
19011    }
19012    }
19013    }
19014    }
19015#endif
19016
19017    return(ret);
19018}
19019
19020
19021static int
19022test_xmlTextWriterWriteDTDInternalEntity(void) {
19023    int ret = 0;
19024
19025#ifdef LIBXML_WRITER_ENABLED
19026    int mem_base;
19027    int ret_val;
19028    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
19029    int n_writer;
19030    int pe; /* TRUE if this is a parameter entity, FALSE if not */
19031    int n_pe;
19032    const xmlChar * name; /* the name of the DTD entity */
19033    int n_name;
19034    const xmlChar * content; /* content of the entity */
19035    int n_content;
19036
19037    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
19038    for (n_pe = 0;n_pe < gen_nb_int;n_pe++) {
19039    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
19040    for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
19041        mem_base = xmlMemBlocks();
19042        writer = gen_xmlTextWriterPtr(n_writer);
19043        pe = gen_int(n_pe);
19044        name = gen_const_xmlChar_ptr(n_name);
19045        content = gen_const_xmlChar_ptr(n_content);
19046
19047        ret_val = xmlTextWriterWriteDTDInternalEntity(writer, pe, name, content);
19048        desret_int(ret_val);
19049        call_tests++;
19050        des_xmlTextWriterPtr(n_writer, writer);
19051        des_int(n_pe, pe);
19052        des_const_xmlChar_ptr(n_name, name);
19053        des_const_xmlChar_ptr(n_content, content);
19054        xmlResetLastError();
19055        if (mem_base != xmlMemBlocks()) {
19056            printf("Leak of %d blocks found in xmlTextWriterWriteDTDInternalEntity",
19057	           xmlMemBlocks() - mem_base);
19058	    ret++;
19059            printf(" %d", n_writer);
19060            printf(" %d", n_pe);
19061            printf(" %d", n_name);
19062            printf(" %d", n_content);
19063            printf("\n");
19064        }
19065    }
19066    }
19067    }
19068    }
19069#endif
19070
19071    return(ret);
19072}
19073
19074
19075static int
19076test_xmlTextWriterWriteDTDNotation(void) {
19077    int ret = 0;
19078
19079#ifdef LIBXML_WRITER_ENABLED
19080    int mem_base;
19081    int ret_val;
19082    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
19083    int n_writer;
19084    const xmlChar * name; /* the name of the xml notation */
19085    int n_name;
19086    const xmlChar * pubid; /* the public identifier, which is an alternative to the system identifier */
19087    int n_pubid;
19088    const xmlChar * sysid; /* the system identifier, which is the URI of the DTD */
19089    int n_sysid;
19090
19091    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
19092    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
19093    for (n_pubid = 0;n_pubid < gen_nb_const_xmlChar_ptr;n_pubid++) {
19094    for (n_sysid = 0;n_sysid < gen_nb_const_xmlChar_ptr;n_sysid++) {
19095        mem_base = xmlMemBlocks();
19096        writer = gen_xmlTextWriterPtr(n_writer);
19097        name = gen_const_xmlChar_ptr(n_name);
19098        pubid = gen_const_xmlChar_ptr(n_pubid);
19099        sysid = gen_const_xmlChar_ptr(n_sysid);
19100
19101        ret_val = xmlTextWriterWriteDTDNotation(writer, name, pubid, sysid);
19102        desret_int(ret_val);
19103        call_tests++;
19104        des_xmlTextWriterPtr(n_writer, writer);
19105        des_const_xmlChar_ptr(n_name, name);
19106        des_const_xmlChar_ptr(n_pubid, pubid);
19107        des_const_xmlChar_ptr(n_sysid, sysid);
19108        xmlResetLastError();
19109        if (mem_base != xmlMemBlocks()) {
19110            printf("Leak of %d blocks found in xmlTextWriterWriteDTDNotation",
19111	           xmlMemBlocks() - mem_base);
19112	    ret++;
19113            printf(" %d", n_writer);
19114            printf(" %d", n_name);
19115            printf(" %d", n_pubid);
19116            printf(" %d", n_sysid);
19117            printf("\n");
19118        }
19119    }
19120    }
19121    }
19122    }
19123#endif
19124
19125    return(ret);
19126}
19127
19128
19129static int
19130test_xmlTextWriterWriteElement(void) {
19131    int ret = 0;
19132
19133#ifdef LIBXML_WRITER_ENABLED
19134    int mem_base;
19135    int ret_val;
19136    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
19137    int n_writer;
19138    const xmlChar * name; /* element name */
19139    int n_name;
19140    const xmlChar * content; /* element content */
19141    int n_content;
19142
19143    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
19144    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
19145    for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
19146        mem_base = xmlMemBlocks();
19147        writer = gen_xmlTextWriterPtr(n_writer);
19148        name = gen_const_xmlChar_ptr(n_name);
19149        content = gen_const_xmlChar_ptr(n_content);
19150
19151        ret_val = xmlTextWriterWriteElement(writer, name, content);
19152        desret_int(ret_val);
19153        call_tests++;
19154        des_xmlTextWriterPtr(n_writer, writer);
19155        des_const_xmlChar_ptr(n_name, name);
19156        des_const_xmlChar_ptr(n_content, content);
19157        xmlResetLastError();
19158        if (mem_base != xmlMemBlocks()) {
19159            printf("Leak of %d blocks found in xmlTextWriterWriteElement",
19160	           xmlMemBlocks() - mem_base);
19161	    ret++;
19162            printf(" %d", n_writer);
19163            printf(" %d", n_name);
19164            printf(" %d", n_content);
19165            printf("\n");
19166        }
19167    }
19168    }
19169    }
19170#endif
19171
19172    return(ret);
19173}
19174
19175
19176static int
19177test_xmlTextWriterWriteElementNS(void) {
19178    int ret = 0;
19179
19180#ifdef LIBXML_WRITER_ENABLED
19181    int mem_base;
19182    int ret_val;
19183    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
19184    int n_writer;
19185    const xmlChar * prefix; /* namespace prefix */
19186    int n_prefix;
19187    const xmlChar * name; /* element local name */
19188    int n_name;
19189    const xmlChar * namespaceURI; /* namespace URI */
19190    int n_namespaceURI;
19191    const xmlChar * content; /* element content */
19192    int n_content;
19193
19194    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
19195    for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
19196    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
19197    for (n_namespaceURI = 0;n_namespaceURI < gen_nb_const_xmlChar_ptr;n_namespaceURI++) {
19198    for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
19199        mem_base = xmlMemBlocks();
19200        writer = gen_xmlTextWriterPtr(n_writer);
19201        prefix = gen_const_xmlChar_ptr(n_prefix);
19202        name = gen_const_xmlChar_ptr(n_name);
19203        namespaceURI = gen_const_xmlChar_ptr(n_namespaceURI);
19204        content = gen_const_xmlChar_ptr(n_content);
19205
19206        ret_val = xmlTextWriterWriteElementNS(writer, prefix, name, namespaceURI, content);
19207        desret_int(ret_val);
19208        call_tests++;
19209        des_xmlTextWriterPtr(n_writer, writer);
19210        des_const_xmlChar_ptr(n_prefix, prefix);
19211        des_const_xmlChar_ptr(n_name, name);
19212        des_const_xmlChar_ptr(n_namespaceURI, namespaceURI);
19213        des_const_xmlChar_ptr(n_content, content);
19214        xmlResetLastError();
19215        if (mem_base != xmlMemBlocks()) {
19216            printf("Leak of %d blocks found in xmlTextWriterWriteElementNS",
19217	           xmlMemBlocks() - mem_base);
19218	    ret++;
19219            printf(" %d", n_writer);
19220            printf(" %d", n_prefix);
19221            printf(" %d", n_name);
19222            printf(" %d", n_namespaceURI);
19223            printf(" %d", n_content);
19224            printf("\n");
19225        }
19226    }
19227    }
19228    }
19229    }
19230    }
19231#endif
19232
19233    return(ret);
19234}
19235
19236
19237static int
19238test_xmlTextWriterWriteFormatAttribute(void) {
19239    int ret = 0;
19240
19241
19242    /* missing type support */
19243    return(ret);
19244}
19245
19246
19247static int
19248test_xmlTextWriterWriteFormatAttributeNS(void) {
19249    int ret = 0;
19250
19251
19252    /* missing type support */
19253    return(ret);
19254}
19255
19256
19257static int
19258test_xmlTextWriterWriteFormatCDATA(void) {
19259    int ret = 0;
19260
19261
19262    /* missing type support */
19263    return(ret);
19264}
19265
19266
19267static int
19268test_xmlTextWriterWriteFormatComment(void) {
19269    int ret = 0;
19270
19271
19272    /* missing type support */
19273    return(ret);
19274}
19275
19276
19277static int
19278test_xmlTextWriterWriteFormatDTD(void) {
19279    int ret = 0;
19280
19281
19282    /* missing type support */
19283    return(ret);
19284}
19285
19286
19287static int
19288test_xmlTextWriterWriteFormatDTDAttlist(void) {
19289    int ret = 0;
19290
19291
19292    /* missing type support */
19293    return(ret);
19294}
19295
19296
19297static int
19298test_xmlTextWriterWriteFormatDTDElement(void) {
19299    int ret = 0;
19300
19301
19302    /* missing type support */
19303    return(ret);
19304}
19305
19306
19307static int
19308test_xmlTextWriterWriteFormatDTDInternalEntity(void) {
19309    int ret = 0;
19310
19311
19312    /* missing type support */
19313    return(ret);
19314}
19315
19316
19317static int
19318test_xmlTextWriterWriteFormatElement(void) {
19319    int ret = 0;
19320
19321
19322    /* missing type support */
19323    return(ret);
19324}
19325
19326
19327static int
19328test_xmlTextWriterWriteFormatElementNS(void) {
19329    int ret = 0;
19330
19331
19332    /* missing type support */
19333    return(ret);
19334}
19335
19336
19337static int
19338test_xmlTextWriterWriteFormatPI(void) {
19339    int ret = 0;
19340
19341
19342    /* missing type support */
19343    return(ret);
19344}
19345
19346
19347static int
19348test_xmlTextWriterWriteFormatRaw(void) {
19349    int ret = 0;
19350
19351
19352    /* missing type support */
19353    return(ret);
19354}
19355
19356
19357static int
19358test_xmlTextWriterWriteFormatString(void) {
19359    int ret = 0;
19360
19361
19362    /* missing type support */
19363    return(ret);
19364}
19365
19366
19367static int
19368test_xmlTextWriterWritePI(void) {
19369    int ret = 0;
19370
19371#ifdef LIBXML_WRITER_ENABLED
19372    int mem_base;
19373    int ret_val;
19374    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
19375    int n_writer;
19376    const xmlChar * target; /* PI target */
19377    int n_target;
19378    const xmlChar * content; /* PI content */
19379    int n_content;
19380
19381    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
19382    for (n_target = 0;n_target < gen_nb_const_xmlChar_ptr;n_target++) {
19383    for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
19384        mem_base = xmlMemBlocks();
19385        writer = gen_xmlTextWriterPtr(n_writer);
19386        target = gen_const_xmlChar_ptr(n_target);
19387        content = gen_const_xmlChar_ptr(n_content);
19388
19389        ret_val = xmlTextWriterWritePI(writer, target, content);
19390        desret_int(ret_val);
19391        call_tests++;
19392        des_xmlTextWriterPtr(n_writer, writer);
19393        des_const_xmlChar_ptr(n_target, target);
19394        des_const_xmlChar_ptr(n_content, content);
19395        xmlResetLastError();
19396        if (mem_base != xmlMemBlocks()) {
19397            printf("Leak of %d blocks found in xmlTextWriterWritePI",
19398	           xmlMemBlocks() - mem_base);
19399	    ret++;
19400            printf(" %d", n_writer);
19401            printf(" %d", n_target);
19402            printf(" %d", n_content);
19403            printf("\n");
19404        }
19405    }
19406    }
19407    }
19408#endif
19409
19410    return(ret);
19411}
19412
19413
19414static int
19415test_xmlTextWriterWriteRaw(void) {
19416    int ret = 0;
19417
19418#ifdef LIBXML_WRITER_ENABLED
19419    int mem_base;
19420    int ret_val;
19421    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
19422    int n_writer;
19423    const xmlChar * content; /* text string */
19424    int n_content;
19425
19426    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
19427    for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
19428        mem_base = xmlMemBlocks();
19429        writer = gen_xmlTextWriterPtr(n_writer);
19430        content = gen_const_xmlChar_ptr(n_content);
19431
19432        ret_val = xmlTextWriterWriteRaw(writer, content);
19433        desret_int(ret_val);
19434        call_tests++;
19435        des_xmlTextWriterPtr(n_writer, writer);
19436        des_const_xmlChar_ptr(n_content, content);
19437        xmlResetLastError();
19438        if (mem_base != xmlMemBlocks()) {
19439            printf("Leak of %d blocks found in xmlTextWriterWriteRaw",
19440	           xmlMemBlocks() - mem_base);
19441	    ret++;
19442            printf(" %d", n_writer);
19443            printf(" %d", n_content);
19444            printf("\n");
19445        }
19446    }
19447    }
19448#endif
19449
19450    return(ret);
19451}
19452
19453
19454static int
19455test_xmlTextWriterWriteRawLen(void) {
19456    int ret = 0;
19457
19458#ifdef LIBXML_WRITER_ENABLED
19459    int mem_base;
19460    int ret_val;
19461    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
19462    int n_writer;
19463    const xmlChar * content; /* text string */
19464    int n_content;
19465    int len; /* length of the text string */
19466    int n_len;
19467
19468    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
19469    for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
19470    for (n_len = 0;n_len < gen_nb_int;n_len++) {
19471        mem_base = xmlMemBlocks();
19472        writer = gen_xmlTextWriterPtr(n_writer);
19473        content = gen_const_xmlChar_ptr(n_content);
19474        len = gen_int(n_len);
19475
19476        ret_val = xmlTextWriterWriteRawLen(writer, content, len);
19477        desret_int(ret_val);
19478        call_tests++;
19479        des_xmlTextWriterPtr(n_writer, writer);
19480        des_const_xmlChar_ptr(n_content, content);
19481        des_int(n_len, len);
19482        xmlResetLastError();
19483        if (mem_base != xmlMemBlocks()) {
19484            printf("Leak of %d blocks found in xmlTextWriterWriteRawLen",
19485	           xmlMemBlocks() - mem_base);
19486	    ret++;
19487            printf(" %d", n_writer);
19488            printf(" %d", n_content);
19489            printf(" %d", n_len);
19490            printf("\n");
19491        }
19492    }
19493    }
19494    }
19495#endif
19496
19497    return(ret);
19498}
19499
19500
19501static int
19502test_xmlTextWriterWriteString(void) {
19503    int ret = 0;
19504
19505#ifdef LIBXML_WRITER_ENABLED
19506    int mem_base;
19507    int ret_val;
19508    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
19509    int n_writer;
19510    const xmlChar * content; /* text string */
19511    int n_content;
19512
19513    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
19514    for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
19515        mem_base = xmlMemBlocks();
19516        writer = gen_xmlTextWriterPtr(n_writer);
19517        content = gen_const_xmlChar_ptr(n_content);
19518
19519        ret_val = xmlTextWriterWriteString(writer, content);
19520        desret_int(ret_val);
19521        call_tests++;
19522        des_xmlTextWriterPtr(n_writer, writer);
19523        des_const_xmlChar_ptr(n_content, content);
19524        xmlResetLastError();
19525        if (mem_base != xmlMemBlocks()) {
19526            printf("Leak of %d blocks found in xmlTextWriterWriteString",
19527	           xmlMemBlocks() - mem_base);
19528	    ret++;
19529            printf(" %d", n_writer);
19530            printf(" %d", n_content);
19531            printf("\n");
19532        }
19533    }
19534    }
19535#endif
19536
19537    return(ret);
19538}
19539
19540
19541static int
19542test_xmlTextWriterWriteVFormatAttribute(void) {
19543    int ret = 0;
19544
19545
19546    /* missing type support */
19547    return(ret);
19548}
19549
19550
19551static int
19552test_xmlTextWriterWriteVFormatAttributeNS(void) {
19553    int ret = 0;
19554
19555
19556    /* missing type support */
19557    return(ret);
19558}
19559
19560
19561static int
19562test_xmlTextWriterWriteVFormatCDATA(void) {
19563    int ret = 0;
19564
19565
19566    /* missing type support */
19567    return(ret);
19568}
19569
19570
19571static int
19572test_xmlTextWriterWriteVFormatComment(void) {
19573    int ret = 0;
19574
19575
19576    /* missing type support */
19577    return(ret);
19578}
19579
19580
19581static int
19582test_xmlTextWriterWriteVFormatDTD(void) {
19583    int ret = 0;
19584
19585
19586    /* missing type support */
19587    return(ret);
19588}
19589
19590
19591static int
19592test_xmlTextWriterWriteVFormatDTDAttlist(void) {
19593    int ret = 0;
19594
19595
19596    /* missing type support */
19597    return(ret);
19598}
19599
19600
19601static int
19602test_xmlTextWriterWriteVFormatDTDElement(void) {
19603    int ret = 0;
19604
19605
19606    /* missing type support */
19607    return(ret);
19608}
19609
19610
19611static int
19612test_xmlTextWriterWriteVFormatDTDInternalEntity(void) {
19613    int ret = 0;
19614
19615
19616    /* missing type support */
19617    return(ret);
19618}
19619
19620
19621static int
19622test_xmlTextWriterWriteVFormatElement(void) {
19623    int ret = 0;
19624
19625
19626    /* missing type support */
19627    return(ret);
19628}
19629
19630
19631static int
19632test_xmlTextWriterWriteVFormatElementNS(void) {
19633    int ret = 0;
19634
19635
19636    /* missing type support */
19637    return(ret);
19638}
19639
19640
19641static int
19642test_xmlTextWriterWriteVFormatPI(void) {
19643    int ret = 0;
19644
19645
19646    /* missing type support */
19647    return(ret);
19648}
19649
19650
19651static int
19652test_xmlTextWriterWriteVFormatRaw(void) {
19653    int ret = 0;
19654
19655
19656    /* missing type support */
19657    return(ret);
19658}
19659
19660
19661static int
19662test_xmlTextWriterWriteVFormatString(void) {
19663    int ret = 0;
19664
19665
19666    /* missing type support */
19667    return(ret);
19668}
19669
19670static int
19671test_xmlwriter(void) {
19672    int ret = 0;
19673
19674    printf("Testing xmlwriter ...\n");
19675    ret += test_xmlNewTextWriter();
19676    ret += test_xmlNewTextWriterDoc();
19677    ret += test_xmlNewTextWriterFilename();
19678    ret += test_xmlNewTextWriterMemory();
19679    ret += test_xmlNewTextWriterPushParser();
19680    ret += test_xmlNewTextWriterTree();
19681    ret += test_xmlTextWriterEndAttribute();
19682    ret += test_xmlTextWriterEndCDATA();
19683    ret += test_xmlTextWriterEndComment();
19684    ret += test_xmlTextWriterEndDTD();
19685    ret += test_xmlTextWriterEndDTDAttlist();
19686    ret += test_xmlTextWriterEndDTDElement();
19687    ret += test_xmlTextWriterEndDTDEntity();
19688    ret += test_xmlTextWriterEndDocument();
19689    ret += test_xmlTextWriterEndElement();
19690    ret += test_xmlTextWriterEndPI();
19691    ret += test_xmlTextWriterFlush();
19692    ret += test_xmlTextWriterFullEndElement();
19693    ret += test_xmlTextWriterSetIndent();
19694    ret += test_xmlTextWriterSetIndentString();
19695    ret += test_xmlTextWriterStartAttribute();
19696    ret += test_xmlTextWriterStartAttributeNS();
19697    ret += test_xmlTextWriterStartCDATA();
19698    ret += test_xmlTextWriterStartComment();
19699    ret += test_xmlTextWriterStartDTD();
19700    ret += test_xmlTextWriterStartDTDAttlist();
19701    ret += test_xmlTextWriterStartDTDElement();
19702    ret += test_xmlTextWriterStartDTDEntity();
19703    ret += test_xmlTextWriterStartDocument();
19704    ret += test_xmlTextWriterStartElement();
19705    ret += test_xmlTextWriterStartElementNS();
19706    ret += test_xmlTextWriterStartPI();
19707    ret += test_xmlTextWriterWriteAttribute();
19708    ret += test_xmlTextWriterWriteAttributeNS();
19709    ret += test_xmlTextWriterWriteBase64();
19710    ret += test_xmlTextWriterWriteBinHex();
19711    ret += test_xmlTextWriterWriteCDATA();
19712    ret += test_xmlTextWriterWriteComment();
19713    ret += test_xmlTextWriterWriteDTD();
19714    ret += test_xmlTextWriterWriteDTDAttlist();
19715    ret += test_xmlTextWriterWriteDTDElement();
19716    ret += test_xmlTextWriterWriteDTDEntity();
19717    ret += test_xmlTextWriterWriteDTDExternalEntity();
19718    ret += test_xmlTextWriterWriteDTDExternalEntityContents();
19719    ret += test_xmlTextWriterWriteDTDInternalEntity();
19720    ret += test_xmlTextWriterWriteDTDNotation();
19721    ret += test_xmlTextWriterWriteElement();
19722    ret += test_xmlTextWriterWriteElementNS();
19723    ret += test_xmlTextWriterWriteFormatAttribute();
19724    ret += test_xmlTextWriterWriteFormatAttributeNS();
19725    ret += test_xmlTextWriterWriteFormatCDATA();
19726    ret += test_xmlTextWriterWriteFormatComment();
19727    ret += test_xmlTextWriterWriteFormatDTD();
19728    ret += test_xmlTextWriterWriteFormatDTDAttlist();
19729    ret += test_xmlTextWriterWriteFormatDTDElement();
19730    ret += test_xmlTextWriterWriteFormatDTDInternalEntity();
19731    ret += test_xmlTextWriterWriteFormatElement();
19732    ret += test_xmlTextWriterWriteFormatElementNS();
19733    ret += test_xmlTextWriterWriteFormatPI();
19734    ret += test_xmlTextWriterWriteFormatRaw();
19735    ret += test_xmlTextWriterWriteFormatString();
19736    ret += test_xmlTextWriterWritePI();
19737    ret += test_xmlTextWriterWriteRaw();
19738    ret += test_xmlTextWriterWriteRawLen();
19739    ret += test_xmlTextWriterWriteString();
19740    ret += test_xmlTextWriterWriteVFormatAttribute();
19741    ret += test_xmlTextWriterWriteVFormatAttributeNS();
19742    ret += test_xmlTextWriterWriteVFormatCDATA();
19743    ret += test_xmlTextWriterWriteVFormatComment();
19744    ret += test_xmlTextWriterWriteVFormatDTD();
19745    ret += test_xmlTextWriterWriteVFormatDTDAttlist();
19746    ret += test_xmlTextWriterWriteVFormatDTDElement();
19747    ret += test_xmlTextWriterWriteVFormatDTDInternalEntity();
19748    ret += test_xmlTextWriterWriteVFormatElement();
19749    ret += test_xmlTextWriterWriteVFormatElementNS();
19750    ret += test_xmlTextWriterWriteVFormatPI();
19751    ret += test_xmlTextWriterWriteVFormatRaw();
19752    ret += test_xmlTextWriterWriteVFormatString();
19753
19754    if (ret != 0)
19755	printf("Module xmlwriter: %d errors\n", ret);
19756    return(ret);
19757}
19758
19759static int
19760test_xmlXPathCastBooleanToNumber(void) {
19761    int ret = 0;
19762
19763
19764    /* missing type support */
19765    return(ret);
19766}
19767
19768
19769static int
19770test_xmlXPathCastBooleanToString(void) {
19771    int ret = 0;
19772
19773#ifdef LIBXML_XPATH_ENABLED
19774    int mem_base;
19775    xmlChar * ret_val;
19776    int val; /* a boolean */
19777    int n_val;
19778
19779    for (n_val = 0;n_val < gen_nb_int;n_val++) {
19780        mem_base = xmlMemBlocks();
19781        val = gen_int(n_val);
19782
19783        ret_val = xmlXPathCastBooleanToString(val);
19784        desret_xmlChar_ptr(ret_val);
19785        call_tests++;
19786        des_int(n_val, val);
19787        xmlResetLastError();
19788        if (mem_base != xmlMemBlocks()) {
19789            printf("Leak of %d blocks found in xmlXPathCastBooleanToString",
19790	           xmlMemBlocks() - mem_base);
19791	    ret++;
19792            printf(" %d", n_val);
19793            printf("\n");
19794        }
19795    }
19796#endif
19797
19798    return(ret);
19799}
19800
19801
19802static int
19803test_xmlXPathCastNodeSetToBoolean(void) {
19804    int ret = 0;
19805
19806
19807    /* missing type support */
19808    return(ret);
19809}
19810
19811
19812static int
19813test_xmlXPathCastNodeSetToNumber(void) {
19814    int ret = 0;
19815
19816
19817    /* missing type support */
19818    return(ret);
19819}
19820
19821
19822static int
19823test_xmlXPathCastNodeSetToString(void) {
19824    int ret = 0;
19825
19826
19827    /* missing type support */
19828    return(ret);
19829}
19830
19831
19832static int
19833test_xmlXPathCastNodeToNumber(void) {
19834    int ret = 0;
19835
19836
19837    /* missing type support */
19838    return(ret);
19839}
19840
19841
19842static int
19843test_xmlXPathCastNodeToString(void) {
19844    int ret = 0;
19845
19846#ifdef LIBXML_XPATH_ENABLED
19847    int mem_base;
19848    xmlChar * ret_val;
19849    xmlNodePtr node; /* a node */
19850    int n_node;
19851
19852    for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
19853        mem_base = xmlMemBlocks();
19854        node = gen_xmlNodePtr(n_node);
19855
19856        ret_val = xmlXPathCastNodeToString(node);
19857        desret_xmlChar_ptr(ret_val);
19858        call_tests++;
19859        des_xmlNodePtr(n_node, node);
19860        xmlResetLastError();
19861        if (mem_base != xmlMemBlocks()) {
19862            printf("Leak of %d blocks found in xmlXPathCastNodeToString",
19863	           xmlMemBlocks() - mem_base);
19864	    ret++;
19865            printf(" %d", n_node);
19866            printf("\n");
19867        }
19868    }
19869#endif
19870
19871    return(ret);
19872}
19873
19874
19875static int
19876test_xmlXPathCastNumberToBoolean(void) {
19877    int ret = 0;
19878
19879
19880    /* missing type support */
19881    return(ret);
19882}
19883
19884
19885static int
19886test_xmlXPathCastNumberToString(void) {
19887    int ret = 0;
19888
19889
19890    /* missing type support */
19891    return(ret);
19892}
19893
19894
19895static int
19896test_xmlXPathCastStringToBoolean(void) {
19897    int ret = 0;
19898
19899#ifdef LIBXML_XPATH_ENABLED
19900    int mem_base;
19901    int ret_val;
19902    const xmlChar * val; /* a string */
19903    int n_val;
19904
19905    for (n_val = 0;n_val < gen_nb_const_xmlChar_ptr;n_val++) {
19906        mem_base = xmlMemBlocks();
19907        val = gen_const_xmlChar_ptr(n_val);
19908
19909        ret_val = xmlXPathCastStringToBoolean(val);
19910        desret_int(ret_val);
19911        call_tests++;
19912        des_const_xmlChar_ptr(n_val, val);
19913        xmlResetLastError();
19914        if (mem_base != xmlMemBlocks()) {
19915            printf("Leak of %d blocks found in xmlXPathCastStringToBoolean",
19916	           xmlMemBlocks() - mem_base);
19917	    ret++;
19918            printf(" %d", n_val);
19919            printf("\n");
19920        }
19921    }
19922#endif
19923
19924    return(ret);
19925}
19926
19927
19928static int
19929test_xmlXPathCastStringToNumber(void) {
19930    int ret = 0;
19931
19932
19933    /* missing type support */
19934    return(ret);
19935}
19936
19937
19938static int
19939test_xmlXPathCastToBoolean(void) {
19940    int ret = 0;
19941
19942#ifdef LIBXML_XPATH_ENABLED
19943    int mem_base;
19944    int ret_val;
19945    xmlXPathObjectPtr val; /* an XPath object */
19946    int n_val;
19947
19948    for (n_val = 0;n_val < gen_nb_xmlXPathObjectPtr;n_val++) {
19949        mem_base = xmlMemBlocks();
19950        val = gen_xmlXPathObjectPtr(n_val);
19951
19952        ret_val = xmlXPathCastToBoolean(val);
19953        desret_int(ret_val);
19954        call_tests++;
19955        des_xmlXPathObjectPtr(n_val, val);
19956        xmlResetLastError();
19957        if (mem_base != xmlMemBlocks()) {
19958            printf("Leak of %d blocks found in xmlXPathCastToBoolean",
19959	           xmlMemBlocks() - mem_base);
19960	    ret++;
19961            printf(" %d", n_val);
19962            printf("\n");
19963        }
19964    }
19965#endif
19966
19967    return(ret);
19968}
19969
19970
19971static int
19972test_xmlXPathCastToNumber(void) {
19973    int ret = 0;
19974
19975
19976    /* missing type support */
19977    return(ret);
19978}
19979
19980
19981static int
19982test_xmlXPathCastToString(void) {
19983    int ret = 0;
19984
19985#ifdef LIBXML_XPATH_ENABLED
19986    int mem_base;
19987    xmlChar * ret_val;
19988    xmlXPathObjectPtr val; /* an XPath object */
19989    int n_val;
19990
19991    for (n_val = 0;n_val < gen_nb_xmlXPathObjectPtr;n_val++) {
19992        mem_base = xmlMemBlocks();
19993        val = gen_xmlXPathObjectPtr(n_val);
19994
19995        ret_val = xmlXPathCastToString(val);
19996        desret_xmlChar_ptr(ret_val);
19997        call_tests++;
19998        des_xmlXPathObjectPtr(n_val, val);
19999        xmlResetLastError();
20000        if (mem_base != xmlMemBlocks()) {
20001            printf("Leak of %d blocks found in xmlXPathCastToString",
20002	           xmlMemBlocks() - mem_base);
20003	    ret++;
20004            printf(" %d", n_val);
20005            printf("\n");
20006        }
20007    }
20008#endif
20009
20010    return(ret);
20011}
20012
20013
20014static int
20015test_xmlXPathCmpNodes(void) {
20016    int ret = 0;
20017
20018#ifdef LIBXML_XPATH_ENABLED
20019    int mem_base;
20020    int ret_val;
20021    xmlNodePtr node1; /* the first node */
20022    int n_node1;
20023    xmlNodePtr node2; /* the second node */
20024    int n_node2;
20025
20026    for (n_node1 = 0;n_node1 < gen_nb_xmlNodePtr;n_node1++) {
20027    for (n_node2 = 0;n_node2 < gen_nb_xmlNodePtr;n_node2++) {
20028        mem_base = xmlMemBlocks();
20029        node1 = gen_xmlNodePtr(n_node1);
20030        node2 = gen_xmlNodePtr(n_node2);
20031
20032        ret_val = xmlXPathCmpNodes(node1, node2);
20033        desret_int(ret_val);
20034        call_tests++;
20035        des_xmlNodePtr(n_node1, node1);
20036        des_xmlNodePtr(n_node2, node2);
20037        xmlResetLastError();
20038        if (mem_base != xmlMemBlocks()) {
20039            printf("Leak of %d blocks found in xmlXPathCmpNodes",
20040	           xmlMemBlocks() - mem_base);
20041	    ret++;
20042            printf(" %d", n_node1);
20043            printf(" %d", n_node2);
20044            printf("\n");
20045        }
20046    }
20047    }
20048#endif
20049
20050    return(ret);
20051}
20052
20053
20054static int
20055test_xmlXPathCompile(void) {
20056    int ret = 0;
20057
20058
20059    /* missing type support */
20060    return(ret);
20061}
20062
20063
20064static int
20065test_xmlXPathCompiledEval(void) {
20066    int ret = 0;
20067
20068
20069    /* missing type support */
20070    return(ret);
20071}
20072
20073
20074static int
20075test_xmlXPathConvertBoolean(void) {
20076    int ret = 0;
20077
20078
20079    /* missing type support */
20080    return(ret);
20081}
20082
20083
20084static int
20085test_xmlXPathConvertNumber(void) {
20086    int ret = 0;
20087
20088
20089    /* missing type support */
20090    return(ret);
20091}
20092
20093
20094static int
20095test_xmlXPathConvertString(void) {
20096    int ret = 0;
20097
20098
20099    /* missing type support */
20100    return(ret);
20101}
20102
20103
20104static int
20105test_xmlXPathCtxtCompile(void) {
20106    int ret = 0;
20107
20108
20109    /* missing type support */
20110    return(ret);
20111}
20112
20113
20114static int
20115test_xmlXPathEval(void) {
20116    int ret = 0;
20117
20118
20119    /* missing type support */
20120    return(ret);
20121}
20122
20123
20124static int
20125test_xmlXPathEvalExpression(void) {
20126    int ret = 0;
20127
20128
20129    /* missing type support */
20130    return(ret);
20131}
20132
20133
20134static int
20135test_xmlXPathEvalPredicate(void) {
20136    int ret = 0;
20137
20138
20139    /* missing type support */
20140    return(ret);
20141}
20142
20143
20144static int
20145test_xmlXPathInit(void) {
20146    int ret = 0;
20147
20148#ifdef LIBXML_XPATH_ENABLED
20149    int mem_base;
20150
20151        mem_base = xmlMemBlocks();
20152
20153        xmlXPathInit();
20154        call_tests++;
20155        xmlResetLastError();
20156        if (mem_base != xmlMemBlocks()) {
20157            printf("Leak of %d blocks found in xmlXPathInit",
20158	           xmlMemBlocks() - mem_base);
20159	    ret++;
20160            printf("\n");
20161        }
20162#endif
20163
20164    return(ret);
20165}
20166
20167
20168static int
20169test_xmlXPathIsInf(void) {
20170    int ret = 0;
20171
20172
20173    /* missing type support */
20174    return(ret);
20175}
20176
20177
20178static int
20179test_xmlXPathIsNaN(void) {
20180    int ret = 0;
20181
20182
20183    /* missing type support */
20184    return(ret);
20185}
20186
20187
20188static int
20189test_xmlXPathNewContext(void) {
20190    int ret = 0;
20191
20192
20193    /* missing type support */
20194    return(ret);
20195}
20196
20197
20198static int
20199test_xmlXPathNodeSetCreate(void) {
20200    int ret = 0;
20201
20202
20203    /* missing type support */
20204    return(ret);
20205}
20206
20207
20208static int
20209test_xmlXPathObjectCopy(void) {
20210    int ret = 0;
20211
20212
20213    /* missing type support */
20214    return(ret);
20215}
20216
20217
20218static int
20219test_xmlXPathOrderDocElems(void) {
20220    int ret = 0;
20221
20222
20223    /* missing type support */
20224    return(ret);
20225}
20226
20227static int
20228test_xpath(void) {
20229    int ret = 0;
20230
20231    printf("Testing xpath ...\n");
20232    ret += test_xmlXPathCastBooleanToNumber();
20233    ret += test_xmlXPathCastBooleanToString();
20234    ret += test_xmlXPathCastNodeSetToBoolean();
20235    ret += test_xmlXPathCastNodeSetToNumber();
20236    ret += test_xmlXPathCastNodeSetToString();
20237    ret += test_xmlXPathCastNodeToNumber();
20238    ret += test_xmlXPathCastNodeToString();
20239    ret += test_xmlXPathCastNumberToBoolean();
20240    ret += test_xmlXPathCastNumberToString();
20241    ret += test_xmlXPathCastStringToBoolean();
20242    ret += test_xmlXPathCastStringToNumber();
20243    ret += test_xmlXPathCastToBoolean();
20244    ret += test_xmlXPathCastToNumber();
20245    ret += test_xmlXPathCastToString();
20246    ret += test_xmlXPathCmpNodes();
20247    ret += test_xmlXPathCompile();
20248    ret += test_xmlXPathCompiledEval();
20249    ret += test_xmlXPathConvertBoolean();
20250    ret += test_xmlXPathConvertNumber();
20251    ret += test_xmlXPathConvertString();
20252    ret += test_xmlXPathCtxtCompile();
20253    ret += test_xmlXPathEval();
20254    ret += test_xmlXPathEvalExpression();
20255    ret += test_xmlXPathEvalPredicate();
20256    ret += test_xmlXPathInit();
20257    ret += test_xmlXPathIsInf();
20258    ret += test_xmlXPathIsNaN();
20259    ret += test_xmlXPathNewContext();
20260    ret += test_xmlXPathNodeSetCreate();
20261    ret += test_xmlXPathObjectCopy();
20262    ret += test_xmlXPathOrderDocElems();
20263
20264    if (ret != 0)
20265	printf("Module xpath: %d errors\n", ret);
20266    return(ret);
20267}
20268
20269static int
20270test_xmlXPtrBuildNodeList(void) {
20271    int ret = 0;
20272
20273#ifdef LIBXML_XPTR_ENABLED
20274    int mem_base;
20275    xmlNodePtr ret_val;
20276    xmlXPathObjectPtr obj; /* the XPointer result from the evaluation. */
20277    int n_obj;
20278
20279    for (n_obj = 0;n_obj < gen_nb_xmlXPathObjectPtr;n_obj++) {
20280        mem_base = xmlMemBlocks();
20281        obj = gen_xmlXPathObjectPtr(n_obj);
20282
20283        ret_val = xmlXPtrBuildNodeList(obj);
20284        desret_xmlNodePtr(ret_val);
20285        call_tests++;
20286        des_xmlXPathObjectPtr(n_obj, obj);
20287        xmlResetLastError();
20288        if (mem_base != xmlMemBlocks()) {
20289            printf("Leak of %d blocks found in xmlXPtrBuildNodeList",
20290	           xmlMemBlocks() - mem_base);
20291	    ret++;
20292            printf(" %d", n_obj);
20293            printf("\n");
20294        }
20295    }
20296#endif
20297
20298    return(ret);
20299}
20300
20301
20302static int
20303test_xmlXPtrEval(void) {
20304    int ret = 0;
20305
20306
20307    /* missing type support */
20308    return(ret);
20309}
20310
20311
20312static int
20313test_xmlXPtrEvalRangePredicate(void) {
20314    int ret = 0;
20315
20316
20317    /* missing type support */
20318    return(ret);
20319}
20320
20321
20322static int
20323test_xmlXPtrLocationSetAdd(void) {
20324    int ret = 0;
20325
20326
20327    /* missing type support */
20328    return(ret);
20329}
20330
20331
20332static int
20333test_xmlXPtrLocationSetCreate(void) {
20334    int ret = 0;
20335
20336
20337    /* missing type support */
20338    return(ret);
20339}
20340
20341
20342static int
20343test_xmlXPtrLocationSetDel(void) {
20344    int ret = 0;
20345
20346
20347    /* missing type support */
20348    return(ret);
20349}
20350
20351
20352static int
20353test_xmlXPtrLocationSetMerge(void) {
20354    int ret = 0;
20355
20356
20357    /* missing type support */
20358    return(ret);
20359}
20360
20361
20362static int
20363test_xmlXPtrLocationSetRemove(void) {
20364    int ret = 0;
20365
20366
20367    /* missing type support */
20368    return(ret);
20369}
20370
20371
20372static int
20373test_xmlXPtrNewCollapsedRange(void) {
20374    int ret = 0;
20375
20376
20377    /* missing type support */
20378    return(ret);
20379}
20380
20381
20382static int
20383test_xmlXPtrNewContext(void) {
20384    int ret = 0;
20385
20386
20387    /* missing type support */
20388    return(ret);
20389}
20390
20391
20392static int
20393test_xmlXPtrNewLocationSetNodeSet(void) {
20394    int ret = 0;
20395
20396
20397    /* missing type support */
20398    return(ret);
20399}
20400
20401
20402static int
20403test_xmlXPtrNewLocationSetNodes(void) {
20404    int ret = 0;
20405
20406
20407    /* missing type support */
20408    return(ret);
20409}
20410
20411
20412static int
20413test_xmlXPtrNewRange(void) {
20414    int ret = 0;
20415
20416
20417    /* missing type support */
20418    return(ret);
20419}
20420
20421
20422static int
20423test_xmlXPtrNewRangeNodeObject(void) {
20424    int ret = 0;
20425
20426
20427    /* missing type support */
20428    return(ret);
20429}
20430
20431
20432static int
20433test_xmlXPtrNewRangeNodePoint(void) {
20434    int ret = 0;
20435
20436
20437    /* missing type support */
20438    return(ret);
20439}
20440
20441
20442static int
20443test_xmlXPtrNewRangeNodes(void) {
20444    int ret = 0;
20445
20446
20447    /* missing type support */
20448    return(ret);
20449}
20450
20451
20452static int
20453test_xmlXPtrNewRangePointNode(void) {
20454    int ret = 0;
20455
20456
20457    /* missing type support */
20458    return(ret);
20459}
20460
20461
20462static int
20463test_xmlXPtrNewRangePoints(void) {
20464    int ret = 0;
20465
20466
20467    /* missing type support */
20468    return(ret);
20469}
20470
20471
20472static int
20473test_xmlXPtrRangeToFunction(void) {
20474    int ret = 0;
20475
20476
20477    /* missing type support */
20478    return(ret);
20479}
20480
20481
20482static int
20483test_xmlXPtrWrapLocationSet(void) {
20484    int ret = 0;
20485
20486
20487    /* missing type support */
20488    return(ret);
20489}
20490
20491static int
20492test_xpointer(void) {
20493    int ret = 0;
20494
20495    printf("Testing xpointer ...\n");
20496    ret += test_xmlXPtrBuildNodeList();
20497    ret += test_xmlXPtrEval();
20498    ret += test_xmlXPtrEvalRangePredicate();
20499    ret += test_xmlXPtrLocationSetAdd();
20500    ret += test_xmlXPtrLocationSetCreate();
20501    ret += test_xmlXPtrLocationSetDel();
20502    ret += test_xmlXPtrLocationSetMerge();
20503    ret += test_xmlXPtrLocationSetRemove();
20504    ret += test_xmlXPtrNewCollapsedRange();
20505    ret += test_xmlXPtrNewContext();
20506    ret += test_xmlXPtrNewLocationSetNodeSet();
20507    ret += test_xmlXPtrNewLocationSetNodes();
20508    ret += test_xmlXPtrNewRange();
20509    ret += test_xmlXPtrNewRangeNodeObject();
20510    ret += test_xmlXPtrNewRangeNodePoint();
20511    ret += test_xmlXPtrNewRangeNodes();
20512    ret += test_xmlXPtrNewRangePointNode();
20513    ret += test_xmlXPtrNewRangePoints();
20514    ret += test_xmlXPtrRangeToFunction();
20515    ret += test_xmlXPtrWrapLocationSet();
20516
20517    if (ret != 0)
20518	printf("Module xpointer: %d errors\n", ret);
20519    return(ret);
20520}
20521