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

Function test_xmlShellLoad

Externals/LibXML/testapi.c:7768–7820  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7766
7767
7768static int
7769test_xmlShellLoad(void) {
7770 int test_ret = 0;
7771
7772#if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED)
7773 int mem_base;
7774 int ret_val;
7775 xmlShellCtxtPtr ctxt; /* the shell context */
7776 int n_ctxt;
7777 char * filename; /* the file name */
7778 int n_filename;
7779 xmlNodePtr node; /* unused */
7780 int n_node;
7781 xmlNodePtr node2; /* unused */
7782 int n_node2;
7783
7784 for (n_ctxt = 0;n_ctxt < gen_nb_xmlShellCtxtPtr;n_ctxt++) {
7785 for (n_filename = 0;n_filename < gen_nb_char_ptr;n_filename++) {
7786 for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
7787 for (n_node2 = 0;n_node2 < gen_nb_xmlNodePtr;n_node2++) {
7788 mem_base = xmlMemBlocks();
7789 ctxt = gen_xmlShellCtxtPtr(n_ctxt, 0);
7790 filename = gen_char_ptr(n_filename, 1);
7791 node = gen_xmlNodePtr(n_node, 2);
7792 node2 = gen_xmlNodePtr(n_node2, 3);
7793
7794 ret_val = xmlShellLoad(ctxt, filename, node, node2);
7795 desret_int(ret_val);
7796 call_tests++;
7797 des_xmlShellCtxtPtr(n_ctxt, ctxt, 0);
7798 des_char_ptr(n_filename, filename, 1);
7799 des_xmlNodePtr(n_node, node, 2);
7800 des_xmlNodePtr(n_node2, node2, 3);
7801 xmlResetLastError();
7802 if (mem_base != xmlMemBlocks()) {
7803 printf("Leak of %d blocks found in xmlShellLoad",
7804 xmlMemBlocks() - mem_base);
7805 test_ret++;
7806 printf(" %d", n_ctxt);
7807 printf(" %d", n_filename);
7808 printf(" %d", n_node);
7809 printf(" %d", n_node2);
7810 printf("\n");
7811 }
7812 }
7813 }
7814 }
7815 }
7816 function_tests++;
7817#endif
7818
7819 return(test_ret);
7820}
7821
7822
7823static int

Callers 1

test_debugXMLFunction · 0.85

Calls 10

xmlMemBlocksFunction · 0.85
gen_xmlShellCtxtPtrFunction · 0.85
gen_char_ptrFunction · 0.85
gen_xmlNodePtrFunction · 0.85
xmlShellLoadFunction · 0.85
desret_intFunction · 0.85
des_xmlShellCtxtPtrFunction · 0.85
des_char_ptrFunction · 0.85
des_xmlNodePtrFunction · 0.85
xmlResetLastErrorFunction · 0.85

Tested by

no test coverage detected