Minetest 5.9.0-dev
 
Loading...
Searching...
No Matches
TestBan Class Reference
+ Inheritance diagram for TestBan:
+ Collaboration diagram for TestBan:

Public Member Functions

 TestBan ()
 
const char * getName ()
 
void runTests (IGameDef *gamedef)
 
- Public Member Functions inherited from TestBase
bool testModule (IGameDef *gamedef)
 
std::string getTestTempDirectory ()
 
std::string getTestTempFile ()
 
virtual void runTests (IGameDef *gamedef)=0
 
virtual const char * getName ()=0
 
void runTest (const char *name, std::function< void()> &&test)
 

Private Member Functions

void testCreate ()
 
void testAdd ()
 
void testRemove ()
 
void testModificationFlag ()
 
void testGetBanName ()
 
void testGetBanDescription ()
 
void reinitTestEnv ()
 

Private Attributes

std::string m_testbm
 
std::string m_testbm2
 

Additional Inherited Members

- Public Attributes inherited from TestBase
u32 num_tests_failed
 
u32 num_tests_run
 

Constructor & Destructor Documentation

◆ TestBan()

TestBan::TestBan ( )
inline

References TestManager::registerTestModule().

+ Here is the call graph for this function:

Member Function Documentation

◆ getName()

const char * TestBan::getName ( )
inlinevirtual

Implements TestBase.

◆ reinitTestEnv()

void TestBan::reinitTestEnv ( )
private

References fs::DeleteSingleFileOrEmptyDirectory(), DIR_DELIM, TestBase::getTestTempDirectory(), m_testbm, and m_testbm2.

Referenced by runTests().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ runTests()

void TestBan::runTests ( IGameDef gamedef)
virtual

Implements TestBase.

References reinitTestEnv(), TEST, testAdd(), testCreate(), testGetBanDescription(), testGetBanName(), testModificationFlag(), and testRemove().

+ Here is the call graph for this function:

◆ testAdd()

void TestBan::testAdd ( )
private

References BanManager::add(), BanManager::getBanName(), m_testbm, and UASSERT.

Referenced by runTests().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ testCreate()

void TestBan::testCreate ( )
private

References m_testbm, m_testbm2, BanManager::save(), and UASSERT.

Referenced by runTests().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ testGetBanDescription()

void TestBan::testGetBanDescription ( )
private

References BanManager::add(), BanManager::getBanDescription(), m_testbm, and UASSERT.

Referenced by runTests().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ testGetBanName()

void TestBan::testGetBanName ( )
private

References BanManager::add(), BanManager::getBanName(), m_testbm, and UASSERT.

Referenced by runTests().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ testModificationFlag()

void TestBan::testModificationFlag ( )
private

References BanManager::add(), BanManager::isModified(), m_testbm, BanManager::remove(), BanManager::save(), and UASSERT.

Referenced by runTests().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ testRemove()

void TestBan::testRemove ( )
private

References BanManager::add(), BanManager::getBanName(), m_testbm, BanManager::remove(), and UASSERT.

Referenced by runTests().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_testbm

◆ m_testbm2

std::string TestBan::m_testbm2
private

Referenced by reinitTestEnv(), and testCreate().


The documentation for this class was generated from the following file: