blob: fc18daf936e75f712463a40016f57d56ae9ca247 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
// SchematicFileSerializerTest.cpp
// Implements the SchematicFileSerializer test main entrypoint
#include "Globals.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);
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!");
}
}
int main(int argc, char * argv[])
{
DoTest();
LOG("SchematicFileSerializer test done.");
return 0;
}
|