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

Public Member Functions

 TestMapBlock ()
 
const char * getName ()
 
void runTests (IGameDef *gamedef)
 
void testSaveLoad (IGameDef *gamedef, u8 ver)
 
void testSaveLoadLowest (IGameDef *gamedef)
 
void testSave29 (IGameDef *gamedef)
 
void testLoad29 (IGameDef *gamedef)
 
void testLoad20 (IGameDef *gamedef)
 
void testLoadNonStd (IGameDef *gamedef)
 
- 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

◆ TestMapBlock()

TestMapBlock::TestMapBlock ( )
inline

References TestManager::registerTestModule().

+ Here is the call graph for this function:

Member Function Documentation

◆ getName()

const char * TestMapBlock::getName ( )
inlinevirtual

Implements TestBase.

◆ runTests()

void TestMapBlock::runTests ( IGameDef * gamedef)
virtual

Implements TestBase.

References SER_FMT_VER_HIGHEST_WRITE, TEST, testLoad20(), testLoad29(), testLoadNonStd(), testSave29(), testSaveLoad(), and testSaveLoadLowest().

+ Here is the call graph for this function:

◆ testLoad20()

void TestMapBlock::testLoad20 ( IGameDef * gamedef)

References IGameDef::allocateUnknownNodeId(), coded_mapblock20, CONTENT_IGNORE, MapBlock::deSerialize(), IGameDef::getNodeDefManager(), MAP_BLOCKSIZE, MapBlock::nodecount, readU8(), UASSERT, and UASSERTEQ.

Referenced by runTests().

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

◆ testLoad29()

void TestMapBlock::testLoad29 ( IGameDef * gamedef)

References coded_mapblock29, CONTENT_IGNORE, MapBlock::deSerialize(), IGameDef::getNodeDefManager(), MAP_BLOCKSIZE, p(), readU8(), t_CONTENT_BRICK, UASSERT, and UASSERTEQ.

Referenced by runTests().

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

◆ testLoadNonStd()

void TestMapBlock::testLoadNonStd ( IGameDef * gamedef)

References coded_mapblock_nonstd, MapBlock::deSerialize(), IGameDef::getNodeDefManager(), MAP_BLOCKSIZE, readU8(), UASSERT, and UASSERTEQ.

Referenced by runTests().

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

◆ testSave29()

void TestMapBlock::testSave29 ( IGameDef * gamedef)

References CONTENT_AIR, decompressZstd(), deSerializeString16(), MapBlock::getData(), IGameDef::getNodeDefManager(), MapBlock::nodecount, readU16(), readU8(), SS2_CHECK, t_CONTENT_STONE, UASSERT, and UASSERTEQ.

Referenced by runTests().

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

◆ testSaveLoad()

void TestMapBlock::testSaveLoad ( IGameDef * gamedef,
u8 ver )

References CONTENT_UNKNOWN, MapBlock::deSerialize(), NodeDefManager::get(), IGameDef::getNodeDefManager(), ContentFeatures::name, PcgRandom::next(), MapBlock::nodecount, and UASSERT.

Referenced by runTests(), and testSaveLoadLowest().

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

◆ testSaveLoadLowest()

void TestMapBlock::testSaveLoadLowest ( IGameDef * gamedef)
inline

References SER_FMT_VER_LOWEST_WRITE, and testSaveLoad().

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: