~jlukas79/+junk/mysql-server

« back to all changes in this revision

Viewing changes to unittest/mytap/tap.h

manual merge 6.0-main --> 6.0-bka-review

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
#endif
63
63
 
64
64
/**
 
65
   Defines whether "big" tests should be skipped.
 
66
 
 
67
   This variable is set by plan() function unless MYTAP_CONFIG environment
 
68
   variable is set to the string "big".  It is supposed to be used as
 
69
 
 
70
   @code
 
71
   if (skip_big_tests) {
 
72
     skip(1, "Big test skipped");
 
73
   } else {
 
74
     ok(life_universe_and_everything() == 42, "The answer is CORRECT");
 
75
   }
 
76
   @endcode
 
77
 
 
78
   @see SKIP_BIG_TESTS
 
79
*/
 
80
extern int skip_big_tests;
 
81
 
 
82
/**
65
83
  @defgroup MyTAP_API MyTAP API
66
84
 
67
85
  MySQL support for performing unit tests according to TAP.
81
99
   that generate a core, so if you want to override these signals, do
82
100
   it <em>after</em> you have called the plan() function.
83
101
 
84
 
   @param count The planned number of tests to run. 
 
102
   It will also set skip_big_tests variable if MYTAP_CONFIG environment
 
103
   variable is defined.
 
104
 
 
105
   @see skip_big_tests
 
106
 
 
107
   @param count The planned number of tests to run.
85
108
*/
86
109
 
87
110
void plan(int const count);
161
184
 
162
185
 
163
186
/**
 
187
   Helper macro to skip a group of "big" tests. It is used in the following
 
188
   manner:
 
189
 
 
190
   @code
 
191
   SKIP_BIG_TESTS(1)
 
192
   {
 
193
     ok(life_universe_and_everything() == 42, "The answer is CORRECT");
 
194
   }
 
195
   @endcode
 
196
 
 
197
   @see skip_big_tests
 
198
 */
 
199
 
 
200
#define SKIP_BIG_TESTS(COUNT) \
 
201
  if (skip_big_tests) skip((COUNT), "big test"); else
 
202
 
 
203
 
 
204
/**
164
205
   Print a diagnostics message.
165
206
 
166
207
   @param fmt  Diagnostics message in printf() format.