Classes | Macros | Functions | Variables
hpack_encoder_test.cc File Reference
#include "src/core/ext/transport/chttp2/transport/hpack_encoder.h"
#include <stdio.h>
#include <string.h>
#include <string>
#include "absl/strings/str_cat.h"
#include "absl/strings/str_format.h"
#include <grpc/grpc.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include "src/core/ext/transport/chttp2/transport/hpack_parser.h"
#include "src/core/lib/resource_quota/resource_quota.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/lib/slice/slice_string_helpers.h"
#include "test/core/util/parse_hexstring.h"
#include "test/core/util/slice_splitter.h"
#include "test/core/util/test_config.h"
Include dependency graph for hpack_encoder_test.cc:

Go to the source code of this file.

Classes

struct  verify_params
 

Macros

#define TEST(x)   run_test(x, #x)
 

Functions

static void CrashOnAppendError (absl::string_view, const grpc_core::Slice &)
 
int main (int argc, char **argv)
 
static void run_test (void(*test)(), const char *name)
 
static void test_basic_headers ()
 
static void test_continuation_headers ()
 
static void verify (const verify_params params, const char *expected, size_t nheaders,...)
 
static void verify_continuation_headers (const char *key, const char *value, bool is_eof)
 
static void verify_frames (grpc_slice_buffer &output, bool header_is_eof)
 

Variables

grpc_core::HPackCompressorg_compressor
 
int g_failure = 0
 
static auto * g_memory_allocator
 

Macro Definition Documentation

◆ TEST

#define TEST (   x)    run_test(x, #x)

Definition at line 42 of file hpack_encoder_test.cc.

Function Documentation

◆ CrashOnAppendError()

static void CrashOnAppendError ( absl::string_view  ,
const grpc_core::Slice  
)
static

Definition at line 152 of file hpack_encoder_test.cc.

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 259 of file hpack_encoder_test.cc.

◆ run_test()

static void run_test ( void(*)()  test,
const char *  name 
)
static

Definition at line 251 of file hpack_encoder_test.cc.

◆ test_basic_headers()

static void test_basic_headers ( )
static

Definition at line 208 of file hpack_encoder_test.cc.

◆ test_continuation_headers()

static void test_continuation_headers ( )
static

Definition at line 239 of file hpack_encoder_test.cc.

◆ verify()

static void verify ( const verify_params  params,
const char *  expected,
size_t  nheaders,
  ... 
)
static

Definition at line 158 of file hpack_encoder_test.cc.

◆ verify_continuation_headers()

static void verify_continuation_headers ( const char *  key,
const char *  value,
bool  is_eof 
)
static

Definition at line 218 of file hpack_encoder_test.cc.

◆ verify_frames()

static void verify_frames ( grpc_slice_buffer output,
bool  header_is_eof 
)
static

Definition at line 58 of file hpack_encoder_test.cc.

Variable Documentation

◆ g_compressor

Definition at line 48 of file hpack_encoder_test.cc.

◆ g_failure

int g_failure = 0

Definition at line 49 of file hpack_encoder_test.cc.

◆ g_memory_allocator

auto* g_memory_allocator
static
Initial value:
grpc_core::ResourceQuota::Default()->memory_quota()->CreateMemoryAllocator(
"test"))

Definition at line 44 of file hpack_encoder_test.cc.

grpc_event_engine::experimental::MemoryAllocator
Definition: memory_allocator.h:35
grpc_core::ResourceQuota::Default
static ResourceQuotaRefPtr Default()
Definition: resource_quota.cc:27


grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:19