From 9c28d7eb79b3f3e3fb07c33b745aab856f674f96 Mon Sep 17 00:00:00 2001 From: MichaelBrunner Date: Fri, 30 Aug 2024 11:15:47 +0200 Subject: [PATCH 1/2] REFACTOR: NAV-164 move raptor tests to test directory - reorganize cmake structure in raptor project --- CMakeLists.txt | 5 +- src/raptor/CMakeLists.txt | 50 +------------------ src/raptor/include/CMakeLists.txt | 19 +++++++ src/raptor/{src => include}/Leg.h | 4 +- .../{src/utils => include}/RaptorData.h | 8 +-- .../utils => include}/RaptorDataBuilder.h | 3 +- src/raptor/{src => include}/RaptorRouter.h | 2 +- src/raptor/include/RouteBuilder.h | 2 +- .../{src/utils => include}/RouteContainer.h | 5 +- src/raptor/include/config/CMakeLists.txt | 7 +++ .../data => include}/raptorRouteStructures.h | 35 ++++++------- src/raptor/include/raptorTypes.h | 1 + src/raptor/src/CMakeLists.txt | 24 +++++++++ src/raptor/src/FootpathRelaxer.h | 2 +- src/raptor/src/LabelPostprocessor.cpp | 2 +- src/raptor/src/LabelPostprocessor.h | 2 +- src/raptor/src/Query.h | 2 +- src/raptor/src/RaptorConnection.h | 2 +- src/raptor/src/RouteScanner.h | 4 +- src/raptor/src/data/CMakeLists.txt | 4 ++ src/raptor/src/utils/CMakeLists.txt | 11 ++++ src/raptor/src/utils/RouteContainer.cpp | 2 +- .../test_geometry}/CMakeLists.txt | 0 .../test_geometry}/test_kdTree.cpp | 0 .../test => test/test_raptor}/CMakeLists.txt | 10 +--- test/test_raptor/src/CMakeLists.txt | 7 +++ .../src}/RaptorRouterTestBuilder.cpp | 0 .../src}/RaptorRouterTestBuilder.h | 2 +- .../test_raptor/src}/test_raptorAlgorithm.cpp | 0 .../test_raptor/src}/test_routeBuilder.cpp | 3 +- 30 files changed, 121 insertions(+), 97 deletions(-) create mode 100644 src/raptor/include/CMakeLists.txt rename src/raptor/{src => include}/Leg.h (95%) rename src/raptor/{src/utils => include}/RaptorData.h (66%) rename src/raptor/{src/utils => include}/RaptorDataBuilder.h (94%) rename src/raptor/{src => include}/RaptorRouter.h (98%) rename src/raptor/{src/utils => include}/RouteContainer.h (88%) create mode 100644 src/raptor/include/config/CMakeLists.txt rename src/raptor/{src/data => include}/raptorRouteStructures.h (72%) create mode 100644 src/raptor/src/CMakeLists.txt create mode 100644 src/raptor/src/data/CMakeLists.txt create mode 100644 src/raptor/src/utils/CMakeLists.txt rename {src/geometry/test => test/test_geometry}/CMakeLists.txt (100%) rename {src/geometry/test => test/test_geometry}/test_kdTree.cpp (100%) rename {src/raptor/test => test/test_raptor}/CMakeLists.txt (69%) create mode 100644 test/test_raptor/src/CMakeLists.txt rename {src/raptor/test => test/test_raptor/src}/RaptorRouterTestBuilder.cpp (100%) rename {src/raptor/test => test/test_raptor/src}/RaptorRouterTestBuilder.h (98%) rename {src/raptor/test => test/test_raptor/src}/test_raptorAlgorithm.cpp (100%) rename {src/raptor/test => test/test_raptor/src}/test_routeBuilder.cpp (98%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 39a7b1c..838b1d6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,13 +45,14 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/rel add_subdirectory(src/interfaces) add_subdirectory(src/logging) add_subdirectory(src/geometry) -add_subdirectory(src/geometry/test) add_subdirectory(src/schedule) add_subdirectory(src/schedule/test) add_subdirectory(src/schedule/benchmarks) add_subdirectory(src/raptor) -add_subdirectory(src/raptor/test) add_subdirectory(src/gtfsRaptorConfig) +# TESTS +add_subdirectory(test/test_raptor) +add_subdirectory(test/test_geometry) include(CTest) enable_testing() diff --git a/src/raptor/CMakeLists.txt b/src/raptor/CMakeLists.txt index 3e7ded5..ee49218 100644 --- a/src/raptor/CMakeLists.txt +++ b/src/raptor/CMakeLists.txt @@ -4,54 +4,8 @@ project("raptor" add_library(${PROJECT_NAME} SHARED) -target_sources(${PROJECT_NAME} PRIVATE - src/Leg.h - src/LegImpl.cpp - src/LegImpl.h - src/RaptorAlgorithmFactory.cpp - src/RaptorAlgorithmFactory.h - src/ConnectionImpl.cpp - src/ConnectionImpl.h - src/utils/RaptorData.cpp - src/utils/RaptorData.h - src/utils/RaptorDataBuilder.cpp - src/utils/RaptorDataBuilder.h - src/utils/RouteBuilder.cpp - src/RaptorRouter.cpp - src/RaptorRouter.h - src/Query.cpp - src/Query.h - src/utils/StopLabelsAndTimes.cpp - src/utils/StopLabelsAndTimes.h - src/FootpathRelaxer.cpp - src/FootpathRelaxer.h - src/RouteScanner.cpp - src/RouteScanner.h - src/QueryConfig.cpp - src/data/ActiveTrip.h - src/data/raptorRouteStructures.h - src/utils/RouteContainer.cpp - src/utils/RouteContainer.h - src/LabelPostprocessor.cpp - src/LabelPostprocessor.h - src/RaptorConnection.cpp - src/RaptorConnection.h - src/utils/LocalDateTime.cpp - src/utils/helperFunctions.h - PUBLIC - include/RaptorAlgorithm.h - include/config/QueryConfig.h - include/raptorTypes.h - include/IConnection.h - include/IRaptor.h - include/config/WalkingConfig.h - include/config/TransferConfig.h - include/usingTypes.h - include/config/TravelConfig.h - include/RouteBuilder.h - include/LocalDateTime.h - include/Connection.h -) +add_subdirectory(include) +add_subdirectory(src) target_include_directories(${PROJECT_NAME} PRIVATE diff --git a/src/raptor/include/CMakeLists.txt b/src/raptor/include/CMakeLists.txt new file mode 100644 index 0000000..0a3a714 --- /dev/null +++ b/src/raptor/include/CMakeLists.txt @@ -0,0 +1,19 @@ +target_sources(${PROJECT_NAME} + PUBLIC + Connection.h + IConnection.h + IRaptor.h + LocalDateTime.h + RaptorAlgorithm.h + raptorRouteStructures.h + raptorTypes.h + RouteBuilder.h + usingTypes.h + RaptorDataBuilder.h + Leg.h + RaptorRouter.h + RaptorData.h + RouteContainer.h +) + +add_subdirectory(config) \ No newline at end of file diff --git a/src/raptor/src/Leg.h b/src/raptor/include/Leg.h similarity index 95% rename from src/raptor/src/Leg.h rename to src/raptor/include/Leg.h index 8553ac8..272c64c 100644 --- a/src/raptor/src/Leg.h +++ b/src/raptor/include/Leg.h @@ -7,9 +7,11 @@ #include #include +#include + namespace raptor { - class Leg + class RAPTOR_API Leg { public: enum Type diff --git a/src/raptor/src/utils/RaptorData.h b/src/raptor/include/RaptorData.h similarity index 66% rename from src/raptor/src/utils/RaptorData.h rename to src/raptor/include/RaptorData.h index f40c2af..0e87568 100644 --- a/src/raptor/src/utils/RaptorData.h +++ b/src/raptor/include/RaptorData.h @@ -4,19 +4,19 @@ #pragma once -#include +#include +#include namespace raptor { - class RaptorData - { + class RAPTOR_API RaptorData { StopRoutesIndexLookup lookup; StopContext stopContext; RouteTraversal routeTraversal; public: - explicit RaptorData(StopRoutesIndexLookup lookup, StopContext stopContext, RouteTraversal routeTraversal); + explicit RaptorData(StopRoutesIndexLookup lookup, StopContext stopContext, RouteTraversal routeTraversal); [[nodiscard]] const StopRoutesIndexLookup& getLookup() const; diff --git a/src/raptor/src/utils/RaptorDataBuilder.h b/src/raptor/include/RaptorDataBuilder.h similarity index 94% rename from src/raptor/src/utils/RaptorDataBuilder.h rename to src/raptor/include/RaptorDataBuilder.h index 96724e5..8234800 100644 --- a/src/raptor/src/utils/RaptorDataBuilder.h +++ b/src/raptor/include/RaptorDataBuilder.h @@ -4,7 +4,7 @@ #pragma once -#include +#include "RaptorData.h" #include @@ -15,7 +15,6 @@ #include #include #include -// #include "RaptorAlgorithm.h" // Assuming RaptorAlgorithm is already converted to C++ namespace raptor { diff --git a/src/raptor/src/RaptorRouter.h b/src/raptor/include/RaptorRouter.h similarity index 98% rename from src/raptor/src/RaptorRouter.h rename to src/raptor/include/RaptorRouter.h index 841ce8e..61658cb 100644 --- a/src/raptor/src/RaptorRouter.h +++ b/src/raptor/include/RaptorRouter.h @@ -7,7 +7,7 @@ #include "config/QueryConfig.h" #include "RaptorAlgorithm.h" -#include "utils/RaptorData.h" +#include "RaptorData.h" #include #include diff --git a/src/raptor/include/RouteBuilder.h b/src/raptor/include/RouteBuilder.h index bafe2ae..c9d4e9e 100644 --- a/src/raptor/include/RouteBuilder.h +++ b/src/raptor/include/RouteBuilder.h @@ -9,7 +9,7 @@ #include #include #include -#include "utils/RouteContainer.h" +#include "RouteContainer.h" #include diff --git a/src/raptor/src/utils/RouteContainer.h b/src/raptor/include/RouteContainer.h similarity index 88% rename from src/raptor/src/utils/RouteContainer.h rename to src/raptor/include/RouteContainer.h index 0b1ddbc..62a2969 100644 --- a/src/raptor/src/utils/RouteContainer.h +++ b/src/raptor/include/RouteContainer.h @@ -4,17 +4,18 @@ #pragma once -#include "data/raptorRouteStructures.h" +#include "raptorRouteStructures.h" #include #include #include +#include namespace raptor { - class RouteContainer + class RAPTOR_API RouteContainer { public: RouteContainer(std::string id, const std::map& stopSequence, const std::map>& trips); diff --git a/src/raptor/include/config/CMakeLists.txt b/src/raptor/include/config/CMakeLists.txt new file mode 100644 index 0000000..1b456fc --- /dev/null +++ b/src/raptor/include/config/CMakeLists.txt @@ -0,0 +1,7 @@ +target_sources(${PROJECT_NAME} + PUBLIC + QueryConfig.h + TransferConfig.h + TravelConfig.h + WalkingConfig.h +) \ No newline at end of file diff --git a/src/raptor/src/data/raptorRouteStructures.h b/src/raptor/include/raptorRouteStructures.h similarity index 72% rename from src/raptor/src/data/raptorRouteStructures.h rename to src/raptor/include/raptorRouteStructures.h index 0eedea1..614516a 100644 --- a/src/raptor/src/data/raptorRouteStructures.h +++ b/src/raptor/include/raptorRouteStructures.h @@ -10,10 +10,11 @@ #include #include #include +#include namespace raptor { - struct RouteStop + struct RAPTOR_API RouteStop { types::raptorIdx stopIndex; types::raptorIdx routeIndex; @@ -21,7 +22,7 @@ namespace raptor { ////////////////////////////////////////////////////////////////////////// - struct StopTime + struct RAPTOR_API StopTime { types::raptorInt arrival; types::raptorInt departure; @@ -29,31 +30,31 @@ namespace raptor { ////////////////////////////////////////////////////////////////////////// - struct Route + struct RAPTOR_API Route { std::string id; - types::raptorIdx firstRouteStopIndex; - types::raptorInt numberOfStops; - types::raptorIdx firstStopTimeIndex; - types::raptorInt numberOfTrips; + types::raptorIdx firstRouteStopIndex{}; + types::raptorInt numberOfStops{}; + types::raptorIdx firstStopTimeIndex{}; + types::raptorInt numberOfTrips{}; std::vector tripIds; }; ////////////////////////////////////////////////////////////////////////// - struct Stop + struct RAPTOR_API Stop { std::string id; - types::raptorIdx stopRouteIndex; - types::raptorInt numberOfRoutes; - types::raptorInt sameStopTransferTime; - int transferIndex; - types::raptorInt numberOfTransfers; + types::raptorIdx stopRouteIndex{}; + types::raptorInt numberOfRoutes{}; + types::raptorInt sameStopTransferTime{}; + int transferIndex{}; + types::raptorInt numberOfTransfers{}; }; ////////////////////////////////////////////////////////////////////////// - struct Transfer + struct RAPTOR_API Transfer { types::raptorIdx targetStopIndex; types::raptorInt duration; @@ -61,7 +62,7 @@ namespace raptor { ////////////////////////////////////////////////////////////////////////// - struct StopRoutesIndexLookup + struct RAPTOR_API StopRoutesIndexLookup { std::unordered_map stops; std::unordered_map routes; @@ -69,7 +70,7 @@ namespace raptor { ////////////////////////////////////////////////////////////////////////// - struct StopContext + struct RAPTOR_API StopContext { std::vector transfers; std::vector stops; @@ -78,7 +79,7 @@ namespace raptor { ////////////////////////////////////////////////////////////////////////// - struct RouteTraversal + struct RAPTOR_API RouteTraversal { std::vector routeStops; std::vector stopTimes; diff --git a/src/raptor/include/raptorTypes.h b/src/raptor/include/raptorTypes.h index 25167e4..e2826d1 100644 --- a/src/raptor/include/raptorTypes.h +++ b/src/raptor/include/raptorTypes.h @@ -7,6 +7,7 @@ #include #include +#include namespace raptor::utils { static constexpr auto INFINITY_VALUE = std::numeric_limits::max(); diff --git a/src/raptor/src/CMakeLists.txt b/src/raptor/src/CMakeLists.txt new file mode 100644 index 0000000..4db26e9 --- /dev/null +++ b/src/raptor/src/CMakeLists.txt @@ -0,0 +1,24 @@ +target_sources(${PROJECT_NAME} + PRIVATE + ConnectionImpl.cpp + ConnectionImpl.h + FootpathRelaxer.cpp + FootpathRelaxer.h + LabelPostprocessor.cpp + LabelPostprocessor.h + LegImpl.cpp + LegImpl.h + Query.cpp + Query.h + QueryConfig.cpp + RaptorAlgorithmFactory.cpp + RaptorAlgorithmFactory.h + RaptorConnection.cpp + RaptorConnection.h + RaptorRouter.cpp + RouteScanner.cpp + RouteScanner.h +) + +add_subdirectory(data) +add_subdirectory(utils) \ No newline at end of file diff --git a/src/raptor/src/FootpathRelaxer.h b/src/raptor/src/FootpathRelaxer.h index f886323..591101c 100644 --- a/src/raptor/src/FootpathRelaxer.h +++ b/src/raptor/src/FootpathRelaxer.h @@ -7,7 +7,7 @@ #include "utils/StopLabelsAndTimes.h" #include "usingTypes.h" -#include "utils/RaptorData.h" +#include "include/RaptorData.h" #include #include diff --git a/src/raptor/src/LabelPostprocessor.cpp b/src/raptor/src/LabelPostprocessor.cpp index d1a56ab..1725df4 100644 --- a/src/raptor/src/LabelPostprocessor.cpp +++ b/src/raptor/src/LabelPostprocessor.cpp @@ -6,7 +6,7 @@ #include "LegImpl.h" #include "RaptorConnection.h" -#include "RaptorRouter.h" +#include "include/RaptorRouter.h" #include "RouteScanner.h" #include diff --git a/src/raptor/src/LabelPostprocessor.h b/src/raptor/src/LabelPostprocessor.h index 73418cf..f5c7a29 100644 --- a/src/raptor/src/LabelPostprocessor.h +++ b/src/raptor/src/LabelPostprocessor.h @@ -6,7 +6,7 @@ #include "Connection.h" #include "RaptorConnection.h" -#include "data/raptorRouteStructures.h" +#include "include/raptorRouteStructures.h" #include "usingTypes.h" #include "utils/StopLabelsAndTimes.h" diff --git a/src/raptor/src/Query.h b/src/raptor/src/Query.h index 62d6d7e..ffca5ba 100644 --- a/src/raptor/src/Query.h +++ b/src/raptor/src/Query.h @@ -7,7 +7,7 @@ #include "config/QueryConfig.h" #include "utils/StopLabelsAndTimes.h" -#include "utils/RaptorData.h" +#include "include/RaptorData.h" #include #include diff --git a/src/raptor/src/RaptorConnection.h b/src/raptor/src/RaptorConnection.h index 027d1e5..16e4235 100644 --- a/src/raptor/src/RaptorConnection.h +++ b/src/raptor/src/RaptorConnection.h @@ -4,7 +4,7 @@ #pragma once #include "Connection.h" -#include "Leg.h" +#include "include/Leg.h" #include "usingTypes.h" diff --git a/src/raptor/src/RouteScanner.h b/src/raptor/src/RouteScanner.h index ceaee8c..fd5ed8d 100644 --- a/src/raptor/src/RouteScanner.h +++ b/src/raptor/src/RouteScanner.h @@ -7,7 +7,7 @@ #include "data/ActiveTrip.h" #include "utils/StopLabelsAndTimes.h" -#include "utils/RaptorData.h" +#include "include/RaptorData.h" #include #include @@ -23,7 +23,7 @@ namespace raptor { public: RouteScanner(StopLabelsAndTimes& stopLabelsAndTimes, const RaptorData& raptorData, types::raptorInt minimumTransferDuration); - std::unordered_set scan(types::raptorInt round, const std::unordered_set& markedStops) const; + [[nodiscard]] std::unordered_set scan(types::raptorInt round, const std::unordered_set& markedStops) const; private: [[nodiscard]] std::unordered_set getRoutesToScan(const std::unordered_set& markedStops) const; diff --git a/src/raptor/src/data/CMakeLists.txt b/src/raptor/src/data/CMakeLists.txt new file mode 100644 index 0000000..91b15e9 --- /dev/null +++ b/src/raptor/src/data/CMakeLists.txt @@ -0,0 +1,4 @@ +target_sources(${PROJECT_NAME} + PRIVATE + ActiveTrip.h +) \ No newline at end of file diff --git a/src/raptor/src/utils/CMakeLists.txt b/src/raptor/src/utils/CMakeLists.txt new file mode 100644 index 0000000..7e8cf59 --- /dev/null +++ b/src/raptor/src/utils/CMakeLists.txt @@ -0,0 +1,11 @@ +target_sources(${PROJECT_NAME} + PRIVATE + helperFunctions.h + LocalDateTime.cpp + RaptorData.cpp + RaptorDataBuilder.cpp + RouteBuilder.cpp + RouteContainer.cpp + StopLabelsAndTimes.cpp + StopLabelsAndTimes.h +) \ No newline at end of file diff --git a/src/raptor/src/utils/RouteContainer.cpp b/src/raptor/src/utils/RouteContainer.cpp index 030757f..5349278 100644 --- a/src/raptor/src/utils/RouteContainer.cpp +++ b/src/raptor/src/utils/RouteContainer.cpp @@ -2,7 +2,7 @@ // Created by MichaelBrunner on 26/07/2024. // -#include "RouteContainer.h" +#include "include/RouteContainer.h" #include diff --git a/src/geometry/test/CMakeLists.txt b/test/test_geometry/CMakeLists.txt similarity index 100% rename from src/geometry/test/CMakeLists.txt rename to test/test_geometry/CMakeLists.txt diff --git a/src/geometry/test/test_kdTree.cpp b/test/test_geometry/test_kdTree.cpp similarity index 100% rename from src/geometry/test/test_kdTree.cpp rename to test/test_geometry/test_kdTree.cpp diff --git a/src/raptor/test/CMakeLists.txt b/test/test_raptor/CMakeLists.txt similarity index 69% rename from src/raptor/test/CMakeLists.txt rename to test/test_raptor/CMakeLists.txt index f8ec039..138033b 100644 --- a/src/raptor/test/CMakeLists.txt +++ b/test/test_raptor/CMakeLists.txt @@ -4,13 +4,7 @@ project("raptor_tests" add_executable(${PROJECT_NAME}) -target_sources(${PROJECT_NAME} PRIVATE - test_routeBuilder.cpp - test_raptorAlgorithm.cpp - RaptorRouterTestBuilder.h - RaptorRouterTestBuilder.cpp -) - +add_subdirectory(src) find_package(GTest CONFIG REQUIRED) find_package(spdlog CONFIG REQUIRED) @@ -27,9 +21,7 @@ target_link_libraries(${PROJECT_NAME} PRIVATE include(GoogleTest) gtest_discover_tests(${PROJECT_NAME}) -target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_BINARY_DIR}/src) target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_SOURCE_DIR}/src/logging/include) -target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_SOURCE_DIR}/src/raptor/src) target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_SOURCE_DIR}/src/raptor/include) target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_SOURCE_DIR}/src/raptor/include/config) target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_SOURCE_DIR}/src/schedule/include) diff --git a/test/test_raptor/src/CMakeLists.txt b/test/test_raptor/src/CMakeLists.txt new file mode 100644 index 0000000..2e2cdfc --- /dev/null +++ b/test/test_raptor/src/CMakeLists.txt @@ -0,0 +1,7 @@ +target_sources(${PROJECT_NAME} + PRIVATE + RaptorRouterTestBuilder.cpp + RaptorRouterTestBuilder.h + test_raptorAlgorithm.cpp + test_routeBuilder.cpp +) \ No newline at end of file diff --git a/src/raptor/test/RaptorRouterTestBuilder.cpp b/test/test_raptor/src/RaptorRouterTestBuilder.cpp similarity index 100% rename from src/raptor/test/RaptorRouterTestBuilder.cpp rename to test/test_raptor/src/RaptorRouterTestBuilder.cpp diff --git a/src/raptor/test/RaptorRouterTestBuilder.h b/test/test_raptor/src/RaptorRouterTestBuilder.h similarity index 98% rename from src/raptor/test/RaptorRouterTestBuilder.h rename to test/test_raptor/src/RaptorRouterTestBuilder.h index 0ce3788..5d585ea 100644 --- a/src/raptor/test/RaptorRouterTestBuilder.h +++ b/test/test_raptor/src/RaptorRouterTestBuilder.h @@ -4,7 +4,7 @@ #pragma once -#include "utils/RaptorDataBuilder.h" +#include "RaptorDataBuilder.h" #include #include #include diff --git a/src/raptor/test/test_raptorAlgorithm.cpp b/test/test_raptor/src/test_raptorAlgorithm.cpp similarity index 100% rename from src/raptor/test/test_raptorAlgorithm.cpp rename to test/test_raptor/src/test_raptorAlgorithm.cpp diff --git a/src/raptor/test/test_routeBuilder.cpp b/test/test_raptor/src/test_routeBuilder.cpp similarity index 98% rename from src/raptor/test/test_routeBuilder.cpp rename to test/test_raptor/src/test_routeBuilder.cpp index 8325795..b8de160 100644 --- a/src/raptor/test/test_routeBuilder.cpp +++ b/test/test_raptor/src/test_routeBuilder.cpp @@ -2,7 +2,8 @@ // Created by MichaelBrunner on 20/07/2024. // -#include "include/RouteBuilder.h" +#include +#include #include From d8f6663892d2d7103afc3426be0e7362eb5eadd7 Mon Sep 17 00:00:00 2001 From: MichaelBrunner Date: Fri, 30 Aug 2024 11:26:55 +0200 Subject: [PATCH 2/2] REFACTOR: NAV-164 move schedule tests to test directory - reorganize cmake structure in schedule project --- .gitignore | 2 +- CMakeLists.txt | 2 +- .../test => test/test_schedule}/CMakeLists.txt | 10 +--------- .../test => test/test_schedule}/test-data/agency.txt | 0 .../test => test/test_schedule}/test-data/calendar.txt | 0 .../test_schedule}/test-data/calendar_dates.txt | 0 .../test => test/test_schedule}/test-data/routes.txt | 0 .../test_schedule}/test-data/stop_times.txt | 0 .../test => test/test_schedule}/test-data/stops.txt | 0 .../test_schedule}/test-data/transfers.txt | 0 .../test => test/test_schedule}/test-data/trips.txt | 0 .../test => test/test_schedule}/test_gtfsReaderCsv.cpp | 0 .../test => test/test_schedule}/test_gtfsReaderTxt.cpp | 0 .../schedule/test => test/test_schedule}/test_main.cpp | 0 14 files changed, 3 insertions(+), 11 deletions(-) rename {src/schedule/test => test/test_schedule}/CMakeLists.txt (87%) rename {src/schedule/test => test/test_schedule}/test-data/agency.txt (100%) rename {src/schedule/test => test/test_schedule}/test-data/calendar.txt (100%) rename {src/schedule/test => test/test_schedule}/test-data/calendar_dates.txt (100%) rename {src/schedule/test => test/test_schedule}/test-data/routes.txt (100%) rename {src/schedule/test => test/test_schedule}/test-data/stop_times.txt (100%) rename {src/schedule/test => test/test_schedule}/test-data/stops.txt (100%) rename {src/schedule/test => test/test_schedule}/test-data/transfers.txt (100%) rename {src/schedule/test => test/test_schedule}/test-data/trips.txt (100%) rename {src/schedule/test => test/test_schedule}/test_gtfsReaderCsv.cpp (100%) rename {src/schedule/test => test/test_schedule}/test_gtfsReaderTxt.cpp (100%) rename {src/schedule/test => test/test_schedule}/test_main.cpp (100%) diff --git a/.gitignore b/.gitignore index 2eb9ff0..087e217 100644 --- a/.gitignore +++ b/.gitignore @@ -36,7 +36,7 @@ /.idea /src/schedule/cmake-*/* /src/schedule/.idea -/src/schedule/test/cmake-*/* +/test/test_schedule/cmake-*/* /.vscode /output /.vs/raptorxx/FileContentIndex diff --git a/CMakeLists.txt b/CMakeLists.txt index 838b1d6..417aed0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,7 +46,7 @@ add_subdirectory(src/interfaces) add_subdirectory(src/logging) add_subdirectory(src/geometry) add_subdirectory(src/schedule) -add_subdirectory(src/schedule/test) +add_subdirectory(test/test_schedule) add_subdirectory(src/schedule/benchmarks) add_subdirectory(src/raptor) add_subdirectory(src/gtfsRaptorConfig) diff --git a/src/schedule/test/CMakeLists.txt b/test/test_schedule/CMakeLists.txt similarity index 87% rename from src/schedule/test/CMakeLists.txt rename to test/test_schedule/CMakeLists.txt index 0d9fb14..e3456f8 100644 --- a/src/schedule/test/CMakeLists.txt +++ b/test/test_schedule/CMakeLists.txt @@ -39,12 +39,4 @@ set_target_properties(${PROJECT_NAME} PROPERTIES ) -message(STATUS "CMAKE_SOURCE_DIR: ${CMAKE_SOURCE_DIR}/src/schedule/test/test-data/") - -add_definitions(-DTEST_DATA_DIR="${CMAKE_SOURCE_DIR}/src/schedule/test/test-data/") - - - - - - +add_definitions(-DTEST_DATA_DIR="${CMAKE_SOURCE_DIR}/test/test_schedule/test-data/") \ No newline at end of file diff --git a/src/schedule/test/test-data/agency.txt b/test/test_schedule/test-data/agency.txt similarity index 100% rename from src/schedule/test/test-data/agency.txt rename to test/test_schedule/test-data/agency.txt diff --git a/src/schedule/test/test-data/calendar.txt b/test/test_schedule/test-data/calendar.txt similarity index 100% rename from src/schedule/test/test-data/calendar.txt rename to test/test_schedule/test-data/calendar.txt diff --git a/src/schedule/test/test-data/calendar_dates.txt b/test/test_schedule/test-data/calendar_dates.txt similarity index 100% rename from src/schedule/test/test-data/calendar_dates.txt rename to test/test_schedule/test-data/calendar_dates.txt diff --git a/src/schedule/test/test-data/routes.txt b/test/test_schedule/test-data/routes.txt similarity index 100% rename from src/schedule/test/test-data/routes.txt rename to test/test_schedule/test-data/routes.txt diff --git a/src/schedule/test/test-data/stop_times.txt b/test/test_schedule/test-data/stop_times.txt similarity index 100% rename from src/schedule/test/test-data/stop_times.txt rename to test/test_schedule/test-data/stop_times.txt diff --git a/src/schedule/test/test-data/stops.txt b/test/test_schedule/test-data/stops.txt similarity index 100% rename from src/schedule/test/test-data/stops.txt rename to test/test_schedule/test-data/stops.txt diff --git a/src/schedule/test/test-data/transfers.txt b/test/test_schedule/test-data/transfers.txt similarity index 100% rename from src/schedule/test/test-data/transfers.txt rename to test/test_schedule/test-data/transfers.txt diff --git a/src/schedule/test/test-data/trips.txt b/test/test_schedule/test-data/trips.txt similarity index 100% rename from src/schedule/test/test-data/trips.txt rename to test/test_schedule/test-data/trips.txt diff --git a/src/schedule/test/test_gtfsReaderCsv.cpp b/test/test_schedule/test_gtfsReaderCsv.cpp similarity index 100% rename from src/schedule/test/test_gtfsReaderCsv.cpp rename to test/test_schedule/test_gtfsReaderCsv.cpp diff --git a/src/schedule/test/test_gtfsReaderTxt.cpp b/test/test_schedule/test_gtfsReaderTxt.cpp similarity index 100% rename from src/schedule/test/test_gtfsReaderTxt.cpp rename to test/test_schedule/test_gtfsReaderTxt.cpp diff --git a/src/schedule/test/test_main.cpp b/test/test_schedule/test_main.cpp similarity index 100% rename from src/schedule/test/test_main.cpp rename to test/test_schedule/test_main.cpp