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, enum TestCase::TestDuration maximumTestDuration) |
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, bool printTestType) 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 |
|
private |
Definition at line 376 of file test.cc.
References NS_LOG_FUNCTION.
|
private |
Definition at line 385 of file test.cc.
References NS_LOG_FUNCTION.
void ns3::TestRunnerImpl::AddTestSuite | ( | TestSuite * | testSuite | ) |
Definition at line 401 of file test.cc.
References m_suites, and NS_LOG_FUNCTION.
Referenced by ns3::TestSuite::TestSuite().
void ns3::TestRunnerImpl::EndTestCase | ( | void | ) |
|
private |
Definition at line 690 of file test.cc.
References ns3::TestSuite::ALL, ns3::TestCase::GetName(), ns3::TestSuite::GetTestType(), ns3::TestCase::m_duration, m_suites, NS_LOG_FUNCTION, and test().
Referenced by Run().
std::string ns3::TestRunnerImpl::GetTempDir | ( | void | ) | const |
Definition at line 428 of file test.cc.
References m_tempDir, and NS_LOG_FUNCTION.
Referenced by ns3::TestCase::CreateTempDirFilename().
std::string ns3::TestRunnerImpl::GetTopLevelSourceDir | ( | void | ) | const |
Definition at line 462 of file test.cc.
References ns3::SystemPath::FindSelfDirectory(), IsTopLevelSourceDir(), ns3::SystemPath::Join(), NS_FATAL_ERROR, NS_LOG_FUNCTION, and ns3::SystemPath::Split().
Referenced by ns3::TestCase::CreateDataDirFilename().
|
static |
Definition at line 393 of file test.cc.
References NS_LOG_FUNCTION_NOARGS.
Referenced by ns3::TestRunner::Run(), and ns3::TestSuite::TestSuite().
|
private |
Definition at line 434 of file test.cc.
References NS_LOG_FUNCTION, and ns3::SystemPath::ReadFiles().
Referenced by GetTopLevelSourceDir().
bool ns3::TestRunnerImpl::MustAssertOnFailure | ( | void | ) | const |
Definition at line 409 of file test.cc.
References m_assertOnFailure, and NS_LOG_FUNCTION.
Referenced by ns3::TestCase::MustAssertOnFailure().
bool ns3::TestRunnerImpl::MustContinueOnFailure | ( | void | ) | const |
Definition at line 415 of file test.cc.
References m_continueOnFailure, and NS_LOG_FUNCTION.
Referenced by ns3::TestCase::MustContinueOnFailure().
bool ns3::TestRunnerImpl::MustUpdateData | ( | void | ) | const |
Definition at line 422 of file test.cc.
References m_updateData, and NS_LOG_FUNCTION.
Referenced by ns3::TestCase::CreateTempDirFilename().
|
private |
Definition at line 613 of file test.cc.
References NS_LOG_FUNCTION.
Referenced by Run().
|
private |
Definition at line 537 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, NS_LOG_FUNCTION, and ReplaceXmlSpecialCharacters().
Referenced by Run().
|
private |
Definition at line 650 of file test.cc.
References ns3::TestSuite::ALL, ns3::TestSuite::BVT, ns3::TestSuite::EXAMPLE, ns3::TestCase::GetName(), ns3::TestSuite::GetTestType(), NS_ASSERT, NS_LOG_FUNCTION, ns3::TestSuite::PERFORMANCE, ns3::TestSuite::SYSTEM, test(), and ns3::TestSuite::UNIT.
Referenced by Run().
|
private |
Definition at line 677 of file test.cc.
References NS_LOG_FUNCTION.
Referenced by Run().
|
private |
Definition at line 485 of file test.cc.
References NS_LOG_FUNCTION.
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 742 of file test.cc.
References ns3::TestSuite::ALL, ns3::TestSuite::BVT, ns3::TestSuite::EXAMPLE, ns3::TestCase::EXTENSIVE, FilterTests(), ns3::TestCase::IsFailed(), m_assertOnFailure, m_continueOnFailure, m_tempDir, m_updateData, m_verbose, ns3::SystemPath::MakeTemporaryDirectoryName(), NS_LOG_FUNCTION, ns3::TestSuite::PERFORMANCE, PrintHelp(), PrintReport(), PrintTestNameList(), PrintTestTypeList(), ns3::TestCase::QUICK, ns3::TestCase::Run(), ns3::TestSuite::SYSTEM, ns3::TestCase::TAKES_FOREVER, test(), and ns3::TestSuite::UNIT.
Referenced by ns3::TestRunner::Run().
void ns3::TestRunnerImpl::StartTestCase | ( | std::string | name | ) |
|
private |
Definition at line 125 of file test.cc.
Referenced by MustAssertOnFailure(), and Run().
|
private |
Definition at line 126 of file test.cc.
Referenced by MustContinueOnFailure(), and Run().
|
private |
Definition at line 122 of file test.cc.
Referenced by AddTestSuite(), and FilterTests().
|
private |
Definition at line 123 of file test.cc.
Referenced by GetTempDir(), and Run().
|
private |
Definition at line 127 of file test.cc.
Referenced by MustUpdateData(), and Run().
|
private |
Definition at line 124 of file test.cc.
Referenced by PrintReport(), and Run().