]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/qvm/test/identity_quat_test.cpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / libs / qvm / test / identity_quat_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
14 namespace
15 {
16 void
17 test()
18 {
19 using namespace boost::qvm;
20 test_qvm::quaternion<Q1> q=identity_quat<float>();
21 BOOST_TEST(q.a[0]==1);
22 BOOST_TEST(q.a[1]==0);
23 BOOST_TEST(q.a[2]==0);
24 BOOST_TEST(q.a[3]==0);
25 test_qvm::quaternion<Q2> p(42,1);
26 set_identity(p);
27 BOOST_TEST(p.a[0]==1);
28 BOOST_TEST(p.a[1]==0);
29 BOOST_TEST(p.a[2]==0);
30 BOOST_TEST(p.a[3]==0);
31 }
32 }
33
34 int
35 main()
36 {
37 test();
38 return boost::report_errors();
39 }