tests: add test case for Bug #481811
[gtk-doc.git] / tests / bugs / src / tester.h
blob6eb16dac1d15e786b51eaccdf63a2ddcb142aecd
1 #ifndef GTKDOC_TESTER_H
2 #define GTKDOC_TESTER_H
4 #include <glib.h>
6 /**
7 * Bug324535:
8 * @BUG_324535_A: enum 1
9 * @BUG_324535_B: enum 2
10 * @BUG_324535_C: enum 3
12 * http://bugzilla.gnome.org/show_bug.cgi?id=324535
14 typedef enum {
15 BUG_324535_A,
16 #ifdef GTK_DISABLE_DEPRECATED
17 BUG_324535_B,
18 #endif
19 BUG_324535_C
20 } Bug324535;
24 /**
25 * bug_481811:
26 * @x: argument
28 * http://bugzilla.gnome.org/show_bug.cgi?id=481811
29 **/
30 G_INLINE_FUNC double
31 bug_481811(double x)
33 return g_random_double_range(x,x*x);
37 /**
38 * bug_501038:
39 * @a: value
40 * @b: deprecated value
41 * @_b: scrambled deprecated value
43 * http://bugzilla.gnome.org/show_bug.cgi?id=501038
45 struct _bug_501038 {
46 gint a;
47 #ifndef GTK_DISABLE_DEPRECATED
48 gint b;
49 #else
50 gint _b;
51 #endif
55 #define _PADDDING 4
56 /**
57 * bug_460127:
58 * @a: field
60 * http://bugzilla.gnome.org/show_bug.cgi?id=460127
62 struct _bug_460127 {
63 /*< public >*/
64 gint a;
66 /*< private >*/
67 union {
68 struct {
69 gint b;
70 } ABI;
71 gpointer _reserved[_PADDDING + 0];
72 } abidata;
76 /**
77 * bug_477532:
79 * http://bugzilla.gnome.org/show_bug.cgi?id=477532
81 GLIB_VAR guint64 (*bug_477532) (void);
84 struct bug {
85 int test;
89 void bug_141869_a (unsigned pid);
90 void bug_141869_b (signed pid);
92 void bug_379466 (int
93 pid);
95 int bug_380824 (int arg);
97 struct bug *
98 bug_411739 (void);
100 void bug_419997 (int const_values);
102 void bug_445693 (unsigned long pid);
104 G_CONST_RETURN gchar* G_CONST_RETURN *
105 bug_471014 (void);
107 const char* const * bug_552602 (void);
110 * Bug446648:
111 * @BUG_446648_FOO: field
113 * http://bugzilla.gnome.org/show_bug.cgi?id=446648
115 typedef enum _Bug446648 Bug446648;
116 enum _Bug446648 {
117 BUG_446648_FOO
121 * Bug512154:
122 * @index: field
124 * http://bugzilla.gnome.org/show_bug.cgi?id=512154
126 typedef struct {
127 unsigned long index;
128 } Bug512154;
132 * bug_512155a_function_pointer_t:
133 * @arg1: param 1
134 * @arg2: param 1
135 * @arg3: param 1
137 * http://bugzilla.gnome.org/show_bug.cgi?id=512155
139 typedef int
140 (*bug_512155a_function_pointer_t) (unsigned int arg1, unsigned int arg2,
141 unsigned int arg3);
144 * bug_512155b_function_pointer_t:
145 * @arg1: param 1
146 * @arg2: param 1
147 * @arg3: param 1
149 * http://bugzilla.gnome.org/show_bug.cgi?id=512155
151 typedef
152 int (*bug_512155b_function_pointer_t) (unsigned int arg1, unsigned int arg2,
153 unsigned int arg3);
156 * bug_512155c_function_pointer_t:
157 * @arg1: param 1
158 * @arg2: param 1
159 * @arg3: param 1
161 * http://bugzilla.gnome.org/show_bug.cgi?id=512155
163 typedef int (*bug_512155c_function_pointer_t) (unsigned int arg1,
164 unsigned int arg2,
165 unsigned int arg3);
169 * BUG_530758:
171 * <![CDATA[http://bugzilla.gnome.org/show_bug.cgi?id=530758#c1]]>
173 * <ulink url="http://bugzilla.gnome.org/show_bug.cgi?id=530758#c1">Test</ulink>
175 #define BUG_530758 "dummy"
179 * bug_532395a:
180 * @number: a number
182 * http://bugzilla.gnome.org/show_bug.cgi?id=532395
184 * Returns: number
187 * bug_532395b:
189 * http://bugzilla.gnome.org/show_bug.cgi?id=532395
191 G_INLINE_FUNC guint
192 bug_532395a (gulong number)
194 #if defined(__GNUC__) && (__GNUC__ >= 4) && defined(__OPTIMIZE__)
195 return G_LIKELY (number) ?
196 ((GLIB_SIZEOF_LONG * 8 - 1) ^ __builtin_clzl(number)) + 1 : 1;
197 #else
198 return 0;
199 #endif
201 G_INLINE_FUNC void
202 bug_532395b (void)
208 * bug_544172:
209 * @self: object pointer.
211 * http://bugzilla.gnome.org/show_bug.cgi?id=544172
213 * Returns: result or %NULL.
215 typedef char const * (*bug_544172) (char const *self);
219 * bug_554833:
220 * @i: value;
222 * http://bugzilla.gnome.org/show_bug.cgi?id=554833
224 struct _bug_554833 {
225 int i;
230 * bug_554833_new:
232 * http://bugzilla.gnome.org/show_bug.cgi?id=554833
234 * Returns: result
236 struct _bug_554833 *
237 bug_554833_new (void);
240 #define GTKDOC_GNUC_CONST
241 int bug_574654a(void) GTKDOC_GNUC_CONST;
242 void bug_574654b(double offset);
245 void bug_580300a_get_type(void);
246 void bug_580300b_get_type(gint a);
247 void bug_580300c_get_type();
248 extern int bug_580300d_get_type();
251 long int bug_602518a(void);
252 unsigned long int bug_602518b(void);
253 unsigned int bug_602518c(void);
256 * Bug165425a:
257 * @i: data as int
258 * @f: data as float
260 * http://bugzilla.gnome.org/show_bug.cgi?id=165425
262 union _Bug165425a {
263 int i;
264 float f;
266 typedef union _Bug165425a Bug165425a;
269 * Bug165425b:
270 * @i: data as int
271 * @f: data as float
273 * http://bugzilla.gnome.org/show_bug.cgi?id=165425
275 typedef union _Bug165425b {
276 int i;
277 float f;
278 } Bug165425b;
282 * BugXXX1b:
283 * @a: field
285 * No bug report
287 typedef struct _BugXXX1b BugXXX1b;
288 struct _BugXXX1b {
289 *//*< protected >*//*
290 gint a;
292 *//*< private >*//*
293 gint b;
297 long double bug_607445(long double **a, int n);
300 signed long bug_610257(const unsigned char *der, int *len);
303 void bug_623968a(void);
304 void bug_623968b(void);
307 #define _BUG_624199(struct_type, n_structs, func) \
308 (struct_type *) (__extension__ ({ \
309 gsize __n = (gsize) (n_structs); \
310 gsize __s = sizeof (struct_type); \
311 gpointer __p; \
312 if (__s == 1) \
313 __p = g_##func (__n); \
314 else if (__builtin_constant_p (__n) && \
315 (__s == 0 || __n <= G_MAXSIZE / __s)) \
316 __p = g_##func (__n * __s); \
317 else \
318 __p = g_##func##_n (__n, __s); \
319 __p; \
323 const char * const * bug_624200a(void);
324 const char ** const bug_624200b(void);
326 #endif // GTKDOC_TESTER_H