Changeset 93 for trunk/test/src/RpLibraryC_test.c
- Timestamp:
- Oct 6, 2005 3:33:41 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/src/RpLibraryC_test.c
r83 r93 28 28 printf("TESTING ELEMENT: path = %s\n", path); 29 29 30 searchEle = element(lib,path);31 type = elementAsType(lib,path);32 comp = elementAsComp(lib,path);33 id = elementAsId(lib,path);30 searchEle = rpElement(lib,path); 31 type = rpElementAsType(lib,path); 32 comp = rpElementAsComp(lib,path); 33 id = rpElementAsId(lib,path); 34 34 35 35 if (!searchEle) { … … 42 42 printf("searchEle type = :%s:\n", type); 43 43 44 comp = nodeComp(searchEle);45 id = nodeId(searchEle);46 type = nodeType(searchEle);47 44 comp = rpNodeComp(searchEle); 45 id = rpNodeId(searchEle); 46 type = rpNodeType(searchEle); 47 48 48 printf("searchEle comp = :%s:\n", comp); 49 49 printf("searchEle id = :%s:\n", id); … … 63 63 printf("TESTING GET String: path = %s\n", path); 64 64 65 searchVal = getString(lib,path);65 searchVal = rpGetString(lib,path); 66 66 67 67 if (!searchVal || *searchVal == '\0') { … … 84 84 printf("TESTING GET Double: path = %s\n", path); 85 85 86 searchVal = getDouble(lib,path);86 searchVal = rpGetDouble(lib,path); 87 87 88 88 printf("searchVal = :%f:\n", searchVal); … … 102 102 printf("TESTING CHILDREN: path = %s\n", path); 103 103 104 while ( (childEle = children(lib,path,childEle)) ) {105 comp = nodeComp(childEle);106 id = nodeId(childEle);107 type = nodeType(childEle);104 while ( (childEle = rpChildren(lib,path,childEle)) ) { 105 comp = rpNodeComp(childEle); 106 id = rpNodeId(childEle); 107 type = rpNodeType(childEle); 108 108 109 109 printf("childEle comp = :%s:\n",comp); … … 128 128 printf("TESTING CHILDREN: path = %s\n", path); 129 129 130 while ( (childEle = childrenByType(lib,path,childEle,searchType)) ) {131 comp = nodeComp(childEle);132 id = nodeId(childEle);133 type = nodeType(childEle);130 while ( (childEle = rpChildrenByType(lib,path,childEle,searchType)) ) { 131 comp = rpNodeComp(childEle); 132 id = rpNodeId(childEle); 133 type = rpNodeType(childEle); 134 134 135 135 printf("childEle comp = :%s:\n",comp); … … 151 151 printf("TESTING PUT String: path = %s\n", path); 152 152 153 putString(lib,path,value,append);154 searchVal = getString(lib, path);153 rpPutString(lib,path,value,append); 154 searchVal = rpGetString(lib, path); 155 155 156 156 if (!searchVal || *searchVal == '\0') { … … 173 173 printf("TESTING PUT String: path = %s\n", path); 174 174 175 putDouble(lib,path,value,append);176 searchVal = getDouble(lib, path);175 rpPutDouble(lib,path,value,append); 176 searchVal = rpGetDouble(lib, path); 177 177 printf("searchVal = :%f:\n", searchVal); 178 178 retVal = 0; … … 186 186 RpLibrary* lib = NULL; 187 187 188 if (argc < 3)188 if (argc < 2) 189 189 { 190 printf("usage: RpLibrary_test infile.xml outfile.xml\n");190 printf("usage: %s driver.xml\n", argv[0]); 191 191 return -1; 192 192 } 193 193 194 lib = library(argv[1]);194 lib = rpLibrary(argv[1]); 195 195 196 196 test_element(lib,"input.number(min)"); … … 217 217 test_childrenByType(lib,"input.number(test)","preset"); 218 218 219 printf("XML = \n%s\n", xml(lib));219 printf("XML = \n%s\n",rpXml(lib)); 220 220 221 freeLibrary(lib);221 rpFreeLibrary(lib); 222 222 223 223 return 0;
Note: See TracChangeset
for help on using the changeset viewer.