11 #include <boost/test/data/test_case.hpp>
12 #include <boost/test/unit_test.hpp>
20 namespace tt = boost::test_tools;
21 using namespace Acts::UnitLiterals;
37 bdata::random(-2
_T, 2
_T) ^ bdata::random(-1
_T, 4
_T) ^
38 bdata::random(0
_T, 10
_T) ^ bdata::random(-10
_m, 10
_m) ^
39 bdata::random(-10
_m, 10
_m) ^
40 bdata::random(-10
_m, 10
_m) ^ bdata::xrange(10),
41 x,
y,
z, bx, by, bz, index) {
43 BOOST_TEST_CONTEXT(
"Eigen interface") {
50 BOOST_CHECK_EQUAL(Btrue, BField.
getField(pos));
52 BOOST_CHECK_EQUAL(Btrue, BField.
getField(-2 * pos));
54 BOOST_CHECK_EQUAL(Btrue, BField.
getField(pos, bCache));
56 BOOST_CHECK_EQUAL(Btrue, BField.
getField(-2 * pos, bCache));
59 BOOST_TEST_CONTEXT(
"C-array initialised - Eigen retrieved") {
66 BOOST_CHECK_EQUAL(Btrue, BField.
getField(pos));
68 BOOST_CHECK_EQUAL(Btrue, BField.
getField(-2 * pos));
70 BOOST_CHECK_EQUAL(Btrue, BField.
getField(pos, bCache));
72 BOOST_CHECK_EQUAL(Btrue, BField.
getField(-2 * pos, bCache));
84 bdata::random(-2
_T, 2
_T) ^ bdata::random(-1
_T, 4
_T) ^
85 bdata::random(0
_T, 10
_T) ^ bdata::random(-10
_m, 10
_m) ^
86 bdata::random(-10
_m, 10
_m) ^
87 bdata::random(-10
_m, 10
_m) ^ bdata::xrange(10),
88 x,
y,
z, bx, by, bz, index) {
92 BOOST_TEST_CONTEXT(
"Eigen interface") {
99 BOOST_CHECK_EQUAL(Btrue, BField.
getField(pos));
101 BOOST_CHECK_EQUAL(Btrue, BField.
getField(-2 * pos));
103 BOOST_CHECK_EQUAL(Btrue, BField.
getField(pos, bCache));
105 BOOST_CHECK_EQUAL(Btrue, BField.
getField(-2 * pos, bCache));
108 BOOST_TEST_CONTEXT(
"C-array initialised - Eigen retrieved") {
115 BOOST_CHECK_EQUAL(Btrue, BField.
getField(pos));
117 BOOST_CHECK_EQUAL(Btrue, BField.
getField(-2 * pos));
119 BOOST_CHECK_EQUAL(Btrue, BField.
getField(pos, bCache));
121 BOOST_CHECK_EQUAL(Btrue, BField.
getField(-2 * pos, bCache));