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)
28 double radius(0.5), halfz(10.), halfphi(
M_PI / 2.0), averagePhi(
M_PI / 2.0);
39 BOOST_CHECK_EQUAL(copyConstructedCylinderBounds, cylinderBounds);
45 double radius(0.5), halfz(10.);
48 auto valvector = original.values();
49 std::array<double, CylinderBounds::eSize>
values;
52 BOOST_CHECK_EQUAL(original, recreated);
56 double radius(0.5), halfz(10.), halfphi(
M_PI / 2.0), averagePhi(
M_PI / 2.0);
80 BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(CylinderBoundsProperties, 4)
83 double nominalRadius{0.5};
84 double nominalHalfLength{20.};
85 double halfphi(
M_PI / 4.0);
86 double averagePhi(0.0);
87 CylinderBounds cylinderBoundsObject(nominalRadius, nominalHalfLength);
88 CylinderBounds cylinderBoundsSegment(nominalRadius, nominalHalfLength,
101 const BoundaryCheck trueBoundaryCheckWithTolerance(
true,
true, 0.1, 0.1);
103 cylinderBoundsObject.
inside(atPiBy2, trueBoundaryCheckWithTolerance));
105 !cylinderBoundsSegment.
inside(unitPhi, trueBoundaryCheckWithTolerance));
107 cylinderBoundsObject.
inside(
origin, trueBoundaryCheckWithTolerance));
110 const Vector3D origin3D{0., 0., 0.};
112 !cylinderBoundsObject.
inside3D(origin3D, trueBoundaryCheckWithTolerance));
119 double sinPiBy8 = std::sin(
M_PI / 8.);
140 nominalHalfLength, 1
e-6);
143 boost::test_tools::output_test_stream dumpOuput;
144 cylinderBoundsObject.
toStream(dumpOuput);
145 BOOST_CHECK(dumpOuput.is_equal(
146 "Acts::CylinderBounds: (radius, halfLengthZ, halfPhiSector, "
147 "averagePhi) = (0.5000000, 20.0000000, 3.1415927, 0.0000000)"));
151 double nominalRadius{0.5};
152 double nominalHalfLength{20.};
153 CylinderBounds cylinderBoundsObject(nominalRadius, nominalHalfLength);
155 assignedCylinderBounds = cylinderBoundsObject;
158 BOOST_CHECK_EQUAL(assignedCylinderBounds, cylinderBoundsObject);
161 BOOST_AUTO_TEST_SUITE_END()