Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
TestObjDef Class Reference
+ Inheritance diagram for TestObjDef:
+ Collaboration diagram for TestObjDef:

Public Member Functions

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

Additional Inherited Members

- Public Attributes inherited from TestBase
u32 num_tests_failed
 
u32 num_tests_run
 

Constructor & Destructor Documentation

◆ TestObjDef()

TestObjDef::TestObjDef ( )
inline

References TestManager::registerTestModule().

+ Here is the call graph for this function:

Member Function Documentation

◆ getName()

const char * TestObjDef::getName ( )
inlinevirtual

Implements TestBase.

◆ runTests()

void TestObjDef::runTests ( IGameDef * gamedef)
virtual

Implements TestBase.

References TEST, testAddGetSetClear(), testClone(), and testHandles().

+ Here is the call graph for this function:

◆ testAddGetSetClear()

void TestObjDef::testAddGetSetClear ( )

References ObjDefManager::add(), ObjDefManager::clear(), ObjDefManager::get(), ObjDefManager::getByName(), ObjDefManager::getNumObjects(), ObjDefManager::getType(), ObjDef::index, ObjDef::name, OBJDEF_GENERIC, OBJDEF_INVALID_HANDLE, ObjDefManager::set(), UASSERT, and UASSERTEQ.

Referenced by runTests().

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

◆ testClone()

void TestObjDef::testClone ( )

References ObjDefManager::add(), ObjDefManager::clear(), MyObjDefManager::clone(), ObjDefManager::get(), ObjDefManager::getNumObjects(), ObjDefManager::getRaw(), ObjDefManager::getType(), OBJDEF_GENERIC, OBJDEF_INVALID_HANDLE, MyObjDef::testvalue, UASSERT, and UASSERTEQ.

Referenced by runTests().

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

◆ testHandles()

void TestObjDef::testHandles ( )

References ObjDefManager::createHandle(), ObjDefManager::decodeHandle(), OBJDEF_GENERIC, OBJDEF_ORE, UASSERT, and UASSERTEQ.

Referenced by runTests().

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

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