| 28219 | |
| 28220 | |
| 28221 | static int |
| 28222 | test_xmlParserInputBufferCreateFd(void) { |
| 28223 | int test_ret = 0; |
| 28224 | |
| 28225 | int mem_base; |
| 28226 | xmlParserInputBufferPtr ret_val; |
| 28227 | int fd; /* a file descriptor number */ |
| 28228 | int n_fd; |
| 28229 | xmlCharEncoding enc; /* the charset encoding if known */ |
| 28230 | int n_enc; |
| 28231 | |
| 28232 | for (n_fd = 0;n_fd < gen_nb_int;n_fd++) { |
| 28233 | for (n_enc = 0;n_enc < gen_nb_xmlCharEncoding;n_enc++) { |
| 28234 | mem_base = xmlMemBlocks(); |
| 28235 | fd = gen_int(n_fd, 0); |
| 28236 | enc = gen_xmlCharEncoding(n_enc, 1); |
| 28237 | if (fd >= 0) fd = -1; |
| 28238 | |
| 28239 | ret_val = xmlParserInputBufferCreateFd(fd, enc); |
| 28240 | desret_xmlParserInputBufferPtr(ret_val); |
| 28241 | call_tests++; |
| 28242 | des_int(n_fd, fd, 0); |
| 28243 | des_xmlCharEncoding(n_enc, enc, 1); |
| 28244 | xmlResetLastError(); |
| 28245 | if (mem_base != xmlMemBlocks()) { |
| 28246 | printf("Leak of %d blocks found in xmlParserInputBufferCreateFd", |
| 28247 | xmlMemBlocks() - mem_base); |
| 28248 | test_ret++; |
| 28249 | printf(" %d", n_fd); |
| 28250 | printf(" %d", n_enc); |
| 28251 | printf("\n"); |
| 28252 | } |
| 28253 | } |
| 28254 | } |
| 28255 | function_tests++; |
| 28256 | |
| 28257 | return(test_ret); |
| 28258 | } |
| 28259 | |
| 28260 | |
| 28261 | static int |
no test coverage detected