ole32: Remove an unnecessary special case in StorageBaseImpl_CopyTo.
[wine] / dlls / rpcrt4 / tests / generated.c
1 /* File generated automatically from tools/winapi/tests.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 <stdarg.h>
15 #include "windef.h"
16 #include "winbase.h"
17 #include "rpc.h"
18 #include "rpcndr.h"
19 #include "rpcproxy.h"
20
21 #include "wine/test.h"
22
23 /***********************************************************************
24  * Compatibility macros
25  */
26
27 #define DWORD_PTR UINT_PTR
28 #define LONG_PTR INT_PTR
29 #define ULONG_PTR UINT_PTR
30
31 /***********************************************************************
32  * Windows API extension
33  */
34
35 #if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus)
36 # define _TYPE_ALIGNMENT(type) __alignof(type)
37 #elif defined(__GNUC__)
38 # define _TYPE_ALIGNMENT(type) __alignof__(type)
39 #else
40 /*
41  * FIXME: May not be possible without a compiler extension
42  *        (if type is not just a name that is, otherwise the normal
43  *         TYPE_ALIGNMENT can be used)
44  */
45 #endif
46
47 #if defined(TYPE_ALIGNMENT) && defined(_MSC_VER) && _MSC_VER >= 800 && !defined(__cplusplus)
48 #pragma warning(disable:4116)
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 _WIN64
60
61 # define TEST_TYPE_SIZE(type, size)
62 # define TEST_TYPE_ALIGN(type, align)
63 # define TEST_TARGET_ALIGN(type, align)
64 # define TEST_FIELD_ALIGN(type, field, align)
65 # define TEST_FIELD_OFFSET(type, field, offset)
66
67 #else
68
69 # define TEST_TYPE_SIZE(type, size)             C_ASSERT(sizeof(type) == size);
70
71 # ifdef TYPE_ALIGNMENT
72 #  define TEST_TYPE_ALIGN(type, align)          C_ASSERT(TYPE_ALIGNMENT(type) == align);
73 # else
74 #  define TEST_TYPE_ALIGN(type, align)
75 # endif
76
77 # ifdef _TYPE_ALIGNMENT
78 #  define TEST_TARGET_ALIGN(type, align)        C_ASSERT(_TYPE_ALIGNMENT(*(type)0) == align);
79 #  define TEST_FIELD_ALIGN(type, field, align)  C_ASSERT(_TYPE_ALIGNMENT(((type*)0)->field) == align);
80 # else
81 #  define TEST_TARGET_ALIGN(type, align)
82 #  define TEST_FIELD_ALIGN(type, field, align)
83 # endif
84
85 # define TEST_FIELD_OFFSET(type, field, offset) C_ASSERT(FIELD_OFFSET(type, field) == offset);
86
87 #endif
88
89 #define TEST_TARGET_SIZE(type, size)            TEST_TYPE_SIZE(*(type)0, size)
90 #define TEST_FIELD_SIZE(type, field, size)      TEST_TYPE_SIZE((((type*)0)->field), size)
91 #define TEST_TYPE_SIGNED(type)                  C_ASSERT((type) -1 < 0);
92 #define TEST_TYPE_UNSIGNED(type)                C_ASSERT((type) -1 > 0);
93
94
95 static void test_pack_I_RPC_HANDLE(void)
96 {
97     /* I_RPC_HANDLE */
98     TEST_TYPE_SIZE   (I_RPC_HANDLE, 4)
99     TEST_TYPE_ALIGN  (I_RPC_HANDLE, 4)
100 }
101
102 static void test_pack_RPC_STATUS(void)
103 {
104     /* RPC_STATUS */
105     TEST_TYPE_SIZE   (RPC_STATUS, 4)
106     TEST_TYPE_ALIGN  (RPC_STATUS, 4)
107 }
108
109 static void test_pack_PRPC_POLICY(void)
110 {
111     /* PRPC_POLICY */
112     TEST_TYPE_SIZE   (PRPC_POLICY, 4)
113     TEST_TYPE_ALIGN  (PRPC_POLICY, 4)
114     TEST_TARGET_SIZE (PRPC_POLICY, 12)
115     TEST_TARGET_ALIGN(PRPC_POLICY, 4)
116 }
117
118 static void test_pack_RPC_AUTH_IDENTITY_HANDLE(void)
119 {
120     /* RPC_AUTH_IDENTITY_HANDLE */
121     TEST_TYPE_SIZE   (RPC_AUTH_IDENTITY_HANDLE, 4)
122     TEST_TYPE_ALIGN  (RPC_AUTH_IDENTITY_HANDLE, 4)
123 }
124
125 static void test_pack_RPC_AUTH_KEY_RETRIEVAL_FN(void)
126 {
127     /* RPC_AUTH_KEY_RETRIEVAL_FN */
128 }
129
130 static void test_pack_RPC_AUTHZ_HANDLE(void)
131 {
132     /* RPC_AUTHZ_HANDLE */
133     TEST_TYPE_SIZE   (RPC_AUTHZ_HANDLE, 4)
134     TEST_TYPE_ALIGN  (RPC_AUTHZ_HANDLE, 4)
135 }
136
137 static void test_pack_RPC_BINDING_HANDLE(void)
138 {
139     /* RPC_BINDING_HANDLE */
140     TEST_TYPE_SIZE   (RPC_BINDING_HANDLE, 4)
141     TEST_TYPE_ALIGN  (RPC_BINDING_HANDLE, 4)
142 }
143
144 static void test_pack_RPC_BINDING_VECTOR(void)
145 {
146     /* RPC_BINDING_VECTOR (pack 4) */
147     TEST_TYPE_SIZE   (RPC_BINDING_VECTOR, 8)
148     TEST_TYPE_ALIGN  (RPC_BINDING_VECTOR, 4)
149     TEST_FIELD_SIZE  (RPC_BINDING_VECTOR, Count, 4)
150     TEST_FIELD_ALIGN (RPC_BINDING_VECTOR, Count, 4)
151     TEST_FIELD_OFFSET(RPC_BINDING_VECTOR, Count, 0)
152     TEST_FIELD_SIZE  (RPC_BINDING_VECTOR, BindingH, 4)
153     TEST_FIELD_ALIGN (RPC_BINDING_VECTOR, BindingH, 4)
154     TEST_FIELD_OFFSET(RPC_BINDING_VECTOR, BindingH, 4)
155 }
156
157 static void test_pack_RPC_IF_HANDLE(void)
158 {
159     /* RPC_IF_HANDLE */
160     TEST_TYPE_SIZE   (RPC_IF_HANDLE, 4)
161     TEST_TYPE_ALIGN  (RPC_IF_HANDLE, 4)
162 }
163
164 static void test_pack_RPC_IF_ID(void)
165 {
166     /* RPC_IF_ID (pack 4) */
167     TEST_TYPE_SIZE   (RPC_IF_ID, 20)
168     TEST_TYPE_ALIGN  (RPC_IF_ID, 4)
169     TEST_FIELD_SIZE  (RPC_IF_ID, Uuid, 16)
170     TEST_FIELD_ALIGN (RPC_IF_ID, Uuid, 4)
171     TEST_FIELD_OFFSET(RPC_IF_ID, Uuid, 0)
172     TEST_FIELD_SIZE  (RPC_IF_ID, VersMajor, 2)
173     TEST_FIELD_ALIGN (RPC_IF_ID, VersMajor, 2)
174     TEST_FIELD_OFFSET(RPC_IF_ID, VersMajor, 16)
175     TEST_FIELD_SIZE  (RPC_IF_ID, VersMinor, 2)
176     TEST_FIELD_ALIGN (RPC_IF_ID, VersMinor, 2)
177     TEST_FIELD_OFFSET(RPC_IF_ID, VersMinor, 18)
178 }
179
180 static void test_pack_RPC_POLICY(void)
181 {
182     /* RPC_POLICY (pack 4) */
183     TEST_TYPE_SIZE   (RPC_POLICY, 12)
184     TEST_TYPE_ALIGN  (RPC_POLICY, 4)
185     TEST_FIELD_SIZE  (RPC_POLICY, Length, 4)
186     TEST_FIELD_ALIGN (RPC_POLICY, Length, 4)
187     TEST_FIELD_OFFSET(RPC_POLICY, Length, 0)
188     TEST_FIELD_SIZE  (RPC_POLICY, EndpointFlags, 4)
189     TEST_FIELD_ALIGN (RPC_POLICY, EndpointFlags, 4)
190     TEST_FIELD_OFFSET(RPC_POLICY, EndpointFlags, 4)
191     TEST_FIELD_SIZE  (RPC_POLICY, NICFlags, 4)
192     TEST_FIELD_ALIGN (RPC_POLICY, NICFlags, 4)
193     TEST_FIELD_OFFSET(RPC_POLICY, NICFlags, 8)
194 }
195
196 static void test_pack_UUID_VECTOR(void)
197 {
198     /* UUID_VECTOR (pack 4) */
199     TEST_TYPE_SIZE   (UUID_VECTOR, 8)
200     TEST_TYPE_ALIGN  (UUID_VECTOR, 4)
201     TEST_FIELD_SIZE  (UUID_VECTOR, Count, 4)
202     TEST_FIELD_ALIGN (UUID_VECTOR, Count, 4)
203     TEST_FIELD_OFFSET(UUID_VECTOR, Count, 0)
204     TEST_FIELD_SIZE  (UUID_VECTOR, Uuid, 4)
205     TEST_FIELD_ALIGN (UUID_VECTOR, Uuid, 4)
206     TEST_FIELD_OFFSET(UUID_VECTOR, Uuid, 4)
207 }
208
209 static void test_pack_PRPC_CLIENT_INTERFACE(void)
210 {
211     /* PRPC_CLIENT_INTERFACE */
212     TEST_TYPE_SIZE   (PRPC_CLIENT_INTERFACE, 4)
213     TEST_TYPE_ALIGN  (PRPC_CLIENT_INTERFACE, 4)
214     TEST_TARGET_SIZE (PRPC_CLIENT_INTERFACE, 68)
215     TEST_TARGET_ALIGN(PRPC_CLIENT_INTERFACE, 4)
216 }
217
218 static void test_pack_PRPC_DISPATCH_TABLE(void)
219 {
220     /* PRPC_DISPATCH_TABLE */
221     TEST_TYPE_SIZE   (PRPC_DISPATCH_TABLE, 4)
222     TEST_TYPE_ALIGN  (PRPC_DISPATCH_TABLE, 4)
223     TEST_TARGET_SIZE (PRPC_DISPATCH_TABLE, 12)
224     TEST_TARGET_ALIGN(PRPC_DISPATCH_TABLE, 4)
225 }
226
227 static void test_pack_PRPC_MESSAGE(void)
228 {
229     /* PRPC_MESSAGE */
230     TEST_TYPE_SIZE   (PRPC_MESSAGE, 4)
231     TEST_TYPE_ALIGN  (PRPC_MESSAGE, 4)
232     TEST_TARGET_SIZE (PRPC_MESSAGE, 44)
233     TEST_TARGET_ALIGN(PRPC_MESSAGE, 4)
234 }
235
236 static void test_pack_PRPC_PROTSEQ_ENDPOINT(void)
237 {
238     /* PRPC_PROTSEQ_ENDPOINT */
239     TEST_TYPE_SIZE   (PRPC_PROTSEQ_ENDPOINT, 4)
240     TEST_TYPE_ALIGN  (PRPC_PROTSEQ_ENDPOINT, 4)
241     TEST_TARGET_SIZE (PRPC_PROTSEQ_ENDPOINT, 8)
242     TEST_TARGET_ALIGN(PRPC_PROTSEQ_ENDPOINT, 4)
243 }
244
245 static void test_pack_PRPC_SERVER_INTERFACE(void)
246 {
247     /* PRPC_SERVER_INTERFACE */
248     TEST_TYPE_SIZE   (PRPC_SERVER_INTERFACE, 4)
249     TEST_TYPE_ALIGN  (PRPC_SERVER_INTERFACE, 4)
250     TEST_TARGET_SIZE (PRPC_SERVER_INTERFACE, 68)
251     TEST_TARGET_ALIGN(PRPC_SERVER_INTERFACE, 4)
252 }
253
254 static void test_pack_PRPC_SYNTAX_IDENTIFIER(void)
255 {
256     /* PRPC_SYNTAX_IDENTIFIER */
257     TEST_TYPE_SIZE   (PRPC_SYNTAX_IDENTIFIER, 4)
258     TEST_TYPE_ALIGN  (PRPC_SYNTAX_IDENTIFIER, 4)
259     TEST_TARGET_SIZE (PRPC_SYNTAX_IDENTIFIER, 20)
260     TEST_TARGET_ALIGN(PRPC_SYNTAX_IDENTIFIER, 4)
261 }
262
263 static void test_pack_RPC_CLIENT_INTERFACE(void)
264 {
265     /* RPC_CLIENT_INTERFACE (pack 4) */
266     TEST_TYPE_SIZE   (RPC_CLIENT_INTERFACE, 68)
267     TEST_TYPE_ALIGN  (RPC_CLIENT_INTERFACE, 4)
268     TEST_FIELD_SIZE  (RPC_CLIENT_INTERFACE, Length, 4)
269     TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, Length, 4)
270     TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, Length, 0)
271     TEST_FIELD_SIZE  (RPC_CLIENT_INTERFACE, InterfaceId, 20)
272     TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, InterfaceId, 4)
273     TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, InterfaceId, 4)
274     TEST_FIELD_SIZE  (RPC_CLIENT_INTERFACE, TransferSyntax, 20)
275     TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, TransferSyntax, 4)
276     TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, TransferSyntax, 24)
277     TEST_FIELD_SIZE  (RPC_CLIENT_INTERFACE, DispatchTable, 4)
278     TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, DispatchTable, 4)
279     TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, DispatchTable, 44)
280     TEST_FIELD_SIZE  (RPC_CLIENT_INTERFACE, RpcProtseqEndpointCount, 4)
281     TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, RpcProtseqEndpointCount, 4)
282     TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, RpcProtseqEndpointCount, 48)
283     TEST_FIELD_SIZE  (RPC_CLIENT_INTERFACE, RpcProtseqEndpoint, 4)
284     TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, RpcProtseqEndpoint, 4)
285     TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, RpcProtseqEndpoint, 52)
286     TEST_FIELD_SIZE  (RPC_CLIENT_INTERFACE, Reserved, 4)
287     TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, Reserved, 4)
288     TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, Reserved, 56)
289     TEST_FIELD_SIZE  (RPC_CLIENT_INTERFACE, InterpreterInfo, 4)
290     TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, InterpreterInfo, 4)
291     TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, InterpreterInfo, 60)
292     TEST_FIELD_SIZE  (RPC_CLIENT_INTERFACE, Flags, 4)
293     TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, Flags, 4)
294     TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, Flags, 64)
295 }
296
297 static void test_pack_RPC_DISPATCH_FUNCTION(void)
298 {
299     /* RPC_DISPATCH_FUNCTION */
300 }
301
302 static void test_pack_RPC_DISPATCH_TABLE(void)
303 {
304     /* RPC_DISPATCH_TABLE (pack 4) */
305     TEST_TYPE_SIZE   (RPC_DISPATCH_TABLE, 12)
306     TEST_TYPE_ALIGN  (RPC_DISPATCH_TABLE, 4)
307     TEST_FIELD_SIZE  (RPC_DISPATCH_TABLE, DispatchTableCount, 4)
308     TEST_FIELD_ALIGN (RPC_DISPATCH_TABLE, DispatchTableCount, 4)
309     TEST_FIELD_OFFSET(RPC_DISPATCH_TABLE, DispatchTableCount, 0)
310     TEST_FIELD_SIZE  (RPC_DISPATCH_TABLE, DispatchTable, 4)
311     TEST_FIELD_ALIGN (RPC_DISPATCH_TABLE, DispatchTable, 4)
312     TEST_FIELD_OFFSET(RPC_DISPATCH_TABLE, DispatchTable, 4)
313     TEST_FIELD_SIZE  (RPC_DISPATCH_TABLE, Reserved, 4)
314     TEST_FIELD_ALIGN (RPC_DISPATCH_TABLE, Reserved, 4)
315     TEST_FIELD_OFFSET(RPC_DISPATCH_TABLE, Reserved, 8)
316 }
317
318 static void test_pack_RPC_MESSAGE(void)
319 {
320     /* RPC_MESSAGE (pack 4) */
321     TEST_TYPE_SIZE   (RPC_MESSAGE, 44)
322     TEST_TYPE_ALIGN  (RPC_MESSAGE, 4)
323     TEST_FIELD_SIZE  (RPC_MESSAGE, Handle, 4)
324     TEST_FIELD_ALIGN (RPC_MESSAGE, Handle, 4)
325     TEST_FIELD_OFFSET(RPC_MESSAGE, Handle, 0)
326     TEST_FIELD_SIZE  (RPC_MESSAGE, DataRepresentation, 4)
327     TEST_FIELD_ALIGN (RPC_MESSAGE, DataRepresentation, 4)
328     TEST_FIELD_OFFSET(RPC_MESSAGE, DataRepresentation, 4)
329     TEST_FIELD_SIZE  (RPC_MESSAGE, Buffer, 4)
330     TEST_FIELD_ALIGN (RPC_MESSAGE, Buffer, 4)
331     TEST_FIELD_OFFSET(RPC_MESSAGE, Buffer, 8)
332     TEST_FIELD_SIZE  (RPC_MESSAGE, BufferLength, 4)
333     TEST_FIELD_ALIGN (RPC_MESSAGE, BufferLength, 4)
334     TEST_FIELD_OFFSET(RPC_MESSAGE, BufferLength, 12)
335     TEST_FIELD_SIZE  (RPC_MESSAGE, ProcNum, 4)
336     TEST_FIELD_ALIGN (RPC_MESSAGE, ProcNum, 4)
337     TEST_FIELD_OFFSET(RPC_MESSAGE, ProcNum, 16)
338     TEST_FIELD_SIZE  (RPC_MESSAGE, TransferSyntax, 4)
339     TEST_FIELD_ALIGN (RPC_MESSAGE, TransferSyntax, 4)
340     TEST_FIELD_OFFSET(RPC_MESSAGE, TransferSyntax, 20)
341     TEST_FIELD_SIZE  (RPC_MESSAGE, RpcInterfaceInformation, 4)
342     TEST_FIELD_ALIGN (RPC_MESSAGE, RpcInterfaceInformation, 4)
343     TEST_FIELD_OFFSET(RPC_MESSAGE, RpcInterfaceInformation, 24)
344     TEST_FIELD_SIZE  (RPC_MESSAGE, ReservedForRuntime, 4)
345     TEST_FIELD_ALIGN (RPC_MESSAGE, ReservedForRuntime, 4)
346     TEST_FIELD_OFFSET(RPC_MESSAGE, ReservedForRuntime, 28)
347     TEST_FIELD_SIZE  (RPC_MESSAGE, ManagerEpv, 4)
348     TEST_FIELD_ALIGN (RPC_MESSAGE, ManagerEpv, 4)
349     TEST_FIELD_OFFSET(RPC_MESSAGE, ManagerEpv, 32)
350     TEST_FIELD_SIZE  (RPC_MESSAGE, ImportContext, 4)
351     TEST_FIELD_ALIGN (RPC_MESSAGE, ImportContext, 4)
352     TEST_FIELD_OFFSET(RPC_MESSAGE, ImportContext, 36)
353     TEST_FIELD_SIZE  (RPC_MESSAGE, RpcFlags, 4)
354     TEST_FIELD_ALIGN (RPC_MESSAGE, RpcFlags, 4)
355     TEST_FIELD_OFFSET(RPC_MESSAGE, RpcFlags, 40)
356 }
357
358 static void test_pack_RPC_PROTSEQ_ENDPOINT(void)
359 {
360     /* RPC_PROTSEQ_ENDPOINT (pack 4) */
361     TEST_TYPE_SIZE   (RPC_PROTSEQ_ENDPOINT, 8)
362     TEST_TYPE_ALIGN  (RPC_PROTSEQ_ENDPOINT, 4)
363     TEST_FIELD_SIZE  (RPC_PROTSEQ_ENDPOINT, RpcProtocolSequence, 4)
364     TEST_FIELD_ALIGN (RPC_PROTSEQ_ENDPOINT, RpcProtocolSequence, 4)
365     TEST_FIELD_OFFSET(RPC_PROTSEQ_ENDPOINT, RpcProtocolSequence, 0)
366     TEST_FIELD_SIZE  (RPC_PROTSEQ_ENDPOINT, Endpoint, 4)
367     TEST_FIELD_ALIGN (RPC_PROTSEQ_ENDPOINT, Endpoint, 4)
368     TEST_FIELD_OFFSET(RPC_PROTSEQ_ENDPOINT, Endpoint, 4)
369 }
370
371 static void test_pack_RPC_SERVER_INTERFACE(void)
372 {
373     /* RPC_SERVER_INTERFACE (pack 4) */
374     TEST_TYPE_SIZE   (RPC_SERVER_INTERFACE, 68)
375     TEST_TYPE_ALIGN  (RPC_SERVER_INTERFACE, 4)
376     TEST_FIELD_SIZE  (RPC_SERVER_INTERFACE, Length, 4)
377     TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, Length, 4)
378     TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, Length, 0)
379     TEST_FIELD_SIZE  (RPC_SERVER_INTERFACE, InterfaceId, 20)
380     TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, InterfaceId, 4)
381     TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, InterfaceId, 4)
382     TEST_FIELD_SIZE  (RPC_SERVER_INTERFACE, TransferSyntax, 20)
383     TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, TransferSyntax, 4)
384     TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, TransferSyntax, 24)
385     TEST_FIELD_SIZE  (RPC_SERVER_INTERFACE, DispatchTable, 4)
386     TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, DispatchTable, 4)
387     TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, DispatchTable, 44)
388     TEST_FIELD_SIZE  (RPC_SERVER_INTERFACE, RpcProtseqEndpointCount, 4)
389     TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, RpcProtseqEndpointCount, 4)
390     TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, RpcProtseqEndpointCount, 48)
391     TEST_FIELD_SIZE  (RPC_SERVER_INTERFACE, RpcProtseqEndpoint, 4)
392     TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, RpcProtseqEndpoint, 4)
393     TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, RpcProtseqEndpoint, 52)
394     TEST_FIELD_SIZE  (RPC_SERVER_INTERFACE, DefaultManagerEpv, 4)
395     TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, DefaultManagerEpv, 4)
396     TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, DefaultManagerEpv, 56)
397     TEST_FIELD_SIZE  (RPC_SERVER_INTERFACE, InterpreterInfo, 4)
398     TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, InterpreterInfo, 4)
399     TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, InterpreterInfo, 60)
400     TEST_FIELD_SIZE  (RPC_SERVER_INTERFACE, Flags, 4)
401     TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, Flags, 4)
402     TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, Flags, 64)
403 }
404
405 static void test_pack_RPC_SYNTAX_IDENTIFIER(void)
406 {
407     /* RPC_SYNTAX_IDENTIFIER (pack 4) */
408     TEST_TYPE_SIZE   (RPC_SYNTAX_IDENTIFIER, 20)
409     TEST_TYPE_ALIGN  (RPC_SYNTAX_IDENTIFIER, 4)
410     TEST_FIELD_SIZE  (RPC_SYNTAX_IDENTIFIER, SyntaxGUID, 16)
411     TEST_FIELD_ALIGN (RPC_SYNTAX_IDENTIFIER, SyntaxGUID, 4)
412     TEST_FIELD_OFFSET(RPC_SYNTAX_IDENTIFIER, SyntaxGUID, 0)
413     TEST_FIELD_SIZE  (RPC_SYNTAX_IDENTIFIER, SyntaxVersion, 4)
414     TEST_FIELD_ALIGN (RPC_SYNTAX_IDENTIFIER, SyntaxVersion, 2)
415     TEST_FIELD_OFFSET(RPC_SYNTAX_IDENTIFIER, SyntaxVersion, 16)
416 }
417
418 static void test_pack_RPC_VERSION(void)
419 {
420     /* RPC_VERSION (pack 4) */
421     TEST_TYPE_SIZE   (RPC_VERSION, 4)
422     TEST_TYPE_ALIGN  (RPC_VERSION, 2)
423     TEST_FIELD_SIZE  (RPC_VERSION, MajorVersion, 2)
424     TEST_FIELD_ALIGN (RPC_VERSION, MajorVersion, 2)
425     TEST_FIELD_OFFSET(RPC_VERSION, MajorVersion, 0)
426     TEST_FIELD_SIZE  (RPC_VERSION, MinorVersion, 2)
427     TEST_FIELD_ALIGN (RPC_VERSION, MinorVersion, 2)
428     TEST_FIELD_OFFSET(RPC_VERSION, MinorVersion, 2)
429 }
430
431 static void test_pack_ARRAY_INFO(void)
432 {
433     /* ARRAY_INFO (pack 4) */
434     TEST_TYPE_SIZE   (ARRAY_INFO, 24)
435     TEST_TYPE_ALIGN  (ARRAY_INFO, 4)
436     TEST_FIELD_SIZE  (ARRAY_INFO, Dimension, 4)
437     TEST_FIELD_ALIGN (ARRAY_INFO, Dimension, 4)
438     TEST_FIELD_OFFSET(ARRAY_INFO, Dimension, 0)
439     TEST_FIELD_SIZE  (ARRAY_INFO, BufferConformanceMark, 4)
440     TEST_FIELD_ALIGN (ARRAY_INFO, BufferConformanceMark, 4)
441     TEST_FIELD_OFFSET(ARRAY_INFO, BufferConformanceMark, 4)
442     TEST_FIELD_SIZE  (ARRAY_INFO, BufferVarianceMark, 4)
443     TEST_FIELD_ALIGN (ARRAY_INFO, BufferVarianceMark, 4)
444     TEST_FIELD_OFFSET(ARRAY_INFO, BufferVarianceMark, 8)
445     TEST_FIELD_SIZE  (ARRAY_INFO, MaxCountArray, 4)
446     TEST_FIELD_ALIGN (ARRAY_INFO, MaxCountArray, 4)
447     TEST_FIELD_OFFSET(ARRAY_INFO, MaxCountArray, 12)
448     TEST_FIELD_SIZE  (ARRAY_INFO, OffsetArray, 4)
449     TEST_FIELD_ALIGN (ARRAY_INFO, OffsetArray, 4)
450     TEST_FIELD_OFFSET(ARRAY_INFO, OffsetArray, 16)
451     TEST_FIELD_SIZE  (ARRAY_INFO, ActualCountArray, 4)
452     TEST_FIELD_ALIGN (ARRAY_INFO, ActualCountArray, 4)
453     TEST_FIELD_OFFSET(ARRAY_INFO, ActualCountArray, 20)
454 }
455
456 static void test_pack_COMM_FAULT_OFFSETS(void)
457 {
458     /* COMM_FAULT_OFFSETS (pack 4) */
459     TEST_TYPE_SIZE   (COMM_FAULT_OFFSETS, 4)
460     TEST_TYPE_ALIGN  (COMM_FAULT_OFFSETS, 2)
461     TEST_FIELD_SIZE  (COMM_FAULT_OFFSETS, CommOffset, 2)
462     TEST_FIELD_ALIGN (COMM_FAULT_OFFSETS, CommOffset, 2)
463     TEST_FIELD_OFFSET(COMM_FAULT_OFFSETS, CommOffset, 0)
464     TEST_FIELD_SIZE  (COMM_FAULT_OFFSETS, FaultOffset, 2)
465     TEST_FIELD_ALIGN (COMM_FAULT_OFFSETS, FaultOffset, 2)
466     TEST_FIELD_OFFSET(COMM_FAULT_OFFSETS, FaultOffset, 2)
467 }
468
469 static void test_pack_CS_STUB_INFO(void)
470 {
471     /* CS_STUB_INFO (pack 4) */
472     TEST_TYPE_SIZE   (CS_STUB_INFO, 12)
473     TEST_TYPE_ALIGN  (CS_STUB_INFO, 4)
474     TEST_FIELD_SIZE  (CS_STUB_INFO, WireCodeset, 4)
475     TEST_FIELD_ALIGN (CS_STUB_INFO, WireCodeset, 4)
476     TEST_FIELD_OFFSET(CS_STUB_INFO, WireCodeset, 0)
477     TEST_FIELD_SIZE  (CS_STUB_INFO, DesiredReceivingCodeset, 4)
478     TEST_FIELD_ALIGN (CS_STUB_INFO, DesiredReceivingCodeset, 4)
479     TEST_FIELD_OFFSET(CS_STUB_INFO, DesiredReceivingCodeset, 4)
480     TEST_FIELD_SIZE  (CS_STUB_INFO, CSArrayInfo, 4)
481     TEST_FIELD_ALIGN (CS_STUB_INFO, CSArrayInfo, 4)
482     TEST_FIELD_OFFSET(CS_STUB_INFO, CSArrayInfo, 8)
483 }
484
485 static void test_pack_EXPR_EVAL(void)
486 {
487     /* EXPR_EVAL */
488 }
489
490 static void test_pack_FULL_PTR_TO_REFID_ELEMENT(void)
491 {
492     /* FULL_PTR_TO_REFID_ELEMENT (pack 4) */
493     TEST_TYPE_SIZE   (FULL_PTR_TO_REFID_ELEMENT, 16)
494     TEST_TYPE_ALIGN  (FULL_PTR_TO_REFID_ELEMENT, 4)
495     TEST_FIELD_SIZE  (FULL_PTR_TO_REFID_ELEMENT, Next, 4)
496     TEST_FIELD_ALIGN (FULL_PTR_TO_REFID_ELEMENT, Next, 4)
497     TEST_FIELD_OFFSET(FULL_PTR_TO_REFID_ELEMENT, Next, 0)
498     TEST_FIELD_SIZE  (FULL_PTR_TO_REFID_ELEMENT, Pointer, 4)
499     TEST_FIELD_ALIGN (FULL_PTR_TO_REFID_ELEMENT, Pointer, 4)
500     TEST_FIELD_OFFSET(FULL_PTR_TO_REFID_ELEMENT, Pointer, 4)
501     TEST_FIELD_SIZE  (FULL_PTR_TO_REFID_ELEMENT, RefId, 4)
502     TEST_FIELD_ALIGN (FULL_PTR_TO_REFID_ELEMENT, RefId, 4)
503     TEST_FIELD_OFFSET(FULL_PTR_TO_REFID_ELEMENT, RefId, 8)
504     TEST_FIELD_SIZE  (FULL_PTR_TO_REFID_ELEMENT, State, 1)
505     TEST_FIELD_ALIGN (FULL_PTR_TO_REFID_ELEMENT, State, 1)
506     TEST_FIELD_OFFSET(FULL_PTR_TO_REFID_ELEMENT, State, 12)
507 }
508
509 static void test_pack_FULL_PTR_XLAT_TABLES(void)
510 {
511     /* FULL_PTR_XLAT_TABLES (pack 4) */
512 }
513
514 static void test_pack_GENERIC_BINDING_INFO(void)
515 {
516     /* GENERIC_BINDING_INFO (pack 4) */
517     TEST_FIELD_SIZE  (GENERIC_BINDING_INFO, pObj, 4)
518     TEST_FIELD_ALIGN (GENERIC_BINDING_INFO, pObj, 4)
519     TEST_FIELD_OFFSET(GENERIC_BINDING_INFO, pObj, 0)
520     TEST_FIELD_SIZE  (GENERIC_BINDING_INFO, Size, 4)
521     TEST_FIELD_ALIGN (GENERIC_BINDING_INFO, Size, 4)
522     TEST_FIELD_OFFSET(GENERIC_BINDING_INFO, Size, 4)
523 }
524
525 static void test_pack_GENERIC_BINDING_ROUTINE_PAIR(void)
526 {
527     /* GENERIC_BINDING_ROUTINE_PAIR (pack 4) */
528 }
529
530 static void test_pack_MALLOC_FREE_STRUCT(void)
531 {
532     /* MALLOC_FREE_STRUCT (pack 4) */
533 }
534
535 static void test_pack_MIDL_FORMAT_STRING(void)
536 {
537     /* MIDL_FORMAT_STRING (pack 4) */
538     TEST_FIELD_SIZE  (MIDL_FORMAT_STRING, Pad, 2)
539     TEST_FIELD_ALIGN (MIDL_FORMAT_STRING, Pad, 2)
540     TEST_FIELD_OFFSET(MIDL_FORMAT_STRING, Pad, 0)
541 }
542
543 static void test_pack_MIDL_SERVER_INFO(void)
544 {
545     /* MIDL_SERVER_INFO (pack 4) */
546     TEST_TYPE_SIZE   (MIDL_SERVER_INFO, 32)
547     TEST_TYPE_ALIGN  (MIDL_SERVER_INFO, 4)
548     TEST_FIELD_SIZE  (MIDL_SERVER_INFO, pStubDesc, 4)
549     TEST_FIELD_ALIGN (MIDL_SERVER_INFO, pStubDesc, 4)
550     TEST_FIELD_OFFSET(MIDL_SERVER_INFO, pStubDesc, 0)
551     TEST_FIELD_SIZE  (MIDL_SERVER_INFO, DispatchTable, 4)
552     TEST_FIELD_ALIGN (MIDL_SERVER_INFO, DispatchTable, 4)
553     TEST_FIELD_OFFSET(MIDL_SERVER_INFO, DispatchTable, 4)
554     TEST_FIELD_SIZE  (MIDL_SERVER_INFO, ProcString, 4)
555     TEST_FIELD_ALIGN (MIDL_SERVER_INFO, ProcString, 4)
556     TEST_FIELD_OFFSET(MIDL_SERVER_INFO, ProcString, 8)
557     TEST_FIELD_SIZE  (MIDL_SERVER_INFO, FmtStringOffset, 4)
558     TEST_FIELD_ALIGN (MIDL_SERVER_INFO, FmtStringOffset, 4)
559     TEST_FIELD_OFFSET(MIDL_SERVER_INFO, FmtStringOffset, 12)
560     TEST_FIELD_SIZE  (MIDL_SERVER_INFO, ThunkTable, 4)
561     TEST_FIELD_ALIGN (MIDL_SERVER_INFO, ThunkTable, 4)
562     TEST_FIELD_OFFSET(MIDL_SERVER_INFO, ThunkTable, 16)
563     TEST_FIELD_SIZE  (MIDL_SERVER_INFO, pTransferSyntax, 4)
564     TEST_FIELD_ALIGN (MIDL_SERVER_INFO, pTransferSyntax, 4)
565     TEST_FIELD_OFFSET(MIDL_SERVER_INFO, pTransferSyntax, 20)
566     TEST_FIELD_SIZE  (MIDL_SERVER_INFO, nCount, 4)
567     TEST_FIELD_ALIGN (MIDL_SERVER_INFO, nCount, 4)
568     TEST_FIELD_OFFSET(MIDL_SERVER_INFO, nCount, 24)
569     TEST_FIELD_SIZE  (MIDL_SERVER_INFO, pSyntaxInfo, 4)
570     TEST_FIELD_ALIGN (MIDL_SERVER_INFO, pSyntaxInfo, 4)
571     TEST_FIELD_OFFSET(MIDL_SERVER_INFO, pSyntaxInfo, 28)
572 }
573
574 static void test_pack_MIDL_STUB_DESC(void)
575 {
576     /* MIDL_STUB_DESC (pack 4) */
577     TEST_FIELD_SIZE  (MIDL_STUB_DESC, RpcInterfaceInformation, 4)
578     TEST_FIELD_ALIGN (MIDL_STUB_DESC, RpcInterfaceInformation, 4)
579     TEST_FIELD_OFFSET(MIDL_STUB_DESC, RpcInterfaceInformation, 0)
580 }
581
582 static void test_pack_MIDL_STUB_MESSAGE(void)
583 {
584     /* MIDL_STUB_MESSAGE (pack 4) */
585     TEST_FIELD_SIZE  (MIDL_STUB_MESSAGE, RpcMsg, 4)
586     TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, RpcMsg, 4)
587     TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, RpcMsg, 0)
588     TEST_FIELD_SIZE  (MIDL_STUB_MESSAGE, Buffer, 4)
589     TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, Buffer, 4)
590     TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, Buffer, 4)
591     TEST_FIELD_SIZE  (MIDL_STUB_MESSAGE, BufferStart, 4)
592     TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, BufferStart, 4)
593     TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, BufferStart, 8)
594     TEST_FIELD_SIZE  (MIDL_STUB_MESSAGE, BufferEnd, 4)
595     TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, BufferEnd, 4)
596     TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, BufferEnd, 12)
597     TEST_FIELD_SIZE  (MIDL_STUB_MESSAGE, BufferMark, 4)
598     TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, BufferMark, 4)
599     TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, BufferMark, 16)
600     TEST_FIELD_SIZE  (MIDL_STUB_MESSAGE, BufferLength, 4)
601     TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, BufferLength, 4)
602     TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, BufferLength, 20)
603     TEST_FIELD_SIZE  (MIDL_STUB_MESSAGE, MemorySize, 4)
604     TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, MemorySize, 4)
605     TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, MemorySize, 24)
606     TEST_FIELD_SIZE  (MIDL_STUB_MESSAGE, Memory, 4)
607     TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, Memory, 4)
608     TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, Memory, 28)
609     TEST_FIELD_SIZE  (MIDL_STUB_MESSAGE, ReuseBuffer, 4)
610     TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, ReuseBuffer, 4)
611     TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, ReuseBuffer, 36)
612     TEST_FIELD_SIZE  (MIDL_STUB_MESSAGE, pAllocAllNodesContext, 4)
613     TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, pAllocAllNodesContext, 4)
614     TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, pAllocAllNodesContext, 40)
615     TEST_FIELD_SIZE  (MIDL_STUB_MESSAGE, pPointerQueueState, 4)
616     TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, pPointerQueueState, 4)
617     TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, pPointerQueueState, 44)
618     TEST_FIELD_SIZE  (MIDL_STUB_MESSAGE, IgnoreEmbeddedPointers, 4)
619     TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, IgnoreEmbeddedPointers, 4)
620     TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, IgnoreEmbeddedPointers, 48)
621     TEST_FIELD_SIZE  (MIDL_STUB_MESSAGE, PointerBufferMark, 4)
622     TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, PointerBufferMark, 4)
623     TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, PointerBufferMark, 52)
624     TEST_FIELD_SIZE  (MIDL_STUB_MESSAGE, CorrDespIncrement, 1)
625     TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, CorrDespIncrement, 1)
626     TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, CorrDespIncrement, 56)
627     TEST_FIELD_SIZE  (MIDL_STUB_MESSAGE, uFlags, 1)
628     TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, uFlags, 1)
629     TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, uFlags, 57)
630     TEST_FIELD_SIZE  (MIDL_STUB_MESSAGE, MaxCount, 4)
631     TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, MaxCount, 4)
632     TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, MaxCount, 60)
633     TEST_FIELD_SIZE  (MIDL_STUB_MESSAGE, Offset, 4)
634     TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, Offset, 4)
635     TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, Offset, 64)
636     TEST_FIELD_SIZE  (MIDL_STUB_MESSAGE, ActualCount, 4)
637     TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, ActualCount, 4)
638     TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, ActualCount, 68)
639 }
640
641 static void test_pack_MIDL_STUBLESS_PROXY_INFO(void)
642 {
643     /* MIDL_STUBLESS_PROXY_INFO (pack 4) */
644     TEST_TYPE_SIZE   (MIDL_STUBLESS_PROXY_INFO, 24)
645     TEST_TYPE_ALIGN  (MIDL_STUBLESS_PROXY_INFO, 4)
646     TEST_FIELD_SIZE  (MIDL_STUBLESS_PROXY_INFO, pStubDesc, 4)
647     TEST_FIELD_ALIGN (MIDL_STUBLESS_PROXY_INFO, pStubDesc, 4)
648     TEST_FIELD_OFFSET(MIDL_STUBLESS_PROXY_INFO, pStubDesc, 0)
649     TEST_FIELD_SIZE  (MIDL_STUBLESS_PROXY_INFO, ProcFormatString, 4)
650     TEST_FIELD_ALIGN (MIDL_STUBLESS_PROXY_INFO, ProcFormatString, 4)
651     TEST_FIELD_OFFSET(MIDL_STUBLESS_PROXY_INFO, ProcFormatString, 4)
652     TEST_FIELD_SIZE  (MIDL_STUBLESS_PROXY_INFO, FormatStringOffset, 4)
653     TEST_FIELD_ALIGN (MIDL_STUBLESS_PROXY_INFO, FormatStringOffset, 4)
654     TEST_FIELD_OFFSET(MIDL_STUBLESS_PROXY_INFO, FormatStringOffset, 8)
655     TEST_FIELD_SIZE  (MIDL_STUBLESS_PROXY_INFO, pTransferSyntax, 4)
656     TEST_FIELD_ALIGN (MIDL_STUBLESS_PROXY_INFO, pTransferSyntax, 4)
657     TEST_FIELD_OFFSET(MIDL_STUBLESS_PROXY_INFO, pTransferSyntax, 12)
658     TEST_FIELD_SIZE  (MIDL_STUBLESS_PROXY_INFO, nCount, 4)
659     TEST_FIELD_ALIGN (MIDL_STUBLESS_PROXY_INFO, nCount, 4)
660     TEST_FIELD_OFFSET(MIDL_STUBLESS_PROXY_INFO, nCount, 16)
661     TEST_FIELD_SIZE  (MIDL_STUBLESS_PROXY_INFO, pSyntaxInfo, 4)
662     TEST_FIELD_ALIGN (MIDL_STUBLESS_PROXY_INFO, pSyntaxInfo, 4)
663     TEST_FIELD_OFFSET(MIDL_STUBLESS_PROXY_INFO, pSyntaxInfo, 20)
664 }
665
666 static void test_pack_MIDL_SYNTAX_INFO(void)
667 {
668     /* MIDL_SYNTAX_INFO (pack 4) */
669     TEST_TYPE_SIZE   (MIDL_SYNTAX_INFO, 48)
670     TEST_TYPE_ALIGN  (MIDL_SYNTAX_INFO, 4)
671     TEST_FIELD_SIZE  (MIDL_SYNTAX_INFO, TransferSyntax, 20)
672     TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, TransferSyntax, 4)
673     TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, TransferSyntax, 0)
674     TEST_FIELD_SIZE  (MIDL_SYNTAX_INFO, DispatchTable, 4)
675     TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, DispatchTable, 4)
676     TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, DispatchTable, 20)
677     TEST_FIELD_SIZE  (MIDL_SYNTAX_INFO, ProcString, 4)
678     TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, ProcString, 4)
679     TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, ProcString, 24)
680     TEST_FIELD_SIZE  (MIDL_SYNTAX_INFO, FmtStringOffset, 4)
681     TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, FmtStringOffset, 4)
682     TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, FmtStringOffset, 28)
683     TEST_FIELD_SIZE  (MIDL_SYNTAX_INFO, TypeString, 4)
684     TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, TypeString, 4)
685     TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, TypeString, 32)
686     TEST_FIELD_SIZE  (MIDL_SYNTAX_INFO, aUserMarshalQuadruple, 4)
687     TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, aUserMarshalQuadruple, 4)
688     TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, aUserMarshalQuadruple, 36)
689     TEST_FIELD_SIZE  (MIDL_SYNTAX_INFO, pReserved1, 4)
690     TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, pReserved1, 4)
691     TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, pReserved1, 40)
692     TEST_FIELD_SIZE  (MIDL_SYNTAX_INFO, pReserved2, 4)
693     TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, pReserved2, 4)
694     TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, pReserved2, 44)
695 }
696
697 static void test_pack_NDR_CCONTEXT(void)
698 {
699     /* NDR_CCONTEXT */
700     TEST_TYPE_SIZE   (NDR_CCONTEXT, 4)
701     TEST_TYPE_ALIGN  (NDR_CCONTEXT, 4)
702 }
703
704 static void test_pack_NDR_NOTIFY_ROUTINE(void)
705 {
706     /* NDR_NOTIFY_ROUTINE */
707 }
708
709 static void test_pack_NDR_NOTIFY2_ROUTINE(void)
710 {
711     /* NDR_NOTIFY2_ROUTINE */
712 }
713
714 static void test_pack_NDR_RUNDOWN(void)
715 {
716     /* NDR_RUNDOWN */
717 }
718
719 static void test_pack_NDR_SCONTEXT(void)
720 {
721     /* NDR_SCONTEXT */
722     TEST_TYPE_SIZE   (NDR_SCONTEXT, 4)
723     TEST_TYPE_ALIGN  (NDR_SCONTEXT, 4)
724 }
725
726 static void test_pack_NDR_USER_MARSHAL_INFO(void)
727 {
728     /* NDR_USER_MARSHAL_INFO (pack 4) */
729     TEST_FIELD_SIZE  (NDR_USER_MARSHAL_INFO, InformationLevel, 4)
730     TEST_FIELD_ALIGN (NDR_USER_MARSHAL_INFO, InformationLevel, 4)
731     TEST_FIELD_OFFSET(NDR_USER_MARSHAL_INFO, InformationLevel, 0)
732 }
733
734 static void test_pack_NDR_USER_MARSHAL_INFO_LEVEL1(void)
735 {
736     /* NDR_USER_MARSHAL_INFO_LEVEL1 (pack 4) */
737     TEST_FIELD_SIZE  (NDR_USER_MARSHAL_INFO_LEVEL1, Buffer, 4)
738     TEST_FIELD_ALIGN (NDR_USER_MARSHAL_INFO_LEVEL1, Buffer, 4)
739     TEST_FIELD_OFFSET(NDR_USER_MARSHAL_INFO_LEVEL1, Buffer, 0)
740     TEST_FIELD_SIZE  (NDR_USER_MARSHAL_INFO_LEVEL1, BufferSize, 4)
741     TEST_FIELD_ALIGN (NDR_USER_MARSHAL_INFO_LEVEL1, BufferSize, 4)
742     TEST_FIELD_OFFSET(NDR_USER_MARSHAL_INFO_LEVEL1, BufferSize, 4)
743 }
744
745 static void test_pack_PARRAY_INFO(void)
746 {
747     /* PARRAY_INFO */
748     TEST_TYPE_SIZE   (PARRAY_INFO, 4)
749     TEST_TYPE_ALIGN  (PARRAY_INFO, 4)
750     TEST_TARGET_SIZE (PARRAY_INFO, 24)
751     TEST_TARGET_ALIGN(PARRAY_INFO, 4)
752 }
753
754 static void test_pack_PFORMAT_STRING(void)
755 {
756     /* PFORMAT_STRING */
757     TEST_TYPE_SIZE   (PFORMAT_STRING, 4)
758     TEST_TYPE_ALIGN  (PFORMAT_STRING, 4)
759 }
760
761 static void test_pack_PFULL_PTR_TO_REFID_ELEMENT(void)
762 {
763     /* PFULL_PTR_TO_REFID_ELEMENT */
764     TEST_TYPE_SIZE   (PFULL_PTR_TO_REFID_ELEMENT, 4)
765     TEST_TYPE_ALIGN  (PFULL_PTR_TO_REFID_ELEMENT, 4)
766     TEST_TARGET_SIZE (PFULL_PTR_TO_REFID_ELEMENT, 16)
767     TEST_TARGET_ALIGN(PFULL_PTR_TO_REFID_ELEMENT, 4)
768 }
769
770 static void test_pack_PFULL_PTR_XLAT_TABLES(void)
771 {
772     /* PFULL_PTR_XLAT_TABLES */
773     TEST_TYPE_SIZE   (PFULL_PTR_XLAT_TABLES, 4)
774     TEST_TYPE_ALIGN  (PFULL_PTR_XLAT_TABLES, 4)
775 }
776
777 static void test_pack_PGENERIC_BINDING_INFO(void)
778 {
779     /* PGENERIC_BINDING_INFO */
780     TEST_TYPE_SIZE   (PGENERIC_BINDING_INFO, 4)
781     TEST_TYPE_ALIGN  (PGENERIC_BINDING_INFO, 4)
782 }
783
784 static void test_pack_PGENERIC_BINDING_ROUTINE_PAIR(void)
785 {
786     /* PGENERIC_BINDING_ROUTINE_PAIR */
787     TEST_TYPE_SIZE   (PGENERIC_BINDING_ROUTINE_PAIR, 4)
788     TEST_TYPE_ALIGN  (PGENERIC_BINDING_ROUTINE_PAIR, 4)
789 }
790
791 static void test_pack_PMIDL_SERVER_INFO(void)
792 {
793     /* PMIDL_SERVER_INFO */
794     TEST_TYPE_SIZE   (PMIDL_SERVER_INFO, 4)
795     TEST_TYPE_ALIGN  (PMIDL_SERVER_INFO, 4)
796     TEST_TARGET_SIZE (PMIDL_SERVER_INFO, 32)
797     TEST_TARGET_ALIGN(PMIDL_SERVER_INFO, 4)
798 }
799
800 static void test_pack_PMIDL_STUB_DESC(void)
801 {
802     /* PMIDL_STUB_DESC */
803     TEST_TYPE_SIZE   (PMIDL_STUB_DESC, 4)
804     TEST_TYPE_ALIGN  (PMIDL_STUB_DESC, 4)
805 }
806
807 static void test_pack_PMIDL_STUB_MESSAGE(void)
808 {
809     /* PMIDL_STUB_MESSAGE */
810     TEST_TYPE_SIZE   (PMIDL_STUB_MESSAGE, 4)
811     TEST_TYPE_ALIGN  (PMIDL_STUB_MESSAGE, 4)
812 }
813
814 static void test_pack_PMIDL_STUBLESS_PROXY_INFO(void)
815 {
816     /* PMIDL_STUBLESS_PROXY_INFO */
817     TEST_TYPE_SIZE   (PMIDL_STUBLESS_PROXY_INFO, 4)
818     TEST_TYPE_ALIGN  (PMIDL_STUBLESS_PROXY_INFO, 4)
819     TEST_TARGET_SIZE (PMIDL_STUBLESS_PROXY_INFO, 24)
820     TEST_TARGET_ALIGN(PMIDL_STUBLESS_PROXY_INFO, 4)
821 }
822
823 static void test_pack_PMIDL_SYNTAX_INFO(void)
824 {
825     /* PMIDL_SYNTAX_INFO */
826     TEST_TYPE_SIZE   (PMIDL_SYNTAX_INFO, 4)
827     TEST_TYPE_ALIGN  (PMIDL_SYNTAX_INFO, 4)
828     TEST_TARGET_SIZE (PMIDL_SYNTAX_INFO, 48)
829     TEST_TARGET_ALIGN(PMIDL_SYNTAX_INFO, 4)
830 }
831
832 static void test_pack_PNDR_ASYNC_MESSAGE(void)
833 {
834     /* PNDR_ASYNC_MESSAGE */
835     TEST_TYPE_SIZE   (PNDR_ASYNC_MESSAGE, 4)
836     TEST_TYPE_ALIGN  (PNDR_ASYNC_MESSAGE, 4)
837 }
838
839 static void test_pack_PNDR_CORRELATION_INFO(void)
840 {
841     /* PNDR_CORRELATION_INFO */
842     TEST_TYPE_SIZE   (PNDR_CORRELATION_INFO, 4)
843     TEST_TYPE_ALIGN  (PNDR_CORRELATION_INFO, 4)
844 }
845
846 static void test_pack_PSCONTEXT_QUEUE(void)
847 {
848     /* PSCONTEXT_QUEUE */
849     TEST_TYPE_SIZE   (PSCONTEXT_QUEUE, 4)
850     TEST_TYPE_ALIGN  (PSCONTEXT_QUEUE, 4)
851     TEST_TARGET_SIZE (PSCONTEXT_QUEUE, 8)
852     TEST_TARGET_ALIGN(PSCONTEXT_QUEUE, 4)
853 }
854
855 static void test_pack_PXMIT_ROUTINE_QUINTUPLE(void)
856 {
857     /* PXMIT_ROUTINE_QUINTUPLE */
858     TEST_TYPE_SIZE   (PXMIT_ROUTINE_QUINTUPLE, 4)
859     TEST_TYPE_ALIGN  (PXMIT_ROUTINE_QUINTUPLE, 4)
860 }
861
862 static void test_pack_SCONTEXT_QUEUE(void)
863 {
864     /* SCONTEXT_QUEUE (pack 4) */
865     TEST_TYPE_SIZE   (SCONTEXT_QUEUE, 8)
866     TEST_TYPE_ALIGN  (SCONTEXT_QUEUE, 4)
867     TEST_FIELD_SIZE  (SCONTEXT_QUEUE, NumberOfObjects, 4)
868     TEST_FIELD_ALIGN (SCONTEXT_QUEUE, NumberOfObjects, 4)
869     TEST_FIELD_OFFSET(SCONTEXT_QUEUE, NumberOfObjects, 0)
870     TEST_FIELD_SIZE  (SCONTEXT_QUEUE, ArrayOfObjects, 4)
871     TEST_FIELD_ALIGN (SCONTEXT_QUEUE, ArrayOfObjects, 4)
872     TEST_FIELD_OFFSET(SCONTEXT_QUEUE, ArrayOfObjects, 4)
873 }
874
875 static void test_pack_SERVER_ROUTINE(void)
876 {
877     /* SERVER_ROUTINE */
878 }
879
880 static void test_pack_STUB_THUNK(void)
881 {
882     /* STUB_THUNK */
883 }
884
885 static void test_pack_USER_MARSHAL_CB(void)
886 {
887     /* USER_MARSHAL_CB (pack 4) */
888     TEST_FIELD_SIZE  (USER_MARSHAL_CB, Flags, 4)
889     TEST_FIELD_ALIGN (USER_MARSHAL_CB, Flags, 4)
890     TEST_FIELD_OFFSET(USER_MARSHAL_CB, Flags, 0)
891     TEST_FIELD_SIZE  (USER_MARSHAL_CB, pStubMsg, 4)
892     TEST_FIELD_ALIGN (USER_MARSHAL_CB, pStubMsg, 4)
893     TEST_FIELD_OFFSET(USER_MARSHAL_CB, pStubMsg, 4)
894     TEST_FIELD_SIZE  (USER_MARSHAL_CB, pReserve, 4)
895     TEST_FIELD_ALIGN (USER_MARSHAL_CB, pReserve, 4)
896     TEST_FIELD_OFFSET(USER_MARSHAL_CB, pReserve, 8)
897     TEST_FIELD_SIZE  (USER_MARSHAL_CB, Signature, 4)
898     TEST_FIELD_ALIGN (USER_MARSHAL_CB, Signature, 4)
899     TEST_FIELD_OFFSET(USER_MARSHAL_CB, Signature, 12)
900 }
901
902 static void test_pack_USER_MARSHAL_FREEING_ROUTINE(void)
903 {
904     /* USER_MARSHAL_FREEING_ROUTINE */
905 }
906
907 static void test_pack_USER_MARSHAL_MARSHALLING_ROUTINE(void)
908 {
909     /* USER_MARSHAL_MARSHALLING_ROUTINE */
910 }
911
912 static void test_pack_USER_MARSHAL_ROUTINE_QUADRUPLE(void)
913 {
914     /* USER_MARSHAL_ROUTINE_QUADRUPLE (pack 4) */
915 }
916
917 static void test_pack_USER_MARSHAL_SIZING_ROUTINE(void)
918 {
919     /* USER_MARSHAL_SIZING_ROUTINE */
920 }
921
922 static void test_pack_USER_MARSHAL_UNMARSHALLING_ROUTINE(void)
923 {
924     /* USER_MARSHAL_UNMARSHALLING_ROUTINE */
925 }
926
927 static void test_pack_XMIT_HELPER_ROUTINE(void)
928 {
929     /* XMIT_HELPER_ROUTINE */
930 }
931
932 static void test_pack_XMIT_ROUTINE_QUINTUPLE(void)
933 {
934     /* XMIT_ROUTINE_QUINTUPLE (pack 4) */
935 }
936
937 static void test_pack_PRPC_STUB_FUNCTION(void)
938 {
939     /* PRPC_STUB_FUNCTION */
940 }
941
942 static void test_pack(void)
943 {
944     test_pack_ARRAY_INFO();
945     test_pack_COMM_FAULT_OFFSETS();
946     test_pack_CS_STUB_INFO();
947     test_pack_EXPR_EVAL();
948     test_pack_FULL_PTR_TO_REFID_ELEMENT();
949     test_pack_FULL_PTR_XLAT_TABLES();
950     test_pack_GENERIC_BINDING_INFO();
951     test_pack_GENERIC_BINDING_ROUTINE_PAIR();
952     test_pack_I_RPC_HANDLE();
953     test_pack_MALLOC_FREE_STRUCT();
954     test_pack_MIDL_FORMAT_STRING();
955     test_pack_MIDL_SERVER_INFO();
956     test_pack_MIDL_STUBLESS_PROXY_INFO();
957     test_pack_MIDL_STUB_DESC();
958     test_pack_MIDL_STUB_MESSAGE();
959     test_pack_MIDL_SYNTAX_INFO();
960     test_pack_NDR_CCONTEXT();
961     test_pack_NDR_NOTIFY2_ROUTINE();
962     test_pack_NDR_NOTIFY_ROUTINE();
963     test_pack_NDR_RUNDOWN();
964     test_pack_NDR_SCONTEXT();
965     test_pack_NDR_USER_MARSHAL_INFO();
966     test_pack_NDR_USER_MARSHAL_INFO_LEVEL1();
967     test_pack_PARRAY_INFO();
968     test_pack_PFORMAT_STRING();
969     test_pack_PFULL_PTR_TO_REFID_ELEMENT();
970     test_pack_PFULL_PTR_XLAT_TABLES();
971     test_pack_PGENERIC_BINDING_INFO();
972     test_pack_PGENERIC_BINDING_ROUTINE_PAIR();
973     test_pack_PMIDL_SERVER_INFO();
974     test_pack_PMIDL_STUBLESS_PROXY_INFO();
975     test_pack_PMIDL_STUB_DESC();
976     test_pack_PMIDL_STUB_MESSAGE();
977     test_pack_PMIDL_SYNTAX_INFO();
978     test_pack_PNDR_ASYNC_MESSAGE();
979     test_pack_PNDR_CORRELATION_INFO();
980     test_pack_PRPC_CLIENT_INTERFACE();
981     test_pack_PRPC_DISPATCH_TABLE();
982     test_pack_PRPC_MESSAGE();
983     test_pack_PRPC_POLICY();
984     test_pack_PRPC_PROTSEQ_ENDPOINT();
985     test_pack_PRPC_SERVER_INTERFACE();
986     test_pack_PRPC_STUB_FUNCTION();
987     test_pack_PRPC_SYNTAX_IDENTIFIER();
988     test_pack_PSCONTEXT_QUEUE();
989     test_pack_PXMIT_ROUTINE_QUINTUPLE();
990     test_pack_RPC_AUTHZ_HANDLE();
991     test_pack_RPC_AUTH_IDENTITY_HANDLE();
992     test_pack_RPC_AUTH_KEY_RETRIEVAL_FN();
993     test_pack_RPC_BINDING_HANDLE();
994     test_pack_RPC_BINDING_VECTOR();
995     test_pack_RPC_CLIENT_INTERFACE();
996     test_pack_RPC_DISPATCH_FUNCTION();
997     test_pack_RPC_DISPATCH_TABLE();
998     test_pack_RPC_IF_HANDLE();
999     test_pack_RPC_IF_ID();
1000     test_pack_RPC_MESSAGE();
1001     test_pack_RPC_POLICY();
1002     test_pack_RPC_PROTSEQ_ENDPOINT();
1003     test_pack_RPC_SERVER_INTERFACE();
1004     test_pack_RPC_STATUS();
1005     test_pack_RPC_SYNTAX_IDENTIFIER();
1006     test_pack_RPC_VERSION();
1007     test_pack_SCONTEXT_QUEUE();
1008     test_pack_SERVER_ROUTINE();
1009     test_pack_STUB_THUNK();
1010     test_pack_USER_MARSHAL_CB();
1011     test_pack_USER_MARSHAL_FREEING_ROUTINE();
1012     test_pack_USER_MARSHAL_MARSHALLING_ROUTINE();
1013     test_pack_USER_MARSHAL_ROUTINE_QUADRUPLE();
1014     test_pack_USER_MARSHAL_SIZING_ROUTINE();
1015     test_pack_USER_MARSHAL_UNMARSHALLING_ROUTINE();
1016     test_pack_UUID_VECTOR();
1017     test_pack_XMIT_HELPER_ROUTINE();
1018     test_pack_XMIT_ROUTINE_QUINTUPLE();
1019 }
1020
1021 START_TEST(generated)
1022 {
1023 #ifdef _WIN64
1024     ok(0, "The type size / alignment tests don't support Win64 yet\n");
1025 #else
1026     test_pack();
1027 #endif
1028 }