OpenVPN
Functions
test_returns_fail.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_fail.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_fails_for_no_calls (void **state)
 
static void test_will_return_count_fails_for_unreturned_items (void **state)
 
static void test_will_return_always_fails_for_no_calls (void **state)
 
static int teardown (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 
)

◆ teardown()

static int teardown ( void **  state)
static

Definition at line 60 of file test_returns_fail.c.

References free.

Referenced by main().

◆ test_will_return_always_fails_for_no_calls()

static void test_will_return_always_fails_for_no_calls ( void **  state)
static

Definition at line 49 of file test_returns_fail.c.

References mock_function(), and will_return_always.

Referenced by main().

◆ test_will_return_count_fails_for_unreturned_items()

static void test_will_return_count_fails_for_unreturned_items ( void **  state)
static

Definition at line 35 of file test_returns_fail.c.

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

Referenced by main().

◆ test_will_return_fails_for_no_calls()

static void test_will_return_fails_for_no_calls ( void **  state)
static

Definition at line 28 of file test_returns_fail.c.

References mock_function(), and will_return.

Referenced by main().