From bfe2612069c3f60bcf67f99ccb70d5b5ba98e63d Mon Sep 17 00:00:00 2001 From: Andrey Gusakov Date: Thu, 25 Jun 2026 19:53:05 +0300 Subject: [PATCH 1/2] tests: fix typo --- util/test/test_fragments.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/test/test_fragments.cpp b/util/test/test_fragments.cpp index be5a3e9..888a6c1 100644 --- a/util/test/test_fragments.cpp +++ b/util/test/test_fragments.cpp @@ -139,7 +139,7 @@ TEST(Util_Fragments, fragments) { uint8_t expected[] = {15, 0, 0}; ret = copyRange(buffer, fragments, 14, 3); // returned amout of copied data, does not include zeroed bytes - EXPECT_TRUE(ret = 1); + EXPECT_TRUE(ret == 1); EXPECT_TRUE( 0 == std::memcmp(buffer, expected, sizeof(expected))); uint8_t *ptr; From a8127bcd80f5c8cd192387bbce9d8c68dc90cd2f Mon Sep 17 00:00:00 2001 From: Andrey Gusakov Date: Thu, 25 Jun 2026 19:53:27 +0300 Subject: [PATCH 2/2] tests: fragments: fix test Now we expect copyRange() to return total size of data copyed and zeroed. --- util/test/test_fragments.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/test/test_fragments.cpp b/util/test/test_fragments.cpp index 888a6c1..6ed2b05 100644 --- a/util/test/test_fragments.cpp +++ b/util/test/test_fragments.cpp @@ -138,8 +138,8 @@ TEST(Util_Fragments, fragments) { // Check overlap between second fragment and null fragment uint8_t expected[] = {15, 0, 0}; ret = copyRange(buffer, fragments, 14, 3); - // returned amout of copied data, does not include zeroed bytes - EXPECT_TRUE(ret == 1); + // returned amout of copied data and zeroed bytes + EXPECT_TRUE(ret == 3); EXPECT_TRUE( 0 == std::memcmp(buffer, expected, sizeof(expected))); uint8_t *ptr;