9 #include <boost/test/data/test_case.hpp>
10 #include <boost/test/tools/output_test_stream.hpp>
11 #include <boost/test/unit_test.hpp>
22 BOOST_AUTO_TEST_SUITE(Surfaces)
26 double innerRx(10.), innerRy(15.), outerRx(25.), outerRy(30.),
27 phiSector(
M_PI / 2.), averagePhi(0.);
34 EllipseBounds(innerRx, innerRy, outerRx, outerRy, phiSector, averagePhi)
39 EllipseBounds original(innerRx, innerRy, outerRx, outerRy, phiSector,
42 BOOST_CHECK_EQUAL(copied, original);
47 double innerRx(10.), innerRy(15.), outerRx(25.), outerRy(30.),
48 phiSector(
M_PI / 2.), averagePhi(0.);
50 EllipseBounds original(innerRx, innerRy, outerRx, outerRy, phiSector,
52 auto valvector = original.
values();
53 std::array<double, EllipseBounds::eSize>
values;
56 BOOST_CHECK_EQUAL(recreated, original);
61 double innerRx(10.), innerRy(15.), outerRx(25.), outerRy(30.),
62 phiSector(
M_PI / 2.), averagePhi(0.);
65 EllipseBounds(-innerRx, innerRy, outerRx, outerRy, phiSector, averagePhi),
69 EllipseBounds(innerRx, -innerRy, outerRx, outerRy, phiSector, averagePhi),
72 BOOST_CHECK_THROW(
EllipseBounds(-innerRx, -innerRy, outerRx, outerRy,
73 phiSector, averagePhi),
77 EllipseBounds(innerRx, innerRy, 0., outerRy, phiSector, averagePhi),
81 EllipseBounds(innerRx, innerRy, outerRx, 0., phiSector, averagePhi),
84 BOOST_CHECK_THROW(
EllipseBounds(innerRx, innerRy, -outerRx, -outerRy,
85 phiSector, averagePhi),
89 EllipseBounds(outerRx, innerRy, innerRx, outerRy, phiSector, averagePhi),
93 EllipseBounds(innerRx, outerRy, outerRx, innerRy, phiSector, averagePhi),
97 EllipseBounds(innerRx, innerRy, outerRx, outerRy, -phiSector, averagePhi),
101 EllipseBounds(innerRx, innerRy, outerRx, outerRy, phiSector, 4.),
106 BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(CylinderBoundsProperties, 1)
108 double innerRx(10.), outerRx(15.), innerRy(15.), outerRy(20.), averagePhi(0.),
109 phiSector(
M_PI / 2.);
111 EllipseBounds ellipseBoundsObject(innerRx, innerRy, outerRx, outerRy,
112 phiSector, averagePhi);
153 BOOST_CHECK_EQUAL(ellipseBoundsObject.
boundingBox(),
161 boost::test_tools::output_test_stream dumpOuput;
162 ellipseBoundsObject.
toStream(dumpOuput);
163 BOOST_CHECK(dumpOuput.is_equal(
164 "Acts::EllipseBounds: (innerRadius0, outerRadius0, innerRadius1, "
165 "outerRadius1, hPhiSector, averagePhi) = (10.0000000, 15.0000000, "
167 "20.0000000, 0.0000000, 1.5707963, 0.0000000)"));
176 double innerRx(10.), outerRx(15.), innerRy(15.), outerRy(20.), averagePhi(0.),
177 phiSector(
M_PI / 2.);
178 EllipseBounds ellipseBoundsObject(innerRx, outerRx, innerRy, outerRy,
179 averagePhi, phiSector);
181 innerRx, outerRx, innerRy, outerRy, averagePhi, phiSector);
183 BOOST_CHECK_EQUAL(ellipseBoundsObject,
184 similarlyConstructeEllipseBoundsObject);
187 EllipseBounds assignedEllipseBoundsObject(11., 12., 17., 18., 1.);
189 assignedEllipseBoundsObject = ellipseBoundsObject;
190 BOOST_CHECK_EQUAL(assignedEllipseBoundsObject, ellipseBoundsObject);
193 BOOST_AUTO_TEST_SUITE_END()