plugin.cc.in 1.23 KB
Newer Older
Joseph Mirabel's avatar
Joseph Mirabel committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Copyright (c) 2019, Joseph Mirabel
// Authors: Joseph Mirabel (joseph.mirabel@laas.fr)
//
// This file is part of hpp-core.
// hpp-core is free software: you can redistribute it
// and/or modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation, either version
// 3 of the License, or (at your option) any later version.
//
// hpp-core is distributed in the hope that it will be
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// General Lesser Public License for more details.  You should have
// received a copy of the GNU Lesser General Public License along with
// hpp-core. If not, see <http://www.gnu.org/licenses/>.

#define BOOST_TEST_MODULE plugin
18
#include <pinocchio/fwd.hpp>
Joseph Mirabel's avatar
Joseph Mirabel committed
19
20
21
22
23
24
25
26
27
28
29
#include <boost/test/included/unit_test.hpp>

#include <hpp/core/plugin.hh>
#include <hpp/core/problem-solver.hh>

using namespace hpp::core;

BOOST_AUTO_TEST_CASE (load_plugin)
{
  ProblemSolverPtr_t ps = ProblemSolver::create();

30
  std::string lib ("@CMAKE_BINARY_DIR@/tests/plugin-test/example.so");
Joseph Mirabel's avatar
Joseph Mirabel committed
31
32
33
34
35
36
  BOOST_CHECK (plugin::loadPlugin (lib, ps));

  BOOST_CHECK (ps->distances.has ("WeighedDuplicate"));

  delete ps;
}