diff --git a/tests/entity.cpp b/tests/entity.cpp index 467503f7fc9c12003f58a2d44ab0a782f107df6f..f1e8e171d84c280643745fd9aaef9fb521e1fec7 100644 --- a/tests/entity.cpp +++ b/tests/entity.cpp @@ -159,6 +159,28 @@ BOOST_AUTO_TEST_CASE (commandLine_signalDep) BOOST_CHECK (output.is_empty ()); } +BOOST_AUTO_TEST_CASE (commandLine_unknown) +{ + dynamicgraph::Entity entity ("my-entity"); + + output_test_stream output; + + std::istringstream args; + + try + { + entity.commandLine("unknown", args, output); + } + catch (dynamicgraph::ExceptionFactory& exception) + { + //FIXME: getCode should be const. + BOOST_CHECK_EQUAL (exception.getCode (), + dynamicgraph::ExceptionFactory::UNREFERED_FUNCTION); + } + + BOOST_CHECK (output.is_empty ()); +} + BOOST_AUTO_TEST_CASE (writeGraph) { dynamicgraph::Entity entity ("my-entity");