GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> RIM / V3-1-2 > trim / rad750


Interface   Data Structures   File List   Data Fields   Globals  

test_rim.c File Reference

RIM unit tests. More...

#include <test_rim_p.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

Classes

struct  test
 Structure containing a name of a test a pointer to said test. More...

Defines

#define NUMBER_OF_TESTS   5
 The number of tests to run.

Typedefs

typedef unsigned(* pTest )(void *ptr)
 Pointer to a test function.

Functions

void setPtr (const char *name, void *ptr)
 Associate a pointer with a test.
int test_rim (const char *testname)
 Iterate over a set of unit tests.

Variables

static test t_list [NUMBER_OF_TESTS]


Detailed Description

RIM unit tests.

Author:
James Swain & Owen Saxton
$Id: test_rim.c,v 1.3 2011/03/27 06:43:06 saxton Exp $

Function Documentation

void setPtr ( const char *  name,
void *  ptr 
)

Associate a pointer with a test.

Parameters:
name Name of the test to associate the pointer with
ptr Pointer to associate with a test

References NUMBER_OF_TESTS, and test::ptr.

int test_rim ( const char *  testname  ) 

Iterate over a set of unit tests.

Parameters:
testname Name of the test to run ("ALL" runs all)
Returns:
Number of failed tests

References NUMBER_OF_TESTS.


Variable Documentation

test t_list[NUMBER_OF_TESTS] [static]

Initial value:

              {{"lrd",     t_lrd,     NULL},
               {"data",    t_data,    NULL},
               {"rim",     t_rim,     NULL},
               {"map",     t_map,     NULL},
           
               {"latp",    t_latp,    NULL}}


Generated on Wed Nov 21 19:29:14 2012 by  doxygen 1.5.8