IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 13043


Ignore:
Timestamp:
Apr 26, 2007, 12:18:39 PM (19 years ago)
Author:
gusciora
Message:

Added the col0 and row0 macros.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/mathtypes/tap_psImage.c

    r12781 r13043  
    66 *  @author Robert DeSonia, MHPCC
    77 *
    8  *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2007-04-10 21:09:30 $
     8 *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2007-04-26 22:18:39 $
    1010 *
    1111 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    275275
    276276        //Set the position of the subimage relative to the parent.
    277         image->col0 = 10;
    278         image->row0 = 10;
     277        P_PSIMAGE_SET_COL0(image, 10);
     278        P_PSIMAGE_SET_ROW0(image, 10);
    279279        for (int i = 0; i < 4; i++) {
    280280            for (int j = 0; j < 5; j++) {
     
    301301        //Attempt to set a position in a psImage* with negative col0, row0
    302302        *(int*)&none->numRows = 2;
    303         none->row0 = -1;
     303        P_PSIMAGE_SET_ROW0(none, -1);
    304304        ok(!psImageSet(none, 1, 1, 1),
    305305             "psImageSet failed to return false when passed an image with negative col0");
    306306
    307         none->row0 = 0;
    308         none->col0 = -1;
     307        P_PSIMAGE_SET_COL0(none, -1);
     308        P_PSIMAGE_SET_ROW0(none, 0);
    309309        ok(!psImageSet(none, 1, 1, 1),
    310310             "psImageSet failed to return false when passed an image with negative col0");
     
    351351
    352352        //Set the position of the subimage relative to the parent.
    353         image->col0 = 10;
    354         image->row0 = 10;
     353        P_PSIMAGE_SET_COL0(image, 10);
     354        P_PSIMAGE_SET_ROW0(image, 10);
    355355        for (int i = 0; i < 3; i++) {
    356356            for (int j = 0; j < 5; j++) {
     
    377377        //Attempt to get a position in a psImage* with negative col0, row0
    378378        *(int*)&none->numRows = 2;
    379         none->row0 = -1;
     379        P_PSIMAGE_SET_ROW0(none, -1);
    380380        ok(isnan( psImageGet(none, 1, 1) ),
    381381             "psImageGet return false when passed an image with negative col0");
    382382   
    383         none->row0 = 0;
    384         none->col0 = -1;
     383        P_PSIMAGE_SET_COL0(none, -1);
     384        P_PSIMAGE_SET_ROW0(none, 0);
    385385        ok(isnan( psImageGet(none, 1, 1) ),
    386386             "psImageGet return false when passed an image with negative col0");
Note: See TracChangeset for help on using the changeset viewer.