IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 15708


Ignore:
Timestamp:
Nov 28, 2007, 3:27:47 PM (18 years ago)
Author:
gusciora
Message:

Removed bug with the psFitsTable().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/fits/tap_psFits.c

    r13800 r15708  
    66*  @author Robert DeSonia, MHPCC
    77*
    8 *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
    9 *  @date $Date: 2007-06-13 23:33:22 $
     8*  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
     9*  @date $Date: 2007-11-29 01:27:47 $
    1010*
    1111*  XXXX: All of the makeTable() tests are failing, as well as one additional one.
     
    9393bool makeTable(void)
    9494{
     95// XXX: Should we be checking for memory leaks in this function?
     96//    psMemId id = psMemGetId();
    9597    psFits* fitsFile = psFitsOpen(tableFilename, "w");
    9698    if (fitsFile == NULL) {
     
    146148        for (int x=0; x < 4; x++) {
    147149            vec->data.S32[x] = x*10+row;
    148             vec->n++;
    149150        }
    150151        psMetadataAdd(header,PS_LIST_TAIL, "MYVEC",
     
    155156
    156157        table->data[row] = header;
    157         table->n++;
    158     }
    159 
    160     printf("XXX: The following call to psFitsWriteTable() seg faults\n");
    161     psFitsWriteTable(fitsFile, NULL, table, NULL);
     158    }
     159
     160    bool rc = psFitsWriteTable(fitsFile, NULL, table, NULL);
    162161
    163162    psFree(table);
    164163    psFree(fitsFile);
    165     return (!psMemCheckLeaks(15,NULL,stderr,false));
     164    return(rc);
    166165}
    167166
     
    674673
    675674    // tst_psFitsReadTable()
    676     // XXXX: This is if'ed out because the call to makeTable() is seg faulting
    677     if (0) {
     675    if (1) {
    678676        psMemId id = psMemGetId();
    679677        ok(makeTable(), "Created 'table' FITS file");
     
    739737    }
    740738
    741 
    742739    // tst_psFitsReadTableColumnNum()
    743     // XXXX: This is if'ed out because the call to makeTable() is seg faulting
    744     if (0) {
     740    if (1) {
    745741        psMemId id = psMemGetId();
    746742        ok(makeTable(), "Created 'table' FITS file");
     
    812808
    813809    // tst_psFitsReadTableColumn()
    814     // XXXX: This is if'ed out because the call to makeTable() is seg faulting
    815     if (0) {
     810    if (1) {
    816811        psMemId id = psMemGetId();
    817812        ok(makeTable(), "Created 'table' FITS file");
     
    899894
    900895    // tst_psFitsUpdateTable()
    901     // XXXX: This is if'ed out because the call to makeTable() is seg faulting
    902     if (0) {
     896    if (1) {
    903897        psMemId id = psMemGetId();
    904898        psErr* err;
     
    929923            psMetadataAddBool(md,PS_LIST_TAIL,"MYBOOL", 0,"",((row & 1) == 1));
    930924            psMetadataAddStr(md,PS_LIST_TAIL,"MYSTR", 0,"",strValue[row]);
    931 
    932 
    933 
    934 
    935 
    936 
    937 
    938 
    939 
    940 
    941 
    942 
    943 
    944925
    945926            if (!psFitsUpdateTable(fits,md,row)) {
Note: See TracChangeset for help on using the changeset viewer.