From fa59d5646a841beec25d4bd1accd4638cdc3748f Mon Sep 17 00:00:00 2001 From: Paul Gessinger Date: Thu, 30 Jan 2025 11:14:56 +0100 Subject: [PATCH] fix Tests directory --- .../Tests/CommonHelpers/CubicTrackingGeometry.hpp | 3 ++- .../CommonHelpers/CylindricalTrackingGeometry.hpp | 3 ++- .../Acts/Tests/CommonHelpers/DetectorElementStub.hpp | 2 +- .../Acts/Tests/CommonHelpers/LineSurfaceStub.hpp | 4 ++-- .../InterpolatedSolenoidBFieldTest.cpp | 2 +- Tests/UnitTests/Alignment/Kernel/AlignmentTests.cpp | 2 +- .../Core/Clusterization/ClusterizationTests1D.cpp | 2 +- .../UnitTests/Core/Detector/DetectorBuilderTests.cpp | 2 +- Tests/UnitTests/Core/Detector/PortalTests.cpp | 2 +- .../Core/EventData/SpacePointContainerEdmTests.cpp | 2 +- .../Core/Geometry/AlignmentContextTests.cpp | 5 +++-- Tests/UnitTests/Core/Geometry/LayerStub.hpp | 7 ++++--- .../Core/Geometry/TrackingGeometryClosureTests.cpp | 2 +- .../Core/Material/GridSurfaceMaterialTests.cpp | 4 ++-- .../UnitTests/Core/Material/MaterialMapperTests.cpp | 3 ++- .../UnitTests/Core/Propagator/AtlasStepperTests.cpp | 2 +- Tests/UnitTests/Core/Seeding/SpacePointContainer.hpp | 6 ++++-- Tests/UnitTests/Core/Surfaces/SurfaceStub.hpp | 4 ++-- .../TrackFinding/CombinatorialKalmanFilterTests.cpp | 4 ++-- Tests/UnitTests/Core/TrackFitting/GsfTests.cpp | 6 ++++-- Tests/UnitTests/Core/Utilities/AnyTests.cpp | 12 ++++++------ Tests/UnitTests/Core/Utilities/DelegateTests.cpp | 2 +- Tests/UnitTests/Core/Utilities/ResultTests.cpp | 4 ++-- .../Core/Vertexing/FullBilloirVertexFitterTests.cpp | 3 ++- .../Core/Vertexing/IterativeVertexFinderTests.cpp | 3 ++- .../Core/Vertexing/TrackDensityVertexFinderTests.cpp | 3 ++- .../Core/Vertexing/ZScanVertexFinderTests.cpp | 3 ++- 27 files changed, 55 insertions(+), 42 deletions(-) diff --git a/Tests/CommonHelpers/Acts/Tests/CommonHelpers/CubicTrackingGeometry.hpp b/Tests/CommonHelpers/Acts/Tests/CommonHelpers/CubicTrackingGeometry.hpp index 9967d1b9750..fa51bcd1652 100644 --- a/Tests/CommonHelpers/Acts/Tests/CommonHelpers/CubicTrackingGeometry.hpp +++ b/Tests/CommonHelpers/Acts/Tests/CommonHelpers/CubicTrackingGeometry.hpp @@ -37,7 +37,8 @@ struct CubicTrackingGeometry { /// Default constructor for the Cubic tracking geometry /// /// @param gctx the geometry context for this geometry at building time - CubicTrackingGeometry(const GeometryContext& gctx) : geoContext(gctx) { + explicit CubicTrackingGeometry(const GeometryContext& gctx) + : geoContext(gctx) { using namespace UnitLiterals; // Construct the rotation diff --git a/Tests/CommonHelpers/Acts/Tests/CommonHelpers/CylindricalTrackingGeometry.hpp b/Tests/CommonHelpers/Acts/Tests/CommonHelpers/CylindricalTrackingGeometry.hpp index 84e51027a6e..de20beabcf7 100644 --- a/Tests/CommonHelpers/Acts/Tests/CommonHelpers/CylindricalTrackingGeometry.hpp +++ b/Tests/CommonHelpers/Acts/Tests/CommonHelpers/CylindricalTrackingGeometry.hpp @@ -45,7 +45,8 @@ struct CylindricalTrackingGeometry { std::reference_wrapper geoContext; /// Only allowed constructor with reference wrapper - CylindricalTrackingGeometry(const GeometryContext& gctx) : geoContext(gctx) {} + explicit CylindricalTrackingGeometry(const GeometryContext& gctx) + : geoContext(gctx) {} using DetectorStore = std::vector>; diff --git a/Tests/CommonHelpers/Acts/Tests/CommonHelpers/DetectorElementStub.hpp b/Tests/CommonHelpers/Acts/Tests/CommonHelpers/DetectorElementStub.hpp index 4f6b0d5ce79..5a7012b8ae8 100644 --- a/Tests/CommonHelpers/Acts/Tests/CommonHelpers/DetectorElementStub.hpp +++ b/Tests/CommonHelpers/Acts/Tests/CommonHelpers/DetectorElementStub.hpp @@ -33,7 +33,7 @@ class DetectorElementStub : public DetectorElementBase { public: DetectorElementStub() : DetectorElementBase() {} - DetectorElementStub(const Transform3& transform) + explicit DetectorElementStub(const Transform3& transform) : DetectorElementBase(), m_elementTransform(transform) {} /// Constructor for single sided detector element diff --git a/Tests/CommonHelpers/Acts/Tests/CommonHelpers/LineSurfaceStub.hpp b/Tests/CommonHelpers/Acts/Tests/CommonHelpers/LineSurfaceStub.hpp index 662969bc450..bdc71c44d10 100644 --- a/Tests/CommonHelpers/Acts/Tests/CommonHelpers/LineSurfaceStub.hpp +++ b/Tests/CommonHelpers/Acts/Tests/CommonHelpers/LineSurfaceStub.hpp @@ -21,8 +21,8 @@ class LineSurfaceStub : public LineSurface { LineSurfaceStub(const Transform3& htrans, double radius, double halfz) : GeometryObject(), LineSurface(htrans, radius, halfz) { /* nop */ } // - LineSurfaceStub(const Transform3& htrans, - std::shared_ptr lbounds = nullptr) + explicit LineSurfaceStub(const Transform3& htrans, + std::shared_ptr lbounds = nullptr) : GeometryObject(), LineSurface(htrans, std::move(lbounds)) { /*nop */ } // LineSurfaceStub(std::shared_ptr lbounds, diff --git a/Tests/IntegrationTests/InterpolatedSolenoidBFieldTest.cpp b/Tests/IntegrationTests/InterpolatedSolenoidBFieldTest.cpp index 9bfd63e6a88..341ac708ada 100644 --- a/Tests/IntegrationTests/InterpolatedSolenoidBFieldTest.cpp +++ b/Tests/IntegrationTests/InterpolatedSolenoidBFieldTest.cpp @@ -82,7 +82,7 @@ auto bFieldMap = makeFieldMap(bSolenoidField); auto bCache = bFieldMap.makeCache(Acts::MagneticFieldContext{}); struct StreamWrapper { - StreamWrapper(std::ofstream ofstr) : m_ofstr(std::move(ofstr)) { + explicit StreamWrapper(std::ofstream ofstr) : m_ofstr(std::move(ofstr)) { m_ofstr << "x;y;z;B_x;B_y;B_z;Bm_x;Bm_y;Bm_z" << std::endl; } diff --git a/Tests/UnitTests/Alignment/Kernel/AlignmentTests.cpp b/Tests/UnitTests/Alignment/Kernel/AlignmentTests.cpp index 86d668b5beb..5f51e61b6cb 100644 --- a/Tests/UnitTests/Alignment/Kernel/AlignmentTests.cpp +++ b/Tests/UnitTests/Alignment/Kernel/AlignmentTests.cpp @@ -93,7 +93,7 @@ struct TelescopeDetector { /// Default constructor for the Cubic tracking geometry /// /// @param gctx the geometry context for this geometry at building time - TelescopeDetector(std::reference_wrapper gctx) + explicit TelescopeDetector(std::reference_wrapper gctx) : geoContext(gctx) { // Construct the rotation rotation.col(0) = Acts::Vector3(0, 0, -1); diff --git a/Tests/UnitTests/Core/Clusterization/ClusterizationTests1D.cpp b/Tests/UnitTests/Core/Clusterization/ClusterizationTests1D.cpp index 1d30f88e646..92737093295 100644 --- a/Tests/UnitTests/Core/Clusterization/ClusterizationTests1D.cpp +++ b/Tests/UnitTests/Core/Clusterization/ClusterizationTests1D.cpp @@ -23,7 +23,7 @@ namespace Acts::Test { struct Cell1D { - Cell1D(int colv) : col(colv) {} + explicit Cell1D(int colv) : col(colv) {} int col; Ccl::Label label{Ccl::NO_LABEL}; }; diff --git a/Tests/UnitTests/Core/Detector/DetectorBuilderTests.cpp b/Tests/UnitTests/Core/Detector/DetectorBuilderTests.cpp index 5f56d266a05..34b505f4ec6 100644 --- a/Tests/UnitTests/Core/Detector/DetectorBuilderTests.cpp +++ b/Tests/UnitTests/Core/Detector/DetectorBuilderTests.cpp @@ -33,7 +33,7 @@ class CompBuilder final : public Acts::Experimental::IDetectorComponentBuilder { public: - CompBuilder( + explicit CompBuilder( const std::vector>& sensitives = {}) : m_sensitives(sensitives) {} diff --git a/Tests/UnitTests/Core/Detector/PortalTests.cpp b/Tests/UnitTests/Core/Detector/PortalTests.cpp index 46a0558db9d..b80d7950f85 100644 --- a/Tests/UnitTests/Core/Detector/PortalTests.cpp +++ b/Tests/UnitTests/Core/Detector/PortalTests.cpp @@ -39,7 +39,7 @@ class LinkToVolumeImpl : public IExternalNavigation { std::shared_ptr dVolume = nullptr; /// Constructor from volume - LinkToVolumeImpl(std::shared_ptr dv) + explicit LinkToVolumeImpl(std::shared_ptr dv) : dVolume(std::move(dv)) {} /// @return the link to the contained volume diff --git a/Tests/UnitTests/Core/EventData/SpacePointContainerEdmTests.cpp b/Tests/UnitTests/Core/EventData/SpacePointContainerEdmTests.cpp index 7ca20985499..6b33a9843c8 100644 --- a/Tests/UnitTests/Core/EventData/SpacePointContainerEdmTests.cpp +++ b/Tests/UnitTests/Core/EventData/SpacePointContainerEdmTests.cpp @@ -41,7 +41,7 @@ class Adapter { using ValueType = value_type; Adapter(SpacePointCollection&&) = delete; - Adapter(const SpacePointCollection& externalCollection) + explicit Adapter(const SpacePointCollection& externalCollection) : m_storage(&externalCollection) {} private: diff --git a/Tests/UnitTests/Core/Geometry/AlignmentContextTests.cpp b/Tests/UnitTests/Core/Geometry/AlignmentContextTests.cpp index 382bb8a0075..3c58620a231 100644 --- a/Tests/UnitTests/Core/Geometry/AlignmentContextTests.cpp +++ b/Tests/UnitTests/Core/Geometry/AlignmentContextTests.cpp @@ -40,8 +40,9 @@ struct AlignmentContext { AlignmentContext() = default; /// Constructor with Store and context index - AlignmentContext(std::shared_ptr> aStore, - unsigned int aIndex = 0) + explicit AlignmentContext( + std::shared_ptr> aStore, + unsigned int aIndex = 0) : alignmentStore(std::move(aStore)), alignmentIndex(aIndex) {} }; diff --git a/Tests/UnitTests/Core/Geometry/LayerStub.hpp b/Tests/UnitTests/Core/Geometry/LayerStub.hpp index a6eb0dbca1b..1b95fb2f8b6 100644 --- a/Tests/UnitTests/Core/Geometry/LayerStub.hpp +++ b/Tests/UnitTests/Core/Geometry/LayerStub.hpp @@ -24,9 +24,10 @@ class LayerStub : virtual public SurfaceStub, public Layer { /// copy constructor (deleted in Surface baseclass) LayerStub(const LayerStub& otherLayer) = delete; /// constructor with pointer to SurfaceArray (protected in Layer baseclass) - LayerStub(std::unique_ptr surfaceArray, double thickness = 0, - std::unique_ptr ad = nullptr, - LayerType ltype = passive) + explicit LayerStub(std::unique_ptr surfaceArray, + double thickness = 0, + std::unique_ptr ad = nullptr, + LayerType ltype = passive) : SurfaceStub(), Layer(std::move(surfaceArray), thickness, std::move(ad), ltype) {} diff --git a/Tests/UnitTests/Core/Geometry/TrackingGeometryClosureTests.cpp b/Tests/UnitTests/Core/Geometry/TrackingGeometryClosureTests.cpp index 8c60e3898b9..784f988646a 100644 --- a/Tests/UnitTests/Core/Geometry/TrackingGeometryClosureTests.cpp +++ b/Tests/UnitTests/Core/Geometry/TrackingGeometryClosureTests.cpp @@ -194,7 +194,7 @@ template struct CallableHook : public Acts::GeometryIdentifierHook { Callable callable; - CallableHook(const Callable& c) : callable(c) {} + explicit CallableHook(const Callable& c) : callable(c) {} Acts::GeometryIdentifier decorateIdentifier( Acts::GeometryIdentifier identifier, diff --git a/Tests/UnitTests/Core/Material/GridSurfaceMaterialTests.cpp b/Tests/UnitTests/Core/Material/GridSurfaceMaterialTests.cpp index 00f66bd0bb2..83b9630538c 100644 --- a/Tests/UnitTests/Core/Material/GridSurfaceMaterialTests.cpp +++ b/Tests/UnitTests/Core/Material/GridSurfaceMaterialTests.cpp @@ -36,7 +36,7 @@ class GlobalToZPhi final : public Acts::GridAccess::IGlobalToGridLocal { public: double zShift = 0.; - GlobalToZPhi(double shift) : zShift(shift) {} + explicit GlobalToZPhi(double shift) : zShift(shift) {} std::array g2ZPhi(const Acts::Vector3& global) const { return {global.z() + zShift, Acts::VectorHelpers::phi(global)}; @@ -48,7 +48,7 @@ class LocalToZPhi final : public Acts::GridAccess::IBoundToGridLocal { public: double radius = 1.; - LocalToZPhi(double r) : radius(r) {} + explicit LocalToZPhi(double r) : radius(r) {} std::array l2ZPhi(const Acts::Vector2& local) const { return {local[1u], local[0u] / radius}; diff --git a/Tests/UnitTests/Core/Material/MaterialMapperTests.cpp b/Tests/UnitTests/Core/Material/MaterialMapperTests.cpp index 9fca8bb64b7..ed25ec72e6e 100644 --- a/Tests/UnitTests/Core/Material/MaterialMapperTests.cpp +++ b/Tests/UnitTests/Core/Material/MaterialMapperTests.cpp @@ -84,7 +84,8 @@ class IntersectSurfacesFinder : public IAssignmentFinder { /// @brief Interface for the material mapping, this is the accumulation step class MaterialBlender : public ISurfaceMaterialAccumulater { public: - MaterialBlender(const std::vector>& surfaces = {}) + explicit MaterialBlender( + const std::vector>& surfaces = {}) : m_surfaces(surfaces) {} /// The state of the material accumulater, this is used diff --git a/Tests/UnitTests/Core/Propagator/AtlasStepperTests.cpp b/Tests/UnitTests/Core/Propagator/AtlasStepperTests.cpp index a5dc3ecc331..1cd5644bcd0 100644 --- a/Tests/UnitTests/Core/Propagator/AtlasStepperTests.cpp +++ b/Tests/UnitTests/Core/Propagator/AtlasStepperTests.cpp @@ -57,7 +57,7 @@ using Stepper = Acts::AtlasStepper; /// Simplified propagator state. struct MockPropagatorState { - MockPropagatorState(Stepper::State stepperState) + explicit MockPropagatorState(Stepper::State stepperState) : stepping(std::move(stepperState)) {} /// Stepper state. diff --git a/Tests/UnitTests/Core/Seeding/SpacePointContainer.hpp b/Tests/UnitTests/Core/Seeding/SpacePointContainer.hpp index cc264666f0f..bd2f7678624 100644 --- a/Tests/UnitTests/Core/Seeding/SpacePointContainer.hpp +++ b/Tests/UnitTests/Core/Seeding/SpacePointContainer.hpp @@ -30,8 +30,10 @@ class SpacePointContainer { // the memory backend is independetly handled. This is only interfacing it to // ACTS SpacePointContainer(CollectionType&& container) = delete; - SpacePointContainer(CollectionType& container) : m_storage(container) {} - SpacePointContainer(CollectionType* container) : m_storage(container) {} + explicit SpacePointContainer(CollectionType& container) + : m_storage(container) {} + explicit SpacePointContainer(CollectionType* container) + : m_storage(container) {} // No copy constructor or copy operation allowed SpacePointContainer(const SpacePointContainer&) = delete; diff --git a/Tests/UnitTests/Core/Surfaces/SurfaceStub.hpp b/Tests/UnitTests/Core/Surfaces/SurfaceStub.hpp index 4815420aa1c..96e4a8d226f 100644 --- a/Tests/UnitTests/Core/Surfaces/SurfaceStub.hpp +++ b/Tests/UnitTests/Core/Surfaces/SurfaceStub.hpp @@ -21,12 +21,12 @@ namespace Acts { /// Surface derived class stub class SurfaceStub : public RegularSurface { public: - SurfaceStub(const Transform3& htrans = Transform3::Identity()) + explicit SurfaceStub(const Transform3& htrans = Transform3::Identity()) : GeometryObject(), RegularSurface(htrans) {} SurfaceStub(const GeometryContext& gctx, const SurfaceStub& sf, const Transform3& transf) : GeometryObject(), RegularSurface(gctx, sf, transf) {} - SurfaceStub(const DetectorElementBase& detelement) + explicit SurfaceStub(const DetectorElementBase& detelement) : GeometryObject(), RegularSurface(detelement) {} ~SurfaceStub() override = default; diff --git a/Tests/UnitTests/Core/TrackFinding/CombinatorialKalmanFilterTests.cpp b/Tests/UnitTests/Core/TrackFinding/CombinatorialKalmanFilterTests.cpp index 22ce0a52c55..4d3600d6b62 100644 --- a/Tests/UnitTests/Core/TrackFinding/CombinatorialKalmanFilterTests.cpp +++ b/Tests/UnitTests/Core/TrackFinding/CombinatorialKalmanFilterTests.cpp @@ -104,7 +104,7 @@ struct Detector { {Acts::GeometryIdentifier().setVolume(3).setLayer(8), resStrip1}, }; - Detector(const Acts::GeometryContext& geoCtx) + explicit Detector(const Acts::GeometryContext& geoCtx) : store(geoCtx), geometry(store()) {} }; @@ -208,7 +208,7 @@ struct Fixture { std::unique_ptr logger; - Fixture(double bz) + explicit Fixture(double bz) : detector(geoCtx), ckf(makeConstantFieldPropagator(detector.geometry, bz)), logger(Acts::getDefaultLogger("CkfTest", Acts::Logging::INFO)) { diff --git a/Tests/UnitTests/Core/TrackFitting/GsfTests.cpp b/Tests/UnitTests/Core/TrackFitting/GsfTests.cpp index 59c1cc72867..3ea1aee856e 100644 --- a/Tests/UnitTests/Core/TrackFitting/GsfTests.cpp +++ b/Tests/UnitTests/Core/TrackFitting/GsfTests.cpp @@ -113,12 +113,14 @@ auto makeDefaultGsfOptions() { struct MultiCmpsParsInterface : public BoundTrackParameters { MultiComponentBoundTrackParameters multi_pars; - MultiCmpsParsInterface(const MultiComponentBoundTrackParameters &p) + explicit MultiCmpsParsInterface(const MultiComponentBoundTrackParameters &p) : BoundTrackParameters(p.referenceSurface().getSharedPtr(), p.parameters(), p.covariance(), electron), multi_pars(p) {} - operator MultiComponentBoundTrackParameters() const { return multi_pars; } + explicit operator MultiComponentBoundTrackParameters() const { + return multi_pars; + } }; auto makeParameters() { diff --git a/Tests/UnitTests/Core/Utilities/AnyTests.cpp b/Tests/UnitTests/Core/Utilities/AnyTests.cpp index 7389218e54a..1a843dd42ed 100644 --- a/Tests/UnitTests/Core/Utilities/AnyTests.cpp +++ b/Tests/UnitTests/Core/Utilities/AnyTests.cpp @@ -117,7 +117,7 @@ BOOST_AUTO_TEST_CASE(AnyConstructCustom) { BOOST_AUTO_TEST_CASE(AnyConstructCustomInPlace) { struct A { int value; - A(int v) { value = v; } + explicit A(int v) { value = v; } }; Any a{std::in_place_type, 42}; @@ -174,7 +174,7 @@ BOOST_AUTO_TEST_CASE(AnyCopy) { struct D { bool* destroyed; - D(bool* d) : destroyed{d} {} + explicit D(bool* d) : destroyed{d} {} ~D() { *destroyed = true; } }; @@ -182,7 +182,7 @@ struct D2 { bool* destroyed{nullptr}; std::array blob{}; - D2(bool* d) : destroyed{d} {} + explicit D2(bool* d) : destroyed{d} {} ~D2() { *destroyed = true; } }; @@ -337,7 +337,7 @@ struct D3 { std::size_t* destroyed{nullptr}; std::array blob{}; - D3(std::size_t* d) : destroyed{d} {} + explicit D3(std::size_t* d) : destroyed{d} {} ~D3() { (*destroyed)++; } }; @@ -372,7 +372,7 @@ template <> struct Lifecycle<0> { LifecycleCounters* counters; - Lifecycle(LifecycleCounters* _counters) : counters{_counters} {} + explicit Lifecycle(LifecycleCounters* _counters) : counters{_counters} {} Lifecycle(Lifecycle&& o) { counters = o.counters; @@ -403,7 +403,7 @@ template struct Lifecycle : public Lifecycle<0> { std::array m_padding{}; - Lifecycle(LifecycleCounters* _counters) : Lifecycle<0>(_counters) {} + explicit Lifecycle(LifecycleCounters* _counters) : Lifecycle<0>(_counters) {} }; template diff --git a/Tests/UnitTests/Core/Utilities/DelegateTests.cpp b/Tests/UnitTests/Core/Utilities/DelegateTests.cpp index c2d575b58fe..124ceaa8d46 100644 --- a/Tests/UnitTests/Core/Utilities/DelegateTests.cpp +++ b/Tests/UnitTests/Core/Utilities/DelegateTests.cpp @@ -214,7 +214,7 @@ BOOST_AUTO_TEST_CASE(StatefullLambdas) { } struct CheckDestructor { - CheckDestructor(bool* _out) : destructorCalled{_out} {} + explicit CheckDestructor(bool* _out) : destructorCalled{_out} {} bool* destructorCalled; diff --git a/Tests/UnitTests/Core/Utilities/ResultTests.cpp b/Tests/UnitTests/Core/Utilities/ResultTests.cpp index 748e0d7211e..37c1bc6793f 100644 --- a/Tests/UnitTests/Core/Utilities/ResultTests.cpp +++ b/Tests/UnitTests/Core/Utilities/ResultTests.cpp @@ -240,7 +240,7 @@ BOOST_AUTO_TEST_CASE(TestErrorCodes) { } struct NoCopy { - NoCopy(int i) : num(i) {} + explicit NoCopy(int i) : num(i) {} NoCopy(const NoCopy&) = delete; NoCopy& operator=(const NoCopy&) = delete; NoCopy(NoCopy&&) = default; @@ -253,7 +253,7 @@ Result make_nocopy(int i, bool v = true) { if (!v) { return MyError::Failure; } - return i; + return NoCopy{i}; } BOOST_AUTO_TEST_CASE(CopyBehaviour) { diff --git a/Tests/UnitTests/Core/Vertexing/FullBilloirVertexFitterTests.cpp b/Tests/UnitTests/Core/Vertexing/FullBilloirVertexFitterTests.cpp index 5c4deb84a38..41aab8e1c99 100644 --- a/Tests/UnitTests/Core/Vertexing/FullBilloirVertexFitterTests.cpp +++ b/Tests/UnitTests/Core/Vertexing/FullBilloirVertexFitterTests.cpp @@ -94,7 +94,8 @@ std::uniform_int_distribution nTracksDist(3, 10); // Dummy user-defined InputTrack type struct InputTrackStub { - InputTrackStub(const BoundTrackParameters& params) : m_parameters(params) {} + explicit InputTrackStub(const BoundTrackParameters& params) + : m_parameters(params) {} const BoundTrackParameters& parameters() const { return m_parameters; } diff --git a/Tests/UnitTests/Core/Vertexing/IterativeVertexFinderTests.cpp b/Tests/UnitTests/Core/Vertexing/IterativeVertexFinderTests.cpp index 37925947d28..d0fa5dec9f3 100644 --- a/Tests/UnitTests/Core/Vertexing/IterativeVertexFinderTests.cpp +++ b/Tests/UnitTests/Core/Vertexing/IterativeVertexFinderTests.cpp @@ -99,7 +99,8 @@ std::uniform_int_distribution nTracksDist(5, 15); // Dummy user-defined InputTrack type struct InputTrackStub { - InputTrackStub(const BoundTrackParameters& params) : m_parameters(params) {} + explicit InputTrackStub(const BoundTrackParameters& params) + : m_parameters(params) {} const BoundTrackParameters& parameters() const { return m_parameters; } diff --git a/Tests/UnitTests/Core/Vertexing/TrackDensityVertexFinderTests.cpp b/Tests/UnitTests/Core/Vertexing/TrackDensityVertexFinderTests.cpp index a87a50312b8..50ccdea04de 100644 --- a/Tests/UnitTests/Core/Vertexing/TrackDensityVertexFinderTests.cpp +++ b/Tests/UnitTests/Core/Vertexing/TrackDensityVertexFinderTests.cpp @@ -285,7 +285,8 @@ BOOST_AUTO_TEST_CASE(track_density_finder_random_test) { // Dummy user-defined InputTrackStub type struct InputTrackStub { - InputTrackStub(const BoundTrackParameters& params) : m_parameters(params) {} + explicit InputTrackStub(const BoundTrackParameters& params) + : m_parameters(params) {} const BoundTrackParameters& parameters() const { return m_parameters; } diff --git a/Tests/UnitTests/Core/Vertexing/ZScanVertexFinderTests.cpp b/Tests/UnitTests/Core/Vertexing/ZScanVertexFinderTests.cpp index 01d0c033bb1..2828450dbd8 100644 --- a/Tests/UnitTests/Core/Vertexing/ZScanVertexFinderTests.cpp +++ b/Tests/UnitTests/Core/Vertexing/ZScanVertexFinderTests.cpp @@ -187,7 +187,8 @@ BOOST_AUTO_TEST_CASE(zscan_finder_test) { // Dummy user-defined InputTrackStub type struct InputTrackStub { - InputTrackStub(const BoundTrackParameters& params) : m_parameters(params) {} + explicit InputTrackStub(const BoundTrackParameters& params) + : m_parameters(params) {} const BoundTrackParameters& parameters() const { return m_parameters; }