]>
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, Qersion 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 "test_qvm_quaternion.hpp"\r | |
8 | #include "gold.hpp"\r | |
9 | \r | |
10 | namespace\r | |
11 | {\r | |
12 | void\r | |
13 | test()\r | |
14 | {\r | |
15 | using namespace boost::qvm::sfinae;\r | |
16 | test_qvm::quaternion<Q1> const x(42,1);\r | |
17 | for( int i=0; i!=4; ++i )\r | |
18 | {\r | |
19 | {\r | |
20 | test_qvm::quaternion<Q1> y(x);\r | |
21 | BOOST_QVM_TEST_EQ(x,y);\r | |
22 | y.a[i]=0;\r | |
23 | BOOST_QVM_TEST_NEQ(x,y);\r | |
24 | }\r | |
25 | {\r | |
26 | test_qvm::quaternion<Q2> y; assign(y,x);\r | |
27 | BOOST_QVM_TEST_EQ(x,y);\r | |
28 | y.a[i]=0;\r | |
29 | BOOST_QVM_TEST_NEQ(x,y);\r | |
30 | }\r | |
31 | }\r | |
32 | }\r | |
33 | }\r | |
34 | \r | |
35 | int\r | |
36 | main()\r | |
37 | {\r | |
38 | test();\r | |
39 | return boost::report_errors();\r | |
40 | }\r |