proxygen
test_functions.cpp File Reference

Go to the source code of this file.

Functions

void doNothing ()
 
std::exception_ptr returnExceptionPtr ()
 
void exceptionPtrReturnParam (std::exception_ptr *excReturn)
 
std::string returnString ()
 
std::string returnStringNoExcept () noexcept
 
int returnCode (int value)
 
int returnCodeNoExcept (int value) noexcept
 
void invoke (std::function< void()> f)
 
void invoke (folly::Function< void()> f)
 

Function Documentation

void doNothing ( )

Definition at line 26 of file test_functions.cpp.

Referenced by BENCHMARK().

26 {}
void exceptionPtrReturnParam ( std::exception_ptr *  excReturn)

Definition at line 33 of file test_functions.cpp.

Referenced by BENCHMARK().

33  {
34  if (excReturn) {
35  Exception ex("this is a test");
36  *excReturn = std::make_exception_ptr(ex);
37  }
38 }
void invoke ( std::function< void()>  f)

Definition at line 69 of file test_functions.cpp.

References f.

69  {
70  f();
71 }
auto f
void invoke ( folly::Function< void()>  f)

Definition at line 73 of file test_functions.cpp.

References f.

73  {
74  f();
75 }
auto f
int returnCode ( int  value)

Definition at line 48 of file test_functions.cpp.

References value.

Referenced by BENCHMARK(), and folly::SubprocessSpawnError::SubprocessSpawnError().

48  {
49  return value;
50 }
static const char *const value
Definition: Conv.cpp:50
int returnCodeNoExcept ( int  value)
noexcept

Definition at line 52 of file test_functions.cpp.

References value.

Referenced by BENCHMARK().

52  {
53  return value;
54 }
static const char *const value
Definition: Conv.cpp:50
std::exception_ptr returnExceptionPtr ( )

Definition at line 28 of file test_functions.cpp.

Referenced by BENCHMARK().

28  {
29  Exception ex("this is a test");
30  return std::make_exception_ptr(ex);
31 }
std::string returnString ( )

Definition at line 40 of file test_functions.cpp.

Referenced by BENCHMARK().

40  {
41  return "this is a test";
42 }
std::string returnStringNoExcept ( )
noexcept

Definition at line 44 of file test_functions.cpp.

Referenced by BENCHMARK().

44  {
45  return "this is a test";
46 }