cmocka  1.1.0
Modules | Typedefs | Functions
The CMocka API

These headers or their equivalents should be included prior to including this header file. More...

Collaboration diagram for The CMocka API:

Modules

 Mock Objects
 Mock objects mock objects are simulated objects that mimic the behavior of real objects.
 
 Checking Parameters
 Functionality to store expected values for mock function parameters.
 
 Assert Macros
 This is a set of useful assert macros like the standard C libary's assert(3) macro.
 
 Call Ordering
 It is often beneficial to make sure that functions are called in an order.
 
 Running Tests
 This is the way tests are executed with CMocka.
 
 Dynamic Memory Allocation
 Memory leaks, buffer overflows and underflows can be checked using cmocka.
 
 Standard Assertions
 How to handle assert(3) of the standard C library.
 

Typedefs

typedef uintmax_t LargestIntegralType
 Largest integral type. More...
 

Functions

void cmocka_set_message_output (enum cm_message_output output)
 Function to set the output format for a test. More...
 

Detailed Description

These headers or their equivalents should be included prior to including this header file.

#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>

This allows test applications to use custom definitions of C standard library functions and types.

Typedef Documentation

§ LargestIntegralType

typedef uintmax_t LargestIntegralType

Largest integral type.

This type should be large enough to hold any pointer or integer supported by the compiler.

Function Documentation

§ cmocka_set_message_output()

void cmocka_set_message_output ( enum cm_message_output  output)

Function to set the output format for a test.

The ouput format for the test can either be set globally using this function or overriden with environment variable CMOCKA_MESSAGE_OUTPUT.

The environment variable can be set to either STDOUT, SUBUNIT, TAP or XML.

Parameters
[in]outputThe output format to use for the test.