Skip to content

Commit

Permalink
Fix Tracker/ObjectDetector unit tests, due to new default values
Browse files Browse the repository at this point in the history
  • Loading branch information
jonoomph committed Feb 23, 2024
1 parent 98383fd commit 4594cf8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/TrackedObjectBBox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ TrackedObjectBBox::TrackedObjectBBox(int Red, int Green, int Blue, int Alfa)
: delta_x(0.0), delta_y(0.0),
scale_x(1.0), scale_y(1.0), rotation(0.0),
background_alpha(0.0), background_corner(12),
stroke_width(2) , stroke_alpha(0.70),
stroke_width(2) , stroke_alpha(0.7),
stroke(Red, Green, Blue, Alfa),
background(0, 0, 255, Alfa)
{
Expand Down
9 changes: 4 additions & 5 deletions tests/KeyFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -583,10 +583,10 @@ TEST_CASE( "TrackedObjectBBox init", "[libopenshot][keyframe]" )
CHECK(kfb.rotation.GetInt(1) == 0);

CHECK(kfb.stroke_width.GetInt(1) == 2);
CHECK(kfb.stroke_alpha.GetInt(1) == 0);
CHECK(kfb.stroke_alpha.GetValue(1) == Approx(0.7f).margin(0.0001));

CHECK(kfb.background_alpha .GetInt(1)== 1);
CHECK(kfb.background_corner.GetInt(1) == 0);
CHECK(kfb.background_alpha .GetInt(1) == 0);
CHECK(kfb.background_corner.GetInt(1) == 12);

CHECK(kfb.stroke.red.GetInt(1) == 62);
CHECK(kfb.stroke.green.GetInt(1) == 143);
Expand All @@ -596,8 +596,7 @@ TEST_CASE( "TrackedObjectBBox init", "[libopenshot][keyframe]" )
CHECK(kfb.background.red.GetInt(1) == 0);
CHECK(kfb.background.green.GetInt(1) == 0);
CHECK(kfb.background.blue.GetInt(1) == 255);
CHECK(kfb.background.alpha.GetInt(1) == 0);

CHECK(kfb.background.alpha.GetInt(1) == 212);
}

TEST_CASE( "TrackedObjectBBox AddBox and RemoveBox", "[libopenshot][keyframe]" )
Expand Down

0 comments on commit 4594cf8

Please sign in to comment.