IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 12406


Ignore:
Timestamp:
Mar 12, 2007, 11:00:25 AM (19 years ago)
Author:
jhoblitt
Message:

fix broken leapsecond tests

File:
1 edited

Legend:

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

    r11180 r12406  
    1212 *  @author  Eric Van Alst, MHPCC
    1313 *
    14  *  @version $Revision: 1.1 $  $Name: not supported by cvs2svn $
    15  *  @date  $Date: 2007-01-19 20:42:21 $
     14 *  @version $Revision: 1.2 $  $Name: not supported by cvs2svn $
     15 *  @date  $Date: 2007-03-12 21:00:25 $
    1616 *
    1717 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    280280    // psTimeIsLeapSecond()
    281281    // Set time to UTC with leap second
    282     // XXX: This test fails.  Looks like it failed in the code as of 2007.
    283     {
    284         psMemId id = psMemGetId();
    285         psTime *time = psTimeAlloc(PS_TIME_TAI);
     282    // Note: leapseconds are only relevent for UTC
     283    {
     284        psMemId id = psMemGetId();
     285        psTime *time = psTimeAlloc(PS_TIME_UTC);
    286286        time->sec = testTime3SecondsUTC;
    287287        time->nsec = testTime3NanosecondsUTC;
     
    295295    // psTimeIsLeapSecond()
    296296    // Set time to 1 second before a known leap second
    297     // XXX: This test fails.  Looks like it failed in the code as of 2007.
    298     {
    299         psMemId id = psMemGetId();
    300         psTime *time = psTimeAlloc(PS_TIME_TAI);
     297    // Note: leapseconds are only relevent for UTC
     298    {
     299        psMemId id = psMemGetId();
     300        psTime *time = psTimeAlloc(PS_TIME_UTC);
    301301        time->sec = testTime3SecondsUTC;
    302302        time->nsec = testTime3NanosecondsUTC;
    303303        time->sec--;
    304304        psBool leapsecond = psTimeIsLeapSecond(time);
    305         ok(leapsecond, "psTimeIsLeapSecond() returned true");
     305        ok(!leapsecond, "psTimeIsLeapSecond() returned false");
    306306        psFree(time);
    307307        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
Note: See TracChangeset for help on using the changeset viewer.