| 28168 | |
| 28169 | |
| 28170 | static int |
| 28171 | test_xmlOutputBufferWriteString(void) { |
| 28172 | int test_ret = 0; |
| 28173 | |
| 28174 | #if defined(LIBXML_OUTPUT_ENABLED) |
| 28175 | int mem_base; |
| 28176 | int ret_val; |
| 28177 | xmlOutputBufferPtr out; /* a buffered parser output */ |
| 28178 | int n_out; |
| 28179 | char * str; /* a zero terminated C string */ |
| 28180 | int n_str; |
| 28181 | |
| 28182 | for (n_out = 0;n_out < gen_nb_xmlOutputBufferPtr;n_out++) { |
| 28183 | for (n_str = 0;n_str < gen_nb_const_char_ptr;n_str++) { |
| 28184 | mem_base = xmlMemBlocks(); |
| 28185 | out = gen_xmlOutputBufferPtr(n_out, 0); |
| 28186 | str = gen_const_char_ptr(n_str, 1); |
| 28187 | |
| 28188 | ret_val = xmlOutputBufferWriteString(out, (const char *)str); |
| 28189 | desret_int(ret_val); |
| 28190 | call_tests++; |
| 28191 | des_xmlOutputBufferPtr(n_out, out, 0); |
| 28192 | des_const_char_ptr(n_str, (const char *)str, 1); |
| 28193 | xmlResetLastError(); |
| 28194 | if (mem_base != xmlMemBlocks()) { |
| 28195 | printf("Leak of %d blocks found in xmlOutputBufferWriteString", |
| 28196 | xmlMemBlocks() - mem_base); |
| 28197 | test_ret++; |
| 28198 | printf(" %d", n_out); |
| 28199 | printf(" %d", n_str); |
| 28200 | printf("\n"); |
| 28201 | } |
| 28202 | } |
| 28203 | } |
| 28204 | function_tests++; |
| 28205 | #endif |
| 28206 | |
| 28207 | return(test_ret); |
| 28208 | } |
| 28209 | |
| 28210 | |
| 28211 | static int |
no test coverage detected