PuzzleSDK
TestBase类 参考

#include <BaseTest.h>

+ 类 TestBase 继承关系图:
+ TestBase 的协作图:

Public 成员函数

virtual ~TestBase ()
 
void backsUpOneLevel ()
 
virtual void runThisTest ()
 
bool isTestList ()
 
ssize_t getChildTestCount ()
 
void setTestParent (TestBase *parent)
 
TestBasegetTestParent ()
 
void setTestName (const std::string &testName)
 
std::string getTestName () const
 

Protected 成员函数

 TestBase ()
 

Protected 属性

std::string _testName
 
TestBase_parentTest
 
bool _isTestList
 
std::vector< std::string > _childTestNames
 

详细描述

A TestBase object stores the following information about a test:

  • A pointer to the parent test(TestList or TestSuite).
  • Array of children test names.
  • A flag to indicate whether the test is a TestList object.
注解
You should not inherit from TestBase directly.

在文件 BaseTest.h123 行定义.

构造及析构函数说明

◆ ~TestBase()

TestBase::~TestBase ( )
virtual

在文件 BaseTest.cpp42 行定义.

43{
44
45}

◆ TestBase()

TestBase::TestBase ( )
protected

在文件 BaseTest.cpp35 行定义.

36: _parentTest(nullptr)
37, _isTestList(false)
38{
39
40}
TestBase * _parentTest
Definition: BaseTest.h:149
bool _isTestList
Definition: BaseTest.h:150

成员函数说明

◆ backsUpOneLevel()

void TestBase::backsUpOneLevel ( )

Backs up one level.

在文件 BaseTest.cpp47 行定义.

48{
49 if (_parentTest)
50 {
52 this->release();
53 }
54}
virtual void runThisTest()
Definition: BaseTest.h:131

引用了 _parentTest , 以及 runThisTest().

被这些函数引用 TestCase::onBackCallback() , 以及 TestList::runThisTest().

+ 函数调用图:
+ 这是这个函数的调用关系图:

◆ getChildTestCount()

ssize_t TestBase::getChildTestCount ( )
inline

在文件 BaseTest.h135 行定义.

135{ return _childTestNames.size(); }
std::vector< std::string > _childTestNames
Definition: BaseTest.h:151

引用了 _childTestNames.

被这些函数引用 TestCase::onEnter().

+ 这是这个函数的调用关系图:

◆ getTestName()

std::string TestBase::getTestName ( ) const
inline

在文件 BaseTest.h144 行定义.

144{ return _testName; }
std::string _testName
Definition: BaseTest.h:148

引用了 _testName.

被这些函数引用 TestController::traverseTestList() , 以及 TestController::traverseTestSuite().

+ 这是这个函数的调用关系图:

◆ getTestParent()

TestBase * TestBase::getTestParent ( )
inline

在文件 BaseTest.h141 行定义.

141{ return _parentTest; }

引用了 _parentTest.

◆ isTestList()

bool TestBase::isTestList ( )
inline

在文件 BaseTest.h133 行定义.

133{ return _isTestList; }

引用了 _isTestList.

◆ runThisTest()

virtual void TestBase::runThisTest ( )
inlinevirtual

TestSuite , 以及 TestList 重载.

在文件 BaseTest.h131 行定义.

131{}

被这些函数引用 backsUpOneLevel() , 以及 TestController::traverseTestList().

+ 这是这个函数的调用关系图:

◆ setTestName()

void TestBase::setTestName ( const std::string &  testName)
inline

在文件 BaseTest.h143 行定义.

143{ _testName = testName; }

引用了 _testName.

◆ setTestParent()

void TestBase::setTestParent ( TestBase parent)
inline

You should NEVER call this method.

在文件 BaseTest.h140 行定义.

140{ _parentTest = parent; }

引用了 _parentTest.

类成员变量说明

◆ _childTestNames

◆ _isTestList

bool TestBase::_isTestList
protected

在文件 BaseTest.h150 行定义.

被这些函数引用 isTestList() , 以及 TestList::TestList().

◆ _parentTest

◆ _testName

std::string TestBase::_testName
protected

在文件 BaseTest.h148 行定义.

被这些函数引用 getTestName() , 以及 setTestName().


该类的文档由以下文件生成: