File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,14 @@ BOOST_AUTO_TEST_CASE(interpolate)
5151 x_interp2.tail (model.nv ) = (xs[0 ].tail (model.nv ) + xs[1 ].tail (model.nv )) * 0.5 ;
5252
5353 BOOST_CHECK (x_interp2.isApprox (x_interp));
54+
55+ std::vector<Eigen::VectorXd> xs2;
56+ for (std::size_t i = 0 ; i < 2 ; i++)
57+ {
58+ xs2.push_back (xs[0 ]);
59+ }
60+ interpolator.interpolate (delay, timestep, xs2, x_interp);
61+ BOOST_CHECK (xs2[0 ].isApprox (x_interp));
5462}
5563
5664BOOST_AUTO_TEST_CASE (linear_interpolate)
@@ -88,6 +96,14 @@ BOOST_AUTO_TEST_CASE(linear_interpolate)
8896 v_interp2 = (vs[0 ] + vs[1 ]) * 0.5 ;
8997
9098 BOOST_CHECK (v_interp2.isApprox (v_interp));
99+
100+ std::vector<Eigen::VectorXd> vs2;
101+ for (std::size_t i = 0 ; i < 2 ; i++)
102+ {
103+ vs2.push_back (vs[0 ]);
104+ }
105+ interpolator.interpolate (delay, timestep, vs2, v_interp);
106+ BOOST_CHECK (vs2[0 ].isApprox (v_interp));
91107}
92108
93109BOOST_AUTO_TEST_SUITE_END ()
You can’t perform that action at this time.
0 commit comments