Unverified Commit e8af78a6 authored by Joseph Mirabel's avatar Joseph Mirabel Committed by GitHub
Browse files

Merge pull request #118 from jmirabel/devel

boost unit_test_framework + assert in Device::currentConfiguration
parents 15d0c884 929e8ec9
......@@ -57,10 +57,6 @@ ENDIF(CMAKE_BUILD_TYPE MATCHES "DEBUG")
# Search for Boost.
# Boost.Test is used by the test suite.
SET(BOOST_COMPONENTS_LIB thread)
SET(BOOST_COMPONENTS ${BOOST_COMPONENTS_LIB})
IF(BUILD_TESTING)
SET(BOOST_COMPONENTS ${BOOST_COMPONENTS_LIB} unit_test_framework)
ENDIF()
SEARCH_FOR_BOOST()
# Search for dependecies.
......
......@@ -33,6 +33,7 @@ namespace hpp {
bool AbstractDevice::currentConfiguration (ConfigurationIn_t configuration)
{
DeviceData& data = d();
assert (configuration.size() == data.currentConfiguration_.size());
if (configuration != data.currentConfiguration_) {
data.invalidate();
data.currentConfiguration_ = configuration;
......
......@@ -15,6 +15,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with hpp-pinocchio. If not, see <http://www.gnu.org/licenses/>.
SET(BOOST_COMPONENTS ${BOOST_COMPONENTS_LIB} unit_test_framework)
SEARCH_FOR_BOOST()
# Make Boost.Test generates the main function in test cases.
ADD_DEFINITIONS(-DBOOST_TEST_DYN_LINK -DBOOST_TEST_MAIN)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment