Initialize the addr struct to zero.
[beanstalkd.git] / cut.h
bloba48642051dd3bfb67f7426f89eab6a8c118cd97c
1 /*
2 * cut.h
3 * CUT 2.3
5 * Copyright (c) 2001 Samuel A. Falvo II, William D. Tanksley
6 * See CUT-LICENSE.TXT for details.
8 * Based on WDT's "TestAssert" package.
10 * $Log: cut.h,v $
11 * Revision 1.4 2003/03/18 05:53:50 sfalvo
12 * ADD: cutgen.c: cut_exit() -- common exit point; returns proper error code
13 * at all times.
15 * FIX: cutgen.c: Factored all instances of exit() to invoke cut_exit()
16 * instead. This fixes the bug #703793.
18 * Revision 1.3 2003/03/13 04:27:54 sfalvo
19 * ADD: LICENSE.TXT -- zlib license
21 * ADD: README cut.h cutgen.c -- Changelog token for CVS
23 * FIX: test/bringup-failure -- reflects new usage for bringups and
24 * teardowns in CUT 2.2.
28 #ifndef CUT_CUT_H_INCLUDED
29 #define CUT_CUT_H_INCLUDED
31 typedef void(*cut_fn)(void);
33 void cut_init(const char *, int);
34 void cut_exit(void);
36 #define cut_run(G, T) __cut_run("group-" #G, \
37 __CUT_BRINGUP__ ## G, \
38 __CUT_TAKEDOWN__ ## G, \
39 #T, \
40 __CUT__ ## T, \
41 __FILE__, \
42 __LINE__);
44 #define ADDR(S) (__cut_debug_addr(#S, __FILE__, __LINE__))
46 #define ASSERT(X,msg) __cut_assert(__FILE__,__LINE__,msg,#X,X)
48 #define STATIC_ASSERT(X) extern bool __static_ASSERT_at_line_##__LINE__##__[ (0!=(X))*2-1 ];
51 * These functions are not officially "public". They exist here because they
52 * need to be for proper operation of CUT. Please use the aforementioned
53 * macros instead.
56 void __cut_run(char *, cut_fn, cut_fn, char *, cut_fn, char *, int);
57 void __cut_assert( char *, int, char *, char *, int );
58 void *__cut_debug_value(const char *, const char *, int);
60 #endif