aboutsummaryrefslogtreecommitdiffstats
path: root/util/datetime/base_ut.cpp
diff options
context:
space:
mode:
authorsvshevtsov <svshevtsov@yandex-team.ru>2022-02-10 16:49:37 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:37 +0300
commit657337012a264721d58c470b4e9e796611f3c492 (patch)
tree82753fd92cf7cc2dea4e522a945ed570131f920b /util/datetime/base_ut.cpp
parent44f31b316af517a4fbc6a82ebed8a1c51807deac (diff)
downloadydb-657337012a264721d58c470b4e9e796611f3c492.tar.gz
Restoring authorship annotation for <svshevtsov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/datetime/base_ut.cpp')
-rw-r--r--util/datetime/base_ut.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/util/datetime/base_ut.cpp b/util/datetime/base_ut.cpp
index afc3f802eb..7eb7adccef 100644
--- a/util/datetime/base_ut.cpp
+++ b/util/datetime/base_ut.cpp
@@ -459,38 +459,38 @@ Y_UNIT_TEST_SUITE(DateTimeTest) {
UNIT_ASSERT_VALUES_EQUAL(value.MicroSeconds(), 1234567);
}
- template <class T>
- void TestTimeUnits() {
+ template <class T>
+ void TestTimeUnits() {
T withTime = T::MicroSeconds(1249571946000000L);
T onlyMinutes = T::MicroSeconds(1249571940000000L);
T onlyHours = T::MicroSeconds(1249570800000000L);
T onlyDays = T::MicroSeconds(1249516800000000L);
- ui64 minutes = 20826199;
+ ui64 minutes = 20826199;
ui64 hours = 347103;
- ui64 days = 14462;
-
- UNIT_ASSERT_VALUES_EQUAL(withTime.Minutes(), minutes);
- UNIT_ASSERT_VALUES_EQUAL(onlyMinutes, T::Minutes(minutes));
- UNIT_ASSERT_VALUES_EQUAL(onlyMinutes.Minutes(), minutes);
-
+ ui64 days = 14462;
+
+ UNIT_ASSERT_VALUES_EQUAL(withTime.Minutes(), minutes);
+ UNIT_ASSERT_VALUES_EQUAL(onlyMinutes, T::Minutes(minutes));
+ UNIT_ASSERT_VALUES_EQUAL(onlyMinutes.Minutes(), minutes);
+
UNIT_ASSERT_VALUES_EQUAL(withTime.Hours(), hours);
- UNIT_ASSERT_VALUES_EQUAL(onlyMinutes.Hours(), hours);
- UNIT_ASSERT_VALUES_EQUAL(onlyHours, T::Hours(hours));
+ UNIT_ASSERT_VALUES_EQUAL(onlyMinutes.Hours(), hours);
+ UNIT_ASSERT_VALUES_EQUAL(onlyHours, T::Hours(hours));
UNIT_ASSERT_VALUES_EQUAL(onlyHours.Hours(), hours);
-
- UNIT_ASSERT_VALUES_EQUAL(withTime.Days(), days);
- UNIT_ASSERT_VALUES_EQUAL(onlyHours.Days(), days);
- UNIT_ASSERT_VALUES_EQUAL(onlyDays, T::Days(days));
- UNIT_ASSERT_VALUES_EQUAL(onlyDays.Days(), days);
+
+ UNIT_ASSERT_VALUES_EQUAL(withTime.Days(), days);
+ UNIT_ASSERT_VALUES_EQUAL(onlyHours.Days(), days);
+ UNIT_ASSERT_VALUES_EQUAL(onlyDays, T::Days(days));
+ UNIT_ASSERT_VALUES_EQUAL(onlyDays.Days(), days);
}
-
+
Y_UNIT_TEST(TestInstantUnits) {
- TestTimeUnits<TInstant>();
- }
-
+ TestTimeUnits<TInstant>();
+ }
+
Y_UNIT_TEST(TestDurationUnits) {
- TestTimeUnits<TDuration>();
- }
+ TestTimeUnits<TDuration>();
+ }
Y_UNIT_TEST(TestNoexceptConstruction) {
UNIT_ASSERT_EXCEPTION(TDuration::MilliSeconds(FromString(TStringBuf("not a number"))), yexception);