9 #include <boost/test/unit_test.hpp>
17 BOOST_AUTO_TEST_SUITE(material_composition)
19 constexpr
float eps = 1.0
f / 255
u;
23 unsigned int carbonZ = 12
u;
25 unsigned int carbonWeight = 46
u;
26 float carbonFraction = float(carbonWeight) / 255
u;
29 BOOST_TEST(a.
element(), carbonZ);
33 BOOST_TEST(b.element(), carbonZ);
44 BOOST_TEST(!!compound);
45 BOOST_TEST(compound.size() == 4
u);
47 float totalFraction = 0.0f;
48 for (
const auto& eFraction : compound) {
49 totalFraction += eFraction.fraction();
57 BOOST_TEST(compound.size() == shuffled.size());
58 BOOST_TEST(compound == shuffled);
68 BOOST_TEST(!!compound);
69 BOOST_TEST(compound.size() == 4
u);
71 float totalFraction = 0.0f;
72 for (
const auto& eFraction : compound) {
73 totalFraction += eFraction.fraction();
79 BOOST_AUTO_TEST_SUITE_END()