Changeset 1878
- Timestamp:
- Sep 24, 2004, 9:46:30 AM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/sysUtils/tst_psError.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/sysUtils/tst_psError.c
r1875 r1878 7 7 * testError01 - psErrorMsg(), psErrorStackPrint() (Testpoint #725) 8 8 * testError02 - psErrorStackPrintV() (Testpoint #726) 9 * testError03 - psErrorGet(), psErrorLast() (Testpoint # )9 * testError03 - psErrorGet(), psErrorLast() (Testpoint #727) 10 10 * testError04 - psErrorClear() (Testpoint #) 11 11 * testError05 - psErrorCodeString() (Testpoint #) … … 13 13 * @author Eric Van Alst, MHPCC 14 14 * 15 * @version $Revision: 1. 9$ $Name: not supported by cvs2svn $16 * @date $Date: 2004-09-24 02:00:15$15 * @version $Revision: 1.10 $ $Name: not supported by cvs2svn $ 16 * @date $Date: 2004-09-24 19:46:30 $ 17 17 * 18 18 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 84 84 psErr *lastAfterClear = NULL; 85 85 86 // Generate three error messages 86 // With an attemp error stack call psErrorClear 87 psErrorClear(); 88 89 // Get the last error message and verify PS_ERR_NONE (empty stack) 90 lastAfterClear = psErrorLast(); 91 if(lastAfterClear->code != PS_ERR_NONE) { 92 psLogMsg("tst_psError05", PS_LOG_ERROR, "psErrorLast did not return expected."); 93 return 30; 94 } 95 psFree(lastAfterClear); 96 97 // Generate three error messages to have messages on error stack 87 98 if (psErrorMsg("test4A", code, true, "Error code = %d", code) != code) { 88 99 psLogMsg("tst_psError04", PS_LOG_ERROR, "Failed return value verify."); 89 return 3 0;100 return 31; 90 101 } 91 102 if (psErrorMsg("test4A", (code+1), false, "Error code = %d", (code+1)) != (code+1)) { 92 103 psLogMsg("tst_psError04", PS_LOG_ERROR, "Failed return value verify."); 93 return 3 1;104 return 32; 94 105 } 95 106 if (psErrorMsg("test4A", (code+2), false, "Error code = %d", (code+2)) != (code+2)) { 96 107 psLogMsg("tst_psError04", PS_LOG_ERROR, "Failed return value verify."); 97 return 3 2;108 return 33; 98 109 } 99 110 … … 102 113 if(last->code != (code+2)) { 103 114 psLogMsg("tst_psError04", PS_LOG_ERROR, "psErrorLast did not return expected."); 104 return 3 3;115 return 34; 105 116 } 106 117 psFree(last); … … 111 122 // Get the last error message after clear and verify is has PS_ERR_NONE code 112 123 lastAfterClear = psErrorLast(); 113 if(last ->code != PS_ERR_NONE) {114 psLogMsg("tst_psError05", PS_LOG_ERROR, "psErrorLast erdid not return expected.");115 return 3 4;124 if(lastAfterClear->code != PS_ERR_NONE) { 125 psLogMsg("tst_psError05", PS_LOG_ERROR, "psErrorLast did not return expected."); 126 return 35; 116 127 } 117 128 psFree(lastAfterClear);
Note:
See TracChangeset
for help on using the changeset viewer.
