Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r48583 - trunk/libs/graph/test
From: dgregor_at_[hidden]
Date: 2008-09-04 15:49:50


Author: dgregor
Date: 2008-09-04 15:49:49 EDT (Thu, 04 Sep 2008)
New Revision: 48583
URL: http://svn.boost.org/trac/boost/changeset/48583

Log:
Make graphml_test.cpp accept the name of its input file on the command line, Jamfile.v2 provide the input file (both thanks to Dave A), and make the input XML well-formed. Fixes #2267.
Text files modified:
   trunk/libs/graph/test/Jamfile.v2 | 2 +-
   trunk/libs/graph/test/graphml_test.cpp | 2 +-
   trunk/libs/graph/test/graphml_test.xml | 2 +-
   3 files changed, 3 insertions(+), 3 deletions(-)

Modified: trunk/libs/graph/test/Jamfile.v2
==============================================================================
--- trunk/libs/graph/test/Jamfile.v2 (original)
+++ trunk/libs/graph/test/Jamfile.v2 2008-09-04 15:49:49 EDT (Thu, 04 Sep 2008)
@@ -17,7 +17,7 @@
 
 if [ modules.peek : EXPAT_INCLUDE ] && [ modules.peek : EXPAT_LIBPATH ]
 {
- optional_tests += [ run graphml_test.cpp ../build//boost_graph ] ;
+ optional_tests += [ run graphml_test.cpp ../build//boost_graph : : "graphml_test.xml" ] ;
 }
 
 test-suite graph_test :

Modified: trunk/libs/graph/test/graphml_test.cpp
==============================================================================
--- trunk/libs/graph/test/graphml_test.cpp (original)
+++ trunk/libs/graph/test/graphml_test.cpp 2008-09-04 15:49:49 EDT (Thu, 04 Sep 2008)
@@ -43,7 +43,7 @@
     dp.property("foo",get(vertex_color_t(),g));
     dp.property("weight",get(edge_weight_t(),g));
 
- ifstream ifile("graphml_test.xml");
+ ifstream ifile(argv[1]);
     read_graphml(ifile, g, dp);
     ifile.close();
 

Modified: trunk/libs/graph/test/graphml_test.xml
==============================================================================
--- trunk/libs/graph/test/graphml_test.xml (original)
+++ trunk/libs/graph/test/graphml_test.xml 2008-09-04 15:49:49 EDT (Thu, 04 Sep 2008)
@@ -19,7 +19,7 @@
     <node id="n6">
         <data key="d1">0</data>
     </node>
- <edge id="e0" source="n0" target="n1" directed="false" />
+ <edge id="e0" source="n0" target="n1" />
     <edge id="e1" source="n1" target="not a canonical node">
       <data key="d2">0.8</data>
     </edge>


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