IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 5, 2005, 1:25:25 PM (22 years ago)
Author:
gusciora
Message:

Added tests to for various input parameters being NULL, or of incorrect
length.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/test/tst_pmReadoutCombine.c

    r2856 r2915  
    55 *  @author GLG, MHPCC
    66 *
    7  *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2004-12-30 21:35:04 $
     7 *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2005-01-05 23:25:25 $
    99 *
    1010 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    4444        for (psS32 j = 0 ; j < output->numCols ; j++) {
    4545            if (output->data.F32[i][j] != expect) {
    46                 printf("ERROR: output[%d][%d] is %.2f, should be %f\n", i, j, output->data.F32[i][j], expect);
     46                printf("TEST ERROR: output[%d][%d] is %.2f, should be %f\n", i, j, output->data.F32[i][j], expect);
    4747                testStatus = false;
    4848            }
     
    261261
    262262        if (rc->type.type != scale->type.type) {
    263             printf("ERROR: output readout->image has incorrect type.\n");
     263            printf("TEST ERROR: output readout->image has incorrect type.\n");
    264264            testStatus = false;
    265265        }
    266266        psFree(rc);
    267267    } else {
    268         printf("ERROR: pmReadoutCombine() returned NULL\n");
     268        printf("TEST ERROR: pmReadoutCombine() returned NULL\n");
    269269        testStatus = false;
    270270
     
    275275    rc = pmReadoutCombine(NULL, list, params, zeroHalf, scale, true, 0.0, 0.0);
    276276    if (rc != NULL) {
    277         printf("ERROR: pmReadoutCombine() did not return NULL\n");
     277        printf("TEST ERROR: pmReadoutCombine() did not return NULL\n");
    278278        testStatus = false;
    279279    }
     
    283283    rc = pmReadoutCombine(NULL, list, params, zeroF64, scale, true, 0.0, 0.0);
    284284    if (rc != NULL) {
    285         printf("ERROR: pmReadoutCombine() did not return NULL\n");
     285        printf("TEST ERROR: pmReadoutCombine() did not return NULL\n");
    286286        testStatus = false;
    287287    }
     
    300300        rc = NULL;
    301301    } else {
    302         printf("ERROR: pmReadoutCombine() returned NULL\n");
     302        printf("TEST ERROR: pmReadoutCombine() returned NULL\n");
    303303        testStatus = false;
    304304    }
     
    316316
    317317        if (rc->type.type != scale->type.type) {
    318             printf("ERROR: output readout->image has incorrect type.\n");
     318            printf("TEST ERROR: output readout->image has incorrect type.\n");
    319319            testStatus = false;
    320320        }
    321321        psFree(rc);
    322322    } else {
    323         printf("ERROR: pmReadoutCombine() returned NULL\n");
     323        printf("TEST ERROR: pmReadoutCombine() returned NULL\n");
    324324        testStatus = false;
    325325
     
    330330    rc = pmReadoutCombine(output, list, params, zero, scaleHalf, true, 0.0, 0.0);
    331331    if (rc != NULL) {
    332         printf("ERROR: pmReadoutCombine() did not return NULL\n");
     332        printf("TEST ERROR: pmReadoutCombine() did not return NULL\n");
    333333        testStatus = false;
    334334    }
     
    338338    rc = pmReadoutCombine(output, list, params, zero, scaleF64, true, 0.0, 0.0);
    339339    if (rc != NULL) {
    340         printf("ERROR: pmReadoutCombine() did not return NULL\n");
     340        printf("TEST ERROR: pmReadoutCombine() did not return NULL\n");
    341341        testStatus = false;
    342342    }
     
    355355        rc = NULL;
    356356    } else {
    357         printf("ERROR: pmReadoutCombine() returned NULL\n");
     357        printf("TEST ERROR: pmReadoutCombine() returned NULL\n");
    358358        testStatus = false;
    359359    }
     
    364364    rc = pmReadoutCombine(output, list, params, zero, scale, true, 0.0, 0.0);
    365365    if (rc != NULL) {
    366         printf("ERROR: pmReadoutCombine() did not return NULL\n");
     366        printf("TEST ERROR: pmReadoutCombine() did not return NULL\n");
    367367        testStatus = false;
    368368    }
     
    377377    rc = pmReadoutCombine(output, list, params, zero, scale, true, 0.0, 0.0);
    378378    if (rc != NULL) {
    379         printf("ERROR: pmReadoutCombine() did not return NULL\n");
     379        printf("TEST ERROR: pmReadoutCombine() did not return NULL\n");
    380380        testStatus = false;
    381381    }
     
    387387    rc = pmReadoutCombine(output, NULL, params, zero, scale, true, 0.0, 0.0);
    388388    if (rc != NULL) {
    389         printf("ERROR: pmReadoutCombine() did not return NULL\n");
     389        printf("TEST ERROR: pmReadoutCombine() did not return NULL\n");
    390390        testStatus = false;
    391391    }
     
    395395    rc = pmReadoutCombine(output, list, NULL, zero, scale, true, 0.0, 0.0);
    396396    if (rc != NULL) {
    397         printf("ERROR: pmReadoutCombine() did not return NULL\n");
     397        printf("TEST ERROR: pmReadoutCombine() did not return NULL\n");
    398398        testStatus = false;
    399399    }
     
    404404    rc = pmReadoutCombine(output, list, params, zero, scale, true, 0.0, 0.0);
    405405    if (rc != NULL) {
    406         printf("ERROR: pmReadoutCombine() did not return NULL\n");
     406        printf("TEST ERROR: pmReadoutCombine() did not return NULL\n");
    407407        testStatus = false;
    408408    }
     
    412412    psStats *oldStats = params->stats;
    413413    printf("Calling pmReadoutCombine() with NULL param->stats.  Should generate error, return NULL.\n");
     414    params->stats = NULL;
    414415    rc = pmReadoutCombine(output, list, params, zero, scale, true, 0.0, 0.0);
    415416    if (rc != NULL) {
    416         printf("ERROR: pmReadoutCombine() did not return NULL\n");
     417        printf("TEST ERROR: pmReadoutCombine() did not return NULL\n");
    417418        testStatus = false;
    418419    }
Note: See TracChangeset for help on using the changeset viewer.