Lines Matching refs:FILE
223 // TODO(wan@google.com): fix the source file location in the
417 GTestLog::GTestLog(GTestLogSeverity severity, const char* file, int line)
424 << FormatFileLocation(file, line).c_str() << ": ";
446 // The ctor redirects stderr to a temporary file.
464 // current directory, so we create the temporary file in the /tmp
493 // Returns the name of the temporary file holding the stderr output.
509 // Returns the size (in bytes) of a file.
510 static size_t GetFileSize(FILE * file) {
511 fseek(file, 0, SEEK_END);
512 return static_cast<size_t>(ftell(file));
515 // Reads the entire content of a file as a string.
516 static String ReadEntireFile(FILE * file) {
517 const size_t file_size = GetFileSize(file);
523 fseek(file, 0, SEEK_SET);
525 // Keeps reading the file until we cannot read further or the
526 // pre-determined file size is reached.
528 bytes_last_read = fread(buffer+bytes_read, 1, file_size-bytes_read, file);
552 FILE* const file = posix::FOpen(g_captured_stderr->filename().c_str(), "r");
553 const String content = ReadEntireFile(file);
554 posix::FClose(file);