diff --git a/src/core/model/test.cc b/src/core/model/test.cc index b8ae8e95d..6e90544ea 100644 --- a/src/core/model/test.cc +++ b/src/core/model/test.cc @@ -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, diff --git a/src/core/model/test.h b/src/core/model/test.h index ee30513d8..a10b1a268 100644 --- a/src/core/model/test.h +++ b/src/core/model/test.h @@ -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.