diff options
author | ivanselin <[email protected]> | 2022-02-10 16:48:40 +0300 |
---|---|---|
committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:48:40 +0300 |
commit | 496663edd3beee611468aedd4bb9ac100c1a118d (patch) | |
tree | 16cd4c986b35d4fdbdfcaec2b23992e04009283b /util/datetime/parser_ut.cpp | |
parent | cd441de9b6bd02d76655d170f85e57a8941b4bb5 (diff) |
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'util/datetime/parser_ut.cpp')
-rw-r--r-- | util/datetime/parser_ut.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/util/datetime/parser_ut.cpp b/util/datetime/parser_ut.cpp index 61364af997f..fcebaf5e344 100644 --- a/util/datetime/parser_ut.cpp +++ b/util/datetime/parser_ut.cpp @@ -451,26 +451,26 @@ Y_UNIT_TEST_SUITE(TDateTimeParseTest) { TInstant::Seconds(0) + TDuration::MicroSeconds(999999)); } - Y_UNIT_TEST(TestIso8601BigDate) { - TVector<std::pair<TString, int>> dates{ - {"2019-01-01", 17897}, - - {"2037-01-01", 24472}, - {"2050-01-01", 29220}, - - {"2099-01-01", 47117}, - {"2099-12-31", 47481}, - {"2100-01-01", 47482}, - {"2100-02-28", 47540}, - {"2100-03-01", 47541}, - }; - - for (const auto& [date, days] : dates) { - TInstant instant = TInstant::ParseIso8601(date + "T00:00:00Z"); - UNIT_ASSERT_VALUES_EQUAL(instant.Days(), days); - } - } - + Y_UNIT_TEST(TestIso8601BigDate) { + TVector<std::pair<TString, int>> dates{ + {"2019-01-01", 17897}, + + {"2037-01-01", 24472}, + {"2050-01-01", 29220}, + + {"2099-01-01", 47117}, + {"2099-12-31", 47481}, + {"2100-01-01", 47482}, + {"2100-02-28", 47540}, + {"2100-03-01", 47541}, + }; + + for (const auto& [date, days] : dates) { + TInstant instant = TInstant::ParseIso8601(date + "T00:00:00Z"); + UNIT_ASSERT_VALUES_EQUAL(instant.Days(), days); + } + } + Y_UNIT_TEST(TestHttpDate) { UNIT_ASSERT_VALUES_EQUAL( TInstant::ParseHttp("Sun, 06 Nov 1994 08:49:37 GMT"), |