Skip to content
Snippets Groups Projects
Commit 17161e85 authored by Andreas Salzburger's avatar Andreas Salzburger Committed by Andreas Salzburger
Browse files

fix UnitTets

parent 25ca2b08
No related branches found
No related tags found
1 merge request!789Consistent storage and access schema for bounds
...@@ -46,7 +46,7 @@ BOOST_AUTO_TEST_CASE(DiscLayerConstruction) { ...@@ -46,7 +46,7 @@ BOOST_AUTO_TEST_CASE(DiscLayerConstruction) {
auto pTransform = std::make_shared<const Transform3D>(translation); auto pTransform = std::make_shared<const Transform3D>(translation);
const double minRad(5.), maxRad(10.); // 20 x 10 disc const double minRad(5.), maxRad(10.); // 20 x 10 disc
auto pDisc = std::make_shared<const RadialBounds>(minRad, maxRad); auto pDisc = std::make_shared<const RadialBounds>(minRad, maxRad);
auto pDiscLayer = DiscLayer::create(pTransform, pDisc); auto pDiscLayer = DiscLayer::create(pTransform, pDisc, nullptr, 1.);
BOOST_CHECK_EQUAL(pDiscLayer->layerType(), LayerType::passive); BOOST_CHECK_EQUAL(pDiscLayer->layerType(), LayerType::passive);
// next level: need an array of Surfaces; // next level: need an array of Surfaces;
// bounds object, rectangle type // bounds object, rectangle type
...@@ -57,7 +57,8 @@ BOOST_AUTO_TEST_CASE(DiscLayerConstruction) { ...@@ -57,7 +57,8 @@ BOOST_AUTO_TEST_CASE(DiscLayerConstruction) {
Surface::makeShared<PlaneSurface>(pNullTransform, rBounds), Surface::makeShared<PlaneSurface>(pNullTransform, rBounds),
Surface::makeShared<PlaneSurface>(pNullTransform, rBounds)}; Surface::makeShared<PlaneSurface>(pNullTransform, rBounds)};
const double thickness(1.0); const double thickness(1.0);
auto pDiscLayerFromSurfaces = DiscLayer::create(pTransform, pDisc, nullptr); auto pDiscLayerFromSurfaces =
DiscLayer::create(pTransform, pDisc, nullptr, 1.);
BOOST_CHECK_EQUAL(pDiscLayerFromSurfaces->layerType(), LayerType::passive); BOOST_CHECK_EQUAL(pDiscLayerFromSurfaces->layerType(), LayerType::passive);
// construct with thickness: // construct with thickness:
auto pDiscLayerWithThickness = auto pDiscLayerWithThickness =
...@@ -83,7 +84,7 @@ BOOST_AUTO_TEST_CASE(DiscLayerProperties /*, *utf::expected_failures(1)*/) { ...@@ -83,7 +84,7 @@ BOOST_AUTO_TEST_CASE(DiscLayerProperties /*, *utf::expected_failures(1)*/) {
auto pTransform = std::make_shared<const Transform3D>(translation); auto pTransform = std::make_shared<const Transform3D>(translation);
const double minRad(5.), maxRad(10.); // 20 x 10 disc const double minRad(5.), maxRad(10.); // 20 x 10 disc
auto pDisc = std::make_shared<const RadialBounds>(minRad, maxRad); auto pDisc = std::make_shared<const RadialBounds>(minRad, maxRad);
auto pDiscLayer = DiscLayer::create(pTransform, pDisc); auto pDiscLayer = DiscLayer::create(pTransform, pDisc, nullptr, 1.);
// auto planeSurface = pDiscLayer->surfaceRepresentation(); // auto planeSurface = pDiscLayer->surfaceRepresentation();
BOOST_CHECK_EQUAL(pDiscLayer->surfaceRepresentation().name(), BOOST_CHECK_EQUAL(pDiscLayer->surfaceRepresentation().name(),
std::string("Acts::DiscSurface")); std::string("Acts::DiscSurface"));
......
...@@ -134,7 +134,8 @@ BOOST_AUTO_TEST_CASE(DiamondBoundsAssignment) { ...@@ -134,7 +134,8 @@ BOOST_AUTO_TEST_CASE(DiamondBoundsAssignment) {
similarlyConstructeDiamondBoundsObject); similarlyConstructeDiamondBoundsObject);
// //
/// Test assignment /// Test assignment
DiamondBounds assignedDiamondBoundsObject(0, 0, 0, 0, 0); // invalid DiamondBounds assignedDiamondBoundsObject(
2 * minHalfX, 2 * midHalfX, 2 * maxHalfX, 2 * halfY1, 2 * halfY2);
// object, in some sense // object, in some sense
assignedDiamondBoundsObject = diamondBoundsObject; assignedDiamondBoundsObject = diamondBoundsObject;
BOOST_CHECK_EQUAL(assignedDiamondBoundsObject, diamondBoundsObject); BOOST_CHECK_EQUAL(assignedDiamondBoundsObject, diamondBoundsObject);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment