Index: /trunk/psLib/test/sysUtils/tst_psError.c
===================================================================
--- /trunk/psLib/test/sysUtils/tst_psError.c	(revision 1877)
+++ /trunk/psLib/test/sysUtils/tst_psError.c	(revision 1878)
@@ -7,5 +7,5 @@
  *     testError01 - psErrorMsg(), psErrorStackPrint()  (Testpoint #725)
  *     testError02 - psErrorStackPrintV()               (Testpoint #726)
- *     testError03 - psErrorGet(), psErrorLast()        (Testpoint #)
+ *     testError03 - psErrorGet(), psErrorLast()        (Testpoint #727)
  *     testError04 - psErrorClear()                     (Testpoint #)
  *     testError05 - psErrorCodeString()                (Testpoint #)
@@ -13,6 +13,6 @@
  *  @author  Eric Van Alst, MHPCC
  *
- *  @version $Revision: 1.9 $  $Name: not supported by cvs2svn $
- *  @date  $Date: 2004-09-24 02:00:15 $
+ *  @version $Revision: 1.10 $  $Name: not supported by cvs2svn $
+ *  @date  $Date: 2004-09-24 19:46:30 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -84,16 +84,27 @@
     psErr *lastAfterClear = NULL;
 
-    // Generate three error messages
+    // With an attemp error stack call psErrorClear
+    psErrorClear();
+
+    // Get the last error message and verify PS_ERR_NONE (empty stack)
+    lastAfterClear = psErrorLast();
+    if(lastAfterClear->code != PS_ERR_NONE) {
+        psLogMsg("tst_psError05", PS_LOG_ERROR, "psErrorLast did not return expected.");
+        return 30;
+    }
+    psFree(lastAfterClear);
+
+    // Generate three error messages to have messages on error stack
     if (psErrorMsg("test4A", code, true, "Error code = %d", code) !=  code) {
         psLogMsg("tst_psError04", PS_LOG_ERROR, "Failed return value verify.");
-        return 30;
+        return 31;
     }
     if (psErrorMsg("test4A", (code+1), false, "Error code = %d", (code+1)) != (code+1)) {
         psLogMsg("tst_psError04", PS_LOG_ERROR, "Failed return value verify.");
-        return 31;
+        return 32;
     }
     if (psErrorMsg("test4A", (code+2), false, "Error code = %d", (code+2)) != (code+2)) {
         psLogMsg("tst_psError04", PS_LOG_ERROR, "Failed return value verify.");
-        return 32;
+        return 33;
     }
 
@@ -102,5 +113,5 @@
     if(last->code != (code+2)) {
         psLogMsg("tst_psError04", PS_LOG_ERROR, "psErrorLast did not return expected.");
-        return 33;
+        return 34;
     }
     psFree(last);
@@ -111,7 +122,7 @@
     // Get the last error message after clear and verify is has PS_ERR_NONE code
     lastAfterClear = psErrorLast();
-    if(last->code != PS_ERR_NONE) {
-        psLogMsg("tst_psError05", PS_LOG_ERROR, "psErrorLaster did not return expected.");
-        return 34;
+    if(lastAfterClear->code != PS_ERR_NONE) {
+        psLogMsg("tst_psError05", PS_LOG_ERROR, "psErrorLast did not return expected.");
+        return 35;
     }
     psFree(lastAfterClear);
