mirror of
https://github.com/EttusResearch/uhd.git
synced 2026-10-25 17:36:10 +00:00
tests: Fix check in link_test
The test_recv_get_release test should be checking received packets had the same content as they did on send(), but was instead assigning to the received buffer. Shoutouts to GitHub user johnwstanford for pointing out the issue.
This commit is contained in:
parent
ba18be72f6
commit
b06c01e436
@ -101,7 +101,7 @@ BOOST_AUTO_TEST_CASE(test_recv_get_release)
|
||||
for (size_t i = 0; i < 5; i++) {
|
||||
size_t packet_size = sizeof(uint8_t);
|
||||
auto packet_data = boost::shared_array<uint8_t>(new uint8_t[packet_size]);
|
||||
packet_data[0] = i;
|
||||
packet_data[0] = static_cast<uint8_t>(i);
|
||||
xport->push_back_recv_packet(packet_data, packet_size);
|
||||
|
||||
auto buff = xport->get_recv_buff(timeout_ms);
|
||||
@ -109,7 +109,7 @@ BOOST_AUTO_TEST_CASE(test_recv_get_release)
|
||||
BOOST_CHECK(buff->data());
|
||||
|
||||
auto* ptr = static_cast<uint8_t*>(buff->data());
|
||||
ptr[0] = i;
|
||||
BOOST_CHECK_EQUAL(ptr[0], static_cast<uint8_t>(i));
|
||||
|
||||
xport->release_recv_buff(std::move(buff));
|
||||
BOOST_CHECK(!buff);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user