SelfTests: Moved SchematicFileSerializer test into a separate project.
This commit is contained in:
@@ -9,42 +9,6 @@
|
||||
#include "FastNBT.h"
|
||||
#include "SchematicFileSerializer.h"
|
||||
#include "../StringCompression.h"
|
||||
#include "../SelfTests.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef SELF_TEST
|
||||
|
||||
static class cSchematicStringSelfTest
|
||||
{
|
||||
public:
|
||||
cSchematicStringSelfTest(void)
|
||||
{
|
||||
cSelfTests::Get().Register(cSelfTests::SelfTestFunction(&Test), "Schematic-to-string serialization");
|
||||
}
|
||||
|
||||
static void Test(void)
|
||||
{
|
||||
cBlockArea ba;
|
||||
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!");
|
||||
}
|
||||
cBlockArea ba2;
|
||||
if (!cSchematicFileSerializer::LoadFromSchematicString(ba2, Schematic))
|
||||
{
|
||||
assert_test(!"Schematic failed to load!");
|
||||
}
|
||||
}
|
||||
} g_SelfTest;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user