Improved testing framework. (#4376)
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
// Implements the SchematicFileSerializer test main entrypoint
|
||||
|
||||
#include "Globals.h"
|
||||
#include "../TestHelpers.h"
|
||||
#include "WorldStorage/SchematicFileSerializer.h"
|
||||
|
||||
|
||||
@@ -16,28 +17,15 @@ static void DoTest(void)
|
||||
ba.Create(21, 256, 21);
|
||||
ba.RelLine(0, 0, 0, 9, 8, 7, cBlockArea::baTypes | cBlockArea::baMetas, E_BLOCK_WOODEN_STAIRS, 1);
|
||||
AString Schematic;
|
||||
if (!cSchematicFileSerializer::SaveToSchematicString(ba, Schematic))
|
||||
{
|
||||
assert_test(!"Schematic failed to save!");
|
||||
}
|
||||
TEST_TRUE(cSchematicFileSerializer::SaveToSchematicString(ba, Schematic));
|
||||
cBlockArea ba2;
|
||||
if (!cSchematicFileSerializer::LoadFromSchematicString(ba2, Schematic))
|
||||
{
|
||||
assert_test(!"Schematic failed to load!");
|
||||
}
|
||||
TEST_TRUE(cSchematicFileSerializer::LoadFromSchematicString(ba2, Schematic));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int main(int argc, char * argv[])
|
||||
{
|
||||
IMPLEMENT_TEST_MAIN("SchematicFileSerializer",
|
||||
DoTest();
|
||||
LOG("SchematicFileSerializer test done.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user