Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r67008 - trunk/libs/graph/test
From: jewillco_at_[hidden]
Date: 2010-12-04 15:31:35


Author: jewillco
Date: 2010-12-04 15:31:33 EST (Sat, 04 Dec 2010)
New Revision: 67008
URL: http://svn.boost.org/trac/boost/changeset/67008

Log:
Changed to Boost.Filesystem v3
Text files modified:
   trunk/libs/graph/test/all_planar_input_files_test.cpp | 11 ++++++-----
   trunk/libs/graph/test/parallel_edges_loops_test.cpp | 9 ++++-----
   2 files changed, 10 insertions(+), 10 deletions(-)

Modified: trunk/libs/graph/test/all_planar_input_files_test.cpp
==============================================================================
--- trunk/libs/graph/test/all_planar_input_files_test.cpp (original)
+++ trunk/libs/graph/test/all_planar_input_files_test.cpp 2010-12-04 15:31:33 EST (Sat, 04 Dec 2010)
@@ -18,6 +18,8 @@
 
 */
 
+#define BOOST_FILESYSTEM_VERSION 3
+
 #include <iostream>
 #include <fstream>
 #include <vector>
@@ -264,20 +266,19 @@
             << std::endl;
 
   filesystem::path input_directory =
- filesystem::system_complete
- (filesystem::path(input_directory_str, filesystem::native));
- const std::string dimacs_suffix = ".dimacs";
+ filesystem::system_complete(filesystem::path(input_directory_str));
+ const std::string dimacs_extension = ".dimacs";
 
   filesystem::directory_iterator dir_end;
   for( filesystem::directory_iterator dir_itr(input_directory);
        dir_itr != dir_end; ++dir_itr)
   {
 
- if (!ends_with(dir_itr->string(), dimacs_suffix))
+ if (dir_itr->path().extension() != dimacs_extension)
       continue;
 
     std::cout << "Testing " << dir_itr->path().leaf() << "... ";
- BOOST_REQUIRE (test_graph(dir_itr->string()) == 0);
+ BOOST_REQUIRE (test_graph(dir_itr->path().string()) == 0);
 
     std::cout << std::endl;
   }

Modified: trunk/libs/graph/test/parallel_edges_loops_test.cpp
==============================================================================
--- trunk/libs/graph/test/parallel_edges_loops_test.cpp (original)
+++ trunk/libs/graph/test/parallel_edges_loops_test.cpp 2010-12-04 15:31:33 EST (Sat, 04 Dec 2010)
@@ -340,20 +340,19 @@
             << std::endl;
 
   filesystem::path input_directory =
- filesystem::system_complete
- (filesystem::path(input_directory_str, filesystem::native));
- const std::string dimacs_suffix = ".dimacs";
+ filesystem::system_complete(filesystem::path(input_directory_str));
+ const std::string dimacs_extension = ".dimacs";
 
   filesystem::directory_iterator dir_end;
   for( filesystem::directory_iterator dir_itr(input_directory);
        dir_itr != dir_end; ++dir_itr)
   {
 
- if (!ends_with(dir_itr->string(), dimacs_suffix))
+ if (dir_itr->path().extension() != dimacs_extension)
       continue;
 
     std::cerr << "Testing " << dir_itr->path().leaf() << "... ";
- BOOST_REQUIRE (test_graph(dir_itr->string()) == 0);
+ BOOST_REQUIRE (test_graph(dir_itr->path().string()) == 0);
 
     std::cerr << std::endl;
   }


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