generated.c 20.7 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
/* File generated automatically from tools/winapi/test.dat; do not edit! */
/* This file can be copied, modified and distributed without restriction. */

/*
 * Unit tests for data structure packing
 */

#define WINVER 0x0501
#define _WIN32_IE 0x0501
#define _WIN32_WINNT 0x0501

#define WINE_NOWINSOCK

#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "rpc.h"
#include "rpcndr.h"
#include "rpcproxy.h"

#include "wine/test.h"

/***********************************************************************
 * Compability macros
 */

#define DWORD_PTR UINT_PTR
#define LONG_PTR INT_PTR
#define ULONG_PTR UINT_PTR

/***********************************************************************
 * Windows API extension
 */

#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus)
# define FIELD_ALIGNMENT(type, field) __alignof(((type*)0)->field)
#elif defined(__GNUC__)
# define FIELD_ALIGNMENT(type, field) __alignof__(((type*)0)->field)
#else
/* FIXME: Not sure if is possible to do without compiler extension */
#endif

#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus)
# define _TYPE_ALIGNMENT(type) __alignof(type)
#elif defined(__GNUC__)
# define _TYPE_ALIGNMENT(type) __alignof__(type)
#else
/*
 * FIXME: Not sure if is possible to do without compiler extension
 *        (if type is not just a name that is, if so the normal)
 *         TYPE_ALIGNMENT can be used)
 */
#endif

#if defined(TYPE_ALIGNMENT) && defined(_MSC_VER) && _MSC_VER >= 800 && !defined(__cplusplus)
#pragma warning(disable:4116)
#endif

#if !defined(TYPE_ALIGNMENT) && defined(_TYPE_ALIGNMENT)
# define TYPE_ALIGNMENT _TYPE_ALIGNMENT
#endif

/***********************************************************************
 * Test helper macros
 */

#ifdef FIELD_ALIGNMENT
# define TEST_FIELD_ALIGNMENT(type, field, align) \
   ok(FIELD_ALIGNMENT(type, field) == align, \
       "FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \
71
           (int)FIELD_ALIGNMENT(type, field))
72 73 74 75 76 77 78
#else
# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)
#endif

#define TEST_FIELD_OFFSET(type, field, offset) \
    ok(FIELD_OFFSET(type, field) == offset, \
        "FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")\n", \
79
             (long int)FIELD_OFFSET(type, field))
80 81 82

#ifdef _TYPE_ALIGNMENT
#define TEST__TYPE_ALIGNMENT(type, align) \
83
    ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)_TYPE_ALIGNMENT(type))
84 85 86 87 88 89
#else
# define TEST__TYPE_ALIGNMENT(type, align) do { } while (0)
#endif

#ifdef TYPE_ALIGNMENT
#define TEST_TYPE_ALIGNMENT(type, align) \
90
    ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)TYPE_ALIGNMENT(type))
91 92 93 94 95
#else
# define TEST_TYPE_ALIGNMENT(type, align) do { } while (0)
#endif

#define TEST_TYPE_SIZE(type, size) \
96
    ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", ((int) sizeof(type)))
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357

/***********************************************************************
 * Test macros
 */

#define TEST_FIELD(type, field_type, field_name, field_offset, field_size, field_align) \
  TEST_TYPE_SIZE(field_type, field_size); \
  TEST_FIELD_ALIGNMENT(type, field_name, field_align); \
  TEST_FIELD_OFFSET(type, field_name, field_offset); \

#define TEST_TYPE(type, size, align) \
  TEST_TYPE_ALIGNMENT(type, align); \
  TEST_TYPE_SIZE(type, size)

#define TEST_TYPE_POINTER(type, size, align) \
    TEST__TYPE_ALIGNMENT(*(type)0, align); \
    TEST_TYPE_SIZE(*(type)0, size)

#define TEST_TYPE_SIGNED(type) \
    ok((type) -1 < 0, "(" #type ") -1 < 0\n");

#define TEST_TYPE_UNSIGNED(type) \
     ok((type) -1 > 0, "(" #type ") -1 > 0\n");

static void test_pack_I_RPC_HANDLE(void)
{
    /* I_RPC_HANDLE */
    TEST_TYPE(I_RPC_HANDLE, 4, 4);
}

static void test_pack_RPC_STATUS(void)
{
    /* RPC_STATUS */
    TEST_TYPE(RPC_STATUS, 4, 4);
    TEST_TYPE_SIGNED(RPC_STATUS);
}

static void test_pack_PRPC_POLICY(void)
{
    /* PRPC_POLICY */
    TEST_TYPE(PRPC_POLICY, 4, 4);
    TEST_TYPE_POINTER(PRPC_POLICY, 12, 4);
}

static void test_pack_RPC_AUTH_IDENTITY_HANDLE(void)
{
    /* RPC_AUTH_IDENTITY_HANDLE */
    TEST_TYPE(RPC_AUTH_IDENTITY_HANDLE, 4, 4);
}

static void test_pack_RPC_AUTH_KEY_RETRIEVAL_FN(void)
{
    /* RPC_AUTH_KEY_RETRIEVAL_FN */
}

static void test_pack_RPC_AUTHZ_HANDLE(void)
{
    /* RPC_AUTHZ_HANDLE */
    TEST_TYPE(RPC_AUTHZ_HANDLE, 4, 4);
}

static void test_pack_RPC_BINDING_HANDLE(void)
{
    /* RPC_BINDING_HANDLE */
    TEST_TYPE(RPC_BINDING_HANDLE, 4, 4);
}

static void test_pack_RPC_BINDING_VECTOR(void)
{
    /* RPC_BINDING_VECTOR (pack 4) */
    TEST_TYPE(RPC_BINDING_VECTOR, 8, 4);
    TEST_FIELD(RPC_BINDING_VECTOR, unsigned long, Count, 0, 4, 4);
    TEST_FIELD(RPC_BINDING_VECTOR, RPC_BINDING_HANDLE[1], BindingH, 4, 4, 4);
}

static void test_pack_RPC_IF_HANDLE(void)
{
    /* RPC_IF_HANDLE */
    TEST_TYPE(RPC_IF_HANDLE, 4, 4);
}

static void test_pack_RPC_IF_ID(void)
{
    /* RPC_IF_ID (pack 4) */
}

static void test_pack_RPC_POLICY(void)
{
    /* RPC_POLICY (pack 4) */
    TEST_TYPE(RPC_POLICY, 12, 4);
    TEST_FIELD(RPC_POLICY, unsigned int, Length, 0, 4, 4);
    TEST_FIELD(RPC_POLICY, unsigned long, EndpointFlags, 4, 4, 4);
    TEST_FIELD(RPC_POLICY, unsigned long, NICFlags, 8, 4, 4);
}

static void test_pack_UUID_VECTOR(void)
{
    /* UUID_VECTOR (pack 4) */
    TEST_TYPE(UUID_VECTOR, 8, 4);
    TEST_FIELD(UUID_VECTOR, unsigned long, Count, 0, 4, 4);
    TEST_FIELD(UUID_VECTOR, UUID *[1], Uuid, 4, 4, 4);
}

static void test_pack_PRPC_CLIENT_INTERFACE(void)
{
    /* PRPC_CLIENT_INTERFACE */
    TEST_TYPE(PRPC_CLIENT_INTERFACE, 4, 4);
}

static void test_pack_PRPC_DISPATCH_TABLE(void)
{
    /* PRPC_DISPATCH_TABLE */
    TEST_TYPE(PRPC_DISPATCH_TABLE, 4, 4);
    TEST_TYPE_POINTER(PRPC_DISPATCH_TABLE, 12, 4);
}

static void test_pack_PRPC_MESSAGE(void)
{
    /* PRPC_MESSAGE */
    TEST_TYPE(PRPC_MESSAGE, 4, 4);
    TEST_TYPE_POINTER(PRPC_MESSAGE, 44, 4);
}

static void test_pack_PRPC_PROTSEQ_ENDPOINT(void)
{
    /* PRPC_PROTSEQ_ENDPOINT */
    TEST_TYPE(PRPC_PROTSEQ_ENDPOINT, 4, 4);
    TEST_TYPE_POINTER(PRPC_PROTSEQ_ENDPOINT, 8, 4);
}

static void test_pack_PRPC_SERVER_INTERFACE(void)
{
    /* PRPC_SERVER_INTERFACE */
    TEST_TYPE(PRPC_SERVER_INTERFACE, 4, 4);
}

static void test_pack_PRPC_SYNTAX_IDENTIFIER(void)
{
    /* PRPC_SYNTAX_IDENTIFIER */
    TEST_TYPE(PRPC_SYNTAX_IDENTIFIER, 4, 4);
    TEST_TYPE_POINTER(PRPC_SYNTAX_IDENTIFIER, 20, 4);
}

static void test_pack_RPC_CLIENT_INTERFACE(void)
{
    /* RPC_CLIENT_INTERFACE (pack 4) */
    TEST_FIELD(RPC_CLIENT_INTERFACE, unsigned int, Length, 0, 4, 4);
}

static void test_pack_RPC_DISPATCH_FUNCTION(void)
{
    /* RPC_DISPATCH_FUNCTION */
}

static void test_pack_RPC_DISPATCH_TABLE(void)
{
    /* RPC_DISPATCH_TABLE (pack 4) */
    TEST_TYPE(RPC_DISPATCH_TABLE, 12, 4);
    TEST_FIELD(RPC_DISPATCH_TABLE, unsigned int, DispatchTableCount, 0, 4, 4);
    TEST_FIELD(RPC_DISPATCH_TABLE, RPC_DISPATCH_FUNCTION*, DispatchTable, 4, 4, 4);
    TEST_FIELD(RPC_DISPATCH_TABLE, LONG_PTR, Reserved, 8, 4, 4);
}

static void test_pack_RPC_MESSAGE(void)
{
    /* RPC_MESSAGE (pack 4) */
    TEST_TYPE(RPC_MESSAGE, 44, 4);
    TEST_FIELD(RPC_MESSAGE, RPC_BINDING_HANDLE, Handle, 0, 4, 4);
    TEST_FIELD(RPC_MESSAGE, unsigned long, DataRepresentation, 4, 4, 4);
    TEST_FIELD(RPC_MESSAGE, void*, Buffer, 8, 4, 4);
    TEST_FIELD(RPC_MESSAGE, unsigned int, BufferLength, 12, 4, 4);
    TEST_FIELD(RPC_MESSAGE, unsigned int, ProcNum, 16, 4, 4);
    TEST_FIELD(RPC_MESSAGE, PRPC_SYNTAX_IDENTIFIER, TransferSyntax, 20, 4, 4);
    TEST_FIELD(RPC_MESSAGE, void*, RpcInterfaceInformation, 24, 4, 4);
    TEST_FIELD(RPC_MESSAGE, void*, ReservedForRuntime, 28, 4, 4);
    TEST_FIELD(RPC_MESSAGE, RPC_MGR_EPV*, ManagerEpv, 32, 4, 4);
    TEST_FIELD(RPC_MESSAGE, void*, ImportContext, 36, 4, 4);
    TEST_FIELD(RPC_MESSAGE, unsigned long, RpcFlags, 40, 4, 4);
}

static void test_pack_RPC_PROTSEQ_ENDPOINT(void)
{
    /* RPC_PROTSEQ_ENDPOINT (pack 4) */
    TEST_TYPE(RPC_PROTSEQ_ENDPOINT, 8, 4);
    TEST_FIELD(RPC_PROTSEQ_ENDPOINT, unsigned char*, RpcProtocolSequence, 0, 4, 4);
    TEST_FIELD(RPC_PROTSEQ_ENDPOINT, unsigned char*, Endpoint, 4, 4, 4);
}

static void test_pack_RPC_SERVER_INTERFACE(void)
{
    /* RPC_SERVER_INTERFACE (pack 4) */
    TEST_FIELD(RPC_SERVER_INTERFACE, unsigned int, Length, 0, 4, 4);
}

static void test_pack_RPC_SYNTAX_IDENTIFIER(void)
{
    /* RPC_SYNTAX_IDENTIFIER (pack 4) */
    TEST_TYPE(RPC_SYNTAX_IDENTIFIER, 20, 4);
    TEST_FIELD(RPC_SYNTAX_IDENTIFIER, GUID, SyntaxGUID, 0, 16, 4);
    TEST_FIELD(RPC_SYNTAX_IDENTIFIER, RPC_VERSION, SyntaxVersion, 16, 4, 2);
}

static void test_pack_RPC_VERSION(void)
{
    /* RPC_VERSION (pack 4) */
    TEST_TYPE(RPC_VERSION, 4, 2);
    TEST_FIELD(RPC_VERSION, unsigned short, MajorVersion, 0, 2, 2);
    TEST_FIELD(RPC_VERSION, unsigned short, MinorVersion, 2, 2, 2);
}

static void test_pack_ARRAY_INFO(void)
{
    /* ARRAY_INFO (pack 4) */
    TEST_TYPE(ARRAY_INFO, 24, 4);
    TEST_FIELD(ARRAY_INFO, long, Dimension, 0, 4, 4);
    TEST_FIELD(ARRAY_INFO, unsigned long *, BufferConformanceMark, 4, 4, 4);
    TEST_FIELD(ARRAY_INFO, unsigned long *, BufferVarianceMark, 8, 4, 4);
    TEST_FIELD(ARRAY_INFO, unsigned long *, MaxCountArray, 12, 4, 4);
    TEST_FIELD(ARRAY_INFO, unsigned long *, OffsetArray, 16, 4, 4);
    TEST_FIELD(ARRAY_INFO, unsigned long *, ActualCountArray, 20, 4, 4);
}

static void test_pack_COMM_FAULT_OFFSETS(void)
{
    /* COMM_FAULT_OFFSETS (pack 4) */
    TEST_TYPE(COMM_FAULT_OFFSETS, 4, 2);
    TEST_FIELD(COMM_FAULT_OFFSETS, short, CommOffset, 0, 2, 2);
    TEST_FIELD(COMM_FAULT_OFFSETS, short, FaultOffset, 2, 2, 2);
}

static void test_pack_CS_STUB_INFO(void)
{
    /* CS_STUB_INFO (pack 4) */
    TEST_TYPE(CS_STUB_INFO, 12, 4);
    TEST_FIELD(CS_STUB_INFO, unsigned long, WireCodeset, 0, 4, 4);
    TEST_FIELD(CS_STUB_INFO, unsigned long, DesiredReceivingCodeset, 4, 4, 4);
    TEST_FIELD(CS_STUB_INFO, void *, CSArrayInfo, 8, 4, 4);
}

static void test_pack_EXPR_EVAL(void)
{
    /* EXPR_EVAL */
}

static void test_pack_FULL_PTR_TO_REFID_ELEMENT(void)
{
    /* FULL_PTR_TO_REFID_ELEMENT (pack 4) */
    TEST_TYPE(FULL_PTR_TO_REFID_ELEMENT, 16, 4);
    TEST_FIELD(FULL_PTR_TO_REFID_ELEMENT, struct _FULL_PTR_TO_REFID_ELEMENT *, Next, 0, 4, 4);
    TEST_FIELD(FULL_PTR_TO_REFID_ELEMENT, void *, Pointer, 4, 4, 4);
    TEST_FIELD(FULL_PTR_TO_REFID_ELEMENT, unsigned long, RefId, 8, 4, 4);
    TEST_FIELD(FULL_PTR_TO_REFID_ELEMENT, unsigned char, State, 12, 1, 1);
}

static void test_pack_FULL_PTR_XLAT_TABLES(void)
{
    /* FULL_PTR_XLAT_TABLES (pack 4) */
}

static void test_pack_GENERIC_BINDING_INFO(void)
{
358 359 360
    /* GENERIC_BINDING_INFO (pack 4) */
    TEST_FIELD(GENERIC_BINDING_INFO, void *, pObj, 0, 4, 4);
    TEST_FIELD(GENERIC_BINDING_INFO, unsigned int, Size, 4, 4, 4);
361 362 363 364
}

static void test_pack_GENERIC_BINDING_ROUTINE_PAIR(void)
{
365
    /* GENERIC_BINDING_ROUTINE_PAIR (pack 4) */
366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492
}

static void test_pack_MALLOC_FREE_STRUCT(void)
{
    /* MALLOC_FREE_STRUCT (pack 4) */
}

static void test_pack_MIDL_FORMAT_STRING(void)
{
    /* MIDL_FORMAT_STRING (pack 4) */
    TEST_FIELD(MIDL_FORMAT_STRING, short, Pad, 0, 2, 2);
}

static void test_pack_MIDL_SERVER_INFO(void)
{
    /* MIDL_SERVER_INFO (pack 4) */
    TEST_TYPE(MIDL_SERVER_INFO, 32, 4);
    TEST_FIELD(MIDL_SERVER_INFO, PMIDL_STUB_DESC, pStubDesc, 0, 4, 4);
    TEST_FIELD(MIDL_SERVER_INFO, SERVER_ROUTINE *, DispatchTable, 4, 4, 4);
    TEST_FIELD(MIDL_SERVER_INFO, PFORMAT_STRING, ProcString, 8, 4, 4);
    TEST_FIELD(MIDL_SERVER_INFO, unsigned short *, FmtStringOffset, 12, 4, 4);
    TEST_FIELD(MIDL_SERVER_INFO, STUB_THUNK *, ThunkTable, 16, 4, 4);
    TEST_FIELD(MIDL_SERVER_INFO, PRPC_SYNTAX_IDENTIFIER, pTransferSyntax, 20, 4, 4);
    TEST_FIELD(MIDL_SERVER_INFO, ULONG_PTR, nCount, 24, 4, 4);
    TEST_FIELD(MIDL_SERVER_INFO, PMIDL_SYNTAX_INFO, pSyntaxInfo, 28, 4, 4);
}

static void test_pack_MIDL_STUB_DESC(void)
{
    /* MIDL_STUB_DESC (pack 4) */
    TEST_FIELD(MIDL_STUB_DESC, void *, RpcInterfaceInformation, 0, 4, 4);
}

static void test_pack_MIDL_STUB_MESSAGE(void)
{
    /* MIDL_STUB_MESSAGE (pack 4) */
    TEST_FIELD(MIDL_STUB_MESSAGE, PRPC_MESSAGE, RpcMsg, 0, 4, 4);
    TEST_FIELD(MIDL_STUB_MESSAGE, unsigned char *, Buffer, 4, 4, 4);
    TEST_FIELD(MIDL_STUB_MESSAGE, unsigned char *, BufferStart, 8, 4, 4);
    TEST_FIELD(MIDL_STUB_MESSAGE, unsigned char *, BufferEnd, 12, 4, 4);
    TEST_FIELD(MIDL_STUB_MESSAGE, unsigned char *, BufferMark, 16, 4, 4);
    TEST_FIELD(MIDL_STUB_MESSAGE, unsigned long, BufferLength, 20, 4, 4);
    TEST_FIELD(MIDL_STUB_MESSAGE, unsigned long, MemorySize, 24, 4, 4);
    TEST_FIELD(MIDL_STUB_MESSAGE, unsigned char *, Memory, 28, 4, 4);
    TEST_FIELD(MIDL_STUB_MESSAGE, int, IsClient, 32, 4, 4);
    TEST_FIELD(MIDL_STUB_MESSAGE, int, ReuseBuffer, 36, 4, 4);
    TEST_FIELD(MIDL_STUB_MESSAGE, struct NDR_ALLOC_ALL_NODES_CONTEXT *, pAllocAllNodesContext, 40, 4, 4);
    TEST_FIELD(MIDL_STUB_MESSAGE, struct NDR_POINTER_QUEUE_STATE *, pPointerQueueState, 44, 4, 4);
    TEST_FIELD(MIDL_STUB_MESSAGE, int, IgnoreEmbeddedPointers, 48, 4, 4);
    TEST_FIELD(MIDL_STUB_MESSAGE, unsigned char *, PointerBufferMark, 52, 4, 4);
    TEST_FIELD(MIDL_STUB_MESSAGE, unsigned char, fBufferValid, 56, 1, 1);
    TEST_FIELD(MIDL_STUB_MESSAGE, unsigned char, uFlags, 57, 1, 1);
    TEST_FIELD(MIDL_STUB_MESSAGE, ULONG_PTR, MaxCount, 60, 4, 4);
    TEST_FIELD(MIDL_STUB_MESSAGE, unsigned long, Offset, 64, 4, 4);
    TEST_FIELD(MIDL_STUB_MESSAGE, unsigned long, ActualCount, 68, 4, 4);
}

static void test_pack_MIDL_STUBLESS_PROXY_INFO(void)
{
    /* MIDL_STUBLESS_PROXY_INFO (pack 4) */
    TEST_TYPE(MIDL_STUBLESS_PROXY_INFO, 24, 4);
    TEST_FIELD(MIDL_STUBLESS_PROXY_INFO, PMIDL_STUB_DESC, pStubDesc, 0, 4, 4);
    TEST_FIELD(MIDL_STUBLESS_PROXY_INFO, PFORMAT_STRING, ProcFormatString, 4, 4, 4);
    TEST_FIELD(MIDL_STUBLESS_PROXY_INFO, unsigned short *, FormatStringOffset, 8, 4, 4);
    TEST_FIELD(MIDL_STUBLESS_PROXY_INFO, PRPC_SYNTAX_IDENTIFIER, pTransferSyntax, 12, 4, 4);
    TEST_FIELD(MIDL_STUBLESS_PROXY_INFO, ULONG_PTR, nCount, 16, 4, 4);
    TEST_FIELD(MIDL_STUBLESS_PROXY_INFO, PMIDL_SYNTAX_INFO, pSyntaxInfo, 20, 4, 4);
}

static void test_pack_MIDL_SYNTAX_INFO(void)
{
    /* MIDL_SYNTAX_INFO (pack 4) */
}

static void test_pack_NDR_CCONTEXT(void)
{
    /* NDR_CCONTEXT */
    TEST_TYPE(NDR_CCONTEXT, 4, 4);
}

static void test_pack_NDR_NOTIFY_ROUTINE(void)
{
    /* NDR_NOTIFY_ROUTINE */
}

static void test_pack_NDR_NOTIFY2_ROUTINE(void)
{
    /* NDR_NOTIFY2_ROUTINE */
}

static void test_pack_NDR_RUNDOWN(void)
{
    /* NDR_RUNDOWN */
}

static void test_pack_NDR_SCONTEXT(void)
{
    /* NDR_SCONTEXT */
    TEST_TYPE(NDR_SCONTEXT, 4, 4);
}

static void test_pack_PARRAY_INFO(void)
{
    /* PARRAY_INFO */
    TEST_TYPE(PARRAY_INFO, 4, 4);
    TEST_TYPE_POINTER(PARRAY_INFO, 24, 4);
}

static void test_pack_PFORMAT_STRING(void)
{
    /* PFORMAT_STRING */
    TEST_TYPE(PFORMAT_STRING, 4, 4);
}

static void test_pack_PFULL_PTR_TO_REFID_ELEMENT(void)
{
    /* PFULL_PTR_TO_REFID_ELEMENT */
    TEST_TYPE(PFULL_PTR_TO_REFID_ELEMENT, 4, 4);
    TEST_TYPE_POINTER(PFULL_PTR_TO_REFID_ELEMENT, 16, 4);
}

static void test_pack_PFULL_PTR_XLAT_TABLES(void)
{
    /* PFULL_PTR_XLAT_TABLES */
    TEST_TYPE(PFULL_PTR_XLAT_TABLES, 4, 4);
}

493 494 495 496 497 498 499 500 501 502 503 504
static void test_pack_PGENERIC_BINDING_INFO(void)
{
    /* PGENERIC_BINDING_INFO */
    TEST_TYPE(PGENERIC_BINDING_INFO, 4, 4);
}

static void test_pack_PGENERIC_BINDING_ROUTINE_PAIR(void)
{
    /* PGENERIC_BINDING_ROUTINE_PAIR */
    TEST_TYPE(PGENERIC_BINDING_ROUTINE_PAIR, 4, 4);
}

505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579
static void test_pack_PMIDL_SERVER_INFO(void)
{
    /* PMIDL_SERVER_INFO */
    TEST_TYPE(PMIDL_SERVER_INFO, 4, 4);
    TEST_TYPE_POINTER(PMIDL_SERVER_INFO, 32, 4);
}

static void test_pack_PMIDL_STUB_DESC(void)
{
    /* PMIDL_STUB_DESC */
    TEST_TYPE(PMIDL_STUB_DESC, 4, 4);
}

static void test_pack_PMIDL_STUB_MESSAGE(void)
{
    /* PMIDL_STUB_MESSAGE */
    TEST_TYPE(PMIDL_STUB_MESSAGE, 4, 4);
}

static void test_pack_PMIDL_STUBLESS_PROXY_INFO(void)
{
    /* PMIDL_STUBLESS_PROXY_INFO */
    TEST_TYPE(PMIDL_STUBLESS_PROXY_INFO, 4, 4);
    TEST_TYPE_POINTER(PMIDL_STUBLESS_PROXY_INFO, 24, 4);
}

static void test_pack_PMIDL_SYNTAX_INFO(void)
{
    /* PMIDL_SYNTAX_INFO */
    TEST_TYPE(PMIDL_SYNTAX_INFO, 4, 4);
}

static void test_pack_PNDR_ASYNC_MESSAGE(void)
{
    /* PNDR_ASYNC_MESSAGE */
    TEST_TYPE(PNDR_ASYNC_MESSAGE, 4, 4);
}

static void test_pack_PNDR_CORRELATION_INFO(void)
{
    /* PNDR_CORRELATION_INFO */
    TEST_TYPE(PNDR_CORRELATION_INFO, 4, 4);
}

static void test_pack_PSCONTEXT_QUEUE(void)
{
    /* PSCONTEXT_QUEUE */
    TEST_TYPE(PSCONTEXT_QUEUE, 4, 4);
    TEST_TYPE_POINTER(PSCONTEXT_QUEUE, 8, 4);
}

static void test_pack_PXMIT_ROUTINE_QUINTUPLE(void)
{
    /* PXMIT_ROUTINE_QUINTUPLE */
    TEST_TYPE(PXMIT_ROUTINE_QUINTUPLE, 4, 4);
}

static void test_pack_SCONTEXT_QUEUE(void)
{
    /* SCONTEXT_QUEUE (pack 4) */
    TEST_TYPE(SCONTEXT_QUEUE, 8, 4);
    TEST_FIELD(SCONTEXT_QUEUE, unsigned long, NumberOfObjects, 0, 4, 4);
    TEST_FIELD(SCONTEXT_QUEUE, NDR_SCONTEXT *, ArrayOfObjects, 4, 4, 4);
}

static void test_pack_SERVER_ROUTINE(void)
{
    /* SERVER_ROUTINE */
}

static void test_pack_STUB_THUNK(void)
{
    /* STUB_THUNK */
}

580 581 582 583 584 585 586 587 588
static void test_pack_USER_MARSHAL_CB(void)
{
    /* USER_MARSHAL_CB (pack 4) */
    TEST_FIELD(USER_MARSHAL_CB, unsigned long, Flags, 0, 4, 4);
    TEST_FIELD(USER_MARSHAL_CB, PMIDL_STUB_MESSAGE, pStubMsg, 4, 4, 4);
    TEST_FIELD(USER_MARSHAL_CB, PFORMAT_STRING, pReserve, 8, 4, 4);
    TEST_FIELD(USER_MARSHAL_CB, unsigned long, Signature, 12, 4, 4);
}

589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655
static void test_pack_USER_MARSHAL_FREEING_ROUTINE(void)
{
    /* USER_MARSHAL_FREEING_ROUTINE */
}

static void test_pack_USER_MARSHAL_MARSHALLING_ROUTINE(void)
{
    /* USER_MARSHAL_MARSHALLING_ROUTINE */
}

static void test_pack_USER_MARSHAL_ROUTINE_QUADRUPLE(void)
{
    /* USER_MARSHAL_ROUTINE_QUADRUPLE (pack 4) */
}

static void test_pack_USER_MARSHAL_SIZING_ROUTINE(void)
{
    /* USER_MARSHAL_SIZING_ROUTINE */
}

static void test_pack_USER_MARSHAL_UNMARSHALLING_ROUTINE(void)
{
    /* USER_MARSHAL_UNMARSHALLING_ROUTINE */
}

static void test_pack_XMIT_HELPER_ROUTINE(void)
{
    /* XMIT_HELPER_ROUTINE */
}

static void test_pack_XMIT_ROUTINE_QUINTUPLE(void)
{
    /* XMIT_ROUTINE_QUINTUPLE (pack 4) */
}

static void test_pack_PRPC_STUB_FUNCTION(void)
{
    /* PRPC_STUB_FUNCTION */
}

static void test_pack(void)
{
    test_pack_ARRAY_INFO();
    test_pack_COMM_FAULT_OFFSETS();
    test_pack_CS_STUB_INFO();
    test_pack_EXPR_EVAL();
    test_pack_FULL_PTR_TO_REFID_ELEMENT();
    test_pack_FULL_PTR_XLAT_TABLES();
    test_pack_GENERIC_BINDING_INFO();
    test_pack_GENERIC_BINDING_ROUTINE_PAIR();
    test_pack_I_RPC_HANDLE();
    test_pack_MALLOC_FREE_STRUCT();
    test_pack_MIDL_FORMAT_STRING();
    test_pack_MIDL_SERVER_INFO();
    test_pack_MIDL_STUBLESS_PROXY_INFO();
    test_pack_MIDL_STUB_DESC();
    test_pack_MIDL_STUB_MESSAGE();
    test_pack_MIDL_SYNTAX_INFO();
    test_pack_NDR_CCONTEXT();
    test_pack_NDR_NOTIFY2_ROUTINE();
    test_pack_NDR_NOTIFY_ROUTINE();
    test_pack_NDR_RUNDOWN();
    test_pack_NDR_SCONTEXT();
    test_pack_PARRAY_INFO();
    test_pack_PFORMAT_STRING();
    test_pack_PFULL_PTR_TO_REFID_ELEMENT();
    test_pack_PFULL_PTR_XLAT_TABLES();
656 657
    test_pack_PGENERIC_BINDING_INFO();
    test_pack_PGENERIC_BINDING_ROUTINE_PAIR();
658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694
    test_pack_PMIDL_SERVER_INFO();
    test_pack_PMIDL_STUBLESS_PROXY_INFO();
    test_pack_PMIDL_STUB_DESC();
    test_pack_PMIDL_STUB_MESSAGE();
    test_pack_PMIDL_SYNTAX_INFO();
    test_pack_PNDR_ASYNC_MESSAGE();
    test_pack_PNDR_CORRELATION_INFO();
    test_pack_PRPC_CLIENT_INTERFACE();
    test_pack_PRPC_DISPATCH_TABLE();
    test_pack_PRPC_MESSAGE();
    test_pack_PRPC_POLICY();
    test_pack_PRPC_PROTSEQ_ENDPOINT();
    test_pack_PRPC_SERVER_INTERFACE();
    test_pack_PRPC_STUB_FUNCTION();
    test_pack_PRPC_SYNTAX_IDENTIFIER();
    test_pack_PSCONTEXT_QUEUE();
    test_pack_PXMIT_ROUTINE_QUINTUPLE();
    test_pack_RPC_AUTHZ_HANDLE();
    test_pack_RPC_AUTH_IDENTITY_HANDLE();
    test_pack_RPC_AUTH_KEY_RETRIEVAL_FN();
    test_pack_RPC_BINDING_HANDLE();
    test_pack_RPC_BINDING_VECTOR();
    test_pack_RPC_CLIENT_INTERFACE();
    test_pack_RPC_DISPATCH_FUNCTION();
    test_pack_RPC_DISPATCH_TABLE();
    test_pack_RPC_IF_HANDLE();
    test_pack_RPC_IF_ID();
    test_pack_RPC_MESSAGE();
    test_pack_RPC_POLICY();
    test_pack_RPC_PROTSEQ_ENDPOINT();
    test_pack_RPC_SERVER_INTERFACE();
    test_pack_RPC_STATUS();
    test_pack_RPC_SYNTAX_IDENTIFIER();
    test_pack_RPC_VERSION();
    test_pack_SCONTEXT_QUEUE();
    test_pack_SERVER_ROUTINE();
    test_pack_STUB_THUNK();
695
    test_pack_USER_MARSHAL_CB();
696 697 698 699 700 701 702 703 704 705 706 707 708 709
    test_pack_USER_MARSHAL_FREEING_ROUTINE();
    test_pack_USER_MARSHAL_MARSHALLING_ROUTINE();
    test_pack_USER_MARSHAL_ROUTINE_QUADRUPLE();
    test_pack_USER_MARSHAL_SIZING_ROUTINE();
    test_pack_USER_MARSHAL_UNMARSHALLING_ROUTINE();
    test_pack_UUID_VECTOR();
    test_pack_XMIT_HELPER_ROUTINE();
    test_pack_XMIT_ROUTINE_QUINTUPLE();
}

START_TEST(generated)
{
    test_pack();
}