MCPcopy Create free account
hub / github.com/BVLC/caffe / GetCapturedString

Method GetCapturedString

src/gtest/gtest-all.cpp:8326–8339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8324 }
8325
8326 String GetCapturedString() {
8327 if (uncaptured_fd_ != -1) {
8328 // Restores the original stream.
8329 fflush(NULL);
8330 dup2(uncaptured_fd_, fd_);
8331 close(uncaptured_fd_);
8332 uncaptured_fd_ = -1;
8333 }
8334
8335 FILE* const file = posix::FOpen(filename_.c_str(), "r");
8336 const String content = ReadEntireFile(file);
8337 posix::FClose(file);
8338 return content;
8339 }
8340
8341 private:
8342 // Reads the entire content of a file as a String.

Callers 1

GetCapturedStreamFunction · 0.80

Calls 2

FOpenFunction · 0.85
FCloseFunction · 0.85

Tested by

no test coverage detected