A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::TestRunnerImpl Class Reference
+ Collaboration diagram for ns3::TestRunnerImpl:

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 TestRunnerImplInstance (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
 

Detailed Description

Definition at line 95 of file test.cc.

Member Typedef Documentation

typedef std::vector<TestSuite *> ns3::TestRunnerImpl::TestSuiteVector
private

Definition at line 131 of file test.cc.

Constructor & Destructor Documentation

ns3::TestRunnerImpl::TestRunnerImpl ( )
private

Definition at line 393 of file test.cc.

References NS_LOG_FUNCTION.

ns3::TestRunnerImpl::~TestRunnerImpl ( )
private

Definition at line 402 of file test.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

void ns3::TestRunnerImpl::AddTestSuite ( TestSuite testSuite)

Definition at line 418 of file test.cc.

References m_suites, and NS_LOG_FUNCTION.

Referenced by ns3::TestSuite::TestSuite().

+ Here is the caller graph for this function:

void ns3::TestRunnerImpl::EndTestCase ( void  )
std::list< TestCase * > ns3::TestRunnerImpl::FilterTests ( std::string  testName,
enum TestSuite::Type  testType,
enum TestCase::TestDuration  maximumTestDuration 
)
private

Definition at line 704 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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::string ns3::TestRunnerImpl::GetTempDir ( void  ) const

Definition at line 445 of file test.cc.

References m_tempDir, and NS_LOG_FUNCTION.

Referenced by ns3::TestCase::CreateTempDirFilename().

+ Here is the caller graph for this function:

std::string ns3::TestRunnerImpl::GetTopLevelSourceDir ( void  ) const

Definition at line 479 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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

TestRunnerImpl * ns3::TestRunnerImpl::Instance ( void  )
static

Definition at line 410 of file test.cc.

References NS_LOG_FUNCTION_NOARGS.

Referenced by ns3::TestRunner::Run(), and ns3::TestSuite::TestSuite().

+ Here is the caller graph for this function:

bool ns3::TestRunnerImpl::IsTopLevelSourceDir ( std::string  path) const
private

Definition at line 451 of file test.cc.

References NS_LOG_FUNCTION, and ns3::SystemPath::ReadFiles().

Referenced by GetTopLevelSourceDir().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ns3::TestRunnerImpl::MustAssertOnFailure ( void  ) const

Definition at line 426 of file test.cc.

References m_assertOnFailure, and NS_LOG_FUNCTION.

Referenced by ns3::TestCase::MustAssertOnFailure().

+ Here is the caller graph for this function:

bool ns3::TestRunnerImpl::MustContinueOnFailure ( void  ) const

Definition at line 432 of file test.cc.

References m_continueOnFailure, and NS_LOG_FUNCTION.

Referenced by ns3::TestCase::MustContinueOnFailure().

+ Here is the caller graph for this function:

bool ns3::TestRunnerImpl::MustUpdateData ( void  ) const

Definition at line 439 of file test.cc.

References m_updateData, and NS_LOG_FUNCTION.

Referenced by ns3::TestCase::CreateTempDirFilename().

+ Here is the caller graph for this function:

void ns3::TestRunnerImpl::PrintHelp ( const char *  programName) const
private

Definition at line 627 of file test.cc.

References NS_LOG_FUNCTION.

Referenced by Run().

+ Here is the caller graph for this function:

void ns3::TestRunnerImpl::PrintTestNameList ( std::list< TestCase * >::const_iterator  begin,
std::list< TestCase * >::const_iterator  end,
bool  printTestType 
) const
private

Definition at line 664 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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::TestRunnerImpl::PrintTestTypeList ( void  ) const
private

Definition at line 691 of file test.cc.

References NS_LOG_FUNCTION.

Referenced by Run().

+ Here is the caller graph for this function:

std::string ns3::TestRunnerImpl::ReplaceXmlSpecialCharacters ( std::string  xml) const
private

Definition at line 502 of file test.cc.

References NS_LOG_FUNCTION.

Referenced by PrintReport().

+ Here is the caller graph for this function:

void ns3::TestRunnerImpl::ReportTestFailure ( std::string  cond,
std::string  actual,
std::string  limit,
std::string  message,
std::string  file,
int32_t  line 
)
void ns3::TestRunnerImpl::StartTestCase ( std::string  name)

Member Data Documentation

bool ns3::TestRunnerImpl::m_assertOnFailure
private

Definition at line 136 of file test.cc.

Referenced by MustAssertOnFailure(), and Run().

bool ns3::TestRunnerImpl::m_continueOnFailure
private

Definition at line 137 of file test.cc.

Referenced by MustContinueOnFailure(), and Run().

TestSuiteVector ns3::TestRunnerImpl::m_suites
private

Definition at line 133 of file test.cc.

Referenced by AddTestSuite(), and FilterTests().

std::string ns3::TestRunnerImpl::m_tempDir
private

Definition at line 134 of file test.cc.

Referenced by GetTempDir(), and Run().

bool ns3::TestRunnerImpl::m_updateData
private

Definition at line 138 of file test.cc.

Referenced by MustUpdateData(), and Run().

bool ns3::TestRunnerImpl::m_verbose
private

Definition at line 135 of file test.cc.

Referenced by PrintReport(), and Run().


The documentation for this class was generated from the following file: