proxygen
|
#include <folly/experimental/TestUtil.h>
#include <system_error>
#include <boost/algorithm/string.hpp>
#include <glog/logging.h>
#include <folly/Memory.h>
#include <folly/portability/Fcntl.h>
#include <folly/portability/GTest.h>
#include <folly/portability/Stdlib.h>
Go to the source code of this file.
Functions | |
TEST (TemporaryFile, Simple) | |
TEST (TemporaryFile, EarlyClose) | |
TEST (TemporaryFile, Prefix) | |
TEST (TemporaryFile, PathPrefix) | |
TEST (TemporaryFile, NoSuchPath) | |
TEST (TemporaryFile, moveAssignment) | |
TEST (TemporaryFile, moveCtor) | |
void | testTemporaryDirectory (TemporaryDirectory::Scope scope) |
TEST (TemporaryDirectory, Permanent) | |
TEST (TemporaryDirectory, DeleteOnDestruction) | |
void | expectTempdirExists (const TemporaryDirectory &d) |
TEST (TemporaryDirectory, SafelyMove) | |
TEST (ChangeToTempDir, ChangeDir) | |
TEST (PCREPatternMatch, Simple) | |
TEST (CaptureFD, GlogPatterns) | |
TEST (CaptureFD, ChunkCob) | |
void expectTempdirExists | ( | const TemporaryDirectory & | d | ) |
Definition at line 146 of file TestUtilTest.cpp.
References EXPECT_FALSE, EXPECT_TRUE, and folly::test::TemporaryDirectory::path().
Referenced by TEST().
TEST | ( | TemporaryFile | , |
Simple | |||
) |
Definition at line 32 of file TestUtilTest.cpp.
References c, EXPECT_EQ, EXPECT_FALSE, EXPECT_LE, EXPECT_TRUE, f, folly::test::TemporaryFile::fd(), folly::test::msvcSuppressAbortOnInvalidParams(), folly::test::TemporaryFile::path(), and fizz::detail::write().
TEST | ( | TemporaryFile | , |
EarlyClose | |||
) |
Definition at line 56 of file TestUtilTest.cpp.
References folly::test::TemporaryFile::close(), EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, f, folly::test::TemporaryFile::fd(), and folly::test::TemporaryFile::path().
TEST | ( | TemporaryFile | , |
Prefix | |||
) |
Definition at line 69 of file TestUtilTest.cpp.
References EXPECT_TRUE, f, folly::test::TemporaryFile::path(), and folly::fs::starts_with().
TEST | ( | TemporaryFile | , |
PathPrefix | |||
) |
Definition at line 76 of file TestUtilTest.cpp.
References EXPECT_EQ, EXPECT_TRUE, f, folly::test::TemporaryFile::path(), and folly::fs::starts_with().
TEST | ( | TemporaryFile | , |
NoSuchPath | |||
) |
Definition at line 83 of file TestUtilTest.cpp.
References EXPECT_THROW, and f.
TEST | ( | TemporaryFile | , |
moveAssignment | |||
) |
Definition at line 87 of file TestUtilTest.cpp.
References EXPECT_EQ, EXPECT_NE, EXPECT_TRUE, f, folly::test::TemporaryFile::fd(), g(), h, folly::gen::move, and folly::test::TemporaryFile::path().
TEST | ( | TemporaryFile | , |
moveCtor | |||
) |
Definition at line 105 of file TestUtilTest.cpp.
References EXPECT_EQ, EXPECT_NE, f, folly::test::TemporaryFile::fd(), g(), and folly::gen::move.
TEST | ( | TemporaryDirectory | , |
Permanent | |||
) |
Definition at line 138 of file TestUtilTest.cpp.
References folly::test::TemporaryDirectory::PERMANENT, and testTemporaryDirectory().
TEST | ( | TemporaryDirectory | , |
DeleteOnDestruction | |||
) |
Definition at line 142 of file TestUtilTest.cpp.
References folly::test::TemporaryDirectory::DELETE_ON_DESTRUCTION, and testTemporaryDirectory().
TEST | ( | TemporaryDirectory | , |
SafelyMove | |||
) |
Definition at line 152 of file TestUtilTest.cpp.
References folly::test::TemporaryDirectory::DELETE_ON_DESTRUCTION, expectTempdirExists(), and folly::gen::move.
TEST | ( | ChangeToTempDir | , |
ChangeDir | |||
) |
Definition at line 170 of file TestUtilTest.cpp.
References EXPECT_EQ, and EXPECT_NE.
TEST | ( | PCREPatternMatch | , |
Simple | |||
) |
Definition at line 179 of file TestUtilTest.cpp.
References EXPECT_NO_PCRE_MATCH, and EXPECT_PCRE_MATCH.
TEST | ( | CaptureFD | , |
GlogPatterns | |||
) |
Definition at line 185 of file TestUtilTest.cpp.
References EXPECT_NO_PCRE_MATCH, EXPECT_PCRE_MATCH, folly::test::glogErrorPattern(), folly::test::glogErrOrWarnPattern(), folly::test::glogWarningPattern(), folly::INFO, folly::test::CaptureFD::readIncremental(), s, and folly::WARNING.
TEST | ( | CaptureFD | , |
ChunkCob | |||
) |
Definition at line 205 of file TestUtilTest.cpp.
References chunks, EXPECT_EQ, EXPECT_PCRE_MATCH, FAIL, folly::INFO, and folly::Range< Iter >::str().
void testTemporaryDirectory | ( | TemporaryDirectory::Scope | scope | ) |
Definition at line 116 of file TestUtilTest.cpp.
References folly::netops::close(), EXPECT_EQ, EXPECT_FALSE, EXPECT_NE, EXPECT_TRUE, f, folly::test::TemporaryDirectory::path(), and folly::test::TemporaryDirectory::PERMANENT.
Referenced by TEST().