2222using boost::redis::request;
2323using boost::redis::adapter::adapt2;
2424using boost::redis::adapter::result;
25- using boost::redis::generic_response ;
25+ using boost::redis::resp3::tree ;
2626using boost::redis::resp3::flat_tree;
2727using boost::redis::ignore_t ;
2828using boost::redis::resp3::detail::deserialize;
@@ -350,43 +350,35 @@ node from_node_view(node_view const& v)
350350 return ret;
351351}
352352
353- generic_response from_flat (flat_tree const & resp)
353+ tree from_flat (flat_tree const & resp)
354354{
355- generic_response ret;
355+ tree ret;
356356 for (auto const & e: resp.get_view ())
357- ret.value (). push_back (from_node_view (e));
357+ ret.push_back (from_node_view (e));
358358
359359 return ret;
360360}
361361
362- // Parses the same data into a generic_response and a
362+ // Parses the same data into a tree and a
363363// flat_tree, they should be equal to each other.
364- BOOST_AUTO_TEST_CASE (generic_flat_resps_views_are_set )
364+ BOOST_AUTO_TEST_CASE (flat_tree_views_are_set )
365365{
366- using boost::redis::resp3::node_view;
367- using boost::redis::resp3::type;
368-
369- generic_response resp1;
366+ tree resp1;
370367 flat_tree fresp;
371368
372369 deserialize (resp3_set, adapt2 (resp1));
373370 deserialize (resp3_set, adapt2 (fresp));
374371
375- BOOST_TEST (resp1.has_value ());
376-
377372 BOOST_CHECK_EQUAL (fresp.get_reallocs (), 1u );
378373 BOOST_CHECK_EQUAL (fresp.get_total_msgs (), 1u );
379374
380375 auto const resp2 = from_flat (fresp);
381- BOOST_CHECK_EQUAL (resp1. value () , resp2. value () );
376+ BOOST_CHECK_EQUAL (resp1, resp2);
382377}
383378
384379// The response should be reusable.
385- BOOST_AUTO_TEST_CASE (generic_flat_resp_reuse )
380+ BOOST_AUTO_TEST_CASE (flat_tree_reuse )
386381{
387- using boost::redis::resp3::node_view;
388- using boost::redis::resp3::type;
389-
390382 flat_tree tmp;
391383
392384 // First use
@@ -408,11 +400,8 @@ BOOST_AUTO_TEST_CASE(generic_flat_resp_reuse)
408400 BOOST_CHECK_EQUAL (resp1, tmp.get_view ());
409401}
410402
411- BOOST_AUTO_TEST_CASE (generic_flat_resp_copy_assign )
403+ BOOST_AUTO_TEST_CASE (flat_tree_copy_assign )
412404{
413- using boost::redis::resp3::node_view;
414- using boost::redis::resp3::type;
415-
416405 flat_tree resp;
417406 deserialize (resp3_set, adapt2 (resp));
418407
0 commit comments