update to patch [ 1077074 ] Unit test for large file support from Mike

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31751 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Ryan Norton
2005-02-04 15:15:20 +00:00
parent 8673a12505
commit 086d7f3177

View File

@@ -8,7 +8,7 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// //
// Were interested in what happens around offsets 0x7fffffff and 0xffffffff // We're interested in what happens around offsets 0x7fffffff and 0xffffffff
// so the test writes a small chunk of test data just before and just after // so the test writes a small chunk of test data just before and just after
// these offsets, then reads them back. // these offsets, then reads them back.
// //
@@ -292,9 +292,9 @@ CppUnit::Test *largeFile::suite()
// are picked up. However this is only possible when sparse files are // are picked up. However this is only possible when sparse files are
// supported otherwise the tests require too much disk space. // supported otherwise the tests require too much disk space.
// //
// On unix most filesystems support sparse files, so right now I'm just // On unix, most filesystems support sparse files, though not all. So for now
// assuming sparse file support on unix. On Windows it's possible to test, and // I'm not assuming sparse file support on unix. On Windows it's possible to
// sparse files should be available on Win 5+ with NTFS. // test, and sparse files should be available on Win 5+ with NTFS.
#ifdef __WXMSW__ #ifdef __WXMSW__
@@ -365,7 +365,7 @@ void MakeSparse(const wxString& path, int fd)
if (!::DeviceIoControl((HANDLE)_get_osfhandle(fd), if (!::DeviceIoControl((HANDLE)_get_osfhandle(fd),
FSCTL_SET_SPARSE, FSCTL_SET_SPARSE,
NULL, 0, NULL, 0, &cb, NULL)) NULL, 0, NULL, 0, &cb, NULL))
volumeFlags &= ~ FILE_SUPPORTS_SPARSE_FILES; volumeFlags &= ~FILE_SUPPORTS_SPARSE_FILES;
} }
CppUnit::Test* GetlargeFileSuite() CppUnit::Test* GetlargeFileSuite()
@@ -388,11 +388,7 @@ CppUnit::Test* GetlargeFileSuite()
bool IsFAT(const wxString& WXUNUSED(path)) { return false; } bool IsFAT(const wxString& WXUNUSED(path)) { return false; }
void MakeSparse(const wxString& WXUNUSED(path), int WXUNUSED(fd)) { } void MakeSparse(const wxString& WXUNUSED(path), int WXUNUSED(fd)) { }
#ifdef __UNIX__
CppUnit::Test* GetlargeFileSuite() { return largeFile::suite(); }
#else
CppUnit::Test* GetlargeFileSuite() { return NULL; } CppUnit::Test* GetlargeFileSuite() { return NULL; }
#endif
#endif // __WXMSW__ #endif // __WXMSW__