Changeset 486

Show
Ignore:
Timestamp:
08/07/09 14:32:01 (15 years ago)
Author:
vbarta
Message:

fixed test utils for windows (debug testsuite passes)

Location:
library/tests
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • library/tests/test_util.cpp

    r477 r486  
    3030        char buffer[8192]; 
    3131        memset ( buffer, 0, sizeof ( buffer ) ); 
    32         std::ifstream src ( fname, std::ios_base::binary ); 
     32        std::ifstream src ( fname ); 
    3333        src.read ( buffer, sizeof ( buffer ) - 1 ); 
    3434        return std::string ( buffer ); 
     
    6565                } 
    6666        } else { 
    67                 if ( errno == ENOTDIR ) { 
     67                if ( ( errno == ENOTDIR ) || // Linux  
     68                     ( errno == EINVAL ) ) { // Windows 
    6869                        if ( unlink ( path ) ) { 
    6970                                std::string msg = "can't remove file "; 
  • library/tests/test_util.h

    r477 r486  
    2323/*! \brief Non-general but simple file load. 
    2424 
    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' 
    2626  characters, but for testing that should be enough. 
    2727*/