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_pmSubtractBias.c

    r2856 r2915  
    1313 *  @author GLG, MHPCC
    1414 *
    15  *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
    16  *  @date $Date: 2004-12-30 21:35:04 $
     15 *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
     16 *  @date $Date: 2005-01-05 23:25:25 $
    1717 *
    1818 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    8282            actual = myReadout->image->data.F32[i][j];
    8383            if (FLT_EPSILON < fabs(expect - actual)) {
    84                 printf("ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
     84                printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
    8585                testStatus = 1;
    8686            }
     
    150150            actual = myReadout->image->data.F32[i][j];
    151151            if (FLT_EPSILON < fabs(expect - actual)) {
    152                 printf("ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
     152                printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
    153153                testStatus = 1;
    154154            }
     
    223223            actual = myReadout->image->data.F32[i][j];
    224224            if (FLT_EPSILON < fabs(expect - actual)) {
    225                 printf("ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
     225                printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
    226226                testStatus = 1;
    227227            }
     
    285285            actual = myReadout->image->data.F32[i][j];
    286286            if (FLT_EPSILON < fabs(expect - actual)) {
    287                 printf("ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
     287                printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
    288288                testStatus = 1;
    289289            }
     
    351351            actual = myReadout->image->data.F32[i][j];
    352352            if (FLT_EPSILON < fabs(expect - actual)) {
    353                 printf("ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
     353                printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
    354354                testStatus = 1;
    355355            }
     
    431431            actual = myReadout->image->data.F32[i][j];
    432432            if (FLT_EPSILON < fabs(expect - actual)) {
    433                 printf("ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
     433                printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
    434434                testStatus = 1;
    435435            }
     
    505505            actual = myReadout->image->data.F32[i][j];
    506506            if (FLT_EPSILON < fabs(expect - actual)) {
    507                 printf("ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
     507                printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
    508508                testStatus = 1;
    509509            }
     
    614614    rc = pmSubtractBias(myReadout, NULL, NULL, PM_OVERSCAN_ALL, stat, 0, PM_FIT_NONE, NULL);
    615615    if (rc != myReadout) {
    616         printf("ERROR: pmSubtractBias() did not return input psReadout.\n");
     616        printf("TEST ERROR: pmSubtractBias() did not return input psReadout.\n");
    617617        testStatus = false;
    618618    }
     
    622622    rc = pmSubtractBias(myReadout, NULL, NULL, PM_OVERSCAN_ROWS, stat, 0, PM_FIT_NONE, NULL);
    623623    if (rc != myReadout) {
    624         printf("ERROR: pmSubtractBias() did not return input psReadout.\n");
     624        printf("TEST ERROR: pmSubtractBias() did not return input psReadout.\n");
    625625        testStatus = false;
    626626        psFree(rc);
     
    631631    rc = pmSubtractBias(myReadout, NULL, NULL, PM_OVERSCAN_COLUMNS, stat, 0, PM_FIT_NONE, NULL);
    632632    if (rc != myReadout) {
    633         printf("ERROR: pmSubtractBias() did not return input psReadout.\n");
     633        printf("TEST ERROR: pmSubtractBias() did not return input psReadout.\n");
    634634        testStatus = false;
    635635        psFree(rc);
     
    645645            psF32 actual = rc->image->data.F32[i][j];
    646646            if (FLT_EPSILON < fabs(expect - actual)) {
    647                 printf("ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
     647                printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
    648648                testStatus = 1;
    649649            }
     
    664664            psF32 actual = rc->image->data.F32[i][j];
    665665            if (FLT_EPSILON < fabs(expect - actual)) {
    666                 printf("ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
     666                printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
    667667                testStatus = 1;
    668668            }
     
    681681            psF32 actual = rc->image->data.F32[i][j];
    682682            if (FLT_EPSILON < fabs(expect - actual)) {
    683                 printf("ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
     683                printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
    684684                testStatus = 1;
    685685            }
     
    695695    rc = pmSubtractBias(myReadout, NULL, NULL, PM_OVERSCAN_NONE, stat, 0, PM_FIT_SPLINE, myBias);
    696696    if (rc != myReadout) {
    697         printf("ERROR: pmSubtractBias() did not return input psReadout.\n");
     697        printf("TEST ERROR: pmSubtractBias() did not return input psReadout.\n");
    698698        testStatus = false;
    699699        psFree(rc);
     
    705705            psF32 actual = rc->image->data.F32[i][j];
    706706            if (FLT_EPSILON < fabs(expect - actual)) {
    707                 printf("ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
     707                printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
    708708                testStatus = 1;
    709709            }
     
    725725            psF32 actual = rc->image->data.F32[i][j];
    726726            if (FLT_EPSILON < fabs(expect - actual)) {
    727                 printf("ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
     727                printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
    728728                testStatus = 1;
    729729            }
     
    742742                psF32 actual = rc->image->data.F32[i][j];
    743743                if (FLT_EPSILON < fabs(expect - actual)) {
    744                     printf("ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
     744                    printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
    745745                    testStatus = 1;
    746746                }
     
    759759                psF32 actual = rc->image->data.F32[i][j];
    760760                if (FLT_EPSILON < fabs(expect - actual)) {
    761                     printf("ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
     761                    printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
    762762                    testStatus = 1;
    763763                }
     
    771771                               0, PM_FIT_NONE, myBiasShortRows);
    772772    if (rc != myReadout) {
    773         printf("ERROR: pmSubtractBias() did not return input psReadout.\n");
     773        printf("TEST ERROR: pmSubtractBias() did not return input psReadout.\n");
    774774        testStatus = false;
    775775        psFree(rc);
     
    782782                               0, PM_FIT_NONE, myBiasShortCols);
    783783    if (rc != myReadout) {
    784         printf("ERROR: pmSubtractBias() did not return input psReadout.\n");
     784        printf("TEST ERROR: pmSubtractBias() did not return input psReadout.\n");
    785785        testStatus = false;
    786786        psFree(rc);
     
    792792                               0, 54321, NULL);
    793793    if (rc != myReadout) {
    794         printf("ERROR: pmSubtractBias() did not return input psReadout.\n");
     794        printf("TEST ERROR: pmSubtractBias() did not return input psReadout.\n");
    795795        testStatus = false;
    796796        psFree(rc);
     
    802802                               0, PM_FIT_NONE, NULL);
    803803    if (rc != myReadout) {
    804         printf("ERROR: pmSubtractBias() did not return input psReadout.\n");
     804        printf("TEST ERROR: pmSubtractBias() did not return input psReadout.\n");
    805805        testStatus = false;
    806806        psFree(rc);
     
    813813                psF32 actual = rc->image->data.F32[i][j];
    814814                if (FLT_EPSILON < fabs(expect - actual)) {
    815                     printf("ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
     815                    printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
    816816                    testStatus = 1;
    817817                }
     
    921921            actual = myReadout->image->data.F32[i][j];
    922922            if (FLT_EPSILON < fabs(expect - actual)) {
    923                 printf("ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
     923                printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
    924924                testStatus = 1;
    925925            }
Note: See TracChangeset for help on using the changeset viewer.