9 #include <boost/test/data/test_case.hpp>
10 #include <boost/test/tools/output_test_stream.hpp>
11 #include <boost/test/unit_test.hpp>
27 using boost::test_tools::output_test_stream;
28 namespace utf = boost::unit_test;
52 BOOST_AUTO_TEST_SUITE(Surfaces)
68 std::shared_ptr<const Acts::PlanarBounds>
p =
69 std::make_shared<const RectangleBounds>(5., 10.);
77 std::shared_ptr<const Acts::PlanarBounds> pPlanarBound =
78 std::make_shared<const RectangleBounds>(5., 10.);
110 unitary << 1, 0, 0, 0, 1, 0, 0, 0, 1;
113 BOOST_CHECK_EQUAL(referenceFrame, unitary);
115 auto normal = surface.Surface::normal(
tgContext,
119 BOOST_CHECK_EQUAL(
zero, normal);
134 std::shared_ptr<const Acts::PlanarBounds> pPlanarBound =
135 std::make_shared<const RectangleBounds>(5., 10.);
143 Surface::makeShared<PlaneSurface>(pTransform1, pPlanarBound);
147 DetectorElementStub detElement1{pTransform1, pPlanarBound, 0.2, pMaterial};
148 DetectorElementStub detElement2{pTransform1, pPlanarBound, 0.3, pMaterial};
149 DetectorElementStub detElement3{pTransform2, pPlanarBound, 0.3, pMaterial};
151 SurfaceStub surface1(detElement1);
152 SurfaceStub surface2(detElement1);
153 SurfaceStub surface3(detElement2);
154 SurfaceStub surface4(detElement3);
155 SurfaceStub surface5(detElement1);
156 surface5.assignSurfaceMaterial(pMaterial);
158 BOOST_CHECK(surface1 == surface2);
166 BOOST_CHECK(surface1 != surface4);
168 BOOST_CHECK(surface1 != surface5);
170 BOOST_CHECK(surface1 != *planeSurface);
172 const auto surfacePtr = Surface::makeShared<const SurfaceStub>(detElement1);
173 const auto sharedSurfacePtr = surfacePtr->getSharedPtr();
174 BOOST_CHECK(*surfacePtr == *sharedSurfacePtr);
176 BOOST_AUTO_TEST_SUITE_END()