top | up | prev | next

UnitTestEngine Class

Definition at line 32 of UnitTest.cpp

Member Functions

void Done() static
void EndUnitTest(const char* testName, int32_t exitCode)
void Init() static
UnitTestEngine& Instance() static
void SetUnitTestAssertionResult(int32_t assertionIndex, bool assertionResult, int32_t line)
void SetUnitTestException(const std::string& exceptionStr_)
void StartUnitTest(int32_t numAssertions_, const char* unitTestFilePath_)

Member Variables

std::vector<AssertionResult> assertionResults
std::string exceptionStr
std::unique_ptr<UnitTestEngine> instance static
int numAssertions
std::string unitTestFilePath

Member Function Details

Done Member Function

void cmajor::rt::UnitTestEngine::Done() static

Definition at line 57 of UnitTest.cpp :
 58 {
 59     instance.reset();
 60 }


Declaration at line 36 of UnitTest.cpp


EndUnitTest Member Function

void cmajor::rt::UnitTestEngine::EndUnitTest(const char * testName, int32_t exitCode)

Definition at line 72 of UnitTest.cpp
Declaration at line 39 of UnitTest.cpp

Calls: sngxml::dom::Document::AppendChild , sngxml::dom::Document::Write , soulng::util::CodeFormatter::SetIndentSize


Init Member Function

void cmajor::rt::UnitTestEngine::Init() static

Definition at line 52 of UnitTest.cpp :
 53 {
 54     instance.reset(new UnitTestEngine());
 55 }


Declaration at line 35 of UnitTest.cpp


Instance Member Function

UnitTestEngine & cmajor::rt::UnitTestEngine::Instance() static

Definition at line 37 of UnitTest.cpp :
 37 { return *instance; }


SetUnitTestAssertionResult Member Function

void cmajor::rt::UnitTestEngine::SetUnitTestAssertionResult(int32_t assertionIndex, bool assertionResult, int32_t line)

Definition at line 108 of UnitTest.cpp
Declaration at line 40 of UnitTest.cpp


SetUnitTestException Member Function

void cmajor::rt::UnitTestEngine::SetUnitTestException(const std::string& exceptionStr_)

Definition at line 41 of UnitTest.cpp :
 41 { exceptionStr = exceptionStr_; }


StartUnitTest Member Function

void cmajor::rt::UnitTestEngine::StartUnitTest(int32_t numAssertions_, const char * unitTestFilePath_)

Definition at line 62 of UnitTest.cpp :
 63 {
 64     numAssertions = numAssertions_;
 65     unitTestFilePath = unitTestFilePath_;
 66     for (int32_t i = 0; i < numAssertions; ++i)
 67     {
 68         assertionResults.push_back(AssertionResult(assertionResultEmpty0));
 69     }
 70 }


Declaration at line 38 of UnitTest.cpp


top | up | prev | next