File indexing completed on 2026-05-27 07:24:14
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011
0012 #include "detray/definitions/algebra.hpp"
0013 #include "detray/definitions/units.hpp"
0014 #include "detray/propagator/propagator.hpp"
0015
0016
0017 #include "detray/test/framework/test_configuration.hpp"
0018 #include "detray/test/framework/types.hpp"
0019
0020
0021 #include <gtest/gtest.h>
0022
0023
0024 #include <limits>
0025 #include <ostream>
0026 #include <string>
0027
0028 namespace detray::test {
0029
0030
0031 template <typename scope = ::testing::Test>
0032 class fixture_base : public scope {
0033 public:
0034
0035
0036 using algebra_t = test::algebra;
0037 using index = test::index;
0038 using scalar = test::scalar;
0039 using point2 = test::point2;
0040 using point3 = test::point3;
0041 using vector2 = test::vector2;
0042 using vector3 = test::vector3;
0043 using transform3 = test::transform3;
0044 template <index ROW, index COL>
0045 using matrix = test::matrix<ROW, COL>;
0046
0047
0048 using configuration = detray::test::configuration<scalar>;
0049
0050
0051 explicit fixture_base(const configuration& cfg = {})
0052 : m_tolerance{cfg.tol()},
0053 m_inf{cfg.inf},
0054 m_epsilon{cfg.epsilon},
0055 m_path_limit{cfg.propagation().stepping.path_limit},
0056 m_overstep_tolerance{
0057 cfg.propagation().navigation.intersection.overstep_tolerance},
0058 m_step_constraint{cfg.propagation().stepping.step_constraint} {}
0059
0060
0061 ~fixture_base() override = default;
0062
0063
0064 std::string name() const { return "detray_test"; };
0065
0066 protected:
0067 static void SetUpTestSuite() { }
0068 static void TearDownTestSuite() { }
0069 void SetUp() override { }
0070 void TearDown() override { }
0071
0072
0073
0074 scalar tolerance() const { return m_tolerance; }
0075 scalar inf() const { return m_inf; }
0076 scalar epsilon() const { return m_epsilon; }
0077 scalar path_limit() const { return m_path_limit; }
0078 scalar overstep_tolerance() const { return m_overstep_tolerance; }
0079 scalar step_constraint() const { return m_step_constraint; }
0080
0081
0082 private:
0083 scalar m_tolerance{};
0084 scalar m_inf{};
0085 scalar m_epsilon{};
0086 scalar m_path_limit{};
0087 scalar m_overstep_tolerance{};
0088 scalar m_step_constraint{};
0089 };
0090
0091 }