]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/phoenix/test/container/container_tests4a.cpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / phoenix / test / container / container_tests4a.cpp
1 /*=============================================================================
2 Copyright (c) 2004 Angus Leeming
3
4 Distributed under the Boost Software License, Version 1.0. (See accompanying
5 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 ==============================================================================*/
7 #include "container_tests.hpp"
8 #include <boost/static_assert.hpp>
9
10 std::vector<int> const init_vector()
11 {
12 typedef std::vector<int> int_vector;
13 int const data[] = { -4, -3, -2, -1, 0 };
14 int_vector::size_type const data_size = sizeof(data) / sizeof(data[0]);
15 return int_vector(data, data + data_size);
16 }
17
18 std::vector<int> const build_vector()
19 {
20 typedef std::vector<int> int_vector;
21 static int_vector data = init_vector();
22 int_vector::size_type const size = data.size();
23 int_vector::iterator it = data.begin();
24 int_vector::iterator const end = data.end();
25 for (; it != end; ++it)
26 *it += size;
27 return data;
28 }
29
30 int
31 main()
32 {
33 std::vector<int> const data = build_vector();
34 test_assign(data);
35 test_assign2(data);
36 test_at(data);
37 test_back(data);
38 test_begin(data);
39 test_capacity(data);
40 test_clear(data);
41 test_end(data);
42 test_empty(data);
43 test_erase(data);
44 test_front(data);
45 return boost::report_errors();
46 }
47