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

Go to the source code of this file.

Functions

int mock_function (void)
 
void mock_function_call_times (size_t times, int expectedValue)
 
static void test_will_return_maybe_for_no_calls (void **state)
 
static void test_will_return_maybe_for_one_mock_call (void **state)
 
static void test_will_return_maybe_for_more_than_one_call (void **state)
 
int main (int argc, char **argv)
 

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

◆ mock_function()

int mock_function ( void  )

◆ mock_function_call_times()

void mock_function_call_times ( size_t  times,
int  expectedValue 
)

◆ test_will_return_maybe_for_more_than_one_call()

static void test_will_return_maybe_for_more_than_one_call ( void **  state)
static

Definition at line 46 of file test_returns.c.

References mock_function(), mock_function_call_times(), and will_return_maybe.

Referenced by main().

◆ test_will_return_maybe_for_no_calls()

static void test_will_return_maybe_for_no_calls ( void **  state)
static

Definition at line 28 of file test_returns.c.

References mock_function(), and will_return_maybe.

Referenced by main().

◆ test_will_return_maybe_for_one_mock_call()

static void test_will_return_maybe_for_one_mock_call ( void **  state)
static

Definition at line 35 of file test_returns.c.

References mock_function(), mock_function_call_times(), and will_return_maybe.

Referenced by main().