ooc  1.3c
Object Oriented tollkit fo ANSI C
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
TestCaseVtable Struct Reference

TestCase virtual functions. More...

Data Fields

void(* before_class )(TestCase)
 Prepares the testcase. More...
 
void(* before )(TestCase)
 Prepares the test method. More...
 
void(* after )(TestCase)
 Finishes the test method. More...
 
void(* after_class )(TestCase)
 Finishes the testcase. More...
 

Detailed Description

TestCase virtual functions.

These virtual functions run before and after your test methods. You can override them as needed.
The execution order of the virtual functions are:

 For each instantiation of your test case:
 {
    Your testcase's parents' constructors
    Your testcase's constructor
    For each testcase_run( TestCase ):
    {
        Your test's parents' before_class() methods
        Your test's before_class() method
        For each test method in the test method table:
        {
            Your test's parents' before() methods
            Your test's  before() method
            Yor test method
            Your test's  after() method
            Your test's parents' after() methods
        }
        Your test's after_class() method
        Your test's parents' after_class() methods
    }
    Your testcase's destructor
    Your testcase's parents' destructors
 }

Virtual functions.

Field Documentation

void(* TestCaseVtable::after)(TestCase testcase)

Finishes the test method.

In this virtual function should the test method be finished.
Implement this function according to your needs: free, delete or release all resources that were aquired in before().
Runs after each test methods.

Parameters
Thetestcase.
void(* TestCaseVtable::after_class)(TestCase testcase)

Finishes the testcase.

In this virtual function should the testcase be finished.
Implement this function according to your needs: free, delete or release all resources that were aquired in before_class().
It runs only ones for each testcase_run() function call.

Parameters
Thetestcase.
void(* TestCaseVtable::before)(TestCase testcase)

Prepares the test method.

In this virtual function should the test method be prepared for execution.
Implement this function according to your needs.
Runs before each test methods.

Parameters
Thetestcase.
void(* TestCaseVtable::before_class)(TestCase testcase)

Prepares the testcase.

In this virtual function should the testcase be prepared for execution.
Implement this function according to your needs.
It runs only ones for each testcase_run() function call.

Parameters
Thetestcase.

The documentation for this struct was generated from the following files: