aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic/bitops_ut.cpp
diff options
context:
space:
mode:
authorAlexander Fokin <apfokin@gmail.com>2022-02-10 16:45:38 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:38 +0300
commit863a59a65247c24db7cb06789bc5cf79d04da32f (patch)
tree139dc000c8cd4a40f5659e421b7c75135d080307 /util/generic/bitops_ut.cpp
parentf64e95a9eb9ab03240599eb9581c5a9102426a96 (diff)
downloadydb-863a59a65247c24db7cb06789bc5cf79d04da32f.tar.gz
Restoring authorship annotation for Alexander Fokin <apfokin@gmail.com>. Commit 1 of 2.
Diffstat (limited to 'util/generic/bitops_ut.cpp')
-rw-r--r--util/generic/bitops_ut.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/util/generic/bitops_ut.cpp b/util/generic/bitops_ut.cpp
index d23c2b5c27..3d1f7e9575 100644
--- a/util/generic/bitops_ut.cpp
+++ b/util/generic/bitops_ut.cpp
@@ -65,7 +65,7 @@ Y_UNIT_TEST_SUITE(TBitOpsTest) {
UNIT_ASSERT(IsPowerOf2(0x1000000000000000ull));
UNIT_ASSERT(!IsPowerOf2(0x1000000000000001ull));
}
-
+
Y_UNIT_TEST(TestFastClp2) {
TestFastClp2ForEachPowerOf2<unsigned>();
TestFastClp2ForEachPowerOf2<unsigned long>();
@@ -89,7 +89,7 @@ Y_UNIT_TEST_SUITE(TBitOpsTest) {
for (ui32 i = 0; i < 64; ++i) {
UNIT_ASSERT_VALUES_EQUAL(i, MostSignificantBit(ui64{1} << i));
}
-
+
for (ui32 i = 0; i < 63; ++i) {
UNIT_ASSERT_VALUES_EQUAL(i + 1, MostSignificantBit(ui64{3} << i));
}
@@ -99,17 +99,17 @@ Y_UNIT_TEST_SUITE(TBitOpsTest) {
for (ui32 i = 0; i < 64; ++i) {
UNIT_ASSERT_VALUES_EQUAL(i, LeastSignificantBit(ui64{1} << i));
}
-
+
for (ui32 i = 0; i < 63; ++i) {
UNIT_ASSERT_VALUES_EQUAL(i, LeastSignificantBit(ui64{3} << i));
}
-
+
for (ui32 i = 0; i < 64; ++i) {
ui64 value = (ui64(-1)) << i;
UNIT_ASSERT_VALUES_EQUAL(i, LeastSignificantBit(value));
}
- }
-
+ }
+
Y_UNIT_TEST(TestCeilLog2) {
UNIT_ASSERT_VALUES_EQUAL(CeilLog2(ui64{1}), 1);