9 #include <boost/test/data/test_case.hpp>
10 #include <boost/test/tools/output_test_stream.hpp>
11 #include <boost/test/unit_test.hpp>
19 namespace utf = boost::unit_test;
24 BOOST_AUTO_TEST_SUITE(Surfaces)
28 double minHalfX(1.), maxHalfX(6.),
halfY(2.);
39 BOOST_CHECK_EQUAL(copied, original);
44 double minHalfX(1.), maxHalfX(6.),
halfY(2.);
48 auto valvector = original.
values();
49 std::array<double, TrapezoidBounds::eSize>
values;
52 BOOST_CHECK_EQUAL(original, recreated);
57 double minHalfX(1.), maxHalfX(6.),
halfY(2.);
78 double minHalfX(1.), maxHalfX(6.),
halfY(2.);
108 std::vector<Vector2D> expectedVertices{
109 {1., -2.}, {6., 2.}, {-6., 2.}, {-1., -2.}};
110 const auto& actualVertices = trapezoidBoundsObject.
vertices();
111 BOOST_CHECK_EQUAL_COLLECTIONS(actualVertices.cbegin(), actualVertices.cend(),
112 expectedVertices.cbegin(),
113 expectedVertices.cend());
120 BOOST_CHECK_EQUAL(trapezoidBoundsObject.
boundingBox(),
126 boost::test_tools::output_test_stream dumpOuput;
127 trapezoidBoundsObject.
toStream(dumpOuput);
129 dumpOuput.is_equal(
"Acts::TrapezoidBounds: (minHlengthX, maxHlengthX, "
130 "hlengthY) = (1.0000000, 6.0000000, 2.0000000)"));
138 double minHalfX(1.), maxHalfX(6.),
halfY(2.);
144 assignedTrapezoidBoundsObject = trapezoidBoundsObject;
145 BOOST_CHECK_EQUAL(assignedTrapezoidBoundsObject, trapezoidBoundsObject);
148 BOOST_AUTO_TEST_SUITE_END()