diff options
Diffstat (limited to '')
-rw-r--r-- | tests/SchematicFileSerializer/CMakeLists.txt | 2 | ||||
-rw-r--r-- | tests/SchematicFileSerializer/SchematicFileSerializerTest.cpp | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/tests/SchematicFileSerializer/CMakeLists.txt b/tests/SchematicFileSerializer/CMakeLists.txt index d05d06a02..033002f6b 100644 --- a/tests/SchematicFileSerializer/CMakeLists.txt +++ b/tests/SchematicFileSerializer/CMakeLists.txt @@ -69,7 +69,7 @@ endif() source_group("Shared" FILES ${SHARED_SRCS} ${SHARED_HDRS}) source_group("Sources" FILES ${SRCS}) add_executable(SchematicFileSerializer-exe ${SRCS} ${SHARED_SRCS} ${SHARED_HDRS}) -target_link_libraries(SchematicFileSerializer-exe zlib fmt::fmt) +target_link_libraries(SchematicFileSerializer-exe fmt::fmt libdeflate) add_test(NAME SchematicFileSerializer-test WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND SchematicFileSerializer-exe) diff --git a/tests/SchematicFileSerializer/SchematicFileSerializerTest.cpp b/tests/SchematicFileSerializer/SchematicFileSerializerTest.cpp index f4db9852c..0e1232ec6 100644 --- a/tests/SchematicFileSerializer/SchematicFileSerializerTest.cpp +++ b/tests/SchematicFileSerializer/SchematicFileSerializerTest.cpp @@ -16,10 +16,9 @@ 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; - TEST_TRUE(cSchematicFileSerializer::SaveToSchematicString(ba, Schematic)); + const auto Schematic = cSchematicFileSerializer::SaveToSchematicString(ba); cBlockArea ba2; - TEST_TRUE(cSchematicFileSerializer::LoadFromSchematicString(ba2, Schematic)); + cSchematicFileSerializer::LoadFromSchematicString(ba2, Schematic.GetView()); } |