From 5f5803cec49e55b94cb87a5fa98a8cc317ac7c4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20Sol=C3=A0?= <jsola@iri.upc.edu> Date: Sun, 1 Sep 2019 16:32:13 +0200 Subject: [PATCH] Replace TRUE ASSERTs by MATRIX ones --- test/gtest_frame_base.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/gtest_frame_base.cpp b/test/gtest_frame_base.cpp index 639715e07..28ce9d081 100644 --- a/test/gtest_frame_base.cpp +++ b/test/gtest_frame_base.cpp @@ -143,16 +143,16 @@ TEST(FrameBase, GetSetState) // Set the state, check that state blocks hold the current states F.setState(x); ASSERT_MATRIX_APPROX(p, F.getP()->getState(), Constants::EPS_SMALL); - ASSERT_TRUE((q - F.getO()->getState()).isMuchSmallerThan(1, Constants::EPS_SMALL)); - ASSERT_TRUE((v - F.getV()->getState()).isMuchSmallerThan(1, Constants::EPS_SMALL)); + ASSERT_MATRIX_APPROX(q, F.getO()->getState(), Constants::EPS_SMALL); + ASSERT_MATRIX_APPROX(v, F.getV()->getState(), Constants::EPS_SMALL); // Get the state, form 1 by reference 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 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) -- GitLab