Index: trunk/psLib/test/dataManip/tst_psMatrixVectorArithmetic03.c
===================================================================
--- trunk/psLib/test/dataManip/tst_psMatrixVectorArithmetic03.c	(revision 1992)
+++ trunk/psLib/test/dataManip/tst_psMatrixVectorArithmetic03.c	(revision 2021)
@@ -15,6 +15,6 @@
  *  @author  Ross Harman, MHPCC
  *
- *  @version $Revision: 1.3 $  $Name: not supported by cvs2svn $
- *  @date  $Date: 2004-08-27 23:31:35 $
+ *  @version $Revision: 1.4 $  $Name: not supported by cvs2svn $
+ *  @date  $Date: 2004-10-08 02:48:01 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -86,20 +86,64 @@
     printNegativeTestHeader(stdout,"psMatrixVectorArithmetic", "Check for NULL arguments",
                             "Null XXX argument", 0);
-    psBinaryOp(NULL, image1, "+", image2);
-    psBinaryOp(image2, NULL, "+", image2);
-    psBinaryOp(image2, image1, "+", NULL);
-    psBinaryOp(image2, image1, NULL, image2);
-    psUnaryOp(NULL, image1, "sin");
-    psUnaryOp(image2, NULL, "sin");
-    psUnaryOp(image2, image1, NULL);
-    printFooter(stdout, "psBitSet", "Check for NULL arguments", true);
-
+    psImage* image6 = (psImage*)psBinaryOp(NULL, image1, "+", image2);
+    if (image6 == NULL) {
+        psLogMsg(__func__,PS_LOG_ERROR,"psBinaryOp failed to make an image given no output to recycle.");
+        return 1;
+    }
+
+    image6 = (psImage*)psBinaryOp(image6, NULL, "+", image2);
+    if (image6 != NULL) {
+        psLogMsg(__func__,PS_LOG_ERROR,"psBinaryOp returned a result given a NULL first operand.");
+        return 2;
+    }
+
+    image6 = (psImage*)psBinaryOp(image6, image1, "+", NULL);
+    if (image6 != NULL) {
+        psLogMsg(__func__,PS_LOG_ERROR,"psBinaryOp returned a result given a NULL second operand.");
+        return 3;
+    }
+    image6 = (psImage*)psBinaryOp(image6, image1, NULL, image2);
+    if (image6 != NULL) {
+        psLogMsg(__func__,PS_LOG_ERROR,"psBinaryOp returned a result given a NULL operator.");
+        return 4;
+    }
+
+    image6 = (psImage*)psUnaryOp(NULL, image1, "sin");
+    if (image6 == NULL) {
+        psLogMsg(__func__,PS_LOG_ERROR,"psUnaryOp failed to make an image given no output to recycle.");
+        return 5;
+    }
+
+    image6 = (psImage*)psUnaryOp(image6, NULL, "sin");
+    if (image6 != NULL) {
+        psLogMsg(__func__,PS_LOG_ERROR,"psUnaryOp returned a result given a NULL operand.");
+        return 6;
+    }
+
+    image6 = (psImage*)psUnaryOp(image6, image1, NULL);
+    if (image6 != NULL) {
+        psLogMsg(__func__,PS_LOG_ERROR,"psUnaryOp returned a result given a NULL operator.");
+        return 7;
+    }
+
+    printFooter(stdout, "psMatrixVectorArithmetic", "Check for NULL arguments", true);
 
     // Inconsistent element types
     printNegativeTestHeader(stdout,"psMatrixVectorArithmetic", "Inconsistent element types",
                             "Element types for arguments inconsistent", 0);
-    psBinaryOp(image2, image3, "+", image2);
-    psUnaryOp(image2, image3, "sin");
-    printFooter(stdout, "psBitSet", "Inconsistent element types", true);
+    image6 = (psImage*)psBinaryOp(image6, image3, "+", image2);
+    if (image6 != NULL) {
+        psLogMsg(__func__,PS_LOG_ERROR,"psBinaryOp returned a result given operands of different types.");
+        return 8;
+    }
+
+    image6 = psImageCopy(image6,image2,PS_TYPE_F64);
+    image6 = (psImage*)psUnaryOp(image6, image3, "sin");
+    if (image6 == NULL || image6->type.type != PS_TYPE_F32) {
+        psLogMsg(__func__,PS_LOG_ERROR,"psUnaryOp failed to convert the type of the output.");
+        return 9;
+    }
+
+    printFooter(stdout, "psMatrixVectorArithmetic", "Inconsistent element types", true);
 
 
@@ -107,10 +151,32 @@
     printNegativeTestHeader(stdout,"psMatrixVectorArithmetic", "Inconsistent element count",
                             "Inconsistent element count", 0);
-    psBinaryOp(image2, image4, "+", image2);
-    psUnaryOp(image2, image4, "sin");
-    psBinaryOp(image2, vector1, "+", image2);
+    image6 = (psImage*)psBinaryOp(image6, image4, "+", image2);
+    if (image6 != NULL) {
+        psLogMsg(__func__,PS_LOG_ERROR,"psBinaryOp returned a result given operands of different sizes.");
+        return 10;
+    }
+
+    image6 = psImageCopy(image6,image2,PS_TYPE_F64);
+    image6 = (psImage*)psUnaryOp(image6, image4, "sin");
+    if (image6 == NULL ||
+            image6->numCols != image6->numCols ||
+            image6->numRows != image6->numRows) {
+        psLogMsg(__func__,PS_LOG_ERROR,"psUnaryOp failed to resize the output.");
+        return 11;
+    }
+
+    image6 = (psImage*)psBinaryOp(image6, vector1, "+", image2);
+    if (image6 != NULL) {
+        psLogMsg(__func__,PS_LOG_ERROR,"psBinaryOp returned a result given operands of different sizes.");
+        return 12;
+    }
+
     vector1->type.dimen = PS_DIMEN_TRANSV;
-    psBinaryOp(image2, vector1, "+", image2);
-    printFooter(stdout, "psBitSet", "Inconsistent element count", true);
+    image6 = (psImage*)psBinaryOp(image6, vector1, "+", image2);
+    if (image6 != NULL) {
+        psLogMsg(__func__,PS_LOG_ERROR,"psBinaryOp returned a result given operands of different sizes.");
+        return 13;
+    }
+    printFooter(stdout, "psMatrixVectorArithmetic", "Inconsistent element count", true);
 
 
@@ -118,20 +184,18 @@
     printNegativeTestHeader(stdout,"psMatrixVectorArithmetic", "Inconsistent dimensionality",
                             "Dimensionality for arguments inconsistent", 0);
-    psUnaryOp(image2, vector2, "sin");
-    printFooter(stdout, "psBitSet", "Inconsistent dimensionality", true);
-
-
-    // Division by zero
-    printNegativeTestHeader(stdout,"psMatrixVectorArithmetic", "Divide by zero",
-                            "Divide by zero", 0);
-    psBinaryOp(image1, image1, "/", image2);
-    printFooter(stdout, "psBitSet", "Division by zero", true);
-
+    image6 = psImageCopy(image6,image2,PS_TYPE_F64);
+    image6 = (psImage*)psUnaryOp(image6, vector2, "sin");
+    if (image6 != NULL) {
+        psLogMsg(__func__,PS_LOG_ERROR,"psUnaryOp returned result given wrong type out parameter.");
+        return 14;
+    }
+
+    printFooter(stdout, "psMatrixVectorArithmetic", "Inconsistent dimensionality", true);
 
     // Attempt to use min with complex numbers
     printNegativeTestHeader(stdout,"psMatrixVectorArithmetic", "Use min with complex numbers",
                             "Minimum operation not supported for complex numbers", 0);
-    psBinaryOp(image5, image5, "min", image5);
-    printFooter(stdout, "psBitSet", "Use min with complex numbers", true);
+    image6 = (psImage*)psBinaryOp(image6, image5, "min", image5);
+    printFooter(stdout, "psMatrixVectorArithmetic", "Use min with complex numbers", true);
 
 
@@ -139,6 +203,6 @@
     printNegativeTestHeader(stdout,"psMatrixVectorArithmetic", "Use max with complex numbers",
                             "Maximum operation not supported for complex numbers", 0);
-    psBinaryOp(image5, image5, "max", image5);
-    printFooter(stdout, "psBitSet", "Use max with complex numbers", true);
+    image6 = (psImage*)psBinaryOp(image6, image5, "max", image5);
+    printFooter(stdout, "psMatrixVectorArithmetic", "Use max with complex numbers", true);
 
 
@@ -146,7 +210,7 @@
     printNegativeTestHeader(stdout,"psMatrixVectorArithmetic", "Invalid operation",
                             "Invalid operation", 0);
-    psBinaryOp(image1, image1, "yarg", image2);
-    psUnaryOp(image2, image1, "yarg");
-    printFooter(stdout, "psBitSet", "Invalid operation", true);
+    image6 = (psImage*)psBinaryOp(image6, image1, "yarg", image2);
+    image6 = (psImage*)psUnaryOp(image6, image1, "yarg");
+    printFooter(stdout, "psMatrixVectorArithmetic", "Invalid operation", true);
 
     return 0;
Index: trunk/psLib/test/dataManip/verified/tst_psMatrixVectorArithmetic03.stderr
===================================================================
--- trunk/psLib/test/dataManip/verified/tst_psMatrixVectorArithmetic03.stderr	(revision 1992)
+++ trunk/psLib/test/dataManip/verified/tst_psMatrixVectorArithmetic03.stderr	(revision 2021)
@@ -1,4 +1,2 @@
-<DATE><TIME>|<HOST>|E|psBinaryOp
-    : Line <LINENO> - Null out argument
 <DATE><TIME>|<HOST>|E|psBinaryOp
     : Line <LINENO> - Null in1 argument
@@ -8,16 +6,10 @@
     : Line <LINENO> - Null op argument
 <DATE><TIME>|<HOST>|E|psUnaryOp
-    : Line <LINENO> - Null out argument
-<DATE><TIME>|<HOST>|E|psUnaryOp
     : Line <LINENO> - Null in argument
 <DATE><TIME>|<HOST>|E|psUnaryOp
     : Line <LINENO> - Null op argument
 <DATE><TIME>|<HOST>|E|psBinaryOp
-    : Line <LINENO> - Element types for arguments inconsistent: (1028, 1032, 1032)
-<DATE><TIME>|<HOST>|E|psUnaryOp
     : Line <LINENO> - Element types for arguments inconsistent: (1028, 1032)
 <DATE><TIME>|<HOST>|E|psBinaryOp
-    : Inconsistent element count: numRows: 2 vs 3 numCols: 2 vs 3
-<DATE><TIME>|<HOST>|E|psUnaryOp
     : Inconsistent element count: numRows: 2 vs 3 numCols: 2 vs 3
 <DATE><TIME>|<HOST>|E|psBinaryOp
@@ -25,24 +17,8 @@
 <DATE><TIME>|<HOST>|E|psBinaryOp
     : Inconsistent element count: 2 vs 3
+<DATE><TIME>|<HOST>|E|psLib.collections.psVectorRecycle
+    The input psVector must have a vector dimension type.
 <DATE><TIME>|<HOST>|E|psUnaryOp
-    : Line <LINENO> - Dimensionality for arguments inconsistent: (1, 3)
-<DATE><TIME>|<HOST>|E|psNanDiv
-    : Divide by zero
-<DATE><TIME>|<HOST>|E|psNanDiv
-    : Divide by zero
-<DATE><TIME>|<HOST>|E|psNanDiv
-    : Divide by zero
-<DATE><TIME>|<HOST>|E|psNanDiv
-    : Divide by zero
-<DATE><TIME>|<HOST>|E|psNanDiv
-    : Divide by zero
-<DATE><TIME>|<HOST>|E|psNanDiv
-    : Divide by zero
-<DATE><TIME>|<HOST>|E|psNanDiv
-    : Divide by zero
-<DATE><TIME>|<HOST>|E|psNanDiv
-    : Divide by zero
-<DATE><TIME>|<HOST>|E|psNanDiv
-    : Divide by zero
+    Couldn't create a proper output psVector.
 <DATE><TIME>|<HOST>|E|psBinaryOp
     : Minimum operation not supported for complex numbers
Index: trunk/psLib/test/dataManip/verified/tst_psMatrixVectorArithmetic03.stdout
===================================================================
--- trunk/psLib/test/dataManip/verified/tst_psMatrixVectorArithmetic03.stdout	(revision 1992)
+++ trunk/psLib/test/dataManip/verified/tst_psMatrixVectorArithmetic03.stdout	(revision 2021)
@@ -8,5 +8,5 @@
 
 
----> TESTPOINT PASSED (psBitSet{Check for NULL arguments} | tst_psMatrixVectorArithmetic03.c)
+---> TESTPOINT PASSED (psMatrixVectorArithmetic{Check for NULL arguments} | tst_psMatrixVectorArithmetic03.c)
 
 /***************************** TESTPOINT ******************************************\
@@ -19,5 +19,5 @@
 
 
----> TESTPOINT PASSED (psBitSet{Inconsistent element types} | tst_psMatrixVectorArithmetic03.c)
+---> TESTPOINT PASSED (psMatrixVectorArithmetic{Inconsistent element types} | tst_psMatrixVectorArithmetic03.c)
 
 /***************************** TESTPOINT ******************************************\
@@ -30,5 +30,5 @@
 
 
----> TESTPOINT PASSED (psBitSet{Inconsistent element count} | tst_psMatrixVectorArithmetic03.c)
+---> TESTPOINT PASSED (psMatrixVectorArithmetic{Inconsistent element count} | tst_psMatrixVectorArithmetic03.c)
 
 /***************************** TESTPOINT ******************************************\
@@ -41,16 +41,5 @@
 
 
----> TESTPOINT PASSED (psBitSet{Inconsistent dimensionality} | tst_psMatrixVectorArithmetic03.c)
-
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psMatrixVectorArithmetic03.c                           *
-*            TestPoint: psMatrixVectorArithmetic{Divide by zero}                   *
-*             TestType: Negative                                                   *
-*    ExpectedErrorText: Divide by zero                                             *
-*  ExpectedStatusValue: 0                                                          *
-\**********************************************************************************/
-
-
----> TESTPOINT PASSED (psBitSet{Division by zero} | tst_psMatrixVectorArithmetic03.c)
+---> TESTPOINT PASSED (psMatrixVectorArithmetic{Inconsistent dimensionality} | tst_psMatrixVectorArithmetic03.c)
 
 /***************************** TESTPOINT ******************************************\
@@ -63,5 +52,5 @@
 
 
----> TESTPOINT PASSED (psBitSet{Use min with complex numbers} | tst_psMatrixVectorArithmetic03.c)
+---> TESTPOINT PASSED (psMatrixVectorArithmetic{Use min with complex numbers} | tst_psMatrixVectorArithmetic03.c)
 
 /***************************** TESTPOINT ******************************************\
@@ -74,5 +63,5 @@
 
 
----> TESTPOINT PASSED (psBitSet{Use max with complex numbers} | tst_psMatrixVectorArithmetic03.c)
+---> TESTPOINT PASSED (psMatrixVectorArithmetic{Use max with complex numbers} | tst_psMatrixVectorArithmetic03.c)
 
 /***************************** TESTPOINT ******************************************\
@@ -85,4 +74,4 @@
 
 
----> TESTPOINT PASSED (psBitSet{Invalid operation} | tst_psMatrixVectorArithmetic03.c)
+---> TESTPOINT PASSED (psMatrixVectorArithmetic{Invalid operation} | tst_psMatrixVectorArithmetic03.c)
 
