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 | 298c6da79f1d8f35089a67f463f0b541bec36d9b (patch) | |
tree | 1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /util/draft/date_ut.cpp | |
parent | 00afc96e9c0298054b7386fa7fb9e3cc3d67b974 (diff) | |
download | ydb-298c6da79f1d8f35089a67f463f0b541bec36d9b.tar.gz |
Restoring authorship annotation for <akhropov@yandex-team.ru>. Commit 2 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 5320087abf..8c33a6c1cf 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); } - } -} + } +} |