9 #include <boost/test/data/test_case.hpp>
10 #include <boost/test/tools/output_test_stream.hpp>
11 #include <boost/test/unit_test.hpp>
21 using boost::test_tools::output_test_stream;
22 namespace utf = boost::unit_test;
31 BOOST_AUTO_TEST_SUITE(PerigeeSurfaces)
38 auto perigeeSurfaceObject = Surface::makeShared<PerigeeSurface>(unitXYZ);
39 BOOST_CHECK_EQUAL(Surface::makeShared<PerigeeSurface>(unitXYZ)->
type(),
45 BOOST_CHECK_EQUAL(Surface::makeShared<PerigeeSurface>(pTransform)->
type(),
49 auto copiedPerigeeSurface =
50 Surface::makeShared<PerigeeSurface>(*perigeeSurfaceObject);
52 BOOST_CHECK(*copiedPerigeeSurface == *perigeeSurfaceObject);
55 auto copiedTransformedPerigeeSurface = Surface::makeShared<PerigeeSurface>(
56 tgContext, *perigeeSurfaceObject, pTransform);
57 BOOST_CHECK_EQUAL(copiedTransformedPerigeeSurface->type(),
Surface::Perigee);
64 auto perigeeSurfaceObject = Surface::makeShared<PerigeeSurface>(unitXYZ);
70 BOOST_CHECK_EQUAL(perigeeSurfaceObject->name(),
74 boost::test_tools::output_test_stream dumpOuput;
75 perigeeSurfaceObject->toStream(
tgContext, dumpOuput);
77 dumpOuput.is_equal(
"Acts::PerigeeSurface:\n\
78 Center position (x, y, z) = (1.0000000, 1.0000000, 1.0000000)"));
83 Vector3 invalidPosition{0.0, 0.0, 0.0};
84 auto perigeeSurfaceObject = Surface::makeShared<PerigeeSurface>(unitXYZ);
85 auto perigeeSurfaceObject2 = Surface::makeShared<PerigeeSurface>(unitXYZ);
86 auto assignedPerigeeSurface =
87 Surface::makeShared<PerigeeSurface>(invalidPosition);
89 BOOST_CHECK(*perigeeSurfaceObject == *perigeeSurfaceObject2);
91 *assignedPerigeeSurface = *perigeeSurfaceObject;
93 BOOST_CHECK(*assignedPerigeeSurface == *perigeeSurfaceObject);
96 BOOST_AUTO_TEST_SUITE_END()