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

Function test_xmlOutputBufferWriteString

Externals/LibXML/testapi.c:28170–28208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28168
28169
28170static int
28171test_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
28211static int

Callers 1

test_xmlIOFunction · 0.85

Calls 8

xmlMemBlocksFunction · 0.85
gen_xmlOutputBufferPtrFunction · 0.85
gen_const_char_ptrFunction · 0.85
desret_intFunction · 0.85
des_xmlOutputBufferPtrFunction · 0.85
des_const_char_ptrFunction · 0.85
xmlResetLastErrorFunction · 0.85

Tested by

no test coverage detected