diff options
author | aosipenko <aosipenko@yandex-team.ru> | 2022-02-10 16:48:08 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:48:08 +0300 |
commit | 69e3c43df1c96bc2ac8946bf4dfb1f5fc438ff7f (patch) | |
tree | b222e5ac2e2e98872661c51ccceee5da0d291e13 /util/datetime/base_ut.cpp | |
parent | 948fd24d47d4b3b7815aaef1686aea00ef3f4288 (diff) | |
download | ydb-69e3c43df1c96bc2ac8946bf4dfb1f5fc438ff7f.tar.gz |
Restoring authorship annotation for <aosipenko@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/datetime/base_ut.cpp')
-rw-r--r-- | util/datetime/base_ut.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/util/datetime/base_ut.cpp b/util/datetime/base_ut.cpp index 5db2bead12..afc3f802eb 100644 --- a/util/datetime/base_ut.cpp +++ b/util/datetime/base_ut.cpp @@ -298,7 +298,7 @@ Y_UNIT_TEST_SUITE(TDateTimeTest) { } return strcmp(zone0, zone1) == 0; } - + static bool CompareTMFull(const tm* t0, const tm* t1) { return t0 && t1 && CompareTM(*t0, *t1) && @@ -320,14 +320,14 @@ Y_UNIT_TEST_SUITE(TDateTimeTest) { for (time_t t = starttime; t < finishtime; t += step) { ptm0 = GmTimeR(&t, &tms0); UNIT_ASSERT_EQUAL(ptm0, &tms0); - -#ifdef _win_ + +#ifdef _win_ if (tms0.tm_year + 1900 > 3000) { // Windows: _MAX__TIME64_T == 23:59:59. 12/31/3000 UTC continue; } -#endif - +#endif + ptm1 = gmtime_r(&t, &tms1); if (!ptm1) { continue; @@ -372,7 +372,7 @@ Y_UNIT_TEST_SUITE(DateTimeTest) { } Y_UNIT_TEST(TestFromString) { - static const struct T { + static const struct T { const char* const Str; const TDuration::TValue MicroSeconds; const bool Parseable; @@ -383,7 +383,7 @@ Y_UNIT_TEST_SUITE(DateTimeTest) { {"3ms", 3000, true}, {"x3ms", 0, false}, }; - + for (const T* t = tests; t != std::end(tests); ++t) { // FromString bool parsed = false; @@ -400,9 +400,9 @@ Y_UNIT_TEST_SUITE(DateTimeTest) { if (t->Parseable) { UNIT_ASSERT_EQUAL(t->MicroSeconds, tryTime.MicroSeconds()); } - } - } - + } + } + Y_UNIT_TEST(TestSleep) { // check does not throw Sleep(TDuration::Seconds(0)); |