[Xmltools-development] xmltools/tests getdata.c setdata.c testdata.c
Status: Beta
Brought to you by:
nik_89
|
From: nik_89 <ni...@us...> - 2005-01-07 05:59:49
|
Update of /cvsroot/xmltools/xmltools/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6228 Modified Files: getdata.c setdata.c testdata.c Log Message: the test programs Index: setdata.c =================================================================== RCS file: /cvsroot/xmltools/xmltools/tests/setdata.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** setdata.c 1 Nov 2004 18:02:41 -0000 1.2 --- setdata.c 7 Jan 2005 05:59:39 -0000 1.3 *************** *** 18,22 **** #include <stdio.h> ! #include "../src/xmltools.h" void test_adv_node(); --- 18,22 ---- #include <stdio.h> ! #include "../xmltools.h" void test_adv_node(); *************** *** 34,37 **** --- 34,38 ---- #endif + Xmltool_Clean(); return 0; } Index: getdata.c =================================================================== RCS file: /cvsroot/xmltools/xmltools/tests/getdata.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** getdata.c 1 Nov 2004 18:02:40 -0000 1.2 --- getdata.c 7 Jan 2005 05:59:39 -0000 1.3 *************** *** 18,22 **** #include <stdio.h> ! #include "../src/xmltools.h" void test_adv_node2(); --- 18,22 ---- #include <stdio.h> ! #include "../xmltools.h" void test_adv_node2(); *************** *** 56,59 **** --- 56,60 ---- if (buf == NULL) { + Xmltool_Perror("1"); return; } Index: testdata.c =================================================================== RCS file: /cvsroot/xmltools/xmltools/tests/testdata.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** testdata.c 1 Nov 2004 18:02:41 -0000 1.2 --- testdata.c 7 Jan 2005 05:59:39 -0000 1.3 *************** *** 18,22 **** #include <stdio.h> ! #include "../src/xmltools.h" void test_adv_node2(); --- 18,22 ---- #include <stdio.h> ! #include "../xmltools.h" void test_adv_node2(); *************** *** 29,40 **** --- 29,55 ---- printf("will write\n"); test_adv_node(); + printf("done, press any key to continue\n"); + getchar(); printf("will read\n"); test_adv_node2(); + printf("will clean\n"); Xmltool_Clean(); + /* showMemStats(); */ + printf("done, press any key to continue\n"); + getchar(); + printf("unlinking the file\n"); + unlink("hou2.xml"); + printf("done, press any key to continue\n"); + getchar(); printf("will write\n"); test_adv_node(); + printf("done, press any key to continue\n"); + getchar(); printf("will read\n"); test_adv_node2(); Xmltool_Clean(); + /* showMemStats(); */ + printf("done, press any key to continue\n"); + getchar(); return 0; } *************** *** 88,92 **** void test_adv_node() { ! Nmap_Add("root", "foo", "bar"); if (Nmap_Add("root", "barba", "barb1") != 0) --- 103,108 ---- void test_adv_node() { ! if (Nmap_Add("root", "foo", "bar") != 0) ! Xmltool_Perror("node_add"); if (Nmap_Add("root", "barba", "barb1") != 0) *************** *** 106,110 **** Xmltool_Perror("node_add"); } ! /* p_allnodes(); */ Xmltool_MAddXml("hou2.xml"); --- 122,138 ---- Xmltool_Perror("node_add"); } ! Xmltool_MAddXml("hou2.xml"); ! ! if (Nmap_Add("root", "foo", "barb5") != 0) ! Xmltool_Perror("node_add"); ! if (Nmap_Add("root", "barba", "barb6") != 0) ! Xmltool_Perror("node_add"); ! if (Nmap_Add("root", "barbb", "barb7") != 0) ! Xmltool_Perror("node_add"); ! if (Nmap_Add("root", "barbc", "barb8") != 0) ! Xmltool_Perror("node_add"); ! if (Nmap_Add("root", "barbd", "barb9") != 0) ! Xmltool_Perror("node_add"); ! Xmltool_MAddXml("hou2.xml"); |