* daniel@veillard.com
*/
-#ifdef HAVE_CONFIG_H
#include "libxml.h"
-#else
#include <stdio.h>
-#endif
#include <stdlib.h> /* for putenv() */
#include <string.h>
#include <libxml/xmlerror.h>
#include <libxml/relaxng.h>
-#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__)
-#define snprintf _snprintf
-#endif
static int testlibxml2(void);
static int test_module(const char *module);
if ((api_root == NULL) || (api_root->type != XML_ELEMENT_NODE)) {
get_api_root();
}
- if (api_root == NULL)
+ if (api_root == NULL)
return(NULL);
if (api_root->properties != NULL) {
api_attr = api_root->properties;
int ret;
int blocks, mem;
+#ifdef HAVE_PUTENV
/* access to the proxy can slow up regression tests a lot */
putenv((char *) "http_proxy=");
+#endif
memset(chartab, 0, sizeof(chartab));
strncpy((char *) chartab, " chartab\n", 20);
#include <libxml/xpointer.h>
#include <libxml/debugXML.h>
-/*
+/*
We manually define xmlErrMemory because it's normal declaration
is "hidden" by #ifdef IN_LIBXML
*/
static xmlChar gen_xmlChar(int no, int nr ATTRIBUTE_UNUSED) {
if (no == 0) return('a');
if (no == 1) return(' ');
- if (no == 2) return((xmlChar) 'ø');
+ if (no == 2) return((xmlChar) '\xf8');
return(0);
}
static xmlChar *gen_const_xmlChar_ptr(int no, int nr ATTRIBUTE_UNUSED) {
if (no == 0) return((xmlChar *) "foo");
if (no == 1) return((xmlChar *) "<foo/>");
- if (no == 2) return((xmlChar *) "nøne");
+ if (no == 2) return((xmlChar *) "n" "\xf8" "ne");
if (no == 3) return((xmlChar *) " 2ab ");
return(NULL);
}
#define gen_nb_xmlDtdPtr 3
static xmlDtdPtr gen_xmlDtdPtr(int no, int nr ATTRIBUTE_UNUSED) {
- if (no == 0)
+ if (no == 0)
return(xmlNewDtd(NULL, BAD_CAST "dtd", BAD_CAST"foo", BAD_CAST"bar"));
if (no == 1) return(get_api_dtd());
return(NULL);
#endif /* LIBXML_SCHEMAS_ENABLED */
#define gen_nb_xmlHashDeallocator 2
-static void
+static void
test_xmlHashDeallocator(void *payload ATTRIBUTE_UNUSED, xmlChar *name ATTRIBUTE_UNUSED) {
}
#define gen_nb_xmlBufferAllocationScheme 4
static xmlBufferAllocationScheme gen_xmlBufferAllocationScheme(int no, int nr ATTRIBUTE_UNUSED) {
- if (no == 1) return(XML_BUFFER_ALLOC_DOUBLEIT);
- if (no == 2) return(XML_BUFFER_ALLOC_EXACT);
- if (no == 3) return(XML_BUFFER_ALLOC_HYBRID);
- if (no == 4) return(XML_BUFFER_ALLOC_IMMUTABLE);
+ if (no == 1) return(XML_BUFFER_ALLOC_BOUNDED);
+ if (no == 2) return(XML_BUFFER_ALLOC_DOUBLEIT);
+ if (no == 3) return(XML_BUFFER_ALLOC_EXACT);
+ if (no == 4) return(XML_BUFFER_ALLOC_HYBRID);
return(0);
}
mem_base = xmlMemBlocks();
buffer = gen_const_char_ptr(n_buffer, 0);
size = gen_int(n_size, 1);
+ if ((buffer != NULL) &&
+ (size > (int) strlen((const char *) buffer) + 1))
+ continue;
ret_val = htmlCreateMemoryParserCtxt((const char *)buffer, size);
desret_htmlParserCtxtPtr(ret_val);
size = gen_int(n_size, 3);
filename = gen_fileoutput(n_filename, 4);
enc = gen_xmlCharEncoding(n_enc, 5);
+ if ((chunk != NULL) &&
+ (size > (int) strlen((const char *) chunk) + 1))
+ continue;
ret_val = htmlCreatePushParserCtxt(sax, user_data, (const char *)chunk, size, filename, enc);
desret_htmlParserCtxtPtr(ret_val);
URL = gen_filepath(n_URL, 3);
encoding = gen_const_char_ptr(n_encoding, 4);
options = gen_int(n_options, 5);
+ if ((buffer != NULL) &&
+ (size > (int) strlen((const char *) buffer) + 1))
+ continue;
ret_val = htmlCtxtReadMemory(ctxt, (const char *)buffer, size, URL, (const char *)encoding, options);
desret_htmlDocPtr(ret_val);
chunk = gen_const_char_ptr(n_chunk, 1);
size = gen_int(n_size, 2);
terminate = gen_int(n_terminate, 3);
+ if ((chunk != NULL) &&
+ (size > (int) strlen((const char *) chunk) + 1))
+ continue;
ret_val = htmlParseChunk(ctxt, (const char *)chunk, size, terminate);
if (ctxt != NULL) {xmlFreeDoc(ctxt->myDoc); ctxt->myDoc = NULL;}
char * encoding; /* a free form C string describing the HTML document encoding, or NULL */
int n_encoding;
- for (n_cur = 0;n_cur < gen_nb_xmlChar_ptr;n_cur++) {
+ for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
mem_base = xmlMemBlocks();
- cur = gen_xmlChar_ptr(n_cur, 0);
+ cur = gen_const_xmlChar_ptr(n_cur, 0);
encoding = gen_const_char_ptr(n_encoding, 1);
- ret_val = htmlParseDoc(cur, (const char *)encoding);
+ ret_val = htmlParseDoc((const xmlChar *)cur, (const char *)encoding);
desret_htmlDocPtr(ret_val);
call_tests++;
- des_xmlChar_ptr(n_cur, cur, 0);
+ des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 0);
des_const_char_ptr(n_encoding, (const char *)encoding, 1);
xmlResetLastError();
if (mem_base != xmlMemBlocks()) {
URL = gen_filepath(n_URL, 2);
encoding = gen_const_char_ptr(n_encoding, 3);
options = gen_int(n_options, 4);
+ if ((buffer != NULL) &&
+ (size > (int) strlen((const char *) buffer) + 1))
+ continue;
ret_val = htmlReadMemory((const char *)buffer, size, URL, (const char *)encoding, options);
desret_htmlDocPtr(ret_val);
void * userData; /* if using SAX, this pointer will be provided on callbacks. */
int n_userData;
- for (n_cur = 0;n_cur < gen_nb_xmlChar_ptr;n_cur++) {
+ for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
for (n_sax = 0;n_sax < gen_nb_htmlSAXHandlerPtr;n_sax++) {
for (n_userData = 0;n_userData < gen_nb_userdata;n_userData++) {
mem_base = xmlMemBlocks();
- cur = gen_xmlChar_ptr(n_cur, 0);
+ cur = gen_const_xmlChar_ptr(n_cur, 0);
encoding = gen_const_char_ptr(n_encoding, 1);
sax = gen_htmlSAXHandlerPtr(n_sax, 2);
userData = gen_userdata(n_userData, 3);
- ret_val = htmlSAXParseDoc(cur, (const char *)encoding, sax, userData);
+ ret_val = htmlSAXParseDoc((const xmlChar *)cur, (const char *)encoding, sax, userData);
desret_htmlDocPtr(ret_val);
call_tests++;
- des_xmlChar_ptr(n_cur, cur, 0);
+ des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 0);
des_const_char_ptr(n_encoding, (const char *)encoding, 1);
des_htmlSAXHandlerPtr(n_sax, sax, 2);
des_userdata(n_userData, userData, 3);
static int
test_HTMLparser(void) {
int test_ret = 0;
+ int rc = 0;
if (quiet == 0) printf("Testing HTMLparser : 32 of 38 functions ...\n");
- test_ret += test_UTF8ToHtml();
- test_ret += test_htmlAttrAllowed();
- test_ret += test_htmlAutoCloseTag();
- test_ret += test_htmlCreateMemoryParserCtxt();
- test_ret += test_htmlCreatePushParserCtxt();
- test_ret += test_htmlCtxtReadDoc();
- test_ret += test_htmlCtxtReadFile();
- test_ret += test_htmlCtxtReadMemory();
- test_ret += test_htmlCtxtReset();
- test_ret += test_htmlCtxtUseOptions();
- test_ret += test_htmlElementAllowedHere();
- test_ret += test_htmlElementStatusHere();
- test_ret += test_htmlEncodeEntities();
- test_ret += test_htmlEntityLookup();
- test_ret += test_htmlEntityValueLookup();
- test_ret += test_htmlHandleOmittedElem();
- test_ret += test_htmlIsAutoClosed();
- test_ret += test_htmlIsScriptAttribute();
- test_ret += test_htmlNewParserCtxt();
- test_ret += test_htmlNodeStatus();
- test_ret += test_htmlParseCharRef();
- test_ret += test_htmlParseChunk();
- test_ret += test_htmlParseDoc();
- test_ret += test_htmlParseDocument();
- test_ret += test_htmlParseElement();
- test_ret += test_htmlParseEntityRef();
- test_ret += test_htmlParseFile();
- test_ret += test_htmlReadDoc();
- test_ret += test_htmlReadFile();
- test_ret += test_htmlReadMemory();
- test_ret += test_htmlSAXParseDoc();
- test_ret += test_htmlSAXParseFile();
- test_ret += test_htmlTagLookup();
+ rc = test_UTF8ToHtml();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlAttrAllowed();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlAutoCloseTag();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlCreateMemoryParserCtxt();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlCreatePushParserCtxt();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlCtxtReadDoc();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlCtxtReadFile();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlCtxtReadMemory();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlCtxtReset();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlCtxtUseOptions();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlElementAllowedHere();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlElementStatusHere();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlEncodeEntities();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlEntityLookup();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlEntityValueLookup();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlHandleOmittedElem();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlIsAutoClosed();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlIsScriptAttribute();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlNewParserCtxt();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlNodeStatus();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlParseCharRef();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlParseChunk();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlParseDoc();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlParseDocument();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlParseElement();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlParseEntityRef();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlParseFile();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlReadDoc();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlReadFile();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlReadMemory();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlSAXParseDoc();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlSAXParseFile();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlTagLookup();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
if (test_ret != 0)
printf("Module HTMLparser: %d errors\n", test_ret);
static int
test_HTMLtree(void) {
int test_ret = 0;
+ int rc = 0;
if (quiet == 0) printf("Testing HTMLtree : 18 of 18 functions ...\n");
- test_ret += test_htmlDocContentDumpFormatOutput();
- test_ret += test_htmlDocContentDumpOutput();
- test_ret += test_htmlDocDump();
- test_ret += test_htmlDocDumpMemory();
- test_ret += test_htmlDocDumpMemoryFormat();
- test_ret += test_htmlGetMetaEncoding();
- test_ret += test_htmlIsBooleanAttr();
- test_ret += test_htmlNewDoc();
- test_ret += test_htmlNewDocNoDtD();
- test_ret += test_htmlNodeDump();
- test_ret += test_htmlNodeDumpFile();
- test_ret += test_htmlNodeDumpFileFormat();
- test_ret += test_htmlNodeDumpFormatOutput();
- test_ret += test_htmlNodeDumpOutput();
- test_ret += test_htmlSaveFile();
- test_ret += test_htmlSaveFileEnc();
- test_ret += test_htmlSaveFileFormat();
- test_ret += test_htmlSetMetaEncoding();
+ rc = test_htmlDocContentDumpFormatOutput();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlDocContentDumpOutput();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlDocDump();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlDocDumpMemory();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlDocDumpMemoryFormat();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlGetMetaEncoding();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlIsBooleanAttr();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlNewDoc();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlNewDocNoDtD();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlNodeDump();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlNodeDumpFile();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlNodeDumpFileFormat();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlNodeDumpFormatOutput();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlNodeDumpOutput();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlSaveFile();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlSaveFileEnc();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlSaveFileFormat();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlSetMetaEncoding();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
if (test_ret != 0)
printf("Module HTMLtree: %d errors\n", test_ret);
ctx = gen_void_ptr(n_ctx, 0);
value = gen_const_xmlChar_ptr(n_value, 1);
len = gen_int(n_len, 2);
+ if ((value != NULL) &&
+ (len > (int) strlen((const char *) value) + 1))
+ continue;
xmlSAX2CDataBlock(ctx, (const xmlChar *)value, len);
call_tests++;
ctx = gen_void_ptr(n_ctx, 0);
ch = gen_const_xmlChar_ptr(n_ch, 1);
len = gen_int(n_len, 2);
+ if ((ch != NULL) &&
+ (len > (int) strlen((const char *) ch) + 1))
+ continue;
xmlSAX2Characters(ctx, (const xmlChar *)ch, len);
call_tests++;
test_xmlSAX2EndElement(void) {
int test_ret = 0;
-#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED)
+#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
#ifdef LIBXML_SAX1_ENABLED
int mem_base;
void * ctx; /* the user data (XML parser context) */
ctx = gen_void_ptr(n_ctx, 0);
ch = gen_const_xmlChar_ptr(n_ch, 1);
len = gen_int(n_len, 2);
+ if ((ch != NULL) &&
+ (len > (int) strlen((const char *) ch) + 1))
+ continue;
xmlSAX2IgnorableWhitespace(ctx, (const xmlChar *)ch, len);
call_tests++;
test_xmlSAX2StartElement(void) {
int test_ret = 0;
-#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED)
+#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
#ifdef LIBXML_SAX1_ENABLED
int mem_base;
void * ctx; /* the user data (XML parser context) */
static int
test_SAX2(void) {
int test_ret = 0;
+ int rc = 0;
if (quiet == 0) printf("Testing SAX2 : 38 of 38 functions ...\n");
- test_ret += test_docbDefaultSAXHandlerInit();
- test_ret += test_htmlDefaultSAXHandlerInit();
- test_ret += test_xmlDefaultSAXHandlerInit();
- test_ret += test_xmlSAX2AttributeDecl();
- test_ret += test_xmlSAX2CDataBlock();
- test_ret += test_xmlSAX2Characters();
- test_ret += test_xmlSAX2Comment();
- test_ret += test_xmlSAX2ElementDecl();
- test_ret += test_xmlSAX2EndDocument();
- test_ret += test_xmlSAX2EndElement();
- test_ret += test_xmlSAX2EndElementNs();
- test_ret += test_xmlSAX2EntityDecl();
- test_ret += test_xmlSAX2ExternalSubset();
- test_ret += test_xmlSAX2GetColumnNumber();
- test_ret += test_xmlSAX2GetEntity();
- test_ret += test_xmlSAX2GetLineNumber();
- test_ret += test_xmlSAX2GetParameterEntity();
- test_ret += test_xmlSAX2GetPublicId();
- test_ret += test_xmlSAX2GetSystemId();
- test_ret += test_xmlSAX2HasExternalSubset();
- test_ret += test_xmlSAX2HasInternalSubset();
- test_ret += test_xmlSAX2IgnorableWhitespace();
- test_ret += test_xmlSAX2InitDefaultSAXHandler();
- test_ret += test_xmlSAX2InitDocbDefaultSAXHandler();
- test_ret += test_xmlSAX2InitHtmlDefaultSAXHandler();
- test_ret += test_xmlSAX2InternalSubset();
- test_ret += test_xmlSAX2IsStandalone();
- test_ret += test_xmlSAX2NotationDecl();
- test_ret += test_xmlSAX2ProcessingInstruction();
- test_ret += test_xmlSAX2Reference();
- test_ret += test_xmlSAX2ResolveEntity();
- test_ret += test_xmlSAX2SetDocumentLocator();
- test_ret += test_xmlSAX2StartDocument();
- test_ret += test_xmlSAX2StartElement();
- test_ret += test_xmlSAX2StartElementNs();
- test_ret += test_xmlSAX2UnparsedEntityDecl();
- test_ret += test_xmlSAXDefaultVersion();
- test_ret += test_xmlSAXVersion();
+ rc = test_docbDefaultSAXHandlerInit();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlDefaultSAXHandlerInit();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDefaultSAXHandlerInit();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSAX2AttributeDecl();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSAX2CDataBlock();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSAX2Characters();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSAX2Comment();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSAX2ElementDecl();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSAX2EndDocument();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSAX2EndElement();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSAX2EndElementNs();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSAX2EntityDecl();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSAX2ExternalSubset();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSAX2GetColumnNumber();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSAX2GetEntity();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSAX2GetLineNumber();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSAX2GetParameterEntity();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSAX2GetPublicId();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSAX2GetSystemId();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSAX2HasExternalSubset();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSAX2HasInternalSubset();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSAX2IgnorableWhitespace();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSAX2InitDefaultSAXHandler();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSAX2InitDocbDefaultSAXHandler();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSAX2InitHtmlDefaultSAXHandler();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSAX2InternalSubset();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSAX2IsStandalone();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSAX2NotationDecl();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSAX2ProcessingInstruction();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSAX2Reference();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSAX2ResolveEntity();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSAX2SetDocumentLocator();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSAX2StartDocument();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSAX2StartElement();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSAX2StartElementNs();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSAX2UnparsedEntityDecl();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSAXDefaultVersion();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSAXVersion();
if (test_ret != 0)
printf("Module SAX2: %d errors\n", test_ret);
static int
test_c14n(void) {
int test_ret = 0;
+ int rc = 0;
if (quiet == 0) printf("Testing c14n : 3 of 4 functions ...\n");
- test_ret += test_xmlC14NDocDumpMemory();
- test_ret += test_xmlC14NDocSave();
- test_ret += test_xmlC14NDocSaveTo();
- test_ret += test_xmlC14NExecute();
+ rc = test_xmlC14NDocDumpMemory();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlC14NDocSave();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlC14NDocSaveTo();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlC14NExecute();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
if (test_ret != 0)
printf("Module c14n: %d errors\n", test_ret);
static int
test_catalog(void) {
int test_ret = 0;
+ int rc = 0;
if (quiet == 0) printf("Testing catalog : 27 of 36 functions ...\n");
- test_ret += test_xmlACatalogAdd();
- test_ret += test_xmlACatalogDump();
- test_ret += test_xmlACatalogRemove();
- test_ret += test_xmlACatalogResolve();
- test_ret += test_xmlACatalogResolvePublic();
- test_ret += test_xmlACatalogResolveSystem();
- test_ret += test_xmlACatalogResolveURI();
- test_ret += test_xmlCatalogAdd();
- test_ret += test_xmlCatalogCleanup();
- test_ret += test_xmlCatalogConvert();
- test_ret += test_xmlCatalogDump();
- test_ret += test_xmlCatalogGetDefaults();
- test_ret += test_xmlCatalogIsEmpty();
- test_ret += test_xmlCatalogLocalResolve();
- test_ret += test_xmlCatalogLocalResolveURI();
- test_ret += test_xmlCatalogRemove();
- test_ret += test_xmlCatalogResolve();
- test_ret += test_xmlCatalogResolvePublic();
- test_ret += test_xmlCatalogResolveSystem();
- test_ret += test_xmlCatalogResolveURI();
- test_ret += test_xmlCatalogSetDefaultPrefer();
- test_ret += test_xmlCatalogSetDefaults();
- test_ret += test_xmlConvertSGMLCatalog();
- test_ret += test_xmlInitializeCatalog();
- test_ret += test_xmlLoadACatalog();
- test_ret += test_xmlLoadCatalog();
- test_ret += test_xmlLoadCatalogs();
- test_ret += test_xmlLoadSGMLSuperCatalog();
- test_ret += test_xmlNewCatalog();
- test_ret += test_xmlParseCatalogFile();
+ rc = test_xmlACatalogAdd();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlACatalogDump();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlACatalogRemove();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlACatalogResolve();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlACatalogResolvePublic();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlACatalogResolveSystem();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlACatalogResolveURI();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCatalogAdd();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCatalogCleanup();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCatalogConvert();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCatalogDump();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCatalogGetDefaults();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCatalogIsEmpty();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCatalogLocalResolve();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCatalogLocalResolveURI();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCatalogRemove();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCatalogResolve();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCatalogResolvePublic();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCatalogResolveSystem();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCatalogResolveURI();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCatalogSetDefaultPrefer();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCatalogSetDefaults();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlConvertSGMLCatalog();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlInitializeCatalog();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlLoadACatalog();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlLoadCatalog();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlLoadCatalogs();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlLoadSGMLSuperCatalog();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNewCatalog();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlParseCatalogFile();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
if (test_ret != 0)
printf("Module catalog: %d errors\n", test_ret);
static int
test_chvalid(void) {
int test_ret = 0;
+ int rc = 0;
if (quiet == 0) printf("Testing chvalid : 9 of 9 functions ...\n");
- test_ret += test_xmlCharInRange();
- test_ret += test_xmlIsBaseChar();
- test_ret += test_xmlIsBlank();
- test_ret += test_xmlIsChar();
- test_ret += test_xmlIsCombining();
- test_ret += test_xmlIsDigit();
- test_ret += test_xmlIsExtender();
- test_ret += test_xmlIsIdeographic();
- test_ret += test_xmlIsPubidChar();
+ rc = test_xmlCharInRange();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlIsBaseChar();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlIsBlank();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlIsChar();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlIsCombining();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlIsDigit();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlIsExtender();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlIsIdeographic();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlIsPubidChar();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
if (test_ret != 0)
printf("Module chvalid: %d errors\n", test_ret);
static int
test_debugXML(void) {
int test_ret = 0;
+ int rc = 0;
if (quiet == 0) printf("Testing debugXML : 25 of 28 functions ...\n");
- test_ret += test_xmlBoolToText();
- test_ret += test_xmlDebugCheckDocument();
- test_ret += test_xmlDebugDumpAttr();
- test_ret += test_xmlDebugDumpAttrList();
- test_ret += test_xmlDebugDumpDTD();
- test_ret += test_xmlDebugDumpDocument();
- test_ret += test_xmlDebugDumpDocumentHead();
- test_ret += test_xmlDebugDumpEntities();
- test_ret += test_xmlDebugDumpNode();
- test_ret += test_xmlDebugDumpNodeList();
- test_ret += test_xmlDebugDumpOneNode();
- test_ret += test_xmlDebugDumpString();
- test_ret += test_xmlLsCountNode();
- test_ret += test_xmlLsOneNode();
- test_ret += test_xmlShell();
- test_ret += test_xmlShellBase();
- test_ret += test_xmlShellCat();
- test_ret += test_xmlShellDir();
- test_ret += test_xmlShellDu();
- test_ret += test_xmlShellList();
- test_ret += test_xmlShellLoad();
- test_ret += test_xmlShellPrintXPathResult();
- test_ret += test_xmlShellPwd();
- test_ret += test_xmlShellSave();
- test_ret += test_xmlShellValidate();
- test_ret += test_xmlShellWrite();
+ rc = test_xmlBoolToText();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDebugCheckDocument();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDebugDumpAttr();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDebugDumpAttrList();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDebugDumpDTD();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDebugDumpDocument();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDebugDumpDocumentHead();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDebugDumpEntities();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDebugDumpNode();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDebugDumpNodeList();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDebugDumpOneNode();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDebugDumpString();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlLsCountNode();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlLsOneNode();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlShell();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlShellBase();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlShellCat();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlShellDir();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlShellDu();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlShellList();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlShellLoad();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlShellPrintXPathResult();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlShellPwd();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlShellSave();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlShellValidate();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlShellWrite();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
if (test_ret != 0)
printf("Module debugXML: %d errors\n", test_ret);
int mem_base;
xmlDictPtr ret_val;
- xmlDictPtr sub; /* an existing dictionnary */
+ xmlDictPtr sub; /* an existing dictionary */
int n_sub;
for (n_sub = 0;n_sub < gen_nb_xmlDictPtr;n_sub++) {
int mem_base;
const xmlChar * ret_val;
- xmlDictPtr dict; /* the dictionnary */
+ xmlDictPtr dict; /* the dictionary */
int n_dict;
xmlChar * name; /* the name of the userdata */
int n_name;
dict = gen_xmlDictPtr(n_dict, 0);
name = gen_const_xmlChar_ptr(n_name, 1);
len = gen_int(n_len, 2);
+ if ((name != NULL) &&
+ (len > (int) strlen((const char *) name) + 1))
+ continue;
ret_val = xmlDictExists(dict, (const xmlChar *)name, len);
desret_const_xmlChar_ptr(ret_val);
static int
+test_xmlDictGetUsage(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
test_xmlDictLookup(void) {
int test_ret = 0;
int mem_base;
const xmlChar * ret_val;
- xmlDictPtr dict; /* the dictionnary */
+ xmlDictPtr dict; /* the dictionary */
int n_dict;
xmlChar * name; /* the name of the userdata */
int n_name;
dict = gen_xmlDictPtr(n_dict, 0);
name = gen_const_xmlChar_ptr(n_name, 1);
len = gen_int(n_len, 2);
+ if ((name != NULL) &&
+ (len > (int) strlen((const char *) name) + 1))
+ continue;
ret_val = xmlDictLookup(dict, (const xmlChar *)name, len);
desret_const_xmlChar_ptr(ret_val);
int mem_base;
int ret_val;
- xmlDictPtr dict; /* the dictionnary */
+ xmlDictPtr dict; /* the dictionary */
int n_dict;
xmlChar * str; /* the string */
int n_str;
int mem_base;
const xmlChar * ret_val;
- xmlDictPtr dict; /* the dictionnary */
+ xmlDictPtr dict; /* the dictionary */
int n_dict;
xmlChar * prefix; /* the prefix */
int n_prefix;
int mem_base;
int ret_val;
- xmlDictPtr dict; /* the dictionnary */
+ xmlDictPtr dict; /* the dictionary */
int n_dict;
for (n_dict = 0;n_dict < gen_nb_xmlDictPtr;n_dict++) {
static int
+test_xmlDictSetLimit(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
test_xmlDictSize(void) {
int test_ret = 0;
int mem_base;
int ret_val;
- xmlDictPtr dict; /* the dictionnary */
+ xmlDictPtr dict; /* the dictionary */
int n_dict;
for (n_dict = 0;n_dict < gen_nb_xmlDictPtr;n_dict++) {
static int
test_dict(void) {
int test_ret = 0;
-
- if (quiet == 0) printf("Testing dict : 10 of 11 functions ...\n");
- test_ret += test_xmlDictCleanup();
- test_ret += test_xmlDictCreate();
- test_ret += test_xmlDictCreateSub();
- test_ret += test_xmlDictExists();
- test_ret += test_xmlDictLookup();
- test_ret += test_xmlDictOwns();
- test_ret += test_xmlDictQLookup();
- test_ret += test_xmlDictReference();
- test_ret += test_xmlDictSize();
- test_ret += test_xmlInitializeDict();
+ int rc = 0;
+
+ if (quiet == 0) printf("Testing dict : 10 of 13 functions ...\n");
+ rc = test_xmlDictCleanup();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDictCreate();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDictCreateSub();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDictExists();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDictGetUsage();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDictLookup();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDictOwns();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDictQLookup();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDictReference();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDictSetLimit();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDictSize();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlInitializeDict();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
if (test_ret != 0)
printf("Module dict: %d errors\n", test_ret);
static int
test_encoding(void) {
int test_ret = 0;
+ int rc = 0;
if (quiet == 0) printf("Testing encoding : 16 of 19 functions ...\n");
- test_ret += test_UTF8Toisolat1();
- test_ret += test_isolat1ToUTF8();
- test_ret += test_xmlAddEncodingAlias();
- test_ret += test_xmlCharEncCloseFunc();
- test_ret += test_xmlCharEncFirstLine();
- test_ret += test_xmlCharEncInFunc();
- test_ret += test_xmlCharEncOutFunc();
- test_ret += test_xmlCleanupCharEncodingHandlers();
- test_ret += test_xmlCleanupEncodingAliases();
- test_ret += test_xmlDelEncodingAlias();
- test_ret += test_xmlDetectCharEncoding();
- test_ret += test_xmlFindCharEncodingHandler();
- test_ret += test_xmlGetCharEncodingHandler();
- test_ret += test_xmlGetCharEncodingName();
- test_ret += test_xmlGetEncodingAlias();
- test_ret += test_xmlInitCharEncodingHandlers();
- test_ret += test_xmlNewCharEncodingHandler();
- test_ret += test_xmlParseCharEncoding();
- test_ret += test_xmlRegisterCharEncodingHandler();
+ rc = test_UTF8Toisolat1();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_isolat1ToUTF8();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlAddEncodingAlias();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCharEncCloseFunc();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCharEncFirstLine();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCharEncInFunc();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCharEncOutFunc();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCleanupCharEncodingHandlers();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCleanupEncodingAliases();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDelEncodingAlias();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDetectCharEncoding();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlFindCharEncodingHandler();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlGetCharEncodingHandler();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlGetCharEncodingName();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlGetEncodingAlias();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlInitCharEncodingHandlers();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNewCharEncodingHandler();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlParseCharEncoding();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlRegisterCharEncodingHandler();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
if (test_ret != 0)
printf("Module encoding: %d errors\n", test_ret);
}
+#define gen_nb_const_xmlDoc_ptr 1
+static xmlDoc * gen_const_xmlDoc_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_const_xmlDoc_ptr(int no ATTRIBUTE_UNUSED, const xmlDoc * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
static int
test_xmlEncodeSpecialChars(void) {
int test_ret = 0;
int mem_base;
xmlChar * ret_val;
- xmlDocPtr doc; /* the document containing the string */
+ xmlDoc * doc; /* the document containing the string */
int n_doc;
xmlChar * input; /* A string to convert to XML. */
int n_input;
- for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_doc = 0;n_doc < gen_nb_const_xmlDoc_ptr;n_doc++) {
for (n_input = 0;n_input < gen_nb_const_xmlChar_ptr;n_input++) {
mem_base = xmlMemBlocks();
- doc = gen_xmlDocPtr(n_doc, 0);
+ doc = gen_const_xmlDoc_ptr(n_doc, 0);
input = gen_const_xmlChar_ptr(n_input, 1);
- ret_val = xmlEncodeSpecialChars(doc, (const xmlChar *)input);
+ ret_val = xmlEncodeSpecialChars((const xmlDoc *)doc, (const xmlChar *)input);
desret_xmlChar_ptr(ret_val);
call_tests++;
- des_xmlDocPtr(n_doc, doc, 0);
+ des_const_xmlDoc_ptr(n_doc, (const xmlDoc *)doc, 0);
des_const_xmlChar_ptr(n_input, (const xmlChar *)input, 1);
xmlResetLastError();
if (mem_base != xmlMemBlocks()) {
int mem_base;
xmlEntityPtr ret_val;
- xmlDocPtr doc; /* the document referencing the entity */
+ xmlDoc * doc; /* the document referencing the entity */
int n_doc;
xmlChar * name; /* the entity name */
int n_name;
- for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_doc = 0;n_doc < gen_nb_const_xmlDoc_ptr;n_doc++) {
for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
mem_base = xmlMemBlocks();
- doc = gen_xmlDocPtr(n_doc, 0);
+ doc = gen_const_xmlDoc_ptr(n_doc, 0);
name = gen_const_xmlChar_ptr(n_name, 1);
- ret_val = xmlGetDocEntity(doc, (const xmlChar *)name);
+ ret_val = xmlGetDocEntity((const xmlDoc *)doc, (const xmlChar *)name);
desret_xmlEntityPtr(ret_val);
call_tests++;
- des_xmlDocPtr(n_doc, doc, 0);
+ des_const_xmlDoc_ptr(n_doc, (const xmlDoc *)doc, 0);
des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
xmlResetLastError();
if (mem_base != xmlMemBlocks()) {
static int
test_entities(void) {
int test_ret = 0;
+ int rc = 0;
if (quiet == 0) printf("Testing entities : 13 of 17 functions ...\n");
- test_ret += test_xmlAddDocEntity();
- test_ret += test_xmlAddDtdEntity();
- test_ret += test_xmlCleanupPredefinedEntities();
- test_ret += test_xmlCopyEntitiesTable();
- test_ret += test_xmlCreateEntitiesTable();
- test_ret += test_xmlDumpEntitiesTable();
- test_ret += test_xmlDumpEntityDecl();
- test_ret += test_xmlEncodeEntitiesReentrant();
- test_ret += test_xmlEncodeSpecialChars();
- test_ret += test_xmlGetDocEntity();
- test_ret += test_xmlGetDtdEntity();
- test_ret += test_xmlGetParameterEntity();
- test_ret += test_xmlGetPredefinedEntity();
- test_ret += test_xmlInitializePredefinedEntities();
- test_ret += test_xmlNewEntity();
+ rc = test_xmlAddDocEntity();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlAddDtdEntity();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCleanupPredefinedEntities();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCopyEntitiesTable();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCreateEntitiesTable();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDumpEntitiesTable();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDumpEntityDecl();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlEncodeEntitiesReentrant();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlEncodeSpecialChars();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlGetDocEntity();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlGetDtdEntity();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlGetParameterEntity();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlGetPredefinedEntity();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlInitializePredefinedEntities();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNewEntity();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
if (test_ret != 0)
printf("Module entities: %d errors\n", test_ret);
static int
test_hash(void) {
int test_ret = 0;
+ int rc = 0;
if (quiet == 0) printf("Testing hash : 16 of 24 functions ...\n");
- test_ret += test_xmlHashAddEntry();
- test_ret += test_xmlHashAddEntry2();
- test_ret += test_xmlHashAddEntry3();
- test_ret += test_xmlHashCopy();
- test_ret += test_xmlHashCreate();
- test_ret += test_xmlHashCreateDict();
- test_ret += test_xmlHashLookup();
- test_ret += test_xmlHashLookup2();
- test_ret += test_xmlHashLookup3();
- test_ret += test_xmlHashQLookup();
- test_ret += test_xmlHashQLookup2();
- test_ret += test_xmlHashQLookup3();
- test_ret += test_xmlHashRemoveEntry();
- test_ret += test_xmlHashRemoveEntry2();
- test_ret += test_xmlHashRemoveEntry3();
- test_ret += test_xmlHashScan();
- test_ret += test_xmlHashScan3();
- test_ret += test_xmlHashScanFull();
- test_ret += test_xmlHashScanFull3();
- test_ret += test_xmlHashSize();
- test_ret += test_xmlHashUpdateEntry();
- test_ret += test_xmlHashUpdateEntry2();
- test_ret += test_xmlHashUpdateEntry3();
+ rc = test_xmlHashAddEntry();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlHashAddEntry2();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlHashAddEntry3();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlHashCopy();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlHashCreate();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlHashCreateDict();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlHashLookup();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlHashLookup2();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlHashLookup3();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlHashQLookup();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlHashQLookup2();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlHashQLookup3();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlHashRemoveEntry();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlHashRemoveEntry2();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlHashRemoveEntry3();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlHashScan();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlHashScan3();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlHashScanFull();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlHashScanFull3();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlHashSize();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlHashUpdateEntry();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlHashUpdateEntry2();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlHashUpdateEntry3();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
if (test_ret != 0)
printf("Module hash: %d errors\n", test_ret);
static int
test_list(void) {
int test_ret = 0;
+ int rc = 0;
if (quiet == 0) printf("Testing list : 19 of 26 functions ...\n");
- test_ret += test_xmlLinkGetData();
- test_ret += test_xmlListAppend();
- test_ret += test_xmlListClear();
- test_ret += test_xmlListCopy();
- test_ret += test_xmlListCreate();
- test_ret += test_xmlListDup();
- test_ret += test_xmlListEmpty();
- test_ret += test_xmlListEnd();
- test_ret += test_xmlListFront();
- test_ret += test_xmlListInsert();
- test_ret += test_xmlListMerge();
- test_ret += test_xmlListPopBack();
- test_ret += test_xmlListPopFront();
- test_ret += test_xmlListPushBack();
- test_ret += test_xmlListPushFront();
- test_ret += test_xmlListRemoveAll();
- test_ret += test_xmlListRemoveFirst();
- test_ret += test_xmlListRemoveLast();
- test_ret += test_xmlListReverse();
- test_ret += test_xmlListReverseSearch();
- test_ret += test_xmlListReverseWalk();
- test_ret += test_xmlListSearch();
- test_ret += test_xmlListSize();
- test_ret += test_xmlListSort();
- test_ret += test_xmlListWalk();
+ rc = test_xmlLinkGetData();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlListAppend();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlListClear();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlListCopy();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlListCreate();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlListDup();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlListEmpty();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlListEnd();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlListFront();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlListInsert();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlListMerge();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlListPopBack();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlListPopFront();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlListPushBack();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlListPushFront();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlListRemoveAll();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlListRemoveFirst();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlListRemoveLast();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlListReverse();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlListReverseSearch();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlListReverseWalk();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlListSearch();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlListSize();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlListSort();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlListWalk();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
if (test_ret != 0)
printf("Module list: %d errors\n", test_ret);
static int
test_nanoftp(void) {
int test_ret = 0;
+ int rc = 0;
if (quiet == 0) printf("Testing nanoftp : 14 of 22 functions ...\n");
- test_ret += test_xmlNanoFTPCheckResponse();
- test_ret += test_xmlNanoFTPCleanup();
- test_ret += test_xmlNanoFTPCloseConnection();
- test_ret += test_xmlNanoFTPCwd();
- test_ret += test_xmlNanoFTPDele();
- test_ret += test_xmlNanoFTPGet();
- test_ret += test_xmlNanoFTPGetConnection();
- test_ret += test_xmlNanoFTPGetResponse();
- test_ret += test_xmlNanoFTPGetSocket();
- test_ret += test_xmlNanoFTPInit();
- test_ret += test_xmlNanoFTPList();
- test_ret += test_xmlNanoFTPNewCtxt();
- test_ret += test_xmlNanoFTPOpen();
- test_ret += test_xmlNanoFTPProxy();
- test_ret += test_xmlNanoFTPQuit();
- test_ret += test_xmlNanoFTPRead();
- test_ret += test_xmlNanoFTPScanProxy();
- test_ret += test_xmlNanoFTPUpdateURL();
+ rc = test_xmlNanoFTPCheckResponse();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNanoFTPCleanup();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNanoFTPCloseConnection();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNanoFTPCwd();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNanoFTPDele();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNanoFTPGet();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNanoFTPGetConnection();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNanoFTPGetResponse();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNanoFTPGetSocket();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNanoFTPInit();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNanoFTPList();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNanoFTPNewCtxt();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNanoFTPOpen();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNanoFTPProxy();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNanoFTPQuit();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNanoFTPRead();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNanoFTPScanProxy();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNanoFTPUpdateURL();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
if (test_ret != 0)
printf("Module nanoftp: %d errors\n", test_ret);
static int
test_nanohttp(void) {
int test_ret = 0;
+ int rc = 0;
if (quiet == 0) printf("Testing nanohttp : 13 of 17 functions ...\n");
- test_ret += test_xmlNanoHTTPAuthHeader();
- test_ret += test_xmlNanoHTTPCleanup();
- test_ret += test_xmlNanoHTTPContentLength();
- test_ret += test_xmlNanoHTTPEncoding();
- test_ret += test_xmlNanoHTTPFetch();
- test_ret += test_xmlNanoHTTPInit();
- test_ret += test_xmlNanoHTTPMimeType();
- test_ret += test_xmlNanoHTTPOpen();
- test_ret += test_xmlNanoHTTPOpenRedir();
- test_ret += test_xmlNanoHTTPRead();
- test_ret += test_xmlNanoHTTPRedir();
- test_ret += test_xmlNanoHTTPReturnCode();
- test_ret += test_xmlNanoHTTPSave();
- test_ret += test_xmlNanoHTTPScanProxy();
+ rc = test_xmlNanoHTTPAuthHeader();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNanoHTTPCleanup();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNanoHTTPContentLength();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNanoHTTPEncoding();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNanoHTTPFetch();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNanoHTTPInit();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNanoHTTPMimeType();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNanoHTTPOpen();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNanoHTTPOpenRedir();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNanoHTTPRead();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNanoHTTPRedir();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNanoHTTPReturnCode();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNanoHTTPSave();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNanoHTTPScanProxy();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
if (test_ret != 0)
printf("Module nanohttp: %d errors\n", test_ret);
chunk = gen_const_char_ptr(n_chunk, 2);
size = gen_int(n_size, 3);
filename = gen_fileoutput(n_filename, 4);
+ if ((chunk != NULL) &&
+ (size > (int) strlen((const char *) chunk) + 1))
+ continue;
ret_val = xmlCreatePushParserCtxt(sax, user_data, (const char *)chunk, size, filename);
desret_xmlParserCtxtPtr(ret_val);
URL = gen_filepath(n_URL, 3);
encoding = gen_const_char_ptr(n_encoding, 4);
options = gen_parseroptions(n_options, 5);
+ if ((buffer != NULL) &&
+ (size > (int) strlen((const char *) buffer) + 1))
+ continue;
ret_val = xmlCtxtReadMemory(ctxt, (const char *)buffer, size, URL, (const char *)encoding, options);
desret_xmlDocPtr(ret_val);
size = gen_int(n_size, 2);
filename = gen_filepath(n_filename, 3);
encoding = gen_const_char_ptr(n_encoding, 4);
+ if ((chunk != NULL) &&
+ (size > (int) strlen((const char *) chunk) + 1))
+ continue;
ret_val = xmlCtxtResetPush(ctxt, (const char *)chunk, size, filename, (const char *)encoding);
desret_int(ret_val);
chunk = gen_const_char_ptr(n_chunk, 1);
size = gen_int(n_size, 2);
terminate = gen_int(n_terminate, 3);
+ if ((chunk != NULL) &&
+ (size > (int) strlen((const char *) chunk) + 1))
+ continue;
ret_val = xmlParseChunk(ctxt, (const char *)chunk, size, terminate);
if (ctxt != NULL) {xmlFreeDoc(ctxt->myDoc); ctxt->myDoc = NULL;}
mem_base = xmlMemBlocks();
buffer = gen_const_char_ptr(n_buffer, 0);
size = gen_int(n_size, 1);
+ if ((buffer != NULL) &&
+ (size > (int) strlen((const char *) buffer) + 1))
+ continue;
ret_val = xmlParseMemory((const char *)buffer, size);
desret_xmlDocPtr(ret_val);
URL = gen_filepath(n_URL, 2);
encoding = gen_const_char_ptr(n_encoding, 3);
options = gen_parseroptions(n_options, 4);
+ if ((buffer != NULL) &&
+ (size > (int) strlen((const char *) buffer) + 1))
+ continue;
ret_val = xmlReadMemory((const char *)buffer, size, URL, (const char *)encoding, options);
desret_xmlDocPtr(ret_val);
mem_base = xmlMemBlocks();
buffer = gen_const_char_ptr(n_buffer, 0);
size = gen_int(n_size, 1);
+ if ((buffer != NULL) &&
+ (size > (int) strlen((const char *) buffer) + 1))
+ continue;
ret_val = xmlRecoverMemory((const char *)buffer, size);
desret_xmlDocPtr(ret_val);
buffer = gen_const_char_ptr(n_buffer, 1);
size = gen_int(n_size, 2);
recovery = gen_int(n_recovery, 3);
+ if ((buffer != NULL) &&
+ (size > (int) strlen((const char *) buffer) + 1))
+ continue;
ret_val = xmlSAXParseMemory(sax, (const char *)buffer, size, recovery);
desret_xmlDocPtr(ret_val);
size = gen_int(n_size, 2);
recovery = gen_int(n_recovery, 3);
data = gen_userdata(n_data, 4);
+ if ((buffer != NULL) &&
+ (size > (int) strlen((const char *) buffer) + 1))
+ continue;
ret_val = xmlSAXParseMemoryWithData(sax, (const char *)buffer, size, recovery, data);
desret_xmlDocPtr(ret_val);
user_data = gen_userdata(n_user_data, 1);
buffer = gen_const_char_ptr(n_buffer, 2);
size = gen_int(n_size, 3);
+ if ((buffer != NULL) &&
+ (size > (int) strlen((const char *) buffer) + 1))
+ continue;
#ifdef LIBXML_SAX1_ENABLED
if (sax == (xmlSAXHandlerPtr)&xmlDefaultSAXHandler) user_data = NULL;
static int
test_parser(void) {
int test_ret = 0;
+ int rc = 0;
if (quiet == 0) printf("Testing parser : 61 of 70 functions ...\n");
- test_ret += test_xmlByteConsumed();
- test_ret += test_xmlClearNodeInfoSeq();
- test_ret += test_xmlClearParserCtxt();
- test_ret += test_xmlCreateDocParserCtxt();
- test_ret += test_xmlCreatePushParserCtxt();
- test_ret += test_xmlCtxtReadDoc();
- test_ret += test_xmlCtxtReadFile();
- test_ret += test_xmlCtxtReadMemory();
- test_ret += test_xmlCtxtReset();
- test_ret += test_xmlCtxtResetPush();
- test_ret += test_xmlCtxtUseOptions();
- test_ret += test_xmlGetExternalEntityLoader();
- test_ret += test_xmlGetFeature();
- test_ret += test_xmlGetFeaturesList();
- test_ret += test_xmlHasFeature();
- test_ret += test_xmlIOParseDTD();
- test_ret += test_xmlInitNodeInfoSeq();
- test_ret += test_xmlInitParser();
- test_ret += test_xmlInitParserCtxt();
- test_ret += test_xmlKeepBlanksDefault();
- test_ret += test_xmlLineNumbersDefault();
- test_ret += test_xmlLoadExternalEntity();
- test_ret += test_xmlNewIOInputStream();
- test_ret += test_xmlNewParserCtxt();
- test_ret += test_xmlParseBalancedChunkMemory();
- test_ret += test_xmlParseBalancedChunkMemoryRecover();
- test_ret += test_xmlParseChunk();
- test_ret += test_xmlParseCtxtExternalEntity();
- test_ret += test_xmlParseDTD();
- test_ret += test_xmlParseDoc();
- test_ret += test_xmlParseDocument();
- test_ret += test_xmlParseEntity();
- test_ret += test_xmlParseExtParsedEnt();
- test_ret += test_xmlParseExternalEntity();
- test_ret += test_xmlParseFile();
- test_ret += test_xmlParseInNodeContext();
- test_ret += test_xmlParseMemory();
- test_ret += test_xmlParserAddNodeInfo();
- test_ret += test_xmlParserFindNodeInfo();
- test_ret += test_xmlParserFindNodeInfoIndex();
- test_ret += test_xmlParserInputGrow();
- test_ret += test_xmlParserInputRead();
- test_ret += test_xmlPedanticParserDefault();
- test_ret += test_xmlReadDoc();
- test_ret += test_xmlReadFile();
- test_ret += test_xmlReadMemory();
- test_ret += test_xmlRecoverDoc();
- test_ret += test_xmlRecoverFile();
- test_ret += test_xmlRecoverMemory();
- test_ret += test_xmlSAXParseDTD();
- test_ret += test_xmlSAXParseDoc();
- test_ret += test_xmlSAXParseEntity();
- test_ret += test_xmlSAXParseFile();
- test_ret += test_xmlSAXParseFileWithData();
- test_ret += test_xmlSAXParseMemory();
- test_ret += test_xmlSAXParseMemoryWithData();
- test_ret += test_xmlSAXUserParseFile();
- test_ret += test_xmlSAXUserParseMemory();
- test_ret += test_xmlSetExternalEntityLoader();
- test_ret += test_xmlSetFeature();
- test_ret += test_xmlSetupParserForBuffer();
- test_ret += test_xmlStopParser();
- test_ret += test_xmlSubstituteEntitiesDefault();
+ rc = test_xmlByteConsumed();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlClearNodeInfoSeq();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlClearParserCtxt();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCreateDocParserCtxt();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCreatePushParserCtxt();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCtxtReadDoc();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCtxtReadFile();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCtxtReadMemory();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCtxtReset();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCtxtResetPush();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCtxtUseOptions();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlGetExternalEntityLoader();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlGetFeature();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlGetFeaturesList();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlHasFeature();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlIOParseDTD();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlInitNodeInfoSeq();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlInitParser();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlInitParserCtxt();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlKeepBlanksDefault();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlLineNumbersDefault();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlLoadExternalEntity();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNewIOInputStream();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNewParserCtxt();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlParseBalancedChunkMemory();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlParseBalancedChunkMemoryRecover();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlParseChunk();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlParseCtxtExternalEntity();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlParseDTD();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlParseDoc();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlParseDocument();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlParseEntity();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlParseExtParsedEnt();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlParseExternalEntity();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlParseFile();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlParseInNodeContext();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlParseMemory();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlParserAddNodeInfo();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlParserFindNodeInfo();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlParserFindNodeInfoIndex();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlParserInputGrow();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlParserInputRead();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlPedanticParserDefault();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlReadDoc();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlReadFile();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlReadMemory();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlRecoverDoc();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlRecoverFile();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlRecoverMemory();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSAXParseDTD();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSAXParseDoc();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSAXParseEntity();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSAXParseFile();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSAXParseFileWithData();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSAXParseMemory();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSAXParseMemoryWithData();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSAXUserParseFile();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSAXUserParseMemory();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSetExternalEntityLoader();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSetFeature();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSetupParserForBuffer();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlStopParser();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSubstituteEntitiesDefault();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
if (test_ret != 0)
printf("Module parser: %d errors\n", test_ret);
mem_base = xmlMemBlocks();
buffer = gen_const_char_ptr(n_buffer, 0);
size = gen_int(n_size, 1);
+ if ((buffer != NULL) &&
+ (size > (int) strlen((const char *) buffer) + 1))
+ continue;
ret_val = xmlCreateMemoryParserCtxt((const char *)buffer, size);
desret_xmlParserCtxtPtr(ret_val);
end = gen_xmlChar(n_end, 4);
end2 = gen_xmlChar(n_end2, 5);
end3 = gen_xmlChar(n_end3, 6);
+ if ((str != NULL) &&
+ (len > (int) strlen((const char *) str) + 1))
+ continue;
ret_val = xmlStringLenDecodeEntities(ctxt, (const xmlChar *)str, len, what, end, end2, end3);
desret_xmlChar_ptr(ret_val);
static int
test_parserInternals(void) {
int test_ret = 0;
+ int rc = 0;
if (quiet == 0) printf("Testing parserInternals : 33 of 90 functions ...\n");
- test_ret += test_htmlCreateFileParserCtxt();
- test_ret += test_htmlInitAutoClose();
- test_ret += test_inputPop();
- test_ret += test_inputPush();
- test_ret += test_namePop();
- test_ret += test_namePush();
- test_ret += test_nodePop();
- test_ret += test_nodePush();
- test_ret += test_xmlCheckLanguageID();
- test_ret += test_xmlCopyChar();
- test_ret += test_xmlCopyCharMultiByte();
- test_ret += test_xmlCreateEntityParserCtxt();
- test_ret += test_xmlCreateFileParserCtxt();
- test_ret += test_xmlCreateMemoryParserCtxt();
- test_ret += test_xmlCreateURLParserCtxt();
- test_ret += test_xmlCurrentChar();
- test_ret += test_xmlErrMemory();
- test_ret += test_xmlIsLetter();
- test_ret += test_xmlNewEntityInputStream();
- test_ret += test_xmlNewInputFromFile();
- test_ret += test_xmlNewInputStream();
- test_ret += test_xmlNewStringInputStream();
- test_ret += test_xmlNextChar();
- test_ret += test_xmlParserInputShrink();
- test_ret += test_xmlPopInput();
- test_ret += test_xmlPushInput();
- test_ret += test_xmlSetEntityReferenceFunc();
- test_ret += test_xmlSplitQName();
- test_ret += test_xmlStringCurrentChar();
- test_ret += test_xmlStringDecodeEntities();
- test_ret += test_xmlStringLenDecodeEntities();
- test_ret += test_xmlSwitchEncoding();
- test_ret += test_xmlSwitchInputEncoding();
- test_ret += test_xmlSwitchToEncoding();
+ rc = test_htmlCreateFileParserCtxt();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_htmlInitAutoClose();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_inputPop();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_inputPush();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_namePop();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_namePush();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_nodePop();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_nodePush();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCheckLanguageID();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCopyChar();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCopyCharMultiByte();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCreateEntityParserCtxt();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCreateFileParserCtxt();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCreateMemoryParserCtxt();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCreateURLParserCtxt();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCurrentChar();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlErrMemory();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlIsLetter();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNewEntityInputStream();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNewInputFromFile();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNewInputStream();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNewStringInputStream();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNextChar();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlParserInputShrink();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlPopInput();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlPushInput();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSetEntityReferenceFunc();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSplitQName();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlStringCurrentChar();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlStringDecodeEntities();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlStringLenDecodeEntities();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSwitchEncoding();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSwitchInputEncoding();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSwitchToEncoding();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
if (test_ret != 0)
printf("Module parserInternals: %d errors\n", test_ret);
static int
test_pattern(void) {
int test_ret = 0;
+ int rc = 0;
if (quiet == 0) printf("Testing pattern : 10 of 15 functions ...\n");
- test_ret += test_xmlPatternFromRoot();
- test_ret += test_xmlPatternGetStreamCtxt();
- test_ret += test_xmlPatternMatch();
- test_ret += test_xmlPatternMaxDepth();
- test_ret += test_xmlPatternMinDepth();
- test_ret += test_xmlPatternStreamable();
- test_ret += test_xmlPatterncompile();
- test_ret += test_xmlStreamPop();
- test_ret += test_xmlStreamPush();
- test_ret += test_xmlStreamPushAttr();
- test_ret += test_xmlStreamPushNode();
- test_ret += test_xmlStreamWantsAnyNode();
+ rc = test_xmlPatternFromRoot();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlPatternGetStreamCtxt();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlPatternMatch();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlPatternMaxDepth();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlPatternMinDepth();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlPatternStreamable();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlPatterncompile();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlStreamPop();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlStreamPush();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlStreamPushAttr();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlStreamPushNode();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlStreamWantsAnyNode();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
if (test_ret != 0)
printf("Module pattern: %d errors\n", test_ret);
mem_base = xmlMemBlocks();
buffer = gen_const_char_ptr(n_buffer, 0);
size = gen_int(n_size, 1);
+ if ((buffer != NULL) &&
+ (size > (int) strlen((const char *) buffer) + 1))
+ continue;
ret_val = xmlRelaxNGNewMemParserCtxt((const char *)buffer, size);
desret_xmlRelaxNGParserCtxtPtr(ret_val);
int n_ctxt;
xmlChar * data; /* some character data read */
int n_data;
- int len; /* the lenght of the data */
+ int len; /* the length of the data */
int n_len;
for (n_ctxt = 0;n_ctxt < gen_nb_xmlRelaxNGValidCtxtPtr;n_ctxt++) {
ctxt = gen_xmlRelaxNGValidCtxtPtr(n_ctxt, 0);
data = gen_const_xmlChar_ptr(n_data, 1);
len = gen_int(n_len, 2);
+ if ((data != NULL) &&
+ (len > (int) strlen((const char *) data) + 1))
+ continue;
ret_val = xmlRelaxNGValidatePushCData(ctxt, (const xmlChar *)data, len);
desret_int(ret_val);
static int
test_relaxng(void) {
int test_ret = 0;
+ int rc = 0;
if (quiet == 0) printf("Testing relaxng : 14 of 24 functions ...\n");
- test_ret += test_xmlRelaxNGDump();
- test_ret += test_xmlRelaxNGDumpTree();
- test_ret += test_xmlRelaxNGGetParserErrors();
- test_ret += test_xmlRelaxNGGetValidErrors();
- test_ret += test_xmlRelaxNGInitTypes();
- test_ret += test_xmlRelaxNGNewDocParserCtxt();
- test_ret += test_xmlRelaxNGNewMemParserCtxt();
- test_ret += test_xmlRelaxNGNewParserCtxt();
- test_ret += test_xmlRelaxNGNewValidCtxt();
- test_ret += test_xmlRelaxNGParse();
- test_ret += test_xmlRelaxNGSetParserErrors();
- test_ret += test_xmlRelaxNGSetParserStructuredErrors();
- test_ret += test_xmlRelaxNGSetValidErrors();
- test_ret += test_xmlRelaxNGSetValidStructuredErrors();
- test_ret += test_xmlRelaxNGValidateDoc();
- test_ret += test_xmlRelaxNGValidateFullElement();
- test_ret += test_xmlRelaxNGValidatePopElement();
- test_ret += test_xmlRelaxNGValidatePushCData();
- test_ret += test_xmlRelaxNGValidatePushElement();
- test_ret += test_xmlRelaxParserSetFlag();
+ rc = test_xmlRelaxNGDump();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlRelaxNGDumpTree();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlRelaxNGGetParserErrors();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlRelaxNGGetValidErrors();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlRelaxNGInitTypes();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlRelaxNGNewDocParserCtxt();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlRelaxNGNewMemParserCtxt();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlRelaxNGNewParserCtxt();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlRelaxNGNewValidCtxt();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlRelaxNGParse();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlRelaxNGSetParserErrors();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlRelaxNGSetParserStructuredErrors();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlRelaxNGSetValidErrors();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlRelaxNGSetValidStructuredErrors();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlRelaxNGValidateDoc();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlRelaxNGValidateFullElement();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlRelaxNGValidatePopElement();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlRelaxNGValidatePushCData();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlRelaxNGValidatePushElement();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlRelaxParserSetFlag();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
if (test_ret != 0)
printf("Module relaxng: %d errors\n", test_ret);
static int
test_schematron(void) {
int test_ret = 0;
+ int rc = 0;
if (quiet == 0) printf("Testing schematron : 1 of 10 functions ...\n");
- test_ret += test_xmlSchematronNewDocParserCtxt();
- test_ret += test_xmlSchematronNewMemParserCtxt();
- test_ret += test_xmlSchematronNewParserCtxt();
- test_ret += test_xmlSchematronNewValidCtxt();
- test_ret += test_xmlSchematronParse();
- test_ret += test_xmlSchematronSetValidStructuredErrors();
- test_ret += test_xmlSchematronValidateDoc();
+ rc = test_xmlSchematronNewDocParserCtxt();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchematronNewMemParserCtxt();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchematronNewParserCtxt();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchematronNewValidCtxt();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchematronParse();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchematronSetValidStructuredErrors();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchematronValidateDoc();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
if (test_ret != 0)
printf("Module schematron: %d errors\n", test_ret);
test_xmlAddPrevSibling(void) {
int test_ret = 0;
-#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
int mem_base;
xmlNodePtr ret_val;
xmlNodePtr cur; /* the child node */
}
+#define gen_nb_const_xmlBuf_ptr 1
+static xmlBuf * gen_const_xmlBuf_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_const_xmlBuf_ptr(int no ATTRIBUTE_UNUSED, const xmlBuf * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static int
+test_xmlBufContent(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlChar * ret_val;
+ xmlBuf * buf; /* the buffer */
+ int n_buf;
+
+ for (n_buf = 0;n_buf < gen_nb_const_xmlBuf_ptr;n_buf++) {
+ mem_base = xmlMemBlocks();
+ buf = gen_const_xmlBuf_ptr(n_buf, 0);
+
+ ret_val = xmlBufContent((const xmlBuf *)buf);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_const_xmlBuf_ptr(n_buf, (const xmlBuf *)buf, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlBufContent",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buf);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+#define gen_nb_xmlBufPtr 1
+static xmlBufPtr gen_xmlBufPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlBufPtr(int no ATTRIBUTE_UNUSED, xmlBufPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static int
+test_xmlBufEnd(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlChar * ret_val;
+ xmlBufPtr buf; /* the buffer */
+ int n_buf;
+
+ for (n_buf = 0;n_buf < gen_nb_xmlBufPtr;n_buf++) {
+ mem_base = xmlMemBlocks();
+ buf = gen_xmlBufPtr(n_buf, 0);
+
+ ret_val = xmlBufEnd(buf);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlBufPtr(n_buf, buf, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlBufEnd",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buf);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+#define gen_nb_const_xmlNode_ptr 1
+static xmlNode * gen_const_xmlNode_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_const_xmlNode_ptr(int no ATTRIBUTE_UNUSED, const xmlNode * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static int
+test_xmlBufGetNodeContent(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlBufPtr buf; /* a buffer xmlBufPtr */
+ int n_buf;
+ xmlNode * cur; /* the node being read */
+ int n_cur;
+
+ for (n_buf = 0;n_buf < gen_nb_xmlBufPtr;n_buf++) {
+ for (n_cur = 0;n_cur < gen_nb_const_xmlNode_ptr;n_cur++) {
+ mem_base = xmlMemBlocks();
+ buf = gen_xmlBufPtr(n_buf, 0);
+ cur = gen_const_xmlNode_ptr(n_cur, 1);
+
+ ret_val = xmlBufGetNodeContent(buf, (const xmlNode *)cur);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlBufPtr(n_buf, buf, 0);
+ des_const_xmlNode_ptr(n_cur, (const xmlNode *)cur, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlBufGetNodeContent",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buf);
+ printf(" %d", n_cur);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlBufNodeDump(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlBufShrink(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+#define gen_nb_const_xmlBufPtr 1
+static xmlBufPtr gen_const_xmlBufPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_const_xmlBufPtr(int no ATTRIBUTE_UNUSED, const xmlBufPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static int
+test_xmlBufUse(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
static int
test_xmlBufferAdd(void) {
int test_ret = 0;
buf = gen_xmlBufferPtr(n_buf, 0);
str = gen_const_xmlChar_ptr(n_str, 1);
len = gen_int(n_len, 2);
+ if ((str != NULL) &&
+ (len > (int) strlen((const char *) str) + 1))
+ continue;
ret_val = xmlBufferAdd(buf, (const xmlChar *)str, len);
desret_int(ret_val);
buf = gen_xmlBufferPtr(n_buf, 0);
str = gen_const_xmlChar_ptr(n_str, 1);
len = gen_int(n_len, 2);
+ if ((str != NULL) &&
+ (len > (int) strlen((const char *) str) + 1))
+ continue;
ret_val = xmlBufferAddHead(buf, (const xmlChar *)str, len);
desret_int(ret_val);
}
-#define gen_nb_const_xmlBufferPtr 1
-static xmlBufferPtr gen_const_xmlBufferPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+#define gen_nb_const_xmlBuffer_ptr 1
+static xmlBuffer * gen_const_xmlBuffer_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
return(NULL);
}
-static void des_const_xmlBufferPtr(int no ATTRIBUTE_UNUSED, const xmlBufferPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+static void des_const_xmlBuffer_ptr(int no ATTRIBUTE_UNUSED, const xmlBuffer * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
}
static int
int mem_base;
const xmlChar * ret_val;
- xmlBufferPtr buf; /* the buffer */
+ xmlBuffer * buf; /* the buffer */
int n_buf;
- for (n_buf = 0;n_buf < gen_nb_const_xmlBufferPtr;n_buf++) {
+ for (n_buf = 0;n_buf < gen_nb_const_xmlBuffer_ptr;n_buf++) {
mem_base = xmlMemBlocks();
- buf = gen_const_xmlBufferPtr(n_buf, 0);
+ buf = gen_const_xmlBuffer_ptr(n_buf, 0);
- ret_val = xmlBufferContent((const xmlBufferPtr)buf);
+ ret_val = xmlBufferContent((const xmlBuffer *)buf);
desret_const_xmlChar_ptr(ret_val);
call_tests++;
- des_const_xmlBufferPtr(n_buf, (const xmlBufferPtr)buf, 0);
+ des_const_xmlBuffer_ptr(n_buf, (const xmlBuffer *)buf, 0);
xmlResetLastError();
if (mem_base != xmlMemBlocks()) {
printf("Leak of %d blocks found in xmlBufferContent",
int mem_base;
int ret_val;
- xmlBufferPtr buf; /* the buffer */
+ xmlBuffer * buf; /* the buffer */
int n_buf;
- for (n_buf = 0;n_buf < gen_nb_const_xmlBufferPtr;n_buf++) {
+ for (n_buf = 0;n_buf < gen_nb_const_xmlBuffer_ptr;n_buf++) {
mem_base = xmlMemBlocks();
- buf = gen_const_xmlBufferPtr(n_buf, 0);
+ buf = gen_const_xmlBuffer_ptr(n_buf, 0);
- ret_val = xmlBufferLength((const xmlBufferPtr)buf);
+ ret_val = xmlBufferLength((const xmlBuffer *)buf);
desret_int(ret_val);
call_tests++;
- des_const_xmlBufferPtr(n_buf, (const xmlBufferPtr)buf, 0);
+ des_const_xmlBuffer_ptr(n_buf, (const xmlBuffer *)buf, 0);
xmlResetLastError();
if (mem_base != xmlMemBlocks()) {
printf("Leak of %d blocks found in xmlBufferLength",
prefix = gen_const_xmlChar_ptr(n_prefix, 1);
memory = gen_xmlChar_ptr(n_memory, 2);
len = gen_int(n_len, 3);
+ if ((prefix != NULL) &&
+ (len > (int) strlen((const char *) prefix) + 1))
+ continue;
ret_val = xmlBuildQName((const xmlChar *)ncname, (const xmlChar *)prefix, memory, len);
if ((ret_val != NULL) && (ret_val != ncname) &&
int extended; /* if 1 do a recursive copy (properties, namespaces and children when applicable) if 2 copy properties and namespaces (when applicable) */
int n_extended;
- for (n_node = 0;n_node < gen_nb_const_xmlNodePtr;n_node++) {
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
for (n_extended = 0;n_extended < gen_nb_int;n_extended++) {
mem_base = xmlMemBlocks();
- node = gen_const_xmlNodePtr(n_node, 0);
+ node = gen_xmlNodePtr(n_node, 0);
extended = gen_int(n_extended, 1);
- ret_val = xmlCopyNode((const xmlNodePtr)node, extended);
+ ret_val = xmlCopyNode(node, extended);
desret_xmlNodePtr(ret_val);
call_tests++;
- des_const_xmlNodePtr(n_node, (const xmlNodePtr)node, 0);
+ des_xmlNodePtr(n_node, node, 0);
des_int(n_extended, extended, 1);
xmlResetLastError();
if (mem_base != xmlMemBlocks()) {
xmlNodePtr node; /* the first node in the list. */
int n_node;
- for (n_node = 0;n_node < gen_nb_const_xmlNodePtr;n_node++) {
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
mem_base = xmlMemBlocks();
- node = gen_const_xmlNodePtr(n_node, 0);
+ node = gen_xmlNodePtr(n_node, 0);
- ret_val = xmlCopyNodeList((const xmlNodePtr)node);
+ ret_val = xmlCopyNodeList(node);
desret_xmlNodePtr(ret_val);
call_tests++;
- des_const_xmlNodePtr(n_node, (const xmlNodePtr)node, 0);
+ des_xmlNodePtr(n_node, node, 0);
xmlResetLastError();
if (mem_base != xmlMemBlocks()) {
printf("Leak of %d blocks found in xmlCopyNodeList",
int extended; /* if 1 do a recursive copy (properties, namespaces and children when applicable) if 2 copy properties and namespaces (when applicable) */
int n_extended;
- for (n_node = 0;n_node < gen_nb_const_xmlNodePtr;n_node++) {
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
for (n_extended = 0;n_extended < gen_nb_int;n_extended++) {
mem_base = xmlMemBlocks();
- node = gen_const_xmlNodePtr(n_node, 0);
+ node = gen_xmlNodePtr(n_node, 0);
doc = gen_xmlDocPtr(n_doc, 1);
extended = gen_int(n_extended, 2);
- ret_val = xmlDocCopyNode((const xmlNodePtr)node, doc, extended);
+ ret_val = xmlDocCopyNode(node, doc, extended);
desret_xmlNodePtr(ret_val);
call_tests++;
- des_const_xmlNodePtr(n_node, (const xmlNodePtr)node, 0);
+ des_xmlNodePtr(n_node, node, 0);
des_xmlDocPtr(n_doc, doc, 1);
des_int(n_extended, extended, 2);
xmlResetLastError();
int n_node;
for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
- for (n_node = 0;n_node < gen_nb_const_xmlNodePtr;n_node++) {
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
mem_base = xmlMemBlocks();
doc = gen_xmlDocPtr(n_doc, 0);
- node = gen_const_xmlNodePtr(n_node, 1);
+ node = gen_xmlNodePtr(n_node, 1);
- ret_val = xmlDocCopyNodeList(doc, (const xmlNodePtr)node);
+ ret_val = xmlDocCopyNodeList(doc, node);
desret_xmlNodePtr(ret_val);
call_tests++;
des_xmlDocPtr(n_doc, doc, 0);
- des_const_xmlNodePtr(n_node, (const xmlNodePtr)node, 1);
+ des_xmlNodePtr(n_node, node, 1);
xmlResetLastError();
if (mem_base != xmlMemBlocks()) {
printf("Leak of %d blocks found in xmlDocCopyNodeList",
int mem_base;
xmlNodePtr ret_val;
- xmlDocPtr doc; /* the document */
+ xmlDoc * doc; /* the document */
int n_doc;
- for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_doc = 0;n_doc < gen_nb_const_xmlDoc_ptr;n_doc++) {
mem_base = xmlMemBlocks();
- doc = gen_xmlDocPtr(n_doc, 0);
+ doc = gen_const_xmlDoc_ptr(n_doc, 0);
- ret_val = xmlDocGetRootElement(doc);
+ ret_val = xmlDocGetRootElement((const xmlDoc *)doc);
desret_xmlNodePtr(ret_val);
call_tests++;
- des_xmlDocPtr(n_doc, doc, 0);
+ des_const_xmlDoc_ptr(n_doc, (const xmlDoc *)doc, 0);
xmlResetLastError();
if (mem_base != xmlMemBlocks()) {
printf("Leak of %d blocks found in xmlDocGetRootElement",
int mem_base;
int ret_val;
- xmlDocPtr doc; /* the document */
+ xmlDoc * doc; /* the document */
int n_doc;
- for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_doc = 0;n_doc < gen_nb_const_xmlDoc_ptr;n_doc++) {
mem_base = xmlMemBlocks();
- doc = gen_xmlDocPtr(n_doc, 0);
+ doc = gen_const_xmlDoc_ptr(n_doc, 0);
- ret_val = xmlGetDocCompressMode(doc);
+ ret_val = xmlGetDocCompressMode((const xmlDoc *)doc);
desret_int(ret_val);
call_tests++;
- des_xmlDocPtr(n_doc, doc, 0);
+ des_const_xmlDoc_ptr(n_doc, (const xmlDoc *)doc, 0);
xmlResetLastError();
if (mem_base != xmlMemBlocks()) {
printf("Leak of %d blocks found in xmlGetDocCompressMode",
int mem_base;
xmlDtdPtr ret_val;
- xmlDocPtr doc; /* the document pointer */
+ xmlDoc * doc; /* the document pointer */
int n_doc;
- for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_doc = 0;n_doc < gen_nb_const_xmlDoc_ptr;n_doc++) {
mem_base = xmlMemBlocks();
- doc = gen_xmlDocPtr(n_doc, 0);
+ doc = gen_const_xmlDoc_ptr(n_doc, 0);
- ret_val = xmlGetIntSubset(doc);
+ ret_val = xmlGetIntSubset((const xmlDoc *)doc);
desret_xmlDtdPtr(ret_val);
call_tests++;
- des_xmlDocPtr(n_doc, doc, 0);
+ des_const_xmlDoc_ptr(n_doc, (const xmlDoc *)doc, 0);
xmlResetLastError();
if (mem_base != xmlMemBlocks()) {
printf("Leak of %d blocks found in xmlGetIntSubset",
int mem_base;
xmlNodePtr ret_val;
- xmlNodePtr parent; /* the parent node */
+ xmlNode * parent; /* the parent node */
int n_parent;
- for (n_parent = 0;n_parent < gen_nb_xmlNodePtr;n_parent++) {
+ for (n_parent = 0;n_parent < gen_nb_const_xmlNode_ptr;n_parent++) {
mem_base = xmlMemBlocks();
- parent = gen_xmlNodePtr(n_parent, 0);
+ parent = gen_const_xmlNode_ptr(n_parent, 0);
- ret_val = xmlGetLastChild(parent);
+ ret_val = xmlGetLastChild((const xmlNode *)parent);
desret_xmlNodePtr(ret_val);
call_tests++;
- des_xmlNodePtr(n_parent, parent, 0);
+ des_const_xmlNode_ptr(n_parent, (const xmlNode *)parent, 0);
xmlResetLastError();
if (mem_base != xmlMemBlocks()) {
printf("Leak of %d blocks found in xmlGetLastChild",
int mem_base;
long ret_val;
- xmlNodePtr node; /* valid node */
+ xmlNode * node; /* valid node */
int n_node;
- for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ for (n_node = 0;n_node < gen_nb_const_xmlNode_ptr;n_node++) {
mem_base = xmlMemBlocks();
- node = gen_xmlNodePtr(n_node, 0);
+ node = gen_const_xmlNode_ptr(n_node, 0);
- ret_val = xmlGetLineNo(node);
+ ret_val = xmlGetLineNo((const xmlNode *)node);
desret_long(ret_val);
call_tests++;
- des_xmlNodePtr(n_node, node, 0);
+ des_const_xmlNode_ptr(n_node, (const xmlNode *)node, 0);
xmlResetLastError();
if (mem_base != xmlMemBlocks()) {
printf("Leak of %d blocks found in xmlGetLineNo",
int mem_base;
xmlChar * ret_val;
- xmlNodePtr node; /* the node */
+ xmlNode * node; /* the node */
int n_node;
xmlChar * name; /* the attribute name */
int n_name;
- for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ for (n_node = 0;n_node < gen_nb_const_xmlNode_ptr;n_node++) {
for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
mem_base = xmlMemBlocks();
- node = gen_xmlNodePtr(n_node, 0);
+ node = gen_const_xmlNode_ptr(n_node, 0);
name = gen_const_xmlChar_ptr(n_name, 1);
- ret_val = xmlGetNoNsProp(node, (const xmlChar *)name);
+ ret_val = xmlGetNoNsProp((const xmlNode *)node, (const xmlChar *)name);
desret_xmlChar_ptr(ret_val);
call_tests++;
- des_xmlNodePtr(n_node, node, 0);
+ des_const_xmlNode_ptr(n_node, (const xmlNode *)node, 0);
des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
xmlResetLastError();
if (mem_base != xmlMemBlocks()) {
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED)
int mem_base;
xmlChar * ret_val;
- xmlNodePtr node; /* a node */
+ xmlNode * node; /* a node */
int n_node;
- for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ for (n_node = 0;n_node < gen_nb_const_xmlNode_ptr;n_node++) {
mem_base = xmlMemBlocks();
- node = gen_xmlNodePtr(n_node, 0);
+ node = gen_const_xmlNode_ptr(n_node, 0);
- ret_val = xmlGetNodePath(node);
+ ret_val = xmlGetNodePath((const xmlNode *)node);
desret_xmlChar_ptr(ret_val);
call_tests++;
- des_xmlNodePtr(n_node, node, 0);
+ des_const_xmlNode_ptr(n_node, (const xmlNode *)node, 0);
xmlResetLastError();
if (mem_base != xmlMemBlocks()) {
printf("Leak of %d blocks found in xmlGetNodePath",
int mem_base;
xmlChar * ret_val;
- xmlNodePtr node; /* the node */
+ xmlNode * node; /* the node */
int n_node;
xmlChar * name; /* the attribute name */
int n_name;
xmlChar * nameSpace; /* the URI of the namespace */
int n_nameSpace;
- for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ for (n_node = 0;n_node < gen_nb_const_xmlNode_ptr;n_node++) {
for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
for (n_nameSpace = 0;n_nameSpace < gen_nb_const_xmlChar_ptr;n_nameSpace++) {
mem_base = xmlMemBlocks();
- node = gen_xmlNodePtr(n_node, 0);
+ node = gen_const_xmlNode_ptr(n_node, 0);
name = gen_const_xmlChar_ptr(n_name, 1);
nameSpace = gen_const_xmlChar_ptr(n_nameSpace, 2);
- ret_val = xmlGetNsProp(node, (const xmlChar *)name, (const xmlChar *)nameSpace);
+ ret_val = xmlGetNsProp((const xmlNode *)node, (const xmlChar *)name, (const xmlChar *)nameSpace);
desret_xmlChar_ptr(ret_val);
call_tests++;
- des_xmlNodePtr(n_node, node, 0);
+ des_const_xmlNode_ptr(n_node, (const xmlNode *)node, 0);
des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
des_const_xmlChar_ptr(n_nameSpace, (const xmlChar *)nameSpace, 2);
xmlResetLastError();
int mem_base;
xmlChar * ret_val;
- xmlNodePtr node; /* the node */
+ xmlNode * node; /* the node */
int n_node;
xmlChar * name; /* the attribute name */
int n_name;
- for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ for (n_node = 0;n_node < gen_nb_const_xmlNode_ptr;n_node++) {
for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
mem_base = xmlMemBlocks();
- node = gen_xmlNodePtr(n_node, 0);
+ node = gen_const_xmlNode_ptr(n_node, 0);
name = gen_const_xmlChar_ptr(n_name, 1);
- ret_val = xmlGetProp(node, (const xmlChar *)name);
+ ret_val = xmlGetProp((const xmlNode *)node, (const xmlChar *)name);
desret_xmlChar_ptr(ret_val);
call_tests++;
- des_xmlNodePtr(n_node, node, 0);
+ des_const_xmlNode_ptr(n_node, (const xmlNode *)node, 0);
des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
xmlResetLastError();
if (mem_base != xmlMemBlocks()) {
int mem_base;
xmlAttrPtr ret_val;
- xmlNodePtr node; /* the node */
+ xmlNode * node; /* the node */
int n_node;
xmlChar * name; /* the attribute name */
int n_name;
xmlChar * nameSpace; /* the URI of the namespace */
int n_nameSpace;
- for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ for (n_node = 0;n_node < gen_nb_const_xmlNode_ptr;n_node++) {
for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
for (n_nameSpace = 0;n_nameSpace < gen_nb_const_xmlChar_ptr;n_nameSpace++) {
mem_base = xmlMemBlocks();
- node = gen_xmlNodePtr(n_node, 0);
+ node = gen_const_xmlNode_ptr(n_node, 0);
name = gen_const_xmlChar_ptr(n_name, 1);
nameSpace = gen_const_xmlChar_ptr(n_nameSpace, 2);
- ret_val = xmlHasNsProp(node, (const xmlChar *)name, (const xmlChar *)nameSpace);
+ ret_val = xmlHasNsProp((const xmlNode *)node, (const xmlChar *)name, (const xmlChar *)nameSpace);
desret_xmlAttrPtr(ret_val);
call_tests++;
- des_xmlNodePtr(n_node, node, 0);
+ des_const_xmlNode_ptr(n_node, (const xmlNode *)node, 0);
des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
des_const_xmlChar_ptr(n_nameSpace, (const xmlChar *)nameSpace, 2);
xmlResetLastError();
int mem_base;
xmlAttrPtr ret_val;
- xmlNodePtr node; /* the node */
+ xmlNode * node; /* the node */
int n_node;
xmlChar * name; /* the attribute name */
int n_name;
- for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ for (n_node = 0;n_node < gen_nb_const_xmlNode_ptr;n_node++) {
for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
mem_base = xmlMemBlocks();
- node = gen_xmlNodePtr(n_node, 0);
+ node = gen_const_xmlNode_ptr(n_node, 0);
name = gen_const_xmlChar_ptr(n_name, 1);
- ret_val = xmlHasProp(node, (const xmlChar *)name);
+ ret_val = xmlHasProp((const xmlNode *)node, (const xmlChar *)name);
desret_xmlAttrPtr(ret_val);
call_tests++;
- des_xmlNodePtr(n_node, node, 0);
+ des_const_xmlNode_ptr(n_node, (const xmlNode *)node, 0);
des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
xmlResetLastError();
if (mem_base != xmlMemBlocks()) {
int mem_base;
int ret_val;
- xmlNodePtr node; /* the node */
+ xmlNode * node; /* the node */
int n_node;
- for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ for (n_node = 0;n_node < gen_nb_const_xmlNode_ptr;n_node++) {
mem_base = xmlMemBlocks();
- node = gen_xmlNodePtr(n_node, 0);
+ node = gen_const_xmlNode_ptr(n_node, 0);
- ret_val = xmlIsBlankNode(node);
+ ret_val = xmlIsBlankNode((const xmlNode *)node);
desret_int(ret_val);
call_tests++;
- des_xmlNodePtr(n_node, node, 0);
+ des_const_xmlNode_ptr(n_node, (const xmlNode *)node, 0);
xmlResetLastError();
if (mem_base != xmlMemBlocks()) {
printf("Leak of %d blocks found in xmlIsBlankNode",
doc = gen_xmlDocPtr(n_doc, 0);
content = gen_const_xmlChar_ptr(n_content, 1);
len = gen_int(n_len, 2);
+ if ((content != NULL) &&
+ (len > (int) strlen((const char *) content) + 1))
+ continue;
ret_val = xmlNewCDataBlock(doc, (const xmlChar *)content, len);
desret_xmlNodePtr(ret_val);
int mem_base;
xmlNodePtr ret_val;
- xmlDocPtr doc; /* the document */
+ xmlDoc * doc; /* the document */
int n_doc;
xmlChar * content; /* the text content */
int n_content;
- for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_doc = 0;n_doc < gen_nb_const_xmlDoc_ptr;n_doc++) {
for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
mem_base = xmlMemBlocks();
- doc = gen_xmlDocPtr(n_doc, 0);
+ doc = gen_const_xmlDoc_ptr(n_doc, 0);
content = gen_const_xmlChar_ptr(n_content, 1);
- ret_val = xmlNewDocText(doc, (const xmlChar *)content);
+ ret_val = xmlNewDocText((const xmlDoc *)doc, (const xmlChar *)content);
desret_xmlNodePtr(ret_val);
call_tests++;
- des_xmlDocPtr(n_doc, doc, 0);
+ des_const_xmlDoc_ptr(n_doc, (const xmlDoc *)doc, 0);
des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
xmlResetLastError();
if (mem_base != xmlMemBlocks()) {
doc = gen_xmlDocPtr(n_doc, 0);
content = gen_const_xmlChar_ptr(n_content, 1);
len = gen_int(n_len, 2);
+ if ((content != NULL) &&
+ (len > (int) strlen((const char *) content) + 1))
+ continue;
ret_val = xmlNewDocTextLen(doc, (const xmlChar *)content, len);
desret_xmlNodePtr(ret_val);
int mem_base;
xmlNodePtr ret_val;
- xmlDocPtr doc; /* the document */
+ xmlDoc * doc; /* the document */
int n_doc;
xmlChar * name; /* the reference name, or the reference string with & and ; */
int n_name;
- for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_doc = 0;n_doc < gen_nb_const_xmlDoc_ptr;n_doc++) {
for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
mem_base = xmlMemBlocks();
- doc = gen_xmlDocPtr(n_doc, 0);
+ doc = gen_const_xmlDoc_ptr(n_doc, 0);
name = gen_const_xmlChar_ptr(n_name, 1);
- ret_val = xmlNewReference(doc, (const xmlChar *)name);
+ ret_val = xmlNewReference((const xmlDoc *)doc, (const xmlChar *)name);
desret_xmlNodePtr(ret_val);
call_tests++;
- des_xmlDocPtr(n_doc, doc, 0);
+ des_const_xmlDoc_ptr(n_doc, (const xmlDoc *)doc, 0);
des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
xmlResetLastError();
if (mem_base != xmlMemBlocks()) {
mem_base = xmlMemBlocks();
content = gen_const_xmlChar_ptr(n_content, 0);
len = gen_int(n_len, 1);
+ if ((content != NULL) &&
+ (len > (int) strlen((const char *) content) + 1))
+ continue;
ret_val = xmlNewTextLen((const xmlChar *)content, len);
desret_xmlNodePtr(ret_val);
cur = gen_xmlNodePtr(n_cur, 0);
content = gen_const_xmlChar_ptr(n_content, 1);
len = gen_int(n_len, 2);
+ if ((content != NULL) &&
+ (len > (int) strlen((const char *) content) + 1))
+ continue;
xmlNodeAddContentLen(cur, (const xmlChar *)content, len);
call_tests++;
int ret_val;
xmlBufferPtr buffer; /* a buffer */
int n_buffer;
- xmlNodePtr cur; /* the node being read */
+ xmlNode * cur; /* the node being read */
int n_cur;
for (n_buffer = 0;n_buffer < gen_nb_xmlBufferPtr;n_buffer++) {
- for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
+ for (n_cur = 0;n_cur < gen_nb_const_xmlNode_ptr;n_cur++) {
mem_base = xmlMemBlocks();
buffer = gen_xmlBufferPtr(n_buffer, 0);
- cur = gen_xmlNodePtr(n_cur, 1);
+ cur = gen_const_xmlNode_ptr(n_cur, 1);
- ret_val = xmlNodeBufGetContent(buffer, cur);
+ ret_val = xmlNodeBufGetContent(buffer, (const xmlNode *)cur);
desret_int(ret_val);
call_tests++;
des_xmlBufferPtr(n_buffer, buffer, 0);
- des_xmlNodePtr(n_cur, cur, 1);
+ des_const_xmlNode_ptr(n_cur, (const xmlNode *)cur, 1);
xmlResetLastError();
if (mem_base != xmlMemBlocks()) {
printf("Leak of %d blocks found in xmlNodeBufGetContent",
int mem_base;
xmlChar * ret_val;
- xmlDocPtr doc; /* the document the node pertains to */
+ xmlDoc * doc; /* the document the node pertains to */
int n_doc;
- xmlNodePtr cur; /* the node being checked */
+ xmlNode * cur; /* the node being checked */
int n_cur;
- for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
- for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
+ for (n_doc = 0;n_doc < gen_nb_const_xmlDoc_ptr;n_doc++) {
+ for (n_cur = 0;n_cur < gen_nb_const_xmlNode_ptr;n_cur++) {
mem_base = xmlMemBlocks();
- doc = gen_xmlDocPtr(n_doc, 0);
- cur = gen_xmlNodePtr(n_cur, 1);
+ doc = gen_const_xmlDoc_ptr(n_doc, 0);
+ cur = gen_const_xmlNode_ptr(n_cur, 1);
- ret_val = xmlNodeGetBase(doc, cur);
+ ret_val = xmlNodeGetBase((const xmlDoc *)doc, (const xmlNode *)cur);
desret_xmlChar_ptr(ret_val);
call_tests++;
- des_xmlDocPtr(n_doc, doc, 0);
- des_xmlNodePtr(n_cur, cur, 1);
+ des_const_xmlDoc_ptr(n_doc, (const xmlDoc *)doc, 0);
+ des_const_xmlNode_ptr(n_cur, (const xmlNode *)cur, 1);
xmlResetLastError();
if (mem_base != xmlMemBlocks()) {
printf("Leak of %d blocks found in xmlNodeGetBase",
int mem_base;
xmlChar * ret_val;
- xmlNodePtr cur; /* the node being read */
+ xmlNode * cur; /* the node being read */
int n_cur;
- for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
+ for (n_cur = 0;n_cur < gen_nb_const_xmlNode_ptr;n_cur++) {
mem_base = xmlMemBlocks();
- cur = gen_xmlNodePtr(n_cur, 0);
+ cur = gen_const_xmlNode_ptr(n_cur, 0);
- ret_val = xmlNodeGetContent(cur);
+ ret_val = xmlNodeGetContent((const xmlNode *)cur);
desret_xmlChar_ptr(ret_val);
call_tests++;
- des_xmlNodePtr(n_cur, cur, 0);
+ des_const_xmlNode_ptr(n_cur, (const xmlNode *)cur, 0);
xmlResetLastError();
if (mem_base != xmlMemBlocks()) {
printf("Leak of %d blocks found in xmlNodeGetContent",
int mem_base;
xmlChar * ret_val;
- xmlNodePtr cur; /* the node being checked */
+ xmlNode * cur; /* the node being checked */
int n_cur;
- for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
+ for (n_cur = 0;n_cur < gen_nb_const_xmlNode_ptr;n_cur++) {
mem_base = xmlMemBlocks();
- cur = gen_xmlNodePtr(n_cur, 0);
+ cur = gen_const_xmlNode_ptr(n_cur, 0);
- ret_val = xmlNodeGetLang(cur);
+ ret_val = xmlNodeGetLang((const xmlNode *)cur);
desret_xmlChar_ptr(ret_val);
call_tests++;
- des_xmlNodePtr(n_cur, cur, 0);
+ des_const_xmlNode_ptr(n_cur, (const xmlNode *)cur, 0);
xmlResetLastError();
if (mem_base != xmlMemBlocks()) {
printf("Leak of %d blocks found in xmlNodeGetLang",
int mem_base;
int ret_val;
- xmlNodePtr cur; /* the node being checked */
+ xmlNode * cur; /* the node being checked */
int n_cur;
- for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
+ for (n_cur = 0;n_cur < gen_nb_const_xmlNode_ptr;n_cur++) {
mem_base = xmlMemBlocks();
- cur = gen_xmlNodePtr(n_cur, 0);
+ cur = gen_const_xmlNode_ptr(n_cur, 0);
- ret_val = xmlNodeGetSpacePreserve(cur);
+ ret_val = xmlNodeGetSpacePreserve((const xmlNode *)cur);
desret_int(ret_val);
call_tests++;
- des_xmlNodePtr(n_cur, cur, 0);
+ des_const_xmlNode_ptr(n_cur, (const xmlNode *)cur, 0);
xmlResetLastError();
if (mem_base != xmlMemBlocks()) {
printf("Leak of %d blocks found in xmlNodeGetSpacePreserve",
int mem_base;
int ret_val;
- xmlNodePtr node; /* the node */
+ xmlNode * node; /* the node */
int n_node;
- for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ for (n_node = 0;n_node < gen_nb_const_xmlNode_ptr;n_node++) {
mem_base = xmlMemBlocks();
- node = gen_xmlNodePtr(n_node, 0);
+ node = gen_const_xmlNode_ptr(n_node, 0);
- ret_val = xmlNodeIsText(node);
+ ret_val = xmlNodeIsText((const xmlNode *)node);
desret_int(ret_val);
call_tests++;
- des_xmlNodePtr(n_node, node, 0);
+ des_const_xmlNode_ptr(n_node, (const xmlNode *)node, 0);
xmlResetLastError();
if (mem_base != xmlMemBlocks()) {
printf("Leak of %d blocks found in xmlNodeIsText",
#if defined(LIBXML_TREE_ENABLED)
int mem_base;
xmlChar * ret_val;
- xmlDocPtr doc; /* the document */
+ xmlDoc * doc; /* the document */
int n_doc;
- xmlNodePtr list; /* a Node list */
+ xmlNode * list; /* a Node list */
int n_list;
int inLine; /* should we replace entity contents or show their external form */
int n_inLine;
- for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
- for (n_list = 0;n_list < gen_nb_xmlNodePtr;n_list++) {
+ for (n_doc = 0;n_doc < gen_nb_const_xmlDoc_ptr;n_doc++) {
+ for (n_list = 0;n_list < gen_nb_const_xmlNode_ptr;n_list++) {
for (n_inLine = 0;n_inLine < gen_nb_int;n_inLine++) {
mem_base = xmlMemBlocks();
- doc = gen_xmlDocPtr(n_doc, 0);
- list = gen_xmlNodePtr(n_list, 1);
+ doc = gen_const_xmlDoc_ptr(n_doc, 0);
+ list = gen_const_xmlNode_ptr(n_list, 1);
inLine = gen_int(n_inLine, 2);
- ret_val = xmlNodeListGetRawString(doc, list, inLine);
+ ret_val = xmlNodeListGetRawString((const xmlDoc *)doc, (const xmlNode *)list, inLine);
desret_xmlChar_ptr(ret_val);
call_tests++;
- des_xmlDocPtr(n_doc, doc, 0);
- des_xmlNodePtr(n_list, list, 1);
+ des_const_xmlDoc_ptr(n_doc, (const xmlDoc *)doc, 0);
+ des_const_xmlNode_ptr(n_list, (const xmlNode *)list, 1);
des_int(n_inLine, inLine, 2);
xmlResetLastError();
if (mem_base != xmlMemBlocks()) {
xmlChar * ret_val;
xmlDocPtr doc; /* the document */
int n_doc;
- xmlNodePtr list; /* a Node list */
+ xmlNode * list; /* a Node list */
int n_list;
int inLine; /* should we replace entity contents or show their external form */
int n_inLine;
for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
- for (n_list = 0;n_list < gen_nb_xmlNodePtr;n_list++) {
+ for (n_list = 0;n_list < gen_nb_const_xmlNode_ptr;n_list++) {
for (n_inLine = 0;n_inLine < gen_nb_int;n_inLine++) {
mem_base = xmlMemBlocks();
doc = gen_xmlDocPtr(n_doc, 0);
- list = gen_xmlNodePtr(n_list, 1);
+ list = gen_const_xmlNode_ptr(n_list, 1);
inLine = gen_int(n_inLine, 2);
- ret_val = xmlNodeListGetString(doc, list, inLine);
+ ret_val = xmlNodeListGetString(doc, (const xmlNode *)list, inLine);
desret_xmlChar_ptr(ret_val);
call_tests++;
des_xmlDocPtr(n_doc, doc, 0);
- des_xmlNodePtr(n_list, list, 1);
+ des_const_xmlNode_ptr(n_list, (const xmlNode *)list, 1);
des_int(n_inLine, inLine, 2);
xmlResetLastError();
if (mem_base != xmlMemBlocks()) {
cur = gen_xmlNodePtr(n_cur, 0);
content = gen_const_xmlChar_ptr(n_content, 1);
len = gen_int(n_len, 2);
+ if ((content != NULL) &&
+ (len > (int) strlen((const char *) content) + 1))
+ continue;
xmlNodeSetContentLen(cur, (const xmlChar *)content, len);
call_tests++;
int mem_base;
xmlNodePtr ret_val;
- xmlDocPtr doc; /* the document */
+ xmlDoc * doc; /* the document */
int n_doc;
xmlChar * value; /* the value of the attribute */
int n_value;
- for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_doc = 0;n_doc < gen_nb_const_xmlDoc_ptr;n_doc++) {
for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
mem_base = xmlMemBlocks();
- doc = gen_xmlDocPtr(n_doc, 0);
+ doc = gen_const_xmlDoc_ptr(n_doc, 0);
value = gen_const_xmlChar_ptr(n_value, 1);
- ret_val = xmlStringGetNodeList(doc, (const xmlChar *)value);
+ ret_val = xmlStringGetNodeList((const xmlDoc *)doc, (const xmlChar *)value);
desret_xmlNodePtr(ret_val);
call_tests++;
- des_xmlDocPtr(n_doc, doc, 0);
+ des_const_xmlDoc_ptr(n_doc, (const xmlDoc *)doc, 0);
des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 1);
xmlResetLastError();
if (mem_base != xmlMemBlocks()) {
int mem_base;
xmlNodePtr ret_val;
- xmlDocPtr doc; /* the document */
+ xmlDoc * doc; /* the document */
int n_doc;
xmlChar * value; /* the value of the text */
int n_value;
int len; /* the length of the string value */
int n_len;
- for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_doc = 0;n_doc < gen_nb_const_xmlDoc_ptr;n_doc++) {
for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
for (n_len = 0;n_len < gen_nb_int;n_len++) {
mem_base = xmlMemBlocks();
- doc = gen_xmlDocPtr(n_doc, 0);
+ doc = gen_const_xmlDoc_ptr(n_doc, 0);
value = gen_const_xmlChar_ptr(n_value, 1);
len = gen_int(n_len, 2);
+ if ((value != NULL) &&
+ (len > (int) strlen((const char *) value) + 1))
+ continue;
- ret_val = xmlStringLenGetNodeList(doc, (const xmlChar *)value, len);
+ ret_val = xmlStringLenGetNodeList((const xmlDoc *)doc, (const xmlChar *)value, len);
desret_xmlNodePtr(ret_val);
call_tests++;
- des_xmlDocPtr(n_doc, doc, 0);
+ des_const_xmlDoc_ptr(n_doc, (const xmlDoc *)doc, 0);
des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 1);
des_int(n_len, len, 2);
xmlResetLastError();
node = gen_xmlNodePtr(n_node, 0);
content = gen_const_xmlChar_ptr(n_content, 1);
len = gen_int(n_len, 2);
+ if ((content != NULL) &&
+ (len > (int) strlen((const char *) content) + 1))
+ continue;
ret_val = xmlTextConcat(node, (const xmlChar *)content, len);
desret_int(ret_val);
test_xmlValidateNCName(void) {
int test_ret = 0;
-#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || defined (LIBXML_HTML_ENABLED) || defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED)
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || defined (LIBXML_HTML_ENABLED) || defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
#ifdef LIBXML_TREE_ENABLED
int mem_base;
int ret_val;
static int
test_tree(void) {
int test_ret = 0;
-
- if (quiet == 0) printf("Testing tree : 139 of 158 functions ...\n");
- test_ret += test_xmlAddChild();
- test_ret += test_xmlAddChildList();
- test_ret += test_xmlAddNextSibling();
- test_ret += test_xmlAddPrevSibling();
- test_ret += test_xmlAddSibling();
- test_ret += test_xmlAttrSerializeTxtContent();
- test_ret += test_xmlBufferAdd();
- test_ret += test_xmlBufferAddHead();
- test_ret += test_xmlBufferCCat();
- test_ret += test_xmlBufferCat();
- test_ret += test_xmlBufferContent();
- test_ret += test_xmlBufferCreate();
- test_ret += test_xmlBufferCreateSize();
- test_ret += test_xmlBufferCreateStatic();
- test_ret += test_xmlBufferDetach();
- test_ret += test_xmlBufferEmpty();
- test_ret += test_xmlBufferGrow();
- test_ret += test_xmlBufferLength();
- test_ret += test_xmlBufferResize();
- test_ret += test_xmlBufferSetAllocationScheme();
- test_ret += test_xmlBufferShrink();
- test_ret += test_xmlBufferWriteCHAR();
- test_ret += test_xmlBufferWriteChar();
- test_ret += test_xmlBufferWriteQuotedString();
- test_ret += test_xmlBuildQName();
- test_ret += test_xmlChildElementCount();
- test_ret += test_xmlCopyDoc();
- test_ret += test_xmlCopyDtd();
- test_ret += test_xmlCopyNamespace();
- test_ret += test_xmlCopyNamespaceList();
- test_ret += test_xmlCopyNode();
- test_ret += test_xmlCopyNodeList();
- test_ret += test_xmlCopyProp();
- test_ret += test_xmlCopyPropList();
- test_ret += test_xmlCreateIntSubset();
- test_ret += test_xmlDOMWrapAdoptNode();
- test_ret += test_xmlDOMWrapCloneNode();
- test_ret += test_xmlDOMWrapNewCtxt();
- test_ret += test_xmlDOMWrapReconcileNamespaces();
- test_ret += test_xmlDOMWrapRemoveNode();
- test_ret += test_xmlDocCopyNode();
- test_ret += test_xmlDocCopyNodeList();
- test_ret += test_xmlDocDump();
- test_ret += test_xmlDocDumpFormatMemory();
- test_ret += test_xmlDocDumpFormatMemoryEnc();
- test_ret += test_xmlDocDumpMemory();
- test_ret += test_xmlDocDumpMemoryEnc();
- test_ret += test_xmlDocFormatDump();
- test_ret += test_xmlDocGetRootElement();
- test_ret += test_xmlDocSetRootElement();
- test_ret += test_xmlElemDump();
- test_ret += test_xmlFirstElementChild();
- test_ret += test_xmlGetBufferAllocationScheme();
- test_ret += test_xmlGetCompressMode();
- test_ret += test_xmlGetDocCompressMode();
- test_ret += test_xmlGetIntSubset();
- test_ret += test_xmlGetLastChild();
- test_ret += test_xmlGetLineNo();
- test_ret += test_xmlGetNoNsProp();
- test_ret += test_xmlGetNodePath();
- test_ret += test_xmlGetNsList();
- test_ret += test_xmlGetNsProp();
- test_ret += test_xmlGetProp();
- test_ret += test_xmlHasNsProp();
- test_ret += test_xmlHasProp();
- test_ret += test_xmlIsBlankNode();
- test_ret += test_xmlIsXHTML();
- test_ret += test_xmlLastElementChild();
- test_ret += test_xmlNewCDataBlock();
- test_ret += test_xmlNewCharRef();
- test_ret += test_xmlNewChild();
- test_ret += test_xmlNewComment();
- test_ret += test_xmlNewDoc();
- test_ret += test_xmlNewDocComment();
- test_ret += test_xmlNewDocFragment();
- test_ret += test_xmlNewDocNode();
- test_ret += test_xmlNewDocNodeEatName();
- test_ret += test_xmlNewDocPI();
- test_ret += test_xmlNewDocProp();
- test_ret += test_xmlNewDocRawNode();
- test_ret += test_xmlNewDocText();
- test_ret += test_xmlNewDocTextLen();
- test_ret += test_xmlNewDtd();
- test_ret += test_xmlNewNode();
- test_ret += test_xmlNewNodeEatName();
- test_ret += test_xmlNewNs();
- test_ret += test_xmlNewNsProp();
- test_ret += test_xmlNewNsPropEatName();
- test_ret += test_xmlNewPI();
- test_ret += test_xmlNewProp();
- test_ret += test_xmlNewReference();
- test_ret += test_xmlNewText();
- test_ret += test_xmlNewTextChild();
- test_ret += test_xmlNewTextLen();
- test_ret += test_xmlNextElementSibling();
- test_ret += test_xmlNodeAddContent();
- test_ret += test_xmlNodeAddContentLen();
- test_ret += test_xmlNodeBufGetContent();
- test_ret += test_xmlNodeDump();
- test_ret += test_xmlNodeDumpOutput();
- test_ret += test_xmlNodeGetBase();
- test_ret += test_xmlNodeGetContent();
- test_ret += test_xmlNodeGetLang();
- test_ret += test_xmlNodeGetSpacePreserve();
- test_ret += test_xmlNodeIsText();
- test_ret += test_xmlNodeListGetRawString();
- test_ret += test_xmlNodeListGetString();
- test_ret += test_xmlNodeSetBase();
- test_ret += test_xmlNodeSetContent();
- test_ret += test_xmlNodeSetContentLen();
- test_ret += test_xmlNodeSetLang();
- test_ret += test_xmlNodeSetName();
- test_ret += test_xmlNodeSetSpacePreserve();
- test_ret += test_xmlPreviousElementSibling();
- test_ret += test_xmlReconciliateNs();
- test_ret += test_xmlRemoveProp();
- test_ret += test_xmlReplaceNode();
- test_ret += test_xmlSaveFile();
- test_ret += test_xmlSaveFileEnc();
- test_ret += test_xmlSaveFileTo();
- test_ret += test_xmlSaveFormatFile();
- test_ret += test_xmlSaveFormatFileEnc();
- test_ret += test_xmlSaveFormatFileTo();
- test_ret += test_xmlSearchNs();
- test_ret += test_xmlSearchNsByHref();
- test_ret += test_xmlSetBufferAllocationScheme();
- test_ret += test_xmlSetCompressMode();
- test_ret += test_xmlSetDocCompressMode();
- test_ret += test_xmlSetNs();
- test_ret += test_xmlSetNsProp();
- test_ret += test_xmlSetProp();
- test_ret += test_xmlSplitQName2();
- test_ret += test_xmlSplitQName3();
- test_ret += test_xmlStringGetNodeList();
- test_ret += test_xmlStringLenGetNodeList();
- test_ret += test_xmlTextConcat();
- test_ret += test_xmlTextMerge();
- test_ret += test_xmlUnsetNsProp();
- test_ret += test_xmlUnsetProp();
- test_ret += test_xmlValidateNCName();
- test_ret += test_xmlValidateNMToken();
- test_ret += test_xmlValidateName();
- test_ret += test_xmlValidateQName();
+ int rc = 0;
+
+ if (quiet == 0) printf("Testing tree : 142 of 164 functions ...\n");
+ rc = test_xmlAddChild();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlAddChildList();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlAddNextSibling();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlAddPrevSibling();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlAddSibling();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlAttrSerializeTxtContent();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlBufContent();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlBufEnd();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlBufGetNodeContent();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlBufNodeDump();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlBufShrink();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlBufUse();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlBufferAdd();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlBufferAddHead();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlBufferCCat();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlBufferCat();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlBufferContent();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlBufferCreate();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlBufferCreateSize();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlBufferCreateStatic();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlBufferDetach();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlBufferEmpty();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlBufferGrow();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlBufferLength();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlBufferResize();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlBufferSetAllocationScheme();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlBufferShrink();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlBufferWriteCHAR();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlBufferWriteChar();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlBufferWriteQuotedString();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlBuildQName();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlChildElementCount();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCopyDoc();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCopyDtd();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCopyNamespace();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCopyNamespaceList();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCopyNode();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCopyNodeList();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCopyProp();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCopyPropList();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCreateIntSubset();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDOMWrapAdoptNode();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDOMWrapCloneNode();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDOMWrapNewCtxt();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDOMWrapReconcileNamespaces();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDOMWrapRemoveNode();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDocCopyNode();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDocCopyNodeList();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDocDump();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDocDumpFormatMemory();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDocDumpFormatMemoryEnc();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDocDumpMemory();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDocDumpMemoryEnc();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDocFormatDump();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDocGetRootElement();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDocSetRootElement();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlElemDump();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlFirstElementChild();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlGetBufferAllocationScheme();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlGetCompressMode();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlGetDocCompressMode();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlGetIntSubset();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlGetLastChild();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlGetLineNo();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlGetNoNsProp();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlGetNodePath();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlGetNsList();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlGetNsProp();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlGetProp();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlHasNsProp();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlHasProp();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlIsBlankNode();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlIsXHTML();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlLastElementChild();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNewCDataBlock();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNewCharRef();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNewChild();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNewComment();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNewDoc();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNewDocComment();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNewDocFragment();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNewDocNode();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNewDocNodeEatName();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNewDocPI();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNewDocProp();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNewDocRawNode();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNewDocText();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNewDocTextLen();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNewDtd();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNewNode();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNewNodeEatName();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNewNs();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNewNsProp();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNewNsPropEatName();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNewPI();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNewProp();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNewReference();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNewText();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNewTextChild();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNewTextLen();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNextElementSibling();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNodeAddContent();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNodeAddContentLen();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNodeBufGetContent();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNodeDump();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNodeDumpOutput();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNodeGetBase();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNodeGetContent();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNodeGetLang();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNodeGetSpacePreserve();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNodeIsText();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNodeListGetRawString();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNodeListGetString();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNodeSetBase();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNodeSetContent();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNodeSetContentLen();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNodeSetLang();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNodeSetName();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNodeSetSpacePreserve();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlPreviousElementSibling();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlReconciliateNs();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlRemoveProp();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlReplaceNode();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSaveFile();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSaveFileEnc();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSaveFileTo();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSaveFormatFile();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSaveFormatFileEnc();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSaveFormatFileTo();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSearchNs();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSearchNsByHref();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSetBufferAllocationScheme();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSetCompressMode();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSetDocCompressMode();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSetNs();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSetNsProp();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSetProp();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSplitQName2();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSplitQName3();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlStringGetNodeList();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlStringLenGetNodeList();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextConcat();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextMerge();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUnsetNsProp();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUnsetProp();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlValidateNCName();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlValidateNMToken();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlValidateName();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlValidateQName();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
if (test_ret != 0)
printf("Module tree: %d errors\n", test_ret);
static int
test_uri(void) {
int test_ret = 0;
+ int rc = 0;
if (quiet == 0) printf("Testing uri : 10 of 15 functions ...\n");
- test_ret += test_xmlBuildRelativeURI();
- test_ret += test_xmlBuildURI();
- test_ret += test_xmlCanonicPath();
- test_ret += test_xmlCreateURI();
- test_ret += test_xmlNormalizeURIPath();
- test_ret += test_xmlParseURI();
- test_ret += test_xmlParseURIRaw();
- test_ret += test_xmlParseURIReference();
- test_ret += test_xmlPathToURI();
- test_ret += test_xmlPrintURI();
- test_ret += test_xmlSaveUri();
- test_ret += test_xmlURIEscape();
- test_ret += test_xmlURIEscapeStr();
- test_ret += test_xmlURIUnescapeString();
+ rc = test_xmlBuildRelativeURI();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlBuildURI();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCanonicPath();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCreateURI();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNormalizeURIPath();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlParseURI();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlParseURIRaw();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlParseURIReference();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlPathToURI();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlPrintURI();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSaveUri();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlURIEscape();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlURIEscapeStr();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlURIUnescapeString();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
if (test_ret != 0)
printf("Module uri: %d errors\n", test_ret);
int n_ctxt;
xmlChar * data; /* some character data read */
int n_data;
- int len; /* the lenght of the data */
+ int len; /* the length of the data */
int n_len;
for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
data = gen_const_xmlChar_ptr(n_data, 1);
len = gen_int(n_len, 2);
+ if ((data != NULL) &&
+ (len > (int) strlen((const char *) data) + 1))
+ continue;
ret_val = xmlValidatePushCData(ctxt, (const xmlChar *)data, len);
desret_int(ret_val);
static int
test_valid(void) {
int test_ret = 0;
+ int rc = 0;
if (quiet == 0) printf("Testing valid : 50 of 70 functions ...\n");
- test_ret += test_xmlAddAttributeDecl();
- test_ret += test_xmlAddElementDecl();
- test_ret += test_xmlAddID();
- test_ret += test_xmlAddNotationDecl();
- test_ret += test_xmlAddRef();
- test_ret += test_xmlCopyAttributeTable();
- test_ret += test_xmlCopyDocElementContent();
- test_ret += test_xmlCopyElementContent();
- test_ret += test_xmlCopyElementTable();
- test_ret += test_xmlCopyEnumeration();
- test_ret += test_xmlCopyNotationTable();
- test_ret += test_xmlCreateEnumeration();
- test_ret += test_xmlDumpAttributeDecl();
- test_ret += test_xmlDumpAttributeTable();
- test_ret += test_xmlDumpElementDecl();
- test_ret += test_xmlDumpElementTable();
- test_ret += test_xmlDumpNotationDecl();
- test_ret += test_xmlDumpNotationTable();
- test_ret += test_xmlGetDtdAttrDesc();
- test_ret += test_xmlGetDtdElementDesc();
- test_ret += test_xmlGetDtdNotationDesc();
- test_ret += test_xmlGetDtdQAttrDesc();
- test_ret += test_xmlGetDtdQElementDesc();
- test_ret += test_xmlGetID();
- test_ret += test_xmlGetRefs();
- test_ret += test_xmlIsID();
- test_ret += test_xmlIsMixedElement();
- test_ret += test_xmlIsRef();
- test_ret += test_xmlNewDocElementContent();
- test_ret += test_xmlNewElementContent();
- test_ret += test_xmlNewValidCtxt();
- test_ret += test_xmlRemoveID();
- test_ret += test_xmlRemoveRef();
- test_ret += test_xmlSnprintfElementContent();
- test_ret += test_xmlSprintfElementContent();
- test_ret += test_xmlValidBuildContentModel();
- test_ret += test_xmlValidCtxtNormalizeAttributeValue();
- test_ret += test_xmlValidGetPotentialChildren();
- test_ret += test_xmlValidGetValidElements();
- test_ret += test_xmlValidNormalizeAttributeValue();
- test_ret += test_xmlValidateAttributeDecl();
- test_ret += test_xmlValidateAttributeValue();
- test_ret += test_xmlValidateDocument();
- test_ret += test_xmlValidateDocumentFinal();
- test_ret += test_xmlValidateDtd();
- test_ret += test_xmlValidateDtdFinal();
- test_ret += test_xmlValidateElement();
- test_ret += test_xmlValidateElementDecl();
- test_ret += test_xmlValidateNameValue();
- test_ret += test_xmlValidateNamesValue();
- test_ret += test_xmlValidateNmtokenValue();
- test_ret += test_xmlValidateNmtokensValue();
- test_ret += test_xmlValidateNotationDecl();
- test_ret += test_xmlValidateNotationUse();
- test_ret += test_xmlValidateOneAttribute();
- test_ret += test_xmlValidateOneElement();
- test_ret += test_xmlValidateOneNamespace();
- test_ret += test_xmlValidatePopElement();
- test_ret += test_xmlValidatePushCData();
- test_ret += test_xmlValidatePushElement();
- test_ret += test_xmlValidateRoot();
+ rc = test_xmlAddAttributeDecl();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlAddElementDecl();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlAddID();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlAddNotationDecl();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlAddRef();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCopyAttributeTable();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCopyDocElementContent();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCopyElementContent();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCopyElementTable();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCopyEnumeration();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCopyNotationTable();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCreateEnumeration();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDumpAttributeDecl();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDumpAttributeTable();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDumpElementDecl();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDumpElementTable();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDumpNotationDecl();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlDumpNotationTable();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlGetDtdAttrDesc();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlGetDtdElementDesc();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlGetDtdNotationDesc();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlGetDtdQAttrDesc();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlGetDtdQElementDesc();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlGetID();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlGetRefs();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlIsID();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlIsMixedElement();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlIsRef();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNewDocElementContent();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNewElementContent();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNewValidCtxt();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlRemoveID();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlRemoveRef();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSnprintfElementContent();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSprintfElementContent();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlValidBuildContentModel();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlValidCtxtNormalizeAttributeValue();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlValidGetPotentialChildren();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlValidGetValidElements();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlValidNormalizeAttributeValue();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlValidateAttributeDecl();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlValidateAttributeValue();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlValidateDocument();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlValidateDocumentFinal();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlValidateDtd();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlValidateDtdFinal();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlValidateElement();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlValidateElementDecl();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlValidateNameValue();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlValidateNamesValue();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlValidateNmtokenValue();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlValidateNmtokensValue();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlValidateNotationDecl();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlValidateNotationUse();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlValidateOneAttribute();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlValidateOneElement();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlValidateOneNamespace();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlValidatePopElement();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlValidatePushCData();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlValidatePushElement();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlValidateRoot();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
if (test_ret != 0)
printf("Module valid: %d errors\n", test_ret);
static int
test_xinclude(void) {
int test_ret = 0;
+ int rc = 0;
if (quiet == 0) printf("Testing xinclude : 8 of 10 functions ...\n");
- test_ret += test_xmlXIncludeNewContext();
- test_ret += test_xmlXIncludeProcess();
- test_ret += test_xmlXIncludeProcessFlags();
- test_ret += test_xmlXIncludeProcessFlagsData();
- test_ret += test_xmlXIncludeProcessNode();
- test_ret += test_xmlXIncludeProcessTree();
- test_ret += test_xmlXIncludeProcessTreeFlags();
- test_ret += test_xmlXIncludeProcessTreeFlagsData();
- test_ret += test_xmlXIncludeSetFlags();
+ rc = test_xmlXIncludeNewContext();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXIncludeProcess();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXIncludeProcessFlags();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXIncludeProcessFlagsData();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXIncludeProcessNode();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXIncludeProcessTree();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXIncludeProcessTreeFlags();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXIncludeProcessTreeFlagsData();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXIncludeSetFlags();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
if (test_ret != 0)
printf("Module xinclude: %d errors\n", test_ret);
static int
+test_xmlOutputBufferGetContent(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ const xmlChar * ret_val;
+ xmlOutputBufferPtr out; /* an xmlOutputBufferPtr */
+ int n_out;
+
+ for (n_out = 0;n_out < gen_nb_xmlOutputBufferPtr;n_out++) {
+ mem_base = xmlMemBlocks();
+ out = gen_xmlOutputBufferPtr(n_out, 0);
+
+ ret_val = xmlOutputBufferGetContent(out);
+ desret_const_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlOutputBufferPtr(n_out, out, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlOutputBufferGetContent",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_out);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlOutputBufferGetSize(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
test_xmlOutputBufferWrite(void) {
int test_ret = 0;
out = gen_xmlOutputBufferPtr(n_out, 0);
len = gen_int(n_len, 1);
buf = gen_const_char_ptr(n_buf, 2);
+ if ((buf != NULL) &&
+ (len > (int) strlen((const char *) buf) + 1))
+ continue;
ret_val = xmlOutputBufferWrite(out, len, (const char *)buf);
desret_int(ret_val);
mem = gen_const_char_ptr(n_mem, 0);
size = gen_int(n_size, 1);
enc = gen_xmlCharEncoding(n_enc, 2);
+ if ((mem != NULL) &&
+ (size > (int) strlen((const char *) mem) + 1))
+ continue;
ret_val = xmlParserInputBufferCreateMem((const char *)mem, size, enc);
desret_xmlParserInputBufferPtr(ret_val);
mem = gen_const_char_ptr(n_mem, 0);
size = gen_int(n_size, 1);
enc = gen_xmlCharEncoding(n_enc, 2);
+ if ((mem != NULL) &&
+ (size > (int) strlen((const char *) mem) + 1))
+ continue;
ret_val = xmlParserInputBufferCreateStatic((const char *)mem, size, enc);
desret_xmlParserInputBufferPtr(ret_val);
in = gen_xmlParserInputBufferPtr(n_in, 0);
len = gen_int(n_len, 1);
buf = gen_const_char_ptr(n_buf, 2);
+ if ((buf != NULL) &&
+ (len > (int) strlen((const char *) buf) + 1))
+ continue;
ret_val = xmlParserInputBufferPush(in, len, (const char *)buf);
desret_int(ret_val);
static int
test_xmlIO(void) {
int test_ret = 0;
-
- if (quiet == 0) printf("Testing xmlIO : 39 of 48 functions ...\n");
- test_ret += test_xmlAllocOutputBuffer();
- test_ret += test_xmlAllocParserInputBuffer();
- test_ret += test_xmlCheckFilename();
- test_ret += test_xmlCheckHTTPInput();
- test_ret += test_xmlCleanupInputCallbacks();
- test_ret += test_xmlCleanupOutputCallbacks();
- test_ret += test_xmlFileClose();
- test_ret += test_xmlFileMatch();
- test_ret += test_xmlFileOpen();
- test_ret += test_xmlFileRead();
- test_ret += test_xmlIOFTPClose();
- test_ret += test_xmlIOFTPMatch();
- test_ret += test_xmlIOFTPOpen();
- test_ret += test_xmlIOFTPRead();
- test_ret += test_xmlIOHTTPClose();
- test_ret += test_xmlIOHTTPMatch();
- test_ret += test_xmlIOHTTPOpen();
- test_ret += test_xmlIOHTTPRead();
- test_ret += test_xmlNoNetExternalEntityLoader();
- test_ret += test_xmlNormalizeWindowsPath();
- test_ret += test_xmlOutputBufferCreateBuffer();
- test_ret += test_xmlOutputBufferCreateFd();
- test_ret += test_xmlOutputBufferCreateFile();
- test_ret += test_xmlOutputBufferCreateFilename();
- test_ret += test_xmlOutputBufferFlush();
- test_ret += test_xmlOutputBufferWrite();
- test_ret += test_xmlOutputBufferWriteEscape();
- test_ret += test_xmlOutputBufferWriteString();
- test_ret += test_xmlParserGetDirectory();
- test_ret += test_xmlParserInputBufferCreateFd();
- test_ret += test_xmlParserInputBufferCreateFile();
- test_ret += test_xmlParserInputBufferCreateFilename();
- test_ret += test_xmlParserInputBufferCreateMem();
- test_ret += test_xmlParserInputBufferCreateStatic();
- test_ret += test_xmlParserInputBufferGrow();
- test_ret += test_xmlParserInputBufferPush();
- test_ret += test_xmlParserInputBufferRead();
- test_ret += test_xmlPopInputCallbacks();
- test_ret += test_xmlRegisterDefaultInputCallbacks();
- test_ret += test_xmlRegisterDefaultOutputCallbacks();
- test_ret += test_xmlRegisterHTTPPostCallbacks();
+ int rc = 0;
+
+ if (quiet == 0) printf("Testing xmlIO : 40 of 50 functions ...\n");
+ rc = test_xmlAllocOutputBuffer();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlAllocParserInputBuffer();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCheckFilename();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCheckHTTPInput();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCleanupInputCallbacks();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCleanupOutputCallbacks();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlFileClose();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlFileMatch();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlFileOpen();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlFileRead();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlIOFTPClose();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlIOFTPMatch();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlIOFTPOpen();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlIOFTPRead();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlIOHTTPClose();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlIOHTTPMatch();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlIOHTTPOpen();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlIOHTTPRead();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNoNetExternalEntityLoader();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNormalizeWindowsPath();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlOutputBufferCreateBuffer();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlOutputBufferCreateFd();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlOutputBufferCreateFile();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlOutputBufferCreateFilename();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlOutputBufferFlush();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlOutputBufferGetContent();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlOutputBufferGetSize();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlOutputBufferWrite();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlOutputBufferWriteEscape();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlOutputBufferWriteString();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlParserGetDirectory();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlParserInputBufferCreateFd();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlParserInputBufferCreateFile();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlParserInputBufferCreateFilename();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlParserInputBufferCreateMem();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlParserInputBufferCreateStatic();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlParserInputBufferGrow();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlParserInputBufferPush();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlParserInputBufferRead();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlPopInputCallbacks();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlRegisterDefaultInputCallbacks();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlRegisterDefaultOutputCallbacks();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlRegisterHTTPPostCallbacks();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
if (test_ret != 0)
printf("Module xmlIO: %d errors\n", test_ret);
static int
test_xmlautomata(void) {
int test_ret = 0;
+ int rc = 0;
if (quiet == 0) printf("Testing xmlautomata : 3 of 19 functions ...\n");
- test_ret += test_xmlAutomataCompile();
- test_ret += test_xmlAutomataGetInitState();
- test_ret += test_xmlAutomataIsDeterminist();
- test_ret += test_xmlAutomataNewAllTrans();
- test_ret += test_xmlAutomataNewCountTrans();
- test_ret += test_xmlAutomataNewCountTrans2();
- test_ret += test_xmlAutomataNewCountedTrans();
- test_ret += test_xmlAutomataNewCounter();
- test_ret += test_xmlAutomataNewCounterTrans();
- test_ret += test_xmlAutomataNewEpsilon();
- test_ret += test_xmlAutomataNewNegTrans();
- test_ret += test_xmlAutomataNewOnceTrans();
- test_ret += test_xmlAutomataNewOnceTrans2();
- test_ret += test_xmlAutomataNewState();
- test_ret += test_xmlAutomataNewTransition();
- test_ret += test_xmlAutomataNewTransition2();
- test_ret += test_xmlAutomataSetFinalState();
- test_ret += test_xmlNewAutomata();
+ rc = test_xmlAutomataCompile();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlAutomataGetInitState();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlAutomataIsDeterminist();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlAutomataNewAllTrans();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlAutomataNewCountTrans();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlAutomataNewCountTrans2();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlAutomataNewCountedTrans();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlAutomataNewCounter();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlAutomataNewCounterTrans();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlAutomataNewEpsilon();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlAutomataNewNegTrans();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlAutomataNewOnceTrans();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlAutomataNewOnceTrans2();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlAutomataNewState();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlAutomataNewTransition();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlAutomataNewTransition2();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlAutomataSetFinalState();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNewAutomata();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
if (test_ret != 0)
printf("Module xmlautomata: %d errors\n", test_ret);
static int
test_xmlerror(void) {
int test_ret = 0;
+ int rc = 0;
if (quiet == 0) printf("Testing xmlerror : 7 of 15 functions ...\n");
- test_ret += test_initGenericErrorDefaultFunc();
- test_ret += test_xmlCopyError();
- test_ret += test_xmlCtxtGetLastError();
- test_ret += test_xmlCtxtResetLastError();
- test_ret += test_xmlGetLastError();
- test_ret += test_xmlParserError();
- test_ret += test_xmlParserPrintFileContext();
- test_ret += test_xmlParserPrintFileInfo();
- test_ret += test_xmlParserValidityError();
- test_ret += test_xmlParserValidityWarning();
- test_ret += test_xmlParserWarning();
- test_ret += test_xmlResetError();
- test_ret += test_xmlResetLastError();
- test_ret += test_xmlSetGenericErrorFunc();
- test_ret += test_xmlSetStructuredErrorFunc();
+ rc = test_initGenericErrorDefaultFunc();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCopyError();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCtxtGetLastError();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCtxtResetLastError();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlGetLastError();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlParserError();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlParserPrintFileContext();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlParserPrintFileInfo();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlParserValidityError();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlParserValidityWarning();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlParserWarning();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlResetError();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlResetLastError();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSetGenericErrorFunc();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSetStructuredErrorFunc();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
if (test_ret != 0)
printf("Module xmlerror: %d errors\n", test_ret);
static int
test_xmlmodule(void) {
int test_ret = 0;
+ int rc = 0;
if (quiet == 0) printf("Testing xmlmodule : 2 of 4 functions ...\n");
- test_ret += test_xmlModuleClose();
- test_ret += test_xmlModuleOpen();
- test_ret += test_xmlModuleSymbol();
+ rc = test_xmlModuleClose();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlModuleOpen();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlModuleSymbol();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
if (test_ret != 0)
printf("Module xmlmodule: %d errors\n", test_ret);
URL = gen_filepath(n_URL, 2);
encoding = gen_const_char_ptr(n_encoding, 3);
options = gen_parseroptions(n_options, 4);
+ if ((buffer != NULL) &&
+ (size > (int) strlen((const char *) buffer) + 1))
+ continue;
ret_val = xmlReaderForMemory((const char *)buffer, size, URL, (const char *)encoding, options);
desret_xmlTextReaderPtr(ret_val);
URL = gen_filepath(n_URL, 3);
encoding = gen_const_char_ptr(n_encoding, 4);
options = gen_parseroptions(n_options, 5);
+ if ((buffer != NULL) &&
+ (size > (int) strlen((const char *) buffer) + 1))
+ continue;
ret_val = xmlReaderNewMemory(reader, (const char *)buffer, size, URL, (const char *)encoding, options);
desret_int(ret_val);
static int
test_xmlreader(void) {
int test_ret = 0;
+ int rc = 0;
if (quiet == 0) printf("Testing xmlreader : 76 of 86 functions ...\n");
- test_ret += test_xmlNewTextReader();
- test_ret += test_xmlNewTextReaderFilename();
- test_ret += test_xmlReaderForDoc();
- test_ret += test_xmlReaderForFile();
- test_ret += test_xmlReaderForMemory();
- test_ret += test_xmlReaderNewDoc();
- test_ret += test_xmlReaderNewFile();
- test_ret += test_xmlReaderNewMemory();
- test_ret += test_xmlReaderNewWalker();
- test_ret += test_xmlReaderWalker();
- test_ret += test_xmlTextReaderAttributeCount();
- test_ret += test_xmlTextReaderBaseUri();
- test_ret += test_xmlTextReaderByteConsumed();
- test_ret += test_xmlTextReaderClose();
- test_ret += test_xmlTextReaderConstBaseUri();
- test_ret += test_xmlTextReaderConstEncoding();
- test_ret += test_xmlTextReaderConstLocalName();
- test_ret += test_xmlTextReaderConstName();
- test_ret += test_xmlTextReaderConstNamespaceUri();
- test_ret += test_xmlTextReaderConstPrefix();
- test_ret += test_xmlTextReaderConstString();
- test_ret += test_xmlTextReaderConstValue();
- test_ret += test_xmlTextReaderConstXmlLang();
- test_ret += test_xmlTextReaderConstXmlVersion();
- test_ret += test_xmlTextReaderCurrentDoc();
- test_ret += test_xmlTextReaderCurrentNode();
- test_ret += test_xmlTextReaderDepth();
- test_ret += test_xmlTextReaderExpand();
- test_ret += test_xmlTextReaderGetAttribute();
- test_ret += test_xmlTextReaderGetAttributeNo();
- test_ret += test_xmlTextReaderGetAttributeNs();
- test_ret += test_xmlTextReaderGetErrorHandler();
- test_ret += test_xmlTextReaderGetParserColumnNumber();
- test_ret += test_xmlTextReaderGetParserLineNumber();
- test_ret += test_xmlTextReaderGetParserProp();
- test_ret += test_xmlTextReaderGetRemainder();
- test_ret += test_xmlTextReaderHasAttributes();
- test_ret += test_xmlTextReaderHasValue();
- test_ret += test_xmlTextReaderIsDefault();
- test_ret += test_xmlTextReaderIsEmptyElement();
- test_ret += test_xmlTextReaderIsNamespaceDecl();
- test_ret += test_xmlTextReaderIsValid();
- test_ret += test_xmlTextReaderLocalName();
- test_ret += test_xmlTextReaderLocatorBaseURI();
- test_ret += test_xmlTextReaderLocatorLineNumber();
- test_ret += test_xmlTextReaderLookupNamespace();
- test_ret += test_xmlTextReaderMoveToAttribute();
- test_ret += test_xmlTextReaderMoveToAttributeNo();
- test_ret += test_xmlTextReaderMoveToAttributeNs();
- test_ret += test_xmlTextReaderMoveToElement();
- test_ret += test_xmlTextReaderMoveToFirstAttribute();
- test_ret += test_xmlTextReaderMoveToNextAttribute();
- test_ret += test_xmlTextReaderName();
- test_ret += test_xmlTextReaderNamespaceUri();
- test_ret += test_xmlTextReaderNext();
- test_ret += test_xmlTextReaderNextSibling();
- test_ret += test_xmlTextReaderNodeType();
- test_ret += test_xmlTextReaderNormalization();
- test_ret += test_xmlTextReaderPrefix();
- test_ret += test_xmlTextReaderPreserve();
- test_ret += test_xmlTextReaderPreservePattern();
- test_ret += test_xmlTextReaderQuoteChar();
- test_ret += test_xmlTextReaderRead();
- test_ret += test_xmlTextReaderReadAttributeValue();
- test_ret += test_xmlTextReaderReadState();
- test_ret += test_xmlTextReaderRelaxNGSetSchema();
- test_ret += test_xmlTextReaderRelaxNGValidate();
- test_ret += test_xmlTextReaderRelaxNGValidateCtxt();
- test_ret += test_xmlTextReaderSchemaValidate();
- test_ret += test_xmlTextReaderSchemaValidateCtxt();
- test_ret += test_xmlTextReaderSetErrorHandler();
- test_ret += test_xmlTextReaderSetParserProp();
- test_ret += test_xmlTextReaderSetSchema();
- test_ret += test_xmlTextReaderSetStructuredErrorHandler();
- test_ret += test_xmlTextReaderSetup();
- test_ret += test_xmlTextReaderStandalone();
- test_ret += test_xmlTextReaderValue();
- test_ret += test_xmlTextReaderXmlLang();
+ rc = test_xmlNewTextReader();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNewTextReaderFilename();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlReaderForDoc();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlReaderForFile();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlReaderForMemory();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlReaderNewDoc();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlReaderNewFile();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlReaderNewMemory();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlReaderNewWalker();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlReaderWalker();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderAttributeCount();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderBaseUri();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderByteConsumed();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderClose();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderConstBaseUri();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderConstEncoding();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderConstLocalName();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderConstName();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderConstNamespaceUri();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderConstPrefix();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderConstString();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderConstValue();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderConstXmlLang();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderConstXmlVersion();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderCurrentDoc();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderCurrentNode();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderDepth();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderExpand();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderGetAttribute();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderGetAttributeNo();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderGetAttributeNs();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderGetErrorHandler();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderGetParserColumnNumber();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderGetParserLineNumber();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderGetParserProp();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderGetRemainder();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderHasAttributes();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderHasValue();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderIsDefault();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderIsEmptyElement();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderIsNamespaceDecl();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderIsValid();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderLocalName();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderLocatorBaseURI();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderLocatorLineNumber();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderLookupNamespace();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderMoveToAttribute();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderMoveToAttributeNo();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderMoveToAttributeNs();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderMoveToElement();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderMoveToFirstAttribute();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderMoveToNextAttribute();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderName();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderNamespaceUri();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderNext();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderNextSibling();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderNodeType();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderNormalization();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderPrefix();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderPreserve();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderPreservePattern();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderQuoteChar();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderRead();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderReadAttributeValue();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderReadState();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderRelaxNGSetSchema();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderRelaxNGValidate();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderRelaxNGValidateCtxt();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderSchemaValidate();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderSchemaValidateCtxt();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderSetErrorHandler();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderSetParserProp();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderSetSchema();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderSetStructuredErrorHandler();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderSetup();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderStandalone();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderValue();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextReaderXmlLang();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
if (test_ret != 0)
printf("Module xmlreader: %d errors\n", test_ret);
int n_exp;
xmlChar ** langList; /* where to store the tokens */
int n_langList;
- int len; /* the allocated lenght of @list */
+ int len; /* the allocated length of @list */
int n_len;
for (n_ctxt = 0;n_ctxt < gen_nb_xmlExpCtxtPtr;n_ctxt++) {
int n_exp;
xmlChar ** tokList; /* where to store the tokens */
int n_tokList;
- int len; /* the allocated lenght of @list */
+ int len; /* the allocated length of @list */
int n_len;
for (n_ctxt = 0;n_ctxt < gen_nb_xmlExpCtxtPtr;n_ctxt++) {
static int
test_xmlregexp(void) {
int test_ret = 0;
+ int rc = 0;
if (quiet == 0) printf("Testing xmlregexp : 16 of 30 functions ...\n");
- test_ret += test_xmlExpCtxtNbCons();
- test_ret += test_xmlExpCtxtNbNodes();
- test_ret += test_xmlExpDump();
- test_ret += test_xmlExpExpDerive();
- test_ret += test_xmlExpGetLanguage();
- test_ret += test_xmlExpGetStart();
- test_ret += test_xmlExpIsNillable();
- test_ret += test_xmlExpMaxToken();
- test_ret += test_xmlExpNewAtom();
- test_ret += test_xmlExpNewCtxt();
- test_ret += test_xmlExpNewOr();
- test_ret += test_xmlExpNewRange();
- test_ret += test_xmlExpNewSeq();
- test_ret += test_xmlExpParse();
- test_ret += test_xmlExpRef();
- test_ret += test_xmlExpStringDerive();
- test_ret += test_xmlExpSubsume();
- test_ret += test_xmlRegExecErrInfo();
- test_ret += test_xmlRegExecNextValues();
- test_ret += test_xmlRegExecPushString();
- test_ret += test_xmlRegExecPushString2();
- test_ret += test_xmlRegNewExecCtxt();
- test_ret += test_xmlRegexpCompile();
- test_ret += test_xmlRegexpExec();
- test_ret += test_xmlRegexpIsDeterminist();
- test_ret += test_xmlRegexpPrint();
+ rc = test_xmlExpCtxtNbCons();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlExpCtxtNbNodes();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlExpDump();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlExpExpDerive();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlExpGetLanguage();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlExpGetStart();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlExpIsNillable();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlExpMaxToken();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlExpNewAtom();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlExpNewCtxt();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlExpNewOr();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlExpNewRange();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlExpNewSeq();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlExpParse();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlExpRef();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlExpStringDerive();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlExpSubsume();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlRegExecErrInfo();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlRegExecNextValues();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlRegExecPushString();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlRegExecPushString2();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlRegNewExecCtxt();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlRegexpCompile();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlRegexpExec();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlRegexpIsDeterminist();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlRegexpPrint();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
if (test_ret != 0)
printf("Module xmlregexp: %d errors\n", test_ret);
static int
test_xmlsave(void) {
int test_ret = 0;
+ int rc = 0;
if (quiet == 0) printf("Testing xmlsave : 4 of 10 functions ...\n");
- test_ret += test_xmlSaveClose();
- test_ret += test_xmlSaveDoc();
- test_ret += test_xmlSaveFlush();
- test_ret += test_xmlSaveSetAttrEscape();
- test_ret += test_xmlSaveSetEscape();
- test_ret += test_xmlSaveToBuffer();
- test_ret += test_xmlSaveToFd();
- test_ret += test_xmlSaveToFilename();
- test_ret += test_xmlSaveTree();
+ rc = test_xmlSaveClose();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSaveDoc();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSaveFlush();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSaveSetAttrEscape();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSaveSetEscape();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSaveToBuffer();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSaveToFd();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSaveToFilename();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSaveTree();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
if (test_ret != 0)
printf("Module xmlsave: %d errors\n", test_ret);
mem_base = xmlMemBlocks();
buffer = gen_const_char_ptr(n_buffer, 0);
size = gen_int(n_size, 1);
+ if ((buffer != NULL) &&
+ (size > (int) strlen((const char *) buffer) + 1))
+ continue;
ret_val = xmlSchemaNewMemParserCtxt((const char *)buffer, size);
desret_xmlSchemaParserCtxtPtr(ret_val);
static int
+test_xmlSchemaValidateSetFilename(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ xmlSchemaValidCtxtPtr vctxt; /* the schema validation context */
+ int n_vctxt;
+ const char * filename; /* the file name */
+ int n_filename;
+
+ for (n_vctxt = 0;n_vctxt < gen_nb_xmlSchemaValidCtxtPtr;n_vctxt++) {
+ for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
+ mem_base = xmlMemBlocks();
+ vctxt = gen_xmlSchemaValidCtxtPtr(n_vctxt, 0);
+ filename = gen_filepath(n_filename, 1);
+
+ xmlSchemaValidateSetFilename(vctxt, filename);
+ call_tests++;
+ des_xmlSchemaValidCtxtPtr(n_vctxt, vctxt, 0);
+ des_filepath(n_filename, filename, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSchemaValidateSetFilename",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_vctxt);
+ printf(" %d", n_filename);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaValidateSetLocator(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
test_xmlSchemaValidateStream(void) {
int test_ret = 0;
static int
test_xmlschemas(void) {
int test_ret = 0;
-
- if (quiet == 0) printf("Testing xmlschemas : 15 of 25 functions ...\n");
- test_ret += test_xmlSchemaDump();
- test_ret += test_xmlSchemaGetParserErrors();
- test_ret += test_xmlSchemaGetValidErrors();
- test_ret += test_xmlSchemaIsValid();
- test_ret += test_xmlSchemaNewDocParserCtxt();
- test_ret += test_xmlSchemaNewMemParserCtxt();
- test_ret += test_xmlSchemaNewParserCtxt();
- test_ret += test_xmlSchemaNewValidCtxt();
- test_ret += test_xmlSchemaParse();
- test_ret += test_xmlSchemaSAXPlug();
- test_ret += test_xmlSchemaSAXUnplug();
- test_ret += test_xmlSchemaSetParserErrors();
- test_ret += test_xmlSchemaSetParserStructuredErrors();
- test_ret += test_xmlSchemaSetValidErrors();
- test_ret += test_xmlSchemaSetValidOptions();
- test_ret += test_xmlSchemaSetValidStructuredErrors();
- test_ret += test_xmlSchemaValidCtxtGetOptions();
- test_ret += test_xmlSchemaValidCtxtGetParserCtxt();
- test_ret += test_xmlSchemaValidateDoc();
- test_ret += test_xmlSchemaValidateFile();
- test_ret += test_xmlSchemaValidateOneElement();
- test_ret += test_xmlSchemaValidateStream();
+ int rc = 0;
+
+ if (quiet == 0) printf("Testing xmlschemas : 16 of 27 functions ...\n");
+ rc = test_xmlSchemaDump();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaGetParserErrors();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaGetValidErrors();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaIsValid();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaNewDocParserCtxt();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaNewMemParserCtxt();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaNewParserCtxt();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaNewValidCtxt();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaParse();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaSAXPlug();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaSAXUnplug();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaSetParserErrors();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaSetParserStructuredErrors();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaSetValidErrors();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaSetValidOptions();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaSetValidStructuredErrors();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaValidCtxtGetOptions();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaValidCtxtGetParserCtxt();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaValidateDoc();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaValidateFile();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaValidateOneElement();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaValidateSetFilename();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaValidateSetLocator();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaValidateStream();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
if (test_ret != 0)
printf("Module xmlschemas: %d errors\n", test_ret);
static int
test_xmlschemastypes(void) {
int test_ret = 0;
+ int rc = 0;
if (quiet == 0) printf("Testing xmlschemastypes : 26 of 34 functions ...\n");
- test_ret += test_xmlSchemaCheckFacet();
- test_ret += test_xmlSchemaCleanupTypes();
- test_ret += test_xmlSchemaCollapseString();
- test_ret += test_xmlSchemaCompareValues();
- test_ret += test_xmlSchemaCompareValuesWhtsp();
- test_ret += test_xmlSchemaCopyValue();
- test_ret += test_xmlSchemaGetBuiltInListSimpleTypeItemType();
- test_ret += test_xmlSchemaGetBuiltInType();
- test_ret += test_xmlSchemaGetCanonValue();
- test_ret += test_xmlSchemaGetCanonValueWhtsp();
- test_ret += test_xmlSchemaGetFacetValueAsULong();
- test_ret += test_xmlSchemaGetPredefinedType();
- test_ret += test_xmlSchemaGetValType();
- test_ret += test_xmlSchemaInitTypes();
- test_ret += test_xmlSchemaIsBuiltInTypeFacet();
- test_ret += test_xmlSchemaNewFacet();
- test_ret += test_xmlSchemaNewNOTATIONValue();
- test_ret += test_xmlSchemaNewQNameValue();
- test_ret += test_xmlSchemaNewStringValue();
- test_ret += test_xmlSchemaValPredefTypeNode();
- test_ret += test_xmlSchemaValPredefTypeNodeNoNorm();
- test_ret += test_xmlSchemaValidateFacet();
- test_ret += test_xmlSchemaValidateFacetWhtsp();
- test_ret += test_xmlSchemaValidateLengthFacet();
- test_ret += test_xmlSchemaValidateLengthFacetWhtsp();
- test_ret += test_xmlSchemaValidateListSimpleTypeFacet();
- test_ret += test_xmlSchemaValidatePredefinedType();
- test_ret += test_xmlSchemaValueAppend();
- test_ret += test_xmlSchemaValueGetAsBoolean();
- test_ret += test_xmlSchemaValueGetAsString();
- test_ret += test_xmlSchemaValueGetNext();
- test_ret += test_xmlSchemaWhiteSpaceReplace();
+ rc = test_xmlSchemaCheckFacet();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaCleanupTypes();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaCollapseString();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaCompareValues();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaCompareValuesWhtsp();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaCopyValue();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaGetBuiltInListSimpleTypeItemType();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaGetBuiltInType();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaGetCanonValue();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaGetCanonValueWhtsp();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaGetFacetValueAsULong();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaGetPredefinedType();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaGetValType();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaInitTypes();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaIsBuiltInTypeFacet();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaNewFacet();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaNewNOTATIONValue();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaNewQNameValue();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaNewStringValue();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaValPredefTypeNode();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaValPredefTypeNodeNoNorm();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaValidateFacet();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaValidateFacetWhtsp();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaValidateLengthFacet();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaValidateLengthFacetWhtsp();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaValidateListSimpleTypeFacet();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaValidatePredefinedType();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaValueAppend();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaValueGetAsBoolean();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaValueGetAsString();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaValueGetNext();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlSchemaWhiteSpaceReplace();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
if (test_ret != 0)
printf("Module xmlschemastypes: %d errors\n", test_ret);
mem_base = xmlMemBlocks();
cur = gen_const_char_ptr(n_cur, 0);
len = gen_int(n_len, 1);
+ if ((cur != NULL) &&
+ (len > (int) strlen((const char *) cur) + 1))
+ continue;
ret_val = xmlCharStrndup((const char *)cur, len);
desret_xmlChar_ptr(ret_val);
str1 = gen_const_xmlChar_ptr(n_str1, 0);
str2 = gen_const_xmlChar_ptr(n_str2, 1);
len = gen_int(n_len, 2);
+ if ((str2 != NULL) &&
+ (len > (int) strlen((const char *) str2) + 1))
+ continue;
ret_val = xmlStrncasecmp((const xmlChar *)str1, (const xmlChar *)str2, len);
desret_int(ret_val);
str1 = gen_const_xmlChar_ptr(n_str1, 0);
str2 = gen_const_xmlChar_ptr(n_str2, 1);
len = gen_int(n_len, 2);
+ if ((str2 != NULL) &&
+ (len > (int) strlen((const char *) str2) + 1))
+ continue;
ret_val = xmlStrncatNew((const xmlChar *)str1, (const xmlChar *)str2, len);
desret_xmlChar_ptr(ret_val);
str1 = gen_const_xmlChar_ptr(n_str1, 0);
str2 = gen_const_xmlChar_ptr(n_str2, 1);
len = gen_int(n_len, 2);
+ if ((str2 != NULL) &&
+ (len > (int) strlen((const char *) str2) + 1))
+ continue;
ret_val = xmlStrncmp((const xmlChar *)str1, (const xmlChar *)str2, len);
desret_int(ret_val);
mem_base = xmlMemBlocks();
cur = gen_const_xmlChar_ptr(n_cur, 0);
len = gen_int(n_len, 1);
+ if ((cur != NULL) &&
+ (len > (int) strlen((const char *) cur) + 1))
+ continue;
ret_val = xmlStrndup((const xmlChar *)cur, len);
desret_xmlChar_ptr(ret_val);
str = gen_const_xmlChar_ptr(n_str, 0);
start = gen_int(n_start, 1);
len = gen_int(n_len, 2);
+ if ((str != NULL) &&
+ (start > (int) strlen((const char *) str) + 1))
+ continue;
+ if ((str != NULL) &&
+ (len > (int) strlen((const char *) str) + 1))
+ continue;
ret_val = xmlStrsub((const xmlChar *)str, start, len);
desret_xmlChar_ptr(ret_val);
mem_base = xmlMemBlocks();
utf = gen_const_xmlChar_ptr(n_utf, 0);
len = gen_int(n_len, 1);
+ if ((utf != NULL) &&
+ (len > (int) strlen((const char *) utf) + 1))
+ continue;
ret_val = xmlUTF8Strndup((const xmlChar *)utf, len);
desret_xmlChar_ptr(ret_val);
mem_base = xmlMemBlocks();
utf = gen_const_xmlChar_ptr(n_utf, 0);
len = gen_int(n_len, 1);
+ if ((utf != NULL) &&
+ (len > (int) strlen((const char *) utf) + 1))
+ continue;
ret_val = xmlUTF8Strsize((const xmlChar *)utf, len);
desret_int(ret_val);
utf = gen_const_xmlChar_ptr(n_utf, 0);
start = gen_int(n_start, 1);
len = gen_int(n_len, 2);
+ if ((utf != NULL) &&
+ (start > (int) strlen((const char *) utf) + 1))
+ continue;
+ if ((utf != NULL) &&
+ (len > (int) strlen((const char *) utf) + 1))
+ continue;
ret_val = xmlUTF8Strsub((const xmlChar *)utf, start, len);
desret_xmlChar_ptr(ret_val);
static int
test_xmlstring(void) {
int test_ret = 0;
+ int rc = 0;
if (quiet == 0) printf("Testing xmlstring : 26 of 30 functions ...\n");
- test_ret += test_xmlCharStrdup();
- test_ret += test_xmlCharStrndup();
- test_ret += test_xmlCheckUTF8();
- test_ret += test_xmlGetUTF8Char();
- test_ret += test_xmlStrEqual();
- test_ret += test_xmlStrPrintf();
- test_ret += test_xmlStrQEqual();
- test_ret += test_xmlStrVPrintf();
- test_ret += test_xmlStrcasecmp();
- test_ret += test_xmlStrcasestr();
- test_ret += test_xmlStrchr();
- test_ret += test_xmlStrcmp();
- test_ret += test_xmlStrdup();
- test_ret += test_xmlStrlen();
- test_ret += test_xmlStrncasecmp();
- test_ret += test_xmlStrncatNew();
- test_ret += test_xmlStrncmp();
- test_ret += test_xmlStrndup();
- test_ret += test_xmlStrstr();
- test_ret += test_xmlStrsub();
- test_ret += test_xmlUTF8Charcmp();
- test_ret += test_xmlUTF8Size();
- test_ret += test_xmlUTF8Strlen();
- test_ret += test_xmlUTF8Strloc();
- test_ret += test_xmlUTF8Strndup();
- test_ret += test_xmlUTF8Strpos();
- test_ret += test_xmlUTF8Strsize();
- test_ret += test_xmlUTF8Strsub();
+ rc = test_xmlCharStrdup();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCharStrndup();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlCheckUTF8();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlGetUTF8Char();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlStrEqual();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlStrPrintf();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlStrQEqual();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlStrVPrintf();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlStrcasecmp();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlStrcasestr();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlStrchr();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlStrcmp();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlStrdup();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlStrlen();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlStrncasecmp();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlStrncatNew();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlStrncmp();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlStrndup();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlStrstr();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlStrsub();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUTF8Charcmp();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUTF8Size();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUTF8Strlen();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUTF8Strloc();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUTF8Strndup();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUTF8Strpos();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUTF8Strsize();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUTF8Strsub();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
if (test_ret != 0)
printf("Module xmlstring: %d errors\n", test_ret);
static int
test_xmlunicode(void) {
int test_ret = 0;
+ int rc = 0;
if (quiet == 0) printf("Testing xmlunicode : 166 of 166 functions ...\n");
- test_ret += test_xmlUCSIsAegeanNumbers();
- test_ret += test_xmlUCSIsAlphabeticPresentationForms();
- test_ret += test_xmlUCSIsArabic();
- test_ret += test_xmlUCSIsArabicPresentationFormsA();
- test_ret += test_xmlUCSIsArabicPresentationFormsB();
- test_ret += test_xmlUCSIsArmenian();
- test_ret += test_xmlUCSIsArrows();
- test_ret += test_xmlUCSIsBasicLatin();
- test_ret += test_xmlUCSIsBengali();
- test_ret += test_xmlUCSIsBlock();
- test_ret += test_xmlUCSIsBlockElements();
- test_ret += test_xmlUCSIsBopomofo();
- test_ret += test_xmlUCSIsBopomofoExtended();
- test_ret += test_xmlUCSIsBoxDrawing();
- test_ret += test_xmlUCSIsBraillePatterns();
- test_ret += test_xmlUCSIsBuhid();
- test_ret += test_xmlUCSIsByzantineMusicalSymbols();
- test_ret += test_xmlUCSIsCJKCompatibility();
- test_ret += test_xmlUCSIsCJKCompatibilityForms();
- test_ret += test_xmlUCSIsCJKCompatibilityIdeographs();
- test_ret += test_xmlUCSIsCJKCompatibilityIdeographsSupplement();
- test_ret += test_xmlUCSIsCJKRadicalsSupplement();
- test_ret += test_xmlUCSIsCJKSymbolsandPunctuation();
- test_ret += test_xmlUCSIsCJKUnifiedIdeographs();
- test_ret += test_xmlUCSIsCJKUnifiedIdeographsExtensionA();
- test_ret += test_xmlUCSIsCJKUnifiedIdeographsExtensionB();
- test_ret += test_xmlUCSIsCat();
- test_ret += test_xmlUCSIsCatC();
- test_ret += test_xmlUCSIsCatCc();
- test_ret += test_xmlUCSIsCatCf();
- test_ret += test_xmlUCSIsCatCo();
- test_ret += test_xmlUCSIsCatCs();
- test_ret += test_xmlUCSIsCatL();
- test_ret += test_xmlUCSIsCatLl();
- test_ret += test_xmlUCSIsCatLm();
- test_ret += test_xmlUCSIsCatLo();
- test_ret += test_xmlUCSIsCatLt();
- test_ret += test_xmlUCSIsCatLu();
- test_ret += test_xmlUCSIsCatM();
- test_ret += test_xmlUCSIsCatMc();
- test_ret += test_xmlUCSIsCatMe();
- test_ret += test_xmlUCSIsCatMn();
- test_ret += test_xmlUCSIsCatN();
- test_ret += test_xmlUCSIsCatNd();
- test_ret += test_xmlUCSIsCatNl();
- test_ret += test_xmlUCSIsCatNo();
- test_ret += test_xmlUCSIsCatP();
- test_ret += test_xmlUCSIsCatPc();
- test_ret += test_xmlUCSIsCatPd();
- test_ret += test_xmlUCSIsCatPe();
- test_ret += test_xmlUCSIsCatPf();
- test_ret += test_xmlUCSIsCatPi();
- test_ret += test_xmlUCSIsCatPo();
- test_ret += test_xmlUCSIsCatPs();
- test_ret += test_xmlUCSIsCatS();
- test_ret += test_xmlUCSIsCatSc();
- test_ret += test_xmlUCSIsCatSk();
- test_ret += test_xmlUCSIsCatSm();
- test_ret += test_xmlUCSIsCatSo();
- test_ret += test_xmlUCSIsCatZ();
- test_ret += test_xmlUCSIsCatZl();
- test_ret += test_xmlUCSIsCatZp();
- test_ret += test_xmlUCSIsCatZs();
- test_ret += test_xmlUCSIsCherokee();
- test_ret += test_xmlUCSIsCombiningDiacriticalMarks();
- test_ret += test_xmlUCSIsCombiningDiacriticalMarksforSymbols();
- test_ret += test_xmlUCSIsCombiningHalfMarks();
- test_ret += test_xmlUCSIsCombiningMarksforSymbols();
- test_ret += test_xmlUCSIsControlPictures();
- test_ret += test_xmlUCSIsCurrencySymbols();
- test_ret += test_xmlUCSIsCypriotSyllabary();
- test_ret += test_xmlUCSIsCyrillic();
- test_ret += test_xmlUCSIsCyrillicSupplement();
- test_ret += test_xmlUCSIsDeseret();
- test_ret += test_xmlUCSIsDevanagari();
- test_ret += test_xmlUCSIsDingbats();
- test_ret += test_xmlUCSIsEnclosedAlphanumerics();
- test_ret += test_xmlUCSIsEnclosedCJKLettersandMonths();
- test_ret += test_xmlUCSIsEthiopic();
- test_ret += test_xmlUCSIsGeneralPunctuation();
- test_ret += test_xmlUCSIsGeometricShapes();
- test_ret += test_xmlUCSIsGeorgian();
- test_ret += test_xmlUCSIsGothic();
- test_ret += test_xmlUCSIsGreek();
- test_ret += test_xmlUCSIsGreekExtended();
- test_ret += test_xmlUCSIsGreekandCoptic();
- test_ret += test_xmlUCSIsGujarati();
- test_ret += test_xmlUCSIsGurmukhi();
- test_ret += test_xmlUCSIsHalfwidthandFullwidthForms();
- test_ret += test_xmlUCSIsHangulCompatibilityJamo();
- test_ret += test_xmlUCSIsHangulJamo();
- test_ret += test_xmlUCSIsHangulSyllables();
- test_ret += test_xmlUCSIsHanunoo();
- test_ret += test_xmlUCSIsHebrew();
- test_ret += test_xmlUCSIsHighPrivateUseSurrogates();
- test_ret += test_xmlUCSIsHighSurrogates();
- test_ret += test_xmlUCSIsHiragana();
- test_ret += test_xmlUCSIsIPAExtensions();
- test_ret += test_xmlUCSIsIdeographicDescriptionCharacters();
- test_ret += test_xmlUCSIsKanbun();
- test_ret += test_xmlUCSIsKangxiRadicals();
- test_ret += test_xmlUCSIsKannada();
- test_ret += test_xmlUCSIsKatakana();
- test_ret += test_xmlUCSIsKatakanaPhoneticExtensions();
- test_ret += test_xmlUCSIsKhmer();
- test_ret += test_xmlUCSIsKhmerSymbols();
- test_ret += test_xmlUCSIsLao();
- test_ret += test_xmlUCSIsLatin1Supplement();
- test_ret += test_xmlUCSIsLatinExtendedA();
- test_ret += test_xmlUCSIsLatinExtendedAdditional();
- test_ret += test_xmlUCSIsLatinExtendedB();
- test_ret += test_xmlUCSIsLetterlikeSymbols();
- test_ret += test_xmlUCSIsLimbu();
- test_ret += test_xmlUCSIsLinearBIdeograms();
- test_ret += test_xmlUCSIsLinearBSyllabary();
- test_ret += test_xmlUCSIsLowSurrogates();
- test_ret += test_xmlUCSIsMalayalam();
- test_ret += test_xmlUCSIsMathematicalAlphanumericSymbols();
- test_ret += test_xmlUCSIsMathematicalOperators();
- test_ret += test_xmlUCSIsMiscellaneousMathematicalSymbolsA();
- test_ret += test_xmlUCSIsMiscellaneousMathematicalSymbolsB();
- test_ret += test_xmlUCSIsMiscellaneousSymbols();
- test_ret += test_xmlUCSIsMiscellaneousSymbolsandArrows();
- test_ret += test_xmlUCSIsMiscellaneousTechnical();
- test_ret += test_xmlUCSIsMongolian();
- test_ret += test_xmlUCSIsMusicalSymbols();
- test_ret += test_xmlUCSIsMyanmar();
- test_ret += test_xmlUCSIsNumberForms();
- test_ret += test_xmlUCSIsOgham();
- test_ret += test_xmlUCSIsOldItalic();
- test_ret += test_xmlUCSIsOpticalCharacterRecognition();
- test_ret += test_xmlUCSIsOriya();
- test_ret += test_xmlUCSIsOsmanya();
- test_ret += test_xmlUCSIsPhoneticExtensions();
- test_ret += test_xmlUCSIsPrivateUse();
- test_ret += test_xmlUCSIsPrivateUseArea();
- test_ret += test_xmlUCSIsRunic();
- test_ret += test_xmlUCSIsShavian();
- test_ret += test_xmlUCSIsSinhala();
- test_ret += test_xmlUCSIsSmallFormVariants();
- test_ret += test_xmlUCSIsSpacingModifierLetters();
- test_ret += test_xmlUCSIsSpecials();
- test_ret += test_xmlUCSIsSuperscriptsandSubscripts();
- test_ret += test_xmlUCSIsSupplementalArrowsA();
- test_ret += test_xmlUCSIsSupplementalArrowsB();
- test_ret += test_xmlUCSIsSupplementalMathematicalOperators();
- test_ret += test_xmlUCSIsSupplementaryPrivateUseAreaA();
- test_ret += test_xmlUCSIsSupplementaryPrivateUseAreaB();
- test_ret += test_xmlUCSIsSyriac();
- test_ret += test_xmlUCSIsTagalog();
- test_ret += test_xmlUCSIsTagbanwa();
- test_ret += test_xmlUCSIsTags();
- test_ret += test_xmlUCSIsTaiLe();
- test_ret += test_xmlUCSIsTaiXuanJingSymbols();
- test_ret += test_xmlUCSIsTamil();
- test_ret += test_xmlUCSIsTelugu();
- test_ret += test_xmlUCSIsThaana();
- test_ret += test_xmlUCSIsThai();
- test_ret += test_xmlUCSIsTibetan();
- test_ret += test_xmlUCSIsUgaritic();
- test_ret += test_xmlUCSIsUnifiedCanadianAboriginalSyllabics();
- test_ret += test_xmlUCSIsVariationSelectors();
- test_ret += test_xmlUCSIsVariationSelectorsSupplement();
- test_ret += test_xmlUCSIsYiRadicals();
- test_ret += test_xmlUCSIsYiSyllables();
- test_ret += test_xmlUCSIsYijingHexagramSymbols();
+ rc = test_xmlUCSIsAegeanNumbers();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsAlphabeticPresentationForms();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsArabic();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsArabicPresentationFormsA();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsArabicPresentationFormsB();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsArmenian();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsArrows();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsBasicLatin();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsBengali();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsBlock();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsBlockElements();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsBopomofo();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsBopomofoExtended();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsBoxDrawing();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsBraillePatterns();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsBuhid();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsByzantineMusicalSymbols();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCJKCompatibility();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCJKCompatibilityForms();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCJKCompatibilityIdeographs();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCJKCompatibilityIdeographsSupplement();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCJKRadicalsSupplement();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCJKSymbolsandPunctuation();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCJKUnifiedIdeographs();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCJKUnifiedIdeographsExtensionA();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCJKUnifiedIdeographsExtensionB();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCat();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCatC();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCatCc();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCatCf();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCatCo();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCatCs();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCatL();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCatLl();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCatLm();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCatLo();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCatLt();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCatLu();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCatM();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCatMc();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCatMe();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCatMn();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCatN();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCatNd();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCatNl();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCatNo();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCatP();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCatPc();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCatPd();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCatPe();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCatPf();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCatPi();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCatPo();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCatPs();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCatS();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCatSc();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCatSk();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCatSm();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCatSo();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCatZ();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCatZl();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCatZp();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCatZs();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCherokee();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCombiningDiacriticalMarks();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCombiningDiacriticalMarksforSymbols();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCombiningHalfMarks();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCombiningMarksforSymbols();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsControlPictures();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCurrencySymbols();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCypriotSyllabary();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCyrillic();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsCyrillicSupplement();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsDeseret();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsDevanagari();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsDingbats();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsEnclosedAlphanumerics();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsEnclosedCJKLettersandMonths();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsEthiopic();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsGeneralPunctuation();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsGeometricShapes();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsGeorgian();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsGothic();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsGreek();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsGreekExtended();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsGreekandCoptic();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsGujarati();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsGurmukhi();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsHalfwidthandFullwidthForms();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsHangulCompatibilityJamo();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsHangulJamo();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsHangulSyllables();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsHanunoo();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsHebrew();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsHighPrivateUseSurrogates();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsHighSurrogates();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsHiragana();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsIPAExtensions();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsIdeographicDescriptionCharacters();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsKanbun();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsKangxiRadicals();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsKannada();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsKatakana();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsKatakanaPhoneticExtensions();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsKhmer();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsKhmerSymbols();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsLao();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsLatin1Supplement();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsLatinExtendedA();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsLatinExtendedAdditional();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsLatinExtendedB();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsLetterlikeSymbols();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsLimbu();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsLinearBIdeograms();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsLinearBSyllabary();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsLowSurrogates();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsMalayalam();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsMathematicalAlphanumericSymbols();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsMathematicalOperators();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsMiscellaneousMathematicalSymbolsA();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsMiscellaneousMathematicalSymbolsB();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsMiscellaneousSymbols();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsMiscellaneousSymbolsandArrows();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsMiscellaneousTechnical();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsMongolian();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsMusicalSymbols();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsMyanmar();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsNumberForms();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsOgham();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsOldItalic();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsOpticalCharacterRecognition();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsOriya();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsOsmanya();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsPhoneticExtensions();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsPrivateUse();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsPrivateUseArea();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsRunic();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsShavian();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsSinhala();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsSmallFormVariants();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsSpacingModifierLetters();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsSpecials();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsSuperscriptsandSubscripts();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsSupplementalArrowsA();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsSupplementalArrowsB();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsSupplementalMathematicalOperators();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsSupplementaryPrivateUseAreaA();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsSupplementaryPrivateUseAreaB();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsSyriac();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsTagalog();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsTagbanwa();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsTags();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsTaiLe();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsTaiXuanJingSymbols();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsTamil();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsTelugu();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsThaana();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsThai();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsTibetan();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsUgaritic();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsUnifiedCanadianAboriginalSyllabics();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsVariationSelectors();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsVariationSelectorsSupplement();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsYiRadicals();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsYiSyllables();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlUCSIsYijingHexagramSymbols();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
if (test_ret != 0)
printf("Module xmlunicode: %d errors\n", test_ret);
static int
+test_xmlTextWriterSetQuoteChar(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+ xmlChar quotechar; /* the quote character */
+ int n_quotechar;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ for (n_quotechar = 0;n_quotechar < gen_nb_xmlChar;n_quotechar++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+ quotechar = gen_xmlChar(n_quotechar, 1);
+
+ ret_val = xmlTextWriterSetQuoteChar(writer, quotechar);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ des_xmlChar(n_quotechar, quotechar, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterSetQuoteChar",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf(" %d", n_quotechar);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
test_xmlTextWriterStartAttribute(void) {
int test_ret = 0;
data = gen_const_char_ptr(n_data, 1);
start = gen_int(n_start, 2);
len = gen_int(n_len, 3);
+ if ((data != NULL) &&
+ (start > (int) strlen((const char *) data) + 1))
+ continue;
+ if ((data != NULL) &&
+ (len > (int) strlen((const char *) data) + 1))
+ continue;
ret_val = xmlTextWriterWriteBase64(writer, (const char *)data, start, len);
desret_int(ret_val);
data = gen_const_char_ptr(n_data, 1);
start = gen_int(n_start, 2);
len = gen_int(n_len, 3);
+ if ((data != NULL) &&
+ (start > (int) strlen((const char *) data) + 1))
+ continue;
+ if ((data != NULL) &&
+ (len > (int) strlen((const char *) data) + 1))
+ continue;
ret_val = xmlTextWriterWriteBinHex(writer, (const char *)data, start, len);
desret_int(ret_val);
writer = gen_xmlTextWriterPtr(n_writer, 0);
content = gen_const_xmlChar_ptr(n_content, 1);
len = gen_int(n_len, 2);
+ if ((content != NULL) &&
+ (len > (int) strlen((const char *) content) + 1))
+ continue;
ret_val = xmlTextWriterWriteRawLen(writer, (const xmlChar *)content, len);
desret_int(ret_val);
static int
test_xmlwriter(void) {
int test_ret = 0;
-
- if (quiet == 0) printf("Testing xmlwriter : 51 of 79 functions ...\n");
- test_ret += test_xmlNewTextWriter();
- test_ret += test_xmlNewTextWriterFilename();
- test_ret += test_xmlNewTextWriterMemory();
- test_ret += test_xmlNewTextWriterPushParser();
- test_ret += test_xmlNewTextWriterTree();
- test_ret += test_xmlTextWriterEndAttribute();
- test_ret += test_xmlTextWriterEndCDATA();
- test_ret += test_xmlTextWriterEndComment();
- test_ret += test_xmlTextWriterEndDTD();
- test_ret += test_xmlTextWriterEndDTDAttlist();
- test_ret += test_xmlTextWriterEndDTDElement();
- test_ret += test_xmlTextWriterEndDTDEntity();
- test_ret += test_xmlTextWriterEndDocument();
- test_ret += test_xmlTextWriterEndElement();
- test_ret += test_xmlTextWriterEndPI();
- test_ret += test_xmlTextWriterFlush();
- test_ret += test_xmlTextWriterFullEndElement();
- test_ret += test_xmlTextWriterSetIndent();
- test_ret += test_xmlTextWriterSetIndentString();
- test_ret += test_xmlTextWriterStartAttribute();
- test_ret += test_xmlTextWriterStartAttributeNS();
- test_ret += test_xmlTextWriterStartCDATA();
- test_ret += test_xmlTextWriterStartComment();
- test_ret += test_xmlTextWriterStartDTD();
- test_ret += test_xmlTextWriterStartDTDAttlist();
- test_ret += test_xmlTextWriterStartDTDElement();
- test_ret += test_xmlTextWriterStartDTDEntity();
- test_ret += test_xmlTextWriterStartDocument();
- test_ret += test_xmlTextWriterStartElement();
- test_ret += test_xmlTextWriterStartElementNS();
- test_ret += test_xmlTextWriterStartPI();
- test_ret += test_xmlTextWriterWriteAttribute();
- test_ret += test_xmlTextWriterWriteAttributeNS();
- test_ret += test_xmlTextWriterWriteBase64();
- test_ret += test_xmlTextWriterWriteBinHex();
- test_ret += test_xmlTextWriterWriteCDATA();
- test_ret += test_xmlTextWriterWriteComment();
- test_ret += test_xmlTextWriterWriteDTD();
- test_ret += test_xmlTextWriterWriteDTDAttlist();
- test_ret += test_xmlTextWriterWriteDTDElement();
- test_ret += test_xmlTextWriterWriteDTDEntity();
- test_ret += test_xmlTextWriterWriteDTDExternalEntity();
- test_ret += test_xmlTextWriterWriteDTDExternalEntityContents();
- test_ret += test_xmlTextWriterWriteDTDInternalEntity();
- test_ret += test_xmlTextWriterWriteDTDNotation();
- test_ret += test_xmlTextWriterWriteElement();
- test_ret += test_xmlTextWriterWriteElementNS();
- test_ret += test_xmlTextWriterWriteFormatAttribute();
- test_ret += test_xmlTextWriterWriteFormatAttributeNS();
- test_ret += test_xmlTextWriterWriteFormatCDATA();
- test_ret += test_xmlTextWriterWriteFormatComment();
- test_ret += test_xmlTextWriterWriteFormatDTD();
- test_ret += test_xmlTextWriterWriteFormatDTDAttlist();
- test_ret += test_xmlTextWriterWriteFormatDTDElement();
- test_ret += test_xmlTextWriterWriteFormatDTDInternalEntity();
- test_ret += test_xmlTextWriterWriteFormatElement();
- test_ret += test_xmlTextWriterWriteFormatElementNS();
- test_ret += test_xmlTextWriterWriteFormatPI();
- test_ret += test_xmlTextWriterWriteFormatRaw();
- test_ret += test_xmlTextWriterWriteFormatString();
- test_ret += test_xmlTextWriterWritePI();
- test_ret += test_xmlTextWriterWriteRaw();
- test_ret += test_xmlTextWriterWriteRawLen();
- test_ret += test_xmlTextWriterWriteString();
- test_ret += test_xmlTextWriterWriteVFormatAttribute();
- test_ret += test_xmlTextWriterWriteVFormatAttributeNS();
- test_ret += test_xmlTextWriterWriteVFormatCDATA();
- test_ret += test_xmlTextWriterWriteVFormatComment();
- test_ret += test_xmlTextWriterWriteVFormatDTD();
- test_ret += test_xmlTextWriterWriteVFormatDTDAttlist();
- test_ret += test_xmlTextWriterWriteVFormatDTDElement();
- test_ret += test_xmlTextWriterWriteVFormatDTDInternalEntity();
- test_ret += test_xmlTextWriterWriteVFormatElement();
- test_ret += test_xmlTextWriterWriteVFormatElementNS();
- test_ret += test_xmlTextWriterWriteVFormatPI();
- test_ret += test_xmlTextWriterWriteVFormatRaw();
- test_ret += test_xmlTextWriterWriteVFormatString();
+ int rc = 0;
+
+ if (quiet == 0) printf("Testing xmlwriter : 52 of 80 functions ...\n");
+ rc = test_xmlNewTextWriter();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNewTextWriterFilename();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNewTextWriterMemory();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNewTextWriterPushParser();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlNewTextWriterTree();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterEndAttribute();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterEndCDATA();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterEndComment();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterEndDTD();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterEndDTDAttlist();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterEndDTDElement();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterEndDTDEntity();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterEndDocument();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterEndElement();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterEndPI();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterFlush();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterFullEndElement();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterSetIndent();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterSetIndentString();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterSetQuoteChar();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterStartAttribute();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterStartAttributeNS();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterStartCDATA();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterStartComment();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterStartDTD();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterStartDTDAttlist();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterStartDTDElement();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterStartDTDEntity();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterStartDocument();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterStartElement();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterStartElementNS();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterStartPI();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWriteAttribute();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWriteAttributeNS();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWriteBase64();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWriteBinHex();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWriteCDATA();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWriteComment();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWriteDTD();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWriteDTDAttlist();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWriteDTDElement();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWriteDTDEntity();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWriteDTDExternalEntity();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWriteDTDExternalEntityContents();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWriteDTDInternalEntity();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWriteDTDNotation();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWriteElement();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWriteElementNS();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWriteFormatAttribute();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWriteFormatAttributeNS();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWriteFormatCDATA();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWriteFormatComment();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWriteFormatDTD();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWriteFormatDTDAttlist();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWriteFormatDTDElement();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWriteFormatDTDInternalEntity();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWriteFormatElement();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWriteFormatElementNS();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWriteFormatPI();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWriteFormatRaw();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWriteFormatString();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWritePI();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWriteRaw();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWriteRawLen();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWriteString();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWriteVFormatAttribute();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWriteVFormatAttributeNS();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWriteVFormatCDATA();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWriteVFormatComment();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWriteVFormatDTD();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWriteVFormatDTDAttlist();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWriteVFormatDTDElement();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWriteVFormatDTDInternalEntity();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWriteVFormatElement();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWriteVFormatElementNS();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWriteVFormatPI();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWriteVFormatRaw();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlTextWriterWriteVFormatString();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
if (test_ret != 0)
printf("Module xmlwriter: %d errors\n", test_ret);
static int
+test_xmlXPathNodeEval(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathObjectPtr ret_val;
+ xmlNodePtr node; /* the node to to use as the context node */
+ int n_node;
+ xmlChar * str; /* the XPath expression */
+ int n_str;
+ xmlXPathContextPtr ctx; /* the XPath context */
+ int n_ctx;
+
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
+ for (n_ctx = 0;n_ctx < gen_nb_xmlXPathContextPtr;n_ctx++) {
+ mem_base = xmlMemBlocks();
+ node = gen_xmlNodePtr(n_node, 0);
+ str = gen_const_xmlChar_ptr(n_str, 1);
+ ctx = gen_xmlXPathContextPtr(n_ctx, 2);
+
+ ret_val = xmlXPathNodeEval(node, (const xmlChar *)str, ctx);
+ desret_xmlXPathObjectPtr(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_node, node, 0);
+ des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 1);
+ des_xmlXPathContextPtr(n_ctx, ctx, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathNodeEval",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_node);
+ printf(" %d", n_str);
+ printf(" %d", n_ctx);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
test_xmlXPathNodeSetCreate(void) {
int test_ret = 0;
return(test_ret);
}
+
static int
-test_xpath(void) {
+test_xmlXPathSetContextNode(void) {
int test_ret = 0;
- if (quiet == 0) printf("Testing xpath : 30 of 38 functions ...\n");
- test_ret += test_xmlXPathCastBooleanToNumber();
- test_ret += test_xmlXPathCastBooleanToString();
- test_ret += test_xmlXPathCastNodeSetToBoolean();
- test_ret += test_xmlXPathCastNodeSetToNumber();
- test_ret += test_xmlXPathCastNodeSetToString();
- test_ret += test_xmlXPathCastNodeToNumber();
- test_ret += test_xmlXPathCastNodeToString();
- test_ret += test_xmlXPathCastNumberToBoolean();
- test_ret += test_xmlXPathCastNumberToString();
- test_ret += test_xmlXPathCastStringToBoolean();
- test_ret += test_xmlXPathCastStringToNumber();
- test_ret += test_xmlXPathCastToBoolean();
- test_ret += test_xmlXPathCastToNumber();
- test_ret += test_xmlXPathCastToString();
- test_ret += test_xmlXPathCmpNodes();
- test_ret += test_xmlXPathCompile();
- test_ret += test_xmlXPathCompiledEval();
- test_ret += test_xmlXPathCompiledEvalToBoolean();
- test_ret += test_xmlXPathContextSetCache();
- test_ret += test_xmlXPathConvertBoolean();
- test_ret += test_xmlXPathConvertNumber();
- test_ret += test_xmlXPathConvertString();
- test_ret += test_xmlXPathCtxtCompile();
- test_ret += test_xmlXPathEval();
- test_ret += test_xmlXPathEvalExpression();
- test_ret += test_xmlXPathEvalPredicate();
- test_ret += test_xmlXPathInit();
- test_ret += test_xmlXPathIsInf();
- test_ret += test_xmlXPathIsNaN();
- test_ret += test_xmlXPathNewContext();
- test_ret += test_xmlXPathNodeSetCreate();
- test_ret += test_xmlXPathObjectCopy();
- test_ret += test_xmlXPathOrderDocElems();
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlNodePtr node; /* the node to to use as the context node */
+ int n_node;
+ xmlXPathContextPtr ctx; /* the XPath context */
+ int n_ctx;
+
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ for (n_ctx = 0;n_ctx < gen_nb_xmlXPathContextPtr;n_ctx++) {
+ mem_base = xmlMemBlocks();
+ node = gen_xmlNodePtr(n_node, 0);
+ ctx = gen_xmlXPathContextPtr(n_ctx, 1);
+
+ ret_val = xmlXPathSetContextNode(node, ctx);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_node, node, 0);
+ des_xmlXPathContextPtr(n_ctx, ctx, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathSetContextNode",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_node);
+ printf(" %d", n_ctx);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+static int
+test_xpath(void) {
+ int test_ret = 0;
+ int rc = 0;
+
+ if (quiet == 0) printf("Testing xpath : 32 of 40 functions ...\n");
+ rc = test_xmlXPathCastBooleanToNumber();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathCastBooleanToString();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathCastNodeSetToBoolean();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathCastNodeSetToNumber();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathCastNodeSetToString();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathCastNodeToNumber();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathCastNodeToString();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathCastNumberToBoolean();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathCastNumberToString();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathCastStringToBoolean();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathCastStringToNumber();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathCastToBoolean();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathCastToNumber();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathCastToString();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathCmpNodes();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathCompile();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathCompiledEval();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathCompiledEvalToBoolean();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathContextSetCache();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathConvertBoolean();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathConvertNumber();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathConvertString();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathCtxtCompile();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathEval();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathEvalExpression();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathEvalPredicate();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathInit();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathIsInf();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathIsNaN();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathNewContext();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathNodeEval();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathNodeSetCreate();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathObjectCopy();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathOrderDocElems();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathSetContextNode();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
if (test_ret != 0)
printf("Module xpath: %d errors\n", test_ret);
#if defined(LIBXML_XPATH_ENABLED)
int mem_base;
+ int ret_val;
xmlNodeSetPtr cur; /* the initial node set */
int n_cur;
xmlNodePtr val; /* a new xmlNodePtr */
cur = gen_xmlNodeSetPtr(n_cur, 0);
val = gen_xmlNodePtr(n_val, 1);
- xmlXPathNodeSetAdd(cur, val);
+ ret_val = xmlXPathNodeSetAdd(cur, val);
+ desret_int(ret_val);
call_tests++;
des_xmlNodeSetPtr(n_cur, cur, 0);
des_xmlNodePtr(n_val, val, 1);
#if defined(LIBXML_XPATH_ENABLED)
int mem_base;
+ int ret_val;
xmlNodeSetPtr cur; /* the initial node set */
int n_cur;
xmlNodePtr node; /* the hosting node */
node = gen_xmlNodePtr(n_node, 1);
ns = gen_xmlNsPtr(n_ns, 2);
- xmlXPathNodeSetAddNs(cur, node, ns);
+ ret_val = xmlXPathNodeSetAddNs(cur, node, ns);
+ desret_int(ret_val);
call_tests++;
des_xmlNodeSetPtr(n_cur, cur, 0);
des_xmlNodePtr(n_node, node, 1);
#if defined(LIBXML_XPATH_ENABLED)
int mem_base;
+ int ret_val;
xmlNodeSetPtr cur; /* the initial node set */
int n_cur;
xmlNodePtr val; /* a new xmlNodePtr */
cur = gen_xmlNodeSetPtr(n_cur, 0);
val = gen_xmlNodePtr(n_val, 1);
- xmlXPathNodeSetAddUnique(cur, val);
+ ret_val = xmlXPathNodeSetAddUnique(cur, val);
+ desret_int(ret_val);
call_tests++;
des_xmlNodeSetPtr(n_cur, cur, 0);
des_xmlNodePtr(n_val, val, 1);
static int
test_xpathInternals(void) {
int test_ret = 0;
+ int rc = 0;
if (quiet == 0) printf("Testing xpathInternals : 106 of 117 functions ...\n");
- test_ret += test_valuePop();
- test_ret += test_valuePush();
- test_ret += test_xmlXPathAddValues();
- test_ret += test_xmlXPathBooleanFunction();
- test_ret += test_xmlXPathCeilingFunction();
- test_ret += test_xmlXPathCompareValues();
- test_ret += test_xmlXPathConcatFunction();
- test_ret += test_xmlXPathContainsFunction();
- test_ret += test_xmlXPathCountFunction();
- test_ret += test_xmlXPathDebugDumpCompExpr();
- test_ret += test_xmlXPathDebugDumpObject();
- test_ret += test_xmlXPathDifference();
- test_ret += test_xmlXPathDistinct();
- test_ret += test_xmlXPathDistinctSorted();
- test_ret += test_xmlXPathDivValues();
- test_ret += test_xmlXPathEqualValues();
- test_ret += test_xmlXPathErr();
- test_ret += test_xmlXPathEvalExpr();
- test_ret += test_xmlXPathEvaluatePredicateResult();
- test_ret += test_xmlXPathFalseFunction();
- test_ret += test_xmlXPathFloorFunction();
- test_ret += test_xmlXPathFunctionLookup();
- test_ret += test_xmlXPathFunctionLookupNS();
- test_ret += test_xmlXPathHasSameNodes();
- test_ret += test_xmlXPathIdFunction();
- test_ret += test_xmlXPathIntersection();
- test_ret += test_xmlXPathIsNodeType();
- test_ret += test_xmlXPathLangFunction();
- test_ret += test_xmlXPathLastFunction();
- test_ret += test_xmlXPathLeading();
- test_ret += test_xmlXPathLeadingSorted();
- test_ret += test_xmlXPathLocalNameFunction();
- test_ret += test_xmlXPathModValues();
- test_ret += test_xmlXPathMultValues();
- test_ret += test_xmlXPathNamespaceURIFunction();
- test_ret += test_xmlXPathNewBoolean();
- test_ret += test_xmlXPathNewCString();
- test_ret += test_xmlXPathNewFloat();
- test_ret += test_xmlXPathNewNodeSet();
- test_ret += test_xmlXPathNewNodeSetList();
- test_ret += test_xmlXPathNewParserContext();
- test_ret += test_xmlXPathNewString();
- test_ret += test_xmlXPathNextAncestor();
- test_ret += test_xmlXPathNextAncestorOrSelf();
- test_ret += test_xmlXPathNextAttribute();
- test_ret += test_xmlXPathNextChild();
- test_ret += test_xmlXPathNextDescendant();
- test_ret += test_xmlXPathNextDescendantOrSelf();
- test_ret += test_xmlXPathNextFollowing();
- test_ret += test_xmlXPathNextFollowingSibling();
- test_ret += test_xmlXPathNextNamespace();
- test_ret += test_xmlXPathNextParent();
- test_ret += test_xmlXPathNextPreceding();
- test_ret += test_xmlXPathNextPrecedingSibling();
- test_ret += test_xmlXPathNextSelf();
- test_ret += test_xmlXPathNodeLeading();
- test_ret += test_xmlXPathNodeLeadingSorted();
- test_ret += test_xmlXPathNodeSetAdd();
- test_ret += test_xmlXPathNodeSetAddNs();
- test_ret += test_xmlXPathNodeSetAddUnique();
- test_ret += test_xmlXPathNodeSetContains();
- test_ret += test_xmlXPathNodeSetDel();
- test_ret += test_xmlXPathNodeSetMerge();
- test_ret += test_xmlXPathNodeSetRemove();
- test_ret += test_xmlXPathNodeSetSort();
- test_ret += test_xmlXPathNodeTrailing();
- test_ret += test_xmlXPathNodeTrailingSorted();
- test_ret += test_xmlXPathNormalizeFunction();
- test_ret += test_xmlXPathNotEqualValues();
- test_ret += test_xmlXPathNotFunction();
- test_ret += test_xmlXPathNsLookup();
- test_ret += test_xmlXPathNumberFunction();
- test_ret += test_xmlXPathParseNCName();
- test_ret += test_xmlXPathParseName();
- test_ret += test_xmlXPathPopBoolean();
- test_ret += test_xmlXPathPopExternal();
- test_ret += test_xmlXPathPopNodeSet();
- test_ret += test_xmlXPathPopNumber();
- test_ret += test_xmlXPathPopString();
- test_ret += test_xmlXPathPositionFunction();
- test_ret += test_xmlXPathRegisterAllFunctions();
- test_ret += test_xmlXPathRegisterFunc();
- test_ret += test_xmlXPathRegisterFuncLookup();
- test_ret += test_xmlXPathRegisterFuncNS();
- test_ret += test_xmlXPathRegisterNs();
- test_ret += test_xmlXPathRegisterVariable();
- test_ret += test_xmlXPathRegisterVariableLookup();
- test_ret += test_xmlXPathRegisterVariableNS();
- test_ret += test_xmlXPathRegisteredFuncsCleanup();
- test_ret += test_xmlXPathRegisteredNsCleanup();
- test_ret += test_xmlXPathRegisteredVariablesCleanup();
- test_ret += test_xmlXPathRoot();
- test_ret += test_xmlXPathRoundFunction();
- test_ret += test_xmlXPathStartsWithFunction();
- test_ret += test_xmlXPathStringEvalNumber();
- test_ret += test_xmlXPathStringFunction();
- test_ret += test_xmlXPathStringLengthFunction();
- test_ret += test_xmlXPathSubValues();
- test_ret += test_xmlXPathSubstringAfterFunction();
- test_ret += test_xmlXPathSubstringBeforeFunction();
- test_ret += test_xmlXPathSubstringFunction();
- test_ret += test_xmlXPathSumFunction();
- test_ret += test_xmlXPathTrailing();
- test_ret += test_xmlXPathTrailingSorted();
- test_ret += test_xmlXPathTranslateFunction();
- test_ret += test_xmlXPathTrueFunction();
- test_ret += test_xmlXPathValueFlipSign();
- test_ret += test_xmlXPathVariableLookup();
- test_ret += test_xmlXPathVariableLookupNS();
- test_ret += test_xmlXPathWrapCString();
- test_ret += test_xmlXPathWrapExternal();
- test_ret += test_xmlXPathWrapNodeSet();
- test_ret += test_xmlXPatherror();
+ rc = test_valuePop();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_valuePush();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathAddValues();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathBooleanFunction();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathCeilingFunction();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathCompareValues();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathConcatFunction();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathContainsFunction();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathCountFunction();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathDebugDumpCompExpr();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathDebugDumpObject();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathDifference();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathDistinct();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathDistinctSorted();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathDivValues();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathEqualValues();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathErr();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathEvalExpr();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathEvaluatePredicateResult();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathFalseFunction();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathFloorFunction();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathFunctionLookup();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathFunctionLookupNS();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathHasSameNodes();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathIdFunction();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathIntersection();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathIsNodeType();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathLangFunction();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathLastFunction();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathLeading();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathLeadingSorted();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathLocalNameFunction();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathModValues();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathMultValues();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathNamespaceURIFunction();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathNewBoolean();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathNewCString();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathNewFloat();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathNewNodeSet();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathNewNodeSetList();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathNewParserContext();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathNewString();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathNextAncestor();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathNextAncestorOrSelf();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathNextAttribute();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathNextChild();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathNextDescendant();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathNextDescendantOrSelf();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathNextFollowing();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathNextFollowingSibling();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathNextNamespace();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathNextParent();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathNextPreceding();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathNextPrecedingSibling();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathNextSelf();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathNodeLeading();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathNodeLeadingSorted();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathNodeSetAdd();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathNodeSetAddNs();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathNodeSetAddUnique();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathNodeSetContains();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathNodeSetDel();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathNodeSetMerge();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathNodeSetRemove();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathNodeSetSort();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathNodeTrailing();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathNodeTrailingSorted();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathNormalizeFunction();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathNotEqualValues();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathNotFunction();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathNsLookup();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathNumberFunction();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathParseNCName();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathParseName();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathPopBoolean();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathPopExternal();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathPopNodeSet();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathPopNumber();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathPopString();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathPositionFunction();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathRegisterAllFunctions();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathRegisterFunc();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathRegisterFuncLookup();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathRegisterFuncNS();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathRegisterNs();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathRegisterVariable();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathRegisterVariableLookup();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathRegisterVariableNS();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathRegisteredFuncsCleanup();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathRegisteredNsCleanup();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathRegisteredVariablesCleanup();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathRoot();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathRoundFunction();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathStartsWithFunction();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathStringEvalNumber();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathStringFunction();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathStringLengthFunction();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathSubValues();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathSubstringAfterFunction();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathSubstringBeforeFunction();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathSubstringFunction();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathSumFunction();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathTrailing();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathTrailingSorted();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathTranslateFunction();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathTrueFunction();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathValueFlipSign();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathVariableLookup();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathVariableLookupNS();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathWrapCString();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathWrapExternal();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPathWrapNodeSet();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPatherror();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
if (test_ret != 0)
printf("Module xpathInternals: %d errors\n", test_ret);
static int
test_xpointer(void) {
int test_ret = 0;
+ int rc = 0;
if (quiet == 0) printf("Testing xpointer : 17 of 21 functions ...\n");
- test_ret += test_xmlXPtrBuildNodeList();
- test_ret += test_xmlXPtrEval();
- test_ret += test_xmlXPtrEvalRangePredicate();
- test_ret += test_xmlXPtrLocationSetAdd();
- test_ret += test_xmlXPtrLocationSetCreate();
- test_ret += test_xmlXPtrLocationSetDel();
- test_ret += test_xmlXPtrLocationSetMerge();
- test_ret += test_xmlXPtrLocationSetRemove();
- test_ret += test_xmlXPtrNewCollapsedRange();
- test_ret += test_xmlXPtrNewContext();
- test_ret += test_xmlXPtrNewLocationSetNodeSet();
- test_ret += test_xmlXPtrNewLocationSetNodes();
- test_ret += test_xmlXPtrNewRange();
- test_ret += test_xmlXPtrNewRangeNodeObject();
- test_ret += test_xmlXPtrNewRangeNodePoint();
- test_ret += test_xmlXPtrNewRangeNodes();
- test_ret += test_xmlXPtrNewRangePointNode();
- test_ret += test_xmlXPtrNewRangePoints();
- test_ret += test_xmlXPtrRangeToFunction();
- test_ret += test_xmlXPtrWrapLocationSet();
+ rc = test_xmlXPtrBuildNodeList();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPtrEval();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPtrEvalRangePredicate();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPtrLocationSetAdd();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPtrLocationSetCreate();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPtrLocationSetDel();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPtrLocationSetMerge();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPtrLocationSetRemove();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPtrNewCollapsedRange();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPtrNewContext();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPtrNewLocationSetNodeSet();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPtrNewLocationSetNodes();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPtrNewRange();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPtrNewRangeNodeObject();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPtrNewRangeNodePoint();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPtrNewRangeNodes();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPtrNewRangePointNode();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPtrNewRangePoints();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPtrRangeToFunction();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
+ rc = test_xmlXPtrWrapLocationSet();
+ if( rc == 0 ) { printf("TEST: PASS: \n"); } else { printf("TEST: FAIL: \n"); } test_ret += rc;
if (test_ret != 0)
printf("Module xpointer: %d errors\n", test_ret);