blob: 56d7ce4a673bd0f77d9fa62b0215efb4a503e903 [file] [log] [blame]
Brian Silverman7c33ab22018-08-04 17:14:51 -07001//==============================================================================
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
24using namespace boost::unit_test;
25using namespace boost::numeric::odeint;
26
27typedef boost::mpl::list< float , double > fp_types;
28
29BOOST_AUTO_TEST_SUITE( nt2_resize )
30
31BOOST_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
45BOOST_AUTO_TEST_SUITE_END()