1 /*
2 [auto_generated]
3 libs/numeric/odeint/test/same_size.cpp
4
5 [begin_description]
6 tba.
7 [end_description]
8
9 Copyright 2012 Karsten Ahnert
10 Copyright 2012 Mario Mulansky
11
12 Distributed under the Boost Software License, Version 1.0.
13 (See accompanying file LICENSE_1_0.txt or
14 copy at http://www.boost.org/LICENSE_1_0.txt)
15 */
16
17 #include <boost/config.hpp>
18 #ifdef BOOST_MSVC
19 #pragma warning(disable:4996)
20 #endif
21
22 #define BOOST_TEST_MODULE odeint_dummy
23
24 #include <boost/test/unit_test.hpp>
25
26 #include <boost/numeric/odeint/util/same_size.hpp>
27
28 using namespace boost::unit_test;
29 using namespace boost::numeric::odeint;
30
31
32 BOOST_AUTO_TEST_SUITE( same_size_test )
33
BOOST_AUTO_TEST_CASE(test_vector_true)34 BOOST_AUTO_TEST_CASE( test_vector_true )
35 {
36 std::vector< double > v1( 10 ) , v2( 10 );
37 BOOST_CHECK_EQUAL( true , same_size( v1 , v2 ) );
38 }
39
40
BOOST_AUTO_TEST_CASE(test_vector_false)41 BOOST_AUTO_TEST_CASE( test_vector_false )
42 {
43 std::vector< double > v1( 10 ) , v2( 20 );
44 BOOST_CHECK_EQUAL( false , same_size( v1 , v2 ) );
45 }
46
BOOST_AUTO_TEST_CASE(test_fusion_true)47 BOOST_AUTO_TEST_CASE( test_fusion_true )
48 {
49 boost::fusion::vector< double , std::vector< double > > v1 , v2;
50 boost::fusion::at_c< 1 >( v1 ).resize( 10 );
51 boost::fusion::at_c< 1 >( v2 ).resize( 10 );
52 BOOST_CHECK_EQUAL( true , same_size( v1 , v2 ) );
53 }
54
BOOST_AUTO_TEST_CASE(test_fusion_false)55 BOOST_AUTO_TEST_CASE( test_fusion_false )
56 {
57 boost::fusion::vector< double , std::vector< double > > v1 , v2;
58 boost::fusion::at_c< 1 >( v1 ).resize( 10 );
59 boost::fusion::at_c< 1 >( v2 ).resize( 20 );
60 BOOST_CHECK_EQUAL( false , same_size( v1 , v2 ) );
61 }
62
63
64
65 BOOST_AUTO_TEST_SUITE_END()
66