Skip to content
Snippets Groups Projects

Resolve "New data structure for storing stateblocks"

Merged Joan Solà Ortega requested to merge 256-new-data-structure-for-storing-stateblocks into devel
1 file
+ 4
4
Compare changes
  • Side-by-side
  • Inline
+ 4
4
@@ -143,16 +143,16 @@ TEST(FrameBase, GetSetState)
@@ -143,16 +143,16 @@ TEST(FrameBase, GetSetState)
// Set the state, check that state blocks hold the current states
// Set the state, check that state blocks hold the current states
F.setState(x);
F.setState(x);
ASSERT_MATRIX_APPROX(p, F.getP()->getState(), Constants::EPS_SMALL);
ASSERT_MATRIX_APPROX(p, F.getP()->getState(), Constants::EPS_SMALL);
ASSERT_TRUE((q - F.getO()->getState()).isMuchSmallerThan(1, Constants::EPS_SMALL));
ASSERT_MATRIX_APPROX(q, F.getO()->getState(), Constants::EPS_SMALL);
ASSERT_TRUE((v - F.getV()->getState()).isMuchSmallerThan(1, Constants::EPS_SMALL));
ASSERT_MATRIX_APPROX(v, F.getV()->getState(), Constants::EPS_SMALL);
// Get the state, form 1 by reference
// Get the state, form 1 by reference
F.getState(x1);
F.getState(x1);
ASSERT_TRUE((x1 - x).isMuchSmallerThan(1, Constants::EPS_SMALL));
ASSERT_MATRIX_APPROX(x1 , x, Constants::EPS_SMALL);
// get the state, form 2 by return value
// get the state, form 2 by return value
x2 = F.getState();
x2 = F.getState();
ASSERT_TRUE((x2 - x).isMuchSmallerThan(1, Constants::EPS_SMALL));
ASSERT_MATRIX_APPROX(x2, x, Constants::EPS_SMALL);
}
}
int main(int argc, char **argv)
int main(int argc, char **argv)
Loading