9 #include <boost/test/data/test_case.hpp>
10 #include <boost/test/tools/output_test_stream.hpp>
11 #include <boost/test/unit_test.hpp>
25 namespace tt = boost::test_tools;
26 using namespace Acts::UnitLiterals;
35 struct PropagatorState {
40 double pathAccumulated = 0.;
51 std::string debugString =
"";
53 size_t debugPfxWidth = 30;
54 size_t debugMsgWidth = 50;
65 bool targetReached =
false;
79 double path_to_go = 100
_mm;
89 template <
typename propagator_state_t,
typename stepper_t>
90 void operator()(propagator_state_t& state,
const stepper_t& ,
92 result.
distance = path_to_go - state.stepping.pathAccumulated;
95 template <
typename propagator_state_t,
typename stepper_t>
96 void operator()(propagator_state_t& ,
97 const stepper_t& )
const {}
110 template <
typename propagator_state_t,
typename stepper_t>
111 void operator()(propagator_state_t& ,
const stepper_t& ,
116 template <
typename propagator_state_t,
typename stepper_t>
117 void operator()(propagator_state_t& ,
118 const stepper_t& )
const {}
136 action_list(state, stepper, result);
137 BOOST_CHECK_EQUAL(result.
get<distance_result>().distance, 100
_mm);
140 state.stepping.pathAccumulated = 50
_mm;
141 action_list(state, stepper, result);
142 BOOST_CHECK_EQUAL(result.
get<distance_result>().distance, 50
_mm);
161 action_list(state, stepper, result);
162 BOOST_CHECK_EQUAL(result.get<distance_result>().distance, 100
_mm);
163 BOOST_CHECK_EQUAL(result.get<caller_result>().calls, 1
u);
166 state.stepping.pathAccumulated = 50
_mm;
167 action_list(state, stepper, result);
168 BOOST_CHECK_EQUAL(result.get<distance_result>().distance, 50
_mm);
169 BOOST_CHECK_EQUAL(result.get<caller_result>().calls, 2
u);