summaryrefslogtreecommitdiff
path: root/unittest/mytap/tap.h
diff options
context:
space:
mode:
Diffstat (limited to 'unittest/mytap/tap.h')
-rw-r--r--unittest/mytap/tap.h37
1 files changed, 23 insertions, 14 deletions
diff --git a/unittest/mytap/tap.h b/unittest/mytap/tap.h
index cc1d0926012..ca2aa54a7ba 100644
--- a/unittest/mytap/tap.h
+++ b/unittest/mytap/tap.h
@@ -23,16 +23,13 @@
#include "my_global.h"
-/*
- @defgroup MyTAP MySQL support for performing unit tests according to TAP.
-
-*/
-
#define NO_PLAN (0)
/**
Data about test plan.
+ @ingroup MyTAP_Internal
+
@internal We are using the "typedef struct X { ... } X" idiom to
create class/struct X both in C and C++.
*/
@@ -60,6 +57,14 @@ extern "C" {
#endif
/**
+ @defgroup MyTAP_API MyTAP API
+
+ MySQL support for performing unit tests according to TAP.
+
+ @{
+*/
+
+/**
Set number of tests that is planned to execute.
The function also accepts the predefined constant
@@ -93,11 +98,14 @@ void ok(int pass, char const *fmt, ...)
/**
Skip a determined number of tests.
- Function to print that <em>how_many</em> tests have been
- skipped. The reason is printed for each skipped test. Observe
- that this function does not do the actual skipping for you, it just
- prints information that tests have been skipped. It shall be used
- in the following manner:
+ Function to print that <em>how_many</em> tests have been skipped.
+ The reason is printed for each skipped test. Observe that this
+ function does not do the actual skipping for you, it just prints
+ information that tests have been skipped. This function is not
+ usually used, but rather the macro @c SKIP_BLOCK_IF, which does the
+ skipping for you.
+
+ It shall be used in the following manner:
@code
if (ducks == 0) {
@@ -130,10 +138,9 @@ void skip(int how_many, char const *reason, ...)
for (i = 0 ; i < 2 ; ++i)
ok(duck[i] == paddling, "is duck %d paddling?", i);
}
+ @endcode
@see skip
-
- @endcode
*/
#define SKIP_BLOCK_IF(SKIP_IF_TRUE, COUNT, REASON) \
if (SKIP_IF_TRUE) skip((COUNT),(REASON)); else
@@ -158,8 +165,8 @@ void diag(char const *fmt, ...)
return exit_status();
@endcode
- @returns EXIT_SUCCESS if all tests passed, EXIT_FAILURE if one or
- more tests failed.
+ @returns @c EXIT_SUCCESS if all tests passed, @c EXIT_FAILURE if
+ one or more tests failed.
*/
int exit_status(void);
@@ -202,6 +209,8 @@ void todo_start(char const *message, ...)
*/
void todo_end();
+/** @} */
+
#ifdef __cplusplus
}
#endif