diff options
author | akhropov <akhropov@yandex-team.ru> | 2022-02-10 16:46:32 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:32 +0300 |
commit | 298c6da79f1d8f35089a67f463f0b541bec36d9b (patch) | |
tree | 1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /util/draft/memory_ut.cpp | |
parent | 00afc96e9c0298054b7386fa7fb9e3cc3d67b974 (diff) | |
download | ydb-298c6da79f1d8f35089a67f463f0b541bec36d9b.tar.gz |
Restoring authorship annotation for <akhropov@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/draft/memory_ut.cpp')
-rw-r--r-- | util/draft/memory_ut.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/util/draft/memory_ut.cpp b/util/draft/memory_ut.cpp index d683c870db..76bee30549 100644 --- a/util/draft/memory_ut.cpp +++ b/util/draft/memory_ut.cpp @@ -1,28 +1,28 @@ #include "memory.h" #include <library/cpp/testing/unittest/registar.h> - -#pragma pack(1) + +#pragma pack(1) struct Y_PACKED TSampleStruct1 { - ui8 A; - ui8 B; -}; - -#pragma pack(1) + ui8 A; + ui8 B; +}; + +#pragma pack(1) struct Y_PACKED TSampleStruct2 { - ui8 A; - ui16 B; - i32 C; -}; - -#pragma pack(1) + ui8 A; + ui16 B; + i32 C; +}; + +#pragma pack(1) struct Y_PACKED TSampleStruct3 { - TSampleStruct2 A; - ui64 B; -}; - -#pragma pack() - + TSampleStruct2 A; + ui64 B; +}; + +#pragma pack() + Y_UNIT_TEST_SUITE(TUtilDraftMemoryTest) { Y_UNIT_TEST(IsZeroTest) { ui8 a1 = 0; @@ -34,7 +34,7 @@ Y_UNIT_TEST_SUITE(TUtilDraftMemoryTest) { UNIT_ASSERT(!IsZero(a2)); a2 = 0; UNIT_ASSERT(IsZero(a2)); - + double a3 = 0.0; UNIT_ASSERT(IsZero(a3)); a3 = 1.e-13; @@ -47,7 +47,7 @@ Y_UNIT_TEST_SUITE(TUtilDraftMemoryTest) { ss1.A = 0; ss1.B = 12; UNIT_ASSERT(!IsZero(ss1)); - + TSampleStruct2 ss2; ss2.A = 0; ss2.B = 100; @@ -55,7 +55,7 @@ Y_UNIT_TEST_SUITE(TUtilDraftMemoryTest) { UNIT_ASSERT(!IsZero(ss2)); ss2.B = 0; UNIT_ASSERT(IsZero(ss2)); - + TSampleStruct3 ss3; ss3.A = ss2; ss3.B = 0; @@ -66,4 +66,4 @@ Y_UNIT_TEST_SUITE(TUtilDraftMemoryTest) { ss3.A.C = -789; UNIT_ASSERT(!IsZero(ss3)); } -} +} |