aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/dbg_output
diff options
context:
space:
mode:
authoryazevnul <yazevnul@yandex-team.ru>2022-02-10 16:46:46 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:46 +0300
commit8cbc307de0221f84c80c42dcbe07d40727537e2c (patch)
tree625d5a673015d1df891e051033e9fcde5c7be4e5 /library/cpp/dbg_output
parent30d1ef3941e0dc835be7609de5ebee66958f215a (diff)
downloadydb-8cbc307de0221f84c80c42dcbe07d40727537e2c.tar.gz
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/dbg_output')
-rw-r--r--library/cpp/dbg_output/auto.h4
-rw-r--r--library/cpp/dbg_output/colorscheme.h14
-rw-r--r--library/cpp/dbg_output/dump.h4
-rw-r--r--library/cpp/dbg_output/dumpers.h8
-rw-r--r--library/cpp/dbg_output/engine.h6
-rw-r--r--library/cpp/dbg_output/ut/dbg_output_ut.cpp18
6 files changed, 27 insertions, 27 deletions
diff --git a/library/cpp/dbg_output/auto.h b/library/cpp/dbg_output/auto.h
index 8d96167f6a..1fdfcae0e2 100644
--- a/library/cpp/dbg_output/auto.h
+++ b/library/cpp/dbg_output/auto.h
@@ -4,7 +4,7 @@
// int a = 1, b = 2; Cout << LabeledDump(a, b, 1 + 2); yields {"a": 1, "b": 2, "1 + 2": 3}
#define LabeledDump(...) \
- '{' Y_PASS_VA_ARGS(Y_MAP_ARGS_WITH_LAST(__LABELED_DUMP_NONLAST__, __LABELED_DUMP_IMPL__, __VA_ARGS__)) << '}'
+ '{' Y_PASS_VA_ARGS(Y_MAP_ARGS_WITH_LAST(__LABELED_DUMP_NONLAST__, __LABELED_DUMP_IMPL__, __VA_ARGS__)) << '}'
#define __LABELED_DUMP_IMPL__(x) << "\"" #x "\": " << DbgDump(x)
#define __LABELED_DUMP_NONLAST__(x) __LABELED_DUMP_IMPL__(x) << ", "
@@ -15,7 +15,7 @@
struct TDumper<C> { \
template <class S> \
static inline void Dump(S& s, const C& v) { \
- s << DumpRaw("{") Y_PASS_VA_ARGS(Y_MAP_ARGS_WITH_LAST(__DEFINE_DUMPER_NONLAST__, __DEFINE_DUMPER_IMPL__, __VA_ARGS__)) << DumpRaw("}"); \
+ s << DumpRaw("{") Y_PASS_VA_ARGS(Y_MAP_ARGS_WITH_LAST(__DEFINE_DUMPER_NONLAST__, __DEFINE_DUMPER_IMPL__, __VA_ARGS__)) << DumpRaw("}"); \
} \
};
#define __DEFINE_DUMPER_IMPL__(x) << DumpRaw("\"" #x "\": ") << v.x
diff --git a/library/cpp/dbg_output/colorscheme.h b/library/cpp/dbg_output/colorscheme.h
index a5b9cf749a..1d6862d76a 100644
--- a/library/cpp/dbg_output/colorscheme.h
+++ b/library/cpp/dbg_output/colorscheme.h
@@ -17,27 +17,27 @@ namespace NDbgDump {
struct TPlain {
// Foreground color modifiers
DBG_OUTPUT_COLOR_HANDLER(Markup) {
- Y_UNUSED(stream);
+ Y_UNUSED(stream);
}
DBG_OUTPUT_COLOR_HANDLER(String) {
- Y_UNUSED(stream);
+ Y_UNUSED(stream);
}
DBG_OUTPUT_COLOR_HANDLER(Literal) {
- Y_UNUSED(stream);
+ Y_UNUSED(stream);
}
DBG_OUTPUT_COLOR_HANDLER(ResetType) {
- Y_UNUSED(stream);
+ Y_UNUSED(stream);
}
// Background color modifiers
DBG_OUTPUT_COLOR_HANDLER(Key) {
- Y_UNUSED(stream);
+ Y_UNUSED(stream);
}
DBG_OUTPUT_COLOR_HANDLER(Value) {
- Y_UNUSED(stream);
+ Y_UNUSED(stream);
}
DBG_OUTPUT_COLOR_HANDLER(ResetRole) {
- Y_UNUSED(stream);
+ Y_UNUSED(stream);
}
};
diff --git a/library/cpp/dbg_output/dump.h b/library/cpp/dbg_output/dump.h
index c7efa105ee..448f1a8f5a 100644
--- a/library/cpp/dbg_output/dump.h
+++ b/library/cpp/dbg_output/dump.h
@@ -71,7 +71,7 @@ namespace NPrivate {
{
}
- inline void DumpTo(IOutputStream& out) const {
+ inline void DumpTo(IOutputStream& out) const {
typename TTraits::TDump d(out, Indent);
d << *T_;
@@ -88,7 +88,7 @@ namespace NPrivate {
};
template <class T, class TTraits>
- static inline IOutputStream& operator<<(IOutputStream& out, const TDbgDump<T, TTraits>& d) {
+ static inline IOutputStream& operator<<(IOutputStream& out, const TDbgDump<T, TTraits>& d) {
d.DumpTo(out);
return out;
diff --git a/library/cpp/dbg_output/dumpers.h b/library/cpp/dbg_output/dumpers.h
index 4868e97da0..fca6c58920 100644
--- a/library/cpp/dbg_output/dumpers.h
+++ b/library/cpp/dbg_output/dumpers.h
@@ -48,7 +48,7 @@ struct TDumper<TCopyPtr<T, C, D>> {
};
//small ints
-// Default dumper prints them via IOutputStream << (value), which results in raw
+// Default dumper prints them via IOutputStream << (value), which results in raw
// chars, not integer values. Cast to a bigger int type to force printing as
// integers.
// NB: i8 = signed char != char != unsigned char = ui8
@@ -102,10 +102,10 @@ template <class T>
struct TDumper<TArrayRef<T>>: public TSeqDumper {
};
-template <class T, size_t N>
+template <class T, size_t N>
struct TDumper<std::array<T, N>>: public TSeqDumper {
-};
-
+};
+
template <class T, class A>
struct TDumper<TDeque<T, A>>: public TSeqDumper {
};
diff --git a/library/cpp/dbg_output/engine.h b/library/cpp/dbg_output/engine.h
index f13c728c39..111a00a019 100644
--- a/library/cpp/dbg_output/engine.h
+++ b/library/cpp/dbg_output/engine.h
@@ -31,14 +31,14 @@ namespace NDumpPrivate {
}
struct TDumpBase: public ::NDumpPrivate::TADLBase {
- inline TDumpBase(IOutputStream& out, bool indent) noexcept
+ inline TDumpBase(IOutputStream& out, bool indent) noexcept
: Out(&out)
, IndentLevel(0)
, Indent(indent)
{
}
- inline IOutputStream& Stream() const noexcept {
+ inline IOutputStream& Stream() const noexcept {
return *Out;
}
@@ -50,7 +50,7 @@ struct TDumpBase: public ::NDumpPrivate::TADLBase {
void Raw(const TStringBuf& s);
- IOutputStream* Out;
+ IOutputStream* Out;
size_t IndentLevel;
bool Indent;
};
diff --git a/library/cpp/dbg_output/ut/dbg_output_ut.cpp b/library/cpp/dbg_output/ut/dbg_output_ut.cpp
index 7b285c84cb..7406a76bef 100644
--- a/library/cpp/dbg_output/ut/dbg_output_ut.cpp
+++ b/library/cpp/dbg_output/ut/dbg_output_ut.cpp
@@ -31,14 +31,14 @@ namespace TMyNS {
}
DEFINE_DUMPER(TMyNS::TMyStruct, A, B)
-Y_UNIT_TEST_SUITE(TContainerPrintersTest) {
- Y_UNIT_TEST(TestVectorInt) {
+Y_UNIT_TEST_SUITE(TContainerPrintersTest) {
+ Y_UNIT_TEST(TestVectorInt) {
TStringStream out;
out << DbgDump(TVector<int>({1, 2, 3, 4, 5}));
UNIT_ASSERT_STRINGS_EQUAL(out.Str(), "[1, 2, 3, 4, 5]");
}
- Y_UNIT_TEST(TestMapCharToCharArray) {
+ Y_UNIT_TEST(TestMapCharToCharArray) {
TStringStream out;
TMap<char, const char*> m;
@@ -51,7 +51,7 @@ Y_UNIT_TEST_SUITE(TContainerPrintersTest) {
UNIT_ASSERT_STRINGS_EQUAL(out.Str(), "{'a' -> \"SMALL LETTER A\", 'b' -> (empty)}");
}
- Y_UNIT_TEST(TestVectorOfVectors) {
+ Y_UNIT_TEST(TestVectorOfVectors) {
TStringStream out;
TVector<TVector<wchar16>> vec(2);
vec[0].push_back(0);
@@ -60,24 +60,24 @@ Y_UNIT_TEST_SUITE(TContainerPrintersTest) {
UNIT_ASSERT_STRINGS_EQUAL(out.Str(), "[[w'\\0'], [w'a']]");
}
- Y_UNIT_TEST(TestInfinite) {
+ Y_UNIT_TEST(TestInfinite) {
UNIT_ASSERT(!!(TStringBuilder() << DbgDumpDeep(TX())));
}
- Y_UNIT_TEST(TestLabeledDump) {
+ Y_UNIT_TEST(TestLabeledDump) {
TStringStream out;
int a = 1, b = 2;
out << LabeledDump(a, b, 1 + 2);
UNIT_ASSERT_STRINGS_EQUAL(out.Str(), "{\"a\": 1, \"b\": 2, \"1 + 2\": 3}");
}
- Y_UNIT_TEST(TestStructDumper) {
+ Y_UNIT_TEST(TestStructDumper) {
TStringStream out;
out << DbgDump(TMyNS::TMyStruct{3, 4});
UNIT_ASSERT_STRINGS_EQUAL(out.Str(), "{\"A\": 3, \"B\": 4}");
}
- Y_UNIT_TEST(TestColors) {
+ Y_UNIT_TEST(TestColors) {
using TComplex = TMap<TString, TMap<int, char>>;
TComplex test;
test["a"][1] = '7';
@@ -95,7 +95,7 @@ Y_UNIT_TEST_SUITE(TContainerPrintersTest) {
"\\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) {
+ Y_UNIT_TEST(SmallIntOrChar) {
char c = 'e';
i8 i = -100;
ui8 u = 10;