Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r50953 - in sandbox/filesystem-v3/libs/filesystem: doc src test
From: bdawes_at_[hidden]
Date: 2009-02-01 12:32:49


Author: bemandawes
Date: 2009-02-01 12:32:48 EST (Sun, 01 Feb 2009)
New Revision: 50953
URL: http://svn.boost.org/trac/boost/changeset/50953

Log:
Filesystem.v3: Misc cleanup
Text files modified:
   sandbox/filesystem-v3/libs/filesystem/doc/v3_design.html | 24 ++++++++++++++++++++
   sandbox/filesystem-v3/libs/filesystem/src/operations.cpp | 3 -
   sandbox/filesystem-v3/libs/filesystem/test/path_unit_test.cpp | 46 ++++++++-------------------------------
   3 files changed, 34 insertions(+), 39 deletions(-)

Modified: sandbox/filesystem-v3/libs/filesystem/doc/v3_design.html
==============================================================================
--- sandbox/filesystem-v3/libs/filesystem/doc/v3_design.html (original)
+++ sandbox/filesystem-v3/libs/filesystem/doc/v3_design.html 2009-02-01 12:32:48 EST (Sun, 01 Feb 2009)
@@ -197,12 +197,34 @@
 
 <h2><a name="Trying-the-prototype">Using the prototype</a></h2>
 
+<p>Note that testing has been concentrated on VC++ 9.0 Express, with occasional
+Linux GCC tests. Only the core path tests and operations tests are passing.
+Expect problems with other compilers or test programs.</p>
+
+<p>Windows install:</p>
+
 <blockquote>
- <pre>svn export http://svn.boost.org/svn/boost/trunk filesystem-v3
+ <pre>cd to the directory where you wish to download the prototype
+svn export http://svn.boost.org/svn/boost/trunk filesystem-v3
 rmdir /s /q filesystem-v3\boost\filesystem
 rmdir /s /q filesystem-v3\libs\filesystem
 svn --force co http://svn.boost.org/svn/boost/sandbox/filesystem-v3 filesystem-v3</pre>
 </blockquote>
+<p>POSIX install (warning - untested code):</p>
+
+<blockquote>
+ <pre>cd to the directory where you wish to download the prototype
+svn export http://svn.boost.org/svn/boost/trunk filesystem-v3
+rm -fr filesystem-v3/boost/filesystem
+rm -fr filesystem-v3/libs/filesystem
+svn --force co http://svn.boost.org/svn/boost/sandbox/filesystem-v3 filesystem-v3</pre>
+</blockquote>
+<p>To see what tests are passing on your system:</p>
+
+<blockquote>
+ <pre>cd filesystem-v3/libs/filesystem/test
+bjam</pre>
+</blockquote>
 <h2><a name="Acknowledgements">Acknowledgements</a></h2>
 
 <p>Peter Dimov suggested the idea of a single path class that could cope with

Modified: sandbox/filesystem-v3/libs/filesystem/src/operations.cpp
==============================================================================
--- sandbox/filesystem-v3/libs/filesystem/src/operations.cpp (original)
+++ sandbox/filesystem-v3/libs/filesystem/src/operations.cpp 2009-02-01 12:32:48 EST (Sun, 01 Feb 2009)
@@ -716,7 +716,6 @@
   void create_symlink( const path & to, const path & from, error_code & ec )
   {
 # if defined(BOOST_WINDOWS_API) && _WIN32_WINNT < 0x0600 // SDK earlier than Vista and Server 2008
- std::cout << "*********************************" << _WIN32_WINNT << std::endl;
     error( true, error_code(BOOST_ERROR_NOT_SUPPORTED, system_category), to, from, ec,
       "boost::filesystem::create_directory_symlink" );
 # else
@@ -1438,7 +1437,7 @@
 {
 # ifdef BOOST_WINDOWS_API
 
- error_code dir_itr_first( void *& handle, const path & dir,
+ error_code dir_itr_first( void *& handle, const fs::path & dir,
     wstring & target, fs::file_status & sf, fs::file_status & symlink_sf )
   // Note: an empty root directory has no "." or ".." entries, so this
   // causes a ERROR_FILE_NOT_FOUND error which we do not considered an

Modified: sandbox/filesystem-v3/libs/filesystem/test/path_unit_test.cpp
==============================================================================
--- sandbox/filesystem-v3/libs/filesystem/test/path_unit_test.cpp (original)
+++ sandbox/filesystem-v3/libs/filesystem/test/path_unit_test.cpp 2009-02-01 12:32:48 EST (Sun, 01 Feb 2009)
@@ -30,21 +30,7 @@
 using boost::filesystem::path;
 using std::cout;
 using std::string;
-
-# ifndef BOOST_FILESYSTEM_NARROW_ONLY
-
- using std::wstring;
- typedef std::wstring bstring;
-# define BOO_LIT( lit ) L##lit
-# define BOO_COUT std::wcout
-
-# else
-
- typedef std::string bstring;
-# define BOO_LIT( lit ) lit
-# define BOO_COUT std::cout
-
-# endif
+using std::wstring;
 
 #define CHECK(x) check( x, __FILE__, __LINE__ )
 #define PATH_IS( a, b ) check_path( a, b, __FILE__, __LINE__ )
@@ -61,22 +47,16 @@
   std::string platform( BOOST_PLATFORM );
 
   void check_path( const path & source,
- const bstring & expected, const char* file, int line )
+ const wstring & expected, const char* file, int line )
   {
     if ( source == expected ) return;
 
     ++errors;
 
     std::cout << file;
-# ifndef BOOST_FILESYSTEM_NARROW_ONLY
     std::wcout << L'(' << line << L"): source.wstring(): \"" << source.wstring()
                << L"\" != expected: \"" << expected
                << L"\"\n" ;
-# else
- std::cout << '(' << line << "): source.string(): \"" << source.string()
- << "\" != expected: \"" << expected
- << "\"\n" ;
-# endif
   }
 
   template< class T1, class T2 >
@@ -89,16 +69,10 @@
 
     std::cout << file;
 
-# ifndef BOOST_FILESYSTEM_NARROW_ONLY
     std::wcout << L'(' << line << L"): value: \"" << value
                << L"\" != expected: \"" << expected
                << L"\"\n" ;
-# else
- std::cout << '(' << line << "): value: \"" << value
- << "\" != expected: \"" << expected
- << "\"\n" ;
-# endif
- }
+ }
 
   void check( bool ok, const char* file, int line )
   {
@@ -121,35 +95,35 @@
     std::cout << "testing constructors..." << std::endl;
 
     path x0; // #1
- PATH_IS(x0, BOO_LIT(""));
+ PATH_IS(x0, L"");
 
     path x1("path x1"); // #3
- PATH_IS(x1, BOO_LIT("path x1"));
+ PATH_IS(x1, L"path x1");
 
     path x2(x1); // #2
- PATH_IS(x2, BOO_LIT("path x1"));
+ PATH_IS(x2, L"path x1");
 
     path x3(L"const wchar_t *"); // #3
     PATH_IS(x3, L"const wchar_t *");
 
     string s3a( "s3a.c_str()" );
     path x3a( s3a.c_str() ); // #3
- PATH_IS(x3a, BOO_LIT("s3a.c_str()"));
+ PATH_IS(x3a, L"s3a.c_str()");
 
     path x4(string("std::string::iterator").begin()); // #3
- PATH_IS(x4, BOO_LIT("std::string::iterator"));
+ PATH_IS(x4, L"std::string::iterator");
 
     path x5(wstring(L"std::wstring::iterator").begin()); // #3
     PATH_IS(x5, L"std::wstring::iterator");
 
     path x7(s.begin(), s.end()); // #4
- PATH_IS(x7, BOO_LIT("string iterators"));
+ PATH_IS(x7, L"string iterators");
 
     path x8(ws.begin(), ws.end()); // #4
     PATH_IS(x8, L"wstring iterators");
 
     path x10(string("std::string")); // #5
- PATH_IS(x10, BOO_LIT("std::string"));
+ PATH_IS(x10, L"std::string");
 
     path x11(wstring(L"std::wstring")); // #5
     PATH_IS(x11, L"std::wstring");


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