• Home
  • Raw
  • Download

Lines Matching refs:tf

40   TemporaryFile tf;  in TEST()  local
41 ASSERT_TRUE(tf.fd != -1); in TEST()
42 ASSERT_TRUE(android::base::WriteStringToFile("abc", tf.path)) in TEST()
45 ASSERT_TRUE(android::base::ReadFileToString(tf.path, &s)) in TEST()
72 TemporaryFile tf; in TEST() local
73 ASSERT_TRUE(tf.fd != -1); in TEST()
74 ASSERT_TRUE(android::base::WriteStringToFile("abc", tf.path, 0660, in TEST()
78 ASSERT_EQ(0, stat(tf.path, &sb)); in TEST()
83 ASSERT_TRUE(android::base::ReadFileToString(tf.path, &s)) in TEST()
90 TemporaryFile tf; in TEST() local
91 ASSERT_TRUE(tf.fd != -1); in TEST()
92 ASSERT_TRUE(android::base::WriteStringToFd("abc", tf.fd)); in TEST()
94 ASSERT_EQ(0, lseek(tf.fd, 0, SEEK_SET)) << strerror(errno); in TEST()
97 ASSERT_TRUE(android::base::ReadFdToString(tf.fd, &s)) << strerror(errno); in TEST()
102 TemporaryFile tf; in TEST() local
103 ASSERT_TRUE(tf.fd != -1); in TEST()
104 ASSERT_TRUE(android::base::WriteFully(tf.fd, "abc", 3)); in TEST()
106 ASSERT_EQ(0, lseek(tf.fd, 0, SEEK_SET)) << strerror(errno); in TEST()
110 ASSERT_TRUE(android::base::ReadFully(tf.fd, &s[0], s.size())) in TEST()
114 ASSERT_EQ(0, lseek(tf.fd, 0, SEEK_SET)) << strerror(errno); in TEST()
117 ASSERT_FALSE(android::base::ReadFully(tf.fd, &s[0], s.size())); in TEST()
121 TemporaryFile tf; in TEST() local
122 ASSERT_TRUE(tf.fd != -1); in TEST()
123 close(tf.fd); in TEST()
124 tf.fd = -1; in TEST()
126 ASSERT_TRUE(android::base::RemoveFileIfExists(tf.path, &err)) << err; in TEST()
127 ASSERT_TRUE(android::base::RemoveFileIfExists(tf.path)); in TEST()
135 TemporaryFile tf; in TEST() local
136 close(tf.fd); in TEST()
137 tf.fd = -1; in TEST()
139 ASSERT_TRUE(android::base::RemoveFileIfExists(std::string{tf.path} + "/abc", &err)); in TEST()
154 TemporaryFile tf(td.path); in TEST() local
155 close(tf.fd); in TEST()
156 tf.fd = -1; in TEST()
160 ASSERT_FALSE(android::base::RemoveFileIfExists(tf.path, &err)); in TEST()
164 ASSERT_TRUE(android::base::RemoveFileIfExists(tf.path, &err)); in TEST()
255 TemporaryFile tf; in TEST() local
256 ASSERT_TRUE(tf.fd != -1); in TEST()
261 ASSERT_TRUE(android::base::WriteStringToFile(std::string(size, 'x'), tf.path)); in TEST()
262 ASSERT_TRUE(android::base::ReadFileToString(tf.path, &s)); in TEST()
268 ASSERT_TRUE(android::base::WriteStringToFile(std::string(size, 'x'), tf.path)); in TEST()
269 ASSERT_TRUE(android::base::ReadFileToString(tf.path, &s)); in TEST()
275 ASSERT_TRUE(android::base::WriteStringToFile(std::string(size, 'x'), tf.path)); in TEST()
276 ASSERT_TRUE(android::base::ReadFileToString(tf.path, &s)); in TEST()
282 TemporaryFile tf; in TEST() local
283 ASSERT_TRUE(tf.fd != -1); in TEST()
291 ASSERT_TRUE(android::base::WriteStringToFile("", tf.path)); in TEST()
292 ASSERT_TRUE(android::base::ReadFileToString(tf.path, &s)); in TEST()