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

Public Member Functions

void SetUp () override
 
void TearDown () override
 
- Public Member Functions inherited from testing::Test
virtual ~Test ()
 
virtual ~Test ()
 
virtual ~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 ()
 
 Test ()
 
 Test ()
 

Protected Attributes

std::unique_ptr< ZlibCertificateCompressorcompressor_
 
std::unique_ptr< ZlibCertificateDecompressordecompressor_
 

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
 
- 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 186 of file ZlibCertificateCompressorTest.cpp.

Member Function Documentation

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

Definition at line 198 of file ZlibCertificateCompressorTest.cpp.

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

198  {
199  auto data = unhexlify(hex);
200  auto buf = IOBuf::copyBuffer(data.data(), data.size());
201  return decode<T>(std::move(buf));
202  }
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::ZlibCertificateCompressorTest::encodeHex ( T &&  msg)
inlineprotected

Definition at line 205 of file ZlibCertificateCompressorTest.cpp.

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

205  {
206  auto buf = encode(std::forward<T>(msg));
207  auto str = buf->moveToFbString().toStdString();
208  return hexlify(str);
209  }
Buf encode(TokenBindingMessage &&message)
Definition: Types.cpp:124
bool hexlify(const InputString &input, OutputString &output, bool append_output)
Definition: String-inl.h:596
void fizz::test::ZlibCertificateCompressorTest::SetUp ( )
inlineoverridevirtual

Reimplemented from testing::Test.

Definition at line 188 of file ZlibCertificateCompressorTest.cpp.

188  {
189  OpenSSL_add_all_algorithms();
190  compressor_ = std::make_unique<ZlibCertificateCompressor>(9);
191  decompressor_ = std::make_unique<ZlibCertificateDecompressor>();
192  }
std::unique_ptr< ZlibCertificateDecompressor > decompressor_
std::unique_ptr< ZlibCertificateCompressor > compressor_
void fizz::test::ZlibCertificateCompressorTest::TearDown ( )
inlineoverridevirtual

Reimplemented from testing::Test.

Definition at line 194 of file ZlibCertificateCompressorTest.cpp.

194 {}

Member Data Documentation

std::unique_ptr<ZlibCertificateCompressor> fizz::test::ZlibCertificateCompressorTest::compressor_
protected

Definition at line 210 of file ZlibCertificateCompressorTest.cpp.

std::unique_ptr<ZlibCertificateDecompressor> fizz::test::ZlibCertificateCompressorTest::decompressor_
protected

Definition at line 211 of file ZlibCertificateCompressorTest.cpp.


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