]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/qvm/test/eq_qq_test.cpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / libs / qvm / test / eq_qq_test.cpp
1 // Copyright 2008-2022 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 #ifdef BOOST_QVM_TEST_SINGLE_HEADER
7 # include BOOST_QVM_TEST_SINGLE_HEADER
8 #else
9 # include <boost/qvm/quat_operations.hpp>
10 #endif
11
12 #include "test_qvm_quaternion.hpp"
13 #include "gold.hpp"
14
15 namespace
16 {
17 void
18 test()
19 {
20 using namespace boost::qvm::sfinae;
21 test_qvm::quaternion<Q1> const x(42,1);
22 for( int i=0; i!=4; ++i )
23 {
24 {
25 test_qvm::quaternion<Q1> y(x);
26 BOOST_QVM_TEST_EQ(x,y);
27 y.a[i]=0;
28 BOOST_QVM_TEST_NEQ(x,y);
29 }
30 {
31 test_qvm::quaternion<Q2> y; assign(y,x);
32 BOOST_QVM_TEST_EQ(x,y);
33 y.a[i]=0;
34 BOOST_QVM_TEST_NEQ(x,y);
35 }
36 }
37 }
38 }
39
40 int
41 main()
42 {
43 test();
44 return boost::report_errors();
45 }