From aaf3e24568f628537d695e9e2c178640d72e8923 Mon Sep 17 00:00:00 2001 From: Mederic Fourmy <mederic.fourmy@gmail.com> Date: Wed, 15 Jun 2022 11:14:50 +0200 Subject: [PATCH] change fixture name --- ...test_processor_tracker_landmark_object.cpp | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/test/gtest_processor_tracker_landmark_object.cpp b/test/gtest_processor_tracker_landmark_object.cpp index 80727dc..763908a 100644 --- a/test/gtest_processor_tracker_landmark_object.cpp +++ b/test/gtest_processor_tracker_landmark_object.cpp @@ -66,7 +66,7 @@ WOLF_REGISTER_PROCESSOR(ProcessorTrackerLandmarkObject_Wrapper); * The class ProcessorTrackerLandmarkObject is sometimes tested via the wrapper ProcessorTrackerLandmarkObject_Wrapper */ // Use the following in case you want to initialize tests with predefined variables or methods. -class ProcessorTrackerLandmarkObject_class : public testing::Test{ +class ProcessorTrackerLandmarkObject_fixture : public testing::Test{ public: void SetUp() override { @@ -124,7 +124,7 @@ TEST(ProcessorTrackerLandmarkObject, Constructor) // // TODO: GTEST IMPLEMENTATION IS WRONG // ////////////////////////////////////// // ////////////////////////////////////// -// TEST_F(ProcessorTrackerLandmarkObject_class, voteForKeyFrame) +// TEST_F(ProcessorTrackerLandmarkObject_fixture, voteForKeyFrame) // { // double min_time_vote = prc_obj->getMinTimeVote(); @@ -174,7 +174,7 @@ TEST(ProcessorTrackerLandmarkObject, Constructor) // !!!!!!!!!!!!!!!!!!!!!!! // not usefull principle? // !!!!!!!!!!!!!!!!!!!!!!! -// TEST_F(ProcessorTrackerLandmarkObject_class, detectNewFeaturesDuplicated) +// TEST_F(ProcessorTrackerLandmarkObject_fixture, detectNewFeaturesDuplicated) // { // // No detected features // FeatureBasePtrList features_out; @@ -216,7 +216,7 @@ TEST(ProcessorTrackerLandmarkObject, Constructor) // ASSERT_EQ(features_out.size(), 1); // detectNewFeatures should keep only one in the final list of new detected features // } -TEST_F(ProcessorTrackerLandmarkObject_class, detectNewFeatures) +TEST_F(ProcessorTrackerLandmarkObject_fixture, detectNewFeatures) { // No detected features FeatureBasePtrList features_out; @@ -230,8 +230,6 @@ TEST_F(ProcessorTrackerLandmarkObject_class, detectNewFeatures) Eigen::Quaterniond quat; Eigen::Vector7d pose; Eigen::Matrix6d meas_cov = Matrix6d::Identity(); - // Eigen::Matrix3d intrinsic = Matrix3d::Identity(); - // TimeStamp t; std::string object_type; // feature 0 @@ -258,14 +256,14 @@ TEST_F(ProcessorTrackerLandmarkObject_class, detectNewFeatures) object_type = "type2"; FeatureBasePtr f2 = std::make_shared<FeatureObject>(pose, meas_cov, object_type); - //we add different features in the list + // we add 2 features in the detection list features_in.push_back(f0); features_in.push_back(f1); - //these features are set as the predetected features in last to processing an image + // these features are set as the predetected features in last to processing an image prc_obj->setLastDetections(features_in); // at this point we have 0 detections in last, 2 detections in predetected features with different ids, thus we should have 2 new detected features (if max_features set to >= 2) prc_obj->detectNewFeatures(2, C1, features_out); - // ASSERT_EQ(features_out.size(), 2); // TOFIX!! + ASSERT_EQ(features_out.size(), 2); // TOFIX!! // Put some of the features in the graph with emplaceLandmark() and detect some of them as well as others with detectNewFeatures() running again. WOLF_WARN("call to function emplaceLandmark() in unit test for detectNewFeatures().") @@ -286,7 +284,7 @@ TEST_F(ProcessorTrackerLandmarkObject_class, detectNewFeatures) // ASSERT_EQ(std::static_pointer_cast<FeatureObject>(features_out.front())->getObjectType(), "type2"); // TOFIX -> SegFault } -TEST_F(ProcessorTrackerLandmarkObject_class, emplaceLandmark) +TEST_F(ProcessorTrackerLandmarkObject_fixture, emplaceLandmark) { Vector7d pose_landmark((Vector7d()<<0,0,0,0,0,0,1).finished()); FeatureBasePtr f1 = FeatureBase::emplace<FeatureObject>(C1, pose_landmark, Matrix6d::Identity(), "thetype"); @@ -298,7 +296,7 @@ TEST_F(ProcessorTrackerLandmarkObject_class, emplaceLandmark) ASSERT_MATRIX_APPROX(lmk_object->getState().vector("PO"), pose_landmark, 1e-6); } -TEST_F(ProcessorTrackerLandmarkObject_class, emplaceFactor) +TEST_F(ProcessorTrackerLandmarkObject_fixture, emplaceFactor) { FeatureBasePtr f1 = FeatureBase::emplace<FeatureObject>(C1, (Vector7d()<<0,0,0,0,0,0,1).finished(), Matrix6d::Identity(), "thetype"); -- GitLab