GCC Code Coverage Report


Directory: ./
File: bindings/python/scenario/enums.cpp
Date: 2025-03-10 16:17:01
Exec Total Coverage
Lines: 16 16 100.0%
Branches: 6 12 50.0%

Line Branch Exec Source
1 // Copyright (c) 2015-2018, CNRS
2 // Authors: Justin Carpentier <jcarpent@laas.fr>
3 //
4 #include <boost/python.hpp>
5 #include <boost/python/enum.hpp>
6
7 #include "multicontact-api/bindings/python/scenario/expose-scenario.hpp"
8 #include "multicontact-api/scenario/fwd.hpp"
9
10 namespace multicontact_api {
11 namespace python {
12 namespace bp = boost::python;
13
14 using namespace multicontact_api::scenario;
15
16 3 void exposeEnumConicType() {
17 6 bp::enum_<ConicType>("ConicType")
18
1/2
✓ Branch 1 taken 3 times.
✗ Branch 2 not taken.
3 .value("CONIC_SOWC", CONIC_SOWC)
19
1/2
✓ Branch 1 taken 3 times.
✗ Branch 2 not taken.
3 .value("CONIC_DOUBLE_DESCRIPTION", CONIC_DOUBLE_DESCRIPTION)
20
1/2
✓ Branch 1 taken 3 times.
✗ Branch 2 not taken.
3 .value("CONIC_UNDEFINED", CONIC_UNDEFINED);
21 3 }
22
23 3 void exposeEnumContactType() {
24 6 bp::enum_<ContactType>("ContactType")
25
1/2
✓ Branch 1 taken 3 times.
✗ Branch 2 not taken.
3 .value("CONTACT_UNDEFINED", CONTACT_UNDEFINED)
26
1/2
✓ Branch 1 taken 3 times.
✗ Branch 2 not taken.
3 .value("CONTACT_PLANAR", CONTACT_PLANAR)
27
1/2
✓ Branch 1 taken 3 times.
✗ Branch 2 not taken.
3 .value("CONTACT_POINT", CONTACT_POINT);
28 3 }
29
30 3 void exposeScenarioEnums() {
31 3 exposeEnumConicType();
32 3 exposeEnumContactType();
33 3 }
34 } // namespace python
35 } // namespace multicontact_api
36