Namespaces | |
| namespace | Core |
Defines | |
| #define | TEST_TRUE(x) |
| Test that the expression result is true. | |
| #define | TEST_FALSE(x) |
| Test that the expression result is false. | |
| #define | TEST_THROWS(x) |
| Test that the expression casuses an exception. | |
Functions | |
| void | Core::WriteTestResult (const char *pszFile, size_t nLine, const tchar *pszExpression, bool bPassed) |
| Write the test results to stdout. | |
| void | Core::WriteTestsSummary () |
| Write the summary of the test results to stdout. | |
| int | Core::GetTestProcessResult () |
| Get the test process result code. | |
| #define TEST_TRUE | ( | x | ) |
Value:
try { \ if (x) Core::WriteTestResult(__FILE__, __LINE__, TXT(#x), true); \ else Core::WriteTestResult(__FILE__, __LINE__, TXT(#x), false); \ } catch(...) { \ Core::WriteTestResult(__FILE__, __LINE__, TXT(#x), false); \ }
| #define TEST_FALSE | ( | x | ) |
Value:
try { \ if (x) Core::WriteTestResult(__FILE__, __LINE__, TXT(#x), false); \ else Core::WriteTestResult(__FILE__, __LINE__, TXT(#x), true); \ } catch(...) { \ Core::WriteTestResult(__FILE__, __LINE__, TXT(#x), false); \ }
| #define TEST_THROWS | ( | x | ) |
Value:
try { \ (x); \ Core::WriteTestResult(__FILE__, __LINE__, TXT(#x), false); \ } catch(const std::exception& /*e*/) { \ Core::WriteTestResult(__FILE__, __LINE__, TXT(#x), true); \ } catch(...) { \ Core::WriteTestResult(__FILE__, __LINE__, TXT(#x), false); \ }
1.5.2