9 #include <boost/test/data/test_case.hpp>
10 #include <boost/test/tools/output_test_stream.hpp>
11 #include <boost/test/unit_test.hpp>
32 BOOST_AUTO_TEST_SUITE(Surfaces)
38 double alpha(
M_PI / 8.0), zMin(3.), zMax(6.), halfPhi(
M_PI / 4.0),
40 const bool symmetric(
false);
41 BOOST_TEST_CHECKPOINT(
"Four parameter constructor (last two at default)");
44 BOOST_TEST_CHECKPOINT(
"Four parameter constructor");
45 ConeBounds fourParameterConstructed(
alpha, symmetric, halfPhi, averagePhi);
47 BOOST_TEST_CHECKPOINT(
"Five parameter constructor (last two at default)");
50 BOOST_TEST_CHECKPOINT(
"Five parameter constructor)");
53 BOOST_CHECK_EQUAL(fiveParamConstructedConeBounds.
type(),
55 BOOST_TEST_CHECKPOINT(
"Copy constructor");
56 ConeBounds copyConstructedConeBounds(fiveParamConstructedConeBounds);
57 BOOST_CHECK_EQUAL(copyConstructedConeBounds, fiveParamConstructedConeBounds);
62 double alpha(
M_PI / 8.0), zMin(3.), zMax(6.), halfPhi(
M_PI / 4.0),
66 auto valvector = original.
values();
67 std::array<double, ConeBounds::eSize>
values;
70 BOOST_CHECK_EQUAL(recreated, original);
75 double alpha(
M_PI / 8.0), zMin(3.), zMax(6.), halfPhi(
M_PI / 4.0),
82 BOOST_CHECK_THROW(
ConeBounds(
M_PI, zMin, zMax, halfPhi, averagePhi),
97 double alpha(
M_PI / 8.0), zMin(3.), zMax(6.), halfPhi(
M_PI / 4.0),
108 BOOST_CHECK(!coneBoundsObject.
inside(origin));
132 boost::test_tools::output_test_stream dumpOuput;
133 coneBoundsObject.
toStream(dumpOuput);
134 BOOST_CHECK(dumpOuput.is_equal(
135 "Acts::ConeBounds: (tanAlpha, minZ, maxZ, halfPhiSector, averagePhi) = "
136 "(0.4142136, 3.0000000, 6.0000000, 0.7853982, 0.0000000)"));
141 double alpha(
M_PI / 8.0), zMin(3.), zMax(6.), halfPhi(
M_PI / 4.0),
145 ConeBounds assignedConeBounds(0.1, 2.3, 4.5, 1.2, 2.1);
146 assignedConeBounds = originalConeBounds;
147 BOOST_CHECK_EQUAL(assignedConeBounds, originalConeBounds);
150 BOOST_AUTO_TEST_SUITE_END()