aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/dbg_output/ut/dbg_output_ut.cpp
diff options
context:
space:
mode:
authorAnton Samokhvalov <pg83@yandex.ru>2022-02-10 16:45:15 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:15 +0300
commit72cb13b4aff9bc9cf22e49251bc8fd143f82538f (patch)
treeda2c34829458c7d4e74bdfbdf85dff449e9e7fb8 /library/cpp/dbg_output/ut/dbg_output_ut.cpp
parent778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5 (diff)
downloadydb-72cb13b4aff9bc9cf22e49251bc8fd143f82538f.tar.gz
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/dbg_output/ut/dbg_output_ut.cpp')
-rw-r--r--library/cpp/dbg_output/ut/dbg_output_ut.cpp60
1 files changed, 30 insertions, 30 deletions
diff --git a/library/cpp/dbg_output/ut/dbg_output_ut.cpp b/library/cpp/dbg_output/ut/dbg_output_ut.cpp
index 7b285c84cb..509581e02e 100644
--- a/library/cpp/dbg_output/ut/dbg_output_ut.cpp
+++ b/library/cpp/dbg_output/ut/dbg_output_ut.cpp
@@ -6,24 +6,24 @@
#include <util/string/escape.h>
#include <util/generic/map.h>
-namespace {
- struct TX {
- inline TX() {
- N = this;
- }
-
- TX* N;
- };
-}
-
-template <>
-struct TDumper<TX> {
- template <class S>
- static inline void Dump(S& s, const TX& x) {
- s << DumpRaw("x") << x.N;
- }
-};
-
+namespace {
+ struct TX {
+ inline TX() {
+ N = this;
+ }
+
+ TX* N;
+ };
+}
+
+template <>
+struct TDumper<TX> {
+ template <class S>
+ static inline void Dump(S& s, const TX& x) {
+ s << DumpRaw("x") << x.N;
+ }
+};
+
namespace TMyNS {
struct TMyStruct {
int A, B;
@@ -40,14 +40,14 @@ Y_UNIT_TEST_SUITE(TContainerPrintersTest) {
Y_UNIT_TEST(TestMapCharToCharArray) {
TStringStream out;
-
+
TMap<char, const char*> m;
-
- m['a'] = "SMALL LETTER A";
- m['b'] = nullptr;
-
- out << DbgDump(m);
-
+
+ m['a'] = "SMALL LETTER A";
+ m['b'] = nullptr;
+
+ out << DbgDump(m);
+
UNIT_ASSERT_STRINGS_EQUAL(out.Str(), "{'a' -> \"SMALL LETTER A\", 'b' -> (empty)}");
}
@@ -56,13 +56,13 @@ Y_UNIT_TEST_SUITE(TContainerPrintersTest) {
TVector<TVector<wchar16>> vec(2);
vec[0].push_back(0);
vec[1] = {wchar16('a')};
- out << DbgDump(vec);
+ out << DbgDump(vec);
UNIT_ASSERT_STRINGS_EQUAL(out.Str(), "[[w'\\0'], [w'a']]");
}
-
+
Y_UNIT_TEST(TestInfinite) {
- UNIT_ASSERT(!!(TStringBuilder() << DbgDumpDeep(TX())));
- }
+ UNIT_ASSERT(!!(TStringBuilder() << DbgDumpDeep(TX())));
+ }
Y_UNIT_TEST(TestLabeledDump) {
TStringStream out;
@@ -92,7 +92,7 @@ Y_UNIT_TEST_SUITE(TContainerPrintersTest) {
"\\x1B[22;39m\\x1B[22;39m\\x1B[49m\\x1B[1;32m, \\x1B[1;31m\\x1B[42m\\x1B[1;31m\\x1B[1;33m"
"\\\"b\\\"\\x1B[22;39m\\x1B[22;39m\\x1B[49m\\x1B[1;32m -> "
"\\x1B[44m\\x1B[1;31m\\x1B[1;32m{\\x1B[1;31m\\x1B[1;31m2\\x1B[22;39m\\x1B[1;32m -> "
- "\\x1B[1;31m'6'\\x1B[22;39m\\x1B[1;32m}\\x1B[22;39m\\x1B[22;39m\\x1B[49m\\x1B[1;32m}\\x1B[22;39m");
+ "\\x1B[1;31m'6'\\x1B[22;39m\\x1B[1;32m}\\x1B[22;39m\\x1B[22;39m\\x1B[49m\\x1B[1;32m}\\x1B[22;39m");
}
Y_UNIT_TEST(SmallIntOrChar) {