diff --git a/tests/custom-entity.cpp b/tests/custom-entity.cpp index 1c4b5c88615751fd7695ef281649b11066ac986a..c19b16314d1d4bea40d25e3c14e6e366aa09f85e 100644 --- a/tests/custom-entity.cpp +++ b/tests/custom-entity.cpp @@ -143,10 +143,10 @@ BOOST_AUTO_TEST_CASE (commandLine_unknown) try { entity.commandLine("unknown", args, output); + BOOST_ERROR ("Should never happen."); } - catch (dynamicgraph::ExceptionFactory& exception) + catch (const dynamicgraph::ExceptionFactory& exception) { - //FIXME: getCode should be const. BOOST_CHECK_EQUAL (exception.getCode (), dynamicgraph::ExceptionFactory::UNREFERED_FUNCTION); } diff --git a/tests/entity.cpp b/tests/entity.cpp index fb54111cbdb7b0bbbb34253d4c1e39ab52c478db..c6ea7dd97bfe265dcbdce603b96478115077f592 100644 --- a/tests/entity.cpp +++ b/tests/entity.cpp @@ -43,10 +43,10 @@ BOOST_AUTO_TEST_CASE (signal) try { entity.getSignal ("I do not exist"); + BOOST_ERROR ("Should never happen."); } - catch (dynamicgraph::ExceptionFactory& exception) + catch (const dynamicgraph::ExceptionFactory& exception) { - //FIXME: getCode should be const. BOOST_CHECK_EQUAL (exception.getCode (), dynamicgraph::ExceptionFactory::UNREFERED_SIGNAL); } @@ -56,10 +56,10 @@ BOOST_AUTO_TEST_CASE (signal) { const dynamicgraph::Entity& entityConst = entity; entityConst.getSignal ("I do not exist"); + BOOST_ERROR ("Should never happen."); } - catch (dynamicgraph::ExceptionFactory& exception) + catch (const dynamicgraph::ExceptionFactory& exception) { - //FIXME: getCode should be const. BOOST_CHECK_EQUAL (exception.getCode (), dynamicgraph::ExceptionFactory::UNREFERED_SIGNAL); } @@ -146,10 +146,10 @@ BOOST_AUTO_TEST_CASE (commandLine_signalDep) try { entity.commandLine("signalDep", args, output); + BOOST_ERROR ("Should never happen."); } - catch (dynamicgraph::ExceptionFactory& exception) + catch (const dynamicgraph::ExceptionFactory& exception) { - //FIXME: getCode should be const. BOOST_CHECK_EQUAL (exception.getCode (), dynamicgraph::ExceptionFactory::UNREFERED_SIGNAL); } @@ -168,10 +168,10 @@ BOOST_AUTO_TEST_CASE (commandLine_unknown) try { entity.commandLine("unknown", args, output); + BOOST_ERROR ("Should never happen."); } - catch (dynamicgraph::ExceptionFactory& exception) + catch (const dynamicgraph::ExceptionFactory& exception) { - //FIXME: getCode should be const. BOOST_CHECK_EQUAL (exception.getCode (), dynamicgraph::ExceptionFactory::UNREFERED_FUNCTION); }