diff options
author | Anton Samokhvalov <pg83@yandex.ru> | 2022-02-10 16:45:17 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:17 +0300 |
commit | d3a398281c6fd1d3672036cb2d63f842d2cb28c5 (patch) | |
tree | dd4bd3ca0f36b817e96812825ffaf10d645803f2 /library/cpp/packers/ut | |
parent | 72cb13b4aff9bc9cf22e49251bc8fd143f82538f (diff) | |
download | ydb-d3a398281c6fd1d3672036cb2d63f842d2cb28c5.tar.gz |
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/packers/ut')
-rw-r--r-- | library/cpp/packers/ut/packers_ut.cpp | 50 | ||||
-rw-r--r-- | library/cpp/packers/ut/proto_packer_ut.cpp | 2 |
2 files changed, 26 insertions, 26 deletions
diff --git a/library/cpp/packers/ut/packers_ut.cpp b/library/cpp/packers/ut/packers_ut.cpp index 65a817f9b2..18ce2150d1 100644 --- a/library/cpp/packers/ut/packers_ut.cpp +++ b/library/cpp/packers/ut/packers_ut.cpp @@ -1,11 +1,11 @@ #include <library/cpp/testing/unittest/registar.h> - + #include <util/stream/output.h> #include <utility> - -#include <util/charset/wide.h> + +#include <util/charset/wide.h> #include <util/generic/algorithm.h> -#include <util/generic/buffer.h> +#include <util/generic/buffer.h> #include <util/generic/map.h> #include <util/generic/vector.h> #include <util/generic/ptr.h> @@ -13,19 +13,19 @@ #include <util/folder/dirut.h> -#include <util/random/random.h> - +#include <util/random/random.h> + #include <util/string/hex.h> #include "packers.h" - + #include <array> #include <iterator> -class TPackersTest: public TTestBase { +class TPackersTest: public TTestBase { private: UNIT_TEST_SUITE(TPackersTest); - UNIT_TEST(TestPackers); + UNIT_TEST(TestPackers); UNIT_TEST_SUITE_END(); template <class TData, class TPacker> @@ -66,44 +66,44 @@ void TPackersTest::TestPacker(const TData* test, size_t size) { void TPackersTest::TestPackers() { { - const TString test[] = {"", - "a", "b", "c", "d", - "aa", "ab", "ac", "ad", - "aaa", "aab", "aac", "aad", - "aba", "abb", "abc", "abd", - "asdfjjmk.gjilsjgilsjilgjildsajgfilsjdfilgjm ldsa8oq43u 583uq4905 -q435 jiores u893q 5oiju fd-KE 89536 9Q2URE 12AI894T3 89 Q*(re43"}; + const TString test[] = {"", + "a", "b", "c", "d", + "aa", "ab", "ac", "ad", + "aaa", "aab", "aac", "aad", + "aba", "abb", "abc", "abd", + "asdfjjmk.gjilsjgilsjilgjildsajgfilsjdfilgjm ldsa8oq43u 583uq4905 -q435 jiores u893q 5oiju fd-KE 89536 9Q2URE 12AI894T3 89 Q*(re43"}; - TestPacker<TString, NPackers::TPacker<TString>>(test, Y_ARRAY_SIZE(test)); + TestPacker<TString, NPackers::TPacker<TString>>(test, Y_ARRAY_SIZE(test)); for (size_t i = 0; i != Y_ARRAY_SIZE(test); ++i) { - TestPacker<TUtf16String, NPackers::TPacker<TUtf16String>>(UTF8ToWide(test[i])); + TestPacker<TUtf16String, NPackers::TPacker<TUtf16String>>(UTF8ToWide(test[i])); } } { const ui64 test[] = { - 0, 1, 2, 3, 4, 5, 6, 76, 100000, Max<ui64>()}; + 0, 1, 2, 3, 4, 5, 6, 76, 100000, Max<ui64>()}; - TestPacker<ui64, NPackers::TPacker<ui64>>(test, Y_ARRAY_SIZE(test)); + TestPacker<ui64, NPackers::TPacker<ui64>>(test, Y_ARRAY_SIZE(test)); } { const int test[] = { - 0, 1, 2, 3, 4, 5, 6, 76, 100000, -1, -2, -3, -4, -5, -6, -76, -10000, Min<int>(), Max<int>()}; + 0, 1, 2, 3, 4, 5, 6, 76, 100000, -1, -2, -3, -4, -5, -6, -76, -10000, Min<int>(), Max<int>()}; - TestPacker<int, NPackers::TPacker<int>>(test, Y_ARRAY_SIZE(test)); + TestPacker<int, NPackers::TPacker<int>>(test, Y_ARRAY_SIZE(test)); } { const float test[] = { 2.f, 3.f, 4.f, 0.f, -0.f, 1.f, -1.f, 1.1f, -1.1f, - std::numeric_limits<float>::min(), -std::numeric_limits<float>::min(), - std::numeric_limits<float>::max(), -std::numeric_limits<float>::max()}; + std::numeric_limits<float>::min(), -std::numeric_limits<float>::min(), + std::numeric_limits<float>::max(), -std::numeric_limits<float>::max()}; TestPacker<float, NPackers::TFloatPacker>(test, Y_ARRAY_SIZE(test)); } { const double test[] = { 0., -0., 1., -1., 1.1, -1.1, - std::numeric_limits<double>::min(), -std::numeric_limits<double>::min(), - std::numeric_limits<double>::max(), -std::numeric_limits<double>::max()}; + std::numeric_limits<double>::min(), -std::numeric_limits<double>::min(), + std::numeric_limits<double>::max(), -std::numeric_limits<double>::max()}; TestPacker<double, NPackers::TDoublePacker>(test, Y_ARRAY_SIZE(test)); } diff --git a/library/cpp/packers/ut/proto_packer_ut.cpp b/library/cpp/packers/ut/proto_packer_ut.cpp index 2c5838323b..e4151ba68c 100644 --- a/library/cpp/packers/ut/proto_packer_ut.cpp +++ b/library/cpp/packers/ut/proto_packer_ut.cpp @@ -26,7 +26,7 @@ void FillRepeatedFields(TTestMessage& msg) { } // do not want to use google/protobuf/util/message_differencer because of warnings -bool operator==(const TTestMessage& lhs, const TTestMessage& rhs) { +bool operator==(const TTestMessage& lhs, const TTestMessage& rhs) { if (lhs.GetRequiredString() != rhs.GetRequiredString() || lhs.GetRequiredInt32() != rhs.GetRequiredInt32() || lhs.HasOptionalString() != rhs.HasOptionalString() || |