GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > QMEM / V0-2-0
Constituent: qmem_unit_test     Tag: linux-gcc
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "QMEM/QMEM.h"
#include "qmem_unit_test.h"
Include dependency graph for qmem_unit_test.c:
Functions | |
static void | show_banner (const char *desc_1, const char *desc_2) |
Display a message as a banner. | |
static void | show_at_level (const int level, const char *item_1, const char *item_2) |
Display text with indentation. | |
void | test_Push_State (test_Test_Descriptor *td_p, const char *desc, const int index) |
Enter a new test state. | |
void | test_Pop_State (test_Test_Descriptor *td_p) |
Return for a test state. | |
static void | show_desc_stack (const test_Test_Descriptor *td_p) |
Display the current state description stack. | |
static void | show_status_name (const QMEM_Status status) |
Display the name for a QMEM_Status value. | |
void | test_Show (const test_Test_Descriptor *td_p, const int level, const char *item_1, const char *item_2) |
Display text with indentation. | |
int | test_Generic_Error (const test_Test_Descriptor *td_p, const char *fmt, const char *str_param, const unsigned int int_param) |
Display a generic error message. | |
void | test_Show_Context (const test_Test_Descriptor *td_p, const Context *exp_p, const Context *act_p) |
Display QMEM parsing context. | |
int | test_Context_Compare (const test_Test_Descriptor *td_p, const Context *exp_p, const Context *act_p, const char *desc) |
Verify parsing context information. | |
int | test_Memory_Compare (const test_Test_Descriptor *td_p, const void *expect_p, const void *actual_p, const void *mask_p, const unsigned int num_bytes) |
Verify the contents of a buffer in memory. | |
int | test_NULL_Compare (const test_Test_Descriptor *td_p, const unsigned int actual, const char *desc) |
Check a 32-bit value to make sure it is not NULL. | |
int | test_Status_Compare (const test_Test_Descriptor *td_p, const QMEM_Status expect, const QMEM_Status actual, const char *func) |
Check a QMEM_Status value. | |
int | test_Value32_Compare (const test_Test_Descriptor *td_p, const unsigned int expect, const unsigned int actual, const char *desc) |
Check a 32-bit value. | |
void | test_Show_Item (const test_Test_Descriptor *td_p, const char *name, const char *fmt, const char *str_param, const unsigned int int_param) |
Display an item of data. | |
int | qmem_unit_test (void) |
The unit test entry point. | |
int | main (void) |
The application entry point for the host version of the test. | |
Variables | |
test_Test_Descriptor | QMEM_td |
Descriptor for the QMEM unit test. |
** CVS $Id: qmem_unit_test.c,v 1.1.1.1 2005/12/13 21:46:07 dmay Exp $ **
|
The application entry point for the host version of the test.
|
|
The unit test entry point. Configures the test environment, runs the various subtests, collects the status values, and displays the results.
|
|
Display text with indentation. Display text with indentation appropriate for the specified test state level.
|
|
Display a message as a banner.
|
|
Display the current state description stack. Display all the state descriptions on the test's state stack.
|
|
Display the name for a QMEM_Status value.
|
|
Verify parsing context information.
|
|
Display a generic error message.
|
|
Verify the contents of a buffer in memory. This function verifies the contents of a memory buffer and reports an error if the values are not as expected. An optional mask can be used to indicate which bits should be verified.
|
|
Check a 32-bit value to make sure it is not NULL.
|
|
Return for a test state. Pop a test state description from a test's state stack.
|
|
Enter a new test state. Push a new test state description onto a test's state stack. This state stack provides a trace of the execution of the test.
|
|
Display text with indentation. Display text with indentation appropriate for the specified level.
|
|
Display QMEM parsing context.
|
|
Display an item of data. This function displays an item of data in a predefined format.
|
|
Check a QMEM_Status value. Compare actual and expected QMEM_Status values and display a message if they differ.
|
|
Check a 32-bit value. Compare actual and expected 32-bit values and display a message if they differ.
|