MoonUnit
 All Data Structures Variables Enumerations Enumerator Groups Pages
Reflection

Macros and structures to inspect live unit tests. More...

Macros

#define MU_CURRENT_TEST
 Access current test. More...
 

Detailed Description

This module contains macros and structures that allow running unit tests to inspect their own attributes and environment

Macro Definition Documentation

#define MU_CURRENT_TEST

This macro expands to a pointer to the MuTest structure for the currently running test. This allows for reflective inspection of the current test's properties: name, suite name, etc.

Example:

MU_FIXTURE_SETUP(SuiteName)
{
// Access and print the name of the current test
MU_TRACE("Entering test '%s'\n", MU_CURRENT_TEST->test->name);
}