Public Member Functions | |
void | AddTestSuite (TestSuite *testSuite) |
void | EndTestCase (void) |
std::string | GetTempDir (void) const |
std::string | GetTopLevelSourceDir (void) const |
bool | MustAssertOnFailure (void) const |
bool | MustContinueOnFailure (void) const |
bool | MustUpdateData (void) const |
void | ReportTestFailure (std::string cond, std::string actual, std::string limit, std::string message, std::string file, int32_t line) |
int | Run (int argc, char *argv[]) |
void | StartTestCase (std::string name) |
Static Public Member Functions | |
static TestRunnerImpl * | Instance (void) |
Private Types | |
typedef std::vector< TestSuite * > | TestSuiteVector |
Private Member Functions | |
TestRunnerImpl () | |
~TestRunnerImpl () | |
std::list< TestCase * > | FilterTests (std::string testName, enum TestSuite::Type testType) const |
bool | IsTopLevelSourceDir (std::string path) const |
void | PrintHelp (const char *programName) const |
void | PrintReport (TestCase *test, std::ostream *os, bool xml, int level) |
void | PrintTestNameList (std::list< TestCase * >::const_iterator begin, std::list< TestCase * >::const_iterator end) const |
void | PrintTestTypeList (void) const |
std::string | ReplaceXmlSpecialCharacters (std::string xml) const |
Private Attributes | |
bool | m_assertOnFailure |
bool | m_continueOnFailure |
TestSuiteVector | m_suites |
std::string | m_tempDir |
bool | m_updateData |
bool | m_verbose |
|
private |
void ns3::TestRunnerImpl::AddTestSuite | ( | TestSuite * | testSuite | ) |
Definition at line 352 of file test.cc.
References m_suites.
Referenced by ns3::TestSuite::TestSuite().
void ns3::TestRunnerImpl::EndTestCase | ( | void | ) |
|
private |
Definition at line 594 of file test.cc.
References ns3::TestSuite::ALL, ns3::TestCase::GetName(), ns3::TestSuite::GetTestType(), m_suites, and test().
Referenced by Run().
std::string ns3::TestRunnerImpl::GetTempDir | ( | void | ) | const |
Definition at line 375 of file test.cc.
References m_tempDir.
Referenced by ns3::TestCase::CreateTempDirFilename().
std::string ns3::TestRunnerImpl::GetTopLevelSourceDir | ( | void | ) | const |
Definition at line 407 of file test.cc.
References ns3::SystemPath::FindSelfDirectory(), IsTopLevelSourceDir(), ns3::SystemPath::Join(), NS_FATAL_ERROR, and ns3::SystemPath::Split().
Referenced by ns3::TestCase::CreateDataDirFilename().
|
static |
Definition at line 345 of file test.cc.
Referenced by ns3::TestRunner::Run(), and ns3::TestSuite::TestSuite().
|
private |
Definition at line 380 of file test.cc.
References ns3::SystemPath::ReadFiles().
Referenced by GetTopLevelSourceDir().
bool ns3::TestRunnerImpl::MustAssertOnFailure | ( | void | ) | const |
Definition at line 359 of file test.cc.
References m_assertOnFailure.
Referenced by ns3::TestCase::MustAssertOnFailure().
bool ns3::TestRunnerImpl::MustContinueOnFailure | ( | void | ) | const |
Definition at line 364 of file test.cc.
References m_continueOnFailure.
Referenced by ns3::TestCase::MustContinueOnFailure().
bool ns3::TestRunnerImpl::MustUpdateData | ( | void | ) | const |
Definition at line 370 of file test.cc.
References m_updateData.
Referenced by ns3::TestCase::CreateTempDirFilename().
|
private |
|
private |
Definition at line 470 of file test.cc.
References ns3::TestCaseFailure::actual, ns3::TestCase::Result::clock, ns3::TestCaseFailure::cond, ns3::TestCase::Result::failure, ns3::TestCaseFailure::file, ns3::SystemWallClockMs::GetElapsedReal(), ns3::SystemWallClockMs::GetElapsedSystem(), ns3::SystemWallClockMs::GetElapsedUser(), ns3::TestCase::GetName(), ns3::TestCase::IsFailed(), ns3::TestCaseFailure::limit, ns3::TestCaseFailure::line, ns3::TestCase::m_children, ns3::TestCase::m_name, ns3::TestCase::m_result, m_verbose, ns3::TestCaseFailure::message, and ReplaceXmlSpecialCharacters().
Referenced by Run().
|
private |
Definition at line 571 of file test.cc.
References ns3::TestCase::GetName(), and test().
Referenced by Run().
|
private |
|
private |
Definition at line 429 of file test.cc.
Referenced by PrintReport().
void ns3::TestRunnerImpl::ReportTestFailure | ( | std::string | cond, |
std::string | actual, | ||
std::string | limit, | ||
std::string | message, | ||
std::string | file, | ||
int32_t | line | ||
) |
int ns3::TestRunnerImpl::Run | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 617 of file test.cc.
References ns3::TestSuite::ALL, ns3::TestSuite::BVT, ns3::TestSuite::EXAMPLE, FilterTests(), ns3::TestCase::IsFailed(), m_assertOnFailure, m_continueOnFailure, m_tempDir, m_updateData, m_verbose, ns3::SystemPath::MakeTemporaryDirectoryName(), PrintHelp(), PrintReport(), PrintTestNameList(), PrintTestTypeList(), ns3::TestCase::Run(), ns3::TestSuite::SYSTEM, test(), and ns3::TestSuite::UNIT.
Referenced by ns3::TestRunner::Run().
void ns3::TestRunnerImpl::StartTestCase | ( | std::string | name | ) |
|
private |
Definition at line 116 of file test.cc.
Referenced by MustAssertOnFailure(), and Run().
|
private |
Definition at line 117 of file test.cc.
Referenced by MustContinueOnFailure(), and Run().
|
private |
Definition at line 113 of file test.cc.
Referenced by AddTestSuite(), and FilterTests().
|
private |
Definition at line 114 of file test.cc.
Referenced by GetTempDir(), and Run().
|
private |
Definition at line 118 of file test.cc.
Referenced by MustUpdateData(), and Run().
|
private |
Definition at line 115 of file test.cc.
Referenced by PrintReport(), and Run().