Mercurial Hosting > traffic-intelligence
comparison c/test_graph.cpp @ 196:aeab0b88c9b6
began testing of FeatureGraph
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Tue, 20 Dec 2011 00:31:37 -0500 |
parents | |
children | 0a27fa343257 |
comparison
equal
deleted
inserted
replaced
195:1247e26a8b5e | 196:aeab0b88c9b6 |
---|---|
1 #include "Motion.hpp" | |
2 #include "testutils.hpp" | |
3 | |
4 #include "opencv2/core/core.hpp" | |
5 | |
6 #include <boost/test/unit_test.hpp> | |
7 #include <boost/test/floating_point_comparison.hpp> | |
8 | |
9 using namespace std; | |
10 using namespace cv; | |
11 | |
12 BOOST_AUTO_TEST_SUITE(test_graph) | |
13 | |
14 BOOST_AUTO_TEST_CASE(graph_add_delete) { | |
15 FeatureGraph featureGraph(5, 1, 5, 1.); | |
16 FeatureTrajectoryPtr ft1 = createFeatureTrajectory(10, 20, Point2f(1,1), Point2f(0.5, 0.)); | |
17 FeatureTrajectoryPtr ft2 = createFeatureTrajectory(10, 20, Point2f(1.1,1), Point2f(0.5, 0.)); | |
18 | |
19 featureGraph.addFeature(ft1); | |
20 BOOST_CHECK_EQUAL(featureGraph.getNVertices(), 1); | |
21 BOOST_CHECK_EQUAL(featureGraph.getNEdges(), 0); | |
22 | |
23 // featureGraph.addFeature(ft2); | |
24 // BOOST_CHECK_EQUAL(featureGraph.getNVertices(), 2); | |
25 // BOOST_CHECK_EQUAL(featureGraph.getNEdges(), 1); | |
26 | |
27 | |
28 } | |
29 | |
30 BOOST_AUTO_TEST_SUITE_END() |