|
proxygen
|
#include <folly/Try.h>#include <glog/logging.h>#include <folly/Memory.h>#include <folly/Traits.h>#include <folly/portability/GTest.h>Go to the source code of this file.
Functions | |
| TEST (Try, basic) | |
| TEST (Try, in_place) | |
| TEST (Try, in_place_nested) | |
| TEST (Try, assignmentWithThrowingCopyConstructor) | |
| TEST (Try, assignmentWithThrowingMoveConstructor) | |
| TEST (Try, emplace) | |
| TEST (Try, emplaceWithThrowingConstructor) | |
| TEST (Try, tryEmplace) | |
| TEST (Try, tryEmplaceWithThrowingConstructor) | |
| TEST (Try, emplaceVoidTry) | |
| TEST (Try, tryEmplaceVoidTry) | |
| TEST (Try, tryEmplaceWith) | |
| TEST (Try, tryEmplaceWithFunctionThrows) | |
| TEST (Try, tryEmplaceWithConstructorThrows) | |
| TEST (Try, tryEmplaceWithVoidTry) | |
| TEST (Try, nothrow) | |
| TEST (Try, MoveDereference) | |
| TEST (Try, MoveConstRvalue) | |
| TEST (Try, ValueOverloads) | |
| TEST (Try, copy) | |
| TEST (Try, moveOnly) | |
| TEST (Try, makeTryWith) | |
| TEST (Try, makeTryWithThrow) | |
| TEST (Try, makeTryWithVoid) | |
| TEST (Try, makeTryWithVoidThrow) | |
| TEST (Try, exception) | |
| template<typename E > | |
| static E * | get_exception (std::exception_ptr eptr) |
| TEST (Try, tryGetExceptionObject) | |
| TEST (Try, withException) | |
| TEST (Try, TestUnwrapTuple) | |
| TEST (Try, TestUnwrapPair) | |
| TEST (Try, TestUnwrapForward) | |
|
static |
Definition at line 541 of file TryTest.cpp.
Referenced by folly::exception_wrapper::exception_wrapper().
Definition at line 64 of file TryTest.cpp.
References a, EXPECT_EQ, folly::gen::move, and folly::Try< T >::value().
| TEST | ( | Try | , |
| in_place | |||
| ) |
Definition at line 73 of file TryTest.cpp.
References EXPECT_EQ, folly::in_place(), and folly::Try< T >::value().
| TEST | ( | Try | , |
| in_place_nested | |||
| ) |
Definition at line 79 of file TryTest.cpp.
References EXPECT_EQ, folly::in_place(), and folly::Try< T >::value().
| TEST | ( | Try | , |
| assignmentWithThrowingCopyConstructor | |||
| ) |
Definition at line 85 of file TryTest.cpp.
References counter, counter_, EXPECT_EQ, EXPECT_FALSE, EXPECT_THROW, EXPECT_TRUE, folly::Try< T >::hasValue(), folly::in_place(), and folly::pushmi::__adl::noexcept().
| TEST | ( | Try | , |
| assignmentWithThrowingMoveConstructor | |||
| ) |
Definition at line 130 of file TryTest.cpp.
References counter, counter_, EXPECT_EQ, EXPECT_FALSE, EXPECT_THROW, EXPECT_TRUE, folly::Try< T >::hasValue(), folly::in_place(), folly::gen::move, and folly::pushmi::__adl::noexcept().
| TEST | ( | Try | , |
| emplace | |||
| ) |
Definition at line 175 of file TryTest.cpp.
References folly::Try< T >::emplace(), EXPECT_EQ, EXPECT_TRUE, folly::Try< T >::hasValue(), and folly::pushmi::detail::t.
| TEST | ( | Try | , |
| emplaceWithThrowingConstructor | |||
| ) |
Definition at line 182 of file TryTest.cpp.
References folly::Try< T >::emplace(), EXPECT_FALSE, EXPECT_THROW, EXPECT_TRUE, folly::Try< T >::hasException(), folly::Try< T >::hasValue(), folly::in_place(), and folly::pushmi::detail::t.
| TEST | ( | Try | , |
| tryEmplace | |||
| ) |
Definition at line 214 of file TryTest.cpp.
References a, EXPECT_EQ, EXPECT_TRUE, folly::Try< T >::hasValue(), folly::pushmi::detail::t, folly::tryEmplace(), and folly::Try< T >::value().
| TEST | ( | Try | , |
| tryEmplaceWithThrowingConstructor | |||
| ) |
Definition at line 222 of file TryTest.cpp.
References EXPECT_EQ, EXPECT_NE, EXPECT_TRUE, folly::Try< T >::hasException(), folly::Try< T >::hasValue(), folly::pushmi::__adl::noexcept(), folly::pushmi::detail::t, folly::tryEmplace(), and folly::Try< T >::tryGetExceptionObject().
| TEST | ( | Try | , |
| emplaceVoidTry | |||
| ) |
Definition at line 261 of file TryTest.cpp.
References folly::Try< void >::emplace(), folly::Try< void >::emplaceException(), EXPECT_FALSE, EXPECT_TRUE, folly::Try< void >::hasException(), folly::Try< void >::hasValue(), and folly::pushmi::detail::t.
| TEST | ( | Try | , |
| tryEmplaceVoidTry | |||
| ) |
Definition at line 275 of file TryTest.cpp.
References folly::Try< void >::emplace(), folly::Try< void >::emplaceException(), EXPECT_FALSE, EXPECT_TRUE, folly::Try< void >::hasException(), folly::Try< void >::hasValue(), folly::pushmi::detail::t, and folly::tryEmplace().
| TEST | ( | Try | , |
| tryEmplaceWith | |||
| ) |
Definition at line 289 of file TryTest.cpp.
References EXPECT_EQ, folly::pushmi::detail::t, folly::tryEmplaceWith(), and folly::Try< T >::value().
| TEST | ( | Try | , |
| tryEmplaceWithFunctionThrows | |||
| ) |
Definition at line 295 of file TryTest.cpp.
References EXPECT_TRUE, folly::Try< T >::hasException(), folly::pushmi::detail::t, and folly::tryEmplaceWith().
| TEST | ( | Try | , |
| tryEmplaceWithConstructorThrows | |||
| ) |
Definition at line 303 of file TryTest.cpp.
References EXPECT_TRUE, folly::Try< T >::hasException(), folly::Try< T >::hasValue(), folly::pushmi::__adl::noexcept(), folly::pushmi::detail::t, and folly::tryEmplaceWith().
| TEST | ( | Try | , |
| tryEmplaceWithVoidTry | |||
| ) |
Definition at line 322 of file TryTest.cpp.
References EXPECT_TRUE, folly::Try< void >::hasException(), folly::Try< void >::hasValue(), folly::pushmi::detail::t, and folly::tryEmplaceWith().
| TEST | ( | Try | , |
| nothrow | |||
| ) |
Definition at line 335 of file TryTest.cpp.
References EXPECT_FALSE, EXPECT_TRUE, folly::T, and folly::value().
| TEST | ( | Try | , |
| MoveDereference | |||
| ) |
Definition at line 375 of file TryTest.cpp.
References EXPECT_EQ, folly::gen::move, ptr, and folly::pushmi::detail::t.
| TEST | ( | Try | , |
| MoveConstRvalue | |||
| ) |
Definition at line 382 of file TryTest.cpp.
References folly::in_place(), folly::gen::move, folly::pushmi::detail::t, val, and folly::value().
| TEST | ( | Try | , |
| ValueOverloads | |||
| ) |
Definition at line 398 of file TryTest.cpp.
References folly::as_const(), CR, EXPECT_EQ, EXPECT_THROW, EXPECT_TRUE, folly::gen::move, value, and folly::value().
| TEST | ( | Try | , |
| copy | |||
| ) |
Definition at line 434 of file TryTest.cpp.
References folly::pushmi::detail::t.
| TEST | ( | Try | , |
| moveOnly | |||
| ) |
Definition at line 440 of file TryTest.cpp.
References folly::pushmi::detail::t, and v.
| TEST | ( | Try | , |
| makeTryWith | |||
| ) |
Definition at line 446 of file TryTest.cpp.
References EXPECT_EQ, EXPECT_TRUE, and folly::makeTryWith().
| TEST | ( | Try | , |
| makeTryWithThrow | |||
| ) |
Definition at line 454 of file TryTest.cpp.
References EXPECT_TRUE, and folly::makeTryWith().
| TEST | ( | Try | , |
| makeTryWithVoid | |||
| ) |
Definition at line 463 of file TryTest.cpp.
References EXPECT_TRUE, and folly::makeTryWith().
| TEST | ( | Try | , |
| makeTryWithVoidThrow | |||
| ) |
Definition at line 470 of file TryTest.cpp.
References EXPECT_TRUE, and folly::makeTryWith().
| TEST | ( | Try | , |
| exception | |||
| ) |
Definition at line 477 of file TryTest.cpp.
References folly::as_const(), CR, EXPECT_EQ, EXPECT_THROW, EXPECT_TRUE, folly::gen::move, and value.
| TEST | ( | Try | , |
| tryGetExceptionObject | |||
| ) |
Definition at line 551 of file TryTest.cpp.
References EXPECT_EQ, and folly::pushmi::detail::t.
| TEST | ( | Try | , |
| withException | |||
| ) |
Definition at line 643 of file TryTest.cpp.
References EXPECT_FALSE, EXPECT_TRUE, and folly::pushmi::detail::t.
| TEST | ( | Try | , |
| TestUnwrapTuple | |||
| ) |
Definition at line 711 of file TryTest.cpp.
References folly::as_const(), folly::copy(), EXPECT_EQ, std::tr1::make_tuple(), and folly::unwrapTryTuple().
| TEST | ( | Try | , |
| TestUnwrapPair | |||
| ) |
Definition at line 718 of file TryTest.cpp.
References folly::as_const(), folly::copy(), EXPECT_EQ, and folly::unwrapTryTuple().
| TEST | ( | Try | , |
| TestUnwrapForward | |||
| ) |
Definition at line 725 of file TryTest.cpp.
References EXPECT_EQ, std::tr1::make_tuple(), folly::gen::move, and folly::unwrapTryTuple().