Fennel: TestWrapperTemplate< UserTestClass > Class Template Reference (original) (raw)
Definition at line 208 of file TestBase.h.
References TestWrapperTemplate< UserTestClass >::name, TestWrapperTemplate< UserTestClass >::pUserTestCase, and TRACE_SEVERE.
00209 { 00210 pUserTestCase->beforeTestCase(name); 00211 pUserTestCase->testCaseSetUp(); 00212 try { 00213 try { 00214 ((*pUserTestCase).*pFunction)(); 00215 } catch (std::exception &ex) { 00216 pUserTestCase->notifyTrace(name, TRACE_SEVERE, ex.what()); 00217 throw ex; 00218 } 00219 } catch (...) { 00220 try { 00221 pUserTestCase->testCaseTearDown(); 00222 } catch (...) { 00223 // ignore teardown errors after failure 00224 } 00225 throw; 00226 } 00227 try { 00228 pUserTestCase->testCaseTearDown(); 00229 } catch (...) { 00230 pUserTestCase->afterTestCase(name); 00231 throw; 00232 } 00233 pUserTestCase->afterTestCase(name); 00234 }