Mercurial Hosting > traffic-intelligence
comparison c/test_graph.cpp @ 200:0a27fa343257
added one test and cleaned the first and last instant mess
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Fri, 02 Mar 2012 19:32:54 -0500 |
parents | aeab0b88c9b6 |
children | f7ddfc4aeb1e |
comparison
equal
deleted
inserted
replaced
199:ca9d9104afba | 200:0a27fa343257 |
---|---|
10 using namespace cv; | 10 using namespace cv; |
11 | 11 |
12 BOOST_AUTO_TEST_SUITE(test_graph) | 12 BOOST_AUTO_TEST_SUITE(test_graph) |
13 | 13 |
14 BOOST_AUTO_TEST_CASE(graph_add_delete) { | 14 BOOST_AUTO_TEST_CASE(graph_add_delete) { |
15 FeatureGraph featureGraph(5, 1, 5, 1.); | 15 FeatureGraph featureGraph(5, 1, 5 /* min time interval */, 1.); |
16 FeatureTrajectoryPtr ft1 = createFeatureTrajectory(10, 20, Point2f(1,1), Point2f(0.5, 0.)); | 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.)); | 17 FeatureTrajectoryPtr ft2 = createFeatureTrajectory(10, 20, Point2f(1.1,1), Point2f(0.5, 0.)); |
18 | 18 |
19 featureGraph.addFeature(ft1); | 19 featureGraph.addFeature(ft1); |
20 BOOST_CHECK_EQUAL(featureGraph.getNVertices(), 1); | 20 BOOST_CHECK_EQUAL(featureGraph.getNVertices(), 1); |
21 BOOST_CHECK_EQUAL(featureGraph.getNEdges(), 0); | 21 BOOST_CHECK_EQUAL(featureGraph.getNEdges(), 0); |
22 | 22 |
23 // featureGraph.addFeature(ft2); | 23 featureGraph.addFeature(ft2); |
24 // BOOST_CHECK_EQUAL(featureGraph.getNVertices(), 2); | 24 BOOST_CHECK_EQUAL(featureGraph.getNVertices(), 2); |
25 // BOOST_CHECK_EQUAL(featureGraph.getNEdges(), 1); | 25 BOOST_CHECK_EQUAL(featureGraph.getNEdges(), 1); |
26 | 26 |
27 | 27 |
28 } | 28 } |
29 | 29 |
30 BOOST_AUTO_TEST_SUITE_END() | 30 BOOST_AUTO_TEST_SUITE_END() |