Skip to content

Commit aaab37c

Browse files
robertfalkenbergcodebot
authored andcommitted
adt: fix byte_buffer_test of concatenated vectors
1 parent 458b773 commit aaab37c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/unittests/adt/byte_buffer_test.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,8 @@ TEST_P(two_vector_size_param_test, shallow_copy_and_append)
396396
ASSERT_EQ(pdu.length(), pdu.end() - pdu.begin()) << "shallow copied-from byte_buffer::length() got corrupted";
397397
ASSERT_EQ(pdu2.length(), pdu2.end() - pdu2.begin()) << "shallow copy byte_buffer::length() got corrupted";
398398
}
399-
ASSERT_EQ_BUFFER(pdu, concat_vec(bytes1, bytes2));
399+
auto combined = concat_vec(bytes1, bytes2);
400+
ASSERT_EQ_BUFFER(pdu, combined);
400401
ASSERT_EQ(pdu.length(), pdu.end() - pdu.begin());
401402
}
402403

@@ -416,7 +417,8 @@ TEST_P(three_vector_size_param_test, shallow_copy_prepend_and_append)
416417
ASSERT_EQ(pdu.length(), pdu.end() - pdu.begin()) << "shallow copied-from byte_buffer::length() got corrupted";
417418
ASSERT_EQ(pdu2.length(), pdu2.end() - pdu2.begin()) << "shallow copy byte_buffer::length() got corrupted";
418419
}
419-
ASSERT_EQ_BUFFER(pdu, concat_vec(bytes2, concat_vec(bytes1, bytes3)));
420+
auto combined = concat_vec(bytes2, concat_vec(bytes1, bytes3));
421+
ASSERT_EQ_BUFFER(pdu, combined);
420422
ASSERT_EQ(pdu.length(), pdu.end() - pdu.begin());
421423
}
422424

0 commit comments

Comments
 (0)