1 | // Boost.Assign library |
2 | // |
3 | // Copyright Thorsten Ottosen 2003-2004. 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 | // For more information, see http://www.boost.org/libs/assign/ |
9 | // |
10 | |
11 | #include <boost/detail/workaround.hpp> |
12 | |
13 | #if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) |
14 | # pragma warn -8091 // suppress warning in Boost.Test |
15 | # pragma warn -8057 // unused argument argc/argv in Boost.Test |
16 | #endif |
17 | |
18 | #include <boost/assign/std/vector.hpp> |
19 | #include <boost/assign/std/map.hpp> |
20 | #include <string> |
21 | |
22 | |
23 | using namespace boost::assign; |
24 | |
25 | void check_basic_usage() |
26 | { |
27 | std::vector<int> v; |
28 | v += 1,2,3,4,5,6,7,8,9; |
29 | push_back( c&: v )(10)(11); |
30 | std::map<std::string,int> m; |
31 | insert( c&: m )( "foo" , 1 )( "bar" , 2 ); |
32 | } |
33 | |
34 | |
35 | |
36 | #include <boost/test/unit_test.hpp> |
37 | using boost::unit_test::test_suite; |
38 | |
39 | test_suite* init_unit_test_suite( int argc, char* argv[] ) |
40 | { |
41 | test_suite* test = BOOST_TEST_SUITE( "Assign Test Suite" ); |
42 | |
43 | test->add( BOOST_TEST_CASE( &check_basic_usage ) ); |
44 | |
45 | return test; |
46 | } |
47 | |
48 | |