From 8c32d0b6442bc7075bb27a36d0a28df9f8b5d5ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Tue, 28 Nov 2017 21:47:06 +0100 Subject: [PATCH] Add more weird chrono::duration stringification tests --- projects/SelfTest/Baselines/console.std.approved.txt | 2 +- projects/SelfTest/Baselines/console.sw.approved.txt | 8 +++++++- projects/SelfTest/Baselines/junit.sw.approved.txt | 2 +- projects/SelfTest/Baselines/xml.sw.approved.txt | 12 ++++++++++-- .../SelfTest/UsageTests/ToStringChrono.tests.cpp | 3 +++ 5 files changed, 22 insertions(+), 5 deletions(-) diff --git a/projects/SelfTest/Baselines/console.std.approved.txt b/projects/SelfTest/Baselines/console.std.approved.txt index 66488a4e..4b96e2f4 100644 --- a/projects/SelfTest/Baselines/console.std.approved.txt +++ b/projects/SelfTest/Baselines/console.std.approved.txt @@ -1053,5 +1053,5 @@ with expansion: =============================================================================== test cases: 191 | 139 passed | 48 failed | 4 failed as expected -assertions: 954 | 830 passed | 103 failed | 21 failed as expected +assertions: 955 | 831 passed | 103 failed | 21 failed as expected diff --git a/projects/SelfTest/Baselines/console.sw.approved.txt b/projects/SelfTest/Baselines/console.sw.approved.txt index 31c60d0a..083d8dc0 100644 --- a/projects/SelfTest/Baselines/console.sw.approved.txt +++ b/projects/SelfTest/Baselines/console.sw.approved.txt @@ -5127,6 +5127,12 @@ PASSED: with expansion: 1 [30/1]s != 1 fs +ToStringChrono.tests.cpp:: +PASSED: + REQUIRE( pico_second != atto_second ) +with expansion: + 1 ps != 1 as + ------------------------------------------------------------------------------- Stringifying std::chrono::time_point ------------------------------------------------------------------------------- @@ -8004,5 +8010,5 @@ PASSED: =============================================================================== test cases: 191 | 137 passed | 50 failed | 4 failed as expected -assertions: 953 | 826 passed | 106 failed | 21 failed as expected +assertions: 954 | 827 passed | 106 failed | 21 failed as expected diff --git a/projects/SelfTest/Baselines/junit.sw.approved.txt b/projects/SelfTest/Baselines/junit.sw.approved.txt index 54598096..dbb424a3 100644 --- a/projects/SelfTest/Baselines/junit.sw.approved.txt +++ b/projects/SelfTest/Baselines/junit.sw.approved.txt @@ -1,7 +1,7 @@ - + diff --git a/projects/SelfTest/Baselines/xml.sw.approved.txt b/projects/SelfTest/Baselines/xml.sw.approved.txt index 4ae2e015..be6c4f30 100644 --- a/projects/SelfTest/Baselines/xml.sw.approved.txt +++ b/projects/SelfTest/Baselines/xml.sw.approved.txt @@ -5878,6 +5878,14 @@ Message from section two 1 [30/1]s != 1 fs + + + pico_second != atto_second + + + 1 ps != 1 as + + @@ -8889,7 +8897,7 @@ loose text artifact - + - + diff --git a/projects/SelfTest/UsageTests/ToStringChrono.tests.cpp b/projects/SelfTest/UsageTests/ToStringChrono.tests.cpp index 97d0c1cb..c2c0829f 100644 --- a/projects/SelfTest/UsageTests/ToStringChrono.tests.cpp +++ b/projects/SelfTest/UsageTests/ToStringChrono.tests.cpp @@ -20,8 +20,11 @@ TEST_CASE("Stringifying std::chrono::duration helpers", "[toString][chrono]") { TEST_CASE("Stringifying std::chrono::duration with weird ratios", "[toString][chrono]") { std::chrono::duration> half_minute(1); + std::chrono::duration> pico_second(1); std::chrono::duration> femto_second(1); + std::chrono::duration> atto_second(1); REQUIRE(half_minute != femto_second); + REQUIRE(pico_second != atto_second); } TEST_CASE("Stringifying std::chrono::time_point", "[toString][chrono]") {