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/nocscript_expr_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/nocscript_expr_test.cpp')
-rw-r--r-- | host/tests/nocscript_expr_test.cpp | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/host/tests/nocscript_expr_test.cpp b/host/tests/nocscript_expr_test.cpp index 68990ba56..19b4345c2 100644 --- a/host/tests/nocscript_expr_test.cpp +++ b/host/tests/nocscript_expr_test.cpp @@ -63,7 +63,7 @@ BOOST_AUTO_TEST_CASE(test_literals) expression_literal literal_int_vec("[1, 2, 3]", expression::TYPE_INT_VECTOR); BOOST_CHECK_EQUAL(literal_int_vec.infer_type(), expression::TYPE_INT_VECTOR); - std::vector<int> test_data = boost::assign::list_of(1)(2)(3); + std::vector<int> test_data{1, 2, 3}; std::vector<int> result = literal_int_vec.get_int_vector(); BOOST_CHECK_EQUAL_COLLECTIONS(test_data.begin(), test_data.end(), result.begin(), result.end()); @@ -345,19 +345,9 @@ BOOST_AUTO_TEST_CASE(test_functable_mockup) BOOST_CHECK_EQUAL(functable.get_type("ADD", two_double_args), expression::TYPE_DOUBLE); BOOST_CHECK_EQUAL(functable.get_type("XOR", two_bool_args), expression::TYPE_BOOL); - expression_container::expr_list_type add_args_int = - boost::assign::list_of(E(2))(E(3)) - ; - expression_container::expr_list_type add_args_dbl = - boost::assign::list_of - (E(2.25)) - (E(5.0)) - ; - expression_container::expr_list_type xor_args_bool = - boost::assign::list_of - (E(true)) - (E(false)) - ; + expression_container::expr_list_type add_args_int{E(2), E(3)}; + expression_container::expr_list_type add_args_dbl{E(2.25), E(5.0)}; + expression_container::expr_list_type xor_args_bool{E(true), E(false)}; BOOST_CHECK_EQUAL(functable.eval("ADD", two_int_args, add_args_int), expression_literal(5)); BOOST_CHECK_EQUAL(functable.eval("ADD", two_double_args, add_args_dbl), expression_literal(7.25)); |