summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2021-01-11 17:39:43 +0100
committerGitHub <noreply@github.com>2021-01-11 17:39:43 +0100
commiteeb63b8901a9c049f1bb594abb9ce9b4a9c47620 (patch)
treeb07daae788f918b83eeb0bdbd51e49292f1c8d88 /tests
parentFixed switch-ups regarding some slab and stair recipes (#5099) (diff)
downloadcuberite-eeb63b8901a9c049f1bb594abb9ce9b4a9c47620.tar
cuberite-eeb63b8901a9c049f1bb594abb9ce9b4a9c47620.tar.gz
cuberite-eeb63b8901a9c049f1bb594abb9ce9b4a9c47620.tar.bz2
cuberite-eeb63b8901a9c049f1bb594abb9ce9b4a9c47620.tar.lz
cuberite-eeb63b8901a9c049f1bb594abb9ce9b4a9c47620.tar.xz
cuberite-eeb63b8901a9c049f1bb594abb9ce9b4a9c47620.tar.zst
cuberite-eeb63b8901a9c049f1bb594abb9ce9b4a9c47620.zip
Diffstat (limited to '')
-rw-r--r--tests/ByteBuffer/ByteBufferTest.cpp2
-rw-r--r--tests/Generating/CMakeLists.txt2
-rw-r--r--tests/LuaThreadStress/CMakeLists.txt2
-rw-r--r--tests/SchematicFileSerializer/CMakeLists.txt2
-rw-r--r--tests/SchematicFileSerializer/SchematicFileSerializerTest.cpp5
5 files changed, 6 insertions, 7 deletions
diff --git a/tests/ByteBuffer/ByteBufferTest.cpp b/tests/ByteBuffer/ByteBufferTest.cpp
index 7278c5f0f..9aecc2e3c 100644
--- a/tests/ByteBuffer/ByteBufferTest.cpp
+++ b/tests/ByteBuffer/ByteBufferTest.cpp
@@ -36,7 +36,7 @@ static void TestWrite(void)
buf.WriteVarInt32(5);
buf.WriteVarInt32(300);
buf.WriteVarInt32(0);
- AString All;
+ ContiguousByteBuffer All;
buf.ReadAll(All);
TEST_EQUAL(All.size(), 4);
TEST_EQUAL(memcmp(All.data(), "\x05\xac\x02\x00", All.size()), 0);
diff --git a/tests/Generating/CMakeLists.txt b/tests/Generating/CMakeLists.txt
index ac8a9be42..207b71e1a 100644
--- a/tests/Generating/CMakeLists.txt
+++ b/tests/Generating/CMakeLists.txt
@@ -158,7 +158,7 @@ add_library(GeneratorTestingSupport STATIC
${GENERATING_HDRS}
${STUBS}
)
-target_link_libraries(GeneratorTestingSupport tolualib zlib fmt::fmt jsoncpp_lib)
+target_link_libraries(GeneratorTestingSupport fmt::fmt jsoncpp_lib tolualib libdeflate)
source_group("Stubs" FILES ${STUBS})
source_group("Generating" FILES ${GENERATING_HDRS} ${GENERATING_SRCS})
diff --git a/tests/LuaThreadStress/CMakeLists.txt b/tests/LuaThreadStress/CMakeLists.txt
index 32ff4b32e..83bd8a0ca 100644
--- a/tests/LuaThreadStress/CMakeLists.txt
+++ b/tests/LuaThreadStress/CMakeLists.txt
@@ -78,7 +78,7 @@ source_group("Shared" FILES ${SHARED_SRCS} ${SHARED_HDRS})
source_group("Sources" FILES ${SRCS})
source_group("Lua files" FILES Test.lua)
add_executable(LuaThreadStress ${SRCS} ${SHARED_SRCS} ${SHARED_HDRS} Test.lua)
-target_link_libraries(LuaThreadStress tolualib zlib fmt::fmt Threads::Threads)
+target_link_libraries(LuaThreadStress fmt::fmt Threads::Threads tolualib libdeflate)
add_test(NAME LuaThreadStress-test WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND LuaThreadStress)
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());
}