aboutsummaryrefslogtreecommitdiffstats
path: root/util/datetime/base_ut.cpp
diff options
context:
space:
mode:
authorivanselin <ivanselin@yandex-team.ru>2022-02-10 16:48:40 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:48:40 +0300
commit496663edd3beee611468aedd4bb9ac100c1a118d (patch)
tree16cd4c986b35d4fdbdfcaec2b23992e04009283b /util/datetime/base_ut.cpp
parentcd441de9b6bd02d76655d170f85e57a8941b4bb5 (diff)
downloadydb-496663edd3beee611468aedd4bb9ac100c1a118d.tar.gz
Restoring authorship annotation for <ivanselin@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/datetime/base_ut.cpp')
-rw-r--r--util/datetime/base_ut.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/util/datetime/base_ut.cpp b/util/datetime/base_ut.cpp
index afc3f802eb..2815670494 100644
--- a/util/datetime/base_ut.cpp
+++ b/util/datetime/base_ut.cpp
@@ -512,24 +512,24 @@ Y_UNIT_TEST_SUITE(DateTimeTest) {
UNIT_ASSERT_VALUES_EQUAL(i1, i2);
}
-
- Y_UNIT_TEST(TestTimeGmDateConversion) {
- tm time{};
- time_t timestamp = 0;
-
- // Check all days till year 2106 (max year representable if time_t is 32 bit)
- while (time.tm_year < 2106 - 1900) {
- timestamp += 86400;
-
- GmTimeR(&timestamp, &time);
- time_t newTimestamp = TimeGM(&time);
-
- UNIT_ASSERT_VALUES_EQUAL_C(
+
+ Y_UNIT_TEST(TestTimeGmDateConversion) {
+ tm time{};
+ time_t timestamp = 0;
+
+ // Check all days till year 2106 (max year representable if time_t is 32 bit)
+ while (time.tm_year < 2106 - 1900) {
+ timestamp += 86400;
+
+ GmTimeR(&timestamp, &time);
+ time_t newTimestamp = TimeGM(&time);
+
+ UNIT_ASSERT_VALUES_EQUAL_C(
newTimestamp,
timestamp,
"incorrect date " << (1900 + time.tm_year) << "-" << (time.tm_mon + 1) << "-" << time.tm_mday);
- }
- }
+ }
+ }
Y_UNIT_TEST(TestTDurationConstructorFromStdChronoDuration) {