CLISH  0.7.3
test.h
1 
151 /**************************************************************
152  HISTORY
153  7-Dec-2004 Graeme McKerrell
154  Updated to use the "lub_test_" prefix rather than "unittest_"
155  18-Mar-2002 Graeme McKerrell
156  added unittest_stop_here() prototype
157  16-Mar-2002 Graeme McKerrell
158  LINTed...
159  4-Mar-2002 Graeme McKerrell
160  Ported across for use in Garibaldi
161  28-Feb-2002 Graeme McKerrell
162  Created based on implentation header file.
163 
164 ---------------------------------------------------------------
165  Copyright (c) 3Com Corporation. All Rights Reserved
166 ***************************************************************/
167 #ifndef _lub_test_h
168 #define _lub_test_h
169 
170 #include <stdarg.h>
171 #include "lub/types.h"
172 
173 #ifdef __cplusplus
174 extern "C"
175 {
176 #endif /* __cplusplus */
177 
179 typedef enum {
183 
185 typedef enum {
190 
191 /*
192  ************************************************************
193  UNIT-TEST LEVEL FUNCTIONS
194  ************************************************************
195  */
196 
240  int argc,
242  const char * const *argv);
243 
258 void lub_test_begin(
260  const char *fmt,
263  ...);
264 
283 void
284  lub_test_log(
285  lub_test_verbosity_t level,
288  const char *fmt,
290  ...);
291 
310  lub_test_get_status(void);
311 
330 int
332 
352 void
353  lub_test_end(void);
354 
370 void
371  lub_test_stop_here(void);
372 
373 /*
374  ************************************************************
375  SEQUENCE LEVEL FUNCTIONS
376  ************************************************************
377  */
378 
398 void
400  int seq,
403  const char *fmt,
405  ...);
406 
425 void
427  lub_test_verbosity_t level,
429  const char *fmt,
431  ...);
432 
450 void
451  lub_test_seq_end(void);
452 
453 /*
454  ************************************************************
455  TEST LEVEL FUNCTIONS
456  ************************************************************
457  */
458 
459 /*lint -esym(534,lub_test_check,lub_test_check_int,lub_test_check_float)
460  Make LINT not moan about people ignoring the return values for
461  certain files, the value return is for utility purpose rather than
462  a value that ought to be used.
463 
464 ************************************************************/
487  bool_t expr,
490  const char *fmt,
492  ...);
493 
517  int expect,
519  int actual,
521  const char *fmt,
523  ... );
524 
549  double min,
551  double max,
553  double actual,
555  const char *fmt,
557  ...);
558 
559 #ifdef __cplusplus
560 }
561 #endif /* __cplusplus */
562 
563 #endif /* _lub_test_h */
564 
Definition: test.h:186
Definition: test.h:181
int lub_test_failure_count(void)
void lub_test_seq_end(void)
lub_test_status_t lub_test_check(bool_t expr, const char *fmt,...)
Definition: test.h:180
lub_test_status_t lub_test_get_status(void)
lub_test_status_t
Definition: test.h:179
lub_test_status_t lub_test_check_int(int expect, int actual, const char *fmt,...)
lub_test_status_t lag_test_test_float(double min, double max, double actual, const char *fmt,...)
Definition: test.h:188
void lub_test_begin(const char *fmt,...)
void lub_test_stop_here(void)
void lub_test_end(void)
void lub_test_seq_begin(int seq, const char *fmt,...)
bool_t
Definition: types.h:18
void lub_test_parse_command_line(int argc, const char *const *argv)
void lub_test_seq_log(lub_test_verbosity_t level, const char *fmt,...)
void lub_test_log(lub_test_verbosity_t level, const char *fmt,...)
Definition: test.h:187
lub_test_verbosity_t
Definition: test.h:185