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