Skip to content

Commit

Permalink
feat(traffic_light_fine_detector): add test case
Browse files Browse the repository at this point in the history
Signed-off-by: Shin-kyoto <[email protected]>
  • Loading branch information
Shin-kyoto committed May 30, 2024
1 parent 4c941e3 commit afb9953
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions perception/traffic_light_fine_detector/test/test_nodelet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,11 @@ tensorrt_yolox::Object createYoloxBbox(
bbox.type = type;
return bbox;
}

Check warning on line 42 in perception/traffic_light_fine_detector/test/test_nodelet.cpp

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Excess Number of Function Arguments

createYoloxBbox has 6 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.

TEST(CalWeightedIouTest, NoOverlap)
{
const sensor_msgs::msg::RegionOfInterest map_based_bbox = createMapBasedBbox(0, 0, 10, 10);
const tensorrt_yolox::Object yolox_bbox = createYoloxBbox(20, 20, 10, 10, 0.9f, 0);

EXPECT_FLOAT_EQ(traffic_light::calWeightedIou(map_based_bbox, yolox_bbox), 0.0f);
}

0 comments on commit afb9953

Please sign in to comment.