|
|
|
|
|
Defines | |
| #define | XTESTS_CASE_BEGIN(name, desc) |
| Begins a test case, of the given name and description. | |
| #define | XTESTS_CASE_END(name) |
| Ends the current test case. | |
| #define | XTESTS_RUN_CASE_WITH_NAME_AND_DESC(name, desc, fn) |
| Runs the given test case function, specifying a name and description. | |
| #define | XTESTS_RUN_CASE_WITH_DESC(fn, desc) |
| Runs the given test case function, specifying a description. | |
| #define | XTESTS_RUN_CASE(fn) |
| Runs the given test case function. | |
| #define | XTESTS_RUN_CASE_THAT_THROWS_WITH_NAME_AND_DESC(name, desc, fn, type) |
| Runs the given test case function, specifying a name and description, and the type of an exception that is expected. | |
| #define | XTESTS_RUN_CASE_THAT_THROWS_WITH_DESC(fn, desc, type) |
| Runs the given test case function, specifying a description, and the type of an exception that is expected. | |
| #define | XTESTS_RUN_CASE_THAT_THROWS(fn, type) |
| Runs the given test case function, specifying the type of an exception that is expected. | |
| #define XTESTS_CASE_BEGIN | ( | name, | |||
| desc | ) |
Value:
\
(0 == XTESTS_NS_C_QUAL(xtests_beginTestCase)((name), (desc)))
| name | The name of the test case | |
| desc | The description of the test case. May be NULL or the empty string (""). |
| #define XTESTS_CASE_END | ( | name | ) |
Value:
\
stlsoft_static_cast(void, XTESTS_NS_C_QUAL(xtests_endTestCase)((name)))
| name | The name of the test case |
name parameter is ignored in the current implementation, which can only run one test case at a time. | #define XTESTS_RUN_CASE | ( | fn | ) |
Value:
\
XTESTS_RUN_CASE_WITH_DESC(fn, "")
| fn | A function, taking no parameters and returning void, that executes a number of tests representing a test case. |
| #define XTESTS_RUN_CASE_THAT_THROWS | ( | fn, | |||
| type | ) |
Value:
\
XTESTS_RUN_CASE_THAT_THROWS_WITH_NAME_AND_DESC(#fn, "", fn, type)
| fn | A function, taking no parameters and returning void, that executes a number of tests representing a test case. | |
| type | The type of the exception that is expected to be thrown |
| #define XTESTS_RUN_CASE_THAT_THROWS_WITH_DESC | ( | fn, | |||
| desc, | |||||
| type | ) |
Value:
\
XTESTS_RUN_CASE_THAT_THROWS_WITH_NAME_AND_DESC(#fn, desc, fn, type)
| fn | A function, taking no parameters and returning void, that executes a number of tests representing a test case. | |
| desc | Description of the test case | |
| type | The type of the exception that is expected to be thrown |
| #define XTESTS_RUN_CASE_THAT_THROWS_WITH_NAME_AND_DESC | ( | name, | |||
| desc, | |||||
| fn, | |||||
| type | ) |
Value:
\
do \
{ \
if(XTESTS_CASE_BEGIN(name, desc)) \
{ \
XTESTS_INVOKE_TEST_CASE_FN_THROWS_(fn, name, type); \
\
XTESTS_CASE_END(name); \
} \
\
} while(0)
| name | Name of the test case | |
| desc | Description of the test case | |
| fn | A function, taking no parameters and returning void, that executes a number of tests representing a test case. | |
| type | The type of the exception that is expected to be thrown |
| #define XTESTS_RUN_CASE_WITH_DESC | ( | fn, | |||
| desc | ) |
Value:
\
XTESTS_RUN_CASE_WITH_NAME_AND_DESC(#fn, desc, fn)
| fn | A function, taking no parameters and returning void, that executes a number of tests representing a test case. | |
| desc | Description of the test case |
| #define XTESTS_RUN_CASE_WITH_NAME_AND_DESC | ( | name, | |||
| desc, | |||||
| fn | ) |
Value:
\
do \
{ \
if(XTESTS_CASE_BEGIN(name, desc)) \
{ \
XTESTS_INVOKE_TEST_CASE_FN_(fn, name); \
\
XTESTS_CASE_END(name); \
} \
\
} while(0)
| name | Name of the test case | |
| desc | Description of the test case | |
| fn | A function, taking no parameters and returning void, that executes a number of tests representing a test case. |
|
|
|
| xTests Library documentation © Matthew Wilson and Synesis Software Pty Ltd, 1999-2009 |
|