| 2795 | } |
| 2796 | |
| 2797 | static int |
| 2798 | test_htmlDocContentDumpFormatOutput(void) { |
| 2799 | int test_ret = 0; |
| 2800 | |
| 2801 | #if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) |
| 2802 | int mem_base; |
| 2803 | xmlOutputBufferPtr buf; /* the HTML buffer output */ |
| 2804 | int n_buf; |
| 2805 | xmlDocPtr cur; /* the document */ |
| 2806 | int n_cur; |
| 2807 | char * encoding; /* the encoding string */ |
| 2808 | int n_encoding; |
| 2809 | int format; /* should formatting spaces been added */ |
| 2810 | int n_format; |
| 2811 | |
| 2812 | for (n_buf = 0;n_buf < gen_nb_xmlOutputBufferPtr;n_buf++) { |
| 2813 | for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) { |
| 2814 | for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) { |
| 2815 | for (n_format = 0;n_format < gen_nb_int;n_format++) { |
| 2816 | mem_base = xmlMemBlocks(); |
| 2817 | buf = gen_xmlOutputBufferPtr(n_buf, 0); |
| 2818 | cur = gen_xmlDocPtr(n_cur, 1); |
| 2819 | encoding = gen_const_char_ptr(n_encoding, 2); |
| 2820 | format = gen_int(n_format, 3); |
| 2821 | |
| 2822 | htmlDocContentDumpFormatOutput(buf, cur, (const char *)encoding, format); |
| 2823 | call_tests++; |
| 2824 | des_xmlOutputBufferPtr(n_buf, buf, 0); |
| 2825 | des_xmlDocPtr(n_cur, cur, 1); |
| 2826 | des_const_char_ptr(n_encoding, (const char *)encoding, 2); |
| 2827 | des_int(n_format, format, 3); |
| 2828 | xmlResetLastError(); |
| 2829 | if (mem_base != xmlMemBlocks()) { |
| 2830 | printf("Leak of %d blocks found in htmlDocContentDumpFormatOutput", |
| 2831 | xmlMemBlocks() - mem_base); |
| 2832 | test_ret++; |
| 2833 | printf(" %d", n_buf); |
| 2834 | printf(" %d", n_cur); |
| 2835 | printf(" %d", n_encoding); |
| 2836 | printf(" %d", n_format); |
| 2837 | printf("\n"); |
| 2838 | } |
| 2839 | } |
| 2840 | } |
| 2841 | } |
| 2842 | } |
| 2843 | function_tests++; |
| 2844 | #endif |
| 2845 | |
| 2846 | return(test_ret); |
| 2847 | } |
| 2848 | |
| 2849 | |
| 2850 | static int |
no test coverage detected