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.h27
1 files changed, 23 insertions, 4 deletions
diff --git a/unittest/mytap/tap.h b/unittest/mytap/tap.h
index cc1d0926012..5e24c1c8c99 100644
--- a/unittest/mytap/tap.h
+++ b/unittest/mytap/tap.h
@@ -21,8 +21,6 @@
#ifndef TAP_H
#define TAP_H
-#include "my_global.h"
-
/*
@defgroup MyTAP MySQL support for performing unit tests according to TAP.
@@ -67,6 +65,10 @@ extern "C" {
it was called with <code>NO_PLAN</code>, i.e., the test plan will
be printed after all the test lines.
+ The plan() function will install signal handlers for all signals
+ that generate a core, so if you want to override these signals, do
+ it <em>after</em> you have called the plan() function.
+
@param count The planned number of tests to run.
*/
void plan(int count);
@@ -130,10 +132,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
@@ -147,6 +148,24 @@ void diag(char const *fmt, ...)
__attribute__((format(printf,1,2)));
/**
+ Print a bail out message.
+
+ A bail out message can be issued when no further testing can be
+ done, e.g., when there are missing dependencies.
+
+ The test will exit with status 255. This function does not return.
+
+ @note A bail out message is printed if a signal that generates a
+ core is raised.
+
+ @param fmt Bail out message in printf() format.
+*/
+
+void BAIL_OUT(char const *fmt, ...)
+ __attribute__((noreturn, format(printf,1,2)));
+
+
+/**
Print summary report and return exit status.
This function will print a summary report of how many tests passed,