diff options
| author | Martin Hořeňovský | 2025-08-01 23:00:30 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2025-08-02 08:31:34 +0200 |
| commit | 17fe5eaa5c0c28e7a6a197420f0f16b085a8fa9a (patch) | |
| tree | 33d09eaa38e2e5538b6a67498724447f91b96d65 /tests/SelfTest/UsageTests/ToStringChrono.tests.cpp | |
| parent | fbfd13501ca288e5ffeb725328827786abb99d23 (diff) | |
| download | catch3-17fe5eaa5c0c28e7a6a197420f0f16b085a8fa9a.tar.gz | |
Fix StringMaker for time_point<system_clock> with non-default duration
Fixes #2685
Diffstat (limited to 'tests/SelfTest/UsageTests/ToStringChrono.tests.cpp')
| -rw-r--r-- | tests/SelfTest/UsageTests/ToStringChrono.tests.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/SelfTest/UsageTests/ToStringChrono.tests.cpp b/tests/SelfTest/UsageTests/ToStringChrono.tests.cpp index 744b899b..931b4b22 100644 --- a/tests/SelfTest/UsageTests/ToStringChrono.tests.cpp +++ b/tests/SelfTest/UsageTests/ToStringChrono.tests.cpp @@ -49,3 +49,9 @@ TEST_CASE("Stringifying std::chrono::time_point<Clock>", "[toString][chrono][!no auto later2 = now2 + std::chrono::minutes(2); REQUIRE(now2 != later2); } + +TEST_CASE( "system_clock timepoint with non-default duration", "[toString][chrono]" ) { + std::chrono::time_point<std::chrono::system_clock, std::chrono::nanoseconds> + tp1, tp2; + CHECK( tp1 == tp2 ); +} |