|
proxygen
|
#include <stdexcept>#include <folly/Conv.h>#include <folly/ExceptionWrapper.h>#include <folly/portability/GTest.h>Go to the source code of this file.
Classes | |
| class | AbstractIntException |
| class | IntException |
Functions | |
| template<typename T > | |
| T & | from_eptr (std::exception_ptr &eptr) |
| TEST (ExceptionWrapper, nothrow) | |
| TEST (ExceptionWrapper, throw_test) | |
| TEST (ExceptionWrapper, throw_with_nested) | |
| TEST (ExceptionWrapper, members) | |
| TEST (ExceptionWrapper, try_and_catch_test) | |
| TEST (ExceptionWrapper, with_exception_test) | |
| TEST (ExceptionWrapper, get_or_make_exception_ptr_test) | |
| TEST (ExceptionWrapper, from_exception_ptr_empty) | |
| TEST (ExceptionWrapper, from_exception_ptr_exn) | |
| TEST (ExceptionWrapper, from_exception_ptr_any) | |
| TEST (ExceptionWrapper, with_exception_ptr_empty) | |
| TEST (ExceptionWrapper, with_shared_ptr_test) | |
| TEST (ExceptionWrapper, with_exception_ptr_exn_test) | |
| TEST (ExceptionWrapper, with_exception_ptr_any_test) | |
| TEST (ExceptionWrapper, with_non_std_exception_test) | |
| TEST (ExceptionWrapper, with_exception_ptr_any_nil_test) | |
| TEST (ExceptionWrapper, with_exception_deduction) | |
| TEST (ExceptionWrapper, with_exception_deduction_exn_const) | |
| TEST (ExceptionWrapper, with_exception_deduction_wrap_const_exn_const) | |
| TEST (ExceptionWrapper, with_exception_deduction_returning) | |
| TEST (ExceptionWrapper, with_exception_deduction_functor_lvalue) | |
| TEST (ExceptionWrapper, non_std_exception_test) | |
| TEST (ExceptionWrapper, exceptionStr) | |
| TEST (ExceptionWrapper, throwException_noException) | |
| TEST (ExceptionWrapper, implicitConstruction) | |
| TEST (ExceptionWrapper, base_derived_non_std_exception_test) | |
| TEST (ExceptionWrapper, handle_std_exception) | |
| TEST (ExceptionWrapper, handle_std_exception_unhandled) | |
| TEST (ExceptionWrapper, handle_std_exception_propagated) | |
| TEST (ExceptionWrapper, handle_non_std_exception_small) | |
| TEST (ExceptionWrapper, handle_non_std_exception_big) | |
| TEST (ExceptionWrapper, handle_non_std_exception_rethrow_base_derived) | |
| TEST (ExceptionWrapper, self_swap_test) | |
Variables | |
| static const std::string | kExceptionClassName |
| static const std::string | kRuntimeErrorClassName |
| static const std::string | kIntExceptionClassName |
| static const std::string | kIntClassName = demangle(typeid(int)).toStdString() |
| T& from_eptr | ( | std::exception_ptr & | eptr | ) |
Definition at line 55 of file ExceptionWrapperTest.cpp.
References folly::T.
| TEST | ( | ExceptionWrapper | , |
| nothrow | |||
| ) |
| TEST | ( | ExceptionWrapper | , |
| throw_test | |||
| ) |
| TEST | ( | ExceptionWrapper | , |
| throw_with_nested | |||
| ) |
| TEST | ( | ExceptionWrapper | , |
| members | |||
| ) |
Definition at line 107 of file ExceptionWrapperTest.cpp.
References EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, and kRuntimeErrorClassName.
| TEST | ( | ExceptionWrapper | , |
| try_and_catch_test | |||
| ) |
Definition at line 118 of file ExceptionWrapperTest.cpp.
References folly::exception_wrapper::class_name(), EXPECT_EQ, EXPECT_FALSE, EXPECT_THROW, EXPECT_TRUE, folly::exception_wrapper::is_compatible_with(), kExceptionClassName, kRuntimeErrorClassName, string, and folly::exception_wrapper::what().
| TEST | ( | ExceptionWrapper | , |
| with_exception_test | |||
| ) |
Definition at line 155 of file ExceptionWrapperTest.cpp.
References folly::exception_wrapper::class_name(), EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, AbstractIntException::getInt(), ie, kIntExceptionClassName, folly::exception_wrapper::what(), and folly::exception_wrapper::with_exception().
| TEST | ( | ExceptionWrapper | , |
| get_or_make_exception_ptr_test | |||
| ) |
Definition at line 202 of file ExceptionWrapperTest.cpp.
References EXPECT_FALSE, EXPECT_THROW, and folly::exception_wrapper::to_exception_ptr().
| TEST | ( | ExceptionWrapper | , |
| from_exception_ptr_empty | |||
| ) |
Definition at line 229 of file ExceptionWrapperTest.cpp.
References EXPECT_FALSE, and folly::exception_wrapper::from_exception_ptr().
| TEST | ( | ExceptionWrapper | , |
| from_exception_ptr_exn | |||
| ) |
Definition at line 235 of file ExceptionWrapperTest.cpp.
References EXPECT_EQ, EXPECT_TRUE, and folly::exception_wrapper::from_exception_ptr().
| TEST | ( | ExceptionWrapper | , |
| from_exception_ptr_any | |||
| ) |
Definition at line 243 of file ExceptionWrapperTest.cpp.
References EXPECT_EQ, EXPECT_TRUE, and folly::exception_wrapper::from_exception_ptr().
| TEST | ( | ExceptionWrapper | , |
| with_exception_ptr_empty | |||
| ) |
Definition at line 251 of file ExceptionWrapperTest.cpp.
References EXPECT_EQ, EXPECT_FALSE, and folly::exception_wrapper::none().
| TEST | ( | ExceptionWrapper | , |
| with_shared_ptr_test | |||
| ) |
Definition at line 268 of file ExceptionWrapperTest.cpp.
References EXPECT_EQ, EXPECT_FALSE, EXPECT_NE, EXPECT_STREQ, EXPECT_THROW, EXPECT_TRUE, folly::gen::move, and folly::exception_wrapper::none().
| TEST | ( | ExceptionWrapper | , |
| with_exception_ptr_exn_test | |||
| ) |
Definition at line 300 of file ExceptionWrapperTest.cpp.
References EXPECT_EQ, EXPECT_FALSE, EXPECT_NE, EXPECT_STREQ, EXPECT_THROW, EXPECT_TRUE, folly::gen::move, and folly::exception_wrapper::none().
| TEST | ( | ExceptionWrapper | , |
| with_exception_ptr_any_test | |||
| ) |
Definition at line 333 of file ExceptionWrapperTest.cpp.
References folly::demangle(), EXPECT_EQ, EXPECT_FALSE, EXPECT_NE, EXPECT_THROW, EXPECT_TRUE, and folly::gen::move.
| TEST | ( | ExceptionWrapper | , |
| with_non_std_exception_test | |||
| ) |
Definition at line 365 of file ExceptionWrapperTest.cpp.
References folly::demangle(), EXPECT_EQ, EXPECT_FALSE, EXPECT_NE, EXPECT_THROW, EXPECT_TRUE, folly::in_place(), and folly::gen::move.
| TEST | ( | ExceptionWrapper | , |
| with_exception_ptr_any_nil_test | |||
| ) |
Definition at line 398 of file ExceptionWrapperTest.cpp.
References EXPECT_EQ, EXPECT_FALSE, EXPECT_NE, EXPECT_THROW, EXPECT_TRUE, and folly::gen::move.
| TEST | ( | ExceptionWrapper | , |
| with_exception_deduction | |||
| ) |
| TEST | ( | ExceptionWrapper | , |
| with_exception_deduction_exn_const | |||
| ) |
| TEST | ( | ExceptionWrapper | , |
| with_exception_deduction_wrap_const_exn_const | |||
| ) |
| TEST | ( | ExceptionWrapper | , |
| with_exception_deduction_returning | |||
| ) |
Definition at line 449 of file ExceptionWrapperTest.cpp.
References EXPECT_FALSE, EXPECT_TRUE, and folly::T.
| TEST | ( | ExceptionWrapper | , |
| with_exception_deduction_functor_lvalue | |||
| ) |
| TEST | ( | ExceptionWrapper | , |
| non_std_exception_test | |||
| ) |
Definition at line 470 of file ExceptionWrapperTest.cpp.
References folly::exception_wrapper::class_name(), EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, i, folly::exception_wrapper::is_compatible_with(), kIntClassName, folly::exception_wrapper::throw_exception(), and folly::exception_wrapper::what().
| TEST | ( | ExceptionWrapper | , |
| exceptionStr | |||
| ) |
Definition at line 489 of file ExceptionWrapperTest.cpp.
References folly::exceptionStr(), and EXPECT_EQ.
| TEST | ( | ExceptionWrapper | , |
| throwException_noException | |||
| ) |
Definition at line 494 of file ExceptionWrapperTest.cpp.
References EXPECT_THROW, and folly::exception_wrapper::throw_exception().
| TEST | ( | ExceptionWrapper | , |
| implicitConstruction | |||
| ) |
Definition at line 506 of file ExceptionWrapperTest.cpp.
| TEST | ( | ExceptionWrapper | , |
| base_derived_non_std_exception_test | |||
| ) |
| TEST | ( | ExceptionWrapper | , |
| handle_std_exception | |||
| ) |
Definition at line 545 of file ExceptionWrapperTest.cpp.
References ADD_FAILURE, EXPECT_THROW, EXPECT_TRUE, and handled.
| TEST | ( | ExceptionWrapper | , |
| handle_std_exception_unhandled | |||
| ) |
Definition at line 627 of file ExceptionWrapperTest.cpp.
References ADD_FAILURE, EXPECT_TRUE, and handled.
| TEST | ( | ExceptionWrapper | , |
| handle_std_exception_propagated | |||
| ) |
Definition at line 647 of file ExceptionWrapperTest.cpp.
References ADD_FAILURE, folly::exception_wrapper::handle(), and SUCCEED.
| TEST | ( | ExceptionWrapper | , |
| handle_non_std_exception_small | |||
| ) |
Definition at line 678 of file ExceptionWrapperTest.cpp.
References ADD_FAILURE, EXPECT_TRUE, handled, and folly::in_place().
| TEST | ( | ExceptionWrapper | , |
| handle_non_std_exception_big | |||
| ) |
Definition at line 733 of file ExceptionWrapperTest.cpp.
References ADD_FAILURE, EXPECT_THROW, EXPECT_TRUE, handled, and folly::in_place().
| TEST | ( | ExceptionWrapper | , |
| handle_non_std_exception_rethrow_base_derived | |||
| ) |
Definition at line 792 of file ExceptionWrapperTest.cpp.
References EXPECT_THROW, EXPECT_TRUE, and handled.
| TEST | ( | ExceptionWrapper | , |
| self_swap_test | |||
| ) |
Definition at line 816 of file ExceptionWrapperTest.cpp.
References EXPECT_EQ, folly::gen::move, folly::swap(), and folly::exception_wrapper::what().
|
static |
Definition at line 46 of file ExceptionWrapperTest.cpp.
Referenced by TEST().
|
static |
Definition at line 52 of file ExceptionWrapperTest.cpp.
Referenced by TEST().
|
static |
Definition at line 50 of file ExceptionWrapperTest.cpp.
Referenced by TEST().
|
static |
Definition at line 48 of file ExceptionWrapperTest.cpp.
Referenced by TEST().