1 // Boost.Assign library
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)
8 // For more information, see http://www.boost.org/libs/assign/
12 #include <boost/detail/workaround.hpp>
14 #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
15 # pragma warn -8091 // supress warning in Boost.Test
16 # pragma warn -8057 // unused argument argc/argv in Boost.Test
19 #include <boost/assign/list_of.hpp>
20 #include <boost/test/test_tools.hpp>
26 #include <boost/array.hpp>
31 using namespace boost;
32 using namespace boost::assign;
34 vector<int> v = list_of(1)(2)(3)(4).to_container( v );
35 set<int> s = list_of(1)(2)(3)(4).to_container( s );
36 map<int,int> m = map_list_of(1,2)(2,3).to_container( m );
37 stack<int> st = list_of(1)(2)(3)(4).to_adapter( st );
38 queue<int> q = list_of(1)(2)(3)(4).to_adapter( q );
39 array<int,4> a = list_of(1)(2)(3)(4).to_array( a );
40 const vector<int> v2 = list_of(1).to_container( v2 );
41 const array<int,1> a2 = list_of(1).to_array( a2 );
46 #include <boost/test/unit_test.hpp>
47 using boost::unit_test::test_suite;
49 test_suite* init_unit_test_suite( int argc, char* argv[] )
51 test_suite* test = BOOST_TEST_SUITE( "List Test Suite" );
53 test->add( BOOST_TEST_CASE( &check_list_of ) );