diff options
Diffstat (limited to 'host/tests')
-rw-r--r-- | host/tests/common/mock_zero_copy.cpp | 2 | ||||
-rw-r--r-- | host/tests/common/mock_zero_copy.hpp | 6 | ||||
-rw-r--r-- | host/tests/expert_test.cpp | 8 | ||||
-rw-r--r-- | host/tests/packet_handler_benchmark.cpp | 16 | ||||
-rw-r--r-- | host/tests/rx_streamer_test.cpp | 6 | ||||
-rw-r--r-- | host/tests/sph_recv_test.cpp | 10 | ||||
-rw-r--r-- | host/tests/streamer_benchmark.cpp | 18 | ||||
-rw-r--r-- | host/tests/tx_streamer_test.cpp | 10 |
8 files changed, 38 insertions, 38 deletions
diff --git a/host/tests/common/mock_zero_copy.cpp b/host/tests/common/mock_zero_copy.cpp index 0843a0274..8b9e04f64 100644 --- a/host/tests/common/mock_zero_copy.cpp +++ b/host/tests/common/mock_zero_copy.cpp @@ -6,7 +6,7 @@ #include "mock_zero_copy.hpp" -#include <boost/shared_ptr.hpp> +#include <memory> using namespace uhd::transport; diff --git a/host/tests/common/mock_zero_copy.hpp b/host/tests/common/mock_zero_copy.hpp index 515fde498..16a64f5a1 100644 --- a/host/tests/common/mock_zero_copy.hpp +++ b/host/tests/common/mock_zero_copy.hpp @@ -13,9 +13,9 @@ #include <uhd/transport/zero_copy.hpp> #include <uhd/types/endianness.hpp> #include <uhd/utils/byteswap.hpp> -#include <boost/make_shared.hpp> +#include <memory> #include <boost/shared_array.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> #include <list> #include <vector> @@ -71,7 +71,7 @@ private: class mock_zero_copy : public uhd::transport::zero_copy_if { public: - typedef boost::shared_ptr<mock_zero_copy> sptr; + typedef std::shared_ptr<mock_zero_copy> sptr; mock_zero_copy(uhd::transport::vrt::if_packet_info_t::link_type_t type, size_t recv_frame_size = DEFAULT_RECV_FRAME_SIZE, diff --git a/host/tests/expert_test.cpp b/host/tests/expert_test.cpp index 36a9ef03b..99e3c1100 100644 --- a/host/tests/expert_test.cpp +++ b/host/tests/expert_test.cpp @@ -9,7 +9,7 @@ #include <uhdlib/experts/expert_container.hpp> #include <uhdlib/experts/expert_factory.hpp> #include <boost/format.hpp> -#include <boost/make_shared.hpp> +#include <memory> #include <boost/test/unit_test.hpp> #include <fstream> @@ -112,7 +112,7 @@ private: class worker5_t : public worker_node_t { public: - worker5_t(const node_retriever_t& db, boost::shared_ptr<int> output) + worker5_t(const node_retriever_t& db, std::shared_ptr<int> output) : worker_node_t("Consume_G"), _g(db, "G"), _c(db, "C"), _output(output) { bind_accessor(_g); @@ -128,7 +128,7 @@ private: data_reader_t<int> _g; data_writer_t<int> _c; - boost::shared_ptr<int> _output; + std::shared_ptr<int> _output; }; class worker6_t : public worker_node_t @@ -174,7 +174,7 @@ BOOST_AUTO_TEST_CASE(test_experts) uhd::property_tree::sptr tree = uhd::property_tree::make(); // Output of expert tree - boost::shared_ptr<int> final_output = boost::make_shared<int>(); + std::shared_ptr<int> final_output = std::make_shared<int>(); // Add data nodes to container expert_factory::add_dual_prop_node<int>( diff --git a/host/tests/packet_handler_benchmark.cpp b/host/tests/packet_handler_benchmark.cpp index d0a28bdc2..bf21b0c2b 100644 --- a/host/tests/packet_handler_benchmark.cpp +++ b/host/tests/packet_handler_benchmark.cpp @@ -56,7 +56,7 @@ struct rx_fc_cache_t }; inline bool rx_flow_ctrl( - boost::shared_ptr<rx_fc_cache_t> fc_cache, uhd::transport::managed_buffer::sptr buff) + std::shared_ptr<rx_fc_cache_t> fc_cache, uhd::transport::managed_buffer::sptr buff) { // If the caller supplied a buffer if (buff) { @@ -92,7 +92,7 @@ inline bool rx_flow_ctrl( } inline void handle_rx_flowctrl_ack( - boost::shared_ptr<rx_fc_cache_t> /*fc_cache*/, const uint32_t* /*payload*/) + std::shared_ptr<rx_fc_cache_t> /*fc_cache*/, const uint32_t* /*payload*/) { // For the benchmark, we should never reach this UHD_THROW_INVALID_CODE_PATH(); @@ -119,7 +119,7 @@ struct tx_fc_cache_t pack; }; -inline bool tx_flow_ctrl(boost::shared_ptr<tx_fc_cache_t> fc_cache, +inline bool tx_flow_ctrl(std::shared_ptr<tx_fc_cache_t> fc_cache, uhd::transport::zero_copy_if::sptr /*xport*/, uhd::transport::managed_buffer::sptr buff) { @@ -151,7 +151,7 @@ inline bool tx_flow_ctrl(boost::shared_ptr<tx_fc_cache_t> fc_cache, return false; } -inline void tx_flow_ctrl_ack(boost::shared_ptr<tx_fc_cache_t> fc_cache, +inline void tx_flow_ctrl_ack(std::shared_ptr<tx_fc_cache_t> fc_cache, uhd::transport::zero_copy_if::sptr /*send_xport*/) { if (not fc_cache->fc_received) { @@ -187,7 +187,7 @@ void benchmark_recv_packet_handler(const size_t spp, const std::string& format) xport->set_reuse_recv_memory(true); // Configure xport flow control - boost::shared_ptr<rx_fc_cache_t> fc_cache(new rx_fc_cache_t()); + std::shared_ptr<rx_fc_cache_t> fc_cache(new rx_fc_cache_t()); fc_cache->to_host = uhd::ntohx<uint32_t>; fc_cache->from_host = uhd::htonx<uint32_t>; fc_cache->pack = vrt::chdr::if_hdr_pack_be; @@ -201,7 +201,7 @@ void benchmark_recv_packet_handler(const size_t spp, const std::string& format) }); // Create streamer - auto streamer = boost::make_shared<sph::recv_packet_streamer>(spp); + auto streamer = std::make_shared<sph::recv_packet_streamer>(spp); streamer->set_tick_rate(1.0); streamer->set_samp_rate(1.0); @@ -260,7 +260,7 @@ void benchmark_send_packet_handler( xport->set_reuse_send_memory(true); // Configure flow control - boost::shared_ptr<tx_fc_cache_t> fc_cache(new tx_fc_cache_t()); + std::shared_ptr<tx_fc_cache_t> fc_cache(new tx_fc_cache_t()); fc_cache->to_host = uhd::ntohx<uint32_t>; fc_cache->from_host = uhd::htonx<uint32_t>; fc_cache->pack = vrt::chdr::if_hdr_pack_be; @@ -274,7 +274,7 @@ void benchmark_send_packet_handler( 0); // Create streamer - auto streamer = boost::make_shared<sph::send_packet_streamer>(spp); + auto streamer = std::make_shared<sph::send_packet_streamer>(spp); streamer->set_vrt_packer(&vrt::chdr::if_hdr_pack_be); // Configure converter diff --git a/host/tests/rx_streamer_test.cpp b/host/tests/rx_streamer_test.cpp index cd4daf569..1b1311908 100644 --- a/host/tests/rx_streamer_test.cpp +++ b/host/tests/rx_streamer_test.cpp @@ -6,7 +6,7 @@ #include "../common/mock_link.hpp" #include <uhdlib/transport/rx_streamer_impl.hpp> -#include <boost/make_shared.hpp> +#include <memory> #include <boost/test/unit_test.hpp> #include <iostream> @@ -148,13 +148,13 @@ static std::vector<mock_recv_link::sptr> make_links(const size_t num) return links; } -static boost::shared_ptr<mock_rx_streamer> make_rx_streamer( +static std::shared_ptr<mock_rx_streamer> make_rx_streamer( std::vector<mock_recv_link::sptr> recv_links, const std::string& host_format, const std::string& otw_format = "sc16") { const uhd::stream_args_t stream_args(host_format, otw_format); - auto streamer = boost::make_shared<mock_rx_streamer>(recv_links.size(), stream_args); + auto streamer = std::make_shared<mock_rx_streamer>(recv_links.size(), stream_args); streamer->set_tick_rate(TICK_RATE); streamer->set_samp_rate(SAMP_RATE); diff --git a/host/tests/sph_recv_test.cpp b/host/tests/sph_recv_test.cpp index 3c185d21a..5685028d6 100644 --- a/host/tests/sph_recv_test.cpp +++ b/host/tests/sph_recv_test.cpp @@ -336,7 +336,7 @@ BOOST_AUTO_TEST_CASE(test_sph_recv_multi_channel_normal) std::vector<mock_zero_copy::sptr> xports; for (size_t i = 0; i < NCHANNELS; i++) { xports.push_back( - boost::make_shared<mock_zero_copy>(vrt::if_packet_info_t::LINK_TYPE_VRLP)); + std::make_shared<mock_zero_copy>(vrt::if_packet_info_t::LINK_TYPE_VRLP)); } // generate a bunch of packets @@ -432,7 +432,7 @@ BOOST_AUTO_TEST_CASE(test_sph_recv_multi_channel_sequence_error) std::vector<mock_zero_copy::sptr> xports; for (size_t i = 0; i < NCHANNELS; i++) { xports.push_back( - boost::make_shared<mock_zero_copy>(vrt::if_packet_info_t::LINK_TYPE_VRLP)); + std::make_shared<mock_zero_copy>(vrt::if_packet_info_t::LINK_TYPE_VRLP)); } // generate a bunch of packets @@ -540,7 +540,7 @@ BOOST_AUTO_TEST_CASE(test_sph_recv_multi_channel_time_error) std::vector<mock_zero_copy::sptr> xports; for (size_t i = 0; i < NCHANNELS; i++) { xports.push_back( - boost::make_shared<mock_zero_copy>(vrt::if_packet_info_t::LINK_TYPE_VRLP)); + std::make_shared<mock_zero_copy>(vrt::if_packet_info_t::LINK_TYPE_VRLP)); } // generate a bunch of packets @@ -642,7 +642,7 @@ BOOST_AUTO_TEST_CASE(test_sph_recv_multi_channel_exception) std::vector<mock_zero_copy::sptr> xports; for (size_t i = 0; i < NCHANNELS; i++) { xports.push_back( - boost::make_shared<mock_zero_copy>(vrt::if_packet_info_t::LINK_TYPE_VRLP)); + std::make_shared<mock_zero_copy>(vrt::if_packet_info_t::LINK_TYPE_VRLP)); } // generate a bunch of packets @@ -720,7 +720,7 @@ BOOST_AUTO_TEST_CASE(test_sph_recv_multi_channel_fragment) std::vector<mock_zero_copy::sptr> xports; for (size_t i = 0; i < NCHANNELS; i++) { xports.push_back( - boost::make_shared<mock_zero_copy>(vrt::if_packet_info_t::LINK_TYPE_VRLP)); + std::make_shared<mock_zero_copy>(vrt::if_packet_info_t::LINK_TYPE_VRLP)); } // generate a bunch of packets diff --git a/host/tests/streamer_benchmark.cpp b/host/tests/streamer_benchmark.cpp index 46ba6add0..02aa102a0 100644 --- a/host/tests/streamer_benchmark.cpp +++ b/host/tests/streamer_benchmark.cpp @@ -12,7 +12,7 @@ #include <uhdlib/transport/inline_io_service.hpp> #include <uhdlib/transport/rx_streamer_impl.hpp> #include <uhdlib/transport/tx_streamer_impl.hpp> -#include <boost/make_shared.hpp> +#include <memory> #include <boost/program_options.hpp> #include <chrono> #include <iostream> @@ -219,11 +219,11 @@ using tx_streamer_mock_link = mock_tx_streamer<chdr_tx_data_xport>; /*! * Helper functions */ -static boost::shared_ptr<rx_streamer_mock_xport> make_rx_streamer_mock_xport( +static std::shared_ptr<rx_streamer_mock_xport> make_rx_streamer_mock_xport( const size_t spp, const std::string& format) { const uhd::stream_args_t stream_args(format, "sc16"); - auto streamer = boost::make_shared<rx_streamer_mock_xport>(1, stream_args); + auto streamer = std::make_shared<rx_streamer_mock_xport>(1, stream_args); streamer->set_tick_rate(TICK_RATE); streamer->set_samp_rate(SAMP_RATE); streamer->set_scale_factor(0, SCALE_FACTOR); @@ -238,11 +238,11 @@ static boost::shared_ptr<rx_streamer_mock_xport> make_rx_streamer_mock_xport( return streamer; } -static boost::shared_ptr<tx_streamer_mock_xport> make_tx_streamer_mock_xport( +static std::shared_ptr<tx_streamer_mock_xport> make_tx_streamer_mock_xport( const size_t spp, const std::string& format) { const uhd::stream_args_t stream_args(format, "sc16"); - auto streamer = boost::make_shared<tx_streamer_mock_xport>(1, stream_args); + auto streamer = std::make_shared<tx_streamer_mock_xport>(1, stream_args); streamer->set_tick_rate(TICK_RATE); streamer->set_samp_rate(SAMP_RATE); streamer->set_scale_factor(0, SCALE_FACTOR); @@ -257,11 +257,11 @@ static boost::shared_ptr<tx_streamer_mock_xport> make_tx_streamer_mock_xport( return streamer; } -static boost::shared_ptr<rx_streamer_mock_link> make_rx_streamer_mock_link( +static std::shared_ptr<rx_streamer_mock_link> make_rx_streamer_mock_link( const size_t spp, const std::string& format) { const uhd::stream_args_t stream_args(format, "sc16"); - auto streamer = boost::make_shared<rx_streamer_mock_link>(1, stream_args); + auto streamer = std::make_shared<rx_streamer_mock_link>(1, stream_args); streamer->set_tick_rate(TICK_RATE); streamer->set_samp_rate(SAMP_RATE); streamer->set_scale_factor(0, SCALE_FACTOR); @@ -307,11 +307,11 @@ static boost::shared_ptr<rx_streamer_mock_link> make_rx_streamer_mock_link( return streamer; } -static boost::shared_ptr<tx_streamer_mock_link> make_tx_streamer_mock_link( +static std::shared_ptr<tx_streamer_mock_link> make_tx_streamer_mock_link( const size_t spp, const std::string& format) { const uhd::stream_args_t stream_args(format, "sc16"); - auto streamer = boost::make_shared<tx_streamer_mock_link>(1, stream_args); + auto streamer = std::make_shared<tx_streamer_mock_link>(1, stream_args); streamer->set_tick_rate(TICK_RATE); streamer->set_samp_rate(SAMP_RATE); streamer->set_scale_factor(0, SCALE_FACTOR); diff --git a/host/tests/tx_streamer_test.cpp b/host/tests/tx_streamer_test.cpp index 686c1b761..09c8357df 100644 --- a/host/tests/tx_streamer_test.cpp +++ b/host/tests/tx_streamer_test.cpp @@ -6,7 +6,7 @@ #include "../common/mock_link.hpp" #include <uhdlib/transport/tx_streamer_impl.hpp> -#include <boost/make_shared.hpp> +#include <memory> #include <boost/test/unit_test.hpp> #include <iostream> @@ -121,11 +121,11 @@ static std::vector<mock_send_link::sptr> make_links(const size_t num) return links; } -static boost::shared_ptr<mock_tx_streamer> make_tx_streamer( +static std::shared_ptr<mock_tx_streamer> make_tx_streamer( std::vector<mock_send_link::sptr> send_links, const std::string& format) { const uhd::stream_args_t stream_args(format, "sc16"); - auto streamer = boost::make_shared<mock_tx_streamer>(send_links.size(), stream_args); + auto streamer = std::make_shared<mock_tx_streamer>(send_links.size(), stream_args); streamer->set_tick_rate(TICK_RATE); streamer->set_samp_rate(SAMP_RATE); @@ -379,7 +379,7 @@ BOOST_AUTO_TEST_CASE(test_spp) auto send_links = make_links(1); uhd::stream_args_t stream_args("fc64", "sc16"); stream_args.args["spp"] = std::to_string(10); - auto streamer = boost::make_shared<mock_tx_streamer>(send_links.size(), stream_args); + auto streamer = std::make_shared<mock_tx_streamer>(send_links.size(), stream_args); mock_tx_data_xport::uptr xport(std::make_unique<mock_tx_data_xport>(send_links[0])); streamer->connect_channel(0, std::move(xport)); BOOST_CHECK_EQUAL(streamer->get_max_num_samps(), 10); @@ -390,7 +390,7 @@ BOOST_AUTO_TEST_CASE(test_spp) auto send_links = make_links(1); uhd::stream_args_t stream_args("fc64", "sc16"); stream_args.args["spp"] = std::to_string(10000); - auto streamer = boost::make_shared<mock_tx_streamer>(send_links.size(), stream_args); + auto streamer = std::make_shared<mock_tx_streamer>(send_links.size(), stream_args); mock_tx_data_xport::uptr xport(std::make_unique<mock_tx_data_xport>(send_links[0])); const size_t max_pyld = xport->get_max_payload_size(); streamer->connect_channel(0, std::move(xport)); |