From 5d9a7c92d3eb0a9cb719e6e6386d533da59a51db Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Thu, 26 Apr 2018 13:13:32 -0700 Subject: 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. --- host/tests/nocscript_expr_test.cpp | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'host/tests/nocscript_expr_test.cpp') 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 test_data = boost::assign::list_of(1)(2)(3); + std::vector test_data{1, 2, 3}; std::vector 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)); -- cgit v1.2.3