Archive warnings clang-tidy fixes

This commit is contained in:
Dan Paulat 2025-04-27 13:40:04 -05:00
parent 8cdd8526eb
commit 81f09e07f0
14 changed files with 43 additions and 46 deletions

View file

@ -16,7 +16,7 @@ TEST(WmoHeader, WmoFields)
{
std::stringstream ss {kWmoHeaderSample_};
WmoHeader header;
bool valid = header.Parse(ss);
const bool valid = header.Parse(ss);
EXPECT_EQ(valid, true);
EXPECT_EQ(header.sequence_number(), "887");
@ -40,7 +40,7 @@ TEST(WmoHeader, DateHintBeforeParse)
WmoHeader header;
header.SetDateHint(2022y / October);
bool valid = header.Parse(ss);
const bool valid = header.Parse(ss);
EXPECT_EQ(valid, true);
EXPECT_EQ(header.GetDateTime(),
@ -54,7 +54,7 @@ TEST(WmoHeader, DateHintAfterParse)
std::stringstream ss {kWmoHeaderSample_};
WmoHeader header;
bool valid = header.Parse(ss);
const bool valid = header.Parse(ss);
header.SetDateHint(2022y / October);
EXPECT_EQ(valid, true);
@ -69,7 +69,7 @@ TEST(WmoHeader, EndTimeHintSameMonth)
std::stringstream ss {kWmoHeaderSample_};
WmoHeader header;
bool valid = header.Parse(ss);
const bool valid = header.Parse(ss);
auto endTimeHint = sys_days {2022y / October / 29d} + 0h + 0min + 0s;
@ -85,7 +85,7 @@ TEST(WmoHeader, EndTimeHintPreviousMonth)
std::stringstream ss {kWmoHeaderSample_};
WmoHeader header;
bool valid = header.Parse(ss);
const bool valid = header.Parse(ss);
auto endTimeHint = sys_days {2022y / October / 27d} + 0h + 0min + 0s;
@ -101,7 +101,7 @@ TEST(WmoHeader, EndTimeHintPreviousYear)
std::stringstream ss {kWmoHeaderSample_};
WmoHeader header;
bool valid = header.Parse(ss);
const bool valid = header.Parse(ss);
auto endTimeHint = sys_days {2022y / January / 27d} + 0h + 0min + 0s;
@ -118,7 +118,7 @@ TEST(WmoHeader, EndTimeHintIgnored)
WmoHeader header;
header.SetDateHint(2022y / October);
bool valid = header.Parse(ss);
const bool valid = header.Parse(ss);
auto endTimeHint = sys_days {2020y / January / 1d} + 0h + 0min + 0s;

View file

@ -2,9 +2,7 @@
#include <gtest/gtest.h>
namespace scwx
{
namespace provider
namespace scwx::provider
{
TEST(IemApiProviderTest, ListTextProducts)
@ -12,11 +10,9 @@ TEST(IemApiProviderTest, ListTextProducts)
using namespace std::chrono;
using sys_days = time_point<system_clock, days>;
IemApiProvider provider {};
auto date = sys_days {2023y / March / 25d};
auto torProducts = provider.ListTextProducts(date, {}, "TOR");
auto torProducts = IemApiProvider::ListTextProducts(date, {}, "TOR");
ASSERT_EQ(torProducts.has_value(), true);
EXPECT_EQ(torProducts.value().size(), 35);
@ -40,9 +36,7 @@ TEST(IemApiProviderTest, LoadTextProducts)
"202303252015-KFFC-WFUS52-TORFFC",
"202303311942-KLZK-WWUS54-SVSLZK"};
IemApiProvider provider {};
auto textProducts = provider.LoadTextProducts(productIds);
auto textProducts = IemApiProvider::LoadTextProducts(productIds);
EXPECT_EQ(textProducts.size(), 3);
@ -60,5 +54,4 @@ TEST(IemApiProviderTest, LoadTextProducts)
}
}
} // namespace provider
} // namespace scwx
} // namespace scwx::provider

View file

@ -18,9 +18,9 @@ TEST_P(WarningsProviderTest, LoadUpdatedFiles)
{
WarningsProvider provider(GetParam());
std::chrono::sys_time<std::chrono::hours> now =
const std::chrono::sys_time<std::chrono::hours> now =
std::chrono::floor<std::chrono::hours>(std::chrono::system_clock::now());
std::chrono::sys_time<std::chrono::hours> startTime =
const std::chrono::sys_time<std::chrono::hours> startTime =
now - std::chrono::days {3};
auto updatedFiles = provider.LoadUpdatedFiles(startTime);