9 #include <boost/test/data/test_case.hpp>
10 #include <boost/test/tools/output_test_stream.hpp>
11 #include <boost/test/unit_test.hpp>
37 BOOST_AUTO_TEST_SUITE(Surfaces)
43 double alpha(M_PI / 8.0), zMin(3.), zMax(6.), halfPhi(M_PI / 4.0),
45 const bool symmetric(
false);
46 BOOST_TEST_CHECKPOINT(
"Four parameter constructor (last two at default)");
49 BOOST_TEST_CHECKPOINT(
"Four parameter constructor");
50 ConeBounds fourParameterConstructed(
alpha, symmetric, halfPhi, averagePhi);
52 BOOST_TEST_CHECKPOINT(
"Five parameter constructor (last two at default)");
55 BOOST_TEST_CHECKPOINT(
"Five parameter constructor)");
58 BOOST_CHECK_EQUAL(fiveParamConstructedConeBounds.
type(),
60 BOOST_TEST_CHECKPOINT(
"Copy constructor");
61 ConeBounds copyConstructedConeBounds(fiveParamConstructedConeBounds);
62 BOOST_CHECK_EQUAL(copyConstructedConeBounds, fiveParamConstructedConeBounds);
67 double alpha(M_PI / 8.0), zMin(3.), zMax(6.), halfPhi(M_PI / 4.0),
71 auto valvector = original.
values();
72 std::array<double, ConeBounds::eSize>
values{};
75 BOOST_CHECK_EQUAL(recreated, original);
80 double alpha(M_PI / 8.0), zMin(3.), zMax(6.), halfPhi(M_PI / 4.0),
87 BOOST_CHECK_THROW(
ConeBounds(M_PI, zMin, zMax, halfPhi, averagePhi),
102 double alpha(M_PI / 8.0), zMin(3.), zMax(6.), halfPhi(M_PI / 4.0),
106 const Vector2 somewhere(4., 4.);
113 BOOST_CHECK(!coneBoundsObject.
inside(origin));
134 boost::test_tools::output_test_stream dumpOuput;
135 coneBoundsObject.
toStream(dumpOuput);
136 BOOST_CHECK(dumpOuput.is_equal(
137 "Acts::ConeBounds: (tanAlpha, minZ, maxZ, halfPhiSector, averagePhi) = "
138 "(0.4142136, 3.0000000, 6.0000000, 0.7853982, 0.0000000)"));
143 double alpha(M_PI / 8.0), zMin(3.), zMax(6.), halfPhi(M_PI / 4.0),
147 ConeBounds assignedConeBounds(0.1, 2.3, 4.5, 1.2, 2.1);
148 assignedConeBounds = originalConeBounds;
149 BOOST_CHECK_EQUAL(assignedConeBounds, originalConeBounds);
152 BOOST_AUTO_TEST_SUITE_END()