From 876d4150aa3da531ddd687b48afada6e43f79146 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Mon, 2 Mar 2020 15:25:13 -0800 Subject: uhd: Apply clang-format against all .cpp and .hpp files in host/ Note: template_lvbitx.{cpp,hpp} need to be excluded from the list of files that clang-format gets applied against. --- host/tests/rx_streamer_test.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'host/tests/rx_streamer_test.cpp') diff --git a/host/tests/rx_streamer_test.cpp b/host/tests/rx_streamer_test.cpp index 953b82028..f50fef613 100644 --- a/host/tests/rx_streamer_test.cpp +++ b/host/tests/rx_streamer_test.cpp @@ -6,9 +6,9 @@ #include "../common/mock_link.hpp" #include -#include #include #include +#include namespace uhd { namespace transport { @@ -774,7 +774,7 @@ BOOST_AUTO_TEST_CASE(test_recv_one_channel_one_eov) // only one, since filling the EOV vector results in an early // termination of `recv()` (which we don't want here). std::vector eov_positions(2); - metadata.eov_positions = eov_positions.data(); + metadata.eov_positions = eov_positions.data(); metadata.eov_positions_size = eov_positions.size(); std::cout << "receiving packet " << i << std::endl; @@ -805,8 +805,8 @@ BOOST_AUTO_TEST_CASE(test_recv_two_channel_aggregate_eov) const std::vector eov_every_nth_packet{3, 5}; const size_t num_chans = eov_every_nth_packet.size(); - auto recv_links = make_links(num_chans); - auto streamer = make_rx_streamer(recv_links, format); + auto recv_links = make_links(num_chans); + auto streamer = make_rx_streamer(recv_links, format); const size_t spp = streamer->get_max_num_samps(); const size_t num_samps = spp * NUM_PACKETS; @@ -825,13 +825,13 @@ BOOST_AUTO_TEST_CASE(test_recv_two_channel_aggregate_eov) for (size_t ch = 0; ch < num_chans; ch++) { header.eob = false; header.has_tsf = false; - header.eov = ((i + 1) % eov_every_nth_packet[ch]) == 0; + header.eov = ((i + 1) % eov_every_nth_packet[ch]) == 0; push_back_recv_packet(recv_links[ch], header, spp); eov |= header.eov; } - if(eov) { + if (eov) { expected_eov_offsets.push_back(spp * (i + 1)); } } @@ -839,15 +839,14 @@ BOOST_AUTO_TEST_CASE(test_recv_two_channel_aggregate_eov) uhd::rx_metadata_t metadata; std::vector eov_positions(expected_eov_offsets.size() + 1); - metadata.eov_positions = eov_positions.data(); + metadata.eov_positions = eov_positions.data(); metadata.eov_positions_size = eov_positions.size(); - size_t num_samps_ret = - streamer->recv(buffers, num_samps, metadata, 1.0, false); + size_t num_samps_ret = streamer->recv(buffers, num_samps, metadata, 1.0, false); BOOST_CHECK_EQUAL(num_samps_ret, num_samps); BOOST_CHECK_EQUAL(metadata.eov_positions_count, expected_eov_offsets.size()); - for(size_t i = 0; i < metadata.eov_positions_count; i++) { + for (size_t i = 0; i < metadata.eov_positions_count; i++) { BOOST_CHECK_EQUAL(expected_eov_offsets[i], metadata.eov_positions[i]); } } -- cgit v1.2.3