Fixed a race condition on RPC worker thread creation, and a typo.
[wine] / dlls / urlmon / tests / generated.c
1 /* File generated automatically from tools/winapi/test.dat; do not edit! */
2 /* This file can be copied, modified and distributed without restriction. */
3
4 /*
5  * Unit tests for data structure packing
6  */
7
8 #define WINVER 0x0501
9 #define _WIN32_IE 0x0501
10 #define _WIN32_WINNT 0x0501
11
12 #define WINE_NOWINSOCK
13
14 #include "windef.h"
15 #include "urlmon.h"
16
17 #include "wine/test.h"
18
19 /***********************************************************************
20  * Compability macros
21  */
22
23 #define DWORD_PTR UINT_PTR
24 #define LONG_PTR INT_PTR
25 #define ULONG_PTR UINT_PTR
26
27 /***********************************************************************
28  * Windows API extension
29  */
30
31 #if (_MSC_VER >= 1300) && defined(__cplusplus)
32 # define FIELD_ALIGNMENT(type, field) __alignof(((type*)0)->field)
33 #elif defined(__GNUC__)
34 # define FIELD_ALIGNMENT(type, field) __alignof__(((type*)0)->field)
35 #else
36 /* FIXME: Not sure if is possible to do without compiler extension */
37 #endif
38
39 #if (_MSC_VER >= 1300) && defined(__cplusplus)
40 # define _TYPE_ALIGNMENT(type) __alignof(type)
41 #elif defined(__GNUC__)
42 # define _TYPE_ALIGNMENT(type) __alignof__(type)
43 #else
44 /*
45  * FIXME: Not sure if is possible to do without compiler extension
46  *        (if type is not just a name that is, if so the normal)
47  *         TYPE_ALIGNMENT can be used)
48  */
49 #endif
50
51 #if !defined(TYPE_ALIGNMENT) && defined(_TYPE_ALIGNMENT)
52 # define TYPE_ALIGNMENT _TYPE_ALIGNMENT
53 #endif
54
55 /***********************************************************************
56  * Test helper macros
57  */
58
59 #ifdef FIELD_ALIGNMENT
60 # define TEST_FIELD_ALIGNMENT(type, field, align) \
61    ok(FIELD_ALIGNMENT(type, field) == align, \
62        "FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")", \
63            FIELD_ALIGNMENT(type, field))
64 #else
65 # define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)
66 #endif
67
68 #define TEST_FIELD_OFFSET(type, field, offset) \
69     ok(FIELD_OFFSET(type, field) == offset, \
70         "FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")", \
71              FIELD_OFFSET(type, field))
72
73 #ifdef _TYPE_ALIGNMENT
74 #define TEST__TYPE_ALIGNMENT(type, align) \
75     ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")", _TYPE_ALIGNMENT(type))
76 #else
77 # define TEST__TYPE_ALIGNMENT(type, align) do { } while (0)
78 #endif
79
80 #ifdef TYPE_ALIGNMENT
81 #define TEST_TYPE_ALIGNMENT(type, align) \
82     ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")", TYPE_ALIGNMENT(type))
83 #else
84 # define TEST_TYPE_ALIGNMENT(type, align) do { } while (0)
85 #endif
86
87 #define TEST_TYPE_SIZE(type, size) \
88     ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")", sizeof(type))
89
90 /***********************************************************************
91  * Test macros
92  */
93
94 #define TEST_FIELD(type, field_type, field_name, field_offset, field_size, field_align) \
95   TEST_TYPE_SIZE(field_type, field_size); \
96   TEST_FIELD_ALIGNMENT(type, field_name, field_align); \
97   TEST_FIELD_OFFSET(type, field_name, field_offset); \
98
99 #define TEST_TYPE(type, size, align) \
100   TEST_TYPE_ALIGNMENT(type, align); \
101   TEST_TYPE_SIZE(type, size)
102
103 #define TEST_TYPE_POINTER(type, size, align) \
104     TEST__TYPE_ALIGNMENT(*(type)0, align); \
105     TEST_TYPE_SIZE(*(type)0, size)
106
107 #define TEST_TYPE_SIGNED(type) \
108     ok((type) -1 < 0, "(" #type ") -1 < 0");
109
110 #define TEST_TYPE_UNSIGNED(type) \
111      ok((type) -1 > 0, "(" #type ") -1 > 0");
112
113 static void test_pack_BINDINFO(void)
114 {
115     /* BINDINFO (pack 4) */
116     TEST_FIELD(BINDINFO, ULONG, cbSize, 0, 4, 4);
117     TEST_FIELD(BINDINFO, LPWSTR, szExtraInfo, 4, 4, 4);
118 }
119
120 static void test_pack_IBindHost(void)
121 {
122     /* IBindHost */
123 }
124
125 static void test_pack_IBindStatusCallback(void)
126 {
127     /* IBindStatusCallback */
128 }
129
130 static void test_pack_IBinding(void)
131 {
132     /* IBinding */
133 }
134
135 static void test_pack_IWinInetHttpInfo(void)
136 {
137     /* IWinInetHttpInfo */
138 }
139
140 static void test_pack_IWinInetInfo(void)
141 {
142     /* IWinInetInfo */
143 }
144
145 static void test_pack(void)
146 {
147     test_pack_BINDINFO();
148     test_pack_IBindHost();
149     test_pack_IBindStatusCallback();
150     test_pack_IBinding();
151     test_pack_IWinInetHttpInfo();
152     test_pack_IWinInetInfo();
153 }
154
155 START_TEST(generated)
156 {
157     test_pack();
158 }