diff options
author | Mikhail Borisov <borisov.mikhail@gmail.com> | 2022-02-10 16:45:39 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:39 +0300 |
commit | a6a92afe03e02795227d2641b49819b687f088f8 (patch) | |
tree | f6984a1d27d5a7ec88a6fdd6e20cd5b7693b6ece /library/cpp/dbg_output | |
parent | c6dc8b8bd530985bc4cce0137e9a5de32f1087cb (diff) | |
download | ydb-a6a92afe03e02795227d2641b49819b687f088f8.tar.gz |
Restoring authorship annotation for Mikhail Borisov <borisov.mikhail@gmail.com>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/dbg_output')
-rw-r--r-- | library/cpp/dbg_output/dumpers.h | 24 | ||||
-rw-r--r-- | library/cpp/dbg_output/ut/dbg_output_ut.cpp | 18 |
2 files changed, 21 insertions, 21 deletions
diff --git a/library/cpp/dbg_output/dumpers.h b/library/cpp/dbg_output/dumpers.h index 4868e97da0..2c9fc8c079 100644 --- a/library/cpp/dbg_output/dumpers.h +++ b/library/cpp/dbg_output/dumpers.h @@ -47,19 +47,19 @@ struct TDumper<TCopyPtr<T, C, D>> { } }; -//small ints +//small ints // 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 -template <> -struct TDumper<ui8>: public TDumper<i32> { -}; - -template <> -struct TDumper<i8>: public TDumper<i32> { -}; - +// chars, not integer values. Cast to a bigger int type to force printing as +// integers. +// NB: i8 = signed char != char != unsigned char = ui8 +template <> +struct TDumper<ui8>: public TDumper<i32> { +}; + +template <> +struct TDumper<i8>: public TDumper<i32> { +}; + //chars template <> struct TDumper<char>: public TCharDumper { diff --git a/library/cpp/dbg_output/ut/dbg_output_ut.cpp b/library/cpp/dbg_output/ut/dbg_output_ut.cpp index 7b285c84cb..568e612a38 100644 --- a/library/cpp/dbg_output/ut/dbg_output_ut.cpp +++ b/library/cpp/dbg_output/ut/dbg_output_ut.cpp @@ -2,7 +2,7 @@ #include <library/cpp/testing/unittest/registar.h> #include <util/stream/str.h> -#include <util/string/builder.h> +#include <util/string/builder.h> #include <util/string/escape.h> #include <util/generic/map.h> @@ -94,13 +94,13 @@ Y_UNIT_TEST_SUITE(TContainerPrintersTest) { "\\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"); } - + Y_UNIT_TEST(SmallIntOrChar) { - char c = 'e'; - i8 i = -100; - ui8 u = 10; - UNIT_ASSERT_VALUES_EQUAL(TStringBuilder() << DbgDump(c), "'e'"); - UNIT_ASSERT_VALUES_EQUAL(TStringBuilder() << DbgDump(i), "-100"); - UNIT_ASSERT_VALUES_EQUAL(TStringBuilder() << DbgDump(u), "10"); - } + char c = 'e'; + i8 i = -100; + ui8 u = 10; + UNIT_ASSERT_VALUES_EQUAL(TStringBuilder() << DbgDump(c), "'e'"); + UNIT_ASSERT_VALUES_EQUAL(TStringBuilder() << DbgDump(i), "-100"); + UNIT_ASSERT_VALUES_EQUAL(TStringBuilder() << DbgDump(u), "10"); + } } |