From 8915b07207331904b16dee98d9032003ad7e7b31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20Sol=C3=A0?= <jsola@iri.upc.edu> Date: Tue, 31 Mar 2020 19:07:11 +0200 Subject: [PATCH] Fix small detail in gtest --- test/gtest_problem.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/test/gtest_problem.cpp b/test/gtest_problem.cpp index f1c7424d9..f397abfa4 100644 --- a/test/gtest_problem.cpp +++ b/test/gtest_problem.cpp @@ -338,19 +338,18 @@ TEST(Problem, perturb) Vector3d pose; pose << 0,0,0; + int i = 0; for (TimeStamp t = 0.0; t < 2.0; t += 1.0) { - for ( int i = 0; i < 2; i++) + auto F = problem->emplaceFrame(KEY, pose, t); + if (i==0) F->fix(); + + for (int j = 0; j< 2 ; j++) { - auto F = problem->emplaceFrame(KEY, pose, t); - if (i==0) F->fix(); - - for (int j = 0; j< 2 ; j++) - { - auto sb = std::make_shared<StateBlock>(Vector3d(1,1,1)); - auto cap = CaptureBase::emplace<CaptureBase>(F, "CaptureBase", t, sensor, nullptr, nullptr, sb); - } + auto sb = std::make_shared<StateBlock>(Vector3d(1,1,1)); + auto cap = CaptureBase::emplace<CaptureBase>(F, "CaptureBase", t, sensor, nullptr, nullptr, sb); } + i++; } for (int l = 0; l < 2; l++) -- GitLab