pendulum.cpp
Go to the documentation of this file.
1 #include <boost/test/unit_test.hpp>
2 
4 
5 BOOST_AUTO_TEST_SUITE(BOOST_TEST_MODULE)
6 
7 BOOST_AUTO_TEST_CASE(test_pendulum) {
8  dynamicgraph::tutorial::InvertedPendulum pendulum("test pendulum");
9  pendulum.setCartMass(1.2);
10  BOOST_CHECK(pendulum.getCartMass() == 1.2);
11  pendulum.setPendulumMass(0.6);
12  BOOST_CHECK(pendulum.getPendulumMass() == 0.6);
13  pendulum.setPendulumLength(1.8);
14  BOOST_CHECK(pendulum.getPendulumLength() == 1.8);
15 }
16 
17 BOOST_AUTO_TEST_SUITE_END()
void setCartMass(const double &inMass)
Set the mass of the cart.
double getCartMass() const
Get the mass of the cart.
void setPendulumLength(const double &inLength)
Set the length of the cart.
void setPendulumMass(const double &inMass)
Set the mass of the cart.
double getPendulumLength() const
Get the length of the pendulum.
BOOST_AUTO_TEST_CASE(test_pendulum)
Definition: pendulum.cpp:7
double getPendulumMass() const
Get the mass of the pendulum.


dynamic-graph-tutorial
Author(s): Nicolas Mansard, Olivier Stasse
autogenerated on Sun Jun 25 2023 02:37:04