1
0
cuberite-2a/tests/SchematicFileSerializer/SchematicFileSerializerTest.cpp
Tiger Wang eeb63b8901
zlib -> libdeflate (#5085)
+ Use libdeflate
+ Use std::byte
* Fix passing temporary to string_view
+ Emulate make_unique_for_overwrite
2021-01-11 16:39:43 +00:00

31 lines
612 B
C++

// SchematicFileSerializerTest.cpp
// Implements the SchematicFileSerializer test main entrypoint
#include "Globals.h"
#include "../TestHelpers.h"
#include "WorldStorage/SchematicFileSerializer.h"
static void DoTest(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);
const auto Schematic = cSchematicFileSerializer::SaveToSchematicString(ba);
cBlockArea ba2;
cSchematicFileSerializer::LoadFromSchematicString(ba2, Schematic.GetView());
}
IMPLEMENT_TEST_MAIN("SchematicFileSerializer",
DoTest();
)