1 | // Boost.Range library |
---|---|
2 | // |
3 | // Copyright Neil Groves 2014. Use, modification and |
4 | // distribution is subject to the Boost Software License, Version |
5 | // 1.0. (See accompanying file LICENSE_1_0.txt or copy at |
6 | // http://www.boost.org/LICENSE_1_0.txt) |
7 | // |
8 | #include <boost/range/adaptor/type_erased.hpp> |
9 | #include "type_erased_test.hpp" |
10 | |
11 | #include <boost/test/unit_test.hpp> |
12 | |
13 | #include <deque> |
14 | #include <vector> |
15 | |
16 | namespace boost_range_adaptor_type_erased_test |
17 | { |
18 | namespace |
19 | { |
20 | |
21 | void test_random_access() |
22 | { |
23 | test_type_erased_exercise_buffer_types< |
24 | std::deque<int>, boost::random_access_traversal_tag >(); |
25 | |
26 | test_type_erased_exercise_buffer_types< |
27 | std::vector<int>, boost::random_access_traversal_tag >(); |
28 | |
29 | test_type_erased_exercise_buffer_types< |
30 | std::deque<MockType>, boost::random_access_traversal_tag >(); |
31 | |
32 | test_type_erased_exercise_buffer_types< |
33 | std::vector<MockType>, boost::random_access_traversal_tag >(); |
34 | } |
35 | |
36 | } // anonymous namespace |
37 | } // namespace boost_range_adaptor_type_erased_test |
38 | |
39 | boost::unit_test::test_suite* |
40 | init_unit_test_suite(int argc, char* argv[]) |
41 | { |
42 | boost::unit_test::test_suite* test = |
43 | BOOST_TEST_SUITE("RangeTestSuite.adaptor.type_erased_random_access"); |
44 | |
45 | test->add(BOOST_TEST_CASE( |
46 | &boost_range_adaptor_type_erased_test::test_random_access)); |
47 | |
48 | return test; |
49 | } |
50 | |
51 |