Index: trunk/psLib/test/imageops/tap_psImageInterpolate2.c
===================================================================
--- trunk/psLib/test/imageops/tap_psImageInterpolate2.c	(revision 12812)
+++ trunk/psLib/test/imageops/tap_psImageInterpolate2.c	(revision 19129)
@@ -86,6 +86,6 @@
 
     for (int i = 0; i < num; i++) {
-        float x = psRandomUniform(rng) * xSize;
-        float y = psRandomUniform(rng) * ySize;
+        float x = psRandomUniform(rng) * (xSize - 1);
+        float y = psRandomUniform(rng) * (ySize - 1);
 
         // Values from interpolation
@@ -93,7 +93,7 @@
         psMaskType maskVal;
 
-        bool success = psImageInterpolate(&imageVal, &varianceVal, &maskVal, x, y, interp);
-        ok(success, "Interpolation at %.2f,%.2f", x, y);
-        skip_start(!success, 1, "Interpolation failed");
+        psImageInterpolateStatus status = psImageInterpolate(&imageVal, &varianceVal, &maskVal, x, y, interp);
+        ok(status != PS_INTERPOLATE_STATUS_ERROR, "Interpolation at %.2f,%.2f (%x)", x, y, status);
+        skip_start(status == PS_INTERPOLATE_STATUS_ERROR, 1, "Interpolation failed");
 
         int xCentral, yCentral;         // Central pixel of interpolation
@@ -112,5 +112,6 @@
         if (xCentral - (xKernel - 1) / 2 < 0 || xCentral + xKernel / 2 > xSize - 1 ||
             yCentral - (yKernel - 1) / 2 < 0 || yCentral + yKernel / 2 > ySize - 1) {
-            ok(isnan(imageVal), "Interpolation = %f vs NAN (border)", imageVal);
+            ok(status == PS_INTERPOLATE_STATUS_BAD || status == PS_INTERPOLATE_STATUS_POOR,
+               "Interpolation at border");
         } else {
             is_double_tol(imageVal, imageFunc(x, y), tol, "Interpolation = %f vs %f",
