#include "Motion.hpp"
#include "testutils.hpp"

#include "opencv2/core/core.hpp"

#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>

using namespace std;
using namespace cv;

BOOST_AUTO_TEST_SUITE(test_graph)

BOOST_AUTO_TEST_CASE(graph_add_delete) {
  FeatureGraph featureGraph(5, 1, 5 /* min time interval */, 1.);
  FeatureTrajectoryPtr ft1 = createFeatureTrajectory(10, 20, Point2f(1,1), Point2f(0.5, 0.));
  FeatureTrajectoryPtr ft2 = createFeatureTrajectory(10, 20, Point2f(1.1,1), Point2f(0.5, 0.));

  featureGraph.addFeature(ft1);
  BOOST_CHECK_EQUAL(featureGraph.getNVertices(), 1);
  BOOST_CHECK_EQUAL(featureGraph.getNEdges(), 0);

  featureGraph.addFeature(ft2);
  BOOST_CHECK_EQUAL(featureGraph.getNVertices(), 2);
  BOOST_CHECK_EQUAL(featureGraph.getNEdges(), 1);

  
}

BOOST_AUTO_TEST_SUITE_END()
