]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/qvm/test/assign_test.cpp
update sources to v12.2.4
[ceph.git] / ceph / src / boost / libs / qvm / test / assign_test.cpp
CommitLineData
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/quat_operations.hpp>\r
7#include <boost/qvm/vec_operations.hpp>\r
8#include <boost/qvm/mat_operations.hpp>\r
9#include "test_qvm_matrix.hpp"\r
10#include "test_qvm_quaternion.hpp"\r
11#include "test_qvm_vector.hpp"\r
12#include "gold.hpp"\r
13\r
14namespace\r
15 {\r
16 template <int Rows,int Cols>\r
17 void\r
18 test_matrix()\r
19 {\r
20 using namespace boost::qvm::sfinae;\r
21 test_qvm::matrix<M1,Rows,Cols> const x(42,1);\r
22 test_qvm::matrix<M2,Rows,Cols> y(43,1);\r
23 assign(y,x);\r
24 BOOST_QVM_TEST_EQ(x.a,y.a);\r
25 }\r
26\r
27 template <int Dim>\r
28 void\r
29 test_vector()\r
30 {\r
31 using namespace boost::qvm::sfinae;\r
32 test_qvm::vector<V1,Dim> const x(42,1);\r
33 test_qvm::vector<V2,Dim> y(43,1);\r
34 assign(y,x);\r
35 BOOST_QVM_TEST_EQ(x.a,y.a);\r
36 }\r
37\r
38 void\r
39 test_quaternion()\r
40 {\r
41 using namespace boost::qvm::sfinae;\r
42 test_qvm::quaternion<Q1> const x(42,1);\r
43 test_qvm::quaternion<Q2> y(43,1);\r
44 assign(y,x);\r
45 BOOST_QVM_TEST_EQ(x.a,y.a);\r
46 }\r
47 }\r
48\r
49int\r
50main()\r
51 {\r
52 test_matrix<1,2>();\r
53 test_matrix<2,1>();\r
54 test_matrix<2,2>();\r
55 test_matrix<1,3>();\r
56 test_matrix<3,1>();\r
57 test_matrix<3,3>();\r
58 test_matrix<1,4>();\r
59 test_matrix<4,1>();\r
60 test_matrix<4,4>();\r
61 test_matrix<1,5>();\r
62 test_matrix<5,1>();\r
63 test_matrix<5,5>();\r
64 test_vector<2>();\r
65 test_vector<3>();\r
66 test_vector<4>();\r
67 test_vector<5>();\r
68 test_quaternion();\r
69 return boost::report_errors();\r
70 }\r