1 #ifndef WSJCPP_UNIT_TESTS_H     2 #define WSJCPP_UNIT_TESTS_H    11         void ok(
const std::string &sSuccessMessage);
    12         void fail(
const std::string &sFailedMessage);
    21         bool compareD(
const std::string &sMark, 
double nValue, 
double nExpected);
    22         template<
typename T1, 
typename T2> 
bool compare(
const std::string &sMark, T1 tGotValue, T2 tExpectedValue) {
    23             if (tGotValue != tExpectedValue) {
    25                 ss << 
" {mark: " << sMark << 
"} Expected '" << tExpectedValue << 
"', but got '" << tGotValue << 
"'";
    40         static void initGlobalVariables();
    45 #define REGISTRY_WSJCPP_UNIT_TEST( classname ) \    46     static classname * pRegistryWsjcppUnitTest ## classname = new classname(); \    49 #endif // WSJCPP_UNIT_TESTS_H void fail(const std::string &sFailedMessage)
Definition: wsjcpp_unit_tests.cpp:29
 
std::string TAG
Definition: wsjcpp_unit_tests.h:19
 
virtual bool doBeforeTest()=0
 
std::string m_sTestName
Definition: wsjcpp_unit_tests.h:33
 
virtual bool doAfterTest()=0
 
WsjcppUnitTestBase(const std::string &sTestName)
Definition: wsjcpp_unit_tests.cpp:7
 
Definition: wsjcpp_unit_tests.h:38
 
bool runTest()
Definition: wsjcpp_unit_tests.cpp:36
 
std::string getName()
Definition: wsjcpp_unit_tests.cpp:16
 
Definition: wsjcpp_unit_tests.h:7
 
virtual void executeTest()=0
 
bool compareD(const std::string &sMark, double nValue, double nExpected)
Definition: wsjcpp_unit_tests.cpp:66
 
std::vector< WsjcppUnitTestBase * > * g_pWsjcppUnitTests
Definition: wsjcpp_unit_tests.cpp:76
 
void ok(const std::string &sSuccessMessage)
Definition: wsjcpp_unit_tests.cpp:22
 
bool compare(const std::string &sMark, T1 tGotValue, T2 tExpectedValue)
Definition: wsjcpp_unit_tests.h:22
 
bool m_bTestResult
Definition: wsjcpp_unit_tests.h:32