Index: trunk/psLib/test/imageops/tap_psImageConvolve2.c
===================================================================
--- trunk/psLib/test/imageops/tap_psImageConvolve2.c	(revision 17775)
+++ trunk/psLib/test/imageops/tap_psImageConvolve2.c	(revision 17806)
@@ -98,9 +98,55 @@
 int main(int argc, char *argv[])
 {
-    plan_tests(20);
+    plan_tests(30);
 
     diag("psImageConvolve tests");
 
     {
+        diag("Mask convolution");
+        // Better (separable) mask convolution: 5 tests
+        psMemId id = psMemGetId();
+
+        psImage *mask = generateMask();
+
+        psImage *convolved = psImageConvolveMask(NULL, mask, MASK_INITIAL, MASK_FINAL,
+                                                 -KERNEL_SIZE, KERNEL_SIZE, -KERNEL_SIZE, KERNEL_SIZE);
+        ok(convolved, "convolution result");
+        skip_start(!convolved, 3, "convolution failed");
+        ok(convolved->type.type == PS_TYPE_MASK, "output type");
+        ok(convolved->numCols == IMAGE_SIZE && convolved->numRows == IMAGE_SIZE, "output size %dx%d",
+           convolved->numCols, convolved->numRows);
+        ok(checkConvolvedMask(convolved), "convolved mask correct");
+        psFree(convolved);
+        skip_end();
+
+        psFree(mask);
+
+        ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
+    }
+
+    {
+        diag("Mask convolution in-place");
+        // Better (separable) in-place FFT mask convolution: 5 tests
+        psMemId id = psMemGetId();
+
+        psImage *mask = generateMask();
+
+        bool result = psImageConvolveMask(mask, mask, MASK_INITIAL, MASK_FINAL, -KERNEL_SIZE, KERNEL_SIZE,
+                                          -KERNEL_SIZE, KERNEL_SIZE);
+        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");
+    }
+
+    {
+        diag("Direct convolution");
         // Direct convolution: 5 tests
         psMemId id = psMemGetId();
@@ -126,4 +172,5 @@
 
     {
+        diag("FFT convolution");
         // FFT convolution: 5 tests
         psMemId id = psMemGetId();
@@ -149,4 +196,5 @@
 
     {
+        diag("FFT mask convolution");
         // FFT mask convolution: 5 tests
         psMemId id = psMemGetId();
@@ -172,4 +220,5 @@
 
     {
+        diag("FFT mask convolution in-place");
         // In-place FFT mask convolution: 5 tests
         psMemId id = psMemGetId();
@@ -192,5 +241,4 @@
     }
 
-
     return exit_status();
 }
