summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2016-08-24 21:45:03 +0200
committerMattes D <github@xoft.cz>2016-08-24 22:26:53 +0200
commitd2e8643607424cd74616e2e863f5609e7b8458a5 (patch)
treed5afab6035ca6bb0b58fd03ad5cfe3b3f8e1da55 /tests
parentMerge pull request #3342 from cuberite/FixEmptyHeader (diff)
downloadcuberite-d2e8643607424cd74616e2e863f5609e7b8458a5.tar
cuberite-d2e8643607424cd74616e2e863f5609e7b8458a5.tar.gz
cuberite-d2e8643607424cd74616e2e863f5609e7b8458a5.tar.bz2
cuberite-d2e8643607424cd74616e2e863f5609e7b8458a5.tar.lz
cuberite-d2e8643607424cd74616e2e863f5609e7b8458a5.tar.xz
cuberite-d2e8643607424cd74616e2e863f5609e7b8458a5.tar.zst
cuberite-d2e8643607424cd74616e2e863f5609e7b8458a5.zip
Diffstat (limited to 'tests')
-rw-r--r--tests/BoundingBox/BoundingBoxTest.cpp2
-rw-r--r--tests/BoundingBox/CMakeLists.txt4
-rw-r--r--tests/ChunkData/CMakeLists.txt5
-rw-r--r--tests/ChunkData/CopyBlocks.cpp2
-rw-r--r--tests/HTTP/CMakeLists.txt7
-rw-r--r--tests/LoadablePieces/CMakeLists.txt3
-rw-r--r--tests/Network/CMakeLists.txt13
-rw-r--r--tests/SchematicFileSerializer/CMakeLists.txt4
8 files changed, 11 insertions, 29 deletions
diff --git a/tests/BoundingBox/BoundingBoxTest.cpp b/tests/BoundingBox/BoundingBoxTest.cpp
index 988a2181e..b27641df2 100644
--- a/tests/BoundingBox/BoundingBoxTest.cpp
+++ b/tests/BoundingBox/BoundingBoxTest.cpp
@@ -46,7 +46,7 @@ static int Test(void)
}
if (res)
{
- if (LineCoeff != LineCoeffs[i])
+ if (std::abs(LineCoeff - LineCoeffs[i]) > 0.0000001)
{
LOGERROR("LineIntersection({%.02f, %.02f, %.02f}, {%.02f, %.02f, %.02f}) -> %d, %.05f, %d",
Line1.x, Line1.y, Line1.z,
diff --git a/tests/BoundingBox/CMakeLists.txt b/tests/BoundingBox/CMakeLists.txt
index 10a4164dc..f2dd42ee9 100644
--- a/tests/BoundingBox/CMakeLists.txt
+++ b/tests/BoundingBox/CMakeLists.txt
@@ -25,10 +25,6 @@ if (MSVC)
list (APPEND SHARED_HDRS ${CMAKE_SOURCE_DIR}/src/LeakFinder.h ${CMAKE_SOURCE_DIR}/src/StackWalker.h)
endif()
-if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
- add_flags_cxx("-Wno-error=float-equal")
-endif()
-
source_group("Shared" FILES ${SHARED_SRCS} ${SHARED_HDRS})
source_group("Sources" FILES ${SRCS})
add_executable(BoundingBox-exe ${SRCS} ${SHARED_SRCS} ${SHARED_HDRS})
diff --git a/tests/ChunkData/CMakeLists.txt b/tests/ChunkData/CMakeLists.txt
index 9fdcd4650..61cb8e7c6 100644
--- a/tests/ChunkData/CMakeLists.txt
+++ b/tests/ChunkData/CMakeLists.txt
@@ -1,11 +1,6 @@
enable_testing()
include_directories(${CMAKE_SOURCE_DIR}/src/)
-if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
- add_flags_cxx("-Wno-error=old-style-cast")
- set_source_files_properties(${CMAKE_SOURCE_DIR}/src/ChunkData.cpp PROPERTIES COMPILE_FLAGS "-Wno-error=sign-conversion")
- set_source_files_properties(${CMAKE_SOURCE_DIR}/src/StringUtils.cpp PROPERTIES COMPILE_FLAGS "-Wno-error=conversion")
-endif()
add_definitions(-DTEST_GLOBALS=1)
diff --git a/tests/ChunkData/CopyBlocks.cpp b/tests/ChunkData/CopyBlocks.cpp
index b76b2d420..8253ac2ec 100644
--- a/tests/ChunkData/CopyBlocks.cpp
+++ b/tests/ChunkData/CopyBlocks.cpp
@@ -51,7 +51,7 @@ int main(int argc, char ** argv)
{
if (idx / 500 != LastReportedStep)
{
- printf("Testing index %u...\n", (unsigned)idx);
+ printf("Testing index %u...\n", static_cast<unsigned>(idx));
LastReportedStep = idx / 500;
}
diff --git a/tests/HTTP/CMakeLists.txt b/tests/HTTP/CMakeLists.txt
index 04e82caf9..5529ed082 100644
--- a/tests/HTTP/CMakeLists.txt
+++ b/tests/HTTP/CMakeLists.txt
@@ -1,8 +1,8 @@
enable_testing()
include_directories(${CMAKE_SOURCE_DIR}/src/)
-include_directories(${CMAKE_SOURCE_DIR}/lib/libevent/include)
-include_directories(${CMAKE_SOURCE_DIR}/lib/polarssl/include)
+include_directories(SYSTEM ${CMAKE_SOURCE_DIR}/lib/libevent/include)
+include_directories(SYSTEM ${CMAKE_SOURCE_DIR}/lib/polarssl/include)
add_definitions(-DTEST_GLOBALS=1)
@@ -37,9 +37,6 @@ add_library(HTTP
)
target_link_libraries(HTTP Network OSSupport)
-if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
- add_flags_cxx("-Wno-error=conversion -Wno-error=old-style-cast")
-endif()
diff --git a/tests/LoadablePieces/CMakeLists.txt b/tests/LoadablePieces/CMakeLists.txt
index cebcaba02..6e385846f 100644
--- a/tests/LoadablePieces/CMakeLists.txt
+++ b/tests/LoadablePieces/CMakeLists.txt
@@ -1,7 +1,7 @@
enable_testing()
include_directories(${CMAKE_SOURCE_DIR}/src/)
-include_directories(${CMAKE_SOURCE_DIR}/lib/)
+include_directories(SYSTEM ${CMAKE_SOURCE_DIR}/lib/)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
add_definitions(-DTEST_GLOBALS=1)
@@ -75,7 +75,6 @@ set (SRCS
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
- add_flags_cxx("-Wno-error=conversion -Wno-error=old-style-cast")
add_flags_cxx("-Wno-error=global-constructors")
add_flags_cxx("-Wno-error=switch-enum")
endif()
diff --git a/tests/Network/CMakeLists.txt b/tests/Network/CMakeLists.txt
index c6c76385e..f3496d276 100644
--- a/tests/Network/CMakeLists.txt
+++ b/tests/Network/CMakeLists.txt
@@ -1,8 +1,8 @@
enable_testing()
include_directories(${CMAKE_SOURCE_DIR}/src/)
-include_directories(${CMAKE_SOURCE_DIR}/lib/libevent/include)
-include_directories(${CMAKE_SOURCE_DIR}/lib/polarssl/include)
+include_directories(SYSTEM ${CMAKE_SOURCE_DIR}/lib/libevent/include)
+include_directories(SYSTEM ${CMAKE_SOURCE_DIR}/lib/polarssl/include)
add_definitions(-DTEST_GLOBALS=1)
@@ -51,12 +51,9 @@ if (MSVC)
target_link_libraries(Network ws2_32.lib)
endif()
-if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
- add_flags_cxx("-Wno-error=conversion -Wno-error=old-style-cast")
- if ("${CLANG_VERSION}" VERSION_GREATER 3.5)
- add_flags_cxx("-Wno-error=inconsistent-missing-override")
- endif()
-endif()
+
+
+
# Define individual tests:
diff --git a/tests/SchematicFileSerializer/CMakeLists.txt b/tests/SchematicFileSerializer/CMakeLists.txt
index 4694421fc..792349a9d 100644
--- a/tests/SchematicFileSerializer/CMakeLists.txt
+++ b/tests/SchematicFileSerializer/CMakeLists.txt
@@ -1,7 +1,7 @@
enable_testing()
include_directories(${CMAKE_SOURCE_DIR}/src/)
-include_directories(${CMAKE_SOURCE_DIR}/lib/)
+include_directories(SYSTEM ${CMAKE_SOURCE_DIR}/lib/)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
add_definitions(-DTEST_GLOBALS=1)
@@ -63,9 +63,7 @@ set (SRCS
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
- add_flags_cxx("-Wno-error=conversion -Wno-error=old-style-cast")
add_flags_cxx("-Wno-error=global-constructors")
- add_flags_cxx("-Wno-error=switch-enum")
endif()