]>
Commit | Line | Data |
---|---|---|
3a9019d9 FG |
1 | //Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.\r |
2 | \r | |
3 | //Distributed under the Boost Software License, Version 1.0. (See accompanying\r | |
4 | //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r | |
5 | \r | |
6 | #include <boost/qvm/mat_operations.hpp>\r | |
7 | #include <boost/qvm/mat_traits_array.hpp>\r | |
8 | #include "test_qvm_matrix.hpp"\r | |
9 | #include "gold.hpp"\r | |
10 | \r | |
11 | namespace\r | |
12 | {\r | |
13 | template <int Rows,int Cols>\r | |
14 | void\r | |
15 | test()\r | |
16 | {\r | |
17 | using namespace boost::qvm::sfinae;\r | |
18 | test_qvm::matrix<M1,Rows,Cols> const x(42,1);\r | |
19 | for( int i=0; i!=Rows; ++i )\r | |
20 | for( int j=0; j!=Cols; ++j )\r | |
21 | {\r | |
22 | {\r | |
23 | test_qvm::matrix<M1,Rows,Cols> y(x);\r | |
24 | BOOST_QVM_TEST_EQ(x,y);\r | |
25 | y.a[i][j]=0;\r | |
26 | BOOST_QVM_TEST_NEQ(x,y);\r | |
27 | }\r | |
28 | {\r | |
29 | test_qvm::matrix<M2,Rows,Cols> y; assign(y,x);\r | |
30 | BOOST_QVM_TEST_EQ(x,y);\r | |
31 | y.a[i][j]=0;\r | |
32 | BOOST_QVM_TEST_NEQ(x,y);\r | |
33 | }\r | |
34 | }\r | |
35 | }\r | |
36 | }\r | |
37 | \r | |
38 | int\r | |
39 | main()\r | |
40 | {\r | |
41 | test<1,2>();\r | |
42 | test<2,1>();\r | |
43 | test<2,2>();\r | |
44 | test<1,3>();\r | |
45 | test<3,1>();\r | |
46 | test<3,3>();\r | |
47 | test<1,4>();\r | |
48 | test<4,1>();\r | |
49 | test<4,4>();\r | |
50 | test<1,5>();\r | |
51 | test<5,1>();\r | |
52 | test<5,5>();\r | |
53 | return boost::report_errors();\r | |
54 | }\r |