Skip to content

Commit

Permalink
Gen: Moved tests to a separate folder, unified shared sources.
Browse files Browse the repository at this point in the history
  • Loading branch information
madmaxoft committed May 4, 2017
1 parent 187abe3 commit 96fdd72
Show file tree
Hide file tree
Showing 14 changed files with 27 additions and 337 deletions.
3 changes: 1 addition & 2 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ add_subdirectory(ByteBuffer)
add_subdirectory(ChunkData)
add_subdirectory(CompositeChat)
add_subdirectory(FastRandom)
add_subdirectory(Generating)
add_subdirectory(HTTP)
add_subdirectory(LoadablePieces)
add_subdirectory(LuaThreadStress)
add_subdirectory(Network)
add_subdirectory(OSSupport)
add_subdirectory(PieceRotation)
add_subdirectory(SchematicFileSerializer)
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ set (SHARED_HDRS
${CMAKE_SOURCE_DIR}/src/WorldStorage/SchematicFileSerializer.h
)

set (SRCS
PieceRotationTest.cpp
set (STUBS
Stubs.cpp
LuaState_Typedefs.inc
LuaState_Declaration.inc
Expand All @@ -86,17 +85,37 @@ if (MSVC)
list (APPEND SHARED_HDRS ${CMAKE_SOURCE_DIR}/src/LeakFinder.h ${CMAKE_SOURCE_DIR}/src/StackWalker.h)
endif()

source_group("Shared" FILES ${SHARED_SRCS} ${SHARED_HDRS})
source_group("Sources" FILES ${SRCS})
add_executable(PieceRotation ${SRCS} ${SHARED_SRCS} ${SHARED_HDRS})
target_link_libraries(PieceRotation tolualib zlib)
add_library(GeneratorTestingSupport STATIC ${SHARED_SRCS} ${SHARED_HDRS} ${STUBS})
target_link_libraries(GeneratorTestingSupport tolualib zlib)
source_group("Stubs" FILES ${STUBS})





# LoadablePieces test:
source_group("Data files" FILES Test.cubeset Test1.schematic)
add_executable(LoadablePieces LoadablePieces.cpp Test.cubeset Test1.schematic)
target_link_libraries(LoadablePieces GeneratorTestingSupport)
add_test(NAME LoadablePieces-test WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND LoadablePieces)





# PieceRotation test:
add_executable(PieceRotation PieceRotationTest.cpp)
target_link_libraries(PieceRotation GeneratorTestingSupport)
add_test(NAME PieceRotation-test WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND PieceRotation)





# Put the projects into solution folders (MSVC):
set_target_properties(
GeneratorTestingSupport
LoadablePieces
PieceRotation
PROPERTIES FOLDER Tests
PROPERTIES FOLDER Tests/Generating
)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
15 changes: 0 additions & 15 deletions tests/PieceRotation/Bindings.h

This file was deleted.

4 changes: 0 additions & 4 deletions tests/PieceRotation/LuaState_Declaration.inc

This file was deleted.

19 changes: 0 additions & 19 deletions tests/PieceRotation/LuaState_Typedefs.inc

This file was deleted.

290 changes: 0 additions & 290 deletions tests/PieceRotation/Stubs.cpp

This file was deleted.

0 comments on commit 96fdd72

Please sign in to comment.