diff options
author | Martin Braun <martin.braun@ettus.com> | 2018-04-26 13:13:32 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2018-05-02 17:01:21 -0700 |
commit | 5d9a7c92d3eb0a9cb719e6e6386d533da59a51db (patch) | |
tree | 024bda2ede2231784b55c48e1a23ab39fd97182d /host/tests/blockdef_test.cpp | |
parent | c52c0b69fc151c7596f9754e6b1e40dede531134 (diff) | |
download | uhd-5d9a7c92d3eb0a9cb719e6e6386d533da59a51db.tar.gz uhd-5d9a7c92d3eb0a9cb719e6e6386d533da59a51db.tar.bz2 uhd-5d9a7c92d3eb0a9cb719e6e6386d533da59a51db.zip |
lib: Purge use of boost::assign, except for uhd::dict
Replaced with initialization lists.
Note: uhd::dict does not work with initializer lists without making
changes to said data structure. This commit has no functional changes,
so keeping the boost::assigns for uhd::dict.
Diffstat (limited to 'host/tests/blockdef_test.cpp')
-rw-r--r-- | host/tests/blockdef_test.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/host/tests/blockdef_test.cpp b/host/tests/blockdef_test.cpp index dc0b40ea9..7779150be 100644 --- a/host/tests/blockdef_test.cpp +++ b/host/tests/blockdef_test.cpp @@ -8,7 +8,6 @@ #include <iostream> #include <map> #include <stdint.h> -#include <boost/assign/list_of.hpp> #include <boost/test/unit_test.hpp> #include <boost/format.hpp> #include <uhd/rfnoc/blockdef.hpp> @@ -16,24 +15,25 @@ using namespace uhd::rfnoc; BOOST_AUTO_TEST_CASE(test_lookup) { - std::map<uint64_t, std::string> blocknames = boost::assign::list_of< std::pair<uint64_t, std::string> > - (0, "NullSrcSink") - (0xFF70000000000000, "FFT") - (0xF112000000000001, "FIR") - (0xF1F0000000000000, "FIFO") - (0xD053000000000000, "Window") - (0x5CC0000000000000, "SchmidlCox") - ; - + const std::map<uint64_t, std::string> blocknames{ + {0, "NullSrcSink"}, + {0xFF70000000000000, "FFT"}, + {0xF112000000000001, "FIR"}, + {0xF1F0000000000000, "FIFO"}, + {0xD053000000000000, "Window"}, + {0x5CC0000000000000, "SchmidlCox"} + }; std::cout << blocknames.size() << std::endl; - for (std::map<uint64_t, std::string>::iterator it = blocknames.begin(); it != blocknames.end(); ++it) { - std::cout << "Testing " << it->second << " => " << str(boost::format("%016X") % it->first) << std::endl; - blockdef::sptr block_definition = blockdef::make_from_noc_id(it->first); + for (const auto block : blocknames) { + std::cout << "Testing " << block.second + << " => " << str(boost::format("%016X") % block.first) + << std::endl; + auto block_definition = blockdef::make_from_noc_id(block.first); // If the previous function fails, it'll return a NULL pointer BOOST_REQUIRE(block_definition); BOOST_CHECK(block_definition->is_block()); - BOOST_CHECK_EQUAL(block_definition->get_name(), it->second); + BOOST_CHECK_EQUAL(block_definition->get_name(), block.second); } } |