#include <include_gunit.h>
|
static void | MakeTmpdir () |
|
static bool | WriteStringToFile (const std::string &contents, const std::string &filename) |
|
static bool | GetContents (const std::string &filename, std::string *out, int) |
|
static bool | SetContents (const std::string &name, const std::string &contents, bool) |
|
static int | Defaults () |
|
static std::string | JoinPath (const std::string &s1, const std::string &s2) |
|
static std::string | JoinPath (const std::string &s1, const std::string &s2, const std::string &s3) |
|
static FILE * | OpenOrDie (const std::string &filename, const std::string &mode) |
|
static FILE * | Open (const std::string &filename, const std::string &mode) |
|
static void | WriteStringToFileOrDie (const std::string &str, const std::string &filename) |
|
static bool | Readable (const std::string &filename) |
|
static bool | ReadFileToString (const std::string &filename, std::string *out) |
|
static std::string | JoinPath (const std::string &prefix, const std::string &suffix) |
|
static bool | Delete (const char *pathname) |
|
static bool | DeleteMatchingFiles (const char *pattern) |
|
Definition at line 36 of file include_gunit.h.
◆ Defaults()
static int file::Defaults |
( |
| ) |
|
|
inlinestatic |
◆ GetContents()
static bool file::GetContents |
( |
const std::string & |
filename, |
|
|
std::string * |
out, |
|
|
int |
|
|
) |
| |
|
inlinestatic |
Definition at line 52 of file include_gunit.h.
52 {
53 return File::ReadFileToString(filename, out);
54 }
◆ JoinPath() [1/2]
static std::string file::JoinPath |
( |
const std::string & |
s1, |
|
|
const std::string & |
s2 |
|
) |
| |
|
inlinestatic |
Definition at line 65 of file include_gunit.h.
65 {
67 }
static std::string JoinPath(const std::string &prefix, const std::string &suffix)
◆ JoinPath() [2/2]
static std::string file::JoinPath |
( |
const std::string & |
s1, |
|
|
const std::string & |
s2, |
|
|
const std::string & |
s3 |
|
) |
| |
|
inlinestatic |
Definition at line 69 of file include_gunit.h.
69 {
71 }
static std::string JoinPath(const std::string &s1, const std::string &s2)
◆ MakeTmpdir()
static void file::MakeTmpdir |
( |
| ) |
|
|
inlinestatic |
Definition at line 38 of file include_gunit.h.
38 {
39#if defined(_WIN32)
40 _mkdir(FLAGS_test_tmpdir);
41#else
42 mkdir(FLAGS_test_tmpdir, S_IRWXU | S_IRWXG);
43#endif
44 }
◆ SetContents()
static bool file::SetContents |
( |
const std::string & |
name, |
|
|
const std::string & |
contents, |
|
|
bool |
|
|
) |
| |
|
inlinestatic |
Definition at line 56 of file include_gunit.h.
57 {
59 }
static bool WriteStringToFile(const std::string &contents, const std::string &filename)
◆ WriteStringToFile()
static bool file::WriteStringToFile |
( |
const std::string & |
contents, |
|
|
const std::string & |
filename |
|
) |
| |
|
inlinestatic |
Definition at line 47 of file include_gunit.h.
47 {
48 File::WriteStringToFileOrDie(contents, filename);
49 return true;
50 }
The documentation for this class was generated from the following file:
- /media/home/debian/src/github/tesseract-ocr/tesseract/unittest/include_gunit.h