V2 tests added. All tests passing on at least one compiler, none passing on all compilers

[SVN r62759]
This commit is contained in:
Beman Dawes 2010-06-10 20:02:39 +00:00
parent ea03205dd3
commit 7922c919d8
17 changed files with 92 additions and 76 deletions

View File

@ -14,9 +14,10 @@ project boost/filesystem
;
SOURCES =
v2/src/v2_operations v2/src/v2_path v2/src/v2_portability v2/src/v2_utf8_codecvt_facet
v2/src/v2_operations v2/src/v2_path v2/src/v2_portability
v3/src/operations v3/src/path v3/src/portability v3/src/utf8_codecvt_facet
v3/src/codecvt_error_category v3/src/path_traits v3/src/unique_path v3/src/windows_file_codecvt
v3/src/codecvt_error_category v3/src/path_traits v3/src/unique_path
v3/src/windows_file_codecvt
;

View File

@ -29,4 +29,4 @@
# endif
#endif BOOST_FILESYSTEM_CONFIGX_HPP
#endif // BOOST_FILESYSTEM_CONFIGX_HPP

View File

@ -29,4 +29,4 @@
# endif
#endif BOOST_FILESYSTEM_CONVENIENCEX_HPP
#endif // BOOST_FILESYSTEM_CONVENIENCEX_HPP

View File

@ -7,10 +7,10 @@
#ifndef BOOST_FILESYSTEM_UTF8_CODECVT_FACET_HPP
#define BOOST_FILESYSTEM_UTF8_CODECVT_FACET_HPP
#include <boost/filesystem/v2/config.hpp>
#include <boost/filesystem/config.hpp>
#define BOOST_UTF8_BEGIN_NAMESPACE \
namespace boost { namespace filesystem2 { namespace detail {
namespace boost { namespace filesystem { namespace detail {
#define BOOST_UTF8_END_NAMESPACE }}}
#define BOOST_UTF8_DECL BOOST_FILESYSTEM_DECL

View File

@ -29,4 +29,4 @@
# endif
#endif BOOST_FILESYSTEM_EXCEPTIONX_HPP
#endif // BOOST_FILESYSTEM_EXCEPTIONX_HPP

View File

@ -29,4 +29,4 @@
# endif
#endif BOOST_FILESYSTEM_OPERATIONSX_HPP
#endif // BOOST_FILESYSTEM_OPERATIONSX_HPP

View File

@ -56,7 +56,7 @@ namespace boost
return true;
}
# ifndef BOOST_FILESYSTEM2_NO_DEPRECATED
# ifndef BOOST_FILESYSTEM_NO_DEPRECATED
BOOST_FS_FUNC_STRING extension(const Path& ph)
{
@ -85,7 +85,7 @@ namespace boost
# endif
# ifndef BOOST_FILESYSTEM2_NARROW_ONLY
# ifndef BOOST_FILESYSTEM_NARROW_ONLY
// "do-the-right-thing" overloads ---------------------------------------//
@ -94,7 +94,7 @@ namespace boost
inline bool create_directories(const wpath& ph)
{ return create_directories<wpath>(ph); }
# ifndef BOOST_FILESYSTEM2_NO_DEPRECATED
# ifndef BOOST_FILESYSTEM_NO_DEPRECATED
inline std::string extension(const path& ph)
{ return extension<path>(ph); }
inline std::wstring extension(const wpath& ph)
@ -199,7 +199,7 @@ namespace boost
};
typedef basic_recursive_directory_iterator<path> recursive_directory_iterator;
# ifndef BOOST_FILESYSTEM2_NARROW_ONLY
# ifndef BOOST_FILESYSTEM_NARROW_ONLY
typedef basic_recursive_directory_iterator<wpath> wrecursive_directory_iterator;
# endif
@ -302,5 +302,30 @@ namespace boost
#undef BOOST_FS_FUNC_STRING
#undef BOOST_FS_FUNC
//----------------------------------------------------------------------------//
namespace boost
{
namespace filesystem
{
using filesystem2::create_directories;
using filesystem2::basic_recursive_directory_iterator;
using filesystem2::recursive_directory_iterator;
# ifndef BOOST_FILESYSTEM_NO_DEPRECATED
using filesystem2::extension;
using filesystem2::basename;
using filesystem2::change_extension;
# endif
# ifndef BOOST_FILESYSTEM_NARROW_ONLY
using filesystem2::wrecursive_directory_iterator;
# endif
}
}
//----------------------------------------------------------------------------//
#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
#endif // BOOST_FILESYSTEM2_CONVENIENCE_HPP

View File

@ -12,7 +12,7 @@
#ifndef BOOST_FILESYSTEM2_FSTREAM_HPP
#define BOOST_FILESYSTEM2_FSTREAM_HPP
#include <boost/filesystem/operations.hpp> // for 8.3 hack (see below)
#include <boost/filesystem/v2/operations.hpp> // for 8.3 hack (see below)
#include <boost/utility/enable_if.hpp>
#include <boost/detail/workaround.hpp>
@ -580,5 +580,31 @@ namespace boost
} // namespace filesystem2
} // namespace boost
//----------------------------------------------------------------------------//
namespace boost
{
namespace filesystem
{
using filesystem2::filebuf;
using filesystem2::ifstream;
using filesystem2::ofstream;
using filesystem2::fstream;
using filesystem2::wfilebuf;
using filesystem2::wifstream;
using filesystem2::wfstream;
using filesystem2::wofstream;
using filesystem2::basic_filebuf;
using filesystem2::basic_ifstream;
using filesystem2::basic_ofstream;
using filesystem2::basic_fstream;
# ifndef BOOST_FILESYSTEM_NO_DEPRECATED
# endif
}
}
//----------------------------------------------------------------------------//
#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
#endif // BOOST_FILESYSTEM2_FSTREAM_HPP

View File

@ -1182,6 +1182,8 @@ namespace boost
{
using filesystem2::basic_directory_entry;
using filesystem2::basic_directory_iterator;
using filesystem2::block_file;
using filesystem2::character_file;
using filesystem2::complete;
using filesystem2::copy_file;
using filesystem2::copy_option;
@ -1190,9 +1192,12 @@ namespace boost
using filesystem2::create_symlink;
using filesystem2::current_path;
using filesystem2::directory_entry;
using filesystem2::directory_file;
using filesystem2::directory_iterator;
using filesystem2::equivalent;
using filesystem2::exists;
using filesystem2::fifo_file;
using filesystem2::file_not_found;
using filesystem2::file_size;
using filesystem2::file_status;
using filesystem2::file_type;
@ -1204,15 +1209,19 @@ namespace boost
using filesystem2::is_regular_file;
using filesystem2::is_symlink;
using filesystem2::last_write_time;
using filesystem2::regular_file;
using filesystem2::remove;
using filesystem2::remove_all;
using filesystem2::rename;
using filesystem2::socket_file;
using filesystem2::space;
using filesystem2::space_info;
using filesystem2::status;
using filesystem2::status_known;
using filesystem2::symlink_file;
using filesystem2::symlink_status;
using filesystem2::system_complete;
using filesystem2::type_unknown;
# ifndef BOOST_FILESYSTEM_NO_DEPRECATED
using filesystem2::is_regular;
using filesystem2::symbolic_link_exists;
@ -1221,6 +1230,11 @@ namespace boost
using filesystem2::wdirectory_iterator;
using filesystem2::wdirectory_entry;
# endif
namespace detail
{
using filesystem2::detail::not_found_error;
using filesystem2::detail::possible_large_file_size_support;
}
}
}

View File

@ -12,6 +12,12 @@ project
;
test-suite "filesystem" :
[ run ../v2/test/path_test.cpp : : : : v2_path_test ]
[ run ../v2/test/operations_test.cpp : : : : v2_operations_test ]
[ run ../v2/test/fstream_test.cpp : : : : v2_fstream_test ]
[ run ../v2/test/convenience_test.cpp : : : : v2_convenience_test ]
[ run ../v2/test/large_file_support_test.cpp : : : : v2_large_file_support_test ]
[ run ../v3/test/path_unit_test.cpp : : : : v3_path_unit_test ]
[ run ../v3/test/path_test.cpp : : : : v3_path_test ]
[ run ../v3/test/operations_unit_test.cpp : : : : v3_operations_unit_test ]

View File

@ -1,19 +0,0 @@
// Copyright Vladimir Prus 2004.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
#define BOOST_FILESYSTEM_SOURCE
#include <boost/filesystem/v2/config.hpp>
#define BOOST_UTF8_BEGIN_NAMESPACE \
namespace boost { namespace filesystem2 { namespace detail {
#define BOOST_UTF8_END_NAMESPACE }}}
#define BOOST_UTF8_DECL BOOST_FILESYSTEM_DECL
#include "libs/detail/utf8_codecvt_facet.cpp"
#undef BOOST_UTF8_BEGIN_NAMESPACE
#undef BOOST_UTF8_END_NAMESPACE
#undef BOOST_UTF8_DECL

View File

@ -18,7 +18,7 @@
#include <iostream>
#include <cstdio> // for std::remove
#include "../src/utf8_codecvt_facet.hpp"
#include <boost/filesystem/detail/utf8_codecvt_facet.hpp>
#ifndef BOOST_FILESYSTEM_NARROW_ONLY
# include "lpath.hpp"

View File

@ -8,7 +8,7 @@
// See library home page at http://www.boost.org/libs/filesystem
#include <boost/filesystem/path.hpp>
#include <boost/filesystem/v2/path.hpp>
#include <cwchar> // for std::mbstate_t
#include <string>
#include <ios> // for std::streamoff
@ -93,7 +93,7 @@ namespace user
namespace boost
{
namespace filesystem
namespace filesystem2
{
template<> struct is_basic_path<user::lpath>
{ static const bool value = true; };

View File

@ -4,10 +4,10 @@
// or copy at http://www.boost.org/LICENSE_1_0.txt)
#define BOOST_FILESYSTEM_SOURCE
#include <boost/filesystem/v3/config.hpp>
#include <boost/filesystem/config.hpp>
#define BOOST_UTF8_BEGIN_NAMESPACE \
namespace boost { namespace filesystem3 { namespace detail {
namespace boost { namespace filesystem { namespace detail {
#define BOOST_UTF8_END_NAMESPACE }}}
#define BOOST_UTF8_DECL BOOST_FILESYSTEM_DECL

View File

@ -1,37 +0,0 @@
// Copyright (c) 2001 Ronald Garcia, Indiana University (garcia@osl.iu.edu)
// Andrew Lumsdaine, Indiana University (lums@osl.iu.edu).
// Distributed under the Boost Software License, Version 1.0.
// (See http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_FILESYSTEM3_UTF8_CODECVT_FACET_HPP
#define BOOST_FILESYSTEM3_UTF8_CODECVT_FACET_HPP
#include <boost/filesystem/v3/config.hpp>
#define BOOST_UTF8_BEGIN_NAMESPACE \
namespace boost { namespace filesystem3 { namespace detail {
#define BOOST_UTF8_END_NAMESPACE }}}
#define BOOST_UTF8_DECL BOOST_FILESYSTEM_DECL
#include <boost/detail/utf8_codecvt_facet.hpp>
#undef BOOST_UTF8_BEGIN_NAMESPACE
#undef BOOST_UTF8_END_NAMESPACE
#undef BOOST_UTF8_DECL
//----------------------------------------------------------------------------//
namespace boost
{
namespace filesystem
{
namespace detail
{
using filesystem3::detail::utf8_codecvt_facet;
}
}
}
#endif

View File

@ -20,7 +20,7 @@
#include <iostream>
#include <cstdio> // for std::remove
#include "../src/utf8_codecvt_facet.hpp"
#include <boost/filesystem/detail/utf8_codecvt_facet.hpp>
namespace fs = boost::filesystem;

View File

@ -27,7 +27,7 @@
#define BOOST_FILESYSTEM_NO_DEPRECATED
#include <boost/filesystem/path.hpp>
#include "../src/utf8_codecvt_facet.hpp" // for imbue tests
#include <boost/filesystem/detail/utf8_codecvt_facet.hpp> // for imbue tests
#include <boost/detail/lightweight_test.hpp>
#include <iostream>