Skip to content

Commit 97173bc

Browse files
feat(object_recognition_utils): fix failing test (autowarefoundation#7268)
* feat(object_recognition_utils): fix failing test Signed-off-by: Ryohsuke Mitsudome <ryohsuke.mitsudome@tier4.jp> * Update common/object_recognition_utils/test/src/test_predicted_path_utils.cpp --------- Signed-off-by: Ryohsuke Mitsudome <ryohsuke.mitsudome@tier4.jp> Co-authored-by: Yukihiro Saito <yukky.saito@gmail.com>
1 parent df99718 commit 97173bc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

common/object_recognition_utils/test/src/test_predicted_path_utils.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ TEST(predicted_path_utils, resamplePredictedPath_by_vector)
174174
}
175175
}
176176

177-
// Resample which exceeds the maximum size
177+
// Resample the path with more than 100 points
178178
{
179179
std::vector<double> resampling_vec(101);
180180
for (size_t i = 0; i < 101; ++i) {
@@ -186,7 +186,7 @@ TEST(predicted_path_utils, resamplePredictedPath_by_vector)
186186
EXPECT_EQ(resampled_path.path.size(), resampled_path.path.max_size());
187187
EXPECT_NEAR(path.confidence, resampled_path.confidence, epsilon);
188188

189-
for (size_t i = 0; i < resampled_path.path.max_size(); ++i) {
189+
for (size_t i = 0; i < resampled_path.path.size(); ++i) {
190190
EXPECT_NEAR(resampled_path.path.at(i).position.x, resampling_vec.at(i), epsilon);
191191
EXPECT_NEAR(resampled_path.path.at(i).position.y, 0.0, epsilon);
192192
EXPECT_NEAR(resampled_path.path.at(i).position.z, 0.0, epsilon);

0 commit comments

Comments
 (0)