From 5dc3dd3d4a0cbc956ffd1fe25e3d27c41612ef0d Mon Sep 17 00:00:00 2001 From: Vladislav Shchapov Date: Wed, 13 Oct 2021 20:26:11 +0500 Subject: [PATCH] New tests --- test/chrono-test.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/chrono-test.cc b/test/chrono-test.cc index a2a84ca9..8aef4a32 100644 --- a/test/chrono-test.cc +++ b/test/chrono-test.cc @@ -63,8 +63,13 @@ TEST(chrono_test, format_tm) { // Short year tm.tm_year = 999 - 1900; EXPECT_EQ(fmt::format("{:%Y}", tm), "0999"); + EXPECT_EQ(fmt::format("{:%C%y}", tm), "0999"); EXPECT_EQ(fmt::format("{:%G}", tm), "0998"); + tm.tm_year = 27 - 1900; + EXPECT_EQ(fmt::format("{:%Y}", tm), "0027"); + EXPECT_EQ(fmt::format("{:%C%y}", tm), "0027"); + // for week on the year // https://www.cl.cam.ac.uk/~mgk25/iso-time.html std::vector str_tm_list = {