9 #include <boost/test/data/test_case.hpp>
10 #include <boost/test/tools/output_test_stream.hpp>
11 #include <boost/test/unit_test.hpp>
28 BOOST_AUTO_TEST_SUITE(Surfaces)
32 double innerRx(10.), innerRy(15.), outerRx(25.), outerRy(30.),
33 phiSector(M_PI / 2.), averagePhi(0.);
40 EllipseBounds(innerRx, innerRy, outerRx, outerRy, phiSector, averagePhi)
45 EllipseBounds original(innerRx, innerRy, outerRx, outerRy, phiSector,
48 BOOST_CHECK_EQUAL(copied, original);
53 double innerRx(10.), innerRy(15.), outerRx(25.), outerRy(30.),
54 phiSector(M_PI / 2.), averagePhi(0.);
56 EllipseBounds original(innerRx, innerRy, outerRx, outerRy, phiSector,
58 auto valvector = original.
values();
59 std::array<double, EllipseBounds::eSize>
values{};
62 BOOST_CHECK_EQUAL(recreated, original);
67 double innerRx(10.), innerRy(15.), outerRx(25.), outerRy(30.),
68 phiSector(M_PI / 2.), averagePhi(0.);
71 EllipseBounds(-innerRx, innerRy, outerRx, outerRy, phiSector, averagePhi),
75 EllipseBounds(innerRx, -innerRy, outerRx, outerRy, phiSector, averagePhi),
78 BOOST_CHECK_THROW(
EllipseBounds(-innerRx, -innerRy, outerRx, outerRy,
79 phiSector, averagePhi),
83 EllipseBounds(innerRx, innerRy, 0., outerRy, phiSector, averagePhi),
87 EllipseBounds(innerRx, innerRy, outerRx, 0., phiSector, averagePhi),
90 BOOST_CHECK_THROW(
EllipseBounds(innerRx, innerRy, -outerRx, -outerRy,
91 phiSector, averagePhi),
95 EllipseBounds(outerRx, innerRy, innerRx, outerRy, phiSector, averagePhi),
99 EllipseBounds(innerRx, outerRy, outerRx, innerRy, phiSector, averagePhi),
103 EllipseBounds(innerRx, innerRy, outerRx, outerRy, -phiSector, averagePhi),
107 EllipseBounds(innerRx, innerRy, outerRx, outerRy, phiSector, 4.),
113 double innerRx(10.), outerRx(15.), innerRy(15.), outerRy(20.), averagePhi(0.),
114 phiSector(M_PI / 2.);
116 EllipseBounds ellipseBoundsObject(innerRx, innerRy, outerRx, outerRy,
117 phiSector, averagePhi);
154 BOOST_CHECK_EQUAL(ellipseBoundsObject.
boundingBox(),
162 boost::test_tools::output_test_stream dumpOuput;
163 ellipseBoundsObject.
toStream(dumpOuput);
164 BOOST_CHECK(dumpOuput.is_equal(
165 "Acts::EllipseBounds: (innerRadius0, outerRadius0, innerRadius1, "
166 "outerRadius1, hPhiSector, averagePhi) = (10.0000000, 15.0000000, "
168 "20.0000000, 0.0000000, 1.5707963, 0.0000000)"));
177 double innerRx(10.), outerRx(15.), innerRy(15.), outerRy(20.), averagePhi(0.),
178 phiSector(M_PI / 2.);
179 EllipseBounds ellipseBoundsObject(innerRx, outerRx, innerRy, outerRy,
180 averagePhi, phiSector);
182 innerRx, outerRx, innerRy, outerRy, averagePhi, phiSector);
184 BOOST_CHECK_EQUAL(ellipseBoundsObject,
185 similarlyConstructeEllipseBoundsObject);
188 EllipseBounds assignedEllipseBoundsObject(11., 12., 17., 18., 1.);
190 assignedEllipseBoundsObject = ellipseBoundsObject;
191 BOOST_CHECK_EQUAL(assignedEllipseBoundsObject, ellipseBoundsObject);
194 BOOST_AUTO_TEST_SUITE_END()