Classes | Typedefs | Functions | Variables
stack_test.cc File Reference
#include <openssl/stack.h>
#include <limits.h>
#include <algorithm>
#include <memory>
#include <utility>
#include <vector>
#include <gtest/gtest.h>
#include <openssl/mem.h>
Include dependency graph for stack_test.cc:

Go to the source code of this file.

Classes

struct  ShallowStackDeleter
 

Typedefs

using ShallowStack = std::unique_ptr< STACK_OF(TEST_INT), ShallowStackDeleter >
 
using TEST_INT = int
 

Functions

static int compare (const TEST_INT **a, const TEST_INT **b)
 
static int compare_reverse (const TEST_INT **a, const TEST_INT **b)
 
static void ExpectStackEquals (const STACK_OF(TEST_INT) *sk, const std::vector< int > &vec)
 
 TEST (StackTest, Basic)
 
 TEST (StackTest, BigStack)
 
 TEST (StackTest, BinarySearch)
 
 TEST (StackTest, FindFirst)
 
 TEST (StackTest, Sorted)
 
static void TEST_INT_free (TEST_INT *x)
 
BSSL_NAMESPACE_BEGIN static BSSL_NAMESPACE_END bssl::UniquePtr< TEST_INTTEST_INT_new (int x)
 

Variables

static uint64_t g_compare_count = 0
 
static const int kNull = INT_MIN
 

Typedef Documentation

◆ ShallowStack

using ShallowStack = std::unique_ptr<STACK_OF(TEST_INT), ShallowStackDeleter>

Definition at line 54 of file stack_test.cc.

◆ TEST_INT

using TEST_INT = int

Definition at line 30 of file stack_test.cc.

Function Documentation

◆ compare()

static int compare ( const TEST_INT **  a,
const TEST_INT **  b 
)
static

Definition at line 214 of file stack_test.cc.

◆ compare_reverse()

static int compare_reverse ( const TEST_INT **  a,
const TEST_INT **  b 
)
static

Definition at line 225 of file stack_test.cc.

◆ ExpectStackEquals()

static void ExpectStackEquals ( const STACK_OF(TEST_INT) *  sk,
const std::vector< int > &  vec 
)
static

Definition at line 60 of file stack_test.cc.

◆ TEST() [1/5]

TEST ( StackTest  ,
Basic   
)

Definition at line 81 of file stack_test.cc.

◆ TEST() [2/5]

TEST ( StackTest  ,
BigStack   
)

Definition at line 197 of file stack_test.cc.

◆ TEST() [3/5]

TEST ( StackTest  ,
BinarySearch   
)

Definition at line 354 of file stack_test.cc.

◆ TEST() [4/5]

TEST ( StackTest  ,
FindFirst   
)

Definition at line 316 of file stack_test.cc.

◆ TEST() [5/5]

TEST ( StackTest  ,
Sorted   
)

Definition at line 229 of file stack_test.cc.

◆ TEST_INT_free()

static void TEST_INT_free ( TEST_INT x)
static

Definition at line 32 of file stack_test.cc.

◆ TEST_INT_new()

BSSL_NAMESPACE_BEGIN static BSSL_NAMESPACE_END bssl::UniquePtr<TEST_INT> TEST_INT_new ( int  x)
static

Definition at line 38 of file stack_test.cc.

Variable Documentation

◆ g_compare_count

uint64_t g_compare_count = 0
static

Definition at line 212 of file stack_test.cc.

◆ kNull

const int kNull = INT_MIN
static

Definition at line 58 of file stack_test.cc.



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