IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 29, 2005, 2:33:03 PM (21 years ago)
Author:
evanalst
Message:

Temporarily removed test 5 which checks for negative string length to copy.
This will need to be change to check for maximum size.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/sysUtils/tst_psString.c

    r3996 r4433  
    2020 *  @author  Eric Van Alst, MHPCC
    2121 *
    22  *  @version $Revision: 1.15 $  $Name: not supported by cvs2svn $
    23  *  @date  $Date: 2005-05-20 01:40:40 $
     22 *  @version $Revision: 1.16 $  $Name: not supported by cvs2svn $
     23 *  @date  $Date: 2005-06-30 00:33:03 $
    2424 *
    2525 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    3838static psS32 testStringCopy03(void);
    3939static psS32 testStringCopy04(void);
    40 static psS32 testStringCopy05(void);
     40//static psS32 testStringCopy05(void);
    4141static psS32 testStringCopy06(void);
    4242
     
    5757                              {testStringCopy03, 3, "Verify empty string copy with length", 0, false},
    5858                              {testStringCopy04, 4, "Copy string to larger string", 0, false},
    59                               {testStringCopy05, 5, "Copy string with negative size", 0, false},
     59                              //                              {testStringCopy05, 5, "Copy string with negative size", 0, false},
    6060                              {testStringCopy06, 6, "Verify creation of string literal", 0, false},
    6161
     
    239239}
    240240
    241 static psS32 testStringCopy05(void)
    242 {
    243     char  *strResult;
    244     char  stringval[20] = "E R R O R";
    245     psS32   negativeSize = -5;
    246 
    247     // Test point #6 Copy string with negative size - psStringNCopy
    248     strResult = psStringNCopy(stringval, negativeSize);
    249     if ( strResult != NULL ) {
    250         fprintf(stderr,"Failed test point #6 return value = %p expected NULL\n",
    251                 strResult);
    252         return 1;
    253     }
    254     // Memory should not have been allocated
    255 
    256     return 0;
    257 }
     241// XXX This test needs to be modified to check for maximum size
     242//     This will require a mod to psStringNCopy source to check for maximum size
     243//
     244//static psS32 testStringCopy05(void)
     245//{
     246//    char  *strResult;
     247//    char  stringval[20] = "E R R O R";
     248//    psS32   negativeSize = -5;
     249//
     250//    // Test point #6 Copy string with negative size - psStringNCopy
     251//    strResult = psStringNCopy(stringval, negativeSize);
     252//    if ( strResult != NULL ) {
     253//        fprintf(stderr,"Failed test point #6 return value = %p expected NULL\n",
     254//                strResult);
     255//        return 1;
     256//    }
     257//    // Memory should not have been allocated
     258//
     259//    return 0;
     260//}
    258261
    259262static psS32 testStringCopy06(void)
Note: See TracChangeset for help on using the changeset viewer.