GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LATC / V9-1-2 > latc_test_embd / rad750


Interface   Data Structures   File List   Data Fields   Globals  

select.c File Reference

LATC unit tests. More...

#include "select_p.h"
#include "t_data_p.h"
#include "t_map_p.h"
#include "t_type_p.h"
#include "t_fi_p.h"
#include "t_addr_p.h"
#include "t_consume_p.h"
#include "msg_init_p.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "t_fo_p.h"
#include "t_create_p.h"

Classes

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

Defines

#define NUMBER_OF_TESTS   8
 The number of tests to run.

Typedefs

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

Functions

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

Variables

static test t_list [NUMBER_OF_TESTS]
 Static array of tests.


Detailed Description

LATC unit tests.

Author:
James Swain -- jswain@slac.stanford.edu

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 t_latc ( const char *  testname,
unsigned  verbose 
)

Iterate over a set of unit tests.

Parameters:
testname Name of the test to run ("ALL" runs all)
verbose Non-zero starts the MSG systems, 0 doesn't
Returns:
Number of failed tests

References _msg_init(), and NUMBER_OF_TESTS.


Variable Documentation

test t_list[NUMBER_OF_TESTS] [static]

Initial value:

 {
  {"Map",      t_map,      NULL},
  {"Type",     t_type,     NULL},
  {"Addr",     t_addr,     NULL},
  {"Data",     t_data,     NULL},
  {"Fo",       t_fo,       NULL},
  {"Fi",       t_fi,       NULL},
  {"Create",   t_create,   NULL},
  {"Consume",  t_consume,  NULL}
}
Static array of tests.


Generated on Fri Apr 1 22:26:54 2011 by  doxygen 1.5.8