GCC Code Coverage Report | |||||||||||||||||||||
|
|||||||||||||||||||||
Line | Branch | Exec | Source |
1 |
// |
||
2 |
// Copyright (c) 2016-2022 CNRS INRIA |
||
3 |
// |
||
4 |
|||
5 |
#include <boost/fusion/container/generation/make_list.hpp> |
||
6 |
#include <pinocchio/multibody/model.hpp> |
||
7 |
#include "pinocchio/multibody/data.hpp" |
||
8 |
#include "pinocchio/parsers/sample-models.hpp" |
||
9 |
#include <pinocchio/algorithm/crba.hpp> |
||
10 |
#include <pinocchio/algorithm/aba.hpp> |
||
11 |
#include <pinocchio/algorithm/check.hpp> |
||
12 |
#include <pinocchio/algorithm/default-check.hpp> |
||
13 |
#include <iostream> |
||
14 |
|||
15 |
using namespace pinocchio; |
||
16 |
|||
17 |
#include <boost/test/unit_test.hpp> |
||
18 |
#include <boost/utility/binary.hpp> |
||
19 |
|||
20 |
// Dummy checker. |
||
21 |
struct Check1 : public AlgorithmCheckerBase<Check1> |
||
22 |
{ |
||
23 |
2 |
bool checkModel_impl( const Model& ) const { return true; } |
|
24 |
}; |
||
25 |
|||
26 |
BOOST_AUTO_TEST_SUITE ( BOOST_TEST_MODULE ) |
||
27 |
|||
28 |
✓✗✓✗ ✓✗✓✗ ✓✗✓✗ ✓✗✓✗ ✓✗✓✗ ✓✗✓✗ ✓✗✓✗ ✓✗✓✗ ✓✗✓✗ ✓✗✓✗ ✓✗✓✗ ✓✗✓✗ ✓✗✓✗ ✓✗✓✗ ✓✗✓✗ ✓✗✓✗ ✓✗ |
4 |
BOOST_AUTO_TEST_CASE ( test_check ) |
29 |
{ |
||
30 |
using namespace boost::fusion; |
||
31 |
|||
32 |
✓✗✓✗ |
4 |
pinocchio::Model model; buildModels::humanoidRandom(model); |
33 |
|||
34 |
✓✗✓✗ ✓✗✓✗ ✓✗✓✗ ✗✓ |
2 |
BOOST_CHECK(model.check (Check1())); |
35 |
✓✗✓✗ ✓✗✓✗ ✓✗✓✗ ✗✓ |
2 |
BOOST_CHECK(model.check (CRBAChecker())); |
36 |
✓✗✓✗ ✓✗✓✗ ✓✗✓✗ ✗✓ |
2 |
BOOST_CHECK(model.check (ABAChecker())); |
37 |
|||
38 |
✓✗✓✗ ✓✗✓✗ ✓✗✓✗ ✓✗✗✓ |
2 |
BOOST_CHECK(model.check(makeAlgoCheckerList(Check1(),ParentChecker(),CRBAChecker()) )); |
39 |
✓✗✓✗ ✓✗✓✗ ✓✗✓✗ ✓✗✗✓ |
2 |
BOOST_CHECK(model.check(DEFAULT_CHECKERS)); |
40 |
|||
41 |
✓✗ | 4 |
pinocchio::Data data(model); |
42 |
✓✗✓✗ ✓✗✓✗ ✓✗✓✗ ✗✓ |
2 |
BOOST_CHECK(checkData(model,data)); |
43 |
✓✗✓✗ ✓✗✓✗ ✓✗✓✗ ✗✓ |
2 |
BOOST_CHECK(model.check(data)); |
44 |
|||
45 |
✓✗✓✗ ✓✗✓✗ ✓✗✓✗ ✓✗✓✗ ✓✓✓✓ ✓✗✓✗ ✓✓✓✗ ✓✗ |
114 |
BOOST_FOREACH(Inertia& Y,model.inertias) |
46 |
{ |
||
47 |
✓✗ | 56 |
Y.inertia().data().fill(-1.); |
48 |
} |
||
49 |
✓✗✓✗ ✓✗✓✗ ✓✗✓✗ ✗✓ |
2 |
BOOST_CHECK(! model.check (ABAChecker())); // some inertias are negative ... check fail. |
50 |
|||
51 |
2 |
} |
|
52 |
|||
53 |
BOOST_AUTO_TEST_SUITE_END () |
||
54 |
Generated by: GCOVR (Version 4.2) |