mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Documentation changes to MyTAP.
unittest/README.txt: Adding reference to generated documentation unittest/mytap/Doxyfile: Some configuration changes to make Doxygen generate better documentation. unittest/mytap/tap.c: Adding documentation and tags unittest/mytap/tap.h: Adding tags to provide document-internal references.
This commit is contained in:
@ -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++.
|
||||
*/
|
||||
@ -59,6 +56,14 @@ typedef struct TEST_DATA {
|
||||
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.
|
||||
|
||||
@ -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
|
||||
|
Reference in New Issue
Block a user