diff options
author | Anton Samokhvalov <pg83@yandex.ru> | 2022-02-10 16:45:15 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:15 +0300 |
commit | 72cb13b4aff9bc9cf22e49251bc8fd143f82538f (patch) | |
tree | da2c34829458c7d4e74bdfbdf85dff449e9e7fb8 /util/system/byteorder_ut.cpp | |
parent | 778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5 (diff) | |
download | ydb-72cb13b4aff9bc9cf22e49251bc8fd143f82538f.tar.gz |
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 1 of 2.
Diffstat (limited to 'util/system/byteorder_ut.cpp')
-rw-r--r-- | util/system/byteorder_ut.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/util/system/byteorder_ut.cpp b/util/system/byteorder_ut.cpp index 39b8603d3f..3d75d9cfdd 100644 --- a/util/system/byteorder_ut.cpp +++ b/util/system/byteorder_ut.cpp @@ -1,26 +1,26 @@ -#include "byteorder.h" - +#include "byteorder.h" + #include <library/cpp/testing/unittest/registar.h> class TByteOrderTest: public TTestBase { - UNIT_TEST_SUITE(TByteOrderTest); - UNIT_TEST(TestSwap16) - UNIT_TEST(TestSwap32) - UNIT_TEST(TestSwap64) - UNIT_TEST_SUITE_END(); - -private: - inline void TestSwap16() { - UNIT_ASSERT_EQUAL((ui16)0x1234, SwapBytes((ui16)0x3412)); - } - - inline void TestSwap32() { - UNIT_ASSERT_EQUAL(0x12345678, SwapBytes(0x78563412)); - } - - inline void TestSwap64() { - UNIT_ASSERT_EQUAL(0x1234567890abcdefULL, SwapBytes((ui64)ULL(0xefcdab9078563412))); - } + UNIT_TEST_SUITE(TByteOrderTest); + UNIT_TEST(TestSwap16) + UNIT_TEST(TestSwap32) + UNIT_TEST(TestSwap64) + UNIT_TEST_SUITE_END(); + +private: + inline void TestSwap16() { + UNIT_ASSERT_EQUAL((ui16)0x1234, SwapBytes((ui16)0x3412)); + } + + inline void TestSwap32() { + UNIT_ASSERT_EQUAL(0x12345678, SwapBytes(0x78563412)); + } + + inline void TestSwap64() { + UNIT_ASSERT_EQUAL(0x1234567890abcdefULL, SwapBytes((ui64)ULL(0xefcdab9078563412))); + } }; UNIT_TEST_SUITE_REGISTRATION(TByteOrderTest); |