9 #include <boost/test/data/test_case.hpp>
10 #include <boost/test/tools/output_test_stream.hpp>
11 #include <boost/test/unit_test.hpp>
20 BOOST_AUTO_TEST_SUITE(Surfaces)
24 double radius(0.5), halfz(10.);
28 LineBounds copyConstructedLineBounds(lineBounds);
34 double nominalRadius{0.5};
35 double nominalHalfLength{20.};
36 LineBounds original(nominalRadius, nominalHalfLength);
38 auto valvector = original.
values();
39 std::array<double, LineBounds::eSize>
values;
41 BOOST_CHECK_EQUAL(original, recreated);
46 double nominalRadius{0.5};
47 double nominalHalfLength{20.};
49 BOOST_CHECK_THROW(
LineBounds(-nominalRadius, nominalHalfLength),
52 BOOST_CHECK_THROW(
LineBounds(nominalRadius, -nominalHalfLength),
56 BOOST_CHECK_THROW(
LineBounds(-nominalRadius, -nominalHalfLength),
62 double nominalRadius{0.5};
63 double nominalHalfLength{20.};
64 LineBounds lineBoundsObject(nominalRadius, nominalHalfLength);
65 LineBounds assignedLineBounds = lineBoundsObject;
66 BOOST_CHECK_EQUAL(assignedLineBounds, lineBoundsObject);
72 double nominalRadius{0.5};
73 double nominalHalfLength{20.};
74 LineBounds lineBoundsObject(nominalRadius, nominalHalfLength);
85 const BoundaryCheck trueBoundaryCheckWithTolerance(
true,
true, 0.1, 0.1);
88 !lineBoundsObject.
inside(atRadius, trueBoundaryCheckWithTolerance));
90 !lineBoundsObject.
inside(beyondEnd, trueBoundaryCheckWithTolerance));
91 BOOST_CHECK(lineBoundsObject.
inside(unitZ, trueBoundaryCheckWithTolerance));
92 BOOST_CHECK(!lineBoundsObject.
inside(unitR, trueBoundaryCheckWithTolerance));
97 trueBoundaryCheckWithTolerance));
98 BOOST_CHECK(!lineBoundsObject.inside(
Vector2D{-0.8, 10},
99 trueBoundaryCheckWithTolerance));
106 BOOST_CHECK_EQUAL(lineBoundsObject.get(
LineBounds::eR), nominalRadius);
113 boost::test_tools::output_test_stream dumpOuput;
114 lineBoundsObject.toStream(dumpOuput);
115 BOOST_CHECK(dumpOuput.is_equal(
116 "Acts::LineBounds: (radius, halflengthInZ) = (0.5000000, 20.0000000)"));
119 BOOST_AUTO_TEST_SUITE_END()