Commit 5dc3dd3d authored by Vladislav Shchapov's avatar Vladislav Shchapov Committed by Victor Zverovich

New tests

parent f8542cd9
...@@ -63,8 +63,13 @@ TEST(chrono_test, format_tm) { ...@@ -63,8 +63,13 @@ TEST(chrono_test, format_tm) {
// Short year // Short year
tm.tm_year = 999 - 1900; tm.tm_year = 999 - 1900;
EXPECT_EQ(fmt::format("{:%Y}", tm), "0999"); EXPECT_EQ(fmt::format("{:%Y}", tm), "0999");
EXPECT_EQ(fmt::format("{:%C%y}", tm), "0999");
EXPECT_EQ(fmt::format("{:%G}", tm), "0998"); 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 // for week on the year
// https://www.cl.cam.ac.uk/~mgk25/iso-time.html // https://www.cl.cam.ac.uk/~mgk25/iso-time.html
std::vector<std::string> str_tm_list = { std::vector<std::string> str_tm_list = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment