IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 4, 2007, 3:10:22 PM (19 years ago)
Author:
gusciora
Message:

Improved test coverage, added memory leak checks, etc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/astro/tap_psTime_03.c

    r12607 r13623  
    1111 *  @author  Eric Van Alst, MHPCC
    1212 *
    13  *  @version $Revision: 1.5 $  $Name: not supported by cvs2svn $
    14  *  @date  $Date: 2007-03-27 22:52:02 $
     13 *  @version $Revision: 1.6 $  $Name: not supported by cvs2svn $
     14 *  @date  $Date: 2007-06-05 01:10:22 $
    1515 *
    1616 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    179179    psLibInit("pslib.config");
    180180
     181
    181182    // psTimeMath()
    182183    // Attempt to perform math operation on NULL time
     
    185186    {
    186187        psMemId id = psMemGetId();
    187 
    188188        ok(psTimeMath(NULL, -1.1) == NULL, "psTimeMath(NULL, -1.1) returned NULL");
    189 
    190189        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
    191190    }
     
    201200        time->sec = 0;
    202201        time->nsec = 2e9;
    203 
    204202        ok(psTimeMath(time, -1.1) == NULL, "psTimeMath() returns NULL for unallowable time input");
    205 
    206203        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
    207204    }
     
    215212        time->sec = testTime1SecondsUTC;
    216213        time->nsec = testTime1NanosecondsUTC;
    217 
    218214        psTime *newTime = psTimeMath(time, deltaTime1);
    219215        ok(newTime != NULL, "psTimeMath() returns non-NULL for allowable time input (PS_TIME_UTC)");
     
    223219        is_long(newTime->nsec, newTestTime1NanosecondsUTC, "psTimeMath() returns the correct ->nsec");
    224220        skip_end();
    225 
    226221        psFree(newTime);
    227222        psFree(time);
Note: See TracChangeset for help on using the changeset viewer.