Index: /trunk/psLib/test/image/tst_psImageManip.c
===================================================================
--- /trunk/psLib/test/image/tst_psImageManip.c	(revision 1933)
+++ /trunk/psLib/test/image/tst_psImageManip.c	(revision 1934)
@@ -6,6 +6,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.26 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-30 18:47:23 $
+ *  @version $Revision: 1.27 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-30 20:32:21 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -1611,4 +1611,13 @@
     }
 
+    // Verify the returned psImage structure is null and program execution
+    // doesn't stop, if the specified interpolation mode is invalid.
+    psLogMsg(__func__,PS_LOG_INFO,"Following should be an error for invalid interpolation mode.");
+    fOut = psImageShift(fOut,fImg,8,8,NAN,-1);
+    if (fOut != NULL ) {
+        psError(__func__,"psImageShift didn't return NULL given an invalid interpolation mode.");
+        return 12;
+    }
+
     psFree(fImg);
 
@@ -1629,4 +1638,6 @@
     psImage* fImg = psImageAlloc(cols,rows,PS_TYPE_F32);
     psImage* sImg = psImageAlloc(cols,rows,PS_TYPE_S16);
+    psImage* fBiOut = psImageAlloc(cols,rows,PS_TYPE_F32);
+    psImage* sBiOut = psImageAlloc(cols,rows,PS_TYPE_S16);
 
     for(int row=0;row<rows;row++) {
@@ -1641,8 +1652,13 @@
     fOut = psImageShift(fOut, fImg, colShift, rowShift, NAN, PS_INTERPOLATE_FLAT);
     sOut = psImageShift(sOut, sImg, colShift, rowShift, -1, PS_INTERPOLATE_FLAT);
+    fBiOut = psImageShift(fBiOut, fImg, colShift, rowShift, NAN, PS_INTERPOLATE_BILINEAR);
+    sBiOut = psImageShift(sBiOut, sImg, colShift, rowShift, -1, PS_INTERPOLATE_BILINEAR);
 
     for(int row=0;row<rows;row++) {
         psF32* fRow = fOut->data.F32[row];
         psS16* sRow = sOut->data.S16[row];
+        psF32* fBiRow = fBiOut->data.F32[row];
+        psS16* sBiRow = sBiOut->data.S16[row];
+
         for (int col=0;col<cols;col++) {
             psF32 fValue = psImagePixelInterpolate(fImg,col+colShift,
@@ -1650,4 +1666,9 @@
             psS16 sValue = (psS16)psImagePixelInterpolate(sImg,col+colShift,
                            row+rowShift,NULL,0,-1,PS_INTERPOLATE_FLAT);
+
+            psF32 fBiValue = psImagePixelInterpolate(fImg,col+colShift,
+                             row+rowShift,NULL,0,NAN,PS_INTERPOLATE_BILINEAR);
+            psS16 sBiValue = (psS16)psImagePixelInterpolate(sImg,col+colShift,
+                             row+rowShift,NULL,0,-1,PS_INTERPOLATE_BILINEAR);
 
             if (fabsf(fRow[col] - fValue) > FLT_EPSILON) {
@@ -1661,4 +1682,14 @@
                 return 2;
             }
+            if (fabsf(fBiRow[col] - fBiValue) > FLT_EPSILON) {
+                psError(__func__,"Float image not shifted correctly at %d,%d (%g vs %g)",
+                        col,row,fBiRow[col],fBiValue);
+                return 1;
+            }
+            if (sBiRow[col] != sBiValue) {
+                psError(__func__,"Short image not shifted correctly at %d,%d (%d vs %d)",
+                        col,row,sBiRow[col],sBiValue);
+                return 2;
+            }
         }
     }
@@ -1668,4 +1699,6 @@
     psFree(fOut);
     psFree(sOut);
+    psFree(fBiOut);
+    psFree(sBiOut);
 
     return 0;
Index: /trunk/psLib/test/image/verified/tst_psImageManip.stderr
===================================================================
--- /trunk/psLib/test/image/verified/tst_psImageManip.stderr	(revision 1933)
+++ /trunk/psLib/test/image/verified/tst_psImageManip.stderr	(revision 1934)
@@ -298,4 +298,8 @@
 <DATE><TIME>|<HOST>|E|psLib.image.psImageShift
     Can not operate on a NULL psImage.
+<DATE><TIME>|<HOST>|I|testImageShift
+    Following should be an error for invalid interpolation mode.
+<DATE><TIME>|<HOST>|E|psLib.image.psImageShift
+    Specified interpolation mode, -1, is unsupported.
 
 ---> TESTPOINT PASSED (psImage{psImageShift} | tst_psImageManip.c)
