OpenVPN
Functions | Variables
key_value_test.c File Reference
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <string.h>
#include <cmocka.h>
#include "key_value.h"
Include dependency graph for key_value_test.c:

Go to the source code of this file.

Functions

static int create_key_values (void **state)
 
static int destroy_key_values (void **state)
 
static void test_find_item_by_value (void **state)
 
static void test_sort_items_by_key (void **state)
 
int main (void)
 

Variables

static KeyValue key_values []
 

Function Documentation

◆ create_key_values()

static int create_key_values ( void **  state)
static

Definition at line 31 of file key_value_test.c.

References set_key_values(), and test_malloc.

Referenced by main().

◆ destroy_key_values()

static int destroy_key_values ( void **  state)
static

Definition at line 40 of file key_value_test.c.

References set_key_values(), and test_free.

Referenced by main().

◆ main()

int main ( void  )

◆ test_find_item_by_value()

static void test_find_item_by_value ( void **  state)
static

◆ test_sort_items_by_key()

static void test_sort_items_by_key ( void **  state)
static

Definition at line 60 of file key_value_test.c.

References assert_true, key_values, and sort_items_by_key().

Referenced by main().

Variable Documentation

◆ key_values

KeyValue key_values[]
static
Initial value:
= {
{ 10, "this" },
{ 52, "test" },
{ 20, "a" },
{ 13, "is" },
}

Definition at line 24 of file key_value_test.c.

Referenced by test_find_item_by_value(), and test_sort_items_by_key().