Changeset 486 for library/tests
- Timestamp:
- 08/07/09 14:32:01 (15 years ago)
- Location:
- library/tests
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
library/tests/test_util.cpp
r477 r486 30 30 char buffer[8192]; 31 31 memset ( buffer, 0, sizeof ( buffer ) ); 32 std::ifstream src ( fname , std::ios_base::binary);32 std::ifstream src ( fname ); 33 33 src.read ( buffer, sizeof ( buffer ) - 1 ); 34 34 return std::string ( buffer ); … … 65 65 } 66 66 } else { 67 if ( errno == ENOTDIR ) { 67 if ( ( errno == ENOTDIR ) || // Linux 68 ( errno == EINVAL ) ) { // Windows 68 69 if ( unlink ( path ) ) { 69 70 std::string msg = "can't remove file "; -
library/tests/test_util.h
r477 r486 23 23 /*! \brief Non-general but simple file load. 24 24 25 Handles only files smaller than 8KB which do not contain '\0'25 Handles only text files smaller than 8KB which do not contain '\0' 26 26 characters, but for testing that should be enough. 27 27 */