MCPcopy Create free account
hub / github.com/KhronosGroup/OpenCOLLADA / test_htmlNodeDumpFile

Function test_htmlNodeDumpFile

Externals/LibXML/testapi.c:3241–3284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3239
3240
3241static int
3242test_htmlNodeDumpFile(void) {
3243 int test_ret = 0;
3244
3245#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
3246 int mem_base;
3247 FILE * out; /* the FILE pointer */
3248 int n_out;
3249 xmlDocPtr doc; /* the document */
3250 int n_doc;
3251 xmlNodePtr cur; /* the current node */
3252 int n_cur;
3253
3254 for (n_out = 0;n_out < gen_nb_FILE_ptr;n_out++) {
3255 for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
3256 for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
3257 mem_base = xmlMemBlocks();
3258 out = gen_FILE_ptr(n_out, 0);
3259 doc = gen_xmlDocPtr(n_doc, 1);
3260 cur = gen_xmlNodePtr(n_cur, 2);
3261
3262 htmlNodeDumpFile(out, doc, cur);
3263 call_tests++;
3264 des_FILE_ptr(n_out, out, 0);
3265 des_xmlDocPtr(n_doc, doc, 1);
3266 des_xmlNodePtr(n_cur, cur, 2);
3267 xmlResetLastError();
3268 if (mem_base != xmlMemBlocks()) {
3269 printf("Leak of %d blocks found in htmlNodeDumpFile",
3270 xmlMemBlocks() - mem_base);
3271 test_ret++;
3272 printf(" %d", n_out);
3273 printf(" %d", n_doc);
3274 printf(" %d", n_cur);
3275 printf("\n");
3276 }
3277 }
3278 }
3279 }
3280 function_tests++;
3281#endif
3282
3283 return(test_ret);
3284}
3285
3286
3287static int

Callers 1

test_HTMLtreeFunction · 0.85

Calls 9

xmlMemBlocksFunction · 0.85
gen_FILE_ptrFunction · 0.85
gen_xmlDocPtrFunction · 0.85
gen_xmlNodePtrFunction · 0.85
htmlNodeDumpFileFunction · 0.85
des_FILE_ptrFunction · 0.85
des_xmlDocPtrFunction · 0.85
des_xmlNodePtrFunction · 0.85
xmlResetLastErrorFunction · 0.85

Tested by

no test coverage detected