ZeroErr
载入中...
搜索中...
未找到
zeroerr::TestCase结构体 参考

TestCase is a class that holds the test case information. There are several fields that are used to store the test case information. 更多...

#include <unittest.h>

类 zeroerr::TestCase 继承关系图:
zeroerr::TestCase 的协作图:

Public 成员函数

bool operator< (const TestCase &rhs) const
 Compare the test cases.
 
 TestCase (std::string name, std::string file, unsigned line, std::vector< Decorator * > decorators)
 Construct a new Test Case object
 
 TestCase (std::string name, std::string file, unsigned line, std::function< void(TestContext *)> func, std::vector< Decorator * > decorators)
 Construct a new Test Case object
 

Public 属性

std::string name
 
std::string file
 
unsigned line
 
std::function< void(TestContext *)> func
 
std::vector< TestCase * > subcases
 
std::vector< Decorator * > decorators
 

详细描述

TestCase is a class that holds the test case information. There are several fields that are used to store the test case information.

  • name : The name of the test case.
  • file : The file that the test case is defined.
  • line : The line that the test case is defined.
  • func : The function that will be run to test the test case.
  • subcases : The subcases that are defined in the test case.

构造及析构函数说明

◆ TestCase() [1/2]

zeroerr::TestCase::TestCase ( std::string  name,
std::string  file,
unsigned  line,
std::vector< Decorator * >  decorators 
)
inline

Construct a new Test Case object

参数
nameThe name of the test case.
fileThe file that the test case is defined.
lineThe line that the test case is defined.

◆ TestCase() [2/2]

zeroerr::TestCase::TestCase ( std::string  name,
std::string  file,
unsigned  line,
std::function< void(TestContext *)>  func,
std::vector< Decorator * >  decorators 
)
inline

Construct a new Test Case object

参数
nameThe name of the test case.
fileThe file that the test case is defined.
lineThe line that the test case is defined.
funcThe function that will be run to test the test case.
decoratorsThe decorators that will be used to decorate the test case.

成员函数说明

◆ operator<()

bool zeroerr::TestCase::operator< ( const TestCase rhs) const

Compare the test cases.

参数
rhsThe test case that will be compared.
返回
true If the test case is less than the rhs, otherwise false.

类成员变量说明

◆ decorators

std::vector<Decorator*> zeroerr::TestCase::decorators

◆ file

std::string zeroerr::TestCase::file

◆ func

std::function<void(TestContext*)> zeroerr::TestCase::func

◆ line

unsigned zeroerr::TestCase::line

◆ name

std::string zeroerr::TestCase::name

◆ subcases

std::vector<TestCase*> zeroerr::TestCase::subcases

该结构体的文档由以下文件生成: