proxygen
|
#include <TestUtils.h>
Public Member Functions | |
CheckResult (bool s) noexcept | |
operator bool () const noexcept | |
const char * | what () const noexcept |
template<typename T > | |
CheckResult & | operator<< (T &&t) |
Private Attributes | |
bool | success_ |
std::string | message_ |
Helper class for implementing test macros
Definition at line 147 of file TestUtils.h.
|
inlineexplicitnoexcept |
Definition at line 149 of file TestUtils.h.
Referenced by folly::test::detail::checkThrowErrno(), and folly::test::detail::checkThrowRegex().
|
inlineexplicitnoexcept |
|
inline |
Support the << operator for building up the error message.
The arguments are treated as with folly::to<string>(), and we do not support iomanip parameters. The main reason we use the << operator as opposed to a variadic function like folly::to is that clang-format formats long statements using << much nicer than function call arguments.
Definition at line 167 of file TestUtils.h.
References message_, folly::pushmi::detail::t, and folly::toAppend().
|
inlinenoexcept |
|
private |
Definition at line 174 of file TestUtils.h.
Referenced by operator<<(), and what().
|
private |
Definition at line 173 of file TestUtils.h.
Referenced by operator bool().