Luanti 5.16.0-dev
Loading...
Searching...
No Matches
TestMapDatabase Class Reference
Inheritance diagram for TestMapDatabase:
Collaboration diagram for TestMapDatabase:

Public Member Functions

 TestMapDatabase ()
const char * getName ()
void runTests (IGameDef *gamedef)
void runTestsForCurrentDB ()
void testSave ()
void testLoad ()
void testList (int expect)
void testRemove ()
void testPositionEncoding ()
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)

Private Attributes

MapDatabaseProvider * provider = nullptr
std::string test_data

Additional Inherited Members

Public Attributes inherited from TestBase
u32 num_tests_failed
u32 num_tests_run

Constructor & Destructor Documentation

◆ TestMapDatabase()

TestMapDatabase::TestMapDatabase ( )
inline

References TestManager::registerTestModule().

Here is the call graph for this function:

Member Function Documentation

◆ getName()

const char * TestMapDatabase::getName ( )
inlinevirtual

Implements TestBase.

◆ runTests()

void TestMapDatabase::runTests ( IGameDef * gamedef)
virtual

Implements TestBase.

References TestBase::getTestTempDirectory(), provider, rawstream, runTestsForCurrentDB(), sanity_check, TEST, test_data, and testPositionEncoding().

Here is the call graph for this function:

◆ runTestsForCurrentDB()

void TestMapDatabase::runTestsForCurrentDB ( )

References TEST, testList(), testLoad(), testRemove(), and testSave().

Referenced by runTests().

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

◆ testList()

void TestMapDatabase::testList ( int expect)

References provider, UASSERT, and UASSERTEQ.

Referenced by runTestsForCurrentDB().

Here is the caller graph for this function:

◆ testLoad()

void TestMapDatabase::testLoad ( )

References p(), provider, test_data, and UASSERT.

Referenced by runTestsForCurrentDB().

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

◆ testPositionEncoding()

void TestMapDatabase::testPositionEncoding ( )

References UASSERT, and UASSERTEQ.

Referenced by runTests().

Here is the caller graph for this function:

◆ testRemove()

void TestMapDatabase::testRemove ( )

References provider, and UASSERT.

Referenced by runTestsForCurrentDB().

Here is the caller graph for this function:

◆ testSave()

void TestMapDatabase::testSave ( )

References provider, test_data, and UASSERT.

Referenced by runTestsForCurrentDB().

Here is the caller graph for this function:

Member Data Documentation

◆ provider

MapDatabaseProvider* TestMapDatabase::provider = nullptr
private

◆ test_data

std::string TestMapDatabase::test_data
private

Referenced by runTests(), testLoad(), and testSave().


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