diff options
author | ivanselin <ivanselin@yandex-team.ru> | 2022-02-10 16:48:40 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:48:40 +0300 |
commit | e84d04727ac10dd27e5dc3d72039544902f81288 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /util/datetime/parser_ut.cpp | |
parent | 496663edd3beee611468aedd4bb9ac100c1a118d (diff) | |
download | ydb-e84d04727ac10dd27e5dc3d72039544902f81288.tar.gz |
Restoring authorship annotation for <ivanselin@yandex-team.ru>. Commit 2 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 fcebaf5e34..61364af997 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"), |