diff options
author | akhropov <akhropov@yandex-team.ru> | 2022-02-10 16:46:32 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:32 +0300 |
commit | 00afc96e9c0298054b7386fa7fb9e3cc3d67b974 (patch) | |
tree | cb7a9f4a92c0d4cc5a86eeed49ad71e810953c1f /util/draft/date_ut.cpp | |
parent | 83a8efcf3af051e3dd59c00d1d5dafc96412ec1e (diff) | |
download | ydb-00afc96e9c0298054b7386fa7fb9e3cc3d67b974.tar.gz |
Restoring authorship annotation for <akhropov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/draft/date_ut.cpp')
-rw-r--r-- | util/draft/date_ut.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/util/draft/date_ut.cpp b/util/draft/date_ut.cpp index 8c33a6c1cfd..5320087abf9 100644 --- a/util/draft/date_ut.cpp +++ b/util/draft/date_ut.cpp @@ -1,29 +1,29 @@ -#include "date.h" - +#include "date.h" + #include <library/cpp/testing/unittest/registar.h> - + Y_UNIT_TEST_SUITE(TDateTest) { Y_UNIT_TEST(ComponentsTest) { - { - TDate d("20110215"); - UNIT_ASSERT_EQUAL(d.GetYear(), 2011); - UNIT_ASSERT_EQUAL(d.GetMonth(), 2); - UNIT_ASSERT_EQUAL(d.GetMonthDay(), 15); + { + TDate d("20110215"); + UNIT_ASSERT_EQUAL(d.GetYear(), 2011); + UNIT_ASSERT_EQUAL(d.GetMonth(), 2); + UNIT_ASSERT_EQUAL(d.GetMonthDay(), 15); UNIT_ASSERT_EQUAL(d.ToStroka("%Y%m%d"), "20110215"); UNIT_ASSERT_EQUAL(d.ToStroka(), "20110215"); UNIT_ASSERT_EQUAL(d.ToStroka("%Y--%m--%d"), "2011--02--15"); UNIT_ASSERT_EQUAL(d.ToStroka("%U"), "07"); UNIT_ASSERT_EQUAL(d.GetStartUTC(), 1297728000); - } - { + } + { TDate d(2005, 6, 3); - UNIT_ASSERT_EQUAL(d.GetYear(), 2005); - UNIT_ASSERT_EQUAL(d.GetMonth(), 6); - UNIT_ASSERT_EQUAL(d.GetMonthDay(), 3); + UNIT_ASSERT_EQUAL(d.GetYear(), 2005); + UNIT_ASSERT_EQUAL(d.GetMonth(), 6); + UNIT_ASSERT_EQUAL(d.GetMonthDay(), 3); UNIT_ASSERT_EQUAL(d.ToStroka(), "20050603"); UNIT_ASSERT_EQUAL(d.ToStroka("____%Y__%m____%d"), "____2005__06____03"); UNIT_ASSERT_EQUAL(d.GetStartUTC(), 1117756800); - } + } { TDate d("2011-02-15", "%Y-%m-%d"); UNIT_ASSERT_EQUAL(d.GetYear(), 2011); @@ -32,5 +32,5 @@ Y_UNIT_TEST_SUITE(TDateTest) { UNIT_ASSERT_EQUAL(d.ToStroka("%Y%m%d"), "20110215"); UNIT_ASSERT_EQUAL(d.GetStartUTC(), 1297728000); } - } -} + } +} |