|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r67010 - trunk/libs/graph/test
From: jewillco_at_[hidden]
Date: 2010-12-04 15:39:00
Author: jewillco
Date: 2010-12-04 15:39:00 EST (Sat, 04 Dec 2010)
New Revision: 67010
URL: http://svn.boost.org/trac/boost/changeset/67010
Log:
Put in more checks to avoid seg faults
Text files modified:
trunk/libs/graph/test/graphviz_test.cpp | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
Modified: trunk/libs/graph/test/graphviz_test.cpp
==============================================================================
--- trunk/libs/graph/test/graphviz_test.cpp (original)
+++ trunk/libs/graph/test/graphviz_test.cpp 2010-12-04 15:39:00 EST (Sat, 04 Dec 2010)
@@ -97,6 +97,7 @@
std::string node_name = get(name,*i);
// - get its mass
float node_mass = get(mass,*i);
+ BOOST_CHECK(masses.find(node_name) != masses.end());
float ref_mass = masses.find(node_name)->second;
// - compare the mass to the result in the table
BOOST_CHECK_CLOSE(node_mass, ref_mass, 0.01f);
@@ -114,6 +115,7 @@
get(name, target(*i,graph)));
// - get its weight
double edge_weight = get(weight,*i);
+ BOOST_CHECK(weights.find(edge_name) != weights.end());
double ref_weight = weights.find(edge_name)->second;
// - compare the weight to teh result in the table
BOOST_CHECK_CLOSE(edge_weight, ref_weight, 0.01);
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk