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(),
46 auto pTransform = std::make_shared<const Transform3D>(translation);
47 std::shared_ptr<const Transform3D> pNullTransform{};
48 BOOST_CHECK_EQUAL(Surface::makeShared<PerigeeSurface>(pNullTransform)->type(),
50 BOOST_CHECK_EQUAL(Surface::makeShared<PerigeeSurface>(pTransform)->type(),
54 auto copiedPerigeeSurface =
55 Surface::makeShared<PerigeeSurface>(*perigeeSurfaceObject);
57 BOOST_CHECK(*copiedPerigeeSurface == *perigeeSurfaceObject);
60 auto copiedTransformedPerigeeSurface = Surface::makeShared<PerigeeSurface>(
61 tgContext, *perigeeSurfaceObject, *pTransform);
62 BOOST_CHECK_EQUAL(copiedTransformedPerigeeSurface->type(),
Surface::Perigee);
69 auto perigeeSurfaceObject = Surface::makeShared<PerigeeSurface>(unitXYZ);
75 BOOST_CHECK_EQUAL(perigeeSurfaceObject->name(),
76 std::string(
"Acts::PerigeeSurface"));
79 boost::test_tools::output_test_stream dumpOuput;
80 perigeeSurfaceObject->toStream(
tgContext, dumpOuput);
82 dumpOuput.is_equal(
"Acts::PerigeeSurface:\n\
83 Center position (x, y, z) = (1.0000000, 1.0000000, 1.0000000)"));
88 Vector3D invalidPosition{0.0, 0.0, 0.0};
89 auto perigeeSurfaceObject = Surface::makeShared<PerigeeSurface>(unitXYZ);
90 auto perigeeSurfaceObject2 = Surface::makeShared<PerigeeSurface>(unitXYZ);
91 auto assignedPerigeeSurface =
92 Surface::makeShared<PerigeeSurface>(invalidPosition);
94 BOOST_CHECK(*perigeeSurfaceObject == *perigeeSurfaceObject2);
96 *assignedPerigeeSurface = *perigeeSurfaceObject;
98 BOOST_CHECK(*assignedPerigeeSurface == *perigeeSurfaceObject);
101 BOOST_AUTO_TEST_SUITE_END()