aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/testing/unittest
diff options
context:
space:
mode:
authorRuslan Kovalev <ruslan.a.kovalev@gmail.com>2022-02-10 16:46:45 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:45 +0300
commit9123176b341b6f2658cff5132482b8237c1416c8 (patch)
tree49e222ea1c5804306084bb3ae065bb702625360f /library/cpp/testing/unittest
parent59e19371de37995fcb36beb16cd6ec030af960bc (diff)
downloadydb-9123176b341b6f2658cff5132482b8237c1416c8.tar.gz
Restoring authorship annotation for Ruslan Kovalev <ruslan.a.kovalev@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/testing/unittest')
-rw-r--r--library/cpp/testing/unittest/registar.cpp24
-rw-r--r--library/cpp/testing/unittest/registar.h28
-rw-r--r--library/cpp/testing/unittest/tests_data.h2
3 files changed, 27 insertions, 27 deletions
diff --git a/library/cpp/testing/unittest/registar.cpp b/library/cpp/testing/unittest/registar.cpp
index 7679b6647c..3679b768ed 100644
--- a/library/cpp/testing/unittest/registar.cpp
+++ b/library/cpp/testing/unittest/registar.cpp
@@ -74,13 +74,13 @@ NUnitTest::TTestBase* ::NUnitTest::NPrivate::GetCurrentTest() {
struct TDiffColorizer {
NColorizer::TColors Colors;
- bool Reverse = false;
+ bool Reverse = false;
- explicit TDiffColorizer(bool reverse = false)
- : Reverse(reverse)
+ explicit TDiffColorizer(bool reverse = false)
+ : Reverse(reverse)
{
}
-
+
TString Special(TStringBuf str) const {
return ToString(Colors.YellowColor()) + str;
}
@@ -96,14 +96,14 @@ struct TDiffColorizer {
TString Right(TArrayRef<const char> str) const {
return ToString(GetRightColor()) + TString(str.begin(), str.end());
}
-
- TStringBuf GetLeftColor() const {
- return Reverse ? Colors.RedColor() : Colors.GreenColor();
- }
-
- TStringBuf GetRightColor() const {
- return Reverse ? Colors.GreenColor() : Colors.RedColor();
- }
+
+ TStringBuf GetLeftColor() const {
+ return Reverse ? Colors.RedColor() : Colors.GreenColor();
+ }
+
+ TStringBuf GetRightColor() const {
+ return Reverse ? Colors.GreenColor() : Colors.RedColor();
+ }
};
struct TTraceDiffFormatter {
diff --git a/library/cpp/testing/unittest/registar.h b/library/cpp/testing/unittest/registar.h
index 45da84eaca..44517a0092 100644
--- a/library/cpp/testing/unittest/registar.h
+++ b/library/cpp/testing/unittest/registar.h
@@ -1,4 +1,4 @@
-#pragma once
+#pragma once
#include <library/cpp/dbg_output/dump.h>
@@ -15,7 +15,7 @@
#include <util/string/builder.h>
#include <util/string/cast.h>
#include <util/string/printf.h>
-
+
#include <util/system/defaults.h>
#include <util/system/type_name.h>
#include <util/system/spinlock.h>
@@ -382,7 +382,7 @@ public: \
} \
} while (false)
-//doubles
+//doubles
// UNIT_ASSERT_DOUBLES_EQUAL_DEPRECATED* macros do not handle NaNs correctly (see IGNIETFERRO-1419) and are for backward compatibility
// only. Consider switching to regular UNIT_ASSERT_DOUBLES_EQUAL* macros if you're still using the deprecated version.
#define UNIT_ASSERT_DOUBLES_EQUAL_DEPRECATED_C(E, A, D, C) \
@@ -422,9 +422,9 @@ public: \
} \
} while (false)
-#define UNIT_ASSERT_DOUBLES_EQUAL(E, A, D) UNIT_ASSERT_DOUBLES_EQUAL_C(E, A, D, "")
+#define UNIT_ASSERT_DOUBLES_EQUAL(E, A, D) UNIT_ASSERT_DOUBLES_EQUAL_C(E, A, D, "")
-//strings
+//strings
#define UNIT_ASSERT_STRINGS_EQUAL_C(A, B, C) \
do { \
const TString _a(A); \
@@ -435,7 +435,7 @@ public: \
} \
} while (false)
-#define UNIT_ASSERT_STRINGS_EQUAL(A, B) UNIT_ASSERT_STRINGS_EQUAL_C(A, B, "")
+#define UNIT_ASSERT_STRINGS_EQUAL(A, B) UNIT_ASSERT_STRINGS_EQUAL_C(A, B, "")
#define UNIT_ASSERT_STRING_CONTAINS_C(A, B, C) \
do { \
@@ -471,7 +471,7 @@ public: \
#define UNIT_ASSERT_STRINGS_UNEQUAL(A, B) UNIT_ASSERT_STRINGS_UNEQUAL_C(A, B, "")
-//bool
+//bool
#define UNIT_ASSERT_C(A, C) \
do { \
if (!(A)) { \
@@ -479,9 +479,9 @@ public: \
} \
} while (false)
-#define UNIT_ASSERT(A) UNIT_ASSERT_C(A, "")
+#define UNIT_ASSERT(A) UNIT_ASSERT_C(A, "")
-//general
+//general
#define UNIT_ASSERT_EQUAL_C(A, B, C) \
do { \
if (!((A) == (B))) { \
@@ -489,7 +489,7 @@ public: \
} \
} while (false)
-#define UNIT_ASSERT_EQUAL(A, B) UNIT_ASSERT_EQUAL_C(A, B, "")
+#define UNIT_ASSERT_EQUAL(A, B) UNIT_ASSERT_EQUAL_C(A, B, "")
#define UNIT_ASSERT_UNEQUAL_C(A, B, C) \
do { \
@@ -498,8 +498,8 @@ public: \
} \
} while (false)
-#define UNIT_ASSERT_UNEQUAL(A, B) UNIT_ASSERT_UNEQUAL_C(A, B, "")
-
+#define UNIT_ASSERT_UNEQUAL(A, B) UNIT_ASSERT_UNEQUAL_C(A, B, "")
+
#define UNIT_ASSERT_LT_C(A, B, C) \
do { \
if (!((A) < (B))) { \
@@ -703,7 +703,7 @@ public: \
}
}
-//values
+//values
#define UNIT_ASSERT_VALUES_EQUAL_IMPL(A, B, C, EQflag, EQstr, NEQstr) \
do { \
TString _as; \
@@ -727,7 +727,7 @@ public: \
#define UNIT_ASSERT_VALUES_UNEQUAL_C(A, B, C) \
UNIT_ASSERT_VALUES_EQUAL_IMPL(A, B, C, false, "!=", "==")
-#define UNIT_ASSERT_VALUES_EQUAL(A, B) UNIT_ASSERT_VALUES_EQUAL_C(A, B, "")
+#define UNIT_ASSERT_VALUES_EQUAL(A, B) UNIT_ASSERT_VALUES_EQUAL_C(A, B, "")
#define UNIT_ASSERT_VALUES_UNEQUAL(A, B) UNIT_ASSERT_VALUES_UNEQUAL_C(A, B, "")
// Checks that test will fail while executing given expression
diff --git a/library/cpp/testing/unittest/tests_data.h b/library/cpp/testing/unittest/tests_data.h
index bc93f5f59c..6536bc1ae6 100644
--- a/library/cpp/testing/unittest/tests_data.h
+++ b/library/cpp/testing/unittest/tests_data.h
@@ -1,4 +1,4 @@
-#pragma once
+#pragma once
#include <library/cpp/testing/common/env.h>