Minetest  5.4.0
TestBase Class Referenceabstract

#include <test.h>

+ Inheritance diagram for TestBase:
+ Collaboration diagram for TestBase:

Public Member Functions

bool testModule (IGameDef *gamedef)
 
std::string getTestTempDirectory ()
 
std::string getTestTempFile ()
 
virtual void runTests (IGameDef *gamedef)=0
 
virtual const char * getName ()=0
 

Public Attributes

u32 num_tests_failed
 
u32 num_tests_run
 

Private Attributes

std::string m_test_dir
 

Member Function Documentation

◆ getName()

◆ getTestTempDirectory()

std::string TestBase::getTestTempDirectory ( )

References fs::CreateDir(), DIR_DELIM, m_test_dir, porting::mt_snprintf(), myrand(), and fs::TempPath().

Referenced by getTestTempFile(), TestAuthDatabase::runTests(), and TestMapSettingsManager::testMapMetaSaveLoad().

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

◆ getTestTempFile()

std::string TestBase::getTestTempFile ( )

References DIR_DELIM, getTestTempDirectory(), porting::mt_snprintf(), and myrand().

Referenced by TestMapSettingsManager::makeMetaFile(), and TestSchematic::testFileSerializeDeserialize().

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

◆ runTests()

◆ testModule()

bool TestBase::testModule ( IGameDef gamedef)

References getName(), porting::getTimeMs(), m_test_dir, num_tests_failed, num_tests_run, rawstream, fs::RecursiveDelete(), and runTests().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_test_dir

std::string TestBase::m_test_dir
private

Referenced by getTestTempDirectory(), and testModule().

◆ num_tests_failed

u32 TestBase::num_tests_failed

Referenced by testModule().

◆ num_tests_run

u32 TestBase::num_tests_run

Referenced by testModule().


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