IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 7, 2006, 3:27:45 PM (20 years ago)
Author:
drobbin
Message:

Added psMetadataItemCompare test to tst_psMetadata_01.c and edited StringSub test to include MemCheckLeaks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/sys/tap_psStringSubstitute.c

    r7881 r8224  
    55#define ORIGINAL "This is, a, test case, to check."
    66#define CORRECTED "This is a test case to check."
     7#define mem() ok(psMemCheckLeaks(0, NULL, stdout, false) == 0, "Memory Leaks")
    78
    89int main (void)
    910{
    10     plan_tests(8);
     11    plan_tests(10);
    1112
    1213    diag("psStringSubstitute() tests");
     
    1516    {
    1617        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();
    2023    }
    2124
     
    2326    {
    2427        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");
    2832    }
    2933
Note: See TracChangeset for help on using the changeset viewer.