IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 26, 2004, 2:57:34 PM (22 years ago)
Author:
desonia
Message:

converted native C types to ps Types, where practical.

File:
1 edited

Legend:

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

    r1977 r2204  
    1717 *  @author  Eric Van Alst, MHPCC
    1818 *
    19  *  @version $Revision: 1.9 $  $Name: not supported by cvs2svn $
    20  *  @date  $Date: 2004-10-06 01:59:08 $
     19 *  @version $Revision: 1.10 $  $Name: not supported by cvs2svn $
     20 *  @date  $Date: 2004-10-27 00:57:33 $
    2121 *
    2222 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2828#include "psTest.h"
    2929
    30 static int testStringCopy00(void);
    31 static int testStringCopy01(void);
    32 static int testStringCopy02(void);
    33 static int testStringCopy03(void);
    34 static int testStringCopy04(void);
    35 static int testStringCopy05(void);
    36 static int testStringCopy06(void);
     30static psS32 testStringCopy00(void);
     31static psS32 testStringCopy01(void);
     32static psS32 testStringCopy02(void);
     33static psS32 testStringCopy03(void);
     34static psS32 testStringCopy04(void);
     35static psS32 testStringCopy05(void);
     36static psS32 testStringCopy06(void);
    3737
    3838testDescription tests[] = {
     
    4747                          };
    4848
    49 int main( int argc, char* argv[] )
     49psS32 main( psS32 argc, char* argv[] )
    5050{
    5151    psLogSetLevel( PS_LOG_INFO );
     
    5555
    5656/*
    57 int main( int argc,
     57psS32 main( psS32 argc,
    5858          char * argv[] )
    5959{
    60     bool  tpResult = false;
     60    psBool  tpResult = false;
    6161    char  stringval[20] = "E R R O R";
    6262    char  stringval1[20] = "e r r o r";
    6363    char  *stringvalnocopy = "F A I L";
    6464    char  *substringval = "e r r";
    65     int   substringlen = 6;
     65    psS32   substringlen = 6;
    6666    char  *emptyval = "";
    67     int   tpFails = 0;
    68     char  *strResult;
    69     int   increaseSize = 5;
    70     int   negativeSize = -5;
    71     int   result = 0;
    72     int   result1 = 0;
    73     int   memBlockAllocated = 0;
     67    psS32   tpFails = 0;
     68    char  *strResult;
     69    psS32   increaseSize = 5;
     70    psS32   negativeSize = -5;
     71    psS32   result = 0;
     72    psS32   result1 = 0;
     73    psS32   memBlockAllocated = 0;
    7474    psMemBlock ***memBlockPtr = NULL;
    7575 
    7676*/
    7777
    78 static int testStringCopy00(void)
    79 {
    80     char  stringval[20] = "E R R O R";
    81     int   result = 0;
    82     int   result1 = 0;
     78static psS32 testStringCopy00(void)
     79{
     80    char  stringval[20] = "E R R O R";
     81    psS32   result = 0;
     82    psS32   result1 = 0;
    8383    char  *strResult;
    8484
     
    107107}
    108108
    109 static int testStringCopy01(void)
     109static psS32 testStringCopy01(void)
    110110{
    111111    char  *emptyval = "";
    112     int   result = 0;
     112    psS32   result = 0;
    113113    char  *strResult;
    114114
     
    130130}
    131131
    132 static int testStringCopy02(void)
    133 {
    134     int   result = 0;
    135     int   result1 = 0;
     132static psS32 testStringCopy02(void)
     133{
     134    psS32   result = 0;
     135    psS32   result1 = 0;
    136136    char  *strResult;
    137137    char  stringval1[20] = "e r r o r";
    138     int   substringlen = 5;
     138    psS32   substringlen = 5;
    139139    char  *substringval = "e r r";
    140140
     
    161161}
    162162
    163 static int testStringCopy03(void)
    164 {
    165     int   result = 0;
    166     int   result1 = 0;
     163static psS32 testStringCopy03(void)
     164{
     165    psS32   result = 0;
     166    psS32   result1 = 0;
    167167    char  *strResult;
    168168    char  *stringvalnocopy = "F A I L";
     
    185185}
    186186
    187 static int testStringCopy04(void)
    188 {
    189     int   result = 0;
    190     int   result1 = 0;
    191     char  *strResult;
    192     char  stringval[20] = "E R R O R";
    193     int   increaseSize = 5;
     187static psS32 testStringCopy04(void)
     188{
     189    psS32   result = 0;
     190    psS32   result1 = 0;
     191    char  *strResult;
     192    char  stringval[20] = "E R R O R";
     193    psS32   increaseSize = 5;
    194194
    195195    // Test point #5 Copy string to larger string - psStringNCopy
     
    205205                strResult, stringval);
    206206        fprintf(stderr,"                     strlne result = %d expected %d\n",result1,
    207                 (int)strlen(stringval));
     207                (psS32)strlen(stringval));
    208208        return 1;
    209209    }
     
    214214}
    215215
    216 static int testStringCopy05(void)
    217 {
    218     char  *strResult;
    219     char  stringval[20] = "E R R O R";
    220     int   negativeSize = -5;
     216static psS32 testStringCopy05(void)
     217{
     218    char  *strResult;
     219    char  stringval[20] = "E R R O R";
     220    psS32   negativeSize = -5;
    221221
    222222    // Test point #6 Copy string with negative size - psStringNCopy
     
    224224    if ( strResult != NULL ) {
    225225        fprintf(stderr,"Failed test point #6 return value = %ld expected NULL\n",
    226                 (unsigned long)strResult);
     226                (psU64)strResult);
    227227        return 1;
    228228    }
     
    232232}
    233233
    234 static int testStringCopy06(void)
    235 {
    236     char  *strResult;
    237     char  stringval[20] = "E R R O R";
    238     int   result = 0;
     234static psS32 testStringCopy06(void)
     235{
     236    char  *strResult;
     237    char  stringval[20] = "E R R O R";
     238    psS32   result = 0;
    239239
    240240    // Test point #7 Verify creation of string literal - PS_STRING
Note: See TracChangeset for help on using the changeset viewer.