diff options
author | HaoTNN <haotnn@gmail.com> | 2015-06-03 01:08:57 +0200 |
---|---|---|
committer | HaoTNN <haotnn@gmail.com> | 2015-06-03 01:08:57 +0200 |
commit | 3142598dee31acc23c738a1a728638665c8940b8 (patch) | |
tree | 2eb837ed785678d536d677ff5020fabca089f2e5 /tests | |
parent | Merge remote-tracking branch 'upstream/master' (diff) | |
parent | Merge pull request #2182 from birkett/master (diff) | |
download | cuberite-3142598dee31acc23c738a1a728638665c8940b8.tar cuberite-3142598dee31acc23c738a1a728638665c8940b8.tar.gz cuberite-3142598dee31acc23c738a1a728638665c8940b8.tar.bz2 cuberite-3142598dee31acc23c738a1a728638665c8940b8.tar.lz cuberite-3142598dee31acc23c738a1a728638665c8940b8.tar.xz cuberite-3142598dee31acc23c738a1a728638665c8940b8.tar.zst cuberite-3142598dee31acc23c738a1a728638665c8940b8.zip |
Diffstat (limited to '')
-rw-r--r-- | tests/ChunkData/CMakeLists.txt | 6 | ||||
-rw-r--r-- | tests/ChunkData/Coordinates.cpp | 12 | ||||
-rw-r--r-- | tests/Network/CMakeLists.txt | 8 |
3 files changed, 13 insertions, 13 deletions
diff --git a/tests/ChunkData/CMakeLists.txt b/tests/ChunkData/CMakeLists.txt index 381e11cc2..bd2d6d9b4 100644 --- a/tests/ChunkData/CMakeLists.txt +++ b/tests/ChunkData/CMakeLists.txt @@ -3,6 +3,12 @@ cmake_minimum_required (VERSION 2.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) add_library(ChunkBuffer ${CMAKE_SOURCE_DIR}/src/ChunkData.cpp ${CMAKE_SOURCE_DIR}/src/StringUtils.cpp) diff --git a/tests/ChunkData/Coordinates.cpp b/tests/ChunkData/Coordinates.cpp index b3c66dde5..de6686243 100644 --- a/tests/ChunkData/Coordinates.cpp +++ b/tests/ChunkData/Coordinates.cpp @@ -8,7 +8,7 @@ int main(int argc, char** argv) { class cMockAllocationPool : public cAllocationPool<cChunkData::sChunkSection> - { + { virtual cChunkData::sChunkSection * Allocate() { return new cChunkData::sChunkSection(); @@ -138,17 +138,7 @@ int main(int argc, char** argv) cChunkData buffer(Pool); buffer.SetBlock(0, 0, 0, 0x42); cChunkData copy(Pool); - #if __cplusplus < 201103L - copy = buffer; - #else copy = std::move(buffer); - #endif - testassert(copy.GetBlock(0, 0, 0) == 0x42); - #if __cplusplus < 201103L - copy = copy; - #else - copy = std::move(copy); - #endif testassert(copy.GetBlock(0, 0, 0) == 0x42); } diff --git a/tests/Network/CMakeLists.txt b/tests/Network/CMakeLists.txt index c0af50e2c..f93ccad8e 100644 --- a/tests/Network/CMakeLists.txt +++ b/tests/Network/CMakeLists.txt @@ -41,8 +41,12 @@ 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: |