diff options
author | Martin Braun <martin.braun@ettus.com> | 2020-03-02 15:25:13 -0800 |
---|---|---|
committer | atrnati <54334261+atrnati@users.noreply.github.com> | 2020-03-03 08:51:32 -0600 |
commit | 876d4150aa3da531ddd687b48afada6e43f79146 (patch) | |
tree | fd72a71419f4cd800d4e500cfcaded4dfc8dc367 /host/tests/rfnoc_chdr_test.cpp | |
parent | 1393553d623bdf4ba40d5435c9719b6ce990d9ac (diff) | |
download | uhd-876d4150aa3da531ddd687b48afada6e43f79146.tar.gz uhd-876d4150aa3da531ddd687b48afada6e43f79146.tar.bz2 uhd-876d4150aa3da531ddd687b48afada6e43f79146.zip |
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.
Diffstat (limited to 'host/tests/rfnoc_chdr_test.cpp')
-rw-r--r-- | host/tests/rfnoc_chdr_test.cpp | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/host/tests/rfnoc_chdr_test.cpp b/host/tests/rfnoc_chdr_test.cpp index 1c63d5976..747b3c6a4 100644 --- a/host/tests/rfnoc_chdr_test.cpp +++ b/host/tests/rfnoc_chdr_test.cpp @@ -226,28 +226,24 @@ BOOST_AUTO_TEST_CASE(chdr_strc_packet_no_swap_64) BOOST_AUTO_TEST_CASE(chdr_generic_packet_calculate_pyld_offset_64) { // Check calculation without timestamp - auto test_pyld_offset = [](chdr_packet::uptr& pkt, - const packet_type_t pkt_type, - const size_t num_mdata) - { - uint64_t buff[MAX_BUF_SIZE_WORDS]; - chdr_header header; - header.set_pkt_type(pkt_type); - header.set_num_mdata(num_mdata); + auto test_pyld_offset = + [](chdr_packet::uptr& pkt, const packet_type_t pkt_type, const size_t num_mdata) { + uint64_t buff[MAX_BUF_SIZE_WORDS]; + chdr_header header; + header.set_pkt_type(pkt_type); + header.set_num_mdata(num_mdata); - pkt->refresh(reinterpret_cast<void*>(buff), header, 0); + pkt->refresh(reinterpret_cast<void*>(buff), header, 0); - const size_t pyld_offset = pkt->calculate_payload_offset( - pkt_type, num_mdata); + const size_t pyld_offset = pkt->calculate_payload_offset(pkt_type, num_mdata); - void* pyld_ptr = pkt->get_payload_ptr(); + void* pyld_ptr = pkt->get_payload_ptr(); - const size_t non_pyld_bytes = static_cast<size_t>( - reinterpret_cast<uint8_t*>(pyld_ptr) - - reinterpret_cast<uint8_t*>(buff)); + const size_t non_pyld_bytes = static_cast<size_t>( + reinterpret_cast<uint8_t*>(pyld_ptr) - reinterpret_cast<uint8_t*>(buff)); - BOOST_CHECK(pyld_offset == non_pyld_bytes); - }; + BOOST_CHECK(pyld_offset == non_pyld_bytes); + }; { chdr_packet::uptr pkt = chdr64_be_factory.make_generic(); |