| 3285 | |
| 3286 | |
| 3287 | static int |
| 3288 | test_htmlNodeDumpFileFormat(void) { |
| 3289 | int test_ret = 0; |
| 3290 | |
| 3291 | #if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) |
| 3292 | int mem_base; |
| 3293 | int ret_val; |
| 3294 | FILE * out; /* the FILE pointer */ |
| 3295 | int n_out; |
| 3296 | xmlDocPtr doc; /* the document */ |
| 3297 | int n_doc; |
| 3298 | xmlNodePtr cur; /* the current node */ |
| 3299 | int n_cur; |
| 3300 | char * encoding; /* the document encoding */ |
| 3301 | int n_encoding; |
| 3302 | int format; /* should formatting spaces been added */ |
| 3303 | int n_format; |
| 3304 | |
| 3305 | for (n_out = 0;n_out < gen_nb_FILE_ptr;n_out++) { |
| 3306 | for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) { |
| 3307 | for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) { |
| 3308 | for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) { |
| 3309 | for (n_format = 0;n_format < gen_nb_int;n_format++) { |
| 3310 | mem_base = xmlMemBlocks(); |
| 3311 | out = gen_FILE_ptr(n_out, 0); |
| 3312 | doc = gen_xmlDocPtr(n_doc, 1); |
| 3313 | cur = gen_xmlNodePtr(n_cur, 2); |
| 3314 | encoding = gen_const_char_ptr(n_encoding, 3); |
| 3315 | format = gen_int(n_format, 4); |
| 3316 | |
| 3317 | ret_val = htmlNodeDumpFileFormat(out, doc, cur, (const char *)encoding, format); |
| 3318 | desret_int(ret_val); |
| 3319 | call_tests++; |
| 3320 | des_FILE_ptr(n_out, out, 0); |
| 3321 | des_xmlDocPtr(n_doc, doc, 1); |
| 3322 | des_xmlNodePtr(n_cur, cur, 2); |
| 3323 | des_const_char_ptr(n_encoding, (const char *)encoding, 3); |
| 3324 | des_int(n_format, format, 4); |
| 3325 | xmlResetLastError(); |
| 3326 | if (mem_base != xmlMemBlocks()) { |
| 3327 | printf("Leak of %d blocks found in htmlNodeDumpFileFormat", |
| 3328 | xmlMemBlocks() - mem_base); |
| 3329 | test_ret++; |
| 3330 | printf(" %d", n_out); |
| 3331 | printf(" %d", n_doc); |
| 3332 | printf(" %d", n_cur); |
| 3333 | printf(" %d", n_encoding); |
| 3334 | printf(" %d", n_format); |
| 3335 | printf("\n"); |
| 3336 | } |
| 3337 | } |
| 3338 | } |
| 3339 | } |
| 3340 | } |
| 3341 | } |
| 3342 | function_tests++; |
| 3343 | #endif |
| 3344 |
no test coverage detected