diff options
author | Dan Albert <danalbert@google.com> | 2015-03-20 21:06:52 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-03-20 21:06:52 +0000 |
commit | db7a994e1687574a675ccf5d56aa76df4cd98a88 (patch) | |
tree | 13ff7df288fe17714e55b2da8094b441229e6d97 /base/file_test.cpp | |
parent | 48a5288ed3bf527e68dbefc9884f3a713ef632a2 (diff) | |
parent | 58310b49fc8a7a713b922319a849a419858db79e (diff) | |
download | system_core-db7a994e1687574a675ccf5d56aa76df4cd98a88.zip system_core-db7a994e1687574a675ccf5d56aa76df4cd98a88.tar.gz system_core-db7a994e1687574a675ccf5d56aa76df4cd98a88.tar.bz2 |
Merge "Add google3 style logging to libbase."
Diffstat (limited to 'base/file_test.cpp')
-rw-r--r-- | base/file_test.cpp | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/base/file_test.cpp b/base/file_test.cpp index 34b8755..fc48b32 100644 --- a/base/file_test.cpp +++ b/base/file_test.cpp @@ -24,29 +24,7 @@ #include <string> -class TemporaryFile { - public: - TemporaryFile() { - init("/data/local/tmp"); - if (fd == -1) { - init("/tmp"); - } - } - - ~TemporaryFile() { - close(fd); - unlink(filename); - } - - int fd; - char filename[1024]; - - private: - void init(const char* tmp_dir) { - snprintf(filename, sizeof(filename), "%s/TemporaryFile-XXXXXX", tmp_dir); - fd = mkstemp(filename); - } -}; +#include "test_utils.h" TEST(file, ReadFileToString_ENOENT) { std::string s("hello"); |