Macros | Functions | Variables
bin_decoder_test.cc File Reference
#include "src/core/ext/transport/chttp2/transport/bin_decoder.h"
#include <string.h>
#include <grpc/grpc.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include "src/core/ext/transport/chttp2/transport/bin_encoder.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/lib/slice/slice_string_helpers.h"
#include "test/core/util/test_config.h"
Include dependency graph for bin_decoder_test.cc:

Go to the source code of this file.

Macros

#define ENCODE_AND_DECODE(s)
 
#define EXPECT_DECODED_LENGTH(s, expected)   GPR_ASSERT((expected) == base64_infer_length((s)));
 
#define EXPECT_SLICE_EQ(expected, slice)
 

Functions

static grpc_slice base64_decode (const char *s)
 
static grpc_slice base64_decode_with_length (const char *s, size_t output_length)
 
static grpc_slice base64_encode (const char *s)
 
static size_t base64_infer_length (const char *s)
 
static void expect_slice_eq (grpc_slice expected, grpc_slice slice, const char *debug, int line)
 
int main (int argc, char **argv)
 

Variables

static int all_ok = 1
 

Macro Definition Documentation

◆ ENCODE_AND_DECODE

#define ENCODE_AND_DECODE (   s)
Value:

Definition at line 88 of file bin_decoder_test.cc.

◆ EXPECT_DECODED_LENGTH

#define EXPECT_DECODED_LENGTH (   s,
  expected 
)    GPR_ASSERT((expected) == base64_infer_length((s)));

Definition at line 80 of file bin_decoder_test.cc.

◆ EXPECT_SLICE_EQ

#define EXPECT_SLICE_EQ (   expected,
  slice 
)
Value:
grpc_slice_from_copied_buffer(expected, sizeof(expected) - 1), slice, \
#slice, __LINE__);

Definition at line 83 of file bin_decoder_test.cc.

Function Documentation

◆ base64_decode()

static grpc_slice base64_decode ( const char *  s)
static

Definition at line 58 of file bin_decoder_test.cc.

◆ base64_decode_with_length()

static grpc_slice base64_decode_with_length ( const char *  s,
size_t  output_length 
)
static

Definition at line 65 of file bin_decoder_test.cc.

◆ base64_encode()

static grpc_slice base64_encode ( const char *  s)
static

Definition at line 51 of file bin_decoder_test.cc.

◆ base64_infer_length()

static size_t base64_infer_length ( const char *  s)
static

Definition at line 73 of file bin_decoder_test.cc.

◆ expect_slice_eq()

static void expect_slice_eq ( grpc_slice  expected,
grpc_slice  slice,
const char *  debug,
int  line 
)
static

Definition at line 36 of file bin_decoder_test.cc.

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 92 of file bin_decoder_test.cc.

Variable Documentation

◆ all_ok

int all_ok = 1
static

Definition at line 34 of file bin_decoder_test.cc.

slice
grpc_slice slice
Definition: src/core/lib/surface/server.cc:467
grpc_slice_from_copied_buffer
GPRAPI grpc_slice grpc_slice_from_copied_buffer(const char *source, size_t len)
Definition: slice/slice.cc:170
base64_encode
static grpc_slice base64_encode(const char *s)
Definition: bin_decoder_test.cc:51
expect_slice_eq
static void expect_slice_eq(grpc_slice expected, grpc_slice slice, const char *debug, int line)
Definition: bin_decoder_test.cc:36
grpc_chttp2_base64_decode_with_length
grpc_slice grpc_chttp2_base64_decode_with_length(const grpc_slice &input, size_t output_length)
Definition: bin_decoder.cc:207
EXPECT_SLICE_EQ
#define EXPECT_SLICE_EQ(expected, slice)
Definition: bin_decoder_test.cc:83


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