aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorSergey Polovko <sergey@polovko.me>2022-02-10 16:47:02 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:02 +0300
commit3e0b762a82514bac89c1dd6ea7211e381d8aa248 (patch)
treec2d1b379ecaf05ca8f11ed0b5da9d1a950e6e554 /util
parentab3783171cc30e262243a0227c86118f7080c896 (diff)
downloadydb-3e0b762a82514bac89c1dd6ea7211e381d8aa248.tar.gz
Restoring authorship annotation for Sergey Polovko <sergey@polovko.me>. Commit 1 of 2.
Diffstat (limited to 'util')
-rw-r--r--util/draft/datetime_ut.cpp10
-rw-r--r--util/generic/hash_ut.cpp6
-rw-r--r--util/generic/iterator_ut.cpp2
-rw-r--r--util/generic/lazy_value_ut.cpp2
-rw-r--r--util/generic/yexception_ut.cpp2
-rw-r--r--util/network/socket_ut.cpp2
-rw-r--r--util/system/guard_ut.cpp36
-rw-r--r--util/system/mem_info_ut.cpp4
8 files changed, 32 insertions, 32 deletions
diff --git a/util/draft/datetime_ut.cpp b/util/draft/datetime_ut.cpp
index a5e065ef6e..76f0508302 100644
--- a/util/draft/datetime_ut.cpp
+++ b/util/draft/datetime_ut.cpp
@@ -54,11 +54,11 @@ Y_UNIT_TEST_SUITE(TSimpleTMTest) {
Y_UNIT_TEST(TestLeap) {
using namespace NDatetime;
- UNIT_ASSERT(LeapYearAD(2000));
- UNIT_ASSERT(LeapYearAD(2012));
- UNIT_ASSERT(!LeapYearAD(1999));
- UNIT_ASSERT(LeapYearAD(2004));
- UNIT_ASSERT(!LeapYearAD(1900));
+ UNIT_ASSERT(LeapYearAD(2000));
+ UNIT_ASSERT(LeapYearAD(2012));
+ UNIT_ASSERT(!LeapYearAD(1999));
+ UNIT_ASSERT(LeapYearAD(2004));
+ UNIT_ASSERT(!LeapYearAD(1900));
}
Y_UNIT_TEST(TestYDayConversion) {
diff --git a/util/generic/hash_ut.cpp b/util/generic/hash_ut.cpp
index 0551d58770..81b30cf9f1 100644
--- a/util/generic/hash_ut.cpp
+++ b/util/generic/hash_ut.cpp
@@ -361,9 +361,9 @@ void THashTest::TestHMMapHas() {
m.insert(std::pair<const char, int>('X', 10));
m.insert(std::pair<const char, int>('X', 20));
m.insert(std::pair<const char, int>('Y', 32));
- UNIT_ASSERT(m.contains('X'));
- UNIT_ASSERT(m.contains('Y'));
- UNIT_ASSERT(!m.contains('Z'));
+ UNIT_ASSERT(m.contains('X'));
+ UNIT_ASSERT(m.contains('Y'));
+ UNIT_ASSERT(!m.contains('Z'));
}
void THashTest::TestHSetConstructorsAndAssignments() {
diff --git a/util/generic/iterator_ut.cpp b/util/generic/iterator_ut.cpp
index 00be19e10e..8c43f15b36 100644
--- a/util/generic/iterator_ut.cpp
+++ b/util/generic/iterator_ut.cpp
@@ -58,6 +58,6 @@ Y_UNIT_TEST_SUITE(TInputRangeAdaptor) {
UNIT_ASSERT_VALUES_EQUAL(part, *expected_part);
++expected_part;
}
- UNIT_ASSERT(expected_part == expected.end());
+ UNIT_ASSERT(expected_part == expected.end());
}
}
diff --git a/util/generic/lazy_value_ut.cpp b/util/generic/lazy_value_ut.cpp
index f6135880c3..586040a8c2 100644
--- a/util/generic/lazy_value_ut.cpp
+++ b/util/generic/lazy_value_ut.cpp
@@ -39,7 +39,7 @@ Y_UNIT_TEST_SUITE(TLazyValueTestSuite) {
TLazyValue<int> notEmptyCopy = value;
UNIT_ASSERT(notEmptyCopy);
- UNIT_ASSERT_EQUAL(*notEmptyCopy, 5);
+ UNIT_ASSERT_EQUAL(*notEmptyCopy, 5);
}
struct TCopyCounter {
diff --git a/util/generic/yexception_ut.cpp b/util/generic/yexception_ut.cpp
index cb3e29fed8..4d82779583 100644
--- a/util/generic/yexception_ut.cpp
+++ b/util/generic/yexception_ut.cpp
@@ -66,7 +66,7 @@ private:
throw;
}
} catch (...) {
- UNIT_ASSERT(CurrentExceptionMessage().Contains("ithappens"));
+ UNIT_ASSERT(CurrentExceptionMessage().Contains("ithappens"));
}
}
diff --git a/util/network/socket_ut.cpp b/util/network/socket_ut.cpp
index 6b20e11f70..c3911dd197 100644
--- a/util/network/socket_ut.cpp
+++ b/util/network/socket_ut.cpp
@@ -169,7 +169,7 @@ void TSockTest::TestBrokenPipe() {
void TSockTest::TestClose() {
SOCKET socks[2];
- UNIT_ASSERT_EQUAL(SocketPair(socks), 0);
+ UNIT_ASSERT_EQUAL(SocketPair(socks), 0);
TSocket receiver(socks[1]);
UNIT_ASSERT_EQUAL(static_cast<SOCKET>(receiver), socks[1]);
diff --git a/util/system/guard_ut.cpp b/util/system/guard_ut.cpp
index 404ede99ab..cab4ca9e37 100644
--- a/util/system/guard_ut.cpp
+++ b/util/system/guard_ut.cpp
@@ -13,7 +13,7 @@ struct TTestGuard: public TTestBase {
UNIT_TEST(TestSync)
UNIT_TEST(TestUnguard)
UNIT_TEST(TestTryReadGuard)
- UNIT_TEST(TestWithLock)
+ UNIT_TEST(TestWithLock)
UNIT_TEST(TestWithLockScope);
UNIT_TEST_SUITE_END();
@@ -119,11 +119,11 @@ struct TTestGuard: public TTestBase {
{
TTryGuard<TGuardChecker> guard(checker);
UNIT_ASSERT(checker.guarded);
- UNIT_ASSERT(guard.WasAcquired());
- {
+ UNIT_ASSERT(guard.WasAcquired());
+ {
TTryGuard<TGuardChecker> guard2(checker);
UNIT_ASSERT(checker.guarded);
- UNIT_ASSERT(!guard2.WasAcquired());
+ UNIT_ASSERT(!guard2.WasAcquired());
}
UNIT_ASSERT(checker.guarded);
}
@@ -152,21 +152,21 @@ struct TTestGuard: public TTestBase {
TTryReadGuard tryGuard(mutex);
UNIT_ASSERT(tryGuard.WasAcquired());
}
-
- int WithLockIncrement(TGuardChecker& m, int n) {
+
+ int WithLockIncrement(TGuardChecker& m, int n) {
with_lock (m) {
- UNIT_ASSERT(m.guarded);
- return n + 1;
- }
- }
-
- void TestWithLock() {
- TGuardChecker m;
- int n = 42;
- n = WithLockIncrement(m, n);
- UNIT_ASSERT(!m.guarded);
- UNIT_ASSERT_EQUAL(n, 43);
- }
+ UNIT_ASSERT(m.guarded);
+ return n + 1;
+ }
+ }
+
+ void TestWithLock() {
+ TGuardChecker m;
+ int n = 42;
+ n = WithLockIncrement(m, n);
+ UNIT_ASSERT(!m.guarded);
+ UNIT_ASSERT_EQUAL(n, 43);
+ }
void TestWithLockScope() {
auto Guard = [](auto) { UNIT_FAIL("Non global Guard used"); return 0; };
diff --git a/util/system/mem_info_ut.cpp b/util/system/mem_info_ut.cpp
index a1100ba646..2dcfc9c5c4 100644
--- a/util/system/mem_info_ut.cpp
+++ b/util/system/mem_info_ut.cpp
@@ -13,8 +13,8 @@ class TMemInfoTest: public NUnitTest::TTestBase {
TMemInfo stats = GetMemInfo();
- UNIT_ASSERT(stats.RSS >= NSystemInfo::GetPageSize());
- UNIT_ASSERT(stats.VMS >= stats.RSS);
+ UNIT_ASSERT(stats.RSS >= NSystemInfo::GetPageSize());
+ UNIT_ASSERT(stats.VMS >= stats.RSS);
}
};