diff --git a/CMakeLists.txt b/CMakeLists.txt index ef0ef5dbdb..ae260cfc2d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -368,11 +368,11 @@ install(FILES ${DOC_FILES} DESTINATION share/doc/${PROJECT}) file(GLOB_RECURSE ORCT2_RIDE_SOURCES "src/ride/*/*.c") file(GLOB_RECURSE ORCT2_RIDE_DEP_SOURCES "src/ride/ride_data.c" "src/ride/track_data.c" "src/ride/track_paint.c" "src/addresses.c" "src/diagnostic.c" "src/hook.c" "src/paint/map_element/map_element.c") -file(GLOB_RECURSE ORCT2_PAINT_TEST_SOURCES "PaintTest/*.c" "PaintTest/*.cpp" "PaintTest/*.h") +file(GLOB_RECURSE ORCT2_PAINT_TEST_SOURCES "test/testpaint/*.c" "test/testpaint/*.cpp" "test/testpaint/*.h") -add_executable(test-paint EXCLUDE_FROM_ALL ${ORCT2_RIDE_SOURCES} ${ORCT2_RIDE_DEP_SOURCES} ${ORCT2_PAINT_TEST_SOURCES}) -set_target_properties(test-paint PROPERTIES COMPILE_FLAGS "-DNO_VEHICLES") -add_dependencies(test-paint segfiles) +add_executable(testpaint EXCLUDE_FROM_ALL ${ORCT2_RIDE_SOURCES} ${ORCT2_RIDE_DEP_SOURCES} ${ORCT2_PAINT_TEST_SOURCES}) +set_target_properties(testpaint PROPERTIES COMPILE_FLAGS "-DNO_VEHICLES") +add_dependencies(testpaint segfiles) set(CPACK_PACKAGE_VERSION_MAJOR 0) set(CPACK_PACKAGE_VERSION_MINOR 0) diff --git a/OpenRCT2.xcodeproj/project.pbxproj b/OpenRCT2.xcodeproj/project.pbxproj index fe50264b7b..f0c3d7dd73 100644 --- a/OpenRCT2.xcodeproj/project.pbxproj +++ b/OpenRCT2.xcodeproj/project.pbxproj @@ -1151,7 +1151,15 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - C64FDA5E1D6D99F400F259B9 /* PaintTest */ = { + 8546F74A1D7E1D220004004C /* Tests */ = { + isa = PBXGroup; + children = ( + C64FDA5E1D6D99F400F259B9 /* Paint */, + ); + name = Tests; + sourceTree = ""; + }; + C64FDA5E1D6D99F400F259B9 /* Paint */ = { isa = PBXGroup; children = ( C64FDAC41D6DA55E00F259B9 /* compat.c */, @@ -1161,7 +1169,8 @@ 85AFA2101D7DB83E00221B42 /* intercept.h */, 85AFA20F1D7DB83E00221B42 /* main.cpp */, ); - path = PaintTest; + name = Paint; + path = test/testpaint; sourceTree = ""; }; C650B2141CCABBDD00B4D91C /* rct1 */ = { @@ -2062,8 +2071,8 @@ children = ( D41B72431C21015A0080A7B9 /* Sources */, D497D07A1C20FD52002BF46A /* Resources */, + 8546F74A1D7E1D220004004C /* Tests */, D41B73ED1C21017D0080A7B9 /* Libraries */, - C64FDA5E1D6D99F400F259B9 /* PaintTest */, D497D0791C20FD52002BF46A /* Products */, ); sourceTree = ""; diff --git a/PaintUnitTest.vcxproj b/PaintUnitTest.vcxproj index 634ec535b1..7355d87bb7 100644 --- a/PaintUnitTest.vcxproj +++ b/PaintUnitTest.vcxproj @@ -117,14 +117,14 @@ - - + + - - - - + + + + diff --git a/PaintTest/compat.c b/test/testpaint/compat.c similarity index 93% rename from PaintTest/compat.c rename to test/testpaint/compat.c index beb511f8f5..c8b7bb015c 100644 --- a/PaintTest/compat.c +++ b/test/testpaint/compat.c @@ -14,14 +14,14 @@ *****************************************************************************/ #pragma endregion -#include "../src/config.h" -#include "../src/object.h" -#include "../src/interface/colour.h" -#include "../src/interface/viewport.h" -#include "../src/ride/ride.h" -#include "../src/ride/track.h" -#include "../src/world/sprite.h" -#include "../src/paint/map_element/map_element.h" +#include "../../src/config.h" +#include "../../src/object.h" +#include "../../src/interface/colour.h" +#include "../../src/interface/viewport.h" +#include "../../src/ride/ride.h" +#include "../../src/ride/track.h" +#include "../../src/world/sprite.h" +#include "../../src/paint/map_element/map_element.h" #define gRideEntries RCT2_ADDRESS(RCT2_ADDRESS_RIDE_ENTRIES, rct_ride_entry*) #define gCurrentRotation RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_ROTATION, uint8) diff --git a/PaintTest/data.c b/test/testpaint/data.c similarity index 99% rename from PaintTest/data.c rename to test/testpaint/data.c index 09c69abdd7..39b98da4a8 100644 --- a/PaintTest/data.c +++ b/test/testpaint/data.c @@ -14,7 +14,7 @@ *****************************************************************************/ #pragma endregion -#include "../src/common.h" +#include "../../src/common.h" const utf8string RideNames[91] = { "SpiralRollerCoaster", diff --git a/PaintTest/data.h b/test/testpaint/data.h similarity index 97% rename from PaintTest/data.h rename to test/testpaint/data.h index 6e6b55dd58..9e685786ed 100644 --- a/PaintTest/data.h +++ b/test/testpaint/data.h @@ -17,7 +17,7 @@ #ifndef _TEST_PAINT_DATA_H_ #define _TEST_PAINT_DATA_H_ -#include "../src/common.h" +#include "../../src/common.h" extern const utf8string RideNames[91]; extern const utf8string TrackNames[256]; diff --git a/PaintTest/intercept.c b/test/testpaint/intercept.c similarity index 99% rename from PaintTest/intercept.c rename to test/testpaint/intercept.c index 1a02cc41c0..4cf6a158fa 100644 --- a/PaintTest/intercept.c +++ b/test/testpaint/intercept.c @@ -15,11 +15,11 @@ #pragma endregion #include "intercept.h" -#include "../src/paint/paint.h" -#include "../src/paint/supports.h" -#include "../src/ride/track_data.h" -#include "../src/interface/viewport.h" -#include "../src/hook.h" +#include "../../src/paint/paint.h" +#include "../../src/paint/supports.h" +#include "../../src/ride/track_data.h" +#include "../../src/interface/viewport.h" +#include "../../src/hook.h" #define gRideEntries RCT2_ADDRESS(RCT2_ADDRESS_RIDE_ENTRIES, rct_ride_entry*) #define gCurrentRotation RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_ROTATION, uint8) diff --git a/PaintTest/intercept.h b/test/testpaint/intercept.h similarity index 97% rename from PaintTest/intercept.h rename to test/testpaint/intercept.h index e5aaa28bfc..7adb7d3d42 100644 --- a/PaintTest/intercept.h +++ b/test/testpaint/intercept.h @@ -17,7 +17,7 @@ #ifndef _TEST_PAINT_INTERCEPT_H_ #define _TEST_PAINT_INTERCEPT_H_ -#include "../src/common.h" +#include "../../src/common.h" bool testRide(int rideType); void initHooks(); diff --git a/PaintTest/main.cpp b/test/testpaint/main.cpp similarity index 97% rename from PaintTest/main.cpp rename to test/testpaint/main.cpp index 0efafc9e3e..cf4e3572b2 100644 --- a/PaintTest/main.cpp +++ b/test/testpaint/main.cpp @@ -21,11 +21,11 @@ extern "C" { #include "data.h" #include "intercept.h" -#include "../src/rct2.h" -#include "../src/ride/ride.h" -#include "../src/ride/ride_data.h" -#include "../src/ride/track.h" -#include "../src/ride/track_data.h" +#include "../../src/rct2.h" +#include "../../src/ride/ride.h" +#include "../../src/ride/ride_data.h" +#include "../../src/ride/track.h" +#include "../../src/ride/track_data.h" } typedef struct {