From 89c8198282b25d8edaf8f76f7ebb51fc54a53726 Mon Sep 17 00:00:00 2001 From: matrackif Date: Mon, 6 Dec 2021 18:06:01 +0100 Subject: [PATCH] Simplify test check --- test/chrono-test.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/chrono-test.cc b/test/chrono-test.cc index f98daac3..42360e5f 100644 --- a/test/chrono-test.cc +++ b/test/chrono-test.cc @@ -544,9 +544,7 @@ TEST(chrono_test, negative_durations) { TEST(chrono_test, special_durations) { auto value = fmt::format("{:%S}", std::chrono::duration(1e20)); - // No decimal point is printed so size() is 2. - EXPECT_EQ(value.size(), 2); - EXPECT_EQ("40", value.substr(0, 2)); + EXPECT_EQ(value, "40"); auto nan = std::numeric_limits::quiet_NaN(); EXPECT_EQ( "nan nan nan nan nan:nan nan",