]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/numeric/odeint/test_external/nt2/resize.cpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / numeric / odeint / test_external / nt2 / resize.cpp
1 //==============================================================================
2 // Copyright 2014 LRI UMR 8623 CNRS/Univ Paris Sud XI
3 // Copyright 2014 NumScale SAS
4 //
5 // Distributed under the Boost Software License, Version 1.0.
6 // See accompanying file LICENSE.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt
8 //==============================================================================
9 #include <boost/numeric/odeint.hpp>
10 #include <nt2/table.hpp>
11
12 #include <boost/config.hpp>
13 #ifdef BOOST_MSVC
14 #pragma warning(disable:4996)
15 #endif
16
17 #define BOOST_TEST_MODULE odeint_nt2_resize
18
19 #include <boost/test/included/unit_test.hpp>
20 #include <boost/numeric/odeint/external/nt2/nt2_resize.hpp>
21
22 #include <boost/mpl/list.hpp>
23
24 using namespace boost::unit_test;
25 using namespace boost::numeric::odeint;
26
27 typedef boost::mpl::list< float , double > fp_types;
28
29 BOOST_AUTO_TEST_SUITE( nt2_resize )
30
31 BOOST_AUTO_TEST_CASE_TEMPLATE( test_resize, T, fp_types )
32 {
33 nt2::table<T> x;
34 x.resize(nt2::of_size(10,10));
35
36 nt2::table<T> y;
37
38 BOOST_CHECK_EQUAL(same_size(x,y),false);
39
40 resize(y,x);
41
42 BOOST_CHECK_EQUAL(same_size(x,y),true);
43 }
44
45 BOOST_AUTO_TEST_SUITE_END()