diff --git a/src/TimelineBase.h b/src/TimelineBase.h index 7bcd8f9a..39dd3a41 100644 --- a/src/TimelineBase.h +++ b/src/TimelineBase.h @@ -30,7 +30,6 @@ #ifndef OPENSHOT_TIMELINE_BASE_H #define OPENSHOT_TIMELINE_BASE_H -#include namespace openshot { /** diff --git a/src/effects/Tracker.h b/src/effects/Tracker.h index 2faafcb2..0ccf589c 100644 --- a/src/effects/Tracker.h +++ b/src/effects/Tracker.h @@ -44,7 +44,6 @@ #include "../TrackedObjectBBox.h" #include "../Clip.h" -using namespace std; namespace openshot { /** diff --git a/tests/KeyFrame.cpp b/tests/KeyFrame.cpp index f476faaf..3e0b381c 100644 --- a/tests/KeyFrame.cpp +++ b/tests/KeyFrame.cpp @@ -516,9 +516,32 @@ TEST_CASE( "Point_Vector_Constructor", "[libopenshot][keyframe]" ) TEST_CASE( "TrackedObjectBBox init", "[libopenshot][keyframe]" ) { - TrackedObjectBBox kfb; - // XXX: This really needs to perform some sort of _test_ here, - // like confirming some default values in the new object. + TrackedObjectBBox kfb(62,143,0,212); + + CHECK(kfb.delta_x.GetInt(1) == 0); + CHECK(kfb.delta_y.GetInt(1) == 0); + + CHECK(kfb.scale_x.GetInt(1) == 1); + CHECK(kfb.scale_y.GetInt(1) == 1); + + CHECK(kfb.rotation.GetInt(1) == 0); + + CHECK(kfb.stroke_width.GetInt(1) == 2); + CHECK(kfb.stroke_alpha.GetInt(1) == 0); + + CHECK(kfb.background_alpha .GetInt(1)== 1); + CHECK(kfb.background_corner.GetInt(1) == 0); + + CHECK(kfb.stroke.red.GetInt(1) == 62); + CHECK(kfb.stroke.green.GetInt(1) == 143); + CHECK(kfb.stroke.blue.GetInt(1) == 0); + CHECK(kfb.stroke.alpha.GetInt(1) == 212); + + 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); + } TEST_CASE( "TrackedObjectBBox AddBox and RemoveBox", "[libopenshot][keyframe]" )