Home
last modified time | relevance | path

Searched refs:cont (Results 1 – 25 of 469) sorted by relevance

12345678910>>...19

/third_party/boost/libs/range/test/algorithm_test/
Dpartial_sort.cpp31 void test_partial_sort(Container& cont, Iterator mid) in test_partial_sort()
33 const Container old_cont(cont); in test_partial_sort()
35 boost::partial_sort(cont, mid); in test_partial_sort()
37 const std::size_t index = std::distance(cont.begin(), mid); in test_partial_sort()
43 BOOST_CHECK_EQUAL_COLLECTIONS( cont.begin(), cont.end(), in test_partial_sort()
48 void reference_partial_sort(Container& cont, Iterator mid) in reference_partial_sort()
50 std::partial_sort(cont.begin(), mid, cont.end()); in reference_partial_sort()
58 void test_partial_sort(Container& cont, Iterator mid) in test_partial_sort()
60 const Container old_cont(cont); in test_partial_sort()
62 boost::partial_sort(cont, mid, BinaryPredicate()); in test_partial_sort()
[all …]
Dnth_element.cpp29 void test_nth_element(Container& cont, Iterator mid) in test_nth_element()
31 const Container old_cont(cont); in test_nth_element()
33 boost::nth_element(cont, mid); in test_nth_element()
39 const std::size_t index = std::distance(cont.begin(), mid); in test_nth_element()
44 BOOST_CHECK_EQUAL_COLLECTIONS( cont.begin(), cont.end(), in test_nth_element()
49 void reference_nth_element(Container& cont, Iterator mid) in reference_nth_element()
51 std::nth_element(cont.begin(), mid, cont.end()); in reference_nth_element()
59 void test_nth_element(Container& cont, Iterator mid) in test_nth_element()
61 const Container old_cont(cont); in test_nth_element()
63 boost::nth_element(cont, mid, BinaryPredicate()); in test_nth_element()
[all …]
Dunique.cpp35 test_iter(Container& cont) in test_iter() argument
39 return std::unique(cont.begin(), cont.end()); in test_iter()
47 operator()(Policy&, Container& cont) in operator ()()
51 Container cont2(cont); in operator ()()
53 result_t result = boost::unique<return_type>(cont); in operator ()()
57 BOOST_CHECK_EQUAL_COLLECTIONS( cont.begin(), cont.end(), in operator ()()
75 operator()(Policy& policy, Container& cont) in operator ()()
80 Container cont2(cont); in operator ()()
82 result_t result = boost::unique(cont); in operator ()()
87 cont.begin(), cont.end(), in operator ()()
[all …]
Dadjacent_find.cpp34 Container cont; in test_adjacent_find_impl() local
35 const Container& cref_cont = cont; in test_adjacent_find_impl()
39 BOOST_CHECK( boost::adjacent_find(cont) == cont.end() ); in test_adjacent_find_impl()
41 BOOST_CHECK( boost::adjacent_find(boost::make_iterator_range(cont)) == cont.end() ); in test_adjacent_find_impl()
42 BOOST_CHECK( boost::adjacent_find(cont, pred) == cont.end() ); in test_adjacent_find_impl()
44 … BOOST_CHECK( boost::adjacent_find(boost::make_iterator_range(cont), pred) == cont.end() ); in test_adjacent_find_impl()
46 cont += 1; in test_adjacent_find_impl()
47 BOOST_CHECK( boost::adjacent_find(cont) == cont.end() ); in test_adjacent_find_impl()
49 BOOST_CHECK( boost::adjacent_find(boost::make_iterator_range(cont)) == cont.end() ); in test_adjacent_find_impl()
50 BOOST_CHECK( boost::adjacent_find(cont, pred) == cont.end() ); in test_adjacent_find_impl()
[all …]
Dcount_if.cpp38 Container cont; in test_count_if_impl() local
39 const Container& cref_cont = cont; in test_count_if_impl()
41 BOOST_CHECK_EQUAL( 0u, boost::count_if(cont, pred_t(0)) ); in test_count_if_impl()
43 BOOST_CHECK_EQUAL( 0u, boost::count_if(boost::make_iterator_range(cont), pred_t(0)) ); in test_count_if_impl()
45 cont += 1; in test_count_if_impl()
46 BOOST_CHECK_EQUAL( 0u, boost::count_if(cont, pred_t(0)) ); in test_count_if_impl()
48 BOOST_CHECK_EQUAL( 0u, boost::count_if(boost::make_iterator_range(cont), pred_t(0)) ); in test_count_if_impl()
49 BOOST_CHECK_EQUAL( 1u, boost::count_if(cont, pred_t(1)) ); in test_count_if_impl()
51 BOOST_CHECK_EQUAL( 1u, boost::count_if(boost::make_iterator_range(cont), pred_t(1)) ); in test_count_if_impl()
53 cont += 2,3,4,5,6,7,8,9; in test_count_if_impl()
[all …]
Dfind_end.cpp31 explicit find_end_test_policy(const Container2& cont) in find_end_test_policy() argument
32 : m_cont(cont) in find_end_test_policy()
36 container2_t cont() { return m_cont; } in cont() function in boost_range_test_algorithm_find_end::find_end_test_policy
40 test_iter(Container& cont) in test_iter() argument
43 iter_t result = boost::find_end(cont, m_cont); in test_iter()
44 BOOST_CHECK( result == boost::find_end(boost::make_iterator_range(cont), m_cont) ); in test_iter()
45 BOOST_CHECK( result == boost::find_end(cont, boost::make_iterator_range(m_cont)) ); in test_iter()
46 …BOOST_CHECK( result == boost::find_end(boost::make_iterator_range(cont), boost::make_iterator_rang… in test_iter()
55 operator()(Policy& policy, Container& cont) in operator ()()
58 result_t result = boost::find_end<return_type>(cont, policy.cont()); in operator ()()
[all …]
Dstable_partition.cpp39 test_iter(Container& cont) in test_iter() argument
41 Container cont2(cont); in test_iter()
44 iter_t result = boost::stable_partition(cont, UnaryPredicate()); in test_iter()
49 BOOST_CHECK_EQUAL( std::distance(cont.begin(), result), in test_iter()
52 BOOST_CHECK_EQUAL_COLLECTIONS( cont.begin(), cont.end(), in test_iter()
65 operator()(Policy& policy, Container& cont) in operator ()()
68 Container cont2(cont); in operator ()()
69 result_t result = boost::stable_partition<return_type>(cont, policy.pred()); in operator ()()
77 cont.begin(), cont.end() ); in operator ()()
85 reference(Container& cont) in reference() argument
[all …]
Dfind_first_of.cpp31 explicit find_first_of_test_policy(const Container2& cont) in find_first_of_test_policy() argument
32 : m_cont(cont) in find_first_of_test_policy()
36 container2_t& cont() { return m_cont; } in cont() function in boost_range_test_algorithm_find_first_of::find_first_of_test_policy
40 test_iter(Container& cont) in test_iter() argument
43 iter_t result = boost::find_first_of(cont, m_cont); in test_iter()
44 BOOST_CHECK( result == boost::find_first_of(boost::make_iterator_range(cont), m_cont) ); in test_iter()
45 BOOST_CHECK( result == boost::find_first_of(cont, boost::make_iterator_range(m_cont)) ); in test_iter()
46 …BOOST_CHECK( result == boost::find_first_of(boost::make_iterator_range(cont), boost::make_iterator… in test_iter()
55 operator()(Policy& policy, Container& cont) in operator ()()
58 result_t result = boost::find_first_of<return_type>(cont, policy.cont()); in operator ()()
[all …]
Dpartition.cpp39 test_iter(Container& cont) in test_iter() argument
43 const Container old_cont(cont); in test_iter()
45 iter_t result = boost::partition(cont, UnaryPredicate()); in test_iter()
52 BOOST_CHECK_EQUAL_COLLECTIONS( cont.begin(), cont.end(), in test_iter()
65 operator()(Policy& policy, Container& cont) in operator ()()
69 const Container old_cont(cont); in operator ()()
71 result_t result = boost::partition<return_type>(cont, policy.pred()); in operator ()()
78 BOOST_CHECK_EQUAL_COLLECTIONS( cont.begin(), cont.end(), in operator ()()
87 reference(Container& cont) in reference() argument
89 return std::partition(cont.begin(), cont.end(), UnaryPredicate()); in reference()
[all …]
Dbinary_search.cpp27 void test(Container& cont) in test() argument
29 Container reference(cont); in test()
30 Container test(cont); in test()
48 void sort_container(Container& cont, BinaryPredicate pred) in sort_container() argument
52 std::vector<value_t> temp(cont.begin(), cont.end()); in sort_container()
54 cont.assign(temp.begin(), temp.end()); in sort_container()
58 void test_pred(Container& cont, BinaryPredicate pred) in test_pred() argument
60 Container reference(cont); in test_pred()
61 Container test(cont); in test_pred()
87 Container cont; in test_binary_search_impl() local
[all …]
Dsort.cpp27 void test_sort_impl(Container& cont) in test_sort_impl() argument
29 Container reference(cont); in test_sort_impl()
30 Container test(cont); in test_sort_impl()
38 Container test2(cont); in test_sort_impl()
45 void test_sort_impl(Container& cont, BinaryPredicate pred) in test_sort_impl() argument
47 Container reference(cont); in test_sort_impl()
48 Container test(cont); in test_sort_impl()
58 Container test2(cont); in test_sort_impl()
69 Container cont; in test_sort_impl() local
70 test_sort_impl(cont); in test_sort_impl()
[all …]
Dstable_sort.cpp27 void test_stable_sort_impl(Container& cont) in test_stable_sort_impl() argument
29 Container reference(cont); in test_stable_sort_impl()
30 Container test(cont); in test_stable_sort_impl()
38 test = cont; in test_stable_sort_impl()
45 void test_stable_sort_impl(Container& cont, BinaryPredicate pred) in test_stable_sort_impl() argument
47 Container reference(cont); in test_stable_sort_impl()
48 Container test(cont); in test_stable_sort_impl()
56 test = cont; in test_stable_sort_impl()
67 Container cont; in test_stable_sort_impl() local
68 test_stable_sort_impl(cont); in test_stable_sort_impl()
[all …]
Drandom_shuffle.cpp90 void test_random_shuffle_nogen_impl(Container& cont) in test_random_shuffle_nogen_impl() argument
100 Container test(cont); in test_random_shuffle_nogen_impl()
102 bool ok = test_shuffle_result(cont, test); in test_random_shuffle_nogen_impl()
108 if (cont.size() == test.size() in test_random_shuffle_nogen_impl()
109 && !std::equal(cont.begin(), cont.end(), test.begin())) in test_random_shuffle_nogen_impl()
116 Container test2(cont); in test_random_shuffle_nogen_impl()
118 ok = test_shuffle_result(cont, test2); in test_random_shuffle_nogen_impl()
125 void test_random_shuffle_gen_impl(Container& cont) in test_random_shuffle_gen_impl() argument
128 Container old_cont(cont); in test_random_shuffle_gen_impl()
129 boost::random_shuffle(cont, gen); in test_random_shuffle_gen_impl()
[all …]
Dequal_range.cpp59 void test(Container& cont) in test() argument
61 Container reference(cont); in test()
62 Container test(cont); in test()
80 void sort_container(Container& cont, BinaryPredicate pred) in sort_container() argument
84 std::vector<value_t> temp(cont.begin(), cont.end()); in sort_container()
86 cont.assign(temp.begin(), temp.end()); in sort_container()
90 void test_pred(Container& cont, BinaryPredicate pred) in test_pred() argument
94 container_t reference_temp(cont); in test_pred()
95 container_t test_temp(cont); in test_pred()
120 void test_driver(const Container& cont) in test_driver() argument
[all …]
Dcount.cpp31 Container cont; in test_count_impl() local
32 const Container& cref_cont = cont; in test_count_impl()
34 BOOST_CHECK_EQUAL( 0u, boost::count(cont, 0u) ); in test_count_impl()
36 BOOST_CHECK_EQUAL( 0u, boost::count(boost::make_iterator_range(cont), 0u) ); in test_count_impl()
38 cont += 1; in test_count_impl()
39 BOOST_CHECK_EQUAL( 0u, boost::count(cont, 0u) ); in test_count_impl()
41 BOOST_CHECK_EQUAL( 0u, boost::count(boost::make_iterator_range(cont), 0u) ); in test_count_impl()
42 BOOST_CHECK_EQUAL( 1u, boost::count(cont, 1u) ); in test_count_impl()
44 BOOST_CHECK_EQUAL( 1u, boost::count(boost::make_iterator_range(cont), 1u) ); in test_count_impl()
46 cont += 2,3,4,5,6,7,8,9; in test_count_impl()
[all …]
Dmin_element.cpp31 test_iter(Container& cont) in test_iter() argument
34 iter_t result = boost::min_element(cont); in test_iter()
35 BOOST_CHECK( result == boost::min_element(boost::make_iterator_range(cont)) ); in test_iter()
44 operator()(Policy&, Container& cont) in operator ()()
47 result_t result = boost::min_element<return_type>(cont); in operator ()()
48 … BOOST_CHECK( result == boost::min_element<return_type>(boost::make_iterator_range(cont)) ); in operator ()()
55 reference(Container& cont) in reference() argument
57 return std::min_element(cont.begin(), cont.end()); in reference()
67 test_iter(Container& cont) in test_iter() argument
70 iter_t result = boost::min_element(cont, Pred()); in test_iter()
[all …]
Dmax_element.cpp31 test_iter(Container& cont) in test_iter() argument
34 iter_t result = boost::max_element(cont); in test_iter()
36 boost::make_iterator_range(cont)) ); in test_iter()
45 operator()(Policy&, Container& cont) in operator ()()
48 result_t result = boost::max_element<return_type>(cont); in operator ()()
50 boost::make_iterator_range(cont)) ); in operator ()()
57 reference(Container& cont) in reference() argument
59 return std::max_element(cont.begin(), cont.end()); in reference()
69 test_iter(Container& cont) in test_iter() argument
72 iter_t result = boost::max_element(cont, Pred()); in test_iter()
[all …]
Dnext_permutation.cpp24 void test_next_permutation_impl(const Container& cont) in test_next_permutation_impl() argument
26 Container reference(cont); in test_next_permutation_impl()
27 Container test(cont); in test_next_permutation_impl()
41 test = cont; in test_next_permutation_impl()
52 void test_next_permutation_pred_impl(const Container& cont, in test_next_permutation_pred_impl() argument
55 Container reference(cont); in test_next_permutation_pred_impl()
56 Container test(cont); in test_next_permutation_pred_impl()
72 test = cont; in test_next_permutation_pred_impl()
83 void test_next_permutation_(const Container& cont) in test_next_permutation_() argument
85 test_next_permutation_impl(cont); in test_next_permutation_()
[all …]
Dprev_permutation.cpp24 void test_prev_permutation_impl(const Container& cont) in test_prev_permutation_impl() argument
26 Container reference(cont); in test_prev_permutation_impl()
27 Container test(cont); in test_prev_permutation_impl()
28 Container test2(cont); in test_prev_permutation_impl()
52 void test_prev_permutation_pred_impl(const Container& cont, in test_prev_permutation_pred_impl() argument
55 Container reference(cont); in test_prev_permutation_pred_impl()
56 Container test(cont); in test_prev_permutation_pred_impl()
57 Container test2(cont); in test_prev_permutation_pred_impl()
82 void test_prev_permutation_(const Container& cont) in test_prev_permutation_() argument
84 test_prev_permutation_impl(cont); in test_prev_permutation_()
[all …]
Drotate.cpp27 void test_rotate_impl(Container& cont, Iterator where_it) in test_rotate_impl() argument
29 Container reference(cont); in test_rotate_impl()
30 Container test(cont); in test_rotate_impl()
34 std::distance(cont.begin(), where_it)); in test_rotate_impl()
40 std::distance(cont.begin(), where_it)); in test_rotate_impl()
47 test = cont; in test_rotate_impl()
50 std::distance(cont.begin(), where_it)); in test_rotate_impl()
59 void test_rotate_impl(Container& cont) in test_rotate_impl() argument
63 iterator_t last = cont.end(); in test_rotate_impl()
64 for (iterator_t it = cont.begin(); it != last; ++it) in test_rotate_impl()
[all …]
Dreplace_if.cpp30 void test_replace_if_impl(Container& cont, UnaryPredicate pred) in test_replace_if_impl() argument
37 std::vector<int> reference(cont.begin(), cont.end()); in test_replace_if_impl()
41 std::vector<int> target(cont.begin(), cont.end()); in test_replace_if_impl()
47 std::vector<int> target2(cont.begin(), cont.end()); in test_replace_if_impl()
56 void test_replace_if_impl(Container& cont) in test_replace_if_impl() argument
58 test_replace_if_impl(cont, std::equal_to<int>()); in test_replace_if_impl()
59 test_replace_if_impl(cont, std::not_equal_to<int>()); in test_replace_if_impl()
67 Container cont; in test_replace_if_impl() local
68 test_replace_if_impl(cont); in test_replace_if_impl()
70 cont.clear(); in test_replace_if_impl()
[all …]
Dfill.cpp29 void test_fill_impl(Container& cont) in test_fill_impl() argument
31 Container reference(cont); in test_fill_impl()
34 Container target(cont); in test_fill_impl()
40 Container target2(cont); in test_fill_impl()
52 Container cont; in test_fill_impl() local
53 test_fill_impl(cont); in test_fill_impl()
55 cont.clear(); in test_fill_impl()
56 cont += 2; in test_fill_impl()
57 test_fill_impl(cont); in test_fill_impl()
59 cont.clear(); in test_fill_impl()
[all …]
Dreplace.cpp27 void test_replace_impl(Container& cont) in test_replace_impl() argument
32 std::vector<int> reference(cont.begin(), cont.end()); in test_replace_impl()
35 std::vector<int> target(cont.begin(), cont.end()); in test_replace_impl()
41 std::vector<int> target2(cont.begin(), cont.end()); in test_replace_impl()
55 Container cont; in test_replace_impl() local
56 test_replace_impl(cont); in test_replace_impl()
58 cont.clear(); in test_replace_impl()
59 cont += 1; in test_replace_impl()
60 test_replace_impl(cont); in test_replace_impl()
62 cont.clear(); in test_replace_impl()
[all …]
Drotate_copy.cpp31 void test_rotate_copy_impl(Container& cont, Iterator where_it) in test_rotate_copy_impl() argument
43 std::rotate_copy(cont.begin(), where_it, cont.end(), in test_rotate_copy_impl()
49 boost::rotate_copy(cont, where_it, std::back_inserter(test)), in test_rotate_copy_impl()
59 boost::rotate_copy(boost::make_iterator_range(cont), where_it, in test_rotate_copy_impl()
69 void test_rotate_copy_impl(Container& cont) in test_rotate_copy_impl() argument
73 iterator_t last = cont.end(); in test_rotate_copy_impl()
74 for (iterator_t it = cont.begin(); it != last; ++it) in test_rotate_copy_impl()
76 test_rotate_copy_impl(cont, it); in test_rotate_copy_impl()
85 Container cont; in test_rotate_copy_impl() local
86 test_rotate_copy_impl(cont); in test_rotate_copy_impl()
[all …]
/third_party/boost/libs/container/test/
Dcomparison_test.hpp27 Cont cont; in test_container_comparisons() local
28 cont.push_back(value_type(1)); in test_container_comparisons()
29 cont.push_back(value_type(2)); in test_container_comparisons()
30 cont.push_back(value_type(3)); in test_container_comparisons()
32 Cont cont_equal(cont); in test_container_comparisons()
39 BOOST_TEST(cont == cont_equal); in test_container_comparisons()
40 BOOST_TEST(!(cont != cont_equal)); in test_container_comparisons()
41 BOOST_TEST(cont != cont_less); in test_container_comparisons()
42 BOOST_TEST(cont_less < cont); in test_container_comparisons()
43 BOOST_TEST(cont_less <= cont); in test_container_comparisons()
[all …]

12345678910>>...19