Changeset 8224 for trunk/psLib/test/sys/tap_psStringSubstitute.c
- Timestamp:
- Aug 7, 2006, 3:27:45 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/sys/tap_psStringSubstitute.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/sys/tap_psStringSubstitute.c
r7881 r8224 5 5 #define ORIGINAL "This is, a, test case, to check." 6 6 #define CORRECTED "This is a test case to check." 7 #define mem() ok(psMemCheckLeaks(0, NULL, stdout, false) == 0, "Memory Leaks") 7 8 8 9 int main (void) 9 10 { 10 plan_tests( 8);11 plan_tests(10); 11 12 12 13 diag("psStringSubstitute() tests"); … … 15 16 { 16 17 psString input = psStringCopy(ORIGINAL); 17 psString output = psStringSubstitute(input, ",", NULL); 18 ok(output && strcmp(output, ORIGINAL) == 0, "output = %s", output); 19 psFree(output); 18 input = psStringSubstitute(input, ",", NULL); 19 ok(input && strcmp(input, ORIGINAL) == 0, "output = %s", input); 20 psFree(input); 21 // ok(psMemCheckLeaks(0, NULL, stdout, false) == 0, "Memory Leaks"); 22 mem(); 20 23 } 21 24 … … 23 26 { 24 27 psString input = psStringCopy(ORIGINAL); 25 psString output = psStringSubstitute(input, "XXX", ""); 26 ok(output && strcmp(output, ORIGINAL) == 0, "output = %s", output); 27 psFree(output); 28 input = psStringSubstitute(input, "XXX", ""); 29 ok(input && strcmp(input, ORIGINAL) == 0, "output = %s", input); 30 // psFree(input); 31 ok(psMemCheckLeaks(0, NULL, stdout, false) == 0, "Memory Leaks"); 28 32 } 29 33
Note:
See TracChangeset
for help on using the changeset viewer.
