Enable tests to get the name of the parent suite.

This commit is contained in:
Peter D. Barnes, Jr.
2014-01-23 11:45:36 -08:00
parent bbb25ddb08
commit 3a447bbcc0
2 changed files with 13 additions and 2 deletions

View File

@@ -256,6 +256,12 @@ TestCase::GetName (void) const
NS_LOG_FUNCTION (this);
return m_name;
}
TestCase *
TestCase::GetParent () const
{
return m_parent;
}
void
TestCase::ReportTestFailure (std::string cond, std::string actual,
std::string limit, std::string message,

View File

@@ -864,6 +864,11 @@ public:
*/
virtual ~TestCase ();
/**
* \return name of this test
*/
std::string GetName (void) const;
protected:
/**
* \param name the name of the new TestCase created
@@ -917,9 +922,9 @@ protected:
bool IsStatusSuccess (void) const;
/**
* \return name of this test
* \return a pointer to the parent of this test
*/
std::string GetName (void) const;
TestCase * GetParent () const;
// The methods below are used only by test macros and should not
// be used by normal users.