File indexing completed on 2025-01-18 09:12:43
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include <boost/test/unit_test.hpp>
0010
0011 #include "Acts/Definitions/Algebra.hpp"
0012 #include "Acts/Material/HomogeneousVolumeMaterial.hpp"
0013 #include "Acts/Material/Material.hpp"
0014
0015 #include <utility>
0016
0017 namespace Acts::Test {
0018
0019
0020 BOOST_AUTO_TEST_CASE(HomogeneousVolumeMaterial_construction_test) {
0021
0022 Material mat = Material::fromMolarDensity(1., 2., 3., 4., 5.);
0023
0024
0025 HomogeneousVolumeMaterial hsm(mat);
0026
0027 HomogeneousVolumeMaterial hsmCopy(hsm);
0028
0029 BOOST_CHECK_EQUAL(hsm, hsmCopy);
0030
0031 HomogeneousVolumeMaterial hsmCopyMoved(std::move(hsmCopy));
0032
0033 BOOST_CHECK_EQUAL(hsm, hsmCopyMoved);
0034
0035 HomogeneousVolumeMaterial hsmAssigned = hsm;
0036
0037 BOOST_CHECK_EQUAL(hsm, hsmAssigned);
0038
0039 HomogeneousVolumeMaterial hsmAssignedMoved(std::move(hsmAssigned));
0040
0041 BOOST_CHECK_EQUAL(hsm, hsmAssignedMoved);
0042 }
0043
0044
0045 BOOST_AUTO_TEST_CASE(HomogeneousVolumeMaterial_access_test) {
0046
0047 Material mat = Material::fromMolarDensity(1., 2., 3., 4., 5.);
0048
0049
0050 HomogeneousVolumeMaterial hsm(mat);
0051
0052 auto mat3d = hsm.material(Vector3{0., 0., 0.});
0053
0054
0055 BOOST_CHECK_EQUAL(mat, mat3d);
0056 }
0057 }