IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 1, 2016, 11:38:17 AM (10 years ago)
Author:
eugene
Message:

fix signed / unsigned inconsistencies; free memory in tablecomp.c test; drop tests for non-ansi-C %L-style formats

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ohana.20160226/src/libfits/test/keywords.c

    r39321 r39421  
    1515  tmp = Pout[3]; Pout[3] = Pout[4]; Pout[4] = tmp; }
    1616
    17 int main (int argc, char **argv) {
     17int main (void) {
    1818 
    1919  plan_tests (14);
     
    2121  diag ("libfits keyword tests");
    2222
    23   int i, err;
    24   double srcbuf[NSRC], tgtbuf[NTGT], outbuf[NOUT];
    25  
    2623  {
    2724   
     
    9693    ptr = gfits_header_field (&header, "END", 1); ok (ptr, "END still good");
    9794
    98     ok (gfits_modify (&header, "D_LONG3", "%Ld", 1, (long long) 0x100), "wrote a keyword");
    99     ptr = gfits_header_field (&header, "END", 1); ok (ptr, "END still good");
     95    // this is not ISO C99:
     96    // ok (gfits_modify (&header, "D_LONG3", "%Ld", 1, (long long) 0x100), "wrote a keyword");
     97    // ptr = gfits_header_field (&header, "END", 1); ok (ptr, "END still good");
    10098
    10199    // set one of each of the few numerical types (unsigned ints)
     
    109107    ptr = gfits_header_field (&header, "END", 1); ok (ptr, "END still good");
    110108
    111     ok (gfits_modify (&header, "DU_LONG3", "%Lu", 1, (long long) 0x100), "wrote a keyword");
    112     ptr = gfits_header_field (&header, "END", 1); ok (ptr, "END still good");
     109    // ok (gfits_modify (&header, "DU_LONG3", "%Lu", 1, (long long) 0x100), "wrote a keyword");
     110    // ptr = gfits_header_field (&header, "END", 1); ok (ptr, "END still good");
    113111
    114112    ok (gfits_modify (&header, "D_SHORT", "%hd", 1, 0x20), "wrote a keyword");
     
    229227    ptr = gfits_header_field (&header, "END", 1); ok (ptr, "END still good");
    230228
    231     ok (gfits_scan (&header, "D_LONG3", "%Ld", 1, &Kvalue), "read a keyword");
    232     ok (Kvalue == 0x100, "got the right value");
    233     ptr = gfits_header_field (&header, "END", 1); ok (ptr, "END still good");
     229    // ok (gfits_scan (&header, "D_LONG3", "%Ld", 1, &Kvalue), "read a keyword");
     230    // ok (Kvalue == 0x100, "got the right value");
     231    // ptr = gfits_header_field (&header, "END", 1); ok (ptr, "END still good");
    234232
    235233    // set one of each of the few numerical types (unsigned ints)
     
    246244    ptr = gfits_header_field (&header, "END", 1); ok (ptr, "END still good");
    247245
    248     ok (gfits_scan (&header, "DU_LONG3", "%Lu", 1, &Ulonglong), "read a keyword");
    249     ok (Ulonglong == 0x100, "got the right value");
    250     ptr = gfits_header_field (&header, "END", 1); ok (ptr, "END still good");
     246    // ok (gfits_scan (&header, "DU_LONG3", "%Lu", 1, &Ulonglong), "read a keyword");
     247    // ok (Ulonglong == 0x100, "got the right value");
     248    // ptr = gfits_header_field (&header, "END", 1); ok (ptr, "END still good");
    251249
    252250    ok (gfits_scan (&header, "D_SHORT", "%hd", 1, &Ishort), "read a keyword");
Note: See TracChangeset for help on using the changeset viewer.