Changeset 425 for library/tests/test_user_info.cpp
- Timestamp:
- 07/22/09 14:57:26 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
library/tests/test_user_info.cpp
r418 r425 1 #include <fstream>2 1 #include <memory> 3 2 #include <string> 4 3 #include <string.h> 5 4 #include "base/user_info.h" 5 #include "test_util.h" 6 6 #include "UnitTest++.h" 7 7 … … 196 196 UIREGISTER(Bike); 197 197 198 // Non-general but simple file load - handles only files of limited199 // size which do not contain '\0' characters, but for testing that200 // should be enough.201 string load_test_file(const char *fname)202 {203 char buffer[8192];204 memset(buffer, 0, sizeof(buffer));205 ifstream src(fname, ios_base::binary);206 src.read(buffer, sizeof(buffer) - 1);207 return string(buffer);208 }209 210 198 TEST(test_load) 211 199 {