Last change
on this file since 33 was
29,
checked in by landauf, 16 years ago
|
updated boost from 1_33_1 to 1_34_1
|
File size:
1.1 KB
|
Line | |
---|
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(__BORLANDC__, BOOST_TESTED_AT(0x564)) |
---|
14 | # pragma warn -8091 // supress 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 std; |
---|
24 | using namespace boost; |
---|
25 | using namespace boost::assign; |
---|
26 | |
---|
27 | void check_basic_usage() |
---|
28 | { |
---|
29 | vector<int> v; |
---|
30 | v += 1,2,3,4,5,6,7,8,9; |
---|
31 | push_back( v )(10)(11); |
---|
32 | map<string,int> m; |
---|
33 | insert( m )( "foo", 1 )( "bar", 2 ); |
---|
34 | } |
---|
35 | |
---|
36 | |
---|
37 | |
---|
38 | #include <boost/test/unit_test.hpp> |
---|
39 | using boost::unit_test::test_suite; |
---|
40 | |
---|
41 | test_suite* init_unit_test_suite( int argc, char* argv[] ) |
---|
42 | { |
---|
43 | test_suite* test = BOOST_TEST_SUITE( "Assign Test Suite" ); |
---|
44 | |
---|
45 | test->add( BOOST_TEST_CASE( &check_basic_usage ) ); |
---|
46 | |
---|
47 | return test; |
---|
48 | } |
---|
49 | |
---|
Note: See
TracBrowser
for help on using the repository browser.