Skip to content

Commit

Permalink
ENH: add missing header includes for mac os
Browse files Browse the repository at this point in the history
  • Loading branch information
Brunner246 committed Jun 2, 2024
1 parent d539648 commit 2df34ca
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions gtfs/test/test_gtfsReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@
#include <memory>
#include <LoggingPool.h>
#include <algorithm>
#include <array>
#include <chrono>
#include <iostream>

#include <gtest/gtest.h>


TEST(GTFS, TestFunction) {
const auto agencyFile = R"(C:\Users\MichaelBrunner\source\master-thesis\raptorxx\gtfs\test\test-data\agency.txt)";
const auto calendarFile = R"(C:\Users\MichaelBrunner\source\master-thesis\raptorxx\gtfs\test\test-data\calendar.txt)";
Expand All @@ -39,15 +41,18 @@ TEST(GTFS, TestFunction) {
LoggingPool::getLogger()->info("Agency: {} {} {}", agency.agencyId, agency.name, agency.timezone);
});

std::array<std::string, 7> weekday_names = {"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"};

std::ranges::for_each(data.calendars, [&](const auto& calendar) {
LoggingPool::getLogger()->info("Service ID: {}", calendar.serviceId);
LoggingPool::getLogger()->info("Start Date: {}", fmt::format("{:%F}", calendar.startDate));
LoggingPool::getLogger()->info("End Date: {}", fmt::format("{:%F}", calendar.endDate));
LoggingPool::getLogger()->info("Weekday Service: ");
for (const auto& [day, service] : calendar.weekdayService)
{
auto day_name = fmt::format("{:%A}", day);
LoggingPool::getLogger()->info("{}: {}", day_name, (service ? "Service" : "No service"));
auto day_name = weekday_names[day.c_encoding() - 1];
auto day_name_formatted = fmt::format("{:%A}", day_name);
LoggingPool::getLogger()->info("{}: {}", day_name_formatted, (service ? "Service" : "No service"));
}
});
}

0 comments on commit 2df34ca

Please sign in to comment.