Index: /trunk/psLib/test/imageops/tap_psImageConvolve2.c
===================================================================
--- /trunk/psLib/test/imageops/tap_psImageConvolve2.c	(revision 17330)
+++ /trunk/psLib/test/imageops/tap_psImageConvolve2.c	(revision 17331)
@@ -8,6 +8,6 @@
 #define KERNEL_SIZE 3
 #define TOL 1.0e-6
-#define MASK_INITIAL 0x0f
-#define MASK_FINAL   0xf0
+#define MASK_INITIAL 0x08
+#define MASK_FINAL   0x80
 
 
@@ -98,5 +98,5 @@
 int main(int argc, char *argv[])
 {
-    plan_tests(15);
+    plan_tests(20);
 
     diag("psImageConvolve tests");
@@ -171,4 +171,25 @@
     }
 
+    {
+        // In-place FFT mask convolution: 5 tests
+        psMemId id = psMemGetId();
+
+        psImage *mask = generateMask();
+
+        bool result = psImageConvolveMaskFFT(mask, mask, MASK_INITIAL, MASK_FINAL, -KERNEL_SIZE, KERNEL_SIZE,
+                                             -KERNEL_SIZE, KERNEL_SIZE, 0.5);
+        ok(result, "convolution result");
+        skip_start(!result, 3, "convolution failed");
+        ok(mask->type.type == PS_TYPE_MASK, "output type");
+        ok(mask->numCols == IMAGE_SIZE && mask->numRows == IMAGE_SIZE, "output size %dx%d",
+           mask->numCols, mask->numRows);
+        ok(checkConvolvedMask(mask), "convolved mask correct");
+        skip_end();
+
+        psFree(mask);
+
+        ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
+    }
+
 
     return exit_status();
