Skip to content

Commit

Permalink
Removed namespaces, iostream library and added TrackedObject test
Browse files Browse the repository at this point in the history
  • Loading branch information
BrennoCaldato committed Apr 13, 2021
1 parent 32033e0 commit a7cefa4
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/TimelineBase.h
Expand Up @@ -30,7 +30,6 @@

#ifndef OPENSHOT_TIMELINE_BASE_H
#define OPENSHOT_TIMELINE_BASE_H
#include <iostream>

namespace openshot {
/**
Expand Down
1 change: 0 additions & 1 deletion src/effects/Tracker.h
Expand Up @@ -44,7 +44,6 @@
#include "../TrackedObjectBBox.h"
#include "../Clip.h"

using namespace std;
namespace openshot
{
/**
Expand Down
29 changes: 26 additions & 3 deletions tests/KeyFrame.cpp
Expand Up @@ -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]" )
Expand Down

0 comments on commit a7cefa4

Please sign in to comment.