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 |
|
inline |
|
inlinevirtual |
Implements TestBase.
|
virtual |
Implements TestBase.
References SER_FMT_VER_HIGHEST_WRITE, TEST, testLoad20(), testLoad29(), testLoadNonStd(), testSave29(), testSaveLoad(), and testSaveLoadLowest().
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().
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().
void TestMapBlock::testLoadNonStd | ( | IGameDef * | gamedef | ) |
References coded_mapblock_nonstd, MapBlock::deSerialize(), IGameDef::getNodeDefManager(), MAP_BLOCKSIZE, readU8(), UASSERT, and UASSERTEQ.
Referenced by runTests().
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().
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().
|
inline |
References SER_FMT_VER_LOWEST_WRITE, and testSaveLoad().
Referenced by runTests().