Changeset 950
- Timestamp:
- Jun 9, 2004, 10:56:23 AM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/collections/tst_psList.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/collections/tst_psList.c
r948 r950 6 6 * @author Robert DeSonia, MHPCC 7 7 * 8 * @version $Revision: 1. 5$ $Name: not supported by cvs2svn $9 * @date $Date: 2004-06-09 19:51:08$8 * @version $Revision: 1.6 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2004-06-09 20:56:23 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 165 165 *data = 2; 166 166 list = psListAdd(list,data,PS_LIST_HEAD); 167 if (psMemGetRefCounter(data) != 2) { 168 psError(__func__,"psListAdd didn't increment the data reference count."); 169 return 20; 170 } 167 171 psFree(data); 168 172 // verify that the size incremented … … 181 185 *data = 3; 182 186 list = psListAdd(list,data,PS_LIST_TAIL); 187 if (psMemGetRefCounter(data) != 2) { 188 psError(__func__,"psListAdd didn't increment the data reference count."); 189 return 20; 190 } 183 191 psFree(data); 184 192 // verify that the size incremented … … 206 214 psLogMsg(__func__,PS_LOG_INFO,"Following should warn with invalid insert location"); 207 215 list = psListAdd(list,data,-10); 216 if (psMemGetRefCounter(data) != 2) { 217 psError(__func__,"psListAdd didn't increment the data reference count."); 218 return 20; 219 } 208 220 psFree(data); 209 221 // verify that the size incremented … … 218 230 *data = 5; 219 231 list = psListAdd(list,data,1); 232 if (psMemGetRefCounter(data) != 2) { 233 psError(__func__,"psListAdd didn't increment the data reference count."); 234 return 20; 235 } 220 236 psFree(data); 221 237 // verify that the size incremented … … 229 245 *data = 6; 230 246 list = psListAdd(list,data,4); 247 if (psMemGetRefCounter(data) != 2) { 248 psError(__func__,"psListAdd didn't increment the data reference count."); 249 return 20; 250 } 231 251 psFree(data); 232 252 // verify that the size incremented … … 240 260 *data = 7; 241 261 list = psListAdd(list,data,2); 262 if (psMemGetRefCounter(data) != 2) { 263 psError(__func__,"psListAdd didn't increment the data reference count."); 264 return 20; 265 } 242 266 psFree(data); 243 267 // verify that the size incremented … … 252 276 psLogMsg(__func__,PS_LOG_INFO,"Following should be a warning."); 253 277 list = psListAdd(list,data,9); 278 if (psMemGetRefCounter(data) != 2) { 279 psError(__func__,"psListAdd didn't increment the data reference count."); 280 return 20; 281 } 254 282 psFree(data); 255 283 // verify that the size incremented
Note:
See TracChangeset
for help on using the changeset viewer.
