5 #include "pinocchio/macros.hpp" 7 #include <boost/test/unit_test.hpp> 8 #include <boost/utility/binary.hpp> 30 "custom message " <<
"with stream");
35 expected_msg =
"wrong argument size: expected 2, got 3\n" 36 "hint: v.size() is different from size\n";
37 BOOST_CHECK_EXCEPTION(
function_1(std::vector<int>(3), 2),
38 std::invalid_argument,
40 expected_msg =
"wrong argument size: expected 2, got 3\n" 41 "hint: custom message with stream\n";
42 BOOST_CHECK_EXCEPTION(
function_2(std::vector<int>(3), 2),
43 std::invalid_argument,
47 BOOST_AUTO_TEST_SUITE_END()
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorType > const Eigen::MatrixBase< TangentVectorType > & v
bool check_exception_msg(const std::exception &exception)
void function_2(std::vector< int > v, size_t size)
BOOST_AUTO_TEST_CASE(test_check_arguments)
#define PINOCCHIO_CHECK_ARGUMENT_SIZE(...)
Macro to check if the size of an element is equal to the expected size.
#define BOOST_TEST_MODULE
void function_1(std::vector< int > v, size_t size)
Main pinocchio namespace.