OpenVPN
Functions
test_ordering.c File Reference
#include "config.h"
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <cmocka.h>
#include <cmocka_private.h>
Include dependency graph for test_ordering.c:

Go to the source code of this file.

Functions

static void mock_test_a_called (void)
 
static void mock_test_b_called (void)
 
static void mock_test_c_called (void)
 
static void test_does_succeed_for_expected (void **state)
 
static void test_does_succeed_for_multiple_calls (void **state)
 
static void test_ordering_does_ignore_calls (void **state)
 
static void test_ordering_does_ignore_no_calls (void **state)
 
static void test_ordering_does_expect_at_least_one_call (void **state)
 
static void test_ordering_does_work_across_different_functions (void **state)
 
static void test_ordering_ignores_out_of_order_properly (void **state)
 
int main (void)
 

Function Documentation

◆ main()

int main ( void  )

◆ mock_test_a_called()

static void mock_test_a_called ( void  )
static

◆ mock_test_b_called()

static void mock_test_b_called ( void  )
static

◆ mock_test_c_called()

static void mock_test_c_called ( void  )
static

Definition at line 19 of file test_ordering.c.

References function_called.

Referenced by test_ordering_ignores_out_of_order_properly().

◆ test_does_succeed_for_expected()

static void test_does_succeed_for_expected ( void **  state)
static

Definition at line 25 of file test_ordering.c.

References expect_function_call, and mock_test_a_called().

Referenced by main().

◆ test_does_succeed_for_multiple_calls()

static void test_does_succeed_for_multiple_calls ( void **  state)
static

Definition at line 35 of file test_ordering.c.

References expect_function_call, expect_function_calls, and mock_test_a_called().

Referenced by main().

◆ test_ordering_does_expect_at_least_one_call()

static void test_ordering_does_expect_at_least_one_call ( void **  state)
static

Definition at line 65 of file test_ordering.c.

References expect_function_call_any, and mock_test_a_called().

Referenced by main().

◆ test_ordering_does_ignore_calls()

static void test_ordering_does_ignore_calls ( void **  state)
static

Definition at line 48 of file test_ordering.c.

References ignore_function_calls, and mock_test_a_called().

Referenced by main().

◆ test_ordering_does_ignore_no_calls()

static void test_ordering_does_ignore_no_calls ( void **  state)
static

Definition at line 59 of file test_ordering.c.

References ignore_function_calls, and mock_test_a_called().

Referenced by main().

◆ test_ordering_does_work_across_different_functions()

static void test_ordering_does_work_across_different_functions ( void **  state)
static

Definition at line 75 of file test_ordering.c.

References expect_function_call, mock_test_a_called(), and mock_test_b_called().

Referenced by main().

◆ test_ordering_ignores_out_of_order_properly()

static void test_ordering_ignores_out_of_order_properly ( void **  state)
static