aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic/ymath_ut.cpp
diff options
context:
space:
mode:
authornga <nga@yandex-team.ru>2022-02-10 16:48:09 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:48:09 +0300
commitc2a1af049e9deca890e9923abe64fe6c59060348 (patch)
treeb222e5ac2e2e98872661c51ccceee5da0d291e13 /util/generic/ymath_ut.cpp
parent1f553f46fb4f3c5eec631352cdd900a0709016af (diff)
downloadydb-c2a1af049e9deca890e9923abe64fe6c59060348.tar.gz
Restoring authorship annotation for <nga@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/generic/ymath_ut.cpp')
-rw-r--r--util/generic/ymath_ut.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/util/generic/ymath_ut.cpp b/util/generic/ymath_ut.cpp
index 18103fa3c9..29190b55eb 100644
--- a/util/generic/ymath_ut.cpp
+++ b/util/generic/ymath_ut.cpp
@@ -12,13 +12,13 @@ template <class T>
static inline T SlowClp2(T t) noexcept {
Y_ASSERT(t > 0);
- T ret = 1;
+ T ret = 1;
- while (ret < t) {
- ret *= 2;
+ while (ret < t) {
+ ret *= 2;
}
- return ret;
+ return ret;
}
class TMathTest: public TTestBase {
@@ -50,7 +50,7 @@ private:
inline void TestIsValidFloat() {
UNIT_ASSERT(IsValidFloat(-Max<double>() / 2.));
}
-
+
inline void TestClpSimple() {
UNIT_ASSERT_EQUAL(FastClp2<ui32>(12), 16);
UNIT_ASSERT_EQUAL(FastClp2<ui16>(11), 16);
@@ -83,19 +83,19 @@ void TMathTest::TestSqr() {
}
void TMathTest::TestClp2() {
- for (ui8 i = 1; i < 127; ++i) {
+ for (ui8 i = 1; i < 127; ++i) {
UNIT_ASSERT_EQUAL(SlowClp2(i), FastClp2(i));
}
- for (ui16 i = 1; i < 255; ++i) {
+ for (ui16 i = 1; i < 255; ++i) {
UNIT_ASSERT_EQUAL(SlowClp2(i), FastClp2(i));
}
- for (ui32 i = 1; i < 255; ++i) {
+ for (ui32 i = 1; i < 255; ++i) {
UNIT_ASSERT_EQUAL(SlowClp2(i), FastClp2(i));
}
- for (ui64 i = 1; i < 255; ++i) {
+ for (ui64 i = 1; i < 255; ++i) {
UNIT_ASSERT_EQUAL(SlowClp2(i), FastClp2(i));
}