11 #include <boost/test/unit_test.hpp>
12 #include <boost/utility/binary.hpp>
16 BOOST_AUTO_TEST_SUITE(BOOST_TEST_MODULE)
21 Data empty_data(empty_model);
23 BOOST_CHECK(empty_model.
check(empty_data));
38 for (
int k = 0; k < nv_joint; ++k)
40 BOOST_CHECK(
data.start_idx_v_fromRow[(
size_t)(idx_joint + k)] == idx_joint);
41 BOOST_CHECK(
data.end_idx_v_fromRow[(
size_t)(idx_joint + k)] == idx_joint + nv_joint - 1);
53 for (
size_t k = 0; k < (size_t)
model.nv; ++k)
55 const std::vector<int> & support =
data.supports_fromRow[k];
60 const std::vector<int> & support_parent =
data.supports_fromRow[(size_t)
parent_id];
61 BOOST_CHECK(support.size() == support_parent.size() + 1);
62 for (
size_t j = 0; j < support_parent.size(); ++j)
64 BOOST_CHECK(support[j] == support_parent[j]);
68 BOOST_CHECK(support.back() == (
int)k);
81 BOOST_CHECK(
data == data_copy);
83 data_copy.oMi[0].setRandom();
84 BOOST_CHECK(
data != data_copy);
95 data.f[0].setRandom();
97 BOOST_CHECK(
data.f[0] ==
f[0]);
106 for (
size_t k = 0; k < 20; ++k)
110 BOOST_AUTO_TEST_SUITE_END()