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

Function test_htmlSaveFileFormat

Externals/LibXML/testapi.c:3551–3603  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3549
3550
3551static int
3552test_htmlSaveFileFormat(void) {
3553 int test_ret = 0;
3554
3555#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
3556 int mem_base;
3557 int ret_val;
3558 const char * filename; /* the filename */
3559 int n_filename;
3560 xmlDocPtr cur; /* the document */
3561 int n_cur;
3562 char * encoding; /* the document encoding */
3563 int n_encoding;
3564 int format; /* should formatting spaces been added */
3565 int n_format;
3566
3567 for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
3568 for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
3569 for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
3570 for (n_format = 0;n_format < gen_nb_int;n_format++) {
3571 mem_base = xmlMemBlocks();
3572 filename = gen_fileoutput(n_filename, 0);
3573 cur = gen_xmlDocPtr(n_cur, 1);
3574 encoding = gen_const_char_ptr(n_encoding, 2);
3575 format = gen_int(n_format, 3);
3576
3577 ret_val = htmlSaveFileFormat(filename, cur, (const char *)encoding, format);
3578 desret_int(ret_val);
3579 call_tests++;
3580 des_fileoutput(n_filename, filename, 0);
3581 des_xmlDocPtr(n_cur, cur, 1);
3582 des_const_char_ptr(n_encoding, (const char *)encoding, 2);
3583 des_int(n_format, format, 3);
3584 xmlResetLastError();
3585 if (mem_base != xmlMemBlocks()) {
3586 printf("Leak of %d blocks found in htmlSaveFileFormat",
3587 xmlMemBlocks() - mem_base);
3588 test_ret++;
3589 printf(" %d", n_filename);
3590 printf(" %d", n_cur);
3591 printf(" %d", n_encoding);
3592 printf(" %d", n_format);
3593 printf("\n");
3594 }
3595 }
3596 }
3597 }
3598 }
3599 function_tests++;
3600#endif
3601
3602 return(test_ret);
3603}
3604
3605
3606static int

Callers 1

test_HTMLtreeFunction · 0.85

Calls 12

xmlMemBlocksFunction · 0.85
gen_fileoutputFunction · 0.85
gen_xmlDocPtrFunction · 0.85
gen_const_char_ptrFunction · 0.85
gen_intFunction · 0.85
htmlSaveFileFormatFunction · 0.85
desret_intFunction · 0.85
des_fileoutputFunction · 0.85
des_xmlDocPtrFunction · 0.85
des_const_char_ptrFunction · 0.85
des_intFunction · 0.85
xmlResetLastErrorFunction · 0.85

Tested by

no test coverage detected