mirror of
https://github.com/catchorg/Catch2.git
synced 2025-07-16 13:45:32 +02:00
Fix Clang-Tidy's readability-static-accessed-through-instance in tests
This commit is contained in:
parent
a483b6d7d3
commit
3ebc346bcb
@ -103,15 +103,15 @@ TEST_CASE( "#2944 - Stringifying dates before 1970 should not crash", "[.approva
|
||||
using Catch::Matchers::Equals;
|
||||
using Days = std::chrono::duration<int32_t, std::ratio<86400>>;
|
||||
using SysDays = std::chrono::time_point<std::chrono::system_clock, Days>;
|
||||
Catch::StringMaker<std::chrono::system_clock::time_point> sm;
|
||||
using SM = Catch::StringMaker<std::chrono::system_clock::time_point>;
|
||||
|
||||
// Check simple date first
|
||||
const SysDays post1970{ Days{ 1 } };
|
||||
auto converted_post = sm.convert( post1970 );
|
||||
auto converted_post = SM::convert( post1970 );
|
||||
REQUIRE( converted_post == "1970-01-02T00:00:00Z" );
|
||||
|
||||
const SysDays pre1970{ Days{ -1 } };
|
||||
auto converted_pre = sm.convert( pre1970 );
|
||||
auto converted_pre = SM::convert( pre1970 );
|
||||
REQUIRE_THAT(
|
||||
converted_pre,
|
||||
Equals( "1969-12-31T00:00:00Z" ) ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user