@@ -17,16 +17,16 @@ std::string UnitTestBase::name() {
1717void UnitTestBase::compareS (bool &bTestSuccess, const std::string &sPoint ,
1818 const std::string &sValue , const std::string &sExpected ) {
1919 if (sValue != sExpected ) {
20- WSJCppLog::err (TAG , sPoint + " , expeceted '" + sExpected + " ', but got '" + sValue + " '" );
20+ WSJCppLog::err (TAG , " { " + sPoint + " } Expected '" + sExpected + " ', but got '" + sValue + " '" );
2121 bTestSuccess = false ;
2222 }
2323}
2424
2525// ---------------------------------------------------------------------
2626
27- bool UnitTestBase::compareD (bool &bTestSuccess, const std::string &sPoint , double nValue, double nExpected) {
27+ bool UnitTestBase::compareN (bool &bTestSuccess, const std::string &sPoint , int nValue, int nExpected) {
2828 if (nValue != nExpected) {
29- WSJCppLog::err (TAG , " {" + sPoint + " } Expeceted '" + std::to_string (nExpected) + " ', but got '" + std::to_string (nValue) + " '" );
29+ WSJCppLog::err (TAG , " {" + sPoint + " } Expected '" + std::to_string (nExpected) + " ', but got '" + std::to_string (nValue) + " '" );
3030 bTestSuccess = false ;
3131 return false ;
3232 }
@@ -35,9 +35,9 @@ bool UnitTestBase::compareD(bool &bTestSuccess, const std::string &sPoint, doubl
3535
3636// ---------------------------------------------------------------------
3737
38- bool UnitTestBase::compareN (bool &bTestSuccess, const std::string &sPoint , int nValue, int nExpected) {
38+ bool UnitTestBase::compareD (bool &bTestSuccess, const std::string &sPoint , double nValue, double nExpected) {
3939 if (nValue != nExpected) {
40- WSJCppLog::err (TAG , " {" + sPoint + " } Expeceted '" + std::to_string (nExpected) + " ', but got '" + std::to_string (nValue) + " '" );
40+ WSJCppLog::err (TAG , " {" + sPoint + " } Expected '" + std::to_string (nExpected) + " ', but got '" + std::to_string (nValue) + " '" );
4141 bTestSuccess = false ;
4242 return false ;
4343 }
@@ -48,7 +48,7 @@ bool UnitTestBase::compareN(bool &bTestSuccess, const std::string &sPoint, int n
4848
4949void UnitTestBase::compareB (bool &bTestSuccess, const std::string &sPoint , bool bValue, bool bExpected) {
5050 if (bValue != bExpected) {
51- WSJCppLog::err (TAG , sPoint + " , expeceted '" + (bExpected ? " true" : " false" ) + " ', but got '" + (bValue ? " true" : " false" ) + " '" );
51+ WSJCppLog::err (TAG , " { " + sPoint + " } Expected '" + (bExpected ? " true" : " false" ) + " ', but got '" + (bValue ? " true" : " false" ) + " '" );
5252 bTestSuccess = false ;
5353 }
5454}
@@ -59,7 +59,7 @@ std::vector<UnitTestBase*> *g_pUnitTests = NULL;
5959
6060void UnitTests::initGlobalVariables () {
6161 if (g_pUnitTests == NULL ) {
62- // WSJCppLog ::info(std::string(), "Create handlers map");
62+ // Log ::info(std::string(), "Create handlers map");
6363 g_pUnitTests = new std::vector<UnitTestBase*>();
6464 }
6565}
@@ -80,7 +80,7 @@ void UnitTests::addUnitTest(const std::string &sTestName, UnitTestBase* pUnitTes
8080 WSJCppLog::err (sTestName , " Already registered" );
8181 } else {
8282 g_pUnitTests->push_back (pUnitTest);
83- // WSJCppLog ::info(sCmd, "Registered");
83+ // Log ::info(sCmd, "Registered");
8484 }
8585}
8686
0 commit comments