proxygen
CoreTest.cpp File Reference

Go to the source code of this file.

Functions

 TEST (Core, size)
 

Function Documentation

TEST ( Core  ,
size   
)

Definition at line 23 of file CoreTest.cpp.

References callback_, EXPECT_GE, int8_t, and type.

23  {
24  static constexpr size_t lambdaBufSize = 8 * sizeof(void*);
25  struct Gold {
29  std::atomic<futures::detail::State> state_;
30  std::atomic<unsigned char> attached_;
31  std::atomic<bool> interruptHandlerSet_;
32  futures::detail::SpinLock interruptLock_;
33  int8_t priority_;
34  Executor* executor_;
35  std::shared_ptr<RequestContext> context_;
36  std::unique_ptr<exception_wrapper> interrupt_;
37  std::function<void(exception_wrapper const&)> interruptHandler_;
38  };
39  // If this number goes down, it's fine!
40  // If it goes up, please seek professional advice ;-)
41  EXPECT_GE(sizeof(Gold), sizeof(futures::detail::Core<Unit>));
42 }
SpinLock is and must stay a 1-byte object because of how Core is laid out.
Definition: Core.h:65
PskType type
#define EXPECT_GE(val1, val2)
Definition: gtest.h:1932
folly::Function< void()> callback_