Line |
Branch |
Exec |
Source |
1 |
|
|
// |
2 |
|
|
// Copyright (c) 2022 INRIA |
3 |
|
|
// |
4 |
|
|
|
5 |
|
|
#include <iostream> |
6 |
|
|
|
7 |
|
|
#include "pinocchio/multibody/model.hpp" |
8 |
|
|
#include "pinocchio/multibody/data.hpp" |
9 |
|
|
|
10 |
|
|
#include "pinocchio/multibody/geometry-object.hpp" |
11 |
|
|
|
12 |
|
|
#include <vector> |
13 |
|
|
#include <boost/test/unit_test.hpp> |
14 |
|
|
|
15 |
|
|
using namespace pinocchio; |
16 |
|
|
|
17 |
|
|
BOOST_AUTO_TEST_SUITE(BOOST_TEST_MODULE) |
18 |
|
|
|
19 |
|
✗ |
BOOST_AUTO_TEST_CASE(test_clone) |
20 |
|
|
{ |
21 |
|
✗ |
hpp::fcl::Sphere * sphere_ptr = new hpp::fcl::Sphere(0.5); |
22 |
|
✗ |
GeometryObject::CollisionGeometryPtr sphere_shared_ptr(sphere_ptr); |
23 |
|
✗ |
GeometryObject geom_obj("sphere", 0, 0, SE3::Random(), sphere_shared_ptr); |
24 |
|
|
|
25 |
|
✗ |
const GeometryObject geom_obj_clone = geom_obj.clone(); |
26 |
|
✗ |
BOOST_CHECK(geom_obj_clone == geom_obj); |
27 |
|
|
|
28 |
|
✗ |
sphere_ptr->radius = 1.; |
29 |
|
✗ |
BOOST_CHECK(geom_obj_clone != geom_obj); |
30 |
|
|
} |
31 |
|
|
|
32 |
|
|
BOOST_AUTO_TEST_SUITE_END() |
33 |
|
|
|