Generated from ./rt/Source/testcase.h with ROBODoc v4.0.18 on Mon Jan 19 22:49:19 2004

Testcase/TestFunction

FUNCTION

   The type of the testfunction.  All testfunctions and teardown and
   setup functions should be functions that take no parameters and
   return nothing.

   This is a function pointer. See http://www.function-pointer.org/ for
   a nice tutorial on function pointers.

SOURCE

    typedef void (*TestFunction)(void);
    

Testcase/SetupFunction

FUNCTION

   The type of the setup function. See TestFunction.

SOURCE

    typedef void (*SetupFunction)(void);
    

Testcase/SetupFunction

FUNCTION

   The type of the teardown function. See TestFunction.

SOURCE

    typedef void (*TearDownFunction)(void);
    

Testcase/RBT_TestCase

FUNCTION

   Information about a testcase. Testcases are
   stored in a testsuite ( RBT_TestSuite ).
   A testcase consists of upto three functions:
   (1) a setup function, that sets up the environment (variables,
       files, etc) necessary to carry out a test.
   (2) a test function, this is the function that carries out the 
       actual test.
   (3) a teardown function, this releases any resources claimed in
       your setup function and/or testfunction.

ATTRIBUTES

   o next  -- pointer to the next testcase,
              this is used to store the testcases as
              a linked list in a RBT_TestSuite.
   o id    -- a unique ID for this testcase.
   o test_function
   o setup_function
   o teardown_function

SOURCE

    typedef struct RBT_TestCase
    {
        struct RBT_TestCase* next;
        char* id;
        TestFunction  test_function;
        SetupFunction setup_function;
        TestFunction  teardown_function;
    } RBT_TestCase;