Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Tests: remove unused aliases, functions, and variables #2716

Merged
merged 11 commits into from
Nov 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Tests/Benchmarks/SurfaceIntersectionBenchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include <random>

namespace bdata = boost::unit_test::data;
namespace tt = boost::test_tools;
using namespace Acts::UnitLiterals;

namespace Acts {
Expand Down
4 changes: 0 additions & 4 deletions Tests/IntegrationTests/InterpolatedSolenoidBFieldTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include "Acts/MagneticField/SolenoidBField.hpp"
#include "Acts/Tests/CommonHelpers/FloatComparisons.hpp"
#include "Acts/Utilities/Grid.hpp"
#include "Acts/Utilities/VectorHelpers.hpp"
#include "Acts/Utilities/detail/Axis.hpp"

#include <cmath>
Expand All @@ -24,11 +23,8 @@
#include <random>

using namespace Acts::UnitLiterals;
using Acts::VectorHelpers::perp;
using Acts::VectorHelpers::phi;

namespace bdata = boost::unit_test::data;
namespace tt = boost::test_tools;

namespace Acts {
namespace IntegrationTest {
Expand Down
4 changes: 0 additions & 4 deletions Tests/IntegrationTests/PropagationTestsAtlasField.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@

#include "PropagationTestHelper.hpp"

namespace bdata = boost::unit_test::data;
namespace tt = boost::test_tools;

namespace Acts {

/// Get the ATLAS field from :
Expand Down Expand Up @@ -125,5 +122,4 @@ AtlasPropagatorType apropagator(std::move(astepper));
#include "PropagationTestBase.hpp"

} // namespace IntegrationTest

} // namespace Acts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
#include <cstdlib>
#include <memory>

namespace bdata = boost::unit_test::data;
namespace tt = boost::test_tools;
using namespace Acts::UnitLiterals;

namespace Acts {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include <vector>

namespace bdata = boost::unit_test::data;
namespace tt = boost::test_tools;
using namespace Acts::UnitLiterals;

namespace Acts {
Expand Down
2 changes: 0 additions & 2 deletions Tests/UnitTests/Core/EventData/FreeTrackParametersTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "Acts/EventData/Charge.hpp"
#include "Acts/EventData/GenericFreeTrackParameters.hpp"
#include "Acts/EventData/TrackParameters.hpp"
#include "Acts/Geometry/GeometryContext.hpp"
#include "Acts/Tests/CommonHelpers/FloatComparisons.hpp"
#include "Acts/Utilities/UnitVectors.hpp"

Expand All @@ -33,7 +32,6 @@ using namespace Acts;
using namespace Acts::UnitLiterals;

constexpr auto eps = 8 * std::numeric_limits<ActsScalar>::epsilon();
const GeometryContext geoCtx;
const FreeSquareMatrix cov = FreeSquareMatrix::Identity();

void checkParameters(const FreeTrackParameters& params, const Vector4& pos4,
Expand Down
1 change: 0 additions & 1 deletion Tests/UnitTests/Core/Geometry/BVHDataTestCase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "Acts/Surfaces/Surface.hpp"

namespace bdata = boost::unit_test::data;
using Box = Acts::Volume::BoundingBox;
using Ray = Acts::Ray<double, 3>;

GeometryContext tgContext = GeometryContext();
Expand Down
5 changes: 0 additions & 5 deletions Tests/UnitTests/Core/Geometry/ConeLayerTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,7 @@
#include <utility>
#include <vector>

using boost::test_tools::output_test_stream;
namespace utf = boost::unit_test;

namespace Acts {

namespace Test {
namespace Layers {
BOOST_AUTO_TEST_SUITE(Layers)
Expand Down Expand Up @@ -79,5 +75,4 @@ BOOST_AUTO_TEST_CASE(ConeLayerConstruction) {
BOOST_AUTO_TEST_SUITE_END()
} // namespace Layers
} // namespace Test

} // namespace Acts
7 changes: 0 additions & 7 deletions Tests/UnitTests/Core/Geometry/ConeVolumeBoundsTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,10 @@
#include <utility>
#include <vector>

namespace tt = boost::test_tools;

namespace Acts {

using namespace UnitLiterals;

// Create a test context
GeometryContext tgContext = GeometryContext();

namespace Test {

BOOST_AUTO_TEST_SUITE(VolumeBounds)
Expand Down Expand Up @@ -86,8 +81,6 @@ BOOST_AUTO_TEST_CASE(ConeVolumeBoundsTests) {
}

BOOST_AUTO_TEST_CASE(ConeVolumeBoundsSurfaceOrientation) {
GeometryContext tgContext = GeometryContext();

ConeVolumeBounds hcone(10_mm, 0.45, 80_mm, 50_mm, 0., M_PI);

auto cvbOrientedSurfaces = hcone.orientedSurfaces(Transform3::Identity());
Expand Down
22 changes: 0 additions & 22 deletions Tests/UnitTests/Core/Geometry/CuboidVolumeBuilderTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,28 +38,6 @@ using namespace Acts::UnitLiterals;
namespace Acts {
namespace Test {

struct StepVolumeCollector {
///
/// @brief Data container for result analysis
///
struct this_result {
// Position of the propagator after each step
std::vector<Vector3> position;
// Volume of the propagator after each step
std::vector<TrackingVolume const*> volume;
};

using result_type = this_result;

template <typename propagator_state_t, typename stepper_t,
typename navigator_t>
void operator()(propagator_state_t& state, const stepper_t& stepper,
const navigator_t& navigator, result_type& result) const {
result.position.push_back(stepper.position(state.stepping));
result.volume.push_back(navigator.currentVolume(state.navigation));
}
};

BOOST_AUTO_TEST_CASE(CuboidVolumeBuilderTest) {
// Construct builder
CuboidVolumeBuilder cvb;
Expand Down
11 changes: 0 additions & 11 deletions Tests/UnitTests/Core/Geometry/CylinderLayerTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

#include <boost/test/data/test_case.hpp>
#include <boost/test/tools/output_test_stream.hpp>
#include <boost/test/unit_test.hpp>

#include "Acts/Definitions/Algebra.hpp"
#include "Acts/Geometry/ApproachDescriptor.hpp"
#include "Acts/Geometry/CylinderLayer.hpp"
#include "Acts/Geometry/GenericApproachDescriptor.hpp"
#include "Acts/Geometry/GeometryContext.hpp"
#include "Acts/Geometry/Layer.hpp"
#include "Acts/Surfaces/CylinderBounds.hpp"
#include "Acts/Surfaces/CylinderSurface.hpp"
Expand All @@ -29,16 +27,8 @@
#include <utility>
#include <vector>

using boost::test_tools::output_test_stream;
namespace utf = boost::unit_test;

namespace Acts {

namespace Test {

// Create a test context
GeometryContext tgContext = GeometryContext();

namespace Layers {
BOOST_AUTO_TEST_SUITE(Layers)

Expand Down Expand Up @@ -102,5 +92,4 @@ BOOST_AUTO_TEST_CASE(CylinderLayerProperties) {
BOOST_AUTO_TEST_SUITE_END()
} // namespace Layers
} // namespace Test

} // namespace Acts
5 changes: 0 additions & 5 deletions Tests/UnitTests/Core/Geometry/CylinderVolumeBoundsTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,9 @@
#include <vector>

namespace bdata = boost::unit_test::data;
namespace tt = boost::test_tools;

namespace Acts {

namespace Test {

BOOST_AUTO_TEST_SUITE(Geometry)

BOOST_AUTO_TEST_CASE(CylinderVolumeBoundsConstruction) {
Expand Down Expand Up @@ -329,7 +326,5 @@ BOOST_AUTO_TEST_CASE(CylinderVolumeOrientedBoundaries) {
}

BOOST_AUTO_TEST_SUITE_END()

} // namespace Test

} // namespace Acts
3 changes: 0 additions & 3 deletions Tests/UnitTests/Core/Geometry/CylinderVolumeBuilderTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@
#include <utility>

namespace bdata = boost::unit_test::data;
namespace tt = boost::test_tools;

namespace Acts {

namespace Test {

/// Unit test for testing the wraps() function of the CylinderVolumeBuilder
Expand Down Expand Up @@ -370,5 +368,4 @@ BOOST_DATA_TEST_CASE(
}

} // namespace Test

} // namespace Acts
11 changes: 0 additions & 11 deletions Tests/UnitTests/Core/Geometry/DiscLayerTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

#include <boost/test/data/test_case.hpp>
#include <boost/test/tools/output_test_stream.hpp>
#include <boost/test/unit_test.hpp>

#include "Acts/Definitions/Algebra.hpp"
#include "Acts/Geometry/ApproachDescriptor.hpp"
#include "Acts/Geometry/DiscLayer.hpp"
#include "Acts/Geometry/GenericApproachDescriptor.hpp"
#include "Acts/Geometry/GeometryContext.hpp"
#include "Acts/Geometry/Layer.hpp"
#include "Acts/Surfaces/DiscSurface.hpp"
#include "Acts/Surfaces/PlaneSurface.hpp"
Expand All @@ -28,16 +26,8 @@
#include <utility>
#include <vector>

using boost::test_tools::output_test_stream;
namespace utf = boost::unit_test;

namespace Acts {

namespace Test {

// Create a test context
GeometryContext tgContext = GeometryContext();

namespace Layers {
BOOST_AUTO_TEST_SUITE(Layers)

Expand Down Expand Up @@ -96,5 +86,4 @@ BOOST_AUTO_TEST_CASE(DiscLayerProperties) {
BOOST_AUTO_TEST_SUITE_END()
} // namespace Layers
} // namespace Test

} // namespace Acts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

#include <boost/test/data/test_case.hpp>
#include <boost/test/tools/output_test_stream.hpp>
#include <boost/test/unit_test.hpp>

#include "Acts/Definitions/Algebra.hpp"
Expand All @@ -31,9 +30,6 @@
#include "../Surfaces/SurfaceStub.hpp"
#include "LayerStub.hpp"

using boost::test_tools::output_test_stream;
namespace utf = boost::unit_test;

namespace Acts {

namespace Test {
Expand Down
11 changes: 0 additions & 11 deletions Tests/UnitTests/Core/Geometry/LayerCreatorTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,12 @@

#include <boost/format.hpp>

namespace bdata = boost::unit_test::data;
namespace tt = boost::test_tools;

namespace Acts {

namespace Test {

// Create a test context
GeometryContext tgContext = GeometryContext();

#define CHECK_ROTATION_ANGLE(t, a, tolerance) \
{ \
Vector3 v = (*t) * Vector3(1, 0, 0); \
CHECK_CLOSE_ABS(VectorHelpers::phi(v), (a), tolerance); \
}

using SrfVec = std::vector<std::shared_ptr<const Surface>>;

void draw_surfaces(const SrfVec& surfaces, const std::string& fname) {
Expand Down Expand Up @@ -471,5 +461,4 @@ BOOST_FIXTURE_TEST_CASE(LayerCreator_barrelStagger, LayerCreatorFixture) {

BOOST_AUTO_TEST_SUITE_END()
} // namespace Test

} // namespace Acts
6 changes: 0 additions & 6 deletions Tests/UnitTests/Core/Geometry/LayerTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

#include <boost/test/data/test_case.hpp>
#include <boost/test/tools/output_test_stream.hpp>
#include <boost/test/unit_test.hpp>

#include "Acts/Definitions/Algebra.hpp"
Expand All @@ -28,11 +27,7 @@
#include "../Surfaces/SurfaceStub.hpp"
#include "LayerStub.hpp"

using boost::test_tools::output_test_stream;
namespace utf = boost::unit_test;

namespace Acts {

namespace Test {

// Create a test context
Expand Down Expand Up @@ -108,5 +103,4 @@ BOOST_AUTO_TEST_CASE(LayerProperties) {
BOOST_AUTO_TEST_SUITE_END()
} // namespace Layers
} // namespace Test

} // namespace Acts
6 changes: 0 additions & 6 deletions Tests/UnitTests/Core/Geometry/NavigationLayerTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

#include <boost/test/data/test_case.hpp>
#include <boost/test/tools/output_test_stream.hpp>
#include <boost/test/unit_test.hpp>

#include "Acts/Definitions/Algebra.hpp"
Expand All @@ -23,11 +22,7 @@

#include "../Surfaces/SurfaceStub.hpp"

using boost::test_tools::output_test_stream;
namespace utf = boost::unit_test;

namespace Acts {

namespace Test {

// Create a test context
Expand Down Expand Up @@ -79,5 +74,4 @@ BOOST_AUTO_TEST_CASE(NavigationLayerProperties) {
BOOST_AUTO_TEST_SUITE_END()
} // namespace Layers
} // namespace Test

} // namespace Acts
6 changes: 0 additions & 6 deletions Tests/UnitTests/Core/Geometry/PlaneLayerTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

#include <boost/test/data/test_case.hpp>
#include <boost/test/tools/output_test_stream.hpp>
#include <boost/test/unit_test.hpp>

#include "Acts/Definitions/Algebra.hpp"
Expand All @@ -29,11 +28,7 @@
#include <utility>
#include <vector>

using boost::test_tools::output_test_stream;
namespace utf = boost::unit_test;

namespace Acts {

namespace Test {

// Create a test context
Expand Down Expand Up @@ -103,5 +98,4 @@ BOOST_AUTO_TEST_CASE(PlaneLayerProperties) {
BOOST_AUTO_TEST_SUITE_END()
} // namespace Layers
} // namespace Test

} // namespace Acts
Loading
Loading