Main Page | Modules | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

psTest.h File Reference


Detailed Description

Testing infrastructure functions.

Author:
Robert DeSonia, MHPCC
Version:
Revision
1.4
Name
rel7
Date:
Date
2005/06/17 00:10:55
Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii

Definition in file psTest.h.

#include <stdio.h>
#include "psType.h"

Include dependency graph for psTest.h:

Go to the source code of this file.

Defines

#define printPositiveTestHeader(filePtr, packageName, testPointName)   p_printPositiveTestHeader(filePtr, __FILE__, packageName, testPointName)
#define printNegativeTestHeader(filePtr, packageName, testPointName, expectedError, exitValue)   p_printNegativeTestHeader(filePtr, __FILE__, packageName, testPointName, expectedError, exitValue)
#define printFooter(filePtr, packageName, testPointName, success)   p_printFooter(filePtr, __FILE__, packageName, testPointName, success)
#define runTest(filePtr, packageName, testPointName, fcn, expectedReturn, useFork)   p_runTest(filePtr, __FILE__, packageName, testPointName, fcn, expectedReturn, useFork)
#define runTestSuite(filePtr, packageName, tests, argc, argv)   p_runTestSuite(filePtr, __FILE__, packageName, tests, argc, argv)

Typedefs

typedef psS32(* testFcn )(void)
 Specifies the format of a user-defined function for use with psTest functions.

Functions

psBool p_runTest (FILE *fp, const char *testPointFile, const char *packageName, const char *testPointName, testFcn fcn, psS32 expectedReturn, psBool useFork)
 Procedure used to run a test.
psBool p_runTestSuite (FILE *fp, const char *testPointFile, const char *packageName, testDescription tests[], psS32 argc, char *const argv[])
 Procedure used to run the test suite.
void p_printPositiveTestHeader (FILE *fp, const char *testPointFile, const char *packageName, const char *testPointName)
 Prints a positive test header to file.
void p_printNegativeTestHeader (FILE *fp, const char *testPointFile, const char *packageName, const char *testPointName, const char *expectedError, psS32 exitValue)
 Prints a negative test header to file.
void p_printFooter (FILE *fp, const char *testPointFile, const char *packageName, const char *testPointName, psBool success)
 Prints a footer to file.


Define Documentation

#define printFooter filePtr,
packageName,
testPointName,
success   )     p_printFooter(filePtr, __FILE__, packageName, testPointName, success)
 

Definition at line 28 of file psTest.h.

#define printNegativeTestHeader filePtr,
packageName,
testPointName,
expectedError,
exitValue   )     p_printNegativeTestHeader(filePtr, __FILE__, packageName, testPointName, expectedError, exitValue)
 

Definition at line 25 of file psTest.h.

#define printPositiveTestHeader filePtr,
packageName,
testPointName   )     p_printPositiveTestHeader(filePtr, __FILE__, packageName, testPointName)
 

Definition at line 22 of file psTest.h.

#define runTest filePtr,
packageName,
testPointName,
fcn,
expectedReturn,
useFork   )     p_runTest(filePtr, __FILE__, packageName, testPointName, fcn, expectedReturn, useFork)
 

Definition at line 45 of file psTest.h.

#define runTestSuite filePtr,
packageName,
tests,
argc,
argv   )     p_runTestSuite(filePtr, __FILE__, packageName, tests, argc, argv)
 

Definition at line 48 of file psTest.h.


Typedef Documentation

typedef psS32(* testFcn)(void)
 

Specifies the format of a user-defined function for use with psTest functions.

Definition at line 32 of file psTest.h.


Function Documentation

void p_printFooter FILE *  fp,
const char *  testPointFile,
const char *  packageName,
const char *  testPointName,
psBool  success
 

Prints a footer to file.

Parameters:
fp  File to which to print
testPointFile  Test point in file
packageName  Package name
testPointName  Test point name
success  True if successful

void p_printNegativeTestHeader FILE *  fp,
const char *  testPointFile,
const char *  packageName,
const char *  testPointName,
const char *  expectedError,
psS32  exitValue
 

Prints a negative test header to file.

Parameters:
fp  File to which to print
testPointFile  Test point in file
packageName  Package name
testPointName  Test point name
expectedError  Expected error
exitValue  Exit value

void p_printPositiveTestHeader FILE *  fp,
const char *  testPointFile,
const char *  packageName,
const char *  testPointName
 

Prints a positive test header to file.

Parameters:
fp  File to which to print
testPointFile  Test point in file
packageName  Package name
testPointName  Test point name

psBool p_runTest FILE *  fp,
const char *  testPointFile,
const char *  packageName,
const char *  testPointName,
testFcn  fcn,
psS32  expectedReturn,
psBool  useFork
 

Procedure used to run a test.

Returns:
psBool: True if successful.
Parameters:
fp  File to test
testPointFile  Test point in file
packageName  Package name
testPointName  Test point name
fcn  Function tested
expectedReturn  Expected return
useFork  Fork to use

psBool p_runTestSuite FILE *  fp,
const char *  testPointFile,
const char *  packageName,
testDescription  tests[],
psS32  argc,
char *const   argv[]
 

Procedure used to run the test suite.

Returns:
psBool: True if successful.
Parameters:
fp  File to test
testPointFile  Test point in file
packageName  Package name
tests  Description of tests
argc  Number of test arguments
argv  Test arguments


Generated on Wed Sep 14 10:43:31 2005 for Pan-STARRS Foundation Library by  doxygen 1.4.2