proxygen
fizz::test::HandshakeTypesTest Class Reference
Inheritance diagram for fizz::test::HandshakeTypesTest:
testing::Test

Protected Member Functions

template<class T >
T decodeHex (const std::string &hex)
 
template<class T >
std::string encodeHex (T &&msg)
 
- Protected Member Functions inherited from testing::Test
 Test ()
 
virtual void SetUp ()
 
virtual void TearDown ()
 
 Test ()
 
virtual void SetUp ()
 
virtual void TearDown ()
 
 Test ()
 
virtual void SetUp ()
 
virtual void TearDown ()
 

Additional Inherited Members

- Public Types inherited from testing::Test
typedef internal::SetUpTestCaseFunc SetUpTestCaseFunc
 
typedef internal::TearDownTestCaseFunc TearDownTestCaseFunc
 
typedef internal::SetUpTestCaseFunc SetUpTestCaseFunc
 
typedef internal::TearDownTestCaseFunc TearDownTestCaseFunc
 
typedef internal::SetUpTestCaseFunc SetUpTestCaseFunc
 
typedef internal::TearDownTestCaseFunc TearDownTestCaseFunc
 
- Public Member Functions inherited from testing::Test
virtual ~Test ()
 
virtual ~Test ()
 
virtual ~Test ()
 
- Static Public Member Functions inherited from testing::Test
static void SetUpTestCase ()
 
static void TearDownTestCase ()
 
static bool HasFatalFailure ()
 
static bool HasNonfatalFailure ()
 
static bool HasFailure ()
 
static void RecordProperty (const std::string &key, const std::string &value)
 
static void RecordProperty (const std::string &key, int value)
 
static void SetUpTestCase ()
 
static void TearDownTestCase ()
 
static bool HasFatalFailure ()
 
static bool HasNonfatalFailure ()
 
static bool HasFailure ()
 
static void RecordProperty (const std::string &key, const std::string &value)
 
static void RecordProperty (const std::string &key, int value)
 
static void SetUpTestCase ()
 
static void TearDownTestCase ()
 
static bool HasFatalFailure ()
 
static bool HasNonfatalFailure ()
 
static bool HasFailure ()
 
static void RecordProperty (const std::string &key, const std::string &value)
 
static void RecordProperty (const std::string &key, int value)
 

Detailed Description

Definition at line 89 of file HandshakeTypesTest.cpp.

Member Function Documentation

template<class T >
T fizz::test::HandshakeTypesTest::decodeHex ( const std::string hex)
inlineprotected

Definition at line 92 of file HandshakeTypesTest.cpp.

References folly::IOBuf::copyBuffer(), folly::data(), folly::gen::move, and folly::unhexlify().

92  {
93  auto data = unhexlify(hex);
94  auto buf = IOBuf::copyBuffer(data.data(), data.size());
95  return decode<T>(std::move(buf));
96  }
bool unhexlify(const InputString &input, OutputString &output)
Definition: String-inl.h:616
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
static std::unique_ptr< IOBuf > copyBuffer(const void *buf, std::size_t size, std::size_t headroom=0, std::size_t minTailroom=0)
Definition: IOBuf.h:1587
static constexpr uint64_t data[1]
Definition: Fingerprint.cpp:43
template<class T >
std::string fizz::test::HandshakeTypesTest::encodeHex ( T &&  msg)
inlineprotected

Definition at line 99 of file HandshakeTypesTest.cpp.

References encode(), and folly::hexlify().

99  {
100  auto buf = encode(std::forward<T>(msg));
101  auto str = buf->moveToFbString().toStdString();
102  return hexlify(str);
103  }
Buf encode(TokenBindingMessage &&message)
Definition: Types.cpp:124
bool hexlify(const InputString &input, OutputString &output, bool append_output)
Definition: String-inl.h:596

The documentation for this class was generated from the following file: