Xmega Application Note


test_case Struct Reference
[Test Suite Framework]

A single test case. More...

#include <suite.h>

Data Fields

void(* cleanup )(const struct test_case *test)
 Clean up the environment after test has been run.
const char * name
 The name of this test.
void(* run )(const struct test_case *test)
 Run the test.
void(* setup )(const struct test_case *test)
 Set up the environment in which test is to be run.

Detailed Description

A single test case.

This structure represents a test case which tests one specific feature or behavior.

Definition at line 107 of file suite.h.


Field Documentation

void(* test_case::cleanup)(const struct test_case *test)

Clean up the environment after test has been run.

This may freeing any memory allocated by setup(), gracefully shutting down hardware, etc. If something goes wrong, this function may call test_fail(), normally with a negative status code.

Definition at line 126 of file suite.h.

Referenced by test_case_run().

const char* test_case::name

The name of this test.

Definition at line 128 of file suite.h.

Referenced by test_case_run(), and test_report_failure().

void(* test_case::run)(const struct test_case *test)

Run the test.

Definition at line 117 of file suite.h.

Referenced by test_case_run().

void(* test_case::setup)(const struct test_case *test)

Set up the environment in which test is to be run.

This may involve allocating memory, initializing hardware, etc. If something goes wrong, this function may call test_fail(), normally with a negative status code.

Definition at line 115 of file suite.h.

Referenced by test_case_run().

@DOC_TITLE@
Generated on Fri Oct 22 12:15:26 2010 for AVR1300 Using the Xmega ADC by doxygen 1.6.3