Skip to content

Commit

Permalink
test: refactor nested namespaces (acts-project#3230)
Browse files Browse the repository at this point in the history
blocked by:
- acts-project#3229
  • Loading branch information
AJPfleger authored May 30, 2024
1 parent a48fa8a commit d8f615f
Show file tree
Hide file tree
Showing 76 changed files with 216 additions and 341 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
#include "Acts/Tests/CommonHelpers/LineSurfaceStub.hpp"

namespace Acts {

class PlanarBounds;
class DiscBounds;
class ISurfaceMaterial;
class LineBounds;
} // namespace Acts

namespace Test {
namespace Acts::Test {

/// @class DetectorElementStub
///
Expand Down Expand Up @@ -137,5 +137,5 @@ inline Surface& DetectorElementStub::surface() {
inline double DetectorElementStub::thickness() const {
return m_elementThickness;
}
} // namespace Test
} // namespace Acts

} // namespace Acts::Test
2 changes: 0 additions & 2 deletions Tests/IntegrationTests/Fatras/FatrasSimulationTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,6 @@ bool containsParticleId(const Container& sortedByParticleId,

BOOST_DATA_TEST_CASE(FatrasSimulation, dataset, pdg, phi, eta, p,
numParticles) {
using namespace Acts::UnitLiterals;

Acts::GeometryContext geoCtx;
Acts::MagneticFieldContext magCtx;
Acts::Logging::Level logLevel = Acts::Logging::Level::DEBUG;
Expand Down
8 changes: 2 additions & 6 deletions Tests/UnitTests/Core/Detector/ProtoDetectorTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,7 @@ Acts::ProtoDetector createProtoDetector() {

} // namespace

namespace Acts {

namespace Test {
namespace Acts::Test {

BOOST_AUTO_TEST_SUITE(Detector)

Expand Down Expand Up @@ -217,6 +215,4 @@ BOOST_AUTO_TEST_CASE(ProtoDetectorTests) {

BOOST_AUTO_TEST_SUITE_END()

} // namespace Test

} // namespace Acts
} // namespace Acts::Test
10 changes: 4 additions & 6 deletions Tests/UnitTests/Core/Geometry/ConeLayerTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@
#include <utility>
#include <vector>

namespace Acts {
namespace Test {
namespace Layers {
namespace Acts::Test::Layers {

BOOST_AUTO_TEST_SUITE(Layers)

/// Unit test for creating compliant/non-compliant ConeLayer object
Expand Down Expand Up @@ -71,6 +70,5 @@ BOOST_AUTO_TEST_CASE(ConeLayerConstruction) {
}

BOOST_AUTO_TEST_SUITE_END()
} // namespace Layers
} // namespace Test
} // namespace Acts

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

namespace Acts {
using namespace Acts::UnitLiterals;

using namespace UnitLiterals;

namespace Test {
namespace Acts::Test {

BOOST_AUTO_TEST_SUITE(VolumeBounds)

Expand Down Expand Up @@ -102,6 +100,4 @@ BOOST_AUTO_TEST_CASE(ConeVolumeBoundsSurfaceOrientation) {

BOOST_AUTO_TEST_SUITE_END()

} // namespace Test

} // namespace Acts
} // namespace Acts::Test
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
#include <utility>
#include <vector>

namespace Acts {
namespace Test {
namespace Acts::Test {

BOOST_AUTO_TEST_SUITE(Geometry)

Expand Down Expand Up @@ -215,5 +214,5 @@ BOOST_AUTO_TEST_CASE(CutoutCylinderVolumeOrientedBoundaries) {
}

BOOST_AUTO_TEST_SUITE_END()
} // namespace Test
} // namespace Acts

} // namespace Acts::Test
10 changes: 4 additions & 6 deletions Tests/UnitTests/Core/Geometry/CylinderLayerTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@
#include <utility>
#include <vector>

namespace Acts {
namespace Test {
namespace Layers {
namespace Acts::Test::Layers {

BOOST_AUTO_TEST_SUITE(Layers)

/// Unit test for creating compliant/non-compliant CylinderLayer object
Expand Down Expand Up @@ -89,6 +88,5 @@ BOOST_AUTO_TEST_CASE(CylinderLayerProperties) {
}

BOOST_AUTO_TEST_SUITE_END()
} // namespace Layers
} // namespace Test
} // namespace Acts

} // namespace Acts::Test::Layers
8 changes: 4 additions & 4 deletions Tests/UnitTests/Core/Geometry/CylinderVolumeBoundsTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@

namespace bdata = boost::unit_test::data;

namespace Acts {
namespace Test {
namespace Acts::Test {

BOOST_AUTO_TEST_SUITE(Geometry)

BOOST_AUTO_TEST_CASE(CylinderVolumeBoundsConstruction) {
Expand Down Expand Up @@ -407,5 +407,5 @@ BOOST_AUTO_TEST_CASE(CylinderVolumeBoundsSetValues) {
}

BOOST_AUTO_TEST_SUITE_END()
} // namespace Test
} // namespace Acts

} // namespace Acts::Test
10 changes: 4 additions & 6 deletions Tests/UnitTests/Core/Geometry/DiscLayerTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@
#include <utility>
#include <vector>

namespace Acts {
namespace Test {
namespace Layers {
namespace Acts::Test::Layers {

BOOST_AUTO_TEST_SUITE(Layers)

/// Unit test for creating compliant/non-compliant DiscLayer object
Expand Down Expand Up @@ -83,6 +82,5 @@ BOOST_AUTO_TEST_CASE(DiscLayerProperties) {
}

BOOST_AUTO_TEST_SUITE_END()
} // namespace Layers
} // namespace Test
} // namespace Acts

} // namespace Acts::Test::Layers
9 changes: 3 additions & 6 deletions Tests/UnitTests/Core/Geometry/ExtentTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@
#include <string>
#include <vector>

namespace Acts {
using namespace Acts::UnitLiterals;

using namespace UnitLiterals;

namespace Test {
namespace Acts::Test {

BOOST_AUTO_TEST_SUITE(Geometry)

Expand Down Expand Up @@ -180,5 +178,4 @@ BOOST_AUTO_TEST_CASE(ProtoSupportCaseTests) {

BOOST_AUTO_TEST_SUITE_END()

} // namespace Test
} // namespace Acts
} // namespace Acts::Test
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,9 @@
#include <utility>
#include <vector>

namespace Acts {
using namespace Acts::UnitLiterals;

using namespace UnitLiterals;

namespace Test {
namespace Acts::Test {

BOOST_AUTO_TEST_SUITE(Geometry)

Expand Down Expand Up @@ -255,5 +253,4 @@ BOOST_AUTO_TEST_CASE(KDTreeTrackingGeometryBuilder_simple) {

BOOST_AUTO_TEST_SUITE_END()

} // namespace Test
} // namespace Acts
} // namespace Acts::Test
8 changes: 4 additions & 4 deletions Tests/UnitTests/Core/Geometry/LayerTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
#include "LayerStub.hpp"

namespace Acts::Test {

// Create a test context
GeometryContext tgContext = GeometryContext();
} // namespace Acts::Test

namespace Layers {
namespace Acts::Test::Layers {

BOOST_AUTO_TEST_SUITE(Layers)

Expand Down Expand Up @@ -99,5 +99,5 @@ BOOST_AUTO_TEST_CASE(LayerProperties) {
}

BOOST_AUTO_TEST_SUITE_END()
} // namespace Layers
} // namespace Acts::Test

} // namespace Acts::Test::Layers
9 changes: 5 additions & 4 deletions Tests/UnitTests/Core/Geometry/NavigationLayerTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@
#include "../Surfaces/SurfaceStub.hpp"

namespace Acts::Test {

// Create a test context
GeometryContext tgContext = GeometryContext();
} // namespace Acts::Test

namespace Acts::Test::Layers {

namespace Layers {
BOOST_AUTO_TEST_SUITE(Layers)

/// Unit test for creating compliant/non-compliant NavigationLayer object
Expand Down Expand Up @@ -70,5 +71,5 @@ BOOST_AUTO_TEST_CASE(NavigationLayerProperties) {
}

BOOST_AUTO_TEST_SUITE_END()
} // namespace Layers
} // namespace Acts::Test

} // namespace Acts::Test::Layers
9 changes: 5 additions & 4 deletions Tests/UnitTests/Core/Geometry/PlaneLayerTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@
#include <vector>

namespace Acts::Test {

// Create a test context
GeometryContext tgContext = GeometryContext();
} // namespace Acts::Test

namespace Acts::Test::Layers {

namespace Layers {
BOOST_AUTO_TEST_SUITE(Layers)

/// Unit test for creating compliant/non-compliant PlaneLayer object
Expand Down Expand Up @@ -94,5 +95,5 @@ BOOST_AUTO_TEST_CASE(PlaneLayerProperties) {
}

BOOST_AUTO_TEST_SUITE_END()
} // namespace Layers
} // namespace Acts::Test

} // namespace Acts::Test::Layers
10 changes: 3 additions & 7 deletions Tests/UnitTests/Core/Geometry/PolyhedronTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@
#include "Acts/Visualization/GeometryView3D.hpp"
#include "Acts/Visualization/ObjVisualization3D.hpp"

namespace Acts {
using namespace Acts::UnitLiterals;

using namespace UnitLiterals;

namespace Test {
namespace Acts::Test {

BOOST_AUTO_TEST_SUITE(Geometry)

Expand Down Expand Up @@ -126,6 +124,4 @@ BOOST_AUTO_TEST_CASE(PolyhedronExtent) {

BOOST_AUTO_TEST_SUITE_END()

} // namespace Test

} // namespace Acts
} // namespace Acts::Test
9 changes: 4 additions & 5 deletions Tests/UnitTests/Core/Geometry/ProtoLayerHelperTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@

namespace Acts {
class Surface;
} // namespace Acts

namespace Acts::Test::Layers {

namespace Test {
namespace Layers {
BOOST_AUTO_TEST_SUITE(Geometry)

BOOST_AUTO_TEST_CASE(ProtoLayerHelperTests) {
Expand Down Expand Up @@ -217,7 +218,5 @@ BOOST_AUTO_TEST_CASE(ProtoLayerHelperTests) {
}

BOOST_AUTO_TEST_SUITE_END()
} // namespace Layers
} // namespace Test

} // namespace Acts
} // namespace Acts::Test::Layers
9 changes: 2 additions & 7 deletions Tests/UnitTests/Core/Geometry/ProtoLayerTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@
#include <utility>
#include <vector>

namespace Acts {

namespace Test {
namespace Layers {
namespace Acts::Test::Layers {

BOOST_AUTO_TEST_SUITE(Geometry)

Expand Down Expand Up @@ -158,7 +155,5 @@ Extent in space :
}

BOOST_AUTO_TEST_SUITE_END()
} // namespace Layers
} // namespace Test

} // namespace Acts
} // namespace Acts::Test::Layers
Original file line number Diff line number Diff line change
Expand Up @@ -320,4 +320,4 @@ BOOST_AUTO_TEST_CASE(TrackingGeometry_testVisitSurfaces) {
BOOST_CHECK_EQUAL(nVolumes, 5u);
}

} // namespace Acts::Test
} // namespace Acts::Test
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,4 @@ BOOST_AUTO_TEST_CASE(GeometryIdentifier_containervolume_test) {
}
}

} // namespace Acts::Test
} // namespace Acts::Test
4 changes: 2 additions & 2 deletions Tests/UnitTests/Core/Geometry/TrackingVolumeTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
#include "Acts/Geometry/CylinderVolumeBounds.hpp"
#include "Acts/Geometry/TrackingVolume.hpp"

namespace Acts::Test {

using namespace Acts::UnitLiterals;

namespace Acts::Test {

BOOST_AUTO_TEST_SUITE(Geometry)
BOOST_AUTO_TEST_SUITE(TrackingVolumeTests)

Expand Down
8 changes: 4 additions & 4 deletions Tests/UnitTests/Core/Geometry/TrapezoidVolumeBoundsTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
#include <utility>
#include <vector>

namespace Acts {
namespace Test {
namespace Acts::Test {

BOOST_AUTO_TEST_SUITE(Volumes)

BOOST_AUTO_TEST_CASE(bounding_box_creation) {
Expand Down Expand Up @@ -104,5 +104,5 @@ BOOST_AUTO_TEST_CASE(TrapezoidVolumeBoundarySurfaces) {
}

BOOST_AUTO_TEST_SUITE_END()
} // namespace Test
} // namespace Acts

} // namespace Acts::Test
Loading

0 comments on commit d8f615f

Please sign in to comment.