Changeset 12512 for trunk/psLib/test/sys/tap_psString.c
- Timestamp:
- Mar 19, 2007, 5:31:39 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/sys/tap_psString.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/sys/tap_psString.c
r12208 r12512 20 20 * @author Eric Van Alst, MHPCC 21 21 * 22 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $23 * @date $Date: 2007-03- 03 02:43:37$22 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 23 * @date $Date: 2007-03-20 03:31:39 $ 24 24 * 25 25 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 56 56 psS32 testNULLStrings(void); 57 57 psS32 testStrCheck(void); 58 59 static const char* const NullString = "";60 58 61 59 … … 311 309 diag("testStrAppend03"); 312 310 313 char *str=NULL; 314 int result; 315 316 str = psStringCopy(STR_0); 311 char *str =psStringCopy(STR_0); 317 312 318 313 // test null-op 319 psStringAppend(&str, NullString); 320 result = strcmp(str, STR_0); 321 ok ( result == 0, "Failed test point str=[%s]\n", str); 314 psStringAppend(&str, "%s", ""); 315 ok_str(str, STR_0, "Failed test point"); 322 316 psFree(str); 323 317 … … 391 385 392 386 // test null-op 393 psStringPrepend(&str, NullString);387 psStringPrepend(&str, "%s", ""); 394 388 result = strcmp(str, STR_0); 395 389 ok ( result == 0, "test point str=[%s]\n", str); … … 531 525 psS32 testNULLStrings(void) 532 526 { 533 diag("test NULLStrings");527 diag("test""s"); 534 528 535 529 psString nullTest = NULL; … … 550 544 551 545 //psStringAppend should return 0 for NULL input destination 552 outSize = psStringAppend(nullDest, NullString);546 outSize = psStringAppend(nullDest, "%s", ""); 553 547 ok (outSize == 0, 554 548 "psStringAppend to return 0 for NULL input destination.\n");
Note:
See TracChangeset
for help on using the changeset viewer.
