2009-01-08 00:18:27 +01:00
|
|
|
/* File generated automatically from tools/winapi/tests.dat; do not edit! */
|
2002-11-12 02:13:10 +01:00
|
|
|
/* This file can be copied, modified and distributed without restriction. */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Unit tests for data structure packing
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define WINE_NOWINSOCK
|
|
|
|
|
2003-09-06 01:08:26 +02:00
|
|
|
#include <stdarg.h>
|
2002-11-12 02:13:10 +01:00
|
|
|
#include "windef.h"
|
2003-09-06 01:08:26 +02:00
|
|
|
#include "winbase.h"
|
2002-11-12 02:13:10 +01:00
|
|
|
#include "urlmon.h"
|
|
|
|
|
|
|
|
#include "wine/test.h"
|
|
|
|
|
|
|
|
/***********************************************************************
|
2008-01-16 12:17:40 +01:00
|
|
|
* Compatibility macros
|
2002-11-12 02:13:10 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#define DWORD_PTR UINT_PTR
|
|
|
|
#define LONG_PTR INT_PTR
|
|
|
|
#define ULONG_PTR UINT_PTR
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* Windows API extension
|
|
|
|
*/
|
|
|
|
|
2003-10-24 06:45:35 +02:00
|
|
|
#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus)
|
2002-11-12 02:13:10 +01:00
|
|
|
# define _TYPE_ALIGNMENT(type) __alignof(type)
|
2020-12-14 18:10:26 +01:00
|
|
|
#elif defined(__GNUC__) || defined(__clang__)
|
2002-11-12 02:13:10 +01:00
|
|
|
# define _TYPE_ALIGNMENT(type) __alignof__(type)
|
|
|
|
#else
|
|
|
|
/*
|
2009-01-08 00:18:48 +01:00
|
|
|
* FIXME: May not be possible without a compiler extension
|
|
|
|
* (if type is not just a name that is, otherwise the normal
|
2002-11-12 02:13:10 +01:00
|
|
|
* TYPE_ALIGNMENT can be used)
|
|
|
|
*/
|
|
|
|
#endif
|
|
|
|
|
2004-09-06 22:29:53 +02:00
|
|
|
#if defined(TYPE_ALIGNMENT) && defined(_MSC_VER) && _MSC_VER >= 800 && !defined(__cplusplus)
|
|
|
|
#pragma warning(disable:4116)
|
|
|
|
#endif
|
|
|
|
|
2002-11-12 02:13:10 +01:00
|
|
|
#if !defined(TYPE_ALIGNMENT) && defined(_TYPE_ALIGNMENT)
|
|
|
|
# define TYPE_ALIGNMENT _TYPE_ALIGNMENT
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* Test helper macros
|
|
|
|
*/
|
|
|
|
|
2020-07-25 21:36:25 +02:00
|
|
|
#define TEST_TYPE_SIZE(type, size) C_ASSERT(sizeof(type) == size);
|
2002-11-12 02:13:10 +01:00
|
|
|
|
2010-04-07 17:22:51 +02:00
|
|
|
#ifdef TYPE_ALIGNMENT
|
2020-07-25 21:36:25 +02:00
|
|
|
# define TEST_TYPE_ALIGN(type, align) C_ASSERT(TYPE_ALIGNMENT(type) == align);
|
2010-04-07 17:22:51 +02:00
|
|
|
#else
|
2009-01-08 00:26:10 +01:00
|
|
|
# define TEST_TYPE_ALIGN(type, align)
|
2010-04-07 17:22:51 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef _TYPE_ALIGNMENT
|
2020-07-25 21:36:25 +02:00
|
|
|
# define TEST_TARGET_ALIGN(type, align) C_ASSERT(_TYPE_ALIGNMENT(*(type)0) == align);
|
|
|
|
# define TEST_FIELD_ALIGN(type, field, align) C_ASSERT(_TYPE_ALIGNMENT(((type*)0)->field) == align);
|
2010-04-07 17:22:51 +02:00
|
|
|
#else
|
2009-01-08 00:26:10 +01:00
|
|
|
# define TEST_TARGET_ALIGN(type, align)
|
|
|
|
# define TEST_FIELD_ALIGN(type, field, align)
|
2010-04-07 17:22:51 +02:00
|
|
|
#endif
|
2002-11-12 02:13:10 +01:00
|
|
|
|
2020-07-25 21:36:25 +02:00
|
|
|
#define TEST_FIELD_OFFSET(type, field, offset) C_ASSERT(FIELD_OFFSET(type, field) == offset);
|
2002-11-12 02:13:10 +01:00
|
|
|
|
2010-04-07 17:22:51 +02:00
|
|
|
#define TEST_TARGET_SIZE(type, size) TEST_TYPE_SIZE(*(type)0, size)
|
|
|
|
#define TEST_FIELD_SIZE(type, field, size) TEST_TYPE_SIZE((((type*)0)->field), size)
|
|
|
|
#define TEST_TYPE_SIGNED(type) C_ASSERT((type) -1 < 0);
|
|
|
|
#define TEST_TYPE_UNSIGNED(type) C_ASSERT((type) -1 > 0);
|
2002-11-12 02:13:10 +01:00
|
|
|
|
|
|
|
|
2010-04-07 17:22:51 +02:00
|
|
|
#ifdef _WIN64
|
2002-11-12 02:13:10 +01:00
|
|
|
|
2010-04-07 17:22:51 +02:00
|
|
|
static void test_pack_BINDINFO(void)
|
|
|
|
{
|
|
|
|
/* BINDINFO */
|
|
|
|
TEST_FIELD_SIZE (BINDINFO, cbSize, 4)
|
|
|
|
TEST_FIELD_ALIGN (BINDINFO, cbSize, 4)
|
|
|
|
TEST_FIELD_OFFSET(BINDINFO, cbSize, 0)
|
|
|
|
TEST_FIELD_SIZE (BINDINFO, szExtraInfo, 8)
|
|
|
|
TEST_FIELD_ALIGN (BINDINFO, szExtraInfo, 8)
|
|
|
|
TEST_FIELD_OFFSET(BINDINFO, szExtraInfo, 8)
|
|
|
|
}
|
2002-11-12 02:13:10 +01:00
|
|
|
|
2010-04-07 17:22:51 +02:00
|
|
|
static void test_pack_IBindHost(void)
|
|
|
|
{
|
|
|
|
/* IBindHost */
|
|
|
|
}
|
2002-11-12 02:13:10 +01:00
|
|
|
|
2010-04-07 17:22:51 +02:00
|
|
|
static void test_pack_IBindStatusCallback(void)
|
|
|
|
{
|
|
|
|
/* IBindStatusCallback */
|
|
|
|
}
|
2002-11-12 02:13:10 +01:00
|
|
|
|
2010-04-07 17:22:51 +02:00
|
|
|
static void test_pack_IBinding(void)
|
|
|
|
{
|
|
|
|
/* IBinding */
|
|
|
|
}
|
|
|
|
|
|
|
|
static void test_pack_IInternetProtocolInfo(void)
|
|
|
|
{
|
|
|
|
/* IInternetProtocolInfo */
|
|
|
|
}
|
|
|
|
|
|
|
|
static void test_pack_IInternetSession(void)
|
|
|
|
{
|
|
|
|
/* IInternetSession */
|
|
|
|
}
|
|
|
|
|
|
|
|
static void test_pack_IPersistMoniker(void)
|
|
|
|
{
|
|
|
|
/* IPersistMoniker */
|
|
|
|
}
|
|
|
|
|
|
|
|
static void test_pack_IWinInetHttpInfo(void)
|
|
|
|
{
|
|
|
|
/* IWinInetHttpInfo */
|
|
|
|
}
|
|
|
|
|
|
|
|
static void test_pack_IWinInetInfo(void)
|
|
|
|
{
|
|
|
|
/* IWinInetInfo */
|
|
|
|
}
|
|
|
|
|
|
|
|
static void test_pack_LPBINDHOST(void)
|
|
|
|
{
|
|
|
|
/* LPBINDHOST */
|
|
|
|
TEST_TYPE_SIZE (LPBINDHOST, 8)
|
|
|
|
TEST_TYPE_ALIGN (LPBINDHOST, 8)
|
|
|
|
}
|
|
|
|
|
|
|
|
static void test_pack_LPBINDING(void)
|
|
|
|
{
|
|
|
|
/* LPBINDING */
|
|
|
|
TEST_TYPE_SIZE (LPBINDING, 8)
|
|
|
|
TEST_TYPE_ALIGN (LPBINDING, 8)
|
|
|
|
}
|
|
|
|
|
|
|
|
static void test_pack_LPBINDSTATUSCALLBACK(void)
|
|
|
|
{
|
|
|
|
/* LPBINDSTATUSCALLBACK */
|
|
|
|
TEST_TYPE_SIZE (LPBINDSTATUSCALLBACK, 8)
|
|
|
|
TEST_TYPE_ALIGN (LPBINDSTATUSCALLBACK, 8)
|
|
|
|
}
|
|
|
|
|
|
|
|
static void test_pack_LPIINTERNETPROTOCOLINFO(void)
|
|
|
|
{
|
|
|
|
/* LPIINTERNETPROTOCOLINFO */
|
|
|
|
TEST_TYPE_SIZE (LPIINTERNETPROTOCOLINFO, 8)
|
|
|
|
TEST_TYPE_ALIGN (LPIINTERNETPROTOCOLINFO, 8)
|
|
|
|
}
|
|
|
|
|
|
|
|
static void test_pack_LPIINTERNETSESSION(void)
|
|
|
|
{
|
|
|
|
/* LPIINTERNETSESSION */
|
|
|
|
TEST_TYPE_SIZE (LPIINTERNETSESSION, 8)
|
|
|
|
TEST_TYPE_ALIGN (LPIINTERNETSESSION, 8)
|
|
|
|
}
|
|
|
|
|
|
|
|
static void test_pack_LPPERSISTMONIKER(void)
|
|
|
|
{
|
|
|
|
/* LPPERSISTMONIKER */
|
|
|
|
TEST_TYPE_SIZE (LPPERSISTMONIKER, 8)
|
|
|
|
TEST_TYPE_ALIGN (LPPERSISTMONIKER, 8)
|
|
|
|
}
|
|
|
|
|
|
|
|
static void test_pack_LPREMFORMATETC(void)
|
|
|
|
{
|
|
|
|
/* LPREMFORMATETC */
|
|
|
|
TEST_TYPE_SIZE (LPREMFORMATETC, 8)
|
|
|
|
TEST_TYPE_ALIGN (LPREMFORMATETC, 8)
|
|
|
|
}
|
|
|
|
|
|
|
|
static void test_pack_LPREMSECURITY_ATTRIBUTES(void)
|
|
|
|
{
|
|
|
|
/* LPREMSECURITY_ATTRIBUTES */
|
|
|
|
TEST_TYPE_SIZE (LPREMSECURITY_ATTRIBUTES, 8)
|
|
|
|
TEST_TYPE_ALIGN (LPREMSECURITY_ATTRIBUTES, 8)
|
|
|
|
}
|
|
|
|
|
|
|
|
static void test_pack_LPWININETHTTPINFO(void)
|
|
|
|
{
|
|
|
|
/* LPWININETHTTPINFO */
|
|
|
|
TEST_TYPE_SIZE (LPWININETHTTPINFO, 8)
|
|
|
|
TEST_TYPE_ALIGN (LPWININETHTTPINFO, 8)
|
|
|
|
}
|
|
|
|
|
|
|
|
static void test_pack_LPWININETINFO(void)
|
|
|
|
{
|
|
|
|
/* LPWININETINFO */
|
|
|
|
TEST_TYPE_SIZE (LPWININETINFO, 8)
|
|
|
|
TEST_TYPE_ALIGN (LPWININETINFO, 8)
|
|
|
|
}
|
|
|
|
|
|
|
|
static void test_pack_PREMSECURITY_ATTRIBUTES(void)
|
|
|
|
{
|
|
|
|
/* PREMSECURITY_ATTRIBUTES */
|
|
|
|
TEST_TYPE_SIZE (PREMSECURITY_ATTRIBUTES, 8)
|
|
|
|
TEST_TYPE_ALIGN (PREMSECURITY_ATTRIBUTES, 8)
|
|
|
|
}
|
|
|
|
|
|
|
|
static void test_pack_REMSECURITY_ATTRIBUTES(void)
|
|
|
|
{
|
|
|
|
/* REMSECURITY_ATTRIBUTES */
|
|
|
|
TEST_TYPE_SIZE (REMSECURITY_ATTRIBUTES, 12)
|
|
|
|
TEST_TYPE_ALIGN (REMSECURITY_ATTRIBUTES, 4)
|
|
|
|
TEST_FIELD_SIZE (REMSECURITY_ATTRIBUTES, nLength, 4)
|
|
|
|
TEST_FIELD_ALIGN (REMSECURITY_ATTRIBUTES, nLength, 4)
|
|
|
|
TEST_FIELD_OFFSET(REMSECURITY_ATTRIBUTES, nLength, 0)
|
|
|
|
TEST_FIELD_SIZE (REMSECURITY_ATTRIBUTES, lpSecurityDescriptor, 4)
|
|
|
|
TEST_FIELD_ALIGN (REMSECURITY_ATTRIBUTES, lpSecurityDescriptor, 4)
|
|
|
|
TEST_FIELD_OFFSET(REMSECURITY_ATTRIBUTES, lpSecurityDescriptor, 4)
|
|
|
|
TEST_FIELD_SIZE (REMSECURITY_ATTRIBUTES, bInheritHandle, 4)
|
|
|
|
TEST_FIELD_ALIGN (REMSECURITY_ATTRIBUTES, bInheritHandle, 4)
|
|
|
|
TEST_FIELD_OFFSET(REMSECURITY_ATTRIBUTES, bInheritHandle, 8)
|
|
|
|
}
|
|
|
|
|
|
|
|
static void test_pack_RemBINDINFO(void)
|
|
|
|
{
|
|
|
|
/* RemBINDINFO */
|
|
|
|
TEST_TYPE_SIZE (RemBINDINFO, 96)
|
|
|
|
TEST_TYPE_ALIGN (RemBINDINFO, 8)
|
|
|
|
TEST_FIELD_SIZE (RemBINDINFO, cbSize, 4)
|
|
|
|
TEST_FIELD_ALIGN (RemBINDINFO, cbSize, 4)
|
|
|
|
TEST_FIELD_OFFSET(RemBINDINFO, cbSize, 0)
|
|
|
|
TEST_FIELD_SIZE (RemBINDINFO, szExtraInfo, 8)
|
|
|
|
TEST_FIELD_ALIGN (RemBINDINFO, szExtraInfo, 8)
|
|
|
|
TEST_FIELD_OFFSET(RemBINDINFO, szExtraInfo, 8)
|
|
|
|
TEST_FIELD_SIZE (RemBINDINFO, grfBindInfoF, 4)
|
|
|
|
TEST_FIELD_ALIGN (RemBINDINFO, grfBindInfoF, 4)
|
|
|
|
TEST_FIELD_OFFSET(RemBINDINFO, grfBindInfoF, 16)
|
|
|
|
TEST_FIELD_SIZE (RemBINDINFO, dwBindVerb, 4)
|
|
|
|
TEST_FIELD_ALIGN (RemBINDINFO, dwBindVerb, 4)
|
|
|
|
TEST_FIELD_OFFSET(RemBINDINFO, dwBindVerb, 20)
|
|
|
|
TEST_FIELD_SIZE (RemBINDINFO, szCustomVerb, 8)
|
|
|
|
TEST_FIELD_ALIGN (RemBINDINFO, szCustomVerb, 8)
|
|
|
|
TEST_FIELD_OFFSET(RemBINDINFO, szCustomVerb, 24)
|
|
|
|
TEST_FIELD_SIZE (RemBINDINFO, cbstgmedData, 4)
|
|
|
|
TEST_FIELD_ALIGN (RemBINDINFO, cbstgmedData, 4)
|
|
|
|
TEST_FIELD_OFFSET(RemBINDINFO, cbstgmedData, 32)
|
|
|
|
TEST_FIELD_SIZE (RemBINDINFO, dwOptions, 4)
|
|
|
|
TEST_FIELD_ALIGN (RemBINDINFO, dwOptions, 4)
|
|
|
|
TEST_FIELD_OFFSET(RemBINDINFO, dwOptions, 36)
|
|
|
|
TEST_FIELD_SIZE (RemBINDINFO, dwOptionsFlags, 4)
|
|
|
|
TEST_FIELD_ALIGN (RemBINDINFO, dwOptionsFlags, 4)
|
|
|
|
TEST_FIELD_OFFSET(RemBINDINFO, dwOptionsFlags, 40)
|
|
|
|
TEST_FIELD_SIZE (RemBINDINFO, dwCodePage, 4)
|
|
|
|
TEST_FIELD_ALIGN (RemBINDINFO, dwCodePage, 4)
|
|
|
|
TEST_FIELD_OFFSET(RemBINDINFO, dwCodePage, 44)
|
|
|
|
TEST_FIELD_SIZE (RemBINDINFO, securityAttributes, 12)
|
|
|
|
TEST_FIELD_ALIGN (RemBINDINFO, securityAttributes, 4)
|
|
|
|
TEST_FIELD_OFFSET(RemBINDINFO, securityAttributes, 48)
|
|
|
|
TEST_FIELD_SIZE (RemBINDINFO, iid, 16)
|
|
|
|
TEST_FIELD_ALIGN (RemBINDINFO, iid, 4)
|
|
|
|
TEST_FIELD_OFFSET(RemBINDINFO, iid, 60)
|
|
|
|
TEST_FIELD_SIZE (RemBINDINFO, pUnk, 8)
|
|
|
|
TEST_FIELD_ALIGN (RemBINDINFO, pUnk, 8)
|
|
|
|
TEST_FIELD_OFFSET(RemBINDINFO, pUnk, 80)
|
|
|
|
TEST_FIELD_SIZE (RemBINDINFO, dwReserved, 4)
|
|
|
|
TEST_FIELD_ALIGN (RemBINDINFO, dwReserved, 4)
|
|
|
|
TEST_FIELD_OFFSET(RemBINDINFO, dwReserved, 88)
|
|
|
|
}
|
|
|
|
|
|
|
|
static void test_pack_RemFORMATETC(void)
|
|
|
|
{
|
|
|
|
/* RemFORMATETC */
|
|
|
|
TEST_TYPE_SIZE (RemFORMATETC, 20)
|
|
|
|
TEST_TYPE_ALIGN (RemFORMATETC, 4)
|
|
|
|
TEST_FIELD_SIZE (RemFORMATETC, cfFormat, 4)
|
|
|
|
TEST_FIELD_ALIGN (RemFORMATETC, cfFormat, 4)
|
|
|
|
TEST_FIELD_OFFSET(RemFORMATETC, cfFormat, 0)
|
|
|
|
TEST_FIELD_SIZE (RemFORMATETC, ptd, 4)
|
|
|
|
TEST_FIELD_ALIGN (RemFORMATETC, ptd, 4)
|
|
|
|
TEST_FIELD_OFFSET(RemFORMATETC, ptd, 4)
|
|
|
|
TEST_FIELD_SIZE (RemFORMATETC, dwAspect, 4)
|
|
|
|
TEST_FIELD_ALIGN (RemFORMATETC, dwAspect, 4)
|
|
|
|
TEST_FIELD_OFFSET(RemFORMATETC, dwAspect, 8)
|
|
|
|
TEST_FIELD_SIZE (RemFORMATETC, lindex, 4)
|
|
|
|
TEST_FIELD_ALIGN (RemFORMATETC, lindex, 4)
|
|
|
|
TEST_FIELD_OFFSET(RemFORMATETC, lindex, 12)
|
|
|
|
TEST_FIELD_SIZE (RemFORMATETC, tymed, 4)
|
|
|
|
TEST_FIELD_ALIGN (RemFORMATETC, tymed, 4)
|
|
|
|
TEST_FIELD_OFFSET(RemFORMATETC, tymed, 16)
|
|
|
|
}
|
|
|
|
|
|
|
|
#else /* _WIN64 */
|
2002-11-12 02:13:10 +01:00
|
|
|
|
|
|
|
static void test_pack_BINDINFO(void)
|
|
|
|
{
|
2010-04-07 17:22:51 +02:00
|
|
|
/* BINDINFO */
|
2009-01-08 00:26:10 +01:00
|
|
|
TEST_FIELD_SIZE (BINDINFO, cbSize, 4)
|
|
|
|
TEST_FIELD_ALIGN (BINDINFO, cbSize, 4)
|
|
|
|
TEST_FIELD_OFFSET(BINDINFO, cbSize, 0)
|
|
|
|
TEST_FIELD_SIZE (BINDINFO, szExtraInfo, 4)
|
|
|
|
TEST_FIELD_ALIGN (BINDINFO, szExtraInfo, 4)
|
|
|
|
TEST_FIELD_OFFSET(BINDINFO, szExtraInfo, 4)
|
2002-11-12 02:13:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static void test_pack_IBindHost(void)
|
|
|
|
{
|
|
|
|
/* IBindHost */
|
|
|
|
}
|
|
|
|
|
|
|
|
static void test_pack_IBindStatusCallback(void)
|
|
|
|
{
|
|
|
|
/* IBindStatusCallback */
|
|
|
|
}
|
|
|
|
|
|
|
|
static void test_pack_IBinding(void)
|
|
|
|
{
|
|
|
|
/* IBinding */
|
|
|
|
}
|
|
|
|
|
2004-05-04 02:41:11 +02:00
|
|
|
static void test_pack_IInternetProtocolInfo(void)
|
|
|
|
{
|
|
|
|
/* IInternetProtocolInfo */
|
|
|
|
}
|
|
|
|
|
2004-09-07 21:33:36 +02:00
|
|
|
static void test_pack_IInternetSession(void)
|
|
|
|
{
|
|
|
|
/* IInternetSession */
|
|
|
|
}
|
|
|
|
|
2004-05-04 02:41:11 +02:00
|
|
|
static void test_pack_IPersistMoniker(void)
|
|
|
|
{
|
|
|
|
/* IPersistMoniker */
|
|
|
|
}
|
|
|
|
|
2002-11-12 02:13:10 +01:00
|
|
|
static void test_pack_IWinInetHttpInfo(void)
|
|
|
|
{
|
|
|
|
/* IWinInetHttpInfo */
|
|
|
|
}
|
|
|
|
|
|
|
|
static void test_pack_IWinInetInfo(void)
|
|
|
|
{
|
|
|
|
/* IWinInetInfo */
|
|
|
|
}
|
|
|
|
|
2004-05-04 02:41:11 +02:00
|
|
|
static void test_pack_LPBINDHOST(void)
|
|
|
|
{
|
|
|
|
/* LPBINDHOST */
|
2009-01-08 00:26:10 +01:00
|
|
|
TEST_TYPE_SIZE (LPBINDHOST, 4)
|
|
|
|
TEST_TYPE_ALIGN (LPBINDHOST, 4)
|
2004-05-04 02:41:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static void test_pack_LPBINDING(void)
|
|
|
|
{
|
|
|
|
/* LPBINDING */
|
2009-01-08 00:26:10 +01:00
|
|
|
TEST_TYPE_SIZE (LPBINDING, 4)
|
|
|
|
TEST_TYPE_ALIGN (LPBINDING, 4)
|
2004-05-04 02:41:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static void test_pack_LPBINDSTATUSCALLBACK(void)
|
|
|
|
{
|
|
|
|
/* LPBINDSTATUSCALLBACK */
|
2009-01-08 00:26:10 +01:00
|
|
|
TEST_TYPE_SIZE (LPBINDSTATUSCALLBACK, 4)
|
|
|
|
TEST_TYPE_ALIGN (LPBINDSTATUSCALLBACK, 4)
|
2004-05-04 02:41:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static void test_pack_LPIINTERNETPROTOCOLINFO(void)
|
|
|
|
{
|
|
|
|
/* LPIINTERNETPROTOCOLINFO */
|
2009-01-08 00:26:10 +01:00
|
|
|
TEST_TYPE_SIZE (LPIINTERNETPROTOCOLINFO, 4)
|
|
|
|
TEST_TYPE_ALIGN (LPIINTERNETPROTOCOLINFO, 4)
|
2004-05-04 02:41:11 +02:00
|
|
|
}
|
|
|
|
|
2004-09-07 21:33:36 +02:00
|
|
|
static void test_pack_LPIINTERNETSESSION(void)
|
|
|
|
{
|
|
|
|
/* LPIINTERNETSESSION */
|
2009-01-08 00:26:10 +01:00
|
|
|
TEST_TYPE_SIZE (LPIINTERNETSESSION, 4)
|
|
|
|
TEST_TYPE_ALIGN (LPIINTERNETSESSION, 4)
|
2004-09-07 21:33:36 +02:00
|
|
|
}
|
|
|
|
|
2004-05-04 02:41:11 +02:00
|
|
|
static void test_pack_LPPERSISTMONIKER(void)
|
|
|
|
{
|
|
|
|
/* LPPERSISTMONIKER */
|
2009-01-08 00:26:10 +01:00
|
|
|
TEST_TYPE_SIZE (LPPERSISTMONIKER, 4)
|
|
|
|
TEST_TYPE_ALIGN (LPPERSISTMONIKER, 4)
|
2004-05-04 02:41:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static void test_pack_LPREMFORMATETC(void)
|
|
|
|
{
|
|
|
|
/* LPREMFORMATETC */
|
2009-01-08 00:26:10 +01:00
|
|
|
TEST_TYPE_SIZE (LPREMFORMATETC, 4)
|
|
|
|
TEST_TYPE_ALIGN (LPREMFORMATETC, 4)
|
2004-05-04 02:41:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static void test_pack_LPREMSECURITY_ATTRIBUTES(void)
|
|
|
|
{
|
|
|
|
/* LPREMSECURITY_ATTRIBUTES */
|
2009-01-08 00:26:10 +01:00
|
|
|
TEST_TYPE_SIZE (LPREMSECURITY_ATTRIBUTES, 4)
|
|
|
|
TEST_TYPE_ALIGN (LPREMSECURITY_ATTRIBUTES, 4)
|
2004-05-04 02:41:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static void test_pack_LPWININETHTTPINFO(void)
|
|
|
|
{
|
|
|
|
/* LPWININETHTTPINFO */
|
2009-01-08 00:26:10 +01:00
|
|
|
TEST_TYPE_SIZE (LPWININETHTTPINFO, 4)
|
|
|
|
TEST_TYPE_ALIGN (LPWININETHTTPINFO, 4)
|
2004-05-04 02:41:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static void test_pack_LPWININETINFO(void)
|
|
|
|
{
|
|
|
|
/* LPWININETINFO */
|
2009-01-08 00:26:10 +01:00
|
|
|
TEST_TYPE_SIZE (LPWININETINFO, 4)
|
|
|
|
TEST_TYPE_ALIGN (LPWININETINFO, 4)
|
2004-05-04 02:41:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static void test_pack_PREMSECURITY_ATTRIBUTES(void)
|
|
|
|
{
|
|
|
|
/* PREMSECURITY_ATTRIBUTES */
|
2009-01-08 00:26:10 +01:00
|
|
|
TEST_TYPE_SIZE (PREMSECURITY_ATTRIBUTES, 4)
|
|
|
|
TEST_TYPE_ALIGN (PREMSECURITY_ATTRIBUTES, 4)
|
2004-05-04 02:41:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static void test_pack_REMSECURITY_ATTRIBUTES(void)
|
|
|
|
{
|
2010-04-07 17:22:51 +02:00
|
|
|
/* REMSECURITY_ATTRIBUTES */
|
2009-01-08 00:26:10 +01:00
|
|
|
TEST_TYPE_SIZE (REMSECURITY_ATTRIBUTES, 12)
|
|
|
|
TEST_TYPE_ALIGN (REMSECURITY_ATTRIBUTES, 4)
|
|
|
|
TEST_FIELD_SIZE (REMSECURITY_ATTRIBUTES, nLength, 4)
|
|
|
|
TEST_FIELD_ALIGN (REMSECURITY_ATTRIBUTES, nLength, 4)
|
|
|
|
TEST_FIELD_OFFSET(REMSECURITY_ATTRIBUTES, nLength, 0)
|
|
|
|
TEST_FIELD_SIZE (REMSECURITY_ATTRIBUTES, lpSecurityDescriptor, 4)
|
|
|
|
TEST_FIELD_ALIGN (REMSECURITY_ATTRIBUTES, lpSecurityDescriptor, 4)
|
|
|
|
TEST_FIELD_OFFSET(REMSECURITY_ATTRIBUTES, lpSecurityDescriptor, 4)
|
|
|
|
TEST_FIELD_SIZE (REMSECURITY_ATTRIBUTES, bInheritHandle, 4)
|
|
|
|
TEST_FIELD_ALIGN (REMSECURITY_ATTRIBUTES, bInheritHandle, 4)
|
|
|
|
TEST_FIELD_OFFSET(REMSECURITY_ATTRIBUTES, bInheritHandle, 8)
|
2004-05-04 02:41:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static void test_pack_RemBINDINFO(void)
|
|
|
|
{
|
2010-04-07 17:22:51 +02:00
|
|
|
/* RemBINDINFO */
|
2009-01-08 00:26:10 +01:00
|
|
|
TEST_TYPE_SIZE (RemBINDINFO, 72)
|
|
|
|
TEST_TYPE_ALIGN (RemBINDINFO, 4)
|
|
|
|
TEST_FIELD_SIZE (RemBINDINFO, cbSize, 4)
|
|
|
|
TEST_FIELD_ALIGN (RemBINDINFO, cbSize, 4)
|
|
|
|
TEST_FIELD_OFFSET(RemBINDINFO, cbSize, 0)
|
|
|
|
TEST_FIELD_SIZE (RemBINDINFO, szExtraInfo, 4)
|
|
|
|
TEST_FIELD_ALIGN (RemBINDINFO, szExtraInfo, 4)
|
|
|
|
TEST_FIELD_OFFSET(RemBINDINFO, szExtraInfo, 4)
|
|
|
|
TEST_FIELD_SIZE (RemBINDINFO, grfBindInfoF, 4)
|
|
|
|
TEST_FIELD_ALIGN (RemBINDINFO, grfBindInfoF, 4)
|
|
|
|
TEST_FIELD_OFFSET(RemBINDINFO, grfBindInfoF, 8)
|
|
|
|
TEST_FIELD_SIZE (RemBINDINFO, dwBindVerb, 4)
|
|
|
|
TEST_FIELD_ALIGN (RemBINDINFO, dwBindVerb, 4)
|
|
|
|
TEST_FIELD_OFFSET(RemBINDINFO, dwBindVerb, 12)
|
|
|
|
TEST_FIELD_SIZE (RemBINDINFO, szCustomVerb, 4)
|
|
|
|
TEST_FIELD_ALIGN (RemBINDINFO, szCustomVerb, 4)
|
|
|
|
TEST_FIELD_OFFSET(RemBINDINFO, szCustomVerb, 16)
|
|
|
|
TEST_FIELD_SIZE (RemBINDINFO, cbstgmedData, 4)
|
|
|
|
TEST_FIELD_ALIGN (RemBINDINFO, cbstgmedData, 4)
|
|
|
|
TEST_FIELD_OFFSET(RemBINDINFO, cbstgmedData, 20)
|
|
|
|
TEST_FIELD_SIZE (RemBINDINFO, dwOptions, 4)
|
|
|
|
TEST_FIELD_ALIGN (RemBINDINFO, dwOptions, 4)
|
|
|
|
TEST_FIELD_OFFSET(RemBINDINFO, dwOptions, 24)
|
|
|
|
TEST_FIELD_SIZE (RemBINDINFO, dwOptionsFlags, 4)
|
|
|
|
TEST_FIELD_ALIGN (RemBINDINFO, dwOptionsFlags, 4)
|
|
|
|
TEST_FIELD_OFFSET(RemBINDINFO, dwOptionsFlags, 28)
|
|
|
|
TEST_FIELD_SIZE (RemBINDINFO, dwCodePage, 4)
|
|
|
|
TEST_FIELD_ALIGN (RemBINDINFO, dwCodePage, 4)
|
|
|
|
TEST_FIELD_OFFSET(RemBINDINFO, dwCodePage, 32)
|
|
|
|
TEST_FIELD_SIZE (RemBINDINFO, securityAttributes, 12)
|
|
|
|
TEST_FIELD_ALIGN (RemBINDINFO, securityAttributes, 4)
|
|
|
|
TEST_FIELD_OFFSET(RemBINDINFO, securityAttributes, 36)
|
|
|
|
TEST_FIELD_SIZE (RemBINDINFO, iid, 16)
|
|
|
|
TEST_FIELD_ALIGN (RemBINDINFO, iid, 4)
|
|
|
|
TEST_FIELD_OFFSET(RemBINDINFO, iid, 48)
|
|
|
|
TEST_FIELD_SIZE (RemBINDINFO, pUnk, 4)
|
|
|
|
TEST_FIELD_ALIGN (RemBINDINFO, pUnk, 4)
|
|
|
|
TEST_FIELD_OFFSET(RemBINDINFO, pUnk, 64)
|
|
|
|
TEST_FIELD_SIZE (RemBINDINFO, dwReserved, 4)
|
|
|
|
TEST_FIELD_ALIGN (RemBINDINFO, dwReserved, 4)
|
|
|
|
TEST_FIELD_OFFSET(RemBINDINFO, dwReserved, 68)
|
2004-05-04 02:41:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static void test_pack_RemFORMATETC(void)
|
|
|
|
{
|
2010-04-07 17:22:51 +02:00
|
|
|
/* RemFORMATETC */
|
2009-01-08 00:26:10 +01:00
|
|
|
TEST_TYPE_SIZE (RemFORMATETC, 20)
|
|
|
|
TEST_TYPE_ALIGN (RemFORMATETC, 4)
|
|
|
|
TEST_FIELD_SIZE (RemFORMATETC, cfFormat, 4)
|
|
|
|
TEST_FIELD_ALIGN (RemFORMATETC, cfFormat, 4)
|
|
|
|
TEST_FIELD_OFFSET(RemFORMATETC, cfFormat, 0)
|
|
|
|
TEST_FIELD_SIZE (RemFORMATETC, ptd, 4)
|
|
|
|
TEST_FIELD_ALIGN (RemFORMATETC, ptd, 4)
|
|
|
|
TEST_FIELD_OFFSET(RemFORMATETC, ptd, 4)
|
|
|
|
TEST_FIELD_SIZE (RemFORMATETC, dwAspect, 4)
|
|
|
|
TEST_FIELD_ALIGN (RemFORMATETC, dwAspect, 4)
|
|
|
|
TEST_FIELD_OFFSET(RemFORMATETC, dwAspect, 8)
|
|
|
|
TEST_FIELD_SIZE (RemFORMATETC, lindex, 4)
|
|
|
|
TEST_FIELD_ALIGN (RemFORMATETC, lindex, 4)
|
|
|
|
TEST_FIELD_OFFSET(RemFORMATETC, lindex, 12)
|
|
|
|
TEST_FIELD_SIZE (RemFORMATETC, tymed, 4)
|
|
|
|
TEST_FIELD_ALIGN (RemFORMATETC, tymed, 4)
|
|
|
|
TEST_FIELD_OFFSET(RemFORMATETC, tymed, 16)
|
2004-05-04 02:41:11 +02:00
|
|
|
}
|
|
|
|
|
2010-04-07 17:22:51 +02:00
|
|
|
#endif /* _WIN64 */
|
|
|
|
|
2002-11-12 02:13:10 +01:00
|
|
|
static void test_pack(void)
|
|
|
|
{
|
|
|
|
test_pack_BINDINFO();
|
|
|
|
test_pack_IBindHost();
|
|
|
|
test_pack_IBindStatusCallback();
|
|
|
|
test_pack_IBinding();
|
2004-05-04 02:41:11 +02:00
|
|
|
test_pack_IInternetProtocolInfo();
|
2004-09-07 21:33:36 +02:00
|
|
|
test_pack_IInternetSession();
|
2004-05-04 02:41:11 +02:00
|
|
|
test_pack_IPersistMoniker();
|
2002-11-12 02:13:10 +01:00
|
|
|
test_pack_IWinInetHttpInfo();
|
|
|
|
test_pack_IWinInetInfo();
|
2004-05-04 02:41:11 +02:00
|
|
|
test_pack_LPBINDHOST();
|
|
|
|
test_pack_LPBINDING();
|
|
|
|
test_pack_LPBINDSTATUSCALLBACK();
|
|
|
|
test_pack_LPIINTERNETPROTOCOLINFO();
|
2004-09-07 21:33:36 +02:00
|
|
|
test_pack_LPIINTERNETSESSION();
|
2004-05-04 02:41:11 +02:00
|
|
|
test_pack_LPPERSISTMONIKER();
|
|
|
|
test_pack_LPREMFORMATETC();
|
|
|
|
test_pack_LPREMSECURITY_ATTRIBUTES();
|
|
|
|
test_pack_LPWININETHTTPINFO();
|
|
|
|
test_pack_LPWININETINFO();
|
|
|
|
test_pack_PREMSECURITY_ATTRIBUTES();
|
|
|
|
test_pack_REMSECURITY_ATTRIBUTES();
|
|
|
|
test_pack_RemBINDINFO();
|
|
|
|
test_pack_RemFORMATETC();
|
2002-11-12 02:13:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
START_TEST(generated)
|
|
|
|
{
|
|
|
|
test_pack();
|
|
|
|
}
|