Protected Member Functions |
| TestCase (std::string name) |
void | AddTestCase (TestCase *testCase) |
| Add an individual test case to this test suite.
|
void | SetDataDir (std::string directory) |
bool | GetErrorStatus (void) const NS_DEPRECATED |
bool | IsStatusFailure (void) const |
bool | IsStatusSuccess (void) const |
void | ReportTestFailure (std::string cond, std::string actual, std::string limit, std::string message, std::string file, int32_t line) |
bool | MustAssertOnFailure (void) const |
bool | MustContinueOnFailure (void) const |
std::string | CreateDataDirFilename (std::string filename) |
std::string | CreateTempDirFilename (std::string filename) |
encapsulates test code
To allow a new test to be run within the ns-3 test framework, users need to create subclasses of this base class, override the DoRun method, and use the NS_TEST_* macros within DoRun.
void ns3::TestCase::SetDataDir |
( |
std::string |
directory | ) |
|
|
protected |
- Parameters:
-
directory | the directory where the test data is located |
In general, this method is invoked as SetDataDir (NS_TEST_SOURCEDIR); However, if a module contains a test directory with subdirectories (e.g. src/mesh/test), and the test data (e.g. pcap traces) is located in one of these subdirectories, then the variable NS_TEST_SOURCEDIR may not work and the user may want to explicitly pass in a directory string.
Note that NS_TEST_SOURCEDIR is set in src/wscript for each module