9 #include <boost/test/data/test_case.hpp>
10 #include <boost/test/tools/output_test_stream.hpp>
11 #include <boost/test/unit_test.hpp>
23 using boost::test_tools::output_test_stream;
24 namespace utf = boost::unit_test;
33 BOOST_AUTO_TEST_SUITE(PerigeeSurfaces)
40 auto perigeeSurfaceObject = Surface::makeShared<PerigeeSurface>(unitXYZ);
41 BOOST_CHECK_EQUAL(Surface::makeShared<PerigeeSurface>(unitXYZ)->type(),
47 BOOST_CHECK_EQUAL(Surface::makeShared<PerigeeSurface>(pTransform)->type(),
51 auto copiedPerigeeSurface =
52 Surface::makeShared<PerigeeSurface>(*perigeeSurfaceObject);
54 BOOST_CHECK(*copiedPerigeeSurface == *perigeeSurfaceObject);
57 auto copiedTransformedPerigeeSurface = Surface::makeShared<PerigeeSurface>(
58 tgContext, *perigeeSurfaceObject, pTransform);
59 BOOST_CHECK_EQUAL(copiedTransformedPerigeeSurface->type(),
Surface::Perigee);
66 auto perigeeSurfaceObject = Surface::makeShared<PerigeeSurface>(unitXYZ);
72 BOOST_CHECK_EQUAL(perigeeSurfaceObject->name(),
73 std::string(
"Acts::PerigeeSurface"));
76 boost::test_tools::output_test_stream dumpOuput;
77 perigeeSurfaceObject->toStream(
tgContext, dumpOuput);
79 dumpOuput.is_equal(
"Acts::PerigeeSurface:\n\
80 Center position (x, y, z) = (1.0000000, 1.0000000, 1.0000000)"));
85 Vector3D invalidPosition{0.0, 0.0, 0.0};
86 auto perigeeSurfaceObject = Surface::makeShared<PerigeeSurface>(unitXYZ);
87 auto perigeeSurfaceObject2 = Surface::makeShared<PerigeeSurface>(unitXYZ);
88 auto assignedPerigeeSurface =
89 Surface::makeShared<PerigeeSurface>(invalidPosition);
91 BOOST_CHECK(*perigeeSurfaceObject == *perigeeSurfaceObject2);
93 *assignedPerigeeSurface = *perigeeSurfaceObject;
95 BOOST_CHECK(*assignedPerigeeSurface == *perigeeSurfaceObject);
98 BOOST_AUTO_TEST_SUITE_END()