diff --git a/dlls/gdi32/tests/generated.c b/dlls/gdi32/tests/generated.c index e125b0efc97..d0f8d3d610a 100644 --- a/dlls/gdi32/tests/generated.c +++ b/dlls/gdi32/tests/generated.c @@ -51,3877 +51,6568 @@ * Test helper macros */ -#ifdef FIELD_ALIGNMENT -# define TEST_FIELD_ALIGNMENT(type, field, align) \ - ok(_TYPE_ALIGNMENT(((type*)0)->field) == align, \ - "FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \ - (int)_TYPE_ALIGNMENT(((type*)0)->field)) +#ifdef _WIN64 + +# define TEST_TYPE_SIZE(type, size) +# define TEST_TYPE_ALIGN(type, align) +# define TEST_TARGET_ALIGN(type, align) +# define TEST_FIELD_ALIGN(type, field, align) +# define TEST_FIELD_OFFSET(type, field, offset) + #else -# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0) + +# define TEST_TYPE_SIZE(type, size) C_ASSERT(sizeof(type) == size); + +# ifdef TYPE_ALIGNMENT +# define TEST_TYPE_ALIGN(type, align) C_ASSERT(TYPE_ALIGNMENT(type) == align); +# else +# define TEST_TYPE_ALIGN(type, align) +# endif + +# ifdef _TYPE_ALIGNMENT +# 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); +# else +# define TEST_TARGET_ALIGN(type, align) +# define TEST_FIELD_ALIGN(type, field, align) +# endif + +# define TEST_FIELD_OFFSET(type, field, offset) C_ASSERT(FIELD_OFFSET(type, field) == offset); + #endif -#define TEST_FIELD_OFFSET(type, field, offset) \ - ok(FIELD_OFFSET(type, field) == offset, \ - "FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")\n", \ - (long int)FIELD_OFFSET(type, field)) +#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); -#ifdef _TYPE_ALIGNMENT -#define TEST__TYPE_ALIGNMENT(type, align) \ - ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)_TYPE_ALIGNMENT(type)) -#else -# define TEST__TYPE_ALIGNMENT(type, align) do { } while (0) -#endif - -#ifdef TYPE_ALIGNMENT -#define TEST_TYPE_ALIGNMENT(type, align) \ - ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)TYPE_ALIGNMENT(type)) -#else -# define TEST_TYPE_ALIGNMENT(type, align) do { } while (0) -#endif - -#define TEST_TYPE_SIZE(type, size) \ - ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", ((int) sizeof(type))) - -/*********************************************************************** - * Test macros - */ - -#define TEST_FIELD(type, field, field_offset, field_size, field_align) \ - TEST_TYPE_SIZE((((type*)0)->field), field_size); \ - TEST_FIELD_ALIGNMENT(type, field, field_align); \ - TEST_FIELD_OFFSET(type, field, 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_ABC(void) { /* ABC (pack 4) */ - TEST_TYPE(ABC, 12, 4); - TEST_FIELD(ABC, abcA, 0, 4, 4); - TEST_FIELD(ABC, abcB, 4, 4, 4); - TEST_FIELD(ABC, abcC, 8, 4, 4); + TEST_TYPE_SIZE (ABC, 12) + TEST_TYPE_ALIGN (ABC, 4) + TEST_FIELD_SIZE (ABC, abcA, 4) + TEST_FIELD_ALIGN (ABC, abcA, 4) + TEST_FIELD_OFFSET(ABC, abcA, 0) + TEST_FIELD_SIZE (ABC, abcB, 4) + TEST_FIELD_ALIGN (ABC, abcB, 4) + TEST_FIELD_OFFSET(ABC, abcB, 4) + TEST_FIELD_SIZE (ABC, abcC, 4) + TEST_FIELD_ALIGN (ABC, abcC, 4) + TEST_FIELD_OFFSET(ABC, abcC, 8) } static void test_pack_ABCFLOAT(void) { /* ABCFLOAT (pack 4) */ - TEST_TYPE(ABCFLOAT, 12, 4); - TEST_FIELD(ABCFLOAT, abcfA, 0, 4, 4); - TEST_FIELD(ABCFLOAT, abcfB, 4, 4, 4); - TEST_FIELD(ABCFLOAT, abcfC, 8, 4, 4); + TEST_TYPE_SIZE (ABCFLOAT, 12) + TEST_TYPE_ALIGN (ABCFLOAT, 4) + TEST_FIELD_SIZE (ABCFLOAT, abcfA, 4) + TEST_FIELD_ALIGN (ABCFLOAT, abcfA, 4) + TEST_FIELD_OFFSET(ABCFLOAT, abcfA, 0) + TEST_FIELD_SIZE (ABCFLOAT, abcfB, 4) + TEST_FIELD_ALIGN (ABCFLOAT, abcfB, 4) + TEST_FIELD_OFFSET(ABCFLOAT, abcfB, 4) + TEST_FIELD_SIZE (ABCFLOAT, abcfC, 4) + TEST_FIELD_ALIGN (ABCFLOAT, abcfC, 4) + TEST_FIELD_OFFSET(ABCFLOAT, abcfC, 8) } static void test_pack_ABORTPROC(void) { /* ABORTPROC */ - TEST_TYPE(ABORTPROC, 4, 4); + TEST_TYPE_SIZE (ABORTPROC, 4) + TEST_TYPE_ALIGN (ABORTPROC, 4) } static void test_pack_BITMAP(void) { /* BITMAP (pack 4) */ - TEST_TYPE(BITMAP, 24, 4); - TEST_FIELD(BITMAP, bmType, 0, 4, 4); - TEST_FIELD(BITMAP, bmWidth, 4, 4, 4); - TEST_FIELD(BITMAP, bmHeight, 8, 4, 4); - TEST_FIELD(BITMAP, bmWidthBytes, 12, 4, 4); - TEST_FIELD(BITMAP, bmPlanes, 16, 2, 2); - TEST_FIELD(BITMAP, bmBitsPixel, 18, 2, 2); - TEST_FIELD(BITMAP, bmBits, 20, 4, 4); + TEST_TYPE_SIZE (BITMAP, 24) + TEST_TYPE_ALIGN (BITMAP, 4) + TEST_FIELD_SIZE (BITMAP, bmType, 4) + TEST_FIELD_ALIGN (BITMAP, bmType, 4) + TEST_FIELD_OFFSET(BITMAP, bmType, 0) + TEST_FIELD_SIZE (BITMAP, bmWidth, 4) + TEST_FIELD_ALIGN (BITMAP, bmWidth, 4) + TEST_FIELD_OFFSET(BITMAP, bmWidth, 4) + TEST_FIELD_SIZE (BITMAP, bmHeight, 4) + TEST_FIELD_ALIGN (BITMAP, bmHeight, 4) + TEST_FIELD_OFFSET(BITMAP, bmHeight, 8) + TEST_FIELD_SIZE (BITMAP, bmWidthBytes, 4) + TEST_FIELD_ALIGN (BITMAP, bmWidthBytes, 4) + TEST_FIELD_OFFSET(BITMAP, bmWidthBytes, 12) + TEST_FIELD_SIZE (BITMAP, bmPlanes, 2) + TEST_FIELD_ALIGN (BITMAP, bmPlanes, 2) + TEST_FIELD_OFFSET(BITMAP, bmPlanes, 16) + TEST_FIELD_SIZE (BITMAP, bmBitsPixel, 2) + TEST_FIELD_ALIGN (BITMAP, bmBitsPixel, 2) + TEST_FIELD_OFFSET(BITMAP, bmBitsPixel, 18) + TEST_FIELD_SIZE (BITMAP, bmBits, 4) + TEST_FIELD_ALIGN (BITMAP, bmBits, 4) + TEST_FIELD_OFFSET(BITMAP, bmBits, 20) } static void test_pack_BITMAPCOREHEADER(void) { /* BITMAPCOREHEADER (pack 4) */ - TEST_TYPE(BITMAPCOREHEADER, 12, 4); - TEST_FIELD(BITMAPCOREHEADER, bcSize, 0, 4, 4); - TEST_FIELD(BITMAPCOREHEADER, bcWidth, 4, 2, 2); - TEST_FIELD(BITMAPCOREHEADER, bcHeight, 6, 2, 2); - TEST_FIELD(BITMAPCOREHEADER, bcPlanes, 8, 2, 2); - TEST_FIELD(BITMAPCOREHEADER, bcBitCount, 10, 2, 2); + TEST_TYPE_SIZE (BITMAPCOREHEADER, 12) + TEST_TYPE_ALIGN (BITMAPCOREHEADER, 4) + TEST_FIELD_SIZE (BITMAPCOREHEADER, bcSize, 4) + TEST_FIELD_ALIGN (BITMAPCOREHEADER, bcSize, 4) + TEST_FIELD_OFFSET(BITMAPCOREHEADER, bcSize, 0) + TEST_FIELD_SIZE (BITMAPCOREHEADER, bcWidth, 2) + TEST_FIELD_ALIGN (BITMAPCOREHEADER, bcWidth, 2) + TEST_FIELD_OFFSET(BITMAPCOREHEADER, bcWidth, 4) + TEST_FIELD_SIZE (BITMAPCOREHEADER, bcHeight, 2) + TEST_FIELD_ALIGN (BITMAPCOREHEADER, bcHeight, 2) + TEST_FIELD_OFFSET(BITMAPCOREHEADER, bcHeight, 6) + TEST_FIELD_SIZE (BITMAPCOREHEADER, bcPlanes, 2) + TEST_FIELD_ALIGN (BITMAPCOREHEADER, bcPlanes, 2) + TEST_FIELD_OFFSET(BITMAPCOREHEADER, bcPlanes, 8) + TEST_FIELD_SIZE (BITMAPCOREHEADER, bcBitCount, 2) + TEST_FIELD_ALIGN (BITMAPCOREHEADER, bcBitCount, 2) + TEST_FIELD_OFFSET(BITMAPCOREHEADER, bcBitCount, 10) } static void test_pack_BITMAPCOREINFO(void) { /* BITMAPCOREINFO (pack 4) */ - TEST_TYPE(BITMAPCOREINFO, 16, 4); - TEST_FIELD(BITMAPCOREINFO, bmciHeader, 0, 12, 4); - TEST_FIELD(BITMAPCOREINFO, bmciColors, 12, 3, 1); + TEST_TYPE_SIZE (BITMAPCOREINFO, 16) + TEST_TYPE_ALIGN (BITMAPCOREINFO, 4) + TEST_FIELD_SIZE (BITMAPCOREINFO, bmciHeader, 12) + TEST_FIELD_ALIGN (BITMAPCOREINFO, bmciHeader, 4) + TEST_FIELD_OFFSET(BITMAPCOREINFO, bmciHeader, 0) + TEST_FIELD_SIZE (BITMAPCOREINFO, bmciColors, 3) + TEST_FIELD_ALIGN (BITMAPCOREINFO, bmciColors, 1) + TEST_FIELD_OFFSET(BITMAPCOREINFO, bmciColors, 12) } static void test_pack_BITMAPFILEHEADER(void) { /* BITMAPFILEHEADER (pack 2) */ - TEST_TYPE(BITMAPFILEHEADER, 14, 2); - TEST_FIELD(BITMAPFILEHEADER, bfType, 0, 2, 2); - TEST_FIELD(BITMAPFILEHEADER, bfSize, 2, 4, 2); - TEST_FIELD(BITMAPFILEHEADER, bfReserved1, 6, 2, 2); - TEST_FIELD(BITMAPFILEHEADER, bfReserved2, 8, 2, 2); - TEST_FIELD(BITMAPFILEHEADER, bfOffBits, 10, 4, 2); + TEST_TYPE_SIZE (BITMAPFILEHEADER, 14) + TEST_TYPE_ALIGN (BITMAPFILEHEADER, 2) + TEST_FIELD_SIZE (BITMAPFILEHEADER, bfType, 2) + TEST_FIELD_ALIGN (BITMAPFILEHEADER, bfType, 2) + TEST_FIELD_OFFSET(BITMAPFILEHEADER, bfType, 0) + TEST_FIELD_SIZE (BITMAPFILEHEADER, bfSize, 4) + TEST_FIELD_ALIGN (BITMAPFILEHEADER, bfSize, 2) + TEST_FIELD_OFFSET(BITMAPFILEHEADER, bfSize, 2) + TEST_FIELD_SIZE (BITMAPFILEHEADER, bfReserved1, 2) + TEST_FIELD_ALIGN (BITMAPFILEHEADER, bfReserved1, 2) + TEST_FIELD_OFFSET(BITMAPFILEHEADER, bfReserved1, 6) + TEST_FIELD_SIZE (BITMAPFILEHEADER, bfReserved2, 2) + TEST_FIELD_ALIGN (BITMAPFILEHEADER, bfReserved2, 2) + TEST_FIELD_OFFSET(BITMAPFILEHEADER, bfReserved2, 8) + TEST_FIELD_SIZE (BITMAPFILEHEADER, bfOffBits, 4) + TEST_FIELD_ALIGN (BITMAPFILEHEADER, bfOffBits, 2) + TEST_FIELD_OFFSET(BITMAPFILEHEADER, bfOffBits, 10) } static void test_pack_BITMAPINFO(void) { /* BITMAPINFO (pack 4) */ - TEST_TYPE(BITMAPINFO, 44, 4); - TEST_FIELD(BITMAPINFO, bmiHeader, 0, 40, 4); - TEST_FIELD(BITMAPINFO, bmiColors, 40, 4, 1); + TEST_TYPE_SIZE (BITMAPINFO, 44) + TEST_TYPE_ALIGN (BITMAPINFO, 4) + TEST_FIELD_SIZE (BITMAPINFO, bmiHeader, 40) + TEST_FIELD_ALIGN (BITMAPINFO, bmiHeader, 4) + TEST_FIELD_OFFSET(BITMAPINFO, bmiHeader, 0) + TEST_FIELD_SIZE (BITMAPINFO, bmiColors, 4) + TEST_FIELD_ALIGN (BITMAPINFO, bmiColors, 1) + TEST_FIELD_OFFSET(BITMAPINFO, bmiColors, 40) } static void test_pack_BITMAPINFOHEADER(void) { /* BITMAPINFOHEADER (pack 4) */ - TEST_TYPE(BITMAPINFOHEADER, 40, 4); - TEST_FIELD(BITMAPINFOHEADER, biSize, 0, 4, 4); - TEST_FIELD(BITMAPINFOHEADER, biWidth, 4, 4, 4); - TEST_FIELD(BITMAPINFOHEADER, biHeight, 8, 4, 4); - TEST_FIELD(BITMAPINFOHEADER, biPlanes, 12, 2, 2); - TEST_FIELD(BITMAPINFOHEADER, biBitCount, 14, 2, 2); - TEST_FIELD(BITMAPINFOHEADER, biCompression, 16, 4, 4); - TEST_FIELD(BITMAPINFOHEADER, biSizeImage, 20, 4, 4); - TEST_FIELD(BITMAPINFOHEADER, biXPelsPerMeter, 24, 4, 4); - TEST_FIELD(BITMAPINFOHEADER, biYPelsPerMeter, 28, 4, 4); - TEST_FIELD(BITMAPINFOHEADER, biClrUsed, 32, 4, 4); - TEST_FIELD(BITMAPINFOHEADER, biClrImportant, 36, 4, 4); + TEST_TYPE_SIZE (BITMAPINFOHEADER, 40) + TEST_TYPE_ALIGN (BITMAPINFOHEADER, 4) + TEST_FIELD_SIZE (BITMAPINFOHEADER, biSize, 4) + TEST_FIELD_ALIGN (BITMAPINFOHEADER, biSize, 4) + TEST_FIELD_OFFSET(BITMAPINFOHEADER, biSize, 0) + TEST_FIELD_SIZE (BITMAPINFOHEADER, biWidth, 4) + TEST_FIELD_ALIGN (BITMAPINFOHEADER, biWidth, 4) + TEST_FIELD_OFFSET(BITMAPINFOHEADER, biWidth, 4) + TEST_FIELD_SIZE (BITMAPINFOHEADER, biHeight, 4) + TEST_FIELD_ALIGN (BITMAPINFOHEADER, biHeight, 4) + TEST_FIELD_OFFSET(BITMAPINFOHEADER, biHeight, 8) + TEST_FIELD_SIZE (BITMAPINFOHEADER, biPlanes, 2) + TEST_FIELD_ALIGN (BITMAPINFOHEADER, biPlanes, 2) + TEST_FIELD_OFFSET(BITMAPINFOHEADER, biPlanes, 12) + TEST_FIELD_SIZE (BITMAPINFOHEADER, biBitCount, 2) + TEST_FIELD_ALIGN (BITMAPINFOHEADER, biBitCount, 2) + TEST_FIELD_OFFSET(BITMAPINFOHEADER, biBitCount, 14) + TEST_FIELD_SIZE (BITMAPINFOHEADER, biCompression, 4) + TEST_FIELD_ALIGN (BITMAPINFOHEADER, biCompression, 4) + TEST_FIELD_OFFSET(BITMAPINFOHEADER, biCompression, 16) + TEST_FIELD_SIZE (BITMAPINFOHEADER, biSizeImage, 4) + TEST_FIELD_ALIGN (BITMAPINFOHEADER, biSizeImage, 4) + TEST_FIELD_OFFSET(BITMAPINFOHEADER, biSizeImage, 20) + TEST_FIELD_SIZE (BITMAPINFOHEADER, biXPelsPerMeter, 4) + TEST_FIELD_ALIGN (BITMAPINFOHEADER, biXPelsPerMeter, 4) + TEST_FIELD_OFFSET(BITMAPINFOHEADER, biXPelsPerMeter, 24) + TEST_FIELD_SIZE (BITMAPINFOHEADER, biYPelsPerMeter, 4) + TEST_FIELD_ALIGN (BITMAPINFOHEADER, biYPelsPerMeter, 4) + TEST_FIELD_OFFSET(BITMAPINFOHEADER, biYPelsPerMeter, 28) + TEST_FIELD_SIZE (BITMAPINFOHEADER, biClrUsed, 4) + TEST_FIELD_ALIGN (BITMAPINFOHEADER, biClrUsed, 4) + TEST_FIELD_OFFSET(BITMAPINFOHEADER, biClrUsed, 32) + TEST_FIELD_SIZE (BITMAPINFOHEADER, biClrImportant, 4) + TEST_FIELD_ALIGN (BITMAPINFOHEADER, biClrImportant, 4) + TEST_FIELD_OFFSET(BITMAPINFOHEADER, biClrImportant, 36) } static void test_pack_BITMAPV4HEADER(void) { /* BITMAPV4HEADER (pack 4) */ - TEST_TYPE(BITMAPV4HEADER, 108, 4); - TEST_FIELD(BITMAPV4HEADER, bV4Size, 0, 4, 4); - TEST_FIELD(BITMAPV4HEADER, bV4Width, 4, 4, 4); - TEST_FIELD(BITMAPV4HEADER, bV4Height, 8, 4, 4); - TEST_FIELD(BITMAPV4HEADER, bV4Planes, 12, 2, 2); - TEST_FIELD(BITMAPV4HEADER, bV4BitCount, 14, 2, 2); - TEST_FIELD(BITMAPV4HEADER, bV4V4Compression, 16, 4, 4); - TEST_FIELD(BITMAPV4HEADER, bV4SizeImage, 20, 4, 4); - TEST_FIELD(BITMAPV4HEADER, bV4XPelsPerMeter, 24, 4, 4); - TEST_FIELD(BITMAPV4HEADER, bV4YPelsPerMeter, 28, 4, 4); - TEST_FIELD(BITMAPV4HEADER, bV4ClrUsed, 32, 4, 4); - TEST_FIELD(BITMAPV4HEADER, bV4ClrImportant, 36, 4, 4); - TEST_FIELD(BITMAPV4HEADER, bV4RedMask, 40, 4, 4); - TEST_FIELD(BITMAPV4HEADER, bV4GreenMask, 44, 4, 4); - TEST_FIELD(BITMAPV4HEADER, bV4BlueMask, 48, 4, 4); - TEST_FIELD(BITMAPV4HEADER, bV4AlphaMask, 52, 4, 4); - TEST_FIELD(BITMAPV4HEADER, bV4CSType, 56, 4, 4); - TEST_FIELD(BITMAPV4HEADER, bV4Endpoints, 60, 36, 4); - TEST_FIELD(BITMAPV4HEADER, bV4GammaRed, 96, 4, 4); - TEST_FIELD(BITMAPV4HEADER, bV4GammaGreen, 100, 4, 4); - TEST_FIELD(BITMAPV4HEADER, bV4GammaBlue, 104, 4, 4); + TEST_TYPE_SIZE (BITMAPV4HEADER, 108) + TEST_TYPE_ALIGN (BITMAPV4HEADER, 4) + TEST_FIELD_SIZE (BITMAPV4HEADER, bV4Size, 4) + TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4Size, 4) + TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4Size, 0) + TEST_FIELD_SIZE (BITMAPV4HEADER, bV4Width, 4) + TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4Width, 4) + TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4Width, 4) + TEST_FIELD_SIZE (BITMAPV4HEADER, bV4Height, 4) + TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4Height, 4) + TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4Height, 8) + TEST_FIELD_SIZE (BITMAPV4HEADER, bV4Planes, 2) + TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4Planes, 2) + TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4Planes, 12) + TEST_FIELD_SIZE (BITMAPV4HEADER, bV4BitCount, 2) + TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4BitCount, 2) + TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4BitCount, 14) + TEST_FIELD_SIZE (BITMAPV4HEADER, bV4V4Compression, 4) + TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4V4Compression, 4) + TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4V4Compression, 16) + TEST_FIELD_SIZE (BITMAPV4HEADER, bV4SizeImage, 4) + TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4SizeImage, 4) + TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4SizeImage, 20) + TEST_FIELD_SIZE (BITMAPV4HEADER, bV4XPelsPerMeter, 4) + TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4XPelsPerMeter, 4) + TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4XPelsPerMeter, 24) + TEST_FIELD_SIZE (BITMAPV4HEADER, bV4YPelsPerMeter, 4) + TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4YPelsPerMeter, 4) + TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4YPelsPerMeter, 28) + TEST_FIELD_SIZE (BITMAPV4HEADER, bV4ClrUsed, 4) + TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4ClrUsed, 4) + TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4ClrUsed, 32) + TEST_FIELD_SIZE (BITMAPV4HEADER, bV4ClrImportant, 4) + TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4ClrImportant, 4) + TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4ClrImportant, 36) + TEST_FIELD_SIZE (BITMAPV4HEADER, bV4RedMask, 4) + TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4RedMask, 4) + TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4RedMask, 40) + TEST_FIELD_SIZE (BITMAPV4HEADER, bV4GreenMask, 4) + TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4GreenMask, 4) + TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4GreenMask, 44) + TEST_FIELD_SIZE (BITMAPV4HEADER, bV4BlueMask, 4) + TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4BlueMask, 4) + TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4BlueMask, 48) + TEST_FIELD_SIZE (BITMAPV4HEADER, bV4AlphaMask, 4) + TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4AlphaMask, 4) + TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4AlphaMask, 52) + TEST_FIELD_SIZE (BITMAPV4HEADER, bV4CSType, 4) + TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4CSType, 4) + TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4CSType, 56) + TEST_FIELD_SIZE (BITMAPV4HEADER, bV4Endpoints, 36) + TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4Endpoints, 4) + TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4Endpoints, 60) + TEST_FIELD_SIZE (BITMAPV4HEADER, bV4GammaRed, 4) + TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4GammaRed, 4) + TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4GammaRed, 96) + TEST_FIELD_SIZE (BITMAPV4HEADER, bV4GammaGreen, 4) + TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4GammaGreen, 4) + TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4GammaGreen, 100) + TEST_FIELD_SIZE (BITMAPV4HEADER, bV4GammaBlue, 4) + TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4GammaBlue, 4) + TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4GammaBlue, 104) } static void test_pack_BITMAPV5HEADER(void) { /* BITMAPV5HEADER (pack 4) */ - TEST_TYPE(BITMAPV5HEADER, 124, 4); - TEST_FIELD(BITMAPV5HEADER, bV5Size, 0, 4, 4); - TEST_FIELD(BITMAPV5HEADER, bV5Width, 4, 4, 4); - TEST_FIELD(BITMAPV5HEADER, bV5Height, 8, 4, 4); - TEST_FIELD(BITMAPV5HEADER, bV5Planes, 12, 2, 2); - TEST_FIELD(BITMAPV5HEADER, bV5BitCount, 14, 2, 2); - TEST_FIELD(BITMAPV5HEADER, bV5Compression, 16, 4, 4); - TEST_FIELD(BITMAPV5HEADER, bV5SizeImage, 20, 4, 4); - TEST_FIELD(BITMAPV5HEADER, bV5XPelsPerMeter, 24, 4, 4); - TEST_FIELD(BITMAPV5HEADER, bV5YPelsPerMeter, 28, 4, 4); - TEST_FIELD(BITMAPV5HEADER, bV5ClrUsed, 32, 4, 4); - TEST_FIELD(BITMAPV5HEADER, bV5ClrImportant, 36, 4, 4); - TEST_FIELD(BITMAPV5HEADER, bV5RedMask, 40, 4, 4); - TEST_FIELD(BITMAPV5HEADER, bV5GreenMask, 44, 4, 4); - TEST_FIELD(BITMAPV5HEADER, bV5BlueMask, 48, 4, 4); - TEST_FIELD(BITMAPV5HEADER, bV5AlphaMask, 52, 4, 4); - TEST_FIELD(BITMAPV5HEADER, bV5CSType, 56, 4, 4); - TEST_FIELD(BITMAPV5HEADER, bV5Endpoints, 60, 36, 4); - TEST_FIELD(BITMAPV5HEADER, bV5GammaRed, 96, 4, 4); - TEST_FIELD(BITMAPV5HEADER, bV5GammaGreen, 100, 4, 4); - TEST_FIELD(BITMAPV5HEADER, bV5GammaBlue, 104, 4, 4); - TEST_FIELD(BITMAPV5HEADER, bV5Intent, 108, 4, 4); - TEST_FIELD(BITMAPV5HEADER, bV5ProfileData, 112, 4, 4); - TEST_FIELD(BITMAPV5HEADER, bV5ProfileSize, 116, 4, 4); - TEST_FIELD(BITMAPV5HEADER, bV5Reserved, 120, 4, 4); + TEST_TYPE_SIZE (BITMAPV5HEADER, 124) + TEST_TYPE_ALIGN (BITMAPV5HEADER, 4) + TEST_FIELD_SIZE (BITMAPV5HEADER, bV5Size, 4) + TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5Size, 4) + TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5Size, 0) + TEST_FIELD_SIZE (BITMAPV5HEADER, bV5Width, 4) + TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5Width, 4) + TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5Width, 4) + TEST_FIELD_SIZE (BITMAPV5HEADER, bV5Height, 4) + TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5Height, 4) + TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5Height, 8) + TEST_FIELD_SIZE (BITMAPV5HEADER, bV5Planes, 2) + TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5Planes, 2) + TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5Planes, 12) + TEST_FIELD_SIZE (BITMAPV5HEADER, bV5BitCount, 2) + TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5BitCount, 2) + TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5BitCount, 14) + TEST_FIELD_SIZE (BITMAPV5HEADER, bV5Compression, 4) + TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5Compression, 4) + TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5Compression, 16) + TEST_FIELD_SIZE (BITMAPV5HEADER, bV5SizeImage, 4) + TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5SizeImage, 4) + TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5SizeImage, 20) + TEST_FIELD_SIZE (BITMAPV5HEADER, bV5XPelsPerMeter, 4) + TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5XPelsPerMeter, 4) + TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5XPelsPerMeter, 24) + TEST_FIELD_SIZE (BITMAPV5HEADER, bV5YPelsPerMeter, 4) + TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5YPelsPerMeter, 4) + TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5YPelsPerMeter, 28) + TEST_FIELD_SIZE (BITMAPV5HEADER, bV5ClrUsed, 4) + TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5ClrUsed, 4) + TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5ClrUsed, 32) + TEST_FIELD_SIZE (BITMAPV5HEADER, bV5ClrImportant, 4) + TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5ClrImportant, 4) + TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5ClrImportant, 36) + TEST_FIELD_SIZE (BITMAPV5HEADER, bV5RedMask, 4) + TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5RedMask, 4) + TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5RedMask, 40) + TEST_FIELD_SIZE (BITMAPV5HEADER, bV5GreenMask, 4) + TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5GreenMask, 4) + TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5GreenMask, 44) + TEST_FIELD_SIZE (BITMAPV5HEADER, bV5BlueMask, 4) + TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5BlueMask, 4) + TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5BlueMask, 48) + TEST_FIELD_SIZE (BITMAPV5HEADER, bV5AlphaMask, 4) + TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5AlphaMask, 4) + TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5AlphaMask, 52) + TEST_FIELD_SIZE (BITMAPV5HEADER, bV5CSType, 4) + TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5CSType, 4) + TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5CSType, 56) + TEST_FIELD_SIZE (BITMAPV5HEADER, bV5Endpoints, 36) + TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5Endpoints, 4) + TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5Endpoints, 60) + TEST_FIELD_SIZE (BITMAPV5HEADER, bV5GammaRed, 4) + TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5GammaRed, 4) + TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5GammaRed, 96) + TEST_FIELD_SIZE (BITMAPV5HEADER, bV5GammaGreen, 4) + TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5GammaGreen, 4) + TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5GammaGreen, 100) + TEST_FIELD_SIZE (BITMAPV5HEADER, bV5GammaBlue, 4) + TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5GammaBlue, 4) + TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5GammaBlue, 104) + TEST_FIELD_SIZE (BITMAPV5HEADER, bV5Intent, 4) + TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5Intent, 4) + TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5Intent, 108) + TEST_FIELD_SIZE (BITMAPV5HEADER, bV5ProfileData, 4) + TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5ProfileData, 4) + TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5ProfileData, 112) + TEST_FIELD_SIZE (BITMAPV5HEADER, bV5ProfileSize, 4) + TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5ProfileSize, 4) + TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5ProfileSize, 116) + TEST_FIELD_SIZE (BITMAPV5HEADER, bV5Reserved, 4) + TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5Reserved, 4) + TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5Reserved, 120) } static void test_pack_BLENDFUNCTION(void) { /* BLENDFUNCTION (pack 4) */ - TEST_TYPE(BLENDFUNCTION, 4, 1); - TEST_FIELD(BLENDFUNCTION, BlendOp, 0, 1, 1); - TEST_FIELD(BLENDFUNCTION, BlendFlags, 1, 1, 1); - TEST_FIELD(BLENDFUNCTION, SourceConstantAlpha, 2, 1, 1); - TEST_FIELD(BLENDFUNCTION, AlphaFormat, 3, 1, 1); + TEST_TYPE_SIZE (BLENDFUNCTION, 4) + TEST_TYPE_ALIGN (BLENDFUNCTION, 1) + TEST_FIELD_SIZE (BLENDFUNCTION, BlendOp, 1) + TEST_FIELD_ALIGN (BLENDFUNCTION, BlendOp, 1) + TEST_FIELD_OFFSET(BLENDFUNCTION, BlendOp, 0) + TEST_FIELD_SIZE (BLENDFUNCTION, BlendFlags, 1) + TEST_FIELD_ALIGN (BLENDFUNCTION, BlendFlags, 1) + TEST_FIELD_OFFSET(BLENDFUNCTION, BlendFlags, 1) + TEST_FIELD_SIZE (BLENDFUNCTION, SourceConstantAlpha, 1) + TEST_FIELD_ALIGN (BLENDFUNCTION, SourceConstantAlpha, 1) + TEST_FIELD_OFFSET(BLENDFUNCTION, SourceConstantAlpha, 2) + TEST_FIELD_SIZE (BLENDFUNCTION, AlphaFormat, 1) + TEST_FIELD_ALIGN (BLENDFUNCTION, AlphaFormat, 1) + TEST_FIELD_OFFSET(BLENDFUNCTION, AlphaFormat, 3) } static void test_pack_CHARSETINFO(void) { /* CHARSETINFO (pack 4) */ - TEST_TYPE(CHARSETINFO, 32, 4); - TEST_FIELD(CHARSETINFO, ciCharset, 0, 4, 4); - TEST_FIELD(CHARSETINFO, ciACP, 4, 4, 4); - TEST_FIELD(CHARSETINFO, fs, 8, 24, 4); + TEST_TYPE_SIZE (CHARSETINFO, 32) + TEST_TYPE_ALIGN (CHARSETINFO, 4) + TEST_FIELD_SIZE (CHARSETINFO, ciCharset, 4) + TEST_FIELD_ALIGN (CHARSETINFO, ciCharset, 4) + TEST_FIELD_OFFSET(CHARSETINFO, ciCharset, 0) + TEST_FIELD_SIZE (CHARSETINFO, ciACP, 4) + TEST_FIELD_ALIGN (CHARSETINFO, ciACP, 4) + TEST_FIELD_OFFSET(CHARSETINFO, ciACP, 4) + TEST_FIELD_SIZE (CHARSETINFO, fs, 24) + TEST_FIELD_ALIGN (CHARSETINFO, fs, 4) + TEST_FIELD_OFFSET(CHARSETINFO, fs, 8) } static void test_pack_CIEXYZ(void) { /* CIEXYZ (pack 4) */ - TEST_TYPE(CIEXYZ, 12, 4); - TEST_FIELD(CIEXYZ, ciexyzX, 0, 4, 4); - TEST_FIELD(CIEXYZ, ciexyzY, 4, 4, 4); - TEST_FIELD(CIEXYZ, ciexyzZ, 8, 4, 4); + TEST_TYPE_SIZE (CIEXYZ, 12) + TEST_TYPE_ALIGN (CIEXYZ, 4) + TEST_FIELD_SIZE (CIEXYZ, ciexyzX, 4) + TEST_FIELD_ALIGN (CIEXYZ, ciexyzX, 4) + TEST_FIELD_OFFSET(CIEXYZ, ciexyzX, 0) + TEST_FIELD_SIZE (CIEXYZ, ciexyzY, 4) + TEST_FIELD_ALIGN (CIEXYZ, ciexyzY, 4) + TEST_FIELD_OFFSET(CIEXYZ, ciexyzY, 4) + TEST_FIELD_SIZE (CIEXYZ, ciexyzZ, 4) + TEST_FIELD_ALIGN (CIEXYZ, ciexyzZ, 4) + TEST_FIELD_OFFSET(CIEXYZ, ciexyzZ, 8) } static void test_pack_CIEXYZTRIPLE(void) { /* CIEXYZTRIPLE (pack 4) */ - TEST_TYPE(CIEXYZTRIPLE, 36, 4); - TEST_FIELD(CIEXYZTRIPLE, ciexyzRed, 0, 12, 4); - TEST_FIELD(CIEXYZTRIPLE, ciexyzGreen, 12, 12, 4); - TEST_FIELD(CIEXYZTRIPLE, ciexyzBlue, 24, 12, 4); + TEST_TYPE_SIZE (CIEXYZTRIPLE, 36) + TEST_TYPE_ALIGN (CIEXYZTRIPLE, 4) + TEST_FIELD_SIZE (CIEXYZTRIPLE, ciexyzRed, 12) + TEST_FIELD_ALIGN (CIEXYZTRIPLE, ciexyzRed, 4) + TEST_FIELD_OFFSET(CIEXYZTRIPLE, ciexyzRed, 0) + TEST_FIELD_SIZE (CIEXYZTRIPLE, ciexyzGreen, 12) + TEST_FIELD_ALIGN (CIEXYZTRIPLE, ciexyzGreen, 4) + TEST_FIELD_OFFSET(CIEXYZTRIPLE, ciexyzGreen, 12) + TEST_FIELD_SIZE (CIEXYZTRIPLE, ciexyzBlue, 12) + TEST_FIELD_ALIGN (CIEXYZTRIPLE, ciexyzBlue, 4) + TEST_FIELD_OFFSET(CIEXYZTRIPLE, ciexyzBlue, 24) } static void test_pack_COLOR16(void) { /* COLOR16 */ - TEST_TYPE(COLOR16, 2, 2); + TEST_TYPE_SIZE (COLOR16, 2) + TEST_TYPE_ALIGN (COLOR16, 2) } static void test_pack_COLORADJUSTMENT(void) { /* COLORADJUSTMENT (pack 4) */ - TEST_TYPE(COLORADJUSTMENT, 24, 2); - TEST_FIELD(COLORADJUSTMENT, caSize, 0, 2, 2); - TEST_FIELD(COLORADJUSTMENT, caFlags, 2, 2, 2); - TEST_FIELD(COLORADJUSTMENT, caIlluminantIndex, 4, 2, 2); - TEST_FIELD(COLORADJUSTMENT, caRedGamma, 6, 2, 2); - TEST_FIELD(COLORADJUSTMENT, caGreenGamma, 8, 2, 2); - TEST_FIELD(COLORADJUSTMENT, caBlueGamma, 10, 2, 2); - TEST_FIELD(COLORADJUSTMENT, caReferenceBlack, 12, 2, 2); - TEST_FIELD(COLORADJUSTMENT, caReferenceWhite, 14, 2, 2); - TEST_FIELD(COLORADJUSTMENT, caContrast, 16, 2, 2); - TEST_FIELD(COLORADJUSTMENT, caBrightness, 18, 2, 2); - TEST_FIELD(COLORADJUSTMENT, caColorfulness, 20, 2, 2); - TEST_FIELD(COLORADJUSTMENT, caRedGreenTint, 22, 2, 2); + TEST_TYPE_SIZE (COLORADJUSTMENT, 24) + TEST_TYPE_ALIGN (COLORADJUSTMENT, 2) + TEST_FIELD_SIZE (COLORADJUSTMENT, caSize, 2) + TEST_FIELD_ALIGN (COLORADJUSTMENT, caSize, 2) + TEST_FIELD_OFFSET(COLORADJUSTMENT, caSize, 0) + TEST_FIELD_SIZE (COLORADJUSTMENT, caFlags, 2) + TEST_FIELD_ALIGN (COLORADJUSTMENT, caFlags, 2) + TEST_FIELD_OFFSET(COLORADJUSTMENT, caFlags, 2) + TEST_FIELD_SIZE (COLORADJUSTMENT, caIlluminantIndex, 2) + TEST_FIELD_ALIGN (COLORADJUSTMENT, caIlluminantIndex, 2) + TEST_FIELD_OFFSET(COLORADJUSTMENT, caIlluminantIndex, 4) + TEST_FIELD_SIZE (COLORADJUSTMENT, caRedGamma, 2) + TEST_FIELD_ALIGN (COLORADJUSTMENT, caRedGamma, 2) + TEST_FIELD_OFFSET(COLORADJUSTMENT, caRedGamma, 6) + TEST_FIELD_SIZE (COLORADJUSTMENT, caGreenGamma, 2) + TEST_FIELD_ALIGN (COLORADJUSTMENT, caGreenGamma, 2) + TEST_FIELD_OFFSET(COLORADJUSTMENT, caGreenGamma, 8) + TEST_FIELD_SIZE (COLORADJUSTMENT, caBlueGamma, 2) + TEST_FIELD_ALIGN (COLORADJUSTMENT, caBlueGamma, 2) + TEST_FIELD_OFFSET(COLORADJUSTMENT, caBlueGamma, 10) + TEST_FIELD_SIZE (COLORADJUSTMENT, caReferenceBlack, 2) + TEST_FIELD_ALIGN (COLORADJUSTMENT, caReferenceBlack, 2) + TEST_FIELD_OFFSET(COLORADJUSTMENT, caReferenceBlack, 12) + TEST_FIELD_SIZE (COLORADJUSTMENT, caReferenceWhite, 2) + TEST_FIELD_ALIGN (COLORADJUSTMENT, caReferenceWhite, 2) + TEST_FIELD_OFFSET(COLORADJUSTMENT, caReferenceWhite, 14) + TEST_FIELD_SIZE (COLORADJUSTMENT, caContrast, 2) + TEST_FIELD_ALIGN (COLORADJUSTMENT, caContrast, 2) + TEST_FIELD_OFFSET(COLORADJUSTMENT, caContrast, 16) + TEST_FIELD_SIZE (COLORADJUSTMENT, caBrightness, 2) + TEST_FIELD_ALIGN (COLORADJUSTMENT, caBrightness, 2) + TEST_FIELD_OFFSET(COLORADJUSTMENT, caBrightness, 18) + TEST_FIELD_SIZE (COLORADJUSTMENT, caColorfulness, 2) + TEST_FIELD_ALIGN (COLORADJUSTMENT, caColorfulness, 2) + TEST_FIELD_OFFSET(COLORADJUSTMENT, caColorfulness, 20) + TEST_FIELD_SIZE (COLORADJUSTMENT, caRedGreenTint, 2) + TEST_FIELD_ALIGN (COLORADJUSTMENT, caRedGreenTint, 2) + TEST_FIELD_OFFSET(COLORADJUSTMENT, caRedGreenTint, 22) } static void test_pack_DEVMODEA(void) { /* DEVMODEA (pack 4) */ - TEST_FIELD(DEVMODEA, dmDeviceName, 0, 32, 1); - TEST_FIELD(DEVMODEA, dmSpecVersion, 32, 2, 2); - TEST_FIELD(DEVMODEA, dmDriverVersion, 34, 2, 2); - TEST_FIELD(DEVMODEA, dmSize, 36, 2, 2); - TEST_FIELD(DEVMODEA, dmDriverExtra, 38, 2, 2); - TEST_FIELD(DEVMODEA, dmFields, 40, 4, 4); + TEST_FIELD_SIZE (DEVMODEA, dmDeviceName, 32) + TEST_FIELD_ALIGN (DEVMODEA, dmDeviceName, 1) + TEST_FIELD_OFFSET(DEVMODEA, dmDeviceName, 0) + TEST_FIELD_SIZE (DEVMODEA, dmSpecVersion, 2) + TEST_FIELD_ALIGN (DEVMODEA, dmSpecVersion, 2) + TEST_FIELD_OFFSET(DEVMODEA, dmSpecVersion, 32) + TEST_FIELD_SIZE (DEVMODEA, dmDriverVersion, 2) + TEST_FIELD_ALIGN (DEVMODEA, dmDriverVersion, 2) + TEST_FIELD_OFFSET(DEVMODEA, dmDriverVersion, 34) + TEST_FIELD_SIZE (DEVMODEA, dmSize, 2) + TEST_FIELD_ALIGN (DEVMODEA, dmSize, 2) + TEST_FIELD_OFFSET(DEVMODEA, dmSize, 36) + TEST_FIELD_SIZE (DEVMODEA, dmDriverExtra, 2) + TEST_FIELD_ALIGN (DEVMODEA, dmDriverExtra, 2) + TEST_FIELD_OFFSET(DEVMODEA, dmDriverExtra, 38) + TEST_FIELD_SIZE (DEVMODEA, dmFields, 4) + TEST_FIELD_ALIGN (DEVMODEA, dmFields, 4) + TEST_FIELD_OFFSET(DEVMODEA, dmFields, 40) } static void test_pack_DEVMODEW(void) { /* DEVMODEW (pack 4) */ - TEST_FIELD(DEVMODEW, dmDeviceName, 0, 64, 2); - TEST_FIELD(DEVMODEW, dmSpecVersion, 64, 2, 2); - TEST_FIELD(DEVMODEW, dmDriverVersion, 66, 2, 2); - TEST_FIELD(DEVMODEW, dmSize, 68, 2, 2); - TEST_FIELD(DEVMODEW, dmDriverExtra, 70, 2, 2); - TEST_FIELD(DEVMODEW, dmFields, 72, 4, 4); + TEST_FIELD_SIZE (DEVMODEW, dmDeviceName, 64) + TEST_FIELD_ALIGN (DEVMODEW, dmDeviceName, 2) + TEST_FIELD_OFFSET(DEVMODEW, dmDeviceName, 0) + TEST_FIELD_SIZE (DEVMODEW, dmSpecVersion, 2) + TEST_FIELD_ALIGN (DEVMODEW, dmSpecVersion, 2) + TEST_FIELD_OFFSET(DEVMODEW, dmSpecVersion, 64) + TEST_FIELD_SIZE (DEVMODEW, dmDriverVersion, 2) + TEST_FIELD_ALIGN (DEVMODEW, dmDriverVersion, 2) + TEST_FIELD_OFFSET(DEVMODEW, dmDriverVersion, 66) + TEST_FIELD_SIZE (DEVMODEW, dmSize, 2) + TEST_FIELD_ALIGN (DEVMODEW, dmSize, 2) + TEST_FIELD_OFFSET(DEVMODEW, dmSize, 68) + TEST_FIELD_SIZE (DEVMODEW, dmDriverExtra, 2) + TEST_FIELD_ALIGN (DEVMODEW, dmDriverExtra, 2) + TEST_FIELD_OFFSET(DEVMODEW, dmDriverExtra, 70) + TEST_FIELD_SIZE (DEVMODEW, dmFields, 4) + TEST_FIELD_ALIGN (DEVMODEW, dmFields, 4) + TEST_FIELD_OFFSET(DEVMODEW, dmFields, 72) } static void test_pack_DIBSECTION(void) { /* DIBSECTION (pack 4) */ - TEST_TYPE(DIBSECTION, 84, 4); - TEST_FIELD(DIBSECTION, dsBm, 0, 24, 4); - TEST_FIELD(DIBSECTION, dsBmih, 24, 40, 4); - TEST_FIELD(DIBSECTION, dsBitfields, 64, 12, 4); - TEST_FIELD(DIBSECTION, dshSection, 76, 4, 4); - TEST_FIELD(DIBSECTION, dsOffset, 80, 4, 4); + TEST_TYPE_SIZE (DIBSECTION, 84) + TEST_TYPE_ALIGN (DIBSECTION, 4) + TEST_FIELD_SIZE (DIBSECTION, dsBm, 24) + TEST_FIELD_ALIGN (DIBSECTION, dsBm, 4) + TEST_FIELD_OFFSET(DIBSECTION, dsBm, 0) + TEST_FIELD_SIZE (DIBSECTION, dsBmih, 40) + TEST_FIELD_ALIGN (DIBSECTION, dsBmih, 4) + TEST_FIELD_OFFSET(DIBSECTION, dsBmih, 24) + TEST_FIELD_SIZE (DIBSECTION, dsBitfields, 12) + TEST_FIELD_ALIGN (DIBSECTION, dsBitfields, 4) + TEST_FIELD_OFFSET(DIBSECTION, dsBitfields, 64) + TEST_FIELD_SIZE (DIBSECTION, dshSection, 4) + TEST_FIELD_ALIGN (DIBSECTION, dshSection, 4) + TEST_FIELD_OFFSET(DIBSECTION, dshSection, 76) + TEST_FIELD_SIZE (DIBSECTION, dsOffset, 4) + TEST_FIELD_ALIGN (DIBSECTION, dsOffset, 4) + TEST_FIELD_OFFSET(DIBSECTION, dsOffset, 80) } static void test_pack_DISPLAY_DEVICEA(void) { /* DISPLAY_DEVICEA (pack 4) */ - TEST_TYPE(DISPLAY_DEVICEA, 424, 4); - TEST_FIELD(DISPLAY_DEVICEA, cb, 0, 4, 4); - TEST_FIELD(DISPLAY_DEVICEA, DeviceName, 4, 32, 1); - TEST_FIELD(DISPLAY_DEVICEA, DeviceString, 36, 128, 1); - TEST_FIELD(DISPLAY_DEVICEA, StateFlags, 164, 4, 4); - TEST_FIELD(DISPLAY_DEVICEA, DeviceID, 168, 128, 1); - TEST_FIELD(DISPLAY_DEVICEA, DeviceKey, 296, 128, 1); + TEST_TYPE_SIZE (DISPLAY_DEVICEA, 424) + TEST_TYPE_ALIGN (DISPLAY_DEVICEA, 4) + TEST_FIELD_SIZE (DISPLAY_DEVICEA, cb, 4) + TEST_FIELD_ALIGN (DISPLAY_DEVICEA, cb, 4) + TEST_FIELD_OFFSET(DISPLAY_DEVICEA, cb, 0) + TEST_FIELD_SIZE (DISPLAY_DEVICEA, DeviceName, 32) + TEST_FIELD_ALIGN (DISPLAY_DEVICEA, DeviceName, 1) + TEST_FIELD_OFFSET(DISPLAY_DEVICEA, DeviceName, 4) + TEST_FIELD_SIZE (DISPLAY_DEVICEA, DeviceString, 128) + TEST_FIELD_ALIGN (DISPLAY_DEVICEA, DeviceString, 1) + TEST_FIELD_OFFSET(DISPLAY_DEVICEA, DeviceString, 36) + TEST_FIELD_SIZE (DISPLAY_DEVICEA, StateFlags, 4) + TEST_FIELD_ALIGN (DISPLAY_DEVICEA, StateFlags, 4) + TEST_FIELD_OFFSET(DISPLAY_DEVICEA, StateFlags, 164) + TEST_FIELD_SIZE (DISPLAY_DEVICEA, DeviceID, 128) + TEST_FIELD_ALIGN (DISPLAY_DEVICEA, DeviceID, 1) + TEST_FIELD_OFFSET(DISPLAY_DEVICEA, DeviceID, 168) + TEST_FIELD_SIZE (DISPLAY_DEVICEA, DeviceKey, 128) + TEST_FIELD_ALIGN (DISPLAY_DEVICEA, DeviceKey, 1) + TEST_FIELD_OFFSET(DISPLAY_DEVICEA, DeviceKey, 296) } static void test_pack_DISPLAY_DEVICEW(void) { /* DISPLAY_DEVICEW (pack 4) */ - TEST_TYPE(DISPLAY_DEVICEW, 840, 4); - TEST_FIELD(DISPLAY_DEVICEW, cb, 0, 4, 4); - TEST_FIELD(DISPLAY_DEVICEW, DeviceName, 4, 64, 2); - TEST_FIELD(DISPLAY_DEVICEW, DeviceString, 68, 256, 2); - TEST_FIELD(DISPLAY_DEVICEW, StateFlags, 324, 4, 4); - TEST_FIELD(DISPLAY_DEVICEW, DeviceID, 328, 256, 2); - TEST_FIELD(DISPLAY_DEVICEW, DeviceKey, 584, 256, 2); + TEST_TYPE_SIZE (DISPLAY_DEVICEW, 840) + TEST_TYPE_ALIGN (DISPLAY_DEVICEW, 4) + TEST_FIELD_SIZE (DISPLAY_DEVICEW, cb, 4) + TEST_FIELD_ALIGN (DISPLAY_DEVICEW, cb, 4) + TEST_FIELD_OFFSET(DISPLAY_DEVICEW, cb, 0) + TEST_FIELD_SIZE (DISPLAY_DEVICEW, DeviceName, 64) + TEST_FIELD_ALIGN (DISPLAY_DEVICEW, DeviceName, 2) + TEST_FIELD_OFFSET(DISPLAY_DEVICEW, DeviceName, 4) + TEST_FIELD_SIZE (DISPLAY_DEVICEW, DeviceString, 256) + TEST_FIELD_ALIGN (DISPLAY_DEVICEW, DeviceString, 2) + TEST_FIELD_OFFSET(DISPLAY_DEVICEW, DeviceString, 68) + TEST_FIELD_SIZE (DISPLAY_DEVICEW, StateFlags, 4) + TEST_FIELD_ALIGN (DISPLAY_DEVICEW, StateFlags, 4) + TEST_FIELD_OFFSET(DISPLAY_DEVICEW, StateFlags, 324) + TEST_FIELD_SIZE (DISPLAY_DEVICEW, DeviceID, 256) + TEST_FIELD_ALIGN (DISPLAY_DEVICEW, DeviceID, 2) + TEST_FIELD_OFFSET(DISPLAY_DEVICEW, DeviceID, 328) + TEST_FIELD_SIZE (DISPLAY_DEVICEW, DeviceKey, 256) + TEST_FIELD_ALIGN (DISPLAY_DEVICEW, DeviceKey, 2) + TEST_FIELD_OFFSET(DISPLAY_DEVICEW, DeviceKey, 584) } static void test_pack_DOCINFOA(void) { /* DOCINFOA (pack 4) */ - TEST_TYPE(DOCINFOA, 20, 4); - TEST_FIELD(DOCINFOA, cbSize, 0, 4, 4); - TEST_FIELD(DOCINFOA, lpszDocName, 4, 4, 4); - TEST_FIELD(DOCINFOA, lpszOutput, 8, 4, 4); - TEST_FIELD(DOCINFOA, lpszDatatype, 12, 4, 4); - TEST_FIELD(DOCINFOA, fwType, 16, 4, 4); + TEST_TYPE_SIZE (DOCINFOA, 20) + TEST_TYPE_ALIGN (DOCINFOA, 4) + TEST_FIELD_SIZE (DOCINFOA, cbSize, 4) + TEST_FIELD_ALIGN (DOCINFOA, cbSize, 4) + TEST_FIELD_OFFSET(DOCINFOA, cbSize, 0) + TEST_FIELD_SIZE (DOCINFOA, lpszDocName, 4) + TEST_FIELD_ALIGN (DOCINFOA, lpszDocName, 4) + TEST_FIELD_OFFSET(DOCINFOA, lpszDocName, 4) + TEST_FIELD_SIZE (DOCINFOA, lpszOutput, 4) + TEST_FIELD_ALIGN (DOCINFOA, lpszOutput, 4) + TEST_FIELD_OFFSET(DOCINFOA, lpszOutput, 8) + TEST_FIELD_SIZE (DOCINFOA, lpszDatatype, 4) + TEST_FIELD_ALIGN (DOCINFOA, lpszDatatype, 4) + TEST_FIELD_OFFSET(DOCINFOA, lpszDatatype, 12) + TEST_FIELD_SIZE (DOCINFOA, fwType, 4) + TEST_FIELD_ALIGN (DOCINFOA, fwType, 4) + TEST_FIELD_OFFSET(DOCINFOA, fwType, 16) } static void test_pack_DOCINFOW(void) { /* DOCINFOW (pack 4) */ - TEST_TYPE(DOCINFOW, 20, 4); - TEST_FIELD(DOCINFOW, cbSize, 0, 4, 4); - TEST_FIELD(DOCINFOW, lpszDocName, 4, 4, 4); - TEST_FIELD(DOCINFOW, lpszOutput, 8, 4, 4); - TEST_FIELD(DOCINFOW, lpszDatatype, 12, 4, 4); - TEST_FIELD(DOCINFOW, fwType, 16, 4, 4); + TEST_TYPE_SIZE (DOCINFOW, 20) + TEST_TYPE_ALIGN (DOCINFOW, 4) + TEST_FIELD_SIZE (DOCINFOW, cbSize, 4) + TEST_FIELD_ALIGN (DOCINFOW, cbSize, 4) + TEST_FIELD_OFFSET(DOCINFOW, cbSize, 0) + TEST_FIELD_SIZE (DOCINFOW, lpszDocName, 4) + TEST_FIELD_ALIGN (DOCINFOW, lpszDocName, 4) + TEST_FIELD_OFFSET(DOCINFOW, lpszDocName, 4) + TEST_FIELD_SIZE (DOCINFOW, lpszOutput, 4) + TEST_FIELD_ALIGN (DOCINFOW, lpszOutput, 4) + TEST_FIELD_OFFSET(DOCINFOW, lpszOutput, 8) + TEST_FIELD_SIZE (DOCINFOW, lpszDatatype, 4) + TEST_FIELD_ALIGN (DOCINFOW, lpszDatatype, 4) + TEST_FIELD_OFFSET(DOCINFOW, lpszDatatype, 12) + TEST_FIELD_SIZE (DOCINFOW, fwType, 4) + TEST_FIELD_ALIGN (DOCINFOW, fwType, 4) + TEST_FIELD_OFFSET(DOCINFOW, fwType, 16) } static void test_pack_EMR(void) { /* EMR (pack 4) */ - TEST_TYPE(EMR, 8, 4); - TEST_FIELD(EMR, iType, 0, 4, 4); - TEST_FIELD(EMR, nSize, 4, 4, 4); + TEST_TYPE_SIZE (EMR, 8) + TEST_TYPE_ALIGN (EMR, 4) + TEST_FIELD_SIZE (EMR, iType, 4) + TEST_FIELD_ALIGN (EMR, iType, 4) + TEST_FIELD_OFFSET(EMR, iType, 0) + TEST_FIELD_SIZE (EMR, nSize, 4) + TEST_FIELD_ALIGN (EMR, nSize, 4) + TEST_FIELD_OFFSET(EMR, nSize, 4) } static void test_pack_EMRABORTPATH(void) { /* EMRABORTPATH (pack 4) */ - TEST_TYPE(EMRABORTPATH, 8, 4); - TEST_FIELD(EMRABORTPATH, emr, 0, 8, 4); + TEST_TYPE_SIZE (EMRABORTPATH, 8) + TEST_TYPE_ALIGN (EMRABORTPATH, 4) + TEST_FIELD_SIZE (EMRABORTPATH, emr, 8) + TEST_FIELD_ALIGN (EMRABORTPATH, emr, 4) + TEST_FIELD_OFFSET(EMRABORTPATH, emr, 0) } static void test_pack_EMRANGLEARC(void) { /* EMRANGLEARC (pack 4) */ - TEST_TYPE(EMRANGLEARC, 28, 4); - TEST_FIELD(EMRANGLEARC, emr, 0, 8, 4); - TEST_FIELD(EMRANGLEARC, ptlCenter, 8, 8, 4); - TEST_FIELD(EMRANGLEARC, nRadius, 16, 4, 4); - TEST_FIELD(EMRANGLEARC, eStartAngle, 20, 4, 4); - TEST_FIELD(EMRANGLEARC, eSweepAngle, 24, 4, 4); + TEST_TYPE_SIZE (EMRANGLEARC, 28) + TEST_TYPE_ALIGN (EMRANGLEARC, 4) + TEST_FIELD_SIZE (EMRANGLEARC, emr, 8) + TEST_FIELD_ALIGN (EMRANGLEARC, emr, 4) + TEST_FIELD_OFFSET(EMRANGLEARC, emr, 0) + TEST_FIELD_SIZE (EMRANGLEARC, ptlCenter, 8) + TEST_FIELD_ALIGN (EMRANGLEARC, ptlCenter, 4) + TEST_FIELD_OFFSET(EMRANGLEARC, ptlCenter, 8) + TEST_FIELD_SIZE (EMRANGLEARC, nRadius, 4) + TEST_FIELD_ALIGN (EMRANGLEARC, nRadius, 4) + TEST_FIELD_OFFSET(EMRANGLEARC, nRadius, 16) + TEST_FIELD_SIZE (EMRANGLEARC, eStartAngle, 4) + TEST_FIELD_ALIGN (EMRANGLEARC, eStartAngle, 4) + TEST_FIELD_OFFSET(EMRANGLEARC, eStartAngle, 20) + TEST_FIELD_SIZE (EMRANGLEARC, eSweepAngle, 4) + TEST_FIELD_ALIGN (EMRANGLEARC, eSweepAngle, 4) + TEST_FIELD_OFFSET(EMRANGLEARC, eSweepAngle, 24) } static void test_pack_EMRARC(void) { /* EMRARC (pack 4) */ - TEST_TYPE(EMRARC, 40, 4); - TEST_FIELD(EMRARC, emr, 0, 8, 4); - TEST_FIELD(EMRARC, rclBox, 8, 16, 4); - TEST_FIELD(EMRARC, ptlStart, 24, 8, 4); - TEST_FIELD(EMRARC, ptlEnd, 32, 8, 4); + TEST_TYPE_SIZE (EMRARC, 40) + TEST_TYPE_ALIGN (EMRARC, 4) + TEST_FIELD_SIZE (EMRARC, emr, 8) + TEST_FIELD_ALIGN (EMRARC, emr, 4) + TEST_FIELD_OFFSET(EMRARC, emr, 0) + TEST_FIELD_SIZE (EMRARC, rclBox, 16) + TEST_FIELD_ALIGN (EMRARC, rclBox, 4) + TEST_FIELD_OFFSET(EMRARC, rclBox, 8) + TEST_FIELD_SIZE (EMRARC, ptlStart, 8) + TEST_FIELD_ALIGN (EMRARC, ptlStart, 4) + TEST_FIELD_OFFSET(EMRARC, ptlStart, 24) + TEST_FIELD_SIZE (EMRARC, ptlEnd, 8) + TEST_FIELD_ALIGN (EMRARC, ptlEnd, 4) + TEST_FIELD_OFFSET(EMRARC, ptlEnd, 32) } static void test_pack_EMRARCTO(void) { /* EMRARCTO (pack 4) */ - TEST_TYPE(EMRARCTO, 40, 4); - TEST_FIELD(EMRARCTO, emr, 0, 8, 4); - TEST_FIELD(EMRARCTO, rclBox, 8, 16, 4); - TEST_FIELD(EMRARCTO, ptlStart, 24, 8, 4); - TEST_FIELD(EMRARCTO, ptlEnd, 32, 8, 4); + TEST_TYPE_SIZE (EMRARCTO, 40) + TEST_TYPE_ALIGN (EMRARCTO, 4) + TEST_FIELD_SIZE (EMRARCTO, emr, 8) + TEST_FIELD_ALIGN (EMRARCTO, emr, 4) + TEST_FIELD_OFFSET(EMRARCTO, emr, 0) + TEST_FIELD_SIZE (EMRARCTO, rclBox, 16) + TEST_FIELD_ALIGN (EMRARCTO, rclBox, 4) + TEST_FIELD_OFFSET(EMRARCTO, rclBox, 8) + TEST_FIELD_SIZE (EMRARCTO, ptlStart, 8) + TEST_FIELD_ALIGN (EMRARCTO, ptlStart, 4) + TEST_FIELD_OFFSET(EMRARCTO, ptlStart, 24) + TEST_FIELD_SIZE (EMRARCTO, ptlEnd, 8) + TEST_FIELD_ALIGN (EMRARCTO, ptlEnd, 4) + TEST_FIELD_OFFSET(EMRARCTO, ptlEnd, 32) } static void test_pack_EMRBEGINPATH(void) { /* EMRBEGINPATH (pack 4) */ - TEST_TYPE(EMRBEGINPATH, 8, 4); - TEST_FIELD(EMRBEGINPATH, emr, 0, 8, 4); + TEST_TYPE_SIZE (EMRBEGINPATH, 8) + TEST_TYPE_ALIGN (EMRBEGINPATH, 4) + TEST_FIELD_SIZE (EMRBEGINPATH, emr, 8) + TEST_FIELD_ALIGN (EMRBEGINPATH, emr, 4) + TEST_FIELD_OFFSET(EMRBEGINPATH, emr, 0) } static void test_pack_EMRBITBLT(void) { /* EMRBITBLT (pack 4) */ - TEST_TYPE(EMRBITBLT, 100, 4); - TEST_FIELD(EMRBITBLT, emr, 0, 8, 4); - TEST_FIELD(EMRBITBLT, rclBounds, 8, 16, 4); - TEST_FIELD(EMRBITBLT, xDest, 24, 4, 4); - TEST_FIELD(EMRBITBLT, yDest, 28, 4, 4); - TEST_FIELD(EMRBITBLT, cxDest, 32, 4, 4); - TEST_FIELD(EMRBITBLT, cyDest, 36, 4, 4); - TEST_FIELD(EMRBITBLT, dwRop, 40, 4, 4); - TEST_FIELD(EMRBITBLT, xSrc, 44, 4, 4); - TEST_FIELD(EMRBITBLT, ySrc, 48, 4, 4); - TEST_FIELD(EMRBITBLT, xformSrc, 52, 24, 4); - TEST_FIELD(EMRBITBLT, crBkColorSrc, 76, 4, 4); - TEST_FIELD(EMRBITBLT, iUsageSrc, 80, 4, 4); - TEST_FIELD(EMRBITBLT, offBmiSrc, 84, 4, 4); - TEST_FIELD(EMRBITBLT, cbBmiSrc, 88, 4, 4); - TEST_FIELD(EMRBITBLT, offBitsSrc, 92, 4, 4); - TEST_FIELD(EMRBITBLT, cbBitsSrc, 96, 4, 4); + TEST_TYPE_SIZE (EMRBITBLT, 100) + TEST_TYPE_ALIGN (EMRBITBLT, 4) + TEST_FIELD_SIZE (EMRBITBLT, emr, 8) + TEST_FIELD_ALIGN (EMRBITBLT, emr, 4) + TEST_FIELD_OFFSET(EMRBITBLT, emr, 0) + TEST_FIELD_SIZE (EMRBITBLT, rclBounds, 16) + TEST_FIELD_ALIGN (EMRBITBLT, rclBounds, 4) + TEST_FIELD_OFFSET(EMRBITBLT, rclBounds, 8) + TEST_FIELD_SIZE (EMRBITBLT, xDest, 4) + TEST_FIELD_ALIGN (EMRBITBLT, xDest, 4) + TEST_FIELD_OFFSET(EMRBITBLT, xDest, 24) + TEST_FIELD_SIZE (EMRBITBLT, yDest, 4) + TEST_FIELD_ALIGN (EMRBITBLT, yDest, 4) + TEST_FIELD_OFFSET(EMRBITBLT, yDest, 28) + TEST_FIELD_SIZE (EMRBITBLT, cxDest, 4) + TEST_FIELD_ALIGN (EMRBITBLT, cxDest, 4) + TEST_FIELD_OFFSET(EMRBITBLT, cxDest, 32) + TEST_FIELD_SIZE (EMRBITBLT, cyDest, 4) + TEST_FIELD_ALIGN (EMRBITBLT, cyDest, 4) + TEST_FIELD_OFFSET(EMRBITBLT, cyDest, 36) + TEST_FIELD_SIZE (EMRBITBLT, dwRop, 4) + TEST_FIELD_ALIGN (EMRBITBLT, dwRop, 4) + TEST_FIELD_OFFSET(EMRBITBLT, dwRop, 40) + TEST_FIELD_SIZE (EMRBITBLT, xSrc, 4) + TEST_FIELD_ALIGN (EMRBITBLT, xSrc, 4) + TEST_FIELD_OFFSET(EMRBITBLT, xSrc, 44) + TEST_FIELD_SIZE (EMRBITBLT, ySrc, 4) + TEST_FIELD_ALIGN (EMRBITBLT, ySrc, 4) + TEST_FIELD_OFFSET(EMRBITBLT, ySrc, 48) + TEST_FIELD_SIZE (EMRBITBLT, xformSrc, 24) + TEST_FIELD_ALIGN (EMRBITBLT, xformSrc, 4) + TEST_FIELD_OFFSET(EMRBITBLT, xformSrc, 52) + TEST_FIELD_SIZE (EMRBITBLT, crBkColorSrc, 4) + TEST_FIELD_ALIGN (EMRBITBLT, crBkColorSrc, 4) + TEST_FIELD_OFFSET(EMRBITBLT, crBkColorSrc, 76) + TEST_FIELD_SIZE (EMRBITBLT, iUsageSrc, 4) + TEST_FIELD_ALIGN (EMRBITBLT, iUsageSrc, 4) + TEST_FIELD_OFFSET(EMRBITBLT, iUsageSrc, 80) + TEST_FIELD_SIZE (EMRBITBLT, offBmiSrc, 4) + TEST_FIELD_ALIGN (EMRBITBLT, offBmiSrc, 4) + TEST_FIELD_OFFSET(EMRBITBLT, offBmiSrc, 84) + TEST_FIELD_SIZE (EMRBITBLT, cbBmiSrc, 4) + TEST_FIELD_ALIGN (EMRBITBLT, cbBmiSrc, 4) + TEST_FIELD_OFFSET(EMRBITBLT, cbBmiSrc, 88) + TEST_FIELD_SIZE (EMRBITBLT, offBitsSrc, 4) + TEST_FIELD_ALIGN (EMRBITBLT, offBitsSrc, 4) + TEST_FIELD_OFFSET(EMRBITBLT, offBitsSrc, 92) + TEST_FIELD_SIZE (EMRBITBLT, cbBitsSrc, 4) + TEST_FIELD_ALIGN (EMRBITBLT, cbBitsSrc, 4) + TEST_FIELD_OFFSET(EMRBITBLT, cbBitsSrc, 96) } static void test_pack_EMRCHORD(void) { /* EMRCHORD (pack 4) */ - TEST_TYPE(EMRCHORD, 40, 4); - TEST_FIELD(EMRCHORD, emr, 0, 8, 4); - TEST_FIELD(EMRCHORD, rclBox, 8, 16, 4); - TEST_FIELD(EMRCHORD, ptlStart, 24, 8, 4); - TEST_FIELD(EMRCHORD, ptlEnd, 32, 8, 4); + TEST_TYPE_SIZE (EMRCHORD, 40) + TEST_TYPE_ALIGN (EMRCHORD, 4) + TEST_FIELD_SIZE (EMRCHORD, emr, 8) + TEST_FIELD_ALIGN (EMRCHORD, emr, 4) + TEST_FIELD_OFFSET(EMRCHORD, emr, 0) + TEST_FIELD_SIZE (EMRCHORD, rclBox, 16) + TEST_FIELD_ALIGN (EMRCHORD, rclBox, 4) + TEST_FIELD_OFFSET(EMRCHORD, rclBox, 8) + TEST_FIELD_SIZE (EMRCHORD, ptlStart, 8) + TEST_FIELD_ALIGN (EMRCHORD, ptlStart, 4) + TEST_FIELD_OFFSET(EMRCHORD, ptlStart, 24) + TEST_FIELD_SIZE (EMRCHORD, ptlEnd, 8) + TEST_FIELD_ALIGN (EMRCHORD, ptlEnd, 4) + TEST_FIELD_OFFSET(EMRCHORD, ptlEnd, 32) } static void test_pack_EMRCLOSEFIGURE(void) { /* EMRCLOSEFIGURE (pack 4) */ - TEST_TYPE(EMRCLOSEFIGURE, 8, 4); - TEST_FIELD(EMRCLOSEFIGURE, emr, 0, 8, 4); + TEST_TYPE_SIZE (EMRCLOSEFIGURE, 8) + TEST_TYPE_ALIGN (EMRCLOSEFIGURE, 4) + TEST_FIELD_SIZE (EMRCLOSEFIGURE, emr, 8) + TEST_FIELD_ALIGN (EMRCLOSEFIGURE, emr, 4) + TEST_FIELD_OFFSET(EMRCLOSEFIGURE, emr, 0) } static void test_pack_EMRCREATEBRUSHINDIRECT(void) { /* EMRCREATEBRUSHINDIRECT (pack 4) */ - TEST_TYPE(EMRCREATEBRUSHINDIRECT, 24, 4); - TEST_FIELD(EMRCREATEBRUSHINDIRECT, emr, 0, 8, 4); - TEST_FIELD(EMRCREATEBRUSHINDIRECT, ihBrush, 8, 4, 4); - TEST_FIELD(EMRCREATEBRUSHINDIRECT, lb, 12, 12, 4); + TEST_TYPE_SIZE (EMRCREATEBRUSHINDIRECT, 24) + TEST_TYPE_ALIGN (EMRCREATEBRUSHINDIRECT, 4) + TEST_FIELD_SIZE (EMRCREATEBRUSHINDIRECT, emr, 8) + TEST_FIELD_ALIGN (EMRCREATEBRUSHINDIRECT, emr, 4) + TEST_FIELD_OFFSET(EMRCREATEBRUSHINDIRECT, emr, 0) + TEST_FIELD_SIZE (EMRCREATEBRUSHINDIRECT, ihBrush, 4) + TEST_FIELD_ALIGN (EMRCREATEBRUSHINDIRECT, ihBrush, 4) + TEST_FIELD_OFFSET(EMRCREATEBRUSHINDIRECT, ihBrush, 8) + TEST_FIELD_SIZE (EMRCREATEBRUSHINDIRECT, lb, 12) + TEST_FIELD_ALIGN (EMRCREATEBRUSHINDIRECT, lb, 4) + TEST_FIELD_OFFSET(EMRCREATEBRUSHINDIRECT, lb, 12) } static void test_pack_EMRCREATECOLORSPACE(void) { /* EMRCREATECOLORSPACE (pack 4) */ - TEST_TYPE(EMRCREATECOLORSPACE, 340, 4); - TEST_FIELD(EMRCREATECOLORSPACE, emr, 0, 8, 4); - TEST_FIELD(EMRCREATECOLORSPACE, ihCS, 8, 4, 4); - TEST_FIELD(EMRCREATECOLORSPACE, lcs, 12, 328, 4); + TEST_TYPE_SIZE (EMRCREATECOLORSPACE, 340) + TEST_TYPE_ALIGN (EMRCREATECOLORSPACE, 4) + TEST_FIELD_SIZE (EMRCREATECOLORSPACE, emr, 8) + TEST_FIELD_ALIGN (EMRCREATECOLORSPACE, emr, 4) + TEST_FIELD_OFFSET(EMRCREATECOLORSPACE, emr, 0) + TEST_FIELD_SIZE (EMRCREATECOLORSPACE, ihCS, 4) + TEST_FIELD_ALIGN (EMRCREATECOLORSPACE, ihCS, 4) + TEST_FIELD_OFFSET(EMRCREATECOLORSPACE, ihCS, 8) + TEST_FIELD_SIZE (EMRCREATECOLORSPACE, lcs, 328) + TEST_FIELD_ALIGN (EMRCREATECOLORSPACE, lcs, 4) + TEST_FIELD_OFFSET(EMRCREATECOLORSPACE, lcs, 12) } static void test_pack_EMRCREATECOLORSPACEW(void) { /* EMRCREATECOLORSPACEW (pack 4) */ - TEST_TYPE(EMRCREATECOLORSPACEW, 612, 4); - TEST_FIELD(EMRCREATECOLORSPACEW, emr, 0, 8, 4); - TEST_FIELD(EMRCREATECOLORSPACEW, ihCS, 8, 4, 4); - TEST_FIELD(EMRCREATECOLORSPACEW, lcs, 12, 588, 4); - TEST_FIELD(EMRCREATECOLORSPACEW, dwFlags, 600, 4, 4); - TEST_FIELD(EMRCREATECOLORSPACEW, cbData, 604, 4, 4); - TEST_FIELD(EMRCREATECOLORSPACEW, Data, 608, 1, 1); + TEST_TYPE_SIZE (EMRCREATECOLORSPACEW, 612) + TEST_TYPE_ALIGN (EMRCREATECOLORSPACEW, 4) + TEST_FIELD_SIZE (EMRCREATECOLORSPACEW, emr, 8) + TEST_FIELD_ALIGN (EMRCREATECOLORSPACEW, emr, 4) + TEST_FIELD_OFFSET(EMRCREATECOLORSPACEW, emr, 0) + TEST_FIELD_SIZE (EMRCREATECOLORSPACEW, ihCS, 4) + TEST_FIELD_ALIGN (EMRCREATECOLORSPACEW, ihCS, 4) + TEST_FIELD_OFFSET(EMRCREATECOLORSPACEW, ihCS, 8) + TEST_FIELD_SIZE (EMRCREATECOLORSPACEW, lcs, 588) + TEST_FIELD_ALIGN (EMRCREATECOLORSPACEW, lcs, 4) + TEST_FIELD_OFFSET(EMRCREATECOLORSPACEW, lcs, 12) + TEST_FIELD_SIZE (EMRCREATECOLORSPACEW, dwFlags, 4) + TEST_FIELD_ALIGN (EMRCREATECOLORSPACEW, dwFlags, 4) + TEST_FIELD_OFFSET(EMRCREATECOLORSPACEW, dwFlags, 600) + TEST_FIELD_SIZE (EMRCREATECOLORSPACEW, cbData, 4) + TEST_FIELD_ALIGN (EMRCREATECOLORSPACEW, cbData, 4) + TEST_FIELD_OFFSET(EMRCREATECOLORSPACEW, cbData, 604) + TEST_FIELD_SIZE (EMRCREATECOLORSPACEW, Data, 1) + TEST_FIELD_ALIGN (EMRCREATECOLORSPACEW, Data, 1) + TEST_FIELD_OFFSET(EMRCREATECOLORSPACEW, Data, 608) } static void test_pack_EMRCREATEDIBPATTERNBRUSHPT(void) { /* EMRCREATEDIBPATTERNBRUSHPT (pack 4) */ - TEST_TYPE(EMRCREATEDIBPATTERNBRUSHPT, 32, 4); - TEST_FIELD(EMRCREATEDIBPATTERNBRUSHPT, emr, 0, 8, 4); - TEST_FIELD(EMRCREATEDIBPATTERNBRUSHPT, ihBrush, 8, 4, 4); - TEST_FIELD(EMRCREATEDIBPATTERNBRUSHPT, iUsage, 12, 4, 4); - TEST_FIELD(EMRCREATEDIBPATTERNBRUSHPT, offBmi, 16, 4, 4); - TEST_FIELD(EMRCREATEDIBPATTERNBRUSHPT, cbBmi, 20, 4, 4); - TEST_FIELD(EMRCREATEDIBPATTERNBRUSHPT, offBits, 24, 4, 4); - TEST_FIELD(EMRCREATEDIBPATTERNBRUSHPT, cbBits, 28, 4, 4); + TEST_TYPE_SIZE (EMRCREATEDIBPATTERNBRUSHPT, 32) + TEST_TYPE_ALIGN (EMRCREATEDIBPATTERNBRUSHPT, 4) + TEST_FIELD_SIZE (EMRCREATEDIBPATTERNBRUSHPT, emr, 8) + TEST_FIELD_ALIGN (EMRCREATEDIBPATTERNBRUSHPT, emr, 4) + TEST_FIELD_OFFSET(EMRCREATEDIBPATTERNBRUSHPT, emr, 0) + TEST_FIELD_SIZE (EMRCREATEDIBPATTERNBRUSHPT, ihBrush, 4) + TEST_FIELD_ALIGN (EMRCREATEDIBPATTERNBRUSHPT, ihBrush, 4) + TEST_FIELD_OFFSET(EMRCREATEDIBPATTERNBRUSHPT, ihBrush, 8) + TEST_FIELD_SIZE (EMRCREATEDIBPATTERNBRUSHPT, iUsage, 4) + TEST_FIELD_ALIGN (EMRCREATEDIBPATTERNBRUSHPT, iUsage, 4) + TEST_FIELD_OFFSET(EMRCREATEDIBPATTERNBRUSHPT, iUsage, 12) + TEST_FIELD_SIZE (EMRCREATEDIBPATTERNBRUSHPT, offBmi, 4) + TEST_FIELD_ALIGN (EMRCREATEDIBPATTERNBRUSHPT, offBmi, 4) + TEST_FIELD_OFFSET(EMRCREATEDIBPATTERNBRUSHPT, offBmi, 16) + TEST_FIELD_SIZE (EMRCREATEDIBPATTERNBRUSHPT, cbBmi, 4) + TEST_FIELD_ALIGN (EMRCREATEDIBPATTERNBRUSHPT, cbBmi, 4) + TEST_FIELD_OFFSET(EMRCREATEDIBPATTERNBRUSHPT, cbBmi, 20) + TEST_FIELD_SIZE (EMRCREATEDIBPATTERNBRUSHPT, offBits, 4) + TEST_FIELD_ALIGN (EMRCREATEDIBPATTERNBRUSHPT, offBits, 4) + TEST_FIELD_OFFSET(EMRCREATEDIBPATTERNBRUSHPT, offBits, 24) + TEST_FIELD_SIZE (EMRCREATEDIBPATTERNBRUSHPT, cbBits, 4) + TEST_FIELD_ALIGN (EMRCREATEDIBPATTERNBRUSHPT, cbBits, 4) + TEST_FIELD_OFFSET(EMRCREATEDIBPATTERNBRUSHPT, cbBits, 28) } static void test_pack_EMRCREATEMONOBRUSH(void) { /* EMRCREATEMONOBRUSH (pack 4) */ - TEST_TYPE(EMRCREATEMONOBRUSH, 32, 4); - TEST_FIELD(EMRCREATEMONOBRUSH, emr, 0, 8, 4); - TEST_FIELD(EMRCREATEMONOBRUSH, ihBrush, 8, 4, 4); - TEST_FIELD(EMRCREATEMONOBRUSH, iUsage, 12, 4, 4); - TEST_FIELD(EMRCREATEMONOBRUSH, offBmi, 16, 4, 4); - TEST_FIELD(EMRCREATEMONOBRUSH, cbBmi, 20, 4, 4); - TEST_FIELD(EMRCREATEMONOBRUSH, offBits, 24, 4, 4); - TEST_FIELD(EMRCREATEMONOBRUSH, cbBits, 28, 4, 4); + TEST_TYPE_SIZE (EMRCREATEMONOBRUSH, 32) + TEST_TYPE_ALIGN (EMRCREATEMONOBRUSH, 4) + TEST_FIELD_SIZE (EMRCREATEMONOBRUSH, emr, 8) + TEST_FIELD_ALIGN (EMRCREATEMONOBRUSH, emr, 4) + TEST_FIELD_OFFSET(EMRCREATEMONOBRUSH, emr, 0) + TEST_FIELD_SIZE (EMRCREATEMONOBRUSH, ihBrush, 4) + TEST_FIELD_ALIGN (EMRCREATEMONOBRUSH, ihBrush, 4) + TEST_FIELD_OFFSET(EMRCREATEMONOBRUSH, ihBrush, 8) + TEST_FIELD_SIZE (EMRCREATEMONOBRUSH, iUsage, 4) + TEST_FIELD_ALIGN (EMRCREATEMONOBRUSH, iUsage, 4) + TEST_FIELD_OFFSET(EMRCREATEMONOBRUSH, iUsage, 12) + TEST_FIELD_SIZE (EMRCREATEMONOBRUSH, offBmi, 4) + TEST_FIELD_ALIGN (EMRCREATEMONOBRUSH, offBmi, 4) + TEST_FIELD_OFFSET(EMRCREATEMONOBRUSH, offBmi, 16) + TEST_FIELD_SIZE (EMRCREATEMONOBRUSH, cbBmi, 4) + TEST_FIELD_ALIGN (EMRCREATEMONOBRUSH, cbBmi, 4) + TEST_FIELD_OFFSET(EMRCREATEMONOBRUSH, cbBmi, 20) + TEST_FIELD_SIZE (EMRCREATEMONOBRUSH, offBits, 4) + TEST_FIELD_ALIGN (EMRCREATEMONOBRUSH, offBits, 4) + TEST_FIELD_OFFSET(EMRCREATEMONOBRUSH, offBits, 24) + TEST_FIELD_SIZE (EMRCREATEMONOBRUSH, cbBits, 4) + TEST_FIELD_ALIGN (EMRCREATEMONOBRUSH, cbBits, 4) + TEST_FIELD_OFFSET(EMRCREATEMONOBRUSH, cbBits, 28) } static void test_pack_EMRCREATEPEN(void) { /* EMRCREATEPEN (pack 4) */ - TEST_TYPE(EMRCREATEPEN, 28, 4); - TEST_FIELD(EMRCREATEPEN, emr, 0, 8, 4); - TEST_FIELD(EMRCREATEPEN, ihPen, 8, 4, 4); - TEST_FIELD(EMRCREATEPEN, lopn, 12, 16, 4); + TEST_TYPE_SIZE (EMRCREATEPEN, 28) + TEST_TYPE_ALIGN (EMRCREATEPEN, 4) + TEST_FIELD_SIZE (EMRCREATEPEN, emr, 8) + TEST_FIELD_ALIGN (EMRCREATEPEN, emr, 4) + TEST_FIELD_OFFSET(EMRCREATEPEN, emr, 0) + TEST_FIELD_SIZE (EMRCREATEPEN, ihPen, 4) + TEST_FIELD_ALIGN (EMRCREATEPEN, ihPen, 4) + TEST_FIELD_OFFSET(EMRCREATEPEN, ihPen, 8) + TEST_FIELD_SIZE (EMRCREATEPEN, lopn, 16) + TEST_FIELD_ALIGN (EMRCREATEPEN, lopn, 4) + TEST_FIELD_OFFSET(EMRCREATEPEN, lopn, 12) } static void test_pack_EMRDELETECOLORSPACE(void) { /* EMRDELETECOLORSPACE (pack 4) */ - TEST_TYPE(EMRDELETECOLORSPACE, 12, 4); - TEST_FIELD(EMRDELETECOLORSPACE, emr, 0, 8, 4); - TEST_FIELD(EMRDELETECOLORSPACE, ihCS, 8, 4, 4); + TEST_TYPE_SIZE (EMRDELETECOLORSPACE, 12) + TEST_TYPE_ALIGN (EMRDELETECOLORSPACE, 4) + TEST_FIELD_SIZE (EMRDELETECOLORSPACE, emr, 8) + TEST_FIELD_ALIGN (EMRDELETECOLORSPACE, emr, 4) + TEST_FIELD_OFFSET(EMRDELETECOLORSPACE, emr, 0) + TEST_FIELD_SIZE (EMRDELETECOLORSPACE, ihCS, 4) + TEST_FIELD_ALIGN (EMRDELETECOLORSPACE, ihCS, 4) + TEST_FIELD_OFFSET(EMRDELETECOLORSPACE, ihCS, 8) } static void test_pack_EMRDELETEOBJECT(void) { /* EMRDELETEOBJECT (pack 4) */ - TEST_TYPE(EMRDELETEOBJECT, 12, 4); - TEST_FIELD(EMRDELETEOBJECT, emr, 0, 8, 4); - TEST_FIELD(EMRDELETEOBJECT, ihObject, 8, 4, 4); + TEST_TYPE_SIZE (EMRDELETEOBJECT, 12) + TEST_TYPE_ALIGN (EMRDELETEOBJECT, 4) + TEST_FIELD_SIZE (EMRDELETEOBJECT, emr, 8) + TEST_FIELD_ALIGN (EMRDELETEOBJECT, emr, 4) + TEST_FIELD_OFFSET(EMRDELETEOBJECT, emr, 0) + TEST_FIELD_SIZE (EMRDELETEOBJECT, ihObject, 4) + TEST_FIELD_ALIGN (EMRDELETEOBJECT, ihObject, 4) + TEST_FIELD_OFFSET(EMRDELETEOBJECT, ihObject, 8) } static void test_pack_EMRELLIPSE(void) { /* EMRELLIPSE (pack 4) */ - TEST_TYPE(EMRELLIPSE, 24, 4); - TEST_FIELD(EMRELLIPSE, emr, 0, 8, 4); - TEST_FIELD(EMRELLIPSE, rclBox, 8, 16, 4); + TEST_TYPE_SIZE (EMRELLIPSE, 24) + TEST_TYPE_ALIGN (EMRELLIPSE, 4) + TEST_FIELD_SIZE (EMRELLIPSE, emr, 8) + TEST_FIELD_ALIGN (EMRELLIPSE, emr, 4) + TEST_FIELD_OFFSET(EMRELLIPSE, emr, 0) + TEST_FIELD_SIZE (EMRELLIPSE, rclBox, 16) + TEST_FIELD_ALIGN (EMRELLIPSE, rclBox, 4) + TEST_FIELD_OFFSET(EMRELLIPSE, rclBox, 8) } static void test_pack_EMRENDPATH(void) { /* EMRENDPATH (pack 4) */ - TEST_TYPE(EMRENDPATH, 8, 4); - TEST_FIELD(EMRENDPATH, emr, 0, 8, 4); + TEST_TYPE_SIZE (EMRENDPATH, 8) + TEST_TYPE_ALIGN (EMRENDPATH, 4) + TEST_FIELD_SIZE (EMRENDPATH, emr, 8) + TEST_FIELD_ALIGN (EMRENDPATH, emr, 4) + TEST_FIELD_OFFSET(EMRENDPATH, emr, 0) } static void test_pack_EMREOF(void) { /* EMREOF (pack 4) */ - TEST_TYPE(EMREOF, 20, 4); - TEST_FIELD(EMREOF, emr, 0, 8, 4); - TEST_FIELD(EMREOF, nPalEntries, 8, 4, 4); - TEST_FIELD(EMREOF, offPalEntries, 12, 4, 4); - TEST_FIELD(EMREOF, nSizeLast, 16, 4, 4); + TEST_TYPE_SIZE (EMREOF, 20) + TEST_TYPE_ALIGN (EMREOF, 4) + TEST_FIELD_SIZE (EMREOF, emr, 8) + TEST_FIELD_ALIGN (EMREOF, emr, 4) + TEST_FIELD_OFFSET(EMREOF, emr, 0) + TEST_FIELD_SIZE (EMREOF, nPalEntries, 4) + TEST_FIELD_ALIGN (EMREOF, nPalEntries, 4) + TEST_FIELD_OFFSET(EMREOF, nPalEntries, 8) + TEST_FIELD_SIZE (EMREOF, offPalEntries, 4) + TEST_FIELD_ALIGN (EMREOF, offPalEntries, 4) + TEST_FIELD_OFFSET(EMREOF, offPalEntries, 12) + TEST_FIELD_SIZE (EMREOF, nSizeLast, 4) + TEST_FIELD_ALIGN (EMREOF, nSizeLast, 4) + TEST_FIELD_OFFSET(EMREOF, nSizeLast, 16) } static void test_pack_EMREXCLUDECLIPRECT(void) { /* EMREXCLUDECLIPRECT (pack 4) */ - TEST_TYPE(EMREXCLUDECLIPRECT, 24, 4); - TEST_FIELD(EMREXCLUDECLIPRECT, emr, 0, 8, 4); - TEST_FIELD(EMREXCLUDECLIPRECT, rclClip, 8, 16, 4); + TEST_TYPE_SIZE (EMREXCLUDECLIPRECT, 24) + TEST_TYPE_ALIGN (EMREXCLUDECLIPRECT, 4) + TEST_FIELD_SIZE (EMREXCLUDECLIPRECT, emr, 8) + TEST_FIELD_ALIGN (EMREXCLUDECLIPRECT, emr, 4) + TEST_FIELD_OFFSET(EMREXCLUDECLIPRECT, emr, 0) + TEST_FIELD_SIZE (EMREXCLUDECLIPRECT, rclClip, 16) + TEST_FIELD_ALIGN (EMREXCLUDECLIPRECT, rclClip, 4) + TEST_FIELD_OFFSET(EMREXCLUDECLIPRECT, rclClip, 8) } static void test_pack_EMREXTCREATEFONTINDIRECTW(void) { /* EMREXTCREATEFONTINDIRECTW (pack 4) */ - TEST_TYPE(EMREXTCREATEFONTINDIRECTW, 332, 4); - TEST_FIELD(EMREXTCREATEFONTINDIRECTW, emr, 0, 8, 4); - TEST_FIELD(EMREXTCREATEFONTINDIRECTW, ihFont, 8, 4, 4); - TEST_FIELD(EMREXTCREATEFONTINDIRECTW, elfw, 12, 320, 4); + TEST_TYPE_SIZE (EMREXTCREATEFONTINDIRECTW, 332) + TEST_TYPE_ALIGN (EMREXTCREATEFONTINDIRECTW, 4) + TEST_FIELD_SIZE (EMREXTCREATEFONTINDIRECTW, emr, 8) + TEST_FIELD_ALIGN (EMREXTCREATEFONTINDIRECTW, emr, 4) + TEST_FIELD_OFFSET(EMREXTCREATEFONTINDIRECTW, emr, 0) + TEST_FIELD_SIZE (EMREXTCREATEFONTINDIRECTW, ihFont, 4) + TEST_FIELD_ALIGN (EMREXTCREATEFONTINDIRECTW, ihFont, 4) + TEST_FIELD_OFFSET(EMREXTCREATEFONTINDIRECTW, ihFont, 8) + TEST_FIELD_SIZE (EMREXTCREATEFONTINDIRECTW, elfw, 320) + TEST_FIELD_ALIGN (EMREXTCREATEFONTINDIRECTW, elfw, 4) + TEST_FIELD_OFFSET(EMREXTCREATEFONTINDIRECTW, elfw, 12) } static void test_pack_EMREXTCREATEPEN(void) { /* EMREXTCREATEPEN (pack 4) */ - TEST_TYPE(EMREXTCREATEPEN, 56, 4); - TEST_FIELD(EMREXTCREATEPEN, emr, 0, 8, 4); - TEST_FIELD(EMREXTCREATEPEN, ihPen, 8, 4, 4); - TEST_FIELD(EMREXTCREATEPEN, offBmi, 12, 4, 4); - TEST_FIELD(EMREXTCREATEPEN, cbBmi, 16, 4, 4); - TEST_FIELD(EMREXTCREATEPEN, offBits, 20, 4, 4); - TEST_FIELD(EMREXTCREATEPEN, cbBits, 24, 4, 4); - TEST_FIELD(EMREXTCREATEPEN, elp, 28, 28, 4); + TEST_TYPE_SIZE (EMREXTCREATEPEN, 56) + TEST_TYPE_ALIGN (EMREXTCREATEPEN, 4) + TEST_FIELD_SIZE (EMREXTCREATEPEN, emr, 8) + TEST_FIELD_ALIGN (EMREXTCREATEPEN, emr, 4) + TEST_FIELD_OFFSET(EMREXTCREATEPEN, emr, 0) + TEST_FIELD_SIZE (EMREXTCREATEPEN, ihPen, 4) + TEST_FIELD_ALIGN (EMREXTCREATEPEN, ihPen, 4) + TEST_FIELD_OFFSET(EMREXTCREATEPEN, ihPen, 8) + TEST_FIELD_SIZE (EMREXTCREATEPEN, offBmi, 4) + TEST_FIELD_ALIGN (EMREXTCREATEPEN, offBmi, 4) + TEST_FIELD_OFFSET(EMREXTCREATEPEN, offBmi, 12) + TEST_FIELD_SIZE (EMREXTCREATEPEN, cbBmi, 4) + TEST_FIELD_ALIGN (EMREXTCREATEPEN, cbBmi, 4) + TEST_FIELD_OFFSET(EMREXTCREATEPEN, cbBmi, 16) + TEST_FIELD_SIZE (EMREXTCREATEPEN, offBits, 4) + TEST_FIELD_ALIGN (EMREXTCREATEPEN, offBits, 4) + TEST_FIELD_OFFSET(EMREXTCREATEPEN, offBits, 20) + TEST_FIELD_SIZE (EMREXTCREATEPEN, cbBits, 4) + TEST_FIELD_ALIGN (EMREXTCREATEPEN, cbBits, 4) + TEST_FIELD_OFFSET(EMREXTCREATEPEN, cbBits, 24) + TEST_FIELD_SIZE (EMREXTCREATEPEN, elp, 28) + TEST_FIELD_ALIGN (EMREXTCREATEPEN, elp, 4) + TEST_FIELD_OFFSET(EMREXTCREATEPEN, elp, 28) } static void test_pack_EMREXTFLOODFILL(void) { /* EMREXTFLOODFILL (pack 4) */ - TEST_TYPE(EMREXTFLOODFILL, 24, 4); - TEST_FIELD(EMREXTFLOODFILL, emr, 0, 8, 4); - TEST_FIELD(EMREXTFLOODFILL, ptlStart, 8, 8, 4); - TEST_FIELD(EMREXTFLOODFILL, crColor, 16, 4, 4); - TEST_FIELD(EMREXTFLOODFILL, iMode, 20, 4, 4); + TEST_TYPE_SIZE (EMREXTFLOODFILL, 24) + TEST_TYPE_ALIGN (EMREXTFLOODFILL, 4) + TEST_FIELD_SIZE (EMREXTFLOODFILL, emr, 8) + TEST_FIELD_ALIGN (EMREXTFLOODFILL, emr, 4) + TEST_FIELD_OFFSET(EMREXTFLOODFILL, emr, 0) + TEST_FIELD_SIZE (EMREXTFLOODFILL, ptlStart, 8) + TEST_FIELD_ALIGN (EMREXTFLOODFILL, ptlStart, 4) + TEST_FIELD_OFFSET(EMREXTFLOODFILL, ptlStart, 8) + TEST_FIELD_SIZE (EMREXTFLOODFILL, crColor, 4) + TEST_FIELD_ALIGN (EMREXTFLOODFILL, crColor, 4) + TEST_FIELD_OFFSET(EMREXTFLOODFILL, crColor, 16) + TEST_FIELD_SIZE (EMREXTFLOODFILL, iMode, 4) + TEST_FIELD_ALIGN (EMREXTFLOODFILL, iMode, 4) + TEST_FIELD_OFFSET(EMREXTFLOODFILL, iMode, 20) } static void test_pack_EMREXTSELECTCLIPRGN(void) { /* EMREXTSELECTCLIPRGN (pack 4) */ - TEST_TYPE(EMREXTSELECTCLIPRGN, 20, 4); - TEST_FIELD(EMREXTSELECTCLIPRGN, emr, 0, 8, 4); - TEST_FIELD(EMREXTSELECTCLIPRGN, cbRgnData, 8, 4, 4); - TEST_FIELD(EMREXTSELECTCLIPRGN, iMode, 12, 4, 4); - TEST_FIELD(EMREXTSELECTCLIPRGN, RgnData, 16, 1, 1); + TEST_TYPE_SIZE (EMREXTSELECTCLIPRGN, 20) + TEST_TYPE_ALIGN (EMREXTSELECTCLIPRGN, 4) + TEST_FIELD_SIZE (EMREXTSELECTCLIPRGN, emr, 8) + TEST_FIELD_ALIGN (EMREXTSELECTCLIPRGN, emr, 4) + TEST_FIELD_OFFSET(EMREXTSELECTCLIPRGN, emr, 0) + TEST_FIELD_SIZE (EMREXTSELECTCLIPRGN, cbRgnData, 4) + TEST_FIELD_ALIGN (EMREXTSELECTCLIPRGN, cbRgnData, 4) + TEST_FIELD_OFFSET(EMREXTSELECTCLIPRGN, cbRgnData, 8) + TEST_FIELD_SIZE (EMREXTSELECTCLIPRGN, iMode, 4) + TEST_FIELD_ALIGN (EMREXTSELECTCLIPRGN, iMode, 4) + TEST_FIELD_OFFSET(EMREXTSELECTCLIPRGN, iMode, 12) + TEST_FIELD_SIZE (EMREXTSELECTCLIPRGN, RgnData, 1) + TEST_FIELD_ALIGN (EMREXTSELECTCLIPRGN, RgnData, 1) + TEST_FIELD_OFFSET(EMREXTSELECTCLIPRGN, RgnData, 16) } static void test_pack_EMREXTTEXTOUTA(void) { /* EMREXTTEXTOUTA (pack 4) */ - TEST_TYPE(EMREXTTEXTOUTA, 76, 4); - TEST_FIELD(EMREXTTEXTOUTA, emr, 0, 8, 4); - TEST_FIELD(EMREXTTEXTOUTA, rclBounds, 8, 16, 4); - TEST_FIELD(EMREXTTEXTOUTA, iGraphicsMode, 24, 4, 4); - TEST_FIELD(EMREXTTEXTOUTA, exScale, 28, 4, 4); - TEST_FIELD(EMREXTTEXTOUTA, eyScale, 32, 4, 4); - TEST_FIELD(EMREXTTEXTOUTA, emrtext, 36, 40, 4); + TEST_TYPE_SIZE (EMREXTTEXTOUTA, 76) + TEST_TYPE_ALIGN (EMREXTTEXTOUTA, 4) + TEST_FIELD_SIZE (EMREXTTEXTOUTA, emr, 8) + TEST_FIELD_ALIGN (EMREXTTEXTOUTA, emr, 4) + TEST_FIELD_OFFSET(EMREXTTEXTOUTA, emr, 0) + TEST_FIELD_SIZE (EMREXTTEXTOUTA, rclBounds, 16) + TEST_FIELD_ALIGN (EMREXTTEXTOUTA, rclBounds, 4) + TEST_FIELD_OFFSET(EMREXTTEXTOUTA, rclBounds, 8) + TEST_FIELD_SIZE (EMREXTTEXTOUTA, iGraphicsMode, 4) + TEST_FIELD_ALIGN (EMREXTTEXTOUTA, iGraphicsMode, 4) + TEST_FIELD_OFFSET(EMREXTTEXTOUTA, iGraphicsMode, 24) + TEST_FIELD_SIZE (EMREXTTEXTOUTA, exScale, 4) + TEST_FIELD_ALIGN (EMREXTTEXTOUTA, exScale, 4) + TEST_FIELD_OFFSET(EMREXTTEXTOUTA, exScale, 28) + TEST_FIELD_SIZE (EMREXTTEXTOUTA, eyScale, 4) + TEST_FIELD_ALIGN (EMREXTTEXTOUTA, eyScale, 4) + TEST_FIELD_OFFSET(EMREXTTEXTOUTA, eyScale, 32) + TEST_FIELD_SIZE (EMREXTTEXTOUTA, emrtext, 40) + TEST_FIELD_ALIGN (EMREXTTEXTOUTA, emrtext, 4) + TEST_FIELD_OFFSET(EMREXTTEXTOUTA, emrtext, 36) } static void test_pack_EMREXTTEXTOUTW(void) { /* EMREXTTEXTOUTW (pack 4) */ - TEST_TYPE(EMREXTTEXTOUTW, 76, 4); - TEST_FIELD(EMREXTTEXTOUTW, emr, 0, 8, 4); - TEST_FIELD(EMREXTTEXTOUTW, rclBounds, 8, 16, 4); - TEST_FIELD(EMREXTTEXTOUTW, iGraphicsMode, 24, 4, 4); - TEST_FIELD(EMREXTTEXTOUTW, exScale, 28, 4, 4); - TEST_FIELD(EMREXTTEXTOUTW, eyScale, 32, 4, 4); - TEST_FIELD(EMREXTTEXTOUTW, emrtext, 36, 40, 4); + TEST_TYPE_SIZE (EMREXTTEXTOUTW, 76) + TEST_TYPE_ALIGN (EMREXTTEXTOUTW, 4) + TEST_FIELD_SIZE (EMREXTTEXTOUTW, emr, 8) + TEST_FIELD_ALIGN (EMREXTTEXTOUTW, emr, 4) + TEST_FIELD_OFFSET(EMREXTTEXTOUTW, emr, 0) + TEST_FIELD_SIZE (EMREXTTEXTOUTW, rclBounds, 16) + TEST_FIELD_ALIGN (EMREXTTEXTOUTW, rclBounds, 4) + TEST_FIELD_OFFSET(EMREXTTEXTOUTW, rclBounds, 8) + TEST_FIELD_SIZE (EMREXTTEXTOUTW, iGraphicsMode, 4) + TEST_FIELD_ALIGN (EMREXTTEXTOUTW, iGraphicsMode, 4) + TEST_FIELD_OFFSET(EMREXTTEXTOUTW, iGraphicsMode, 24) + TEST_FIELD_SIZE (EMREXTTEXTOUTW, exScale, 4) + TEST_FIELD_ALIGN (EMREXTTEXTOUTW, exScale, 4) + TEST_FIELD_OFFSET(EMREXTTEXTOUTW, exScale, 28) + TEST_FIELD_SIZE (EMREXTTEXTOUTW, eyScale, 4) + TEST_FIELD_ALIGN (EMREXTTEXTOUTW, eyScale, 4) + TEST_FIELD_OFFSET(EMREXTTEXTOUTW, eyScale, 32) + TEST_FIELD_SIZE (EMREXTTEXTOUTW, emrtext, 40) + TEST_FIELD_ALIGN (EMREXTTEXTOUTW, emrtext, 4) + TEST_FIELD_OFFSET(EMREXTTEXTOUTW, emrtext, 36) } static void test_pack_EMRFILLPATH(void) { /* EMRFILLPATH (pack 4) */ - TEST_TYPE(EMRFILLPATH, 24, 4); - TEST_FIELD(EMRFILLPATH, emr, 0, 8, 4); - TEST_FIELD(EMRFILLPATH, rclBounds, 8, 16, 4); + TEST_TYPE_SIZE (EMRFILLPATH, 24) + TEST_TYPE_ALIGN (EMRFILLPATH, 4) + TEST_FIELD_SIZE (EMRFILLPATH, emr, 8) + TEST_FIELD_ALIGN (EMRFILLPATH, emr, 4) + TEST_FIELD_OFFSET(EMRFILLPATH, emr, 0) + TEST_FIELD_SIZE (EMRFILLPATH, rclBounds, 16) + TEST_FIELD_ALIGN (EMRFILLPATH, rclBounds, 4) + TEST_FIELD_OFFSET(EMRFILLPATH, rclBounds, 8) } static void test_pack_EMRFILLRGN(void) { /* EMRFILLRGN (pack 4) */ - TEST_TYPE(EMRFILLRGN, 36, 4); - TEST_FIELD(EMRFILLRGN, emr, 0, 8, 4); - TEST_FIELD(EMRFILLRGN, rclBounds, 8, 16, 4); - TEST_FIELD(EMRFILLRGN, cbRgnData, 24, 4, 4); - TEST_FIELD(EMRFILLRGN, ihBrush, 28, 4, 4); - TEST_FIELD(EMRFILLRGN, RgnData, 32, 1, 1); + TEST_TYPE_SIZE (EMRFILLRGN, 36) + TEST_TYPE_ALIGN (EMRFILLRGN, 4) + TEST_FIELD_SIZE (EMRFILLRGN, emr, 8) + TEST_FIELD_ALIGN (EMRFILLRGN, emr, 4) + TEST_FIELD_OFFSET(EMRFILLRGN, emr, 0) + TEST_FIELD_SIZE (EMRFILLRGN, rclBounds, 16) + TEST_FIELD_ALIGN (EMRFILLRGN, rclBounds, 4) + TEST_FIELD_OFFSET(EMRFILLRGN, rclBounds, 8) + TEST_FIELD_SIZE (EMRFILLRGN, cbRgnData, 4) + TEST_FIELD_ALIGN (EMRFILLRGN, cbRgnData, 4) + TEST_FIELD_OFFSET(EMRFILLRGN, cbRgnData, 24) + TEST_FIELD_SIZE (EMRFILLRGN, ihBrush, 4) + TEST_FIELD_ALIGN (EMRFILLRGN, ihBrush, 4) + TEST_FIELD_OFFSET(EMRFILLRGN, ihBrush, 28) + TEST_FIELD_SIZE (EMRFILLRGN, RgnData, 1) + TEST_FIELD_ALIGN (EMRFILLRGN, RgnData, 1) + TEST_FIELD_OFFSET(EMRFILLRGN, RgnData, 32) } static void test_pack_EMRFLATTENPATH(void) { /* EMRFLATTENPATH (pack 4) */ - TEST_TYPE(EMRFLATTENPATH, 8, 4); - TEST_FIELD(EMRFLATTENPATH, emr, 0, 8, 4); + TEST_TYPE_SIZE (EMRFLATTENPATH, 8) + TEST_TYPE_ALIGN (EMRFLATTENPATH, 4) + TEST_FIELD_SIZE (EMRFLATTENPATH, emr, 8) + TEST_FIELD_ALIGN (EMRFLATTENPATH, emr, 4) + TEST_FIELD_OFFSET(EMRFLATTENPATH, emr, 0) } static void test_pack_EMRFORMAT(void) { /* EMRFORMAT (pack 4) */ - TEST_TYPE(EMRFORMAT, 16, 4); - TEST_FIELD(EMRFORMAT, dSignature, 0, 4, 4); - TEST_FIELD(EMRFORMAT, nVersion, 4, 4, 4); - TEST_FIELD(EMRFORMAT, cbData, 8, 4, 4); - TEST_FIELD(EMRFORMAT, offData, 12, 4, 4); + TEST_TYPE_SIZE (EMRFORMAT, 16) + TEST_TYPE_ALIGN (EMRFORMAT, 4) + TEST_FIELD_SIZE (EMRFORMAT, dSignature, 4) + TEST_FIELD_ALIGN (EMRFORMAT, dSignature, 4) + TEST_FIELD_OFFSET(EMRFORMAT, dSignature, 0) + TEST_FIELD_SIZE (EMRFORMAT, nVersion, 4) + TEST_FIELD_ALIGN (EMRFORMAT, nVersion, 4) + TEST_FIELD_OFFSET(EMRFORMAT, nVersion, 4) + TEST_FIELD_SIZE (EMRFORMAT, cbData, 4) + TEST_FIELD_ALIGN (EMRFORMAT, cbData, 4) + TEST_FIELD_OFFSET(EMRFORMAT, cbData, 8) + TEST_FIELD_SIZE (EMRFORMAT, offData, 4) + TEST_FIELD_ALIGN (EMRFORMAT, offData, 4) + TEST_FIELD_OFFSET(EMRFORMAT, offData, 12) } static void test_pack_EMRFRAMERGN(void) { /* EMRFRAMERGN (pack 4) */ - TEST_TYPE(EMRFRAMERGN, 44, 4); - TEST_FIELD(EMRFRAMERGN, emr, 0, 8, 4); - TEST_FIELD(EMRFRAMERGN, rclBounds, 8, 16, 4); - TEST_FIELD(EMRFRAMERGN, cbRgnData, 24, 4, 4); - TEST_FIELD(EMRFRAMERGN, ihBrush, 28, 4, 4); - TEST_FIELD(EMRFRAMERGN, szlStroke, 32, 8, 4); - TEST_FIELD(EMRFRAMERGN, RgnData, 40, 1, 1); + TEST_TYPE_SIZE (EMRFRAMERGN, 44) + TEST_TYPE_ALIGN (EMRFRAMERGN, 4) + TEST_FIELD_SIZE (EMRFRAMERGN, emr, 8) + TEST_FIELD_ALIGN (EMRFRAMERGN, emr, 4) + TEST_FIELD_OFFSET(EMRFRAMERGN, emr, 0) + TEST_FIELD_SIZE (EMRFRAMERGN, rclBounds, 16) + TEST_FIELD_ALIGN (EMRFRAMERGN, rclBounds, 4) + TEST_FIELD_OFFSET(EMRFRAMERGN, rclBounds, 8) + TEST_FIELD_SIZE (EMRFRAMERGN, cbRgnData, 4) + TEST_FIELD_ALIGN (EMRFRAMERGN, cbRgnData, 4) + TEST_FIELD_OFFSET(EMRFRAMERGN, cbRgnData, 24) + TEST_FIELD_SIZE (EMRFRAMERGN, ihBrush, 4) + TEST_FIELD_ALIGN (EMRFRAMERGN, ihBrush, 4) + TEST_FIELD_OFFSET(EMRFRAMERGN, ihBrush, 28) + TEST_FIELD_SIZE (EMRFRAMERGN, szlStroke, 8) + TEST_FIELD_ALIGN (EMRFRAMERGN, szlStroke, 4) + TEST_FIELD_OFFSET(EMRFRAMERGN, szlStroke, 32) + TEST_FIELD_SIZE (EMRFRAMERGN, RgnData, 1) + TEST_FIELD_ALIGN (EMRFRAMERGN, RgnData, 1) + TEST_FIELD_OFFSET(EMRFRAMERGN, RgnData, 40) } static void test_pack_EMRGDICOMMENT(void) { /* EMRGDICOMMENT (pack 4) */ - TEST_TYPE(EMRGDICOMMENT, 16, 4); - TEST_FIELD(EMRGDICOMMENT, emr, 0, 8, 4); - TEST_FIELD(EMRGDICOMMENT, cbData, 8, 4, 4); - TEST_FIELD(EMRGDICOMMENT, Data, 12, 1, 1); + TEST_TYPE_SIZE (EMRGDICOMMENT, 16) + TEST_TYPE_ALIGN (EMRGDICOMMENT, 4) + TEST_FIELD_SIZE (EMRGDICOMMENT, emr, 8) + TEST_FIELD_ALIGN (EMRGDICOMMENT, emr, 4) + TEST_FIELD_OFFSET(EMRGDICOMMENT, emr, 0) + TEST_FIELD_SIZE (EMRGDICOMMENT, cbData, 4) + TEST_FIELD_ALIGN (EMRGDICOMMENT, cbData, 4) + TEST_FIELD_OFFSET(EMRGDICOMMENT, cbData, 8) + TEST_FIELD_SIZE (EMRGDICOMMENT, Data, 1) + TEST_FIELD_ALIGN (EMRGDICOMMENT, Data, 1) + TEST_FIELD_OFFSET(EMRGDICOMMENT, Data, 12) } static void test_pack_EMRGLSBOUNDEDRECORD(void) { /* EMRGLSBOUNDEDRECORD (pack 4) */ - TEST_TYPE(EMRGLSBOUNDEDRECORD, 32, 4); - TEST_FIELD(EMRGLSBOUNDEDRECORD, emr, 0, 8, 4); - TEST_FIELD(EMRGLSBOUNDEDRECORD, rclBounds, 8, 16, 4); - TEST_FIELD(EMRGLSBOUNDEDRECORD, cbData, 24, 4, 4); - TEST_FIELD(EMRGLSBOUNDEDRECORD, Data, 28, 1, 1); + TEST_TYPE_SIZE (EMRGLSBOUNDEDRECORD, 32) + TEST_TYPE_ALIGN (EMRGLSBOUNDEDRECORD, 4) + TEST_FIELD_SIZE (EMRGLSBOUNDEDRECORD, emr, 8) + TEST_FIELD_ALIGN (EMRGLSBOUNDEDRECORD, emr, 4) + TEST_FIELD_OFFSET(EMRGLSBOUNDEDRECORD, emr, 0) + TEST_FIELD_SIZE (EMRGLSBOUNDEDRECORD, rclBounds, 16) + TEST_FIELD_ALIGN (EMRGLSBOUNDEDRECORD, rclBounds, 4) + TEST_FIELD_OFFSET(EMRGLSBOUNDEDRECORD, rclBounds, 8) + TEST_FIELD_SIZE (EMRGLSBOUNDEDRECORD, cbData, 4) + TEST_FIELD_ALIGN (EMRGLSBOUNDEDRECORD, cbData, 4) + TEST_FIELD_OFFSET(EMRGLSBOUNDEDRECORD, cbData, 24) + TEST_FIELD_SIZE (EMRGLSBOUNDEDRECORD, Data, 1) + TEST_FIELD_ALIGN (EMRGLSBOUNDEDRECORD, Data, 1) + TEST_FIELD_OFFSET(EMRGLSBOUNDEDRECORD, Data, 28) } static void test_pack_EMRGLSRECORD(void) { /* EMRGLSRECORD (pack 4) */ - TEST_TYPE(EMRGLSRECORD, 16, 4); - TEST_FIELD(EMRGLSRECORD, emr, 0, 8, 4); - TEST_FIELD(EMRGLSRECORD, cbData, 8, 4, 4); - TEST_FIELD(EMRGLSRECORD, Data, 12, 1, 1); + TEST_TYPE_SIZE (EMRGLSRECORD, 16) + TEST_TYPE_ALIGN (EMRGLSRECORD, 4) + TEST_FIELD_SIZE (EMRGLSRECORD, emr, 8) + TEST_FIELD_ALIGN (EMRGLSRECORD, emr, 4) + TEST_FIELD_OFFSET(EMRGLSRECORD, emr, 0) + TEST_FIELD_SIZE (EMRGLSRECORD, cbData, 4) + TEST_FIELD_ALIGN (EMRGLSRECORD, cbData, 4) + TEST_FIELD_OFFSET(EMRGLSRECORD, cbData, 8) + TEST_FIELD_SIZE (EMRGLSRECORD, Data, 1) + TEST_FIELD_ALIGN (EMRGLSRECORD, Data, 1) + TEST_FIELD_OFFSET(EMRGLSRECORD, Data, 12) } static void test_pack_EMRINTERSECTCLIPRECT(void) { /* EMRINTERSECTCLIPRECT (pack 4) */ - TEST_TYPE(EMRINTERSECTCLIPRECT, 24, 4); - TEST_FIELD(EMRINTERSECTCLIPRECT, emr, 0, 8, 4); - TEST_FIELD(EMRINTERSECTCLIPRECT, rclClip, 8, 16, 4); + TEST_TYPE_SIZE (EMRINTERSECTCLIPRECT, 24) + TEST_TYPE_ALIGN (EMRINTERSECTCLIPRECT, 4) + TEST_FIELD_SIZE (EMRINTERSECTCLIPRECT, emr, 8) + TEST_FIELD_ALIGN (EMRINTERSECTCLIPRECT, emr, 4) + TEST_FIELD_OFFSET(EMRINTERSECTCLIPRECT, emr, 0) + TEST_FIELD_SIZE (EMRINTERSECTCLIPRECT, rclClip, 16) + TEST_FIELD_ALIGN (EMRINTERSECTCLIPRECT, rclClip, 4) + TEST_FIELD_OFFSET(EMRINTERSECTCLIPRECT, rclClip, 8) } static void test_pack_EMRINVERTRGN(void) { /* EMRINVERTRGN (pack 4) */ - TEST_TYPE(EMRINVERTRGN, 32, 4); - TEST_FIELD(EMRINVERTRGN, emr, 0, 8, 4); - TEST_FIELD(EMRINVERTRGN, rclBounds, 8, 16, 4); - TEST_FIELD(EMRINVERTRGN, cbRgnData, 24, 4, 4); - TEST_FIELD(EMRINVERTRGN, RgnData, 28, 1, 1); + TEST_TYPE_SIZE (EMRINVERTRGN, 32) + TEST_TYPE_ALIGN (EMRINVERTRGN, 4) + TEST_FIELD_SIZE (EMRINVERTRGN, emr, 8) + TEST_FIELD_ALIGN (EMRINVERTRGN, emr, 4) + TEST_FIELD_OFFSET(EMRINVERTRGN, emr, 0) + TEST_FIELD_SIZE (EMRINVERTRGN, rclBounds, 16) + TEST_FIELD_ALIGN (EMRINVERTRGN, rclBounds, 4) + TEST_FIELD_OFFSET(EMRINVERTRGN, rclBounds, 8) + TEST_FIELD_SIZE (EMRINVERTRGN, cbRgnData, 4) + TEST_FIELD_ALIGN (EMRINVERTRGN, cbRgnData, 4) + TEST_FIELD_OFFSET(EMRINVERTRGN, cbRgnData, 24) + TEST_FIELD_SIZE (EMRINVERTRGN, RgnData, 1) + TEST_FIELD_ALIGN (EMRINVERTRGN, RgnData, 1) + TEST_FIELD_OFFSET(EMRINVERTRGN, RgnData, 28) } static void test_pack_EMRLINETO(void) { /* EMRLINETO (pack 4) */ - TEST_TYPE(EMRLINETO, 16, 4); - TEST_FIELD(EMRLINETO, emr, 0, 8, 4); - TEST_FIELD(EMRLINETO, ptl, 8, 8, 4); + TEST_TYPE_SIZE (EMRLINETO, 16) + TEST_TYPE_ALIGN (EMRLINETO, 4) + TEST_FIELD_SIZE (EMRLINETO, emr, 8) + TEST_FIELD_ALIGN (EMRLINETO, emr, 4) + TEST_FIELD_OFFSET(EMRLINETO, emr, 0) + TEST_FIELD_SIZE (EMRLINETO, ptl, 8) + TEST_FIELD_ALIGN (EMRLINETO, ptl, 4) + TEST_FIELD_OFFSET(EMRLINETO, ptl, 8) } static void test_pack_EMRMASKBLT(void) { /* EMRMASKBLT (pack 4) */ - TEST_TYPE(EMRMASKBLT, 128, 4); - TEST_FIELD(EMRMASKBLT, emr, 0, 8, 4); - TEST_FIELD(EMRMASKBLT, rclBounds, 8, 16, 4); - TEST_FIELD(EMRMASKBLT, xDest, 24, 4, 4); - TEST_FIELD(EMRMASKBLT, yDest, 28, 4, 4); - TEST_FIELD(EMRMASKBLT, cxDest, 32, 4, 4); - TEST_FIELD(EMRMASKBLT, cyDest, 36, 4, 4); - TEST_FIELD(EMRMASKBLT, dwRop, 40, 4, 4); - TEST_FIELD(EMRMASKBLT, xSrc, 44, 4, 4); - TEST_FIELD(EMRMASKBLT, ySrc, 48, 4, 4); - TEST_FIELD(EMRMASKBLT, xformSrc, 52, 24, 4); - TEST_FIELD(EMRMASKBLT, crBkColorSrc, 76, 4, 4); - TEST_FIELD(EMRMASKBLT, iUsageSrc, 80, 4, 4); - TEST_FIELD(EMRMASKBLT, offBmiSrc, 84, 4, 4); - TEST_FIELD(EMRMASKBLT, cbBmiSrc, 88, 4, 4); - TEST_FIELD(EMRMASKBLT, offBitsSrc, 92, 4, 4); - TEST_FIELD(EMRMASKBLT, cbBitsSrc, 96, 4, 4); - TEST_FIELD(EMRMASKBLT, xMask, 100, 4, 4); - TEST_FIELD(EMRMASKBLT, yMask, 104, 4, 4); - TEST_FIELD(EMRMASKBLT, iUsageMask, 108, 4, 4); - TEST_FIELD(EMRMASKBLT, offBmiMask, 112, 4, 4); - TEST_FIELD(EMRMASKBLT, cbBmiMask, 116, 4, 4); - TEST_FIELD(EMRMASKBLT, offBitsMask, 120, 4, 4); - TEST_FIELD(EMRMASKBLT, cbBitsMask, 124, 4, 4); + TEST_TYPE_SIZE (EMRMASKBLT, 128) + TEST_TYPE_ALIGN (EMRMASKBLT, 4) + TEST_FIELD_SIZE (EMRMASKBLT, emr, 8) + TEST_FIELD_ALIGN (EMRMASKBLT, emr, 4) + TEST_FIELD_OFFSET(EMRMASKBLT, emr, 0) + TEST_FIELD_SIZE (EMRMASKBLT, rclBounds, 16) + TEST_FIELD_ALIGN (EMRMASKBLT, rclBounds, 4) + TEST_FIELD_OFFSET(EMRMASKBLT, rclBounds, 8) + TEST_FIELD_SIZE (EMRMASKBLT, xDest, 4) + TEST_FIELD_ALIGN (EMRMASKBLT, xDest, 4) + TEST_FIELD_OFFSET(EMRMASKBLT, xDest, 24) + TEST_FIELD_SIZE (EMRMASKBLT, yDest, 4) + TEST_FIELD_ALIGN (EMRMASKBLT, yDest, 4) + TEST_FIELD_OFFSET(EMRMASKBLT, yDest, 28) + TEST_FIELD_SIZE (EMRMASKBLT, cxDest, 4) + TEST_FIELD_ALIGN (EMRMASKBLT, cxDest, 4) + TEST_FIELD_OFFSET(EMRMASKBLT, cxDest, 32) + TEST_FIELD_SIZE (EMRMASKBLT, cyDest, 4) + TEST_FIELD_ALIGN (EMRMASKBLT, cyDest, 4) + TEST_FIELD_OFFSET(EMRMASKBLT, cyDest, 36) + TEST_FIELD_SIZE (EMRMASKBLT, dwRop, 4) + TEST_FIELD_ALIGN (EMRMASKBLT, dwRop, 4) + TEST_FIELD_OFFSET(EMRMASKBLT, dwRop, 40) + TEST_FIELD_SIZE (EMRMASKBLT, xSrc, 4) + TEST_FIELD_ALIGN (EMRMASKBLT, xSrc, 4) + TEST_FIELD_OFFSET(EMRMASKBLT, xSrc, 44) + TEST_FIELD_SIZE (EMRMASKBLT, ySrc, 4) + TEST_FIELD_ALIGN (EMRMASKBLT, ySrc, 4) + TEST_FIELD_OFFSET(EMRMASKBLT, ySrc, 48) + TEST_FIELD_SIZE (EMRMASKBLT, xformSrc, 24) + TEST_FIELD_ALIGN (EMRMASKBLT, xformSrc, 4) + TEST_FIELD_OFFSET(EMRMASKBLT, xformSrc, 52) + TEST_FIELD_SIZE (EMRMASKBLT, crBkColorSrc, 4) + TEST_FIELD_ALIGN (EMRMASKBLT, crBkColorSrc, 4) + TEST_FIELD_OFFSET(EMRMASKBLT, crBkColorSrc, 76) + TEST_FIELD_SIZE (EMRMASKBLT, iUsageSrc, 4) + TEST_FIELD_ALIGN (EMRMASKBLT, iUsageSrc, 4) + TEST_FIELD_OFFSET(EMRMASKBLT, iUsageSrc, 80) + TEST_FIELD_SIZE (EMRMASKBLT, offBmiSrc, 4) + TEST_FIELD_ALIGN (EMRMASKBLT, offBmiSrc, 4) + TEST_FIELD_OFFSET(EMRMASKBLT, offBmiSrc, 84) + TEST_FIELD_SIZE (EMRMASKBLT, cbBmiSrc, 4) + TEST_FIELD_ALIGN (EMRMASKBLT, cbBmiSrc, 4) + TEST_FIELD_OFFSET(EMRMASKBLT, cbBmiSrc, 88) + TEST_FIELD_SIZE (EMRMASKBLT, offBitsSrc, 4) + TEST_FIELD_ALIGN (EMRMASKBLT, offBitsSrc, 4) + TEST_FIELD_OFFSET(EMRMASKBLT, offBitsSrc, 92) + TEST_FIELD_SIZE (EMRMASKBLT, cbBitsSrc, 4) + TEST_FIELD_ALIGN (EMRMASKBLT, cbBitsSrc, 4) + TEST_FIELD_OFFSET(EMRMASKBLT, cbBitsSrc, 96) + TEST_FIELD_SIZE (EMRMASKBLT, xMask, 4) + TEST_FIELD_ALIGN (EMRMASKBLT, xMask, 4) + TEST_FIELD_OFFSET(EMRMASKBLT, xMask, 100) + TEST_FIELD_SIZE (EMRMASKBLT, yMask, 4) + TEST_FIELD_ALIGN (EMRMASKBLT, yMask, 4) + TEST_FIELD_OFFSET(EMRMASKBLT, yMask, 104) + TEST_FIELD_SIZE (EMRMASKBLT, iUsageMask, 4) + TEST_FIELD_ALIGN (EMRMASKBLT, iUsageMask, 4) + TEST_FIELD_OFFSET(EMRMASKBLT, iUsageMask, 108) + TEST_FIELD_SIZE (EMRMASKBLT, offBmiMask, 4) + TEST_FIELD_ALIGN (EMRMASKBLT, offBmiMask, 4) + TEST_FIELD_OFFSET(EMRMASKBLT, offBmiMask, 112) + TEST_FIELD_SIZE (EMRMASKBLT, cbBmiMask, 4) + TEST_FIELD_ALIGN (EMRMASKBLT, cbBmiMask, 4) + TEST_FIELD_OFFSET(EMRMASKBLT, cbBmiMask, 116) + TEST_FIELD_SIZE (EMRMASKBLT, offBitsMask, 4) + TEST_FIELD_ALIGN (EMRMASKBLT, offBitsMask, 4) + TEST_FIELD_OFFSET(EMRMASKBLT, offBitsMask, 120) + TEST_FIELD_SIZE (EMRMASKBLT, cbBitsMask, 4) + TEST_FIELD_ALIGN (EMRMASKBLT, cbBitsMask, 4) + TEST_FIELD_OFFSET(EMRMASKBLT, cbBitsMask, 124) } static void test_pack_EMRMODIFYWORLDTRANSFORM(void) { /* EMRMODIFYWORLDTRANSFORM (pack 4) */ - TEST_TYPE(EMRMODIFYWORLDTRANSFORM, 36, 4); - TEST_FIELD(EMRMODIFYWORLDTRANSFORM, emr, 0, 8, 4); - TEST_FIELD(EMRMODIFYWORLDTRANSFORM, xform, 8, 24, 4); - TEST_FIELD(EMRMODIFYWORLDTRANSFORM, iMode, 32, 4, 4); + TEST_TYPE_SIZE (EMRMODIFYWORLDTRANSFORM, 36) + TEST_TYPE_ALIGN (EMRMODIFYWORLDTRANSFORM, 4) + TEST_FIELD_SIZE (EMRMODIFYWORLDTRANSFORM, emr, 8) + TEST_FIELD_ALIGN (EMRMODIFYWORLDTRANSFORM, emr, 4) + TEST_FIELD_OFFSET(EMRMODIFYWORLDTRANSFORM, emr, 0) + TEST_FIELD_SIZE (EMRMODIFYWORLDTRANSFORM, xform, 24) + TEST_FIELD_ALIGN (EMRMODIFYWORLDTRANSFORM, xform, 4) + TEST_FIELD_OFFSET(EMRMODIFYWORLDTRANSFORM, xform, 8) + TEST_FIELD_SIZE (EMRMODIFYWORLDTRANSFORM, iMode, 4) + TEST_FIELD_ALIGN (EMRMODIFYWORLDTRANSFORM, iMode, 4) + TEST_FIELD_OFFSET(EMRMODIFYWORLDTRANSFORM, iMode, 32) } static void test_pack_EMRMOVETOEX(void) { /* EMRMOVETOEX (pack 4) */ - TEST_TYPE(EMRMOVETOEX, 16, 4); - TEST_FIELD(EMRMOVETOEX, emr, 0, 8, 4); - TEST_FIELD(EMRMOVETOEX, ptl, 8, 8, 4); + TEST_TYPE_SIZE (EMRMOVETOEX, 16) + TEST_TYPE_ALIGN (EMRMOVETOEX, 4) + TEST_FIELD_SIZE (EMRMOVETOEX, emr, 8) + TEST_FIELD_ALIGN (EMRMOVETOEX, emr, 4) + TEST_FIELD_OFFSET(EMRMOVETOEX, emr, 0) + TEST_FIELD_SIZE (EMRMOVETOEX, ptl, 8) + TEST_FIELD_ALIGN (EMRMOVETOEX, ptl, 4) + TEST_FIELD_OFFSET(EMRMOVETOEX, ptl, 8) } static void test_pack_EMROFFSETCLIPRGN(void) { /* EMROFFSETCLIPRGN (pack 4) */ - TEST_TYPE(EMROFFSETCLIPRGN, 16, 4); - TEST_FIELD(EMROFFSETCLIPRGN, emr, 0, 8, 4); - TEST_FIELD(EMROFFSETCLIPRGN, ptlOffset, 8, 8, 4); + TEST_TYPE_SIZE (EMROFFSETCLIPRGN, 16) + TEST_TYPE_ALIGN (EMROFFSETCLIPRGN, 4) + TEST_FIELD_SIZE (EMROFFSETCLIPRGN, emr, 8) + TEST_FIELD_ALIGN (EMROFFSETCLIPRGN, emr, 4) + TEST_FIELD_OFFSET(EMROFFSETCLIPRGN, emr, 0) + TEST_FIELD_SIZE (EMROFFSETCLIPRGN, ptlOffset, 8) + TEST_FIELD_ALIGN (EMROFFSETCLIPRGN, ptlOffset, 4) + TEST_FIELD_OFFSET(EMROFFSETCLIPRGN, ptlOffset, 8) } static void test_pack_EMRPAINTRGN(void) { /* EMRPAINTRGN (pack 4) */ - TEST_TYPE(EMRPAINTRGN, 32, 4); - TEST_FIELD(EMRPAINTRGN, emr, 0, 8, 4); - TEST_FIELD(EMRPAINTRGN, rclBounds, 8, 16, 4); - TEST_FIELD(EMRPAINTRGN, cbRgnData, 24, 4, 4); - TEST_FIELD(EMRPAINTRGN, RgnData, 28, 1, 1); + TEST_TYPE_SIZE (EMRPAINTRGN, 32) + TEST_TYPE_ALIGN (EMRPAINTRGN, 4) + TEST_FIELD_SIZE (EMRPAINTRGN, emr, 8) + TEST_FIELD_ALIGN (EMRPAINTRGN, emr, 4) + TEST_FIELD_OFFSET(EMRPAINTRGN, emr, 0) + TEST_FIELD_SIZE (EMRPAINTRGN, rclBounds, 16) + TEST_FIELD_ALIGN (EMRPAINTRGN, rclBounds, 4) + TEST_FIELD_OFFSET(EMRPAINTRGN, rclBounds, 8) + TEST_FIELD_SIZE (EMRPAINTRGN, cbRgnData, 4) + TEST_FIELD_ALIGN (EMRPAINTRGN, cbRgnData, 4) + TEST_FIELD_OFFSET(EMRPAINTRGN, cbRgnData, 24) + TEST_FIELD_SIZE (EMRPAINTRGN, RgnData, 1) + TEST_FIELD_ALIGN (EMRPAINTRGN, RgnData, 1) + TEST_FIELD_OFFSET(EMRPAINTRGN, RgnData, 28) } static void test_pack_EMRPIE(void) { /* EMRPIE (pack 4) */ - TEST_TYPE(EMRPIE, 40, 4); - TEST_FIELD(EMRPIE, emr, 0, 8, 4); - TEST_FIELD(EMRPIE, rclBox, 8, 16, 4); - TEST_FIELD(EMRPIE, ptlStart, 24, 8, 4); - TEST_FIELD(EMRPIE, ptlEnd, 32, 8, 4); + TEST_TYPE_SIZE (EMRPIE, 40) + TEST_TYPE_ALIGN (EMRPIE, 4) + TEST_FIELD_SIZE (EMRPIE, emr, 8) + TEST_FIELD_ALIGN (EMRPIE, emr, 4) + TEST_FIELD_OFFSET(EMRPIE, emr, 0) + TEST_FIELD_SIZE (EMRPIE, rclBox, 16) + TEST_FIELD_ALIGN (EMRPIE, rclBox, 4) + TEST_FIELD_OFFSET(EMRPIE, rclBox, 8) + TEST_FIELD_SIZE (EMRPIE, ptlStart, 8) + TEST_FIELD_ALIGN (EMRPIE, ptlStart, 4) + TEST_FIELD_OFFSET(EMRPIE, ptlStart, 24) + TEST_FIELD_SIZE (EMRPIE, ptlEnd, 8) + TEST_FIELD_ALIGN (EMRPIE, ptlEnd, 4) + TEST_FIELD_OFFSET(EMRPIE, ptlEnd, 32) } static void test_pack_EMRPIXELFORMAT(void) { /* EMRPIXELFORMAT (pack 4) */ - TEST_TYPE(EMRPIXELFORMAT, 48, 4); - TEST_FIELD(EMRPIXELFORMAT, emr, 0, 8, 4); - TEST_FIELD(EMRPIXELFORMAT, pfd, 8, 40, 4); + TEST_TYPE_SIZE (EMRPIXELFORMAT, 48) + TEST_TYPE_ALIGN (EMRPIXELFORMAT, 4) + TEST_FIELD_SIZE (EMRPIXELFORMAT, emr, 8) + TEST_FIELD_ALIGN (EMRPIXELFORMAT, emr, 4) + TEST_FIELD_OFFSET(EMRPIXELFORMAT, emr, 0) + TEST_FIELD_SIZE (EMRPIXELFORMAT, pfd, 40) + TEST_FIELD_ALIGN (EMRPIXELFORMAT, pfd, 4) + TEST_FIELD_OFFSET(EMRPIXELFORMAT, pfd, 8) } static void test_pack_EMRPLGBLT(void) { /* EMRPLGBLT (pack 4) */ - TEST_TYPE(EMRPLGBLT, 140, 4); - TEST_FIELD(EMRPLGBLT, emr, 0, 8, 4); - TEST_FIELD(EMRPLGBLT, rclBounds, 8, 16, 4); - TEST_FIELD(EMRPLGBLT, aptlDest, 24, 24, 4); - TEST_FIELD(EMRPLGBLT, xSrc, 48, 4, 4); - TEST_FIELD(EMRPLGBLT, ySrc, 52, 4, 4); - TEST_FIELD(EMRPLGBLT, cxSrc, 56, 4, 4); - TEST_FIELD(EMRPLGBLT, cySrc, 60, 4, 4); - TEST_FIELD(EMRPLGBLT, xformSrc, 64, 24, 4); - TEST_FIELD(EMRPLGBLT, crBkColorSrc, 88, 4, 4); - TEST_FIELD(EMRPLGBLT, iUsageSrc, 92, 4, 4); - TEST_FIELD(EMRPLGBLT, offBmiSrc, 96, 4, 4); - TEST_FIELD(EMRPLGBLT, cbBmiSrc, 100, 4, 4); - TEST_FIELD(EMRPLGBLT, offBitsSrc, 104, 4, 4); - TEST_FIELD(EMRPLGBLT, cbBitsSrc, 108, 4, 4); - TEST_FIELD(EMRPLGBLT, xMask, 112, 4, 4); - TEST_FIELD(EMRPLGBLT, yMask, 116, 4, 4); - TEST_FIELD(EMRPLGBLT, iUsageMask, 120, 4, 4); - TEST_FIELD(EMRPLGBLT, offBmiMask, 124, 4, 4); - TEST_FIELD(EMRPLGBLT, cbBmiMask, 128, 4, 4); - TEST_FIELD(EMRPLGBLT, offBitsMask, 132, 4, 4); - TEST_FIELD(EMRPLGBLT, cbBitsMask, 136, 4, 4); + TEST_TYPE_SIZE (EMRPLGBLT, 140) + TEST_TYPE_ALIGN (EMRPLGBLT, 4) + TEST_FIELD_SIZE (EMRPLGBLT, emr, 8) + TEST_FIELD_ALIGN (EMRPLGBLT, emr, 4) + TEST_FIELD_OFFSET(EMRPLGBLT, emr, 0) + TEST_FIELD_SIZE (EMRPLGBLT, rclBounds, 16) + TEST_FIELD_ALIGN (EMRPLGBLT, rclBounds, 4) + TEST_FIELD_OFFSET(EMRPLGBLT, rclBounds, 8) + TEST_FIELD_SIZE (EMRPLGBLT, aptlDest, 24) + TEST_FIELD_ALIGN (EMRPLGBLT, aptlDest, 4) + TEST_FIELD_OFFSET(EMRPLGBLT, aptlDest, 24) + TEST_FIELD_SIZE (EMRPLGBLT, xSrc, 4) + TEST_FIELD_ALIGN (EMRPLGBLT, xSrc, 4) + TEST_FIELD_OFFSET(EMRPLGBLT, xSrc, 48) + TEST_FIELD_SIZE (EMRPLGBLT, ySrc, 4) + TEST_FIELD_ALIGN (EMRPLGBLT, ySrc, 4) + TEST_FIELD_OFFSET(EMRPLGBLT, ySrc, 52) + TEST_FIELD_SIZE (EMRPLGBLT, cxSrc, 4) + TEST_FIELD_ALIGN (EMRPLGBLT, cxSrc, 4) + TEST_FIELD_OFFSET(EMRPLGBLT, cxSrc, 56) + TEST_FIELD_SIZE (EMRPLGBLT, cySrc, 4) + TEST_FIELD_ALIGN (EMRPLGBLT, cySrc, 4) + TEST_FIELD_OFFSET(EMRPLGBLT, cySrc, 60) + TEST_FIELD_SIZE (EMRPLGBLT, xformSrc, 24) + TEST_FIELD_ALIGN (EMRPLGBLT, xformSrc, 4) + TEST_FIELD_OFFSET(EMRPLGBLT, xformSrc, 64) + TEST_FIELD_SIZE (EMRPLGBLT, crBkColorSrc, 4) + TEST_FIELD_ALIGN (EMRPLGBLT, crBkColorSrc, 4) + TEST_FIELD_OFFSET(EMRPLGBLT, crBkColorSrc, 88) + TEST_FIELD_SIZE (EMRPLGBLT, iUsageSrc, 4) + TEST_FIELD_ALIGN (EMRPLGBLT, iUsageSrc, 4) + TEST_FIELD_OFFSET(EMRPLGBLT, iUsageSrc, 92) + TEST_FIELD_SIZE (EMRPLGBLT, offBmiSrc, 4) + TEST_FIELD_ALIGN (EMRPLGBLT, offBmiSrc, 4) + TEST_FIELD_OFFSET(EMRPLGBLT, offBmiSrc, 96) + TEST_FIELD_SIZE (EMRPLGBLT, cbBmiSrc, 4) + TEST_FIELD_ALIGN (EMRPLGBLT, cbBmiSrc, 4) + TEST_FIELD_OFFSET(EMRPLGBLT, cbBmiSrc, 100) + TEST_FIELD_SIZE (EMRPLGBLT, offBitsSrc, 4) + TEST_FIELD_ALIGN (EMRPLGBLT, offBitsSrc, 4) + TEST_FIELD_OFFSET(EMRPLGBLT, offBitsSrc, 104) + TEST_FIELD_SIZE (EMRPLGBLT, cbBitsSrc, 4) + TEST_FIELD_ALIGN (EMRPLGBLT, cbBitsSrc, 4) + TEST_FIELD_OFFSET(EMRPLGBLT, cbBitsSrc, 108) + TEST_FIELD_SIZE (EMRPLGBLT, xMask, 4) + TEST_FIELD_ALIGN (EMRPLGBLT, xMask, 4) + TEST_FIELD_OFFSET(EMRPLGBLT, xMask, 112) + TEST_FIELD_SIZE (EMRPLGBLT, yMask, 4) + TEST_FIELD_ALIGN (EMRPLGBLT, yMask, 4) + TEST_FIELD_OFFSET(EMRPLGBLT, yMask, 116) + TEST_FIELD_SIZE (EMRPLGBLT, iUsageMask, 4) + TEST_FIELD_ALIGN (EMRPLGBLT, iUsageMask, 4) + TEST_FIELD_OFFSET(EMRPLGBLT, iUsageMask, 120) + TEST_FIELD_SIZE (EMRPLGBLT, offBmiMask, 4) + TEST_FIELD_ALIGN (EMRPLGBLT, offBmiMask, 4) + TEST_FIELD_OFFSET(EMRPLGBLT, offBmiMask, 124) + TEST_FIELD_SIZE (EMRPLGBLT, cbBmiMask, 4) + TEST_FIELD_ALIGN (EMRPLGBLT, cbBmiMask, 4) + TEST_FIELD_OFFSET(EMRPLGBLT, cbBmiMask, 128) + TEST_FIELD_SIZE (EMRPLGBLT, offBitsMask, 4) + TEST_FIELD_ALIGN (EMRPLGBLT, offBitsMask, 4) + TEST_FIELD_OFFSET(EMRPLGBLT, offBitsMask, 132) + TEST_FIELD_SIZE (EMRPLGBLT, cbBitsMask, 4) + TEST_FIELD_ALIGN (EMRPLGBLT, cbBitsMask, 4) + TEST_FIELD_OFFSET(EMRPLGBLT, cbBitsMask, 136) } static void test_pack_EMRPOLYBEZIER(void) { /* EMRPOLYBEZIER (pack 4) */ - TEST_TYPE(EMRPOLYBEZIER, 36, 4); - TEST_FIELD(EMRPOLYBEZIER, emr, 0, 8, 4); - TEST_FIELD(EMRPOLYBEZIER, rclBounds, 8, 16, 4); - TEST_FIELD(EMRPOLYBEZIER, cptl, 24, 4, 4); - TEST_FIELD(EMRPOLYBEZIER, aptl, 28, 8, 4); + TEST_TYPE_SIZE (EMRPOLYBEZIER, 36) + TEST_TYPE_ALIGN (EMRPOLYBEZIER, 4) + TEST_FIELD_SIZE (EMRPOLYBEZIER, emr, 8) + TEST_FIELD_ALIGN (EMRPOLYBEZIER, emr, 4) + TEST_FIELD_OFFSET(EMRPOLYBEZIER, emr, 0) + TEST_FIELD_SIZE (EMRPOLYBEZIER, rclBounds, 16) + TEST_FIELD_ALIGN (EMRPOLYBEZIER, rclBounds, 4) + TEST_FIELD_OFFSET(EMRPOLYBEZIER, rclBounds, 8) + TEST_FIELD_SIZE (EMRPOLYBEZIER, cptl, 4) + TEST_FIELD_ALIGN (EMRPOLYBEZIER, cptl, 4) + TEST_FIELD_OFFSET(EMRPOLYBEZIER, cptl, 24) + TEST_FIELD_SIZE (EMRPOLYBEZIER, aptl, 8) + TEST_FIELD_ALIGN (EMRPOLYBEZIER, aptl, 4) + TEST_FIELD_OFFSET(EMRPOLYBEZIER, aptl, 28) } static void test_pack_EMRPOLYBEZIER16(void) { /* EMRPOLYBEZIER16 (pack 4) */ - TEST_TYPE(EMRPOLYBEZIER16, 32, 4); - TEST_FIELD(EMRPOLYBEZIER16, emr, 0, 8, 4); - TEST_FIELD(EMRPOLYBEZIER16, rclBounds, 8, 16, 4); - TEST_FIELD(EMRPOLYBEZIER16, cpts, 24, 4, 4); - TEST_FIELD(EMRPOLYBEZIER16, apts, 28, 4, 2); + TEST_TYPE_SIZE (EMRPOLYBEZIER16, 32) + TEST_TYPE_ALIGN (EMRPOLYBEZIER16, 4) + TEST_FIELD_SIZE (EMRPOLYBEZIER16, emr, 8) + TEST_FIELD_ALIGN (EMRPOLYBEZIER16, emr, 4) + TEST_FIELD_OFFSET(EMRPOLYBEZIER16, emr, 0) + TEST_FIELD_SIZE (EMRPOLYBEZIER16, rclBounds, 16) + TEST_FIELD_ALIGN (EMRPOLYBEZIER16, rclBounds, 4) + TEST_FIELD_OFFSET(EMRPOLYBEZIER16, rclBounds, 8) + TEST_FIELD_SIZE (EMRPOLYBEZIER16, cpts, 4) + TEST_FIELD_ALIGN (EMRPOLYBEZIER16, cpts, 4) + TEST_FIELD_OFFSET(EMRPOLYBEZIER16, cpts, 24) + TEST_FIELD_SIZE (EMRPOLYBEZIER16, apts, 4) + TEST_FIELD_ALIGN (EMRPOLYBEZIER16, apts, 2) + TEST_FIELD_OFFSET(EMRPOLYBEZIER16, apts, 28) } static void test_pack_EMRPOLYBEZIERTO(void) { /* EMRPOLYBEZIERTO (pack 4) */ - TEST_TYPE(EMRPOLYBEZIERTO, 36, 4); - TEST_FIELD(EMRPOLYBEZIERTO, emr, 0, 8, 4); - TEST_FIELD(EMRPOLYBEZIERTO, rclBounds, 8, 16, 4); - TEST_FIELD(EMRPOLYBEZIERTO, cptl, 24, 4, 4); - TEST_FIELD(EMRPOLYBEZIERTO, aptl, 28, 8, 4); + TEST_TYPE_SIZE (EMRPOLYBEZIERTO, 36) + TEST_TYPE_ALIGN (EMRPOLYBEZIERTO, 4) + TEST_FIELD_SIZE (EMRPOLYBEZIERTO, emr, 8) + TEST_FIELD_ALIGN (EMRPOLYBEZIERTO, emr, 4) + TEST_FIELD_OFFSET(EMRPOLYBEZIERTO, emr, 0) + TEST_FIELD_SIZE (EMRPOLYBEZIERTO, rclBounds, 16) + TEST_FIELD_ALIGN (EMRPOLYBEZIERTO, rclBounds, 4) + TEST_FIELD_OFFSET(EMRPOLYBEZIERTO, rclBounds, 8) + TEST_FIELD_SIZE (EMRPOLYBEZIERTO, cptl, 4) + TEST_FIELD_ALIGN (EMRPOLYBEZIERTO, cptl, 4) + TEST_FIELD_OFFSET(EMRPOLYBEZIERTO, cptl, 24) + TEST_FIELD_SIZE (EMRPOLYBEZIERTO, aptl, 8) + TEST_FIELD_ALIGN (EMRPOLYBEZIERTO, aptl, 4) + TEST_FIELD_OFFSET(EMRPOLYBEZIERTO, aptl, 28) } static void test_pack_EMRPOLYBEZIERTO16(void) { /* EMRPOLYBEZIERTO16 (pack 4) */ - TEST_TYPE(EMRPOLYBEZIERTO16, 32, 4); - TEST_FIELD(EMRPOLYBEZIERTO16, emr, 0, 8, 4); - TEST_FIELD(EMRPOLYBEZIERTO16, rclBounds, 8, 16, 4); - TEST_FIELD(EMRPOLYBEZIERTO16, cpts, 24, 4, 4); - TEST_FIELD(EMRPOLYBEZIERTO16, apts, 28, 4, 2); + TEST_TYPE_SIZE (EMRPOLYBEZIERTO16, 32) + TEST_TYPE_ALIGN (EMRPOLYBEZIERTO16, 4) + TEST_FIELD_SIZE (EMRPOLYBEZIERTO16, emr, 8) + TEST_FIELD_ALIGN (EMRPOLYBEZIERTO16, emr, 4) + TEST_FIELD_OFFSET(EMRPOLYBEZIERTO16, emr, 0) + TEST_FIELD_SIZE (EMRPOLYBEZIERTO16, rclBounds, 16) + TEST_FIELD_ALIGN (EMRPOLYBEZIERTO16, rclBounds, 4) + TEST_FIELD_OFFSET(EMRPOLYBEZIERTO16, rclBounds, 8) + TEST_FIELD_SIZE (EMRPOLYBEZIERTO16, cpts, 4) + TEST_FIELD_ALIGN (EMRPOLYBEZIERTO16, cpts, 4) + TEST_FIELD_OFFSET(EMRPOLYBEZIERTO16, cpts, 24) + TEST_FIELD_SIZE (EMRPOLYBEZIERTO16, apts, 4) + TEST_FIELD_ALIGN (EMRPOLYBEZIERTO16, apts, 2) + TEST_FIELD_OFFSET(EMRPOLYBEZIERTO16, apts, 28) } static void test_pack_EMRPOLYDRAW(void) { /* EMRPOLYDRAW (pack 4) */ - TEST_TYPE(EMRPOLYDRAW, 40, 4); - TEST_FIELD(EMRPOLYDRAW, emr, 0, 8, 4); - TEST_FIELD(EMRPOLYDRAW, rclBounds, 8, 16, 4); - TEST_FIELD(EMRPOLYDRAW, cptl, 24, 4, 4); - TEST_FIELD(EMRPOLYDRAW, aptl, 28, 8, 4); - TEST_FIELD(EMRPOLYDRAW, abTypes, 36, 1, 1); + TEST_TYPE_SIZE (EMRPOLYDRAW, 40) + TEST_TYPE_ALIGN (EMRPOLYDRAW, 4) + TEST_FIELD_SIZE (EMRPOLYDRAW, emr, 8) + TEST_FIELD_ALIGN (EMRPOLYDRAW, emr, 4) + TEST_FIELD_OFFSET(EMRPOLYDRAW, emr, 0) + TEST_FIELD_SIZE (EMRPOLYDRAW, rclBounds, 16) + TEST_FIELD_ALIGN (EMRPOLYDRAW, rclBounds, 4) + TEST_FIELD_OFFSET(EMRPOLYDRAW, rclBounds, 8) + TEST_FIELD_SIZE (EMRPOLYDRAW, cptl, 4) + TEST_FIELD_ALIGN (EMRPOLYDRAW, cptl, 4) + TEST_FIELD_OFFSET(EMRPOLYDRAW, cptl, 24) + TEST_FIELD_SIZE (EMRPOLYDRAW, aptl, 8) + TEST_FIELD_ALIGN (EMRPOLYDRAW, aptl, 4) + TEST_FIELD_OFFSET(EMRPOLYDRAW, aptl, 28) + TEST_FIELD_SIZE (EMRPOLYDRAW, abTypes, 1) + TEST_FIELD_ALIGN (EMRPOLYDRAW, abTypes, 1) + TEST_FIELD_OFFSET(EMRPOLYDRAW, abTypes, 36) } static void test_pack_EMRPOLYDRAW16(void) { /* EMRPOLYDRAW16 (pack 4) */ - TEST_TYPE(EMRPOLYDRAW16, 36, 4); - TEST_FIELD(EMRPOLYDRAW16, emr, 0, 8, 4); - TEST_FIELD(EMRPOLYDRAW16, rclBounds, 8, 16, 4); - TEST_FIELD(EMRPOLYDRAW16, cpts, 24, 4, 4); - TEST_FIELD(EMRPOLYDRAW16, apts, 28, 4, 2); - TEST_FIELD(EMRPOLYDRAW16, abTypes, 32, 1, 1); + TEST_TYPE_SIZE (EMRPOLYDRAW16, 36) + TEST_TYPE_ALIGN (EMRPOLYDRAW16, 4) + TEST_FIELD_SIZE (EMRPOLYDRAW16, emr, 8) + TEST_FIELD_ALIGN (EMRPOLYDRAW16, emr, 4) + TEST_FIELD_OFFSET(EMRPOLYDRAW16, emr, 0) + TEST_FIELD_SIZE (EMRPOLYDRAW16, rclBounds, 16) + TEST_FIELD_ALIGN (EMRPOLYDRAW16, rclBounds, 4) + TEST_FIELD_OFFSET(EMRPOLYDRAW16, rclBounds, 8) + TEST_FIELD_SIZE (EMRPOLYDRAW16, cpts, 4) + TEST_FIELD_ALIGN (EMRPOLYDRAW16, cpts, 4) + TEST_FIELD_OFFSET(EMRPOLYDRAW16, cpts, 24) + TEST_FIELD_SIZE (EMRPOLYDRAW16, apts, 4) + TEST_FIELD_ALIGN (EMRPOLYDRAW16, apts, 2) + TEST_FIELD_OFFSET(EMRPOLYDRAW16, apts, 28) + TEST_FIELD_SIZE (EMRPOLYDRAW16, abTypes, 1) + TEST_FIELD_ALIGN (EMRPOLYDRAW16, abTypes, 1) + TEST_FIELD_OFFSET(EMRPOLYDRAW16, abTypes, 32) } static void test_pack_EMRPOLYGON(void) { /* EMRPOLYGON (pack 4) */ - TEST_TYPE(EMRPOLYGON, 36, 4); - TEST_FIELD(EMRPOLYGON, emr, 0, 8, 4); - TEST_FIELD(EMRPOLYGON, rclBounds, 8, 16, 4); - TEST_FIELD(EMRPOLYGON, cptl, 24, 4, 4); - TEST_FIELD(EMRPOLYGON, aptl, 28, 8, 4); + TEST_TYPE_SIZE (EMRPOLYGON, 36) + TEST_TYPE_ALIGN (EMRPOLYGON, 4) + TEST_FIELD_SIZE (EMRPOLYGON, emr, 8) + TEST_FIELD_ALIGN (EMRPOLYGON, emr, 4) + TEST_FIELD_OFFSET(EMRPOLYGON, emr, 0) + TEST_FIELD_SIZE (EMRPOLYGON, rclBounds, 16) + TEST_FIELD_ALIGN (EMRPOLYGON, rclBounds, 4) + TEST_FIELD_OFFSET(EMRPOLYGON, rclBounds, 8) + TEST_FIELD_SIZE (EMRPOLYGON, cptl, 4) + TEST_FIELD_ALIGN (EMRPOLYGON, cptl, 4) + TEST_FIELD_OFFSET(EMRPOLYGON, cptl, 24) + TEST_FIELD_SIZE (EMRPOLYGON, aptl, 8) + TEST_FIELD_ALIGN (EMRPOLYGON, aptl, 4) + TEST_FIELD_OFFSET(EMRPOLYGON, aptl, 28) } static void test_pack_EMRPOLYGON16(void) { /* EMRPOLYGON16 (pack 4) */ - TEST_TYPE(EMRPOLYGON16, 32, 4); - TEST_FIELD(EMRPOLYGON16, emr, 0, 8, 4); - TEST_FIELD(EMRPOLYGON16, rclBounds, 8, 16, 4); - TEST_FIELD(EMRPOLYGON16, cpts, 24, 4, 4); - TEST_FIELD(EMRPOLYGON16, apts, 28, 4, 2); + TEST_TYPE_SIZE (EMRPOLYGON16, 32) + TEST_TYPE_ALIGN (EMRPOLYGON16, 4) + TEST_FIELD_SIZE (EMRPOLYGON16, emr, 8) + TEST_FIELD_ALIGN (EMRPOLYGON16, emr, 4) + TEST_FIELD_OFFSET(EMRPOLYGON16, emr, 0) + TEST_FIELD_SIZE (EMRPOLYGON16, rclBounds, 16) + TEST_FIELD_ALIGN (EMRPOLYGON16, rclBounds, 4) + TEST_FIELD_OFFSET(EMRPOLYGON16, rclBounds, 8) + TEST_FIELD_SIZE (EMRPOLYGON16, cpts, 4) + TEST_FIELD_ALIGN (EMRPOLYGON16, cpts, 4) + TEST_FIELD_OFFSET(EMRPOLYGON16, cpts, 24) + TEST_FIELD_SIZE (EMRPOLYGON16, apts, 4) + TEST_FIELD_ALIGN (EMRPOLYGON16, apts, 2) + TEST_FIELD_OFFSET(EMRPOLYGON16, apts, 28) } static void test_pack_EMRPOLYLINE(void) { /* EMRPOLYLINE (pack 4) */ - TEST_TYPE(EMRPOLYLINE, 36, 4); - TEST_FIELD(EMRPOLYLINE, emr, 0, 8, 4); - TEST_FIELD(EMRPOLYLINE, rclBounds, 8, 16, 4); - TEST_FIELD(EMRPOLYLINE, cptl, 24, 4, 4); - TEST_FIELD(EMRPOLYLINE, aptl, 28, 8, 4); + TEST_TYPE_SIZE (EMRPOLYLINE, 36) + TEST_TYPE_ALIGN (EMRPOLYLINE, 4) + TEST_FIELD_SIZE (EMRPOLYLINE, emr, 8) + TEST_FIELD_ALIGN (EMRPOLYLINE, emr, 4) + TEST_FIELD_OFFSET(EMRPOLYLINE, emr, 0) + TEST_FIELD_SIZE (EMRPOLYLINE, rclBounds, 16) + TEST_FIELD_ALIGN (EMRPOLYLINE, rclBounds, 4) + TEST_FIELD_OFFSET(EMRPOLYLINE, rclBounds, 8) + TEST_FIELD_SIZE (EMRPOLYLINE, cptl, 4) + TEST_FIELD_ALIGN (EMRPOLYLINE, cptl, 4) + TEST_FIELD_OFFSET(EMRPOLYLINE, cptl, 24) + TEST_FIELD_SIZE (EMRPOLYLINE, aptl, 8) + TEST_FIELD_ALIGN (EMRPOLYLINE, aptl, 4) + TEST_FIELD_OFFSET(EMRPOLYLINE, aptl, 28) } static void test_pack_EMRPOLYLINE16(void) { /* EMRPOLYLINE16 (pack 4) */ - TEST_TYPE(EMRPOLYLINE16, 32, 4); - TEST_FIELD(EMRPOLYLINE16, emr, 0, 8, 4); - TEST_FIELD(EMRPOLYLINE16, rclBounds, 8, 16, 4); - TEST_FIELD(EMRPOLYLINE16, cpts, 24, 4, 4); - TEST_FIELD(EMRPOLYLINE16, apts, 28, 4, 2); + TEST_TYPE_SIZE (EMRPOLYLINE16, 32) + TEST_TYPE_ALIGN (EMRPOLYLINE16, 4) + TEST_FIELD_SIZE (EMRPOLYLINE16, emr, 8) + TEST_FIELD_ALIGN (EMRPOLYLINE16, emr, 4) + TEST_FIELD_OFFSET(EMRPOLYLINE16, emr, 0) + TEST_FIELD_SIZE (EMRPOLYLINE16, rclBounds, 16) + TEST_FIELD_ALIGN (EMRPOLYLINE16, rclBounds, 4) + TEST_FIELD_OFFSET(EMRPOLYLINE16, rclBounds, 8) + TEST_FIELD_SIZE (EMRPOLYLINE16, cpts, 4) + TEST_FIELD_ALIGN (EMRPOLYLINE16, cpts, 4) + TEST_FIELD_OFFSET(EMRPOLYLINE16, cpts, 24) + TEST_FIELD_SIZE (EMRPOLYLINE16, apts, 4) + TEST_FIELD_ALIGN (EMRPOLYLINE16, apts, 2) + TEST_FIELD_OFFSET(EMRPOLYLINE16, apts, 28) } static void test_pack_EMRPOLYLINETO(void) { /* EMRPOLYLINETO (pack 4) */ - TEST_TYPE(EMRPOLYLINETO, 36, 4); - TEST_FIELD(EMRPOLYLINETO, emr, 0, 8, 4); - TEST_FIELD(EMRPOLYLINETO, rclBounds, 8, 16, 4); - TEST_FIELD(EMRPOLYLINETO, cptl, 24, 4, 4); - TEST_FIELD(EMRPOLYLINETO, aptl, 28, 8, 4); + TEST_TYPE_SIZE (EMRPOLYLINETO, 36) + TEST_TYPE_ALIGN (EMRPOLYLINETO, 4) + TEST_FIELD_SIZE (EMRPOLYLINETO, emr, 8) + TEST_FIELD_ALIGN (EMRPOLYLINETO, emr, 4) + TEST_FIELD_OFFSET(EMRPOLYLINETO, emr, 0) + TEST_FIELD_SIZE (EMRPOLYLINETO, rclBounds, 16) + TEST_FIELD_ALIGN (EMRPOLYLINETO, rclBounds, 4) + TEST_FIELD_OFFSET(EMRPOLYLINETO, rclBounds, 8) + TEST_FIELD_SIZE (EMRPOLYLINETO, cptl, 4) + TEST_FIELD_ALIGN (EMRPOLYLINETO, cptl, 4) + TEST_FIELD_OFFSET(EMRPOLYLINETO, cptl, 24) + TEST_FIELD_SIZE (EMRPOLYLINETO, aptl, 8) + TEST_FIELD_ALIGN (EMRPOLYLINETO, aptl, 4) + TEST_FIELD_OFFSET(EMRPOLYLINETO, aptl, 28) } static void test_pack_EMRPOLYLINETO16(void) { /* EMRPOLYLINETO16 (pack 4) */ - TEST_TYPE(EMRPOLYLINETO16, 32, 4); - TEST_FIELD(EMRPOLYLINETO16, emr, 0, 8, 4); - TEST_FIELD(EMRPOLYLINETO16, rclBounds, 8, 16, 4); - TEST_FIELD(EMRPOLYLINETO16, cpts, 24, 4, 4); - TEST_FIELD(EMRPOLYLINETO16, apts, 28, 4, 2); + TEST_TYPE_SIZE (EMRPOLYLINETO16, 32) + TEST_TYPE_ALIGN (EMRPOLYLINETO16, 4) + TEST_FIELD_SIZE (EMRPOLYLINETO16, emr, 8) + TEST_FIELD_ALIGN (EMRPOLYLINETO16, emr, 4) + TEST_FIELD_OFFSET(EMRPOLYLINETO16, emr, 0) + TEST_FIELD_SIZE (EMRPOLYLINETO16, rclBounds, 16) + TEST_FIELD_ALIGN (EMRPOLYLINETO16, rclBounds, 4) + TEST_FIELD_OFFSET(EMRPOLYLINETO16, rclBounds, 8) + TEST_FIELD_SIZE (EMRPOLYLINETO16, cpts, 4) + TEST_FIELD_ALIGN (EMRPOLYLINETO16, cpts, 4) + TEST_FIELD_OFFSET(EMRPOLYLINETO16, cpts, 24) + TEST_FIELD_SIZE (EMRPOLYLINETO16, apts, 4) + TEST_FIELD_ALIGN (EMRPOLYLINETO16, apts, 2) + TEST_FIELD_OFFSET(EMRPOLYLINETO16, apts, 28) } static void test_pack_EMRPOLYPOLYGON(void) { /* EMRPOLYPOLYGON (pack 4) */ - TEST_TYPE(EMRPOLYPOLYGON, 44, 4); - TEST_FIELD(EMRPOLYPOLYGON, emr, 0, 8, 4); - TEST_FIELD(EMRPOLYPOLYGON, rclBounds, 8, 16, 4); - TEST_FIELD(EMRPOLYPOLYGON, nPolys, 24, 4, 4); - TEST_FIELD(EMRPOLYPOLYGON, cptl, 28, 4, 4); - TEST_FIELD(EMRPOLYPOLYGON, aPolyCounts, 32, 4, 4); - TEST_FIELD(EMRPOLYPOLYGON, aptl, 36, 8, 4); + TEST_TYPE_SIZE (EMRPOLYPOLYGON, 44) + TEST_TYPE_ALIGN (EMRPOLYPOLYGON, 4) + TEST_FIELD_SIZE (EMRPOLYPOLYGON, emr, 8) + TEST_FIELD_ALIGN (EMRPOLYPOLYGON, emr, 4) + TEST_FIELD_OFFSET(EMRPOLYPOLYGON, emr, 0) + TEST_FIELD_SIZE (EMRPOLYPOLYGON, rclBounds, 16) + TEST_FIELD_ALIGN (EMRPOLYPOLYGON, rclBounds, 4) + TEST_FIELD_OFFSET(EMRPOLYPOLYGON, rclBounds, 8) + TEST_FIELD_SIZE (EMRPOLYPOLYGON, nPolys, 4) + TEST_FIELD_ALIGN (EMRPOLYPOLYGON, nPolys, 4) + TEST_FIELD_OFFSET(EMRPOLYPOLYGON, nPolys, 24) + TEST_FIELD_SIZE (EMRPOLYPOLYGON, cptl, 4) + TEST_FIELD_ALIGN (EMRPOLYPOLYGON, cptl, 4) + TEST_FIELD_OFFSET(EMRPOLYPOLYGON, cptl, 28) + TEST_FIELD_SIZE (EMRPOLYPOLYGON, aPolyCounts, 4) + TEST_FIELD_ALIGN (EMRPOLYPOLYGON, aPolyCounts, 4) + TEST_FIELD_OFFSET(EMRPOLYPOLYGON, aPolyCounts, 32) + TEST_FIELD_SIZE (EMRPOLYPOLYGON, aptl, 8) + TEST_FIELD_ALIGN (EMRPOLYPOLYGON, aptl, 4) + TEST_FIELD_OFFSET(EMRPOLYPOLYGON, aptl, 36) } static void test_pack_EMRPOLYPOLYGON16(void) { /* EMRPOLYPOLYGON16 (pack 4) */ - TEST_TYPE(EMRPOLYPOLYGON16, 40, 4); - TEST_FIELD(EMRPOLYPOLYGON16, emr, 0, 8, 4); - TEST_FIELD(EMRPOLYPOLYGON16, rclBounds, 8, 16, 4); - TEST_FIELD(EMRPOLYPOLYGON16, nPolys, 24, 4, 4); - TEST_FIELD(EMRPOLYPOLYGON16, cpts, 28, 4, 4); - TEST_FIELD(EMRPOLYPOLYGON16, aPolyCounts, 32, 4, 4); - TEST_FIELD(EMRPOLYPOLYGON16, apts, 36, 4, 2); + TEST_TYPE_SIZE (EMRPOLYPOLYGON16, 40) + TEST_TYPE_ALIGN (EMRPOLYPOLYGON16, 4) + TEST_FIELD_SIZE (EMRPOLYPOLYGON16, emr, 8) + TEST_FIELD_ALIGN (EMRPOLYPOLYGON16, emr, 4) + TEST_FIELD_OFFSET(EMRPOLYPOLYGON16, emr, 0) + TEST_FIELD_SIZE (EMRPOLYPOLYGON16, rclBounds, 16) + TEST_FIELD_ALIGN (EMRPOLYPOLYGON16, rclBounds, 4) + TEST_FIELD_OFFSET(EMRPOLYPOLYGON16, rclBounds, 8) + TEST_FIELD_SIZE (EMRPOLYPOLYGON16, nPolys, 4) + TEST_FIELD_ALIGN (EMRPOLYPOLYGON16, nPolys, 4) + TEST_FIELD_OFFSET(EMRPOLYPOLYGON16, nPolys, 24) + TEST_FIELD_SIZE (EMRPOLYPOLYGON16, cpts, 4) + TEST_FIELD_ALIGN (EMRPOLYPOLYGON16, cpts, 4) + TEST_FIELD_OFFSET(EMRPOLYPOLYGON16, cpts, 28) + TEST_FIELD_SIZE (EMRPOLYPOLYGON16, aPolyCounts, 4) + TEST_FIELD_ALIGN (EMRPOLYPOLYGON16, aPolyCounts, 4) + TEST_FIELD_OFFSET(EMRPOLYPOLYGON16, aPolyCounts, 32) + TEST_FIELD_SIZE (EMRPOLYPOLYGON16, apts, 4) + TEST_FIELD_ALIGN (EMRPOLYPOLYGON16, apts, 2) + TEST_FIELD_OFFSET(EMRPOLYPOLYGON16, apts, 36) } static void test_pack_EMRPOLYPOLYLINE(void) { /* EMRPOLYPOLYLINE (pack 4) */ - TEST_TYPE(EMRPOLYPOLYLINE, 44, 4); - TEST_FIELD(EMRPOLYPOLYLINE, emr, 0, 8, 4); - TEST_FIELD(EMRPOLYPOLYLINE, rclBounds, 8, 16, 4); - TEST_FIELD(EMRPOLYPOLYLINE, nPolys, 24, 4, 4); - TEST_FIELD(EMRPOLYPOLYLINE, cptl, 28, 4, 4); - TEST_FIELD(EMRPOLYPOLYLINE, aPolyCounts, 32, 4, 4); - TEST_FIELD(EMRPOLYPOLYLINE, aptl, 36, 8, 4); + TEST_TYPE_SIZE (EMRPOLYPOLYLINE, 44) + TEST_TYPE_ALIGN (EMRPOLYPOLYLINE, 4) + TEST_FIELD_SIZE (EMRPOLYPOLYLINE, emr, 8) + TEST_FIELD_ALIGN (EMRPOLYPOLYLINE, emr, 4) + TEST_FIELD_OFFSET(EMRPOLYPOLYLINE, emr, 0) + TEST_FIELD_SIZE (EMRPOLYPOLYLINE, rclBounds, 16) + TEST_FIELD_ALIGN (EMRPOLYPOLYLINE, rclBounds, 4) + TEST_FIELD_OFFSET(EMRPOLYPOLYLINE, rclBounds, 8) + TEST_FIELD_SIZE (EMRPOLYPOLYLINE, nPolys, 4) + TEST_FIELD_ALIGN (EMRPOLYPOLYLINE, nPolys, 4) + TEST_FIELD_OFFSET(EMRPOLYPOLYLINE, nPolys, 24) + TEST_FIELD_SIZE (EMRPOLYPOLYLINE, cptl, 4) + TEST_FIELD_ALIGN (EMRPOLYPOLYLINE, cptl, 4) + TEST_FIELD_OFFSET(EMRPOLYPOLYLINE, cptl, 28) + TEST_FIELD_SIZE (EMRPOLYPOLYLINE, aPolyCounts, 4) + TEST_FIELD_ALIGN (EMRPOLYPOLYLINE, aPolyCounts, 4) + TEST_FIELD_OFFSET(EMRPOLYPOLYLINE, aPolyCounts, 32) + TEST_FIELD_SIZE (EMRPOLYPOLYLINE, aptl, 8) + TEST_FIELD_ALIGN (EMRPOLYPOLYLINE, aptl, 4) + TEST_FIELD_OFFSET(EMRPOLYPOLYLINE, aptl, 36) } static void test_pack_EMRPOLYPOLYLINE16(void) { /* EMRPOLYPOLYLINE16 (pack 4) */ - TEST_TYPE(EMRPOLYPOLYLINE16, 40, 4); - TEST_FIELD(EMRPOLYPOLYLINE16, emr, 0, 8, 4); - TEST_FIELD(EMRPOLYPOLYLINE16, rclBounds, 8, 16, 4); - TEST_FIELD(EMRPOLYPOLYLINE16, nPolys, 24, 4, 4); - TEST_FIELD(EMRPOLYPOLYLINE16, cpts, 28, 4, 4); - TEST_FIELD(EMRPOLYPOLYLINE16, aPolyCounts, 32, 4, 4); - TEST_FIELD(EMRPOLYPOLYLINE16, apts, 36, 4, 2); + TEST_TYPE_SIZE (EMRPOLYPOLYLINE16, 40) + TEST_TYPE_ALIGN (EMRPOLYPOLYLINE16, 4) + TEST_FIELD_SIZE (EMRPOLYPOLYLINE16, emr, 8) + TEST_FIELD_ALIGN (EMRPOLYPOLYLINE16, emr, 4) + TEST_FIELD_OFFSET(EMRPOLYPOLYLINE16, emr, 0) + TEST_FIELD_SIZE (EMRPOLYPOLYLINE16, rclBounds, 16) + TEST_FIELD_ALIGN (EMRPOLYPOLYLINE16, rclBounds, 4) + TEST_FIELD_OFFSET(EMRPOLYPOLYLINE16, rclBounds, 8) + TEST_FIELD_SIZE (EMRPOLYPOLYLINE16, nPolys, 4) + TEST_FIELD_ALIGN (EMRPOLYPOLYLINE16, nPolys, 4) + TEST_FIELD_OFFSET(EMRPOLYPOLYLINE16, nPolys, 24) + TEST_FIELD_SIZE (EMRPOLYPOLYLINE16, cpts, 4) + TEST_FIELD_ALIGN (EMRPOLYPOLYLINE16, cpts, 4) + TEST_FIELD_OFFSET(EMRPOLYPOLYLINE16, cpts, 28) + TEST_FIELD_SIZE (EMRPOLYPOLYLINE16, aPolyCounts, 4) + TEST_FIELD_ALIGN (EMRPOLYPOLYLINE16, aPolyCounts, 4) + TEST_FIELD_OFFSET(EMRPOLYPOLYLINE16, aPolyCounts, 32) + TEST_FIELD_SIZE (EMRPOLYPOLYLINE16, apts, 4) + TEST_FIELD_ALIGN (EMRPOLYPOLYLINE16, apts, 2) + TEST_FIELD_OFFSET(EMRPOLYPOLYLINE16, apts, 36) } static void test_pack_EMRPOLYTEXTOUTA(void) { /* EMRPOLYTEXTOUTA (pack 4) */ - TEST_TYPE(EMRPOLYTEXTOUTA, 80, 4); - TEST_FIELD(EMRPOLYTEXTOUTA, emr, 0, 8, 4); - TEST_FIELD(EMRPOLYTEXTOUTA, rclBounds, 8, 16, 4); - TEST_FIELD(EMRPOLYTEXTOUTA, iGraphicsMode, 24, 4, 4); - TEST_FIELD(EMRPOLYTEXTOUTA, exScale, 28, 4, 4); - TEST_FIELD(EMRPOLYTEXTOUTA, eyScale, 32, 4, 4); - TEST_FIELD(EMRPOLYTEXTOUTA, cStrings, 36, 4, 4); - TEST_FIELD(EMRPOLYTEXTOUTA, aemrtext, 40, 40, 4); + TEST_TYPE_SIZE (EMRPOLYTEXTOUTA, 80) + TEST_TYPE_ALIGN (EMRPOLYTEXTOUTA, 4) + TEST_FIELD_SIZE (EMRPOLYTEXTOUTA, emr, 8) + TEST_FIELD_ALIGN (EMRPOLYTEXTOUTA, emr, 4) + TEST_FIELD_OFFSET(EMRPOLYTEXTOUTA, emr, 0) + TEST_FIELD_SIZE (EMRPOLYTEXTOUTA, rclBounds, 16) + TEST_FIELD_ALIGN (EMRPOLYTEXTOUTA, rclBounds, 4) + TEST_FIELD_OFFSET(EMRPOLYTEXTOUTA, rclBounds, 8) + TEST_FIELD_SIZE (EMRPOLYTEXTOUTA, iGraphicsMode, 4) + TEST_FIELD_ALIGN (EMRPOLYTEXTOUTA, iGraphicsMode, 4) + TEST_FIELD_OFFSET(EMRPOLYTEXTOUTA, iGraphicsMode, 24) + TEST_FIELD_SIZE (EMRPOLYTEXTOUTA, exScale, 4) + TEST_FIELD_ALIGN (EMRPOLYTEXTOUTA, exScale, 4) + TEST_FIELD_OFFSET(EMRPOLYTEXTOUTA, exScale, 28) + TEST_FIELD_SIZE (EMRPOLYTEXTOUTA, eyScale, 4) + TEST_FIELD_ALIGN (EMRPOLYTEXTOUTA, eyScale, 4) + TEST_FIELD_OFFSET(EMRPOLYTEXTOUTA, eyScale, 32) + TEST_FIELD_SIZE (EMRPOLYTEXTOUTA, cStrings, 4) + TEST_FIELD_ALIGN (EMRPOLYTEXTOUTA, cStrings, 4) + TEST_FIELD_OFFSET(EMRPOLYTEXTOUTA, cStrings, 36) + TEST_FIELD_SIZE (EMRPOLYTEXTOUTA, aemrtext, 40) + TEST_FIELD_ALIGN (EMRPOLYTEXTOUTA, aemrtext, 4) + TEST_FIELD_OFFSET(EMRPOLYTEXTOUTA, aemrtext, 40) } static void test_pack_EMRPOLYTEXTOUTW(void) { /* EMRPOLYTEXTOUTW (pack 4) */ - TEST_TYPE(EMRPOLYTEXTOUTW, 80, 4); - TEST_FIELD(EMRPOLYTEXTOUTW, emr, 0, 8, 4); - TEST_FIELD(EMRPOLYTEXTOUTW, rclBounds, 8, 16, 4); - TEST_FIELD(EMRPOLYTEXTOUTW, iGraphicsMode, 24, 4, 4); - TEST_FIELD(EMRPOLYTEXTOUTW, exScale, 28, 4, 4); - TEST_FIELD(EMRPOLYTEXTOUTW, eyScale, 32, 4, 4); - TEST_FIELD(EMRPOLYTEXTOUTW, cStrings, 36, 4, 4); - TEST_FIELD(EMRPOLYTEXTOUTW, aemrtext, 40, 40, 4); + TEST_TYPE_SIZE (EMRPOLYTEXTOUTW, 80) + TEST_TYPE_ALIGN (EMRPOLYTEXTOUTW, 4) + TEST_FIELD_SIZE (EMRPOLYTEXTOUTW, emr, 8) + TEST_FIELD_ALIGN (EMRPOLYTEXTOUTW, emr, 4) + TEST_FIELD_OFFSET(EMRPOLYTEXTOUTW, emr, 0) + TEST_FIELD_SIZE (EMRPOLYTEXTOUTW, rclBounds, 16) + TEST_FIELD_ALIGN (EMRPOLYTEXTOUTW, rclBounds, 4) + TEST_FIELD_OFFSET(EMRPOLYTEXTOUTW, rclBounds, 8) + TEST_FIELD_SIZE (EMRPOLYTEXTOUTW, iGraphicsMode, 4) + TEST_FIELD_ALIGN (EMRPOLYTEXTOUTW, iGraphicsMode, 4) + TEST_FIELD_OFFSET(EMRPOLYTEXTOUTW, iGraphicsMode, 24) + TEST_FIELD_SIZE (EMRPOLYTEXTOUTW, exScale, 4) + TEST_FIELD_ALIGN (EMRPOLYTEXTOUTW, exScale, 4) + TEST_FIELD_OFFSET(EMRPOLYTEXTOUTW, exScale, 28) + TEST_FIELD_SIZE (EMRPOLYTEXTOUTW, eyScale, 4) + TEST_FIELD_ALIGN (EMRPOLYTEXTOUTW, eyScale, 4) + TEST_FIELD_OFFSET(EMRPOLYTEXTOUTW, eyScale, 32) + TEST_FIELD_SIZE (EMRPOLYTEXTOUTW, cStrings, 4) + TEST_FIELD_ALIGN (EMRPOLYTEXTOUTW, cStrings, 4) + TEST_FIELD_OFFSET(EMRPOLYTEXTOUTW, cStrings, 36) + TEST_FIELD_SIZE (EMRPOLYTEXTOUTW, aemrtext, 40) + TEST_FIELD_ALIGN (EMRPOLYTEXTOUTW, aemrtext, 4) + TEST_FIELD_OFFSET(EMRPOLYTEXTOUTW, aemrtext, 40) } static void test_pack_EMRREALIZEPALETTE(void) { /* EMRREALIZEPALETTE (pack 4) */ - TEST_TYPE(EMRREALIZEPALETTE, 8, 4); - TEST_FIELD(EMRREALIZEPALETTE, emr, 0, 8, 4); + TEST_TYPE_SIZE (EMRREALIZEPALETTE, 8) + TEST_TYPE_ALIGN (EMRREALIZEPALETTE, 4) + TEST_FIELD_SIZE (EMRREALIZEPALETTE, emr, 8) + TEST_FIELD_ALIGN (EMRREALIZEPALETTE, emr, 4) + TEST_FIELD_OFFSET(EMRREALIZEPALETTE, emr, 0) } static void test_pack_EMRRECTANGLE(void) { /* EMRRECTANGLE (pack 4) */ - TEST_TYPE(EMRRECTANGLE, 24, 4); - TEST_FIELD(EMRRECTANGLE, emr, 0, 8, 4); - TEST_FIELD(EMRRECTANGLE, rclBox, 8, 16, 4); + TEST_TYPE_SIZE (EMRRECTANGLE, 24) + TEST_TYPE_ALIGN (EMRRECTANGLE, 4) + TEST_FIELD_SIZE (EMRRECTANGLE, emr, 8) + TEST_FIELD_ALIGN (EMRRECTANGLE, emr, 4) + TEST_FIELD_OFFSET(EMRRECTANGLE, emr, 0) + TEST_FIELD_SIZE (EMRRECTANGLE, rclBox, 16) + TEST_FIELD_ALIGN (EMRRECTANGLE, rclBox, 4) + TEST_FIELD_OFFSET(EMRRECTANGLE, rclBox, 8) } static void test_pack_EMRRESIZEPALETTE(void) { /* EMRRESIZEPALETTE (pack 4) */ - TEST_TYPE(EMRRESIZEPALETTE, 16, 4); - TEST_FIELD(EMRRESIZEPALETTE, emr, 0, 8, 4); - TEST_FIELD(EMRRESIZEPALETTE, ihPal, 8, 4, 4); - TEST_FIELD(EMRRESIZEPALETTE, cEntries, 12, 4, 4); + TEST_TYPE_SIZE (EMRRESIZEPALETTE, 16) + TEST_TYPE_ALIGN (EMRRESIZEPALETTE, 4) + TEST_FIELD_SIZE (EMRRESIZEPALETTE, emr, 8) + TEST_FIELD_ALIGN (EMRRESIZEPALETTE, emr, 4) + TEST_FIELD_OFFSET(EMRRESIZEPALETTE, emr, 0) + TEST_FIELD_SIZE (EMRRESIZEPALETTE, ihPal, 4) + TEST_FIELD_ALIGN (EMRRESIZEPALETTE, ihPal, 4) + TEST_FIELD_OFFSET(EMRRESIZEPALETTE, ihPal, 8) + TEST_FIELD_SIZE (EMRRESIZEPALETTE, cEntries, 4) + TEST_FIELD_ALIGN (EMRRESIZEPALETTE, cEntries, 4) + TEST_FIELD_OFFSET(EMRRESIZEPALETTE, cEntries, 12) } static void test_pack_EMRRESTOREDC(void) { /* EMRRESTOREDC (pack 4) */ - TEST_TYPE(EMRRESTOREDC, 12, 4); - TEST_FIELD(EMRRESTOREDC, emr, 0, 8, 4); - TEST_FIELD(EMRRESTOREDC, iRelative, 8, 4, 4); + TEST_TYPE_SIZE (EMRRESTOREDC, 12) + TEST_TYPE_ALIGN (EMRRESTOREDC, 4) + TEST_FIELD_SIZE (EMRRESTOREDC, emr, 8) + TEST_FIELD_ALIGN (EMRRESTOREDC, emr, 4) + TEST_FIELD_OFFSET(EMRRESTOREDC, emr, 0) + TEST_FIELD_SIZE (EMRRESTOREDC, iRelative, 4) + TEST_FIELD_ALIGN (EMRRESTOREDC, iRelative, 4) + TEST_FIELD_OFFSET(EMRRESTOREDC, iRelative, 8) } static void test_pack_EMRROUNDRECT(void) { /* EMRROUNDRECT (pack 4) */ - TEST_TYPE(EMRROUNDRECT, 32, 4); - TEST_FIELD(EMRROUNDRECT, emr, 0, 8, 4); - TEST_FIELD(EMRROUNDRECT, rclBox, 8, 16, 4); - TEST_FIELD(EMRROUNDRECT, szlCorner, 24, 8, 4); + TEST_TYPE_SIZE (EMRROUNDRECT, 32) + TEST_TYPE_ALIGN (EMRROUNDRECT, 4) + TEST_FIELD_SIZE (EMRROUNDRECT, emr, 8) + TEST_FIELD_ALIGN (EMRROUNDRECT, emr, 4) + TEST_FIELD_OFFSET(EMRROUNDRECT, emr, 0) + TEST_FIELD_SIZE (EMRROUNDRECT, rclBox, 16) + TEST_FIELD_ALIGN (EMRROUNDRECT, rclBox, 4) + TEST_FIELD_OFFSET(EMRROUNDRECT, rclBox, 8) + TEST_FIELD_SIZE (EMRROUNDRECT, szlCorner, 8) + TEST_FIELD_ALIGN (EMRROUNDRECT, szlCorner, 4) + TEST_FIELD_OFFSET(EMRROUNDRECT, szlCorner, 24) } static void test_pack_EMRSAVEDC(void) { /* EMRSAVEDC (pack 4) */ - TEST_TYPE(EMRSAVEDC, 8, 4); - TEST_FIELD(EMRSAVEDC, emr, 0, 8, 4); + TEST_TYPE_SIZE (EMRSAVEDC, 8) + TEST_TYPE_ALIGN (EMRSAVEDC, 4) + TEST_FIELD_SIZE (EMRSAVEDC, emr, 8) + TEST_FIELD_ALIGN (EMRSAVEDC, emr, 4) + TEST_FIELD_OFFSET(EMRSAVEDC, emr, 0) } static void test_pack_EMRSCALEVIEWPORTEXTEX(void) { /* EMRSCALEVIEWPORTEXTEX (pack 4) */ - TEST_TYPE(EMRSCALEVIEWPORTEXTEX, 24, 4); - TEST_FIELD(EMRSCALEVIEWPORTEXTEX, emr, 0, 8, 4); - TEST_FIELD(EMRSCALEVIEWPORTEXTEX, xNum, 8, 4, 4); - TEST_FIELD(EMRSCALEVIEWPORTEXTEX, xDenom, 12, 4, 4); - TEST_FIELD(EMRSCALEVIEWPORTEXTEX, yNum, 16, 4, 4); - TEST_FIELD(EMRSCALEVIEWPORTEXTEX, yDenom, 20, 4, 4); + TEST_TYPE_SIZE (EMRSCALEVIEWPORTEXTEX, 24) + TEST_TYPE_ALIGN (EMRSCALEVIEWPORTEXTEX, 4) + TEST_FIELD_SIZE (EMRSCALEVIEWPORTEXTEX, emr, 8) + TEST_FIELD_ALIGN (EMRSCALEVIEWPORTEXTEX, emr, 4) + TEST_FIELD_OFFSET(EMRSCALEVIEWPORTEXTEX, emr, 0) + TEST_FIELD_SIZE (EMRSCALEVIEWPORTEXTEX, xNum, 4) + TEST_FIELD_ALIGN (EMRSCALEVIEWPORTEXTEX, xNum, 4) + TEST_FIELD_OFFSET(EMRSCALEVIEWPORTEXTEX, xNum, 8) + TEST_FIELD_SIZE (EMRSCALEVIEWPORTEXTEX, xDenom, 4) + TEST_FIELD_ALIGN (EMRSCALEVIEWPORTEXTEX, xDenom, 4) + TEST_FIELD_OFFSET(EMRSCALEVIEWPORTEXTEX, xDenom, 12) + TEST_FIELD_SIZE (EMRSCALEVIEWPORTEXTEX, yNum, 4) + TEST_FIELD_ALIGN (EMRSCALEVIEWPORTEXTEX, yNum, 4) + TEST_FIELD_OFFSET(EMRSCALEVIEWPORTEXTEX, yNum, 16) + TEST_FIELD_SIZE (EMRSCALEVIEWPORTEXTEX, yDenom, 4) + TEST_FIELD_ALIGN (EMRSCALEVIEWPORTEXTEX, yDenom, 4) + TEST_FIELD_OFFSET(EMRSCALEVIEWPORTEXTEX, yDenom, 20) } static void test_pack_EMRSCALEWINDOWEXTEX(void) { /* EMRSCALEWINDOWEXTEX (pack 4) */ - TEST_TYPE(EMRSCALEWINDOWEXTEX, 24, 4); - TEST_FIELD(EMRSCALEWINDOWEXTEX, emr, 0, 8, 4); - TEST_FIELD(EMRSCALEWINDOWEXTEX, xNum, 8, 4, 4); - TEST_FIELD(EMRSCALEWINDOWEXTEX, xDenom, 12, 4, 4); - TEST_FIELD(EMRSCALEWINDOWEXTEX, yNum, 16, 4, 4); - TEST_FIELD(EMRSCALEWINDOWEXTEX, yDenom, 20, 4, 4); + TEST_TYPE_SIZE (EMRSCALEWINDOWEXTEX, 24) + TEST_TYPE_ALIGN (EMRSCALEWINDOWEXTEX, 4) + TEST_FIELD_SIZE (EMRSCALEWINDOWEXTEX, emr, 8) + TEST_FIELD_ALIGN (EMRSCALEWINDOWEXTEX, emr, 4) + TEST_FIELD_OFFSET(EMRSCALEWINDOWEXTEX, emr, 0) + TEST_FIELD_SIZE (EMRSCALEWINDOWEXTEX, xNum, 4) + TEST_FIELD_ALIGN (EMRSCALEWINDOWEXTEX, xNum, 4) + TEST_FIELD_OFFSET(EMRSCALEWINDOWEXTEX, xNum, 8) + TEST_FIELD_SIZE (EMRSCALEWINDOWEXTEX, xDenom, 4) + TEST_FIELD_ALIGN (EMRSCALEWINDOWEXTEX, xDenom, 4) + TEST_FIELD_OFFSET(EMRSCALEWINDOWEXTEX, xDenom, 12) + TEST_FIELD_SIZE (EMRSCALEWINDOWEXTEX, yNum, 4) + TEST_FIELD_ALIGN (EMRSCALEWINDOWEXTEX, yNum, 4) + TEST_FIELD_OFFSET(EMRSCALEWINDOWEXTEX, yNum, 16) + TEST_FIELD_SIZE (EMRSCALEWINDOWEXTEX, yDenom, 4) + TEST_FIELD_ALIGN (EMRSCALEWINDOWEXTEX, yDenom, 4) + TEST_FIELD_OFFSET(EMRSCALEWINDOWEXTEX, yDenom, 20) } static void test_pack_EMRSELECTCLIPPATH(void) { /* EMRSELECTCLIPPATH (pack 4) */ - TEST_TYPE(EMRSELECTCLIPPATH, 12, 4); - TEST_FIELD(EMRSELECTCLIPPATH, emr, 0, 8, 4); - TEST_FIELD(EMRSELECTCLIPPATH, iMode, 8, 4, 4); + TEST_TYPE_SIZE (EMRSELECTCLIPPATH, 12) + TEST_TYPE_ALIGN (EMRSELECTCLIPPATH, 4) + TEST_FIELD_SIZE (EMRSELECTCLIPPATH, emr, 8) + TEST_FIELD_ALIGN (EMRSELECTCLIPPATH, emr, 4) + TEST_FIELD_OFFSET(EMRSELECTCLIPPATH, emr, 0) + TEST_FIELD_SIZE (EMRSELECTCLIPPATH, iMode, 4) + TEST_FIELD_ALIGN (EMRSELECTCLIPPATH, iMode, 4) + TEST_FIELD_OFFSET(EMRSELECTCLIPPATH, iMode, 8) } static void test_pack_EMRSELECTCOLORSPACE(void) { /* EMRSELECTCOLORSPACE (pack 4) */ - TEST_TYPE(EMRSELECTCOLORSPACE, 12, 4); - TEST_FIELD(EMRSELECTCOLORSPACE, emr, 0, 8, 4); - TEST_FIELD(EMRSELECTCOLORSPACE, ihCS, 8, 4, 4); + TEST_TYPE_SIZE (EMRSELECTCOLORSPACE, 12) + TEST_TYPE_ALIGN (EMRSELECTCOLORSPACE, 4) + TEST_FIELD_SIZE (EMRSELECTCOLORSPACE, emr, 8) + TEST_FIELD_ALIGN (EMRSELECTCOLORSPACE, emr, 4) + TEST_FIELD_OFFSET(EMRSELECTCOLORSPACE, emr, 0) + TEST_FIELD_SIZE (EMRSELECTCOLORSPACE, ihCS, 4) + TEST_FIELD_ALIGN (EMRSELECTCOLORSPACE, ihCS, 4) + TEST_FIELD_OFFSET(EMRSELECTCOLORSPACE, ihCS, 8) } static void test_pack_EMRSELECTOBJECT(void) { /* EMRSELECTOBJECT (pack 4) */ - TEST_TYPE(EMRSELECTOBJECT, 12, 4); - TEST_FIELD(EMRSELECTOBJECT, emr, 0, 8, 4); - TEST_FIELD(EMRSELECTOBJECT, ihObject, 8, 4, 4); + TEST_TYPE_SIZE (EMRSELECTOBJECT, 12) + TEST_TYPE_ALIGN (EMRSELECTOBJECT, 4) + TEST_FIELD_SIZE (EMRSELECTOBJECT, emr, 8) + TEST_FIELD_ALIGN (EMRSELECTOBJECT, emr, 4) + TEST_FIELD_OFFSET(EMRSELECTOBJECT, emr, 0) + TEST_FIELD_SIZE (EMRSELECTOBJECT, ihObject, 4) + TEST_FIELD_ALIGN (EMRSELECTOBJECT, ihObject, 4) + TEST_FIELD_OFFSET(EMRSELECTOBJECT, ihObject, 8) } static void test_pack_EMRSELECTPALETTE(void) { /* EMRSELECTPALETTE (pack 4) */ - TEST_TYPE(EMRSELECTPALETTE, 12, 4); - TEST_FIELD(EMRSELECTPALETTE, emr, 0, 8, 4); - TEST_FIELD(EMRSELECTPALETTE, ihPal, 8, 4, 4); + TEST_TYPE_SIZE (EMRSELECTPALETTE, 12) + TEST_TYPE_ALIGN (EMRSELECTPALETTE, 4) + TEST_FIELD_SIZE (EMRSELECTPALETTE, emr, 8) + TEST_FIELD_ALIGN (EMRSELECTPALETTE, emr, 4) + TEST_FIELD_OFFSET(EMRSELECTPALETTE, emr, 0) + TEST_FIELD_SIZE (EMRSELECTPALETTE, ihPal, 4) + TEST_FIELD_ALIGN (EMRSELECTPALETTE, ihPal, 4) + TEST_FIELD_OFFSET(EMRSELECTPALETTE, ihPal, 8) } static void test_pack_EMRSETARCDIRECTION(void) { /* EMRSETARCDIRECTION (pack 4) */ - TEST_TYPE(EMRSETARCDIRECTION, 12, 4); - TEST_FIELD(EMRSETARCDIRECTION, emr, 0, 8, 4); - TEST_FIELD(EMRSETARCDIRECTION, iArcDirection, 8, 4, 4); + TEST_TYPE_SIZE (EMRSETARCDIRECTION, 12) + TEST_TYPE_ALIGN (EMRSETARCDIRECTION, 4) + TEST_FIELD_SIZE (EMRSETARCDIRECTION, emr, 8) + TEST_FIELD_ALIGN (EMRSETARCDIRECTION, emr, 4) + TEST_FIELD_OFFSET(EMRSETARCDIRECTION, emr, 0) + TEST_FIELD_SIZE (EMRSETARCDIRECTION, iArcDirection, 4) + TEST_FIELD_ALIGN (EMRSETARCDIRECTION, iArcDirection, 4) + TEST_FIELD_OFFSET(EMRSETARCDIRECTION, iArcDirection, 8) } static void test_pack_EMRSETBKCOLOR(void) { /* EMRSETBKCOLOR (pack 4) */ - TEST_TYPE(EMRSETBKCOLOR, 12, 4); - TEST_FIELD(EMRSETBKCOLOR, emr, 0, 8, 4); - TEST_FIELD(EMRSETBKCOLOR, crColor, 8, 4, 4); + TEST_TYPE_SIZE (EMRSETBKCOLOR, 12) + TEST_TYPE_ALIGN (EMRSETBKCOLOR, 4) + TEST_FIELD_SIZE (EMRSETBKCOLOR, emr, 8) + TEST_FIELD_ALIGN (EMRSETBKCOLOR, emr, 4) + TEST_FIELD_OFFSET(EMRSETBKCOLOR, emr, 0) + TEST_FIELD_SIZE (EMRSETBKCOLOR, crColor, 4) + TEST_FIELD_ALIGN (EMRSETBKCOLOR, crColor, 4) + TEST_FIELD_OFFSET(EMRSETBKCOLOR, crColor, 8) } static void test_pack_EMRSETBKMODE(void) { /* EMRSETBKMODE (pack 4) */ - TEST_TYPE(EMRSETBKMODE, 12, 4); - TEST_FIELD(EMRSETBKMODE, emr, 0, 8, 4); - TEST_FIELD(EMRSETBKMODE, iMode, 8, 4, 4); + TEST_TYPE_SIZE (EMRSETBKMODE, 12) + TEST_TYPE_ALIGN (EMRSETBKMODE, 4) + TEST_FIELD_SIZE (EMRSETBKMODE, emr, 8) + TEST_FIELD_ALIGN (EMRSETBKMODE, emr, 4) + TEST_FIELD_OFFSET(EMRSETBKMODE, emr, 0) + TEST_FIELD_SIZE (EMRSETBKMODE, iMode, 4) + TEST_FIELD_ALIGN (EMRSETBKMODE, iMode, 4) + TEST_FIELD_OFFSET(EMRSETBKMODE, iMode, 8) } static void test_pack_EMRSETBRUSHORGEX(void) { /* EMRSETBRUSHORGEX (pack 4) */ - TEST_TYPE(EMRSETBRUSHORGEX, 16, 4); - TEST_FIELD(EMRSETBRUSHORGEX, emr, 0, 8, 4); - TEST_FIELD(EMRSETBRUSHORGEX, ptlOrigin, 8, 8, 4); + TEST_TYPE_SIZE (EMRSETBRUSHORGEX, 16) + TEST_TYPE_ALIGN (EMRSETBRUSHORGEX, 4) + TEST_FIELD_SIZE (EMRSETBRUSHORGEX, emr, 8) + TEST_FIELD_ALIGN (EMRSETBRUSHORGEX, emr, 4) + TEST_FIELD_OFFSET(EMRSETBRUSHORGEX, emr, 0) + TEST_FIELD_SIZE (EMRSETBRUSHORGEX, ptlOrigin, 8) + TEST_FIELD_ALIGN (EMRSETBRUSHORGEX, ptlOrigin, 4) + TEST_FIELD_OFFSET(EMRSETBRUSHORGEX, ptlOrigin, 8) } static void test_pack_EMRSETCOLORADJUSTMENT(void) { /* EMRSETCOLORADJUSTMENT (pack 4) */ - TEST_TYPE(EMRSETCOLORADJUSTMENT, 32, 4); - TEST_FIELD(EMRSETCOLORADJUSTMENT, emr, 0, 8, 4); - TEST_FIELD(EMRSETCOLORADJUSTMENT, ColorAdjustment, 8, 24, 2); + TEST_TYPE_SIZE (EMRSETCOLORADJUSTMENT, 32) + TEST_TYPE_ALIGN (EMRSETCOLORADJUSTMENT, 4) + TEST_FIELD_SIZE (EMRSETCOLORADJUSTMENT, emr, 8) + TEST_FIELD_ALIGN (EMRSETCOLORADJUSTMENT, emr, 4) + TEST_FIELD_OFFSET(EMRSETCOLORADJUSTMENT, emr, 0) + TEST_FIELD_SIZE (EMRSETCOLORADJUSTMENT, ColorAdjustment, 24) + TEST_FIELD_ALIGN (EMRSETCOLORADJUSTMENT, ColorAdjustment, 2) + TEST_FIELD_OFFSET(EMRSETCOLORADJUSTMENT, ColorAdjustment, 8) } static void test_pack_EMRSETCOLORSPACE(void) { /* EMRSETCOLORSPACE (pack 4) */ - TEST_TYPE(EMRSETCOLORSPACE, 12, 4); - TEST_FIELD(EMRSETCOLORSPACE, emr, 0, 8, 4); - TEST_FIELD(EMRSETCOLORSPACE, ihCS, 8, 4, 4); + TEST_TYPE_SIZE (EMRSETCOLORSPACE, 12) + TEST_TYPE_ALIGN (EMRSETCOLORSPACE, 4) + TEST_FIELD_SIZE (EMRSETCOLORSPACE, emr, 8) + TEST_FIELD_ALIGN (EMRSETCOLORSPACE, emr, 4) + TEST_FIELD_OFFSET(EMRSETCOLORSPACE, emr, 0) + TEST_FIELD_SIZE (EMRSETCOLORSPACE, ihCS, 4) + TEST_FIELD_ALIGN (EMRSETCOLORSPACE, ihCS, 4) + TEST_FIELD_OFFSET(EMRSETCOLORSPACE, ihCS, 8) } static void test_pack_EMRSETDIBITSTODEVICE(void) { /* EMRSETDIBITSTODEVICE (pack 4) */ - TEST_TYPE(EMRSETDIBITSTODEVICE, 76, 4); - TEST_FIELD(EMRSETDIBITSTODEVICE, emr, 0, 8, 4); - TEST_FIELD(EMRSETDIBITSTODEVICE, rclBounds, 8, 16, 4); - TEST_FIELD(EMRSETDIBITSTODEVICE, xDest, 24, 4, 4); - TEST_FIELD(EMRSETDIBITSTODEVICE, yDest, 28, 4, 4); - TEST_FIELD(EMRSETDIBITSTODEVICE, xSrc, 32, 4, 4); - TEST_FIELD(EMRSETDIBITSTODEVICE, ySrc, 36, 4, 4); - TEST_FIELD(EMRSETDIBITSTODEVICE, cxSrc, 40, 4, 4); - TEST_FIELD(EMRSETDIBITSTODEVICE, cySrc, 44, 4, 4); - TEST_FIELD(EMRSETDIBITSTODEVICE, offBmiSrc, 48, 4, 4); - TEST_FIELD(EMRSETDIBITSTODEVICE, cbBmiSrc, 52, 4, 4); - TEST_FIELD(EMRSETDIBITSTODEVICE, offBitsSrc, 56, 4, 4); - TEST_FIELD(EMRSETDIBITSTODEVICE, cbBitsSrc, 60, 4, 4); - TEST_FIELD(EMRSETDIBITSTODEVICE, iUsageSrc, 64, 4, 4); - TEST_FIELD(EMRSETDIBITSTODEVICE, iStartScan, 68, 4, 4); - TEST_FIELD(EMRSETDIBITSTODEVICE, cScans, 72, 4, 4); + TEST_TYPE_SIZE (EMRSETDIBITSTODEVICE, 76) + TEST_TYPE_ALIGN (EMRSETDIBITSTODEVICE, 4) + TEST_FIELD_SIZE (EMRSETDIBITSTODEVICE, emr, 8) + TEST_FIELD_ALIGN (EMRSETDIBITSTODEVICE, emr, 4) + TEST_FIELD_OFFSET(EMRSETDIBITSTODEVICE, emr, 0) + TEST_FIELD_SIZE (EMRSETDIBITSTODEVICE, rclBounds, 16) + TEST_FIELD_ALIGN (EMRSETDIBITSTODEVICE, rclBounds, 4) + TEST_FIELD_OFFSET(EMRSETDIBITSTODEVICE, rclBounds, 8) + TEST_FIELD_SIZE (EMRSETDIBITSTODEVICE, xDest, 4) + TEST_FIELD_ALIGN (EMRSETDIBITSTODEVICE, xDest, 4) + TEST_FIELD_OFFSET(EMRSETDIBITSTODEVICE, xDest, 24) + TEST_FIELD_SIZE (EMRSETDIBITSTODEVICE, yDest, 4) + TEST_FIELD_ALIGN (EMRSETDIBITSTODEVICE, yDest, 4) + TEST_FIELD_OFFSET(EMRSETDIBITSTODEVICE, yDest, 28) + TEST_FIELD_SIZE (EMRSETDIBITSTODEVICE, xSrc, 4) + TEST_FIELD_ALIGN (EMRSETDIBITSTODEVICE, xSrc, 4) + TEST_FIELD_OFFSET(EMRSETDIBITSTODEVICE, xSrc, 32) + TEST_FIELD_SIZE (EMRSETDIBITSTODEVICE, ySrc, 4) + TEST_FIELD_ALIGN (EMRSETDIBITSTODEVICE, ySrc, 4) + TEST_FIELD_OFFSET(EMRSETDIBITSTODEVICE, ySrc, 36) + TEST_FIELD_SIZE (EMRSETDIBITSTODEVICE, cxSrc, 4) + TEST_FIELD_ALIGN (EMRSETDIBITSTODEVICE, cxSrc, 4) + TEST_FIELD_OFFSET(EMRSETDIBITSTODEVICE, cxSrc, 40) + TEST_FIELD_SIZE (EMRSETDIBITSTODEVICE, cySrc, 4) + TEST_FIELD_ALIGN (EMRSETDIBITSTODEVICE, cySrc, 4) + TEST_FIELD_OFFSET(EMRSETDIBITSTODEVICE, cySrc, 44) + TEST_FIELD_SIZE (EMRSETDIBITSTODEVICE, offBmiSrc, 4) + TEST_FIELD_ALIGN (EMRSETDIBITSTODEVICE, offBmiSrc, 4) + TEST_FIELD_OFFSET(EMRSETDIBITSTODEVICE, offBmiSrc, 48) + TEST_FIELD_SIZE (EMRSETDIBITSTODEVICE, cbBmiSrc, 4) + TEST_FIELD_ALIGN (EMRSETDIBITSTODEVICE, cbBmiSrc, 4) + TEST_FIELD_OFFSET(EMRSETDIBITSTODEVICE, cbBmiSrc, 52) + TEST_FIELD_SIZE (EMRSETDIBITSTODEVICE, offBitsSrc, 4) + TEST_FIELD_ALIGN (EMRSETDIBITSTODEVICE, offBitsSrc, 4) + TEST_FIELD_OFFSET(EMRSETDIBITSTODEVICE, offBitsSrc, 56) + TEST_FIELD_SIZE (EMRSETDIBITSTODEVICE, cbBitsSrc, 4) + TEST_FIELD_ALIGN (EMRSETDIBITSTODEVICE, cbBitsSrc, 4) + TEST_FIELD_OFFSET(EMRSETDIBITSTODEVICE, cbBitsSrc, 60) + TEST_FIELD_SIZE (EMRSETDIBITSTODEVICE, iUsageSrc, 4) + TEST_FIELD_ALIGN (EMRSETDIBITSTODEVICE, iUsageSrc, 4) + TEST_FIELD_OFFSET(EMRSETDIBITSTODEVICE, iUsageSrc, 64) + TEST_FIELD_SIZE (EMRSETDIBITSTODEVICE, iStartScan, 4) + TEST_FIELD_ALIGN (EMRSETDIBITSTODEVICE, iStartScan, 4) + TEST_FIELD_OFFSET(EMRSETDIBITSTODEVICE, iStartScan, 68) + TEST_FIELD_SIZE (EMRSETDIBITSTODEVICE, cScans, 4) + TEST_FIELD_ALIGN (EMRSETDIBITSTODEVICE, cScans, 4) + TEST_FIELD_OFFSET(EMRSETDIBITSTODEVICE, cScans, 72) } static void test_pack_EMRSETICMMODE(void) { /* EMRSETICMMODE (pack 4) */ - TEST_TYPE(EMRSETICMMODE, 12, 4); - TEST_FIELD(EMRSETICMMODE, emr, 0, 8, 4); - TEST_FIELD(EMRSETICMMODE, iMode, 8, 4, 4); + TEST_TYPE_SIZE (EMRSETICMMODE, 12) + TEST_TYPE_ALIGN (EMRSETICMMODE, 4) + TEST_FIELD_SIZE (EMRSETICMMODE, emr, 8) + TEST_FIELD_ALIGN (EMRSETICMMODE, emr, 4) + TEST_FIELD_OFFSET(EMRSETICMMODE, emr, 0) + TEST_FIELD_SIZE (EMRSETICMMODE, iMode, 4) + TEST_FIELD_ALIGN (EMRSETICMMODE, iMode, 4) + TEST_FIELD_OFFSET(EMRSETICMMODE, iMode, 8) } static void test_pack_EMRSETLAYOUT(void) { /* EMRSETLAYOUT (pack 4) */ - TEST_TYPE(EMRSETLAYOUT, 12, 4); - TEST_FIELD(EMRSETLAYOUT, emr, 0, 8, 4); - TEST_FIELD(EMRSETLAYOUT, iMode, 8, 4, 4); + TEST_TYPE_SIZE (EMRSETLAYOUT, 12) + TEST_TYPE_ALIGN (EMRSETLAYOUT, 4) + TEST_FIELD_SIZE (EMRSETLAYOUT, emr, 8) + TEST_FIELD_ALIGN (EMRSETLAYOUT, emr, 4) + TEST_FIELD_OFFSET(EMRSETLAYOUT, emr, 0) + TEST_FIELD_SIZE (EMRSETLAYOUT, iMode, 4) + TEST_FIELD_ALIGN (EMRSETLAYOUT, iMode, 4) + TEST_FIELD_OFFSET(EMRSETLAYOUT, iMode, 8) } static void test_pack_EMRSETMAPMODE(void) { /* EMRSETMAPMODE (pack 4) */ - TEST_TYPE(EMRSETMAPMODE, 12, 4); - TEST_FIELD(EMRSETMAPMODE, emr, 0, 8, 4); - TEST_FIELD(EMRSETMAPMODE, iMode, 8, 4, 4); + TEST_TYPE_SIZE (EMRSETMAPMODE, 12) + TEST_TYPE_ALIGN (EMRSETMAPMODE, 4) + TEST_FIELD_SIZE (EMRSETMAPMODE, emr, 8) + TEST_FIELD_ALIGN (EMRSETMAPMODE, emr, 4) + TEST_FIELD_OFFSET(EMRSETMAPMODE, emr, 0) + TEST_FIELD_SIZE (EMRSETMAPMODE, iMode, 4) + TEST_FIELD_ALIGN (EMRSETMAPMODE, iMode, 4) + TEST_FIELD_OFFSET(EMRSETMAPMODE, iMode, 8) } static void test_pack_EMRSETMAPPERFLAGS(void) { /* EMRSETMAPPERFLAGS (pack 4) */ - TEST_TYPE(EMRSETMAPPERFLAGS, 12, 4); - TEST_FIELD(EMRSETMAPPERFLAGS, emr, 0, 8, 4); - TEST_FIELD(EMRSETMAPPERFLAGS, dwFlags, 8, 4, 4); + TEST_TYPE_SIZE (EMRSETMAPPERFLAGS, 12) + TEST_TYPE_ALIGN (EMRSETMAPPERFLAGS, 4) + TEST_FIELD_SIZE (EMRSETMAPPERFLAGS, emr, 8) + TEST_FIELD_ALIGN (EMRSETMAPPERFLAGS, emr, 4) + TEST_FIELD_OFFSET(EMRSETMAPPERFLAGS, emr, 0) + TEST_FIELD_SIZE (EMRSETMAPPERFLAGS, dwFlags, 4) + TEST_FIELD_ALIGN (EMRSETMAPPERFLAGS, dwFlags, 4) + TEST_FIELD_OFFSET(EMRSETMAPPERFLAGS, dwFlags, 8) } static void test_pack_EMRSETMETARGN(void) { /* EMRSETMETARGN (pack 4) */ - TEST_TYPE(EMRSETMETARGN, 8, 4); - TEST_FIELD(EMRSETMETARGN, emr, 0, 8, 4); + TEST_TYPE_SIZE (EMRSETMETARGN, 8) + TEST_TYPE_ALIGN (EMRSETMETARGN, 4) + TEST_FIELD_SIZE (EMRSETMETARGN, emr, 8) + TEST_FIELD_ALIGN (EMRSETMETARGN, emr, 4) + TEST_FIELD_OFFSET(EMRSETMETARGN, emr, 0) } static void test_pack_EMRSETMITERLIMIT(void) { /* EMRSETMITERLIMIT (pack 4) */ - TEST_TYPE(EMRSETMITERLIMIT, 12, 4); - TEST_FIELD(EMRSETMITERLIMIT, emr, 0, 8, 4); - TEST_FIELD(EMRSETMITERLIMIT, eMiterLimit, 8, 4, 4); + TEST_TYPE_SIZE (EMRSETMITERLIMIT, 12) + TEST_TYPE_ALIGN (EMRSETMITERLIMIT, 4) + TEST_FIELD_SIZE (EMRSETMITERLIMIT, emr, 8) + TEST_FIELD_ALIGN (EMRSETMITERLIMIT, emr, 4) + TEST_FIELD_OFFSET(EMRSETMITERLIMIT, emr, 0) + TEST_FIELD_SIZE (EMRSETMITERLIMIT, eMiterLimit, 4) + TEST_FIELD_ALIGN (EMRSETMITERLIMIT, eMiterLimit, 4) + TEST_FIELD_OFFSET(EMRSETMITERLIMIT, eMiterLimit, 8) } static void test_pack_EMRSETPIXELV(void) { /* EMRSETPIXELV (pack 4) */ - TEST_TYPE(EMRSETPIXELV, 20, 4); - TEST_FIELD(EMRSETPIXELV, emr, 0, 8, 4); - TEST_FIELD(EMRSETPIXELV, ptlPixel, 8, 8, 4); - TEST_FIELD(EMRSETPIXELV, crColor, 16, 4, 4); + TEST_TYPE_SIZE (EMRSETPIXELV, 20) + TEST_TYPE_ALIGN (EMRSETPIXELV, 4) + TEST_FIELD_SIZE (EMRSETPIXELV, emr, 8) + TEST_FIELD_ALIGN (EMRSETPIXELV, emr, 4) + TEST_FIELD_OFFSET(EMRSETPIXELV, emr, 0) + TEST_FIELD_SIZE (EMRSETPIXELV, ptlPixel, 8) + TEST_FIELD_ALIGN (EMRSETPIXELV, ptlPixel, 4) + TEST_FIELD_OFFSET(EMRSETPIXELV, ptlPixel, 8) + TEST_FIELD_SIZE (EMRSETPIXELV, crColor, 4) + TEST_FIELD_ALIGN (EMRSETPIXELV, crColor, 4) + TEST_FIELD_OFFSET(EMRSETPIXELV, crColor, 16) } static void test_pack_EMRSETPOLYFILLMODE(void) { /* EMRSETPOLYFILLMODE (pack 4) */ - TEST_TYPE(EMRSETPOLYFILLMODE, 12, 4); - TEST_FIELD(EMRSETPOLYFILLMODE, emr, 0, 8, 4); - TEST_FIELD(EMRSETPOLYFILLMODE, iMode, 8, 4, 4); + TEST_TYPE_SIZE (EMRSETPOLYFILLMODE, 12) + TEST_TYPE_ALIGN (EMRSETPOLYFILLMODE, 4) + TEST_FIELD_SIZE (EMRSETPOLYFILLMODE, emr, 8) + TEST_FIELD_ALIGN (EMRSETPOLYFILLMODE, emr, 4) + TEST_FIELD_OFFSET(EMRSETPOLYFILLMODE, emr, 0) + TEST_FIELD_SIZE (EMRSETPOLYFILLMODE, iMode, 4) + TEST_FIELD_ALIGN (EMRSETPOLYFILLMODE, iMode, 4) + TEST_FIELD_OFFSET(EMRSETPOLYFILLMODE, iMode, 8) } static void test_pack_EMRSETROP2(void) { /* EMRSETROP2 (pack 4) */ - TEST_TYPE(EMRSETROP2, 12, 4); - TEST_FIELD(EMRSETROP2, emr, 0, 8, 4); - TEST_FIELD(EMRSETROP2, iMode, 8, 4, 4); + TEST_TYPE_SIZE (EMRSETROP2, 12) + TEST_TYPE_ALIGN (EMRSETROP2, 4) + TEST_FIELD_SIZE (EMRSETROP2, emr, 8) + TEST_FIELD_ALIGN (EMRSETROP2, emr, 4) + TEST_FIELD_OFFSET(EMRSETROP2, emr, 0) + TEST_FIELD_SIZE (EMRSETROP2, iMode, 4) + TEST_FIELD_ALIGN (EMRSETROP2, iMode, 4) + TEST_FIELD_OFFSET(EMRSETROP2, iMode, 8) } static void test_pack_EMRSETSTRETCHBLTMODE(void) { /* EMRSETSTRETCHBLTMODE (pack 4) */ - TEST_TYPE(EMRSETSTRETCHBLTMODE, 12, 4); - TEST_FIELD(EMRSETSTRETCHBLTMODE, emr, 0, 8, 4); - TEST_FIELD(EMRSETSTRETCHBLTMODE, iMode, 8, 4, 4); + TEST_TYPE_SIZE (EMRSETSTRETCHBLTMODE, 12) + TEST_TYPE_ALIGN (EMRSETSTRETCHBLTMODE, 4) + TEST_FIELD_SIZE (EMRSETSTRETCHBLTMODE, emr, 8) + TEST_FIELD_ALIGN (EMRSETSTRETCHBLTMODE, emr, 4) + TEST_FIELD_OFFSET(EMRSETSTRETCHBLTMODE, emr, 0) + TEST_FIELD_SIZE (EMRSETSTRETCHBLTMODE, iMode, 4) + TEST_FIELD_ALIGN (EMRSETSTRETCHBLTMODE, iMode, 4) + TEST_FIELD_OFFSET(EMRSETSTRETCHBLTMODE, iMode, 8) } static void test_pack_EMRSETTEXTALIGN(void) { /* EMRSETTEXTALIGN (pack 4) */ - TEST_TYPE(EMRSETTEXTALIGN, 12, 4); - TEST_FIELD(EMRSETTEXTALIGN, emr, 0, 8, 4); - TEST_FIELD(EMRSETTEXTALIGN, iMode, 8, 4, 4); + TEST_TYPE_SIZE (EMRSETTEXTALIGN, 12) + TEST_TYPE_ALIGN (EMRSETTEXTALIGN, 4) + TEST_FIELD_SIZE (EMRSETTEXTALIGN, emr, 8) + TEST_FIELD_ALIGN (EMRSETTEXTALIGN, emr, 4) + TEST_FIELD_OFFSET(EMRSETTEXTALIGN, emr, 0) + TEST_FIELD_SIZE (EMRSETTEXTALIGN, iMode, 4) + TEST_FIELD_ALIGN (EMRSETTEXTALIGN, iMode, 4) + TEST_FIELD_OFFSET(EMRSETTEXTALIGN, iMode, 8) } static void test_pack_EMRSETTEXTCOLOR(void) { /* EMRSETTEXTCOLOR (pack 4) */ - TEST_TYPE(EMRSETTEXTCOLOR, 12, 4); - TEST_FIELD(EMRSETTEXTCOLOR, emr, 0, 8, 4); - TEST_FIELD(EMRSETTEXTCOLOR, crColor, 8, 4, 4); + TEST_TYPE_SIZE (EMRSETTEXTCOLOR, 12) + TEST_TYPE_ALIGN (EMRSETTEXTCOLOR, 4) + TEST_FIELD_SIZE (EMRSETTEXTCOLOR, emr, 8) + TEST_FIELD_ALIGN (EMRSETTEXTCOLOR, emr, 4) + TEST_FIELD_OFFSET(EMRSETTEXTCOLOR, emr, 0) + TEST_FIELD_SIZE (EMRSETTEXTCOLOR, crColor, 4) + TEST_FIELD_ALIGN (EMRSETTEXTCOLOR, crColor, 4) + TEST_FIELD_OFFSET(EMRSETTEXTCOLOR, crColor, 8) } static void test_pack_EMRSETVIEWPORTEXTEX(void) { /* EMRSETVIEWPORTEXTEX (pack 4) */ - TEST_TYPE(EMRSETVIEWPORTEXTEX, 16, 4); - TEST_FIELD(EMRSETVIEWPORTEXTEX, emr, 0, 8, 4); - TEST_FIELD(EMRSETVIEWPORTEXTEX, szlExtent, 8, 8, 4); + TEST_TYPE_SIZE (EMRSETVIEWPORTEXTEX, 16) + TEST_TYPE_ALIGN (EMRSETVIEWPORTEXTEX, 4) + TEST_FIELD_SIZE (EMRSETVIEWPORTEXTEX, emr, 8) + TEST_FIELD_ALIGN (EMRSETVIEWPORTEXTEX, emr, 4) + TEST_FIELD_OFFSET(EMRSETVIEWPORTEXTEX, emr, 0) + TEST_FIELD_SIZE (EMRSETVIEWPORTEXTEX, szlExtent, 8) + TEST_FIELD_ALIGN (EMRSETVIEWPORTEXTEX, szlExtent, 4) + TEST_FIELD_OFFSET(EMRSETVIEWPORTEXTEX, szlExtent, 8) } static void test_pack_EMRSETVIEWPORTORGEX(void) { /* EMRSETVIEWPORTORGEX (pack 4) */ - TEST_TYPE(EMRSETVIEWPORTORGEX, 16, 4); - TEST_FIELD(EMRSETVIEWPORTORGEX, emr, 0, 8, 4); - TEST_FIELD(EMRSETVIEWPORTORGEX, ptlOrigin, 8, 8, 4); + TEST_TYPE_SIZE (EMRSETVIEWPORTORGEX, 16) + TEST_TYPE_ALIGN (EMRSETVIEWPORTORGEX, 4) + TEST_FIELD_SIZE (EMRSETVIEWPORTORGEX, emr, 8) + TEST_FIELD_ALIGN (EMRSETVIEWPORTORGEX, emr, 4) + TEST_FIELD_OFFSET(EMRSETVIEWPORTORGEX, emr, 0) + TEST_FIELD_SIZE (EMRSETVIEWPORTORGEX, ptlOrigin, 8) + TEST_FIELD_ALIGN (EMRSETVIEWPORTORGEX, ptlOrigin, 4) + TEST_FIELD_OFFSET(EMRSETVIEWPORTORGEX, ptlOrigin, 8) } static void test_pack_EMRSETWINDOWEXTEX(void) { /* EMRSETWINDOWEXTEX (pack 4) */ - TEST_TYPE(EMRSETWINDOWEXTEX, 16, 4); - TEST_FIELD(EMRSETWINDOWEXTEX, emr, 0, 8, 4); - TEST_FIELD(EMRSETWINDOWEXTEX, szlExtent, 8, 8, 4); + TEST_TYPE_SIZE (EMRSETWINDOWEXTEX, 16) + TEST_TYPE_ALIGN (EMRSETWINDOWEXTEX, 4) + TEST_FIELD_SIZE (EMRSETWINDOWEXTEX, emr, 8) + TEST_FIELD_ALIGN (EMRSETWINDOWEXTEX, emr, 4) + TEST_FIELD_OFFSET(EMRSETWINDOWEXTEX, emr, 0) + TEST_FIELD_SIZE (EMRSETWINDOWEXTEX, szlExtent, 8) + TEST_FIELD_ALIGN (EMRSETWINDOWEXTEX, szlExtent, 4) + TEST_FIELD_OFFSET(EMRSETWINDOWEXTEX, szlExtent, 8) } static void test_pack_EMRSETWINDOWORGEX(void) { /* EMRSETWINDOWORGEX (pack 4) */ - TEST_TYPE(EMRSETWINDOWORGEX, 16, 4); - TEST_FIELD(EMRSETWINDOWORGEX, emr, 0, 8, 4); - TEST_FIELD(EMRSETWINDOWORGEX, ptlOrigin, 8, 8, 4); + TEST_TYPE_SIZE (EMRSETWINDOWORGEX, 16) + TEST_TYPE_ALIGN (EMRSETWINDOWORGEX, 4) + TEST_FIELD_SIZE (EMRSETWINDOWORGEX, emr, 8) + TEST_FIELD_ALIGN (EMRSETWINDOWORGEX, emr, 4) + TEST_FIELD_OFFSET(EMRSETWINDOWORGEX, emr, 0) + TEST_FIELD_SIZE (EMRSETWINDOWORGEX, ptlOrigin, 8) + TEST_FIELD_ALIGN (EMRSETWINDOWORGEX, ptlOrigin, 4) + TEST_FIELD_OFFSET(EMRSETWINDOWORGEX, ptlOrigin, 8) } static void test_pack_EMRSETWORLDTRANSFORM(void) { /* EMRSETWORLDTRANSFORM (pack 4) */ - TEST_TYPE(EMRSETWORLDTRANSFORM, 32, 4); - TEST_FIELD(EMRSETWORLDTRANSFORM, emr, 0, 8, 4); - TEST_FIELD(EMRSETWORLDTRANSFORM, xform, 8, 24, 4); + TEST_TYPE_SIZE (EMRSETWORLDTRANSFORM, 32) + TEST_TYPE_ALIGN (EMRSETWORLDTRANSFORM, 4) + TEST_FIELD_SIZE (EMRSETWORLDTRANSFORM, emr, 8) + TEST_FIELD_ALIGN (EMRSETWORLDTRANSFORM, emr, 4) + TEST_FIELD_OFFSET(EMRSETWORLDTRANSFORM, emr, 0) + TEST_FIELD_SIZE (EMRSETWORLDTRANSFORM, xform, 24) + TEST_FIELD_ALIGN (EMRSETWORLDTRANSFORM, xform, 4) + TEST_FIELD_OFFSET(EMRSETWORLDTRANSFORM, xform, 8) } static void test_pack_EMRSTRETCHBLT(void) { /* EMRSTRETCHBLT (pack 4) */ - TEST_TYPE(EMRSTRETCHBLT, 108, 4); - TEST_FIELD(EMRSTRETCHBLT, emr, 0, 8, 4); - TEST_FIELD(EMRSTRETCHBLT, rclBounds, 8, 16, 4); - TEST_FIELD(EMRSTRETCHBLT, xDest, 24, 4, 4); - TEST_FIELD(EMRSTRETCHBLT, yDest, 28, 4, 4); - TEST_FIELD(EMRSTRETCHBLT, cxDest, 32, 4, 4); - TEST_FIELD(EMRSTRETCHBLT, cyDest, 36, 4, 4); - TEST_FIELD(EMRSTRETCHBLT, dwRop, 40, 4, 4); - TEST_FIELD(EMRSTRETCHBLT, xSrc, 44, 4, 4); - TEST_FIELD(EMRSTRETCHBLT, ySrc, 48, 4, 4); - TEST_FIELD(EMRSTRETCHBLT, xformSrc, 52, 24, 4); - TEST_FIELD(EMRSTRETCHBLT, crBkColorSrc, 76, 4, 4); - TEST_FIELD(EMRSTRETCHBLT, iUsageSrc, 80, 4, 4); - TEST_FIELD(EMRSTRETCHBLT, offBmiSrc, 84, 4, 4); - TEST_FIELD(EMRSTRETCHBLT, cbBmiSrc, 88, 4, 4); - TEST_FIELD(EMRSTRETCHBLT, offBitsSrc, 92, 4, 4); - TEST_FIELD(EMRSTRETCHBLT, cbBitsSrc, 96, 4, 4); - TEST_FIELD(EMRSTRETCHBLT, cxSrc, 100, 4, 4); - TEST_FIELD(EMRSTRETCHBLT, cySrc, 104, 4, 4); + TEST_TYPE_SIZE (EMRSTRETCHBLT, 108) + TEST_TYPE_ALIGN (EMRSTRETCHBLT, 4) + TEST_FIELD_SIZE (EMRSTRETCHBLT, emr, 8) + TEST_FIELD_ALIGN (EMRSTRETCHBLT, emr, 4) + TEST_FIELD_OFFSET(EMRSTRETCHBLT, emr, 0) + TEST_FIELD_SIZE (EMRSTRETCHBLT, rclBounds, 16) + TEST_FIELD_ALIGN (EMRSTRETCHBLT, rclBounds, 4) + TEST_FIELD_OFFSET(EMRSTRETCHBLT, rclBounds, 8) + TEST_FIELD_SIZE (EMRSTRETCHBLT, xDest, 4) + TEST_FIELD_ALIGN (EMRSTRETCHBLT, xDest, 4) + TEST_FIELD_OFFSET(EMRSTRETCHBLT, xDest, 24) + TEST_FIELD_SIZE (EMRSTRETCHBLT, yDest, 4) + TEST_FIELD_ALIGN (EMRSTRETCHBLT, yDest, 4) + TEST_FIELD_OFFSET(EMRSTRETCHBLT, yDest, 28) + TEST_FIELD_SIZE (EMRSTRETCHBLT, cxDest, 4) + TEST_FIELD_ALIGN (EMRSTRETCHBLT, cxDest, 4) + TEST_FIELD_OFFSET(EMRSTRETCHBLT, cxDest, 32) + TEST_FIELD_SIZE (EMRSTRETCHBLT, cyDest, 4) + TEST_FIELD_ALIGN (EMRSTRETCHBLT, cyDest, 4) + TEST_FIELD_OFFSET(EMRSTRETCHBLT, cyDest, 36) + TEST_FIELD_SIZE (EMRSTRETCHBLT, dwRop, 4) + TEST_FIELD_ALIGN (EMRSTRETCHBLT, dwRop, 4) + TEST_FIELD_OFFSET(EMRSTRETCHBLT, dwRop, 40) + TEST_FIELD_SIZE (EMRSTRETCHBLT, xSrc, 4) + TEST_FIELD_ALIGN (EMRSTRETCHBLT, xSrc, 4) + TEST_FIELD_OFFSET(EMRSTRETCHBLT, xSrc, 44) + TEST_FIELD_SIZE (EMRSTRETCHBLT, ySrc, 4) + TEST_FIELD_ALIGN (EMRSTRETCHBLT, ySrc, 4) + TEST_FIELD_OFFSET(EMRSTRETCHBLT, ySrc, 48) + TEST_FIELD_SIZE (EMRSTRETCHBLT, xformSrc, 24) + TEST_FIELD_ALIGN (EMRSTRETCHBLT, xformSrc, 4) + TEST_FIELD_OFFSET(EMRSTRETCHBLT, xformSrc, 52) + TEST_FIELD_SIZE (EMRSTRETCHBLT, crBkColorSrc, 4) + TEST_FIELD_ALIGN (EMRSTRETCHBLT, crBkColorSrc, 4) + TEST_FIELD_OFFSET(EMRSTRETCHBLT, crBkColorSrc, 76) + TEST_FIELD_SIZE (EMRSTRETCHBLT, iUsageSrc, 4) + TEST_FIELD_ALIGN (EMRSTRETCHBLT, iUsageSrc, 4) + TEST_FIELD_OFFSET(EMRSTRETCHBLT, iUsageSrc, 80) + TEST_FIELD_SIZE (EMRSTRETCHBLT, offBmiSrc, 4) + TEST_FIELD_ALIGN (EMRSTRETCHBLT, offBmiSrc, 4) + TEST_FIELD_OFFSET(EMRSTRETCHBLT, offBmiSrc, 84) + TEST_FIELD_SIZE (EMRSTRETCHBLT, cbBmiSrc, 4) + TEST_FIELD_ALIGN (EMRSTRETCHBLT, cbBmiSrc, 4) + TEST_FIELD_OFFSET(EMRSTRETCHBLT, cbBmiSrc, 88) + TEST_FIELD_SIZE (EMRSTRETCHBLT, offBitsSrc, 4) + TEST_FIELD_ALIGN (EMRSTRETCHBLT, offBitsSrc, 4) + TEST_FIELD_OFFSET(EMRSTRETCHBLT, offBitsSrc, 92) + TEST_FIELD_SIZE (EMRSTRETCHBLT, cbBitsSrc, 4) + TEST_FIELD_ALIGN (EMRSTRETCHBLT, cbBitsSrc, 4) + TEST_FIELD_OFFSET(EMRSTRETCHBLT, cbBitsSrc, 96) + TEST_FIELD_SIZE (EMRSTRETCHBLT, cxSrc, 4) + TEST_FIELD_ALIGN (EMRSTRETCHBLT, cxSrc, 4) + TEST_FIELD_OFFSET(EMRSTRETCHBLT, cxSrc, 100) + TEST_FIELD_SIZE (EMRSTRETCHBLT, cySrc, 4) + TEST_FIELD_ALIGN (EMRSTRETCHBLT, cySrc, 4) + TEST_FIELD_OFFSET(EMRSTRETCHBLT, cySrc, 104) } static void test_pack_EMRSTRETCHDIBITS(void) { /* EMRSTRETCHDIBITS (pack 4) */ - TEST_TYPE(EMRSTRETCHDIBITS, 80, 4); - TEST_FIELD(EMRSTRETCHDIBITS, emr, 0, 8, 4); - TEST_FIELD(EMRSTRETCHDIBITS, rclBounds, 8, 16, 4); - TEST_FIELD(EMRSTRETCHDIBITS, xDest, 24, 4, 4); - TEST_FIELD(EMRSTRETCHDIBITS, yDest, 28, 4, 4); - TEST_FIELD(EMRSTRETCHDIBITS, xSrc, 32, 4, 4); - TEST_FIELD(EMRSTRETCHDIBITS, ySrc, 36, 4, 4); - TEST_FIELD(EMRSTRETCHDIBITS, cxSrc, 40, 4, 4); - TEST_FIELD(EMRSTRETCHDIBITS, cySrc, 44, 4, 4); - TEST_FIELD(EMRSTRETCHDIBITS, offBmiSrc, 48, 4, 4); - TEST_FIELD(EMRSTRETCHDIBITS, cbBmiSrc, 52, 4, 4); - TEST_FIELD(EMRSTRETCHDIBITS, offBitsSrc, 56, 4, 4); - TEST_FIELD(EMRSTRETCHDIBITS, cbBitsSrc, 60, 4, 4); - TEST_FIELD(EMRSTRETCHDIBITS, iUsageSrc, 64, 4, 4); - TEST_FIELD(EMRSTRETCHDIBITS, dwRop, 68, 4, 4); - TEST_FIELD(EMRSTRETCHDIBITS, cxDest, 72, 4, 4); - TEST_FIELD(EMRSTRETCHDIBITS, cyDest, 76, 4, 4); + TEST_TYPE_SIZE (EMRSTRETCHDIBITS, 80) + TEST_TYPE_ALIGN (EMRSTRETCHDIBITS, 4) + TEST_FIELD_SIZE (EMRSTRETCHDIBITS, emr, 8) + TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, emr, 4) + TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, emr, 0) + TEST_FIELD_SIZE (EMRSTRETCHDIBITS, rclBounds, 16) + TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, rclBounds, 4) + TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, rclBounds, 8) + TEST_FIELD_SIZE (EMRSTRETCHDIBITS, xDest, 4) + TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, xDest, 4) + TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, xDest, 24) + TEST_FIELD_SIZE (EMRSTRETCHDIBITS, yDest, 4) + TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, yDest, 4) + TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, yDest, 28) + TEST_FIELD_SIZE (EMRSTRETCHDIBITS, xSrc, 4) + TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, xSrc, 4) + TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, xSrc, 32) + TEST_FIELD_SIZE (EMRSTRETCHDIBITS, ySrc, 4) + TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, ySrc, 4) + TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, ySrc, 36) + TEST_FIELD_SIZE (EMRSTRETCHDIBITS, cxSrc, 4) + TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, cxSrc, 4) + TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, cxSrc, 40) + TEST_FIELD_SIZE (EMRSTRETCHDIBITS, cySrc, 4) + TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, cySrc, 4) + TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, cySrc, 44) + TEST_FIELD_SIZE (EMRSTRETCHDIBITS, offBmiSrc, 4) + TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, offBmiSrc, 4) + TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, offBmiSrc, 48) + TEST_FIELD_SIZE (EMRSTRETCHDIBITS, cbBmiSrc, 4) + TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, cbBmiSrc, 4) + TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, cbBmiSrc, 52) + TEST_FIELD_SIZE (EMRSTRETCHDIBITS, offBitsSrc, 4) + TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, offBitsSrc, 4) + TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, offBitsSrc, 56) + TEST_FIELD_SIZE (EMRSTRETCHDIBITS, cbBitsSrc, 4) + TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, cbBitsSrc, 4) + TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, cbBitsSrc, 60) + TEST_FIELD_SIZE (EMRSTRETCHDIBITS, iUsageSrc, 4) + TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, iUsageSrc, 4) + TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, iUsageSrc, 64) + TEST_FIELD_SIZE (EMRSTRETCHDIBITS, dwRop, 4) + TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, dwRop, 4) + TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, dwRop, 68) + TEST_FIELD_SIZE (EMRSTRETCHDIBITS, cxDest, 4) + TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, cxDest, 4) + TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, cxDest, 72) + TEST_FIELD_SIZE (EMRSTRETCHDIBITS, cyDest, 4) + TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, cyDest, 4) + TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, cyDest, 76) } static void test_pack_EMRSTROKEANDFILLPATH(void) { /* EMRSTROKEANDFILLPATH (pack 4) */ - TEST_TYPE(EMRSTROKEANDFILLPATH, 24, 4); - TEST_FIELD(EMRSTROKEANDFILLPATH, emr, 0, 8, 4); - TEST_FIELD(EMRSTROKEANDFILLPATH, rclBounds, 8, 16, 4); + TEST_TYPE_SIZE (EMRSTROKEANDFILLPATH, 24) + TEST_TYPE_ALIGN (EMRSTROKEANDFILLPATH, 4) + TEST_FIELD_SIZE (EMRSTROKEANDFILLPATH, emr, 8) + TEST_FIELD_ALIGN (EMRSTROKEANDFILLPATH, emr, 4) + TEST_FIELD_OFFSET(EMRSTROKEANDFILLPATH, emr, 0) + TEST_FIELD_SIZE (EMRSTROKEANDFILLPATH, rclBounds, 16) + TEST_FIELD_ALIGN (EMRSTROKEANDFILLPATH, rclBounds, 4) + TEST_FIELD_OFFSET(EMRSTROKEANDFILLPATH, rclBounds, 8) } static void test_pack_EMRSTROKEPATH(void) { /* EMRSTROKEPATH (pack 4) */ - TEST_TYPE(EMRSTROKEPATH, 24, 4); - TEST_FIELD(EMRSTROKEPATH, emr, 0, 8, 4); - TEST_FIELD(EMRSTROKEPATH, rclBounds, 8, 16, 4); + TEST_TYPE_SIZE (EMRSTROKEPATH, 24) + TEST_TYPE_ALIGN (EMRSTROKEPATH, 4) + TEST_FIELD_SIZE (EMRSTROKEPATH, emr, 8) + TEST_FIELD_ALIGN (EMRSTROKEPATH, emr, 4) + TEST_FIELD_OFFSET(EMRSTROKEPATH, emr, 0) + TEST_FIELD_SIZE (EMRSTROKEPATH, rclBounds, 16) + TEST_FIELD_ALIGN (EMRSTROKEPATH, rclBounds, 4) + TEST_FIELD_OFFSET(EMRSTROKEPATH, rclBounds, 8) } static void test_pack_EMRTEXT(void) { /* EMRTEXT (pack 4) */ - TEST_TYPE(EMRTEXT, 40, 4); - TEST_FIELD(EMRTEXT, ptlReference, 0, 8, 4); - TEST_FIELD(EMRTEXT, nChars, 8, 4, 4); - TEST_FIELD(EMRTEXT, offString, 12, 4, 4); - TEST_FIELD(EMRTEXT, fOptions, 16, 4, 4); - TEST_FIELD(EMRTEXT, rcl, 20, 16, 4); - TEST_FIELD(EMRTEXT, offDx, 36, 4, 4); + TEST_TYPE_SIZE (EMRTEXT, 40) + TEST_TYPE_ALIGN (EMRTEXT, 4) + TEST_FIELD_SIZE (EMRTEXT, ptlReference, 8) + TEST_FIELD_ALIGN (EMRTEXT, ptlReference, 4) + TEST_FIELD_OFFSET(EMRTEXT, ptlReference, 0) + TEST_FIELD_SIZE (EMRTEXT, nChars, 4) + TEST_FIELD_ALIGN (EMRTEXT, nChars, 4) + TEST_FIELD_OFFSET(EMRTEXT, nChars, 8) + TEST_FIELD_SIZE (EMRTEXT, offString, 4) + TEST_FIELD_ALIGN (EMRTEXT, offString, 4) + TEST_FIELD_OFFSET(EMRTEXT, offString, 12) + TEST_FIELD_SIZE (EMRTEXT, fOptions, 4) + TEST_FIELD_ALIGN (EMRTEXT, fOptions, 4) + TEST_FIELD_OFFSET(EMRTEXT, fOptions, 16) + TEST_FIELD_SIZE (EMRTEXT, rcl, 16) + TEST_FIELD_ALIGN (EMRTEXT, rcl, 4) + TEST_FIELD_OFFSET(EMRTEXT, rcl, 20) + TEST_FIELD_SIZE (EMRTEXT, offDx, 4) + TEST_FIELD_ALIGN (EMRTEXT, offDx, 4) + TEST_FIELD_OFFSET(EMRTEXT, offDx, 36) } static void test_pack_EMRWIDENPATH(void) { /* EMRWIDENPATH (pack 4) */ - TEST_TYPE(EMRWIDENPATH, 8, 4); - TEST_FIELD(EMRWIDENPATH, emr, 0, 8, 4); + TEST_TYPE_SIZE (EMRWIDENPATH, 8) + TEST_TYPE_ALIGN (EMRWIDENPATH, 4) + TEST_FIELD_SIZE (EMRWIDENPATH, emr, 8) + TEST_FIELD_ALIGN (EMRWIDENPATH, emr, 4) + TEST_FIELD_OFFSET(EMRWIDENPATH, emr, 0) } static void test_pack_ENHMETAHEADER(void) { /* ENHMETAHEADER (pack 4) */ - TEST_TYPE(ENHMETAHEADER, 108, 4); - TEST_FIELD(ENHMETAHEADER, iType, 0, 4, 4); - TEST_FIELD(ENHMETAHEADER, nSize, 4, 4, 4); - TEST_FIELD(ENHMETAHEADER, rclBounds, 8, 16, 4); - TEST_FIELD(ENHMETAHEADER, rclFrame, 24, 16, 4); - TEST_FIELD(ENHMETAHEADER, dSignature, 40, 4, 4); - TEST_FIELD(ENHMETAHEADER, nVersion, 44, 4, 4); - TEST_FIELD(ENHMETAHEADER, nBytes, 48, 4, 4); - TEST_FIELD(ENHMETAHEADER, nRecords, 52, 4, 4); - TEST_FIELD(ENHMETAHEADER, nHandles, 56, 2, 2); - TEST_FIELD(ENHMETAHEADER, sReserved, 58, 2, 2); - TEST_FIELD(ENHMETAHEADER, nDescription, 60, 4, 4); - TEST_FIELD(ENHMETAHEADER, offDescription, 64, 4, 4); - TEST_FIELD(ENHMETAHEADER, nPalEntries, 68, 4, 4); - TEST_FIELD(ENHMETAHEADER, szlDevice, 72, 8, 4); - TEST_FIELD(ENHMETAHEADER, szlMillimeters, 80, 8, 4); - TEST_FIELD(ENHMETAHEADER, cbPixelFormat, 88, 4, 4); - TEST_FIELD(ENHMETAHEADER, offPixelFormat, 92, 4, 4); - TEST_FIELD(ENHMETAHEADER, bOpenGL, 96, 4, 4); - TEST_FIELD(ENHMETAHEADER, szlMicrometers, 100, 8, 4); + TEST_TYPE_SIZE (ENHMETAHEADER, 108) + TEST_TYPE_ALIGN (ENHMETAHEADER, 4) + TEST_FIELD_SIZE (ENHMETAHEADER, iType, 4) + TEST_FIELD_ALIGN (ENHMETAHEADER, iType, 4) + TEST_FIELD_OFFSET(ENHMETAHEADER, iType, 0) + TEST_FIELD_SIZE (ENHMETAHEADER, nSize, 4) + TEST_FIELD_ALIGN (ENHMETAHEADER, nSize, 4) + TEST_FIELD_OFFSET(ENHMETAHEADER, nSize, 4) + TEST_FIELD_SIZE (ENHMETAHEADER, rclBounds, 16) + TEST_FIELD_ALIGN (ENHMETAHEADER, rclBounds, 4) + TEST_FIELD_OFFSET(ENHMETAHEADER, rclBounds, 8) + TEST_FIELD_SIZE (ENHMETAHEADER, rclFrame, 16) + TEST_FIELD_ALIGN (ENHMETAHEADER, rclFrame, 4) + TEST_FIELD_OFFSET(ENHMETAHEADER, rclFrame, 24) + TEST_FIELD_SIZE (ENHMETAHEADER, dSignature, 4) + TEST_FIELD_ALIGN (ENHMETAHEADER, dSignature, 4) + TEST_FIELD_OFFSET(ENHMETAHEADER, dSignature, 40) + TEST_FIELD_SIZE (ENHMETAHEADER, nVersion, 4) + TEST_FIELD_ALIGN (ENHMETAHEADER, nVersion, 4) + TEST_FIELD_OFFSET(ENHMETAHEADER, nVersion, 44) + TEST_FIELD_SIZE (ENHMETAHEADER, nBytes, 4) + TEST_FIELD_ALIGN (ENHMETAHEADER, nBytes, 4) + TEST_FIELD_OFFSET(ENHMETAHEADER, nBytes, 48) + TEST_FIELD_SIZE (ENHMETAHEADER, nRecords, 4) + TEST_FIELD_ALIGN (ENHMETAHEADER, nRecords, 4) + TEST_FIELD_OFFSET(ENHMETAHEADER, nRecords, 52) + TEST_FIELD_SIZE (ENHMETAHEADER, nHandles, 2) + TEST_FIELD_ALIGN (ENHMETAHEADER, nHandles, 2) + TEST_FIELD_OFFSET(ENHMETAHEADER, nHandles, 56) + TEST_FIELD_SIZE (ENHMETAHEADER, sReserved, 2) + TEST_FIELD_ALIGN (ENHMETAHEADER, sReserved, 2) + TEST_FIELD_OFFSET(ENHMETAHEADER, sReserved, 58) + TEST_FIELD_SIZE (ENHMETAHEADER, nDescription, 4) + TEST_FIELD_ALIGN (ENHMETAHEADER, nDescription, 4) + TEST_FIELD_OFFSET(ENHMETAHEADER, nDescription, 60) + TEST_FIELD_SIZE (ENHMETAHEADER, offDescription, 4) + TEST_FIELD_ALIGN (ENHMETAHEADER, offDescription, 4) + TEST_FIELD_OFFSET(ENHMETAHEADER, offDescription, 64) + TEST_FIELD_SIZE (ENHMETAHEADER, nPalEntries, 4) + TEST_FIELD_ALIGN (ENHMETAHEADER, nPalEntries, 4) + TEST_FIELD_OFFSET(ENHMETAHEADER, nPalEntries, 68) + TEST_FIELD_SIZE (ENHMETAHEADER, szlDevice, 8) + TEST_FIELD_ALIGN (ENHMETAHEADER, szlDevice, 4) + TEST_FIELD_OFFSET(ENHMETAHEADER, szlDevice, 72) + TEST_FIELD_SIZE (ENHMETAHEADER, szlMillimeters, 8) + TEST_FIELD_ALIGN (ENHMETAHEADER, szlMillimeters, 4) + TEST_FIELD_OFFSET(ENHMETAHEADER, szlMillimeters, 80) + TEST_FIELD_SIZE (ENHMETAHEADER, cbPixelFormat, 4) + TEST_FIELD_ALIGN (ENHMETAHEADER, cbPixelFormat, 4) + TEST_FIELD_OFFSET(ENHMETAHEADER, cbPixelFormat, 88) + TEST_FIELD_SIZE (ENHMETAHEADER, offPixelFormat, 4) + TEST_FIELD_ALIGN (ENHMETAHEADER, offPixelFormat, 4) + TEST_FIELD_OFFSET(ENHMETAHEADER, offPixelFormat, 92) + TEST_FIELD_SIZE (ENHMETAHEADER, bOpenGL, 4) + TEST_FIELD_ALIGN (ENHMETAHEADER, bOpenGL, 4) + TEST_FIELD_OFFSET(ENHMETAHEADER, bOpenGL, 96) + TEST_FIELD_SIZE (ENHMETAHEADER, szlMicrometers, 8) + TEST_FIELD_ALIGN (ENHMETAHEADER, szlMicrometers, 4) + TEST_FIELD_OFFSET(ENHMETAHEADER, szlMicrometers, 100) } static void test_pack_ENHMETARECORD(void) { /* ENHMETARECORD (pack 4) */ - TEST_TYPE(ENHMETARECORD, 12, 4); - TEST_FIELD(ENHMETARECORD, iType, 0, 4, 4); - TEST_FIELD(ENHMETARECORD, nSize, 4, 4, 4); - TEST_FIELD(ENHMETARECORD, dParm, 8, 4, 4); + TEST_TYPE_SIZE (ENHMETARECORD, 12) + TEST_TYPE_ALIGN (ENHMETARECORD, 4) + TEST_FIELD_SIZE (ENHMETARECORD, iType, 4) + TEST_FIELD_ALIGN (ENHMETARECORD, iType, 4) + TEST_FIELD_OFFSET(ENHMETARECORD, iType, 0) + TEST_FIELD_SIZE (ENHMETARECORD, nSize, 4) + TEST_FIELD_ALIGN (ENHMETARECORD, nSize, 4) + TEST_FIELD_OFFSET(ENHMETARECORD, nSize, 4) + TEST_FIELD_SIZE (ENHMETARECORD, dParm, 4) + TEST_FIELD_ALIGN (ENHMETARECORD, dParm, 4) + TEST_FIELD_OFFSET(ENHMETARECORD, dParm, 8) } static void test_pack_ENHMFENUMPROC(void) { /* ENHMFENUMPROC */ - TEST_TYPE(ENHMFENUMPROC, 4, 4); + TEST_TYPE_SIZE (ENHMFENUMPROC, 4) + TEST_TYPE_ALIGN (ENHMFENUMPROC, 4) } static void test_pack_ENUMLOGFONTA(void) { /* ENUMLOGFONTA (pack 4) */ - TEST_TYPE(ENUMLOGFONTA, 156, 4); - TEST_FIELD(ENUMLOGFONTA, elfLogFont, 0, 60, 4); - TEST_FIELD(ENUMLOGFONTA, elfFullName, 60, 64, 1); - TEST_FIELD(ENUMLOGFONTA, elfStyle, 124, 32, 1); + TEST_TYPE_SIZE (ENUMLOGFONTA, 156) + TEST_TYPE_ALIGN (ENUMLOGFONTA, 4) + TEST_FIELD_SIZE (ENUMLOGFONTA, elfLogFont, 60) + TEST_FIELD_ALIGN (ENUMLOGFONTA, elfLogFont, 4) + TEST_FIELD_OFFSET(ENUMLOGFONTA, elfLogFont, 0) + TEST_FIELD_SIZE (ENUMLOGFONTA, elfFullName, 64) + TEST_FIELD_ALIGN (ENUMLOGFONTA, elfFullName, 1) + TEST_FIELD_OFFSET(ENUMLOGFONTA, elfFullName, 60) + TEST_FIELD_SIZE (ENUMLOGFONTA, elfStyle, 32) + TEST_FIELD_ALIGN (ENUMLOGFONTA, elfStyle, 1) + TEST_FIELD_OFFSET(ENUMLOGFONTA, elfStyle, 124) } static void test_pack_ENUMLOGFONTEXA(void) { /* ENUMLOGFONTEXA (pack 4) */ - TEST_TYPE(ENUMLOGFONTEXA, 188, 4); - TEST_FIELD(ENUMLOGFONTEXA, elfLogFont, 0, 60, 4); - TEST_FIELD(ENUMLOGFONTEXA, elfFullName, 60, 64, 1); - TEST_FIELD(ENUMLOGFONTEXA, elfStyle, 124, 32, 1); - TEST_FIELD(ENUMLOGFONTEXA, elfScript, 156, 32, 1); + TEST_TYPE_SIZE (ENUMLOGFONTEXA, 188) + TEST_TYPE_ALIGN (ENUMLOGFONTEXA, 4) + TEST_FIELD_SIZE (ENUMLOGFONTEXA, elfLogFont, 60) + TEST_FIELD_ALIGN (ENUMLOGFONTEXA, elfLogFont, 4) + TEST_FIELD_OFFSET(ENUMLOGFONTEXA, elfLogFont, 0) + TEST_FIELD_SIZE (ENUMLOGFONTEXA, elfFullName, 64) + TEST_FIELD_ALIGN (ENUMLOGFONTEXA, elfFullName, 1) + TEST_FIELD_OFFSET(ENUMLOGFONTEXA, elfFullName, 60) + TEST_FIELD_SIZE (ENUMLOGFONTEXA, elfStyle, 32) + TEST_FIELD_ALIGN (ENUMLOGFONTEXA, elfStyle, 1) + TEST_FIELD_OFFSET(ENUMLOGFONTEXA, elfStyle, 124) + TEST_FIELD_SIZE (ENUMLOGFONTEXA, elfScript, 32) + TEST_FIELD_ALIGN (ENUMLOGFONTEXA, elfScript, 1) + TEST_FIELD_OFFSET(ENUMLOGFONTEXA, elfScript, 156) } static void test_pack_ENUMLOGFONTEXW(void) { /* ENUMLOGFONTEXW (pack 4) */ - TEST_TYPE(ENUMLOGFONTEXW, 348, 4); - TEST_FIELD(ENUMLOGFONTEXW, elfLogFont, 0, 92, 4); - TEST_FIELD(ENUMLOGFONTEXW, elfFullName, 92, 128, 2); - TEST_FIELD(ENUMLOGFONTEXW, elfStyle, 220, 64, 2); - TEST_FIELD(ENUMLOGFONTEXW, elfScript, 284, 64, 2); + TEST_TYPE_SIZE (ENUMLOGFONTEXW, 348) + TEST_TYPE_ALIGN (ENUMLOGFONTEXW, 4) + TEST_FIELD_SIZE (ENUMLOGFONTEXW, elfLogFont, 92) + TEST_FIELD_ALIGN (ENUMLOGFONTEXW, elfLogFont, 4) + TEST_FIELD_OFFSET(ENUMLOGFONTEXW, elfLogFont, 0) + TEST_FIELD_SIZE (ENUMLOGFONTEXW, elfFullName, 128) + TEST_FIELD_ALIGN (ENUMLOGFONTEXW, elfFullName, 2) + TEST_FIELD_OFFSET(ENUMLOGFONTEXW, elfFullName, 92) + TEST_FIELD_SIZE (ENUMLOGFONTEXW, elfStyle, 64) + TEST_FIELD_ALIGN (ENUMLOGFONTEXW, elfStyle, 2) + TEST_FIELD_OFFSET(ENUMLOGFONTEXW, elfStyle, 220) + TEST_FIELD_SIZE (ENUMLOGFONTEXW, elfScript, 64) + TEST_FIELD_ALIGN (ENUMLOGFONTEXW, elfScript, 2) + TEST_FIELD_OFFSET(ENUMLOGFONTEXW, elfScript, 284) } static void test_pack_ENUMLOGFONTW(void) { /* ENUMLOGFONTW (pack 4) */ - TEST_TYPE(ENUMLOGFONTW, 284, 4); - TEST_FIELD(ENUMLOGFONTW, elfLogFont, 0, 92, 4); - TEST_FIELD(ENUMLOGFONTW, elfFullName, 92, 128, 2); - TEST_FIELD(ENUMLOGFONTW, elfStyle, 220, 64, 2); + TEST_TYPE_SIZE (ENUMLOGFONTW, 284) + TEST_TYPE_ALIGN (ENUMLOGFONTW, 4) + TEST_FIELD_SIZE (ENUMLOGFONTW, elfLogFont, 92) + TEST_FIELD_ALIGN (ENUMLOGFONTW, elfLogFont, 4) + TEST_FIELD_OFFSET(ENUMLOGFONTW, elfLogFont, 0) + TEST_FIELD_SIZE (ENUMLOGFONTW, elfFullName, 128) + TEST_FIELD_ALIGN (ENUMLOGFONTW, elfFullName, 2) + TEST_FIELD_OFFSET(ENUMLOGFONTW, elfFullName, 92) + TEST_FIELD_SIZE (ENUMLOGFONTW, elfStyle, 64) + TEST_FIELD_ALIGN (ENUMLOGFONTW, elfStyle, 2) + TEST_FIELD_OFFSET(ENUMLOGFONTW, elfStyle, 220) } static void test_pack_EXTLOGFONTA(void) { /* EXTLOGFONTA (pack 4) */ - TEST_TYPE(EXTLOGFONTA, 192, 4); - TEST_FIELD(EXTLOGFONTA, elfLogFont, 0, 60, 4); - TEST_FIELD(EXTLOGFONTA, elfFullName, 60, 64, 1); - TEST_FIELD(EXTLOGFONTA, elfStyle, 124, 32, 1); - TEST_FIELD(EXTLOGFONTA, elfVersion, 156, 4, 4); - TEST_FIELD(EXTLOGFONTA, elfStyleSize, 160, 4, 4); - TEST_FIELD(EXTLOGFONTA, elfMatch, 164, 4, 4); - TEST_FIELD(EXTLOGFONTA, elfReserved, 168, 4, 4); - TEST_FIELD(EXTLOGFONTA, elfVendorId, 172, 4, 1); - TEST_FIELD(EXTLOGFONTA, elfCulture, 176, 4, 4); - TEST_FIELD(EXTLOGFONTA, elfPanose, 180, 10, 1); + TEST_TYPE_SIZE (EXTLOGFONTA, 192) + TEST_TYPE_ALIGN (EXTLOGFONTA, 4) + TEST_FIELD_SIZE (EXTLOGFONTA, elfLogFont, 60) + TEST_FIELD_ALIGN (EXTLOGFONTA, elfLogFont, 4) + TEST_FIELD_OFFSET(EXTLOGFONTA, elfLogFont, 0) + TEST_FIELD_SIZE (EXTLOGFONTA, elfFullName, 64) + TEST_FIELD_ALIGN (EXTLOGFONTA, elfFullName, 1) + TEST_FIELD_OFFSET(EXTLOGFONTA, elfFullName, 60) + TEST_FIELD_SIZE (EXTLOGFONTA, elfStyle, 32) + TEST_FIELD_ALIGN (EXTLOGFONTA, elfStyle, 1) + TEST_FIELD_OFFSET(EXTLOGFONTA, elfStyle, 124) + TEST_FIELD_SIZE (EXTLOGFONTA, elfVersion, 4) + TEST_FIELD_ALIGN (EXTLOGFONTA, elfVersion, 4) + TEST_FIELD_OFFSET(EXTLOGFONTA, elfVersion, 156) + TEST_FIELD_SIZE (EXTLOGFONTA, elfStyleSize, 4) + TEST_FIELD_ALIGN (EXTLOGFONTA, elfStyleSize, 4) + TEST_FIELD_OFFSET(EXTLOGFONTA, elfStyleSize, 160) + TEST_FIELD_SIZE (EXTLOGFONTA, elfMatch, 4) + TEST_FIELD_ALIGN (EXTLOGFONTA, elfMatch, 4) + TEST_FIELD_OFFSET(EXTLOGFONTA, elfMatch, 164) + TEST_FIELD_SIZE (EXTLOGFONTA, elfReserved, 4) + TEST_FIELD_ALIGN (EXTLOGFONTA, elfReserved, 4) + TEST_FIELD_OFFSET(EXTLOGFONTA, elfReserved, 168) + TEST_FIELD_SIZE (EXTLOGFONTA, elfVendorId, 4) + TEST_FIELD_ALIGN (EXTLOGFONTA, elfVendorId, 1) + TEST_FIELD_OFFSET(EXTLOGFONTA, elfVendorId, 172) + TEST_FIELD_SIZE (EXTLOGFONTA, elfCulture, 4) + TEST_FIELD_ALIGN (EXTLOGFONTA, elfCulture, 4) + TEST_FIELD_OFFSET(EXTLOGFONTA, elfCulture, 176) + TEST_FIELD_SIZE (EXTLOGFONTA, elfPanose, 10) + TEST_FIELD_ALIGN (EXTLOGFONTA, elfPanose, 1) + TEST_FIELD_OFFSET(EXTLOGFONTA, elfPanose, 180) } static void test_pack_EXTLOGFONTW(void) { /* EXTLOGFONTW (pack 4) */ - TEST_TYPE(EXTLOGFONTW, 320, 4); - TEST_FIELD(EXTLOGFONTW, elfLogFont, 0, 92, 4); - TEST_FIELD(EXTLOGFONTW, elfFullName, 92, 128, 2); - TEST_FIELD(EXTLOGFONTW, elfStyle, 220, 64, 2); - TEST_FIELD(EXTLOGFONTW, elfVersion, 284, 4, 4); - TEST_FIELD(EXTLOGFONTW, elfStyleSize, 288, 4, 4); - TEST_FIELD(EXTLOGFONTW, elfMatch, 292, 4, 4); - TEST_FIELD(EXTLOGFONTW, elfReserved, 296, 4, 4); - TEST_FIELD(EXTLOGFONTW, elfVendorId, 300, 4, 1); - TEST_FIELD(EXTLOGFONTW, elfCulture, 304, 4, 4); - TEST_FIELD(EXTLOGFONTW, elfPanose, 308, 10, 1); + TEST_TYPE_SIZE (EXTLOGFONTW, 320) + TEST_TYPE_ALIGN (EXTLOGFONTW, 4) + TEST_FIELD_SIZE (EXTLOGFONTW, elfLogFont, 92) + TEST_FIELD_ALIGN (EXTLOGFONTW, elfLogFont, 4) + TEST_FIELD_OFFSET(EXTLOGFONTW, elfLogFont, 0) + TEST_FIELD_SIZE (EXTLOGFONTW, elfFullName, 128) + TEST_FIELD_ALIGN (EXTLOGFONTW, elfFullName, 2) + TEST_FIELD_OFFSET(EXTLOGFONTW, elfFullName, 92) + TEST_FIELD_SIZE (EXTLOGFONTW, elfStyle, 64) + TEST_FIELD_ALIGN (EXTLOGFONTW, elfStyle, 2) + TEST_FIELD_OFFSET(EXTLOGFONTW, elfStyle, 220) + TEST_FIELD_SIZE (EXTLOGFONTW, elfVersion, 4) + TEST_FIELD_ALIGN (EXTLOGFONTW, elfVersion, 4) + TEST_FIELD_OFFSET(EXTLOGFONTW, elfVersion, 284) + TEST_FIELD_SIZE (EXTLOGFONTW, elfStyleSize, 4) + TEST_FIELD_ALIGN (EXTLOGFONTW, elfStyleSize, 4) + TEST_FIELD_OFFSET(EXTLOGFONTW, elfStyleSize, 288) + TEST_FIELD_SIZE (EXTLOGFONTW, elfMatch, 4) + TEST_FIELD_ALIGN (EXTLOGFONTW, elfMatch, 4) + TEST_FIELD_OFFSET(EXTLOGFONTW, elfMatch, 292) + TEST_FIELD_SIZE (EXTLOGFONTW, elfReserved, 4) + TEST_FIELD_ALIGN (EXTLOGFONTW, elfReserved, 4) + TEST_FIELD_OFFSET(EXTLOGFONTW, elfReserved, 296) + TEST_FIELD_SIZE (EXTLOGFONTW, elfVendorId, 4) + TEST_FIELD_ALIGN (EXTLOGFONTW, elfVendorId, 1) + TEST_FIELD_OFFSET(EXTLOGFONTW, elfVendorId, 300) + TEST_FIELD_SIZE (EXTLOGFONTW, elfCulture, 4) + TEST_FIELD_ALIGN (EXTLOGFONTW, elfCulture, 4) + TEST_FIELD_OFFSET(EXTLOGFONTW, elfCulture, 304) + TEST_FIELD_SIZE (EXTLOGFONTW, elfPanose, 10) + TEST_FIELD_ALIGN (EXTLOGFONTW, elfPanose, 1) + TEST_FIELD_OFFSET(EXTLOGFONTW, elfPanose, 308) } static void test_pack_EXTLOGPEN(void) { /* EXTLOGPEN (pack 4) */ - TEST_TYPE(EXTLOGPEN, 28, 4); - TEST_FIELD(EXTLOGPEN, elpPenStyle, 0, 4, 4); - TEST_FIELD(EXTLOGPEN, elpWidth, 4, 4, 4); - TEST_FIELD(EXTLOGPEN, elpBrushStyle, 8, 4, 4); - TEST_FIELD(EXTLOGPEN, elpColor, 12, 4, 4); - TEST_FIELD(EXTLOGPEN, elpHatch, 16, 4, 4); - TEST_FIELD(EXTLOGPEN, elpNumEntries, 20, 4, 4); - TEST_FIELD(EXTLOGPEN, elpStyleEntry, 24, 4, 4); + TEST_TYPE_SIZE (EXTLOGPEN, 28) + TEST_TYPE_ALIGN (EXTLOGPEN, 4) + TEST_FIELD_SIZE (EXTLOGPEN, elpPenStyle, 4) + TEST_FIELD_ALIGN (EXTLOGPEN, elpPenStyle, 4) + TEST_FIELD_OFFSET(EXTLOGPEN, elpPenStyle, 0) + TEST_FIELD_SIZE (EXTLOGPEN, elpWidth, 4) + TEST_FIELD_ALIGN (EXTLOGPEN, elpWidth, 4) + TEST_FIELD_OFFSET(EXTLOGPEN, elpWidth, 4) + TEST_FIELD_SIZE (EXTLOGPEN, elpBrushStyle, 4) + TEST_FIELD_ALIGN (EXTLOGPEN, elpBrushStyle, 4) + TEST_FIELD_OFFSET(EXTLOGPEN, elpBrushStyle, 8) + TEST_FIELD_SIZE (EXTLOGPEN, elpColor, 4) + TEST_FIELD_ALIGN (EXTLOGPEN, elpColor, 4) + TEST_FIELD_OFFSET(EXTLOGPEN, elpColor, 12) + TEST_FIELD_SIZE (EXTLOGPEN, elpHatch, 4) + TEST_FIELD_ALIGN (EXTLOGPEN, elpHatch, 4) + TEST_FIELD_OFFSET(EXTLOGPEN, elpHatch, 16) + TEST_FIELD_SIZE (EXTLOGPEN, elpNumEntries, 4) + TEST_FIELD_ALIGN (EXTLOGPEN, elpNumEntries, 4) + TEST_FIELD_OFFSET(EXTLOGPEN, elpNumEntries, 20) + TEST_FIELD_SIZE (EXTLOGPEN, elpStyleEntry, 4) + TEST_FIELD_ALIGN (EXTLOGPEN, elpStyleEntry, 4) + TEST_FIELD_OFFSET(EXTLOGPEN, elpStyleEntry, 24) } static void test_pack_FIXED(void) { /* FIXED (pack 4) */ - TEST_TYPE(FIXED, 4, 2); - TEST_FIELD(FIXED, fract, 0, 2, 2); - TEST_FIELD(FIXED, value, 2, 2, 2); + TEST_TYPE_SIZE (FIXED, 4) + TEST_TYPE_ALIGN (FIXED, 2) + TEST_FIELD_SIZE (FIXED, fract, 2) + TEST_FIELD_ALIGN (FIXED, fract, 2) + TEST_FIELD_OFFSET(FIXED, fract, 0) + TEST_FIELD_SIZE (FIXED, value, 2) + TEST_FIELD_ALIGN (FIXED, value, 2) + TEST_FIELD_OFFSET(FIXED, value, 2) } static void test_pack_FONTENUMPROCA(void) { /* FONTENUMPROCA */ - TEST_TYPE(FONTENUMPROCA, 4, 4); + TEST_TYPE_SIZE (FONTENUMPROCA, 4) + TEST_TYPE_ALIGN (FONTENUMPROCA, 4) } static void test_pack_FONTENUMPROCW(void) { /* FONTENUMPROCW */ - TEST_TYPE(FONTENUMPROCW, 4, 4); + TEST_TYPE_SIZE (FONTENUMPROCW, 4) + TEST_TYPE_ALIGN (FONTENUMPROCW, 4) } static void test_pack_FONTSIGNATURE(void) { /* FONTSIGNATURE (pack 4) */ - TEST_TYPE(FONTSIGNATURE, 24, 4); - TEST_FIELD(FONTSIGNATURE, fsUsb, 0, 16, 4); - TEST_FIELD(FONTSIGNATURE, fsCsb, 16, 8, 4); + TEST_TYPE_SIZE (FONTSIGNATURE, 24) + TEST_TYPE_ALIGN (FONTSIGNATURE, 4) + TEST_FIELD_SIZE (FONTSIGNATURE, fsUsb, 16) + TEST_FIELD_ALIGN (FONTSIGNATURE, fsUsb, 4) + TEST_FIELD_OFFSET(FONTSIGNATURE, fsUsb, 0) + TEST_FIELD_SIZE (FONTSIGNATURE, fsCsb, 8) + TEST_FIELD_ALIGN (FONTSIGNATURE, fsCsb, 4) + TEST_FIELD_OFFSET(FONTSIGNATURE, fsCsb, 16) } static void test_pack_FXPT16DOT16(void) { /* FXPT16DOT16 */ - TEST_TYPE(FXPT16DOT16, 4, 4); + TEST_TYPE_SIZE (FXPT16DOT16, 4) + TEST_TYPE_ALIGN (FXPT16DOT16, 4) } static void test_pack_FXPT2DOT30(void) { /* FXPT2DOT30 */ - TEST_TYPE(FXPT2DOT30, 4, 4); + TEST_TYPE_SIZE (FXPT2DOT30, 4) + TEST_TYPE_ALIGN (FXPT2DOT30, 4) } static void test_pack_GCP_RESULTSA(void) { /* GCP_RESULTSA (pack 4) */ - TEST_TYPE(GCP_RESULTSA, 36, 4); - TEST_FIELD(GCP_RESULTSA, lStructSize, 0, 4, 4); - TEST_FIELD(GCP_RESULTSA, lpOutString, 4, 4, 4); - TEST_FIELD(GCP_RESULTSA, lpOrder, 8, 4, 4); - TEST_FIELD(GCP_RESULTSA, lpDx, 12, 4, 4); - TEST_FIELD(GCP_RESULTSA, lpCaretPos, 16, 4, 4); - TEST_FIELD(GCP_RESULTSA, lpClass, 20, 4, 4); - TEST_FIELD(GCP_RESULTSA, lpGlyphs, 24, 4, 4); - TEST_FIELD(GCP_RESULTSA, nGlyphs, 28, 4, 4); - TEST_FIELD(GCP_RESULTSA, nMaxFit, 32, 4, 4); + TEST_TYPE_SIZE (GCP_RESULTSA, 36) + TEST_TYPE_ALIGN (GCP_RESULTSA, 4) + TEST_FIELD_SIZE (GCP_RESULTSA, lStructSize, 4) + TEST_FIELD_ALIGN (GCP_RESULTSA, lStructSize, 4) + TEST_FIELD_OFFSET(GCP_RESULTSA, lStructSize, 0) + TEST_FIELD_SIZE (GCP_RESULTSA, lpOutString, 4) + TEST_FIELD_ALIGN (GCP_RESULTSA, lpOutString, 4) + TEST_FIELD_OFFSET(GCP_RESULTSA, lpOutString, 4) + TEST_FIELD_SIZE (GCP_RESULTSA, lpOrder, 4) + TEST_FIELD_ALIGN (GCP_RESULTSA, lpOrder, 4) + TEST_FIELD_OFFSET(GCP_RESULTSA, lpOrder, 8) + TEST_FIELD_SIZE (GCP_RESULTSA, lpDx, 4) + TEST_FIELD_ALIGN (GCP_RESULTSA, lpDx, 4) + TEST_FIELD_OFFSET(GCP_RESULTSA, lpDx, 12) + TEST_FIELD_SIZE (GCP_RESULTSA, lpCaretPos, 4) + TEST_FIELD_ALIGN (GCP_RESULTSA, lpCaretPos, 4) + TEST_FIELD_OFFSET(GCP_RESULTSA, lpCaretPos, 16) + TEST_FIELD_SIZE (GCP_RESULTSA, lpClass, 4) + TEST_FIELD_ALIGN (GCP_RESULTSA, lpClass, 4) + TEST_FIELD_OFFSET(GCP_RESULTSA, lpClass, 20) + TEST_FIELD_SIZE (GCP_RESULTSA, lpGlyphs, 4) + TEST_FIELD_ALIGN (GCP_RESULTSA, lpGlyphs, 4) + TEST_FIELD_OFFSET(GCP_RESULTSA, lpGlyphs, 24) + TEST_FIELD_SIZE (GCP_RESULTSA, nGlyphs, 4) + TEST_FIELD_ALIGN (GCP_RESULTSA, nGlyphs, 4) + TEST_FIELD_OFFSET(GCP_RESULTSA, nGlyphs, 28) + TEST_FIELD_SIZE (GCP_RESULTSA, nMaxFit, 4) + TEST_FIELD_ALIGN (GCP_RESULTSA, nMaxFit, 4) + TEST_FIELD_OFFSET(GCP_RESULTSA, nMaxFit, 32) } static void test_pack_GCP_RESULTSW(void) { /* GCP_RESULTSW (pack 4) */ - TEST_TYPE(GCP_RESULTSW, 36, 4); - TEST_FIELD(GCP_RESULTSW, lStructSize, 0, 4, 4); - TEST_FIELD(GCP_RESULTSW, lpOutString, 4, 4, 4); - TEST_FIELD(GCP_RESULTSW, lpOrder, 8, 4, 4); - TEST_FIELD(GCP_RESULTSW, lpDx, 12, 4, 4); - TEST_FIELD(GCP_RESULTSW, lpCaretPos, 16, 4, 4); - TEST_FIELD(GCP_RESULTSW, lpClass, 20, 4, 4); - TEST_FIELD(GCP_RESULTSW, lpGlyphs, 24, 4, 4); - TEST_FIELD(GCP_RESULTSW, nGlyphs, 28, 4, 4); - TEST_FIELD(GCP_RESULTSW, nMaxFit, 32, 4, 4); + TEST_TYPE_SIZE (GCP_RESULTSW, 36) + TEST_TYPE_ALIGN (GCP_RESULTSW, 4) + TEST_FIELD_SIZE (GCP_RESULTSW, lStructSize, 4) + TEST_FIELD_ALIGN (GCP_RESULTSW, lStructSize, 4) + TEST_FIELD_OFFSET(GCP_RESULTSW, lStructSize, 0) + TEST_FIELD_SIZE (GCP_RESULTSW, lpOutString, 4) + TEST_FIELD_ALIGN (GCP_RESULTSW, lpOutString, 4) + TEST_FIELD_OFFSET(GCP_RESULTSW, lpOutString, 4) + TEST_FIELD_SIZE (GCP_RESULTSW, lpOrder, 4) + TEST_FIELD_ALIGN (GCP_RESULTSW, lpOrder, 4) + TEST_FIELD_OFFSET(GCP_RESULTSW, lpOrder, 8) + TEST_FIELD_SIZE (GCP_RESULTSW, lpDx, 4) + TEST_FIELD_ALIGN (GCP_RESULTSW, lpDx, 4) + TEST_FIELD_OFFSET(GCP_RESULTSW, lpDx, 12) + TEST_FIELD_SIZE (GCP_RESULTSW, lpCaretPos, 4) + TEST_FIELD_ALIGN (GCP_RESULTSW, lpCaretPos, 4) + TEST_FIELD_OFFSET(GCP_RESULTSW, lpCaretPos, 16) + TEST_FIELD_SIZE (GCP_RESULTSW, lpClass, 4) + TEST_FIELD_ALIGN (GCP_RESULTSW, lpClass, 4) + TEST_FIELD_OFFSET(GCP_RESULTSW, lpClass, 20) + TEST_FIELD_SIZE (GCP_RESULTSW, lpGlyphs, 4) + TEST_FIELD_ALIGN (GCP_RESULTSW, lpGlyphs, 4) + TEST_FIELD_OFFSET(GCP_RESULTSW, lpGlyphs, 24) + TEST_FIELD_SIZE (GCP_RESULTSW, nGlyphs, 4) + TEST_FIELD_ALIGN (GCP_RESULTSW, nGlyphs, 4) + TEST_FIELD_OFFSET(GCP_RESULTSW, nGlyphs, 28) + TEST_FIELD_SIZE (GCP_RESULTSW, nMaxFit, 4) + TEST_FIELD_ALIGN (GCP_RESULTSW, nMaxFit, 4) + TEST_FIELD_OFFSET(GCP_RESULTSW, nMaxFit, 32) } static void test_pack_GLYPHMETRICS(void) { /* GLYPHMETRICS (pack 4) */ - TEST_TYPE(GLYPHMETRICS, 20, 4); - TEST_FIELD(GLYPHMETRICS, gmBlackBoxX, 0, 4, 4); - TEST_FIELD(GLYPHMETRICS, gmBlackBoxY, 4, 4, 4); - TEST_FIELD(GLYPHMETRICS, gmptGlyphOrigin, 8, 8, 4); - TEST_FIELD(GLYPHMETRICS, gmCellIncX, 16, 2, 2); - TEST_FIELD(GLYPHMETRICS, gmCellIncY, 18, 2, 2); + TEST_TYPE_SIZE (GLYPHMETRICS, 20) + TEST_TYPE_ALIGN (GLYPHMETRICS, 4) + TEST_FIELD_SIZE (GLYPHMETRICS, gmBlackBoxX, 4) + TEST_FIELD_ALIGN (GLYPHMETRICS, gmBlackBoxX, 4) + TEST_FIELD_OFFSET(GLYPHMETRICS, gmBlackBoxX, 0) + TEST_FIELD_SIZE (GLYPHMETRICS, gmBlackBoxY, 4) + TEST_FIELD_ALIGN (GLYPHMETRICS, gmBlackBoxY, 4) + TEST_FIELD_OFFSET(GLYPHMETRICS, gmBlackBoxY, 4) + TEST_FIELD_SIZE (GLYPHMETRICS, gmptGlyphOrigin, 8) + TEST_FIELD_ALIGN (GLYPHMETRICS, gmptGlyphOrigin, 4) + TEST_FIELD_OFFSET(GLYPHMETRICS, gmptGlyphOrigin, 8) + TEST_FIELD_SIZE (GLYPHMETRICS, gmCellIncX, 2) + TEST_FIELD_ALIGN (GLYPHMETRICS, gmCellIncX, 2) + TEST_FIELD_OFFSET(GLYPHMETRICS, gmCellIncX, 16) + TEST_FIELD_SIZE (GLYPHMETRICS, gmCellIncY, 2) + TEST_FIELD_ALIGN (GLYPHMETRICS, gmCellIncY, 2) + TEST_FIELD_OFFSET(GLYPHMETRICS, gmCellIncY, 18) } static void test_pack_GLYPHMETRICSFLOAT(void) { /* GLYPHMETRICSFLOAT (pack 4) */ - TEST_TYPE(GLYPHMETRICSFLOAT, 24, 4); - TEST_FIELD(GLYPHMETRICSFLOAT, gmfBlackBoxX, 0, 4, 4); - TEST_FIELD(GLYPHMETRICSFLOAT, gmfBlackBoxY, 4, 4, 4); - TEST_FIELD(GLYPHMETRICSFLOAT, gmfptGlyphOrigin, 8, 8, 4); - TEST_FIELD(GLYPHMETRICSFLOAT, gmfCellIncX, 16, 4, 4); - TEST_FIELD(GLYPHMETRICSFLOAT, gmfCellIncY, 20, 4, 4); + TEST_TYPE_SIZE (GLYPHMETRICSFLOAT, 24) + TEST_TYPE_ALIGN (GLYPHMETRICSFLOAT, 4) + TEST_FIELD_SIZE (GLYPHMETRICSFLOAT, gmfBlackBoxX, 4) + TEST_FIELD_ALIGN (GLYPHMETRICSFLOAT, gmfBlackBoxX, 4) + TEST_FIELD_OFFSET(GLYPHMETRICSFLOAT, gmfBlackBoxX, 0) + TEST_FIELD_SIZE (GLYPHMETRICSFLOAT, gmfBlackBoxY, 4) + TEST_FIELD_ALIGN (GLYPHMETRICSFLOAT, gmfBlackBoxY, 4) + TEST_FIELD_OFFSET(GLYPHMETRICSFLOAT, gmfBlackBoxY, 4) + TEST_FIELD_SIZE (GLYPHMETRICSFLOAT, gmfptGlyphOrigin, 8) + TEST_FIELD_ALIGN (GLYPHMETRICSFLOAT, gmfptGlyphOrigin, 4) + TEST_FIELD_OFFSET(GLYPHMETRICSFLOAT, gmfptGlyphOrigin, 8) + TEST_FIELD_SIZE (GLYPHMETRICSFLOAT, gmfCellIncX, 4) + TEST_FIELD_ALIGN (GLYPHMETRICSFLOAT, gmfCellIncX, 4) + TEST_FIELD_OFFSET(GLYPHMETRICSFLOAT, gmfCellIncX, 16) + TEST_FIELD_SIZE (GLYPHMETRICSFLOAT, gmfCellIncY, 4) + TEST_FIELD_ALIGN (GLYPHMETRICSFLOAT, gmfCellIncY, 4) + TEST_FIELD_OFFSET(GLYPHMETRICSFLOAT, gmfCellIncY, 20) } static void test_pack_GOBJENUMPROC(void) { /* GOBJENUMPROC */ - TEST_TYPE(GOBJENUMPROC, 4, 4); + TEST_TYPE_SIZE (GOBJENUMPROC, 4) + TEST_TYPE_ALIGN (GOBJENUMPROC, 4) } static void test_pack_GRADIENT_RECT(void) { /* GRADIENT_RECT (pack 4) */ - TEST_TYPE(GRADIENT_RECT, 8, 4); - TEST_FIELD(GRADIENT_RECT, UpperLeft, 0, 4, 4); - TEST_FIELD(GRADIENT_RECT, LowerRight, 4, 4, 4); + TEST_TYPE_SIZE (GRADIENT_RECT, 8) + TEST_TYPE_ALIGN (GRADIENT_RECT, 4) + TEST_FIELD_SIZE (GRADIENT_RECT, UpperLeft, 4) + TEST_FIELD_ALIGN (GRADIENT_RECT, UpperLeft, 4) + TEST_FIELD_OFFSET(GRADIENT_RECT, UpperLeft, 0) + TEST_FIELD_SIZE (GRADIENT_RECT, LowerRight, 4) + TEST_FIELD_ALIGN (GRADIENT_RECT, LowerRight, 4) + TEST_FIELD_OFFSET(GRADIENT_RECT, LowerRight, 4) } static void test_pack_GRADIENT_TRIANGLE(void) { /* GRADIENT_TRIANGLE (pack 4) */ - TEST_TYPE(GRADIENT_TRIANGLE, 12, 4); - TEST_FIELD(GRADIENT_TRIANGLE, Vertex1, 0, 4, 4); - TEST_FIELD(GRADIENT_TRIANGLE, Vertex2, 4, 4, 4); - TEST_FIELD(GRADIENT_TRIANGLE, Vertex3, 8, 4, 4); + TEST_TYPE_SIZE (GRADIENT_TRIANGLE, 12) + TEST_TYPE_ALIGN (GRADIENT_TRIANGLE, 4) + TEST_FIELD_SIZE (GRADIENT_TRIANGLE, Vertex1, 4) + TEST_FIELD_ALIGN (GRADIENT_TRIANGLE, Vertex1, 4) + TEST_FIELD_OFFSET(GRADIENT_TRIANGLE, Vertex1, 0) + TEST_FIELD_SIZE (GRADIENT_TRIANGLE, Vertex2, 4) + TEST_FIELD_ALIGN (GRADIENT_TRIANGLE, Vertex2, 4) + TEST_FIELD_OFFSET(GRADIENT_TRIANGLE, Vertex2, 4) + TEST_FIELD_SIZE (GRADIENT_TRIANGLE, Vertex3, 4) + TEST_FIELD_ALIGN (GRADIENT_TRIANGLE, Vertex3, 4) + TEST_FIELD_OFFSET(GRADIENT_TRIANGLE, Vertex3, 8) } static void test_pack_HANDLETABLE(void) { /* HANDLETABLE (pack 4) */ - TEST_TYPE(HANDLETABLE, 4, 4); - TEST_FIELD(HANDLETABLE, objectHandle, 0, 4, 4); + TEST_TYPE_SIZE (HANDLETABLE, 4) + TEST_TYPE_ALIGN (HANDLETABLE, 4) + TEST_FIELD_SIZE (HANDLETABLE, objectHandle, 4) + TEST_FIELD_ALIGN (HANDLETABLE, objectHandle, 4) + TEST_FIELD_OFFSET(HANDLETABLE, objectHandle, 0) } static void test_pack_ICMENUMPROCA(void) { /* ICMENUMPROCA */ - TEST_TYPE(ICMENUMPROCA, 4, 4); + TEST_TYPE_SIZE (ICMENUMPROCA, 4) + TEST_TYPE_ALIGN (ICMENUMPROCA, 4) } static void test_pack_ICMENUMPROCW(void) { /* ICMENUMPROCW */ - TEST_TYPE(ICMENUMPROCW, 4, 4); + TEST_TYPE_SIZE (ICMENUMPROCW, 4) + TEST_TYPE_ALIGN (ICMENUMPROCW, 4) } static void test_pack_KERNINGPAIR(void) { /* KERNINGPAIR (pack 4) */ - TEST_TYPE(KERNINGPAIR, 8, 4); - TEST_FIELD(KERNINGPAIR, wFirst, 0, 2, 2); - TEST_FIELD(KERNINGPAIR, wSecond, 2, 2, 2); - TEST_FIELD(KERNINGPAIR, iKernAmount, 4, 4, 4); + TEST_TYPE_SIZE (KERNINGPAIR, 8) + TEST_TYPE_ALIGN (KERNINGPAIR, 4) + TEST_FIELD_SIZE (KERNINGPAIR, wFirst, 2) + TEST_FIELD_ALIGN (KERNINGPAIR, wFirst, 2) + TEST_FIELD_OFFSET(KERNINGPAIR, wFirst, 0) + TEST_FIELD_SIZE (KERNINGPAIR, wSecond, 2) + TEST_FIELD_ALIGN (KERNINGPAIR, wSecond, 2) + TEST_FIELD_OFFSET(KERNINGPAIR, wSecond, 2) + TEST_FIELD_SIZE (KERNINGPAIR, iKernAmount, 4) + TEST_FIELD_ALIGN (KERNINGPAIR, iKernAmount, 4) + TEST_FIELD_OFFSET(KERNINGPAIR, iKernAmount, 4) } static void test_pack_LAYERPLANEDESCRIPTOR(void) { /* LAYERPLANEDESCRIPTOR (pack 4) */ - TEST_TYPE(LAYERPLANEDESCRIPTOR, 32, 4); - TEST_FIELD(LAYERPLANEDESCRIPTOR, nSize, 0, 2, 2); - TEST_FIELD(LAYERPLANEDESCRIPTOR, nVersion, 2, 2, 2); - TEST_FIELD(LAYERPLANEDESCRIPTOR, dwFlags, 4, 4, 4); - TEST_FIELD(LAYERPLANEDESCRIPTOR, iPixelType, 8, 1, 1); - TEST_FIELD(LAYERPLANEDESCRIPTOR, cColorBits, 9, 1, 1); - TEST_FIELD(LAYERPLANEDESCRIPTOR, cRedBits, 10, 1, 1); - TEST_FIELD(LAYERPLANEDESCRIPTOR, cRedShift, 11, 1, 1); - TEST_FIELD(LAYERPLANEDESCRIPTOR, cGreenBits, 12, 1, 1); - TEST_FIELD(LAYERPLANEDESCRIPTOR, cGreenShift, 13, 1, 1); - TEST_FIELD(LAYERPLANEDESCRIPTOR, cBlueBits, 14, 1, 1); - TEST_FIELD(LAYERPLANEDESCRIPTOR, cBlueShift, 15, 1, 1); - TEST_FIELD(LAYERPLANEDESCRIPTOR, cAlphaBits, 16, 1, 1); - TEST_FIELD(LAYERPLANEDESCRIPTOR, cAlphaShift, 17, 1, 1); - TEST_FIELD(LAYERPLANEDESCRIPTOR, cAccumBits, 18, 1, 1); - TEST_FIELD(LAYERPLANEDESCRIPTOR, cAccumRedBits, 19, 1, 1); - TEST_FIELD(LAYERPLANEDESCRIPTOR, cAccumGreenBits, 20, 1, 1); - TEST_FIELD(LAYERPLANEDESCRIPTOR, cAccumBlueBits, 21, 1, 1); - TEST_FIELD(LAYERPLANEDESCRIPTOR, cAccumAlphaBits, 22, 1, 1); - TEST_FIELD(LAYERPLANEDESCRIPTOR, cDepthBits, 23, 1, 1); - TEST_FIELD(LAYERPLANEDESCRIPTOR, cStencilBits, 24, 1, 1); - TEST_FIELD(LAYERPLANEDESCRIPTOR, cAuxBuffers, 25, 1, 1); - TEST_FIELD(LAYERPLANEDESCRIPTOR, iLayerPlane, 26, 1, 1); - TEST_FIELD(LAYERPLANEDESCRIPTOR, bReserved, 27, 1, 1); - TEST_FIELD(LAYERPLANEDESCRIPTOR, crTransparent, 28, 4, 4); + TEST_TYPE_SIZE (LAYERPLANEDESCRIPTOR, 32) + TEST_TYPE_ALIGN (LAYERPLANEDESCRIPTOR, 4) + TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, nSize, 2) + TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, nSize, 2) + TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, nSize, 0) + TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, nVersion, 2) + TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, nVersion, 2) + TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, nVersion, 2) + TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, dwFlags, 4) + TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, dwFlags, 4) + TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, dwFlags, 4) + TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, iPixelType, 1) + TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, iPixelType, 1) + TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, iPixelType, 8) + TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cColorBits, 1) + TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cColorBits, 1) + TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cColorBits, 9) + TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cRedBits, 1) + TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cRedBits, 1) + TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cRedBits, 10) + TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cRedShift, 1) + TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cRedShift, 1) + TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cRedShift, 11) + TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cGreenBits, 1) + TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cGreenBits, 1) + TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cGreenBits, 12) + TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cGreenShift, 1) + TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cGreenShift, 1) + TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cGreenShift, 13) + TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cBlueBits, 1) + TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cBlueBits, 1) + TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cBlueBits, 14) + TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cBlueShift, 1) + TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cBlueShift, 1) + TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cBlueShift, 15) + TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cAlphaBits, 1) + TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cAlphaBits, 1) + TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cAlphaBits, 16) + TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cAlphaShift, 1) + TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cAlphaShift, 1) + TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cAlphaShift, 17) + TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cAccumBits, 1) + TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cAccumBits, 1) + TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cAccumBits, 18) + TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cAccumRedBits, 1) + TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cAccumRedBits, 1) + TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cAccumRedBits, 19) + TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cAccumGreenBits, 1) + TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cAccumGreenBits, 1) + TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cAccumGreenBits, 20) + TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cAccumBlueBits, 1) + TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cAccumBlueBits, 1) + TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cAccumBlueBits, 21) + TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cAccumAlphaBits, 1) + TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cAccumAlphaBits, 1) + TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cAccumAlphaBits, 22) + TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cDepthBits, 1) + TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cDepthBits, 1) + TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cDepthBits, 23) + TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cStencilBits, 1) + TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cStencilBits, 1) + TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cStencilBits, 24) + TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cAuxBuffers, 1) + TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cAuxBuffers, 1) + TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cAuxBuffers, 25) + TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, iLayerPlane, 1) + TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, iLayerPlane, 1) + TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, iLayerPlane, 26) + TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, bReserved, 1) + TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, bReserved, 1) + TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, bReserved, 27) + TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, crTransparent, 4) + TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, crTransparent, 4) + TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, crTransparent, 28) } static void test_pack_LCSCSTYPE(void) { /* LCSCSTYPE */ - TEST_TYPE(LCSCSTYPE, 4, 4); + TEST_TYPE_SIZE (LCSCSTYPE, 4) + TEST_TYPE_ALIGN (LCSCSTYPE, 4) } static void test_pack_LCSGAMUTMATCH(void) { /* LCSGAMUTMATCH */ - TEST_TYPE(LCSGAMUTMATCH, 4, 4); + TEST_TYPE_SIZE (LCSGAMUTMATCH, 4) + TEST_TYPE_ALIGN (LCSGAMUTMATCH, 4) } static void test_pack_LINEDDAPROC(void) { /* LINEDDAPROC */ - TEST_TYPE(LINEDDAPROC, 4, 4); + TEST_TYPE_SIZE (LINEDDAPROC, 4) + TEST_TYPE_ALIGN (LINEDDAPROC, 4) } static void test_pack_LOCALESIGNATURE(void) { /* LOCALESIGNATURE (pack 4) */ - TEST_TYPE(LOCALESIGNATURE, 32, 4); - TEST_FIELD(LOCALESIGNATURE, lsUsb, 0, 16, 4); - TEST_FIELD(LOCALESIGNATURE, lsCsbDefault, 16, 8, 4); - TEST_FIELD(LOCALESIGNATURE, lsCsbSupported, 24, 8, 4); + TEST_TYPE_SIZE (LOCALESIGNATURE, 32) + TEST_TYPE_ALIGN (LOCALESIGNATURE, 4) + TEST_FIELD_SIZE (LOCALESIGNATURE, lsUsb, 16) + TEST_FIELD_ALIGN (LOCALESIGNATURE, lsUsb, 4) + TEST_FIELD_OFFSET(LOCALESIGNATURE, lsUsb, 0) + TEST_FIELD_SIZE (LOCALESIGNATURE, lsCsbDefault, 8) + TEST_FIELD_ALIGN (LOCALESIGNATURE, lsCsbDefault, 4) + TEST_FIELD_OFFSET(LOCALESIGNATURE, lsCsbDefault, 16) + TEST_FIELD_SIZE (LOCALESIGNATURE, lsCsbSupported, 8) + TEST_FIELD_ALIGN (LOCALESIGNATURE, lsCsbSupported, 4) + TEST_FIELD_OFFSET(LOCALESIGNATURE, lsCsbSupported, 24) } static void test_pack_LOGBRUSH(void) { /* LOGBRUSH (pack 4) */ - TEST_TYPE(LOGBRUSH, 12, 4); - TEST_FIELD(LOGBRUSH, lbStyle, 0, 4, 4); - TEST_FIELD(LOGBRUSH, lbColor, 4, 4, 4); - TEST_FIELD(LOGBRUSH, lbHatch, 8, 4, 4); + TEST_TYPE_SIZE (LOGBRUSH, 12) + TEST_TYPE_ALIGN (LOGBRUSH, 4) + TEST_FIELD_SIZE (LOGBRUSH, lbStyle, 4) + TEST_FIELD_ALIGN (LOGBRUSH, lbStyle, 4) + TEST_FIELD_OFFSET(LOGBRUSH, lbStyle, 0) + TEST_FIELD_SIZE (LOGBRUSH, lbColor, 4) + TEST_FIELD_ALIGN (LOGBRUSH, lbColor, 4) + TEST_FIELD_OFFSET(LOGBRUSH, lbColor, 4) + TEST_FIELD_SIZE (LOGBRUSH, lbHatch, 4) + TEST_FIELD_ALIGN (LOGBRUSH, lbHatch, 4) + TEST_FIELD_OFFSET(LOGBRUSH, lbHatch, 8) } static void test_pack_LOGCOLORSPACEA(void) { /* LOGCOLORSPACEA (pack 4) */ - TEST_TYPE(LOGCOLORSPACEA, 328, 4); - TEST_FIELD(LOGCOLORSPACEA, lcsSignature, 0, 4, 4); - TEST_FIELD(LOGCOLORSPACEA, lcsVersion, 4, 4, 4); - TEST_FIELD(LOGCOLORSPACEA, lcsSize, 8, 4, 4); - TEST_FIELD(LOGCOLORSPACEA, lcsCSType, 12, 4, 4); - TEST_FIELD(LOGCOLORSPACEA, lcsIntent, 16, 4, 4); - TEST_FIELD(LOGCOLORSPACEA, lcsEndpoints, 20, 36, 4); - TEST_FIELD(LOGCOLORSPACEA, lcsGammaRed, 56, 4, 4); - TEST_FIELD(LOGCOLORSPACEA, lcsGammaGreen, 60, 4, 4); - TEST_FIELD(LOGCOLORSPACEA, lcsGammaBlue, 64, 4, 4); - TEST_FIELD(LOGCOLORSPACEA, lcsFilename, 68, 260, 1); + TEST_TYPE_SIZE (LOGCOLORSPACEA, 328) + TEST_TYPE_ALIGN (LOGCOLORSPACEA, 4) + TEST_FIELD_SIZE (LOGCOLORSPACEA, lcsSignature, 4) + TEST_FIELD_ALIGN (LOGCOLORSPACEA, lcsSignature, 4) + TEST_FIELD_OFFSET(LOGCOLORSPACEA, lcsSignature, 0) + TEST_FIELD_SIZE (LOGCOLORSPACEA, lcsVersion, 4) + TEST_FIELD_ALIGN (LOGCOLORSPACEA, lcsVersion, 4) + TEST_FIELD_OFFSET(LOGCOLORSPACEA, lcsVersion, 4) + TEST_FIELD_SIZE (LOGCOLORSPACEA, lcsSize, 4) + TEST_FIELD_ALIGN (LOGCOLORSPACEA, lcsSize, 4) + TEST_FIELD_OFFSET(LOGCOLORSPACEA, lcsSize, 8) + TEST_FIELD_SIZE (LOGCOLORSPACEA, lcsCSType, 4) + TEST_FIELD_ALIGN (LOGCOLORSPACEA, lcsCSType, 4) + TEST_FIELD_OFFSET(LOGCOLORSPACEA, lcsCSType, 12) + TEST_FIELD_SIZE (LOGCOLORSPACEA, lcsIntent, 4) + TEST_FIELD_ALIGN (LOGCOLORSPACEA, lcsIntent, 4) + TEST_FIELD_OFFSET(LOGCOLORSPACEA, lcsIntent, 16) + TEST_FIELD_SIZE (LOGCOLORSPACEA, lcsEndpoints, 36) + TEST_FIELD_ALIGN (LOGCOLORSPACEA, lcsEndpoints, 4) + TEST_FIELD_OFFSET(LOGCOLORSPACEA, lcsEndpoints, 20) + TEST_FIELD_SIZE (LOGCOLORSPACEA, lcsGammaRed, 4) + TEST_FIELD_ALIGN (LOGCOLORSPACEA, lcsGammaRed, 4) + TEST_FIELD_OFFSET(LOGCOLORSPACEA, lcsGammaRed, 56) + TEST_FIELD_SIZE (LOGCOLORSPACEA, lcsGammaGreen, 4) + TEST_FIELD_ALIGN (LOGCOLORSPACEA, lcsGammaGreen, 4) + TEST_FIELD_OFFSET(LOGCOLORSPACEA, lcsGammaGreen, 60) + TEST_FIELD_SIZE (LOGCOLORSPACEA, lcsGammaBlue, 4) + TEST_FIELD_ALIGN (LOGCOLORSPACEA, lcsGammaBlue, 4) + TEST_FIELD_OFFSET(LOGCOLORSPACEA, lcsGammaBlue, 64) + TEST_FIELD_SIZE (LOGCOLORSPACEA, lcsFilename, 260) + TEST_FIELD_ALIGN (LOGCOLORSPACEA, lcsFilename, 1) + TEST_FIELD_OFFSET(LOGCOLORSPACEA, lcsFilename, 68) } static void test_pack_LOGCOLORSPACEW(void) { /* LOGCOLORSPACEW (pack 4) */ - TEST_TYPE(LOGCOLORSPACEW, 588, 4); - TEST_FIELD(LOGCOLORSPACEW, lcsSignature, 0, 4, 4); - TEST_FIELD(LOGCOLORSPACEW, lcsVersion, 4, 4, 4); - TEST_FIELD(LOGCOLORSPACEW, lcsSize, 8, 4, 4); - TEST_FIELD(LOGCOLORSPACEW, lcsCSType, 12, 4, 4); - TEST_FIELD(LOGCOLORSPACEW, lcsIntent, 16, 4, 4); - TEST_FIELD(LOGCOLORSPACEW, lcsEndpoints, 20, 36, 4); - TEST_FIELD(LOGCOLORSPACEW, lcsGammaRed, 56, 4, 4); - TEST_FIELD(LOGCOLORSPACEW, lcsGammaGreen, 60, 4, 4); - TEST_FIELD(LOGCOLORSPACEW, lcsGammaBlue, 64, 4, 4); - TEST_FIELD(LOGCOLORSPACEW, lcsFilename, 68, 520, 2); + TEST_TYPE_SIZE (LOGCOLORSPACEW, 588) + TEST_TYPE_ALIGN (LOGCOLORSPACEW, 4) + TEST_FIELD_SIZE (LOGCOLORSPACEW, lcsSignature, 4) + TEST_FIELD_ALIGN (LOGCOLORSPACEW, lcsSignature, 4) + TEST_FIELD_OFFSET(LOGCOLORSPACEW, lcsSignature, 0) + TEST_FIELD_SIZE (LOGCOLORSPACEW, lcsVersion, 4) + TEST_FIELD_ALIGN (LOGCOLORSPACEW, lcsVersion, 4) + TEST_FIELD_OFFSET(LOGCOLORSPACEW, lcsVersion, 4) + TEST_FIELD_SIZE (LOGCOLORSPACEW, lcsSize, 4) + TEST_FIELD_ALIGN (LOGCOLORSPACEW, lcsSize, 4) + TEST_FIELD_OFFSET(LOGCOLORSPACEW, lcsSize, 8) + TEST_FIELD_SIZE (LOGCOLORSPACEW, lcsCSType, 4) + TEST_FIELD_ALIGN (LOGCOLORSPACEW, lcsCSType, 4) + TEST_FIELD_OFFSET(LOGCOLORSPACEW, lcsCSType, 12) + TEST_FIELD_SIZE (LOGCOLORSPACEW, lcsIntent, 4) + TEST_FIELD_ALIGN (LOGCOLORSPACEW, lcsIntent, 4) + TEST_FIELD_OFFSET(LOGCOLORSPACEW, lcsIntent, 16) + TEST_FIELD_SIZE (LOGCOLORSPACEW, lcsEndpoints, 36) + TEST_FIELD_ALIGN (LOGCOLORSPACEW, lcsEndpoints, 4) + TEST_FIELD_OFFSET(LOGCOLORSPACEW, lcsEndpoints, 20) + TEST_FIELD_SIZE (LOGCOLORSPACEW, lcsGammaRed, 4) + TEST_FIELD_ALIGN (LOGCOLORSPACEW, lcsGammaRed, 4) + TEST_FIELD_OFFSET(LOGCOLORSPACEW, lcsGammaRed, 56) + TEST_FIELD_SIZE (LOGCOLORSPACEW, lcsGammaGreen, 4) + TEST_FIELD_ALIGN (LOGCOLORSPACEW, lcsGammaGreen, 4) + TEST_FIELD_OFFSET(LOGCOLORSPACEW, lcsGammaGreen, 60) + TEST_FIELD_SIZE (LOGCOLORSPACEW, lcsGammaBlue, 4) + TEST_FIELD_ALIGN (LOGCOLORSPACEW, lcsGammaBlue, 4) + TEST_FIELD_OFFSET(LOGCOLORSPACEW, lcsGammaBlue, 64) + TEST_FIELD_SIZE (LOGCOLORSPACEW, lcsFilename, 520) + TEST_FIELD_ALIGN (LOGCOLORSPACEW, lcsFilename, 2) + TEST_FIELD_OFFSET(LOGCOLORSPACEW, lcsFilename, 68) } static void test_pack_LOGFONTA(void) { /* LOGFONTA (pack 4) */ - TEST_TYPE(LOGFONTA, 60, 4); - TEST_FIELD(LOGFONTA, lfHeight, 0, 4, 4); - TEST_FIELD(LOGFONTA, lfWidth, 4, 4, 4); - TEST_FIELD(LOGFONTA, lfEscapement, 8, 4, 4); - TEST_FIELD(LOGFONTA, lfOrientation, 12, 4, 4); - TEST_FIELD(LOGFONTA, lfWeight, 16, 4, 4); - TEST_FIELD(LOGFONTA, lfItalic, 20, 1, 1); - TEST_FIELD(LOGFONTA, lfUnderline, 21, 1, 1); - TEST_FIELD(LOGFONTA, lfStrikeOut, 22, 1, 1); - TEST_FIELD(LOGFONTA, lfCharSet, 23, 1, 1); - TEST_FIELD(LOGFONTA, lfOutPrecision, 24, 1, 1); - TEST_FIELD(LOGFONTA, lfClipPrecision, 25, 1, 1); - TEST_FIELD(LOGFONTA, lfQuality, 26, 1, 1); - TEST_FIELD(LOGFONTA, lfPitchAndFamily, 27, 1, 1); - TEST_FIELD(LOGFONTA, lfFaceName, 28, 32, 1); + TEST_TYPE_SIZE (LOGFONTA, 60) + TEST_TYPE_ALIGN (LOGFONTA, 4) + TEST_FIELD_SIZE (LOGFONTA, lfHeight, 4) + TEST_FIELD_ALIGN (LOGFONTA, lfHeight, 4) + TEST_FIELD_OFFSET(LOGFONTA, lfHeight, 0) + TEST_FIELD_SIZE (LOGFONTA, lfWidth, 4) + TEST_FIELD_ALIGN (LOGFONTA, lfWidth, 4) + TEST_FIELD_OFFSET(LOGFONTA, lfWidth, 4) + TEST_FIELD_SIZE (LOGFONTA, lfEscapement, 4) + TEST_FIELD_ALIGN (LOGFONTA, lfEscapement, 4) + TEST_FIELD_OFFSET(LOGFONTA, lfEscapement, 8) + TEST_FIELD_SIZE (LOGFONTA, lfOrientation, 4) + TEST_FIELD_ALIGN (LOGFONTA, lfOrientation, 4) + TEST_FIELD_OFFSET(LOGFONTA, lfOrientation, 12) + TEST_FIELD_SIZE (LOGFONTA, lfWeight, 4) + TEST_FIELD_ALIGN (LOGFONTA, lfWeight, 4) + TEST_FIELD_OFFSET(LOGFONTA, lfWeight, 16) + TEST_FIELD_SIZE (LOGFONTA, lfItalic, 1) + TEST_FIELD_ALIGN (LOGFONTA, lfItalic, 1) + TEST_FIELD_OFFSET(LOGFONTA, lfItalic, 20) + TEST_FIELD_SIZE (LOGFONTA, lfUnderline, 1) + TEST_FIELD_ALIGN (LOGFONTA, lfUnderline, 1) + TEST_FIELD_OFFSET(LOGFONTA, lfUnderline, 21) + TEST_FIELD_SIZE (LOGFONTA, lfStrikeOut, 1) + TEST_FIELD_ALIGN (LOGFONTA, lfStrikeOut, 1) + TEST_FIELD_OFFSET(LOGFONTA, lfStrikeOut, 22) + TEST_FIELD_SIZE (LOGFONTA, lfCharSet, 1) + TEST_FIELD_ALIGN (LOGFONTA, lfCharSet, 1) + TEST_FIELD_OFFSET(LOGFONTA, lfCharSet, 23) + TEST_FIELD_SIZE (LOGFONTA, lfOutPrecision, 1) + TEST_FIELD_ALIGN (LOGFONTA, lfOutPrecision, 1) + TEST_FIELD_OFFSET(LOGFONTA, lfOutPrecision, 24) + TEST_FIELD_SIZE (LOGFONTA, lfClipPrecision, 1) + TEST_FIELD_ALIGN (LOGFONTA, lfClipPrecision, 1) + TEST_FIELD_OFFSET(LOGFONTA, lfClipPrecision, 25) + TEST_FIELD_SIZE (LOGFONTA, lfQuality, 1) + TEST_FIELD_ALIGN (LOGFONTA, lfQuality, 1) + TEST_FIELD_OFFSET(LOGFONTA, lfQuality, 26) + TEST_FIELD_SIZE (LOGFONTA, lfPitchAndFamily, 1) + TEST_FIELD_ALIGN (LOGFONTA, lfPitchAndFamily, 1) + TEST_FIELD_OFFSET(LOGFONTA, lfPitchAndFamily, 27) + TEST_FIELD_SIZE (LOGFONTA, lfFaceName, 32) + TEST_FIELD_ALIGN (LOGFONTA, lfFaceName, 1) + TEST_FIELD_OFFSET(LOGFONTA, lfFaceName, 28) } static void test_pack_LOGFONTW(void) { /* LOGFONTW (pack 4) */ - TEST_TYPE(LOGFONTW, 92, 4); - TEST_FIELD(LOGFONTW, lfHeight, 0, 4, 4); - TEST_FIELD(LOGFONTW, lfWidth, 4, 4, 4); - TEST_FIELD(LOGFONTW, lfEscapement, 8, 4, 4); - TEST_FIELD(LOGFONTW, lfOrientation, 12, 4, 4); - TEST_FIELD(LOGFONTW, lfWeight, 16, 4, 4); - TEST_FIELD(LOGFONTW, lfItalic, 20, 1, 1); - TEST_FIELD(LOGFONTW, lfUnderline, 21, 1, 1); - TEST_FIELD(LOGFONTW, lfStrikeOut, 22, 1, 1); - TEST_FIELD(LOGFONTW, lfCharSet, 23, 1, 1); - TEST_FIELD(LOGFONTW, lfOutPrecision, 24, 1, 1); - TEST_FIELD(LOGFONTW, lfClipPrecision, 25, 1, 1); - TEST_FIELD(LOGFONTW, lfQuality, 26, 1, 1); - TEST_FIELD(LOGFONTW, lfPitchAndFamily, 27, 1, 1); - TEST_FIELD(LOGFONTW, lfFaceName, 28, 64, 2); + TEST_TYPE_SIZE (LOGFONTW, 92) + TEST_TYPE_ALIGN (LOGFONTW, 4) + TEST_FIELD_SIZE (LOGFONTW, lfHeight, 4) + TEST_FIELD_ALIGN (LOGFONTW, lfHeight, 4) + TEST_FIELD_OFFSET(LOGFONTW, lfHeight, 0) + TEST_FIELD_SIZE (LOGFONTW, lfWidth, 4) + TEST_FIELD_ALIGN (LOGFONTW, lfWidth, 4) + TEST_FIELD_OFFSET(LOGFONTW, lfWidth, 4) + TEST_FIELD_SIZE (LOGFONTW, lfEscapement, 4) + TEST_FIELD_ALIGN (LOGFONTW, lfEscapement, 4) + TEST_FIELD_OFFSET(LOGFONTW, lfEscapement, 8) + TEST_FIELD_SIZE (LOGFONTW, lfOrientation, 4) + TEST_FIELD_ALIGN (LOGFONTW, lfOrientation, 4) + TEST_FIELD_OFFSET(LOGFONTW, lfOrientation, 12) + TEST_FIELD_SIZE (LOGFONTW, lfWeight, 4) + TEST_FIELD_ALIGN (LOGFONTW, lfWeight, 4) + TEST_FIELD_OFFSET(LOGFONTW, lfWeight, 16) + TEST_FIELD_SIZE (LOGFONTW, lfItalic, 1) + TEST_FIELD_ALIGN (LOGFONTW, lfItalic, 1) + TEST_FIELD_OFFSET(LOGFONTW, lfItalic, 20) + TEST_FIELD_SIZE (LOGFONTW, lfUnderline, 1) + TEST_FIELD_ALIGN (LOGFONTW, lfUnderline, 1) + TEST_FIELD_OFFSET(LOGFONTW, lfUnderline, 21) + TEST_FIELD_SIZE (LOGFONTW, lfStrikeOut, 1) + TEST_FIELD_ALIGN (LOGFONTW, lfStrikeOut, 1) + TEST_FIELD_OFFSET(LOGFONTW, lfStrikeOut, 22) + TEST_FIELD_SIZE (LOGFONTW, lfCharSet, 1) + TEST_FIELD_ALIGN (LOGFONTW, lfCharSet, 1) + TEST_FIELD_OFFSET(LOGFONTW, lfCharSet, 23) + TEST_FIELD_SIZE (LOGFONTW, lfOutPrecision, 1) + TEST_FIELD_ALIGN (LOGFONTW, lfOutPrecision, 1) + TEST_FIELD_OFFSET(LOGFONTW, lfOutPrecision, 24) + TEST_FIELD_SIZE (LOGFONTW, lfClipPrecision, 1) + TEST_FIELD_ALIGN (LOGFONTW, lfClipPrecision, 1) + TEST_FIELD_OFFSET(LOGFONTW, lfClipPrecision, 25) + TEST_FIELD_SIZE (LOGFONTW, lfQuality, 1) + TEST_FIELD_ALIGN (LOGFONTW, lfQuality, 1) + TEST_FIELD_OFFSET(LOGFONTW, lfQuality, 26) + TEST_FIELD_SIZE (LOGFONTW, lfPitchAndFamily, 1) + TEST_FIELD_ALIGN (LOGFONTW, lfPitchAndFamily, 1) + TEST_FIELD_OFFSET(LOGFONTW, lfPitchAndFamily, 27) + TEST_FIELD_SIZE (LOGFONTW, lfFaceName, 64) + TEST_FIELD_ALIGN (LOGFONTW, lfFaceName, 2) + TEST_FIELD_OFFSET(LOGFONTW, lfFaceName, 28) } static void test_pack_LOGPEN(void) { /* LOGPEN (pack 4) */ - TEST_TYPE(LOGPEN, 16, 4); - TEST_FIELD(LOGPEN, lopnStyle, 0, 4, 4); - TEST_FIELD(LOGPEN, lopnWidth, 4, 8, 4); - TEST_FIELD(LOGPEN, lopnColor, 12, 4, 4); + TEST_TYPE_SIZE (LOGPEN, 16) + TEST_TYPE_ALIGN (LOGPEN, 4) + TEST_FIELD_SIZE (LOGPEN, lopnStyle, 4) + TEST_FIELD_ALIGN (LOGPEN, lopnStyle, 4) + TEST_FIELD_OFFSET(LOGPEN, lopnStyle, 0) + TEST_FIELD_SIZE (LOGPEN, lopnWidth, 8) + TEST_FIELD_ALIGN (LOGPEN, lopnWidth, 4) + TEST_FIELD_OFFSET(LOGPEN, lopnWidth, 4) + TEST_FIELD_SIZE (LOGPEN, lopnColor, 4) + TEST_FIELD_ALIGN (LOGPEN, lopnColor, 4) + TEST_FIELD_OFFSET(LOGPEN, lopnColor, 12) } static void test_pack_LPABC(void) { /* LPABC */ - TEST_TYPE(LPABC, 4, 4); - TEST_TYPE_POINTER(LPABC, 12, 4); + TEST_TYPE_SIZE (LPABC, 4) + TEST_TYPE_ALIGN (LPABC, 4) + TEST_TARGET_SIZE (LPABC, 12) + TEST_TARGET_ALIGN(LPABC, 4) } static void test_pack_LPABCFLOAT(void) { /* LPABCFLOAT */ - TEST_TYPE(LPABCFLOAT, 4, 4); - TEST_TYPE_POINTER(LPABCFLOAT, 12, 4); + TEST_TYPE_SIZE (LPABCFLOAT, 4) + TEST_TYPE_ALIGN (LPABCFLOAT, 4) + TEST_TARGET_SIZE (LPABCFLOAT, 12) + TEST_TARGET_ALIGN(LPABCFLOAT, 4) } static void test_pack_LPBITMAP(void) { /* LPBITMAP */ - TEST_TYPE(LPBITMAP, 4, 4); - TEST_TYPE_POINTER(LPBITMAP, 24, 4); + TEST_TYPE_SIZE (LPBITMAP, 4) + TEST_TYPE_ALIGN (LPBITMAP, 4) + TEST_TARGET_SIZE (LPBITMAP, 24) + TEST_TARGET_ALIGN(LPBITMAP, 4) } static void test_pack_LPBITMAPCOREHEADER(void) { /* LPBITMAPCOREHEADER */ - TEST_TYPE(LPBITMAPCOREHEADER, 4, 4); - TEST_TYPE_POINTER(LPBITMAPCOREHEADER, 12, 4); + TEST_TYPE_SIZE (LPBITMAPCOREHEADER, 4) + TEST_TYPE_ALIGN (LPBITMAPCOREHEADER, 4) + TEST_TARGET_SIZE (LPBITMAPCOREHEADER, 12) + TEST_TARGET_ALIGN(LPBITMAPCOREHEADER, 4) } static void test_pack_LPBITMAPCOREINFO(void) { /* LPBITMAPCOREINFO */ - TEST_TYPE(LPBITMAPCOREINFO, 4, 4); - TEST_TYPE_POINTER(LPBITMAPCOREINFO, 16, 4); + TEST_TYPE_SIZE (LPBITMAPCOREINFO, 4) + TEST_TYPE_ALIGN (LPBITMAPCOREINFO, 4) + TEST_TARGET_SIZE (LPBITMAPCOREINFO, 16) + TEST_TARGET_ALIGN(LPBITMAPCOREINFO, 4) } static void test_pack_LPBITMAPFILEHEADER(void) { /* LPBITMAPFILEHEADER */ - TEST_TYPE(LPBITMAPFILEHEADER, 4, 4); - TEST_TYPE_POINTER(LPBITMAPFILEHEADER, 14, 2); + TEST_TYPE_SIZE (LPBITMAPFILEHEADER, 4) + TEST_TYPE_ALIGN (LPBITMAPFILEHEADER, 4) + TEST_TARGET_SIZE (LPBITMAPFILEHEADER, 14) + TEST_TARGET_ALIGN(LPBITMAPFILEHEADER, 2) } static void test_pack_LPBITMAPINFO(void) { /* LPBITMAPINFO */ - TEST_TYPE(LPBITMAPINFO, 4, 4); - TEST_TYPE_POINTER(LPBITMAPINFO, 44, 4); + TEST_TYPE_SIZE (LPBITMAPINFO, 4) + TEST_TYPE_ALIGN (LPBITMAPINFO, 4) + TEST_TARGET_SIZE (LPBITMAPINFO, 44) + TEST_TARGET_ALIGN(LPBITMAPINFO, 4) } static void test_pack_LPBITMAPINFOHEADER(void) { /* LPBITMAPINFOHEADER */ - TEST_TYPE(LPBITMAPINFOHEADER, 4, 4); - TEST_TYPE_POINTER(LPBITMAPINFOHEADER, 40, 4); + TEST_TYPE_SIZE (LPBITMAPINFOHEADER, 4) + TEST_TYPE_ALIGN (LPBITMAPINFOHEADER, 4) + TEST_TARGET_SIZE (LPBITMAPINFOHEADER, 40) + TEST_TARGET_ALIGN(LPBITMAPINFOHEADER, 4) } static void test_pack_LPBITMAPV5HEADER(void) { /* LPBITMAPV5HEADER */ - TEST_TYPE(LPBITMAPV5HEADER, 4, 4); - TEST_TYPE_POINTER(LPBITMAPV5HEADER, 124, 4); + TEST_TYPE_SIZE (LPBITMAPV5HEADER, 4) + TEST_TYPE_ALIGN (LPBITMAPV5HEADER, 4) + TEST_TARGET_SIZE (LPBITMAPV5HEADER, 124) + TEST_TARGET_ALIGN(LPBITMAPV5HEADER, 4) } static void test_pack_LPCHARSETINFO(void) { /* LPCHARSETINFO */ - TEST_TYPE(LPCHARSETINFO, 4, 4); - TEST_TYPE_POINTER(LPCHARSETINFO, 32, 4); + TEST_TYPE_SIZE (LPCHARSETINFO, 4) + TEST_TYPE_ALIGN (LPCHARSETINFO, 4) + TEST_TARGET_SIZE (LPCHARSETINFO, 32) + TEST_TARGET_ALIGN(LPCHARSETINFO, 4) } static void test_pack_LPCIEXYZ(void) { /* LPCIEXYZ */ - TEST_TYPE(LPCIEXYZ, 4, 4); - TEST_TYPE_POINTER(LPCIEXYZ, 12, 4); + TEST_TYPE_SIZE (LPCIEXYZ, 4) + TEST_TYPE_ALIGN (LPCIEXYZ, 4) + TEST_TARGET_SIZE (LPCIEXYZ, 12) + TEST_TARGET_ALIGN(LPCIEXYZ, 4) } static void test_pack_LPCIEXYZTRIPLE(void) { /* LPCIEXYZTRIPLE */ - TEST_TYPE(LPCIEXYZTRIPLE, 4, 4); - TEST_TYPE_POINTER(LPCIEXYZTRIPLE, 36, 4); + TEST_TYPE_SIZE (LPCIEXYZTRIPLE, 4) + TEST_TYPE_ALIGN (LPCIEXYZTRIPLE, 4) + TEST_TARGET_SIZE (LPCIEXYZTRIPLE, 36) + TEST_TARGET_ALIGN(LPCIEXYZTRIPLE, 4) } static void test_pack_LPCOLORADJUSTMENT(void) { /* LPCOLORADJUSTMENT */ - TEST_TYPE(LPCOLORADJUSTMENT, 4, 4); - TEST_TYPE_POINTER(LPCOLORADJUSTMENT, 24, 2); + TEST_TYPE_SIZE (LPCOLORADJUSTMENT, 4) + TEST_TYPE_ALIGN (LPCOLORADJUSTMENT, 4) + TEST_TARGET_SIZE (LPCOLORADJUSTMENT, 24) + TEST_TARGET_ALIGN(LPCOLORADJUSTMENT, 2) } static void test_pack_LPDEVMODEA(void) { /* LPDEVMODEA */ - TEST_TYPE(LPDEVMODEA, 4, 4); + TEST_TYPE_SIZE (LPDEVMODEA, 4) + TEST_TYPE_ALIGN (LPDEVMODEA, 4) } static void test_pack_LPDEVMODEW(void) { /* LPDEVMODEW */ - TEST_TYPE(LPDEVMODEW, 4, 4); + TEST_TYPE_SIZE (LPDEVMODEW, 4) + TEST_TYPE_ALIGN (LPDEVMODEW, 4) } static void test_pack_LPDIBSECTION(void) { /* LPDIBSECTION */ - TEST_TYPE(LPDIBSECTION, 4, 4); - TEST_TYPE_POINTER(LPDIBSECTION, 84, 4); + TEST_TYPE_SIZE (LPDIBSECTION, 4) + TEST_TYPE_ALIGN (LPDIBSECTION, 4) + TEST_TARGET_SIZE (LPDIBSECTION, 84) + TEST_TARGET_ALIGN(LPDIBSECTION, 4) } static void test_pack_LPDISPLAY_DEVICEA(void) { /* LPDISPLAY_DEVICEA */ - TEST_TYPE(LPDISPLAY_DEVICEA, 4, 4); - TEST_TYPE_POINTER(LPDISPLAY_DEVICEA, 424, 4); + TEST_TYPE_SIZE (LPDISPLAY_DEVICEA, 4) + TEST_TYPE_ALIGN (LPDISPLAY_DEVICEA, 4) + TEST_TARGET_SIZE (LPDISPLAY_DEVICEA, 424) + TEST_TARGET_ALIGN(LPDISPLAY_DEVICEA, 4) } static void test_pack_LPDISPLAY_DEVICEW(void) { /* LPDISPLAY_DEVICEW */ - TEST_TYPE(LPDISPLAY_DEVICEW, 4, 4); - TEST_TYPE_POINTER(LPDISPLAY_DEVICEW, 840, 4); + TEST_TYPE_SIZE (LPDISPLAY_DEVICEW, 4) + TEST_TYPE_ALIGN (LPDISPLAY_DEVICEW, 4) + TEST_TARGET_SIZE (LPDISPLAY_DEVICEW, 840) + TEST_TARGET_ALIGN(LPDISPLAY_DEVICEW, 4) } static void test_pack_LPDOCINFOA(void) { /* LPDOCINFOA */ - TEST_TYPE(LPDOCINFOA, 4, 4); - TEST_TYPE_POINTER(LPDOCINFOA, 20, 4); + TEST_TYPE_SIZE (LPDOCINFOA, 4) + TEST_TYPE_ALIGN (LPDOCINFOA, 4) + TEST_TARGET_SIZE (LPDOCINFOA, 20) + TEST_TARGET_ALIGN(LPDOCINFOA, 4) } static void test_pack_LPDOCINFOW(void) { /* LPDOCINFOW */ - TEST_TYPE(LPDOCINFOW, 4, 4); - TEST_TYPE_POINTER(LPDOCINFOW, 20, 4); + TEST_TYPE_SIZE (LPDOCINFOW, 4) + TEST_TYPE_ALIGN (LPDOCINFOW, 4) + TEST_TARGET_SIZE (LPDOCINFOW, 20) + TEST_TARGET_ALIGN(LPDOCINFOW, 4) } static void test_pack_LPENHMETAHEADER(void) { /* LPENHMETAHEADER */ - TEST_TYPE(LPENHMETAHEADER, 4, 4); - TEST_TYPE_POINTER(LPENHMETAHEADER, 108, 4); + TEST_TYPE_SIZE (LPENHMETAHEADER, 4) + TEST_TYPE_ALIGN (LPENHMETAHEADER, 4) + TEST_TARGET_SIZE (LPENHMETAHEADER, 108) + TEST_TARGET_ALIGN(LPENHMETAHEADER, 4) } static void test_pack_LPENHMETARECORD(void) { /* LPENHMETARECORD */ - TEST_TYPE(LPENHMETARECORD, 4, 4); - TEST_TYPE_POINTER(LPENHMETARECORD, 12, 4); + TEST_TYPE_SIZE (LPENHMETARECORD, 4) + TEST_TYPE_ALIGN (LPENHMETARECORD, 4) + TEST_TARGET_SIZE (LPENHMETARECORD, 12) + TEST_TARGET_ALIGN(LPENHMETARECORD, 4) } static void test_pack_LPENUMLOGFONTA(void) { /* LPENUMLOGFONTA */ - TEST_TYPE(LPENUMLOGFONTA, 4, 4); - TEST_TYPE_POINTER(LPENUMLOGFONTA, 156, 4); + TEST_TYPE_SIZE (LPENUMLOGFONTA, 4) + TEST_TYPE_ALIGN (LPENUMLOGFONTA, 4) + TEST_TARGET_SIZE (LPENUMLOGFONTA, 156) + TEST_TARGET_ALIGN(LPENUMLOGFONTA, 4) } static void test_pack_LPENUMLOGFONTEXA(void) { /* LPENUMLOGFONTEXA */ - TEST_TYPE(LPENUMLOGFONTEXA, 4, 4); - TEST_TYPE_POINTER(LPENUMLOGFONTEXA, 188, 4); + TEST_TYPE_SIZE (LPENUMLOGFONTEXA, 4) + TEST_TYPE_ALIGN (LPENUMLOGFONTEXA, 4) + TEST_TARGET_SIZE (LPENUMLOGFONTEXA, 188) + TEST_TARGET_ALIGN(LPENUMLOGFONTEXA, 4) } static void test_pack_LPENUMLOGFONTEXW(void) { /* LPENUMLOGFONTEXW */ - TEST_TYPE(LPENUMLOGFONTEXW, 4, 4); - TEST_TYPE_POINTER(LPENUMLOGFONTEXW, 348, 4); + TEST_TYPE_SIZE (LPENUMLOGFONTEXW, 4) + TEST_TYPE_ALIGN (LPENUMLOGFONTEXW, 4) + TEST_TARGET_SIZE (LPENUMLOGFONTEXW, 348) + TEST_TARGET_ALIGN(LPENUMLOGFONTEXW, 4) } static void test_pack_LPENUMLOGFONTW(void) { /* LPENUMLOGFONTW */ - TEST_TYPE(LPENUMLOGFONTW, 4, 4); - TEST_TYPE_POINTER(LPENUMLOGFONTW, 284, 4); + TEST_TYPE_SIZE (LPENUMLOGFONTW, 4) + TEST_TYPE_ALIGN (LPENUMLOGFONTW, 4) + TEST_TARGET_SIZE (LPENUMLOGFONTW, 284) + TEST_TARGET_ALIGN(LPENUMLOGFONTW, 4) } static void test_pack_LPEXTLOGFONTA(void) { /* LPEXTLOGFONTA */ - TEST_TYPE(LPEXTLOGFONTA, 4, 4); - TEST_TYPE_POINTER(LPEXTLOGFONTA, 192, 4); + TEST_TYPE_SIZE (LPEXTLOGFONTA, 4) + TEST_TYPE_ALIGN (LPEXTLOGFONTA, 4) + TEST_TARGET_SIZE (LPEXTLOGFONTA, 192) + TEST_TARGET_ALIGN(LPEXTLOGFONTA, 4) } static void test_pack_LPEXTLOGFONTW(void) { /* LPEXTLOGFONTW */ - TEST_TYPE(LPEXTLOGFONTW, 4, 4); - TEST_TYPE_POINTER(LPEXTLOGFONTW, 320, 4); + TEST_TYPE_SIZE (LPEXTLOGFONTW, 4) + TEST_TYPE_ALIGN (LPEXTLOGFONTW, 4) + TEST_TARGET_SIZE (LPEXTLOGFONTW, 320) + TEST_TARGET_ALIGN(LPEXTLOGFONTW, 4) } static void test_pack_LPEXTLOGPEN(void) { /* LPEXTLOGPEN */ - TEST_TYPE(LPEXTLOGPEN, 4, 4); - TEST_TYPE_POINTER(LPEXTLOGPEN, 28, 4); + TEST_TYPE_SIZE (LPEXTLOGPEN, 4) + TEST_TYPE_ALIGN (LPEXTLOGPEN, 4) + TEST_TARGET_SIZE (LPEXTLOGPEN, 28) + TEST_TARGET_ALIGN(LPEXTLOGPEN, 4) } static void test_pack_LPFONTSIGNATURE(void) { /* LPFONTSIGNATURE */ - TEST_TYPE(LPFONTSIGNATURE, 4, 4); - TEST_TYPE_POINTER(LPFONTSIGNATURE, 24, 4); + TEST_TYPE_SIZE (LPFONTSIGNATURE, 4) + TEST_TYPE_ALIGN (LPFONTSIGNATURE, 4) + TEST_TARGET_SIZE (LPFONTSIGNATURE, 24) + TEST_TARGET_ALIGN(LPFONTSIGNATURE, 4) } static void test_pack_LPGCP_RESULTSA(void) { /* LPGCP_RESULTSA */ - TEST_TYPE(LPGCP_RESULTSA, 4, 4); - TEST_TYPE_POINTER(LPGCP_RESULTSA, 36, 4); + TEST_TYPE_SIZE (LPGCP_RESULTSA, 4) + TEST_TYPE_ALIGN (LPGCP_RESULTSA, 4) + TEST_TARGET_SIZE (LPGCP_RESULTSA, 36) + TEST_TARGET_ALIGN(LPGCP_RESULTSA, 4) } static void test_pack_LPGCP_RESULTSW(void) { /* LPGCP_RESULTSW */ - TEST_TYPE(LPGCP_RESULTSW, 4, 4); - TEST_TYPE_POINTER(LPGCP_RESULTSW, 36, 4); + TEST_TYPE_SIZE (LPGCP_RESULTSW, 4) + TEST_TYPE_ALIGN (LPGCP_RESULTSW, 4) + TEST_TARGET_SIZE (LPGCP_RESULTSW, 36) + TEST_TARGET_ALIGN(LPGCP_RESULTSW, 4) } static void test_pack_LPGLYPHMETRICS(void) { /* LPGLYPHMETRICS */ - TEST_TYPE(LPGLYPHMETRICS, 4, 4); - TEST_TYPE_POINTER(LPGLYPHMETRICS, 20, 4); + TEST_TYPE_SIZE (LPGLYPHMETRICS, 4) + TEST_TYPE_ALIGN (LPGLYPHMETRICS, 4) + TEST_TARGET_SIZE (LPGLYPHMETRICS, 20) + TEST_TARGET_ALIGN(LPGLYPHMETRICS, 4) } static void test_pack_LPGLYPHMETRICSFLOAT(void) { /* LPGLYPHMETRICSFLOAT */ - TEST_TYPE(LPGLYPHMETRICSFLOAT, 4, 4); - TEST_TYPE_POINTER(LPGLYPHMETRICSFLOAT, 24, 4); + TEST_TYPE_SIZE (LPGLYPHMETRICSFLOAT, 4) + TEST_TYPE_ALIGN (LPGLYPHMETRICSFLOAT, 4) + TEST_TARGET_SIZE (LPGLYPHMETRICSFLOAT, 24) + TEST_TARGET_ALIGN(LPGLYPHMETRICSFLOAT, 4) } static void test_pack_LPGRADIENT_RECT(void) { /* LPGRADIENT_RECT */ - TEST_TYPE(LPGRADIENT_RECT, 4, 4); - TEST_TYPE_POINTER(LPGRADIENT_RECT, 8, 4); + TEST_TYPE_SIZE (LPGRADIENT_RECT, 4) + TEST_TYPE_ALIGN (LPGRADIENT_RECT, 4) + TEST_TARGET_SIZE (LPGRADIENT_RECT, 8) + TEST_TARGET_ALIGN(LPGRADIENT_RECT, 4) } static void test_pack_LPGRADIENT_TRIANGLE(void) { /* LPGRADIENT_TRIANGLE */ - TEST_TYPE(LPGRADIENT_TRIANGLE, 4, 4); - TEST_TYPE_POINTER(LPGRADIENT_TRIANGLE, 12, 4); + TEST_TYPE_SIZE (LPGRADIENT_TRIANGLE, 4) + TEST_TYPE_ALIGN (LPGRADIENT_TRIANGLE, 4) + TEST_TARGET_SIZE (LPGRADIENT_TRIANGLE, 12) + TEST_TARGET_ALIGN(LPGRADIENT_TRIANGLE, 4) } static void test_pack_LPHANDLETABLE(void) { /* LPHANDLETABLE */ - TEST_TYPE(LPHANDLETABLE, 4, 4); - TEST_TYPE_POINTER(LPHANDLETABLE, 4, 4); + TEST_TYPE_SIZE (LPHANDLETABLE, 4) + TEST_TYPE_ALIGN (LPHANDLETABLE, 4) + TEST_TARGET_SIZE (LPHANDLETABLE, 4) + TEST_TARGET_ALIGN(LPHANDLETABLE, 4) } static void test_pack_LPKERNINGPAIR(void) { /* LPKERNINGPAIR */ - TEST_TYPE(LPKERNINGPAIR, 4, 4); - TEST_TYPE_POINTER(LPKERNINGPAIR, 8, 4); + TEST_TYPE_SIZE (LPKERNINGPAIR, 4) + TEST_TYPE_ALIGN (LPKERNINGPAIR, 4) + TEST_TARGET_SIZE (LPKERNINGPAIR, 8) + TEST_TARGET_ALIGN(LPKERNINGPAIR, 4) } static void test_pack_LPLAYERPLANEDESCRIPTOR(void) { /* LPLAYERPLANEDESCRIPTOR */ - TEST_TYPE(LPLAYERPLANEDESCRIPTOR, 4, 4); - TEST_TYPE_POINTER(LPLAYERPLANEDESCRIPTOR, 32, 4); + TEST_TYPE_SIZE (LPLAYERPLANEDESCRIPTOR, 4) + TEST_TYPE_ALIGN (LPLAYERPLANEDESCRIPTOR, 4) + TEST_TARGET_SIZE (LPLAYERPLANEDESCRIPTOR, 32) + TEST_TARGET_ALIGN(LPLAYERPLANEDESCRIPTOR, 4) } static void test_pack_LPLOCALESIGNATURE(void) { /* LPLOCALESIGNATURE */ - TEST_TYPE(LPLOCALESIGNATURE, 4, 4); - TEST_TYPE_POINTER(LPLOCALESIGNATURE, 32, 4); + TEST_TYPE_SIZE (LPLOCALESIGNATURE, 4) + TEST_TYPE_ALIGN (LPLOCALESIGNATURE, 4) + TEST_TARGET_SIZE (LPLOCALESIGNATURE, 32) + TEST_TARGET_ALIGN(LPLOCALESIGNATURE, 4) } static void test_pack_LPLOGBRUSH(void) { /* LPLOGBRUSH */ - TEST_TYPE(LPLOGBRUSH, 4, 4); - TEST_TYPE_POINTER(LPLOGBRUSH, 12, 4); + TEST_TYPE_SIZE (LPLOGBRUSH, 4) + TEST_TYPE_ALIGN (LPLOGBRUSH, 4) + TEST_TARGET_SIZE (LPLOGBRUSH, 12) + TEST_TARGET_ALIGN(LPLOGBRUSH, 4) } static void test_pack_LPLOGCOLORSPACEA(void) { /* LPLOGCOLORSPACEA */ - TEST_TYPE(LPLOGCOLORSPACEA, 4, 4); - TEST_TYPE_POINTER(LPLOGCOLORSPACEA, 328, 4); + TEST_TYPE_SIZE (LPLOGCOLORSPACEA, 4) + TEST_TYPE_ALIGN (LPLOGCOLORSPACEA, 4) + TEST_TARGET_SIZE (LPLOGCOLORSPACEA, 328) + TEST_TARGET_ALIGN(LPLOGCOLORSPACEA, 4) } static void test_pack_LPLOGCOLORSPACEW(void) { /* LPLOGCOLORSPACEW */ - TEST_TYPE(LPLOGCOLORSPACEW, 4, 4); - TEST_TYPE_POINTER(LPLOGCOLORSPACEW, 588, 4); + TEST_TYPE_SIZE (LPLOGCOLORSPACEW, 4) + TEST_TYPE_ALIGN (LPLOGCOLORSPACEW, 4) + TEST_TARGET_SIZE (LPLOGCOLORSPACEW, 588) + TEST_TARGET_ALIGN(LPLOGCOLORSPACEW, 4) } static void test_pack_LPLOGFONTA(void) { /* LPLOGFONTA */ - TEST_TYPE(LPLOGFONTA, 4, 4); - TEST_TYPE_POINTER(LPLOGFONTA, 60, 4); + TEST_TYPE_SIZE (LPLOGFONTA, 4) + TEST_TYPE_ALIGN (LPLOGFONTA, 4) + TEST_TARGET_SIZE (LPLOGFONTA, 60) + TEST_TARGET_ALIGN(LPLOGFONTA, 4) } static void test_pack_LPLOGFONTW(void) { /* LPLOGFONTW */ - TEST_TYPE(LPLOGFONTW, 4, 4); - TEST_TYPE_POINTER(LPLOGFONTW, 92, 4); + TEST_TYPE_SIZE (LPLOGFONTW, 4) + TEST_TYPE_ALIGN (LPLOGFONTW, 4) + TEST_TARGET_SIZE (LPLOGFONTW, 92) + TEST_TARGET_ALIGN(LPLOGFONTW, 4) } static void test_pack_LPLOGPEN(void) { /* LPLOGPEN */ - TEST_TYPE(LPLOGPEN, 4, 4); - TEST_TYPE_POINTER(LPLOGPEN, 16, 4); + TEST_TYPE_SIZE (LPLOGPEN, 4) + TEST_TYPE_ALIGN (LPLOGPEN, 4) + TEST_TARGET_SIZE (LPLOGPEN, 16) + TEST_TARGET_ALIGN(LPLOGPEN, 4) } static void test_pack_LPMAT2(void) { /* LPMAT2 */ - TEST_TYPE(LPMAT2, 4, 4); - TEST_TYPE_POINTER(LPMAT2, 16, 2); + TEST_TYPE_SIZE (LPMAT2, 4) + TEST_TYPE_ALIGN (LPMAT2, 4) + TEST_TARGET_SIZE (LPMAT2, 16) + TEST_TARGET_ALIGN(LPMAT2, 2) } static void test_pack_LPMETAFILEPICT(void) { /* LPMETAFILEPICT */ - TEST_TYPE(LPMETAFILEPICT, 4, 4); - TEST_TYPE_POINTER(LPMETAFILEPICT, 16, 4); + TEST_TYPE_SIZE (LPMETAFILEPICT, 4) + TEST_TYPE_ALIGN (LPMETAFILEPICT, 4) + TEST_TARGET_SIZE (LPMETAFILEPICT, 16) + TEST_TARGET_ALIGN(LPMETAFILEPICT, 4) } static void test_pack_LPMETAHEADER(void) { /* LPMETAHEADER */ - TEST_TYPE(LPMETAHEADER, 4, 4); - TEST_TYPE_POINTER(LPMETAHEADER, 18, 2); + TEST_TYPE_SIZE (LPMETAHEADER, 4) + TEST_TYPE_ALIGN (LPMETAHEADER, 4) + TEST_TARGET_SIZE (LPMETAHEADER, 18) + TEST_TARGET_ALIGN(LPMETAHEADER, 2) } static void test_pack_LPMETARECORD(void) { /* LPMETARECORD */ - TEST_TYPE(LPMETARECORD, 4, 4); - TEST_TYPE_POINTER(LPMETARECORD, 8, 4); + TEST_TYPE_SIZE (LPMETARECORD, 4) + TEST_TYPE_ALIGN (LPMETARECORD, 4) + TEST_TARGET_SIZE (LPMETARECORD, 8) + TEST_TARGET_ALIGN(LPMETARECORD, 4) } static void test_pack_LPNEWTEXTMETRICA(void) { /* LPNEWTEXTMETRICA */ - TEST_TYPE(LPNEWTEXTMETRICA, 4, 4); - TEST_TYPE_POINTER(LPNEWTEXTMETRICA, 72, 4); + TEST_TYPE_SIZE (LPNEWTEXTMETRICA, 4) + TEST_TYPE_ALIGN (LPNEWTEXTMETRICA, 4) + TEST_TARGET_SIZE (LPNEWTEXTMETRICA, 72) + TEST_TARGET_ALIGN(LPNEWTEXTMETRICA, 4) } static void test_pack_LPNEWTEXTMETRICW(void) { /* LPNEWTEXTMETRICW */ - TEST_TYPE(LPNEWTEXTMETRICW, 4, 4); - TEST_TYPE_POINTER(LPNEWTEXTMETRICW, 76, 4); + TEST_TYPE_SIZE (LPNEWTEXTMETRICW, 4) + TEST_TYPE_ALIGN (LPNEWTEXTMETRICW, 4) + TEST_TARGET_SIZE (LPNEWTEXTMETRICW, 76) + TEST_TARGET_ALIGN(LPNEWTEXTMETRICW, 4) } static void test_pack_LPOUTLINETEXTMETRICA(void) { /* LPOUTLINETEXTMETRICA */ - TEST_TYPE(LPOUTLINETEXTMETRICA, 4, 4); - TEST_TYPE_POINTER(LPOUTLINETEXTMETRICA, 212, 4); + TEST_TYPE_SIZE (LPOUTLINETEXTMETRICA, 4) + TEST_TYPE_ALIGN (LPOUTLINETEXTMETRICA, 4) + TEST_TARGET_SIZE (LPOUTLINETEXTMETRICA, 212) + TEST_TARGET_ALIGN(LPOUTLINETEXTMETRICA, 4) } static void test_pack_LPOUTLINETEXTMETRICW(void) { /* LPOUTLINETEXTMETRICW */ - TEST_TYPE(LPOUTLINETEXTMETRICW, 4, 4); - TEST_TYPE_POINTER(LPOUTLINETEXTMETRICW, 216, 4); + TEST_TYPE_SIZE (LPOUTLINETEXTMETRICW, 4) + TEST_TYPE_ALIGN (LPOUTLINETEXTMETRICW, 4) + TEST_TARGET_SIZE (LPOUTLINETEXTMETRICW, 216) + TEST_TARGET_ALIGN(LPOUTLINETEXTMETRICW, 4) } static void test_pack_LPPANOSE(void) { /* LPPANOSE */ - TEST_TYPE(LPPANOSE, 4, 4); - TEST_TYPE_POINTER(LPPANOSE, 10, 1); + TEST_TYPE_SIZE (LPPANOSE, 4) + TEST_TYPE_ALIGN (LPPANOSE, 4) + TEST_TARGET_SIZE (LPPANOSE, 10) + TEST_TARGET_ALIGN(LPPANOSE, 1) } static void test_pack_LPPELARRAY(void) { /* LPPELARRAY */ - TEST_TYPE(LPPELARRAY, 4, 4); - TEST_TYPE_POINTER(LPPELARRAY, 20, 4); + TEST_TYPE_SIZE (LPPELARRAY, 4) + TEST_TYPE_ALIGN (LPPELARRAY, 4) + TEST_TARGET_SIZE (LPPELARRAY, 20) + TEST_TARGET_ALIGN(LPPELARRAY, 4) } static void test_pack_LPPIXELFORMATDESCRIPTOR(void) { /* LPPIXELFORMATDESCRIPTOR */ - TEST_TYPE(LPPIXELFORMATDESCRIPTOR, 4, 4); - TEST_TYPE_POINTER(LPPIXELFORMATDESCRIPTOR, 40, 4); + TEST_TYPE_SIZE (LPPIXELFORMATDESCRIPTOR, 4) + TEST_TYPE_ALIGN (LPPIXELFORMATDESCRIPTOR, 4) + TEST_TARGET_SIZE (LPPIXELFORMATDESCRIPTOR, 40) + TEST_TARGET_ALIGN(LPPIXELFORMATDESCRIPTOR, 4) } static void test_pack_LPPOINTFX(void) { /* LPPOINTFX */ - TEST_TYPE(LPPOINTFX, 4, 4); - TEST_TYPE_POINTER(LPPOINTFX, 8, 2); + TEST_TYPE_SIZE (LPPOINTFX, 4) + TEST_TYPE_ALIGN (LPPOINTFX, 4) + TEST_TARGET_SIZE (LPPOINTFX, 8) + TEST_TARGET_ALIGN(LPPOINTFX, 2) } static void test_pack_LPPOLYTEXTA(void) { /* LPPOLYTEXTA */ - TEST_TYPE(LPPOLYTEXTA, 4, 4); - TEST_TYPE_POINTER(LPPOLYTEXTA, 40, 4); + TEST_TYPE_SIZE (LPPOLYTEXTA, 4) + TEST_TYPE_ALIGN (LPPOLYTEXTA, 4) + TEST_TARGET_SIZE (LPPOLYTEXTA, 40) + TEST_TARGET_ALIGN(LPPOLYTEXTA, 4) } static void test_pack_LPPOLYTEXTW(void) { /* LPPOLYTEXTW */ - TEST_TYPE(LPPOLYTEXTW, 4, 4); - TEST_TYPE_POINTER(LPPOLYTEXTW, 40, 4); + TEST_TYPE_SIZE (LPPOLYTEXTW, 4) + TEST_TYPE_ALIGN (LPPOLYTEXTW, 4) + TEST_TARGET_SIZE (LPPOLYTEXTW, 40) + TEST_TARGET_ALIGN(LPPOLYTEXTW, 4) } static void test_pack_LPRASTERIZER_STATUS(void) { /* LPRASTERIZER_STATUS */ - TEST_TYPE(LPRASTERIZER_STATUS, 4, 4); - TEST_TYPE_POINTER(LPRASTERIZER_STATUS, 6, 2); + TEST_TYPE_SIZE (LPRASTERIZER_STATUS, 4) + TEST_TYPE_ALIGN (LPRASTERIZER_STATUS, 4) + TEST_TARGET_SIZE (LPRASTERIZER_STATUS, 6) + TEST_TARGET_ALIGN(LPRASTERIZER_STATUS, 2) } static void test_pack_LPRGBQUAD(void) { /* LPRGBQUAD */ - TEST_TYPE(LPRGBQUAD, 4, 4); - TEST_TYPE_POINTER(LPRGBQUAD, 4, 1); + TEST_TYPE_SIZE (LPRGBQUAD, 4) + TEST_TYPE_ALIGN (LPRGBQUAD, 4) + TEST_TARGET_SIZE (LPRGBQUAD, 4) + TEST_TARGET_ALIGN(LPRGBQUAD, 1) } static void test_pack_LPRGNDATA(void) { /* LPRGNDATA */ - TEST_TYPE(LPRGNDATA, 4, 4); - TEST_TYPE_POINTER(LPRGNDATA, 36, 4); + TEST_TYPE_SIZE (LPRGNDATA, 4) + TEST_TYPE_ALIGN (LPRGNDATA, 4) + TEST_TARGET_SIZE (LPRGNDATA, 36) + TEST_TARGET_ALIGN(LPRGNDATA, 4) } static void test_pack_LPTEXTMETRICA(void) { /* LPTEXTMETRICA */ - TEST_TYPE(LPTEXTMETRICA, 4, 4); - TEST_TYPE_POINTER(LPTEXTMETRICA, 56, 4); + TEST_TYPE_SIZE (LPTEXTMETRICA, 4) + TEST_TYPE_ALIGN (LPTEXTMETRICA, 4) + TEST_TARGET_SIZE (LPTEXTMETRICA, 56) + TEST_TARGET_ALIGN(LPTEXTMETRICA, 4) } static void test_pack_LPTEXTMETRICW(void) { /* LPTEXTMETRICW */ - TEST_TYPE(LPTEXTMETRICW, 4, 4); - TEST_TYPE_POINTER(LPTEXTMETRICW, 60, 4); + TEST_TYPE_SIZE (LPTEXTMETRICW, 4) + TEST_TYPE_ALIGN (LPTEXTMETRICW, 4) + TEST_TARGET_SIZE (LPTEXTMETRICW, 60) + TEST_TARGET_ALIGN(LPTEXTMETRICW, 4) } static void test_pack_LPTRIVERTEX(void) { /* LPTRIVERTEX */ - TEST_TYPE(LPTRIVERTEX, 4, 4); - TEST_TYPE_POINTER(LPTRIVERTEX, 16, 4); + TEST_TYPE_SIZE (LPTRIVERTEX, 4) + TEST_TYPE_ALIGN (LPTRIVERTEX, 4) + TEST_TARGET_SIZE (LPTRIVERTEX, 16) + TEST_TARGET_ALIGN(LPTRIVERTEX, 4) } static void test_pack_LPTTPOLYCURVE(void) { /* LPTTPOLYCURVE */ - TEST_TYPE(LPTTPOLYCURVE, 4, 4); - TEST_TYPE_POINTER(LPTTPOLYCURVE, 12, 2); + TEST_TYPE_SIZE (LPTTPOLYCURVE, 4) + TEST_TYPE_ALIGN (LPTTPOLYCURVE, 4) + TEST_TARGET_SIZE (LPTTPOLYCURVE, 12) + TEST_TARGET_ALIGN(LPTTPOLYCURVE, 2) } static void test_pack_LPTTPOLYGONHEADER(void) { /* LPTTPOLYGONHEADER */ - TEST_TYPE(LPTTPOLYGONHEADER, 4, 4); - TEST_TYPE_POINTER(LPTTPOLYGONHEADER, 16, 4); + TEST_TYPE_SIZE (LPTTPOLYGONHEADER, 4) + TEST_TYPE_ALIGN (LPTTPOLYGONHEADER, 4) + TEST_TARGET_SIZE (LPTTPOLYGONHEADER, 16) + TEST_TARGET_ALIGN(LPTTPOLYGONHEADER, 4) } static void test_pack_LPXFORM(void) { /* LPXFORM */ - TEST_TYPE(LPXFORM, 4, 4); - TEST_TYPE_POINTER(LPXFORM, 24, 4); + TEST_TYPE_SIZE (LPXFORM, 4) + TEST_TYPE_ALIGN (LPXFORM, 4) + TEST_TARGET_SIZE (LPXFORM, 24) + TEST_TARGET_ALIGN(LPXFORM, 4) } static void test_pack_MAT2(void) { /* MAT2 (pack 4) */ - TEST_TYPE(MAT2, 16, 2); - TEST_FIELD(MAT2, eM11, 0, 4, 2); - TEST_FIELD(MAT2, eM12, 4, 4, 2); - TEST_FIELD(MAT2, eM21, 8, 4, 2); - TEST_FIELD(MAT2, eM22, 12, 4, 2); + TEST_TYPE_SIZE (MAT2, 16) + TEST_TYPE_ALIGN (MAT2, 2) + TEST_FIELD_SIZE (MAT2, eM11, 4) + TEST_FIELD_ALIGN (MAT2, eM11, 2) + TEST_FIELD_OFFSET(MAT2, eM11, 0) + TEST_FIELD_SIZE (MAT2, eM12, 4) + TEST_FIELD_ALIGN (MAT2, eM12, 2) + TEST_FIELD_OFFSET(MAT2, eM12, 4) + TEST_FIELD_SIZE (MAT2, eM21, 4) + TEST_FIELD_ALIGN (MAT2, eM21, 2) + TEST_FIELD_OFFSET(MAT2, eM21, 8) + TEST_FIELD_SIZE (MAT2, eM22, 4) + TEST_FIELD_ALIGN (MAT2, eM22, 2) + TEST_FIELD_OFFSET(MAT2, eM22, 12) } static void test_pack_METAFILEPICT(void) { /* METAFILEPICT (pack 4) */ - TEST_TYPE(METAFILEPICT, 16, 4); - TEST_FIELD(METAFILEPICT, mm, 0, 4, 4); - TEST_FIELD(METAFILEPICT, xExt, 4, 4, 4); - TEST_FIELD(METAFILEPICT, yExt, 8, 4, 4); - TEST_FIELD(METAFILEPICT, hMF, 12, 4, 4); + TEST_TYPE_SIZE (METAFILEPICT, 16) + TEST_TYPE_ALIGN (METAFILEPICT, 4) + TEST_FIELD_SIZE (METAFILEPICT, mm, 4) + TEST_FIELD_ALIGN (METAFILEPICT, mm, 4) + TEST_FIELD_OFFSET(METAFILEPICT, mm, 0) + TEST_FIELD_SIZE (METAFILEPICT, xExt, 4) + TEST_FIELD_ALIGN (METAFILEPICT, xExt, 4) + TEST_FIELD_OFFSET(METAFILEPICT, xExt, 4) + TEST_FIELD_SIZE (METAFILEPICT, yExt, 4) + TEST_FIELD_ALIGN (METAFILEPICT, yExt, 4) + TEST_FIELD_OFFSET(METAFILEPICT, yExt, 8) + TEST_FIELD_SIZE (METAFILEPICT, hMF, 4) + TEST_FIELD_ALIGN (METAFILEPICT, hMF, 4) + TEST_FIELD_OFFSET(METAFILEPICT, hMF, 12) } static void test_pack_METAHEADER(void) { /* METAHEADER (pack 2) */ - TEST_TYPE(METAHEADER, 18, 2); - TEST_FIELD(METAHEADER, mtType, 0, 2, 2); - TEST_FIELD(METAHEADER, mtHeaderSize, 2, 2, 2); - TEST_FIELD(METAHEADER, mtVersion, 4, 2, 2); - TEST_FIELD(METAHEADER, mtSize, 6, 4, 2); - TEST_FIELD(METAHEADER, mtNoObjects, 10, 2, 2); - TEST_FIELD(METAHEADER, mtMaxRecord, 12, 4, 2); - TEST_FIELD(METAHEADER, mtNoParameters, 16, 2, 2); + TEST_TYPE_SIZE (METAHEADER, 18) + TEST_TYPE_ALIGN (METAHEADER, 2) + TEST_FIELD_SIZE (METAHEADER, mtType, 2) + TEST_FIELD_ALIGN (METAHEADER, mtType, 2) + TEST_FIELD_OFFSET(METAHEADER, mtType, 0) + TEST_FIELD_SIZE (METAHEADER, mtHeaderSize, 2) + TEST_FIELD_ALIGN (METAHEADER, mtHeaderSize, 2) + TEST_FIELD_OFFSET(METAHEADER, mtHeaderSize, 2) + TEST_FIELD_SIZE (METAHEADER, mtVersion, 2) + TEST_FIELD_ALIGN (METAHEADER, mtVersion, 2) + TEST_FIELD_OFFSET(METAHEADER, mtVersion, 4) + TEST_FIELD_SIZE (METAHEADER, mtSize, 4) + TEST_FIELD_ALIGN (METAHEADER, mtSize, 2) + TEST_FIELD_OFFSET(METAHEADER, mtSize, 6) + TEST_FIELD_SIZE (METAHEADER, mtNoObjects, 2) + TEST_FIELD_ALIGN (METAHEADER, mtNoObjects, 2) + TEST_FIELD_OFFSET(METAHEADER, mtNoObjects, 10) + TEST_FIELD_SIZE (METAHEADER, mtMaxRecord, 4) + TEST_FIELD_ALIGN (METAHEADER, mtMaxRecord, 2) + TEST_FIELD_OFFSET(METAHEADER, mtMaxRecord, 12) + TEST_FIELD_SIZE (METAHEADER, mtNoParameters, 2) + TEST_FIELD_ALIGN (METAHEADER, mtNoParameters, 2) + TEST_FIELD_OFFSET(METAHEADER, mtNoParameters, 16) } static void test_pack_METARECORD(void) { /* METARECORD (pack 4) */ - TEST_TYPE(METARECORD, 8, 4); - TEST_FIELD(METARECORD, rdSize, 0, 4, 4); - TEST_FIELD(METARECORD, rdFunction, 4, 2, 2); - TEST_FIELD(METARECORD, rdParm, 6, 2, 2); + TEST_TYPE_SIZE (METARECORD, 8) + TEST_TYPE_ALIGN (METARECORD, 4) + TEST_FIELD_SIZE (METARECORD, rdSize, 4) + TEST_FIELD_ALIGN (METARECORD, rdSize, 4) + TEST_FIELD_OFFSET(METARECORD, rdSize, 0) + TEST_FIELD_SIZE (METARECORD, rdFunction, 2) + TEST_FIELD_ALIGN (METARECORD, rdFunction, 2) + TEST_FIELD_OFFSET(METARECORD, rdFunction, 4) + TEST_FIELD_SIZE (METARECORD, rdParm, 2) + TEST_FIELD_ALIGN (METARECORD, rdParm, 2) + TEST_FIELD_OFFSET(METARECORD, rdParm, 6) } static void test_pack_MFENUMPROC(void) { /* MFENUMPROC */ - TEST_TYPE(MFENUMPROC, 4, 4); + TEST_TYPE_SIZE (MFENUMPROC, 4) + TEST_TYPE_ALIGN (MFENUMPROC, 4) } static void test_pack_NEWTEXTMETRICA(void) { /* NEWTEXTMETRICA (pack 4) */ - TEST_TYPE(NEWTEXTMETRICA, 72, 4); - TEST_FIELD(NEWTEXTMETRICA, tmHeight, 0, 4, 4); - TEST_FIELD(NEWTEXTMETRICA, tmAscent, 4, 4, 4); - TEST_FIELD(NEWTEXTMETRICA, tmDescent, 8, 4, 4); - TEST_FIELD(NEWTEXTMETRICA, tmInternalLeading, 12, 4, 4); - TEST_FIELD(NEWTEXTMETRICA, tmExternalLeading, 16, 4, 4); - TEST_FIELD(NEWTEXTMETRICA, tmAveCharWidth, 20, 4, 4); - TEST_FIELD(NEWTEXTMETRICA, tmMaxCharWidth, 24, 4, 4); - TEST_FIELD(NEWTEXTMETRICA, tmWeight, 28, 4, 4); - TEST_FIELD(NEWTEXTMETRICA, tmOverhang, 32, 4, 4); - TEST_FIELD(NEWTEXTMETRICA, tmDigitizedAspectX, 36, 4, 4); - TEST_FIELD(NEWTEXTMETRICA, tmDigitizedAspectY, 40, 4, 4); - TEST_FIELD(NEWTEXTMETRICA, tmFirstChar, 44, 1, 1); - TEST_FIELD(NEWTEXTMETRICA, tmLastChar, 45, 1, 1); - TEST_FIELD(NEWTEXTMETRICA, tmDefaultChar, 46, 1, 1); - TEST_FIELD(NEWTEXTMETRICA, tmBreakChar, 47, 1, 1); - TEST_FIELD(NEWTEXTMETRICA, tmItalic, 48, 1, 1); - TEST_FIELD(NEWTEXTMETRICA, tmUnderlined, 49, 1, 1); - TEST_FIELD(NEWTEXTMETRICA, tmStruckOut, 50, 1, 1); - TEST_FIELD(NEWTEXTMETRICA, tmPitchAndFamily, 51, 1, 1); - TEST_FIELD(NEWTEXTMETRICA, tmCharSet, 52, 1, 1); - TEST_FIELD(NEWTEXTMETRICA, ntmFlags, 56, 4, 4); - TEST_FIELD(NEWTEXTMETRICA, ntmSizeEM, 60, 4, 4); - TEST_FIELD(NEWTEXTMETRICA, ntmCellHeight, 64, 4, 4); - TEST_FIELD(NEWTEXTMETRICA, ntmAvgWidth, 68, 4, 4); + TEST_TYPE_SIZE (NEWTEXTMETRICA, 72) + TEST_TYPE_ALIGN (NEWTEXTMETRICA, 4) + TEST_FIELD_SIZE (NEWTEXTMETRICA, tmHeight, 4) + TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmHeight, 4) + TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmHeight, 0) + TEST_FIELD_SIZE (NEWTEXTMETRICA, tmAscent, 4) + TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmAscent, 4) + TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmAscent, 4) + TEST_FIELD_SIZE (NEWTEXTMETRICA, tmDescent, 4) + TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmDescent, 4) + TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmDescent, 8) + TEST_FIELD_SIZE (NEWTEXTMETRICA, tmInternalLeading, 4) + TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmInternalLeading, 4) + TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmInternalLeading, 12) + TEST_FIELD_SIZE (NEWTEXTMETRICA, tmExternalLeading, 4) + TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmExternalLeading, 4) + TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmExternalLeading, 16) + TEST_FIELD_SIZE (NEWTEXTMETRICA, tmAveCharWidth, 4) + TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmAveCharWidth, 4) + TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmAveCharWidth, 20) + TEST_FIELD_SIZE (NEWTEXTMETRICA, tmMaxCharWidth, 4) + TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmMaxCharWidth, 4) + TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmMaxCharWidth, 24) + TEST_FIELD_SIZE (NEWTEXTMETRICA, tmWeight, 4) + TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmWeight, 4) + TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmWeight, 28) + TEST_FIELD_SIZE (NEWTEXTMETRICA, tmOverhang, 4) + TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmOverhang, 4) + TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmOverhang, 32) + TEST_FIELD_SIZE (NEWTEXTMETRICA, tmDigitizedAspectX, 4) + TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmDigitizedAspectX, 4) + TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmDigitizedAspectX, 36) + TEST_FIELD_SIZE (NEWTEXTMETRICA, tmDigitizedAspectY, 4) + TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmDigitizedAspectY, 4) + TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmDigitizedAspectY, 40) + TEST_FIELD_SIZE (NEWTEXTMETRICA, tmFirstChar, 1) + TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmFirstChar, 1) + TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmFirstChar, 44) + TEST_FIELD_SIZE (NEWTEXTMETRICA, tmLastChar, 1) + TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmLastChar, 1) + TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmLastChar, 45) + TEST_FIELD_SIZE (NEWTEXTMETRICA, tmDefaultChar, 1) + TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmDefaultChar, 1) + TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmDefaultChar, 46) + TEST_FIELD_SIZE (NEWTEXTMETRICA, tmBreakChar, 1) + TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmBreakChar, 1) + TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmBreakChar, 47) + TEST_FIELD_SIZE (NEWTEXTMETRICA, tmItalic, 1) + TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmItalic, 1) + TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmItalic, 48) + TEST_FIELD_SIZE (NEWTEXTMETRICA, tmUnderlined, 1) + TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmUnderlined, 1) + TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmUnderlined, 49) + TEST_FIELD_SIZE (NEWTEXTMETRICA, tmStruckOut, 1) + TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmStruckOut, 1) + TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmStruckOut, 50) + TEST_FIELD_SIZE (NEWTEXTMETRICA, tmPitchAndFamily, 1) + TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmPitchAndFamily, 1) + TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmPitchAndFamily, 51) + TEST_FIELD_SIZE (NEWTEXTMETRICA, tmCharSet, 1) + TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmCharSet, 1) + TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmCharSet, 52) + TEST_FIELD_SIZE (NEWTEXTMETRICA, ntmFlags, 4) + TEST_FIELD_ALIGN (NEWTEXTMETRICA, ntmFlags, 4) + TEST_FIELD_OFFSET(NEWTEXTMETRICA, ntmFlags, 56) + TEST_FIELD_SIZE (NEWTEXTMETRICA, ntmSizeEM, 4) + TEST_FIELD_ALIGN (NEWTEXTMETRICA, ntmSizeEM, 4) + TEST_FIELD_OFFSET(NEWTEXTMETRICA, ntmSizeEM, 60) + TEST_FIELD_SIZE (NEWTEXTMETRICA, ntmCellHeight, 4) + TEST_FIELD_ALIGN (NEWTEXTMETRICA, ntmCellHeight, 4) + TEST_FIELD_OFFSET(NEWTEXTMETRICA, ntmCellHeight, 64) + TEST_FIELD_SIZE (NEWTEXTMETRICA, ntmAvgWidth, 4) + TEST_FIELD_ALIGN (NEWTEXTMETRICA, ntmAvgWidth, 4) + TEST_FIELD_OFFSET(NEWTEXTMETRICA, ntmAvgWidth, 68) } static void test_pack_NEWTEXTMETRICEXA(void) { /* NEWTEXTMETRICEXA (pack 4) */ - TEST_TYPE(NEWTEXTMETRICEXA, 96, 4); - TEST_FIELD(NEWTEXTMETRICEXA, ntmTm, 0, 72, 4); - TEST_FIELD(NEWTEXTMETRICEXA, ntmFontSig, 72, 24, 4); + TEST_TYPE_SIZE (NEWTEXTMETRICEXA, 96) + TEST_TYPE_ALIGN (NEWTEXTMETRICEXA, 4) + TEST_FIELD_SIZE (NEWTEXTMETRICEXA, ntmTm, 72) + TEST_FIELD_ALIGN (NEWTEXTMETRICEXA, ntmTm, 4) + TEST_FIELD_OFFSET(NEWTEXTMETRICEXA, ntmTm, 0) + TEST_FIELD_SIZE (NEWTEXTMETRICEXA, ntmFontSig, 24) + TEST_FIELD_ALIGN (NEWTEXTMETRICEXA, ntmFontSig, 4) + TEST_FIELD_OFFSET(NEWTEXTMETRICEXA, ntmFontSig, 72) } static void test_pack_NEWTEXTMETRICEXW(void) { /* NEWTEXTMETRICEXW (pack 4) */ - TEST_TYPE(NEWTEXTMETRICEXW, 100, 4); - TEST_FIELD(NEWTEXTMETRICEXW, ntmTm, 0, 76, 4); - TEST_FIELD(NEWTEXTMETRICEXW, ntmFontSig, 76, 24, 4); + TEST_TYPE_SIZE (NEWTEXTMETRICEXW, 100) + TEST_TYPE_ALIGN (NEWTEXTMETRICEXW, 4) + TEST_FIELD_SIZE (NEWTEXTMETRICEXW, ntmTm, 76) + TEST_FIELD_ALIGN (NEWTEXTMETRICEXW, ntmTm, 4) + TEST_FIELD_OFFSET(NEWTEXTMETRICEXW, ntmTm, 0) + TEST_FIELD_SIZE (NEWTEXTMETRICEXW, ntmFontSig, 24) + TEST_FIELD_ALIGN (NEWTEXTMETRICEXW, ntmFontSig, 4) + TEST_FIELD_OFFSET(NEWTEXTMETRICEXW, ntmFontSig, 76) } static void test_pack_NEWTEXTMETRICW(void) { /* NEWTEXTMETRICW (pack 4) */ - TEST_TYPE(NEWTEXTMETRICW, 76, 4); - TEST_FIELD(NEWTEXTMETRICW, tmHeight, 0, 4, 4); - TEST_FIELD(NEWTEXTMETRICW, tmAscent, 4, 4, 4); - TEST_FIELD(NEWTEXTMETRICW, tmDescent, 8, 4, 4); - TEST_FIELD(NEWTEXTMETRICW, tmInternalLeading, 12, 4, 4); - TEST_FIELD(NEWTEXTMETRICW, tmExternalLeading, 16, 4, 4); - TEST_FIELD(NEWTEXTMETRICW, tmAveCharWidth, 20, 4, 4); - TEST_FIELD(NEWTEXTMETRICW, tmMaxCharWidth, 24, 4, 4); - TEST_FIELD(NEWTEXTMETRICW, tmWeight, 28, 4, 4); - TEST_FIELD(NEWTEXTMETRICW, tmOverhang, 32, 4, 4); - TEST_FIELD(NEWTEXTMETRICW, tmDigitizedAspectX, 36, 4, 4); - TEST_FIELD(NEWTEXTMETRICW, tmDigitizedAspectY, 40, 4, 4); - TEST_FIELD(NEWTEXTMETRICW, tmFirstChar, 44, 2, 2); - TEST_FIELD(NEWTEXTMETRICW, tmLastChar, 46, 2, 2); - TEST_FIELD(NEWTEXTMETRICW, tmDefaultChar, 48, 2, 2); - TEST_FIELD(NEWTEXTMETRICW, tmBreakChar, 50, 2, 2); - TEST_FIELD(NEWTEXTMETRICW, tmItalic, 52, 1, 1); - TEST_FIELD(NEWTEXTMETRICW, tmUnderlined, 53, 1, 1); - TEST_FIELD(NEWTEXTMETRICW, tmStruckOut, 54, 1, 1); - TEST_FIELD(NEWTEXTMETRICW, tmPitchAndFamily, 55, 1, 1); - TEST_FIELD(NEWTEXTMETRICW, tmCharSet, 56, 1, 1); - TEST_FIELD(NEWTEXTMETRICW, ntmFlags, 60, 4, 4); - TEST_FIELD(NEWTEXTMETRICW, ntmSizeEM, 64, 4, 4); - TEST_FIELD(NEWTEXTMETRICW, ntmCellHeight, 68, 4, 4); - TEST_FIELD(NEWTEXTMETRICW, ntmAvgWidth, 72, 4, 4); + TEST_TYPE_SIZE (NEWTEXTMETRICW, 76) + TEST_TYPE_ALIGN (NEWTEXTMETRICW, 4) + TEST_FIELD_SIZE (NEWTEXTMETRICW, tmHeight, 4) + TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmHeight, 4) + TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmHeight, 0) + TEST_FIELD_SIZE (NEWTEXTMETRICW, tmAscent, 4) + TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmAscent, 4) + TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmAscent, 4) + TEST_FIELD_SIZE (NEWTEXTMETRICW, tmDescent, 4) + TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmDescent, 4) + TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmDescent, 8) + TEST_FIELD_SIZE (NEWTEXTMETRICW, tmInternalLeading, 4) + TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmInternalLeading, 4) + TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmInternalLeading, 12) + TEST_FIELD_SIZE (NEWTEXTMETRICW, tmExternalLeading, 4) + TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmExternalLeading, 4) + TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmExternalLeading, 16) + TEST_FIELD_SIZE (NEWTEXTMETRICW, tmAveCharWidth, 4) + TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmAveCharWidth, 4) + TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmAveCharWidth, 20) + TEST_FIELD_SIZE (NEWTEXTMETRICW, tmMaxCharWidth, 4) + TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmMaxCharWidth, 4) + TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmMaxCharWidth, 24) + TEST_FIELD_SIZE (NEWTEXTMETRICW, tmWeight, 4) + TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmWeight, 4) + TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmWeight, 28) + TEST_FIELD_SIZE (NEWTEXTMETRICW, tmOverhang, 4) + TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmOverhang, 4) + TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmOverhang, 32) + TEST_FIELD_SIZE (NEWTEXTMETRICW, tmDigitizedAspectX, 4) + TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmDigitizedAspectX, 4) + TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmDigitizedAspectX, 36) + TEST_FIELD_SIZE (NEWTEXTMETRICW, tmDigitizedAspectY, 4) + TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmDigitizedAspectY, 4) + TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmDigitizedAspectY, 40) + TEST_FIELD_SIZE (NEWTEXTMETRICW, tmFirstChar, 2) + TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmFirstChar, 2) + TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmFirstChar, 44) + TEST_FIELD_SIZE (NEWTEXTMETRICW, tmLastChar, 2) + TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmLastChar, 2) + TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmLastChar, 46) + TEST_FIELD_SIZE (NEWTEXTMETRICW, tmDefaultChar, 2) + TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmDefaultChar, 2) + TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmDefaultChar, 48) + TEST_FIELD_SIZE (NEWTEXTMETRICW, tmBreakChar, 2) + TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmBreakChar, 2) + TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmBreakChar, 50) + TEST_FIELD_SIZE (NEWTEXTMETRICW, tmItalic, 1) + TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmItalic, 1) + TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmItalic, 52) + TEST_FIELD_SIZE (NEWTEXTMETRICW, tmUnderlined, 1) + TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmUnderlined, 1) + TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmUnderlined, 53) + TEST_FIELD_SIZE (NEWTEXTMETRICW, tmStruckOut, 1) + TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmStruckOut, 1) + TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmStruckOut, 54) + TEST_FIELD_SIZE (NEWTEXTMETRICW, tmPitchAndFamily, 1) + TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmPitchAndFamily, 1) + TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmPitchAndFamily, 55) + TEST_FIELD_SIZE (NEWTEXTMETRICW, tmCharSet, 1) + TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmCharSet, 1) + TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmCharSet, 56) + TEST_FIELD_SIZE (NEWTEXTMETRICW, ntmFlags, 4) + TEST_FIELD_ALIGN (NEWTEXTMETRICW, ntmFlags, 4) + TEST_FIELD_OFFSET(NEWTEXTMETRICW, ntmFlags, 60) + TEST_FIELD_SIZE (NEWTEXTMETRICW, ntmSizeEM, 4) + TEST_FIELD_ALIGN (NEWTEXTMETRICW, ntmSizeEM, 4) + TEST_FIELD_OFFSET(NEWTEXTMETRICW, ntmSizeEM, 64) + TEST_FIELD_SIZE (NEWTEXTMETRICW, ntmCellHeight, 4) + TEST_FIELD_ALIGN (NEWTEXTMETRICW, ntmCellHeight, 4) + TEST_FIELD_OFFSET(NEWTEXTMETRICW, ntmCellHeight, 68) + TEST_FIELD_SIZE (NEWTEXTMETRICW, ntmAvgWidth, 4) + TEST_FIELD_ALIGN (NEWTEXTMETRICW, ntmAvgWidth, 4) + TEST_FIELD_OFFSET(NEWTEXTMETRICW, ntmAvgWidth, 72) } static void test_pack_NPEXTLOGPEN(void) { /* NPEXTLOGPEN */ - TEST_TYPE(NPEXTLOGPEN, 4, 4); - TEST_TYPE_POINTER(NPEXTLOGPEN, 28, 4); + TEST_TYPE_SIZE (NPEXTLOGPEN, 4) + TEST_TYPE_ALIGN (NPEXTLOGPEN, 4) + TEST_TARGET_SIZE (NPEXTLOGPEN, 28) + TEST_TARGET_ALIGN(NPEXTLOGPEN, 4) } static void test_pack_OLDFONTENUMPROC(void) { /* OLDFONTENUMPROC */ - TEST_TYPE(OLDFONTENUMPROC, 4, 4); + TEST_TYPE_SIZE (OLDFONTENUMPROC, 4) + TEST_TYPE_ALIGN (OLDFONTENUMPROC, 4) } static void test_pack_OLDFONTENUMPROCA(void) { /* OLDFONTENUMPROCA */ - TEST_TYPE(OLDFONTENUMPROCA, 4, 4); + TEST_TYPE_SIZE (OLDFONTENUMPROCA, 4) + TEST_TYPE_ALIGN (OLDFONTENUMPROCA, 4) } static void test_pack_OLDFONTENUMPROCW(void) { /* OLDFONTENUMPROCW */ - TEST_TYPE(OLDFONTENUMPROCW, 4, 4); + TEST_TYPE_SIZE (OLDFONTENUMPROCW, 4) + TEST_TYPE_ALIGN (OLDFONTENUMPROCW, 4) } static void test_pack_OUTLINETEXTMETRICA(void) { /* OUTLINETEXTMETRICA (pack 4) */ - TEST_TYPE(OUTLINETEXTMETRICA, 212, 4); - TEST_FIELD(OUTLINETEXTMETRICA, otmSize, 0, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICA, otmTextMetrics, 4, 56, 4); - TEST_FIELD(OUTLINETEXTMETRICA, otmFiller, 60, 1, 1); - TEST_FIELD(OUTLINETEXTMETRICA, otmPanoseNumber, 61, 10, 1); - TEST_FIELD(OUTLINETEXTMETRICA, otmfsSelection, 72, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICA, otmfsType, 76, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICA, otmsCharSlopeRise, 80, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICA, otmsCharSlopeRun, 84, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICA, otmItalicAngle, 88, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICA, otmEMSquare, 92, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICA, otmAscent, 96, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICA, otmDescent, 100, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICA, otmLineGap, 104, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICA, otmsCapEmHeight, 108, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICA, otmsXHeight, 112, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICA, otmrcFontBox, 116, 16, 4); - TEST_FIELD(OUTLINETEXTMETRICA, otmMacAscent, 132, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICA, otmMacDescent, 136, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICA, otmMacLineGap, 140, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICA, otmusMinimumPPEM, 144, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICA, otmptSubscriptSize, 148, 8, 4); - TEST_FIELD(OUTLINETEXTMETRICA, otmptSubscriptOffset, 156, 8, 4); - TEST_FIELD(OUTLINETEXTMETRICA, otmptSuperscriptSize, 164, 8, 4); - TEST_FIELD(OUTLINETEXTMETRICA, otmptSuperscriptOffset, 172, 8, 4); - TEST_FIELD(OUTLINETEXTMETRICA, otmsStrikeoutSize, 180, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICA, otmsStrikeoutPosition, 184, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICA, otmsUnderscoreSize, 188, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICA, otmsUnderscorePosition, 192, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICA, otmpFamilyName, 196, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICA, otmpFaceName, 200, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICA, otmpStyleName, 204, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICA, otmpFullName, 208, 4, 4); + TEST_TYPE_SIZE (OUTLINETEXTMETRICA, 212) + TEST_TYPE_ALIGN (OUTLINETEXTMETRICA, 4) + TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmSize, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmSize, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmSize, 0) + TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmTextMetrics, 56) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmTextMetrics, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmTextMetrics, 4) + TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmFiller, 1) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmFiller, 1) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmFiller, 60) + TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmPanoseNumber, 10) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmPanoseNumber, 1) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmPanoseNumber, 61) + TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmfsSelection, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmfsSelection, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmfsSelection, 72) + TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmfsType, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmfsType, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmfsType, 76) + TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmsCharSlopeRise, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmsCharSlopeRise, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmsCharSlopeRise, 80) + TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmsCharSlopeRun, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmsCharSlopeRun, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmsCharSlopeRun, 84) + TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmItalicAngle, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmItalicAngle, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmItalicAngle, 88) + TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmEMSquare, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmEMSquare, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmEMSquare, 92) + TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmAscent, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmAscent, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmAscent, 96) + TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmDescent, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmDescent, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmDescent, 100) + TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmLineGap, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmLineGap, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmLineGap, 104) + TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmsCapEmHeight, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmsCapEmHeight, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmsCapEmHeight, 108) + TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmsXHeight, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmsXHeight, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmsXHeight, 112) + TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmrcFontBox, 16) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmrcFontBox, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmrcFontBox, 116) + TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmMacAscent, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmMacAscent, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmMacAscent, 132) + TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmMacDescent, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmMacDescent, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmMacDescent, 136) + TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmMacLineGap, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmMacLineGap, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmMacLineGap, 140) + TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmusMinimumPPEM, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmusMinimumPPEM, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmusMinimumPPEM, 144) + TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmptSubscriptSize, 8) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmptSubscriptSize, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmptSubscriptSize, 148) + TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmptSubscriptOffset, 8) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmptSubscriptOffset, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmptSubscriptOffset, 156) + TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmptSuperscriptSize, 8) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmptSuperscriptSize, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmptSuperscriptSize, 164) + TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmptSuperscriptOffset, 8) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmptSuperscriptOffset, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmptSuperscriptOffset, 172) + TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmsStrikeoutSize, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmsStrikeoutSize, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmsStrikeoutSize, 180) + TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmsStrikeoutPosition, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmsStrikeoutPosition, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmsStrikeoutPosition, 184) + TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmsUnderscoreSize, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmsUnderscoreSize, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmsUnderscoreSize, 188) + TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmsUnderscorePosition, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmsUnderscorePosition, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmsUnderscorePosition, 192) + TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmpFamilyName, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmpFamilyName, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmpFamilyName, 196) + TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmpFaceName, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmpFaceName, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmpFaceName, 200) + TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmpStyleName, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmpStyleName, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmpStyleName, 204) + TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmpFullName, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmpFullName, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmpFullName, 208) } static void test_pack_OUTLINETEXTMETRICW(void) { /* OUTLINETEXTMETRICW (pack 4) */ - TEST_TYPE(OUTLINETEXTMETRICW, 216, 4); - TEST_FIELD(OUTLINETEXTMETRICW, otmSize, 0, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICW, otmTextMetrics, 4, 60, 4); - TEST_FIELD(OUTLINETEXTMETRICW, otmFiller, 64, 1, 1); - TEST_FIELD(OUTLINETEXTMETRICW, otmPanoseNumber, 65, 10, 1); - TEST_FIELD(OUTLINETEXTMETRICW, otmfsSelection, 76, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICW, otmfsType, 80, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICW, otmsCharSlopeRise, 84, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICW, otmsCharSlopeRun, 88, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICW, otmItalicAngle, 92, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICW, otmEMSquare, 96, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICW, otmAscent, 100, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICW, otmDescent, 104, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICW, otmLineGap, 108, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICW, otmsCapEmHeight, 112, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICW, otmsXHeight, 116, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICW, otmrcFontBox, 120, 16, 4); - TEST_FIELD(OUTLINETEXTMETRICW, otmMacAscent, 136, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICW, otmMacDescent, 140, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICW, otmMacLineGap, 144, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICW, otmusMinimumPPEM, 148, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICW, otmptSubscriptSize, 152, 8, 4); - TEST_FIELD(OUTLINETEXTMETRICW, otmptSubscriptOffset, 160, 8, 4); - TEST_FIELD(OUTLINETEXTMETRICW, otmptSuperscriptSize, 168, 8, 4); - TEST_FIELD(OUTLINETEXTMETRICW, otmptSuperscriptOffset, 176, 8, 4); - TEST_FIELD(OUTLINETEXTMETRICW, otmsStrikeoutSize, 184, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICW, otmsStrikeoutPosition, 188, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICW, otmsUnderscoreSize, 192, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICW, otmsUnderscorePosition, 196, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICW, otmpFamilyName, 200, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICW, otmpFaceName, 204, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICW, otmpStyleName, 208, 4, 4); - TEST_FIELD(OUTLINETEXTMETRICW, otmpFullName, 212, 4, 4); + TEST_TYPE_SIZE (OUTLINETEXTMETRICW, 216) + TEST_TYPE_ALIGN (OUTLINETEXTMETRICW, 4) + TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmSize, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmSize, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmSize, 0) + TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmTextMetrics, 60) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmTextMetrics, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmTextMetrics, 4) + TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmFiller, 1) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmFiller, 1) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmFiller, 64) + TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmPanoseNumber, 10) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmPanoseNumber, 1) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmPanoseNumber, 65) + TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmfsSelection, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmfsSelection, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmfsSelection, 76) + TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmfsType, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmfsType, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmfsType, 80) + TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmsCharSlopeRise, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmsCharSlopeRise, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmsCharSlopeRise, 84) + TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmsCharSlopeRun, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmsCharSlopeRun, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmsCharSlopeRun, 88) + TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmItalicAngle, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmItalicAngle, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmItalicAngle, 92) + TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmEMSquare, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmEMSquare, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmEMSquare, 96) + TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmAscent, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmAscent, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmAscent, 100) + TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmDescent, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmDescent, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmDescent, 104) + TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmLineGap, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmLineGap, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmLineGap, 108) + TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmsCapEmHeight, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmsCapEmHeight, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmsCapEmHeight, 112) + TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmsXHeight, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmsXHeight, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmsXHeight, 116) + TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmrcFontBox, 16) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmrcFontBox, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmrcFontBox, 120) + TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmMacAscent, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmMacAscent, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmMacAscent, 136) + TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmMacDescent, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmMacDescent, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmMacDescent, 140) + TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmMacLineGap, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmMacLineGap, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmMacLineGap, 144) + TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmusMinimumPPEM, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmusMinimumPPEM, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmusMinimumPPEM, 148) + TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmptSubscriptSize, 8) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmptSubscriptSize, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmptSubscriptSize, 152) + TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmptSubscriptOffset, 8) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmptSubscriptOffset, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmptSubscriptOffset, 160) + TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmptSuperscriptSize, 8) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmptSuperscriptSize, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmptSuperscriptSize, 168) + TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmptSuperscriptOffset, 8) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmptSuperscriptOffset, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmptSuperscriptOffset, 176) + TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmsStrikeoutSize, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmsStrikeoutSize, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmsStrikeoutSize, 184) + TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmsStrikeoutPosition, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmsStrikeoutPosition, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmsStrikeoutPosition, 188) + TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmsUnderscoreSize, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmsUnderscoreSize, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmsUnderscoreSize, 192) + TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmsUnderscorePosition, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmsUnderscorePosition, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmsUnderscorePosition, 196) + TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmpFamilyName, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmpFamilyName, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmpFamilyName, 200) + TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmpFaceName, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmpFaceName, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmpFaceName, 204) + TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmpStyleName, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmpStyleName, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmpStyleName, 208) + TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmpFullName, 4) + TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmpFullName, 4) + TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmpFullName, 212) } static void test_pack_PABC(void) { /* PABC */ - TEST_TYPE(PABC, 4, 4); - TEST_TYPE_POINTER(PABC, 12, 4); + TEST_TYPE_SIZE (PABC, 4) + TEST_TYPE_ALIGN (PABC, 4) + TEST_TARGET_SIZE (PABC, 12) + TEST_TARGET_ALIGN(PABC, 4) } static void test_pack_PABCFLOAT(void) { /* PABCFLOAT */ - TEST_TYPE(PABCFLOAT, 4, 4); - TEST_TYPE_POINTER(PABCFLOAT, 12, 4); + TEST_TYPE_SIZE (PABCFLOAT, 4) + TEST_TYPE_ALIGN (PABCFLOAT, 4) + TEST_TARGET_SIZE (PABCFLOAT, 12) + TEST_TARGET_ALIGN(PABCFLOAT, 4) } static void test_pack_PANOSE(void) { /* PANOSE (pack 4) */ - TEST_TYPE(PANOSE, 10, 1); - TEST_FIELD(PANOSE, bFamilyType, 0, 1, 1); - TEST_FIELD(PANOSE, bSerifStyle, 1, 1, 1); - TEST_FIELD(PANOSE, bWeight, 2, 1, 1); - TEST_FIELD(PANOSE, bProportion, 3, 1, 1); - TEST_FIELD(PANOSE, bContrast, 4, 1, 1); - TEST_FIELD(PANOSE, bStrokeVariation, 5, 1, 1); - TEST_FIELD(PANOSE, bArmStyle, 6, 1, 1); - TEST_FIELD(PANOSE, bLetterform, 7, 1, 1); - TEST_FIELD(PANOSE, bMidline, 8, 1, 1); - TEST_FIELD(PANOSE, bXHeight, 9, 1, 1); + TEST_TYPE_SIZE (PANOSE, 10) + TEST_TYPE_ALIGN (PANOSE, 1) + TEST_FIELD_SIZE (PANOSE, bFamilyType, 1) + TEST_FIELD_ALIGN (PANOSE, bFamilyType, 1) + TEST_FIELD_OFFSET(PANOSE, bFamilyType, 0) + TEST_FIELD_SIZE (PANOSE, bSerifStyle, 1) + TEST_FIELD_ALIGN (PANOSE, bSerifStyle, 1) + TEST_FIELD_OFFSET(PANOSE, bSerifStyle, 1) + TEST_FIELD_SIZE (PANOSE, bWeight, 1) + TEST_FIELD_ALIGN (PANOSE, bWeight, 1) + TEST_FIELD_OFFSET(PANOSE, bWeight, 2) + TEST_FIELD_SIZE (PANOSE, bProportion, 1) + TEST_FIELD_ALIGN (PANOSE, bProportion, 1) + TEST_FIELD_OFFSET(PANOSE, bProportion, 3) + TEST_FIELD_SIZE (PANOSE, bContrast, 1) + TEST_FIELD_ALIGN (PANOSE, bContrast, 1) + TEST_FIELD_OFFSET(PANOSE, bContrast, 4) + TEST_FIELD_SIZE (PANOSE, bStrokeVariation, 1) + TEST_FIELD_ALIGN (PANOSE, bStrokeVariation, 1) + TEST_FIELD_OFFSET(PANOSE, bStrokeVariation, 5) + TEST_FIELD_SIZE (PANOSE, bArmStyle, 1) + TEST_FIELD_ALIGN (PANOSE, bArmStyle, 1) + TEST_FIELD_OFFSET(PANOSE, bArmStyle, 6) + TEST_FIELD_SIZE (PANOSE, bLetterform, 1) + TEST_FIELD_ALIGN (PANOSE, bLetterform, 1) + TEST_FIELD_OFFSET(PANOSE, bLetterform, 7) + TEST_FIELD_SIZE (PANOSE, bMidline, 1) + TEST_FIELD_ALIGN (PANOSE, bMidline, 1) + TEST_FIELD_OFFSET(PANOSE, bMidline, 8) + TEST_FIELD_SIZE (PANOSE, bXHeight, 1) + TEST_FIELD_ALIGN (PANOSE, bXHeight, 1) + TEST_FIELD_OFFSET(PANOSE, bXHeight, 9) } static void test_pack_PATTERN(void) { /* PATTERN */ - TEST_TYPE(PATTERN, 12, 4); + TEST_TYPE_SIZE (PATTERN, 12) + TEST_TYPE_ALIGN (PATTERN, 4) } static void test_pack_PBITMAP(void) { /* PBITMAP */ - TEST_TYPE(PBITMAP, 4, 4); - TEST_TYPE_POINTER(PBITMAP, 24, 4); + TEST_TYPE_SIZE (PBITMAP, 4) + TEST_TYPE_ALIGN (PBITMAP, 4) + TEST_TARGET_SIZE (PBITMAP, 24) + TEST_TARGET_ALIGN(PBITMAP, 4) } static void test_pack_PBITMAPCOREHEADER(void) { /* PBITMAPCOREHEADER */ - TEST_TYPE(PBITMAPCOREHEADER, 4, 4); - TEST_TYPE_POINTER(PBITMAPCOREHEADER, 12, 4); + TEST_TYPE_SIZE (PBITMAPCOREHEADER, 4) + TEST_TYPE_ALIGN (PBITMAPCOREHEADER, 4) + TEST_TARGET_SIZE (PBITMAPCOREHEADER, 12) + TEST_TARGET_ALIGN(PBITMAPCOREHEADER, 4) } static void test_pack_PBITMAPCOREINFO(void) { /* PBITMAPCOREINFO */ - TEST_TYPE(PBITMAPCOREINFO, 4, 4); - TEST_TYPE_POINTER(PBITMAPCOREINFO, 16, 4); + TEST_TYPE_SIZE (PBITMAPCOREINFO, 4) + TEST_TYPE_ALIGN (PBITMAPCOREINFO, 4) + TEST_TARGET_SIZE (PBITMAPCOREINFO, 16) + TEST_TARGET_ALIGN(PBITMAPCOREINFO, 4) } static void test_pack_PBITMAPFILEHEADER(void) { /* PBITMAPFILEHEADER */ - TEST_TYPE(PBITMAPFILEHEADER, 4, 4); - TEST_TYPE_POINTER(PBITMAPFILEHEADER, 14, 2); + TEST_TYPE_SIZE (PBITMAPFILEHEADER, 4) + TEST_TYPE_ALIGN (PBITMAPFILEHEADER, 4) + TEST_TARGET_SIZE (PBITMAPFILEHEADER, 14) + TEST_TARGET_ALIGN(PBITMAPFILEHEADER, 2) } static void test_pack_PBITMAPINFO(void) { /* PBITMAPINFO */ - TEST_TYPE(PBITMAPINFO, 4, 4); - TEST_TYPE_POINTER(PBITMAPINFO, 44, 4); + TEST_TYPE_SIZE (PBITMAPINFO, 4) + TEST_TYPE_ALIGN (PBITMAPINFO, 4) + TEST_TARGET_SIZE (PBITMAPINFO, 44) + TEST_TARGET_ALIGN(PBITMAPINFO, 4) } static void test_pack_PBITMAPINFOHEADER(void) { /* PBITMAPINFOHEADER */ - TEST_TYPE(PBITMAPINFOHEADER, 4, 4); - TEST_TYPE_POINTER(PBITMAPINFOHEADER, 40, 4); + TEST_TYPE_SIZE (PBITMAPINFOHEADER, 4) + TEST_TYPE_ALIGN (PBITMAPINFOHEADER, 4) + TEST_TARGET_SIZE (PBITMAPINFOHEADER, 40) + TEST_TARGET_ALIGN(PBITMAPINFOHEADER, 4) } static void test_pack_PBITMAPV4HEADER(void) { /* PBITMAPV4HEADER */ - TEST_TYPE(PBITMAPV4HEADER, 4, 4); - TEST_TYPE_POINTER(PBITMAPV4HEADER, 108, 4); + TEST_TYPE_SIZE (PBITMAPV4HEADER, 4) + TEST_TYPE_ALIGN (PBITMAPV4HEADER, 4) + TEST_TARGET_SIZE (PBITMAPV4HEADER, 108) + TEST_TARGET_ALIGN(PBITMAPV4HEADER, 4) } static void test_pack_PBITMAPV5HEADER(void) { /* PBITMAPV5HEADER */ - TEST_TYPE(PBITMAPV5HEADER, 4, 4); - TEST_TYPE_POINTER(PBITMAPV5HEADER, 124, 4); + TEST_TYPE_SIZE (PBITMAPV5HEADER, 4) + TEST_TYPE_ALIGN (PBITMAPV5HEADER, 4) + TEST_TARGET_SIZE (PBITMAPV5HEADER, 124) + TEST_TARGET_ALIGN(PBITMAPV5HEADER, 4) } static void test_pack_PBLENDFUNCTION(void) { /* PBLENDFUNCTION */ - TEST_TYPE(PBLENDFUNCTION, 4, 4); - TEST_TYPE_POINTER(PBLENDFUNCTION, 4, 1); + TEST_TYPE_SIZE (PBLENDFUNCTION, 4) + TEST_TYPE_ALIGN (PBLENDFUNCTION, 4) + TEST_TARGET_SIZE (PBLENDFUNCTION, 4) + TEST_TARGET_ALIGN(PBLENDFUNCTION, 1) } static void test_pack_PCHARSETINFO(void) { /* PCHARSETINFO */ - TEST_TYPE(PCHARSETINFO, 4, 4); - TEST_TYPE_POINTER(PCHARSETINFO, 32, 4); + TEST_TYPE_SIZE (PCHARSETINFO, 4) + TEST_TYPE_ALIGN (PCHARSETINFO, 4) + TEST_TARGET_SIZE (PCHARSETINFO, 32) + TEST_TARGET_ALIGN(PCHARSETINFO, 4) } static void test_pack_PCOLORADJUSTMENT(void) { /* PCOLORADJUSTMENT */ - TEST_TYPE(PCOLORADJUSTMENT, 4, 4); - TEST_TYPE_POINTER(PCOLORADJUSTMENT, 24, 2); + TEST_TYPE_SIZE (PCOLORADJUSTMENT, 4) + TEST_TYPE_ALIGN (PCOLORADJUSTMENT, 4) + TEST_TARGET_SIZE (PCOLORADJUSTMENT, 24) + TEST_TARGET_ALIGN(PCOLORADJUSTMENT, 2) } static void test_pack_PDEVMODEA(void) { /* PDEVMODEA */ - TEST_TYPE(PDEVMODEA, 4, 4); + TEST_TYPE_SIZE (PDEVMODEA, 4) + TEST_TYPE_ALIGN (PDEVMODEA, 4) } static void test_pack_PDEVMODEW(void) { /* PDEVMODEW */ - TEST_TYPE(PDEVMODEW, 4, 4); + TEST_TYPE_SIZE (PDEVMODEW, 4) + TEST_TYPE_ALIGN (PDEVMODEW, 4) } static void test_pack_PDIBSECTION(void) { /* PDIBSECTION */ - TEST_TYPE(PDIBSECTION, 4, 4); - TEST_TYPE_POINTER(PDIBSECTION, 84, 4); + TEST_TYPE_SIZE (PDIBSECTION, 4) + TEST_TYPE_ALIGN (PDIBSECTION, 4) + TEST_TARGET_SIZE (PDIBSECTION, 84) + TEST_TARGET_ALIGN(PDIBSECTION, 4) } static void test_pack_PDISPLAY_DEVICEA(void) { /* PDISPLAY_DEVICEA */ - TEST_TYPE(PDISPLAY_DEVICEA, 4, 4); - TEST_TYPE_POINTER(PDISPLAY_DEVICEA, 424, 4); + TEST_TYPE_SIZE (PDISPLAY_DEVICEA, 4) + TEST_TYPE_ALIGN (PDISPLAY_DEVICEA, 4) + TEST_TARGET_SIZE (PDISPLAY_DEVICEA, 424) + TEST_TARGET_ALIGN(PDISPLAY_DEVICEA, 4) } static void test_pack_PDISPLAY_DEVICEW(void) { /* PDISPLAY_DEVICEW */ - TEST_TYPE(PDISPLAY_DEVICEW, 4, 4); - TEST_TYPE_POINTER(PDISPLAY_DEVICEW, 840, 4); + TEST_TYPE_SIZE (PDISPLAY_DEVICEW, 4) + TEST_TYPE_ALIGN (PDISPLAY_DEVICEW, 4) + TEST_TARGET_SIZE (PDISPLAY_DEVICEW, 840) + TEST_TARGET_ALIGN(PDISPLAY_DEVICEW, 4) } static void test_pack_PELARRAY(void) { /* PELARRAY (pack 4) */ - TEST_TYPE(PELARRAY, 20, 4); - TEST_FIELD(PELARRAY, paXCount, 0, 4, 4); - TEST_FIELD(PELARRAY, paYCount, 4, 4, 4); - TEST_FIELD(PELARRAY, paXExt, 8, 4, 4); - TEST_FIELD(PELARRAY, paYExt, 12, 4, 4); - TEST_FIELD(PELARRAY, paRGBs, 16, 1, 1); + TEST_TYPE_SIZE (PELARRAY, 20) + TEST_TYPE_ALIGN (PELARRAY, 4) + TEST_FIELD_SIZE (PELARRAY, paXCount, 4) + TEST_FIELD_ALIGN (PELARRAY, paXCount, 4) + TEST_FIELD_OFFSET(PELARRAY, paXCount, 0) + TEST_FIELD_SIZE (PELARRAY, paYCount, 4) + TEST_FIELD_ALIGN (PELARRAY, paYCount, 4) + TEST_FIELD_OFFSET(PELARRAY, paYCount, 4) + TEST_FIELD_SIZE (PELARRAY, paXExt, 4) + TEST_FIELD_ALIGN (PELARRAY, paXExt, 4) + TEST_FIELD_OFFSET(PELARRAY, paXExt, 8) + TEST_FIELD_SIZE (PELARRAY, paYExt, 4) + TEST_FIELD_ALIGN (PELARRAY, paYExt, 4) + TEST_FIELD_OFFSET(PELARRAY, paYExt, 12) + TEST_FIELD_SIZE (PELARRAY, paRGBs, 1) + TEST_FIELD_ALIGN (PELARRAY, paRGBs, 1) + TEST_FIELD_OFFSET(PELARRAY, paRGBs, 16) } static void test_pack_PEMR(void) { /* PEMR */ - TEST_TYPE(PEMR, 4, 4); - TEST_TYPE_POINTER(PEMR, 8, 4); + TEST_TYPE_SIZE (PEMR, 4) + TEST_TYPE_ALIGN (PEMR, 4) + TEST_TARGET_SIZE (PEMR, 8) + TEST_TARGET_ALIGN(PEMR, 4) } static void test_pack_PEMRABORTPATH(void) { /* PEMRABORTPATH */ - TEST_TYPE(PEMRABORTPATH, 4, 4); - TEST_TYPE_POINTER(PEMRABORTPATH, 8, 4); + TEST_TYPE_SIZE (PEMRABORTPATH, 4) + TEST_TYPE_ALIGN (PEMRABORTPATH, 4) + TEST_TARGET_SIZE (PEMRABORTPATH, 8) + TEST_TARGET_ALIGN(PEMRABORTPATH, 4) } static void test_pack_PEMRANGLEARC(void) { /* PEMRANGLEARC */ - TEST_TYPE(PEMRANGLEARC, 4, 4); - TEST_TYPE_POINTER(PEMRANGLEARC, 28, 4); + TEST_TYPE_SIZE (PEMRANGLEARC, 4) + TEST_TYPE_ALIGN (PEMRANGLEARC, 4) + TEST_TARGET_SIZE (PEMRANGLEARC, 28) + TEST_TARGET_ALIGN(PEMRANGLEARC, 4) } static void test_pack_PEMRARC(void) { /* PEMRARC */ - TEST_TYPE(PEMRARC, 4, 4); - TEST_TYPE_POINTER(PEMRARC, 40, 4); + TEST_TYPE_SIZE (PEMRARC, 4) + TEST_TYPE_ALIGN (PEMRARC, 4) + TEST_TARGET_SIZE (PEMRARC, 40) + TEST_TARGET_ALIGN(PEMRARC, 4) } static void test_pack_PEMRARCTO(void) { /* PEMRARCTO */ - TEST_TYPE(PEMRARCTO, 4, 4); - TEST_TYPE_POINTER(PEMRARCTO, 40, 4); + TEST_TYPE_SIZE (PEMRARCTO, 4) + TEST_TYPE_ALIGN (PEMRARCTO, 4) + TEST_TARGET_SIZE (PEMRARCTO, 40) + TEST_TARGET_ALIGN(PEMRARCTO, 4) } static void test_pack_PEMRBEGINPATH(void) { /* PEMRBEGINPATH */ - TEST_TYPE(PEMRBEGINPATH, 4, 4); - TEST_TYPE_POINTER(PEMRBEGINPATH, 8, 4); + TEST_TYPE_SIZE (PEMRBEGINPATH, 4) + TEST_TYPE_ALIGN (PEMRBEGINPATH, 4) + TEST_TARGET_SIZE (PEMRBEGINPATH, 8) + TEST_TARGET_ALIGN(PEMRBEGINPATH, 4) } static void test_pack_PEMRBITBLT(void) { /* PEMRBITBLT */ - TEST_TYPE(PEMRBITBLT, 4, 4); - TEST_TYPE_POINTER(PEMRBITBLT, 100, 4); + TEST_TYPE_SIZE (PEMRBITBLT, 4) + TEST_TYPE_ALIGN (PEMRBITBLT, 4) + TEST_TARGET_SIZE (PEMRBITBLT, 100) + TEST_TARGET_ALIGN(PEMRBITBLT, 4) } static void test_pack_PEMRCHORD(void) { /* PEMRCHORD */ - TEST_TYPE(PEMRCHORD, 4, 4); - TEST_TYPE_POINTER(PEMRCHORD, 40, 4); + TEST_TYPE_SIZE (PEMRCHORD, 4) + TEST_TYPE_ALIGN (PEMRCHORD, 4) + TEST_TARGET_SIZE (PEMRCHORD, 40) + TEST_TARGET_ALIGN(PEMRCHORD, 4) } static void test_pack_PEMRCLOSEFIGURE(void) { /* PEMRCLOSEFIGURE */ - TEST_TYPE(PEMRCLOSEFIGURE, 4, 4); - TEST_TYPE_POINTER(PEMRCLOSEFIGURE, 8, 4); + TEST_TYPE_SIZE (PEMRCLOSEFIGURE, 4) + TEST_TYPE_ALIGN (PEMRCLOSEFIGURE, 4) + TEST_TARGET_SIZE (PEMRCLOSEFIGURE, 8) + TEST_TARGET_ALIGN(PEMRCLOSEFIGURE, 4) } static void test_pack_PEMRCREATEBRUSHINDIRECT(void) { /* PEMRCREATEBRUSHINDIRECT */ - TEST_TYPE(PEMRCREATEBRUSHINDIRECT, 4, 4); - TEST_TYPE_POINTER(PEMRCREATEBRUSHINDIRECT, 24, 4); + TEST_TYPE_SIZE (PEMRCREATEBRUSHINDIRECT, 4) + TEST_TYPE_ALIGN (PEMRCREATEBRUSHINDIRECT, 4) + TEST_TARGET_SIZE (PEMRCREATEBRUSHINDIRECT, 24) + TEST_TARGET_ALIGN(PEMRCREATEBRUSHINDIRECT, 4) } static void test_pack_PEMRCREATECOLORSPACE(void) { /* PEMRCREATECOLORSPACE */ - TEST_TYPE(PEMRCREATECOLORSPACE, 4, 4); - TEST_TYPE_POINTER(PEMRCREATECOLORSPACE, 340, 4); + TEST_TYPE_SIZE (PEMRCREATECOLORSPACE, 4) + TEST_TYPE_ALIGN (PEMRCREATECOLORSPACE, 4) + TEST_TARGET_SIZE (PEMRCREATECOLORSPACE, 340) + TEST_TARGET_ALIGN(PEMRCREATECOLORSPACE, 4) } static void test_pack_PEMRCREATECOLORSPACEW(void) { /* PEMRCREATECOLORSPACEW */ - TEST_TYPE(PEMRCREATECOLORSPACEW, 4, 4); - TEST_TYPE_POINTER(PEMRCREATECOLORSPACEW, 612, 4); + TEST_TYPE_SIZE (PEMRCREATECOLORSPACEW, 4) + TEST_TYPE_ALIGN (PEMRCREATECOLORSPACEW, 4) + TEST_TARGET_SIZE (PEMRCREATECOLORSPACEW, 612) + TEST_TARGET_ALIGN(PEMRCREATECOLORSPACEW, 4) } static void test_pack_PEMRCREATEDIBPATTERNBRUSHPT(void) { /* PEMRCREATEDIBPATTERNBRUSHPT */ - TEST_TYPE(PEMRCREATEDIBPATTERNBRUSHPT, 4, 4); - TEST_TYPE_POINTER(PEMRCREATEDIBPATTERNBRUSHPT, 32, 4); + TEST_TYPE_SIZE (PEMRCREATEDIBPATTERNBRUSHPT, 4) + TEST_TYPE_ALIGN (PEMRCREATEDIBPATTERNBRUSHPT, 4) + TEST_TARGET_SIZE (PEMRCREATEDIBPATTERNBRUSHPT, 32) + TEST_TARGET_ALIGN(PEMRCREATEDIBPATTERNBRUSHPT, 4) } static void test_pack_PEMRCREATEMONOBRUSH(void) { /* PEMRCREATEMONOBRUSH */ - TEST_TYPE(PEMRCREATEMONOBRUSH, 4, 4); - TEST_TYPE_POINTER(PEMRCREATEMONOBRUSH, 32, 4); + TEST_TYPE_SIZE (PEMRCREATEMONOBRUSH, 4) + TEST_TYPE_ALIGN (PEMRCREATEMONOBRUSH, 4) + TEST_TARGET_SIZE (PEMRCREATEMONOBRUSH, 32) + TEST_TARGET_ALIGN(PEMRCREATEMONOBRUSH, 4) } static void test_pack_PEMRCREATEPALETTE(void) { /* PEMRCREATEPALETTE */ - TEST_TYPE(PEMRCREATEPALETTE, 4, 4); - TEST_TYPE_POINTER(PEMRCREATEPALETTE, 20, 4); + TEST_TYPE_SIZE (PEMRCREATEPALETTE, 4) + TEST_TYPE_ALIGN (PEMRCREATEPALETTE, 4) + TEST_TARGET_SIZE (PEMRCREATEPALETTE, 20) + TEST_TARGET_ALIGN(PEMRCREATEPALETTE, 4) } static void test_pack_PEMRCREATEPEN(void) { /* PEMRCREATEPEN */ - TEST_TYPE(PEMRCREATEPEN, 4, 4); - TEST_TYPE_POINTER(PEMRCREATEPEN, 28, 4); + TEST_TYPE_SIZE (PEMRCREATEPEN, 4) + TEST_TYPE_ALIGN (PEMRCREATEPEN, 4) + TEST_TARGET_SIZE (PEMRCREATEPEN, 28) + TEST_TARGET_ALIGN(PEMRCREATEPEN, 4) } static void test_pack_PEMRDELETECOLORSPACE(void) { /* PEMRDELETECOLORSPACE */ - TEST_TYPE(PEMRDELETECOLORSPACE, 4, 4); - TEST_TYPE_POINTER(PEMRDELETECOLORSPACE, 12, 4); + TEST_TYPE_SIZE (PEMRDELETECOLORSPACE, 4) + TEST_TYPE_ALIGN (PEMRDELETECOLORSPACE, 4) + TEST_TARGET_SIZE (PEMRDELETECOLORSPACE, 12) + TEST_TARGET_ALIGN(PEMRDELETECOLORSPACE, 4) } static void test_pack_PEMRDELETEOBJECT(void) { /* PEMRDELETEOBJECT */ - TEST_TYPE(PEMRDELETEOBJECT, 4, 4); - TEST_TYPE_POINTER(PEMRDELETEOBJECT, 12, 4); + TEST_TYPE_SIZE (PEMRDELETEOBJECT, 4) + TEST_TYPE_ALIGN (PEMRDELETEOBJECT, 4) + TEST_TARGET_SIZE (PEMRDELETEOBJECT, 12) + TEST_TARGET_ALIGN(PEMRDELETEOBJECT, 4) } static void test_pack_PEMRELLIPSE(void) { /* PEMRELLIPSE */ - TEST_TYPE(PEMRELLIPSE, 4, 4); - TEST_TYPE_POINTER(PEMRELLIPSE, 24, 4); + TEST_TYPE_SIZE (PEMRELLIPSE, 4) + TEST_TYPE_ALIGN (PEMRELLIPSE, 4) + TEST_TARGET_SIZE (PEMRELLIPSE, 24) + TEST_TARGET_ALIGN(PEMRELLIPSE, 4) } static void test_pack_PEMRENDPATH(void) { /* PEMRENDPATH */ - TEST_TYPE(PEMRENDPATH, 4, 4); - TEST_TYPE_POINTER(PEMRENDPATH, 8, 4); + TEST_TYPE_SIZE (PEMRENDPATH, 4) + TEST_TYPE_ALIGN (PEMRENDPATH, 4) + TEST_TARGET_SIZE (PEMRENDPATH, 8) + TEST_TARGET_ALIGN(PEMRENDPATH, 4) } static void test_pack_PEMREOF(void) { /* PEMREOF */ - TEST_TYPE(PEMREOF, 4, 4); - TEST_TYPE_POINTER(PEMREOF, 20, 4); + TEST_TYPE_SIZE (PEMREOF, 4) + TEST_TYPE_ALIGN (PEMREOF, 4) + TEST_TARGET_SIZE (PEMREOF, 20) + TEST_TARGET_ALIGN(PEMREOF, 4) } static void test_pack_PEMREXCLUDECLIPRECT(void) { /* PEMREXCLUDECLIPRECT */ - TEST_TYPE(PEMREXCLUDECLIPRECT, 4, 4); - TEST_TYPE_POINTER(PEMREXCLUDECLIPRECT, 24, 4); + TEST_TYPE_SIZE (PEMREXCLUDECLIPRECT, 4) + TEST_TYPE_ALIGN (PEMREXCLUDECLIPRECT, 4) + TEST_TARGET_SIZE (PEMREXCLUDECLIPRECT, 24) + TEST_TARGET_ALIGN(PEMREXCLUDECLIPRECT, 4) } static void test_pack_PEMREXTCREATEFONTINDIRECTW(void) { /* PEMREXTCREATEFONTINDIRECTW */ - TEST_TYPE(PEMREXTCREATEFONTINDIRECTW, 4, 4); - TEST_TYPE_POINTER(PEMREXTCREATEFONTINDIRECTW, 332, 4); + TEST_TYPE_SIZE (PEMREXTCREATEFONTINDIRECTW, 4) + TEST_TYPE_ALIGN (PEMREXTCREATEFONTINDIRECTW, 4) + TEST_TARGET_SIZE (PEMREXTCREATEFONTINDIRECTW, 332) + TEST_TARGET_ALIGN(PEMREXTCREATEFONTINDIRECTW, 4) } static void test_pack_PEMREXTCREATEPEN(void) { /* PEMREXTCREATEPEN */ - TEST_TYPE(PEMREXTCREATEPEN, 4, 4); - TEST_TYPE_POINTER(PEMREXTCREATEPEN, 56, 4); + TEST_TYPE_SIZE (PEMREXTCREATEPEN, 4) + TEST_TYPE_ALIGN (PEMREXTCREATEPEN, 4) + TEST_TARGET_SIZE (PEMREXTCREATEPEN, 56) + TEST_TARGET_ALIGN(PEMREXTCREATEPEN, 4) } static void test_pack_PEMREXTFLOODFILL(void) { /* PEMREXTFLOODFILL */ - TEST_TYPE(PEMREXTFLOODFILL, 4, 4); - TEST_TYPE_POINTER(PEMREXTFLOODFILL, 24, 4); + TEST_TYPE_SIZE (PEMREXTFLOODFILL, 4) + TEST_TYPE_ALIGN (PEMREXTFLOODFILL, 4) + TEST_TARGET_SIZE (PEMREXTFLOODFILL, 24) + TEST_TARGET_ALIGN(PEMREXTFLOODFILL, 4) } static void test_pack_PEMREXTSELECTCLIPRGN(void) { /* PEMREXTSELECTCLIPRGN */ - TEST_TYPE(PEMREXTSELECTCLIPRGN, 4, 4); - TEST_TYPE_POINTER(PEMREXTSELECTCLIPRGN, 20, 4); + TEST_TYPE_SIZE (PEMREXTSELECTCLIPRGN, 4) + TEST_TYPE_ALIGN (PEMREXTSELECTCLIPRGN, 4) + TEST_TARGET_SIZE (PEMREXTSELECTCLIPRGN, 20) + TEST_TARGET_ALIGN(PEMREXTSELECTCLIPRGN, 4) } static void test_pack_PEMREXTTEXTOUTA(void) { /* PEMREXTTEXTOUTA */ - TEST_TYPE(PEMREXTTEXTOUTA, 4, 4); - TEST_TYPE_POINTER(PEMREXTTEXTOUTA, 76, 4); + TEST_TYPE_SIZE (PEMREXTTEXTOUTA, 4) + TEST_TYPE_ALIGN (PEMREXTTEXTOUTA, 4) + TEST_TARGET_SIZE (PEMREXTTEXTOUTA, 76) + TEST_TARGET_ALIGN(PEMREXTTEXTOUTA, 4) } static void test_pack_PEMREXTTEXTOUTW(void) { /* PEMREXTTEXTOUTW */ - TEST_TYPE(PEMREXTTEXTOUTW, 4, 4); - TEST_TYPE_POINTER(PEMREXTTEXTOUTW, 76, 4); + TEST_TYPE_SIZE (PEMREXTTEXTOUTW, 4) + TEST_TYPE_ALIGN (PEMREXTTEXTOUTW, 4) + TEST_TARGET_SIZE (PEMREXTTEXTOUTW, 76) + TEST_TARGET_ALIGN(PEMREXTTEXTOUTW, 4) } static void test_pack_PEMRFILLPATH(void) { /* PEMRFILLPATH */ - TEST_TYPE(PEMRFILLPATH, 4, 4); - TEST_TYPE_POINTER(PEMRFILLPATH, 24, 4); + TEST_TYPE_SIZE (PEMRFILLPATH, 4) + TEST_TYPE_ALIGN (PEMRFILLPATH, 4) + TEST_TARGET_SIZE (PEMRFILLPATH, 24) + TEST_TARGET_ALIGN(PEMRFILLPATH, 4) } static void test_pack_PEMRFILLRGN(void) { /* PEMRFILLRGN */ - TEST_TYPE(PEMRFILLRGN, 4, 4); - TEST_TYPE_POINTER(PEMRFILLRGN, 36, 4); + TEST_TYPE_SIZE (PEMRFILLRGN, 4) + TEST_TYPE_ALIGN (PEMRFILLRGN, 4) + TEST_TARGET_SIZE (PEMRFILLRGN, 36) + TEST_TARGET_ALIGN(PEMRFILLRGN, 4) } static void test_pack_PEMRFLATTENPATH(void) { /* PEMRFLATTENPATH */ - TEST_TYPE(PEMRFLATTENPATH, 4, 4); - TEST_TYPE_POINTER(PEMRFLATTENPATH, 8, 4); + TEST_TYPE_SIZE (PEMRFLATTENPATH, 4) + TEST_TYPE_ALIGN (PEMRFLATTENPATH, 4) + TEST_TARGET_SIZE (PEMRFLATTENPATH, 8) + TEST_TARGET_ALIGN(PEMRFLATTENPATH, 4) } static void test_pack_PEMRFORMAT(void) { /* PEMRFORMAT */ - TEST_TYPE(PEMRFORMAT, 4, 4); - TEST_TYPE_POINTER(PEMRFORMAT, 16, 4); + TEST_TYPE_SIZE (PEMRFORMAT, 4) + TEST_TYPE_ALIGN (PEMRFORMAT, 4) + TEST_TARGET_SIZE (PEMRFORMAT, 16) + TEST_TARGET_ALIGN(PEMRFORMAT, 4) } static void test_pack_PEMRFRAMERGN(void) { /* PEMRFRAMERGN */ - TEST_TYPE(PEMRFRAMERGN, 4, 4); - TEST_TYPE_POINTER(PEMRFRAMERGN, 44, 4); + TEST_TYPE_SIZE (PEMRFRAMERGN, 4) + TEST_TYPE_ALIGN (PEMRFRAMERGN, 4) + TEST_TARGET_SIZE (PEMRFRAMERGN, 44) + TEST_TARGET_ALIGN(PEMRFRAMERGN, 4) } static void test_pack_PEMRGDICOMMENT(void) { /* PEMRGDICOMMENT */ - TEST_TYPE(PEMRGDICOMMENT, 4, 4); - TEST_TYPE_POINTER(PEMRGDICOMMENT, 16, 4); + TEST_TYPE_SIZE (PEMRGDICOMMENT, 4) + TEST_TYPE_ALIGN (PEMRGDICOMMENT, 4) + TEST_TARGET_SIZE (PEMRGDICOMMENT, 16) + TEST_TARGET_ALIGN(PEMRGDICOMMENT, 4) } static void test_pack_PEMRGLSBOUNDEDRECORD(void) { /* PEMRGLSBOUNDEDRECORD */ - TEST_TYPE(PEMRGLSBOUNDEDRECORD, 4, 4); - TEST_TYPE_POINTER(PEMRGLSBOUNDEDRECORD, 32, 4); + TEST_TYPE_SIZE (PEMRGLSBOUNDEDRECORD, 4) + TEST_TYPE_ALIGN (PEMRGLSBOUNDEDRECORD, 4) + TEST_TARGET_SIZE (PEMRGLSBOUNDEDRECORD, 32) + TEST_TARGET_ALIGN(PEMRGLSBOUNDEDRECORD, 4) } static void test_pack_PEMRGLSRECORD(void) { /* PEMRGLSRECORD */ - TEST_TYPE(PEMRGLSRECORD, 4, 4); - TEST_TYPE_POINTER(PEMRGLSRECORD, 16, 4); + TEST_TYPE_SIZE (PEMRGLSRECORD, 4) + TEST_TYPE_ALIGN (PEMRGLSRECORD, 4) + TEST_TARGET_SIZE (PEMRGLSRECORD, 16) + TEST_TARGET_ALIGN(PEMRGLSRECORD, 4) } static void test_pack_PEMRINTERSECTCLIPRECT(void) { /* PEMRINTERSECTCLIPRECT */ - TEST_TYPE(PEMRINTERSECTCLIPRECT, 4, 4); - TEST_TYPE_POINTER(PEMRINTERSECTCLIPRECT, 24, 4); + TEST_TYPE_SIZE (PEMRINTERSECTCLIPRECT, 4) + TEST_TYPE_ALIGN (PEMRINTERSECTCLIPRECT, 4) + TEST_TARGET_SIZE (PEMRINTERSECTCLIPRECT, 24) + TEST_TARGET_ALIGN(PEMRINTERSECTCLIPRECT, 4) } static void test_pack_PEMRINVERTRGN(void) { /* PEMRINVERTRGN */ - TEST_TYPE(PEMRINVERTRGN, 4, 4); - TEST_TYPE_POINTER(PEMRINVERTRGN, 32, 4); + TEST_TYPE_SIZE (PEMRINVERTRGN, 4) + TEST_TYPE_ALIGN (PEMRINVERTRGN, 4) + TEST_TARGET_SIZE (PEMRINVERTRGN, 32) + TEST_TARGET_ALIGN(PEMRINVERTRGN, 4) } static void test_pack_PEMRLINETO(void) { /* PEMRLINETO */ - TEST_TYPE(PEMRLINETO, 4, 4); - TEST_TYPE_POINTER(PEMRLINETO, 16, 4); + TEST_TYPE_SIZE (PEMRLINETO, 4) + TEST_TYPE_ALIGN (PEMRLINETO, 4) + TEST_TARGET_SIZE (PEMRLINETO, 16) + TEST_TARGET_ALIGN(PEMRLINETO, 4) } static void test_pack_PEMRMASKBLT(void) { /* PEMRMASKBLT */ - TEST_TYPE(PEMRMASKBLT, 4, 4); - TEST_TYPE_POINTER(PEMRMASKBLT, 128, 4); + TEST_TYPE_SIZE (PEMRMASKBLT, 4) + TEST_TYPE_ALIGN (PEMRMASKBLT, 4) + TEST_TARGET_SIZE (PEMRMASKBLT, 128) + TEST_TARGET_ALIGN(PEMRMASKBLT, 4) } static void test_pack_PEMRMODIFYWORLDTRANSFORM(void) { /* PEMRMODIFYWORLDTRANSFORM */ - TEST_TYPE(PEMRMODIFYWORLDTRANSFORM, 4, 4); - TEST_TYPE_POINTER(PEMRMODIFYWORLDTRANSFORM, 36, 4); + TEST_TYPE_SIZE (PEMRMODIFYWORLDTRANSFORM, 4) + TEST_TYPE_ALIGN (PEMRMODIFYWORLDTRANSFORM, 4) + TEST_TARGET_SIZE (PEMRMODIFYWORLDTRANSFORM, 36) + TEST_TARGET_ALIGN(PEMRMODIFYWORLDTRANSFORM, 4) } static void test_pack_PEMRMOVETOEX(void) { /* PEMRMOVETOEX */ - TEST_TYPE(PEMRMOVETOEX, 4, 4); - TEST_TYPE_POINTER(PEMRMOVETOEX, 16, 4); + TEST_TYPE_SIZE (PEMRMOVETOEX, 4) + TEST_TYPE_ALIGN (PEMRMOVETOEX, 4) + TEST_TARGET_SIZE (PEMRMOVETOEX, 16) + TEST_TARGET_ALIGN(PEMRMOVETOEX, 4) } static void test_pack_PEMROFFSETCLIPRGN(void) { /* PEMROFFSETCLIPRGN */ - TEST_TYPE(PEMROFFSETCLIPRGN, 4, 4); - TEST_TYPE_POINTER(PEMROFFSETCLIPRGN, 16, 4); + TEST_TYPE_SIZE (PEMROFFSETCLIPRGN, 4) + TEST_TYPE_ALIGN (PEMROFFSETCLIPRGN, 4) + TEST_TARGET_SIZE (PEMROFFSETCLIPRGN, 16) + TEST_TARGET_ALIGN(PEMROFFSETCLIPRGN, 4) } static void test_pack_PEMRPAINTRGN(void) { /* PEMRPAINTRGN */ - TEST_TYPE(PEMRPAINTRGN, 4, 4); - TEST_TYPE_POINTER(PEMRPAINTRGN, 32, 4); + TEST_TYPE_SIZE (PEMRPAINTRGN, 4) + TEST_TYPE_ALIGN (PEMRPAINTRGN, 4) + TEST_TARGET_SIZE (PEMRPAINTRGN, 32) + TEST_TARGET_ALIGN(PEMRPAINTRGN, 4) } static void test_pack_PEMRPIE(void) { /* PEMRPIE */ - TEST_TYPE(PEMRPIE, 4, 4); - TEST_TYPE_POINTER(PEMRPIE, 40, 4); + TEST_TYPE_SIZE (PEMRPIE, 4) + TEST_TYPE_ALIGN (PEMRPIE, 4) + TEST_TARGET_SIZE (PEMRPIE, 40) + TEST_TARGET_ALIGN(PEMRPIE, 4) } static void test_pack_PEMRPIXELFORMAT(void) { /* PEMRPIXELFORMAT */ - TEST_TYPE(PEMRPIXELFORMAT, 4, 4); - TEST_TYPE_POINTER(PEMRPIXELFORMAT, 48, 4); + TEST_TYPE_SIZE (PEMRPIXELFORMAT, 4) + TEST_TYPE_ALIGN (PEMRPIXELFORMAT, 4) + TEST_TARGET_SIZE (PEMRPIXELFORMAT, 48) + TEST_TARGET_ALIGN(PEMRPIXELFORMAT, 4) } static void test_pack_PEMRPLGBLT(void) { /* PEMRPLGBLT */ - TEST_TYPE(PEMRPLGBLT, 4, 4); - TEST_TYPE_POINTER(PEMRPLGBLT, 140, 4); + TEST_TYPE_SIZE (PEMRPLGBLT, 4) + TEST_TYPE_ALIGN (PEMRPLGBLT, 4) + TEST_TARGET_SIZE (PEMRPLGBLT, 140) + TEST_TARGET_ALIGN(PEMRPLGBLT, 4) } static void test_pack_PEMRPOLYBEZIER(void) { /* PEMRPOLYBEZIER */ - TEST_TYPE(PEMRPOLYBEZIER, 4, 4); - TEST_TYPE_POINTER(PEMRPOLYBEZIER, 36, 4); + TEST_TYPE_SIZE (PEMRPOLYBEZIER, 4) + TEST_TYPE_ALIGN (PEMRPOLYBEZIER, 4) + TEST_TARGET_SIZE (PEMRPOLYBEZIER, 36) + TEST_TARGET_ALIGN(PEMRPOLYBEZIER, 4) } static void test_pack_PEMRPOLYBEZIER16(void) { /* PEMRPOLYBEZIER16 */ - TEST_TYPE(PEMRPOLYBEZIER16, 4, 4); - TEST_TYPE_POINTER(PEMRPOLYBEZIER16, 32, 4); + TEST_TYPE_SIZE (PEMRPOLYBEZIER16, 4) + TEST_TYPE_ALIGN (PEMRPOLYBEZIER16, 4) + TEST_TARGET_SIZE (PEMRPOLYBEZIER16, 32) + TEST_TARGET_ALIGN(PEMRPOLYBEZIER16, 4) } static void test_pack_PEMRPOLYBEZIERTO(void) { /* PEMRPOLYBEZIERTO */ - TEST_TYPE(PEMRPOLYBEZIERTO, 4, 4); - TEST_TYPE_POINTER(PEMRPOLYBEZIERTO, 36, 4); + TEST_TYPE_SIZE (PEMRPOLYBEZIERTO, 4) + TEST_TYPE_ALIGN (PEMRPOLYBEZIERTO, 4) + TEST_TARGET_SIZE (PEMRPOLYBEZIERTO, 36) + TEST_TARGET_ALIGN(PEMRPOLYBEZIERTO, 4) } static void test_pack_PEMRPOLYBEZIERTO16(void) { /* PEMRPOLYBEZIERTO16 */ - TEST_TYPE(PEMRPOLYBEZIERTO16, 4, 4); - TEST_TYPE_POINTER(PEMRPOLYBEZIERTO16, 32, 4); + TEST_TYPE_SIZE (PEMRPOLYBEZIERTO16, 4) + TEST_TYPE_ALIGN (PEMRPOLYBEZIERTO16, 4) + TEST_TARGET_SIZE (PEMRPOLYBEZIERTO16, 32) + TEST_TARGET_ALIGN(PEMRPOLYBEZIERTO16, 4) } static void test_pack_PEMRPOLYDRAW(void) { /* PEMRPOLYDRAW */ - TEST_TYPE(PEMRPOLYDRAW, 4, 4); - TEST_TYPE_POINTER(PEMRPOLYDRAW, 40, 4); + TEST_TYPE_SIZE (PEMRPOLYDRAW, 4) + TEST_TYPE_ALIGN (PEMRPOLYDRAW, 4) + TEST_TARGET_SIZE (PEMRPOLYDRAW, 40) + TEST_TARGET_ALIGN(PEMRPOLYDRAW, 4) } static void test_pack_PEMRPOLYDRAW16(void) { /* PEMRPOLYDRAW16 */ - TEST_TYPE(PEMRPOLYDRAW16, 4, 4); - TEST_TYPE_POINTER(PEMRPOLYDRAW16, 36, 4); + TEST_TYPE_SIZE (PEMRPOLYDRAW16, 4) + TEST_TYPE_ALIGN (PEMRPOLYDRAW16, 4) + TEST_TARGET_SIZE (PEMRPOLYDRAW16, 36) + TEST_TARGET_ALIGN(PEMRPOLYDRAW16, 4) } static void test_pack_PEMRPOLYGON(void) { /* PEMRPOLYGON */ - TEST_TYPE(PEMRPOLYGON, 4, 4); - TEST_TYPE_POINTER(PEMRPOLYGON, 36, 4); + TEST_TYPE_SIZE (PEMRPOLYGON, 4) + TEST_TYPE_ALIGN (PEMRPOLYGON, 4) + TEST_TARGET_SIZE (PEMRPOLYGON, 36) + TEST_TARGET_ALIGN(PEMRPOLYGON, 4) } static void test_pack_PEMRPOLYGON16(void) { /* PEMRPOLYGON16 */ - TEST_TYPE(PEMRPOLYGON16, 4, 4); - TEST_TYPE_POINTER(PEMRPOLYGON16, 32, 4); + TEST_TYPE_SIZE (PEMRPOLYGON16, 4) + TEST_TYPE_ALIGN (PEMRPOLYGON16, 4) + TEST_TARGET_SIZE (PEMRPOLYGON16, 32) + TEST_TARGET_ALIGN(PEMRPOLYGON16, 4) } static void test_pack_PEMRPOLYLINE(void) { /* PEMRPOLYLINE */ - TEST_TYPE(PEMRPOLYLINE, 4, 4); - TEST_TYPE_POINTER(PEMRPOLYLINE, 36, 4); + TEST_TYPE_SIZE (PEMRPOLYLINE, 4) + TEST_TYPE_ALIGN (PEMRPOLYLINE, 4) + TEST_TARGET_SIZE (PEMRPOLYLINE, 36) + TEST_TARGET_ALIGN(PEMRPOLYLINE, 4) } static void test_pack_PEMRPOLYLINE16(void) { /* PEMRPOLYLINE16 */ - TEST_TYPE(PEMRPOLYLINE16, 4, 4); - TEST_TYPE_POINTER(PEMRPOLYLINE16, 32, 4); + TEST_TYPE_SIZE (PEMRPOLYLINE16, 4) + TEST_TYPE_ALIGN (PEMRPOLYLINE16, 4) + TEST_TARGET_SIZE (PEMRPOLYLINE16, 32) + TEST_TARGET_ALIGN(PEMRPOLYLINE16, 4) } static void test_pack_PEMRPOLYLINETO(void) { /* PEMRPOLYLINETO */ - TEST_TYPE(PEMRPOLYLINETO, 4, 4); - TEST_TYPE_POINTER(PEMRPOLYLINETO, 36, 4); + TEST_TYPE_SIZE (PEMRPOLYLINETO, 4) + TEST_TYPE_ALIGN (PEMRPOLYLINETO, 4) + TEST_TARGET_SIZE (PEMRPOLYLINETO, 36) + TEST_TARGET_ALIGN(PEMRPOLYLINETO, 4) } static void test_pack_PEMRPOLYLINETO16(void) { /* PEMRPOLYLINETO16 */ - TEST_TYPE(PEMRPOLYLINETO16, 4, 4); - TEST_TYPE_POINTER(PEMRPOLYLINETO16, 32, 4); + TEST_TYPE_SIZE (PEMRPOLYLINETO16, 4) + TEST_TYPE_ALIGN (PEMRPOLYLINETO16, 4) + TEST_TARGET_SIZE (PEMRPOLYLINETO16, 32) + TEST_TARGET_ALIGN(PEMRPOLYLINETO16, 4) } static void test_pack_PEMRPOLYPOLYGON(void) { /* PEMRPOLYPOLYGON */ - TEST_TYPE(PEMRPOLYPOLYGON, 4, 4); - TEST_TYPE_POINTER(PEMRPOLYPOLYGON, 44, 4); + TEST_TYPE_SIZE (PEMRPOLYPOLYGON, 4) + TEST_TYPE_ALIGN (PEMRPOLYPOLYGON, 4) + TEST_TARGET_SIZE (PEMRPOLYPOLYGON, 44) + TEST_TARGET_ALIGN(PEMRPOLYPOLYGON, 4) } static void test_pack_PEMRPOLYPOLYGON16(void) { /* PEMRPOLYPOLYGON16 */ - TEST_TYPE(PEMRPOLYPOLYGON16, 4, 4); - TEST_TYPE_POINTER(PEMRPOLYPOLYGON16, 40, 4); + TEST_TYPE_SIZE (PEMRPOLYPOLYGON16, 4) + TEST_TYPE_ALIGN (PEMRPOLYPOLYGON16, 4) + TEST_TARGET_SIZE (PEMRPOLYPOLYGON16, 40) + TEST_TARGET_ALIGN(PEMRPOLYPOLYGON16, 4) } static void test_pack_PEMRPOLYPOLYLINE(void) { /* PEMRPOLYPOLYLINE */ - TEST_TYPE(PEMRPOLYPOLYLINE, 4, 4); - TEST_TYPE_POINTER(PEMRPOLYPOLYLINE, 44, 4); + TEST_TYPE_SIZE (PEMRPOLYPOLYLINE, 4) + TEST_TYPE_ALIGN (PEMRPOLYPOLYLINE, 4) + TEST_TARGET_SIZE (PEMRPOLYPOLYLINE, 44) + TEST_TARGET_ALIGN(PEMRPOLYPOLYLINE, 4) } static void test_pack_PEMRPOLYPOLYLINE16(void) { /* PEMRPOLYPOLYLINE16 */ - TEST_TYPE(PEMRPOLYPOLYLINE16, 4, 4); - TEST_TYPE_POINTER(PEMRPOLYPOLYLINE16, 40, 4); + TEST_TYPE_SIZE (PEMRPOLYPOLYLINE16, 4) + TEST_TYPE_ALIGN (PEMRPOLYPOLYLINE16, 4) + TEST_TARGET_SIZE (PEMRPOLYPOLYLINE16, 40) + TEST_TARGET_ALIGN(PEMRPOLYPOLYLINE16, 4) } static void test_pack_PEMRPOLYTEXTOUTA(void) { /* PEMRPOLYTEXTOUTA */ - TEST_TYPE(PEMRPOLYTEXTOUTA, 4, 4); - TEST_TYPE_POINTER(PEMRPOLYTEXTOUTA, 80, 4); + TEST_TYPE_SIZE (PEMRPOLYTEXTOUTA, 4) + TEST_TYPE_ALIGN (PEMRPOLYTEXTOUTA, 4) + TEST_TARGET_SIZE (PEMRPOLYTEXTOUTA, 80) + TEST_TARGET_ALIGN(PEMRPOLYTEXTOUTA, 4) } static void test_pack_PEMRPOLYTEXTOUTW(void) { /* PEMRPOLYTEXTOUTW */ - TEST_TYPE(PEMRPOLYTEXTOUTW, 4, 4); - TEST_TYPE_POINTER(PEMRPOLYTEXTOUTW, 80, 4); + TEST_TYPE_SIZE (PEMRPOLYTEXTOUTW, 4) + TEST_TYPE_ALIGN (PEMRPOLYTEXTOUTW, 4) + TEST_TARGET_SIZE (PEMRPOLYTEXTOUTW, 80) + TEST_TARGET_ALIGN(PEMRPOLYTEXTOUTW, 4) } static void test_pack_PEMRREALIZEPALETTE(void) { /* PEMRREALIZEPALETTE */ - TEST_TYPE(PEMRREALIZEPALETTE, 4, 4); - TEST_TYPE_POINTER(PEMRREALIZEPALETTE, 8, 4); + TEST_TYPE_SIZE (PEMRREALIZEPALETTE, 4) + TEST_TYPE_ALIGN (PEMRREALIZEPALETTE, 4) + TEST_TARGET_SIZE (PEMRREALIZEPALETTE, 8) + TEST_TARGET_ALIGN(PEMRREALIZEPALETTE, 4) } static void test_pack_PEMRRECTANGLE(void) { /* PEMRRECTANGLE */ - TEST_TYPE(PEMRRECTANGLE, 4, 4); - TEST_TYPE_POINTER(PEMRRECTANGLE, 24, 4); + TEST_TYPE_SIZE (PEMRRECTANGLE, 4) + TEST_TYPE_ALIGN (PEMRRECTANGLE, 4) + TEST_TARGET_SIZE (PEMRRECTANGLE, 24) + TEST_TARGET_ALIGN(PEMRRECTANGLE, 4) } static void test_pack_PEMRRESIZEPALETTE(void) { /* PEMRRESIZEPALETTE */ - TEST_TYPE(PEMRRESIZEPALETTE, 4, 4); - TEST_TYPE_POINTER(PEMRRESIZEPALETTE, 16, 4); + TEST_TYPE_SIZE (PEMRRESIZEPALETTE, 4) + TEST_TYPE_ALIGN (PEMRRESIZEPALETTE, 4) + TEST_TARGET_SIZE (PEMRRESIZEPALETTE, 16) + TEST_TARGET_ALIGN(PEMRRESIZEPALETTE, 4) } static void test_pack_PEMRRESTOREDC(void) { /* PEMRRESTOREDC */ - TEST_TYPE(PEMRRESTOREDC, 4, 4); - TEST_TYPE_POINTER(PEMRRESTOREDC, 12, 4); + TEST_TYPE_SIZE (PEMRRESTOREDC, 4) + TEST_TYPE_ALIGN (PEMRRESTOREDC, 4) + TEST_TARGET_SIZE (PEMRRESTOREDC, 12) + TEST_TARGET_ALIGN(PEMRRESTOREDC, 4) } static void test_pack_PEMRROUNDRECT(void) { /* PEMRROUNDRECT */ - TEST_TYPE(PEMRROUNDRECT, 4, 4); - TEST_TYPE_POINTER(PEMRROUNDRECT, 32, 4); + TEST_TYPE_SIZE (PEMRROUNDRECT, 4) + TEST_TYPE_ALIGN (PEMRROUNDRECT, 4) + TEST_TARGET_SIZE (PEMRROUNDRECT, 32) + TEST_TARGET_ALIGN(PEMRROUNDRECT, 4) } static void test_pack_PEMRSAVEDC(void) { /* PEMRSAVEDC */ - TEST_TYPE(PEMRSAVEDC, 4, 4); - TEST_TYPE_POINTER(PEMRSAVEDC, 8, 4); + TEST_TYPE_SIZE (PEMRSAVEDC, 4) + TEST_TYPE_ALIGN (PEMRSAVEDC, 4) + TEST_TARGET_SIZE (PEMRSAVEDC, 8) + TEST_TARGET_ALIGN(PEMRSAVEDC, 4) } static void test_pack_PEMRSCALEVIEWPORTEXTEX(void) { /* PEMRSCALEVIEWPORTEXTEX */ - TEST_TYPE(PEMRSCALEVIEWPORTEXTEX, 4, 4); - TEST_TYPE_POINTER(PEMRSCALEVIEWPORTEXTEX, 24, 4); + TEST_TYPE_SIZE (PEMRSCALEVIEWPORTEXTEX, 4) + TEST_TYPE_ALIGN (PEMRSCALEVIEWPORTEXTEX, 4) + TEST_TARGET_SIZE (PEMRSCALEVIEWPORTEXTEX, 24) + TEST_TARGET_ALIGN(PEMRSCALEVIEWPORTEXTEX, 4) } static void test_pack_PEMRSCALEWINDOWEXTEX(void) { /* PEMRSCALEWINDOWEXTEX */ - TEST_TYPE(PEMRSCALEWINDOWEXTEX, 4, 4); - TEST_TYPE_POINTER(PEMRSCALEWINDOWEXTEX, 24, 4); + TEST_TYPE_SIZE (PEMRSCALEWINDOWEXTEX, 4) + TEST_TYPE_ALIGN (PEMRSCALEWINDOWEXTEX, 4) + TEST_TARGET_SIZE (PEMRSCALEWINDOWEXTEX, 24) + TEST_TARGET_ALIGN(PEMRSCALEWINDOWEXTEX, 4) } static void test_pack_PEMRSELECTCLIPPATH(void) { /* PEMRSELECTCLIPPATH */ - TEST_TYPE(PEMRSELECTCLIPPATH, 4, 4); - TEST_TYPE_POINTER(PEMRSELECTCLIPPATH, 12, 4); + TEST_TYPE_SIZE (PEMRSELECTCLIPPATH, 4) + TEST_TYPE_ALIGN (PEMRSELECTCLIPPATH, 4) + TEST_TARGET_SIZE (PEMRSELECTCLIPPATH, 12) + TEST_TARGET_ALIGN(PEMRSELECTCLIPPATH, 4) } static void test_pack_PEMRSELECTCOLORSPACE(void) { /* PEMRSELECTCOLORSPACE */ - TEST_TYPE(PEMRSELECTCOLORSPACE, 4, 4); - TEST_TYPE_POINTER(PEMRSELECTCOLORSPACE, 12, 4); + TEST_TYPE_SIZE (PEMRSELECTCOLORSPACE, 4) + TEST_TYPE_ALIGN (PEMRSELECTCOLORSPACE, 4) + TEST_TARGET_SIZE (PEMRSELECTCOLORSPACE, 12) + TEST_TARGET_ALIGN(PEMRSELECTCOLORSPACE, 4) } static void test_pack_PEMRSELECTOBJECT(void) { /* PEMRSELECTOBJECT */ - TEST_TYPE(PEMRSELECTOBJECT, 4, 4); - TEST_TYPE_POINTER(PEMRSELECTOBJECT, 12, 4); + TEST_TYPE_SIZE (PEMRSELECTOBJECT, 4) + TEST_TYPE_ALIGN (PEMRSELECTOBJECT, 4) + TEST_TARGET_SIZE (PEMRSELECTOBJECT, 12) + TEST_TARGET_ALIGN(PEMRSELECTOBJECT, 4) } static void test_pack_PEMRSELECTPALETTE(void) { /* PEMRSELECTPALETTE */ - TEST_TYPE(PEMRSELECTPALETTE, 4, 4); - TEST_TYPE_POINTER(PEMRSELECTPALETTE, 12, 4); + TEST_TYPE_SIZE (PEMRSELECTPALETTE, 4) + TEST_TYPE_ALIGN (PEMRSELECTPALETTE, 4) + TEST_TARGET_SIZE (PEMRSELECTPALETTE, 12) + TEST_TARGET_ALIGN(PEMRSELECTPALETTE, 4) } static void test_pack_PEMRSETARCDIRECTION(void) { /* PEMRSETARCDIRECTION */ - TEST_TYPE(PEMRSETARCDIRECTION, 4, 4); - TEST_TYPE_POINTER(PEMRSETARCDIRECTION, 12, 4); + TEST_TYPE_SIZE (PEMRSETARCDIRECTION, 4) + TEST_TYPE_ALIGN (PEMRSETARCDIRECTION, 4) + TEST_TARGET_SIZE (PEMRSETARCDIRECTION, 12) + TEST_TARGET_ALIGN(PEMRSETARCDIRECTION, 4) } static void test_pack_PEMRSETBKCOLOR(void) { /* PEMRSETBKCOLOR */ - TEST_TYPE(PEMRSETBKCOLOR, 4, 4); - TEST_TYPE_POINTER(PEMRSETBKCOLOR, 12, 4); + TEST_TYPE_SIZE (PEMRSETBKCOLOR, 4) + TEST_TYPE_ALIGN (PEMRSETBKCOLOR, 4) + TEST_TARGET_SIZE (PEMRSETBKCOLOR, 12) + TEST_TARGET_ALIGN(PEMRSETBKCOLOR, 4) } static void test_pack_PEMRSETBKMODE(void) { /* PEMRSETBKMODE */ - TEST_TYPE(PEMRSETBKMODE, 4, 4); - TEST_TYPE_POINTER(PEMRSETBKMODE, 12, 4); + TEST_TYPE_SIZE (PEMRSETBKMODE, 4) + TEST_TYPE_ALIGN (PEMRSETBKMODE, 4) + TEST_TARGET_SIZE (PEMRSETBKMODE, 12) + TEST_TARGET_ALIGN(PEMRSETBKMODE, 4) } static void test_pack_PEMRSETBRUSHORGEX(void) { /* PEMRSETBRUSHORGEX */ - TEST_TYPE(PEMRSETBRUSHORGEX, 4, 4); - TEST_TYPE_POINTER(PEMRSETBRUSHORGEX, 16, 4); + TEST_TYPE_SIZE (PEMRSETBRUSHORGEX, 4) + TEST_TYPE_ALIGN (PEMRSETBRUSHORGEX, 4) + TEST_TARGET_SIZE (PEMRSETBRUSHORGEX, 16) + TEST_TARGET_ALIGN(PEMRSETBRUSHORGEX, 4) } static void test_pack_PEMRSETCOLORADJUSTMENT(void) { /* PEMRSETCOLORADJUSTMENT */ - TEST_TYPE(PEMRSETCOLORADJUSTMENT, 4, 4); - TEST_TYPE_POINTER(PEMRSETCOLORADJUSTMENT, 32, 4); + TEST_TYPE_SIZE (PEMRSETCOLORADJUSTMENT, 4) + TEST_TYPE_ALIGN (PEMRSETCOLORADJUSTMENT, 4) + TEST_TARGET_SIZE (PEMRSETCOLORADJUSTMENT, 32) + TEST_TARGET_ALIGN(PEMRSETCOLORADJUSTMENT, 4) } static void test_pack_PEMRSETCOLORSPACE(void) { /* PEMRSETCOLORSPACE */ - TEST_TYPE(PEMRSETCOLORSPACE, 4, 4); - TEST_TYPE_POINTER(PEMRSETCOLORSPACE, 12, 4); + TEST_TYPE_SIZE (PEMRSETCOLORSPACE, 4) + TEST_TYPE_ALIGN (PEMRSETCOLORSPACE, 4) + TEST_TARGET_SIZE (PEMRSETCOLORSPACE, 12) + TEST_TARGET_ALIGN(PEMRSETCOLORSPACE, 4) } static void test_pack_PEMRSETDIBITSTODEVICE(void) { /* PEMRSETDIBITSTODEVICE */ - TEST_TYPE(PEMRSETDIBITSTODEVICE, 4, 4); - TEST_TYPE_POINTER(PEMRSETDIBITSTODEVICE, 76, 4); + TEST_TYPE_SIZE (PEMRSETDIBITSTODEVICE, 4) + TEST_TYPE_ALIGN (PEMRSETDIBITSTODEVICE, 4) + TEST_TARGET_SIZE (PEMRSETDIBITSTODEVICE, 76) + TEST_TARGET_ALIGN(PEMRSETDIBITSTODEVICE, 4) } static void test_pack_PEMRSETICMMODE(void) { /* PEMRSETICMMODE */ - TEST_TYPE(PEMRSETICMMODE, 4, 4); - TEST_TYPE_POINTER(PEMRSETICMMODE, 12, 4); + TEST_TYPE_SIZE (PEMRSETICMMODE, 4) + TEST_TYPE_ALIGN (PEMRSETICMMODE, 4) + TEST_TARGET_SIZE (PEMRSETICMMODE, 12) + TEST_TARGET_ALIGN(PEMRSETICMMODE, 4) } static void test_pack_PEMRSETLAYOUT(void) { /* PEMRSETLAYOUT */ - TEST_TYPE(PEMRSETLAYOUT, 4, 4); - TEST_TYPE_POINTER(PEMRSETLAYOUT, 12, 4); + TEST_TYPE_SIZE (PEMRSETLAYOUT, 4) + TEST_TYPE_ALIGN (PEMRSETLAYOUT, 4) + TEST_TARGET_SIZE (PEMRSETLAYOUT, 12) + TEST_TARGET_ALIGN(PEMRSETLAYOUT, 4) } static void test_pack_PEMRSETMAPMODE(void) { /* PEMRSETMAPMODE */ - TEST_TYPE(PEMRSETMAPMODE, 4, 4); - TEST_TYPE_POINTER(PEMRSETMAPMODE, 12, 4); + TEST_TYPE_SIZE (PEMRSETMAPMODE, 4) + TEST_TYPE_ALIGN (PEMRSETMAPMODE, 4) + TEST_TARGET_SIZE (PEMRSETMAPMODE, 12) + TEST_TARGET_ALIGN(PEMRSETMAPMODE, 4) } static void test_pack_PEMRSETMAPPERFLAGS(void) { /* PEMRSETMAPPERFLAGS */ - TEST_TYPE(PEMRSETMAPPERFLAGS, 4, 4); - TEST_TYPE_POINTER(PEMRSETMAPPERFLAGS, 12, 4); + TEST_TYPE_SIZE (PEMRSETMAPPERFLAGS, 4) + TEST_TYPE_ALIGN (PEMRSETMAPPERFLAGS, 4) + TEST_TARGET_SIZE (PEMRSETMAPPERFLAGS, 12) + TEST_TARGET_ALIGN(PEMRSETMAPPERFLAGS, 4) } static void test_pack_PEMRSETMETARGN(void) { /* PEMRSETMETARGN */ - TEST_TYPE(PEMRSETMETARGN, 4, 4); - TEST_TYPE_POINTER(PEMRSETMETARGN, 8, 4); + TEST_TYPE_SIZE (PEMRSETMETARGN, 4) + TEST_TYPE_ALIGN (PEMRSETMETARGN, 4) + TEST_TARGET_SIZE (PEMRSETMETARGN, 8) + TEST_TARGET_ALIGN(PEMRSETMETARGN, 4) } static void test_pack_PEMRSETMITERLIMIT(void) { /* PEMRSETMITERLIMIT */ - TEST_TYPE(PEMRSETMITERLIMIT, 4, 4); - TEST_TYPE_POINTER(PEMRSETMITERLIMIT, 12, 4); + TEST_TYPE_SIZE (PEMRSETMITERLIMIT, 4) + TEST_TYPE_ALIGN (PEMRSETMITERLIMIT, 4) + TEST_TARGET_SIZE (PEMRSETMITERLIMIT, 12) + TEST_TARGET_ALIGN(PEMRSETMITERLIMIT, 4) } static void test_pack_PEMRSETPALETTEENTRIES(void) { /* PEMRSETPALETTEENTRIES */ - TEST_TYPE(PEMRSETPALETTEENTRIES, 4, 4); - TEST_TYPE_POINTER(PEMRSETPALETTEENTRIES, 24, 4); + TEST_TYPE_SIZE (PEMRSETPALETTEENTRIES, 4) + TEST_TYPE_ALIGN (PEMRSETPALETTEENTRIES, 4) + TEST_TARGET_SIZE (PEMRSETPALETTEENTRIES, 24) + TEST_TARGET_ALIGN(PEMRSETPALETTEENTRIES, 4) } static void test_pack_PEMRSETPIXELV(void) { /* PEMRSETPIXELV */ - TEST_TYPE(PEMRSETPIXELV, 4, 4); - TEST_TYPE_POINTER(PEMRSETPIXELV, 20, 4); + TEST_TYPE_SIZE (PEMRSETPIXELV, 4) + TEST_TYPE_ALIGN (PEMRSETPIXELV, 4) + TEST_TARGET_SIZE (PEMRSETPIXELV, 20) + TEST_TARGET_ALIGN(PEMRSETPIXELV, 4) } static void test_pack_PEMRSETPOLYFILLMODE(void) { /* PEMRSETPOLYFILLMODE */ - TEST_TYPE(PEMRSETPOLYFILLMODE, 4, 4); - TEST_TYPE_POINTER(PEMRSETPOLYFILLMODE, 12, 4); + TEST_TYPE_SIZE (PEMRSETPOLYFILLMODE, 4) + TEST_TYPE_ALIGN (PEMRSETPOLYFILLMODE, 4) + TEST_TARGET_SIZE (PEMRSETPOLYFILLMODE, 12) + TEST_TARGET_ALIGN(PEMRSETPOLYFILLMODE, 4) } static void test_pack_PEMRSETROP2(void) { /* PEMRSETROP2 */ - TEST_TYPE(PEMRSETROP2, 4, 4); - TEST_TYPE_POINTER(PEMRSETROP2, 12, 4); + TEST_TYPE_SIZE (PEMRSETROP2, 4) + TEST_TYPE_ALIGN (PEMRSETROP2, 4) + TEST_TARGET_SIZE (PEMRSETROP2, 12) + TEST_TARGET_ALIGN(PEMRSETROP2, 4) } static void test_pack_PEMRSETSTRETCHBLTMODE(void) { /* PEMRSETSTRETCHBLTMODE */ - TEST_TYPE(PEMRSETSTRETCHBLTMODE, 4, 4); - TEST_TYPE_POINTER(PEMRSETSTRETCHBLTMODE, 12, 4); + TEST_TYPE_SIZE (PEMRSETSTRETCHBLTMODE, 4) + TEST_TYPE_ALIGN (PEMRSETSTRETCHBLTMODE, 4) + TEST_TARGET_SIZE (PEMRSETSTRETCHBLTMODE, 12) + TEST_TARGET_ALIGN(PEMRSETSTRETCHBLTMODE, 4) } static void test_pack_PEMRSETTEXTALIGN(void) { /* PEMRSETTEXTALIGN */ - TEST_TYPE(PEMRSETTEXTALIGN, 4, 4); - TEST_TYPE_POINTER(PEMRSETTEXTALIGN, 12, 4); + TEST_TYPE_SIZE (PEMRSETTEXTALIGN, 4) + TEST_TYPE_ALIGN (PEMRSETTEXTALIGN, 4) + TEST_TARGET_SIZE (PEMRSETTEXTALIGN, 12) + TEST_TARGET_ALIGN(PEMRSETTEXTALIGN, 4) } static void test_pack_PEMRSETTEXTCOLOR(void) { /* PEMRSETTEXTCOLOR */ - TEST_TYPE(PEMRSETTEXTCOLOR, 4, 4); - TEST_TYPE_POINTER(PEMRSETTEXTCOLOR, 12, 4); + TEST_TYPE_SIZE (PEMRSETTEXTCOLOR, 4) + TEST_TYPE_ALIGN (PEMRSETTEXTCOLOR, 4) + TEST_TARGET_SIZE (PEMRSETTEXTCOLOR, 12) + TEST_TARGET_ALIGN(PEMRSETTEXTCOLOR, 4) } static void test_pack_PEMRSETVIEWPORTEXTEX(void) { /* PEMRSETVIEWPORTEXTEX */ - TEST_TYPE(PEMRSETVIEWPORTEXTEX, 4, 4); - TEST_TYPE_POINTER(PEMRSETVIEWPORTEXTEX, 16, 4); + TEST_TYPE_SIZE (PEMRSETVIEWPORTEXTEX, 4) + TEST_TYPE_ALIGN (PEMRSETVIEWPORTEXTEX, 4) + TEST_TARGET_SIZE (PEMRSETVIEWPORTEXTEX, 16) + TEST_TARGET_ALIGN(PEMRSETVIEWPORTEXTEX, 4) } static void test_pack_PEMRSETVIEWPORTORGEX(void) { /* PEMRSETVIEWPORTORGEX */ - TEST_TYPE(PEMRSETVIEWPORTORGEX, 4, 4); - TEST_TYPE_POINTER(PEMRSETVIEWPORTORGEX, 16, 4); + TEST_TYPE_SIZE (PEMRSETVIEWPORTORGEX, 4) + TEST_TYPE_ALIGN (PEMRSETVIEWPORTORGEX, 4) + TEST_TARGET_SIZE (PEMRSETVIEWPORTORGEX, 16) + TEST_TARGET_ALIGN(PEMRSETVIEWPORTORGEX, 4) } static void test_pack_PEMRSETWINDOWEXTEX(void) { /* PEMRSETWINDOWEXTEX */ - TEST_TYPE(PEMRSETWINDOWEXTEX, 4, 4); - TEST_TYPE_POINTER(PEMRSETWINDOWEXTEX, 16, 4); + TEST_TYPE_SIZE (PEMRSETWINDOWEXTEX, 4) + TEST_TYPE_ALIGN (PEMRSETWINDOWEXTEX, 4) + TEST_TARGET_SIZE (PEMRSETWINDOWEXTEX, 16) + TEST_TARGET_ALIGN(PEMRSETWINDOWEXTEX, 4) } static void test_pack_PEMRSETWINDOWORGEX(void) { /* PEMRSETWINDOWORGEX */ - TEST_TYPE(PEMRSETWINDOWORGEX, 4, 4); - TEST_TYPE_POINTER(PEMRSETWINDOWORGEX, 16, 4); + TEST_TYPE_SIZE (PEMRSETWINDOWORGEX, 4) + TEST_TYPE_ALIGN (PEMRSETWINDOWORGEX, 4) + TEST_TARGET_SIZE (PEMRSETWINDOWORGEX, 16) + TEST_TARGET_ALIGN(PEMRSETWINDOWORGEX, 4) } static void test_pack_PEMRSETWORLDTRANSFORM(void) { /* PEMRSETWORLDTRANSFORM */ - TEST_TYPE(PEMRSETWORLDTRANSFORM, 4, 4); - TEST_TYPE_POINTER(PEMRSETWORLDTRANSFORM, 32, 4); + TEST_TYPE_SIZE (PEMRSETWORLDTRANSFORM, 4) + TEST_TYPE_ALIGN (PEMRSETWORLDTRANSFORM, 4) + TEST_TARGET_SIZE (PEMRSETWORLDTRANSFORM, 32) + TEST_TARGET_ALIGN(PEMRSETWORLDTRANSFORM, 4) } static void test_pack_PEMRSTRETCHBLT(void) { /* PEMRSTRETCHBLT */ - TEST_TYPE(PEMRSTRETCHBLT, 4, 4); - TEST_TYPE_POINTER(PEMRSTRETCHBLT, 108, 4); + TEST_TYPE_SIZE (PEMRSTRETCHBLT, 4) + TEST_TYPE_ALIGN (PEMRSTRETCHBLT, 4) + TEST_TARGET_SIZE (PEMRSTRETCHBLT, 108) + TEST_TARGET_ALIGN(PEMRSTRETCHBLT, 4) } static void test_pack_PEMRSTRETCHDIBITS(void) { /* PEMRSTRETCHDIBITS */ - TEST_TYPE(PEMRSTRETCHDIBITS, 4, 4); - TEST_TYPE_POINTER(PEMRSTRETCHDIBITS, 80, 4); + TEST_TYPE_SIZE (PEMRSTRETCHDIBITS, 4) + TEST_TYPE_ALIGN (PEMRSTRETCHDIBITS, 4) + TEST_TARGET_SIZE (PEMRSTRETCHDIBITS, 80) + TEST_TARGET_ALIGN(PEMRSTRETCHDIBITS, 4) } static void test_pack_PEMRSTROKEANDFILLPATH(void) { /* PEMRSTROKEANDFILLPATH */ - TEST_TYPE(PEMRSTROKEANDFILLPATH, 4, 4); - TEST_TYPE_POINTER(PEMRSTROKEANDFILLPATH, 24, 4); + TEST_TYPE_SIZE (PEMRSTROKEANDFILLPATH, 4) + TEST_TYPE_ALIGN (PEMRSTROKEANDFILLPATH, 4) + TEST_TARGET_SIZE (PEMRSTROKEANDFILLPATH, 24) + TEST_TARGET_ALIGN(PEMRSTROKEANDFILLPATH, 4) } static void test_pack_PEMRSTROKEPATH(void) { /* PEMRSTROKEPATH */ - TEST_TYPE(PEMRSTROKEPATH, 4, 4); - TEST_TYPE_POINTER(PEMRSTROKEPATH, 24, 4); + TEST_TYPE_SIZE (PEMRSTROKEPATH, 4) + TEST_TYPE_ALIGN (PEMRSTROKEPATH, 4) + TEST_TARGET_SIZE (PEMRSTROKEPATH, 24) + TEST_TARGET_ALIGN(PEMRSTROKEPATH, 4) } static void test_pack_PEMRTEXT(void) { /* PEMRTEXT */ - TEST_TYPE(PEMRTEXT, 4, 4); - TEST_TYPE_POINTER(PEMRTEXT, 40, 4); + TEST_TYPE_SIZE (PEMRTEXT, 4) + TEST_TYPE_ALIGN (PEMRTEXT, 4) + TEST_TARGET_SIZE (PEMRTEXT, 40) + TEST_TARGET_ALIGN(PEMRTEXT, 4) } static void test_pack_PEMRWIDENPATH(void) { /* PEMRWIDENPATH */ - TEST_TYPE(PEMRWIDENPATH, 4, 4); - TEST_TYPE_POINTER(PEMRWIDENPATH, 8, 4); + TEST_TYPE_SIZE (PEMRWIDENPATH, 4) + TEST_TYPE_ALIGN (PEMRWIDENPATH, 4) + TEST_TARGET_SIZE (PEMRWIDENPATH, 8) + TEST_TARGET_ALIGN(PEMRWIDENPATH, 4) } static void test_pack_PENHMETAHEADER(void) { /* PENHMETAHEADER */ - TEST_TYPE(PENHMETAHEADER, 4, 4); - TEST_TYPE_POINTER(PENHMETAHEADER, 108, 4); + TEST_TYPE_SIZE (PENHMETAHEADER, 4) + TEST_TYPE_ALIGN (PENHMETAHEADER, 4) + TEST_TARGET_SIZE (PENHMETAHEADER, 108) + TEST_TARGET_ALIGN(PENHMETAHEADER, 4) } static void test_pack_PEXTLOGFONTA(void) { /* PEXTLOGFONTA */ - TEST_TYPE(PEXTLOGFONTA, 4, 4); - TEST_TYPE_POINTER(PEXTLOGFONTA, 192, 4); + TEST_TYPE_SIZE (PEXTLOGFONTA, 4) + TEST_TYPE_ALIGN (PEXTLOGFONTA, 4) + TEST_TARGET_SIZE (PEXTLOGFONTA, 192) + TEST_TARGET_ALIGN(PEXTLOGFONTA, 4) } static void test_pack_PEXTLOGFONTW(void) { /* PEXTLOGFONTW */ - TEST_TYPE(PEXTLOGFONTW, 4, 4); - TEST_TYPE_POINTER(PEXTLOGFONTW, 320, 4); + TEST_TYPE_SIZE (PEXTLOGFONTW, 4) + TEST_TYPE_ALIGN (PEXTLOGFONTW, 4) + TEST_TARGET_SIZE (PEXTLOGFONTW, 320) + TEST_TARGET_ALIGN(PEXTLOGFONTW, 4) } static void test_pack_PEXTLOGPEN(void) { /* PEXTLOGPEN */ - TEST_TYPE(PEXTLOGPEN, 4, 4); - TEST_TYPE_POINTER(PEXTLOGPEN, 28, 4); + TEST_TYPE_SIZE (PEXTLOGPEN, 4) + TEST_TYPE_ALIGN (PEXTLOGPEN, 4) + TEST_TARGET_SIZE (PEXTLOGPEN, 28) + TEST_TARGET_ALIGN(PEXTLOGPEN, 4) } static void test_pack_PFONTSIGNATURE(void) { /* PFONTSIGNATURE */ - TEST_TYPE(PFONTSIGNATURE, 4, 4); - TEST_TYPE_POINTER(PFONTSIGNATURE, 24, 4); + TEST_TYPE_SIZE (PFONTSIGNATURE, 4) + TEST_TYPE_ALIGN (PFONTSIGNATURE, 4) + TEST_TARGET_SIZE (PFONTSIGNATURE, 24) + TEST_TARGET_ALIGN(PFONTSIGNATURE, 4) } static void test_pack_PGLYPHMETRICSFLOAT(void) { /* PGLYPHMETRICSFLOAT */ - TEST_TYPE(PGLYPHMETRICSFLOAT, 4, 4); - TEST_TYPE_POINTER(PGLYPHMETRICSFLOAT, 24, 4); + TEST_TYPE_SIZE (PGLYPHMETRICSFLOAT, 4) + TEST_TYPE_ALIGN (PGLYPHMETRICSFLOAT, 4) + TEST_TARGET_SIZE (PGLYPHMETRICSFLOAT, 24) + TEST_TARGET_ALIGN(PGLYPHMETRICSFLOAT, 4) } static void test_pack_PGRADIENT_RECT(void) { /* PGRADIENT_RECT */ - TEST_TYPE(PGRADIENT_RECT, 4, 4); - TEST_TYPE_POINTER(PGRADIENT_RECT, 8, 4); + TEST_TYPE_SIZE (PGRADIENT_RECT, 4) + TEST_TYPE_ALIGN (PGRADIENT_RECT, 4) + TEST_TARGET_SIZE (PGRADIENT_RECT, 8) + TEST_TARGET_ALIGN(PGRADIENT_RECT, 4) } static void test_pack_PGRADIENT_TRIANGLE(void) { /* PGRADIENT_TRIANGLE */ - TEST_TYPE(PGRADIENT_TRIANGLE, 4, 4); - TEST_TYPE_POINTER(PGRADIENT_TRIANGLE, 12, 4); + TEST_TYPE_SIZE (PGRADIENT_TRIANGLE, 4) + TEST_TYPE_ALIGN (PGRADIENT_TRIANGLE, 4) + TEST_TARGET_SIZE (PGRADIENT_TRIANGLE, 12) + TEST_TARGET_ALIGN(PGRADIENT_TRIANGLE, 4) } static void test_pack_PHANDLETABLE(void) { /* PHANDLETABLE */ - TEST_TYPE(PHANDLETABLE, 4, 4); - TEST_TYPE_POINTER(PHANDLETABLE, 4, 4); + TEST_TYPE_SIZE (PHANDLETABLE, 4) + TEST_TYPE_ALIGN (PHANDLETABLE, 4) + TEST_TARGET_SIZE (PHANDLETABLE, 4) + TEST_TARGET_ALIGN(PHANDLETABLE, 4) } static void test_pack_PIXELFORMATDESCRIPTOR(void) { /* PIXELFORMATDESCRIPTOR (pack 4) */ - TEST_TYPE(PIXELFORMATDESCRIPTOR, 40, 4); - TEST_FIELD(PIXELFORMATDESCRIPTOR, nSize, 0, 2, 2); - TEST_FIELD(PIXELFORMATDESCRIPTOR, nVersion, 2, 2, 2); - TEST_FIELD(PIXELFORMATDESCRIPTOR, dwFlags, 4, 4, 4); - TEST_FIELD(PIXELFORMATDESCRIPTOR, iPixelType, 8, 1, 1); - TEST_FIELD(PIXELFORMATDESCRIPTOR, cColorBits, 9, 1, 1); - TEST_FIELD(PIXELFORMATDESCRIPTOR, cRedBits, 10, 1, 1); - TEST_FIELD(PIXELFORMATDESCRIPTOR, cRedShift, 11, 1, 1); - TEST_FIELD(PIXELFORMATDESCRIPTOR, cGreenBits, 12, 1, 1); - TEST_FIELD(PIXELFORMATDESCRIPTOR, cGreenShift, 13, 1, 1); - TEST_FIELD(PIXELFORMATDESCRIPTOR, cBlueBits, 14, 1, 1); - TEST_FIELD(PIXELFORMATDESCRIPTOR, cBlueShift, 15, 1, 1); - TEST_FIELD(PIXELFORMATDESCRIPTOR, cAlphaBits, 16, 1, 1); - TEST_FIELD(PIXELFORMATDESCRIPTOR, cAlphaShift, 17, 1, 1); - TEST_FIELD(PIXELFORMATDESCRIPTOR, cAccumBits, 18, 1, 1); - TEST_FIELD(PIXELFORMATDESCRIPTOR, cAccumRedBits, 19, 1, 1); - TEST_FIELD(PIXELFORMATDESCRIPTOR, cAccumGreenBits, 20, 1, 1); - TEST_FIELD(PIXELFORMATDESCRIPTOR, cAccumBlueBits, 21, 1, 1); - TEST_FIELD(PIXELFORMATDESCRIPTOR, cAccumAlphaBits, 22, 1, 1); - TEST_FIELD(PIXELFORMATDESCRIPTOR, cDepthBits, 23, 1, 1); - TEST_FIELD(PIXELFORMATDESCRIPTOR, cStencilBits, 24, 1, 1); - TEST_FIELD(PIXELFORMATDESCRIPTOR, cAuxBuffers, 25, 1, 1); - TEST_FIELD(PIXELFORMATDESCRIPTOR, iLayerType, 26, 1, 1); - TEST_FIELD(PIXELFORMATDESCRIPTOR, bReserved, 27, 1, 1); - TEST_FIELD(PIXELFORMATDESCRIPTOR, dwLayerMask, 28, 4, 4); - TEST_FIELD(PIXELFORMATDESCRIPTOR, dwVisibleMask, 32, 4, 4); - TEST_FIELD(PIXELFORMATDESCRIPTOR, dwDamageMask, 36, 4, 4); + TEST_TYPE_SIZE (PIXELFORMATDESCRIPTOR, 40) + TEST_TYPE_ALIGN (PIXELFORMATDESCRIPTOR, 4) + TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, nSize, 2) + TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, nSize, 2) + TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, nSize, 0) + TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, nVersion, 2) + TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, nVersion, 2) + TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, nVersion, 2) + TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, dwFlags, 4) + TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, dwFlags, 4) + TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, dwFlags, 4) + TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, iPixelType, 1) + TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, iPixelType, 1) + TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, iPixelType, 8) + TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cColorBits, 1) + TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cColorBits, 1) + TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cColorBits, 9) + TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cRedBits, 1) + TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cRedBits, 1) + TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cRedBits, 10) + TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cRedShift, 1) + TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cRedShift, 1) + TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cRedShift, 11) + TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cGreenBits, 1) + TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cGreenBits, 1) + TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cGreenBits, 12) + TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cGreenShift, 1) + TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cGreenShift, 1) + TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cGreenShift, 13) + TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cBlueBits, 1) + TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cBlueBits, 1) + TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cBlueBits, 14) + TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cBlueShift, 1) + TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cBlueShift, 1) + TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cBlueShift, 15) + TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cAlphaBits, 1) + TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cAlphaBits, 1) + TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cAlphaBits, 16) + TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cAlphaShift, 1) + TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cAlphaShift, 1) + TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cAlphaShift, 17) + TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cAccumBits, 1) + TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cAccumBits, 1) + TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cAccumBits, 18) + TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cAccumRedBits, 1) + TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cAccumRedBits, 1) + TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cAccumRedBits, 19) + TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cAccumGreenBits, 1) + TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cAccumGreenBits, 1) + TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cAccumGreenBits, 20) + TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cAccumBlueBits, 1) + TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cAccumBlueBits, 1) + TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cAccumBlueBits, 21) + TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cAccumAlphaBits, 1) + TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cAccumAlphaBits, 1) + TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cAccumAlphaBits, 22) + TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cDepthBits, 1) + TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cDepthBits, 1) + TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cDepthBits, 23) + TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cStencilBits, 1) + TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cStencilBits, 1) + TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cStencilBits, 24) + TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cAuxBuffers, 1) + TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cAuxBuffers, 1) + TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cAuxBuffers, 25) + TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, iLayerType, 1) + TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, iLayerType, 1) + TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, iLayerType, 26) + TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, bReserved, 1) + TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, bReserved, 1) + TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, bReserved, 27) + TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, dwLayerMask, 4) + TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, dwLayerMask, 4) + TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, dwLayerMask, 28) + TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, dwVisibleMask, 4) + TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, dwVisibleMask, 4) + TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, dwVisibleMask, 32) + TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, dwDamageMask, 4) + TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, dwDamageMask, 4) + TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, dwDamageMask, 36) } static void test_pack_PLAYERPLANEDESCRIPTOR(void) { /* PLAYERPLANEDESCRIPTOR */ - TEST_TYPE(PLAYERPLANEDESCRIPTOR, 4, 4); - TEST_TYPE_POINTER(PLAYERPLANEDESCRIPTOR, 32, 4); + TEST_TYPE_SIZE (PLAYERPLANEDESCRIPTOR, 4) + TEST_TYPE_ALIGN (PLAYERPLANEDESCRIPTOR, 4) + TEST_TARGET_SIZE (PLAYERPLANEDESCRIPTOR, 32) + TEST_TARGET_ALIGN(PLAYERPLANEDESCRIPTOR, 4) } static void test_pack_PLOCALESIGNATURE(void) { /* PLOCALESIGNATURE */ - TEST_TYPE(PLOCALESIGNATURE, 4, 4); - TEST_TYPE_POINTER(PLOCALESIGNATURE, 32, 4); + TEST_TYPE_SIZE (PLOCALESIGNATURE, 4) + TEST_TYPE_ALIGN (PLOCALESIGNATURE, 4) + TEST_TARGET_SIZE (PLOCALESIGNATURE, 32) + TEST_TARGET_ALIGN(PLOCALESIGNATURE, 4) } static void test_pack_PLOGBRUSH(void) { /* PLOGBRUSH */ - TEST_TYPE(PLOGBRUSH, 4, 4); - TEST_TYPE_POINTER(PLOGBRUSH, 12, 4); + TEST_TYPE_SIZE (PLOGBRUSH, 4) + TEST_TYPE_ALIGN (PLOGBRUSH, 4) + TEST_TARGET_SIZE (PLOGBRUSH, 12) + TEST_TARGET_ALIGN(PLOGBRUSH, 4) } static void test_pack_PLOGFONTA(void) { /* PLOGFONTA */ - TEST_TYPE(PLOGFONTA, 4, 4); - TEST_TYPE_POINTER(PLOGFONTA, 60, 4); + TEST_TYPE_SIZE (PLOGFONTA, 4) + TEST_TYPE_ALIGN (PLOGFONTA, 4) + TEST_TARGET_SIZE (PLOGFONTA, 60) + TEST_TARGET_ALIGN(PLOGFONTA, 4) } static void test_pack_PLOGFONTW(void) { /* PLOGFONTW */ - TEST_TYPE(PLOGFONTW, 4, 4); - TEST_TYPE_POINTER(PLOGFONTW, 92, 4); + TEST_TYPE_SIZE (PLOGFONTW, 4) + TEST_TYPE_ALIGN (PLOGFONTW, 4) + TEST_TARGET_SIZE (PLOGFONTW, 92) + TEST_TARGET_ALIGN(PLOGFONTW, 4) } static void test_pack_PMETAHEADER(void) { /* PMETAHEADER */ - TEST_TYPE(PMETAHEADER, 4, 4); - TEST_TYPE_POINTER(PMETAHEADER, 18, 2); + TEST_TYPE_SIZE (PMETAHEADER, 4) + TEST_TYPE_ALIGN (PMETAHEADER, 4) + TEST_TARGET_SIZE (PMETAHEADER, 18) + TEST_TARGET_ALIGN(PMETAHEADER, 2) } static void test_pack_PMETARECORD(void) { /* PMETARECORD */ - TEST_TYPE(PMETARECORD, 4, 4); - TEST_TYPE_POINTER(PMETARECORD, 8, 4); + TEST_TYPE_SIZE (PMETARECORD, 4) + TEST_TYPE_ALIGN (PMETARECORD, 4) + TEST_TARGET_SIZE (PMETARECORD, 8) + TEST_TARGET_ALIGN(PMETARECORD, 4) } static void test_pack_PNEWTEXTMETRICA(void) { /* PNEWTEXTMETRICA */ - TEST_TYPE(PNEWTEXTMETRICA, 4, 4); - TEST_TYPE_POINTER(PNEWTEXTMETRICA, 72, 4); + TEST_TYPE_SIZE (PNEWTEXTMETRICA, 4) + TEST_TYPE_ALIGN (PNEWTEXTMETRICA, 4) + TEST_TARGET_SIZE (PNEWTEXTMETRICA, 72) + TEST_TARGET_ALIGN(PNEWTEXTMETRICA, 4) } static void test_pack_PNEWTEXTMETRICW(void) { /* PNEWTEXTMETRICW */ - TEST_TYPE(PNEWTEXTMETRICW, 4, 4); - TEST_TYPE_POINTER(PNEWTEXTMETRICW, 76, 4); + TEST_TYPE_SIZE (PNEWTEXTMETRICW, 4) + TEST_TYPE_ALIGN (PNEWTEXTMETRICW, 4) + TEST_TARGET_SIZE (PNEWTEXTMETRICW, 76) + TEST_TARGET_ALIGN(PNEWTEXTMETRICW, 4) } static void test_pack_POINTFLOAT(void) { /* POINTFLOAT (pack 4) */ - TEST_TYPE(POINTFLOAT, 8, 4); - TEST_FIELD(POINTFLOAT, x, 0, 4, 4); - TEST_FIELD(POINTFLOAT, y, 4, 4, 4); + TEST_TYPE_SIZE (POINTFLOAT, 8) + TEST_TYPE_ALIGN (POINTFLOAT, 4) + TEST_FIELD_SIZE (POINTFLOAT, x, 4) + TEST_FIELD_ALIGN (POINTFLOAT, x, 4) + TEST_FIELD_OFFSET(POINTFLOAT, x, 0) + TEST_FIELD_SIZE (POINTFLOAT, y, 4) + TEST_FIELD_ALIGN (POINTFLOAT, y, 4) + TEST_FIELD_OFFSET(POINTFLOAT, y, 4) } static void test_pack_POINTFX(void) { /* POINTFX (pack 4) */ - TEST_TYPE(POINTFX, 8, 2); - TEST_FIELD(POINTFX, x, 0, 4, 2); - TEST_FIELD(POINTFX, y, 4, 4, 2); + TEST_TYPE_SIZE (POINTFX, 8) + TEST_TYPE_ALIGN (POINTFX, 2) + TEST_FIELD_SIZE (POINTFX, x, 4) + TEST_FIELD_ALIGN (POINTFX, x, 2) + TEST_FIELD_OFFSET(POINTFX, x, 0) + TEST_FIELD_SIZE (POINTFX, y, 4) + TEST_FIELD_ALIGN (POINTFX, y, 2) + TEST_FIELD_OFFSET(POINTFX, y, 4) } static void test_pack_POLYTEXTA(void) { /* POLYTEXTA (pack 4) */ - TEST_TYPE(POLYTEXTA, 40, 4); - TEST_FIELD(POLYTEXTA, x, 0, 4, 4); - TEST_FIELD(POLYTEXTA, y, 4, 4, 4); - TEST_FIELD(POLYTEXTA, n, 8, 4, 4); - TEST_FIELD(POLYTEXTA, lpstr, 12, 4, 4); - TEST_FIELD(POLYTEXTA, uiFlags, 16, 4, 4); - TEST_FIELD(POLYTEXTA, rcl, 20, 16, 4); - TEST_FIELD(POLYTEXTA, pdx, 36, 4, 4); + TEST_TYPE_SIZE (POLYTEXTA, 40) + TEST_TYPE_ALIGN (POLYTEXTA, 4) + TEST_FIELD_SIZE (POLYTEXTA, x, 4) + TEST_FIELD_ALIGN (POLYTEXTA, x, 4) + TEST_FIELD_OFFSET(POLYTEXTA, x, 0) + TEST_FIELD_SIZE (POLYTEXTA, y, 4) + TEST_FIELD_ALIGN (POLYTEXTA, y, 4) + TEST_FIELD_OFFSET(POLYTEXTA, y, 4) + TEST_FIELD_SIZE (POLYTEXTA, n, 4) + TEST_FIELD_ALIGN (POLYTEXTA, n, 4) + TEST_FIELD_OFFSET(POLYTEXTA, n, 8) + TEST_FIELD_SIZE (POLYTEXTA, lpstr, 4) + TEST_FIELD_ALIGN (POLYTEXTA, lpstr, 4) + TEST_FIELD_OFFSET(POLYTEXTA, lpstr, 12) + TEST_FIELD_SIZE (POLYTEXTA, uiFlags, 4) + TEST_FIELD_ALIGN (POLYTEXTA, uiFlags, 4) + TEST_FIELD_OFFSET(POLYTEXTA, uiFlags, 16) + TEST_FIELD_SIZE (POLYTEXTA, rcl, 16) + TEST_FIELD_ALIGN (POLYTEXTA, rcl, 4) + TEST_FIELD_OFFSET(POLYTEXTA, rcl, 20) + TEST_FIELD_SIZE (POLYTEXTA, pdx, 4) + TEST_FIELD_ALIGN (POLYTEXTA, pdx, 4) + TEST_FIELD_OFFSET(POLYTEXTA, pdx, 36) } static void test_pack_POLYTEXTW(void) { /* POLYTEXTW (pack 4) */ - TEST_TYPE(POLYTEXTW, 40, 4); - TEST_FIELD(POLYTEXTW, x, 0, 4, 4); - TEST_FIELD(POLYTEXTW, y, 4, 4, 4); - TEST_FIELD(POLYTEXTW, n, 8, 4, 4); - TEST_FIELD(POLYTEXTW, lpstr, 12, 4, 4); - TEST_FIELD(POLYTEXTW, uiFlags, 16, 4, 4); - TEST_FIELD(POLYTEXTW, rcl, 20, 16, 4); - TEST_FIELD(POLYTEXTW, pdx, 36, 4, 4); + TEST_TYPE_SIZE (POLYTEXTW, 40) + TEST_TYPE_ALIGN (POLYTEXTW, 4) + TEST_FIELD_SIZE (POLYTEXTW, x, 4) + TEST_FIELD_ALIGN (POLYTEXTW, x, 4) + TEST_FIELD_OFFSET(POLYTEXTW, x, 0) + TEST_FIELD_SIZE (POLYTEXTW, y, 4) + TEST_FIELD_ALIGN (POLYTEXTW, y, 4) + TEST_FIELD_OFFSET(POLYTEXTW, y, 4) + TEST_FIELD_SIZE (POLYTEXTW, n, 4) + TEST_FIELD_ALIGN (POLYTEXTW, n, 4) + TEST_FIELD_OFFSET(POLYTEXTW, n, 8) + TEST_FIELD_SIZE (POLYTEXTW, lpstr, 4) + TEST_FIELD_ALIGN (POLYTEXTW, lpstr, 4) + TEST_FIELD_OFFSET(POLYTEXTW, lpstr, 12) + TEST_FIELD_SIZE (POLYTEXTW, uiFlags, 4) + TEST_FIELD_ALIGN (POLYTEXTW, uiFlags, 4) + TEST_FIELD_OFFSET(POLYTEXTW, uiFlags, 16) + TEST_FIELD_SIZE (POLYTEXTW, rcl, 16) + TEST_FIELD_ALIGN (POLYTEXTW, rcl, 4) + TEST_FIELD_OFFSET(POLYTEXTW, rcl, 20) + TEST_FIELD_SIZE (POLYTEXTW, pdx, 4) + TEST_FIELD_ALIGN (POLYTEXTW, pdx, 4) + TEST_FIELD_OFFSET(POLYTEXTW, pdx, 36) } static void test_pack_POUTLINETEXTMETRICA(void) { /* POUTLINETEXTMETRICA */ - TEST_TYPE(POUTLINETEXTMETRICA, 4, 4); - TEST_TYPE_POINTER(POUTLINETEXTMETRICA, 212, 4); + TEST_TYPE_SIZE (POUTLINETEXTMETRICA, 4) + TEST_TYPE_ALIGN (POUTLINETEXTMETRICA, 4) + TEST_TARGET_SIZE (POUTLINETEXTMETRICA, 212) + TEST_TARGET_ALIGN(POUTLINETEXTMETRICA, 4) } static void test_pack_POUTLINETEXTMETRICW(void) { /* POUTLINETEXTMETRICW */ - TEST_TYPE(POUTLINETEXTMETRICW, 4, 4); - TEST_TYPE_POINTER(POUTLINETEXTMETRICW, 216, 4); + TEST_TYPE_SIZE (POUTLINETEXTMETRICW, 4) + TEST_TYPE_ALIGN (POUTLINETEXTMETRICW, 4) + TEST_TARGET_SIZE (POUTLINETEXTMETRICW, 216) + TEST_TARGET_ALIGN(POUTLINETEXTMETRICW, 4) } static void test_pack_PPELARRAY(void) { /* PPELARRAY */ - TEST_TYPE(PPELARRAY, 4, 4); - TEST_TYPE_POINTER(PPELARRAY, 20, 4); + TEST_TYPE_SIZE (PPELARRAY, 4) + TEST_TYPE_ALIGN (PPELARRAY, 4) + TEST_TARGET_SIZE (PPELARRAY, 20) + TEST_TARGET_ALIGN(PPELARRAY, 4) } static void test_pack_PPIXELFORMATDESCRIPTOR(void) { /* PPIXELFORMATDESCRIPTOR */ - TEST_TYPE(PPIXELFORMATDESCRIPTOR, 4, 4); - TEST_TYPE_POINTER(PPIXELFORMATDESCRIPTOR, 40, 4); + TEST_TYPE_SIZE (PPIXELFORMATDESCRIPTOR, 4) + TEST_TYPE_ALIGN (PPIXELFORMATDESCRIPTOR, 4) + TEST_TARGET_SIZE (PPIXELFORMATDESCRIPTOR, 40) + TEST_TARGET_ALIGN(PPIXELFORMATDESCRIPTOR, 4) } static void test_pack_PPOINTFLOAT(void) { /* PPOINTFLOAT */ - TEST_TYPE(PPOINTFLOAT, 4, 4); - TEST_TYPE_POINTER(PPOINTFLOAT, 8, 4); + TEST_TYPE_SIZE (PPOINTFLOAT, 4) + TEST_TYPE_ALIGN (PPOINTFLOAT, 4) + TEST_TARGET_SIZE (PPOINTFLOAT, 8) + TEST_TARGET_ALIGN(PPOINTFLOAT, 4) } static void test_pack_PPOLYTEXTA(void) { /* PPOLYTEXTA */ - TEST_TYPE(PPOLYTEXTA, 4, 4); - TEST_TYPE_POINTER(PPOLYTEXTA, 40, 4); + TEST_TYPE_SIZE (PPOLYTEXTA, 4) + TEST_TYPE_ALIGN (PPOLYTEXTA, 4) + TEST_TARGET_SIZE (PPOLYTEXTA, 40) + TEST_TARGET_ALIGN(PPOLYTEXTA, 4) } static void test_pack_PPOLYTEXTW(void) { /* PPOLYTEXTW */ - TEST_TYPE(PPOLYTEXTW, 4, 4); - TEST_TYPE_POINTER(PPOLYTEXTW, 40, 4); + TEST_TYPE_SIZE (PPOLYTEXTW, 4) + TEST_TYPE_ALIGN (PPOLYTEXTW, 4) + TEST_TARGET_SIZE (PPOLYTEXTW, 40) + TEST_TARGET_ALIGN(PPOLYTEXTW, 4) } static void test_pack_PRGNDATA(void) { /* PRGNDATA */ - TEST_TYPE(PRGNDATA, 4, 4); - TEST_TYPE_POINTER(PRGNDATA, 36, 4); + TEST_TYPE_SIZE (PRGNDATA, 4) + TEST_TYPE_ALIGN (PRGNDATA, 4) + TEST_TARGET_SIZE (PRGNDATA, 36) + TEST_TARGET_ALIGN(PRGNDATA, 4) } static void test_pack_PRGNDATAHEADER(void) { /* PRGNDATAHEADER */ - TEST_TYPE(PRGNDATAHEADER, 4, 4); - TEST_TYPE_POINTER(PRGNDATAHEADER, 32, 4); + TEST_TYPE_SIZE (PRGNDATAHEADER, 4) + TEST_TYPE_ALIGN (PRGNDATAHEADER, 4) + TEST_TARGET_SIZE (PRGNDATAHEADER, 32) + TEST_TARGET_ALIGN(PRGNDATAHEADER, 4) } static void test_pack_PTEXTMETRICA(void) { /* PTEXTMETRICA */ - TEST_TYPE(PTEXTMETRICA, 4, 4); - TEST_TYPE_POINTER(PTEXTMETRICA, 56, 4); + TEST_TYPE_SIZE (PTEXTMETRICA, 4) + TEST_TYPE_ALIGN (PTEXTMETRICA, 4) + TEST_TARGET_SIZE (PTEXTMETRICA, 56) + TEST_TARGET_ALIGN(PTEXTMETRICA, 4) } static void test_pack_PTEXTMETRICW(void) { /* PTEXTMETRICW */ - TEST_TYPE(PTEXTMETRICW, 4, 4); - TEST_TYPE_POINTER(PTEXTMETRICW, 60, 4); + TEST_TYPE_SIZE (PTEXTMETRICW, 4) + TEST_TYPE_ALIGN (PTEXTMETRICW, 4) + TEST_TARGET_SIZE (PTEXTMETRICW, 60) + TEST_TARGET_ALIGN(PTEXTMETRICW, 4) } static void test_pack_PTRIVERTEX(void) { /* PTRIVERTEX */ - TEST_TYPE(PTRIVERTEX, 4, 4); - TEST_TYPE_POINTER(PTRIVERTEX, 16, 4); + TEST_TYPE_SIZE (PTRIVERTEX, 4) + TEST_TYPE_ALIGN (PTRIVERTEX, 4) + TEST_TARGET_SIZE (PTRIVERTEX, 16) + TEST_TARGET_ALIGN(PTRIVERTEX, 4) } static void test_pack_PXFORM(void) { /* PXFORM */ - TEST_TYPE(PXFORM, 4, 4); - TEST_TYPE_POINTER(PXFORM, 24, 4); + TEST_TYPE_SIZE (PXFORM, 4) + TEST_TYPE_ALIGN (PXFORM, 4) + TEST_TARGET_SIZE (PXFORM, 24) + TEST_TARGET_ALIGN(PXFORM, 4) } static void test_pack_RASTERIZER_STATUS(void) { /* RASTERIZER_STATUS (pack 4) */ - TEST_TYPE(RASTERIZER_STATUS, 6, 2); - TEST_FIELD(RASTERIZER_STATUS, nSize, 0, 2, 2); - TEST_FIELD(RASTERIZER_STATUS, wFlags, 2, 2, 2); - TEST_FIELD(RASTERIZER_STATUS, nLanguageID, 4, 2, 2); + TEST_TYPE_SIZE (RASTERIZER_STATUS, 6) + TEST_TYPE_ALIGN (RASTERIZER_STATUS, 2) + TEST_FIELD_SIZE (RASTERIZER_STATUS, nSize, 2) + TEST_FIELD_ALIGN (RASTERIZER_STATUS, nSize, 2) + TEST_FIELD_OFFSET(RASTERIZER_STATUS, nSize, 0) + TEST_FIELD_SIZE (RASTERIZER_STATUS, wFlags, 2) + TEST_FIELD_ALIGN (RASTERIZER_STATUS, wFlags, 2) + TEST_FIELD_OFFSET(RASTERIZER_STATUS, wFlags, 2) + TEST_FIELD_SIZE (RASTERIZER_STATUS, nLanguageID, 2) + TEST_FIELD_ALIGN (RASTERIZER_STATUS, nLanguageID, 2) + TEST_FIELD_OFFSET(RASTERIZER_STATUS, nLanguageID, 4) } static void test_pack_RGBQUAD(void) { /* RGBQUAD (pack 4) */ - TEST_TYPE(RGBQUAD, 4, 1); - TEST_FIELD(RGBQUAD, rgbBlue, 0, 1, 1); - TEST_FIELD(RGBQUAD, rgbGreen, 1, 1, 1); - TEST_FIELD(RGBQUAD, rgbRed, 2, 1, 1); - TEST_FIELD(RGBQUAD, rgbReserved, 3, 1, 1); + TEST_TYPE_SIZE (RGBQUAD, 4) + TEST_TYPE_ALIGN (RGBQUAD, 1) + TEST_FIELD_SIZE (RGBQUAD, rgbBlue, 1) + TEST_FIELD_ALIGN (RGBQUAD, rgbBlue, 1) + TEST_FIELD_OFFSET(RGBQUAD, rgbBlue, 0) + TEST_FIELD_SIZE (RGBQUAD, rgbGreen, 1) + TEST_FIELD_ALIGN (RGBQUAD, rgbGreen, 1) + TEST_FIELD_OFFSET(RGBQUAD, rgbGreen, 1) + TEST_FIELD_SIZE (RGBQUAD, rgbRed, 1) + TEST_FIELD_ALIGN (RGBQUAD, rgbRed, 1) + TEST_FIELD_OFFSET(RGBQUAD, rgbRed, 2) + TEST_FIELD_SIZE (RGBQUAD, rgbReserved, 1) + TEST_FIELD_ALIGN (RGBQUAD, rgbReserved, 1) + TEST_FIELD_OFFSET(RGBQUAD, rgbReserved, 3) } static void test_pack_RGBTRIPLE(void) { /* RGBTRIPLE (pack 4) */ - TEST_TYPE(RGBTRIPLE, 3, 1); - TEST_FIELD(RGBTRIPLE, rgbtBlue, 0, 1, 1); - TEST_FIELD(RGBTRIPLE, rgbtGreen, 1, 1, 1); - TEST_FIELD(RGBTRIPLE, rgbtRed, 2, 1, 1); + TEST_TYPE_SIZE (RGBTRIPLE, 3) + TEST_TYPE_ALIGN (RGBTRIPLE, 1) + TEST_FIELD_SIZE (RGBTRIPLE, rgbtBlue, 1) + TEST_FIELD_ALIGN (RGBTRIPLE, rgbtBlue, 1) + TEST_FIELD_OFFSET(RGBTRIPLE, rgbtBlue, 0) + TEST_FIELD_SIZE (RGBTRIPLE, rgbtGreen, 1) + TEST_FIELD_ALIGN (RGBTRIPLE, rgbtGreen, 1) + TEST_FIELD_OFFSET(RGBTRIPLE, rgbtGreen, 1) + TEST_FIELD_SIZE (RGBTRIPLE, rgbtRed, 1) + TEST_FIELD_ALIGN (RGBTRIPLE, rgbtRed, 1) + TEST_FIELD_OFFSET(RGBTRIPLE, rgbtRed, 2) } static void test_pack_RGNDATA(void) { /* RGNDATA (pack 4) */ - TEST_TYPE(RGNDATA, 36, 4); - TEST_FIELD(RGNDATA, rdh, 0, 32, 4); - TEST_FIELD(RGNDATA, Buffer, 32, 1, 1); + TEST_TYPE_SIZE (RGNDATA, 36) + TEST_TYPE_ALIGN (RGNDATA, 4) + TEST_FIELD_SIZE (RGNDATA, rdh, 32) + TEST_FIELD_ALIGN (RGNDATA, rdh, 4) + TEST_FIELD_OFFSET(RGNDATA, rdh, 0) + TEST_FIELD_SIZE (RGNDATA, Buffer, 1) + TEST_FIELD_ALIGN (RGNDATA, Buffer, 1) + TEST_FIELD_OFFSET(RGNDATA, Buffer, 32) } static void test_pack_RGNDATAHEADER(void) { /* RGNDATAHEADER (pack 4) */ - TEST_TYPE(RGNDATAHEADER, 32, 4); - TEST_FIELD(RGNDATAHEADER, dwSize, 0, 4, 4); - TEST_FIELD(RGNDATAHEADER, iType, 4, 4, 4); - TEST_FIELD(RGNDATAHEADER, nCount, 8, 4, 4); - TEST_FIELD(RGNDATAHEADER, nRgnSize, 12, 4, 4); - TEST_FIELD(RGNDATAHEADER, rcBound, 16, 16, 4); + TEST_TYPE_SIZE (RGNDATAHEADER, 32) + TEST_TYPE_ALIGN (RGNDATAHEADER, 4) + TEST_FIELD_SIZE (RGNDATAHEADER, dwSize, 4) + TEST_FIELD_ALIGN (RGNDATAHEADER, dwSize, 4) + TEST_FIELD_OFFSET(RGNDATAHEADER, dwSize, 0) + TEST_FIELD_SIZE (RGNDATAHEADER, iType, 4) + TEST_FIELD_ALIGN (RGNDATAHEADER, iType, 4) + TEST_FIELD_OFFSET(RGNDATAHEADER, iType, 4) + TEST_FIELD_SIZE (RGNDATAHEADER, nCount, 4) + TEST_FIELD_ALIGN (RGNDATAHEADER, nCount, 4) + TEST_FIELD_OFFSET(RGNDATAHEADER, nCount, 8) + TEST_FIELD_SIZE (RGNDATAHEADER, nRgnSize, 4) + TEST_FIELD_ALIGN (RGNDATAHEADER, nRgnSize, 4) + TEST_FIELD_OFFSET(RGNDATAHEADER, nRgnSize, 12) + TEST_FIELD_SIZE (RGNDATAHEADER, rcBound, 16) + TEST_FIELD_ALIGN (RGNDATAHEADER, rcBound, 4) + TEST_FIELD_OFFSET(RGNDATAHEADER, rcBound, 16) } static void test_pack_TEXTMETRICA(void) { /* TEXTMETRICA (pack 4) */ - TEST_TYPE(TEXTMETRICA, 56, 4); - TEST_FIELD(TEXTMETRICA, tmHeight, 0, 4, 4); - TEST_FIELD(TEXTMETRICA, tmAscent, 4, 4, 4); - TEST_FIELD(TEXTMETRICA, tmDescent, 8, 4, 4); - TEST_FIELD(TEXTMETRICA, tmInternalLeading, 12, 4, 4); - TEST_FIELD(TEXTMETRICA, tmExternalLeading, 16, 4, 4); - TEST_FIELD(TEXTMETRICA, tmAveCharWidth, 20, 4, 4); - TEST_FIELD(TEXTMETRICA, tmMaxCharWidth, 24, 4, 4); - TEST_FIELD(TEXTMETRICA, tmWeight, 28, 4, 4); - TEST_FIELD(TEXTMETRICA, tmOverhang, 32, 4, 4); - TEST_FIELD(TEXTMETRICA, tmDigitizedAspectX, 36, 4, 4); - TEST_FIELD(TEXTMETRICA, tmDigitizedAspectY, 40, 4, 4); - TEST_FIELD(TEXTMETRICA, tmFirstChar, 44, 1, 1); - TEST_FIELD(TEXTMETRICA, tmLastChar, 45, 1, 1); - TEST_FIELD(TEXTMETRICA, tmDefaultChar, 46, 1, 1); - TEST_FIELD(TEXTMETRICA, tmBreakChar, 47, 1, 1); - TEST_FIELD(TEXTMETRICA, tmItalic, 48, 1, 1); - TEST_FIELD(TEXTMETRICA, tmUnderlined, 49, 1, 1); - TEST_FIELD(TEXTMETRICA, tmStruckOut, 50, 1, 1); - TEST_FIELD(TEXTMETRICA, tmPitchAndFamily, 51, 1, 1); - TEST_FIELD(TEXTMETRICA, tmCharSet, 52, 1, 1); + TEST_TYPE_SIZE (TEXTMETRICA, 56) + TEST_TYPE_ALIGN (TEXTMETRICA, 4) + TEST_FIELD_SIZE (TEXTMETRICA, tmHeight, 4) + TEST_FIELD_ALIGN (TEXTMETRICA, tmHeight, 4) + TEST_FIELD_OFFSET(TEXTMETRICA, tmHeight, 0) + TEST_FIELD_SIZE (TEXTMETRICA, tmAscent, 4) + TEST_FIELD_ALIGN (TEXTMETRICA, tmAscent, 4) + TEST_FIELD_OFFSET(TEXTMETRICA, tmAscent, 4) + TEST_FIELD_SIZE (TEXTMETRICA, tmDescent, 4) + TEST_FIELD_ALIGN (TEXTMETRICA, tmDescent, 4) + TEST_FIELD_OFFSET(TEXTMETRICA, tmDescent, 8) + TEST_FIELD_SIZE (TEXTMETRICA, tmInternalLeading, 4) + TEST_FIELD_ALIGN (TEXTMETRICA, tmInternalLeading, 4) + TEST_FIELD_OFFSET(TEXTMETRICA, tmInternalLeading, 12) + TEST_FIELD_SIZE (TEXTMETRICA, tmExternalLeading, 4) + TEST_FIELD_ALIGN (TEXTMETRICA, tmExternalLeading, 4) + TEST_FIELD_OFFSET(TEXTMETRICA, tmExternalLeading, 16) + TEST_FIELD_SIZE (TEXTMETRICA, tmAveCharWidth, 4) + TEST_FIELD_ALIGN (TEXTMETRICA, tmAveCharWidth, 4) + TEST_FIELD_OFFSET(TEXTMETRICA, tmAveCharWidth, 20) + TEST_FIELD_SIZE (TEXTMETRICA, tmMaxCharWidth, 4) + TEST_FIELD_ALIGN (TEXTMETRICA, tmMaxCharWidth, 4) + TEST_FIELD_OFFSET(TEXTMETRICA, tmMaxCharWidth, 24) + TEST_FIELD_SIZE (TEXTMETRICA, tmWeight, 4) + TEST_FIELD_ALIGN (TEXTMETRICA, tmWeight, 4) + TEST_FIELD_OFFSET(TEXTMETRICA, tmWeight, 28) + TEST_FIELD_SIZE (TEXTMETRICA, tmOverhang, 4) + TEST_FIELD_ALIGN (TEXTMETRICA, tmOverhang, 4) + TEST_FIELD_OFFSET(TEXTMETRICA, tmOverhang, 32) + TEST_FIELD_SIZE (TEXTMETRICA, tmDigitizedAspectX, 4) + TEST_FIELD_ALIGN (TEXTMETRICA, tmDigitizedAspectX, 4) + TEST_FIELD_OFFSET(TEXTMETRICA, tmDigitizedAspectX, 36) + TEST_FIELD_SIZE (TEXTMETRICA, tmDigitizedAspectY, 4) + TEST_FIELD_ALIGN (TEXTMETRICA, tmDigitizedAspectY, 4) + TEST_FIELD_OFFSET(TEXTMETRICA, tmDigitizedAspectY, 40) + TEST_FIELD_SIZE (TEXTMETRICA, tmFirstChar, 1) + TEST_FIELD_ALIGN (TEXTMETRICA, tmFirstChar, 1) + TEST_FIELD_OFFSET(TEXTMETRICA, tmFirstChar, 44) + TEST_FIELD_SIZE (TEXTMETRICA, tmLastChar, 1) + TEST_FIELD_ALIGN (TEXTMETRICA, tmLastChar, 1) + TEST_FIELD_OFFSET(TEXTMETRICA, tmLastChar, 45) + TEST_FIELD_SIZE (TEXTMETRICA, tmDefaultChar, 1) + TEST_FIELD_ALIGN (TEXTMETRICA, tmDefaultChar, 1) + TEST_FIELD_OFFSET(TEXTMETRICA, tmDefaultChar, 46) + TEST_FIELD_SIZE (TEXTMETRICA, tmBreakChar, 1) + TEST_FIELD_ALIGN (TEXTMETRICA, tmBreakChar, 1) + TEST_FIELD_OFFSET(TEXTMETRICA, tmBreakChar, 47) + TEST_FIELD_SIZE (TEXTMETRICA, tmItalic, 1) + TEST_FIELD_ALIGN (TEXTMETRICA, tmItalic, 1) + TEST_FIELD_OFFSET(TEXTMETRICA, tmItalic, 48) + TEST_FIELD_SIZE (TEXTMETRICA, tmUnderlined, 1) + TEST_FIELD_ALIGN (TEXTMETRICA, tmUnderlined, 1) + TEST_FIELD_OFFSET(TEXTMETRICA, tmUnderlined, 49) + TEST_FIELD_SIZE (TEXTMETRICA, tmStruckOut, 1) + TEST_FIELD_ALIGN (TEXTMETRICA, tmStruckOut, 1) + TEST_FIELD_OFFSET(TEXTMETRICA, tmStruckOut, 50) + TEST_FIELD_SIZE (TEXTMETRICA, tmPitchAndFamily, 1) + TEST_FIELD_ALIGN (TEXTMETRICA, tmPitchAndFamily, 1) + TEST_FIELD_OFFSET(TEXTMETRICA, tmPitchAndFamily, 51) + TEST_FIELD_SIZE (TEXTMETRICA, tmCharSet, 1) + TEST_FIELD_ALIGN (TEXTMETRICA, tmCharSet, 1) + TEST_FIELD_OFFSET(TEXTMETRICA, tmCharSet, 52) } static void test_pack_TEXTMETRICW(void) { /* TEXTMETRICW (pack 4) */ - TEST_TYPE(TEXTMETRICW, 60, 4); - TEST_FIELD(TEXTMETRICW, tmHeight, 0, 4, 4); - TEST_FIELD(TEXTMETRICW, tmAscent, 4, 4, 4); - TEST_FIELD(TEXTMETRICW, tmDescent, 8, 4, 4); - TEST_FIELD(TEXTMETRICW, tmInternalLeading, 12, 4, 4); - TEST_FIELD(TEXTMETRICW, tmExternalLeading, 16, 4, 4); - TEST_FIELD(TEXTMETRICW, tmAveCharWidth, 20, 4, 4); - TEST_FIELD(TEXTMETRICW, tmMaxCharWidth, 24, 4, 4); - TEST_FIELD(TEXTMETRICW, tmWeight, 28, 4, 4); - TEST_FIELD(TEXTMETRICW, tmOverhang, 32, 4, 4); - TEST_FIELD(TEXTMETRICW, tmDigitizedAspectX, 36, 4, 4); - TEST_FIELD(TEXTMETRICW, tmDigitizedAspectY, 40, 4, 4); - TEST_FIELD(TEXTMETRICW, tmFirstChar, 44, 2, 2); - TEST_FIELD(TEXTMETRICW, tmLastChar, 46, 2, 2); - TEST_FIELD(TEXTMETRICW, tmDefaultChar, 48, 2, 2); - TEST_FIELD(TEXTMETRICW, tmBreakChar, 50, 2, 2); - TEST_FIELD(TEXTMETRICW, tmItalic, 52, 1, 1); - TEST_FIELD(TEXTMETRICW, tmUnderlined, 53, 1, 1); - TEST_FIELD(TEXTMETRICW, tmStruckOut, 54, 1, 1); - TEST_FIELD(TEXTMETRICW, tmPitchAndFamily, 55, 1, 1); - TEST_FIELD(TEXTMETRICW, tmCharSet, 56, 1, 1); + TEST_TYPE_SIZE (TEXTMETRICW, 60) + TEST_TYPE_ALIGN (TEXTMETRICW, 4) + TEST_FIELD_SIZE (TEXTMETRICW, tmHeight, 4) + TEST_FIELD_ALIGN (TEXTMETRICW, tmHeight, 4) + TEST_FIELD_OFFSET(TEXTMETRICW, tmHeight, 0) + TEST_FIELD_SIZE (TEXTMETRICW, tmAscent, 4) + TEST_FIELD_ALIGN (TEXTMETRICW, tmAscent, 4) + TEST_FIELD_OFFSET(TEXTMETRICW, tmAscent, 4) + TEST_FIELD_SIZE (TEXTMETRICW, tmDescent, 4) + TEST_FIELD_ALIGN (TEXTMETRICW, tmDescent, 4) + TEST_FIELD_OFFSET(TEXTMETRICW, tmDescent, 8) + TEST_FIELD_SIZE (TEXTMETRICW, tmInternalLeading, 4) + TEST_FIELD_ALIGN (TEXTMETRICW, tmInternalLeading, 4) + TEST_FIELD_OFFSET(TEXTMETRICW, tmInternalLeading, 12) + TEST_FIELD_SIZE (TEXTMETRICW, tmExternalLeading, 4) + TEST_FIELD_ALIGN (TEXTMETRICW, tmExternalLeading, 4) + TEST_FIELD_OFFSET(TEXTMETRICW, tmExternalLeading, 16) + TEST_FIELD_SIZE (TEXTMETRICW, tmAveCharWidth, 4) + TEST_FIELD_ALIGN (TEXTMETRICW, tmAveCharWidth, 4) + TEST_FIELD_OFFSET(TEXTMETRICW, tmAveCharWidth, 20) + TEST_FIELD_SIZE (TEXTMETRICW, tmMaxCharWidth, 4) + TEST_FIELD_ALIGN (TEXTMETRICW, tmMaxCharWidth, 4) + TEST_FIELD_OFFSET(TEXTMETRICW, tmMaxCharWidth, 24) + TEST_FIELD_SIZE (TEXTMETRICW, tmWeight, 4) + TEST_FIELD_ALIGN (TEXTMETRICW, tmWeight, 4) + TEST_FIELD_OFFSET(TEXTMETRICW, tmWeight, 28) + TEST_FIELD_SIZE (TEXTMETRICW, tmOverhang, 4) + TEST_FIELD_ALIGN (TEXTMETRICW, tmOverhang, 4) + TEST_FIELD_OFFSET(TEXTMETRICW, tmOverhang, 32) + TEST_FIELD_SIZE (TEXTMETRICW, tmDigitizedAspectX, 4) + TEST_FIELD_ALIGN (TEXTMETRICW, tmDigitizedAspectX, 4) + TEST_FIELD_OFFSET(TEXTMETRICW, tmDigitizedAspectX, 36) + TEST_FIELD_SIZE (TEXTMETRICW, tmDigitizedAspectY, 4) + TEST_FIELD_ALIGN (TEXTMETRICW, tmDigitizedAspectY, 4) + TEST_FIELD_OFFSET(TEXTMETRICW, tmDigitizedAspectY, 40) + TEST_FIELD_SIZE (TEXTMETRICW, tmFirstChar, 2) + TEST_FIELD_ALIGN (TEXTMETRICW, tmFirstChar, 2) + TEST_FIELD_OFFSET(TEXTMETRICW, tmFirstChar, 44) + TEST_FIELD_SIZE (TEXTMETRICW, tmLastChar, 2) + TEST_FIELD_ALIGN (TEXTMETRICW, tmLastChar, 2) + TEST_FIELD_OFFSET(TEXTMETRICW, tmLastChar, 46) + TEST_FIELD_SIZE (TEXTMETRICW, tmDefaultChar, 2) + TEST_FIELD_ALIGN (TEXTMETRICW, tmDefaultChar, 2) + TEST_FIELD_OFFSET(TEXTMETRICW, tmDefaultChar, 48) + TEST_FIELD_SIZE (TEXTMETRICW, tmBreakChar, 2) + TEST_FIELD_ALIGN (TEXTMETRICW, tmBreakChar, 2) + TEST_FIELD_OFFSET(TEXTMETRICW, tmBreakChar, 50) + TEST_FIELD_SIZE (TEXTMETRICW, tmItalic, 1) + TEST_FIELD_ALIGN (TEXTMETRICW, tmItalic, 1) + TEST_FIELD_OFFSET(TEXTMETRICW, tmItalic, 52) + TEST_FIELD_SIZE (TEXTMETRICW, tmUnderlined, 1) + TEST_FIELD_ALIGN (TEXTMETRICW, tmUnderlined, 1) + TEST_FIELD_OFFSET(TEXTMETRICW, tmUnderlined, 53) + TEST_FIELD_SIZE (TEXTMETRICW, tmStruckOut, 1) + TEST_FIELD_ALIGN (TEXTMETRICW, tmStruckOut, 1) + TEST_FIELD_OFFSET(TEXTMETRICW, tmStruckOut, 54) + TEST_FIELD_SIZE (TEXTMETRICW, tmPitchAndFamily, 1) + TEST_FIELD_ALIGN (TEXTMETRICW, tmPitchAndFamily, 1) + TEST_FIELD_OFFSET(TEXTMETRICW, tmPitchAndFamily, 55) + TEST_FIELD_SIZE (TEXTMETRICW, tmCharSet, 1) + TEST_FIELD_ALIGN (TEXTMETRICW, tmCharSet, 1) + TEST_FIELD_OFFSET(TEXTMETRICW, tmCharSet, 56) } static void test_pack_TRIVERTEX(void) { /* TRIVERTEX (pack 4) */ - TEST_TYPE(TRIVERTEX, 16, 4); - TEST_FIELD(TRIVERTEX, x, 0, 4, 4); - TEST_FIELD(TRIVERTEX, y, 4, 4, 4); - TEST_FIELD(TRIVERTEX, Red, 8, 2, 2); - TEST_FIELD(TRIVERTEX, Green, 10, 2, 2); - TEST_FIELD(TRIVERTEX, Blue, 12, 2, 2); - TEST_FIELD(TRIVERTEX, Alpha, 14, 2, 2); + TEST_TYPE_SIZE (TRIVERTEX, 16) + TEST_TYPE_ALIGN (TRIVERTEX, 4) + TEST_FIELD_SIZE (TRIVERTEX, x, 4) + TEST_FIELD_ALIGN (TRIVERTEX, x, 4) + TEST_FIELD_OFFSET(TRIVERTEX, x, 0) + TEST_FIELD_SIZE (TRIVERTEX, y, 4) + TEST_FIELD_ALIGN (TRIVERTEX, y, 4) + TEST_FIELD_OFFSET(TRIVERTEX, y, 4) + TEST_FIELD_SIZE (TRIVERTEX, Red, 2) + TEST_FIELD_ALIGN (TRIVERTEX, Red, 2) + TEST_FIELD_OFFSET(TRIVERTEX, Red, 8) + TEST_FIELD_SIZE (TRIVERTEX, Green, 2) + TEST_FIELD_ALIGN (TRIVERTEX, Green, 2) + TEST_FIELD_OFFSET(TRIVERTEX, Green, 10) + TEST_FIELD_SIZE (TRIVERTEX, Blue, 2) + TEST_FIELD_ALIGN (TRIVERTEX, Blue, 2) + TEST_FIELD_OFFSET(TRIVERTEX, Blue, 12) + TEST_FIELD_SIZE (TRIVERTEX, Alpha, 2) + TEST_FIELD_ALIGN (TRIVERTEX, Alpha, 2) + TEST_FIELD_OFFSET(TRIVERTEX, Alpha, 14) } static void test_pack_TTPOLYCURVE(void) { /* TTPOLYCURVE (pack 4) */ - TEST_TYPE(TTPOLYCURVE, 12, 2); - TEST_FIELD(TTPOLYCURVE, wType, 0, 2, 2); - TEST_FIELD(TTPOLYCURVE, cpfx, 2, 2, 2); - TEST_FIELD(TTPOLYCURVE, apfx, 4, 8, 2); + TEST_TYPE_SIZE (TTPOLYCURVE, 12) + TEST_TYPE_ALIGN (TTPOLYCURVE, 2) + TEST_FIELD_SIZE (TTPOLYCURVE, wType, 2) + TEST_FIELD_ALIGN (TTPOLYCURVE, wType, 2) + TEST_FIELD_OFFSET(TTPOLYCURVE, wType, 0) + TEST_FIELD_SIZE (TTPOLYCURVE, cpfx, 2) + TEST_FIELD_ALIGN (TTPOLYCURVE, cpfx, 2) + TEST_FIELD_OFFSET(TTPOLYCURVE, cpfx, 2) + TEST_FIELD_SIZE (TTPOLYCURVE, apfx, 8) + TEST_FIELD_ALIGN (TTPOLYCURVE, apfx, 2) + TEST_FIELD_OFFSET(TTPOLYCURVE, apfx, 4) } static void test_pack_TTPOLYGONHEADER(void) { /* TTPOLYGONHEADER (pack 4) */ - TEST_TYPE(TTPOLYGONHEADER, 16, 4); - TEST_FIELD(TTPOLYGONHEADER, cb, 0, 4, 4); - TEST_FIELD(TTPOLYGONHEADER, dwType, 4, 4, 4); - TEST_FIELD(TTPOLYGONHEADER, pfxStart, 8, 8, 2); + TEST_TYPE_SIZE (TTPOLYGONHEADER, 16) + TEST_TYPE_ALIGN (TTPOLYGONHEADER, 4) + TEST_FIELD_SIZE (TTPOLYGONHEADER, cb, 4) + TEST_FIELD_ALIGN (TTPOLYGONHEADER, cb, 4) + TEST_FIELD_OFFSET(TTPOLYGONHEADER, cb, 0) + TEST_FIELD_SIZE (TTPOLYGONHEADER, dwType, 4) + TEST_FIELD_ALIGN (TTPOLYGONHEADER, dwType, 4) + TEST_FIELD_OFFSET(TTPOLYGONHEADER, dwType, 4) + TEST_FIELD_SIZE (TTPOLYGONHEADER, pfxStart, 8) + TEST_FIELD_ALIGN (TTPOLYGONHEADER, pfxStart, 2) + TEST_FIELD_OFFSET(TTPOLYGONHEADER, pfxStart, 8) } static void test_pack_XFORM(void) { /* XFORM (pack 4) */ - TEST_TYPE(XFORM, 24, 4); - TEST_FIELD(XFORM, eM11, 0, 4, 4); - TEST_FIELD(XFORM, eM12, 4, 4, 4); - TEST_FIELD(XFORM, eM21, 8, 4, 4); - TEST_FIELD(XFORM, eM22, 12, 4, 4); - TEST_FIELD(XFORM, eDx, 16, 4, 4); - TEST_FIELD(XFORM, eDy, 20, 4, 4); + TEST_TYPE_SIZE (XFORM, 24) + TEST_TYPE_ALIGN (XFORM, 4) + TEST_FIELD_SIZE (XFORM, eM11, 4) + TEST_FIELD_ALIGN (XFORM, eM11, 4) + TEST_FIELD_OFFSET(XFORM, eM11, 0) + TEST_FIELD_SIZE (XFORM, eM12, 4) + TEST_FIELD_ALIGN (XFORM, eM12, 4) + TEST_FIELD_OFFSET(XFORM, eM12, 4) + TEST_FIELD_SIZE (XFORM, eM21, 4) + TEST_FIELD_ALIGN (XFORM, eM21, 4) + TEST_FIELD_OFFSET(XFORM, eM21, 8) + TEST_FIELD_SIZE (XFORM, eM22, 4) + TEST_FIELD_ALIGN (XFORM, eM22, 4) + TEST_FIELD_OFFSET(XFORM, eM22, 12) + TEST_FIELD_SIZE (XFORM, eDx, 4) + TEST_FIELD_ALIGN (XFORM, eDx, 4) + TEST_FIELD_OFFSET(XFORM, eDx, 16) + TEST_FIELD_SIZE (XFORM, eDy, 4) + TEST_FIELD_ALIGN (XFORM, eDy, 4) + TEST_FIELD_OFFSET(XFORM, eDy, 20) } static void test_pack(void) diff --git a/dlls/kernel32/tests/generated.c b/dlls/kernel32/tests/generated.c index 34e76e8ff49..847a2cd95e1 100644 --- a/dlls/kernel32/tests/generated.c +++ b/dlls/kernel32/tests/generated.c @@ -51,377 +51,670 @@ * Test helper macros */ -#ifdef FIELD_ALIGNMENT -# define TEST_FIELD_ALIGNMENT(type, field, align) \ - ok(_TYPE_ALIGNMENT(((type*)0)->field) == align, \ - "FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \ - (int)_TYPE_ALIGNMENT(((type*)0)->field)) +#ifdef _WIN64 + +# define TEST_TYPE_SIZE(type, size) +# define TEST_TYPE_ALIGN(type, align) +# define TEST_TARGET_ALIGN(type, align) +# define TEST_FIELD_ALIGN(type, field, align) +# define TEST_FIELD_OFFSET(type, field, offset) + #else -# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0) + +# define TEST_TYPE_SIZE(type, size) C_ASSERT(sizeof(type) == size); + +# ifdef TYPE_ALIGNMENT +# define TEST_TYPE_ALIGN(type, align) C_ASSERT(TYPE_ALIGNMENT(type) == align); +# else +# define TEST_TYPE_ALIGN(type, align) +# endif + +# ifdef _TYPE_ALIGNMENT +# 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); +# else +# define TEST_TARGET_ALIGN(type, align) +# define TEST_FIELD_ALIGN(type, field, align) +# endif + +# define TEST_FIELD_OFFSET(type, field, offset) C_ASSERT(FIELD_OFFSET(type, field) == offset); + #endif -#define TEST_FIELD_OFFSET(type, field, offset) \ - ok(FIELD_OFFSET(type, field) == offset, \ - "FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")\n", \ - (long int)FIELD_OFFSET(type, field)) +#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); -#ifdef _TYPE_ALIGNMENT -#define TEST__TYPE_ALIGNMENT(type, align) \ - ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)_TYPE_ALIGNMENT(type)) -#else -# define TEST__TYPE_ALIGNMENT(type, align) do { } while (0) -#endif - -#ifdef TYPE_ALIGNMENT -#define TEST_TYPE_ALIGNMENT(type, align) \ - ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)TYPE_ALIGNMENT(type)) -#else -# define TEST_TYPE_ALIGNMENT(type, align) do { } while (0) -#endif - -#define TEST_TYPE_SIZE(type, size) \ - ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", ((int) sizeof(type))) - -/*********************************************************************** - * Test macros - */ - -#define TEST_FIELD(type, field, field_offset, field_size, field_align) \ - TEST_TYPE_SIZE((((type*)0)->field), field_size); \ - TEST_FIELD_ALIGNMENT(type, field, field_align); \ - TEST_FIELD_OFFSET(type, field, 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_LPOSVERSIONINFOA(void) { /* LPOSVERSIONINFOA */ - TEST_TYPE(LPOSVERSIONINFOA, 4, 4); - TEST_TYPE_POINTER(LPOSVERSIONINFOA, 148, 4); + TEST_TYPE_SIZE (LPOSVERSIONINFOA, 4) + TEST_TYPE_ALIGN (LPOSVERSIONINFOA, 4) + TEST_TARGET_SIZE (LPOSVERSIONINFOA, 148) + TEST_TARGET_ALIGN(LPOSVERSIONINFOA, 4) } static void test_pack_LPOSVERSIONINFOEXA(void) { /* LPOSVERSIONINFOEXA */ - TEST_TYPE(LPOSVERSIONINFOEXA, 4, 4); - TEST_TYPE_POINTER(LPOSVERSIONINFOEXA, 156, 4); + TEST_TYPE_SIZE (LPOSVERSIONINFOEXA, 4) + TEST_TYPE_ALIGN (LPOSVERSIONINFOEXA, 4) + TEST_TARGET_SIZE (LPOSVERSIONINFOEXA, 156) + TEST_TARGET_ALIGN(LPOSVERSIONINFOEXA, 4) } static void test_pack_LPOSVERSIONINFOEXW(void) { /* LPOSVERSIONINFOEXW */ - TEST_TYPE(LPOSVERSIONINFOEXW, 4, 4); - TEST_TYPE_POINTER(LPOSVERSIONINFOEXW, 284, 4); + TEST_TYPE_SIZE (LPOSVERSIONINFOEXW, 4) + TEST_TYPE_ALIGN (LPOSVERSIONINFOEXW, 4) + TEST_TARGET_SIZE (LPOSVERSIONINFOEXW, 284) + TEST_TARGET_ALIGN(LPOSVERSIONINFOEXW, 4) } static void test_pack_LPOSVERSIONINFOW(void) { /* LPOSVERSIONINFOW */ - TEST_TYPE(LPOSVERSIONINFOW, 4, 4); - TEST_TYPE_POINTER(LPOSVERSIONINFOW, 276, 4); + TEST_TYPE_SIZE (LPOSVERSIONINFOW, 4) + TEST_TYPE_ALIGN (LPOSVERSIONINFOW, 4) + TEST_TARGET_SIZE (LPOSVERSIONINFOW, 276) + TEST_TARGET_ALIGN(LPOSVERSIONINFOW, 4) } static void test_pack_OSVERSIONINFOA(void) { /* OSVERSIONINFOA (pack 4) */ - TEST_TYPE(OSVERSIONINFOA, 148, 4); - TEST_FIELD(OSVERSIONINFOA, dwOSVersionInfoSize, 0, 4, 4); - TEST_FIELD(OSVERSIONINFOA, dwMajorVersion, 4, 4, 4); - TEST_FIELD(OSVERSIONINFOA, dwMinorVersion, 8, 4, 4); - TEST_FIELD(OSVERSIONINFOA, dwBuildNumber, 12, 4, 4); - TEST_FIELD(OSVERSIONINFOA, dwPlatformId, 16, 4, 4); - TEST_FIELD(OSVERSIONINFOA, szCSDVersion, 20, 128, 1); + TEST_TYPE_SIZE (OSVERSIONINFOA, 148) + TEST_TYPE_ALIGN (OSVERSIONINFOA, 4) + TEST_FIELD_SIZE (OSVERSIONINFOA, dwOSVersionInfoSize, 4) + TEST_FIELD_ALIGN (OSVERSIONINFOA, dwOSVersionInfoSize, 4) + TEST_FIELD_OFFSET(OSVERSIONINFOA, dwOSVersionInfoSize, 0) + TEST_FIELD_SIZE (OSVERSIONINFOA, dwMajorVersion, 4) + TEST_FIELD_ALIGN (OSVERSIONINFOA, dwMajorVersion, 4) + TEST_FIELD_OFFSET(OSVERSIONINFOA, dwMajorVersion, 4) + TEST_FIELD_SIZE (OSVERSIONINFOA, dwMinorVersion, 4) + TEST_FIELD_ALIGN (OSVERSIONINFOA, dwMinorVersion, 4) + TEST_FIELD_OFFSET(OSVERSIONINFOA, dwMinorVersion, 8) + TEST_FIELD_SIZE (OSVERSIONINFOA, dwBuildNumber, 4) + TEST_FIELD_ALIGN (OSVERSIONINFOA, dwBuildNumber, 4) + TEST_FIELD_OFFSET(OSVERSIONINFOA, dwBuildNumber, 12) + TEST_FIELD_SIZE (OSVERSIONINFOA, dwPlatformId, 4) + TEST_FIELD_ALIGN (OSVERSIONINFOA, dwPlatformId, 4) + TEST_FIELD_OFFSET(OSVERSIONINFOA, dwPlatformId, 16) + TEST_FIELD_SIZE (OSVERSIONINFOA, szCSDVersion, 128) + TEST_FIELD_ALIGN (OSVERSIONINFOA, szCSDVersion, 1) + TEST_FIELD_OFFSET(OSVERSIONINFOA, szCSDVersion, 20) } static void test_pack_OSVERSIONINFOEXA(void) { /* OSVERSIONINFOEXA (pack 4) */ - TEST_TYPE(OSVERSIONINFOEXA, 156, 4); - TEST_FIELD(OSVERSIONINFOEXA, dwOSVersionInfoSize, 0, 4, 4); - TEST_FIELD(OSVERSIONINFOEXA, dwMajorVersion, 4, 4, 4); - TEST_FIELD(OSVERSIONINFOEXA, dwMinorVersion, 8, 4, 4); - TEST_FIELD(OSVERSIONINFOEXA, dwBuildNumber, 12, 4, 4); - TEST_FIELD(OSVERSIONINFOEXA, dwPlatformId, 16, 4, 4); - TEST_FIELD(OSVERSIONINFOEXA, szCSDVersion, 20, 128, 1); - TEST_FIELD(OSVERSIONINFOEXA, wServicePackMajor, 148, 2, 2); - TEST_FIELD(OSVERSIONINFOEXA, wServicePackMinor, 150, 2, 2); - TEST_FIELD(OSVERSIONINFOEXA, wSuiteMask, 152, 2, 2); - TEST_FIELD(OSVERSIONINFOEXA, wProductType, 154, 1, 1); - TEST_FIELD(OSVERSIONINFOEXA, wReserved, 155, 1, 1); + TEST_TYPE_SIZE (OSVERSIONINFOEXA, 156) + TEST_TYPE_ALIGN (OSVERSIONINFOEXA, 4) + TEST_FIELD_SIZE (OSVERSIONINFOEXA, dwOSVersionInfoSize, 4) + TEST_FIELD_ALIGN (OSVERSIONINFOEXA, dwOSVersionInfoSize, 4) + TEST_FIELD_OFFSET(OSVERSIONINFOEXA, dwOSVersionInfoSize, 0) + TEST_FIELD_SIZE (OSVERSIONINFOEXA, dwMajorVersion, 4) + TEST_FIELD_ALIGN (OSVERSIONINFOEXA, dwMajorVersion, 4) + TEST_FIELD_OFFSET(OSVERSIONINFOEXA, dwMajorVersion, 4) + TEST_FIELD_SIZE (OSVERSIONINFOEXA, dwMinorVersion, 4) + TEST_FIELD_ALIGN (OSVERSIONINFOEXA, dwMinorVersion, 4) + TEST_FIELD_OFFSET(OSVERSIONINFOEXA, dwMinorVersion, 8) + TEST_FIELD_SIZE (OSVERSIONINFOEXA, dwBuildNumber, 4) + TEST_FIELD_ALIGN (OSVERSIONINFOEXA, dwBuildNumber, 4) + TEST_FIELD_OFFSET(OSVERSIONINFOEXA, dwBuildNumber, 12) + TEST_FIELD_SIZE (OSVERSIONINFOEXA, dwPlatformId, 4) + TEST_FIELD_ALIGN (OSVERSIONINFOEXA, dwPlatformId, 4) + TEST_FIELD_OFFSET(OSVERSIONINFOEXA, dwPlatformId, 16) + TEST_FIELD_SIZE (OSVERSIONINFOEXA, szCSDVersion, 128) + TEST_FIELD_ALIGN (OSVERSIONINFOEXA, szCSDVersion, 1) + TEST_FIELD_OFFSET(OSVERSIONINFOEXA, szCSDVersion, 20) + TEST_FIELD_SIZE (OSVERSIONINFOEXA, wServicePackMajor, 2) + TEST_FIELD_ALIGN (OSVERSIONINFOEXA, wServicePackMajor, 2) + TEST_FIELD_OFFSET(OSVERSIONINFOEXA, wServicePackMajor, 148) + TEST_FIELD_SIZE (OSVERSIONINFOEXA, wServicePackMinor, 2) + TEST_FIELD_ALIGN (OSVERSIONINFOEXA, wServicePackMinor, 2) + TEST_FIELD_OFFSET(OSVERSIONINFOEXA, wServicePackMinor, 150) + TEST_FIELD_SIZE (OSVERSIONINFOEXA, wSuiteMask, 2) + TEST_FIELD_ALIGN (OSVERSIONINFOEXA, wSuiteMask, 2) + TEST_FIELD_OFFSET(OSVERSIONINFOEXA, wSuiteMask, 152) + TEST_FIELD_SIZE (OSVERSIONINFOEXA, wProductType, 1) + TEST_FIELD_ALIGN (OSVERSIONINFOEXA, wProductType, 1) + TEST_FIELD_OFFSET(OSVERSIONINFOEXA, wProductType, 154) + TEST_FIELD_SIZE (OSVERSIONINFOEXA, wReserved, 1) + TEST_FIELD_ALIGN (OSVERSIONINFOEXA, wReserved, 1) + TEST_FIELD_OFFSET(OSVERSIONINFOEXA, wReserved, 155) } static void test_pack_OSVERSIONINFOEXW(void) { /* OSVERSIONINFOEXW (pack 4) */ - TEST_TYPE(OSVERSIONINFOEXW, 284, 4); - TEST_FIELD(OSVERSIONINFOEXW, dwOSVersionInfoSize, 0, 4, 4); - TEST_FIELD(OSVERSIONINFOEXW, dwMajorVersion, 4, 4, 4); - TEST_FIELD(OSVERSIONINFOEXW, dwMinorVersion, 8, 4, 4); - TEST_FIELD(OSVERSIONINFOEXW, dwBuildNumber, 12, 4, 4); - TEST_FIELD(OSVERSIONINFOEXW, dwPlatformId, 16, 4, 4); - TEST_FIELD(OSVERSIONINFOEXW, szCSDVersion, 20, 256, 2); - TEST_FIELD(OSVERSIONINFOEXW, wServicePackMajor, 276, 2, 2); - TEST_FIELD(OSVERSIONINFOEXW, wServicePackMinor, 278, 2, 2); - TEST_FIELD(OSVERSIONINFOEXW, wSuiteMask, 280, 2, 2); - TEST_FIELD(OSVERSIONINFOEXW, wProductType, 282, 1, 1); - TEST_FIELD(OSVERSIONINFOEXW, wReserved, 283, 1, 1); + TEST_TYPE_SIZE (OSVERSIONINFOEXW, 284) + TEST_TYPE_ALIGN (OSVERSIONINFOEXW, 4) + TEST_FIELD_SIZE (OSVERSIONINFOEXW, dwOSVersionInfoSize, 4) + TEST_FIELD_ALIGN (OSVERSIONINFOEXW, dwOSVersionInfoSize, 4) + TEST_FIELD_OFFSET(OSVERSIONINFOEXW, dwOSVersionInfoSize, 0) + TEST_FIELD_SIZE (OSVERSIONINFOEXW, dwMajorVersion, 4) + TEST_FIELD_ALIGN (OSVERSIONINFOEXW, dwMajorVersion, 4) + TEST_FIELD_OFFSET(OSVERSIONINFOEXW, dwMajorVersion, 4) + TEST_FIELD_SIZE (OSVERSIONINFOEXW, dwMinorVersion, 4) + TEST_FIELD_ALIGN (OSVERSIONINFOEXW, dwMinorVersion, 4) + TEST_FIELD_OFFSET(OSVERSIONINFOEXW, dwMinorVersion, 8) + TEST_FIELD_SIZE (OSVERSIONINFOEXW, dwBuildNumber, 4) + TEST_FIELD_ALIGN (OSVERSIONINFOEXW, dwBuildNumber, 4) + TEST_FIELD_OFFSET(OSVERSIONINFOEXW, dwBuildNumber, 12) + TEST_FIELD_SIZE (OSVERSIONINFOEXW, dwPlatformId, 4) + TEST_FIELD_ALIGN (OSVERSIONINFOEXW, dwPlatformId, 4) + TEST_FIELD_OFFSET(OSVERSIONINFOEXW, dwPlatformId, 16) + TEST_FIELD_SIZE (OSVERSIONINFOEXW, szCSDVersion, 256) + TEST_FIELD_ALIGN (OSVERSIONINFOEXW, szCSDVersion, 2) + TEST_FIELD_OFFSET(OSVERSIONINFOEXW, szCSDVersion, 20) + TEST_FIELD_SIZE (OSVERSIONINFOEXW, wServicePackMajor, 2) + TEST_FIELD_ALIGN (OSVERSIONINFOEXW, wServicePackMajor, 2) + TEST_FIELD_OFFSET(OSVERSIONINFOEXW, wServicePackMajor, 276) + TEST_FIELD_SIZE (OSVERSIONINFOEXW, wServicePackMinor, 2) + TEST_FIELD_ALIGN (OSVERSIONINFOEXW, wServicePackMinor, 2) + TEST_FIELD_OFFSET(OSVERSIONINFOEXW, wServicePackMinor, 278) + TEST_FIELD_SIZE (OSVERSIONINFOEXW, wSuiteMask, 2) + TEST_FIELD_ALIGN (OSVERSIONINFOEXW, wSuiteMask, 2) + TEST_FIELD_OFFSET(OSVERSIONINFOEXW, wSuiteMask, 280) + TEST_FIELD_SIZE (OSVERSIONINFOEXW, wProductType, 1) + TEST_FIELD_ALIGN (OSVERSIONINFOEXW, wProductType, 1) + TEST_FIELD_OFFSET(OSVERSIONINFOEXW, wProductType, 282) + TEST_FIELD_SIZE (OSVERSIONINFOEXW, wReserved, 1) + TEST_FIELD_ALIGN (OSVERSIONINFOEXW, wReserved, 1) + TEST_FIELD_OFFSET(OSVERSIONINFOEXW, wReserved, 283) } static void test_pack_OSVERSIONINFOW(void) { /* OSVERSIONINFOW (pack 4) */ - TEST_TYPE(OSVERSIONINFOW, 276, 4); - TEST_FIELD(OSVERSIONINFOW, dwOSVersionInfoSize, 0, 4, 4); - TEST_FIELD(OSVERSIONINFOW, dwMajorVersion, 4, 4, 4); - TEST_FIELD(OSVERSIONINFOW, dwMinorVersion, 8, 4, 4); - TEST_FIELD(OSVERSIONINFOW, dwBuildNumber, 12, 4, 4); - TEST_FIELD(OSVERSIONINFOW, dwPlatformId, 16, 4, 4); - TEST_FIELD(OSVERSIONINFOW, szCSDVersion, 20, 256, 2); + TEST_TYPE_SIZE (OSVERSIONINFOW, 276) + TEST_TYPE_ALIGN (OSVERSIONINFOW, 4) + TEST_FIELD_SIZE (OSVERSIONINFOW, dwOSVersionInfoSize, 4) + TEST_FIELD_ALIGN (OSVERSIONINFOW, dwOSVersionInfoSize, 4) + TEST_FIELD_OFFSET(OSVERSIONINFOW, dwOSVersionInfoSize, 0) + TEST_FIELD_SIZE (OSVERSIONINFOW, dwMajorVersion, 4) + TEST_FIELD_ALIGN (OSVERSIONINFOW, dwMajorVersion, 4) + TEST_FIELD_OFFSET(OSVERSIONINFOW, dwMajorVersion, 4) + TEST_FIELD_SIZE (OSVERSIONINFOW, dwMinorVersion, 4) + TEST_FIELD_ALIGN (OSVERSIONINFOW, dwMinorVersion, 4) + TEST_FIELD_OFFSET(OSVERSIONINFOW, dwMinorVersion, 8) + TEST_FIELD_SIZE (OSVERSIONINFOW, dwBuildNumber, 4) + TEST_FIELD_ALIGN (OSVERSIONINFOW, dwBuildNumber, 4) + TEST_FIELD_OFFSET(OSVERSIONINFOW, dwBuildNumber, 12) + TEST_FIELD_SIZE (OSVERSIONINFOW, dwPlatformId, 4) + TEST_FIELD_ALIGN (OSVERSIONINFOW, dwPlatformId, 4) + TEST_FIELD_OFFSET(OSVERSIONINFOW, dwPlatformId, 16) + TEST_FIELD_SIZE (OSVERSIONINFOW, szCSDVersion, 256) + TEST_FIELD_ALIGN (OSVERSIONINFOW, szCSDVersion, 2) + TEST_FIELD_OFFSET(OSVERSIONINFOW, szCSDVersion, 20) } static void test_pack_POSVERSIONINFOA(void) { /* POSVERSIONINFOA */ - TEST_TYPE(POSVERSIONINFOA, 4, 4); - TEST_TYPE_POINTER(POSVERSIONINFOA, 148, 4); + TEST_TYPE_SIZE (POSVERSIONINFOA, 4) + TEST_TYPE_ALIGN (POSVERSIONINFOA, 4) + TEST_TARGET_SIZE (POSVERSIONINFOA, 148) + TEST_TARGET_ALIGN(POSVERSIONINFOA, 4) } static void test_pack_POSVERSIONINFOEXA(void) { /* POSVERSIONINFOEXA */ - TEST_TYPE(POSVERSIONINFOEXA, 4, 4); - TEST_TYPE_POINTER(POSVERSIONINFOEXA, 156, 4); + TEST_TYPE_SIZE (POSVERSIONINFOEXA, 4) + TEST_TYPE_ALIGN (POSVERSIONINFOEXA, 4) + TEST_TARGET_SIZE (POSVERSIONINFOEXA, 156) + TEST_TARGET_ALIGN(POSVERSIONINFOEXA, 4) } static void test_pack_POSVERSIONINFOEXW(void) { /* POSVERSIONINFOEXW */ - TEST_TYPE(POSVERSIONINFOEXW, 4, 4); - TEST_TYPE_POINTER(POSVERSIONINFOEXW, 284, 4); + TEST_TYPE_SIZE (POSVERSIONINFOEXW, 4) + TEST_TYPE_ALIGN (POSVERSIONINFOEXW, 4) + TEST_TARGET_SIZE (POSVERSIONINFOEXW, 284) + TEST_TARGET_ALIGN(POSVERSIONINFOEXW, 4) } static void test_pack_POSVERSIONINFOW(void) { /* POSVERSIONINFOW */ - TEST_TYPE(POSVERSIONINFOW, 4, 4); - TEST_TYPE_POINTER(POSVERSIONINFOW, 276, 4); + TEST_TYPE_SIZE (POSVERSIONINFOW, 4) + TEST_TYPE_ALIGN (POSVERSIONINFOW, 4) + TEST_TARGET_SIZE (POSVERSIONINFOW, 276) + TEST_TARGET_ALIGN(POSVERSIONINFOW, 4) } static void test_pack_LPLONG(void) { /* LPLONG */ - TEST_TYPE(LPLONG, 4, 4); + TEST_TYPE_SIZE (LPLONG, 4) + TEST_TYPE_ALIGN (LPLONG, 4) } static void test_pack_LPVOID(void) { /* LPVOID */ - TEST_TYPE(LPVOID, 4, 4); + TEST_TYPE_SIZE (LPVOID, 4) + TEST_TYPE_ALIGN (LPVOID, 4) } static void test_pack_PHKEY(void) { /* PHKEY */ - TEST_TYPE(PHKEY, 4, 4); + TEST_TYPE_SIZE (PHKEY, 4) + TEST_TYPE_ALIGN (PHKEY, 4) } static void test_pack_ACTCTXA(void) { /* ACTCTXA (pack 4) */ - TEST_TYPE(ACTCTXA, 32, 4); - TEST_FIELD(ACTCTXA, cbSize, 0, 4, 4); - TEST_FIELD(ACTCTXA, dwFlags, 4, 4, 4); - TEST_FIELD(ACTCTXA, lpSource, 8, 4, 4); - TEST_FIELD(ACTCTXA, wProcessorArchitecture, 12, 2, 2); - TEST_FIELD(ACTCTXA, wLangId, 14, 2, 2); - TEST_FIELD(ACTCTXA, lpAssemblyDirectory, 16, 4, 4); - TEST_FIELD(ACTCTXA, lpResourceName, 20, 4, 4); - TEST_FIELD(ACTCTXA, lpApplicationName, 24, 4, 4); - TEST_FIELD(ACTCTXA, hModule, 28, 4, 4); + TEST_TYPE_SIZE (ACTCTXA, 32) + TEST_TYPE_ALIGN (ACTCTXA, 4) + TEST_FIELD_SIZE (ACTCTXA, cbSize, 4) + TEST_FIELD_ALIGN (ACTCTXA, cbSize, 4) + TEST_FIELD_OFFSET(ACTCTXA, cbSize, 0) + TEST_FIELD_SIZE (ACTCTXA, dwFlags, 4) + TEST_FIELD_ALIGN (ACTCTXA, dwFlags, 4) + TEST_FIELD_OFFSET(ACTCTXA, dwFlags, 4) + TEST_FIELD_SIZE (ACTCTXA, lpSource, 4) + TEST_FIELD_ALIGN (ACTCTXA, lpSource, 4) + TEST_FIELD_OFFSET(ACTCTXA, lpSource, 8) + TEST_FIELD_SIZE (ACTCTXA, wProcessorArchitecture, 2) + TEST_FIELD_ALIGN (ACTCTXA, wProcessorArchitecture, 2) + TEST_FIELD_OFFSET(ACTCTXA, wProcessorArchitecture, 12) + TEST_FIELD_SIZE (ACTCTXA, wLangId, 2) + TEST_FIELD_ALIGN (ACTCTXA, wLangId, 2) + TEST_FIELD_OFFSET(ACTCTXA, wLangId, 14) + TEST_FIELD_SIZE (ACTCTXA, lpAssemblyDirectory, 4) + TEST_FIELD_ALIGN (ACTCTXA, lpAssemblyDirectory, 4) + TEST_FIELD_OFFSET(ACTCTXA, lpAssemblyDirectory, 16) + TEST_FIELD_SIZE (ACTCTXA, lpResourceName, 4) + TEST_FIELD_ALIGN (ACTCTXA, lpResourceName, 4) + TEST_FIELD_OFFSET(ACTCTXA, lpResourceName, 20) + TEST_FIELD_SIZE (ACTCTXA, lpApplicationName, 4) + TEST_FIELD_ALIGN (ACTCTXA, lpApplicationName, 4) + TEST_FIELD_OFFSET(ACTCTXA, lpApplicationName, 24) + TEST_FIELD_SIZE (ACTCTXA, hModule, 4) + TEST_FIELD_ALIGN (ACTCTXA, hModule, 4) + TEST_FIELD_OFFSET(ACTCTXA, hModule, 28) } static void test_pack_ACTCTXW(void) { /* ACTCTXW (pack 4) */ - TEST_TYPE(ACTCTXW, 32, 4); - TEST_FIELD(ACTCTXW, cbSize, 0, 4, 4); - TEST_FIELD(ACTCTXW, dwFlags, 4, 4, 4); - TEST_FIELD(ACTCTXW, lpSource, 8, 4, 4); - TEST_FIELD(ACTCTXW, wProcessorArchitecture, 12, 2, 2); - TEST_FIELD(ACTCTXW, wLangId, 14, 2, 2); - TEST_FIELD(ACTCTXW, lpAssemblyDirectory, 16, 4, 4); - TEST_FIELD(ACTCTXW, lpResourceName, 20, 4, 4); - TEST_FIELD(ACTCTXW, lpApplicationName, 24, 4, 4); - TEST_FIELD(ACTCTXW, hModule, 28, 4, 4); + TEST_TYPE_SIZE (ACTCTXW, 32) + TEST_TYPE_ALIGN (ACTCTXW, 4) + TEST_FIELD_SIZE (ACTCTXW, cbSize, 4) + TEST_FIELD_ALIGN (ACTCTXW, cbSize, 4) + TEST_FIELD_OFFSET(ACTCTXW, cbSize, 0) + TEST_FIELD_SIZE (ACTCTXW, dwFlags, 4) + TEST_FIELD_ALIGN (ACTCTXW, dwFlags, 4) + TEST_FIELD_OFFSET(ACTCTXW, dwFlags, 4) + TEST_FIELD_SIZE (ACTCTXW, lpSource, 4) + TEST_FIELD_ALIGN (ACTCTXW, lpSource, 4) + TEST_FIELD_OFFSET(ACTCTXW, lpSource, 8) + TEST_FIELD_SIZE (ACTCTXW, wProcessorArchitecture, 2) + TEST_FIELD_ALIGN (ACTCTXW, wProcessorArchitecture, 2) + TEST_FIELD_OFFSET(ACTCTXW, wProcessorArchitecture, 12) + TEST_FIELD_SIZE (ACTCTXW, wLangId, 2) + TEST_FIELD_ALIGN (ACTCTXW, wLangId, 2) + TEST_FIELD_OFFSET(ACTCTXW, wLangId, 14) + TEST_FIELD_SIZE (ACTCTXW, lpAssemblyDirectory, 4) + TEST_FIELD_ALIGN (ACTCTXW, lpAssemblyDirectory, 4) + TEST_FIELD_OFFSET(ACTCTXW, lpAssemblyDirectory, 16) + TEST_FIELD_SIZE (ACTCTXW, lpResourceName, 4) + TEST_FIELD_ALIGN (ACTCTXW, lpResourceName, 4) + TEST_FIELD_OFFSET(ACTCTXW, lpResourceName, 20) + TEST_FIELD_SIZE (ACTCTXW, lpApplicationName, 4) + TEST_FIELD_ALIGN (ACTCTXW, lpApplicationName, 4) + TEST_FIELD_OFFSET(ACTCTXW, lpApplicationName, 24) + TEST_FIELD_SIZE (ACTCTXW, hModule, 4) + TEST_FIELD_ALIGN (ACTCTXW, hModule, 4) + TEST_FIELD_OFFSET(ACTCTXW, hModule, 28) } static void test_pack_ACTCTX_SECTION_KEYED_DATA(void) { /* ACTCTX_SECTION_KEYED_DATA (pack 4) */ - TEST_TYPE(ACTCTX_SECTION_KEYED_DATA, 64, 4); - TEST_FIELD(ACTCTX_SECTION_KEYED_DATA, cbSize, 0, 4, 4); - TEST_FIELD(ACTCTX_SECTION_KEYED_DATA, ulDataFormatVersion, 4, 4, 4); - TEST_FIELD(ACTCTX_SECTION_KEYED_DATA, lpData, 8, 4, 4); - TEST_FIELD(ACTCTX_SECTION_KEYED_DATA, ulLength, 12, 4, 4); - TEST_FIELD(ACTCTX_SECTION_KEYED_DATA, lpSectionGlobalData, 16, 4, 4); - TEST_FIELD(ACTCTX_SECTION_KEYED_DATA, ulSectionGlobalDataLength, 20, 4, 4); - TEST_FIELD(ACTCTX_SECTION_KEYED_DATA, lpSectionBase, 24, 4, 4); - TEST_FIELD(ACTCTX_SECTION_KEYED_DATA, ulSectionTotalLength, 28, 4, 4); - TEST_FIELD(ACTCTX_SECTION_KEYED_DATA, hActCtx, 32, 4, 4); - TEST_FIELD(ACTCTX_SECTION_KEYED_DATA, ulAssemblyRosterIndex, 36, 4, 4); - TEST_FIELD(ACTCTX_SECTION_KEYED_DATA, ulFlags, 40, 4, 4); - TEST_FIELD(ACTCTX_SECTION_KEYED_DATA, AssemblyMetadata, 44, 20, 4); + TEST_TYPE_SIZE (ACTCTX_SECTION_KEYED_DATA, 64) + TEST_TYPE_ALIGN (ACTCTX_SECTION_KEYED_DATA, 4) + TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA, cbSize, 4) + TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA, cbSize, 4) + TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, cbSize, 0) + TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA, ulDataFormatVersion, 4) + TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA, ulDataFormatVersion, 4) + TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, ulDataFormatVersion, 4) + TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA, lpData, 4) + TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA, lpData, 4) + TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, lpData, 8) + TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA, ulLength, 4) + TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA, ulLength, 4) + TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, ulLength, 12) + TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA, lpSectionGlobalData, 4) + TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA, lpSectionGlobalData, 4) + TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, lpSectionGlobalData, 16) + TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA, ulSectionGlobalDataLength, 4) + TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA, ulSectionGlobalDataLength, 4) + TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, ulSectionGlobalDataLength, 20) + TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA, lpSectionBase, 4) + TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA, lpSectionBase, 4) + TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, lpSectionBase, 24) + TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA, ulSectionTotalLength, 4) + TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA, ulSectionTotalLength, 4) + TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, ulSectionTotalLength, 28) + TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA, hActCtx, 4) + TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA, hActCtx, 4) + TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, hActCtx, 32) + TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA, ulAssemblyRosterIndex, 4) + TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA, ulAssemblyRosterIndex, 4) + TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, ulAssemblyRosterIndex, 36) + TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA, ulFlags, 4) + TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA, ulFlags, 4) + TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, ulFlags, 40) + TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA, AssemblyMetadata, 20) + TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA, AssemblyMetadata, 4) + TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, AssemblyMetadata, 44) } static void test_pack_ACTCTX_SECTION_KEYED_DATA_2600(void) { /* ACTCTX_SECTION_KEYED_DATA_2600 (pack 4) */ - TEST_TYPE(ACTCTX_SECTION_KEYED_DATA_2600, 40, 4); - TEST_FIELD(ACTCTX_SECTION_KEYED_DATA_2600, cbSize, 0, 4, 4); - TEST_FIELD(ACTCTX_SECTION_KEYED_DATA_2600, ulDataFormatVersion, 4, 4, 4); - TEST_FIELD(ACTCTX_SECTION_KEYED_DATA_2600, lpData, 8, 4, 4); - TEST_FIELD(ACTCTX_SECTION_KEYED_DATA_2600, ulLength, 12, 4, 4); - TEST_FIELD(ACTCTX_SECTION_KEYED_DATA_2600, lpSectionGlobalData, 16, 4, 4); - TEST_FIELD(ACTCTX_SECTION_KEYED_DATA_2600, ulSectionGlobalDataLength, 20, 4, 4); - TEST_FIELD(ACTCTX_SECTION_KEYED_DATA_2600, lpSectionBase, 24, 4, 4); - TEST_FIELD(ACTCTX_SECTION_KEYED_DATA_2600, ulSectionTotalLength, 28, 4, 4); - TEST_FIELD(ACTCTX_SECTION_KEYED_DATA_2600, hActCtx, 32, 4, 4); - TEST_FIELD(ACTCTX_SECTION_KEYED_DATA_2600, ulAssemblyRosterIndex, 36, 4, 4); + TEST_TYPE_SIZE (ACTCTX_SECTION_KEYED_DATA_2600, 40) + TEST_TYPE_ALIGN (ACTCTX_SECTION_KEYED_DATA_2600, 4) + TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA_2600, cbSize, 4) + TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA_2600, cbSize, 4) + TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA_2600, cbSize, 0) + TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA_2600, ulDataFormatVersion, 4) + TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA_2600, ulDataFormatVersion, 4) + TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA_2600, ulDataFormatVersion, 4) + TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA_2600, lpData, 4) + TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA_2600, lpData, 4) + TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA_2600, lpData, 8) + TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA_2600, ulLength, 4) + TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA_2600, ulLength, 4) + TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA_2600, ulLength, 12) + TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA_2600, lpSectionGlobalData, 4) + TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA_2600, lpSectionGlobalData, 4) + TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA_2600, lpSectionGlobalData, 16) + TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA_2600, ulSectionGlobalDataLength, 4) + TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA_2600, ulSectionGlobalDataLength, 4) + TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA_2600, ulSectionGlobalDataLength, 20) + TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA_2600, lpSectionBase, 4) + TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA_2600, lpSectionBase, 4) + TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA_2600, lpSectionBase, 24) + TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA_2600, ulSectionTotalLength, 4) + TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA_2600, ulSectionTotalLength, 4) + TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA_2600, ulSectionTotalLength, 28) + TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA_2600, hActCtx, 4) + TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA_2600, hActCtx, 4) + TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA_2600, hActCtx, 32) + TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA_2600, ulAssemblyRosterIndex, 4) + TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA_2600, ulAssemblyRosterIndex, 4) + TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA_2600, ulAssemblyRosterIndex, 36) } static void test_pack_ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA(void) { /* ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA (pack 4) */ - TEST_TYPE(ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, 20, 4); - TEST_FIELD(ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, lpInformation, 0, 4, 4); - TEST_FIELD(ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, lpSectionBase, 4, 4, 4); - TEST_FIELD(ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, ulSectionLength, 8, 4, 4); - TEST_FIELD(ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, lpSectionGlobalDataBase, 12, 4, 4); - TEST_FIELD(ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, ulSectionGlobalDataLength, 16, 4, 4); + TEST_TYPE_SIZE (ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, 20) + TEST_TYPE_ALIGN (ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, 4) + TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, lpInformation, 4) + TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, lpInformation, 4) + TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, lpInformation, 0) + TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, lpSectionBase, 4) + TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, lpSectionBase, 4) + TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, lpSectionBase, 4) + TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, ulSectionLength, 4) + TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, ulSectionLength, 4) + TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, ulSectionLength, 8) + TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, lpSectionGlobalDataBase, 4) + TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, lpSectionGlobalDataBase, 4) + TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, lpSectionGlobalDataBase, 12) + TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, ulSectionGlobalDataLength, 4) + TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, ulSectionGlobalDataLength, 4) + TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, ulSectionGlobalDataLength, 16) } static void test_pack_ACTIVATION_CONTEXT_BASIC_INFORMATION(void) { /* ACTIVATION_CONTEXT_BASIC_INFORMATION (pack 4) */ - TEST_TYPE(ACTIVATION_CONTEXT_BASIC_INFORMATION, 8, 4); - TEST_FIELD(ACTIVATION_CONTEXT_BASIC_INFORMATION, hActCtx, 0, 4, 4); - TEST_FIELD(ACTIVATION_CONTEXT_BASIC_INFORMATION, dwFlags, 4, 4, 4); + TEST_TYPE_SIZE (ACTIVATION_CONTEXT_BASIC_INFORMATION, 8) + TEST_TYPE_ALIGN (ACTIVATION_CONTEXT_BASIC_INFORMATION, 4) + TEST_FIELD_SIZE (ACTIVATION_CONTEXT_BASIC_INFORMATION, hActCtx, 4) + TEST_FIELD_ALIGN (ACTIVATION_CONTEXT_BASIC_INFORMATION, hActCtx, 4) + TEST_FIELD_OFFSET(ACTIVATION_CONTEXT_BASIC_INFORMATION, hActCtx, 0) + TEST_FIELD_SIZE (ACTIVATION_CONTEXT_BASIC_INFORMATION, dwFlags, 4) + TEST_FIELD_ALIGN (ACTIVATION_CONTEXT_BASIC_INFORMATION, dwFlags, 4) + TEST_FIELD_OFFSET(ACTIVATION_CONTEXT_BASIC_INFORMATION, dwFlags, 4) } static void test_pack_BY_HANDLE_FILE_INFORMATION(void) { /* BY_HANDLE_FILE_INFORMATION (pack 4) */ - TEST_TYPE(BY_HANDLE_FILE_INFORMATION, 52, 4); - TEST_FIELD(BY_HANDLE_FILE_INFORMATION, dwFileAttributes, 0, 4, 4); - TEST_FIELD(BY_HANDLE_FILE_INFORMATION, ftCreationTime, 4, 8, 4); - TEST_FIELD(BY_HANDLE_FILE_INFORMATION, ftLastAccessTime, 12, 8, 4); - TEST_FIELD(BY_HANDLE_FILE_INFORMATION, ftLastWriteTime, 20, 8, 4); - TEST_FIELD(BY_HANDLE_FILE_INFORMATION, dwVolumeSerialNumber, 28, 4, 4); - TEST_FIELD(BY_HANDLE_FILE_INFORMATION, nFileSizeHigh, 32, 4, 4); - TEST_FIELD(BY_HANDLE_FILE_INFORMATION, nFileSizeLow, 36, 4, 4); - TEST_FIELD(BY_HANDLE_FILE_INFORMATION, nNumberOfLinks, 40, 4, 4); - TEST_FIELD(BY_HANDLE_FILE_INFORMATION, nFileIndexHigh, 44, 4, 4); - TEST_FIELD(BY_HANDLE_FILE_INFORMATION, nFileIndexLow, 48, 4, 4); + TEST_TYPE_SIZE (BY_HANDLE_FILE_INFORMATION, 52) + TEST_TYPE_ALIGN (BY_HANDLE_FILE_INFORMATION, 4) + TEST_FIELD_SIZE (BY_HANDLE_FILE_INFORMATION, dwFileAttributes, 4) + TEST_FIELD_ALIGN (BY_HANDLE_FILE_INFORMATION, dwFileAttributes, 4) + TEST_FIELD_OFFSET(BY_HANDLE_FILE_INFORMATION, dwFileAttributes, 0) + TEST_FIELD_SIZE (BY_HANDLE_FILE_INFORMATION, ftCreationTime, 8) + TEST_FIELD_ALIGN (BY_HANDLE_FILE_INFORMATION, ftCreationTime, 4) + TEST_FIELD_OFFSET(BY_HANDLE_FILE_INFORMATION, ftCreationTime, 4) + TEST_FIELD_SIZE (BY_HANDLE_FILE_INFORMATION, ftLastAccessTime, 8) + TEST_FIELD_ALIGN (BY_HANDLE_FILE_INFORMATION, ftLastAccessTime, 4) + TEST_FIELD_OFFSET(BY_HANDLE_FILE_INFORMATION, ftLastAccessTime, 12) + TEST_FIELD_SIZE (BY_HANDLE_FILE_INFORMATION, ftLastWriteTime, 8) + TEST_FIELD_ALIGN (BY_HANDLE_FILE_INFORMATION, ftLastWriteTime, 4) + TEST_FIELD_OFFSET(BY_HANDLE_FILE_INFORMATION, ftLastWriteTime, 20) + TEST_FIELD_SIZE (BY_HANDLE_FILE_INFORMATION, dwVolumeSerialNumber, 4) + TEST_FIELD_ALIGN (BY_HANDLE_FILE_INFORMATION, dwVolumeSerialNumber, 4) + TEST_FIELD_OFFSET(BY_HANDLE_FILE_INFORMATION, dwVolumeSerialNumber, 28) + TEST_FIELD_SIZE (BY_HANDLE_FILE_INFORMATION, nFileSizeHigh, 4) + TEST_FIELD_ALIGN (BY_HANDLE_FILE_INFORMATION, nFileSizeHigh, 4) + TEST_FIELD_OFFSET(BY_HANDLE_FILE_INFORMATION, nFileSizeHigh, 32) + TEST_FIELD_SIZE (BY_HANDLE_FILE_INFORMATION, nFileSizeLow, 4) + TEST_FIELD_ALIGN (BY_HANDLE_FILE_INFORMATION, nFileSizeLow, 4) + TEST_FIELD_OFFSET(BY_HANDLE_FILE_INFORMATION, nFileSizeLow, 36) + TEST_FIELD_SIZE (BY_HANDLE_FILE_INFORMATION, nNumberOfLinks, 4) + TEST_FIELD_ALIGN (BY_HANDLE_FILE_INFORMATION, nNumberOfLinks, 4) + TEST_FIELD_OFFSET(BY_HANDLE_FILE_INFORMATION, nNumberOfLinks, 40) + TEST_FIELD_SIZE (BY_HANDLE_FILE_INFORMATION, nFileIndexHigh, 4) + TEST_FIELD_ALIGN (BY_HANDLE_FILE_INFORMATION, nFileIndexHigh, 4) + TEST_FIELD_OFFSET(BY_HANDLE_FILE_INFORMATION, nFileIndexHigh, 44) + TEST_FIELD_SIZE (BY_HANDLE_FILE_INFORMATION, nFileIndexLow, 4) + TEST_FIELD_ALIGN (BY_HANDLE_FILE_INFORMATION, nFileIndexLow, 4) + TEST_FIELD_OFFSET(BY_HANDLE_FILE_INFORMATION, nFileIndexLow, 48) } static void test_pack_COMMCONFIG(void) { /* COMMCONFIG (pack 4) */ - TEST_TYPE(COMMCONFIG, 52, 4); - TEST_FIELD(COMMCONFIG, dwSize, 0, 4, 4); - TEST_FIELD(COMMCONFIG, wVersion, 4, 2, 2); - TEST_FIELD(COMMCONFIG, wReserved, 6, 2, 2); - TEST_FIELD(COMMCONFIG, dcb, 8, 28, 4); - TEST_FIELD(COMMCONFIG, dwProviderSubType, 36, 4, 4); - TEST_FIELD(COMMCONFIG, dwProviderOffset, 40, 4, 4); - TEST_FIELD(COMMCONFIG, dwProviderSize, 44, 4, 4); - TEST_FIELD(COMMCONFIG, wcProviderData, 48, 4, 4); + TEST_TYPE_SIZE (COMMCONFIG, 52) + TEST_TYPE_ALIGN (COMMCONFIG, 4) + TEST_FIELD_SIZE (COMMCONFIG, dwSize, 4) + TEST_FIELD_ALIGN (COMMCONFIG, dwSize, 4) + TEST_FIELD_OFFSET(COMMCONFIG, dwSize, 0) + TEST_FIELD_SIZE (COMMCONFIG, wVersion, 2) + TEST_FIELD_ALIGN (COMMCONFIG, wVersion, 2) + TEST_FIELD_OFFSET(COMMCONFIG, wVersion, 4) + TEST_FIELD_SIZE (COMMCONFIG, wReserved, 2) + TEST_FIELD_ALIGN (COMMCONFIG, wReserved, 2) + TEST_FIELD_OFFSET(COMMCONFIG, wReserved, 6) + TEST_FIELD_SIZE (COMMCONFIG, dcb, 28) + TEST_FIELD_ALIGN (COMMCONFIG, dcb, 4) + TEST_FIELD_OFFSET(COMMCONFIG, dcb, 8) + TEST_FIELD_SIZE (COMMCONFIG, dwProviderSubType, 4) + TEST_FIELD_ALIGN (COMMCONFIG, dwProviderSubType, 4) + TEST_FIELD_OFFSET(COMMCONFIG, dwProviderSubType, 36) + TEST_FIELD_SIZE (COMMCONFIG, dwProviderOffset, 4) + TEST_FIELD_ALIGN (COMMCONFIG, dwProviderOffset, 4) + TEST_FIELD_OFFSET(COMMCONFIG, dwProviderOffset, 40) + TEST_FIELD_SIZE (COMMCONFIG, dwProviderSize, 4) + TEST_FIELD_ALIGN (COMMCONFIG, dwProviderSize, 4) + TEST_FIELD_OFFSET(COMMCONFIG, dwProviderSize, 44) + TEST_FIELD_SIZE (COMMCONFIG, wcProviderData, 4) + TEST_FIELD_ALIGN (COMMCONFIG, wcProviderData, 4) + TEST_FIELD_OFFSET(COMMCONFIG, wcProviderData, 48) } static void test_pack_COMMPROP(void) { /* COMMPROP (pack 4) */ - TEST_TYPE(COMMPROP, 64, 4); - TEST_FIELD(COMMPROP, wPacketLength, 0, 2, 2); - TEST_FIELD(COMMPROP, wPacketVersion, 2, 2, 2); - TEST_FIELD(COMMPROP, dwServiceMask, 4, 4, 4); - TEST_FIELD(COMMPROP, dwReserved1, 8, 4, 4); - TEST_FIELD(COMMPROP, dwMaxTxQueue, 12, 4, 4); - TEST_FIELD(COMMPROP, dwMaxRxQueue, 16, 4, 4); - TEST_FIELD(COMMPROP, dwMaxBaud, 20, 4, 4); - TEST_FIELD(COMMPROP, dwProvSubType, 24, 4, 4); - TEST_FIELD(COMMPROP, dwProvCapabilities, 28, 4, 4); - TEST_FIELD(COMMPROP, dwSettableParams, 32, 4, 4); - TEST_FIELD(COMMPROP, dwSettableBaud, 36, 4, 4); - TEST_FIELD(COMMPROP, wSettableData, 40, 2, 2); - TEST_FIELD(COMMPROP, wSettableStopParity, 42, 2, 2); - TEST_FIELD(COMMPROP, dwCurrentTxQueue, 44, 4, 4); - TEST_FIELD(COMMPROP, dwCurrentRxQueue, 48, 4, 4); - TEST_FIELD(COMMPROP, dwProvSpec1, 52, 4, 4); - TEST_FIELD(COMMPROP, dwProvSpec2, 56, 4, 4); - TEST_FIELD(COMMPROP, wcProvChar, 60, 2, 2); + TEST_TYPE_SIZE (COMMPROP, 64) + TEST_TYPE_ALIGN (COMMPROP, 4) + TEST_FIELD_SIZE (COMMPROP, wPacketLength, 2) + TEST_FIELD_ALIGN (COMMPROP, wPacketLength, 2) + TEST_FIELD_OFFSET(COMMPROP, wPacketLength, 0) + TEST_FIELD_SIZE (COMMPROP, wPacketVersion, 2) + TEST_FIELD_ALIGN (COMMPROP, wPacketVersion, 2) + TEST_FIELD_OFFSET(COMMPROP, wPacketVersion, 2) + TEST_FIELD_SIZE (COMMPROP, dwServiceMask, 4) + TEST_FIELD_ALIGN (COMMPROP, dwServiceMask, 4) + TEST_FIELD_OFFSET(COMMPROP, dwServiceMask, 4) + TEST_FIELD_SIZE (COMMPROP, dwReserved1, 4) + TEST_FIELD_ALIGN (COMMPROP, dwReserved1, 4) + TEST_FIELD_OFFSET(COMMPROP, dwReserved1, 8) + TEST_FIELD_SIZE (COMMPROP, dwMaxTxQueue, 4) + TEST_FIELD_ALIGN (COMMPROP, dwMaxTxQueue, 4) + TEST_FIELD_OFFSET(COMMPROP, dwMaxTxQueue, 12) + TEST_FIELD_SIZE (COMMPROP, dwMaxRxQueue, 4) + TEST_FIELD_ALIGN (COMMPROP, dwMaxRxQueue, 4) + TEST_FIELD_OFFSET(COMMPROP, dwMaxRxQueue, 16) + TEST_FIELD_SIZE (COMMPROP, dwMaxBaud, 4) + TEST_FIELD_ALIGN (COMMPROP, dwMaxBaud, 4) + TEST_FIELD_OFFSET(COMMPROP, dwMaxBaud, 20) + TEST_FIELD_SIZE (COMMPROP, dwProvSubType, 4) + TEST_FIELD_ALIGN (COMMPROP, dwProvSubType, 4) + TEST_FIELD_OFFSET(COMMPROP, dwProvSubType, 24) + TEST_FIELD_SIZE (COMMPROP, dwProvCapabilities, 4) + TEST_FIELD_ALIGN (COMMPROP, dwProvCapabilities, 4) + TEST_FIELD_OFFSET(COMMPROP, dwProvCapabilities, 28) + TEST_FIELD_SIZE (COMMPROP, dwSettableParams, 4) + TEST_FIELD_ALIGN (COMMPROP, dwSettableParams, 4) + TEST_FIELD_OFFSET(COMMPROP, dwSettableParams, 32) + TEST_FIELD_SIZE (COMMPROP, dwSettableBaud, 4) + TEST_FIELD_ALIGN (COMMPROP, dwSettableBaud, 4) + TEST_FIELD_OFFSET(COMMPROP, dwSettableBaud, 36) + TEST_FIELD_SIZE (COMMPROP, wSettableData, 2) + TEST_FIELD_ALIGN (COMMPROP, wSettableData, 2) + TEST_FIELD_OFFSET(COMMPROP, wSettableData, 40) + TEST_FIELD_SIZE (COMMPROP, wSettableStopParity, 2) + TEST_FIELD_ALIGN (COMMPROP, wSettableStopParity, 2) + TEST_FIELD_OFFSET(COMMPROP, wSettableStopParity, 42) + TEST_FIELD_SIZE (COMMPROP, dwCurrentTxQueue, 4) + TEST_FIELD_ALIGN (COMMPROP, dwCurrentTxQueue, 4) + TEST_FIELD_OFFSET(COMMPROP, dwCurrentTxQueue, 44) + TEST_FIELD_SIZE (COMMPROP, dwCurrentRxQueue, 4) + TEST_FIELD_ALIGN (COMMPROP, dwCurrentRxQueue, 4) + TEST_FIELD_OFFSET(COMMPROP, dwCurrentRxQueue, 48) + TEST_FIELD_SIZE (COMMPROP, dwProvSpec1, 4) + TEST_FIELD_ALIGN (COMMPROP, dwProvSpec1, 4) + TEST_FIELD_OFFSET(COMMPROP, dwProvSpec1, 52) + TEST_FIELD_SIZE (COMMPROP, dwProvSpec2, 4) + TEST_FIELD_ALIGN (COMMPROP, dwProvSpec2, 4) + TEST_FIELD_OFFSET(COMMPROP, dwProvSpec2, 56) + TEST_FIELD_SIZE (COMMPROP, wcProvChar, 2) + TEST_FIELD_ALIGN (COMMPROP, wcProvChar, 2) + TEST_FIELD_OFFSET(COMMPROP, wcProvChar, 60) } static void test_pack_COMMTIMEOUTS(void) { /* COMMTIMEOUTS (pack 4) */ - TEST_TYPE(COMMTIMEOUTS, 20, 4); - TEST_FIELD(COMMTIMEOUTS, ReadIntervalTimeout, 0, 4, 4); - TEST_FIELD(COMMTIMEOUTS, ReadTotalTimeoutMultiplier, 4, 4, 4); - TEST_FIELD(COMMTIMEOUTS, ReadTotalTimeoutConstant, 8, 4, 4); - TEST_FIELD(COMMTIMEOUTS, WriteTotalTimeoutMultiplier, 12, 4, 4); - TEST_FIELD(COMMTIMEOUTS, WriteTotalTimeoutConstant, 16, 4, 4); + TEST_TYPE_SIZE (COMMTIMEOUTS, 20) + TEST_TYPE_ALIGN (COMMTIMEOUTS, 4) + TEST_FIELD_SIZE (COMMTIMEOUTS, ReadIntervalTimeout, 4) + TEST_FIELD_ALIGN (COMMTIMEOUTS, ReadIntervalTimeout, 4) + TEST_FIELD_OFFSET(COMMTIMEOUTS, ReadIntervalTimeout, 0) + TEST_FIELD_SIZE (COMMTIMEOUTS, ReadTotalTimeoutMultiplier, 4) + TEST_FIELD_ALIGN (COMMTIMEOUTS, ReadTotalTimeoutMultiplier, 4) + TEST_FIELD_OFFSET(COMMTIMEOUTS, ReadTotalTimeoutMultiplier, 4) + TEST_FIELD_SIZE (COMMTIMEOUTS, ReadTotalTimeoutConstant, 4) + TEST_FIELD_ALIGN (COMMTIMEOUTS, ReadTotalTimeoutConstant, 4) + TEST_FIELD_OFFSET(COMMTIMEOUTS, ReadTotalTimeoutConstant, 8) + TEST_FIELD_SIZE (COMMTIMEOUTS, WriteTotalTimeoutMultiplier, 4) + TEST_FIELD_ALIGN (COMMTIMEOUTS, WriteTotalTimeoutMultiplier, 4) + TEST_FIELD_OFFSET(COMMTIMEOUTS, WriteTotalTimeoutMultiplier, 12) + TEST_FIELD_SIZE (COMMTIMEOUTS, WriteTotalTimeoutConstant, 4) + TEST_FIELD_ALIGN (COMMTIMEOUTS, WriteTotalTimeoutConstant, 4) + TEST_FIELD_OFFSET(COMMTIMEOUTS, WriteTotalTimeoutConstant, 16) } static void test_pack_COMSTAT(void) { /* COMSTAT (pack 4) */ - TEST_TYPE(COMSTAT, 12, 4); - TEST_FIELD(COMSTAT, cbInQue, 4, 4, 4); - TEST_FIELD(COMSTAT, cbOutQue, 8, 4, 4); + TEST_TYPE_SIZE (COMSTAT, 12) + TEST_TYPE_ALIGN (COMSTAT, 4) + TEST_FIELD_SIZE (COMSTAT, cbInQue, 4) + TEST_FIELD_ALIGN (COMSTAT, cbInQue, 4) + TEST_FIELD_OFFSET(COMSTAT, cbInQue, 4) + TEST_FIELD_SIZE (COMSTAT, cbOutQue, 4) + TEST_FIELD_ALIGN (COMSTAT, cbOutQue, 4) + TEST_FIELD_OFFSET(COMSTAT, cbOutQue, 8) } static void test_pack_CREATE_PROCESS_DEBUG_INFO(void) { /* CREATE_PROCESS_DEBUG_INFO (pack 4) */ - TEST_TYPE(CREATE_PROCESS_DEBUG_INFO, 40, 4); - TEST_FIELD(CREATE_PROCESS_DEBUG_INFO, hFile, 0, 4, 4); - TEST_FIELD(CREATE_PROCESS_DEBUG_INFO, hProcess, 4, 4, 4); - TEST_FIELD(CREATE_PROCESS_DEBUG_INFO, hThread, 8, 4, 4); - TEST_FIELD(CREATE_PROCESS_DEBUG_INFO, lpBaseOfImage, 12, 4, 4); - TEST_FIELD(CREATE_PROCESS_DEBUG_INFO, dwDebugInfoFileOffset, 16, 4, 4); - TEST_FIELD(CREATE_PROCESS_DEBUG_INFO, nDebugInfoSize, 20, 4, 4); - TEST_FIELD(CREATE_PROCESS_DEBUG_INFO, lpThreadLocalBase, 24, 4, 4); - TEST_FIELD(CREATE_PROCESS_DEBUG_INFO, lpStartAddress, 28, 4, 4); - TEST_FIELD(CREATE_PROCESS_DEBUG_INFO, lpImageName, 32, 4, 4); - TEST_FIELD(CREATE_PROCESS_DEBUG_INFO, fUnicode, 36, 2, 2); + TEST_TYPE_SIZE (CREATE_PROCESS_DEBUG_INFO, 40) + TEST_TYPE_ALIGN (CREATE_PROCESS_DEBUG_INFO, 4) + TEST_FIELD_SIZE (CREATE_PROCESS_DEBUG_INFO, hFile, 4) + TEST_FIELD_ALIGN (CREATE_PROCESS_DEBUG_INFO, hFile, 4) + TEST_FIELD_OFFSET(CREATE_PROCESS_DEBUG_INFO, hFile, 0) + TEST_FIELD_SIZE (CREATE_PROCESS_DEBUG_INFO, hProcess, 4) + TEST_FIELD_ALIGN (CREATE_PROCESS_DEBUG_INFO, hProcess, 4) + TEST_FIELD_OFFSET(CREATE_PROCESS_DEBUG_INFO, hProcess, 4) + TEST_FIELD_SIZE (CREATE_PROCESS_DEBUG_INFO, hThread, 4) + TEST_FIELD_ALIGN (CREATE_PROCESS_DEBUG_INFO, hThread, 4) + TEST_FIELD_OFFSET(CREATE_PROCESS_DEBUG_INFO, hThread, 8) + TEST_FIELD_SIZE (CREATE_PROCESS_DEBUG_INFO, lpBaseOfImage, 4) + TEST_FIELD_ALIGN (CREATE_PROCESS_DEBUG_INFO, lpBaseOfImage, 4) + TEST_FIELD_OFFSET(CREATE_PROCESS_DEBUG_INFO, lpBaseOfImage, 12) + TEST_FIELD_SIZE (CREATE_PROCESS_DEBUG_INFO, dwDebugInfoFileOffset, 4) + TEST_FIELD_ALIGN (CREATE_PROCESS_DEBUG_INFO, dwDebugInfoFileOffset, 4) + TEST_FIELD_OFFSET(CREATE_PROCESS_DEBUG_INFO, dwDebugInfoFileOffset, 16) + TEST_FIELD_SIZE (CREATE_PROCESS_DEBUG_INFO, nDebugInfoSize, 4) + TEST_FIELD_ALIGN (CREATE_PROCESS_DEBUG_INFO, nDebugInfoSize, 4) + TEST_FIELD_OFFSET(CREATE_PROCESS_DEBUG_INFO, nDebugInfoSize, 20) + TEST_FIELD_SIZE (CREATE_PROCESS_DEBUG_INFO, lpThreadLocalBase, 4) + TEST_FIELD_ALIGN (CREATE_PROCESS_DEBUG_INFO, lpThreadLocalBase, 4) + TEST_FIELD_OFFSET(CREATE_PROCESS_DEBUG_INFO, lpThreadLocalBase, 24) + TEST_FIELD_SIZE (CREATE_PROCESS_DEBUG_INFO, lpStartAddress, 4) + TEST_FIELD_ALIGN (CREATE_PROCESS_DEBUG_INFO, lpStartAddress, 4) + TEST_FIELD_OFFSET(CREATE_PROCESS_DEBUG_INFO, lpStartAddress, 28) + TEST_FIELD_SIZE (CREATE_PROCESS_DEBUG_INFO, lpImageName, 4) + TEST_FIELD_ALIGN (CREATE_PROCESS_DEBUG_INFO, lpImageName, 4) + TEST_FIELD_OFFSET(CREATE_PROCESS_DEBUG_INFO, lpImageName, 32) + TEST_FIELD_SIZE (CREATE_PROCESS_DEBUG_INFO, fUnicode, 2) + TEST_FIELD_ALIGN (CREATE_PROCESS_DEBUG_INFO, fUnicode, 2) + TEST_FIELD_OFFSET(CREATE_PROCESS_DEBUG_INFO, fUnicode, 36) } static void test_pack_CREATE_THREAD_DEBUG_INFO(void) { /* CREATE_THREAD_DEBUG_INFO (pack 4) */ - TEST_TYPE(CREATE_THREAD_DEBUG_INFO, 12, 4); - TEST_FIELD(CREATE_THREAD_DEBUG_INFO, hThread, 0, 4, 4); - TEST_FIELD(CREATE_THREAD_DEBUG_INFO, lpThreadLocalBase, 4, 4, 4); - TEST_FIELD(CREATE_THREAD_DEBUG_INFO, lpStartAddress, 8, 4, 4); + TEST_TYPE_SIZE (CREATE_THREAD_DEBUG_INFO, 12) + TEST_TYPE_ALIGN (CREATE_THREAD_DEBUG_INFO, 4) + TEST_FIELD_SIZE (CREATE_THREAD_DEBUG_INFO, hThread, 4) + TEST_FIELD_ALIGN (CREATE_THREAD_DEBUG_INFO, hThread, 4) + TEST_FIELD_OFFSET(CREATE_THREAD_DEBUG_INFO, hThread, 0) + TEST_FIELD_SIZE (CREATE_THREAD_DEBUG_INFO, lpThreadLocalBase, 4) + TEST_FIELD_ALIGN (CREATE_THREAD_DEBUG_INFO, lpThreadLocalBase, 4) + TEST_FIELD_OFFSET(CREATE_THREAD_DEBUG_INFO, lpThreadLocalBase, 4) + TEST_FIELD_SIZE (CREATE_THREAD_DEBUG_INFO, lpStartAddress, 4) + TEST_FIELD_ALIGN (CREATE_THREAD_DEBUG_INFO, lpStartAddress, 4) + TEST_FIELD_OFFSET(CREATE_THREAD_DEBUG_INFO, lpStartAddress, 8) } static void test_pack_CRITICAL_SECTION(void) { /* CRITICAL_SECTION */ - TEST_TYPE(CRITICAL_SECTION, 24, 4); + TEST_TYPE_SIZE (CRITICAL_SECTION, 24) + TEST_TYPE_ALIGN (CRITICAL_SECTION, 4) } static void test_pack_CRITICAL_SECTION_DEBUG(void) @@ -432,667 +725,1025 @@ static void test_pack_CRITICAL_SECTION_DEBUG(void) static void test_pack_DCB(void) { /* DCB (pack 4) */ - TEST_TYPE(DCB, 28, 4); - TEST_FIELD(DCB, DCBlength, 0, 4, 4); - TEST_FIELD(DCB, BaudRate, 4, 4, 4); - TEST_FIELD(DCB, wReserved, 12, 2, 2); - TEST_FIELD(DCB, XonLim, 14, 2, 2); - TEST_FIELD(DCB, XoffLim, 16, 2, 2); - TEST_FIELD(DCB, ByteSize, 18, 1, 1); - TEST_FIELD(DCB, Parity, 19, 1, 1); - TEST_FIELD(DCB, StopBits, 20, 1, 1); - TEST_FIELD(DCB, XonChar, 21, 1, 1); - TEST_FIELD(DCB, XoffChar, 22, 1, 1); - TEST_FIELD(DCB, ErrorChar, 23, 1, 1); - TEST_FIELD(DCB, EofChar, 24, 1, 1); - TEST_FIELD(DCB, EvtChar, 25, 1, 1); - TEST_FIELD(DCB, wReserved1, 26, 2, 2); + TEST_TYPE_SIZE (DCB, 28) + TEST_TYPE_ALIGN (DCB, 4) + TEST_FIELD_SIZE (DCB, DCBlength, 4) + TEST_FIELD_ALIGN (DCB, DCBlength, 4) + TEST_FIELD_OFFSET(DCB, DCBlength, 0) + TEST_FIELD_SIZE (DCB, BaudRate, 4) + TEST_FIELD_ALIGN (DCB, BaudRate, 4) + TEST_FIELD_OFFSET(DCB, BaudRate, 4) + TEST_FIELD_SIZE (DCB, wReserved, 2) + TEST_FIELD_ALIGN (DCB, wReserved, 2) + TEST_FIELD_OFFSET(DCB, wReserved, 12) + TEST_FIELD_SIZE (DCB, XonLim, 2) + TEST_FIELD_ALIGN (DCB, XonLim, 2) + TEST_FIELD_OFFSET(DCB, XonLim, 14) + TEST_FIELD_SIZE (DCB, XoffLim, 2) + TEST_FIELD_ALIGN (DCB, XoffLim, 2) + TEST_FIELD_OFFSET(DCB, XoffLim, 16) + TEST_FIELD_SIZE (DCB, ByteSize, 1) + TEST_FIELD_ALIGN (DCB, ByteSize, 1) + TEST_FIELD_OFFSET(DCB, ByteSize, 18) + TEST_FIELD_SIZE (DCB, Parity, 1) + TEST_FIELD_ALIGN (DCB, Parity, 1) + TEST_FIELD_OFFSET(DCB, Parity, 19) + TEST_FIELD_SIZE (DCB, StopBits, 1) + TEST_FIELD_ALIGN (DCB, StopBits, 1) + TEST_FIELD_OFFSET(DCB, StopBits, 20) + TEST_FIELD_SIZE (DCB, XonChar, 1) + TEST_FIELD_ALIGN (DCB, XonChar, 1) + TEST_FIELD_OFFSET(DCB, XonChar, 21) + TEST_FIELD_SIZE (DCB, XoffChar, 1) + TEST_FIELD_ALIGN (DCB, XoffChar, 1) + TEST_FIELD_OFFSET(DCB, XoffChar, 22) + TEST_FIELD_SIZE (DCB, ErrorChar, 1) + TEST_FIELD_ALIGN (DCB, ErrorChar, 1) + TEST_FIELD_OFFSET(DCB, ErrorChar, 23) + TEST_FIELD_SIZE (DCB, EofChar, 1) + TEST_FIELD_ALIGN (DCB, EofChar, 1) + TEST_FIELD_OFFSET(DCB, EofChar, 24) + TEST_FIELD_SIZE (DCB, EvtChar, 1) + TEST_FIELD_ALIGN (DCB, EvtChar, 1) + TEST_FIELD_OFFSET(DCB, EvtChar, 25) + TEST_FIELD_SIZE (DCB, wReserved1, 2) + TEST_FIELD_ALIGN (DCB, wReserved1, 2) + TEST_FIELD_OFFSET(DCB, wReserved1, 26) } static void test_pack_DEBUG_EVENT(void) { /* DEBUG_EVENT (pack 4) */ - TEST_FIELD(DEBUG_EVENT, dwDebugEventCode, 0, 4, 4); - TEST_FIELD(DEBUG_EVENT, dwProcessId, 4, 4, 4); - TEST_FIELD(DEBUG_EVENT, dwThreadId, 8, 4, 4); + TEST_FIELD_SIZE (DEBUG_EVENT, dwDebugEventCode, 4) + TEST_FIELD_ALIGN (DEBUG_EVENT, dwDebugEventCode, 4) + TEST_FIELD_OFFSET(DEBUG_EVENT, dwDebugEventCode, 0) + TEST_FIELD_SIZE (DEBUG_EVENT, dwProcessId, 4) + TEST_FIELD_ALIGN (DEBUG_EVENT, dwProcessId, 4) + TEST_FIELD_OFFSET(DEBUG_EVENT, dwProcessId, 4) + TEST_FIELD_SIZE (DEBUG_EVENT, dwThreadId, 4) + TEST_FIELD_ALIGN (DEBUG_EVENT, dwThreadId, 4) + TEST_FIELD_OFFSET(DEBUG_EVENT, dwThreadId, 8) } static void test_pack_ENUMRESLANGPROCA(void) { /* ENUMRESLANGPROCA */ - TEST_TYPE(ENUMRESLANGPROCA, 4, 4); + TEST_TYPE_SIZE (ENUMRESLANGPROCA, 4) + TEST_TYPE_ALIGN (ENUMRESLANGPROCA, 4) } static void test_pack_ENUMRESLANGPROCW(void) { /* ENUMRESLANGPROCW */ - TEST_TYPE(ENUMRESLANGPROCW, 4, 4); + TEST_TYPE_SIZE (ENUMRESLANGPROCW, 4) + TEST_TYPE_ALIGN (ENUMRESLANGPROCW, 4) } static void test_pack_ENUMRESNAMEPROCA(void) { /* ENUMRESNAMEPROCA */ - TEST_TYPE(ENUMRESNAMEPROCA, 4, 4); + TEST_TYPE_SIZE (ENUMRESNAMEPROCA, 4) + TEST_TYPE_ALIGN (ENUMRESNAMEPROCA, 4) } static void test_pack_ENUMRESNAMEPROCW(void) { /* ENUMRESNAMEPROCW */ - TEST_TYPE(ENUMRESNAMEPROCW, 4, 4); + TEST_TYPE_SIZE (ENUMRESNAMEPROCW, 4) + TEST_TYPE_ALIGN (ENUMRESNAMEPROCW, 4) } static void test_pack_ENUMRESTYPEPROCA(void) { /* ENUMRESTYPEPROCA */ - TEST_TYPE(ENUMRESTYPEPROCA, 4, 4); + TEST_TYPE_SIZE (ENUMRESTYPEPROCA, 4) + TEST_TYPE_ALIGN (ENUMRESTYPEPROCA, 4) } static void test_pack_ENUMRESTYPEPROCW(void) { /* ENUMRESTYPEPROCW */ - TEST_TYPE(ENUMRESTYPEPROCW, 4, 4); + TEST_TYPE_SIZE (ENUMRESTYPEPROCW, 4) + TEST_TYPE_ALIGN (ENUMRESTYPEPROCW, 4) } static void test_pack_EXCEPTION_DEBUG_INFO(void) { /* EXCEPTION_DEBUG_INFO (pack 4) */ - TEST_TYPE(EXCEPTION_DEBUG_INFO, 84, 4); - TEST_FIELD(EXCEPTION_DEBUG_INFO, ExceptionRecord, 0, 80, 4); - TEST_FIELD(EXCEPTION_DEBUG_INFO, dwFirstChance, 80, 4, 4); + TEST_TYPE_SIZE (EXCEPTION_DEBUG_INFO, 84) + TEST_TYPE_ALIGN (EXCEPTION_DEBUG_INFO, 4) + TEST_FIELD_SIZE (EXCEPTION_DEBUG_INFO, ExceptionRecord, 80) + TEST_FIELD_ALIGN (EXCEPTION_DEBUG_INFO, ExceptionRecord, 4) + TEST_FIELD_OFFSET(EXCEPTION_DEBUG_INFO, ExceptionRecord, 0) + TEST_FIELD_SIZE (EXCEPTION_DEBUG_INFO, dwFirstChance, 4) + TEST_FIELD_ALIGN (EXCEPTION_DEBUG_INFO, dwFirstChance, 4) + TEST_FIELD_OFFSET(EXCEPTION_DEBUG_INFO, dwFirstChance, 80) } static void test_pack_EXIT_PROCESS_DEBUG_INFO(void) { /* EXIT_PROCESS_DEBUG_INFO (pack 4) */ - TEST_TYPE(EXIT_PROCESS_DEBUG_INFO, 4, 4); - TEST_FIELD(EXIT_PROCESS_DEBUG_INFO, dwExitCode, 0, 4, 4); + TEST_TYPE_SIZE (EXIT_PROCESS_DEBUG_INFO, 4) + TEST_TYPE_ALIGN (EXIT_PROCESS_DEBUG_INFO, 4) + TEST_FIELD_SIZE (EXIT_PROCESS_DEBUG_INFO, dwExitCode, 4) + TEST_FIELD_ALIGN (EXIT_PROCESS_DEBUG_INFO, dwExitCode, 4) + TEST_FIELD_OFFSET(EXIT_PROCESS_DEBUG_INFO, dwExitCode, 0) } static void test_pack_EXIT_THREAD_DEBUG_INFO(void) { /* EXIT_THREAD_DEBUG_INFO (pack 4) */ - TEST_TYPE(EXIT_THREAD_DEBUG_INFO, 4, 4); - TEST_FIELD(EXIT_THREAD_DEBUG_INFO, dwExitCode, 0, 4, 4); + TEST_TYPE_SIZE (EXIT_THREAD_DEBUG_INFO, 4) + TEST_TYPE_ALIGN (EXIT_THREAD_DEBUG_INFO, 4) + TEST_FIELD_SIZE (EXIT_THREAD_DEBUG_INFO, dwExitCode, 4) + TEST_FIELD_ALIGN (EXIT_THREAD_DEBUG_INFO, dwExitCode, 4) + TEST_FIELD_OFFSET(EXIT_THREAD_DEBUG_INFO, dwExitCode, 0) } static void test_pack_HW_PROFILE_INFOA(void) { /* HW_PROFILE_INFOA (pack 4) */ - TEST_TYPE(HW_PROFILE_INFOA, 124, 4); - TEST_FIELD(HW_PROFILE_INFOA, dwDockInfo, 0, 4, 4); - TEST_FIELD(HW_PROFILE_INFOA, szHwProfileGuid, 4, 39, 1); - TEST_FIELD(HW_PROFILE_INFOA, szHwProfileName, 43, 80, 1); + TEST_TYPE_SIZE (HW_PROFILE_INFOA, 124) + TEST_TYPE_ALIGN (HW_PROFILE_INFOA, 4) + TEST_FIELD_SIZE (HW_PROFILE_INFOA, dwDockInfo, 4) + TEST_FIELD_ALIGN (HW_PROFILE_INFOA, dwDockInfo, 4) + TEST_FIELD_OFFSET(HW_PROFILE_INFOA, dwDockInfo, 0) + TEST_FIELD_SIZE (HW_PROFILE_INFOA, szHwProfileGuid, 39) + TEST_FIELD_ALIGN (HW_PROFILE_INFOA, szHwProfileGuid, 1) + TEST_FIELD_OFFSET(HW_PROFILE_INFOA, szHwProfileGuid, 4) + TEST_FIELD_SIZE (HW_PROFILE_INFOA, szHwProfileName, 80) + TEST_FIELD_ALIGN (HW_PROFILE_INFOA, szHwProfileName, 1) + TEST_FIELD_OFFSET(HW_PROFILE_INFOA, szHwProfileName, 43) } static void test_pack_HW_PROFILE_INFOW(void) { /* HW_PROFILE_INFOW (pack 4) */ - TEST_TYPE(HW_PROFILE_INFOW, 244, 4); - TEST_FIELD(HW_PROFILE_INFOW, dwDockInfo, 0, 4, 4); - TEST_FIELD(HW_PROFILE_INFOW, szHwProfileGuid, 4, 78, 2); - TEST_FIELD(HW_PROFILE_INFOW, szHwProfileName, 82, 160, 2); + TEST_TYPE_SIZE (HW_PROFILE_INFOW, 244) + TEST_TYPE_ALIGN (HW_PROFILE_INFOW, 4) + TEST_FIELD_SIZE (HW_PROFILE_INFOW, dwDockInfo, 4) + TEST_FIELD_ALIGN (HW_PROFILE_INFOW, dwDockInfo, 4) + TEST_FIELD_OFFSET(HW_PROFILE_INFOW, dwDockInfo, 0) + TEST_FIELD_SIZE (HW_PROFILE_INFOW, szHwProfileGuid, 78) + TEST_FIELD_ALIGN (HW_PROFILE_INFOW, szHwProfileGuid, 2) + TEST_FIELD_OFFSET(HW_PROFILE_INFOW, szHwProfileGuid, 4) + TEST_FIELD_SIZE (HW_PROFILE_INFOW, szHwProfileName, 160) + TEST_FIELD_ALIGN (HW_PROFILE_INFOW, szHwProfileName, 2) + TEST_FIELD_OFFSET(HW_PROFILE_INFOW, szHwProfileName, 82) } static void test_pack_LOAD_DLL_DEBUG_INFO(void) { /* LOAD_DLL_DEBUG_INFO (pack 4) */ - TEST_TYPE(LOAD_DLL_DEBUG_INFO, 24, 4); - TEST_FIELD(LOAD_DLL_DEBUG_INFO, hFile, 0, 4, 4); - TEST_FIELD(LOAD_DLL_DEBUG_INFO, lpBaseOfDll, 4, 4, 4); - TEST_FIELD(LOAD_DLL_DEBUG_INFO, dwDebugInfoFileOffset, 8, 4, 4); - TEST_FIELD(LOAD_DLL_DEBUG_INFO, nDebugInfoSize, 12, 4, 4); - TEST_FIELD(LOAD_DLL_DEBUG_INFO, lpImageName, 16, 4, 4); - TEST_FIELD(LOAD_DLL_DEBUG_INFO, fUnicode, 20, 2, 2); + TEST_TYPE_SIZE (LOAD_DLL_DEBUG_INFO, 24) + TEST_TYPE_ALIGN (LOAD_DLL_DEBUG_INFO, 4) + TEST_FIELD_SIZE (LOAD_DLL_DEBUG_INFO, hFile, 4) + TEST_FIELD_ALIGN (LOAD_DLL_DEBUG_INFO, hFile, 4) + TEST_FIELD_OFFSET(LOAD_DLL_DEBUG_INFO, hFile, 0) + TEST_FIELD_SIZE (LOAD_DLL_DEBUG_INFO, lpBaseOfDll, 4) + TEST_FIELD_ALIGN (LOAD_DLL_DEBUG_INFO, lpBaseOfDll, 4) + TEST_FIELD_OFFSET(LOAD_DLL_DEBUG_INFO, lpBaseOfDll, 4) + TEST_FIELD_SIZE (LOAD_DLL_DEBUG_INFO, dwDebugInfoFileOffset, 4) + TEST_FIELD_ALIGN (LOAD_DLL_DEBUG_INFO, dwDebugInfoFileOffset, 4) + TEST_FIELD_OFFSET(LOAD_DLL_DEBUG_INFO, dwDebugInfoFileOffset, 8) + TEST_FIELD_SIZE (LOAD_DLL_DEBUG_INFO, nDebugInfoSize, 4) + TEST_FIELD_ALIGN (LOAD_DLL_DEBUG_INFO, nDebugInfoSize, 4) + TEST_FIELD_OFFSET(LOAD_DLL_DEBUG_INFO, nDebugInfoSize, 12) + TEST_FIELD_SIZE (LOAD_DLL_DEBUG_INFO, lpImageName, 4) + TEST_FIELD_ALIGN (LOAD_DLL_DEBUG_INFO, lpImageName, 4) + TEST_FIELD_OFFSET(LOAD_DLL_DEBUG_INFO, lpImageName, 16) + TEST_FIELD_SIZE (LOAD_DLL_DEBUG_INFO, fUnicode, 2) + TEST_FIELD_ALIGN (LOAD_DLL_DEBUG_INFO, fUnicode, 2) + TEST_FIELD_OFFSET(LOAD_DLL_DEBUG_INFO, fUnicode, 20) } static void test_pack_LPBY_HANDLE_FILE_INFORMATION(void) { /* LPBY_HANDLE_FILE_INFORMATION */ - TEST_TYPE(LPBY_HANDLE_FILE_INFORMATION, 4, 4); - TEST_TYPE_POINTER(LPBY_HANDLE_FILE_INFORMATION, 52, 4); + TEST_TYPE_SIZE (LPBY_HANDLE_FILE_INFORMATION, 4) + TEST_TYPE_ALIGN (LPBY_HANDLE_FILE_INFORMATION, 4) + TEST_TARGET_SIZE (LPBY_HANDLE_FILE_INFORMATION, 52) + TEST_TARGET_ALIGN(LPBY_HANDLE_FILE_INFORMATION, 4) } static void test_pack_LPCOMMCONFIG(void) { /* LPCOMMCONFIG */ - TEST_TYPE(LPCOMMCONFIG, 4, 4); - TEST_TYPE_POINTER(LPCOMMCONFIG, 52, 4); + TEST_TYPE_SIZE (LPCOMMCONFIG, 4) + TEST_TYPE_ALIGN (LPCOMMCONFIG, 4) + TEST_TARGET_SIZE (LPCOMMCONFIG, 52) + TEST_TARGET_ALIGN(LPCOMMCONFIG, 4) } static void test_pack_LPCOMMPROP(void) { /* LPCOMMPROP */ - TEST_TYPE(LPCOMMPROP, 4, 4); - TEST_TYPE_POINTER(LPCOMMPROP, 64, 4); + TEST_TYPE_SIZE (LPCOMMPROP, 4) + TEST_TYPE_ALIGN (LPCOMMPROP, 4) + TEST_TARGET_SIZE (LPCOMMPROP, 64) + TEST_TARGET_ALIGN(LPCOMMPROP, 4) } static void test_pack_LPCOMMTIMEOUTS(void) { /* LPCOMMTIMEOUTS */ - TEST_TYPE(LPCOMMTIMEOUTS, 4, 4); - TEST_TYPE_POINTER(LPCOMMTIMEOUTS, 20, 4); + TEST_TYPE_SIZE (LPCOMMTIMEOUTS, 4) + TEST_TYPE_ALIGN (LPCOMMTIMEOUTS, 4) + TEST_TARGET_SIZE (LPCOMMTIMEOUTS, 20) + TEST_TARGET_ALIGN(LPCOMMTIMEOUTS, 4) } static void test_pack_LPCOMSTAT(void) { /* LPCOMSTAT */ - TEST_TYPE(LPCOMSTAT, 4, 4); - TEST_TYPE_POINTER(LPCOMSTAT, 12, 4); + TEST_TYPE_SIZE (LPCOMSTAT, 4) + TEST_TYPE_ALIGN (LPCOMSTAT, 4) + TEST_TARGET_SIZE (LPCOMSTAT, 12) + TEST_TARGET_ALIGN(LPCOMSTAT, 4) } static void test_pack_LPCRITICAL_SECTION(void) { /* LPCRITICAL_SECTION */ - TEST_TYPE(LPCRITICAL_SECTION, 4, 4); + TEST_TYPE_SIZE (LPCRITICAL_SECTION, 4) + TEST_TYPE_ALIGN (LPCRITICAL_SECTION, 4) } static void test_pack_LPCRITICAL_SECTION_DEBUG(void) { /* LPCRITICAL_SECTION_DEBUG */ - TEST_TYPE(LPCRITICAL_SECTION_DEBUG, 4, 4); + TEST_TYPE_SIZE (LPCRITICAL_SECTION_DEBUG, 4) + TEST_TYPE_ALIGN (LPCRITICAL_SECTION_DEBUG, 4) } static void test_pack_LPDCB(void) { /* LPDCB */ - TEST_TYPE(LPDCB, 4, 4); - TEST_TYPE_POINTER(LPDCB, 28, 4); + TEST_TYPE_SIZE (LPDCB, 4) + TEST_TYPE_ALIGN (LPDCB, 4) + TEST_TARGET_SIZE (LPDCB, 28) + TEST_TARGET_ALIGN(LPDCB, 4) } static void test_pack_LPDEBUG_EVENT(void) { /* LPDEBUG_EVENT */ - TEST_TYPE(LPDEBUG_EVENT, 4, 4); + TEST_TYPE_SIZE (LPDEBUG_EVENT, 4) + TEST_TYPE_ALIGN (LPDEBUG_EVENT, 4) } static void test_pack_LPEXCEPTION_POINTERS(void) { /* LPEXCEPTION_POINTERS */ - TEST_TYPE(LPEXCEPTION_POINTERS, 4, 4); + TEST_TYPE_SIZE (LPEXCEPTION_POINTERS, 4) + TEST_TYPE_ALIGN (LPEXCEPTION_POINTERS, 4) } static void test_pack_LPEXCEPTION_RECORD(void) { /* LPEXCEPTION_RECORD */ - TEST_TYPE(LPEXCEPTION_RECORD, 4, 4); + TEST_TYPE_SIZE (LPEXCEPTION_RECORD, 4) + TEST_TYPE_ALIGN (LPEXCEPTION_RECORD, 4) } static void test_pack_LPFIBER_START_ROUTINE(void) { /* LPFIBER_START_ROUTINE */ - TEST_TYPE(LPFIBER_START_ROUTINE, 4, 4); + TEST_TYPE_SIZE (LPFIBER_START_ROUTINE, 4) + TEST_TYPE_ALIGN (LPFIBER_START_ROUTINE, 4) } static void test_pack_LPHW_PROFILE_INFOA(void) { /* LPHW_PROFILE_INFOA */ - TEST_TYPE(LPHW_PROFILE_INFOA, 4, 4); - TEST_TYPE_POINTER(LPHW_PROFILE_INFOA, 124, 4); + TEST_TYPE_SIZE (LPHW_PROFILE_INFOA, 4) + TEST_TYPE_ALIGN (LPHW_PROFILE_INFOA, 4) + TEST_TARGET_SIZE (LPHW_PROFILE_INFOA, 124) + TEST_TARGET_ALIGN(LPHW_PROFILE_INFOA, 4) } static void test_pack_LPHW_PROFILE_INFOW(void) { /* LPHW_PROFILE_INFOW */ - TEST_TYPE(LPHW_PROFILE_INFOW, 4, 4); - TEST_TYPE_POINTER(LPHW_PROFILE_INFOW, 244, 4); + TEST_TYPE_SIZE (LPHW_PROFILE_INFOW, 4) + TEST_TYPE_ALIGN (LPHW_PROFILE_INFOW, 4) + TEST_TARGET_SIZE (LPHW_PROFILE_INFOW, 244) + TEST_TARGET_ALIGN(LPHW_PROFILE_INFOW, 4) } static void test_pack_LPMEMORYSTATUS(void) { /* LPMEMORYSTATUS */ - TEST_TYPE(LPMEMORYSTATUS, 4, 4); - TEST_TYPE_POINTER(LPMEMORYSTATUS, 32, 4); + TEST_TYPE_SIZE (LPMEMORYSTATUS, 4) + TEST_TYPE_ALIGN (LPMEMORYSTATUS, 4) + TEST_TARGET_SIZE (LPMEMORYSTATUS, 32) + TEST_TARGET_ALIGN(LPMEMORYSTATUS, 4) } static void test_pack_LPMEMORYSTATUSEX(void) { /* LPMEMORYSTATUSEX */ - TEST_TYPE(LPMEMORYSTATUSEX, 4, 4); - TEST_TYPE_POINTER(LPMEMORYSTATUSEX, 64, 8); + TEST_TYPE_SIZE (LPMEMORYSTATUSEX, 4) + TEST_TYPE_ALIGN (LPMEMORYSTATUSEX, 4) + TEST_TARGET_SIZE (LPMEMORYSTATUSEX, 64) + TEST_TARGET_ALIGN(LPMEMORYSTATUSEX, 8) } static void test_pack_LPOFSTRUCT(void) { /* LPOFSTRUCT */ - TEST_TYPE(LPOFSTRUCT, 4, 4); - TEST_TYPE_POINTER(LPOFSTRUCT, 136, 2); + TEST_TYPE_SIZE (LPOFSTRUCT, 4) + TEST_TYPE_ALIGN (LPOFSTRUCT, 4) + TEST_TARGET_SIZE (LPOFSTRUCT, 136) + TEST_TARGET_ALIGN(LPOFSTRUCT, 2) } static void test_pack_LPOVERLAPPED(void) { /* LPOVERLAPPED */ - TEST_TYPE(LPOVERLAPPED, 4, 4); + TEST_TYPE_SIZE (LPOVERLAPPED, 4) + TEST_TYPE_ALIGN (LPOVERLAPPED, 4) } static void test_pack_LPOVERLAPPED_COMPLETION_ROUTINE(void) { /* LPOVERLAPPED_COMPLETION_ROUTINE */ - TEST_TYPE(LPOVERLAPPED_COMPLETION_ROUTINE, 4, 4); + TEST_TYPE_SIZE (LPOVERLAPPED_COMPLETION_ROUTINE, 4) + TEST_TYPE_ALIGN (LPOVERLAPPED_COMPLETION_ROUTINE, 4) } static void test_pack_LPPROCESS_HEAP_ENTRY(void) { /* LPPROCESS_HEAP_ENTRY */ - TEST_TYPE(LPPROCESS_HEAP_ENTRY, 4, 4); + TEST_TYPE_SIZE (LPPROCESS_HEAP_ENTRY, 4) + TEST_TYPE_ALIGN (LPPROCESS_HEAP_ENTRY, 4) } static void test_pack_LPPROCESS_INFORMATION(void) { /* LPPROCESS_INFORMATION */ - TEST_TYPE(LPPROCESS_INFORMATION, 4, 4); - TEST_TYPE_POINTER(LPPROCESS_INFORMATION, 16, 4); + TEST_TYPE_SIZE (LPPROCESS_INFORMATION, 4) + TEST_TYPE_ALIGN (LPPROCESS_INFORMATION, 4) + TEST_TARGET_SIZE (LPPROCESS_INFORMATION, 16) + TEST_TARGET_ALIGN(LPPROCESS_INFORMATION, 4) } static void test_pack_LPPROGRESS_ROUTINE(void) { /* LPPROGRESS_ROUTINE */ - TEST_TYPE(LPPROGRESS_ROUTINE, 4, 4); + TEST_TYPE_SIZE (LPPROGRESS_ROUTINE, 4) + TEST_TYPE_ALIGN (LPPROGRESS_ROUTINE, 4) } static void test_pack_LPSECURITY_ATTRIBUTES(void) { /* LPSECURITY_ATTRIBUTES */ - TEST_TYPE(LPSECURITY_ATTRIBUTES, 4, 4); - TEST_TYPE_POINTER(LPSECURITY_ATTRIBUTES, 12, 4); + TEST_TYPE_SIZE (LPSECURITY_ATTRIBUTES, 4) + TEST_TYPE_ALIGN (LPSECURITY_ATTRIBUTES, 4) + TEST_TARGET_SIZE (LPSECURITY_ATTRIBUTES, 12) + TEST_TARGET_ALIGN(LPSECURITY_ATTRIBUTES, 4) } static void test_pack_LPSTARTUPINFOA(void) { /* LPSTARTUPINFOA */ - TEST_TYPE(LPSTARTUPINFOA, 4, 4); - TEST_TYPE_POINTER(LPSTARTUPINFOA, 68, 4); + TEST_TYPE_SIZE (LPSTARTUPINFOA, 4) + TEST_TYPE_ALIGN (LPSTARTUPINFOA, 4) + TEST_TARGET_SIZE (LPSTARTUPINFOA, 68) + TEST_TARGET_ALIGN(LPSTARTUPINFOA, 4) } static void test_pack_LPSTARTUPINFOW(void) { /* LPSTARTUPINFOW */ - TEST_TYPE(LPSTARTUPINFOW, 4, 4); - TEST_TYPE_POINTER(LPSTARTUPINFOW, 68, 4); + TEST_TYPE_SIZE (LPSTARTUPINFOW, 4) + TEST_TYPE_ALIGN (LPSTARTUPINFOW, 4) + TEST_TARGET_SIZE (LPSTARTUPINFOW, 68) + TEST_TARGET_ALIGN(LPSTARTUPINFOW, 4) } static void test_pack_LPSYSTEMTIME(void) { /* LPSYSTEMTIME */ - TEST_TYPE(LPSYSTEMTIME, 4, 4); - TEST_TYPE_POINTER(LPSYSTEMTIME, 16, 2); + TEST_TYPE_SIZE (LPSYSTEMTIME, 4) + TEST_TYPE_ALIGN (LPSYSTEMTIME, 4) + TEST_TARGET_SIZE (LPSYSTEMTIME, 16) + TEST_TARGET_ALIGN(LPSYSTEMTIME, 2) } static void test_pack_LPSYSTEM_INFO(void) { /* LPSYSTEM_INFO */ - TEST_TYPE(LPSYSTEM_INFO, 4, 4); + TEST_TYPE_SIZE (LPSYSTEM_INFO, 4) + TEST_TYPE_ALIGN (LPSYSTEM_INFO, 4) } static void test_pack_LPSYSTEM_POWER_STATUS(void) { /* LPSYSTEM_POWER_STATUS */ - TEST_TYPE(LPSYSTEM_POWER_STATUS, 4, 4); - TEST_TYPE_POINTER(LPSYSTEM_POWER_STATUS, 12, 4); + TEST_TYPE_SIZE (LPSYSTEM_POWER_STATUS, 4) + TEST_TYPE_ALIGN (LPSYSTEM_POWER_STATUS, 4) + TEST_TARGET_SIZE (LPSYSTEM_POWER_STATUS, 12) + TEST_TARGET_ALIGN(LPSYSTEM_POWER_STATUS, 4) } static void test_pack_LPTHREAD_START_ROUTINE(void) { /* LPTHREAD_START_ROUTINE */ - TEST_TYPE(LPTHREAD_START_ROUTINE, 4, 4); + TEST_TYPE_SIZE (LPTHREAD_START_ROUTINE, 4) + TEST_TYPE_ALIGN (LPTHREAD_START_ROUTINE, 4) } static void test_pack_LPTIME_ZONE_INFORMATION(void) { /* LPTIME_ZONE_INFORMATION */ - TEST_TYPE(LPTIME_ZONE_INFORMATION, 4, 4); - TEST_TYPE_POINTER(LPTIME_ZONE_INFORMATION, 172, 4); + TEST_TYPE_SIZE (LPTIME_ZONE_INFORMATION, 4) + TEST_TYPE_ALIGN (LPTIME_ZONE_INFORMATION, 4) + TEST_TARGET_SIZE (LPTIME_ZONE_INFORMATION, 172) + TEST_TARGET_ALIGN(LPTIME_ZONE_INFORMATION, 4) } static void test_pack_LPWIN32_FILE_ATTRIBUTE_DATA(void) { /* LPWIN32_FILE_ATTRIBUTE_DATA */ - TEST_TYPE(LPWIN32_FILE_ATTRIBUTE_DATA, 4, 4); - TEST_TYPE_POINTER(LPWIN32_FILE_ATTRIBUTE_DATA, 36, 4); + TEST_TYPE_SIZE (LPWIN32_FILE_ATTRIBUTE_DATA, 4) + TEST_TYPE_ALIGN (LPWIN32_FILE_ATTRIBUTE_DATA, 4) + TEST_TARGET_SIZE (LPWIN32_FILE_ATTRIBUTE_DATA, 36) + TEST_TARGET_ALIGN(LPWIN32_FILE_ATTRIBUTE_DATA, 4) } static void test_pack_LPWIN32_FIND_DATAA(void) { /* LPWIN32_FIND_DATAA */ - TEST_TYPE(LPWIN32_FIND_DATAA, 4, 4); - TEST_TYPE_POINTER(LPWIN32_FIND_DATAA, 320, 4); + TEST_TYPE_SIZE (LPWIN32_FIND_DATAA, 4) + TEST_TYPE_ALIGN (LPWIN32_FIND_DATAA, 4) + TEST_TARGET_SIZE (LPWIN32_FIND_DATAA, 320) + TEST_TARGET_ALIGN(LPWIN32_FIND_DATAA, 4) } static void test_pack_LPWIN32_FIND_DATAW(void) { /* LPWIN32_FIND_DATAW */ - TEST_TYPE(LPWIN32_FIND_DATAW, 4, 4); - TEST_TYPE_POINTER(LPWIN32_FIND_DATAW, 592, 4); + TEST_TYPE_SIZE (LPWIN32_FIND_DATAW, 4) + TEST_TYPE_ALIGN (LPWIN32_FIND_DATAW, 4) + TEST_TARGET_SIZE (LPWIN32_FIND_DATAW, 592) + TEST_TARGET_ALIGN(LPWIN32_FIND_DATAW, 4) } static void test_pack_LPWIN32_STREAM_ID(void) { /* LPWIN32_STREAM_ID */ - TEST_TYPE(LPWIN32_STREAM_ID, 4, 4); - TEST_TYPE_POINTER(LPWIN32_STREAM_ID, 24, 8); + TEST_TYPE_SIZE (LPWIN32_STREAM_ID, 4) + TEST_TYPE_ALIGN (LPWIN32_STREAM_ID, 4) + TEST_TARGET_SIZE (LPWIN32_STREAM_ID, 24) + TEST_TARGET_ALIGN(LPWIN32_STREAM_ID, 8) } static void test_pack_MEMORYSTATUS(void) { /* MEMORYSTATUS (pack 4) */ - TEST_TYPE(MEMORYSTATUS, 32, 4); - TEST_FIELD(MEMORYSTATUS, dwLength, 0, 4, 4); - TEST_FIELD(MEMORYSTATUS, dwMemoryLoad, 4, 4, 4); - TEST_FIELD(MEMORYSTATUS, dwTotalPhys, 8, 4, 4); - TEST_FIELD(MEMORYSTATUS, dwAvailPhys, 12, 4, 4); - TEST_FIELD(MEMORYSTATUS, dwTotalPageFile, 16, 4, 4); - TEST_FIELD(MEMORYSTATUS, dwAvailPageFile, 20, 4, 4); - TEST_FIELD(MEMORYSTATUS, dwTotalVirtual, 24, 4, 4); - TEST_FIELD(MEMORYSTATUS, dwAvailVirtual, 28, 4, 4); + TEST_TYPE_SIZE (MEMORYSTATUS, 32) + TEST_TYPE_ALIGN (MEMORYSTATUS, 4) + TEST_FIELD_SIZE (MEMORYSTATUS, dwLength, 4) + TEST_FIELD_ALIGN (MEMORYSTATUS, dwLength, 4) + TEST_FIELD_OFFSET(MEMORYSTATUS, dwLength, 0) + TEST_FIELD_SIZE (MEMORYSTATUS, dwMemoryLoad, 4) + TEST_FIELD_ALIGN (MEMORYSTATUS, dwMemoryLoad, 4) + TEST_FIELD_OFFSET(MEMORYSTATUS, dwMemoryLoad, 4) + TEST_FIELD_SIZE (MEMORYSTATUS, dwTotalPhys, 4) + TEST_FIELD_ALIGN (MEMORYSTATUS, dwTotalPhys, 4) + TEST_FIELD_OFFSET(MEMORYSTATUS, dwTotalPhys, 8) + TEST_FIELD_SIZE (MEMORYSTATUS, dwAvailPhys, 4) + TEST_FIELD_ALIGN (MEMORYSTATUS, dwAvailPhys, 4) + TEST_FIELD_OFFSET(MEMORYSTATUS, dwAvailPhys, 12) + TEST_FIELD_SIZE (MEMORYSTATUS, dwTotalPageFile, 4) + TEST_FIELD_ALIGN (MEMORYSTATUS, dwTotalPageFile, 4) + TEST_FIELD_OFFSET(MEMORYSTATUS, dwTotalPageFile, 16) + TEST_FIELD_SIZE (MEMORYSTATUS, dwAvailPageFile, 4) + TEST_FIELD_ALIGN (MEMORYSTATUS, dwAvailPageFile, 4) + TEST_FIELD_OFFSET(MEMORYSTATUS, dwAvailPageFile, 20) + TEST_FIELD_SIZE (MEMORYSTATUS, dwTotalVirtual, 4) + TEST_FIELD_ALIGN (MEMORYSTATUS, dwTotalVirtual, 4) + TEST_FIELD_OFFSET(MEMORYSTATUS, dwTotalVirtual, 24) + TEST_FIELD_SIZE (MEMORYSTATUS, dwAvailVirtual, 4) + TEST_FIELD_ALIGN (MEMORYSTATUS, dwAvailVirtual, 4) + TEST_FIELD_OFFSET(MEMORYSTATUS, dwAvailVirtual, 28) } static void test_pack_MEMORYSTATUSEX(void) { /* MEMORYSTATUSEX (pack 8) */ - TEST_TYPE(MEMORYSTATUSEX, 64, 8); - TEST_FIELD(MEMORYSTATUSEX, dwLength, 0, 4, 4); - TEST_FIELD(MEMORYSTATUSEX, dwMemoryLoad, 4, 4, 4); - TEST_FIELD(MEMORYSTATUSEX, ullTotalPhys, 8, 8, 8); - TEST_FIELD(MEMORYSTATUSEX, ullAvailPhys, 16, 8, 8); - TEST_FIELD(MEMORYSTATUSEX, ullTotalPageFile, 24, 8, 8); - TEST_FIELD(MEMORYSTATUSEX, ullAvailPageFile, 32, 8, 8); - TEST_FIELD(MEMORYSTATUSEX, ullTotalVirtual, 40, 8, 8); - TEST_FIELD(MEMORYSTATUSEX, ullAvailVirtual, 48, 8, 8); - TEST_FIELD(MEMORYSTATUSEX, ullAvailExtendedVirtual, 56, 8, 8); + TEST_TYPE_SIZE (MEMORYSTATUSEX, 64) + TEST_TYPE_ALIGN (MEMORYSTATUSEX, 8) + TEST_FIELD_SIZE (MEMORYSTATUSEX, dwLength, 4) + TEST_FIELD_ALIGN (MEMORYSTATUSEX, dwLength, 4) + TEST_FIELD_OFFSET(MEMORYSTATUSEX, dwLength, 0) + TEST_FIELD_SIZE (MEMORYSTATUSEX, dwMemoryLoad, 4) + TEST_FIELD_ALIGN (MEMORYSTATUSEX, dwMemoryLoad, 4) + TEST_FIELD_OFFSET(MEMORYSTATUSEX, dwMemoryLoad, 4) + TEST_FIELD_SIZE (MEMORYSTATUSEX, ullTotalPhys, 8) + TEST_FIELD_ALIGN (MEMORYSTATUSEX, ullTotalPhys, 8) + TEST_FIELD_OFFSET(MEMORYSTATUSEX, ullTotalPhys, 8) + TEST_FIELD_SIZE (MEMORYSTATUSEX, ullAvailPhys, 8) + TEST_FIELD_ALIGN (MEMORYSTATUSEX, ullAvailPhys, 8) + TEST_FIELD_OFFSET(MEMORYSTATUSEX, ullAvailPhys, 16) + TEST_FIELD_SIZE (MEMORYSTATUSEX, ullTotalPageFile, 8) + TEST_FIELD_ALIGN (MEMORYSTATUSEX, ullTotalPageFile, 8) + TEST_FIELD_OFFSET(MEMORYSTATUSEX, ullTotalPageFile, 24) + TEST_FIELD_SIZE (MEMORYSTATUSEX, ullAvailPageFile, 8) + TEST_FIELD_ALIGN (MEMORYSTATUSEX, ullAvailPageFile, 8) + TEST_FIELD_OFFSET(MEMORYSTATUSEX, ullAvailPageFile, 32) + TEST_FIELD_SIZE (MEMORYSTATUSEX, ullTotalVirtual, 8) + TEST_FIELD_ALIGN (MEMORYSTATUSEX, ullTotalVirtual, 8) + TEST_FIELD_OFFSET(MEMORYSTATUSEX, ullTotalVirtual, 40) + TEST_FIELD_SIZE (MEMORYSTATUSEX, ullAvailVirtual, 8) + TEST_FIELD_ALIGN (MEMORYSTATUSEX, ullAvailVirtual, 8) + TEST_FIELD_OFFSET(MEMORYSTATUSEX, ullAvailVirtual, 48) + TEST_FIELD_SIZE (MEMORYSTATUSEX, ullAvailExtendedVirtual, 8) + TEST_FIELD_ALIGN (MEMORYSTATUSEX, ullAvailExtendedVirtual, 8) + TEST_FIELD_OFFSET(MEMORYSTATUSEX, ullAvailExtendedVirtual, 56) } static void test_pack_OFSTRUCT(void) { /* OFSTRUCT (pack 4) */ - TEST_TYPE(OFSTRUCT, 136, 2); - TEST_FIELD(OFSTRUCT, cBytes, 0, 1, 1); - TEST_FIELD(OFSTRUCT, fFixedDisk, 1, 1, 1); - TEST_FIELD(OFSTRUCT, nErrCode, 2, 2, 2); - TEST_FIELD(OFSTRUCT, Reserved1, 4, 2, 2); - TEST_FIELD(OFSTRUCT, Reserved2, 6, 2, 2); - TEST_FIELD(OFSTRUCT, szPathName, 8, 128, 1); + TEST_TYPE_SIZE (OFSTRUCT, 136) + TEST_TYPE_ALIGN (OFSTRUCT, 2) + TEST_FIELD_SIZE (OFSTRUCT, cBytes, 1) + TEST_FIELD_ALIGN (OFSTRUCT, cBytes, 1) + TEST_FIELD_OFFSET(OFSTRUCT, cBytes, 0) + TEST_FIELD_SIZE (OFSTRUCT, fFixedDisk, 1) + TEST_FIELD_ALIGN (OFSTRUCT, fFixedDisk, 1) + TEST_FIELD_OFFSET(OFSTRUCT, fFixedDisk, 1) + TEST_FIELD_SIZE (OFSTRUCT, nErrCode, 2) + TEST_FIELD_ALIGN (OFSTRUCT, nErrCode, 2) + TEST_FIELD_OFFSET(OFSTRUCT, nErrCode, 2) + TEST_FIELD_SIZE (OFSTRUCT, Reserved1, 2) + TEST_FIELD_ALIGN (OFSTRUCT, Reserved1, 2) + TEST_FIELD_OFFSET(OFSTRUCT, Reserved1, 4) + TEST_FIELD_SIZE (OFSTRUCT, Reserved2, 2) + TEST_FIELD_ALIGN (OFSTRUCT, Reserved2, 2) + TEST_FIELD_OFFSET(OFSTRUCT, Reserved2, 6) + TEST_FIELD_SIZE (OFSTRUCT, szPathName, 128) + TEST_FIELD_ALIGN (OFSTRUCT, szPathName, 1) + TEST_FIELD_OFFSET(OFSTRUCT, szPathName, 8) } static void test_pack_OUTPUT_DEBUG_STRING_INFO(void) { /* OUTPUT_DEBUG_STRING_INFO (pack 4) */ - TEST_TYPE(OUTPUT_DEBUG_STRING_INFO, 8, 4); - TEST_FIELD(OUTPUT_DEBUG_STRING_INFO, lpDebugStringData, 0, 4, 4); - TEST_FIELD(OUTPUT_DEBUG_STRING_INFO, fUnicode, 4, 2, 2); - TEST_FIELD(OUTPUT_DEBUG_STRING_INFO, nDebugStringLength, 6, 2, 2); + TEST_TYPE_SIZE (OUTPUT_DEBUG_STRING_INFO, 8) + TEST_TYPE_ALIGN (OUTPUT_DEBUG_STRING_INFO, 4) + TEST_FIELD_SIZE (OUTPUT_DEBUG_STRING_INFO, lpDebugStringData, 4) + TEST_FIELD_ALIGN (OUTPUT_DEBUG_STRING_INFO, lpDebugStringData, 4) + TEST_FIELD_OFFSET(OUTPUT_DEBUG_STRING_INFO, lpDebugStringData, 0) + TEST_FIELD_SIZE (OUTPUT_DEBUG_STRING_INFO, fUnicode, 2) + TEST_FIELD_ALIGN (OUTPUT_DEBUG_STRING_INFO, fUnicode, 2) + TEST_FIELD_OFFSET(OUTPUT_DEBUG_STRING_INFO, fUnicode, 4) + TEST_FIELD_SIZE (OUTPUT_DEBUG_STRING_INFO, nDebugStringLength, 2) + TEST_FIELD_ALIGN (OUTPUT_DEBUG_STRING_INFO, nDebugStringLength, 2) + TEST_FIELD_OFFSET(OUTPUT_DEBUG_STRING_INFO, nDebugStringLength, 6) } static void test_pack_PACTCTXA(void) { /* PACTCTXA */ - TEST_TYPE(PACTCTXA, 4, 4); - TEST_TYPE_POINTER(PACTCTXA, 32, 4); + TEST_TYPE_SIZE (PACTCTXA, 4) + TEST_TYPE_ALIGN (PACTCTXA, 4) + TEST_TARGET_SIZE (PACTCTXA, 32) + TEST_TARGET_ALIGN(PACTCTXA, 4) } static void test_pack_PACTCTXW(void) { /* PACTCTXW */ - TEST_TYPE(PACTCTXW, 4, 4); - TEST_TYPE_POINTER(PACTCTXW, 32, 4); + TEST_TYPE_SIZE (PACTCTXW, 4) + TEST_TYPE_ALIGN (PACTCTXW, 4) + TEST_TARGET_SIZE (PACTCTXW, 32) + TEST_TARGET_ALIGN(PACTCTXW, 4) } static void test_pack_PACTCTX_SECTION_KEYED_DATA(void) { /* PACTCTX_SECTION_KEYED_DATA */ - TEST_TYPE(PACTCTX_SECTION_KEYED_DATA, 4, 4); - TEST_TYPE_POINTER(PACTCTX_SECTION_KEYED_DATA, 64, 4); + TEST_TYPE_SIZE (PACTCTX_SECTION_KEYED_DATA, 4) + TEST_TYPE_ALIGN (PACTCTX_SECTION_KEYED_DATA, 4) + TEST_TARGET_SIZE (PACTCTX_SECTION_KEYED_DATA, 64) + TEST_TARGET_ALIGN(PACTCTX_SECTION_KEYED_DATA, 4) } static void test_pack_PACTCTX_SECTION_KEYED_DATA_2600(void) { /* PACTCTX_SECTION_KEYED_DATA_2600 */ - TEST_TYPE(PACTCTX_SECTION_KEYED_DATA_2600, 4, 4); - TEST_TYPE_POINTER(PACTCTX_SECTION_KEYED_DATA_2600, 40, 4); + TEST_TYPE_SIZE (PACTCTX_SECTION_KEYED_DATA_2600, 4) + TEST_TYPE_ALIGN (PACTCTX_SECTION_KEYED_DATA_2600, 4) + TEST_TARGET_SIZE (PACTCTX_SECTION_KEYED_DATA_2600, 40) + TEST_TARGET_ALIGN(PACTCTX_SECTION_KEYED_DATA_2600, 4) } static void test_pack_PACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA(void) { /* PACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA */ - TEST_TYPE(PACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, 4, 4); - TEST_TYPE_POINTER(PACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, 20, 4); + TEST_TYPE_SIZE (PACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, 4) + TEST_TYPE_ALIGN (PACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, 4) + TEST_TARGET_SIZE (PACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, 20) + TEST_TARGET_ALIGN(PACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, 4) } static void test_pack_PACTIVATION_CONTEXT_BASIC_INFORMATION(void) { /* PACTIVATION_CONTEXT_BASIC_INFORMATION */ - TEST_TYPE(PACTIVATION_CONTEXT_BASIC_INFORMATION, 4, 4); - TEST_TYPE_POINTER(PACTIVATION_CONTEXT_BASIC_INFORMATION, 8, 4); + TEST_TYPE_SIZE (PACTIVATION_CONTEXT_BASIC_INFORMATION, 4) + TEST_TYPE_ALIGN (PACTIVATION_CONTEXT_BASIC_INFORMATION, 4) + TEST_TARGET_SIZE (PACTIVATION_CONTEXT_BASIC_INFORMATION, 8) + TEST_TARGET_ALIGN(PACTIVATION_CONTEXT_BASIC_INFORMATION, 4) } static void test_pack_PAPCFUNC(void) { /* PAPCFUNC */ - TEST_TYPE(PAPCFUNC, 4, 4); + TEST_TYPE_SIZE (PAPCFUNC, 4) + TEST_TYPE_ALIGN (PAPCFUNC, 4) } static void test_pack_PBY_HANDLE_FILE_INFORMATION(void) { /* PBY_HANDLE_FILE_INFORMATION */ - TEST_TYPE(PBY_HANDLE_FILE_INFORMATION, 4, 4); - TEST_TYPE_POINTER(PBY_HANDLE_FILE_INFORMATION, 52, 4); + TEST_TYPE_SIZE (PBY_HANDLE_FILE_INFORMATION, 4) + TEST_TYPE_ALIGN (PBY_HANDLE_FILE_INFORMATION, 4) + TEST_TARGET_SIZE (PBY_HANDLE_FILE_INFORMATION, 52) + TEST_TARGET_ALIGN(PBY_HANDLE_FILE_INFORMATION, 4) } static void test_pack_PCACTCTXA(void) { /* PCACTCTXA */ - TEST_TYPE(PCACTCTXA, 4, 4); - TEST_TYPE_POINTER(PCACTCTXA, 32, 4); + TEST_TYPE_SIZE (PCACTCTXA, 4) + TEST_TYPE_ALIGN (PCACTCTXA, 4) + TEST_TARGET_SIZE (PCACTCTXA, 32) + TEST_TARGET_ALIGN(PCACTCTXA, 4) } static void test_pack_PCACTCTXW(void) { /* PCACTCTXW */ - TEST_TYPE(PCACTCTXW, 4, 4); - TEST_TYPE_POINTER(PCACTCTXW, 32, 4); + TEST_TYPE_SIZE (PCACTCTXW, 4) + TEST_TYPE_ALIGN (PCACTCTXW, 4) + TEST_TARGET_SIZE (PCACTCTXW, 32) + TEST_TARGET_ALIGN(PCACTCTXW, 4) } static void test_pack_PCACTCTX_SECTION_KEYED_DATA(void) { /* PCACTCTX_SECTION_KEYED_DATA */ - TEST_TYPE(PCACTCTX_SECTION_KEYED_DATA, 4, 4); - TEST_TYPE_POINTER(PCACTCTX_SECTION_KEYED_DATA, 64, 4); + TEST_TYPE_SIZE (PCACTCTX_SECTION_KEYED_DATA, 4) + TEST_TYPE_ALIGN (PCACTCTX_SECTION_KEYED_DATA, 4) + TEST_TARGET_SIZE (PCACTCTX_SECTION_KEYED_DATA, 64) + TEST_TARGET_ALIGN(PCACTCTX_SECTION_KEYED_DATA, 4) } static void test_pack_PCACTCTX_SECTION_KEYED_DATA_2600(void) { /* PCACTCTX_SECTION_KEYED_DATA_2600 */ - TEST_TYPE(PCACTCTX_SECTION_KEYED_DATA_2600, 4, 4); - TEST_TYPE_POINTER(PCACTCTX_SECTION_KEYED_DATA_2600, 40, 4); + TEST_TYPE_SIZE (PCACTCTX_SECTION_KEYED_DATA_2600, 4) + TEST_TYPE_ALIGN (PCACTCTX_SECTION_KEYED_DATA_2600, 4) + TEST_TARGET_SIZE (PCACTCTX_SECTION_KEYED_DATA_2600, 40) + TEST_TARGET_ALIGN(PCACTCTX_SECTION_KEYED_DATA_2600, 4) } static void test_pack_PCACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA(void) { /* PCACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA */ - TEST_TYPE(PCACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, 4, 4); - TEST_TYPE_POINTER(PCACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, 20, 4); + TEST_TYPE_SIZE (PCACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, 4) + TEST_TYPE_ALIGN (PCACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, 4) + TEST_TARGET_SIZE (PCACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, 20) + TEST_TARGET_ALIGN(PCACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, 4) } static void test_pack_PCRITICAL_SECTION(void) { /* PCRITICAL_SECTION */ - TEST_TYPE(PCRITICAL_SECTION, 4, 4); + TEST_TYPE_SIZE (PCRITICAL_SECTION, 4) + TEST_TYPE_ALIGN (PCRITICAL_SECTION, 4) } static void test_pack_PCRITICAL_SECTION_DEBUG(void) { /* PCRITICAL_SECTION_DEBUG */ - TEST_TYPE(PCRITICAL_SECTION_DEBUG, 4, 4); + TEST_TYPE_SIZE (PCRITICAL_SECTION_DEBUG, 4) + TEST_TYPE_ALIGN (PCRITICAL_SECTION_DEBUG, 4) } static void test_pack_PFIBER_START_ROUTINE(void) { /* PFIBER_START_ROUTINE */ - TEST_TYPE(PFIBER_START_ROUTINE, 4, 4); + TEST_TYPE_SIZE (PFIBER_START_ROUTINE, 4) + TEST_TYPE_ALIGN (PFIBER_START_ROUTINE, 4) } static void test_pack_POFSTRUCT(void) { /* POFSTRUCT */ - TEST_TYPE(POFSTRUCT, 4, 4); - TEST_TYPE_POINTER(POFSTRUCT, 136, 2); + TEST_TYPE_SIZE (POFSTRUCT, 4) + TEST_TYPE_ALIGN (POFSTRUCT, 4) + TEST_TARGET_SIZE (POFSTRUCT, 136) + TEST_TARGET_ALIGN(POFSTRUCT, 2) } static void test_pack_PPROCESS_HEAP_ENTRY(void) { /* PPROCESS_HEAP_ENTRY */ - TEST_TYPE(PPROCESS_HEAP_ENTRY, 4, 4); + TEST_TYPE_SIZE (PPROCESS_HEAP_ENTRY, 4) + TEST_TYPE_ALIGN (PPROCESS_HEAP_ENTRY, 4) } static void test_pack_PPROCESS_INFORMATION(void) { /* PPROCESS_INFORMATION */ - TEST_TYPE(PPROCESS_INFORMATION, 4, 4); - TEST_TYPE_POINTER(PPROCESS_INFORMATION, 16, 4); + TEST_TYPE_SIZE (PPROCESS_INFORMATION, 4) + TEST_TYPE_ALIGN (PPROCESS_INFORMATION, 4) + TEST_TARGET_SIZE (PPROCESS_INFORMATION, 16) + TEST_TARGET_ALIGN(PPROCESS_INFORMATION, 4) } static void test_pack_PQUERYACTCTXW_FUNC(void) { /* PQUERYACTCTXW_FUNC */ - TEST_TYPE(PQUERYACTCTXW_FUNC, 4, 4); + TEST_TYPE_SIZE (PQUERYACTCTXW_FUNC, 4) + TEST_TYPE_ALIGN (PQUERYACTCTXW_FUNC, 4) } static void test_pack_PROCESS_HEAP_ENTRY(void) { /* PROCESS_HEAP_ENTRY (pack 4) */ - TEST_FIELD(PROCESS_HEAP_ENTRY, lpData, 0, 4, 4); - TEST_FIELD(PROCESS_HEAP_ENTRY, cbData, 4, 4, 4); - TEST_FIELD(PROCESS_HEAP_ENTRY, cbOverhead, 8, 1, 1); - TEST_FIELD(PROCESS_HEAP_ENTRY, iRegionIndex, 9, 1, 1); - TEST_FIELD(PROCESS_HEAP_ENTRY, wFlags, 10, 2, 2); + TEST_FIELD_SIZE (PROCESS_HEAP_ENTRY, lpData, 4) + TEST_FIELD_ALIGN (PROCESS_HEAP_ENTRY, lpData, 4) + TEST_FIELD_OFFSET(PROCESS_HEAP_ENTRY, lpData, 0) + TEST_FIELD_SIZE (PROCESS_HEAP_ENTRY, cbData, 4) + TEST_FIELD_ALIGN (PROCESS_HEAP_ENTRY, cbData, 4) + TEST_FIELD_OFFSET(PROCESS_HEAP_ENTRY, cbData, 4) + TEST_FIELD_SIZE (PROCESS_HEAP_ENTRY, cbOverhead, 1) + TEST_FIELD_ALIGN (PROCESS_HEAP_ENTRY, cbOverhead, 1) + TEST_FIELD_OFFSET(PROCESS_HEAP_ENTRY, cbOverhead, 8) + TEST_FIELD_SIZE (PROCESS_HEAP_ENTRY, iRegionIndex, 1) + TEST_FIELD_ALIGN (PROCESS_HEAP_ENTRY, iRegionIndex, 1) + TEST_FIELD_OFFSET(PROCESS_HEAP_ENTRY, iRegionIndex, 9) + TEST_FIELD_SIZE (PROCESS_HEAP_ENTRY, wFlags, 2) + TEST_FIELD_ALIGN (PROCESS_HEAP_ENTRY, wFlags, 2) + TEST_FIELD_OFFSET(PROCESS_HEAP_ENTRY, wFlags, 10) } static void test_pack_PROCESS_INFORMATION(void) { /* PROCESS_INFORMATION (pack 4) */ - TEST_TYPE(PROCESS_INFORMATION, 16, 4); - TEST_FIELD(PROCESS_INFORMATION, hProcess, 0, 4, 4); - TEST_FIELD(PROCESS_INFORMATION, hThread, 4, 4, 4); - TEST_FIELD(PROCESS_INFORMATION, dwProcessId, 8, 4, 4); - TEST_FIELD(PROCESS_INFORMATION, dwThreadId, 12, 4, 4); + TEST_TYPE_SIZE (PROCESS_INFORMATION, 16) + TEST_TYPE_ALIGN (PROCESS_INFORMATION, 4) + TEST_FIELD_SIZE (PROCESS_INFORMATION, hProcess, 4) + TEST_FIELD_ALIGN (PROCESS_INFORMATION, hProcess, 4) + TEST_FIELD_OFFSET(PROCESS_INFORMATION, hProcess, 0) + TEST_FIELD_SIZE (PROCESS_INFORMATION, hThread, 4) + TEST_FIELD_ALIGN (PROCESS_INFORMATION, hThread, 4) + TEST_FIELD_OFFSET(PROCESS_INFORMATION, hThread, 4) + TEST_FIELD_SIZE (PROCESS_INFORMATION, dwProcessId, 4) + TEST_FIELD_ALIGN (PROCESS_INFORMATION, dwProcessId, 4) + TEST_FIELD_OFFSET(PROCESS_INFORMATION, dwProcessId, 8) + TEST_FIELD_SIZE (PROCESS_INFORMATION, dwThreadId, 4) + TEST_FIELD_ALIGN (PROCESS_INFORMATION, dwThreadId, 4) + TEST_FIELD_OFFSET(PROCESS_INFORMATION, dwThreadId, 12) } static void test_pack_PSECURITY_ATTRIBUTES(void) { /* PSECURITY_ATTRIBUTES */ - TEST_TYPE(PSECURITY_ATTRIBUTES, 4, 4); - TEST_TYPE_POINTER(PSECURITY_ATTRIBUTES, 12, 4); + TEST_TYPE_SIZE (PSECURITY_ATTRIBUTES, 4) + TEST_TYPE_ALIGN (PSECURITY_ATTRIBUTES, 4) + TEST_TARGET_SIZE (PSECURITY_ATTRIBUTES, 12) + TEST_TARGET_ALIGN(PSECURITY_ATTRIBUTES, 4) } static void test_pack_PSYSTEMTIME(void) { /* PSYSTEMTIME */ - TEST_TYPE(PSYSTEMTIME, 4, 4); - TEST_TYPE_POINTER(PSYSTEMTIME, 16, 2); + TEST_TYPE_SIZE (PSYSTEMTIME, 4) + TEST_TYPE_ALIGN (PSYSTEMTIME, 4) + TEST_TARGET_SIZE (PSYSTEMTIME, 16) + TEST_TARGET_ALIGN(PSYSTEMTIME, 2) } static void test_pack_PTIMERAPCROUTINE(void) { /* PTIMERAPCROUTINE */ - TEST_TYPE(PTIMERAPCROUTINE, 4, 4); + TEST_TYPE_SIZE (PTIMERAPCROUTINE, 4) + TEST_TYPE_ALIGN (PTIMERAPCROUTINE, 4) } static void test_pack_PTIME_ZONE_INFORMATION(void) { /* PTIME_ZONE_INFORMATION */ - TEST_TYPE(PTIME_ZONE_INFORMATION, 4, 4); - TEST_TYPE_POINTER(PTIME_ZONE_INFORMATION, 172, 4); + TEST_TYPE_SIZE (PTIME_ZONE_INFORMATION, 4) + TEST_TYPE_ALIGN (PTIME_ZONE_INFORMATION, 4) + TEST_TARGET_SIZE (PTIME_ZONE_INFORMATION, 172) + TEST_TARGET_ALIGN(PTIME_ZONE_INFORMATION, 4) } static void test_pack_PWIN32_FIND_DATAA(void) { /* PWIN32_FIND_DATAA */ - TEST_TYPE(PWIN32_FIND_DATAA, 4, 4); - TEST_TYPE_POINTER(PWIN32_FIND_DATAA, 320, 4); + TEST_TYPE_SIZE (PWIN32_FIND_DATAA, 4) + TEST_TYPE_ALIGN (PWIN32_FIND_DATAA, 4) + TEST_TARGET_SIZE (PWIN32_FIND_DATAA, 320) + TEST_TARGET_ALIGN(PWIN32_FIND_DATAA, 4) } static void test_pack_PWIN32_FIND_DATAW(void) { /* PWIN32_FIND_DATAW */ - TEST_TYPE(PWIN32_FIND_DATAW, 4, 4); - TEST_TYPE_POINTER(PWIN32_FIND_DATAW, 592, 4); + TEST_TYPE_SIZE (PWIN32_FIND_DATAW, 4) + TEST_TYPE_ALIGN (PWIN32_FIND_DATAW, 4) + TEST_TARGET_SIZE (PWIN32_FIND_DATAW, 592) + TEST_TARGET_ALIGN(PWIN32_FIND_DATAW, 4) } static void test_pack_RIP_INFO(void) { /* RIP_INFO (pack 4) */ - TEST_TYPE(RIP_INFO, 8, 4); - TEST_FIELD(RIP_INFO, dwError, 0, 4, 4); - TEST_FIELD(RIP_INFO, dwType, 4, 4, 4); + TEST_TYPE_SIZE (RIP_INFO, 8) + TEST_TYPE_ALIGN (RIP_INFO, 4) + TEST_FIELD_SIZE (RIP_INFO, dwError, 4) + TEST_FIELD_ALIGN (RIP_INFO, dwError, 4) + TEST_FIELD_OFFSET(RIP_INFO, dwError, 0) + TEST_FIELD_SIZE (RIP_INFO, dwType, 4) + TEST_FIELD_ALIGN (RIP_INFO, dwType, 4) + TEST_FIELD_OFFSET(RIP_INFO, dwType, 4) } static void test_pack_SECURITY_ATTRIBUTES(void) { /* SECURITY_ATTRIBUTES (pack 4) */ - TEST_TYPE(SECURITY_ATTRIBUTES, 12, 4); - TEST_FIELD(SECURITY_ATTRIBUTES, nLength, 0, 4, 4); - TEST_FIELD(SECURITY_ATTRIBUTES, lpSecurityDescriptor, 4, 4, 4); - TEST_FIELD(SECURITY_ATTRIBUTES, bInheritHandle, 8, 4, 4); + TEST_TYPE_SIZE (SECURITY_ATTRIBUTES, 12) + TEST_TYPE_ALIGN (SECURITY_ATTRIBUTES, 4) + TEST_FIELD_SIZE (SECURITY_ATTRIBUTES, nLength, 4) + TEST_FIELD_ALIGN (SECURITY_ATTRIBUTES, nLength, 4) + TEST_FIELD_OFFSET(SECURITY_ATTRIBUTES, nLength, 0) + TEST_FIELD_SIZE (SECURITY_ATTRIBUTES, lpSecurityDescriptor, 4) + TEST_FIELD_ALIGN (SECURITY_ATTRIBUTES, lpSecurityDescriptor, 4) + TEST_FIELD_OFFSET(SECURITY_ATTRIBUTES, lpSecurityDescriptor, 4) + TEST_FIELD_SIZE (SECURITY_ATTRIBUTES, bInheritHandle, 4) + TEST_FIELD_ALIGN (SECURITY_ATTRIBUTES, bInheritHandle, 4) + TEST_FIELD_OFFSET(SECURITY_ATTRIBUTES, bInheritHandle, 8) } static void test_pack_STARTUPINFOA(void) { /* STARTUPINFOA (pack 4) */ - TEST_TYPE(STARTUPINFOA, 68, 4); - TEST_FIELD(STARTUPINFOA, cb, 0, 4, 4); - TEST_FIELD(STARTUPINFOA, lpReserved, 4, 4, 4); - TEST_FIELD(STARTUPINFOA, lpDesktop, 8, 4, 4); - TEST_FIELD(STARTUPINFOA, lpTitle, 12, 4, 4); - TEST_FIELD(STARTUPINFOA, dwX, 16, 4, 4); - TEST_FIELD(STARTUPINFOA, dwY, 20, 4, 4); - TEST_FIELD(STARTUPINFOA, dwXSize, 24, 4, 4); - TEST_FIELD(STARTUPINFOA, dwYSize, 28, 4, 4); - TEST_FIELD(STARTUPINFOA, dwXCountChars, 32, 4, 4); - TEST_FIELD(STARTUPINFOA, dwYCountChars, 36, 4, 4); - TEST_FIELD(STARTUPINFOA, dwFillAttribute, 40, 4, 4); - TEST_FIELD(STARTUPINFOA, dwFlags, 44, 4, 4); - TEST_FIELD(STARTUPINFOA, wShowWindow, 48, 2, 2); - TEST_FIELD(STARTUPINFOA, cbReserved2, 50, 2, 2); - TEST_FIELD(STARTUPINFOA, lpReserved2, 52, 4, 4); - TEST_FIELD(STARTUPINFOA, hStdInput, 56, 4, 4); - TEST_FIELD(STARTUPINFOA, hStdOutput, 60, 4, 4); - TEST_FIELD(STARTUPINFOA, hStdError, 64, 4, 4); + TEST_TYPE_SIZE (STARTUPINFOA, 68) + TEST_TYPE_ALIGN (STARTUPINFOA, 4) + TEST_FIELD_SIZE (STARTUPINFOA, cb, 4) + TEST_FIELD_ALIGN (STARTUPINFOA, cb, 4) + TEST_FIELD_OFFSET(STARTUPINFOA, cb, 0) + TEST_FIELD_SIZE (STARTUPINFOA, lpReserved, 4) + TEST_FIELD_ALIGN (STARTUPINFOA, lpReserved, 4) + TEST_FIELD_OFFSET(STARTUPINFOA, lpReserved, 4) + TEST_FIELD_SIZE (STARTUPINFOA, lpDesktop, 4) + TEST_FIELD_ALIGN (STARTUPINFOA, lpDesktop, 4) + TEST_FIELD_OFFSET(STARTUPINFOA, lpDesktop, 8) + TEST_FIELD_SIZE (STARTUPINFOA, lpTitle, 4) + TEST_FIELD_ALIGN (STARTUPINFOA, lpTitle, 4) + TEST_FIELD_OFFSET(STARTUPINFOA, lpTitle, 12) + TEST_FIELD_SIZE (STARTUPINFOA, dwX, 4) + TEST_FIELD_ALIGN (STARTUPINFOA, dwX, 4) + TEST_FIELD_OFFSET(STARTUPINFOA, dwX, 16) + TEST_FIELD_SIZE (STARTUPINFOA, dwY, 4) + TEST_FIELD_ALIGN (STARTUPINFOA, dwY, 4) + TEST_FIELD_OFFSET(STARTUPINFOA, dwY, 20) + TEST_FIELD_SIZE (STARTUPINFOA, dwXSize, 4) + TEST_FIELD_ALIGN (STARTUPINFOA, dwXSize, 4) + TEST_FIELD_OFFSET(STARTUPINFOA, dwXSize, 24) + TEST_FIELD_SIZE (STARTUPINFOA, dwYSize, 4) + TEST_FIELD_ALIGN (STARTUPINFOA, dwYSize, 4) + TEST_FIELD_OFFSET(STARTUPINFOA, dwYSize, 28) + TEST_FIELD_SIZE (STARTUPINFOA, dwXCountChars, 4) + TEST_FIELD_ALIGN (STARTUPINFOA, dwXCountChars, 4) + TEST_FIELD_OFFSET(STARTUPINFOA, dwXCountChars, 32) + TEST_FIELD_SIZE (STARTUPINFOA, dwYCountChars, 4) + TEST_FIELD_ALIGN (STARTUPINFOA, dwYCountChars, 4) + TEST_FIELD_OFFSET(STARTUPINFOA, dwYCountChars, 36) + TEST_FIELD_SIZE (STARTUPINFOA, dwFillAttribute, 4) + TEST_FIELD_ALIGN (STARTUPINFOA, dwFillAttribute, 4) + TEST_FIELD_OFFSET(STARTUPINFOA, dwFillAttribute, 40) + TEST_FIELD_SIZE (STARTUPINFOA, dwFlags, 4) + TEST_FIELD_ALIGN (STARTUPINFOA, dwFlags, 4) + TEST_FIELD_OFFSET(STARTUPINFOA, dwFlags, 44) + TEST_FIELD_SIZE (STARTUPINFOA, wShowWindow, 2) + TEST_FIELD_ALIGN (STARTUPINFOA, wShowWindow, 2) + TEST_FIELD_OFFSET(STARTUPINFOA, wShowWindow, 48) + TEST_FIELD_SIZE (STARTUPINFOA, cbReserved2, 2) + TEST_FIELD_ALIGN (STARTUPINFOA, cbReserved2, 2) + TEST_FIELD_OFFSET(STARTUPINFOA, cbReserved2, 50) + TEST_FIELD_SIZE (STARTUPINFOA, lpReserved2, 4) + TEST_FIELD_ALIGN (STARTUPINFOA, lpReserved2, 4) + TEST_FIELD_OFFSET(STARTUPINFOA, lpReserved2, 52) + TEST_FIELD_SIZE (STARTUPINFOA, hStdInput, 4) + TEST_FIELD_ALIGN (STARTUPINFOA, hStdInput, 4) + TEST_FIELD_OFFSET(STARTUPINFOA, hStdInput, 56) + TEST_FIELD_SIZE (STARTUPINFOA, hStdOutput, 4) + TEST_FIELD_ALIGN (STARTUPINFOA, hStdOutput, 4) + TEST_FIELD_OFFSET(STARTUPINFOA, hStdOutput, 60) + TEST_FIELD_SIZE (STARTUPINFOA, hStdError, 4) + TEST_FIELD_ALIGN (STARTUPINFOA, hStdError, 4) + TEST_FIELD_OFFSET(STARTUPINFOA, hStdError, 64) } static void test_pack_STARTUPINFOW(void) { /* STARTUPINFOW (pack 4) */ - TEST_TYPE(STARTUPINFOW, 68, 4); - TEST_FIELD(STARTUPINFOW, cb, 0, 4, 4); - TEST_FIELD(STARTUPINFOW, lpReserved, 4, 4, 4); - TEST_FIELD(STARTUPINFOW, lpDesktop, 8, 4, 4); - TEST_FIELD(STARTUPINFOW, lpTitle, 12, 4, 4); - TEST_FIELD(STARTUPINFOW, dwX, 16, 4, 4); - TEST_FIELD(STARTUPINFOW, dwY, 20, 4, 4); - TEST_FIELD(STARTUPINFOW, dwXSize, 24, 4, 4); - TEST_FIELD(STARTUPINFOW, dwYSize, 28, 4, 4); - TEST_FIELD(STARTUPINFOW, dwXCountChars, 32, 4, 4); - TEST_FIELD(STARTUPINFOW, dwYCountChars, 36, 4, 4); - TEST_FIELD(STARTUPINFOW, dwFillAttribute, 40, 4, 4); - TEST_FIELD(STARTUPINFOW, dwFlags, 44, 4, 4); - TEST_FIELD(STARTUPINFOW, wShowWindow, 48, 2, 2); - TEST_FIELD(STARTUPINFOW, cbReserved2, 50, 2, 2); - TEST_FIELD(STARTUPINFOW, lpReserved2, 52, 4, 4); - TEST_FIELD(STARTUPINFOW, hStdInput, 56, 4, 4); - TEST_FIELD(STARTUPINFOW, hStdOutput, 60, 4, 4); - TEST_FIELD(STARTUPINFOW, hStdError, 64, 4, 4); + TEST_TYPE_SIZE (STARTUPINFOW, 68) + TEST_TYPE_ALIGN (STARTUPINFOW, 4) + TEST_FIELD_SIZE (STARTUPINFOW, cb, 4) + TEST_FIELD_ALIGN (STARTUPINFOW, cb, 4) + TEST_FIELD_OFFSET(STARTUPINFOW, cb, 0) + TEST_FIELD_SIZE (STARTUPINFOW, lpReserved, 4) + TEST_FIELD_ALIGN (STARTUPINFOW, lpReserved, 4) + TEST_FIELD_OFFSET(STARTUPINFOW, lpReserved, 4) + TEST_FIELD_SIZE (STARTUPINFOW, lpDesktop, 4) + TEST_FIELD_ALIGN (STARTUPINFOW, lpDesktop, 4) + TEST_FIELD_OFFSET(STARTUPINFOW, lpDesktop, 8) + TEST_FIELD_SIZE (STARTUPINFOW, lpTitle, 4) + TEST_FIELD_ALIGN (STARTUPINFOW, lpTitle, 4) + TEST_FIELD_OFFSET(STARTUPINFOW, lpTitle, 12) + TEST_FIELD_SIZE (STARTUPINFOW, dwX, 4) + TEST_FIELD_ALIGN (STARTUPINFOW, dwX, 4) + TEST_FIELD_OFFSET(STARTUPINFOW, dwX, 16) + TEST_FIELD_SIZE (STARTUPINFOW, dwY, 4) + TEST_FIELD_ALIGN (STARTUPINFOW, dwY, 4) + TEST_FIELD_OFFSET(STARTUPINFOW, dwY, 20) + TEST_FIELD_SIZE (STARTUPINFOW, dwXSize, 4) + TEST_FIELD_ALIGN (STARTUPINFOW, dwXSize, 4) + TEST_FIELD_OFFSET(STARTUPINFOW, dwXSize, 24) + TEST_FIELD_SIZE (STARTUPINFOW, dwYSize, 4) + TEST_FIELD_ALIGN (STARTUPINFOW, dwYSize, 4) + TEST_FIELD_OFFSET(STARTUPINFOW, dwYSize, 28) + TEST_FIELD_SIZE (STARTUPINFOW, dwXCountChars, 4) + TEST_FIELD_ALIGN (STARTUPINFOW, dwXCountChars, 4) + TEST_FIELD_OFFSET(STARTUPINFOW, dwXCountChars, 32) + TEST_FIELD_SIZE (STARTUPINFOW, dwYCountChars, 4) + TEST_FIELD_ALIGN (STARTUPINFOW, dwYCountChars, 4) + TEST_FIELD_OFFSET(STARTUPINFOW, dwYCountChars, 36) + TEST_FIELD_SIZE (STARTUPINFOW, dwFillAttribute, 4) + TEST_FIELD_ALIGN (STARTUPINFOW, dwFillAttribute, 4) + TEST_FIELD_OFFSET(STARTUPINFOW, dwFillAttribute, 40) + TEST_FIELD_SIZE (STARTUPINFOW, dwFlags, 4) + TEST_FIELD_ALIGN (STARTUPINFOW, dwFlags, 4) + TEST_FIELD_OFFSET(STARTUPINFOW, dwFlags, 44) + TEST_FIELD_SIZE (STARTUPINFOW, wShowWindow, 2) + TEST_FIELD_ALIGN (STARTUPINFOW, wShowWindow, 2) + TEST_FIELD_OFFSET(STARTUPINFOW, wShowWindow, 48) + TEST_FIELD_SIZE (STARTUPINFOW, cbReserved2, 2) + TEST_FIELD_ALIGN (STARTUPINFOW, cbReserved2, 2) + TEST_FIELD_OFFSET(STARTUPINFOW, cbReserved2, 50) + TEST_FIELD_SIZE (STARTUPINFOW, lpReserved2, 4) + TEST_FIELD_ALIGN (STARTUPINFOW, lpReserved2, 4) + TEST_FIELD_OFFSET(STARTUPINFOW, lpReserved2, 52) + TEST_FIELD_SIZE (STARTUPINFOW, hStdInput, 4) + TEST_FIELD_ALIGN (STARTUPINFOW, hStdInput, 4) + TEST_FIELD_OFFSET(STARTUPINFOW, hStdInput, 56) + TEST_FIELD_SIZE (STARTUPINFOW, hStdOutput, 4) + TEST_FIELD_ALIGN (STARTUPINFOW, hStdOutput, 4) + TEST_FIELD_OFFSET(STARTUPINFOW, hStdOutput, 60) + TEST_FIELD_SIZE (STARTUPINFOW, hStdError, 4) + TEST_FIELD_ALIGN (STARTUPINFOW, hStdError, 4) + TEST_FIELD_OFFSET(STARTUPINFOW, hStdError, 64) } static void test_pack_SYSTEMTIME(void) { /* SYSTEMTIME (pack 4) */ - TEST_TYPE(SYSTEMTIME, 16, 2); - TEST_FIELD(SYSTEMTIME, wYear, 0, 2, 2); - TEST_FIELD(SYSTEMTIME, wMonth, 2, 2, 2); - TEST_FIELD(SYSTEMTIME, wDayOfWeek, 4, 2, 2); - TEST_FIELD(SYSTEMTIME, wDay, 6, 2, 2); - TEST_FIELD(SYSTEMTIME, wHour, 8, 2, 2); - TEST_FIELD(SYSTEMTIME, wMinute, 10, 2, 2); - TEST_FIELD(SYSTEMTIME, wSecond, 12, 2, 2); - TEST_FIELD(SYSTEMTIME, wMilliseconds, 14, 2, 2); + TEST_TYPE_SIZE (SYSTEMTIME, 16) + TEST_TYPE_ALIGN (SYSTEMTIME, 2) + TEST_FIELD_SIZE (SYSTEMTIME, wYear, 2) + TEST_FIELD_ALIGN (SYSTEMTIME, wYear, 2) + TEST_FIELD_OFFSET(SYSTEMTIME, wYear, 0) + TEST_FIELD_SIZE (SYSTEMTIME, wMonth, 2) + TEST_FIELD_ALIGN (SYSTEMTIME, wMonth, 2) + TEST_FIELD_OFFSET(SYSTEMTIME, wMonth, 2) + TEST_FIELD_SIZE (SYSTEMTIME, wDayOfWeek, 2) + TEST_FIELD_ALIGN (SYSTEMTIME, wDayOfWeek, 2) + TEST_FIELD_OFFSET(SYSTEMTIME, wDayOfWeek, 4) + TEST_FIELD_SIZE (SYSTEMTIME, wDay, 2) + TEST_FIELD_ALIGN (SYSTEMTIME, wDay, 2) + TEST_FIELD_OFFSET(SYSTEMTIME, wDay, 6) + TEST_FIELD_SIZE (SYSTEMTIME, wHour, 2) + TEST_FIELD_ALIGN (SYSTEMTIME, wHour, 2) + TEST_FIELD_OFFSET(SYSTEMTIME, wHour, 8) + TEST_FIELD_SIZE (SYSTEMTIME, wMinute, 2) + TEST_FIELD_ALIGN (SYSTEMTIME, wMinute, 2) + TEST_FIELD_OFFSET(SYSTEMTIME, wMinute, 10) + TEST_FIELD_SIZE (SYSTEMTIME, wSecond, 2) + TEST_FIELD_ALIGN (SYSTEMTIME, wSecond, 2) + TEST_FIELD_OFFSET(SYSTEMTIME, wSecond, 12) + TEST_FIELD_SIZE (SYSTEMTIME, wMilliseconds, 2) + TEST_FIELD_ALIGN (SYSTEMTIME, wMilliseconds, 2) + TEST_FIELD_OFFSET(SYSTEMTIME, wMilliseconds, 14) } static void test_pack_SYSTEM_INFO(void) @@ -1103,94 +1754,192 @@ static void test_pack_SYSTEM_INFO(void) static void test_pack_SYSTEM_POWER_STATUS(void) { /* SYSTEM_POWER_STATUS (pack 4) */ - TEST_TYPE(SYSTEM_POWER_STATUS, 12, 4); - TEST_FIELD(SYSTEM_POWER_STATUS, ACLineStatus, 0, 1, 1); - TEST_FIELD(SYSTEM_POWER_STATUS, BatteryFlag, 1, 1, 1); - TEST_FIELD(SYSTEM_POWER_STATUS, BatteryLifePercent, 2, 1, 1); - TEST_FIELD(SYSTEM_POWER_STATUS, Reserved1, 3, 1, 1); - TEST_FIELD(SYSTEM_POWER_STATUS, BatteryLifeTime, 4, 4, 4); - TEST_FIELD(SYSTEM_POWER_STATUS, BatteryFullLifeTime, 8, 4, 4); + TEST_TYPE_SIZE (SYSTEM_POWER_STATUS, 12) + TEST_TYPE_ALIGN (SYSTEM_POWER_STATUS, 4) + TEST_FIELD_SIZE (SYSTEM_POWER_STATUS, ACLineStatus, 1) + TEST_FIELD_ALIGN (SYSTEM_POWER_STATUS, ACLineStatus, 1) + TEST_FIELD_OFFSET(SYSTEM_POWER_STATUS, ACLineStatus, 0) + TEST_FIELD_SIZE (SYSTEM_POWER_STATUS, BatteryFlag, 1) + TEST_FIELD_ALIGN (SYSTEM_POWER_STATUS, BatteryFlag, 1) + TEST_FIELD_OFFSET(SYSTEM_POWER_STATUS, BatteryFlag, 1) + TEST_FIELD_SIZE (SYSTEM_POWER_STATUS, BatteryLifePercent, 1) + TEST_FIELD_ALIGN (SYSTEM_POWER_STATUS, BatteryLifePercent, 1) + TEST_FIELD_OFFSET(SYSTEM_POWER_STATUS, BatteryLifePercent, 2) + TEST_FIELD_SIZE (SYSTEM_POWER_STATUS, Reserved1, 1) + TEST_FIELD_ALIGN (SYSTEM_POWER_STATUS, Reserved1, 1) + TEST_FIELD_OFFSET(SYSTEM_POWER_STATUS, Reserved1, 3) + TEST_FIELD_SIZE (SYSTEM_POWER_STATUS, BatteryLifeTime, 4) + TEST_FIELD_ALIGN (SYSTEM_POWER_STATUS, BatteryLifeTime, 4) + TEST_FIELD_OFFSET(SYSTEM_POWER_STATUS, BatteryLifeTime, 4) + TEST_FIELD_SIZE (SYSTEM_POWER_STATUS, BatteryFullLifeTime, 4) + TEST_FIELD_ALIGN (SYSTEM_POWER_STATUS, BatteryFullLifeTime, 4) + TEST_FIELD_OFFSET(SYSTEM_POWER_STATUS, BatteryFullLifeTime, 8) } static void test_pack_TIME_ZONE_INFORMATION(void) { /* TIME_ZONE_INFORMATION (pack 4) */ - TEST_TYPE(TIME_ZONE_INFORMATION, 172, 4); - TEST_FIELD(TIME_ZONE_INFORMATION, Bias, 0, 4, 4); - TEST_FIELD(TIME_ZONE_INFORMATION, StandardName, 4, 64, 2); - TEST_FIELD(TIME_ZONE_INFORMATION, StandardDate, 68, 16, 2); - TEST_FIELD(TIME_ZONE_INFORMATION, StandardBias, 84, 4, 4); - TEST_FIELD(TIME_ZONE_INFORMATION, DaylightName, 88, 64, 2); - TEST_FIELD(TIME_ZONE_INFORMATION, DaylightDate, 152, 16, 2); - TEST_FIELD(TIME_ZONE_INFORMATION, DaylightBias, 168, 4, 4); + TEST_TYPE_SIZE (TIME_ZONE_INFORMATION, 172) + TEST_TYPE_ALIGN (TIME_ZONE_INFORMATION, 4) + TEST_FIELD_SIZE (TIME_ZONE_INFORMATION, Bias, 4) + TEST_FIELD_ALIGN (TIME_ZONE_INFORMATION, Bias, 4) + TEST_FIELD_OFFSET(TIME_ZONE_INFORMATION, Bias, 0) + TEST_FIELD_SIZE (TIME_ZONE_INFORMATION, StandardName, 64) + TEST_FIELD_ALIGN (TIME_ZONE_INFORMATION, StandardName, 2) + TEST_FIELD_OFFSET(TIME_ZONE_INFORMATION, StandardName, 4) + TEST_FIELD_SIZE (TIME_ZONE_INFORMATION, StandardDate, 16) + TEST_FIELD_ALIGN (TIME_ZONE_INFORMATION, StandardDate, 2) + TEST_FIELD_OFFSET(TIME_ZONE_INFORMATION, StandardDate, 68) + TEST_FIELD_SIZE (TIME_ZONE_INFORMATION, StandardBias, 4) + TEST_FIELD_ALIGN (TIME_ZONE_INFORMATION, StandardBias, 4) + TEST_FIELD_OFFSET(TIME_ZONE_INFORMATION, StandardBias, 84) + TEST_FIELD_SIZE (TIME_ZONE_INFORMATION, DaylightName, 64) + TEST_FIELD_ALIGN (TIME_ZONE_INFORMATION, DaylightName, 2) + TEST_FIELD_OFFSET(TIME_ZONE_INFORMATION, DaylightName, 88) + TEST_FIELD_SIZE (TIME_ZONE_INFORMATION, DaylightDate, 16) + TEST_FIELD_ALIGN (TIME_ZONE_INFORMATION, DaylightDate, 2) + TEST_FIELD_OFFSET(TIME_ZONE_INFORMATION, DaylightDate, 152) + TEST_FIELD_SIZE (TIME_ZONE_INFORMATION, DaylightBias, 4) + TEST_FIELD_ALIGN (TIME_ZONE_INFORMATION, DaylightBias, 4) + TEST_FIELD_OFFSET(TIME_ZONE_INFORMATION, DaylightBias, 168) } static void test_pack_UNLOAD_DLL_DEBUG_INFO(void) { /* UNLOAD_DLL_DEBUG_INFO (pack 4) */ - TEST_TYPE(UNLOAD_DLL_DEBUG_INFO, 4, 4); - TEST_FIELD(UNLOAD_DLL_DEBUG_INFO, lpBaseOfDll, 0, 4, 4); + TEST_TYPE_SIZE (UNLOAD_DLL_DEBUG_INFO, 4) + TEST_TYPE_ALIGN (UNLOAD_DLL_DEBUG_INFO, 4) + TEST_FIELD_SIZE (UNLOAD_DLL_DEBUG_INFO, lpBaseOfDll, 4) + TEST_FIELD_ALIGN (UNLOAD_DLL_DEBUG_INFO, lpBaseOfDll, 4) + TEST_FIELD_OFFSET(UNLOAD_DLL_DEBUG_INFO, lpBaseOfDll, 0) } static void test_pack_WAITORTIMERCALLBACK(void) { /* WAITORTIMERCALLBACK */ - TEST_TYPE(WAITORTIMERCALLBACK, 4, 4); + TEST_TYPE_SIZE (WAITORTIMERCALLBACK, 4) + TEST_TYPE_ALIGN (WAITORTIMERCALLBACK, 4) } static void test_pack_WIN32_FILE_ATTRIBUTE_DATA(void) { /* WIN32_FILE_ATTRIBUTE_DATA (pack 4) */ - TEST_TYPE(WIN32_FILE_ATTRIBUTE_DATA, 36, 4); - TEST_FIELD(WIN32_FILE_ATTRIBUTE_DATA, dwFileAttributes, 0, 4, 4); - TEST_FIELD(WIN32_FILE_ATTRIBUTE_DATA, ftCreationTime, 4, 8, 4); - TEST_FIELD(WIN32_FILE_ATTRIBUTE_DATA, ftLastAccessTime, 12, 8, 4); - TEST_FIELD(WIN32_FILE_ATTRIBUTE_DATA, ftLastWriteTime, 20, 8, 4); - TEST_FIELD(WIN32_FILE_ATTRIBUTE_DATA, nFileSizeHigh, 28, 4, 4); - TEST_FIELD(WIN32_FILE_ATTRIBUTE_DATA, nFileSizeLow, 32, 4, 4); + TEST_TYPE_SIZE (WIN32_FILE_ATTRIBUTE_DATA, 36) + TEST_TYPE_ALIGN (WIN32_FILE_ATTRIBUTE_DATA, 4) + TEST_FIELD_SIZE (WIN32_FILE_ATTRIBUTE_DATA, dwFileAttributes, 4) + TEST_FIELD_ALIGN (WIN32_FILE_ATTRIBUTE_DATA, dwFileAttributes, 4) + TEST_FIELD_OFFSET(WIN32_FILE_ATTRIBUTE_DATA, dwFileAttributes, 0) + TEST_FIELD_SIZE (WIN32_FILE_ATTRIBUTE_DATA, ftCreationTime, 8) + TEST_FIELD_ALIGN (WIN32_FILE_ATTRIBUTE_DATA, ftCreationTime, 4) + TEST_FIELD_OFFSET(WIN32_FILE_ATTRIBUTE_DATA, ftCreationTime, 4) + TEST_FIELD_SIZE (WIN32_FILE_ATTRIBUTE_DATA, ftLastAccessTime, 8) + TEST_FIELD_ALIGN (WIN32_FILE_ATTRIBUTE_DATA, ftLastAccessTime, 4) + TEST_FIELD_OFFSET(WIN32_FILE_ATTRIBUTE_DATA, ftLastAccessTime, 12) + TEST_FIELD_SIZE (WIN32_FILE_ATTRIBUTE_DATA, ftLastWriteTime, 8) + TEST_FIELD_ALIGN (WIN32_FILE_ATTRIBUTE_DATA, ftLastWriteTime, 4) + TEST_FIELD_OFFSET(WIN32_FILE_ATTRIBUTE_DATA, ftLastWriteTime, 20) + TEST_FIELD_SIZE (WIN32_FILE_ATTRIBUTE_DATA, nFileSizeHigh, 4) + TEST_FIELD_ALIGN (WIN32_FILE_ATTRIBUTE_DATA, nFileSizeHigh, 4) + TEST_FIELD_OFFSET(WIN32_FILE_ATTRIBUTE_DATA, nFileSizeHigh, 28) + TEST_FIELD_SIZE (WIN32_FILE_ATTRIBUTE_DATA, nFileSizeLow, 4) + TEST_FIELD_ALIGN (WIN32_FILE_ATTRIBUTE_DATA, nFileSizeLow, 4) + TEST_FIELD_OFFSET(WIN32_FILE_ATTRIBUTE_DATA, nFileSizeLow, 32) } static void test_pack_WIN32_FIND_DATAA(void) { /* WIN32_FIND_DATAA (pack 4) */ - TEST_TYPE(WIN32_FIND_DATAA, 320, 4); - TEST_FIELD(WIN32_FIND_DATAA, dwFileAttributes, 0, 4, 4); - TEST_FIELD(WIN32_FIND_DATAA, ftCreationTime, 4, 8, 4); - TEST_FIELD(WIN32_FIND_DATAA, ftLastAccessTime, 12, 8, 4); - TEST_FIELD(WIN32_FIND_DATAA, ftLastWriteTime, 20, 8, 4); - TEST_FIELD(WIN32_FIND_DATAA, nFileSizeHigh, 28, 4, 4); - TEST_FIELD(WIN32_FIND_DATAA, nFileSizeLow, 32, 4, 4); - TEST_FIELD(WIN32_FIND_DATAA, dwReserved0, 36, 4, 4); - TEST_FIELD(WIN32_FIND_DATAA, dwReserved1, 40, 4, 4); - TEST_FIELD(WIN32_FIND_DATAA, cFileName, 44, 260, 1); - TEST_FIELD(WIN32_FIND_DATAA, cAlternateFileName, 304, 14, 1); + TEST_TYPE_SIZE (WIN32_FIND_DATAA, 320) + TEST_TYPE_ALIGN (WIN32_FIND_DATAA, 4) + TEST_FIELD_SIZE (WIN32_FIND_DATAA, dwFileAttributes, 4) + TEST_FIELD_ALIGN (WIN32_FIND_DATAA, dwFileAttributes, 4) + TEST_FIELD_OFFSET(WIN32_FIND_DATAA, dwFileAttributes, 0) + TEST_FIELD_SIZE (WIN32_FIND_DATAA, ftCreationTime, 8) + TEST_FIELD_ALIGN (WIN32_FIND_DATAA, ftCreationTime, 4) + TEST_FIELD_OFFSET(WIN32_FIND_DATAA, ftCreationTime, 4) + TEST_FIELD_SIZE (WIN32_FIND_DATAA, ftLastAccessTime, 8) + TEST_FIELD_ALIGN (WIN32_FIND_DATAA, ftLastAccessTime, 4) + TEST_FIELD_OFFSET(WIN32_FIND_DATAA, ftLastAccessTime, 12) + TEST_FIELD_SIZE (WIN32_FIND_DATAA, ftLastWriteTime, 8) + TEST_FIELD_ALIGN (WIN32_FIND_DATAA, ftLastWriteTime, 4) + TEST_FIELD_OFFSET(WIN32_FIND_DATAA, ftLastWriteTime, 20) + TEST_FIELD_SIZE (WIN32_FIND_DATAA, nFileSizeHigh, 4) + TEST_FIELD_ALIGN (WIN32_FIND_DATAA, nFileSizeHigh, 4) + TEST_FIELD_OFFSET(WIN32_FIND_DATAA, nFileSizeHigh, 28) + TEST_FIELD_SIZE (WIN32_FIND_DATAA, nFileSizeLow, 4) + TEST_FIELD_ALIGN (WIN32_FIND_DATAA, nFileSizeLow, 4) + TEST_FIELD_OFFSET(WIN32_FIND_DATAA, nFileSizeLow, 32) + TEST_FIELD_SIZE (WIN32_FIND_DATAA, dwReserved0, 4) + TEST_FIELD_ALIGN (WIN32_FIND_DATAA, dwReserved0, 4) + TEST_FIELD_OFFSET(WIN32_FIND_DATAA, dwReserved0, 36) + TEST_FIELD_SIZE (WIN32_FIND_DATAA, dwReserved1, 4) + TEST_FIELD_ALIGN (WIN32_FIND_DATAA, dwReserved1, 4) + TEST_FIELD_OFFSET(WIN32_FIND_DATAA, dwReserved1, 40) + TEST_FIELD_SIZE (WIN32_FIND_DATAA, cFileName, 260) + TEST_FIELD_ALIGN (WIN32_FIND_DATAA, cFileName, 1) + TEST_FIELD_OFFSET(WIN32_FIND_DATAA, cFileName, 44) + TEST_FIELD_SIZE (WIN32_FIND_DATAA, cAlternateFileName, 14) + TEST_FIELD_ALIGN (WIN32_FIND_DATAA, cAlternateFileName, 1) + TEST_FIELD_OFFSET(WIN32_FIND_DATAA, cAlternateFileName, 304) } static void test_pack_WIN32_FIND_DATAW(void) { /* WIN32_FIND_DATAW (pack 4) */ - TEST_TYPE(WIN32_FIND_DATAW, 592, 4); - TEST_FIELD(WIN32_FIND_DATAW, dwFileAttributes, 0, 4, 4); - TEST_FIELD(WIN32_FIND_DATAW, ftCreationTime, 4, 8, 4); - TEST_FIELD(WIN32_FIND_DATAW, ftLastAccessTime, 12, 8, 4); - TEST_FIELD(WIN32_FIND_DATAW, ftLastWriteTime, 20, 8, 4); - TEST_FIELD(WIN32_FIND_DATAW, nFileSizeHigh, 28, 4, 4); - TEST_FIELD(WIN32_FIND_DATAW, nFileSizeLow, 32, 4, 4); - TEST_FIELD(WIN32_FIND_DATAW, dwReserved0, 36, 4, 4); - TEST_FIELD(WIN32_FIND_DATAW, dwReserved1, 40, 4, 4); - TEST_FIELD(WIN32_FIND_DATAW, cFileName, 44, 520, 2); - TEST_FIELD(WIN32_FIND_DATAW, cAlternateFileName, 564, 28, 2); + TEST_TYPE_SIZE (WIN32_FIND_DATAW, 592) + TEST_TYPE_ALIGN (WIN32_FIND_DATAW, 4) + TEST_FIELD_SIZE (WIN32_FIND_DATAW, dwFileAttributes, 4) + TEST_FIELD_ALIGN (WIN32_FIND_DATAW, dwFileAttributes, 4) + TEST_FIELD_OFFSET(WIN32_FIND_DATAW, dwFileAttributes, 0) + TEST_FIELD_SIZE (WIN32_FIND_DATAW, ftCreationTime, 8) + TEST_FIELD_ALIGN (WIN32_FIND_DATAW, ftCreationTime, 4) + TEST_FIELD_OFFSET(WIN32_FIND_DATAW, ftCreationTime, 4) + TEST_FIELD_SIZE (WIN32_FIND_DATAW, ftLastAccessTime, 8) + TEST_FIELD_ALIGN (WIN32_FIND_DATAW, ftLastAccessTime, 4) + TEST_FIELD_OFFSET(WIN32_FIND_DATAW, ftLastAccessTime, 12) + TEST_FIELD_SIZE (WIN32_FIND_DATAW, ftLastWriteTime, 8) + TEST_FIELD_ALIGN (WIN32_FIND_DATAW, ftLastWriteTime, 4) + TEST_FIELD_OFFSET(WIN32_FIND_DATAW, ftLastWriteTime, 20) + TEST_FIELD_SIZE (WIN32_FIND_DATAW, nFileSizeHigh, 4) + TEST_FIELD_ALIGN (WIN32_FIND_DATAW, nFileSizeHigh, 4) + TEST_FIELD_OFFSET(WIN32_FIND_DATAW, nFileSizeHigh, 28) + TEST_FIELD_SIZE (WIN32_FIND_DATAW, nFileSizeLow, 4) + TEST_FIELD_ALIGN (WIN32_FIND_DATAW, nFileSizeLow, 4) + TEST_FIELD_OFFSET(WIN32_FIND_DATAW, nFileSizeLow, 32) + TEST_FIELD_SIZE (WIN32_FIND_DATAW, dwReserved0, 4) + TEST_FIELD_ALIGN (WIN32_FIND_DATAW, dwReserved0, 4) + TEST_FIELD_OFFSET(WIN32_FIND_DATAW, dwReserved0, 36) + TEST_FIELD_SIZE (WIN32_FIND_DATAW, dwReserved1, 4) + TEST_FIELD_ALIGN (WIN32_FIND_DATAW, dwReserved1, 4) + TEST_FIELD_OFFSET(WIN32_FIND_DATAW, dwReserved1, 40) + TEST_FIELD_SIZE (WIN32_FIND_DATAW, cFileName, 520) + TEST_FIELD_ALIGN (WIN32_FIND_DATAW, cFileName, 2) + TEST_FIELD_OFFSET(WIN32_FIND_DATAW, cFileName, 44) + TEST_FIELD_SIZE (WIN32_FIND_DATAW, cAlternateFileName, 28) + TEST_FIELD_ALIGN (WIN32_FIND_DATAW, cAlternateFileName, 2) + TEST_FIELD_OFFSET(WIN32_FIND_DATAW, cAlternateFileName, 564) } static void test_pack_WIN32_STREAM_ID(void) { /* WIN32_STREAM_ID (pack 8) */ - TEST_TYPE(WIN32_STREAM_ID, 24, 8); - TEST_FIELD(WIN32_STREAM_ID, dwStreamId, 0, 4, 4); - TEST_FIELD(WIN32_STREAM_ID, dwStreamAttributes, 4, 4, 4); - TEST_FIELD(WIN32_STREAM_ID, Size, 8, 8, 8); - TEST_FIELD(WIN32_STREAM_ID, dwStreamNameSize, 16, 4, 4); - TEST_FIELD(WIN32_STREAM_ID, cStreamName, 20, 2, 2); + TEST_TYPE_SIZE (WIN32_STREAM_ID, 24) + TEST_TYPE_ALIGN (WIN32_STREAM_ID, 8) + TEST_FIELD_SIZE (WIN32_STREAM_ID, dwStreamId, 4) + TEST_FIELD_ALIGN (WIN32_STREAM_ID, dwStreamId, 4) + TEST_FIELD_OFFSET(WIN32_STREAM_ID, dwStreamId, 0) + TEST_FIELD_SIZE (WIN32_STREAM_ID, dwStreamAttributes, 4) + TEST_FIELD_ALIGN (WIN32_STREAM_ID, dwStreamAttributes, 4) + TEST_FIELD_OFFSET(WIN32_STREAM_ID, dwStreamAttributes, 4) + TEST_FIELD_SIZE (WIN32_STREAM_ID, Size, 8) + TEST_FIELD_ALIGN (WIN32_STREAM_ID, Size, 8) + TEST_FIELD_OFFSET(WIN32_STREAM_ID, Size, 8) + TEST_FIELD_SIZE (WIN32_STREAM_ID, dwStreamNameSize, 4) + TEST_FIELD_ALIGN (WIN32_STREAM_ID, dwStreamNameSize, 4) + TEST_FIELD_OFFSET(WIN32_STREAM_ID, dwStreamNameSize, 16) + TEST_FIELD_SIZE (WIN32_STREAM_ID, cStreamName, 2) + TEST_FIELD_ALIGN (WIN32_STREAM_ID, cStreamName, 2) + TEST_FIELD_OFFSET(WIN32_STREAM_ID, cStreamName, 20) } static void test_pack(void) diff --git a/dlls/ntdll/tests/generated.c b/dlls/ntdll/tests/generated.c index a362fd30042..479db65a6db 100644 --- a/dlls/ntdll/tests/generated.c +++ b/dlls/ntdll/tests/generated.c @@ -51,392 +51,517 @@ * Test helper macros */ -#ifdef FIELD_ALIGNMENT -# define TEST_FIELD_ALIGNMENT(type, field, align) \ - ok(_TYPE_ALIGNMENT(((type*)0)->field) == align, \ - "FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \ - (int)_TYPE_ALIGNMENT(((type*)0)->field)) +#ifdef _WIN64 + +# define TEST_TYPE_SIZE(type, size) +# define TEST_TYPE_ALIGN(type, align) +# define TEST_TARGET_ALIGN(type, align) +# define TEST_FIELD_ALIGN(type, field, align) +# define TEST_FIELD_OFFSET(type, field, offset) + #else -# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0) + +# define TEST_TYPE_SIZE(type, size) C_ASSERT(sizeof(type) == size); + +# ifdef TYPE_ALIGNMENT +# define TEST_TYPE_ALIGN(type, align) C_ASSERT(TYPE_ALIGNMENT(type) == align); +# else +# define TEST_TYPE_ALIGN(type, align) +# endif + +# ifdef _TYPE_ALIGNMENT +# 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); +# else +# define TEST_TARGET_ALIGN(type, align) +# define TEST_FIELD_ALIGN(type, field, align) +# endif + +# define TEST_FIELD_OFFSET(type, field, offset) C_ASSERT(FIELD_OFFSET(type, field) == offset); + #endif -#define TEST_FIELD_OFFSET(type, field, offset) \ - ok(FIELD_OFFSET(type, field) == offset, \ - "FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")\n", \ - (long int)FIELD_OFFSET(type, field)) +#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); -#ifdef _TYPE_ALIGNMENT -#define TEST__TYPE_ALIGNMENT(type, align) \ - ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)_TYPE_ALIGNMENT(type)) -#else -# define TEST__TYPE_ALIGNMENT(type, align) do { } while (0) -#endif - -#ifdef TYPE_ALIGNMENT -#define TEST_TYPE_ALIGNMENT(type, align) \ - ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)TYPE_ALIGNMENT(type)) -#else -# define TEST_TYPE_ALIGNMENT(type, align) do { } while (0) -#endif - -#define TEST_TYPE_SIZE(type, size) \ - ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", ((int) sizeof(type))) - -/*********************************************************************** - * Test macros - */ - -#define TEST_FIELD(type, field, field_offset, field_size, field_align) \ - TEST_TYPE_SIZE((((type*)0)->field), field_size); \ - TEST_FIELD_ALIGNMENT(type, field, field_align); \ - TEST_FIELD_OFFSET(type, field, 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_DWORD32(void) { /* DWORD32 */ - TEST_TYPE(DWORD32, 4, 4); - TEST_TYPE_UNSIGNED(DWORD32); + TEST_TYPE_SIZE (DWORD32, 4) + TEST_TYPE_ALIGN (DWORD32, 4) + TEST_TYPE_UNSIGNED(DWORD32) } static void test_pack_DWORD64(void) { /* DWORD64 */ - TEST_TYPE(DWORD64, 8, 8); - TEST_TYPE_UNSIGNED(DWORD64); + TEST_TYPE_SIZE (DWORD64, 8) + TEST_TYPE_ALIGN (DWORD64, 8) + TEST_TYPE_UNSIGNED(DWORD64) } static void test_pack_DWORD_PTR(void) { /* DWORD_PTR */ - TEST_TYPE(DWORD_PTR, 4, 4); + TEST_TYPE_SIZE (DWORD_PTR, 4) + TEST_TYPE_ALIGN (DWORD_PTR, 4) } static void test_pack_HALF_PTR(void) { /* HALF_PTR */ - TEST_TYPE(HALF_PTR, 2, 2); - TEST_TYPE_SIGNED(HALF_PTR); + TEST_TYPE_SIZE (HALF_PTR, 2) + TEST_TYPE_ALIGN (HALF_PTR, 2) + TEST_TYPE_SIGNED(HALF_PTR) } static void test_pack_INT16(void) { /* INT16 */ - TEST_TYPE(INT16, 2, 2); - TEST_TYPE_SIGNED(INT16); + TEST_TYPE_SIZE (INT16, 2) + TEST_TYPE_ALIGN (INT16, 2) + TEST_TYPE_SIGNED(INT16) } static void test_pack_INT32(void) { /* INT32 */ - TEST_TYPE(INT32, 4, 4); - TEST_TYPE_SIGNED(INT32); + TEST_TYPE_SIZE (INT32, 4) + TEST_TYPE_ALIGN (INT32, 4) + TEST_TYPE_SIGNED(INT32) } static void test_pack_INT64(void) { /* INT64 */ - TEST_TYPE(INT64, 8, 8); - TEST_TYPE_SIGNED(INT64); + TEST_TYPE_SIZE (INT64, 8) + TEST_TYPE_ALIGN (INT64, 8) + TEST_TYPE_SIGNED(INT64) } static void test_pack_INT8(void) { /* INT8 */ - TEST_TYPE(INT8, 1, 1); - TEST_TYPE_SIGNED(INT8); + TEST_TYPE_SIZE (INT8, 1) + TEST_TYPE_ALIGN (INT8, 1) + TEST_TYPE_SIGNED(INT8) } static void test_pack_INT_PTR(void) { /* INT_PTR */ - TEST_TYPE(INT_PTR, 4, 4); - TEST_TYPE_SIGNED(INT_PTR); + TEST_TYPE_SIZE (INT_PTR, 4) + TEST_TYPE_ALIGN (INT_PTR, 4) + TEST_TYPE_SIGNED(INT_PTR) } static void test_pack_LONG32(void) { /* LONG32 */ - TEST_TYPE(LONG32, 4, 4); - TEST_TYPE_SIGNED(LONG32); + TEST_TYPE_SIZE (LONG32, 4) + TEST_TYPE_ALIGN (LONG32, 4) + TEST_TYPE_SIGNED(LONG32) } static void test_pack_LONG64(void) { /* LONG64 */ - TEST_TYPE(LONG64, 8, 8); - TEST_TYPE_SIGNED(LONG64); + TEST_TYPE_SIZE (LONG64, 8) + TEST_TYPE_ALIGN (LONG64, 8) + TEST_TYPE_SIGNED(LONG64) } static void test_pack_LONG_PTR(void) { /* LONG_PTR */ - TEST_TYPE(LONG_PTR, 4, 4); - TEST_TYPE_SIGNED(LONG_PTR); + TEST_TYPE_SIZE (LONG_PTR, 4) + TEST_TYPE_ALIGN (LONG_PTR, 4) + TEST_TYPE_SIGNED(LONG_PTR) } static void test_pack_SIZE_T(void) { /* SIZE_T */ - TEST_TYPE(SIZE_T, 4, 4); + TEST_TYPE_SIZE (SIZE_T, 4) + TEST_TYPE_ALIGN (SIZE_T, 4) } static void test_pack_SSIZE_T(void) { /* SSIZE_T */ - TEST_TYPE(SSIZE_T, 4, 4); + TEST_TYPE_SIZE (SSIZE_T, 4) + TEST_TYPE_ALIGN (SSIZE_T, 4) } static void test_pack_UHALF_PTR(void) { /* UHALF_PTR */ - TEST_TYPE(UHALF_PTR, 2, 2); - TEST_TYPE_UNSIGNED(UHALF_PTR); + TEST_TYPE_SIZE (UHALF_PTR, 2) + TEST_TYPE_ALIGN (UHALF_PTR, 2) + TEST_TYPE_UNSIGNED(UHALF_PTR) } static void test_pack_UINT16(void) { /* UINT16 */ - TEST_TYPE(UINT16, 2, 2); - TEST_TYPE_UNSIGNED(UINT16); + TEST_TYPE_SIZE (UINT16, 2) + TEST_TYPE_ALIGN (UINT16, 2) + TEST_TYPE_UNSIGNED(UINT16) } static void test_pack_UINT32(void) { /* UINT32 */ - TEST_TYPE(UINT32, 4, 4); - TEST_TYPE_UNSIGNED(UINT32); + TEST_TYPE_SIZE (UINT32, 4) + TEST_TYPE_ALIGN (UINT32, 4) + TEST_TYPE_UNSIGNED(UINT32) } static void test_pack_UINT64(void) { /* UINT64 */ - TEST_TYPE(UINT64, 8, 8); - TEST_TYPE_UNSIGNED(UINT64); + TEST_TYPE_SIZE (UINT64, 8) + TEST_TYPE_ALIGN (UINT64, 8) + TEST_TYPE_UNSIGNED(UINT64) } static void test_pack_UINT8(void) { /* UINT8 */ - TEST_TYPE(UINT8, 1, 1); - TEST_TYPE_UNSIGNED(UINT8); + TEST_TYPE_SIZE (UINT8, 1) + TEST_TYPE_ALIGN (UINT8, 1) + TEST_TYPE_UNSIGNED(UINT8) } static void test_pack_UINT_PTR(void) { /* UINT_PTR */ - TEST_TYPE(UINT_PTR, 4, 4); - TEST_TYPE_UNSIGNED(UINT_PTR); + TEST_TYPE_SIZE (UINT_PTR, 4) + TEST_TYPE_ALIGN (UINT_PTR, 4) + TEST_TYPE_UNSIGNED(UINT_PTR) } static void test_pack_ULONG32(void) { /* ULONG32 */ - TEST_TYPE(ULONG32, 4, 4); - TEST_TYPE_UNSIGNED(ULONG32); + TEST_TYPE_SIZE (ULONG32, 4) + TEST_TYPE_ALIGN (ULONG32, 4) + TEST_TYPE_UNSIGNED(ULONG32) } static void test_pack_ULONG64(void) { /* ULONG64 */ - TEST_TYPE(ULONG64, 8, 8); - TEST_TYPE_UNSIGNED(ULONG64); + TEST_TYPE_SIZE (ULONG64, 8) + TEST_TYPE_ALIGN (ULONG64, 8) + TEST_TYPE_UNSIGNED(ULONG64) } static void test_pack_ULONG_PTR(void) { /* ULONG_PTR */ - TEST_TYPE(ULONG_PTR, 4, 4); - TEST_TYPE_UNSIGNED(ULONG_PTR); + TEST_TYPE_SIZE (ULONG_PTR, 4) + TEST_TYPE_ALIGN (ULONG_PTR, 4) + TEST_TYPE_UNSIGNED(ULONG_PTR) } static void test_pack_ACCESS_ALLOWED_ACE(void) { /* ACCESS_ALLOWED_ACE (pack 4) */ - TEST_TYPE(ACCESS_ALLOWED_ACE, 12, 4); - TEST_FIELD(ACCESS_ALLOWED_ACE, Header, 0, 4, 2); - TEST_FIELD(ACCESS_ALLOWED_ACE, Mask, 4, 4, 4); - TEST_FIELD(ACCESS_ALLOWED_ACE, SidStart, 8, 4, 4); + TEST_TYPE_SIZE (ACCESS_ALLOWED_ACE, 12) + TEST_TYPE_ALIGN (ACCESS_ALLOWED_ACE, 4) + TEST_FIELD_SIZE (ACCESS_ALLOWED_ACE, Header, 4) + TEST_FIELD_ALIGN (ACCESS_ALLOWED_ACE, Header, 2) + TEST_FIELD_OFFSET(ACCESS_ALLOWED_ACE, Header, 0) + TEST_FIELD_SIZE (ACCESS_ALLOWED_ACE, Mask, 4) + TEST_FIELD_ALIGN (ACCESS_ALLOWED_ACE, Mask, 4) + TEST_FIELD_OFFSET(ACCESS_ALLOWED_ACE, Mask, 4) + TEST_FIELD_SIZE (ACCESS_ALLOWED_ACE, SidStart, 4) + TEST_FIELD_ALIGN (ACCESS_ALLOWED_ACE, SidStart, 4) + TEST_FIELD_OFFSET(ACCESS_ALLOWED_ACE, SidStart, 8) } static void test_pack_ACCESS_DENIED_ACE(void) { /* ACCESS_DENIED_ACE (pack 4) */ - TEST_TYPE(ACCESS_DENIED_ACE, 12, 4); - TEST_FIELD(ACCESS_DENIED_ACE, Header, 0, 4, 2); - TEST_FIELD(ACCESS_DENIED_ACE, Mask, 4, 4, 4); - TEST_FIELD(ACCESS_DENIED_ACE, SidStart, 8, 4, 4); + TEST_TYPE_SIZE (ACCESS_DENIED_ACE, 12) + TEST_TYPE_ALIGN (ACCESS_DENIED_ACE, 4) + TEST_FIELD_SIZE (ACCESS_DENIED_ACE, Header, 4) + TEST_FIELD_ALIGN (ACCESS_DENIED_ACE, Header, 2) + TEST_FIELD_OFFSET(ACCESS_DENIED_ACE, Header, 0) + TEST_FIELD_SIZE (ACCESS_DENIED_ACE, Mask, 4) + TEST_FIELD_ALIGN (ACCESS_DENIED_ACE, Mask, 4) + TEST_FIELD_OFFSET(ACCESS_DENIED_ACE, Mask, 4) + TEST_FIELD_SIZE (ACCESS_DENIED_ACE, SidStart, 4) + TEST_FIELD_ALIGN (ACCESS_DENIED_ACE, SidStart, 4) + TEST_FIELD_OFFSET(ACCESS_DENIED_ACE, SidStart, 8) } static void test_pack_ACCESS_MASK(void) { /* ACCESS_MASK */ - TEST_TYPE(ACCESS_MASK, 4, 4); - TEST_TYPE_UNSIGNED(ACCESS_MASK); + TEST_TYPE_SIZE (ACCESS_MASK, 4) + TEST_TYPE_ALIGN (ACCESS_MASK, 4) + TEST_TYPE_UNSIGNED(ACCESS_MASK) } static void test_pack_ACE_HEADER(void) { /* ACE_HEADER (pack 4) */ - TEST_TYPE(ACE_HEADER, 4, 2); - TEST_FIELD(ACE_HEADER, AceType, 0, 1, 1); - TEST_FIELD(ACE_HEADER, AceFlags, 1, 1, 1); - TEST_FIELD(ACE_HEADER, AceSize, 2, 2, 2); + TEST_TYPE_SIZE (ACE_HEADER, 4) + TEST_TYPE_ALIGN (ACE_HEADER, 2) + TEST_FIELD_SIZE (ACE_HEADER, AceType, 1) + TEST_FIELD_ALIGN (ACE_HEADER, AceType, 1) + TEST_FIELD_OFFSET(ACE_HEADER, AceType, 0) + TEST_FIELD_SIZE (ACE_HEADER, AceFlags, 1) + TEST_FIELD_ALIGN (ACE_HEADER, AceFlags, 1) + TEST_FIELD_OFFSET(ACE_HEADER, AceFlags, 1) + TEST_FIELD_SIZE (ACE_HEADER, AceSize, 2) + TEST_FIELD_ALIGN (ACE_HEADER, AceSize, 2) + TEST_FIELD_OFFSET(ACE_HEADER, AceSize, 2) } static void test_pack_ACL(void) { /* ACL (pack 4) */ - TEST_TYPE(ACL, 8, 2); - TEST_FIELD(ACL, AclRevision, 0, 1, 1); - TEST_FIELD(ACL, Sbz1, 1, 1, 1); - TEST_FIELD(ACL, AclSize, 2, 2, 2); - TEST_FIELD(ACL, AceCount, 4, 2, 2); - TEST_FIELD(ACL, Sbz2, 6, 2, 2); + TEST_TYPE_SIZE (ACL, 8) + TEST_TYPE_ALIGN (ACL, 2) + TEST_FIELD_SIZE (ACL, AclRevision, 1) + TEST_FIELD_ALIGN (ACL, AclRevision, 1) + TEST_FIELD_OFFSET(ACL, AclRevision, 0) + TEST_FIELD_SIZE (ACL, Sbz1, 1) + TEST_FIELD_ALIGN (ACL, Sbz1, 1) + TEST_FIELD_OFFSET(ACL, Sbz1, 1) + TEST_FIELD_SIZE (ACL, AclSize, 2) + TEST_FIELD_ALIGN (ACL, AclSize, 2) + TEST_FIELD_OFFSET(ACL, AclSize, 2) + TEST_FIELD_SIZE (ACL, AceCount, 2) + TEST_FIELD_ALIGN (ACL, AceCount, 2) + TEST_FIELD_OFFSET(ACL, AceCount, 4) + TEST_FIELD_SIZE (ACL, Sbz2, 2) + TEST_FIELD_ALIGN (ACL, Sbz2, 2) + TEST_FIELD_OFFSET(ACL, Sbz2, 6) } static void test_pack_ACL_REVISION_INFORMATION(void) { /* ACL_REVISION_INFORMATION (pack 4) */ - TEST_TYPE(ACL_REVISION_INFORMATION, 4, 4); - TEST_FIELD(ACL_REVISION_INFORMATION, AclRevision, 0, 4, 4); + TEST_TYPE_SIZE (ACL_REVISION_INFORMATION, 4) + TEST_TYPE_ALIGN (ACL_REVISION_INFORMATION, 4) + TEST_FIELD_SIZE (ACL_REVISION_INFORMATION, AclRevision, 4) + TEST_FIELD_ALIGN (ACL_REVISION_INFORMATION, AclRevision, 4) + TEST_FIELD_OFFSET(ACL_REVISION_INFORMATION, AclRevision, 0) } static void test_pack_ACL_SIZE_INFORMATION(void) { /* ACL_SIZE_INFORMATION (pack 4) */ - TEST_TYPE(ACL_SIZE_INFORMATION, 12, 4); - TEST_FIELD(ACL_SIZE_INFORMATION, AceCount, 0, 4, 4); - TEST_FIELD(ACL_SIZE_INFORMATION, AclBytesInUse, 4, 4, 4); - TEST_FIELD(ACL_SIZE_INFORMATION, AclBytesFree, 8, 4, 4); + TEST_TYPE_SIZE (ACL_SIZE_INFORMATION, 12) + TEST_TYPE_ALIGN (ACL_SIZE_INFORMATION, 4) + TEST_FIELD_SIZE (ACL_SIZE_INFORMATION, AceCount, 4) + TEST_FIELD_ALIGN (ACL_SIZE_INFORMATION, AceCount, 4) + TEST_FIELD_OFFSET(ACL_SIZE_INFORMATION, AceCount, 0) + TEST_FIELD_SIZE (ACL_SIZE_INFORMATION, AclBytesInUse, 4) + TEST_FIELD_ALIGN (ACL_SIZE_INFORMATION, AclBytesInUse, 4) + TEST_FIELD_OFFSET(ACL_SIZE_INFORMATION, AclBytesInUse, 4) + TEST_FIELD_SIZE (ACL_SIZE_INFORMATION, AclBytesFree, 4) + TEST_FIELD_ALIGN (ACL_SIZE_INFORMATION, AclBytesFree, 4) + TEST_FIELD_OFFSET(ACL_SIZE_INFORMATION, AclBytesFree, 8) } static void test_pack_BOOLEAN(void) { /* BOOLEAN */ - TEST_TYPE(BOOLEAN, 1, 1); - TEST_TYPE_UNSIGNED(BOOLEAN); + TEST_TYPE_SIZE (BOOLEAN, 1) + TEST_TYPE_ALIGN (BOOLEAN, 1) + TEST_TYPE_UNSIGNED(BOOLEAN) } static void test_pack_CCHAR(void) { /* CCHAR */ - TEST_TYPE(CCHAR, 1, 1); - TEST_TYPE_SIGNED(CCHAR); + TEST_TYPE_SIZE (CCHAR, 1) + TEST_TYPE_ALIGN (CCHAR, 1) + TEST_TYPE_SIGNED(CCHAR) } static void test_pack_CHAR(void) { /* CHAR */ - TEST_TYPE(CHAR, 1, 1); - TEST_TYPE_SIGNED(CHAR); + TEST_TYPE_SIZE (CHAR, 1) + TEST_TYPE_ALIGN (CHAR, 1) + TEST_TYPE_SIGNED(CHAR) } static void test_pack_DWORDLONG(void) { /* DWORDLONG */ - TEST_TYPE(DWORDLONG, 8, 8); - TEST_TYPE_UNSIGNED(DWORDLONG); + TEST_TYPE_SIZE (DWORDLONG, 8) + TEST_TYPE_ALIGN (DWORDLONG, 8) + TEST_TYPE_UNSIGNED(DWORDLONG) } static void test_pack_EXCEPTION_POINTERS(void) { /* EXCEPTION_POINTERS (pack 4) */ - TEST_TYPE(EXCEPTION_POINTERS, 8, 4); - TEST_FIELD(EXCEPTION_POINTERS, ExceptionRecord, 0, 4, 4); - TEST_FIELD(EXCEPTION_POINTERS, ContextRecord, 4, 4, 4); + TEST_TYPE_SIZE (EXCEPTION_POINTERS, 8) + TEST_TYPE_ALIGN (EXCEPTION_POINTERS, 4) + TEST_FIELD_SIZE (EXCEPTION_POINTERS, ExceptionRecord, 4) + TEST_FIELD_ALIGN (EXCEPTION_POINTERS, ExceptionRecord, 4) + TEST_FIELD_OFFSET(EXCEPTION_POINTERS, ExceptionRecord, 0) + TEST_FIELD_SIZE (EXCEPTION_POINTERS, ContextRecord, 4) + TEST_FIELD_ALIGN (EXCEPTION_POINTERS, ContextRecord, 4) + TEST_FIELD_OFFSET(EXCEPTION_POINTERS, ContextRecord, 4) } static void test_pack_EXCEPTION_RECORD(void) { /* EXCEPTION_RECORD (pack 4) */ - TEST_TYPE(EXCEPTION_RECORD, 80, 4); - TEST_FIELD(EXCEPTION_RECORD, ExceptionCode, 0, 4, 4); - TEST_FIELD(EXCEPTION_RECORD, ExceptionFlags, 4, 4, 4); - TEST_FIELD(EXCEPTION_RECORD, ExceptionRecord, 8, 4, 4); - TEST_FIELD(EXCEPTION_RECORD, ExceptionAddress, 12, 4, 4); - TEST_FIELD(EXCEPTION_RECORD, NumberParameters, 16, 4, 4); - TEST_FIELD(EXCEPTION_RECORD, ExceptionInformation, 20, 60, 4); + TEST_TYPE_SIZE (EXCEPTION_RECORD, 80) + TEST_TYPE_ALIGN (EXCEPTION_RECORD, 4) + TEST_FIELD_SIZE (EXCEPTION_RECORD, ExceptionCode, 4) + TEST_FIELD_ALIGN (EXCEPTION_RECORD, ExceptionCode, 4) + TEST_FIELD_OFFSET(EXCEPTION_RECORD, ExceptionCode, 0) + TEST_FIELD_SIZE (EXCEPTION_RECORD, ExceptionFlags, 4) + TEST_FIELD_ALIGN (EXCEPTION_RECORD, ExceptionFlags, 4) + TEST_FIELD_OFFSET(EXCEPTION_RECORD, ExceptionFlags, 4) + TEST_FIELD_SIZE (EXCEPTION_RECORD, ExceptionRecord, 4) + TEST_FIELD_ALIGN (EXCEPTION_RECORD, ExceptionRecord, 4) + TEST_FIELD_OFFSET(EXCEPTION_RECORD, ExceptionRecord, 8) + TEST_FIELD_SIZE (EXCEPTION_RECORD, ExceptionAddress, 4) + TEST_FIELD_ALIGN (EXCEPTION_RECORD, ExceptionAddress, 4) + TEST_FIELD_OFFSET(EXCEPTION_RECORD, ExceptionAddress, 12) + TEST_FIELD_SIZE (EXCEPTION_RECORD, NumberParameters, 4) + TEST_FIELD_ALIGN (EXCEPTION_RECORD, NumberParameters, 4) + TEST_FIELD_OFFSET(EXCEPTION_RECORD, NumberParameters, 16) + TEST_FIELD_SIZE (EXCEPTION_RECORD, ExceptionInformation, 60) + TEST_FIELD_ALIGN (EXCEPTION_RECORD, ExceptionInformation, 4) + TEST_FIELD_OFFSET(EXCEPTION_RECORD, ExceptionInformation, 20) } static void test_pack_EXECUTION_STATE(void) { /* EXECUTION_STATE */ - TEST_TYPE(EXECUTION_STATE, 4, 4); - TEST_TYPE_UNSIGNED(EXECUTION_STATE); + TEST_TYPE_SIZE (EXECUTION_STATE, 4) + TEST_TYPE_ALIGN (EXECUTION_STATE, 4) + TEST_TYPE_UNSIGNED(EXECUTION_STATE) } static void test_pack_FLOATING_SAVE_AREA(void) { /* FLOATING_SAVE_AREA (pack 4) */ - TEST_TYPE(FLOATING_SAVE_AREA, 112, 4); - TEST_FIELD(FLOATING_SAVE_AREA, ControlWord, 0, 4, 4); - TEST_FIELD(FLOATING_SAVE_AREA, StatusWord, 4, 4, 4); - TEST_FIELD(FLOATING_SAVE_AREA, TagWord, 8, 4, 4); - TEST_FIELD(FLOATING_SAVE_AREA, ErrorOffset, 12, 4, 4); - TEST_FIELD(FLOATING_SAVE_AREA, ErrorSelector, 16, 4, 4); - TEST_FIELD(FLOATING_SAVE_AREA, DataOffset, 20, 4, 4); - TEST_FIELD(FLOATING_SAVE_AREA, DataSelector, 24, 4, 4); - TEST_FIELD(FLOATING_SAVE_AREA, RegisterArea, 28, 80, 1); - TEST_FIELD(FLOATING_SAVE_AREA, Cr0NpxState, 108, 4, 4); + TEST_TYPE_SIZE (FLOATING_SAVE_AREA, 112) + TEST_TYPE_ALIGN (FLOATING_SAVE_AREA, 4) + TEST_FIELD_SIZE (FLOATING_SAVE_AREA, ControlWord, 4) + TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, ControlWord, 4) + TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, ControlWord, 0) + TEST_FIELD_SIZE (FLOATING_SAVE_AREA, StatusWord, 4) + TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, StatusWord, 4) + TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, StatusWord, 4) + TEST_FIELD_SIZE (FLOATING_SAVE_AREA, TagWord, 4) + TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, TagWord, 4) + TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, TagWord, 8) + TEST_FIELD_SIZE (FLOATING_SAVE_AREA, ErrorOffset, 4) + TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, ErrorOffset, 4) + TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, ErrorOffset, 12) + TEST_FIELD_SIZE (FLOATING_SAVE_AREA, ErrorSelector, 4) + TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, ErrorSelector, 4) + TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, ErrorSelector, 16) + TEST_FIELD_SIZE (FLOATING_SAVE_AREA, DataOffset, 4) + TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, DataOffset, 4) + TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, DataOffset, 20) + TEST_FIELD_SIZE (FLOATING_SAVE_AREA, DataSelector, 4) + TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, DataSelector, 4) + TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, DataSelector, 24) + TEST_FIELD_SIZE (FLOATING_SAVE_AREA, RegisterArea, 80) + TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, RegisterArea, 1) + TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, RegisterArea, 28) + TEST_FIELD_SIZE (FLOATING_SAVE_AREA, Cr0NpxState, 4) + TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, Cr0NpxState, 4) + TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, Cr0NpxState, 108) } static void test_pack_FPO_DATA(void) { /* FPO_DATA (pack 4) */ - TEST_TYPE(FPO_DATA, 16, 4); - TEST_FIELD(FPO_DATA, ulOffStart, 0, 4, 4); - TEST_FIELD(FPO_DATA, cbProcSize, 4, 4, 4); - TEST_FIELD(FPO_DATA, cdwLocals, 8, 4, 4); - TEST_FIELD(FPO_DATA, cdwParams, 12, 2, 2); + TEST_TYPE_SIZE (FPO_DATA, 16) + TEST_TYPE_ALIGN (FPO_DATA, 4) + TEST_FIELD_SIZE (FPO_DATA, ulOffStart, 4) + TEST_FIELD_ALIGN (FPO_DATA, ulOffStart, 4) + TEST_FIELD_OFFSET(FPO_DATA, ulOffStart, 0) + TEST_FIELD_SIZE (FPO_DATA, cbProcSize, 4) + TEST_FIELD_ALIGN (FPO_DATA, cbProcSize, 4) + TEST_FIELD_OFFSET(FPO_DATA, cbProcSize, 4) + TEST_FIELD_SIZE (FPO_DATA, cdwLocals, 4) + TEST_FIELD_ALIGN (FPO_DATA, cdwLocals, 4) + TEST_FIELD_OFFSET(FPO_DATA, cdwLocals, 8) + TEST_FIELD_SIZE (FPO_DATA, cdwParams, 2) + TEST_FIELD_ALIGN (FPO_DATA, cdwParams, 2) + TEST_FIELD_OFFSET(FPO_DATA, cdwParams, 12) } static void test_pack_GENERIC_MAPPING(void) { /* GENERIC_MAPPING (pack 4) */ - TEST_TYPE(GENERIC_MAPPING, 16, 4); - TEST_FIELD(GENERIC_MAPPING, GenericRead, 0, 4, 4); - TEST_FIELD(GENERIC_MAPPING, GenericWrite, 4, 4, 4); - TEST_FIELD(GENERIC_MAPPING, GenericExecute, 8, 4, 4); - TEST_FIELD(GENERIC_MAPPING, GenericAll, 12, 4, 4); + TEST_TYPE_SIZE (GENERIC_MAPPING, 16) + TEST_TYPE_ALIGN (GENERIC_MAPPING, 4) + TEST_FIELD_SIZE (GENERIC_MAPPING, GenericRead, 4) + TEST_FIELD_ALIGN (GENERIC_MAPPING, GenericRead, 4) + TEST_FIELD_OFFSET(GENERIC_MAPPING, GenericRead, 0) + TEST_FIELD_SIZE (GENERIC_MAPPING, GenericWrite, 4) + TEST_FIELD_ALIGN (GENERIC_MAPPING, GenericWrite, 4) + TEST_FIELD_OFFSET(GENERIC_MAPPING, GenericWrite, 4) + TEST_FIELD_SIZE (GENERIC_MAPPING, GenericExecute, 4) + TEST_FIELD_ALIGN (GENERIC_MAPPING, GenericExecute, 4) + TEST_FIELD_OFFSET(GENERIC_MAPPING, GenericExecute, 8) + TEST_FIELD_SIZE (GENERIC_MAPPING, GenericAll, 4) + TEST_FIELD_ALIGN (GENERIC_MAPPING, GenericAll, 4) + TEST_FIELD_OFFSET(GENERIC_MAPPING, GenericAll, 12) } static void test_pack_HANDLE(void) { /* HANDLE */ - TEST_TYPE(HANDLE, 4, 4); + TEST_TYPE_SIZE (HANDLE, 4) + TEST_TYPE_ALIGN (HANDLE, 4) } static void test_pack_HRESULT(void) { /* HRESULT */ - TEST_TYPE(HRESULT, 4, 4); + TEST_TYPE_SIZE (HRESULT, 4) + TEST_TYPE_ALIGN (HRESULT, 4) } static void test_pack_IMAGE_ARCHIVE_MEMBER_HEADER(void) { /* IMAGE_ARCHIVE_MEMBER_HEADER (pack 4) */ - TEST_TYPE(IMAGE_ARCHIVE_MEMBER_HEADER, 60, 1); - TEST_FIELD(IMAGE_ARCHIVE_MEMBER_HEADER, Name, 0, 16, 1); - TEST_FIELD(IMAGE_ARCHIVE_MEMBER_HEADER, Date, 16, 12, 1); - TEST_FIELD(IMAGE_ARCHIVE_MEMBER_HEADER, UserID, 28, 6, 1); - TEST_FIELD(IMAGE_ARCHIVE_MEMBER_HEADER, GroupID, 34, 6, 1); - TEST_FIELD(IMAGE_ARCHIVE_MEMBER_HEADER, Mode, 40, 8, 1); - TEST_FIELD(IMAGE_ARCHIVE_MEMBER_HEADER, Size, 48, 10, 1); - TEST_FIELD(IMAGE_ARCHIVE_MEMBER_HEADER, EndHeader, 58, 2, 1); + TEST_TYPE_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, 60) + TEST_TYPE_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, 1) + TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, Name, 16) + TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, Name, 1) + TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, Name, 0) + TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, Date, 12) + TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, Date, 1) + TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, Date, 16) + TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, UserID, 6) + TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, UserID, 1) + TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, UserID, 28) + TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, GroupID, 6) + TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, GroupID, 1) + TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, GroupID, 34) + TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, Mode, 8) + TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, Mode, 1) + TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, Mode, 40) + TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, Size, 10) + TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, Size, 1) + TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, Size, 48) + TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, EndHeader, 2) + TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, EndHeader, 1) + TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, EndHeader, 58) } static void test_pack_IMAGE_AUX_SYMBOL(void) @@ -447,146 +572,304 @@ static void test_pack_IMAGE_AUX_SYMBOL(void) static void test_pack_IMAGE_BASE_RELOCATION(void) { /* IMAGE_BASE_RELOCATION (pack 4) */ - TEST_TYPE(IMAGE_BASE_RELOCATION, 8, 4); - TEST_FIELD(IMAGE_BASE_RELOCATION, VirtualAddress, 0, 4, 4); - TEST_FIELD(IMAGE_BASE_RELOCATION, SizeOfBlock, 4, 4, 4); + TEST_TYPE_SIZE (IMAGE_BASE_RELOCATION, 8) + TEST_TYPE_ALIGN (IMAGE_BASE_RELOCATION, 4) + TEST_FIELD_SIZE (IMAGE_BASE_RELOCATION, VirtualAddress, 4) + TEST_FIELD_ALIGN (IMAGE_BASE_RELOCATION, VirtualAddress, 4) + TEST_FIELD_OFFSET(IMAGE_BASE_RELOCATION, VirtualAddress, 0) + TEST_FIELD_SIZE (IMAGE_BASE_RELOCATION, SizeOfBlock, 4) + TEST_FIELD_ALIGN (IMAGE_BASE_RELOCATION, SizeOfBlock, 4) + TEST_FIELD_OFFSET(IMAGE_BASE_RELOCATION, SizeOfBlock, 4) } static void test_pack_IMAGE_BOUND_FORWARDER_REF(void) { /* IMAGE_BOUND_FORWARDER_REF (pack 4) */ - TEST_TYPE(IMAGE_BOUND_FORWARDER_REF, 8, 4); - TEST_FIELD(IMAGE_BOUND_FORWARDER_REF, TimeDateStamp, 0, 4, 4); - TEST_FIELD(IMAGE_BOUND_FORWARDER_REF, OffsetModuleName, 4, 2, 2); - TEST_FIELD(IMAGE_BOUND_FORWARDER_REF, Reserved, 6, 2, 2); + TEST_TYPE_SIZE (IMAGE_BOUND_FORWARDER_REF, 8) + TEST_TYPE_ALIGN (IMAGE_BOUND_FORWARDER_REF, 4) + TEST_FIELD_SIZE (IMAGE_BOUND_FORWARDER_REF, TimeDateStamp, 4) + TEST_FIELD_ALIGN (IMAGE_BOUND_FORWARDER_REF, TimeDateStamp, 4) + TEST_FIELD_OFFSET(IMAGE_BOUND_FORWARDER_REF, TimeDateStamp, 0) + TEST_FIELD_SIZE (IMAGE_BOUND_FORWARDER_REF, OffsetModuleName, 2) + TEST_FIELD_ALIGN (IMAGE_BOUND_FORWARDER_REF, OffsetModuleName, 2) + TEST_FIELD_OFFSET(IMAGE_BOUND_FORWARDER_REF, OffsetModuleName, 4) + TEST_FIELD_SIZE (IMAGE_BOUND_FORWARDER_REF, Reserved, 2) + TEST_FIELD_ALIGN (IMAGE_BOUND_FORWARDER_REF, Reserved, 2) + TEST_FIELD_OFFSET(IMAGE_BOUND_FORWARDER_REF, Reserved, 6) } static void test_pack_IMAGE_BOUND_IMPORT_DESCRIPTOR(void) { /* IMAGE_BOUND_IMPORT_DESCRIPTOR (pack 4) */ - TEST_TYPE(IMAGE_BOUND_IMPORT_DESCRIPTOR, 8, 4); - TEST_FIELD(IMAGE_BOUND_IMPORT_DESCRIPTOR, TimeDateStamp, 0, 4, 4); - TEST_FIELD(IMAGE_BOUND_IMPORT_DESCRIPTOR, OffsetModuleName, 4, 2, 2); - TEST_FIELD(IMAGE_BOUND_IMPORT_DESCRIPTOR, NumberOfModuleForwarderRefs, 6, 2, 2); + TEST_TYPE_SIZE (IMAGE_BOUND_IMPORT_DESCRIPTOR, 8) + TEST_TYPE_ALIGN (IMAGE_BOUND_IMPORT_DESCRIPTOR, 4) + TEST_FIELD_SIZE (IMAGE_BOUND_IMPORT_DESCRIPTOR, TimeDateStamp, 4) + TEST_FIELD_ALIGN (IMAGE_BOUND_IMPORT_DESCRIPTOR, TimeDateStamp, 4) + TEST_FIELD_OFFSET(IMAGE_BOUND_IMPORT_DESCRIPTOR, TimeDateStamp, 0) + TEST_FIELD_SIZE (IMAGE_BOUND_IMPORT_DESCRIPTOR, OffsetModuleName, 2) + TEST_FIELD_ALIGN (IMAGE_BOUND_IMPORT_DESCRIPTOR, OffsetModuleName, 2) + TEST_FIELD_OFFSET(IMAGE_BOUND_IMPORT_DESCRIPTOR, OffsetModuleName, 4) + TEST_FIELD_SIZE (IMAGE_BOUND_IMPORT_DESCRIPTOR, NumberOfModuleForwarderRefs, 2) + TEST_FIELD_ALIGN (IMAGE_BOUND_IMPORT_DESCRIPTOR, NumberOfModuleForwarderRefs, 2) + TEST_FIELD_OFFSET(IMAGE_BOUND_IMPORT_DESCRIPTOR, NumberOfModuleForwarderRefs, 6) } static void test_pack_IMAGE_COFF_SYMBOLS_HEADER(void) { /* IMAGE_COFF_SYMBOLS_HEADER (pack 4) */ - TEST_TYPE(IMAGE_COFF_SYMBOLS_HEADER, 32, 4); - TEST_FIELD(IMAGE_COFF_SYMBOLS_HEADER, NumberOfSymbols, 0, 4, 4); - TEST_FIELD(IMAGE_COFF_SYMBOLS_HEADER, LvaToFirstSymbol, 4, 4, 4); - TEST_FIELD(IMAGE_COFF_SYMBOLS_HEADER, NumberOfLinenumbers, 8, 4, 4); - TEST_FIELD(IMAGE_COFF_SYMBOLS_HEADER, LvaToFirstLinenumber, 12, 4, 4); - TEST_FIELD(IMAGE_COFF_SYMBOLS_HEADER, RvaToFirstByteOfCode, 16, 4, 4); - TEST_FIELD(IMAGE_COFF_SYMBOLS_HEADER, RvaToLastByteOfCode, 20, 4, 4); - TEST_FIELD(IMAGE_COFF_SYMBOLS_HEADER, RvaToFirstByteOfData, 24, 4, 4); - TEST_FIELD(IMAGE_COFF_SYMBOLS_HEADER, RvaToLastByteOfData, 28, 4, 4); + TEST_TYPE_SIZE (IMAGE_COFF_SYMBOLS_HEADER, 32) + TEST_TYPE_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, 4) + TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, NumberOfSymbols, 4) + TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, NumberOfSymbols, 4) + TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, NumberOfSymbols, 0) + TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, LvaToFirstSymbol, 4) + TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, LvaToFirstSymbol, 4) + TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, LvaToFirstSymbol, 4) + TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, NumberOfLinenumbers, 4) + TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, NumberOfLinenumbers, 4) + TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, NumberOfLinenumbers, 8) + TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, LvaToFirstLinenumber, 4) + TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, LvaToFirstLinenumber, 4) + TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, LvaToFirstLinenumber, 12) + TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, RvaToFirstByteOfCode, 4) + TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, RvaToFirstByteOfCode, 4) + TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, RvaToFirstByteOfCode, 16) + TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, RvaToLastByteOfCode, 4) + TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, RvaToLastByteOfCode, 4) + TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, RvaToLastByteOfCode, 20) + TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, RvaToFirstByteOfData, 4) + TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, RvaToFirstByteOfData, 4) + TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, RvaToFirstByteOfData, 24) + TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, RvaToLastByteOfData, 4) + TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, RvaToLastByteOfData, 4) + TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, RvaToLastByteOfData, 28) } static void test_pack_IMAGE_DATA_DIRECTORY(void) { /* IMAGE_DATA_DIRECTORY (pack 4) */ - TEST_TYPE(IMAGE_DATA_DIRECTORY, 8, 4); - TEST_FIELD(IMAGE_DATA_DIRECTORY, VirtualAddress, 0, 4, 4); - TEST_FIELD(IMAGE_DATA_DIRECTORY, Size, 4, 4, 4); + TEST_TYPE_SIZE (IMAGE_DATA_DIRECTORY, 8) + TEST_TYPE_ALIGN (IMAGE_DATA_DIRECTORY, 4) + TEST_FIELD_SIZE (IMAGE_DATA_DIRECTORY, VirtualAddress, 4) + TEST_FIELD_ALIGN (IMAGE_DATA_DIRECTORY, VirtualAddress, 4) + TEST_FIELD_OFFSET(IMAGE_DATA_DIRECTORY, VirtualAddress, 0) + TEST_FIELD_SIZE (IMAGE_DATA_DIRECTORY, Size, 4) + TEST_FIELD_ALIGN (IMAGE_DATA_DIRECTORY, Size, 4) + TEST_FIELD_OFFSET(IMAGE_DATA_DIRECTORY, Size, 4) } static void test_pack_IMAGE_DEBUG_DIRECTORY(void) { /* IMAGE_DEBUG_DIRECTORY (pack 4) */ - TEST_TYPE(IMAGE_DEBUG_DIRECTORY, 28, 4); - TEST_FIELD(IMAGE_DEBUG_DIRECTORY, Characteristics, 0, 4, 4); - TEST_FIELD(IMAGE_DEBUG_DIRECTORY, TimeDateStamp, 4, 4, 4); - TEST_FIELD(IMAGE_DEBUG_DIRECTORY, MajorVersion, 8, 2, 2); - TEST_FIELD(IMAGE_DEBUG_DIRECTORY, MinorVersion, 10, 2, 2); - TEST_FIELD(IMAGE_DEBUG_DIRECTORY, Type, 12, 4, 4); - TEST_FIELD(IMAGE_DEBUG_DIRECTORY, SizeOfData, 16, 4, 4); - TEST_FIELD(IMAGE_DEBUG_DIRECTORY, AddressOfRawData, 20, 4, 4); - TEST_FIELD(IMAGE_DEBUG_DIRECTORY, PointerToRawData, 24, 4, 4); + TEST_TYPE_SIZE (IMAGE_DEBUG_DIRECTORY, 28) + TEST_TYPE_ALIGN (IMAGE_DEBUG_DIRECTORY, 4) + TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, Characteristics, 4) + TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, Characteristics, 4) + TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, Characteristics, 0) + TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, TimeDateStamp, 4) + TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, TimeDateStamp, 4) + TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, TimeDateStamp, 4) + TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, MajorVersion, 2) + TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, MajorVersion, 2) + TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, MajorVersion, 8) + TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, MinorVersion, 2) + TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, MinorVersion, 2) + TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, MinorVersion, 10) + TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, Type, 4) + TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, Type, 4) + TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, Type, 12) + TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, SizeOfData, 4) + TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, SizeOfData, 4) + TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, SizeOfData, 16) + TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, AddressOfRawData, 4) + TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, AddressOfRawData, 4) + TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, AddressOfRawData, 20) + TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, PointerToRawData, 4) + TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, PointerToRawData, 4) + TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, PointerToRawData, 24) } static void test_pack_IMAGE_DEBUG_MISC(void) { /* IMAGE_DEBUG_MISC (pack 4) */ - TEST_TYPE(IMAGE_DEBUG_MISC, 16, 4); - TEST_FIELD(IMAGE_DEBUG_MISC, DataType, 0, 4, 4); - TEST_FIELD(IMAGE_DEBUG_MISC, Length, 4, 4, 4); - TEST_FIELD(IMAGE_DEBUG_MISC, Unicode, 8, 1, 1); - TEST_FIELD(IMAGE_DEBUG_MISC, Reserved, 9, 3, 1); - TEST_FIELD(IMAGE_DEBUG_MISC, Data, 12, 1, 1); + TEST_TYPE_SIZE (IMAGE_DEBUG_MISC, 16) + TEST_TYPE_ALIGN (IMAGE_DEBUG_MISC, 4) + TEST_FIELD_SIZE (IMAGE_DEBUG_MISC, DataType, 4) + TEST_FIELD_ALIGN (IMAGE_DEBUG_MISC, DataType, 4) + TEST_FIELD_OFFSET(IMAGE_DEBUG_MISC, DataType, 0) + TEST_FIELD_SIZE (IMAGE_DEBUG_MISC, Length, 4) + TEST_FIELD_ALIGN (IMAGE_DEBUG_MISC, Length, 4) + TEST_FIELD_OFFSET(IMAGE_DEBUG_MISC, Length, 4) + TEST_FIELD_SIZE (IMAGE_DEBUG_MISC, Unicode, 1) + TEST_FIELD_ALIGN (IMAGE_DEBUG_MISC, Unicode, 1) + TEST_FIELD_OFFSET(IMAGE_DEBUG_MISC, Unicode, 8) + TEST_FIELD_SIZE (IMAGE_DEBUG_MISC, Reserved, 3) + TEST_FIELD_ALIGN (IMAGE_DEBUG_MISC, Reserved, 1) + TEST_FIELD_OFFSET(IMAGE_DEBUG_MISC, Reserved, 9) + TEST_FIELD_SIZE (IMAGE_DEBUG_MISC, Data, 1) + TEST_FIELD_ALIGN (IMAGE_DEBUG_MISC, Data, 1) + TEST_FIELD_OFFSET(IMAGE_DEBUG_MISC, Data, 12) } static void test_pack_IMAGE_DOS_HEADER(void) { /* IMAGE_DOS_HEADER (pack 2) */ - TEST_TYPE(IMAGE_DOS_HEADER, 64, 2); - TEST_FIELD(IMAGE_DOS_HEADER, e_magic, 0, 2, 2); - TEST_FIELD(IMAGE_DOS_HEADER, e_cblp, 2, 2, 2); - TEST_FIELD(IMAGE_DOS_HEADER, e_cp, 4, 2, 2); - TEST_FIELD(IMAGE_DOS_HEADER, e_crlc, 6, 2, 2); - TEST_FIELD(IMAGE_DOS_HEADER, e_cparhdr, 8, 2, 2); - TEST_FIELD(IMAGE_DOS_HEADER, e_minalloc, 10, 2, 2); - TEST_FIELD(IMAGE_DOS_HEADER, e_maxalloc, 12, 2, 2); - TEST_FIELD(IMAGE_DOS_HEADER, e_ss, 14, 2, 2); - TEST_FIELD(IMAGE_DOS_HEADER, e_sp, 16, 2, 2); - TEST_FIELD(IMAGE_DOS_HEADER, e_csum, 18, 2, 2); - TEST_FIELD(IMAGE_DOS_HEADER, e_ip, 20, 2, 2); - TEST_FIELD(IMAGE_DOS_HEADER, e_cs, 22, 2, 2); - TEST_FIELD(IMAGE_DOS_HEADER, e_lfarlc, 24, 2, 2); - TEST_FIELD(IMAGE_DOS_HEADER, e_ovno, 26, 2, 2); - TEST_FIELD(IMAGE_DOS_HEADER, e_res, 28, 8, 2); - TEST_FIELD(IMAGE_DOS_HEADER, e_oemid, 36, 2, 2); - TEST_FIELD(IMAGE_DOS_HEADER, e_oeminfo, 38, 2, 2); - TEST_FIELD(IMAGE_DOS_HEADER, e_res2, 40, 20, 2); - TEST_FIELD(IMAGE_DOS_HEADER, e_lfanew, 60, 4, 2); + TEST_TYPE_SIZE (IMAGE_DOS_HEADER, 64) + TEST_TYPE_ALIGN (IMAGE_DOS_HEADER, 2) + TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_magic, 2) + TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_magic, 2) + TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_magic, 0) + TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_cblp, 2) + TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_cblp, 2) + TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_cblp, 2) + TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_cp, 2) + TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_cp, 2) + TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_cp, 4) + TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_crlc, 2) + TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_crlc, 2) + TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_crlc, 6) + TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_cparhdr, 2) + TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_cparhdr, 2) + TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_cparhdr, 8) + TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_minalloc, 2) + TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_minalloc, 2) + TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_minalloc, 10) + TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_maxalloc, 2) + TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_maxalloc, 2) + TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_maxalloc, 12) + TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_ss, 2) + TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_ss, 2) + TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_ss, 14) + TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_sp, 2) + TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_sp, 2) + TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_sp, 16) + TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_csum, 2) + TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_csum, 2) + TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_csum, 18) + TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_ip, 2) + TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_ip, 2) + TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_ip, 20) + TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_cs, 2) + TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_cs, 2) + TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_cs, 22) + TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_lfarlc, 2) + TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_lfarlc, 2) + TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_lfarlc, 24) + TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_ovno, 2) + TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_ovno, 2) + TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_ovno, 26) + TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_res, 8) + TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_res, 2) + TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_res, 28) + TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_oemid, 2) + TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_oemid, 2) + TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_oemid, 36) + TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_oeminfo, 2) + TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_oeminfo, 2) + TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_oeminfo, 38) + TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_res2, 20) + TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_res2, 2) + TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_res2, 40) + TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_lfanew, 4) + TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_lfanew, 2) + TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_lfanew, 60) } static void test_pack_IMAGE_EXPORT_DIRECTORY(void) { /* IMAGE_EXPORT_DIRECTORY (pack 4) */ - TEST_TYPE(IMAGE_EXPORT_DIRECTORY, 40, 4); - TEST_FIELD(IMAGE_EXPORT_DIRECTORY, Characteristics, 0, 4, 4); - TEST_FIELD(IMAGE_EXPORT_DIRECTORY, TimeDateStamp, 4, 4, 4); - TEST_FIELD(IMAGE_EXPORT_DIRECTORY, MajorVersion, 8, 2, 2); - TEST_FIELD(IMAGE_EXPORT_DIRECTORY, MinorVersion, 10, 2, 2); - TEST_FIELD(IMAGE_EXPORT_DIRECTORY, Name, 12, 4, 4); - TEST_FIELD(IMAGE_EXPORT_DIRECTORY, Base, 16, 4, 4); - TEST_FIELD(IMAGE_EXPORT_DIRECTORY, NumberOfFunctions, 20, 4, 4); - TEST_FIELD(IMAGE_EXPORT_DIRECTORY, NumberOfNames, 24, 4, 4); - TEST_FIELD(IMAGE_EXPORT_DIRECTORY, AddressOfFunctions, 28, 4, 4); - TEST_FIELD(IMAGE_EXPORT_DIRECTORY, AddressOfNames, 32, 4, 4); - TEST_FIELD(IMAGE_EXPORT_DIRECTORY, AddressOfNameOrdinals, 36, 4, 4); + TEST_TYPE_SIZE (IMAGE_EXPORT_DIRECTORY, 40) + TEST_TYPE_ALIGN (IMAGE_EXPORT_DIRECTORY, 4) + TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, Characteristics, 4) + TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, Characteristics, 4) + TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, Characteristics, 0) + TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, TimeDateStamp, 4) + TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, TimeDateStamp, 4) + TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, TimeDateStamp, 4) + TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, MajorVersion, 2) + TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, MajorVersion, 2) + TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, MajorVersion, 8) + TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, MinorVersion, 2) + TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, MinorVersion, 2) + TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, MinorVersion, 10) + TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, Name, 4) + TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, Name, 4) + TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, Name, 12) + TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, Base, 4) + TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, Base, 4) + TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, Base, 16) + TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, NumberOfFunctions, 4) + TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, NumberOfFunctions, 4) + TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, NumberOfFunctions, 20) + TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, NumberOfNames, 4) + TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, NumberOfNames, 4) + TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, NumberOfNames, 24) + TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, AddressOfFunctions, 4) + TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, AddressOfFunctions, 4) + TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, AddressOfFunctions, 28) + TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, AddressOfNames, 4) + TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, AddressOfNames, 4) + TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, AddressOfNames, 32) + TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, AddressOfNameOrdinals, 4) + TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, AddressOfNameOrdinals, 4) + TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, AddressOfNameOrdinals, 36) } static void test_pack_IMAGE_FILE_HEADER(void) { /* IMAGE_FILE_HEADER (pack 4) */ - TEST_TYPE(IMAGE_FILE_HEADER, 20, 4); - TEST_FIELD(IMAGE_FILE_HEADER, Machine, 0, 2, 2); - TEST_FIELD(IMAGE_FILE_HEADER, NumberOfSections, 2, 2, 2); - TEST_FIELD(IMAGE_FILE_HEADER, TimeDateStamp, 4, 4, 4); - TEST_FIELD(IMAGE_FILE_HEADER, PointerToSymbolTable, 8, 4, 4); - TEST_FIELD(IMAGE_FILE_HEADER, NumberOfSymbols, 12, 4, 4); - TEST_FIELD(IMAGE_FILE_HEADER, SizeOfOptionalHeader, 16, 2, 2); - TEST_FIELD(IMAGE_FILE_HEADER, Characteristics, 18, 2, 2); + TEST_TYPE_SIZE (IMAGE_FILE_HEADER, 20) + TEST_TYPE_ALIGN (IMAGE_FILE_HEADER, 4) + TEST_FIELD_SIZE (IMAGE_FILE_HEADER, Machine, 2) + TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, Machine, 2) + TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, Machine, 0) + TEST_FIELD_SIZE (IMAGE_FILE_HEADER, NumberOfSections, 2) + TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, NumberOfSections, 2) + TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, NumberOfSections, 2) + TEST_FIELD_SIZE (IMAGE_FILE_HEADER, TimeDateStamp, 4) + TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, TimeDateStamp, 4) + TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, TimeDateStamp, 4) + TEST_FIELD_SIZE (IMAGE_FILE_HEADER, PointerToSymbolTable, 4) + TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, PointerToSymbolTable, 4) + TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, PointerToSymbolTable, 8) + TEST_FIELD_SIZE (IMAGE_FILE_HEADER, NumberOfSymbols, 4) + TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, NumberOfSymbols, 4) + TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, NumberOfSymbols, 12) + TEST_FIELD_SIZE (IMAGE_FILE_HEADER, SizeOfOptionalHeader, 2) + TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, SizeOfOptionalHeader, 2) + TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, SizeOfOptionalHeader, 16) + TEST_FIELD_SIZE (IMAGE_FILE_HEADER, Characteristics, 2) + TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, Characteristics, 2) + TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, Characteristics, 18) } static void test_pack_IMAGE_FUNCTION_ENTRY(void) { /* IMAGE_FUNCTION_ENTRY (pack 4) */ - TEST_TYPE(IMAGE_FUNCTION_ENTRY, 12, 4); - TEST_FIELD(IMAGE_FUNCTION_ENTRY, StartingAddress, 0, 4, 4); - TEST_FIELD(IMAGE_FUNCTION_ENTRY, EndingAddress, 4, 4, 4); - TEST_FIELD(IMAGE_FUNCTION_ENTRY, EndOfPrologue, 8, 4, 4); + TEST_TYPE_SIZE (IMAGE_FUNCTION_ENTRY, 12) + TEST_TYPE_ALIGN (IMAGE_FUNCTION_ENTRY, 4) + TEST_FIELD_SIZE (IMAGE_FUNCTION_ENTRY, StartingAddress, 4) + TEST_FIELD_ALIGN (IMAGE_FUNCTION_ENTRY, StartingAddress, 4) + TEST_FIELD_OFFSET(IMAGE_FUNCTION_ENTRY, StartingAddress, 0) + TEST_FIELD_SIZE (IMAGE_FUNCTION_ENTRY, EndingAddress, 4) + TEST_FIELD_ALIGN (IMAGE_FUNCTION_ENTRY, EndingAddress, 4) + TEST_FIELD_OFFSET(IMAGE_FUNCTION_ENTRY, EndingAddress, 4) + TEST_FIELD_SIZE (IMAGE_FUNCTION_ENTRY, EndOfPrologue, 4) + TEST_FIELD_ALIGN (IMAGE_FUNCTION_ENTRY, EndOfPrologue, 4) + TEST_FIELD_OFFSET(IMAGE_FUNCTION_ENTRY, EndOfPrologue, 8) } static void test_pack_IMAGE_IMPORT_BY_NAME(void) { /* IMAGE_IMPORT_BY_NAME (pack 4) */ - TEST_TYPE(IMAGE_IMPORT_BY_NAME, 4, 2); - TEST_FIELD(IMAGE_IMPORT_BY_NAME, Hint, 0, 2, 2); - TEST_FIELD(IMAGE_IMPORT_BY_NAME, Name, 2, 1, 1); + TEST_TYPE_SIZE (IMAGE_IMPORT_BY_NAME, 4) + TEST_TYPE_ALIGN (IMAGE_IMPORT_BY_NAME, 2) + TEST_FIELD_SIZE (IMAGE_IMPORT_BY_NAME, Hint, 2) + TEST_FIELD_ALIGN (IMAGE_IMPORT_BY_NAME, Hint, 2) + TEST_FIELD_OFFSET(IMAGE_IMPORT_BY_NAME, Hint, 0) + TEST_FIELD_SIZE (IMAGE_IMPORT_BY_NAME, Name, 1) + TEST_FIELD_ALIGN (IMAGE_IMPORT_BY_NAME, Name, 1) + TEST_FIELD_OFFSET(IMAGE_IMPORT_BY_NAME, Name, 2) } static void test_pack_IMAGE_IMPORT_DESCRIPTOR(void) @@ -602,69 +885,172 @@ static void test_pack_IMAGE_LINENUMBER(void) static void test_pack_IMAGE_LOAD_CONFIG_DIRECTORY(void) { /* IMAGE_LOAD_CONFIG_DIRECTORY (pack 4) */ - TEST_TYPE(IMAGE_LOAD_CONFIG_DIRECTORY, 72, 4); - TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, Size, 0, 4, 4); - TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, TimeDateStamp, 4, 4, 4); - TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, MajorVersion, 8, 2, 2); - TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, MinorVersion, 10, 2, 2); - TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, GlobalFlagsClear, 12, 4, 4); - TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, GlobalFlagsSet, 16, 4, 4); - TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, CriticalSectionDefaultTimeout, 20, 4, 4); - TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, DeCommitFreeBlockThreshold, 24, 4, 4); - TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, DeCommitTotalFreeThreshold, 28, 4, 4); - TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, LockPrefixTable, 32, 4, 4); - TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, MaximumAllocationSize, 36, 4, 4); - TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, VirtualMemoryThreshold, 40, 4, 4); - TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, ProcessHeapFlags, 44, 4, 4); - TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, ProcessAffinityMask, 48, 4, 4); - TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, CSDVersion, 52, 2, 2); - TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, Reserved1, 54, 2, 2); - TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, EditList, 56, 4, 4); - TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, SecurityCookie, 60, 4, 4); - TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, SEHandlerTable, 64, 4, 4); - TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, SEHandlerCount, 68, 4, 4); + TEST_TYPE_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, 72) + TEST_TYPE_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, 4) + TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, Size, 4) + TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, Size, 4) + TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, Size, 0) + TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, TimeDateStamp, 4) + TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, TimeDateStamp, 4) + TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, TimeDateStamp, 4) + TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, MajorVersion, 2) + TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, MajorVersion, 2) + TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, MajorVersion, 8) + TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, MinorVersion, 2) + TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, MinorVersion, 2) + TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, MinorVersion, 10) + TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, GlobalFlagsClear, 4) + TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, GlobalFlagsClear, 4) + TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, GlobalFlagsClear, 12) + TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, GlobalFlagsSet, 4) + TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, GlobalFlagsSet, 4) + TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, GlobalFlagsSet, 16) + TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, CriticalSectionDefaultTimeout, 4) + TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, CriticalSectionDefaultTimeout, 4) + TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, CriticalSectionDefaultTimeout, 20) + TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, DeCommitFreeBlockThreshold, 4) + TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, DeCommitFreeBlockThreshold, 4) + TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, DeCommitFreeBlockThreshold, 24) + TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, DeCommitTotalFreeThreshold, 4) + TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, DeCommitTotalFreeThreshold, 4) + TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, DeCommitTotalFreeThreshold, 28) + TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, LockPrefixTable, 4) + TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, LockPrefixTable, 4) + TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, LockPrefixTable, 32) + TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, MaximumAllocationSize, 4) + TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, MaximumAllocationSize, 4) + TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, MaximumAllocationSize, 36) + TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, VirtualMemoryThreshold, 4) + TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, VirtualMemoryThreshold, 4) + TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, VirtualMemoryThreshold, 40) + TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, ProcessHeapFlags, 4) + TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, ProcessHeapFlags, 4) + TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, ProcessHeapFlags, 44) + TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, ProcessAffinityMask, 4) + TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, ProcessAffinityMask, 4) + TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, ProcessAffinityMask, 48) + TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, CSDVersion, 2) + TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, CSDVersion, 2) + TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, CSDVersion, 52) + TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, Reserved1, 2) + TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, Reserved1, 2) + TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, Reserved1, 54) + TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, EditList, 4) + TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, EditList, 4) + TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, EditList, 56) + TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, SecurityCookie, 4) + TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, SecurityCookie, 4) + TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, SecurityCookie, 60) + TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, SEHandlerTable, 4) + TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, SEHandlerTable, 4) + TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, SEHandlerTable, 64) + TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, SEHandlerCount, 4) + TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, SEHandlerCount, 4) + TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, SEHandlerCount, 68) } static void test_pack_IMAGE_NT_HEADERS(void) { /* IMAGE_NT_HEADERS */ - TEST_TYPE(IMAGE_NT_HEADERS, 248, 4); + TEST_TYPE_SIZE (IMAGE_NT_HEADERS, 248) + TEST_TYPE_ALIGN (IMAGE_NT_HEADERS, 4) } static void test_pack_IMAGE_OS2_HEADER(void) { /* IMAGE_OS2_HEADER (pack 2) */ - TEST_TYPE(IMAGE_OS2_HEADER, 64, 2); - TEST_FIELD(IMAGE_OS2_HEADER, ne_magic, 0, 2, 2); - TEST_FIELD(IMAGE_OS2_HEADER, ne_ver, 2, 1, 1); - TEST_FIELD(IMAGE_OS2_HEADER, ne_rev, 3, 1, 1); - TEST_FIELD(IMAGE_OS2_HEADER, ne_enttab, 4, 2, 2); - TEST_FIELD(IMAGE_OS2_HEADER, ne_cbenttab, 6, 2, 2); - TEST_FIELD(IMAGE_OS2_HEADER, ne_crc, 8, 4, 2); - TEST_FIELD(IMAGE_OS2_HEADER, ne_flags, 12, 2, 2); - TEST_FIELD(IMAGE_OS2_HEADER, ne_autodata, 14, 2, 2); - TEST_FIELD(IMAGE_OS2_HEADER, ne_heap, 16, 2, 2); - TEST_FIELD(IMAGE_OS2_HEADER, ne_stack, 18, 2, 2); - TEST_FIELD(IMAGE_OS2_HEADER, ne_csip, 20, 4, 2); - TEST_FIELD(IMAGE_OS2_HEADER, ne_sssp, 24, 4, 2); - TEST_FIELD(IMAGE_OS2_HEADER, ne_cseg, 28, 2, 2); - TEST_FIELD(IMAGE_OS2_HEADER, ne_cmod, 30, 2, 2); - TEST_FIELD(IMAGE_OS2_HEADER, ne_cbnrestab, 32, 2, 2); - TEST_FIELD(IMAGE_OS2_HEADER, ne_segtab, 34, 2, 2); - TEST_FIELD(IMAGE_OS2_HEADER, ne_rsrctab, 36, 2, 2); - TEST_FIELD(IMAGE_OS2_HEADER, ne_restab, 38, 2, 2); - TEST_FIELD(IMAGE_OS2_HEADER, ne_modtab, 40, 2, 2); - TEST_FIELD(IMAGE_OS2_HEADER, ne_imptab, 42, 2, 2); - TEST_FIELD(IMAGE_OS2_HEADER, ne_nrestab, 44, 4, 2); - TEST_FIELD(IMAGE_OS2_HEADER, ne_cmovent, 48, 2, 2); - TEST_FIELD(IMAGE_OS2_HEADER, ne_align, 50, 2, 2); - TEST_FIELD(IMAGE_OS2_HEADER, ne_cres, 52, 2, 2); - TEST_FIELD(IMAGE_OS2_HEADER, ne_exetyp, 54, 1, 1); - TEST_FIELD(IMAGE_OS2_HEADER, ne_flagsothers, 55, 1, 1); - TEST_FIELD(IMAGE_OS2_HEADER, ne_pretthunks, 56, 2, 2); - TEST_FIELD(IMAGE_OS2_HEADER, ne_psegrefbytes, 58, 2, 2); - TEST_FIELD(IMAGE_OS2_HEADER, ne_swaparea, 60, 2, 2); - TEST_FIELD(IMAGE_OS2_HEADER, ne_expver, 62, 2, 2); + TEST_TYPE_SIZE (IMAGE_OS2_HEADER, 64) + TEST_TYPE_ALIGN (IMAGE_OS2_HEADER, 2) + TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_magic, 2) + TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_magic, 2) + TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_magic, 0) + TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_ver, 1) + TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_ver, 1) + TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_ver, 2) + TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_rev, 1) + TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_rev, 1) + TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_rev, 3) + TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_enttab, 2) + TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_enttab, 2) + TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_enttab, 4) + TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_cbenttab, 2) + TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_cbenttab, 2) + TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_cbenttab, 6) + TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_crc, 4) + TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_crc, 2) + TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_crc, 8) + TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_flags, 2) + TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_flags, 2) + TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_flags, 12) + TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_autodata, 2) + TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_autodata, 2) + TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_autodata, 14) + TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_heap, 2) + TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_heap, 2) + TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_heap, 16) + TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_stack, 2) + TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_stack, 2) + TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_stack, 18) + TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_csip, 4) + TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_csip, 2) + TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_csip, 20) + TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_sssp, 4) + TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_sssp, 2) + TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_sssp, 24) + TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_cseg, 2) + TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_cseg, 2) + TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_cseg, 28) + TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_cmod, 2) + TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_cmod, 2) + TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_cmod, 30) + TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_cbnrestab, 2) + TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_cbnrestab, 2) + TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_cbnrestab, 32) + TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_segtab, 2) + TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_segtab, 2) + TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_segtab, 34) + TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_rsrctab, 2) + TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_rsrctab, 2) + TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_rsrctab, 36) + TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_restab, 2) + TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_restab, 2) + TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_restab, 38) + TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_modtab, 2) + TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_modtab, 2) + TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_modtab, 40) + TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_imptab, 2) + TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_imptab, 2) + TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_imptab, 42) + TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_nrestab, 4) + TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_nrestab, 2) + TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_nrestab, 44) + TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_cmovent, 2) + TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_cmovent, 2) + TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_cmovent, 48) + TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_align, 2) + TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_align, 2) + TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_align, 50) + TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_cres, 2) + TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_cres, 2) + TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_cres, 52) + TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_exetyp, 1) + TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_exetyp, 1) + TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_exetyp, 54) + TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_flagsothers, 1) + TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_flagsothers, 1) + TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_flagsothers, 55) + TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_pretthunks, 2) + TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_pretthunks, 2) + TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_pretthunks, 56) + TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_psegrefbytes, 2) + TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_psegrefbytes, 2) + TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_psegrefbytes, 58) + TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_swaparea, 2) + TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_swaparea, 2) + TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_swaparea, 60) + TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_expver, 2) + TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_expver, 2) + TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_expver, 62) } static void test_pack_IMAGE_RELOCATION(void) @@ -675,23 +1061,45 @@ static void test_pack_IMAGE_RELOCATION(void) static void test_pack_IMAGE_RESOURCE_DATA_ENTRY(void) { /* IMAGE_RESOURCE_DATA_ENTRY (pack 4) */ - TEST_TYPE(IMAGE_RESOURCE_DATA_ENTRY, 16, 4); - TEST_FIELD(IMAGE_RESOURCE_DATA_ENTRY, OffsetToData, 0, 4, 4); - TEST_FIELD(IMAGE_RESOURCE_DATA_ENTRY, Size, 4, 4, 4); - TEST_FIELD(IMAGE_RESOURCE_DATA_ENTRY, CodePage, 8, 4, 4); - TEST_FIELD(IMAGE_RESOURCE_DATA_ENTRY, Reserved, 12, 4, 4); + TEST_TYPE_SIZE (IMAGE_RESOURCE_DATA_ENTRY, 16) + TEST_TYPE_ALIGN (IMAGE_RESOURCE_DATA_ENTRY, 4) + TEST_FIELD_SIZE (IMAGE_RESOURCE_DATA_ENTRY, OffsetToData, 4) + TEST_FIELD_ALIGN (IMAGE_RESOURCE_DATA_ENTRY, OffsetToData, 4) + TEST_FIELD_OFFSET(IMAGE_RESOURCE_DATA_ENTRY, OffsetToData, 0) + TEST_FIELD_SIZE (IMAGE_RESOURCE_DATA_ENTRY, Size, 4) + TEST_FIELD_ALIGN (IMAGE_RESOURCE_DATA_ENTRY, Size, 4) + TEST_FIELD_OFFSET(IMAGE_RESOURCE_DATA_ENTRY, Size, 4) + TEST_FIELD_SIZE (IMAGE_RESOURCE_DATA_ENTRY, CodePage, 4) + TEST_FIELD_ALIGN (IMAGE_RESOURCE_DATA_ENTRY, CodePage, 4) + TEST_FIELD_OFFSET(IMAGE_RESOURCE_DATA_ENTRY, CodePage, 8) + TEST_FIELD_SIZE (IMAGE_RESOURCE_DATA_ENTRY, Reserved, 4) + TEST_FIELD_ALIGN (IMAGE_RESOURCE_DATA_ENTRY, Reserved, 4) + TEST_FIELD_OFFSET(IMAGE_RESOURCE_DATA_ENTRY, Reserved, 12) } static void test_pack_IMAGE_RESOURCE_DIRECTORY(void) { /* IMAGE_RESOURCE_DIRECTORY (pack 4) */ - TEST_TYPE(IMAGE_RESOURCE_DIRECTORY, 16, 4); - TEST_FIELD(IMAGE_RESOURCE_DIRECTORY, Characteristics, 0, 4, 4); - TEST_FIELD(IMAGE_RESOURCE_DIRECTORY, TimeDateStamp, 4, 4, 4); - TEST_FIELD(IMAGE_RESOURCE_DIRECTORY, MajorVersion, 8, 2, 2); - TEST_FIELD(IMAGE_RESOURCE_DIRECTORY, MinorVersion, 10, 2, 2); - TEST_FIELD(IMAGE_RESOURCE_DIRECTORY, NumberOfNamedEntries, 12, 2, 2); - TEST_FIELD(IMAGE_RESOURCE_DIRECTORY, NumberOfIdEntries, 14, 2, 2); + TEST_TYPE_SIZE (IMAGE_RESOURCE_DIRECTORY, 16) + TEST_TYPE_ALIGN (IMAGE_RESOURCE_DIRECTORY, 4) + TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY, Characteristics, 4) + TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY, Characteristics, 4) + TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY, Characteristics, 0) + TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY, TimeDateStamp, 4) + TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY, TimeDateStamp, 4) + TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY, TimeDateStamp, 4) + TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY, MajorVersion, 2) + TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY, MajorVersion, 2) + TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY, MajorVersion, 8) + TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY, MinorVersion, 2) + TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY, MinorVersion, 2) + TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY, MinorVersion, 10) + TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY, NumberOfNamedEntries, 2) + TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY, NumberOfNamedEntries, 2) + TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY, NumberOfNamedEntries, 12) + TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY, NumberOfIdEntries, 2) + TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY, NumberOfIdEntries, 2) + TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY, NumberOfIdEntries, 14) } static void test_pack_IMAGE_RESOURCE_DIRECTORY_ENTRY(void) @@ -702,42 +1110,81 @@ static void test_pack_IMAGE_RESOURCE_DIRECTORY_ENTRY(void) static void test_pack_IMAGE_RESOURCE_DIRECTORY_STRING(void) { /* IMAGE_RESOURCE_DIRECTORY_STRING (pack 4) */ - TEST_TYPE(IMAGE_RESOURCE_DIRECTORY_STRING, 4, 2); - TEST_FIELD(IMAGE_RESOURCE_DIRECTORY_STRING, Length, 0, 2, 2); - TEST_FIELD(IMAGE_RESOURCE_DIRECTORY_STRING, NameString, 2, 1, 1); + TEST_TYPE_SIZE (IMAGE_RESOURCE_DIRECTORY_STRING, 4) + TEST_TYPE_ALIGN (IMAGE_RESOURCE_DIRECTORY_STRING, 2) + TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY_STRING, Length, 2) + TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY_STRING, Length, 2) + TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY_STRING, Length, 0) + TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY_STRING, NameString, 1) + TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY_STRING, NameString, 1) + TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY_STRING, NameString, 2) } static void test_pack_IMAGE_RESOURCE_DIR_STRING_U(void) { /* IMAGE_RESOURCE_DIR_STRING_U (pack 4) */ - TEST_TYPE(IMAGE_RESOURCE_DIR_STRING_U, 4, 2); - TEST_FIELD(IMAGE_RESOURCE_DIR_STRING_U, Length, 0, 2, 2); - TEST_FIELD(IMAGE_RESOURCE_DIR_STRING_U, NameString, 2, 2, 2); + TEST_TYPE_SIZE (IMAGE_RESOURCE_DIR_STRING_U, 4) + TEST_TYPE_ALIGN (IMAGE_RESOURCE_DIR_STRING_U, 2) + TEST_FIELD_SIZE (IMAGE_RESOURCE_DIR_STRING_U, Length, 2) + TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIR_STRING_U, Length, 2) + TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIR_STRING_U, Length, 0) + TEST_FIELD_SIZE (IMAGE_RESOURCE_DIR_STRING_U, NameString, 2) + TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIR_STRING_U, NameString, 2) + TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIR_STRING_U, NameString, 2) } static void test_pack_IMAGE_SECTION_HEADER(void) { /* IMAGE_SECTION_HEADER (pack 4) */ - TEST_FIELD(IMAGE_SECTION_HEADER, Name, 0, 8, 1); + TEST_FIELD_SIZE (IMAGE_SECTION_HEADER, Name, 8) + TEST_FIELD_ALIGN (IMAGE_SECTION_HEADER, Name, 1) + TEST_FIELD_OFFSET(IMAGE_SECTION_HEADER, Name, 0) } static void test_pack_IMAGE_SEPARATE_DEBUG_HEADER(void) { /* IMAGE_SEPARATE_DEBUG_HEADER (pack 4) */ - TEST_TYPE(IMAGE_SEPARATE_DEBUG_HEADER, 48, 4); - TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, Signature, 0, 2, 2); - TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, Flags, 2, 2, 2); - TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, Machine, 4, 2, 2); - TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, Characteristics, 6, 2, 2); - TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, TimeDateStamp, 8, 4, 4); - TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, CheckSum, 12, 4, 4); - TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, ImageBase, 16, 4, 4); - TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, SizeOfImage, 20, 4, 4); - TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, NumberOfSections, 24, 4, 4); - TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, ExportedNamesSize, 28, 4, 4); - TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, DebugDirectorySize, 32, 4, 4); - TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, SectionAlignment, 36, 4, 4); - TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, Reserved, 40, 8, 4); + TEST_TYPE_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, 48) + TEST_TYPE_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, 4) + TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, Signature, 2) + TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, Signature, 2) + TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, Signature, 0) + TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, Flags, 2) + TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, Flags, 2) + TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, Flags, 2) + TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, Machine, 2) + TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, Machine, 2) + TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, Machine, 4) + TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, Characteristics, 2) + TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, Characteristics, 2) + TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, Characteristics, 6) + TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, TimeDateStamp, 4) + TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, TimeDateStamp, 4) + TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, TimeDateStamp, 8) + TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, CheckSum, 4) + TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, CheckSum, 4) + TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, CheckSum, 12) + TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, ImageBase, 4) + TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, ImageBase, 4) + TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, ImageBase, 16) + TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, SizeOfImage, 4) + TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, SizeOfImage, 4) + TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, SizeOfImage, 20) + TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, NumberOfSections, 4) + TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, NumberOfSections, 4) + TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, NumberOfSections, 24) + TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, ExportedNamesSize, 4) + TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, ExportedNamesSize, 4) + TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, ExportedNamesSize, 28) + TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, DebugDirectorySize, 4) + TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, DebugDirectorySize, 4) + TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, DebugDirectorySize, 32) + TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, SectionAlignment, 4) + TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, SectionAlignment, 4) + TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, SectionAlignment, 36) + TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, Reserved, 8) + TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, Reserved, 4) + TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, Reserved, 40) } static void test_pack_IMAGE_SYMBOL(void) @@ -753,83 +1200,201 @@ static void test_pack_IMAGE_THUNK_DATA(void) static void test_pack_IMAGE_TLS_DIRECTORY(void) { /* IMAGE_TLS_DIRECTORY */ - TEST_TYPE(IMAGE_TLS_DIRECTORY, 24, 4); + TEST_TYPE_SIZE (IMAGE_TLS_DIRECTORY, 24) + TEST_TYPE_ALIGN (IMAGE_TLS_DIRECTORY, 4) } static void test_pack_IMAGE_VXD_HEADER(void) { /* IMAGE_VXD_HEADER (pack 2) */ - TEST_TYPE(IMAGE_VXD_HEADER, 196, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_magic, 0, 2, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_border, 2, 1, 1); - TEST_FIELD(IMAGE_VXD_HEADER, e32_worder, 3, 1, 1); - TEST_FIELD(IMAGE_VXD_HEADER, e32_level, 4, 4, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_cpu, 8, 2, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_os, 10, 2, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_ver, 12, 4, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_mflags, 16, 4, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_mpages, 20, 4, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_startobj, 24, 4, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_eip, 28, 4, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_stackobj, 32, 4, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_esp, 36, 4, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_pagesize, 40, 4, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_lastpagesize, 44, 4, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_fixupsize, 48, 4, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_fixupsum, 52, 4, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_ldrsize, 56, 4, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_ldrsum, 60, 4, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_objtab, 64, 4, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_objcnt, 68, 4, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_objmap, 72, 4, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_itermap, 76, 4, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_rsrctab, 80, 4, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_rsrccnt, 84, 4, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_restab, 88, 4, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_enttab, 92, 4, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_dirtab, 96, 4, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_dircnt, 100, 4, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_fpagetab, 104, 4, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_frectab, 108, 4, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_impmod, 112, 4, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_impmodcnt, 116, 4, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_impproc, 120, 4, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_pagesum, 124, 4, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_datapage, 128, 4, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_preload, 132, 4, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_nrestab, 136, 4, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_cbnrestab, 140, 4, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_nressum, 144, 4, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_autodata, 148, 4, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_debuginfo, 152, 4, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_debuglen, 156, 4, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_instpreload, 160, 4, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_instdemand, 164, 4, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_heapsize, 168, 4, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_res3, 172, 12, 1); - TEST_FIELD(IMAGE_VXD_HEADER, e32_winresoff, 184, 4, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_winreslen, 188, 4, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_devid, 192, 2, 2); - TEST_FIELD(IMAGE_VXD_HEADER, e32_ddkver, 194, 2, 2); + TEST_TYPE_SIZE (IMAGE_VXD_HEADER, 196) + TEST_TYPE_ALIGN (IMAGE_VXD_HEADER, 2) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_magic, 2) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_magic, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_magic, 0) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_border, 1) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_border, 1) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_border, 2) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_worder, 1) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_worder, 1) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_worder, 3) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_level, 4) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_level, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_level, 4) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_cpu, 2) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_cpu, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_cpu, 8) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_os, 2) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_os, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_os, 10) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_ver, 4) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_ver, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_ver, 12) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_mflags, 4) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_mflags, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_mflags, 16) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_mpages, 4) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_mpages, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_mpages, 20) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_startobj, 4) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_startobj, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_startobj, 24) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_eip, 4) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_eip, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_eip, 28) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_stackobj, 4) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_stackobj, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_stackobj, 32) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_esp, 4) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_esp, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_esp, 36) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_pagesize, 4) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_pagesize, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_pagesize, 40) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_lastpagesize, 4) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_lastpagesize, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_lastpagesize, 44) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_fixupsize, 4) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_fixupsize, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_fixupsize, 48) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_fixupsum, 4) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_fixupsum, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_fixupsum, 52) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_ldrsize, 4) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_ldrsize, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_ldrsize, 56) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_ldrsum, 4) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_ldrsum, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_ldrsum, 60) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_objtab, 4) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_objtab, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_objtab, 64) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_objcnt, 4) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_objcnt, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_objcnt, 68) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_objmap, 4) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_objmap, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_objmap, 72) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_itermap, 4) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_itermap, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_itermap, 76) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_rsrctab, 4) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_rsrctab, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_rsrctab, 80) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_rsrccnt, 4) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_rsrccnt, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_rsrccnt, 84) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_restab, 4) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_restab, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_restab, 88) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_enttab, 4) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_enttab, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_enttab, 92) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_dirtab, 4) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_dirtab, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_dirtab, 96) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_dircnt, 4) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_dircnt, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_dircnt, 100) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_fpagetab, 4) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_fpagetab, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_fpagetab, 104) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_frectab, 4) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_frectab, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_frectab, 108) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_impmod, 4) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_impmod, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_impmod, 112) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_impmodcnt, 4) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_impmodcnt, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_impmodcnt, 116) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_impproc, 4) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_impproc, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_impproc, 120) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_pagesum, 4) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_pagesum, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_pagesum, 124) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_datapage, 4) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_datapage, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_datapage, 128) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_preload, 4) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_preload, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_preload, 132) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_nrestab, 4) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_nrestab, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_nrestab, 136) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_cbnrestab, 4) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_cbnrestab, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_cbnrestab, 140) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_nressum, 4) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_nressum, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_nressum, 144) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_autodata, 4) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_autodata, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_autodata, 148) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_debuginfo, 4) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_debuginfo, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_debuginfo, 152) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_debuglen, 4) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_debuglen, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_debuglen, 156) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_instpreload, 4) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_instpreload, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_instpreload, 160) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_instdemand, 4) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_instdemand, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_instdemand, 164) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_heapsize, 4) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_heapsize, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_heapsize, 168) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_res3, 12) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_res3, 1) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_res3, 172) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_winresoff, 4) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_winresoff, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_winresoff, 184) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_winreslen, 4) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_winreslen, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_winreslen, 188) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_devid, 2) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_devid, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_devid, 192) + TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_ddkver, 2) + TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_ddkver, 2) + TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_ddkver, 194) } static void test_pack_IO_COUNTERS(void) { /* IO_COUNTERS (pack 8) */ - TEST_TYPE(IO_COUNTERS, 48, 8); - TEST_FIELD(IO_COUNTERS, ReadOperationCount, 0, 8, 8); - TEST_FIELD(IO_COUNTERS, WriteOperationCount, 8, 8, 8); - TEST_FIELD(IO_COUNTERS, OtherOperationCount, 16, 8, 8); - TEST_FIELD(IO_COUNTERS, ReadTransferCount, 24, 8, 8); - TEST_FIELD(IO_COUNTERS, WriteTransferCount, 32, 8, 8); - TEST_FIELD(IO_COUNTERS, OtherTransferCount, 40, 8, 8); + TEST_TYPE_SIZE (IO_COUNTERS, 48) + TEST_TYPE_ALIGN (IO_COUNTERS, 8) + TEST_FIELD_SIZE (IO_COUNTERS, ReadOperationCount, 8) + TEST_FIELD_ALIGN (IO_COUNTERS, ReadOperationCount, 8) + TEST_FIELD_OFFSET(IO_COUNTERS, ReadOperationCount, 0) + TEST_FIELD_SIZE (IO_COUNTERS, WriteOperationCount, 8) + TEST_FIELD_ALIGN (IO_COUNTERS, WriteOperationCount, 8) + TEST_FIELD_OFFSET(IO_COUNTERS, WriteOperationCount, 8) + TEST_FIELD_SIZE (IO_COUNTERS, OtherOperationCount, 8) + TEST_FIELD_ALIGN (IO_COUNTERS, OtherOperationCount, 8) + TEST_FIELD_OFFSET(IO_COUNTERS, OtherOperationCount, 16) + TEST_FIELD_SIZE (IO_COUNTERS, ReadTransferCount, 8) + TEST_FIELD_ALIGN (IO_COUNTERS, ReadTransferCount, 8) + TEST_FIELD_OFFSET(IO_COUNTERS, ReadTransferCount, 24) + TEST_FIELD_SIZE (IO_COUNTERS, WriteTransferCount, 8) + TEST_FIELD_ALIGN (IO_COUNTERS, WriteTransferCount, 8) + TEST_FIELD_OFFSET(IO_COUNTERS, WriteTransferCount, 32) + TEST_FIELD_SIZE (IO_COUNTERS, OtherTransferCount, 8) + TEST_FIELD_ALIGN (IO_COUNTERS, OtherTransferCount, 8) + TEST_FIELD_OFFSET(IO_COUNTERS, OtherTransferCount, 40) } static void test_pack_LANGID(void) { /* LANGID */ - TEST_TYPE(LANGID, 2, 2); - TEST_TYPE_UNSIGNED(LANGID); + TEST_TYPE_SIZE (LANGID, 2) + TEST_TYPE_ALIGN (LANGID, 2) + TEST_TYPE_UNSIGNED(LANGID) } static void test_pack_LARGE_INTEGER(void) @@ -840,955 +1405,1361 @@ static void test_pack_LARGE_INTEGER(void) static void test_pack_LCID(void) { /* LCID */ - TEST_TYPE(LCID, 4, 4); - TEST_TYPE_UNSIGNED(LCID); + TEST_TYPE_SIZE (LCID, 4) + TEST_TYPE_ALIGN (LCID, 4) + TEST_TYPE_UNSIGNED(LCID) } static void test_pack_LIST_ENTRY(void) { /* LIST_ENTRY (pack 4) */ - TEST_TYPE(LIST_ENTRY, 8, 4); - TEST_FIELD(LIST_ENTRY, Flink, 0, 4, 4); - TEST_FIELD(LIST_ENTRY, Blink, 4, 4, 4); + TEST_TYPE_SIZE (LIST_ENTRY, 8) + TEST_TYPE_ALIGN (LIST_ENTRY, 4) + TEST_FIELD_SIZE (LIST_ENTRY, Flink, 4) + TEST_FIELD_ALIGN (LIST_ENTRY, Flink, 4) + TEST_FIELD_OFFSET(LIST_ENTRY, Flink, 0) + TEST_FIELD_SIZE (LIST_ENTRY, Blink, 4) + TEST_FIELD_ALIGN (LIST_ENTRY, Blink, 4) + TEST_FIELD_OFFSET(LIST_ENTRY, Blink, 4) } static void test_pack_LONG(void) { /* LONG */ - TEST_TYPE(LONG, 4, 4); - TEST_TYPE_SIGNED(LONG); + TEST_TYPE_SIZE (LONG, 4) + TEST_TYPE_ALIGN (LONG, 4) + TEST_TYPE_SIGNED(LONG) } static void test_pack_LONGLONG(void) { /* LONGLONG */ - TEST_TYPE(LONGLONG, 8, 8); - TEST_TYPE_SIGNED(LONGLONG); + TEST_TYPE_SIZE (LONGLONG, 8) + TEST_TYPE_ALIGN (LONGLONG, 8) + TEST_TYPE_SIGNED(LONGLONG) } static void test_pack_LUID(void) { /* LUID (pack 4) */ - TEST_TYPE(LUID, 8, 4); - TEST_FIELD(LUID, LowPart, 0, 4, 4); - TEST_FIELD(LUID, HighPart, 4, 4, 4); + TEST_TYPE_SIZE (LUID, 8) + TEST_TYPE_ALIGN (LUID, 4) + TEST_FIELD_SIZE (LUID, LowPart, 4) + TEST_FIELD_ALIGN (LUID, LowPart, 4) + TEST_FIELD_OFFSET(LUID, LowPart, 0) + TEST_FIELD_SIZE (LUID, HighPart, 4) + TEST_FIELD_ALIGN (LUID, HighPart, 4) + TEST_FIELD_OFFSET(LUID, HighPart, 4) } static void test_pack_LUID_AND_ATTRIBUTES(void) { /* LUID_AND_ATTRIBUTES (pack 4) */ - TEST_TYPE(LUID_AND_ATTRIBUTES, 12, 4); - TEST_FIELD(LUID_AND_ATTRIBUTES, Luid, 0, 8, 4); - TEST_FIELD(LUID_AND_ATTRIBUTES, Attributes, 8, 4, 4); + TEST_TYPE_SIZE (LUID_AND_ATTRIBUTES, 12) + TEST_TYPE_ALIGN (LUID_AND_ATTRIBUTES, 4) + TEST_FIELD_SIZE (LUID_AND_ATTRIBUTES, Luid, 8) + TEST_FIELD_ALIGN (LUID_AND_ATTRIBUTES, Luid, 4) + TEST_FIELD_OFFSET(LUID_AND_ATTRIBUTES, Luid, 0) + TEST_FIELD_SIZE (LUID_AND_ATTRIBUTES, Attributes, 4) + TEST_FIELD_ALIGN (LUID_AND_ATTRIBUTES, Attributes, 4) + TEST_FIELD_OFFSET(LUID_AND_ATTRIBUTES, Attributes, 8) } static void test_pack_MEMORY_BASIC_INFORMATION(void) { /* MEMORY_BASIC_INFORMATION (pack 4) */ - TEST_TYPE(MEMORY_BASIC_INFORMATION, 28, 4); - TEST_FIELD(MEMORY_BASIC_INFORMATION, BaseAddress, 0, 4, 4); - TEST_FIELD(MEMORY_BASIC_INFORMATION, AllocationBase, 4, 4, 4); - TEST_FIELD(MEMORY_BASIC_INFORMATION, AllocationProtect, 8, 4, 4); - TEST_FIELD(MEMORY_BASIC_INFORMATION, RegionSize, 12, 4, 4); - TEST_FIELD(MEMORY_BASIC_INFORMATION, State, 16, 4, 4); - TEST_FIELD(MEMORY_BASIC_INFORMATION, Protect, 20, 4, 4); - TEST_FIELD(MEMORY_BASIC_INFORMATION, Type, 24, 4, 4); + TEST_TYPE_SIZE (MEMORY_BASIC_INFORMATION, 28) + TEST_TYPE_ALIGN (MEMORY_BASIC_INFORMATION, 4) + TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, BaseAddress, 4) + TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, BaseAddress, 4) + TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, BaseAddress, 0) + TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, AllocationBase, 4) + TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, AllocationBase, 4) + TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, AllocationBase, 4) + TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, AllocationProtect, 4) + TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, AllocationProtect, 4) + TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, AllocationProtect, 8) + TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, RegionSize, 4) + TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, RegionSize, 4) + TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, RegionSize, 12) + TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, State, 4) + TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, State, 4) + TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, State, 16) + TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, Protect, 4) + TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, Protect, 4) + TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, Protect, 20) + TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, Type, 4) + TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, Type, 4) + TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, Type, 24) } static void test_pack_MESSAGE_RESOURCE_BLOCK(void) { /* MESSAGE_RESOURCE_BLOCK (pack 4) */ - TEST_TYPE(MESSAGE_RESOURCE_BLOCK, 12, 4); - TEST_FIELD(MESSAGE_RESOURCE_BLOCK, LowId, 0, 4, 4); - TEST_FIELD(MESSAGE_RESOURCE_BLOCK, HighId, 4, 4, 4); - TEST_FIELD(MESSAGE_RESOURCE_BLOCK, OffsetToEntries, 8, 4, 4); + TEST_TYPE_SIZE (MESSAGE_RESOURCE_BLOCK, 12) + TEST_TYPE_ALIGN (MESSAGE_RESOURCE_BLOCK, 4) + TEST_FIELD_SIZE (MESSAGE_RESOURCE_BLOCK, LowId, 4) + TEST_FIELD_ALIGN (MESSAGE_RESOURCE_BLOCK, LowId, 4) + TEST_FIELD_OFFSET(MESSAGE_RESOURCE_BLOCK, LowId, 0) + TEST_FIELD_SIZE (MESSAGE_RESOURCE_BLOCK, HighId, 4) + TEST_FIELD_ALIGN (MESSAGE_RESOURCE_BLOCK, HighId, 4) + TEST_FIELD_OFFSET(MESSAGE_RESOURCE_BLOCK, HighId, 4) + TEST_FIELD_SIZE (MESSAGE_RESOURCE_BLOCK, OffsetToEntries, 4) + TEST_FIELD_ALIGN (MESSAGE_RESOURCE_BLOCK, OffsetToEntries, 4) + TEST_FIELD_OFFSET(MESSAGE_RESOURCE_BLOCK, OffsetToEntries, 8) } static void test_pack_MESSAGE_RESOURCE_DATA(void) { /* MESSAGE_RESOURCE_DATA (pack 4) */ - TEST_TYPE(MESSAGE_RESOURCE_DATA, 16, 4); - TEST_FIELD(MESSAGE_RESOURCE_DATA, NumberOfBlocks, 0, 4, 4); - TEST_FIELD(MESSAGE_RESOURCE_DATA, Blocks, 4, 12, 4); + TEST_TYPE_SIZE (MESSAGE_RESOURCE_DATA, 16) + TEST_TYPE_ALIGN (MESSAGE_RESOURCE_DATA, 4) + TEST_FIELD_SIZE (MESSAGE_RESOURCE_DATA, NumberOfBlocks, 4) + TEST_FIELD_ALIGN (MESSAGE_RESOURCE_DATA, NumberOfBlocks, 4) + TEST_FIELD_OFFSET(MESSAGE_RESOURCE_DATA, NumberOfBlocks, 0) + TEST_FIELD_SIZE (MESSAGE_RESOURCE_DATA, Blocks, 12) + TEST_FIELD_ALIGN (MESSAGE_RESOURCE_DATA, Blocks, 4) + TEST_FIELD_OFFSET(MESSAGE_RESOURCE_DATA, Blocks, 4) } static void test_pack_MESSAGE_RESOURCE_ENTRY(void) { /* MESSAGE_RESOURCE_ENTRY (pack 4) */ - TEST_TYPE(MESSAGE_RESOURCE_ENTRY, 6, 2); - TEST_FIELD(MESSAGE_RESOURCE_ENTRY, Length, 0, 2, 2); - TEST_FIELD(MESSAGE_RESOURCE_ENTRY, Flags, 2, 2, 2); - TEST_FIELD(MESSAGE_RESOURCE_ENTRY, Text, 4, 1, 1); + TEST_TYPE_SIZE (MESSAGE_RESOURCE_ENTRY, 6) + TEST_TYPE_ALIGN (MESSAGE_RESOURCE_ENTRY, 2) + TEST_FIELD_SIZE (MESSAGE_RESOURCE_ENTRY, Length, 2) + TEST_FIELD_ALIGN (MESSAGE_RESOURCE_ENTRY, Length, 2) + TEST_FIELD_OFFSET(MESSAGE_RESOURCE_ENTRY, Length, 0) + TEST_FIELD_SIZE (MESSAGE_RESOURCE_ENTRY, Flags, 2) + TEST_FIELD_ALIGN (MESSAGE_RESOURCE_ENTRY, Flags, 2) + TEST_FIELD_OFFSET(MESSAGE_RESOURCE_ENTRY, Flags, 2) + TEST_FIELD_SIZE (MESSAGE_RESOURCE_ENTRY, Text, 1) + TEST_FIELD_ALIGN (MESSAGE_RESOURCE_ENTRY, Text, 1) + TEST_FIELD_OFFSET(MESSAGE_RESOURCE_ENTRY, Text, 4) } static void test_pack_NT_TIB(void) { /* NT_TIB (pack 4) */ - TEST_FIELD(NT_TIB, ExceptionList, 0, 4, 4); - TEST_FIELD(NT_TIB, StackBase, 4, 4, 4); - TEST_FIELD(NT_TIB, StackLimit, 8, 4, 4); - TEST_FIELD(NT_TIB, SubSystemTib, 12, 4, 4); + TEST_FIELD_SIZE (NT_TIB, ExceptionList, 4) + TEST_FIELD_ALIGN (NT_TIB, ExceptionList, 4) + TEST_FIELD_OFFSET(NT_TIB, ExceptionList, 0) + TEST_FIELD_SIZE (NT_TIB, StackBase, 4) + TEST_FIELD_ALIGN (NT_TIB, StackBase, 4) + TEST_FIELD_OFFSET(NT_TIB, StackBase, 4) + TEST_FIELD_SIZE (NT_TIB, StackLimit, 4) + TEST_FIELD_ALIGN (NT_TIB, StackLimit, 4) + TEST_FIELD_OFFSET(NT_TIB, StackLimit, 8) + TEST_FIELD_SIZE (NT_TIB, SubSystemTib, 4) + TEST_FIELD_ALIGN (NT_TIB, SubSystemTib, 4) + TEST_FIELD_OFFSET(NT_TIB, SubSystemTib, 12) } static void test_pack_OBJECT_TYPE_LIST(void) { /* OBJECT_TYPE_LIST (pack 4) */ - TEST_TYPE(OBJECT_TYPE_LIST, 8, 4); - TEST_FIELD(OBJECT_TYPE_LIST, Level, 0, 2, 2); - TEST_FIELD(OBJECT_TYPE_LIST, Sbz, 2, 2, 2); - TEST_FIELD(OBJECT_TYPE_LIST, ObjectType, 4, 4, 4); + TEST_TYPE_SIZE (OBJECT_TYPE_LIST, 8) + TEST_TYPE_ALIGN (OBJECT_TYPE_LIST, 4) + TEST_FIELD_SIZE (OBJECT_TYPE_LIST, Level, 2) + TEST_FIELD_ALIGN (OBJECT_TYPE_LIST, Level, 2) + TEST_FIELD_OFFSET(OBJECT_TYPE_LIST, Level, 0) + TEST_FIELD_SIZE (OBJECT_TYPE_LIST, Sbz, 2) + TEST_FIELD_ALIGN (OBJECT_TYPE_LIST, Sbz, 2) + TEST_FIELD_OFFSET(OBJECT_TYPE_LIST, Sbz, 2) + TEST_FIELD_SIZE (OBJECT_TYPE_LIST, ObjectType, 4) + TEST_FIELD_ALIGN (OBJECT_TYPE_LIST, ObjectType, 4) + TEST_FIELD_OFFSET(OBJECT_TYPE_LIST, ObjectType, 4) } static void test_pack_PACCESS_ALLOWED_ACE(void) { /* PACCESS_ALLOWED_ACE */ - TEST_TYPE(PACCESS_ALLOWED_ACE, 4, 4); - TEST_TYPE_POINTER(PACCESS_ALLOWED_ACE, 12, 4); + TEST_TYPE_SIZE (PACCESS_ALLOWED_ACE, 4) + TEST_TYPE_ALIGN (PACCESS_ALLOWED_ACE, 4) + TEST_TARGET_SIZE (PACCESS_ALLOWED_ACE, 12) + TEST_TARGET_ALIGN(PACCESS_ALLOWED_ACE, 4) } static void test_pack_PACCESS_DENIED_ACE(void) { /* PACCESS_DENIED_ACE */ - TEST_TYPE(PACCESS_DENIED_ACE, 4, 4); - TEST_TYPE_POINTER(PACCESS_DENIED_ACE, 12, 4); + TEST_TYPE_SIZE (PACCESS_DENIED_ACE, 4) + TEST_TYPE_ALIGN (PACCESS_DENIED_ACE, 4) + TEST_TARGET_SIZE (PACCESS_DENIED_ACE, 12) + TEST_TARGET_ALIGN(PACCESS_DENIED_ACE, 4) } static void test_pack_PACCESS_TOKEN(void) { /* PACCESS_TOKEN */ - TEST_TYPE(PACCESS_TOKEN, 4, 4); + TEST_TYPE_SIZE (PACCESS_TOKEN, 4) + TEST_TYPE_ALIGN (PACCESS_TOKEN, 4) } static void test_pack_PACE_HEADER(void) { /* PACE_HEADER */ - TEST_TYPE(PACE_HEADER, 4, 4); - TEST_TYPE_POINTER(PACE_HEADER, 4, 2); + TEST_TYPE_SIZE (PACE_HEADER, 4) + TEST_TYPE_ALIGN (PACE_HEADER, 4) + TEST_TARGET_SIZE (PACE_HEADER, 4) + TEST_TARGET_ALIGN(PACE_HEADER, 2) } static void test_pack_PACL(void) { /* PACL */ - TEST_TYPE(PACL, 4, 4); - TEST_TYPE_POINTER(PACL, 8, 2); + TEST_TYPE_SIZE (PACL, 4) + TEST_TYPE_ALIGN (PACL, 4) + TEST_TARGET_SIZE (PACL, 8) + TEST_TARGET_ALIGN(PACL, 2) } static void test_pack_PACL_REVISION_INFORMATION(void) { /* PACL_REVISION_INFORMATION */ - TEST_TYPE(PACL_REVISION_INFORMATION, 4, 4); - TEST_TYPE_POINTER(PACL_REVISION_INFORMATION, 4, 4); + TEST_TYPE_SIZE (PACL_REVISION_INFORMATION, 4) + TEST_TYPE_ALIGN (PACL_REVISION_INFORMATION, 4) + TEST_TARGET_SIZE (PACL_REVISION_INFORMATION, 4) + TEST_TARGET_ALIGN(PACL_REVISION_INFORMATION, 4) } static void test_pack_PACL_SIZE_INFORMATION(void) { /* PACL_SIZE_INFORMATION */ - TEST_TYPE(PACL_SIZE_INFORMATION, 4, 4); - TEST_TYPE_POINTER(PACL_SIZE_INFORMATION, 12, 4); + TEST_TYPE_SIZE (PACL_SIZE_INFORMATION, 4) + TEST_TYPE_ALIGN (PACL_SIZE_INFORMATION, 4) + TEST_TARGET_SIZE (PACL_SIZE_INFORMATION, 12) + TEST_TARGET_ALIGN(PACL_SIZE_INFORMATION, 4) } static void test_pack_PCCH(void) { /* PCCH */ - TEST_TYPE(PCCH, 4, 4); - TEST_TYPE_POINTER(PCCH, 1, 1); + TEST_TYPE_SIZE (PCCH, 4) + TEST_TYPE_ALIGN (PCCH, 4) + TEST_TARGET_SIZE (PCCH, 1) + TEST_TARGET_ALIGN(PCCH, 1) } static void test_pack_PCH(void) { /* PCH */ - TEST_TYPE(PCH, 4, 4); - TEST_TYPE_POINTER(PCH, 1, 1); + TEST_TYPE_SIZE (PCH, 4) + TEST_TYPE_ALIGN (PCH, 4) + TEST_TARGET_SIZE (PCH, 1) + TEST_TARGET_ALIGN(PCH, 1) } static void test_pack_PCSTR(void) { /* PCSTR */ - TEST_TYPE(PCSTR, 4, 4); - TEST_TYPE_POINTER(PCSTR, 1, 1); + TEST_TYPE_SIZE (PCSTR, 4) + TEST_TYPE_ALIGN (PCSTR, 4) + TEST_TARGET_SIZE (PCSTR, 1) + TEST_TARGET_ALIGN(PCSTR, 1) } static void test_pack_PCTSTR(void) { /* PCTSTR */ - TEST_TYPE(PCTSTR, 4, 4); + TEST_TYPE_SIZE (PCTSTR, 4) + TEST_TYPE_ALIGN (PCTSTR, 4) } static void test_pack_PCWCH(void) { /* PCWCH */ - TEST_TYPE(PCWCH, 4, 4); - TEST_TYPE_POINTER(PCWCH, 2, 2); + TEST_TYPE_SIZE (PCWCH, 4) + TEST_TYPE_ALIGN (PCWCH, 4) + TEST_TARGET_SIZE (PCWCH, 2) + TEST_TARGET_ALIGN(PCWCH, 2) } static void test_pack_PCWSTR(void) { /* PCWSTR */ - TEST_TYPE(PCWSTR, 4, 4); - TEST_TYPE_POINTER(PCWSTR, 2, 2); + TEST_TYPE_SIZE (PCWSTR, 4) + TEST_TYPE_ALIGN (PCWSTR, 4) + TEST_TARGET_SIZE (PCWSTR, 2) + TEST_TARGET_ALIGN(PCWSTR, 2) } static void test_pack_PEXCEPTION_POINTERS(void) { /* PEXCEPTION_POINTERS */ - TEST_TYPE(PEXCEPTION_POINTERS, 4, 4); - TEST_TYPE_POINTER(PEXCEPTION_POINTERS, 8, 4); + TEST_TYPE_SIZE (PEXCEPTION_POINTERS, 4) + TEST_TYPE_ALIGN (PEXCEPTION_POINTERS, 4) + TEST_TARGET_SIZE (PEXCEPTION_POINTERS, 8) + TEST_TARGET_ALIGN(PEXCEPTION_POINTERS, 4) } static void test_pack_PEXCEPTION_RECORD(void) { /* PEXCEPTION_RECORD */ - TEST_TYPE(PEXCEPTION_RECORD, 4, 4); - TEST_TYPE_POINTER(PEXCEPTION_RECORD, 80, 4); + TEST_TYPE_SIZE (PEXCEPTION_RECORD, 4) + TEST_TYPE_ALIGN (PEXCEPTION_RECORD, 4) + TEST_TARGET_SIZE (PEXCEPTION_RECORD, 80) + TEST_TARGET_ALIGN(PEXCEPTION_RECORD, 4) } static void test_pack_PFLOATING_SAVE_AREA(void) { /* PFLOATING_SAVE_AREA */ - TEST_TYPE(PFLOATING_SAVE_AREA, 4, 4); - TEST_TYPE_POINTER(PFLOATING_SAVE_AREA, 112, 4); + TEST_TYPE_SIZE (PFLOATING_SAVE_AREA, 4) + TEST_TYPE_ALIGN (PFLOATING_SAVE_AREA, 4) + TEST_TARGET_SIZE (PFLOATING_SAVE_AREA, 112) + TEST_TARGET_ALIGN(PFLOATING_SAVE_AREA, 4) } static void test_pack_PFPO_DATA(void) { /* PFPO_DATA */ - TEST_TYPE(PFPO_DATA, 4, 4); - TEST_TYPE_POINTER(PFPO_DATA, 16, 4); + TEST_TYPE_SIZE (PFPO_DATA, 4) + TEST_TYPE_ALIGN (PFPO_DATA, 4) + TEST_TARGET_SIZE (PFPO_DATA, 16) + TEST_TARGET_ALIGN(PFPO_DATA, 4) } static void test_pack_PGENERIC_MAPPING(void) { /* PGENERIC_MAPPING */ - TEST_TYPE(PGENERIC_MAPPING, 4, 4); - TEST_TYPE_POINTER(PGENERIC_MAPPING, 16, 4); + TEST_TYPE_SIZE (PGENERIC_MAPPING, 4) + TEST_TYPE_ALIGN (PGENERIC_MAPPING, 4) + TEST_TARGET_SIZE (PGENERIC_MAPPING, 16) + TEST_TARGET_ALIGN(PGENERIC_MAPPING, 4) } static void test_pack_PHANDLE(void) { /* PHANDLE */ - TEST_TYPE(PHANDLE, 4, 4); - TEST_TYPE_POINTER(PHANDLE, 4, 4); + TEST_TYPE_SIZE (PHANDLE, 4) + TEST_TYPE_ALIGN (PHANDLE, 4) + TEST_TARGET_SIZE (PHANDLE, 4) + TEST_TARGET_ALIGN(PHANDLE, 4) } static void test_pack_PIMAGE_ARCHIVE_MEMBER_HEADER(void) { /* PIMAGE_ARCHIVE_MEMBER_HEADER */ - TEST_TYPE(PIMAGE_ARCHIVE_MEMBER_HEADER, 4, 4); - TEST_TYPE_POINTER(PIMAGE_ARCHIVE_MEMBER_HEADER, 60, 1); + TEST_TYPE_SIZE (PIMAGE_ARCHIVE_MEMBER_HEADER, 4) + TEST_TYPE_ALIGN (PIMAGE_ARCHIVE_MEMBER_HEADER, 4) + TEST_TARGET_SIZE (PIMAGE_ARCHIVE_MEMBER_HEADER, 60) + TEST_TARGET_ALIGN(PIMAGE_ARCHIVE_MEMBER_HEADER, 1) } static void test_pack_PIMAGE_AUX_SYMBOL(void) { /* PIMAGE_AUX_SYMBOL */ - TEST_TYPE(PIMAGE_AUX_SYMBOL, 4, 4); + TEST_TYPE_SIZE (PIMAGE_AUX_SYMBOL, 4) + TEST_TYPE_ALIGN (PIMAGE_AUX_SYMBOL, 4) } static void test_pack_PIMAGE_BASE_RELOCATION(void) { /* PIMAGE_BASE_RELOCATION */ - TEST_TYPE(PIMAGE_BASE_RELOCATION, 4, 4); - TEST_TYPE_POINTER(PIMAGE_BASE_RELOCATION, 8, 4); + TEST_TYPE_SIZE (PIMAGE_BASE_RELOCATION, 4) + TEST_TYPE_ALIGN (PIMAGE_BASE_RELOCATION, 4) + TEST_TARGET_SIZE (PIMAGE_BASE_RELOCATION, 8) + TEST_TARGET_ALIGN(PIMAGE_BASE_RELOCATION, 4) } static void test_pack_PIMAGE_BOUND_FORWARDER_REF(void) { /* PIMAGE_BOUND_FORWARDER_REF */ - TEST_TYPE(PIMAGE_BOUND_FORWARDER_REF, 4, 4); - TEST_TYPE_POINTER(PIMAGE_BOUND_FORWARDER_REF, 8, 4); + TEST_TYPE_SIZE (PIMAGE_BOUND_FORWARDER_REF, 4) + TEST_TYPE_ALIGN (PIMAGE_BOUND_FORWARDER_REF, 4) + TEST_TARGET_SIZE (PIMAGE_BOUND_FORWARDER_REF, 8) + TEST_TARGET_ALIGN(PIMAGE_BOUND_FORWARDER_REF, 4) } static void test_pack_PIMAGE_BOUND_IMPORT_DESCRIPTOR(void) { /* PIMAGE_BOUND_IMPORT_DESCRIPTOR */ - TEST_TYPE(PIMAGE_BOUND_IMPORT_DESCRIPTOR, 4, 4); - TEST_TYPE_POINTER(PIMAGE_BOUND_IMPORT_DESCRIPTOR, 8, 4); + TEST_TYPE_SIZE (PIMAGE_BOUND_IMPORT_DESCRIPTOR, 4) + TEST_TYPE_ALIGN (PIMAGE_BOUND_IMPORT_DESCRIPTOR, 4) + TEST_TARGET_SIZE (PIMAGE_BOUND_IMPORT_DESCRIPTOR, 8) + TEST_TARGET_ALIGN(PIMAGE_BOUND_IMPORT_DESCRIPTOR, 4) } static void test_pack_PIMAGE_COFF_SYMBOLS_HEADER(void) { /* PIMAGE_COFF_SYMBOLS_HEADER */ - TEST_TYPE(PIMAGE_COFF_SYMBOLS_HEADER, 4, 4); - TEST_TYPE_POINTER(PIMAGE_COFF_SYMBOLS_HEADER, 32, 4); + TEST_TYPE_SIZE (PIMAGE_COFF_SYMBOLS_HEADER, 4) + TEST_TYPE_ALIGN (PIMAGE_COFF_SYMBOLS_HEADER, 4) + TEST_TARGET_SIZE (PIMAGE_COFF_SYMBOLS_HEADER, 32) + TEST_TARGET_ALIGN(PIMAGE_COFF_SYMBOLS_HEADER, 4) } static void test_pack_PIMAGE_DATA_DIRECTORY(void) { /* PIMAGE_DATA_DIRECTORY */ - TEST_TYPE(PIMAGE_DATA_DIRECTORY, 4, 4); - TEST_TYPE_POINTER(PIMAGE_DATA_DIRECTORY, 8, 4); + TEST_TYPE_SIZE (PIMAGE_DATA_DIRECTORY, 4) + TEST_TYPE_ALIGN (PIMAGE_DATA_DIRECTORY, 4) + TEST_TARGET_SIZE (PIMAGE_DATA_DIRECTORY, 8) + TEST_TARGET_ALIGN(PIMAGE_DATA_DIRECTORY, 4) } static void test_pack_PIMAGE_DEBUG_DIRECTORY(void) { /* PIMAGE_DEBUG_DIRECTORY */ - TEST_TYPE(PIMAGE_DEBUG_DIRECTORY, 4, 4); - TEST_TYPE_POINTER(PIMAGE_DEBUG_DIRECTORY, 28, 4); + TEST_TYPE_SIZE (PIMAGE_DEBUG_DIRECTORY, 4) + TEST_TYPE_ALIGN (PIMAGE_DEBUG_DIRECTORY, 4) + TEST_TARGET_SIZE (PIMAGE_DEBUG_DIRECTORY, 28) + TEST_TARGET_ALIGN(PIMAGE_DEBUG_DIRECTORY, 4) } static void test_pack_PIMAGE_DEBUG_MISC(void) { /* PIMAGE_DEBUG_MISC */ - TEST_TYPE(PIMAGE_DEBUG_MISC, 4, 4); - TEST_TYPE_POINTER(PIMAGE_DEBUG_MISC, 16, 4); + TEST_TYPE_SIZE (PIMAGE_DEBUG_MISC, 4) + TEST_TYPE_ALIGN (PIMAGE_DEBUG_MISC, 4) + TEST_TARGET_SIZE (PIMAGE_DEBUG_MISC, 16) + TEST_TARGET_ALIGN(PIMAGE_DEBUG_MISC, 4) } static void test_pack_PIMAGE_DOS_HEADER(void) { /* PIMAGE_DOS_HEADER */ - TEST_TYPE(PIMAGE_DOS_HEADER, 4, 4); - TEST_TYPE_POINTER(PIMAGE_DOS_HEADER, 64, 2); + TEST_TYPE_SIZE (PIMAGE_DOS_HEADER, 4) + TEST_TYPE_ALIGN (PIMAGE_DOS_HEADER, 4) + TEST_TARGET_SIZE (PIMAGE_DOS_HEADER, 64) + TEST_TARGET_ALIGN(PIMAGE_DOS_HEADER, 2) } static void test_pack_PIMAGE_EXPORT_DIRECTORY(void) { /* PIMAGE_EXPORT_DIRECTORY */ - TEST_TYPE(PIMAGE_EXPORT_DIRECTORY, 4, 4); - TEST_TYPE_POINTER(PIMAGE_EXPORT_DIRECTORY, 40, 4); + TEST_TYPE_SIZE (PIMAGE_EXPORT_DIRECTORY, 4) + TEST_TYPE_ALIGN (PIMAGE_EXPORT_DIRECTORY, 4) + TEST_TARGET_SIZE (PIMAGE_EXPORT_DIRECTORY, 40) + TEST_TARGET_ALIGN(PIMAGE_EXPORT_DIRECTORY, 4) } static void test_pack_PIMAGE_FILE_HEADER(void) { /* PIMAGE_FILE_HEADER */ - TEST_TYPE(PIMAGE_FILE_HEADER, 4, 4); - TEST_TYPE_POINTER(PIMAGE_FILE_HEADER, 20, 4); + TEST_TYPE_SIZE (PIMAGE_FILE_HEADER, 4) + TEST_TYPE_ALIGN (PIMAGE_FILE_HEADER, 4) + TEST_TARGET_SIZE (PIMAGE_FILE_HEADER, 20) + TEST_TARGET_ALIGN(PIMAGE_FILE_HEADER, 4) } static void test_pack_PIMAGE_FUNCTION_ENTRY(void) { /* PIMAGE_FUNCTION_ENTRY */ - TEST_TYPE(PIMAGE_FUNCTION_ENTRY, 4, 4); - TEST_TYPE_POINTER(PIMAGE_FUNCTION_ENTRY, 12, 4); + TEST_TYPE_SIZE (PIMAGE_FUNCTION_ENTRY, 4) + TEST_TYPE_ALIGN (PIMAGE_FUNCTION_ENTRY, 4) + TEST_TARGET_SIZE (PIMAGE_FUNCTION_ENTRY, 12) + TEST_TARGET_ALIGN(PIMAGE_FUNCTION_ENTRY, 4) } static void test_pack_PIMAGE_IMPORT_BY_NAME(void) { /* PIMAGE_IMPORT_BY_NAME */ - TEST_TYPE(PIMAGE_IMPORT_BY_NAME, 4, 4); - TEST_TYPE_POINTER(PIMAGE_IMPORT_BY_NAME, 4, 2); + TEST_TYPE_SIZE (PIMAGE_IMPORT_BY_NAME, 4) + TEST_TYPE_ALIGN (PIMAGE_IMPORT_BY_NAME, 4) + TEST_TARGET_SIZE (PIMAGE_IMPORT_BY_NAME, 4) + TEST_TARGET_ALIGN(PIMAGE_IMPORT_BY_NAME, 2) } static void test_pack_PIMAGE_IMPORT_DESCRIPTOR(void) { /* PIMAGE_IMPORT_DESCRIPTOR */ - TEST_TYPE(PIMAGE_IMPORT_DESCRIPTOR, 4, 4); + TEST_TYPE_SIZE (PIMAGE_IMPORT_DESCRIPTOR, 4) + TEST_TYPE_ALIGN (PIMAGE_IMPORT_DESCRIPTOR, 4) } static void test_pack_PIMAGE_LINENUMBER(void) { /* PIMAGE_LINENUMBER */ - TEST_TYPE(PIMAGE_LINENUMBER, 4, 4); + TEST_TYPE_SIZE (PIMAGE_LINENUMBER, 4) + TEST_TYPE_ALIGN (PIMAGE_LINENUMBER, 4) } static void test_pack_PIMAGE_LOAD_CONFIG_DIRECTORY(void) { /* PIMAGE_LOAD_CONFIG_DIRECTORY */ - TEST_TYPE(PIMAGE_LOAD_CONFIG_DIRECTORY, 4, 4); - TEST_TYPE_POINTER(PIMAGE_LOAD_CONFIG_DIRECTORY, 72, 4); + TEST_TYPE_SIZE (PIMAGE_LOAD_CONFIG_DIRECTORY, 4) + TEST_TYPE_ALIGN (PIMAGE_LOAD_CONFIG_DIRECTORY, 4) + TEST_TARGET_SIZE (PIMAGE_LOAD_CONFIG_DIRECTORY, 72) + TEST_TARGET_ALIGN(PIMAGE_LOAD_CONFIG_DIRECTORY, 4) } static void test_pack_PIMAGE_NT_HEADERS(void) { /* PIMAGE_NT_HEADERS */ - TEST_TYPE(PIMAGE_NT_HEADERS, 4, 4); + TEST_TYPE_SIZE (PIMAGE_NT_HEADERS, 4) + TEST_TYPE_ALIGN (PIMAGE_NT_HEADERS, 4) } static void test_pack_PIMAGE_OPTIONAL_HEADER(void) { /* PIMAGE_OPTIONAL_HEADER */ - TEST_TYPE(PIMAGE_OPTIONAL_HEADER, 4, 4); + TEST_TYPE_SIZE (PIMAGE_OPTIONAL_HEADER, 4) + TEST_TYPE_ALIGN (PIMAGE_OPTIONAL_HEADER, 4) } static void test_pack_PIMAGE_OS2_HEADER(void) { /* PIMAGE_OS2_HEADER */ - TEST_TYPE(PIMAGE_OS2_HEADER, 4, 4); - TEST_TYPE_POINTER(PIMAGE_OS2_HEADER, 64, 2); + TEST_TYPE_SIZE (PIMAGE_OS2_HEADER, 4) + TEST_TYPE_ALIGN (PIMAGE_OS2_HEADER, 4) + TEST_TARGET_SIZE (PIMAGE_OS2_HEADER, 64) + TEST_TARGET_ALIGN(PIMAGE_OS2_HEADER, 2) } static void test_pack_PIMAGE_RELOCATION(void) { /* PIMAGE_RELOCATION */ - TEST_TYPE(PIMAGE_RELOCATION, 4, 4); + TEST_TYPE_SIZE (PIMAGE_RELOCATION, 4) + TEST_TYPE_ALIGN (PIMAGE_RELOCATION, 4) } static void test_pack_PIMAGE_RESOURCE_DATA_ENTRY(void) { /* PIMAGE_RESOURCE_DATA_ENTRY */ - TEST_TYPE(PIMAGE_RESOURCE_DATA_ENTRY, 4, 4); - TEST_TYPE_POINTER(PIMAGE_RESOURCE_DATA_ENTRY, 16, 4); + TEST_TYPE_SIZE (PIMAGE_RESOURCE_DATA_ENTRY, 4) + TEST_TYPE_ALIGN (PIMAGE_RESOURCE_DATA_ENTRY, 4) + TEST_TARGET_SIZE (PIMAGE_RESOURCE_DATA_ENTRY, 16) + TEST_TARGET_ALIGN(PIMAGE_RESOURCE_DATA_ENTRY, 4) } static void test_pack_PIMAGE_RESOURCE_DIRECTORY(void) { /* PIMAGE_RESOURCE_DIRECTORY */ - TEST_TYPE(PIMAGE_RESOURCE_DIRECTORY, 4, 4); - TEST_TYPE_POINTER(PIMAGE_RESOURCE_DIRECTORY, 16, 4); + TEST_TYPE_SIZE (PIMAGE_RESOURCE_DIRECTORY, 4) + TEST_TYPE_ALIGN (PIMAGE_RESOURCE_DIRECTORY, 4) + TEST_TARGET_SIZE (PIMAGE_RESOURCE_DIRECTORY, 16) + TEST_TARGET_ALIGN(PIMAGE_RESOURCE_DIRECTORY, 4) } static void test_pack_PIMAGE_RESOURCE_DIRECTORY_ENTRY(void) { /* PIMAGE_RESOURCE_DIRECTORY_ENTRY */ - TEST_TYPE(PIMAGE_RESOURCE_DIRECTORY_ENTRY, 4, 4); + TEST_TYPE_SIZE (PIMAGE_RESOURCE_DIRECTORY_ENTRY, 4) + TEST_TYPE_ALIGN (PIMAGE_RESOURCE_DIRECTORY_ENTRY, 4) } static void test_pack_PIMAGE_RESOURCE_DIRECTORY_STRING(void) { /* PIMAGE_RESOURCE_DIRECTORY_STRING */ - TEST_TYPE(PIMAGE_RESOURCE_DIRECTORY_STRING, 4, 4); - TEST_TYPE_POINTER(PIMAGE_RESOURCE_DIRECTORY_STRING, 4, 2); + TEST_TYPE_SIZE (PIMAGE_RESOURCE_DIRECTORY_STRING, 4) + TEST_TYPE_ALIGN (PIMAGE_RESOURCE_DIRECTORY_STRING, 4) + TEST_TARGET_SIZE (PIMAGE_RESOURCE_DIRECTORY_STRING, 4) + TEST_TARGET_ALIGN(PIMAGE_RESOURCE_DIRECTORY_STRING, 2) } static void test_pack_PIMAGE_RESOURCE_DIR_STRING_U(void) { /* PIMAGE_RESOURCE_DIR_STRING_U */ - TEST_TYPE(PIMAGE_RESOURCE_DIR_STRING_U, 4, 4); - TEST_TYPE_POINTER(PIMAGE_RESOURCE_DIR_STRING_U, 4, 2); + TEST_TYPE_SIZE (PIMAGE_RESOURCE_DIR_STRING_U, 4) + TEST_TYPE_ALIGN (PIMAGE_RESOURCE_DIR_STRING_U, 4) + TEST_TARGET_SIZE (PIMAGE_RESOURCE_DIR_STRING_U, 4) + TEST_TARGET_ALIGN(PIMAGE_RESOURCE_DIR_STRING_U, 2) } static void test_pack_PIMAGE_SECTION_HEADER(void) { /* PIMAGE_SECTION_HEADER */ - TEST_TYPE(PIMAGE_SECTION_HEADER, 4, 4); + TEST_TYPE_SIZE (PIMAGE_SECTION_HEADER, 4) + TEST_TYPE_ALIGN (PIMAGE_SECTION_HEADER, 4) } static void test_pack_PIMAGE_SEPARATE_DEBUG_HEADER(void) { /* PIMAGE_SEPARATE_DEBUG_HEADER */ - TEST_TYPE(PIMAGE_SEPARATE_DEBUG_HEADER, 4, 4); - TEST_TYPE_POINTER(PIMAGE_SEPARATE_DEBUG_HEADER, 48, 4); + TEST_TYPE_SIZE (PIMAGE_SEPARATE_DEBUG_HEADER, 4) + TEST_TYPE_ALIGN (PIMAGE_SEPARATE_DEBUG_HEADER, 4) + TEST_TARGET_SIZE (PIMAGE_SEPARATE_DEBUG_HEADER, 48) + TEST_TARGET_ALIGN(PIMAGE_SEPARATE_DEBUG_HEADER, 4) } static void test_pack_PIMAGE_SYMBOL(void) { /* PIMAGE_SYMBOL */ - TEST_TYPE(PIMAGE_SYMBOL, 4, 4); + TEST_TYPE_SIZE (PIMAGE_SYMBOL, 4) + TEST_TYPE_ALIGN (PIMAGE_SYMBOL, 4) } static void test_pack_PIMAGE_THUNK_DATA(void) { /* PIMAGE_THUNK_DATA */ - TEST_TYPE(PIMAGE_THUNK_DATA, 4, 4); + TEST_TYPE_SIZE (PIMAGE_THUNK_DATA, 4) + TEST_TYPE_ALIGN (PIMAGE_THUNK_DATA, 4) } static void test_pack_PIMAGE_TLS_CALLBACK(void) { /* PIMAGE_TLS_CALLBACK */ - TEST_TYPE(PIMAGE_TLS_CALLBACK, 4, 4); + TEST_TYPE_SIZE (PIMAGE_TLS_CALLBACK, 4) + TEST_TYPE_ALIGN (PIMAGE_TLS_CALLBACK, 4) } static void test_pack_PIMAGE_TLS_DIRECTORY(void) { /* PIMAGE_TLS_DIRECTORY */ - TEST_TYPE(PIMAGE_TLS_DIRECTORY, 4, 4); + TEST_TYPE_SIZE (PIMAGE_TLS_DIRECTORY, 4) + TEST_TYPE_ALIGN (PIMAGE_TLS_DIRECTORY, 4) } static void test_pack_PIMAGE_VXD_HEADER(void) { /* PIMAGE_VXD_HEADER */ - TEST_TYPE(PIMAGE_VXD_HEADER, 4, 4); - TEST_TYPE_POINTER(PIMAGE_VXD_HEADER, 196, 2); + TEST_TYPE_SIZE (PIMAGE_VXD_HEADER, 4) + TEST_TYPE_ALIGN (PIMAGE_VXD_HEADER, 4) + TEST_TARGET_SIZE (PIMAGE_VXD_HEADER, 196) + TEST_TARGET_ALIGN(PIMAGE_VXD_HEADER, 2) } static void test_pack_PIO_COUNTERS(void) { /* PIO_COUNTERS */ - TEST_TYPE(PIO_COUNTERS, 4, 4); - TEST_TYPE_POINTER(PIO_COUNTERS, 48, 8); + TEST_TYPE_SIZE (PIO_COUNTERS, 4) + TEST_TYPE_ALIGN (PIO_COUNTERS, 4) + TEST_TARGET_SIZE (PIO_COUNTERS, 48) + TEST_TARGET_ALIGN(PIO_COUNTERS, 8) } static void test_pack_PISECURITY_DESCRIPTOR(void) { /* PISECURITY_DESCRIPTOR */ - TEST_TYPE(PISECURITY_DESCRIPTOR, 4, 4); - TEST_TYPE_POINTER(PISECURITY_DESCRIPTOR, 20, 4); + TEST_TYPE_SIZE (PISECURITY_DESCRIPTOR, 4) + TEST_TYPE_ALIGN (PISECURITY_DESCRIPTOR, 4) + TEST_TARGET_SIZE (PISECURITY_DESCRIPTOR, 20) + TEST_TARGET_ALIGN(PISECURITY_DESCRIPTOR, 4) } static void test_pack_PISECURITY_DESCRIPTOR_RELATIVE(void) { /* PISECURITY_DESCRIPTOR_RELATIVE */ - TEST_TYPE(PISECURITY_DESCRIPTOR_RELATIVE, 4, 4); - TEST_TYPE_POINTER(PISECURITY_DESCRIPTOR_RELATIVE, 20, 4); + TEST_TYPE_SIZE (PISECURITY_DESCRIPTOR_RELATIVE, 4) + TEST_TYPE_ALIGN (PISECURITY_DESCRIPTOR_RELATIVE, 4) + TEST_TARGET_SIZE (PISECURITY_DESCRIPTOR_RELATIVE, 20) + TEST_TARGET_ALIGN(PISECURITY_DESCRIPTOR_RELATIVE, 4) } static void test_pack_PISID(void) { /* PISID */ - TEST_TYPE(PISID, 4, 4); - TEST_TYPE_POINTER(PISID, 12, 4); + TEST_TYPE_SIZE (PISID, 4) + TEST_TYPE_ALIGN (PISID, 4) + TEST_TARGET_SIZE (PISID, 12) + TEST_TARGET_ALIGN(PISID, 4) } static void test_pack_PLARGE_INTEGER(void) { /* PLARGE_INTEGER */ - TEST_TYPE(PLARGE_INTEGER, 4, 4); + TEST_TYPE_SIZE (PLARGE_INTEGER, 4) + TEST_TYPE_ALIGN (PLARGE_INTEGER, 4) } static void test_pack_PLIST_ENTRY(void) { /* PLIST_ENTRY */ - TEST_TYPE(PLIST_ENTRY, 4, 4); - TEST_TYPE_POINTER(PLIST_ENTRY, 8, 4); + TEST_TYPE_SIZE (PLIST_ENTRY, 4) + TEST_TYPE_ALIGN (PLIST_ENTRY, 4) + TEST_TARGET_SIZE (PLIST_ENTRY, 8) + TEST_TARGET_ALIGN(PLIST_ENTRY, 4) } static void test_pack_PLUID(void) { /* PLUID */ - TEST_TYPE(PLUID, 4, 4); - TEST_TYPE_POINTER(PLUID, 8, 4); + TEST_TYPE_SIZE (PLUID, 4) + TEST_TYPE_ALIGN (PLUID, 4) + TEST_TARGET_SIZE (PLUID, 8) + TEST_TARGET_ALIGN(PLUID, 4) } static void test_pack_PLUID_AND_ATTRIBUTES(void) { /* PLUID_AND_ATTRIBUTES */ - TEST_TYPE(PLUID_AND_ATTRIBUTES, 4, 4); - TEST_TYPE_POINTER(PLUID_AND_ATTRIBUTES, 12, 4); + TEST_TYPE_SIZE (PLUID_AND_ATTRIBUTES, 4) + TEST_TYPE_ALIGN (PLUID_AND_ATTRIBUTES, 4) + TEST_TARGET_SIZE (PLUID_AND_ATTRIBUTES, 12) + TEST_TARGET_ALIGN(PLUID_AND_ATTRIBUTES, 4) } static void test_pack_PMEMORY_BASIC_INFORMATION(void) { /* PMEMORY_BASIC_INFORMATION */ - TEST_TYPE(PMEMORY_BASIC_INFORMATION, 4, 4); - TEST_TYPE_POINTER(PMEMORY_BASIC_INFORMATION, 28, 4); + TEST_TYPE_SIZE (PMEMORY_BASIC_INFORMATION, 4) + TEST_TYPE_ALIGN (PMEMORY_BASIC_INFORMATION, 4) + TEST_TARGET_SIZE (PMEMORY_BASIC_INFORMATION, 28) + TEST_TARGET_ALIGN(PMEMORY_BASIC_INFORMATION, 4) } static void test_pack_PMESSAGE_RESOURCE_BLOCK(void) { /* PMESSAGE_RESOURCE_BLOCK */ - TEST_TYPE(PMESSAGE_RESOURCE_BLOCK, 4, 4); - TEST_TYPE_POINTER(PMESSAGE_RESOURCE_BLOCK, 12, 4); + TEST_TYPE_SIZE (PMESSAGE_RESOURCE_BLOCK, 4) + TEST_TYPE_ALIGN (PMESSAGE_RESOURCE_BLOCK, 4) + TEST_TARGET_SIZE (PMESSAGE_RESOURCE_BLOCK, 12) + TEST_TARGET_ALIGN(PMESSAGE_RESOURCE_BLOCK, 4) } static void test_pack_PMESSAGE_RESOURCE_DATA(void) { /* PMESSAGE_RESOURCE_DATA */ - TEST_TYPE(PMESSAGE_RESOURCE_DATA, 4, 4); - TEST_TYPE_POINTER(PMESSAGE_RESOURCE_DATA, 16, 4); + TEST_TYPE_SIZE (PMESSAGE_RESOURCE_DATA, 4) + TEST_TYPE_ALIGN (PMESSAGE_RESOURCE_DATA, 4) + TEST_TARGET_SIZE (PMESSAGE_RESOURCE_DATA, 16) + TEST_TARGET_ALIGN(PMESSAGE_RESOURCE_DATA, 4) } static void test_pack_PMESSAGE_RESOURCE_ENTRY(void) { /* PMESSAGE_RESOURCE_ENTRY */ - TEST_TYPE(PMESSAGE_RESOURCE_ENTRY, 4, 4); - TEST_TYPE_POINTER(PMESSAGE_RESOURCE_ENTRY, 6, 2); + TEST_TYPE_SIZE (PMESSAGE_RESOURCE_ENTRY, 4) + TEST_TYPE_ALIGN (PMESSAGE_RESOURCE_ENTRY, 4) + TEST_TARGET_SIZE (PMESSAGE_RESOURCE_ENTRY, 6) + TEST_TARGET_ALIGN(PMESSAGE_RESOURCE_ENTRY, 2) } static void test_pack_PNT_TIB(void) { /* PNT_TIB */ - TEST_TYPE(PNT_TIB, 4, 4); + TEST_TYPE_SIZE (PNT_TIB, 4) + TEST_TYPE_ALIGN (PNT_TIB, 4) } static void test_pack_POBJECT_TYPE_LIST(void) { /* POBJECT_TYPE_LIST */ - TEST_TYPE(POBJECT_TYPE_LIST, 4, 4); - TEST_TYPE_POINTER(POBJECT_TYPE_LIST, 8, 4); + TEST_TYPE_SIZE (POBJECT_TYPE_LIST, 4) + TEST_TYPE_ALIGN (POBJECT_TYPE_LIST, 4) + TEST_TARGET_SIZE (POBJECT_TYPE_LIST, 8) + TEST_TARGET_ALIGN(POBJECT_TYPE_LIST, 4) } static void test_pack_PPRIVILEGE_SET(void) { /* PPRIVILEGE_SET */ - TEST_TYPE(PPRIVILEGE_SET, 4, 4); - TEST_TYPE_POINTER(PPRIVILEGE_SET, 20, 4); + TEST_TYPE_SIZE (PPRIVILEGE_SET, 4) + TEST_TYPE_ALIGN (PPRIVILEGE_SET, 4) + TEST_TARGET_SIZE (PPRIVILEGE_SET, 20) + TEST_TARGET_ALIGN(PPRIVILEGE_SET, 4) } static void test_pack_PRIVILEGE_SET(void) { /* PRIVILEGE_SET (pack 4) */ - TEST_TYPE(PRIVILEGE_SET, 20, 4); - TEST_FIELD(PRIVILEGE_SET, PrivilegeCount, 0, 4, 4); - TEST_FIELD(PRIVILEGE_SET, Control, 4, 4, 4); - TEST_FIELD(PRIVILEGE_SET, Privilege, 8, 12, 4); + TEST_TYPE_SIZE (PRIVILEGE_SET, 20) + TEST_TYPE_ALIGN (PRIVILEGE_SET, 4) + TEST_FIELD_SIZE (PRIVILEGE_SET, PrivilegeCount, 4) + TEST_FIELD_ALIGN (PRIVILEGE_SET, PrivilegeCount, 4) + TEST_FIELD_OFFSET(PRIVILEGE_SET, PrivilegeCount, 0) + TEST_FIELD_SIZE (PRIVILEGE_SET, Control, 4) + TEST_FIELD_ALIGN (PRIVILEGE_SET, Control, 4) + TEST_FIELD_OFFSET(PRIVILEGE_SET, Control, 4) + TEST_FIELD_SIZE (PRIVILEGE_SET, Privilege, 12) + TEST_FIELD_ALIGN (PRIVILEGE_SET, Privilege, 4) + TEST_FIELD_OFFSET(PRIVILEGE_SET, Privilege, 8) } static void test_pack_PRLIST_ENTRY(void) { /* PRLIST_ENTRY */ - TEST_TYPE(PRLIST_ENTRY, 4, 4); - TEST_TYPE_POINTER(PRLIST_ENTRY, 8, 4); + TEST_TYPE_SIZE (PRLIST_ENTRY, 4) + TEST_TYPE_ALIGN (PRLIST_ENTRY, 4) + TEST_TARGET_SIZE (PRLIST_ENTRY, 8) + TEST_TARGET_ALIGN(PRLIST_ENTRY, 4) } static void test_pack_PRTL_CRITICAL_SECTION(void) { /* PRTL_CRITICAL_SECTION */ - TEST_TYPE(PRTL_CRITICAL_SECTION, 4, 4); - TEST_TYPE_POINTER(PRTL_CRITICAL_SECTION, 24, 4); + TEST_TYPE_SIZE (PRTL_CRITICAL_SECTION, 4) + TEST_TYPE_ALIGN (PRTL_CRITICAL_SECTION, 4) + TEST_TARGET_SIZE (PRTL_CRITICAL_SECTION, 24) + TEST_TARGET_ALIGN(PRTL_CRITICAL_SECTION, 4) } static void test_pack_PRTL_CRITICAL_SECTION_DEBUG(void) { /* PRTL_CRITICAL_SECTION_DEBUG */ - TEST_TYPE(PRTL_CRITICAL_SECTION_DEBUG, 4, 4); + TEST_TYPE_SIZE (PRTL_CRITICAL_SECTION_DEBUG, 4) + TEST_TYPE_ALIGN (PRTL_CRITICAL_SECTION_DEBUG, 4) } static void test_pack_PRTL_OSVERSIONINFOEXW(void) { /* PRTL_OSVERSIONINFOEXW */ - TEST_TYPE(PRTL_OSVERSIONINFOEXW, 4, 4); - TEST_TYPE_POINTER(PRTL_OSVERSIONINFOEXW, 284, 4); + TEST_TYPE_SIZE (PRTL_OSVERSIONINFOEXW, 4) + TEST_TYPE_ALIGN (PRTL_OSVERSIONINFOEXW, 4) + TEST_TARGET_SIZE (PRTL_OSVERSIONINFOEXW, 284) + TEST_TARGET_ALIGN(PRTL_OSVERSIONINFOEXW, 4) } static void test_pack_PRTL_OSVERSIONINFOW(void) { /* PRTL_OSVERSIONINFOW */ - TEST_TYPE(PRTL_OSVERSIONINFOW, 4, 4); - TEST_TYPE_POINTER(PRTL_OSVERSIONINFOW, 276, 4); + TEST_TYPE_SIZE (PRTL_OSVERSIONINFOW, 4) + TEST_TYPE_ALIGN (PRTL_OSVERSIONINFOW, 4) + TEST_TARGET_SIZE (PRTL_OSVERSIONINFOW, 276) + TEST_TARGET_ALIGN(PRTL_OSVERSIONINFOW, 4) } static void test_pack_PRTL_RESOURCE_DEBUG(void) { /* PRTL_RESOURCE_DEBUG */ - TEST_TYPE(PRTL_RESOURCE_DEBUG, 4, 4); + TEST_TYPE_SIZE (PRTL_RESOURCE_DEBUG, 4) + TEST_TYPE_ALIGN (PRTL_RESOURCE_DEBUG, 4) } static void test_pack_PSECURITY_DESCRIPTOR(void) { /* PSECURITY_DESCRIPTOR */ - TEST_TYPE(PSECURITY_DESCRIPTOR, 4, 4); + TEST_TYPE_SIZE (PSECURITY_DESCRIPTOR, 4) + TEST_TYPE_ALIGN (PSECURITY_DESCRIPTOR, 4) } static void test_pack_PSECURITY_QUALITY_OF_SERVICE(void) { /* PSECURITY_QUALITY_OF_SERVICE */ - TEST_TYPE(PSECURITY_QUALITY_OF_SERVICE, 4, 4); + TEST_TYPE_SIZE (PSECURITY_QUALITY_OF_SERVICE, 4) + TEST_TYPE_ALIGN (PSECURITY_QUALITY_OF_SERVICE, 4) } static void test_pack_PSID(void) { /* PSID */ - TEST_TYPE(PSID, 4, 4); + TEST_TYPE_SIZE (PSID, 4) + TEST_TYPE_ALIGN (PSID, 4) } static void test_pack_PSID_IDENTIFIER_AUTHORITY(void) { /* PSID_IDENTIFIER_AUTHORITY */ - TEST_TYPE(PSID_IDENTIFIER_AUTHORITY, 4, 4); - TEST_TYPE_POINTER(PSID_IDENTIFIER_AUTHORITY, 6, 1); + TEST_TYPE_SIZE (PSID_IDENTIFIER_AUTHORITY, 4) + TEST_TYPE_ALIGN (PSID_IDENTIFIER_AUTHORITY, 4) + TEST_TARGET_SIZE (PSID_IDENTIFIER_AUTHORITY, 6) + TEST_TARGET_ALIGN(PSID_IDENTIFIER_AUTHORITY, 1) } static void test_pack_PSINGLE_LIST_ENTRY(void) { /* PSINGLE_LIST_ENTRY */ - TEST_TYPE(PSINGLE_LIST_ENTRY, 4, 4); - TEST_TYPE_POINTER(PSINGLE_LIST_ENTRY, 4, 4); + TEST_TYPE_SIZE (PSINGLE_LIST_ENTRY, 4) + TEST_TYPE_ALIGN (PSINGLE_LIST_ENTRY, 4) + TEST_TARGET_SIZE (PSINGLE_LIST_ENTRY, 4) + TEST_TARGET_ALIGN(PSINGLE_LIST_ENTRY, 4) } static void test_pack_PSTR(void) { /* PSTR */ - TEST_TYPE(PSTR, 4, 4); - TEST_TYPE_POINTER(PSTR, 1, 1); + TEST_TYPE_SIZE (PSTR, 4) + TEST_TYPE_ALIGN (PSTR, 4) + TEST_TARGET_SIZE (PSTR, 1) + TEST_TARGET_ALIGN(PSTR, 1) } static void test_pack_PSYSTEM_ALARM_ACE(void) { /* PSYSTEM_ALARM_ACE */ - TEST_TYPE(PSYSTEM_ALARM_ACE, 4, 4); - TEST_TYPE_POINTER(PSYSTEM_ALARM_ACE, 12, 4); + TEST_TYPE_SIZE (PSYSTEM_ALARM_ACE, 4) + TEST_TYPE_ALIGN (PSYSTEM_ALARM_ACE, 4) + TEST_TARGET_SIZE (PSYSTEM_ALARM_ACE, 12) + TEST_TARGET_ALIGN(PSYSTEM_ALARM_ACE, 4) } static void test_pack_PSYSTEM_AUDIT_ACE(void) { /* PSYSTEM_AUDIT_ACE */ - TEST_TYPE(PSYSTEM_AUDIT_ACE, 4, 4); - TEST_TYPE_POINTER(PSYSTEM_AUDIT_ACE, 12, 4); + TEST_TYPE_SIZE (PSYSTEM_AUDIT_ACE, 4) + TEST_TYPE_ALIGN (PSYSTEM_AUDIT_ACE, 4) + TEST_TARGET_SIZE (PSYSTEM_AUDIT_ACE, 12) + TEST_TARGET_ALIGN(PSYSTEM_AUDIT_ACE, 4) } static void test_pack_PTOKEN_GROUPS(void) { /* PTOKEN_GROUPS */ - TEST_TYPE(PTOKEN_GROUPS, 4, 4); - TEST_TYPE_POINTER(PTOKEN_GROUPS, 12, 4); + TEST_TYPE_SIZE (PTOKEN_GROUPS, 4) + TEST_TYPE_ALIGN (PTOKEN_GROUPS, 4) + TEST_TARGET_SIZE (PTOKEN_GROUPS, 12) + TEST_TARGET_ALIGN(PTOKEN_GROUPS, 4) } static void test_pack_PTOKEN_PRIVILEGES(void) { /* PTOKEN_PRIVILEGES */ - TEST_TYPE(PTOKEN_PRIVILEGES, 4, 4); - TEST_TYPE_POINTER(PTOKEN_PRIVILEGES, 16, 4); + TEST_TYPE_SIZE (PTOKEN_PRIVILEGES, 4) + TEST_TYPE_ALIGN (PTOKEN_PRIVILEGES, 4) + TEST_TARGET_SIZE (PTOKEN_PRIVILEGES, 16) + TEST_TARGET_ALIGN(PTOKEN_PRIVILEGES, 4) } static void test_pack_PTOKEN_USER(void) { /* PTOKEN_USER */ - TEST_TYPE(PTOKEN_USER, 4, 4); - TEST_TYPE_POINTER(PTOKEN_USER, 8, 4); + TEST_TYPE_SIZE (PTOKEN_USER, 4) + TEST_TYPE_ALIGN (PTOKEN_USER, 4) + TEST_TARGET_SIZE (PTOKEN_USER, 8) + TEST_TARGET_ALIGN(PTOKEN_USER, 4) } static void test_pack_PTSTR(void) { /* PTSTR */ - TEST_TYPE(PTSTR, 4, 4); + TEST_TYPE_SIZE (PTSTR, 4) + TEST_TYPE_ALIGN (PTSTR, 4) } static void test_pack_PULARGE_INTEGER(void) { /* PULARGE_INTEGER */ - TEST_TYPE(PULARGE_INTEGER, 4, 4); + TEST_TYPE_SIZE (PULARGE_INTEGER, 4) + TEST_TYPE_ALIGN (PULARGE_INTEGER, 4) } static void test_pack_PVECTORED_EXCEPTION_HANDLER(void) { /* PVECTORED_EXCEPTION_HANDLER */ - TEST_TYPE(PVECTORED_EXCEPTION_HANDLER, 4, 4); + TEST_TYPE_SIZE (PVECTORED_EXCEPTION_HANDLER, 4) + TEST_TYPE_ALIGN (PVECTORED_EXCEPTION_HANDLER, 4) } static void test_pack_PVOID(void) { /* PVOID */ - TEST_TYPE(PVOID, 4, 4); + TEST_TYPE_SIZE (PVOID, 4) + TEST_TYPE_ALIGN (PVOID, 4) } static void test_pack_PWCH(void) { /* PWCH */ - TEST_TYPE(PWCH, 4, 4); - TEST_TYPE_POINTER(PWCH, 2, 2); + TEST_TYPE_SIZE (PWCH, 4) + TEST_TYPE_ALIGN (PWCH, 4) + TEST_TARGET_SIZE (PWCH, 2) + TEST_TARGET_ALIGN(PWCH, 2) } static void test_pack_PWSTR(void) { /* PWSTR */ - TEST_TYPE(PWSTR, 4, 4); - TEST_TYPE_POINTER(PWSTR, 2, 2); + TEST_TYPE_SIZE (PWSTR, 4) + TEST_TYPE_ALIGN (PWSTR, 4) + TEST_TARGET_SIZE (PWSTR, 2) + TEST_TARGET_ALIGN(PWSTR, 2) } static void test_pack_RTL_CRITICAL_SECTION(void) { /* RTL_CRITICAL_SECTION (pack 4) */ - TEST_TYPE(RTL_CRITICAL_SECTION, 24, 4); - TEST_FIELD(RTL_CRITICAL_SECTION, DebugInfo, 0, 4, 4); - TEST_FIELD(RTL_CRITICAL_SECTION, LockCount, 4, 4, 4); - TEST_FIELD(RTL_CRITICAL_SECTION, RecursionCount, 8, 4, 4); - TEST_FIELD(RTL_CRITICAL_SECTION, OwningThread, 12, 4, 4); - TEST_FIELD(RTL_CRITICAL_SECTION, LockSemaphore, 16, 4, 4); - TEST_FIELD(RTL_CRITICAL_SECTION, SpinCount, 20, 4, 4); + TEST_TYPE_SIZE (RTL_CRITICAL_SECTION, 24) + TEST_TYPE_ALIGN (RTL_CRITICAL_SECTION, 4) + TEST_FIELD_SIZE (RTL_CRITICAL_SECTION, DebugInfo, 4) + TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION, DebugInfo, 4) + TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION, DebugInfo, 0) + TEST_FIELD_SIZE (RTL_CRITICAL_SECTION, LockCount, 4) + TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION, LockCount, 4) + TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION, LockCount, 4) + TEST_FIELD_SIZE (RTL_CRITICAL_SECTION, RecursionCount, 4) + TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION, RecursionCount, 4) + TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION, RecursionCount, 8) + TEST_FIELD_SIZE (RTL_CRITICAL_SECTION, OwningThread, 4) + TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION, OwningThread, 4) + TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION, OwningThread, 12) + TEST_FIELD_SIZE (RTL_CRITICAL_SECTION, LockSemaphore, 4) + TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION, LockSemaphore, 4) + TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION, LockSemaphore, 16) + TEST_FIELD_SIZE (RTL_CRITICAL_SECTION, SpinCount, 4) + TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION, SpinCount, 4) + TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION, SpinCount, 20) } static void test_pack_RTL_CRITICAL_SECTION_DEBUG(void) { /* RTL_CRITICAL_SECTION_DEBUG (pack 4) */ - TEST_FIELD(RTL_CRITICAL_SECTION_DEBUG, Type, 0, 2, 2); - TEST_FIELD(RTL_CRITICAL_SECTION_DEBUG, CreatorBackTraceIndex, 2, 2, 2); - TEST_FIELD(RTL_CRITICAL_SECTION_DEBUG, CriticalSection, 4, 4, 4); - TEST_FIELD(RTL_CRITICAL_SECTION_DEBUG, ProcessLocksList, 8, 8, 4); - TEST_FIELD(RTL_CRITICAL_SECTION_DEBUG, EntryCount, 16, 4, 4); - TEST_FIELD(RTL_CRITICAL_SECTION_DEBUG, ContentionCount, 20, 4, 4); + TEST_FIELD_SIZE (RTL_CRITICAL_SECTION_DEBUG, Type, 2) + TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION_DEBUG, Type, 2) + TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION_DEBUG, Type, 0) + TEST_FIELD_SIZE (RTL_CRITICAL_SECTION_DEBUG, CreatorBackTraceIndex, 2) + TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION_DEBUG, CreatorBackTraceIndex, 2) + TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION_DEBUG, CreatorBackTraceIndex, 2) + TEST_FIELD_SIZE (RTL_CRITICAL_SECTION_DEBUG, CriticalSection, 4) + TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION_DEBUG, CriticalSection, 4) + TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION_DEBUG, CriticalSection, 4) + TEST_FIELD_SIZE (RTL_CRITICAL_SECTION_DEBUG, ProcessLocksList, 8) + TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION_DEBUG, ProcessLocksList, 4) + TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION_DEBUG, ProcessLocksList, 8) + TEST_FIELD_SIZE (RTL_CRITICAL_SECTION_DEBUG, EntryCount, 4) + TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION_DEBUG, EntryCount, 4) + TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION_DEBUG, EntryCount, 16) + TEST_FIELD_SIZE (RTL_CRITICAL_SECTION_DEBUG, ContentionCount, 4) + TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION_DEBUG, ContentionCount, 4) + TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION_DEBUG, ContentionCount, 20) } static void test_pack_RTL_OSVERSIONINFOEXW(void) { /* RTL_OSVERSIONINFOEXW (pack 4) */ - TEST_TYPE(RTL_OSVERSIONINFOEXW, 284, 4); - TEST_FIELD(RTL_OSVERSIONINFOEXW, dwOSVersionInfoSize, 0, 4, 4); - TEST_FIELD(RTL_OSVERSIONINFOEXW, dwMajorVersion, 4, 4, 4); - TEST_FIELD(RTL_OSVERSIONINFOEXW, dwMinorVersion, 8, 4, 4); - TEST_FIELD(RTL_OSVERSIONINFOEXW, dwBuildNumber, 12, 4, 4); - TEST_FIELD(RTL_OSVERSIONINFOEXW, dwPlatformId, 16, 4, 4); - TEST_FIELD(RTL_OSVERSIONINFOEXW, szCSDVersion, 20, 256, 2); - TEST_FIELD(RTL_OSVERSIONINFOEXW, wServicePackMajor, 276, 2, 2); - TEST_FIELD(RTL_OSVERSIONINFOEXW, wServicePackMinor, 278, 2, 2); - TEST_FIELD(RTL_OSVERSIONINFOEXW, wSuiteMask, 280, 2, 2); - TEST_FIELD(RTL_OSVERSIONINFOEXW, wProductType, 282, 1, 1); - TEST_FIELD(RTL_OSVERSIONINFOEXW, wReserved, 283, 1, 1); + TEST_TYPE_SIZE (RTL_OSVERSIONINFOEXW, 284) + TEST_TYPE_ALIGN (RTL_OSVERSIONINFOEXW, 4) + TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, dwOSVersionInfoSize, 4) + TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, dwOSVersionInfoSize, 4) + TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, dwOSVersionInfoSize, 0) + TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, dwMajorVersion, 4) + TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, dwMajorVersion, 4) + TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, dwMajorVersion, 4) + TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, dwMinorVersion, 4) + TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, dwMinorVersion, 4) + TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, dwMinorVersion, 8) + TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, dwBuildNumber, 4) + TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, dwBuildNumber, 4) + TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, dwBuildNumber, 12) + TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, dwPlatformId, 4) + TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, dwPlatformId, 4) + TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, dwPlatformId, 16) + TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, szCSDVersion, 256) + TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, szCSDVersion, 2) + TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, szCSDVersion, 20) + TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, wServicePackMajor, 2) + TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, wServicePackMajor, 2) + TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, wServicePackMajor, 276) + TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, wServicePackMinor, 2) + TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, wServicePackMinor, 2) + TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, wServicePackMinor, 278) + TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, wSuiteMask, 2) + TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, wSuiteMask, 2) + TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, wSuiteMask, 280) + TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, wProductType, 1) + TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, wProductType, 1) + TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, wProductType, 282) + TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, wReserved, 1) + TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, wReserved, 1) + TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, wReserved, 283) } static void test_pack_RTL_OSVERSIONINFOW(void) { /* RTL_OSVERSIONINFOW (pack 4) */ - TEST_TYPE(RTL_OSVERSIONINFOW, 276, 4); - TEST_FIELD(RTL_OSVERSIONINFOW, dwOSVersionInfoSize, 0, 4, 4); - TEST_FIELD(RTL_OSVERSIONINFOW, dwMajorVersion, 4, 4, 4); - TEST_FIELD(RTL_OSVERSIONINFOW, dwMinorVersion, 8, 4, 4); - TEST_FIELD(RTL_OSVERSIONINFOW, dwBuildNumber, 12, 4, 4); - TEST_FIELD(RTL_OSVERSIONINFOW, dwPlatformId, 16, 4, 4); - TEST_FIELD(RTL_OSVERSIONINFOW, szCSDVersion, 20, 256, 2); + TEST_TYPE_SIZE (RTL_OSVERSIONINFOW, 276) + TEST_TYPE_ALIGN (RTL_OSVERSIONINFOW, 4) + TEST_FIELD_SIZE (RTL_OSVERSIONINFOW, dwOSVersionInfoSize, 4) + TEST_FIELD_ALIGN (RTL_OSVERSIONINFOW, dwOSVersionInfoSize, 4) + TEST_FIELD_OFFSET(RTL_OSVERSIONINFOW, dwOSVersionInfoSize, 0) + TEST_FIELD_SIZE (RTL_OSVERSIONINFOW, dwMajorVersion, 4) + TEST_FIELD_ALIGN (RTL_OSVERSIONINFOW, dwMajorVersion, 4) + TEST_FIELD_OFFSET(RTL_OSVERSIONINFOW, dwMajorVersion, 4) + TEST_FIELD_SIZE (RTL_OSVERSIONINFOW, dwMinorVersion, 4) + TEST_FIELD_ALIGN (RTL_OSVERSIONINFOW, dwMinorVersion, 4) + TEST_FIELD_OFFSET(RTL_OSVERSIONINFOW, dwMinorVersion, 8) + TEST_FIELD_SIZE (RTL_OSVERSIONINFOW, dwBuildNumber, 4) + TEST_FIELD_ALIGN (RTL_OSVERSIONINFOW, dwBuildNumber, 4) + TEST_FIELD_OFFSET(RTL_OSVERSIONINFOW, dwBuildNumber, 12) + TEST_FIELD_SIZE (RTL_OSVERSIONINFOW, dwPlatformId, 4) + TEST_FIELD_ALIGN (RTL_OSVERSIONINFOW, dwPlatformId, 4) + TEST_FIELD_OFFSET(RTL_OSVERSIONINFOW, dwPlatformId, 16) + TEST_FIELD_SIZE (RTL_OSVERSIONINFOW, szCSDVersion, 256) + TEST_FIELD_ALIGN (RTL_OSVERSIONINFOW, szCSDVersion, 2) + TEST_FIELD_OFFSET(RTL_OSVERSIONINFOW, szCSDVersion, 20) } static void test_pack_RTL_RESOURCE_DEBUG(void) { /* RTL_RESOURCE_DEBUG (pack 4) */ - TEST_FIELD(RTL_RESOURCE_DEBUG, Type, 0, 2, 2); - TEST_FIELD(RTL_RESOURCE_DEBUG, CreatorBackTraceIndex, 2, 2, 2); - TEST_FIELD(RTL_RESOURCE_DEBUG, CriticalSection, 4, 4, 4); - TEST_FIELD(RTL_RESOURCE_DEBUG, ProcessLocksList, 8, 8, 4); - TEST_FIELD(RTL_RESOURCE_DEBUG, EntryCount, 16, 4, 4); - TEST_FIELD(RTL_RESOURCE_DEBUG, ContentionCount, 20, 4, 4); + TEST_FIELD_SIZE (RTL_RESOURCE_DEBUG, Type, 2) + TEST_FIELD_ALIGN (RTL_RESOURCE_DEBUG, Type, 2) + TEST_FIELD_OFFSET(RTL_RESOURCE_DEBUG, Type, 0) + TEST_FIELD_SIZE (RTL_RESOURCE_DEBUG, CreatorBackTraceIndex, 2) + TEST_FIELD_ALIGN (RTL_RESOURCE_DEBUG, CreatorBackTraceIndex, 2) + TEST_FIELD_OFFSET(RTL_RESOURCE_DEBUG, CreatorBackTraceIndex, 2) + TEST_FIELD_SIZE (RTL_RESOURCE_DEBUG, CriticalSection, 4) + TEST_FIELD_ALIGN (RTL_RESOURCE_DEBUG, CriticalSection, 4) + TEST_FIELD_OFFSET(RTL_RESOURCE_DEBUG, CriticalSection, 4) + TEST_FIELD_SIZE (RTL_RESOURCE_DEBUG, ProcessLocksList, 8) + TEST_FIELD_ALIGN (RTL_RESOURCE_DEBUG, ProcessLocksList, 4) + TEST_FIELD_OFFSET(RTL_RESOURCE_DEBUG, ProcessLocksList, 8) + TEST_FIELD_SIZE (RTL_RESOURCE_DEBUG, EntryCount, 4) + TEST_FIELD_ALIGN (RTL_RESOURCE_DEBUG, EntryCount, 4) + TEST_FIELD_OFFSET(RTL_RESOURCE_DEBUG, EntryCount, 16) + TEST_FIELD_SIZE (RTL_RESOURCE_DEBUG, ContentionCount, 4) + TEST_FIELD_ALIGN (RTL_RESOURCE_DEBUG, ContentionCount, 4) + TEST_FIELD_OFFSET(RTL_RESOURCE_DEBUG, ContentionCount, 20) } static void test_pack_SECURITY_CONTEXT_TRACKING_MODE(void) { /* SECURITY_CONTEXT_TRACKING_MODE */ - TEST_TYPE(SECURITY_CONTEXT_TRACKING_MODE, 1, 1); + TEST_TYPE_SIZE (SECURITY_CONTEXT_TRACKING_MODE, 1) + TEST_TYPE_ALIGN (SECURITY_CONTEXT_TRACKING_MODE, 1) } static void test_pack_SECURITY_DESCRIPTOR(void) { /* SECURITY_DESCRIPTOR (pack 4) */ - TEST_TYPE(SECURITY_DESCRIPTOR, 20, 4); - TEST_FIELD(SECURITY_DESCRIPTOR, Revision, 0, 1, 1); - TEST_FIELD(SECURITY_DESCRIPTOR, Sbz1, 1, 1, 1); - TEST_FIELD(SECURITY_DESCRIPTOR, Control, 2, 2, 2); - TEST_FIELD(SECURITY_DESCRIPTOR, Owner, 4, 4, 4); - TEST_FIELD(SECURITY_DESCRIPTOR, Group, 8, 4, 4); - TEST_FIELD(SECURITY_DESCRIPTOR, Sacl, 12, 4, 4); - TEST_FIELD(SECURITY_DESCRIPTOR, Dacl, 16, 4, 4); + TEST_TYPE_SIZE (SECURITY_DESCRIPTOR, 20) + TEST_TYPE_ALIGN (SECURITY_DESCRIPTOR, 4) + TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Revision, 1) + TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Revision, 1) + TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Revision, 0) + TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Sbz1, 1) + TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Sbz1, 1) + TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Sbz1, 1) + TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Control, 2) + TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Control, 2) + TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Control, 2) + TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Owner, 4) + TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Owner, 4) + TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Owner, 4) + TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Group, 4) + TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Group, 4) + TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Group, 8) + TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Sacl, 4) + TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Sacl, 4) + TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Sacl, 12) + TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Dacl, 4) + TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Dacl, 4) + TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Dacl, 16) } static void test_pack_SECURITY_DESCRIPTOR_CONTROL(void) { /* SECURITY_DESCRIPTOR_CONTROL */ - TEST_TYPE(SECURITY_DESCRIPTOR_CONTROL, 2, 2); - TEST_TYPE_UNSIGNED(SECURITY_DESCRIPTOR_CONTROL); + TEST_TYPE_SIZE (SECURITY_DESCRIPTOR_CONTROL, 2) + TEST_TYPE_ALIGN (SECURITY_DESCRIPTOR_CONTROL, 2) + TEST_TYPE_UNSIGNED(SECURITY_DESCRIPTOR_CONTROL) } static void test_pack_SECURITY_DESCRIPTOR_RELATIVE(void) { /* SECURITY_DESCRIPTOR_RELATIVE (pack 4) */ - TEST_TYPE(SECURITY_DESCRIPTOR_RELATIVE, 20, 4); - TEST_FIELD(SECURITY_DESCRIPTOR_RELATIVE, Revision, 0, 1, 1); - TEST_FIELD(SECURITY_DESCRIPTOR_RELATIVE, Sbz1, 1, 1, 1); - TEST_FIELD(SECURITY_DESCRIPTOR_RELATIVE, Control, 2, 2, 2); - TEST_FIELD(SECURITY_DESCRIPTOR_RELATIVE, Owner, 4, 4, 4); - TEST_FIELD(SECURITY_DESCRIPTOR_RELATIVE, Group, 8, 4, 4); - TEST_FIELD(SECURITY_DESCRIPTOR_RELATIVE, Sacl, 12, 4, 4); - TEST_FIELD(SECURITY_DESCRIPTOR_RELATIVE, Dacl, 16, 4, 4); + TEST_TYPE_SIZE (SECURITY_DESCRIPTOR_RELATIVE, 20) + TEST_TYPE_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, 4) + TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Revision, 1) + TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Revision, 1) + TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Revision, 0) + TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Sbz1, 1) + TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Sbz1, 1) + TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Sbz1, 1) + TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Control, 2) + TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Control, 2) + TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Control, 2) + TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Owner, 4) + TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Owner, 4) + TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Owner, 4) + TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Group, 4) + TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Group, 4) + TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Group, 8) + TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Sacl, 4) + TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Sacl, 4) + TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Sacl, 12) + TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Dacl, 4) + TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Dacl, 4) + TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Dacl, 16) } static void test_pack_SECURITY_INFORMATION(void) { /* SECURITY_INFORMATION */ - TEST_TYPE(SECURITY_INFORMATION, 4, 4); - TEST_TYPE_UNSIGNED(SECURITY_INFORMATION); + TEST_TYPE_SIZE (SECURITY_INFORMATION, 4) + TEST_TYPE_ALIGN (SECURITY_INFORMATION, 4) + TEST_TYPE_UNSIGNED(SECURITY_INFORMATION) } static void test_pack_SECURITY_QUALITY_OF_SERVICE(void) { /* SECURITY_QUALITY_OF_SERVICE (pack 4) */ - TEST_FIELD(SECURITY_QUALITY_OF_SERVICE, Length, 0, 4, 4); + TEST_FIELD_SIZE (SECURITY_QUALITY_OF_SERVICE, Length, 4) + TEST_FIELD_ALIGN (SECURITY_QUALITY_OF_SERVICE, Length, 4) + TEST_FIELD_OFFSET(SECURITY_QUALITY_OF_SERVICE, Length, 0) } static void test_pack_SHORT(void) { /* SHORT */ - TEST_TYPE(SHORT, 2, 2); - TEST_TYPE_SIGNED(SHORT); + TEST_TYPE_SIZE (SHORT, 2) + TEST_TYPE_ALIGN (SHORT, 2) + TEST_TYPE_SIGNED(SHORT) } static void test_pack_SID(void) { /* SID (pack 4) */ - TEST_TYPE(SID, 12, 4); - TEST_FIELD(SID, Revision, 0, 1, 1); - TEST_FIELD(SID, SubAuthorityCount, 1, 1, 1); - TEST_FIELD(SID, IdentifierAuthority, 2, 6, 1); - TEST_FIELD(SID, SubAuthority, 8, 4, 4); + TEST_TYPE_SIZE (SID, 12) + TEST_TYPE_ALIGN (SID, 4) + TEST_FIELD_SIZE (SID, Revision, 1) + TEST_FIELD_ALIGN (SID, Revision, 1) + TEST_FIELD_OFFSET(SID, Revision, 0) + TEST_FIELD_SIZE (SID, SubAuthorityCount, 1) + TEST_FIELD_ALIGN (SID, SubAuthorityCount, 1) + TEST_FIELD_OFFSET(SID, SubAuthorityCount, 1) + TEST_FIELD_SIZE (SID, IdentifierAuthority, 6) + TEST_FIELD_ALIGN (SID, IdentifierAuthority, 1) + TEST_FIELD_OFFSET(SID, IdentifierAuthority, 2) + TEST_FIELD_SIZE (SID, SubAuthority, 4) + TEST_FIELD_ALIGN (SID, SubAuthority, 4) + TEST_FIELD_OFFSET(SID, SubAuthority, 8) } static void test_pack_SID_AND_ATTRIBUTES(void) { /* SID_AND_ATTRIBUTES (pack 4) */ - TEST_TYPE(SID_AND_ATTRIBUTES, 8, 4); - TEST_FIELD(SID_AND_ATTRIBUTES, Sid, 0, 4, 4); - TEST_FIELD(SID_AND_ATTRIBUTES, Attributes, 4, 4, 4); + TEST_TYPE_SIZE (SID_AND_ATTRIBUTES, 8) + TEST_TYPE_ALIGN (SID_AND_ATTRIBUTES, 4) + TEST_FIELD_SIZE (SID_AND_ATTRIBUTES, Sid, 4) + TEST_FIELD_ALIGN (SID_AND_ATTRIBUTES, Sid, 4) + TEST_FIELD_OFFSET(SID_AND_ATTRIBUTES, Sid, 0) + TEST_FIELD_SIZE (SID_AND_ATTRIBUTES, Attributes, 4) + TEST_FIELD_ALIGN (SID_AND_ATTRIBUTES, Attributes, 4) + TEST_FIELD_OFFSET(SID_AND_ATTRIBUTES, Attributes, 4) } static void test_pack_SID_IDENTIFIER_AUTHORITY(void) { /* SID_IDENTIFIER_AUTHORITY (pack 4) */ - TEST_TYPE(SID_IDENTIFIER_AUTHORITY, 6, 1); - TEST_FIELD(SID_IDENTIFIER_AUTHORITY, Value, 0, 6, 1); + TEST_TYPE_SIZE (SID_IDENTIFIER_AUTHORITY, 6) + TEST_TYPE_ALIGN (SID_IDENTIFIER_AUTHORITY, 1) + TEST_FIELD_SIZE (SID_IDENTIFIER_AUTHORITY, Value, 6) + TEST_FIELD_ALIGN (SID_IDENTIFIER_AUTHORITY, Value, 1) + TEST_FIELD_OFFSET(SID_IDENTIFIER_AUTHORITY, Value, 0) } static void test_pack_SINGLE_LIST_ENTRY(void) { /* SINGLE_LIST_ENTRY (pack 4) */ - TEST_TYPE(SINGLE_LIST_ENTRY, 4, 4); - TEST_FIELD(SINGLE_LIST_ENTRY, Next, 0, 4, 4); + TEST_TYPE_SIZE (SINGLE_LIST_ENTRY, 4) + TEST_TYPE_ALIGN (SINGLE_LIST_ENTRY, 4) + TEST_FIELD_SIZE (SINGLE_LIST_ENTRY, Next, 4) + TEST_FIELD_ALIGN (SINGLE_LIST_ENTRY, Next, 4) + TEST_FIELD_OFFSET(SINGLE_LIST_ENTRY, Next, 0) } static void test_pack_SYSTEM_ALARM_ACE(void) { /* SYSTEM_ALARM_ACE (pack 4) */ - TEST_TYPE(SYSTEM_ALARM_ACE, 12, 4); - TEST_FIELD(SYSTEM_ALARM_ACE, Header, 0, 4, 2); - TEST_FIELD(SYSTEM_ALARM_ACE, Mask, 4, 4, 4); - TEST_FIELD(SYSTEM_ALARM_ACE, SidStart, 8, 4, 4); + TEST_TYPE_SIZE (SYSTEM_ALARM_ACE, 12) + TEST_TYPE_ALIGN (SYSTEM_ALARM_ACE, 4) + TEST_FIELD_SIZE (SYSTEM_ALARM_ACE, Header, 4) + TEST_FIELD_ALIGN (SYSTEM_ALARM_ACE, Header, 2) + TEST_FIELD_OFFSET(SYSTEM_ALARM_ACE, Header, 0) + TEST_FIELD_SIZE (SYSTEM_ALARM_ACE, Mask, 4) + TEST_FIELD_ALIGN (SYSTEM_ALARM_ACE, Mask, 4) + TEST_FIELD_OFFSET(SYSTEM_ALARM_ACE, Mask, 4) + TEST_FIELD_SIZE (SYSTEM_ALARM_ACE, SidStart, 4) + TEST_FIELD_ALIGN (SYSTEM_ALARM_ACE, SidStart, 4) + TEST_FIELD_OFFSET(SYSTEM_ALARM_ACE, SidStart, 8) } static void test_pack_SYSTEM_AUDIT_ACE(void) { /* SYSTEM_AUDIT_ACE (pack 4) */ - TEST_TYPE(SYSTEM_AUDIT_ACE, 12, 4); - TEST_FIELD(SYSTEM_AUDIT_ACE, Header, 0, 4, 2); - TEST_FIELD(SYSTEM_AUDIT_ACE, Mask, 4, 4, 4); - TEST_FIELD(SYSTEM_AUDIT_ACE, SidStart, 8, 4, 4); + TEST_TYPE_SIZE (SYSTEM_AUDIT_ACE, 12) + TEST_TYPE_ALIGN (SYSTEM_AUDIT_ACE, 4) + TEST_FIELD_SIZE (SYSTEM_AUDIT_ACE, Header, 4) + TEST_FIELD_ALIGN (SYSTEM_AUDIT_ACE, Header, 2) + TEST_FIELD_OFFSET(SYSTEM_AUDIT_ACE, Header, 0) + TEST_FIELD_SIZE (SYSTEM_AUDIT_ACE, Mask, 4) + TEST_FIELD_ALIGN (SYSTEM_AUDIT_ACE, Mask, 4) + TEST_FIELD_OFFSET(SYSTEM_AUDIT_ACE, Mask, 4) + TEST_FIELD_SIZE (SYSTEM_AUDIT_ACE, SidStart, 4) + TEST_FIELD_ALIGN (SYSTEM_AUDIT_ACE, SidStart, 4) + TEST_FIELD_OFFSET(SYSTEM_AUDIT_ACE, SidStart, 8) } static void test_pack_TCHAR(void) { /* TCHAR */ - TEST_TYPE(TCHAR, 1, 1); + TEST_TYPE_SIZE (TCHAR, 1) + TEST_TYPE_ALIGN (TCHAR, 1) } static void test_pack_TOKEN_DEFAULT_DACL(void) { /* TOKEN_DEFAULT_DACL (pack 4) */ - TEST_TYPE(TOKEN_DEFAULT_DACL, 4, 4); - TEST_FIELD(TOKEN_DEFAULT_DACL, DefaultDacl, 0, 4, 4); + TEST_TYPE_SIZE (TOKEN_DEFAULT_DACL, 4) + TEST_TYPE_ALIGN (TOKEN_DEFAULT_DACL, 4) + TEST_FIELD_SIZE (TOKEN_DEFAULT_DACL, DefaultDacl, 4) + TEST_FIELD_ALIGN (TOKEN_DEFAULT_DACL, DefaultDacl, 4) + TEST_FIELD_OFFSET(TOKEN_DEFAULT_DACL, DefaultDacl, 0) } static void test_pack_TOKEN_GROUPS(void) { /* TOKEN_GROUPS (pack 4) */ - TEST_TYPE(TOKEN_GROUPS, 12, 4); - TEST_FIELD(TOKEN_GROUPS, GroupCount, 0, 4, 4); - TEST_FIELD(TOKEN_GROUPS, Groups, 4, 8, 4); + TEST_TYPE_SIZE (TOKEN_GROUPS, 12) + TEST_TYPE_ALIGN (TOKEN_GROUPS, 4) + TEST_FIELD_SIZE (TOKEN_GROUPS, GroupCount, 4) + TEST_FIELD_ALIGN (TOKEN_GROUPS, GroupCount, 4) + TEST_FIELD_OFFSET(TOKEN_GROUPS, GroupCount, 0) + TEST_FIELD_SIZE (TOKEN_GROUPS, Groups, 8) + TEST_FIELD_ALIGN (TOKEN_GROUPS, Groups, 4) + TEST_FIELD_OFFSET(TOKEN_GROUPS, Groups, 4) } static void test_pack_TOKEN_OWNER(void) { /* TOKEN_OWNER (pack 4) */ - TEST_TYPE(TOKEN_OWNER, 4, 4); - TEST_FIELD(TOKEN_OWNER, Owner, 0, 4, 4); + TEST_TYPE_SIZE (TOKEN_OWNER, 4) + TEST_TYPE_ALIGN (TOKEN_OWNER, 4) + TEST_FIELD_SIZE (TOKEN_OWNER, Owner, 4) + TEST_FIELD_ALIGN (TOKEN_OWNER, Owner, 4) + TEST_FIELD_OFFSET(TOKEN_OWNER, Owner, 0) } static void test_pack_TOKEN_PRIMARY_GROUP(void) { /* TOKEN_PRIMARY_GROUP (pack 4) */ - TEST_TYPE(TOKEN_PRIMARY_GROUP, 4, 4); - TEST_FIELD(TOKEN_PRIMARY_GROUP, PrimaryGroup, 0, 4, 4); + TEST_TYPE_SIZE (TOKEN_PRIMARY_GROUP, 4) + TEST_TYPE_ALIGN (TOKEN_PRIMARY_GROUP, 4) + TEST_FIELD_SIZE (TOKEN_PRIMARY_GROUP, PrimaryGroup, 4) + TEST_FIELD_ALIGN (TOKEN_PRIMARY_GROUP, PrimaryGroup, 4) + TEST_FIELD_OFFSET(TOKEN_PRIMARY_GROUP, PrimaryGroup, 0) } static void test_pack_TOKEN_PRIVILEGES(void) { /* TOKEN_PRIVILEGES (pack 4) */ - TEST_TYPE(TOKEN_PRIVILEGES, 16, 4); - TEST_FIELD(TOKEN_PRIVILEGES, PrivilegeCount, 0, 4, 4); - TEST_FIELD(TOKEN_PRIVILEGES, Privileges, 4, 12, 4); + TEST_TYPE_SIZE (TOKEN_PRIVILEGES, 16) + TEST_TYPE_ALIGN (TOKEN_PRIVILEGES, 4) + TEST_FIELD_SIZE (TOKEN_PRIVILEGES, PrivilegeCount, 4) + TEST_FIELD_ALIGN (TOKEN_PRIVILEGES, PrivilegeCount, 4) + TEST_FIELD_OFFSET(TOKEN_PRIVILEGES, PrivilegeCount, 0) + TEST_FIELD_SIZE (TOKEN_PRIVILEGES, Privileges, 12) + TEST_FIELD_ALIGN (TOKEN_PRIVILEGES, Privileges, 4) + TEST_FIELD_OFFSET(TOKEN_PRIVILEGES, Privileges, 4) } static void test_pack_TOKEN_SOURCE(void) { /* TOKEN_SOURCE (pack 4) */ - TEST_TYPE(TOKEN_SOURCE, 16, 4); - TEST_FIELD(TOKEN_SOURCE, SourceName, 0, 8, 1); - TEST_FIELD(TOKEN_SOURCE, SourceIdentifier, 8, 8, 4); + TEST_TYPE_SIZE (TOKEN_SOURCE, 16) + TEST_TYPE_ALIGN (TOKEN_SOURCE, 4) + TEST_FIELD_SIZE (TOKEN_SOURCE, SourceName, 8) + TEST_FIELD_ALIGN (TOKEN_SOURCE, SourceName, 1) + TEST_FIELD_OFFSET(TOKEN_SOURCE, SourceName, 0) + TEST_FIELD_SIZE (TOKEN_SOURCE, SourceIdentifier, 8) + TEST_FIELD_ALIGN (TOKEN_SOURCE, SourceIdentifier, 4) + TEST_FIELD_OFFSET(TOKEN_SOURCE, SourceIdentifier, 8) } static void test_pack_TOKEN_STATISTICS(void) { /* TOKEN_STATISTICS (pack 4) */ - TEST_FIELD(TOKEN_STATISTICS, TokenId, 0, 8, 4); - TEST_FIELD(TOKEN_STATISTICS, AuthenticationId, 8, 8, 4); - TEST_FIELD(TOKEN_STATISTICS, ExpirationTime, 16, 8, 4); + TEST_FIELD_SIZE (TOKEN_STATISTICS, TokenId, 8) + TEST_FIELD_ALIGN (TOKEN_STATISTICS, TokenId, 4) + TEST_FIELD_OFFSET(TOKEN_STATISTICS, TokenId, 0) + TEST_FIELD_SIZE (TOKEN_STATISTICS, AuthenticationId, 8) + TEST_FIELD_ALIGN (TOKEN_STATISTICS, AuthenticationId, 4) + TEST_FIELD_OFFSET(TOKEN_STATISTICS, AuthenticationId, 8) + TEST_FIELD_SIZE (TOKEN_STATISTICS, ExpirationTime, 8) + TEST_FIELD_ALIGN (TOKEN_STATISTICS, ExpirationTime, 4) + TEST_FIELD_OFFSET(TOKEN_STATISTICS, ExpirationTime, 16) } static void test_pack_TOKEN_USER(void) { /* TOKEN_USER (pack 4) */ - TEST_TYPE(TOKEN_USER, 8, 4); - TEST_FIELD(TOKEN_USER, User, 0, 8, 4); + TEST_TYPE_SIZE (TOKEN_USER, 8) + TEST_TYPE_ALIGN (TOKEN_USER, 4) + TEST_FIELD_SIZE (TOKEN_USER, User, 8) + TEST_FIELD_ALIGN (TOKEN_USER, User, 4) + TEST_FIELD_OFFSET(TOKEN_USER, User, 0) } static void test_pack_ULARGE_INTEGER(void) @@ -1799,324 +2770,410 @@ static void test_pack_ULARGE_INTEGER(void) static void test_pack_ULONGLONG(void) { /* ULONGLONG */ - TEST_TYPE(ULONGLONG, 8, 8); - TEST_TYPE_UNSIGNED(ULONGLONG); + TEST_TYPE_SIZE (ULONGLONG, 8) + TEST_TYPE_ALIGN (ULONGLONG, 8) + TEST_TYPE_UNSIGNED(ULONGLONG) } static void test_pack_WAITORTIMERCALLBACKFUNC(void) { /* WAITORTIMERCALLBACKFUNC */ - TEST_TYPE(WAITORTIMERCALLBACKFUNC, 4, 4); + TEST_TYPE_SIZE (WAITORTIMERCALLBACKFUNC, 4) + TEST_TYPE_ALIGN (WAITORTIMERCALLBACKFUNC, 4) } static void test_pack_WCHAR(void) { /* WCHAR */ - TEST_TYPE(WCHAR, 2, 2); - TEST_TYPE_UNSIGNED(WCHAR); + TEST_TYPE_SIZE (WCHAR, 2) + TEST_TYPE_ALIGN (WCHAR, 2) + TEST_TYPE_UNSIGNED(WCHAR) } static void test_pack_ATOM(void) { /* ATOM */ - TEST_TYPE(ATOM, 2, 2); - TEST_TYPE_UNSIGNED(ATOM); + TEST_TYPE_SIZE (ATOM, 2) + TEST_TYPE_ALIGN (ATOM, 2) + TEST_TYPE_UNSIGNED(ATOM) } static void test_pack_BOOL(void) { /* BOOL */ - TEST_TYPE(BOOL, 4, 4); - TEST_TYPE_SIGNED(BOOL); + TEST_TYPE_SIZE (BOOL, 4) + TEST_TYPE_ALIGN (BOOL, 4) + TEST_TYPE_SIGNED(BOOL) } static void test_pack_BYTE(void) { /* BYTE */ - TEST_TYPE(BYTE, 1, 1); - TEST_TYPE_UNSIGNED(BYTE); + TEST_TYPE_SIZE (BYTE, 1) + TEST_TYPE_ALIGN (BYTE, 1) + TEST_TYPE_UNSIGNED(BYTE) } static void test_pack_COLORREF(void) { /* COLORREF */ - TEST_TYPE(COLORREF, 4, 4); - TEST_TYPE_UNSIGNED(COLORREF); + TEST_TYPE_SIZE (COLORREF, 4) + TEST_TYPE_ALIGN (COLORREF, 4) + TEST_TYPE_UNSIGNED(COLORREF) } static void test_pack_DWORD(void) { /* DWORD */ - TEST_TYPE(DWORD, 4, 4); - TEST_TYPE_UNSIGNED(DWORD); + TEST_TYPE_SIZE (DWORD, 4) + TEST_TYPE_ALIGN (DWORD, 4) + TEST_TYPE_UNSIGNED(DWORD) } static void test_pack_FARPROC(void) { /* FARPROC */ - TEST_TYPE(FARPROC, 4, 4); + TEST_TYPE_SIZE (FARPROC, 4) + TEST_TYPE_ALIGN (FARPROC, 4) } static void test_pack_FLOAT(void) { /* FLOAT */ - TEST_TYPE(FLOAT, 4, 4); + TEST_TYPE_SIZE (FLOAT, 4) + TEST_TYPE_ALIGN (FLOAT, 4) } static void test_pack_GLOBALHANDLE(void) { /* GLOBALHANDLE */ - TEST_TYPE(GLOBALHANDLE, 4, 4); + TEST_TYPE_SIZE (GLOBALHANDLE, 4) + TEST_TYPE_ALIGN (GLOBALHANDLE, 4) } static void test_pack_HCURSOR(void) { /* HCURSOR */ - TEST_TYPE(HCURSOR, 4, 4); - TEST_TYPE_UNSIGNED(HCURSOR); + TEST_TYPE_SIZE (HCURSOR, 4) + TEST_TYPE_ALIGN (HCURSOR, 4) + TEST_TYPE_UNSIGNED(HCURSOR) } static void test_pack_HFILE(void) { /* HFILE */ - TEST_TYPE(HFILE, 4, 4); - TEST_TYPE_SIGNED(HFILE); + TEST_TYPE_SIZE (HFILE, 4) + TEST_TYPE_ALIGN (HFILE, 4) + TEST_TYPE_SIGNED(HFILE) } static void test_pack_HGDIOBJ(void) { /* HGDIOBJ */ - TEST_TYPE(HGDIOBJ, 4, 4); + TEST_TYPE_SIZE (HGDIOBJ, 4) + TEST_TYPE_ALIGN (HGDIOBJ, 4) } static void test_pack_HGLOBAL(void) { /* HGLOBAL */ - TEST_TYPE(HGLOBAL, 4, 4); + TEST_TYPE_SIZE (HGLOBAL, 4) + TEST_TYPE_ALIGN (HGLOBAL, 4) } static void test_pack_HLOCAL(void) { /* HLOCAL */ - TEST_TYPE(HLOCAL, 4, 4); + TEST_TYPE_SIZE (HLOCAL, 4) + TEST_TYPE_ALIGN (HLOCAL, 4) } static void test_pack_HMODULE(void) { /* HMODULE */ - TEST_TYPE(HMODULE, 4, 4); - TEST_TYPE_UNSIGNED(HMODULE); + TEST_TYPE_SIZE (HMODULE, 4) + TEST_TYPE_ALIGN (HMODULE, 4) + TEST_TYPE_UNSIGNED(HMODULE) } static void test_pack_INT(void) { /* INT */ - TEST_TYPE(INT, 4, 4); - TEST_TYPE_SIGNED(INT); + TEST_TYPE_SIZE (INT, 4) + TEST_TYPE_ALIGN (INT, 4) + TEST_TYPE_SIGNED(INT) } static void test_pack_LOCALHANDLE(void) { /* LOCALHANDLE */ - TEST_TYPE(LOCALHANDLE, 4, 4); + TEST_TYPE_SIZE (LOCALHANDLE, 4) + TEST_TYPE_ALIGN (LOCALHANDLE, 4) } static void test_pack_LPARAM(void) { /* LPARAM */ - TEST_TYPE(LPARAM, 4, 4); + TEST_TYPE_SIZE (LPARAM, 4) + TEST_TYPE_ALIGN (LPARAM, 4) } static void test_pack_LPCRECT(void) { /* LPCRECT */ - TEST_TYPE(LPCRECT, 4, 4); - TEST_TYPE_POINTER(LPCRECT, 16, 4); + TEST_TYPE_SIZE (LPCRECT, 4) + TEST_TYPE_ALIGN (LPCRECT, 4) + TEST_TARGET_SIZE (LPCRECT, 16) + TEST_TARGET_ALIGN(LPCRECT, 4) } static void test_pack_LPCRECTL(void) { /* LPCRECTL */ - TEST_TYPE(LPCRECTL, 4, 4); - TEST_TYPE_POINTER(LPCRECTL, 16, 4); + TEST_TYPE_SIZE (LPCRECTL, 4) + TEST_TYPE_ALIGN (LPCRECTL, 4) + TEST_TARGET_SIZE (LPCRECTL, 16) + TEST_TARGET_ALIGN(LPCRECTL, 4) } static void test_pack_LPCVOID(void) { /* LPCVOID */ - TEST_TYPE(LPCVOID, 4, 4); + TEST_TYPE_SIZE (LPCVOID, 4) + TEST_TYPE_ALIGN (LPCVOID, 4) } static void test_pack_LPPOINT(void) { /* LPPOINT */ - TEST_TYPE(LPPOINT, 4, 4); - TEST_TYPE_POINTER(LPPOINT, 8, 4); + TEST_TYPE_SIZE (LPPOINT, 4) + TEST_TYPE_ALIGN (LPPOINT, 4) + TEST_TARGET_SIZE (LPPOINT, 8) + TEST_TARGET_ALIGN(LPPOINT, 4) } static void test_pack_LPRECT(void) { /* LPRECT */ - TEST_TYPE(LPRECT, 4, 4); - TEST_TYPE_POINTER(LPRECT, 16, 4); + TEST_TYPE_SIZE (LPRECT, 4) + TEST_TYPE_ALIGN (LPRECT, 4) + TEST_TARGET_SIZE (LPRECT, 16) + TEST_TARGET_ALIGN(LPRECT, 4) } static void test_pack_LPRECTL(void) { /* LPRECTL */ - TEST_TYPE(LPRECTL, 4, 4); - TEST_TYPE_POINTER(LPRECTL, 16, 4); + TEST_TYPE_SIZE (LPRECTL, 4) + TEST_TYPE_ALIGN (LPRECTL, 4) + TEST_TARGET_SIZE (LPRECTL, 16) + TEST_TARGET_ALIGN(LPRECTL, 4) } static void test_pack_LPSIZE(void) { /* LPSIZE */ - TEST_TYPE(LPSIZE, 4, 4); - TEST_TYPE_POINTER(LPSIZE, 8, 4); + TEST_TYPE_SIZE (LPSIZE, 4) + TEST_TYPE_ALIGN (LPSIZE, 4) + TEST_TARGET_SIZE (LPSIZE, 8) + TEST_TARGET_ALIGN(LPSIZE, 4) } static void test_pack_LRESULT(void) { /* LRESULT */ - TEST_TYPE(LRESULT, 4, 4); + TEST_TYPE_SIZE (LRESULT, 4) + TEST_TYPE_ALIGN (LRESULT, 4) } static void test_pack_POINT(void) { /* POINT (pack 4) */ - TEST_TYPE(POINT, 8, 4); - TEST_FIELD(POINT, x, 0, 4, 4); - TEST_FIELD(POINT, y, 4, 4, 4); + TEST_TYPE_SIZE (POINT, 8) + TEST_TYPE_ALIGN (POINT, 4) + TEST_FIELD_SIZE (POINT, x, 4) + TEST_FIELD_ALIGN (POINT, x, 4) + TEST_FIELD_OFFSET(POINT, x, 0) + TEST_FIELD_SIZE (POINT, y, 4) + TEST_FIELD_ALIGN (POINT, y, 4) + TEST_FIELD_OFFSET(POINT, y, 4) } static void test_pack_POINTL(void) { /* POINTL (pack 4) */ - TEST_TYPE(POINTL, 8, 4); - TEST_FIELD(POINTL, x, 0, 4, 4); - TEST_FIELD(POINTL, y, 4, 4, 4); + TEST_TYPE_SIZE (POINTL, 8) + TEST_TYPE_ALIGN (POINTL, 4) + TEST_FIELD_SIZE (POINTL, x, 4) + TEST_FIELD_ALIGN (POINTL, x, 4) + TEST_FIELD_OFFSET(POINTL, x, 0) + TEST_FIELD_SIZE (POINTL, y, 4) + TEST_FIELD_ALIGN (POINTL, y, 4) + TEST_FIELD_OFFSET(POINTL, y, 4) } static void test_pack_PPOINT(void) { /* PPOINT */ - TEST_TYPE(PPOINT, 4, 4); - TEST_TYPE_POINTER(PPOINT, 8, 4); + TEST_TYPE_SIZE (PPOINT, 4) + TEST_TYPE_ALIGN (PPOINT, 4) + TEST_TARGET_SIZE (PPOINT, 8) + TEST_TARGET_ALIGN(PPOINT, 4) } static void test_pack_PPOINTL(void) { /* PPOINTL */ - TEST_TYPE(PPOINTL, 4, 4); - TEST_TYPE_POINTER(PPOINTL, 8, 4); + TEST_TYPE_SIZE (PPOINTL, 4) + TEST_TYPE_ALIGN (PPOINTL, 4) + TEST_TARGET_SIZE (PPOINTL, 8) + TEST_TARGET_ALIGN(PPOINTL, 4) } static void test_pack_PRECT(void) { /* PRECT */ - TEST_TYPE(PRECT, 4, 4); - TEST_TYPE_POINTER(PRECT, 16, 4); + TEST_TYPE_SIZE (PRECT, 4) + TEST_TYPE_ALIGN (PRECT, 4) + TEST_TARGET_SIZE (PRECT, 16) + TEST_TARGET_ALIGN(PRECT, 4) } static void test_pack_PRECTL(void) { /* PRECTL */ - TEST_TYPE(PRECTL, 4, 4); - TEST_TYPE_POINTER(PRECTL, 16, 4); + TEST_TYPE_SIZE (PRECTL, 4) + TEST_TYPE_ALIGN (PRECTL, 4) + TEST_TARGET_SIZE (PRECTL, 16) + TEST_TARGET_ALIGN(PRECTL, 4) } static void test_pack_PROC(void) { /* PROC */ - TEST_TYPE(PROC, 4, 4); + TEST_TYPE_SIZE (PROC, 4) + TEST_TYPE_ALIGN (PROC, 4) } static void test_pack_PSIZE(void) { /* PSIZE */ - TEST_TYPE(PSIZE, 4, 4); - TEST_TYPE_POINTER(PSIZE, 8, 4); + TEST_TYPE_SIZE (PSIZE, 4) + TEST_TYPE_ALIGN (PSIZE, 4) + TEST_TARGET_SIZE (PSIZE, 8) + TEST_TARGET_ALIGN(PSIZE, 4) } static void test_pack_PSZ(void) { /* PSZ */ - TEST_TYPE(PSZ, 4, 4); + TEST_TYPE_SIZE (PSZ, 4) + TEST_TYPE_ALIGN (PSZ, 4) } static void test_pack_RECT(void) { /* RECT (pack 4) */ - TEST_TYPE(RECT, 16, 4); - TEST_FIELD(RECT, left, 0, 4, 4); - TEST_FIELD(RECT, top, 4, 4, 4); - TEST_FIELD(RECT, right, 8, 4, 4); - TEST_FIELD(RECT, bottom, 12, 4, 4); + TEST_TYPE_SIZE (RECT, 16) + TEST_TYPE_ALIGN (RECT, 4) + TEST_FIELD_SIZE (RECT, left, 4) + TEST_FIELD_ALIGN (RECT, left, 4) + TEST_FIELD_OFFSET(RECT, left, 0) + TEST_FIELD_SIZE (RECT, top, 4) + TEST_FIELD_ALIGN (RECT, top, 4) + TEST_FIELD_OFFSET(RECT, top, 4) + TEST_FIELD_SIZE (RECT, right, 4) + TEST_FIELD_ALIGN (RECT, right, 4) + TEST_FIELD_OFFSET(RECT, right, 8) + TEST_FIELD_SIZE (RECT, bottom, 4) + TEST_FIELD_ALIGN (RECT, bottom, 4) + TEST_FIELD_OFFSET(RECT, bottom, 12) } static void test_pack_RECTL(void) { /* RECTL (pack 4) */ - TEST_TYPE(RECTL, 16, 4); - TEST_FIELD(RECTL, left, 0, 4, 4); - TEST_FIELD(RECTL, top, 4, 4, 4); - TEST_FIELD(RECTL, right, 8, 4, 4); - TEST_FIELD(RECTL, bottom, 12, 4, 4); + TEST_TYPE_SIZE (RECTL, 16) + TEST_TYPE_ALIGN (RECTL, 4) + TEST_FIELD_SIZE (RECTL, left, 4) + TEST_FIELD_ALIGN (RECTL, left, 4) + TEST_FIELD_OFFSET(RECTL, left, 0) + TEST_FIELD_SIZE (RECTL, top, 4) + TEST_FIELD_ALIGN (RECTL, top, 4) + TEST_FIELD_OFFSET(RECTL, top, 4) + TEST_FIELD_SIZE (RECTL, right, 4) + TEST_FIELD_ALIGN (RECTL, right, 4) + TEST_FIELD_OFFSET(RECTL, right, 8) + TEST_FIELD_SIZE (RECTL, bottom, 4) + TEST_FIELD_ALIGN (RECTL, bottom, 4) + TEST_FIELD_OFFSET(RECTL, bottom, 12) } static void test_pack_SIZE(void) { /* SIZE (pack 4) */ - TEST_TYPE(SIZE, 8, 4); - TEST_FIELD(SIZE, cx, 0, 4, 4); - TEST_FIELD(SIZE, cy, 4, 4, 4); + TEST_TYPE_SIZE (SIZE, 8) + TEST_TYPE_ALIGN (SIZE, 4) + TEST_FIELD_SIZE (SIZE, cx, 4) + TEST_FIELD_ALIGN (SIZE, cx, 4) + TEST_FIELD_OFFSET(SIZE, cx, 0) + TEST_FIELD_SIZE (SIZE, cy, 4) + TEST_FIELD_ALIGN (SIZE, cy, 4) + TEST_FIELD_OFFSET(SIZE, cy, 4) } static void test_pack_SIZEL(void) { /* SIZEL */ - TEST_TYPE(SIZEL, 8, 4); + TEST_TYPE_SIZE (SIZEL, 8) + TEST_TYPE_ALIGN (SIZEL, 4) } static void test_pack_UCHAR(void) { /* UCHAR */ - TEST_TYPE(UCHAR, 1, 1); - TEST_TYPE_UNSIGNED(UCHAR); + TEST_TYPE_SIZE (UCHAR, 1) + TEST_TYPE_ALIGN (UCHAR, 1) + TEST_TYPE_UNSIGNED(UCHAR) } static void test_pack_UINT(void) { /* UINT */ - TEST_TYPE(UINT, 4, 4); - TEST_TYPE_UNSIGNED(UINT); + TEST_TYPE_SIZE (UINT, 4) + TEST_TYPE_ALIGN (UINT, 4) + TEST_TYPE_UNSIGNED(UINT) } static void test_pack_ULONG(void) { /* ULONG */ - TEST_TYPE(ULONG, 4, 4); - TEST_TYPE_UNSIGNED(ULONG); + TEST_TYPE_SIZE (ULONG, 4) + TEST_TYPE_ALIGN (ULONG, 4) + TEST_TYPE_UNSIGNED(ULONG) } static void test_pack_USHORT(void) { /* USHORT */ - TEST_TYPE(USHORT, 2, 2); - TEST_TYPE_UNSIGNED(USHORT); + TEST_TYPE_SIZE (USHORT, 2) + TEST_TYPE_ALIGN (USHORT, 2) + TEST_TYPE_UNSIGNED(USHORT) } static void test_pack_WORD(void) { /* WORD */ - TEST_TYPE(WORD, 2, 2); - TEST_TYPE_UNSIGNED(WORD); + TEST_TYPE_SIZE (WORD, 2) + TEST_TYPE_ALIGN (WORD, 2) + TEST_TYPE_UNSIGNED(WORD) } static void test_pack_WPARAM(void) { /* WPARAM */ - TEST_TYPE(WPARAM, 4, 4); + TEST_TYPE_SIZE (WPARAM, 4) + TEST_TYPE_ALIGN (WPARAM, 4) } static void test_pack(void) diff --git a/dlls/rpcrt4/tests/generated.c b/dlls/rpcrt4/tests/generated.c index c066550f57f..a97f032eb92 100644 --- a/dlls/rpcrt4/tests/generated.c +++ b/dlls/rpcrt4/tests/generated.c @@ -56,83 +56,70 @@ * Test helper macros */ -#ifdef FIELD_ALIGNMENT -# define TEST_FIELD_ALIGNMENT(type, field, align) \ - ok(_TYPE_ALIGNMENT(((type*)0)->field) == align, \ - "FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \ - (int)_TYPE_ALIGNMENT(((type*)0)->field)) +#ifdef _WIN64 + +# define TEST_TYPE_SIZE(type, size) +# define TEST_TYPE_ALIGN(type, align) +# define TEST_TARGET_ALIGN(type, align) +# define TEST_FIELD_ALIGN(type, field, align) +# define TEST_FIELD_OFFSET(type, field, offset) + #else -# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0) + +# define TEST_TYPE_SIZE(type, size) C_ASSERT(sizeof(type) == size); + +# ifdef TYPE_ALIGNMENT +# define TEST_TYPE_ALIGN(type, align) C_ASSERT(TYPE_ALIGNMENT(type) == align); +# else +# define TEST_TYPE_ALIGN(type, align) +# endif + +# ifdef _TYPE_ALIGNMENT +# 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); +# else +# define TEST_TARGET_ALIGN(type, align) +# define TEST_FIELD_ALIGN(type, field, align) +# endif + +# define TEST_FIELD_OFFSET(type, field, offset) C_ASSERT(FIELD_OFFSET(type, field) == offset); + #endif -#define TEST_FIELD_OFFSET(type, field, offset) \ - ok(FIELD_OFFSET(type, field) == offset, \ - "FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")\n", \ - (long int)FIELD_OFFSET(type, field)) +#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); -#ifdef _TYPE_ALIGNMENT -#define TEST__TYPE_ALIGNMENT(type, align) \ - ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)_TYPE_ALIGNMENT(type)) -#else -# define TEST__TYPE_ALIGNMENT(type, align) do { } while (0) -#endif - -#ifdef TYPE_ALIGNMENT -#define TEST_TYPE_ALIGNMENT(type, align) \ - ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)TYPE_ALIGNMENT(type)) -#else -# define TEST_TYPE_ALIGNMENT(type, align) do { } while (0) -#endif - -#define TEST_TYPE_SIZE(type, size) \ - ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", ((int) sizeof(type))) - -/*********************************************************************** - * Test macros - */ - -#define TEST_FIELD(type, field, field_offset, field_size, field_align) \ - TEST_TYPE_SIZE((((type*)0)->field), field_size); \ - TEST_FIELD_ALIGNMENT(type, field, field_align); \ - TEST_FIELD_OFFSET(type, field, 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); + TEST_TYPE_SIZE (I_RPC_HANDLE, 4) + TEST_TYPE_ALIGN (I_RPC_HANDLE, 4) } static void test_pack_RPC_STATUS(void) { /* RPC_STATUS */ - TEST_TYPE(RPC_STATUS, 4, 4); + TEST_TYPE_SIZE (RPC_STATUS, 4) + TEST_TYPE_ALIGN (RPC_STATUS, 4) } static void test_pack_PRPC_POLICY(void) { /* PRPC_POLICY */ - TEST_TYPE(PRPC_POLICY, 4, 4); - TEST_TYPE_POINTER(PRPC_POLICY, 12, 4); + TEST_TYPE_SIZE (PRPC_POLICY, 4) + TEST_TYPE_ALIGN (PRPC_POLICY, 4) + TEST_TARGET_SIZE (PRPC_POLICY, 12) + TEST_TARGET_ALIGN(PRPC_POLICY, 4) } static void test_pack_RPC_AUTH_IDENTITY_HANDLE(void) { /* RPC_AUTH_IDENTITY_HANDLE */ - TEST_TYPE(RPC_AUTH_IDENTITY_HANDLE, 4, 4); + TEST_TYPE_SIZE (RPC_AUTH_IDENTITY_HANDLE, 4) + TEST_TYPE_ALIGN (RPC_AUTH_IDENTITY_HANDLE, 4) } static void test_pack_RPC_AUTH_KEY_RETRIEVAL_FN(void) @@ -143,110 +130,168 @@ static void test_pack_RPC_AUTH_KEY_RETRIEVAL_FN(void) static void test_pack_RPC_AUTHZ_HANDLE(void) { /* RPC_AUTHZ_HANDLE */ - TEST_TYPE(RPC_AUTHZ_HANDLE, 4, 4); + TEST_TYPE_SIZE (RPC_AUTHZ_HANDLE, 4) + TEST_TYPE_ALIGN (RPC_AUTHZ_HANDLE, 4) } static void test_pack_RPC_BINDING_HANDLE(void) { /* RPC_BINDING_HANDLE */ - TEST_TYPE(RPC_BINDING_HANDLE, 4, 4); + TEST_TYPE_SIZE (RPC_BINDING_HANDLE, 4) + TEST_TYPE_ALIGN (RPC_BINDING_HANDLE, 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, Count, 0, 4, 4); - TEST_FIELD(RPC_BINDING_VECTOR, BindingH, 4, 4, 4); + TEST_TYPE_SIZE (RPC_BINDING_VECTOR, 8) + TEST_TYPE_ALIGN (RPC_BINDING_VECTOR, 4) + TEST_FIELD_SIZE (RPC_BINDING_VECTOR, Count, 4) + TEST_FIELD_ALIGN (RPC_BINDING_VECTOR, Count, 4) + TEST_FIELD_OFFSET(RPC_BINDING_VECTOR, Count, 0) + TEST_FIELD_SIZE (RPC_BINDING_VECTOR, BindingH, 4) + TEST_FIELD_ALIGN (RPC_BINDING_VECTOR, BindingH, 4) + TEST_FIELD_OFFSET(RPC_BINDING_VECTOR, BindingH, 4) } static void test_pack_RPC_IF_HANDLE(void) { /* RPC_IF_HANDLE */ - TEST_TYPE(RPC_IF_HANDLE, 4, 4); + TEST_TYPE_SIZE (RPC_IF_HANDLE, 4) + TEST_TYPE_ALIGN (RPC_IF_HANDLE, 4) } static void test_pack_RPC_IF_ID(void) { /* RPC_IF_ID (pack 4) */ - TEST_TYPE(RPC_IF_ID, 20, 4); - TEST_FIELD(RPC_IF_ID, Uuid, 0, 16, 4); - TEST_FIELD(RPC_IF_ID, VersMajor, 16, 2, 2); - TEST_FIELD(RPC_IF_ID, VersMinor, 18, 2, 2); + TEST_TYPE_SIZE (RPC_IF_ID, 20) + TEST_TYPE_ALIGN (RPC_IF_ID, 4) + TEST_FIELD_SIZE (RPC_IF_ID, Uuid, 16) + TEST_FIELD_ALIGN (RPC_IF_ID, Uuid, 4) + TEST_FIELD_OFFSET(RPC_IF_ID, Uuid, 0) + TEST_FIELD_SIZE (RPC_IF_ID, VersMajor, 2) + TEST_FIELD_ALIGN (RPC_IF_ID, VersMajor, 2) + TEST_FIELD_OFFSET(RPC_IF_ID, VersMajor, 16) + TEST_FIELD_SIZE (RPC_IF_ID, VersMinor, 2) + TEST_FIELD_ALIGN (RPC_IF_ID, VersMinor, 2) + TEST_FIELD_OFFSET(RPC_IF_ID, VersMinor, 18) } static void test_pack_RPC_POLICY(void) { /* RPC_POLICY (pack 4) */ - TEST_TYPE(RPC_POLICY, 12, 4); - TEST_FIELD(RPC_POLICY, Length, 0, 4, 4); - TEST_FIELD(RPC_POLICY, EndpointFlags, 4, 4, 4); - TEST_FIELD(RPC_POLICY, NICFlags, 8, 4, 4); + TEST_TYPE_SIZE (RPC_POLICY, 12) + TEST_TYPE_ALIGN (RPC_POLICY, 4) + TEST_FIELD_SIZE (RPC_POLICY, Length, 4) + TEST_FIELD_ALIGN (RPC_POLICY, Length, 4) + TEST_FIELD_OFFSET(RPC_POLICY, Length, 0) + TEST_FIELD_SIZE (RPC_POLICY, EndpointFlags, 4) + TEST_FIELD_ALIGN (RPC_POLICY, EndpointFlags, 4) + TEST_FIELD_OFFSET(RPC_POLICY, EndpointFlags, 4) + TEST_FIELD_SIZE (RPC_POLICY, NICFlags, 4) + TEST_FIELD_ALIGN (RPC_POLICY, NICFlags, 4) + TEST_FIELD_OFFSET(RPC_POLICY, NICFlags, 8) } static void test_pack_UUID_VECTOR(void) { /* UUID_VECTOR (pack 4) */ - TEST_TYPE(UUID_VECTOR, 8, 4); - TEST_FIELD(UUID_VECTOR, Count, 0, 4, 4); - TEST_FIELD(UUID_VECTOR, Uuid, 4, 4, 4); + TEST_TYPE_SIZE (UUID_VECTOR, 8) + TEST_TYPE_ALIGN (UUID_VECTOR, 4) + TEST_FIELD_SIZE (UUID_VECTOR, Count, 4) + TEST_FIELD_ALIGN (UUID_VECTOR, Count, 4) + TEST_FIELD_OFFSET(UUID_VECTOR, Count, 0) + TEST_FIELD_SIZE (UUID_VECTOR, Uuid, 4) + TEST_FIELD_ALIGN (UUID_VECTOR, Uuid, 4) + TEST_FIELD_OFFSET(UUID_VECTOR, Uuid, 4) } static void test_pack_PRPC_CLIENT_INTERFACE(void) { /* PRPC_CLIENT_INTERFACE */ - TEST_TYPE(PRPC_CLIENT_INTERFACE, 4, 4); - TEST_TYPE_POINTER(PRPC_CLIENT_INTERFACE, 68, 4); + TEST_TYPE_SIZE (PRPC_CLIENT_INTERFACE, 4) + TEST_TYPE_ALIGN (PRPC_CLIENT_INTERFACE, 4) + TEST_TARGET_SIZE (PRPC_CLIENT_INTERFACE, 68) + TEST_TARGET_ALIGN(PRPC_CLIENT_INTERFACE, 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); + TEST_TYPE_SIZE (PRPC_DISPATCH_TABLE, 4) + TEST_TYPE_ALIGN (PRPC_DISPATCH_TABLE, 4) + TEST_TARGET_SIZE (PRPC_DISPATCH_TABLE, 12) + TEST_TARGET_ALIGN(PRPC_DISPATCH_TABLE, 4) } static void test_pack_PRPC_MESSAGE(void) { /* PRPC_MESSAGE */ - TEST_TYPE(PRPC_MESSAGE, 4, 4); - TEST_TYPE_POINTER(PRPC_MESSAGE, 44, 4); + TEST_TYPE_SIZE (PRPC_MESSAGE, 4) + TEST_TYPE_ALIGN (PRPC_MESSAGE, 4) + TEST_TARGET_SIZE (PRPC_MESSAGE, 44) + TEST_TARGET_ALIGN(PRPC_MESSAGE, 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); + TEST_TYPE_SIZE (PRPC_PROTSEQ_ENDPOINT, 4) + TEST_TYPE_ALIGN (PRPC_PROTSEQ_ENDPOINT, 4) + TEST_TARGET_SIZE (PRPC_PROTSEQ_ENDPOINT, 8) + TEST_TARGET_ALIGN(PRPC_PROTSEQ_ENDPOINT, 4) } static void test_pack_PRPC_SERVER_INTERFACE(void) { /* PRPC_SERVER_INTERFACE */ - TEST_TYPE(PRPC_SERVER_INTERFACE, 4, 4); - TEST_TYPE_POINTER(PRPC_SERVER_INTERFACE, 68, 4); + TEST_TYPE_SIZE (PRPC_SERVER_INTERFACE, 4) + TEST_TYPE_ALIGN (PRPC_SERVER_INTERFACE, 4) + TEST_TARGET_SIZE (PRPC_SERVER_INTERFACE, 68) + TEST_TARGET_ALIGN(PRPC_SERVER_INTERFACE, 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); + TEST_TYPE_SIZE (PRPC_SYNTAX_IDENTIFIER, 4) + TEST_TYPE_ALIGN (PRPC_SYNTAX_IDENTIFIER, 4) + TEST_TARGET_SIZE (PRPC_SYNTAX_IDENTIFIER, 20) + TEST_TARGET_ALIGN(PRPC_SYNTAX_IDENTIFIER, 4) } static void test_pack_RPC_CLIENT_INTERFACE(void) { /* RPC_CLIENT_INTERFACE (pack 4) */ - TEST_TYPE(RPC_CLIENT_INTERFACE, 68, 4); - TEST_FIELD(RPC_CLIENT_INTERFACE, Length, 0, 4, 4); - TEST_FIELD(RPC_CLIENT_INTERFACE, InterfaceId, 4, 20, 4); - TEST_FIELD(RPC_CLIENT_INTERFACE, TransferSyntax, 24, 20, 4); - TEST_FIELD(RPC_CLIENT_INTERFACE, DispatchTable, 44, 4, 4); - TEST_FIELD(RPC_CLIENT_INTERFACE, RpcProtseqEndpointCount, 48, 4, 4); - TEST_FIELD(RPC_CLIENT_INTERFACE, RpcProtseqEndpoint, 52, 4, 4); - TEST_FIELD(RPC_CLIENT_INTERFACE, Reserved, 56, 4, 4); - TEST_FIELD(RPC_CLIENT_INTERFACE, InterpreterInfo, 60, 4, 4); - TEST_FIELD(RPC_CLIENT_INTERFACE, Flags, 64, 4, 4); + TEST_TYPE_SIZE (RPC_CLIENT_INTERFACE, 68) + TEST_TYPE_ALIGN (RPC_CLIENT_INTERFACE, 4) + TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, Length, 4) + TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, Length, 4) + TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, Length, 0) + TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, InterfaceId, 20) + TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, InterfaceId, 4) + TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, InterfaceId, 4) + TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, TransferSyntax, 20) + TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, TransferSyntax, 4) + TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, TransferSyntax, 24) + TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, DispatchTable, 4) + TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, DispatchTable, 4) + TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, DispatchTable, 44) + TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, RpcProtseqEndpointCount, 4) + TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, RpcProtseqEndpointCount, 4) + TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, RpcProtseqEndpointCount, 48) + TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, RpcProtseqEndpoint, 4) + TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, RpcProtseqEndpoint, 4) + TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, RpcProtseqEndpoint, 52) + TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, Reserved, 4) + TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, Reserved, 4) + TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, Reserved, 56) + TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, InterpreterInfo, 4) + TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, InterpreterInfo, 4) + TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, InterpreterInfo, 60) + TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, Flags, 4) + TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, Flags, 4) + TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, Flags, 64) } static void test_pack_RPC_DISPATCH_FUNCTION(void) @@ -257,95 +302,184 @@ static void test_pack_RPC_DISPATCH_FUNCTION(void) 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, DispatchTableCount, 0, 4, 4); - TEST_FIELD(RPC_DISPATCH_TABLE, DispatchTable, 4, 4, 4); - TEST_FIELD(RPC_DISPATCH_TABLE, Reserved, 8, 4, 4); + TEST_TYPE_SIZE (RPC_DISPATCH_TABLE, 12) + TEST_TYPE_ALIGN (RPC_DISPATCH_TABLE, 4) + TEST_FIELD_SIZE (RPC_DISPATCH_TABLE, DispatchTableCount, 4) + TEST_FIELD_ALIGN (RPC_DISPATCH_TABLE, DispatchTableCount, 4) + TEST_FIELD_OFFSET(RPC_DISPATCH_TABLE, DispatchTableCount, 0) + TEST_FIELD_SIZE (RPC_DISPATCH_TABLE, DispatchTable, 4) + TEST_FIELD_ALIGN (RPC_DISPATCH_TABLE, DispatchTable, 4) + TEST_FIELD_OFFSET(RPC_DISPATCH_TABLE, DispatchTable, 4) + TEST_FIELD_SIZE (RPC_DISPATCH_TABLE, Reserved, 4) + TEST_FIELD_ALIGN (RPC_DISPATCH_TABLE, Reserved, 4) + TEST_FIELD_OFFSET(RPC_DISPATCH_TABLE, Reserved, 8) } static void test_pack_RPC_MESSAGE(void) { /* RPC_MESSAGE (pack 4) */ - TEST_TYPE(RPC_MESSAGE, 44, 4); - TEST_FIELD(RPC_MESSAGE, Handle, 0, 4, 4); - TEST_FIELD(RPC_MESSAGE, DataRepresentation, 4, 4, 4); - TEST_FIELD(RPC_MESSAGE, Buffer, 8, 4, 4); - TEST_FIELD(RPC_MESSAGE, BufferLength, 12, 4, 4); - TEST_FIELD(RPC_MESSAGE, ProcNum, 16, 4, 4); - TEST_FIELD(RPC_MESSAGE, TransferSyntax, 20, 4, 4); - TEST_FIELD(RPC_MESSAGE, RpcInterfaceInformation, 24, 4, 4); - TEST_FIELD(RPC_MESSAGE, ReservedForRuntime, 28, 4, 4); - TEST_FIELD(RPC_MESSAGE, ManagerEpv, 32, 4, 4); - TEST_FIELD(RPC_MESSAGE, ImportContext, 36, 4, 4); - TEST_FIELD(RPC_MESSAGE, RpcFlags, 40, 4, 4); + TEST_TYPE_SIZE (RPC_MESSAGE, 44) + TEST_TYPE_ALIGN (RPC_MESSAGE, 4) + TEST_FIELD_SIZE (RPC_MESSAGE, Handle, 4) + TEST_FIELD_ALIGN (RPC_MESSAGE, Handle, 4) + TEST_FIELD_OFFSET(RPC_MESSAGE, Handle, 0) + TEST_FIELD_SIZE (RPC_MESSAGE, DataRepresentation, 4) + TEST_FIELD_ALIGN (RPC_MESSAGE, DataRepresentation, 4) + TEST_FIELD_OFFSET(RPC_MESSAGE, DataRepresentation, 4) + TEST_FIELD_SIZE (RPC_MESSAGE, Buffer, 4) + TEST_FIELD_ALIGN (RPC_MESSAGE, Buffer, 4) + TEST_FIELD_OFFSET(RPC_MESSAGE, Buffer, 8) + TEST_FIELD_SIZE (RPC_MESSAGE, BufferLength, 4) + TEST_FIELD_ALIGN (RPC_MESSAGE, BufferLength, 4) + TEST_FIELD_OFFSET(RPC_MESSAGE, BufferLength, 12) + TEST_FIELD_SIZE (RPC_MESSAGE, ProcNum, 4) + TEST_FIELD_ALIGN (RPC_MESSAGE, ProcNum, 4) + TEST_FIELD_OFFSET(RPC_MESSAGE, ProcNum, 16) + TEST_FIELD_SIZE (RPC_MESSAGE, TransferSyntax, 4) + TEST_FIELD_ALIGN (RPC_MESSAGE, TransferSyntax, 4) + TEST_FIELD_OFFSET(RPC_MESSAGE, TransferSyntax, 20) + TEST_FIELD_SIZE (RPC_MESSAGE, RpcInterfaceInformation, 4) + TEST_FIELD_ALIGN (RPC_MESSAGE, RpcInterfaceInformation, 4) + TEST_FIELD_OFFSET(RPC_MESSAGE, RpcInterfaceInformation, 24) + TEST_FIELD_SIZE (RPC_MESSAGE, ReservedForRuntime, 4) + TEST_FIELD_ALIGN (RPC_MESSAGE, ReservedForRuntime, 4) + TEST_FIELD_OFFSET(RPC_MESSAGE, ReservedForRuntime, 28) + TEST_FIELD_SIZE (RPC_MESSAGE, ManagerEpv, 4) + TEST_FIELD_ALIGN (RPC_MESSAGE, ManagerEpv, 4) + TEST_FIELD_OFFSET(RPC_MESSAGE, ManagerEpv, 32) + TEST_FIELD_SIZE (RPC_MESSAGE, ImportContext, 4) + TEST_FIELD_ALIGN (RPC_MESSAGE, ImportContext, 4) + TEST_FIELD_OFFSET(RPC_MESSAGE, ImportContext, 36) + TEST_FIELD_SIZE (RPC_MESSAGE, RpcFlags, 4) + TEST_FIELD_ALIGN (RPC_MESSAGE, RpcFlags, 4) + TEST_FIELD_OFFSET(RPC_MESSAGE, RpcFlags, 40) } 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, RpcProtocolSequence, 0, 4, 4); - TEST_FIELD(RPC_PROTSEQ_ENDPOINT, Endpoint, 4, 4, 4); + TEST_TYPE_SIZE (RPC_PROTSEQ_ENDPOINT, 8) + TEST_TYPE_ALIGN (RPC_PROTSEQ_ENDPOINT, 4) + TEST_FIELD_SIZE (RPC_PROTSEQ_ENDPOINT, RpcProtocolSequence, 4) + TEST_FIELD_ALIGN (RPC_PROTSEQ_ENDPOINT, RpcProtocolSequence, 4) + TEST_FIELD_OFFSET(RPC_PROTSEQ_ENDPOINT, RpcProtocolSequence, 0) + TEST_FIELD_SIZE (RPC_PROTSEQ_ENDPOINT, Endpoint, 4) + TEST_FIELD_ALIGN (RPC_PROTSEQ_ENDPOINT, Endpoint, 4) + TEST_FIELD_OFFSET(RPC_PROTSEQ_ENDPOINT, Endpoint, 4) } static void test_pack_RPC_SERVER_INTERFACE(void) { /* RPC_SERVER_INTERFACE (pack 4) */ - TEST_TYPE(RPC_SERVER_INTERFACE, 68, 4); - TEST_FIELD(RPC_SERVER_INTERFACE, Length, 0, 4, 4); - TEST_FIELD(RPC_SERVER_INTERFACE, InterfaceId, 4, 20, 4); - TEST_FIELD(RPC_SERVER_INTERFACE, TransferSyntax, 24, 20, 4); - TEST_FIELD(RPC_SERVER_INTERFACE, DispatchTable, 44, 4, 4); - TEST_FIELD(RPC_SERVER_INTERFACE, RpcProtseqEndpointCount, 48, 4, 4); - TEST_FIELD(RPC_SERVER_INTERFACE, RpcProtseqEndpoint, 52, 4, 4); - TEST_FIELD(RPC_SERVER_INTERFACE, DefaultManagerEpv, 56, 4, 4); - TEST_FIELD(RPC_SERVER_INTERFACE, InterpreterInfo, 60, 4, 4); - TEST_FIELD(RPC_SERVER_INTERFACE, Flags, 64, 4, 4); + TEST_TYPE_SIZE (RPC_SERVER_INTERFACE, 68) + TEST_TYPE_ALIGN (RPC_SERVER_INTERFACE, 4) + TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, Length, 4) + TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, Length, 4) + TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, Length, 0) + TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, InterfaceId, 20) + TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, InterfaceId, 4) + TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, InterfaceId, 4) + TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, TransferSyntax, 20) + TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, TransferSyntax, 4) + TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, TransferSyntax, 24) + TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, DispatchTable, 4) + TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, DispatchTable, 4) + TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, DispatchTable, 44) + TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, RpcProtseqEndpointCount, 4) + TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, RpcProtseqEndpointCount, 4) + TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, RpcProtseqEndpointCount, 48) + TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, RpcProtseqEndpoint, 4) + TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, RpcProtseqEndpoint, 4) + TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, RpcProtseqEndpoint, 52) + TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, DefaultManagerEpv, 4) + TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, DefaultManagerEpv, 4) + TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, DefaultManagerEpv, 56) + TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, InterpreterInfo, 4) + TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, InterpreterInfo, 4) + TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, InterpreterInfo, 60) + TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, Flags, 4) + TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, Flags, 4) + TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, Flags, 64) } 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, SyntaxGUID, 0, 16, 4); - TEST_FIELD(RPC_SYNTAX_IDENTIFIER, SyntaxVersion, 16, 4, 2); + TEST_TYPE_SIZE (RPC_SYNTAX_IDENTIFIER, 20) + TEST_TYPE_ALIGN (RPC_SYNTAX_IDENTIFIER, 4) + TEST_FIELD_SIZE (RPC_SYNTAX_IDENTIFIER, SyntaxGUID, 16) + TEST_FIELD_ALIGN (RPC_SYNTAX_IDENTIFIER, SyntaxGUID, 4) + TEST_FIELD_OFFSET(RPC_SYNTAX_IDENTIFIER, SyntaxGUID, 0) + TEST_FIELD_SIZE (RPC_SYNTAX_IDENTIFIER, SyntaxVersion, 4) + TEST_FIELD_ALIGN (RPC_SYNTAX_IDENTIFIER, SyntaxVersion, 2) + TEST_FIELD_OFFSET(RPC_SYNTAX_IDENTIFIER, SyntaxVersion, 16) } static void test_pack_RPC_VERSION(void) { /* RPC_VERSION (pack 4) */ - TEST_TYPE(RPC_VERSION, 4, 2); - TEST_FIELD(RPC_VERSION, MajorVersion, 0, 2, 2); - TEST_FIELD(RPC_VERSION, MinorVersion, 2, 2, 2); + TEST_TYPE_SIZE (RPC_VERSION, 4) + TEST_TYPE_ALIGN (RPC_VERSION, 2) + TEST_FIELD_SIZE (RPC_VERSION, MajorVersion, 2) + TEST_FIELD_ALIGN (RPC_VERSION, MajorVersion, 2) + TEST_FIELD_OFFSET(RPC_VERSION, MajorVersion, 0) + TEST_FIELD_SIZE (RPC_VERSION, MinorVersion, 2) + TEST_FIELD_ALIGN (RPC_VERSION, MinorVersion, 2) + TEST_FIELD_OFFSET(RPC_VERSION, MinorVersion, 2) } static void test_pack_ARRAY_INFO(void) { /* ARRAY_INFO (pack 4) */ - TEST_TYPE(ARRAY_INFO, 24, 4); - TEST_FIELD(ARRAY_INFO, Dimension, 0, 4, 4); - TEST_FIELD(ARRAY_INFO, BufferConformanceMark, 4, 4, 4); - TEST_FIELD(ARRAY_INFO, BufferVarianceMark, 8, 4, 4); - TEST_FIELD(ARRAY_INFO, MaxCountArray, 12, 4, 4); - TEST_FIELD(ARRAY_INFO, OffsetArray, 16, 4, 4); - TEST_FIELD(ARRAY_INFO, ActualCountArray, 20, 4, 4); + TEST_TYPE_SIZE (ARRAY_INFO, 24) + TEST_TYPE_ALIGN (ARRAY_INFO, 4) + TEST_FIELD_SIZE (ARRAY_INFO, Dimension, 4) + TEST_FIELD_ALIGN (ARRAY_INFO, Dimension, 4) + TEST_FIELD_OFFSET(ARRAY_INFO, Dimension, 0) + TEST_FIELD_SIZE (ARRAY_INFO, BufferConformanceMark, 4) + TEST_FIELD_ALIGN (ARRAY_INFO, BufferConformanceMark, 4) + TEST_FIELD_OFFSET(ARRAY_INFO, BufferConformanceMark, 4) + TEST_FIELD_SIZE (ARRAY_INFO, BufferVarianceMark, 4) + TEST_FIELD_ALIGN (ARRAY_INFO, BufferVarianceMark, 4) + TEST_FIELD_OFFSET(ARRAY_INFO, BufferVarianceMark, 8) + TEST_FIELD_SIZE (ARRAY_INFO, MaxCountArray, 4) + TEST_FIELD_ALIGN (ARRAY_INFO, MaxCountArray, 4) + TEST_FIELD_OFFSET(ARRAY_INFO, MaxCountArray, 12) + TEST_FIELD_SIZE (ARRAY_INFO, OffsetArray, 4) + TEST_FIELD_ALIGN (ARRAY_INFO, OffsetArray, 4) + TEST_FIELD_OFFSET(ARRAY_INFO, OffsetArray, 16) + TEST_FIELD_SIZE (ARRAY_INFO, ActualCountArray, 4) + TEST_FIELD_ALIGN (ARRAY_INFO, ActualCountArray, 4) + TEST_FIELD_OFFSET(ARRAY_INFO, ActualCountArray, 20) } 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, CommOffset, 0, 2, 2); - TEST_FIELD(COMM_FAULT_OFFSETS, FaultOffset, 2, 2, 2); + TEST_TYPE_SIZE (COMM_FAULT_OFFSETS, 4) + TEST_TYPE_ALIGN (COMM_FAULT_OFFSETS, 2) + TEST_FIELD_SIZE (COMM_FAULT_OFFSETS, CommOffset, 2) + TEST_FIELD_ALIGN (COMM_FAULT_OFFSETS, CommOffset, 2) + TEST_FIELD_OFFSET(COMM_FAULT_OFFSETS, CommOffset, 0) + TEST_FIELD_SIZE (COMM_FAULT_OFFSETS, FaultOffset, 2) + TEST_FIELD_ALIGN (COMM_FAULT_OFFSETS, FaultOffset, 2) + TEST_FIELD_OFFSET(COMM_FAULT_OFFSETS, FaultOffset, 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, WireCodeset, 0, 4, 4); - TEST_FIELD(CS_STUB_INFO, DesiredReceivingCodeset, 4, 4, 4); - TEST_FIELD(CS_STUB_INFO, CSArrayInfo, 8, 4, 4); + TEST_TYPE_SIZE (CS_STUB_INFO, 12) + TEST_TYPE_ALIGN (CS_STUB_INFO, 4) + TEST_FIELD_SIZE (CS_STUB_INFO, WireCodeset, 4) + TEST_FIELD_ALIGN (CS_STUB_INFO, WireCodeset, 4) + TEST_FIELD_OFFSET(CS_STUB_INFO, WireCodeset, 0) + TEST_FIELD_SIZE (CS_STUB_INFO, DesiredReceivingCodeset, 4) + TEST_FIELD_ALIGN (CS_STUB_INFO, DesiredReceivingCodeset, 4) + TEST_FIELD_OFFSET(CS_STUB_INFO, DesiredReceivingCodeset, 4) + TEST_FIELD_SIZE (CS_STUB_INFO, CSArrayInfo, 4) + TEST_FIELD_ALIGN (CS_STUB_INFO, CSArrayInfo, 4) + TEST_FIELD_OFFSET(CS_STUB_INFO, CSArrayInfo, 8) } static void test_pack_EXPR_EVAL(void) @@ -356,11 +490,20 @@ static void test_pack_EXPR_EVAL(void) 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, Next, 0, 4, 4); - TEST_FIELD(FULL_PTR_TO_REFID_ELEMENT, Pointer, 4, 4, 4); - TEST_FIELD(FULL_PTR_TO_REFID_ELEMENT, RefId, 8, 4, 4); - TEST_FIELD(FULL_PTR_TO_REFID_ELEMENT, State, 12, 1, 1); + TEST_TYPE_SIZE (FULL_PTR_TO_REFID_ELEMENT, 16) + TEST_TYPE_ALIGN (FULL_PTR_TO_REFID_ELEMENT, 4) + TEST_FIELD_SIZE (FULL_PTR_TO_REFID_ELEMENT, Next, 4) + TEST_FIELD_ALIGN (FULL_PTR_TO_REFID_ELEMENT, Next, 4) + TEST_FIELD_OFFSET(FULL_PTR_TO_REFID_ELEMENT, Next, 0) + TEST_FIELD_SIZE (FULL_PTR_TO_REFID_ELEMENT, Pointer, 4) + TEST_FIELD_ALIGN (FULL_PTR_TO_REFID_ELEMENT, Pointer, 4) + TEST_FIELD_OFFSET(FULL_PTR_TO_REFID_ELEMENT, Pointer, 4) + TEST_FIELD_SIZE (FULL_PTR_TO_REFID_ELEMENT, RefId, 4) + TEST_FIELD_ALIGN (FULL_PTR_TO_REFID_ELEMENT, RefId, 4) + TEST_FIELD_OFFSET(FULL_PTR_TO_REFID_ELEMENT, RefId, 8) + TEST_FIELD_SIZE (FULL_PTR_TO_REFID_ELEMENT, State, 1) + TEST_FIELD_ALIGN (FULL_PTR_TO_REFID_ELEMENT, State, 1) + TEST_FIELD_OFFSET(FULL_PTR_TO_REFID_ELEMENT, State, 12) } static void test_pack_FULL_PTR_XLAT_TABLES(void) @@ -371,8 +514,12 @@ static void test_pack_FULL_PTR_XLAT_TABLES(void) static void test_pack_GENERIC_BINDING_INFO(void) { /* GENERIC_BINDING_INFO (pack 4) */ - TEST_FIELD(GENERIC_BINDING_INFO, pObj, 0, 4, 4); - TEST_FIELD(GENERIC_BINDING_INFO, Size, 4, 4, 4); + TEST_FIELD_SIZE (GENERIC_BINDING_INFO, pObj, 4) + TEST_FIELD_ALIGN (GENERIC_BINDING_INFO, pObj, 4) + TEST_FIELD_OFFSET(GENERIC_BINDING_INFO, pObj, 0) + TEST_FIELD_SIZE (GENERIC_BINDING_INFO, Size, 4) + TEST_FIELD_ALIGN (GENERIC_BINDING_INFO, Size, 4) + TEST_FIELD_OFFSET(GENERIC_BINDING_INFO, Size, 4) } static void test_pack_GENERIC_BINDING_ROUTINE_PAIR(void) @@ -388,82 +535,170 @@ static void test_pack_MALLOC_FREE_STRUCT(void) static void test_pack_MIDL_FORMAT_STRING(void) { /* MIDL_FORMAT_STRING (pack 4) */ - TEST_FIELD(MIDL_FORMAT_STRING, Pad, 0, 2, 2); + TEST_FIELD_SIZE (MIDL_FORMAT_STRING, Pad, 2) + TEST_FIELD_ALIGN (MIDL_FORMAT_STRING, Pad, 2) + TEST_FIELD_OFFSET(MIDL_FORMAT_STRING, Pad, 0) } 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, pStubDesc, 0, 4, 4); - TEST_FIELD(MIDL_SERVER_INFO, DispatchTable, 4, 4, 4); - TEST_FIELD(MIDL_SERVER_INFO, ProcString, 8, 4, 4); - TEST_FIELD(MIDL_SERVER_INFO, FmtStringOffset, 12, 4, 4); - TEST_FIELD(MIDL_SERVER_INFO, ThunkTable, 16, 4, 4); - TEST_FIELD(MIDL_SERVER_INFO, pTransferSyntax, 20, 4, 4); - TEST_FIELD(MIDL_SERVER_INFO, nCount, 24, 4, 4); - TEST_FIELD(MIDL_SERVER_INFO, pSyntaxInfo, 28, 4, 4); + TEST_TYPE_SIZE (MIDL_SERVER_INFO, 32) + TEST_TYPE_ALIGN (MIDL_SERVER_INFO, 4) + TEST_FIELD_SIZE (MIDL_SERVER_INFO, pStubDesc, 4) + TEST_FIELD_ALIGN (MIDL_SERVER_INFO, pStubDesc, 4) + TEST_FIELD_OFFSET(MIDL_SERVER_INFO, pStubDesc, 0) + TEST_FIELD_SIZE (MIDL_SERVER_INFO, DispatchTable, 4) + TEST_FIELD_ALIGN (MIDL_SERVER_INFO, DispatchTable, 4) + TEST_FIELD_OFFSET(MIDL_SERVER_INFO, DispatchTable, 4) + TEST_FIELD_SIZE (MIDL_SERVER_INFO, ProcString, 4) + TEST_FIELD_ALIGN (MIDL_SERVER_INFO, ProcString, 4) + TEST_FIELD_OFFSET(MIDL_SERVER_INFO, ProcString, 8) + TEST_FIELD_SIZE (MIDL_SERVER_INFO, FmtStringOffset, 4) + TEST_FIELD_ALIGN (MIDL_SERVER_INFO, FmtStringOffset, 4) + TEST_FIELD_OFFSET(MIDL_SERVER_INFO, FmtStringOffset, 12) + TEST_FIELD_SIZE (MIDL_SERVER_INFO, ThunkTable, 4) + TEST_FIELD_ALIGN (MIDL_SERVER_INFO, ThunkTable, 4) + TEST_FIELD_OFFSET(MIDL_SERVER_INFO, ThunkTable, 16) + TEST_FIELD_SIZE (MIDL_SERVER_INFO, pTransferSyntax, 4) + TEST_FIELD_ALIGN (MIDL_SERVER_INFO, pTransferSyntax, 4) + TEST_FIELD_OFFSET(MIDL_SERVER_INFO, pTransferSyntax, 20) + TEST_FIELD_SIZE (MIDL_SERVER_INFO, nCount, 4) + TEST_FIELD_ALIGN (MIDL_SERVER_INFO, nCount, 4) + TEST_FIELD_OFFSET(MIDL_SERVER_INFO, nCount, 24) + TEST_FIELD_SIZE (MIDL_SERVER_INFO, pSyntaxInfo, 4) + TEST_FIELD_ALIGN (MIDL_SERVER_INFO, pSyntaxInfo, 4) + TEST_FIELD_OFFSET(MIDL_SERVER_INFO, pSyntaxInfo, 28) } static void test_pack_MIDL_STUB_DESC(void) { /* MIDL_STUB_DESC (pack 4) */ - TEST_FIELD(MIDL_STUB_DESC, RpcInterfaceInformation, 0, 4, 4); + TEST_FIELD_SIZE (MIDL_STUB_DESC, RpcInterfaceInformation, 4) + TEST_FIELD_ALIGN (MIDL_STUB_DESC, RpcInterfaceInformation, 4) + TEST_FIELD_OFFSET(MIDL_STUB_DESC, RpcInterfaceInformation, 0) } static void test_pack_MIDL_STUB_MESSAGE(void) { /* MIDL_STUB_MESSAGE (pack 4) */ - TEST_FIELD(MIDL_STUB_MESSAGE, RpcMsg, 0, 4, 4); - TEST_FIELD(MIDL_STUB_MESSAGE, Buffer, 4, 4, 4); - TEST_FIELD(MIDL_STUB_MESSAGE, BufferStart, 8, 4, 4); - TEST_FIELD(MIDL_STUB_MESSAGE, BufferEnd, 12, 4, 4); - TEST_FIELD(MIDL_STUB_MESSAGE, BufferMark, 16, 4, 4); - TEST_FIELD(MIDL_STUB_MESSAGE, BufferLength, 20, 4, 4); - TEST_FIELD(MIDL_STUB_MESSAGE, MemorySize, 24, 4, 4); - TEST_FIELD(MIDL_STUB_MESSAGE, Memory, 28, 4, 4); - TEST_FIELD(MIDL_STUB_MESSAGE, ReuseBuffer, 36, 4, 4); - TEST_FIELD(MIDL_STUB_MESSAGE, pAllocAllNodesContext, 40, 4, 4); - TEST_FIELD(MIDL_STUB_MESSAGE, pPointerQueueState, 44, 4, 4); - TEST_FIELD(MIDL_STUB_MESSAGE, IgnoreEmbeddedPointers, 48, 4, 4); - TEST_FIELD(MIDL_STUB_MESSAGE, PointerBufferMark, 52, 4, 4); - TEST_FIELD(MIDL_STUB_MESSAGE, CorrDespIncrement, 56, 1, 1); - TEST_FIELD(MIDL_STUB_MESSAGE, uFlags, 57, 1, 1); - TEST_FIELD(MIDL_STUB_MESSAGE, MaxCount, 60, 4, 4); - TEST_FIELD(MIDL_STUB_MESSAGE, Offset, 64, 4, 4); - TEST_FIELD(MIDL_STUB_MESSAGE, ActualCount, 68, 4, 4); + TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, RpcMsg, 4) + TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, RpcMsg, 4) + TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, RpcMsg, 0) + TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, Buffer, 4) + TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, Buffer, 4) + TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, Buffer, 4) + TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, BufferStart, 4) + TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, BufferStart, 4) + TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, BufferStart, 8) + TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, BufferEnd, 4) + TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, BufferEnd, 4) + TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, BufferEnd, 12) + TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, BufferMark, 4) + TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, BufferMark, 4) + TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, BufferMark, 16) + TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, BufferLength, 4) + TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, BufferLength, 4) + TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, BufferLength, 20) + TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, MemorySize, 4) + TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, MemorySize, 4) + TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, MemorySize, 24) + TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, Memory, 4) + TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, Memory, 4) + TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, Memory, 28) + TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, ReuseBuffer, 4) + TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, ReuseBuffer, 4) + TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, ReuseBuffer, 36) + TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, pAllocAllNodesContext, 4) + TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, pAllocAllNodesContext, 4) + TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, pAllocAllNodesContext, 40) + TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, pPointerQueueState, 4) + TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, pPointerQueueState, 4) + TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, pPointerQueueState, 44) + TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, IgnoreEmbeddedPointers, 4) + TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, IgnoreEmbeddedPointers, 4) + TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, IgnoreEmbeddedPointers, 48) + TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, PointerBufferMark, 4) + TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, PointerBufferMark, 4) + TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, PointerBufferMark, 52) + TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, CorrDespIncrement, 1) + TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, CorrDespIncrement, 1) + TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, CorrDespIncrement, 56) + TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, uFlags, 1) + TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, uFlags, 1) + TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, uFlags, 57) + TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, MaxCount, 4) + TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, MaxCount, 4) + TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, MaxCount, 60) + TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, Offset, 4) + TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, Offset, 4) + TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, Offset, 64) + TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, ActualCount, 4) + TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, ActualCount, 4) + TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, ActualCount, 68) } 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, pStubDesc, 0, 4, 4); - TEST_FIELD(MIDL_STUBLESS_PROXY_INFO, ProcFormatString, 4, 4, 4); - TEST_FIELD(MIDL_STUBLESS_PROXY_INFO, FormatStringOffset, 8, 4, 4); - TEST_FIELD(MIDL_STUBLESS_PROXY_INFO, pTransferSyntax, 12, 4, 4); - TEST_FIELD(MIDL_STUBLESS_PROXY_INFO, nCount, 16, 4, 4); - TEST_FIELD(MIDL_STUBLESS_PROXY_INFO, pSyntaxInfo, 20, 4, 4); + TEST_TYPE_SIZE (MIDL_STUBLESS_PROXY_INFO, 24) + TEST_TYPE_ALIGN (MIDL_STUBLESS_PROXY_INFO, 4) + TEST_FIELD_SIZE (MIDL_STUBLESS_PROXY_INFO, pStubDesc, 4) + TEST_FIELD_ALIGN (MIDL_STUBLESS_PROXY_INFO, pStubDesc, 4) + TEST_FIELD_OFFSET(MIDL_STUBLESS_PROXY_INFO, pStubDesc, 0) + TEST_FIELD_SIZE (MIDL_STUBLESS_PROXY_INFO, ProcFormatString, 4) + TEST_FIELD_ALIGN (MIDL_STUBLESS_PROXY_INFO, ProcFormatString, 4) + TEST_FIELD_OFFSET(MIDL_STUBLESS_PROXY_INFO, ProcFormatString, 4) + TEST_FIELD_SIZE (MIDL_STUBLESS_PROXY_INFO, FormatStringOffset, 4) + TEST_FIELD_ALIGN (MIDL_STUBLESS_PROXY_INFO, FormatStringOffset, 4) + TEST_FIELD_OFFSET(MIDL_STUBLESS_PROXY_INFO, FormatStringOffset, 8) + TEST_FIELD_SIZE (MIDL_STUBLESS_PROXY_INFO, pTransferSyntax, 4) + TEST_FIELD_ALIGN (MIDL_STUBLESS_PROXY_INFO, pTransferSyntax, 4) + TEST_FIELD_OFFSET(MIDL_STUBLESS_PROXY_INFO, pTransferSyntax, 12) + TEST_FIELD_SIZE (MIDL_STUBLESS_PROXY_INFO, nCount, 4) + TEST_FIELD_ALIGN (MIDL_STUBLESS_PROXY_INFO, nCount, 4) + TEST_FIELD_OFFSET(MIDL_STUBLESS_PROXY_INFO, nCount, 16) + TEST_FIELD_SIZE (MIDL_STUBLESS_PROXY_INFO, pSyntaxInfo, 4) + TEST_FIELD_ALIGN (MIDL_STUBLESS_PROXY_INFO, pSyntaxInfo, 4) + TEST_FIELD_OFFSET(MIDL_STUBLESS_PROXY_INFO, pSyntaxInfo, 20) } static void test_pack_MIDL_SYNTAX_INFO(void) { /* MIDL_SYNTAX_INFO (pack 4) */ - TEST_TYPE(MIDL_SYNTAX_INFO, 48, 4); - TEST_FIELD(MIDL_SYNTAX_INFO, TransferSyntax, 0, 20, 4); - TEST_FIELD(MIDL_SYNTAX_INFO, DispatchTable, 20, 4, 4); - TEST_FIELD(MIDL_SYNTAX_INFO, ProcString, 24, 4, 4); - TEST_FIELD(MIDL_SYNTAX_INFO, FmtStringOffset, 28, 4, 4); - TEST_FIELD(MIDL_SYNTAX_INFO, TypeString, 32, 4, 4); - TEST_FIELD(MIDL_SYNTAX_INFO, aUserMarshalQuadruple, 36, 4, 4); - TEST_FIELD(MIDL_SYNTAX_INFO, pReserved1, 40, 4, 4); - TEST_FIELD(MIDL_SYNTAX_INFO, pReserved2, 44, 4, 4); + TEST_TYPE_SIZE (MIDL_SYNTAX_INFO, 48) + TEST_TYPE_ALIGN (MIDL_SYNTAX_INFO, 4) + TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, TransferSyntax, 20) + TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, TransferSyntax, 4) + TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, TransferSyntax, 0) + TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, DispatchTable, 4) + TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, DispatchTable, 4) + TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, DispatchTable, 20) + TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, ProcString, 4) + TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, ProcString, 4) + TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, ProcString, 24) + TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, FmtStringOffset, 4) + TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, FmtStringOffset, 4) + TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, FmtStringOffset, 28) + TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, TypeString, 4) + TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, TypeString, 4) + TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, TypeString, 32) + TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, aUserMarshalQuadruple, 4) + TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, aUserMarshalQuadruple, 4) + TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, aUserMarshalQuadruple, 36) + TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, pReserved1, 4) + TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, pReserved1, 4) + TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, pReserved1, 40) + TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, pReserved2, 4) + TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, pReserved2, 4) + TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, pReserved2, 44) } static void test_pack_NDR_CCONTEXT(void) { /* NDR_CCONTEXT */ - TEST_TYPE(NDR_CCONTEXT, 4, 4); + TEST_TYPE_SIZE (NDR_CCONTEXT, 4) + TEST_TYPE_ALIGN (NDR_CCONTEXT, 4) } static void test_pack_NDR_NOTIFY_ROUTINE(void) @@ -484,124 +719,157 @@ static void test_pack_NDR_RUNDOWN(void) static void test_pack_NDR_SCONTEXT(void) { /* NDR_SCONTEXT */ - TEST_TYPE(NDR_SCONTEXT, 4, 4); + TEST_TYPE_SIZE (NDR_SCONTEXT, 4) + TEST_TYPE_ALIGN (NDR_SCONTEXT, 4) } static void test_pack_NDR_USER_MARSHAL_INFO(void) { /* NDR_USER_MARSHAL_INFO (pack 4) */ - TEST_FIELD(NDR_USER_MARSHAL_INFO, InformationLevel, 0, 4, 4); + TEST_FIELD_SIZE (NDR_USER_MARSHAL_INFO, InformationLevel, 4) + TEST_FIELD_ALIGN (NDR_USER_MARSHAL_INFO, InformationLevel, 4) + TEST_FIELD_OFFSET(NDR_USER_MARSHAL_INFO, InformationLevel, 0) } static void test_pack_NDR_USER_MARSHAL_INFO_LEVEL1(void) { /* NDR_USER_MARSHAL_INFO_LEVEL1 (pack 4) */ - TEST_FIELD(NDR_USER_MARSHAL_INFO_LEVEL1, Buffer, 0, 4, 4); - TEST_FIELD(NDR_USER_MARSHAL_INFO_LEVEL1, BufferSize, 4, 4, 4); + TEST_FIELD_SIZE (NDR_USER_MARSHAL_INFO_LEVEL1, Buffer, 4) + TEST_FIELD_ALIGN (NDR_USER_MARSHAL_INFO_LEVEL1, Buffer, 4) + TEST_FIELD_OFFSET(NDR_USER_MARSHAL_INFO_LEVEL1, Buffer, 0) + TEST_FIELD_SIZE (NDR_USER_MARSHAL_INFO_LEVEL1, BufferSize, 4) + TEST_FIELD_ALIGN (NDR_USER_MARSHAL_INFO_LEVEL1, BufferSize, 4) + TEST_FIELD_OFFSET(NDR_USER_MARSHAL_INFO_LEVEL1, BufferSize, 4) } static void test_pack_PARRAY_INFO(void) { /* PARRAY_INFO */ - TEST_TYPE(PARRAY_INFO, 4, 4); - TEST_TYPE_POINTER(PARRAY_INFO, 24, 4); + TEST_TYPE_SIZE (PARRAY_INFO, 4) + TEST_TYPE_ALIGN (PARRAY_INFO, 4) + TEST_TARGET_SIZE (PARRAY_INFO, 24) + TEST_TARGET_ALIGN(PARRAY_INFO, 4) } static void test_pack_PFORMAT_STRING(void) { /* PFORMAT_STRING */ - TEST_TYPE(PFORMAT_STRING, 4, 4); + TEST_TYPE_SIZE (PFORMAT_STRING, 4) + TEST_TYPE_ALIGN (PFORMAT_STRING, 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); + TEST_TYPE_SIZE (PFULL_PTR_TO_REFID_ELEMENT, 4) + TEST_TYPE_ALIGN (PFULL_PTR_TO_REFID_ELEMENT, 4) + TEST_TARGET_SIZE (PFULL_PTR_TO_REFID_ELEMENT, 16) + TEST_TARGET_ALIGN(PFULL_PTR_TO_REFID_ELEMENT, 4) } static void test_pack_PFULL_PTR_XLAT_TABLES(void) { /* PFULL_PTR_XLAT_TABLES */ - TEST_TYPE(PFULL_PTR_XLAT_TABLES, 4, 4); + TEST_TYPE_SIZE (PFULL_PTR_XLAT_TABLES, 4) + TEST_TYPE_ALIGN (PFULL_PTR_XLAT_TABLES, 4) } static void test_pack_PGENERIC_BINDING_INFO(void) { /* PGENERIC_BINDING_INFO */ - TEST_TYPE(PGENERIC_BINDING_INFO, 4, 4); + TEST_TYPE_SIZE (PGENERIC_BINDING_INFO, 4) + TEST_TYPE_ALIGN (PGENERIC_BINDING_INFO, 4) } static void test_pack_PGENERIC_BINDING_ROUTINE_PAIR(void) { /* PGENERIC_BINDING_ROUTINE_PAIR */ - TEST_TYPE(PGENERIC_BINDING_ROUTINE_PAIR, 4, 4); + TEST_TYPE_SIZE (PGENERIC_BINDING_ROUTINE_PAIR, 4) + TEST_TYPE_ALIGN (PGENERIC_BINDING_ROUTINE_PAIR, 4) } 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); + TEST_TYPE_SIZE (PMIDL_SERVER_INFO, 4) + TEST_TYPE_ALIGN (PMIDL_SERVER_INFO, 4) + TEST_TARGET_SIZE (PMIDL_SERVER_INFO, 32) + TEST_TARGET_ALIGN(PMIDL_SERVER_INFO, 4) } static void test_pack_PMIDL_STUB_DESC(void) { /* PMIDL_STUB_DESC */ - TEST_TYPE(PMIDL_STUB_DESC, 4, 4); + TEST_TYPE_SIZE (PMIDL_STUB_DESC, 4) + TEST_TYPE_ALIGN (PMIDL_STUB_DESC, 4) } static void test_pack_PMIDL_STUB_MESSAGE(void) { /* PMIDL_STUB_MESSAGE */ - TEST_TYPE(PMIDL_STUB_MESSAGE, 4, 4); + TEST_TYPE_SIZE (PMIDL_STUB_MESSAGE, 4) + TEST_TYPE_ALIGN (PMIDL_STUB_MESSAGE, 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); + TEST_TYPE_SIZE (PMIDL_STUBLESS_PROXY_INFO, 4) + TEST_TYPE_ALIGN (PMIDL_STUBLESS_PROXY_INFO, 4) + TEST_TARGET_SIZE (PMIDL_STUBLESS_PROXY_INFO, 24) + TEST_TARGET_ALIGN(PMIDL_STUBLESS_PROXY_INFO, 4) } static void test_pack_PMIDL_SYNTAX_INFO(void) { /* PMIDL_SYNTAX_INFO */ - TEST_TYPE(PMIDL_SYNTAX_INFO, 4, 4); - TEST_TYPE_POINTER(PMIDL_SYNTAX_INFO, 48, 4); + TEST_TYPE_SIZE (PMIDL_SYNTAX_INFO, 4) + TEST_TYPE_ALIGN (PMIDL_SYNTAX_INFO, 4) + TEST_TARGET_SIZE (PMIDL_SYNTAX_INFO, 48) + TEST_TARGET_ALIGN(PMIDL_SYNTAX_INFO, 4) } static void test_pack_PNDR_ASYNC_MESSAGE(void) { /* PNDR_ASYNC_MESSAGE */ - TEST_TYPE(PNDR_ASYNC_MESSAGE, 4, 4); + TEST_TYPE_SIZE (PNDR_ASYNC_MESSAGE, 4) + TEST_TYPE_ALIGN (PNDR_ASYNC_MESSAGE, 4) } static void test_pack_PNDR_CORRELATION_INFO(void) { /* PNDR_CORRELATION_INFO */ - TEST_TYPE(PNDR_CORRELATION_INFO, 4, 4); + TEST_TYPE_SIZE (PNDR_CORRELATION_INFO, 4) + TEST_TYPE_ALIGN (PNDR_CORRELATION_INFO, 4) } static void test_pack_PSCONTEXT_QUEUE(void) { /* PSCONTEXT_QUEUE */ - TEST_TYPE(PSCONTEXT_QUEUE, 4, 4); - TEST_TYPE_POINTER(PSCONTEXT_QUEUE, 8, 4); + TEST_TYPE_SIZE (PSCONTEXT_QUEUE, 4) + TEST_TYPE_ALIGN (PSCONTEXT_QUEUE, 4) + TEST_TARGET_SIZE (PSCONTEXT_QUEUE, 8) + TEST_TARGET_ALIGN(PSCONTEXT_QUEUE, 4) } static void test_pack_PXMIT_ROUTINE_QUINTUPLE(void) { /* PXMIT_ROUTINE_QUINTUPLE */ - TEST_TYPE(PXMIT_ROUTINE_QUINTUPLE, 4, 4); + TEST_TYPE_SIZE (PXMIT_ROUTINE_QUINTUPLE, 4) + TEST_TYPE_ALIGN (PXMIT_ROUTINE_QUINTUPLE, 4) } static void test_pack_SCONTEXT_QUEUE(void) { /* SCONTEXT_QUEUE (pack 4) */ - TEST_TYPE(SCONTEXT_QUEUE, 8, 4); - TEST_FIELD(SCONTEXT_QUEUE, NumberOfObjects, 0, 4, 4); - TEST_FIELD(SCONTEXT_QUEUE, ArrayOfObjects, 4, 4, 4); + TEST_TYPE_SIZE (SCONTEXT_QUEUE, 8) + TEST_TYPE_ALIGN (SCONTEXT_QUEUE, 4) + TEST_FIELD_SIZE (SCONTEXT_QUEUE, NumberOfObjects, 4) + TEST_FIELD_ALIGN (SCONTEXT_QUEUE, NumberOfObjects, 4) + TEST_FIELD_OFFSET(SCONTEXT_QUEUE, NumberOfObjects, 0) + TEST_FIELD_SIZE (SCONTEXT_QUEUE, ArrayOfObjects, 4) + TEST_FIELD_ALIGN (SCONTEXT_QUEUE, ArrayOfObjects, 4) + TEST_FIELD_OFFSET(SCONTEXT_QUEUE, ArrayOfObjects, 4) } static void test_pack_SERVER_ROUTINE(void) @@ -617,10 +885,18 @@ static void test_pack_STUB_THUNK(void) static void test_pack_USER_MARSHAL_CB(void) { /* USER_MARSHAL_CB (pack 4) */ - TEST_FIELD(USER_MARSHAL_CB, Flags, 0, 4, 4); - TEST_FIELD(USER_MARSHAL_CB, pStubMsg, 4, 4, 4); - TEST_FIELD(USER_MARSHAL_CB, pReserve, 8, 4, 4); - TEST_FIELD(USER_MARSHAL_CB, Signature, 12, 4, 4); + TEST_FIELD_SIZE (USER_MARSHAL_CB, Flags, 4) + TEST_FIELD_ALIGN (USER_MARSHAL_CB, Flags, 4) + TEST_FIELD_OFFSET(USER_MARSHAL_CB, Flags, 0) + TEST_FIELD_SIZE (USER_MARSHAL_CB, pStubMsg, 4) + TEST_FIELD_ALIGN (USER_MARSHAL_CB, pStubMsg, 4) + TEST_FIELD_OFFSET(USER_MARSHAL_CB, pStubMsg, 4) + TEST_FIELD_SIZE (USER_MARSHAL_CB, pReserve, 4) + TEST_FIELD_ALIGN (USER_MARSHAL_CB, pReserve, 4) + TEST_FIELD_OFFSET(USER_MARSHAL_CB, pReserve, 8) + TEST_FIELD_SIZE (USER_MARSHAL_CB, Signature, 4) + TEST_FIELD_ALIGN (USER_MARSHAL_CB, Signature, 4) + TEST_FIELD_OFFSET(USER_MARSHAL_CB, Signature, 12) } static void test_pack_USER_MARSHAL_FREEING_ROUTINE(void) diff --git a/dlls/shell32/tests/generated.c b/dlls/shell32/tests/generated.c index bdcdfa00511..873a75e5a13 100644 --- a/dlls/shell32/tests/generated.c +++ b/dlls/shell32/tests/generated.c @@ -58,1156 +58,1818 @@ * Test helper macros */ -#ifdef FIELD_ALIGNMENT -# define TEST_FIELD_ALIGNMENT(type, field, align) \ - ok(_TYPE_ALIGNMENT(((type*)0)->field) == align, \ - "FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \ - (int)_TYPE_ALIGNMENT(((type*)0)->field)) +#ifdef _WIN64 + +# define TEST_TYPE_SIZE(type, size) +# define TEST_TYPE_ALIGN(type, align) +# define TEST_TARGET_ALIGN(type, align) +# define TEST_FIELD_ALIGN(type, field, align) +# define TEST_FIELD_OFFSET(type, field, offset) + #else -# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0) + +# define TEST_TYPE_SIZE(type, size) C_ASSERT(sizeof(type) == size); + +# ifdef TYPE_ALIGNMENT +# define TEST_TYPE_ALIGN(type, align) C_ASSERT(TYPE_ALIGNMENT(type) == align); +# else +# define TEST_TYPE_ALIGN(type, align) +# endif + +# ifdef _TYPE_ALIGNMENT +# 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); +# else +# define TEST_TARGET_ALIGN(type, align) +# define TEST_FIELD_ALIGN(type, field, align) +# endif + +# define TEST_FIELD_OFFSET(type, field, offset) C_ASSERT(FIELD_OFFSET(type, field) == offset); + #endif -#define TEST_FIELD_OFFSET(type, field, offset) \ - ok(FIELD_OFFSET(type, field) == offset, \ - "FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")\n", \ - (long int)FIELD_OFFSET(type, field)) +#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); -#ifdef _TYPE_ALIGNMENT -#define TEST__TYPE_ALIGNMENT(type, align) \ - ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)_TYPE_ALIGNMENT(type)) -#else -# define TEST__TYPE_ALIGNMENT(type, align) do { } while (0) -#endif - -#ifdef TYPE_ALIGNMENT -#define TEST_TYPE_ALIGNMENT(type, align) \ - ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)TYPE_ALIGNMENT(type)) -#else -# define TEST_TYPE_ALIGNMENT(type, align) do { } while (0) -#endif - -#define TEST_TYPE_SIZE(type, size) \ - ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", ((int) sizeof(type))) - -/*********************************************************************** - * Test macros - */ - -#define TEST_FIELD(type, field, field_offset, field_size, field_align) \ - TEST_TYPE_SIZE((((type*)0)->field), field_size); \ - TEST_FIELD_ALIGNMENT(type, field, field_align); \ - TEST_FIELD_OFFSET(type, field, 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_BLOB(void) { /* BLOB (pack 4) */ - TEST_TYPE(BLOB, 8, 4); - TEST_FIELD(BLOB, cbSize, 0, 4, 4); - TEST_FIELD(BLOB, pBlobData, 4, 4, 4); + TEST_TYPE_SIZE (BLOB, 8) + TEST_TYPE_ALIGN (BLOB, 4) + TEST_FIELD_SIZE (BLOB, cbSize, 4) + TEST_FIELD_ALIGN (BLOB, cbSize, 4) + TEST_FIELD_OFFSET(BLOB, cbSize, 0) + TEST_FIELD_SIZE (BLOB, pBlobData, 4) + TEST_FIELD_ALIGN (BLOB, pBlobData, 4) + TEST_FIELD_OFFSET(BLOB, pBlobData, 4) } static void test_pack_BSTR(void) { /* BSTR */ - TEST_TYPE(BSTR, 4, 4); - TEST_TYPE_POINTER(BSTR, 2, 2); + TEST_TYPE_SIZE (BSTR, 4) + TEST_TYPE_ALIGN (BSTR, 4) + TEST_TARGET_SIZE (BSTR, 2) + TEST_TARGET_ALIGN(BSTR, 2) } static void test_pack_BSTRBLOB(void) { /* BSTRBLOB (pack 4) */ - TEST_TYPE(BSTRBLOB, 8, 4); - TEST_FIELD(BSTRBLOB, cbSize, 0, 4, 4); - TEST_FIELD(BSTRBLOB, pData, 4, 4, 4); + TEST_TYPE_SIZE (BSTRBLOB, 8) + TEST_TYPE_ALIGN (BSTRBLOB, 4) + TEST_FIELD_SIZE (BSTRBLOB, cbSize, 4) + TEST_FIELD_ALIGN (BSTRBLOB, cbSize, 4) + TEST_FIELD_OFFSET(BSTRBLOB, cbSize, 0) + TEST_FIELD_SIZE (BSTRBLOB, pData, 4) + TEST_FIELD_ALIGN (BSTRBLOB, pData, 4) + TEST_FIELD_OFFSET(BSTRBLOB, pData, 4) } static void test_pack_BYTE_BLOB(void) { /* BYTE_BLOB (pack 4) */ - TEST_TYPE(BYTE_BLOB, 8, 4); - TEST_FIELD(BYTE_BLOB, clSize, 0, 4, 4); - TEST_FIELD(BYTE_BLOB, abData, 4, 1, 1); + TEST_TYPE_SIZE (BYTE_BLOB, 8) + TEST_TYPE_ALIGN (BYTE_BLOB, 4) + TEST_FIELD_SIZE (BYTE_BLOB, clSize, 4) + TEST_FIELD_ALIGN (BYTE_BLOB, clSize, 4) + TEST_FIELD_OFFSET(BYTE_BLOB, clSize, 0) + TEST_FIELD_SIZE (BYTE_BLOB, abData, 1) + TEST_FIELD_ALIGN (BYTE_BLOB, abData, 1) + TEST_FIELD_OFFSET(BYTE_BLOB, abData, 4) } static void test_pack_BYTE_SIZEDARR(void) { /* BYTE_SIZEDARR (pack 4) */ - TEST_TYPE(BYTE_SIZEDARR, 8, 4); - TEST_FIELD(BYTE_SIZEDARR, clSize, 0, 4, 4); - TEST_FIELD(BYTE_SIZEDARR, pData, 4, 4, 4); + TEST_TYPE_SIZE (BYTE_SIZEDARR, 8) + TEST_TYPE_ALIGN (BYTE_SIZEDARR, 4) + TEST_FIELD_SIZE (BYTE_SIZEDARR, clSize, 4) + TEST_FIELD_ALIGN (BYTE_SIZEDARR, clSize, 4) + TEST_FIELD_OFFSET(BYTE_SIZEDARR, clSize, 0) + TEST_FIELD_SIZE (BYTE_SIZEDARR, pData, 4) + TEST_FIELD_ALIGN (BYTE_SIZEDARR, pData, 4) + TEST_FIELD_OFFSET(BYTE_SIZEDARR, pData, 4) } static void test_pack_CLIPDATA(void) { /* CLIPDATA (pack 4) */ - TEST_TYPE(CLIPDATA, 12, 4); - TEST_FIELD(CLIPDATA, cbSize, 0, 4, 4); - TEST_FIELD(CLIPDATA, ulClipFmt, 4, 4, 4); - TEST_FIELD(CLIPDATA, pClipData, 8, 4, 4); + TEST_TYPE_SIZE (CLIPDATA, 12) + TEST_TYPE_ALIGN (CLIPDATA, 4) + TEST_FIELD_SIZE (CLIPDATA, cbSize, 4) + TEST_FIELD_ALIGN (CLIPDATA, cbSize, 4) + TEST_FIELD_OFFSET(CLIPDATA, cbSize, 0) + TEST_FIELD_SIZE (CLIPDATA, ulClipFmt, 4) + TEST_FIELD_ALIGN (CLIPDATA, ulClipFmt, 4) + TEST_FIELD_OFFSET(CLIPDATA, ulClipFmt, 4) + TEST_FIELD_SIZE (CLIPDATA, pClipData, 4) + TEST_FIELD_ALIGN (CLIPDATA, pClipData, 4) + TEST_FIELD_OFFSET(CLIPDATA, pClipData, 8) } static void test_pack_CLIPFORMAT(void) { /* CLIPFORMAT */ - TEST_TYPE(CLIPFORMAT, 2, 2); - TEST_TYPE_UNSIGNED(CLIPFORMAT); + TEST_TYPE_SIZE (CLIPFORMAT, 2) + TEST_TYPE_ALIGN (CLIPFORMAT, 2) + TEST_TYPE_UNSIGNED(CLIPFORMAT) } static void test_pack_COAUTHIDENTITY(void) { /* COAUTHIDENTITY (pack 4) */ - TEST_TYPE(COAUTHIDENTITY, 28, 4); - TEST_FIELD(COAUTHIDENTITY, User, 0, 4, 4); - TEST_FIELD(COAUTHIDENTITY, UserLength, 4, 4, 4); - TEST_FIELD(COAUTHIDENTITY, Domain, 8, 4, 4); - TEST_FIELD(COAUTHIDENTITY, DomainLength, 12, 4, 4); - TEST_FIELD(COAUTHIDENTITY, Password, 16, 4, 4); - TEST_FIELD(COAUTHIDENTITY, PasswordLength, 20, 4, 4); - TEST_FIELD(COAUTHIDENTITY, Flags, 24, 4, 4); + TEST_TYPE_SIZE (COAUTHIDENTITY, 28) + TEST_TYPE_ALIGN (COAUTHIDENTITY, 4) + TEST_FIELD_SIZE (COAUTHIDENTITY, User, 4) + TEST_FIELD_ALIGN (COAUTHIDENTITY, User, 4) + TEST_FIELD_OFFSET(COAUTHIDENTITY, User, 0) + TEST_FIELD_SIZE (COAUTHIDENTITY, UserLength, 4) + TEST_FIELD_ALIGN (COAUTHIDENTITY, UserLength, 4) + TEST_FIELD_OFFSET(COAUTHIDENTITY, UserLength, 4) + TEST_FIELD_SIZE (COAUTHIDENTITY, Domain, 4) + TEST_FIELD_ALIGN (COAUTHIDENTITY, Domain, 4) + TEST_FIELD_OFFSET(COAUTHIDENTITY, Domain, 8) + TEST_FIELD_SIZE (COAUTHIDENTITY, DomainLength, 4) + TEST_FIELD_ALIGN (COAUTHIDENTITY, DomainLength, 4) + TEST_FIELD_OFFSET(COAUTHIDENTITY, DomainLength, 12) + TEST_FIELD_SIZE (COAUTHIDENTITY, Password, 4) + TEST_FIELD_ALIGN (COAUTHIDENTITY, Password, 4) + TEST_FIELD_OFFSET(COAUTHIDENTITY, Password, 16) + TEST_FIELD_SIZE (COAUTHIDENTITY, PasswordLength, 4) + TEST_FIELD_ALIGN (COAUTHIDENTITY, PasswordLength, 4) + TEST_FIELD_OFFSET(COAUTHIDENTITY, PasswordLength, 20) + TEST_FIELD_SIZE (COAUTHIDENTITY, Flags, 4) + TEST_FIELD_ALIGN (COAUTHIDENTITY, Flags, 4) + TEST_FIELD_OFFSET(COAUTHIDENTITY, Flags, 24) } static void test_pack_COAUTHINFO(void) { /* COAUTHINFO (pack 4) */ - TEST_TYPE(COAUTHINFO, 28, 4); - TEST_FIELD(COAUTHINFO, dwAuthnSvc, 0, 4, 4); - TEST_FIELD(COAUTHINFO, dwAuthzSvc, 4, 4, 4); - TEST_FIELD(COAUTHINFO, pwszServerPrincName, 8, 4, 4); - TEST_FIELD(COAUTHINFO, dwAuthnLevel, 12, 4, 4); - TEST_FIELD(COAUTHINFO, dwImpersonationLevel, 16, 4, 4); - TEST_FIELD(COAUTHINFO, pAuthIdentityData, 20, 4, 4); - TEST_FIELD(COAUTHINFO, dwCapabilities, 24, 4, 4); + TEST_TYPE_SIZE (COAUTHINFO, 28) + TEST_TYPE_ALIGN (COAUTHINFO, 4) + TEST_FIELD_SIZE (COAUTHINFO, dwAuthnSvc, 4) + TEST_FIELD_ALIGN (COAUTHINFO, dwAuthnSvc, 4) + TEST_FIELD_OFFSET(COAUTHINFO, dwAuthnSvc, 0) + TEST_FIELD_SIZE (COAUTHINFO, dwAuthzSvc, 4) + TEST_FIELD_ALIGN (COAUTHINFO, dwAuthzSvc, 4) + TEST_FIELD_OFFSET(COAUTHINFO, dwAuthzSvc, 4) + TEST_FIELD_SIZE (COAUTHINFO, pwszServerPrincName, 4) + TEST_FIELD_ALIGN (COAUTHINFO, pwszServerPrincName, 4) + TEST_FIELD_OFFSET(COAUTHINFO, pwszServerPrincName, 8) + TEST_FIELD_SIZE (COAUTHINFO, dwAuthnLevel, 4) + TEST_FIELD_ALIGN (COAUTHINFO, dwAuthnLevel, 4) + TEST_FIELD_OFFSET(COAUTHINFO, dwAuthnLevel, 12) + TEST_FIELD_SIZE (COAUTHINFO, dwImpersonationLevel, 4) + TEST_FIELD_ALIGN (COAUTHINFO, dwImpersonationLevel, 4) + TEST_FIELD_OFFSET(COAUTHINFO, dwImpersonationLevel, 16) + TEST_FIELD_SIZE (COAUTHINFO, pAuthIdentityData, 4) + TEST_FIELD_ALIGN (COAUTHINFO, pAuthIdentityData, 4) + TEST_FIELD_OFFSET(COAUTHINFO, pAuthIdentityData, 20) + TEST_FIELD_SIZE (COAUTHINFO, dwCapabilities, 4) + TEST_FIELD_ALIGN (COAUTHINFO, dwCapabilities, 4) + TEST_FIELD_OFFSET(COAUTHINFO, dwCapabilities, 24) } static void test_pack_DATE(void) { /* DATE */ - TEST_TYPE(DATE, 8, 8); + TEST_TYPE_SIZE (DATE, 8) + TEST_TYPE_ALIGN (DATE, 8) } static void test_pack_DOUBLE(void) { /* DOUBLE */ - TEST_TYPE(DOUBLE, 8, 8); + TEST_TYPE_SIZE (DOUBLE, 8) + TEST_TYPE_ALIGN (DOUBLE, 8) } static void test_pack_DWORD_SIZEDARR(void) { /* DWORD_SIZEDARR (pack 4) */ - TEST_TYPE(DWORD_SIZEDARR, 8, 4); - TEST_FIELD(DWORD_SIZEDARR, clSize, 0, 4, 4); - TEST_FIELD(DWORD_SIZEDARR, pData, 4, 4, 4); + TEST_TYPE_SIZE (DWORD_SIZEDARR, 8) + TEST_TYPE_ALIGN (DWORD_SIZEDARR, 4) + TEST_FIELD_SIZE (DWORD_SIZEDARR, clSize, 4) + TEST_FIELD_ALIGN (DWORD_SIZEDARR, clSize, 4) + TEST_FIELD_OFFSET(DWORD_SIZEDARR, clSize, 0) + TEST_FIELD_SIZE (DWORD_SIZEDARR, pData, 4) + TEST_FIELD_ALIGN (DWORD_SIZEDARR, pData, 4) + TEST_FIELD_OFFSET(DWORD_SIZEDARR, pData, 4) } static void test_pack_FLAGGED_BYTE_BLOB(void) { /* FLAGGED_BYTE_BLOB (pack 4) */ - TEST_TYPE(FLAGGED_BYTE_BLOB, 12, 4); - TEST_FIELD(FLAGGED_BYTE_BLOB, fFlags, 0, 4, 4); - TEST_FIELD(FLAGGED_BYTE_BLOB, clSize, 4, 4, 4); - TEST_FIELD(FLAGGED_BYTE_BLOB, abData, 8, 1, 1); + TEST_TYPE_SIZE (FLAGGED_BYTE_BLOB, 12) + TEST_TYPE_ALIGN (FLAGGED_BYTE_BLOB, 4) + TEST_FIELD_SIZE (FLAGGED_BYTE_BLOB, fFlags, 4) + TEST_FIELD_ALIGN (FLAGGED_BYTE_BLOB, fFlags, 4) + TEST_FIELD_OFFSET(FLAGGED_BYTE_BLOB, fFlags, 0) + TEST_FIELD_SIZE (FLAGGED_BYTE_BLOB, clSize, 4) + TEST_FIELD_ALIGN (FLAGGED_BYTE_BLOB, clSize, 4) + TEST_FIELD_OFFSET(FLAGGED_BYTE_BLOB, clSize, 4) + TEST_FIELD_SIZE (FLAGGED_BYTE_BLOB, abData, 1) + TEST_FIELD_ALIGN (FLAGGED_BYTE_BLOB, abData, 1) + TEST_FIELD_OFFSET(FLAGGED_BYTE_BLOB, abData, 8) } static void test_pack_FLAGGED_WORD_BLOB(void) { /* FLAGGED_WORD_BLOB (pack 4) */ - TEST_TYPE(FLAGGED_WORD_BLOB, 12, 4); - TEST_FIELD(FLAGGED_WORD_BLOB, fFlags, 0, 4, 4); - TEST_FIELD(FLAGGED_WORD_BLOB, clSize, 4, 4, 4); - TEST_FIELD(FLAGGED_WORD_BLOB, asData, 8, 2, 2); + TEST_TYPE_SIZE (FLAGGED_WORD_BLOB, 12) + TEST_TYPE_ALIGN (FLAGGED_WORD_BLOB, 4) + TEST_FIELD_SIZE (FLAGGED_WORD_BLOB, fFlags, 4) + TEST_FIELD_ALIGN (FLAGGED_WORD_BLOB, fFlags, 4) + TEST_FIELD_OFFSET(FLAGGED_WORD_BLOB, fFlags, 0) + TEST_FIELD_SIZE (FLAGGED_WORD_BLOB, clSize, 4) + TEST_FIELD_ALIGN (FLAGGED_WORD_BLOB, clSize, 4) + TEST_FIELD_OFFSET(FLAGGED_WORD_BLOB, clSize, 4) + TEST_FIELD_SIZE (FLAGGED_WORD_BLOB, asData, 2) + TEST_FIELD_ALIGN (FLAGGED_WORD_BLOB, asData, 2) + TEST_FIELD_OFFSET(FLAGGED_WORD_BLOB, asData, 8) } static void test_pack_HMETAFILEPICT(void) { /* HMETAFILEPICT */ - TEST_TYPE(HMETAFILEPICT, 4, 4); + TEST_TYPE_SIZE (HMETAFILEPICT, 4) + TEST_TYPE_ALIGN (HMETAFILEPICT, 4) } static void test_pack_HYPER_SIZEDARR(void) { /* HYPER_SIZEDARR (pack 4) */ - TEST_TYPE(HYPER_SIZEDARR, 8, 4); - TEST_FIELD(HYPER_SIZEDARR, clSize, 0, 4, 4); - TEST_FIELD(HYPER_SIZEDARR, pData, 4, 4, 4); + TEST_TYPE_SIZE (HYPER_SIZEDARR, 8) + TEST_TYPE_ALIGN (HYPER_SIZEDARR, 4) + TEST_FIELD_SIZE (HYPER_SIZEDARR, clSize, 4) + TEST_FIELD_ALIGN (HYPER_SIZEDARR, clSize, 4) + TEST_FIELD_OFFSET(HYPER_SIZEDARR, clSize, 0) + TEST_FIELD_SIZE (HYPER_SIZEDARR, pData, 4) + TEST_FIELD_ALIGN (HYPER_SIZEDARR, pData, 4) + TEST_FIELD_OFFSET(HYPER_SIZEDARR, pData, 4) } static void test_pack_LPBLOB(void) { /* LPBLOB */ - TEST_TYPE(LPBLOB, 4, 4); + TEST_TYPE_SIZE (LPBLOB, 4) + TEST_TYPE_ALIGN (LPBLOB, 4) } static void test_pack_LPBSTR(void) { /* LPBSTR */ - TEST_TYPE(LPBSTR, 4, 4); - TEST_TYPE_POINTER(LPBSTR, 4, 4); + TEST_TYPE_SIZE (LPBSTR, 4) + TEST_TYPE_ALIGN (LPBSTR, 4) + TEST_TARGET_SIZE (LPBSTR, 4) + TEST_TARGET_ALIGN(LPBSTR, 4) } static void test_pack_LPBSTRBLOB(void) { /* LPBSTRBLOB */ - TEST_TYPE(LPBSTRBLOB, 4, 4); + TEST_TYPE_SIZE (LPBSTRBLOB, 4) + TEST_TYPE_ALIGN (LPBSTRBLOB, 4) } static void test_pack_LPCOLESTR(void) { /* LPCOLESTR */ - TEST_TYPE(LPCOLESTR, 4, 4); - TEST_TYPE_POINTER(LPCOLESTR, 2, 2); + TEST_TYPE_SIZE (LPCOLESTR, 4) + TEST_TYPE_ALIGN (LPCOLESTR, 4) + TEST_TARGET_SIZE (LPCOLESTR, 2) + TEST_TARGET_ALIGN(LPCOLESTR, 2) } static void test_pack_LPCY(void) { /* LPCY */ - TEST_TYPE(LPCY, 4, 4); + TEST_TYPE_SIZE (LPCY, 4) + TEST_TYPE_ALIGN (LPCY, 4) } static void test_pack_LPDECIMAL(void) { /* LPDECIMAL */ - TEST_TYPE(LPDECIMAL, 4, 4); + TEST_TYPE_SIZE (LPDECIMAL, 4) + TEST_TYPE_ALIGN (LPDECIMAL, 4) } static void test_pack_LPOLESTR(void) { /* LPOLESTR */ - TEST_TYPE(LPOLESTR, 4, 4); - TEST_TYPE_POINTER(LPOLESTR, 2, 2); + TEST_TYPE_SIZE (LPOLESTR, 4) + TEST_TYPE_ALIGN (LPOLESTR, 4) + TEST_TARGET_SIZE (LPOLESTR, 2) + TEST_TARGET_ALIGN(LPOLESTR, 2) } static void test_pack_OLECHAR(void) { /* OLECHAR */ - TEST_TYPE(OLECHAR, 2, 2); + TEST_TYPE_SIZE (OLECHAR, 2) + TEST_TYPE_ALIGN (OLECHAR, 2) } static void test_pack_PROPID(void) { /* PROPID */ - TEST_TYPE(PROPID, 4, 4); + TEST_TYPE_SIZE (PROPID, 4) + TEST_TYPE_ALIGN (PROPID, 4) } static void test_pack_RemHBITMAP(void) { /* RemHBITMAP (pack 4) */ - TEST_TYPE(RemHBITMAP, 8, 4); - TEST_FIELD(RemHBITMAP, cbData, 0, 4, 4); - TEST_FIELD(RemHBITMAP, data, 4, 1, 1); + TEST_TYPE_SIZE (RemHBITMAP, 8) + TEST_TYPE_ALIGN (RemHBITMAP, 4) + TEST_FIELD_SIZE (RemHBITMAP, cbData, 4) + TEST_FIELD_ALIGN (RemHBITMAP, cbData, 4) + TEST_FIELD_OFFSET(RemHBITMAP, cbData, 0) + TEST_FIELD_SIZE (RemHBITMAP, data, 1) + TEST_FIELD_ALIGN (RemHBITMAP, data, 1) + TEST_FIELD_OFFSET(RemHBITMAP, data, 4) } static void test_pack_RemHENHMETAFILE(void) { /* RemHENHMETAFILE (pack 4) */ - TEST_TYPE(RemHENHMETAFILE, 8, 4); - TEST_FIELD(RemHENHMETAFILE, cbData, 0, 4, 4); - TEST_FIELD(RemHENHMETAFILE, data, 4, 1, 1); + TEST_TYPE_SIZE (RemHENHMETAFILE, 8) + TEST_TYPE_ALIGN (RemHENHMETAFILE, 4) + TEST_FIELD_SIZE (RemHENHMETAFILE, cbData, 4) + TEST_FIELD_ALIGN (RemHENHMETAFILE, cbData, 4) + TEST_FIELD_OFFSET(RemHENHMETAFILE, cbData, 0) + TEST_FIELD_SIZE (RemHENHMETAFILE, data, 1) + TEST_FIELD_ALIGN (RemHENHMETAFILE, data, 1) + TEST_FIELD_OFFSET(RemHENHMETAFILE, data, 4) } static void test_pack_RemHGLOBAL(void) { /* RemHGLOBAL (pack 4) */ - TEST_TYPE(RemHGLOBAL, 12, 4); - TEST_FIELD(RemHGLOBAL, fNullHGlobal, 0, 4, 4); - TEST_FIELD(RemHGLOBAL, cbData, 4, 4, 4); - TEST_FIELD(RemHGLOBAL, data, 8, 1, 1); + TEST_TYPE_SIZE (RemHGLOBAL, 12) + TEST_TYPE_ALIGN (RemHGLOBAL, 4) + TEST_FIELD_SIZE (RemHGLOBAL, fNullHGlobal, 4) + TEST_FIELD_ALIGN (RemHGLOBAL, fNullHGlobal, 4) + TEST_FIELD_OFFSET(RemHGLOBAL, fNullHGlobal, 0) + TEST_FIELD_SIZE (RemHGLOBAL, cbData, 4) + TEST_FIELD_ALIGN (RemHGLOBAL, cbData, 4) + TEST_FIELD_OFFSET(RemHGLOBAL, cbData, 4) + TEST_FIELD_SIZE (RemHGLOBAL, data, 1) + TEST_FIELD_ALIGN (RemHGLOBAL, data, 1) + TEST_FIELD_OFFSET(RemHGLOBAL, data, 8) } static void test_pack_RemHMETAFILEPICT(void) { /* RemHMETAFILEPICT (pack 4) */ - TEST_TYPE(RemHMETAFILEPICT, 20, 4); - TEST_FIELD(RemHMETAFILEPICT, mm, 0, 4, 4); - TEST_FIELD(RemHMETAFILEPICT, xExt, 4, 4, 4); - TEST_FIELD(RemHMETAFILEPICT, yExt, 8, 4, 4); - TEST_FIELD(RemHMETAFILEPICT, cbData, 12, 4, 4); - TEST_FIELD(RemHMETAFILEPICT, data, 16, 1, 1); + TEST_TYPE_SIZE (RemHMETAFILEPICT, 20) + TEST_TYPE_ALIGN (RemHMETAFILEPICT, 4) + TEST_FIELD_SIZE (RemHMETAFILEPICT, mm, 4) + TEST_FIELD_ALIGN (RemHMETAFILEPICT, mm, 4) + TEST_FIELD_OFFSET(RemHMETAFILEPICT, mm, 0) + TEST_FIELD_SIZE (RemHMETAFILEPICT, xExt, 4) + TEST_FIELD_ALIGN (RemHMETAFILEPICT, xExt, 4) + TEST_FIELD_OFFSET(RemHMETAFILEPICT, xExt, 4) + TEST_FIELD_SIZE (RemHMETAFILEPICT, yExt, 4) + TEST_FIELD_ALIGN (RemHMETAFILEPICT, yExt, 4) + TEST_FIELD_OFFSET(RemHMETAFILEPICT, yExt, 8) + TEST_FIELD_SIZE (RemHMETAFILEPICT, cbData, 4) + TEST_FIELD_ALIGN (RemHMETAFILEPICT, cbData, 4) + TEST_FIELD_OFFSET(RemHMETAFILEPICT, cbData, 12) + TEST_FIELD_SIZE (RemHMETAFILEPICT, data, 1) + TEST_FIELD_ALIGN (RemHMETAFILEPICT, data, 1) + TEST_FIELD_OFFSET(RemHMETAFILEPICT, data, 16) } static void test_pack_RemHPALETTE(void) { /* RemHPALETTE (pack 4) */ - TEST_TYPE(RemHPALETTE, 8, 4); - TEST_FIELD(RemHPALETTE, cbData, 0, 4, 4); - TEST_FIELD(RemHPALETTE, data, 4, 1, 1); + TEST_TYPE_SIZE (RemHPALETTE, 8) + TEST_TYPE_ALIGN (RemHPALETTE, 4) + TEST_FIELD_SIZE (RemHPALETTE, cbData, 4) + TEST_FIELD_ALIGN (RemHPALETTE, cbData, 4) + TEST_FIELD_OFFSET(RemHPALETTE, cbData, 0) + TEST_FIELD_SIZE (RemHPALETTE, data, 1) + TEST_FIELD_ALIGN (RemHPALETTE, data, 1) + TEST_FIELD_OFFSET(RemHPALETTE, data, 4) } static void test_pack_SCODE(void) { /* SCODE */ - TEST_TYPE(SCODE, 4, 4); + TEST_TYPE_SIZE (SCODE, 4) + TEST_TYPE_ALIGN (SCODE, 4) } static void test_pack_UP_BYTE_BLOB(void) { /* UP_BYTE_BLOB */ - TEST_TYPE(UP_BYTE_BLOB, 4, 4); - TEST_TYPE_POINTER(UP_BYTE_BLOB, 8, 4); + TEST_TYPE_SIZE (UP_BYTE_BLOB, 4) + TEST_TYPE_ALIGN (UP_BYTE_BLOB, 4) + TEST_TARGET_SIZE (UP_BYTE_BLOB, 8) + TEST_TARGET_ALIGN(UP_BYTE_BLOB, 4) } static void test_pack_UP_FLAGGED_BYTE_BLOB(void) { /* UP_FLAGGED_BYTE_BLOB */ - TEST_TYPE(UP_FLAGGED_BYTE_BLOB, 4, 4); - TEST_TYPE_POINTER(UP_FLAGGED_BYTE_BLOB, 12, 4); + TEST_TYPE_SIZE (UP_FLAGGED_BYTE_BLOB, 4) + TEST_TYPE_ALIGN (UP_FLAGGED_BYTE_BLOB, 4) + TEST_TARGET_SIZE (UP_FLAGGED_BYTE_BLOB, 12) + TEST_TARGET_ALIGN(UP_FLAGGED_BYTE_BLOB, 4) } static void test_pack_UP_FLAGGED_WORD_BLOB(void) { /* UP_FLAGGED_WORD_BLOB */ - TEST_TYPE(UP_FLAGGED_WORD_BLOB, 4, 4); - TEST_TYPE_POINTER(UP_FLAGGED_WORD_BLOB, 12, 4); + TEST_TYPE_SIZE (UP_FLAGGED_WORD_BLOB, 4) + TEST_TYPE_ALIGN (UP_FLAGGED_WORD_BLOB, 4) + TEST_TARGET_SIZE (UP_FLAGGED_WORD_BLOB, 12) + TEST_TARGET_ALIGN(UP_FLAGGED_WORD_BLOB, 4) } static void test_pack_VARIANT_BOOL(void) { /* VARIANT_BOOL */ - TEST_TYPE(VARIANT_BOOL, 2, 2); - TEST_TYPE_SIGNED(VARIANT_BOOL); + TEST_TYPE_SIZE (VARIANT_BOOL, 2) + TEST_TYPE_ALIGN (VARIANT_BOOL, 2) + TEST_TYPE_SIGNED(VARIANT_BOOL) } static void test_pack_VARTYPE(void) { /* VARTYPE */ - TEST_TYPE(VARTYPE, 2, 2); - TEST_TYPE_UNSIGNED(VARTYPE); + TEST_TYPE_SIZE (VARTYPE, 2) + TEST_TYPE_ALIGN (VARTYPE, 2) + TEST_TYPE_UNSIGNED(VARTYPE) } static void test_pack_WORD_SIZEDARR(void) { /* WORD_SIZEDARR (pack 4) */ - TEST_TYPE(WORD_SIZEDARR, 8, 4); - TEST_FIELD(WORD_SIZEDARR, clSize, 0, 4, 4); - TEST_FIELD(WORD_SIZEDARR, pData, 4, 4, 4); + TEST_TYPE_SIZE (WORD_SIZEDARR, 8) + TEST_TYPE_ALIGN (WORD_SIZEDARR, 4) + TEST_FIELD_SIZE (WORD_SIZEDARR, clSize, 4) + TEST_FIELD_ALIGN (WORD_SIZEDARR, clSize, 4) + TEST_FIELD_OFFSET(WORD_SIZEDARR, clSize, 0) + TEST_FIELD_SIZE (WORD_SIZEDARR, pData, 4) + TEST_FIELD_ALIGN (WORD_SIZEDARR, pData, 4) + TEST_FIELD_OFFSET(WORD_SIZEDARR, pData, 4) } static void test_pack_remoteMETAFILEPICT(void) { /* remoteMETAFILEPICT (pack 4) */ - TEST_TYPE(remoteMETAFILEPICT, 16, 4); - TEST_FIELD(remoteMETAFILEPICT, mm, 0, 4, 4); - TEST_FIELD(remoteMETAFILEPICT, xExt, 4, 4, 4); - TEST_FIELD(remoteMETAFILEPICT, yExt, 8, 4, 4); - TEST_FIELD(remoteMETAFILEPICT, hMF, 12, 4, 4); + TEST_TYPE_SIZE (remoteMETAFILEPICT, 16) + TEST_TYPE_ALIGN (remoteMETAFILEPICT, 4) + TEST_FIELD_SIZE (remoteMETAFILEPICT, mm, 4) + TEST_FIELD_ALIGN (remoteMETAFILEPICT, mm, 4) + TEST_FIELD_OFFSET(remoteMETAFILEPICT, mm, 0) + TEST_FIELD_SIZE (remoteMETAFILEPICT, xExt, 4) + TEST_FIELD_ALIGN (remoteMETAFILEPICT, xExt, 4) + TEST_FIELD_OFFSET(remoteMETAFILEPICT, xExt, 4) + TEST_FIELD_SIZE (remoteMETAFILEPICT, yExt, 4) + TEST_FIELD_ALIGN (remoteMETAFILEPICT, yExt, 4) + TEST_FIELD_OFFSET(remoteMETAFILEPICT, yExt, 8) + TEST_FIELD_SIZE (remoteMETAFILEPICT, hMF, 4) + TEST_FIELD_ALIGN (remoteMETAFILEPICT, hMF, 4) + TEST_FIELD_OFFSET(remoteMETAFILEPICT, hMF, 12) } static void test_pack_userBITMAP(void) { /* userBITMAP (pack 4) */ - TEST_TYPE(userBITMAP, 28, 4); - TEST_FIELD(userBITMAP, bmType, 0, 4, 4); - TEST_FIELD(userBITMAP, bmWidth, 4, 4, 4); - TEST_FIELD(userBITMAP, bmHeight, 8, 4, 4); - TEST_FIELD(userBITMAP, bmWidthBytes, 12, 4, 4); - TEST_FIELD(userBITMAP, bmPlanes, 16, 2, 2); - TEST_FIELD(userBITMAP, bmBitsPixel, 18, 2, 2); - TEST_FIELD(userBITMAP, cbSize, 20, 4, 4); - TEST_FIELD(userBITMAP, pBuffer, 24, 1, 1); + TEST_TYPE_SIZE (userBITMAP, 28) + TEST_TYPE_ALIGN (userBITMAP, 4) + TEST_FIELD_SIZE (userBITMAP, bmType, 4) + TEST_FIELD_ALIGN (userBITMAP, bmType, 4) + TEST_FIELD_OFFSET(userBITMAP, bmType, 0) + TEST_FIELD_SIZE (userBITMAP, bmWidth, 4) + TEST_FIELD_ALIGN (userBITMAP, bmWidth, 4) + TEST_FIELD_OFFSET(userBITMAP, bmWidth, 4) + TEST_FIELD_SIZE (userBITMAP, bmHeight, 4) + TEST_FIELD_ALIGN (userBITMAP, bmHeight, 4) + TEST_FIELD_OFFSET(userBITMAP, bmHeight, 8) + TEST_FIELD_SIZE (userBITMAP, bmWidthBytes, 4) + TEST_FIELD_ALIGN (userBITMAP, bmWidthBytes, 4) + TEST_FIELD_OFFSET(userBITMAP, bmWidthBytes, 12) + TEST_FIELD_SIZE (userBITMAP, bmPlanes, 2) + TEST_FIELD_ALIGN (userBITMAP, bmPlanes, 2) + TEST_FIELD_OFFSET(userBITMAP, bmPlanes, 16) + TEST_FIELD_SIZE (userBITMAP, bmBitsPixel, 2) + TEST_FIELD_ALIGN (userBITMAP, bmBitsPixel, 2) + TEST_FIELD_OFFSET(userBITMAP, bmBitsPixel, 18) + TEST_FIELD_SIZE (userBITMAP, cbSize, 4) + TEST_FIELD_ALIGN (userBITMAP, cbSize, 4) + TEST_FIELD_OFFSET(userBITMAP, cbSize, 20) + TEST_FIELD_SIZE (userBITMAP, pBuffer, 1) + TEST_FIELD_ALIGN (userBITMAP, pBuffer, 1) + TEST_FIELD_OFFSET(userBITMAP, pBuffer, 24) } static void test_pack_userCLIPFORMAT(void) { /* userCLIPFORMAT (pack 4) */ - TEST_FIELD(userCLIPFORMAT, fContext, 0, 4, 4); + TEST_FIELD_SIZE (userCLIPFORMAT, fContext, 4) + TEST_FIELD_ALIGN (userCLIPFORMAT, fContext, 4) + TEST_FIELD_OFFSET(userCLIPFORMAT, fContext, 0) } static void test_pack_userHBITMAP(void) { /* userHBITMAP (pack 4) */ - TEST_FIELD(userHBITMAP, fContext, 0, 4, 4); + TEST_FIELD_SIZE (userHBITMAP, fContext, 4) + TEST_FIELD_ALIGN (userHBITMAP, fContext, 4) + TEST_FIELD_OFFSET(userHBITMAP, fContext, 0) } static void test_pack_userHENHMETAFILE(void) { /* userHENHMETAFILE (pack 4) */ - TEST_FIELD(userHENHMETAFILE, fContext, 0, 4, 4); + TEST_FIELD_SIZE (userHENHMETAFILE, fContext, 4) + TEST_FIELD_ALIGN (userHENHMETAFILE, fContext, 4) + TEST_FIELD_OFFSET(userHENHMETAFILE, fContext, 0) } static void test_pack_userHGLOBAL(void) { /* userHGLOBAL (pack 4) */ - TEST_FIELD(userHGLOBAL, fContext, 0, 4, 4); + TEST_FIELD_SIZE (userHGLOBAL, fContext, 4) + TEST_FIELD_ALIGN (userHGLOBAL, fContext, 4) + TEST_FIELD_OFFSET(userHGLOBAL, fContext, 0) } static void test_pack_userHMETAFILE(void) { /* userHMETAFILE (pack 4) */ - TEST_FIELD(userHMETAFILE, fContext, 0, 4, 4); + TEST_FIELD_SIZE (userHMETAFILE, fContext, 4) + TEST_FIELD_ALIGN (userHMETAFILE, fContext, 4) + TEST_FIELD_OFFSET(userHMETAFILE, fContext, 0) } static void test_pack_userHMETAFILEPICT(void) { /* userHMETAFILEPICT (pack 4) */ - TEST_FIELD(userHMETAFILEPICT, fContext, 0, 4, 4); + TEST_FIELD_SIZE (userHMETAFILEPICT, fContext, 4) + TEST_FIELD_ALIGN (userHMETAFILEPICT, fContext, 4) + TEST_FIELD_OFFSET(userHMETAFILEPICT, fContext, 0) } static void test_pack_userHPALETTE(void) { /* userHPALETTE (pack 4) */ - TEST_FIELD(userHPALETTE, fContext, 0, 4, 4); + TEST_FIELD_SIZE (userHPALETTE, fContext, 4) + TEST_FIELD_ALIGN (userHPALETTE, fContext, 4) + TEST_FIELD_OFFSET(userHPALETTE, fContext, 0) } static void test_pack_wireBSTR(void) { /* wireBSTR */ - TEST_TYPE(wireBSTR, 4, 4); - TEST_TYPE_POINTER(wireBSTR, 12, 4); + TEST_TYPE_SIZE (wireBSTR, 4) + TEST_TYPE_ALIGN (wireBSTR, 4) + TEST_TARGET_SIZE (wireBSTR, 12) + TEST_TARGET_ALIGN(wireBSTR, 4) } static void test_pack_wireCLIPFORMAT(void) { /* wireCLIPFORMAT */ - TEST_TYPE(wireCLIPFORMAT, 4, 4); + TEST_TYPE_SIZE (wireCLIPFORMAT, 4) + TEST_TYPE_ALIGN (wireCLIPFORMAT, 4) } static void test_pack_wireHBITMAP(void) { /* wireHBITMAP */ - TEST_TYPE(wireHBITMAP, 4, 4); + TEST_TYPE_SIZE (wireHBITMAP, 4) + TEST_TYPE_ALIGN (wireHBITMAP, 4) } static void test_pack_wireHENHMETAFILE(void) { /* wireHENHMETAFILE */ - TEST_TYPE(wireHENHMETAFILE, 4, 4); + TEST_TYPE_SIZE (wireHENHMETAFILE, 4) + TEST_TYPE_ALIGN (wireHENHMETAFILE, 4) } static void test_pack_wireHGLOBAL(void) { /* wireHGLOBAL */ - TEST_TYPE(wireHGLOBAL, 4, 4); + TEST_TYPE_SIZE (wireHGLOBAL, 4) + TEST_TYPE_ALIGN (wireHGLOBAL, 4) } static void test_pack_wireHMETAFILE(void) { /* wireHMETAFILE */ - TEST_TYPE(wireHMETAFILE, 4, 4); + TEST_TYPE_SIZE (wireHMETAFILE, 4) + TEST_TYPE_ALIGN (wireHMETAFILE, 4) } static void test_pack_wireHMETAFILEPICT(void) { /* wireHMETAFILEPICT */ - TEST_TYPE(wireHMETAFILEPICT, 4, 4); + TEST_TYPE_SIZE (wireHMETAFILEPICT, 4) + TEST_TYPE_ALIGN (wireHMETAFILEPICT, 4) } static void test_pack_wireHPALETTE(void) { /* wireHPALETTE */ - TEST_TYPE(wireHPALETTE, 4, 4); + TEST_TYPE_SIZE (wireHPALETTE, 4) + TEST_TYPE_ALIGN (wireHPALETTE, 4) } static void test_pack_CLSID(void) { /* CLSID */ - TEST_TYPE(CLSID, 16, 4); + TEST_TYPE_SIZE (CLSID, 16) + TEST_TYPE_ALIGN (CLSID, 4) } static void test_pack_FMTID(void) { /* FMTID */ - TEST_TYPE(FMTID, 16, 4); + TEST_TYPE_SIZE (FMTID, 16) + TEST_TYPE_ALIGN (FMTID, 4) } static void test_pack_IID(void) { /* IID */ - TEST_TYPE(IID, 16, 4); + TEST_TYPE_SIZE (IID, 16) + TEST_TYPE_ALIGN (IID, 4) } static void test_pack_APPBARDATA(void) { /* APPBARDATA (pack 1) */ - TEST_TYPE(APPBARDATA, 36, 1); - TEST_FIELD(APPBARDATA, cbSize, 0, 4, 1); - TEST_FIELD(APPBARDATA, hWnd, 4, 4, 1); - TEST_FIELD(APPBARDATA, uCallbackMessage, 8, 4, 1); - TEST_FIELD(APPBARDATA, uEdge, 12, 4, 1); - TEST_FIELD(APPBARDATA, rc, 16, 16, 1); - TEST_FIELD(APPBARDATA, lParam, 32, 4, 1); + TEST_TYPE_SIZE (APPBARDATA, 36) + TEST_TYPE_ALIGN (APPBARDATA, 1) + TEST_FIELD_SIZE (APPBARDATA, cbSize, 4) + TEST_FIELD_ALIGN (APPBARDATA, cbSize, 1) + TEST_FIELD_OFFSET(APPBARDATA, cbSize, 0) + TEST_FIELD_SIZE (APPBARDATA, hWnd, 4) + TEST_FIELD_ALIGN (APPBARDATA, hWnd, 1) + TEST_FIELD_OFFSET(APPBARDATA, hWnd, 4) + TEST_FIELD_SIZE (APPBARDATA, uCallbackMessage, 4) + TEST_FIELD_ALIGN (APPBARDATA, uCallbackMessage, 1) + TEST_FIELD_OFFSET(APPBARDATA, uCallbackMessage, 8) + TEST_FIELD_SIZE (APPBARDATA, uEdge, 4) + TEST_FIELD_ALIGN (APPBARDATA, uEdge, 1) + TEST_FIELD_OFFSET(APPBARDATA, uEdge, 12) + TEST_FIELD_SIZE (APPBARDATA, rc, 16) + TEST_FIELD_ALIGN (APPBARDATA, rc, 1) + TEST_FIELD_OFFSET(APPBARDATA, rc, 16) + TEST_FIELD_SIZE (APPBARDATA, lParam, 4) + TEST_FIELD_ALIGN (APPBARDATA, lParam, 1) + TEST_FIELD_OFFSET(APPBARDATA, lParam, 32) } static void test_pack_DRAGINFOA(void) { /* DRAGINFOA (pack 1) */ - TEST_TYPE(DRAGINFOA, 24, 1); - TEST_FIELD(DRAGINFOA, uSize, 0, 4, 1); - TEST_FIELD(DRAGINFOA, pt, 4, 8, 1); - TEST_FIELD(DRAGINFOA, fNC, 12, 4, 1); - TEST_FIELD(DRAGINFOA, lpFileList, 16, 4, 1); - TEST_FIELD(DRAGINFOA, grfKeyState, 20, 4, 1); + TEST_TYPE_SIZE (DRAGINFOA, 24) + TEST_TYPE_ALIGN (DRAGINFOA, 1) + TEST_FIELD_SIZE (DRAGINFOA, uSize, 4) + TEST_FIELD_ALIGN (DRAGINFOA, uSize, 1) + TEST_FIELD_OFFSET(DRAGINFOA, uSize, 0) + TEST_FIELD_SIZE (DRAGINFOA, pt, 8) + TEST_FIELD_ALIGN (DRAGINFOA, pt, 1) + TEST_FIELD_OFFSET(DRAGINFOA, pt, 4) + TEST_FIELD_SIZE (DRAGINFOA, fNC, 4) + TEST_FIELD_ALIGN (DRAGINFOA, fNC, 1) + TEST_FIELD_OFFSET(DRAGINFOA, fNC, 12) + TEST_FIELD_SIZE (DRAGINFOA, lpFileList, 4) + TEST_FIELD_ALIGN (DRAGINFOA, lpFileList, 1) + TEST_FIELD_OFFSET(DRAGINFOA, lpFileList, 16) + TEST_FIELD_SIZE (DRAGINFOA, grfKeyState, 4) + TEST_FIELD_ALIGN (DRAGINFOA, grfKeyState, 1) + TEST_FIELD_OFFSET(DRAGINFOA, grfKeyState, 20) } static void test_pack_DRAGINFOW(void) { /* DRAGINFOW (pack 1) */ - TEST_TYPE(DRAGINFOW, 24, 1); - TEST_FIELD(DRAGINFOW, uSize, 0, 4, 1); - TEST_FIELD(DRAGINFOW, pt, 4, 8, 1); - TEST_FIELD(DRAGINFOW, fNC, 12, 4, 1); - TEST_FIELD(DRAGINFOW, lpFileList, 16, 4, 1); - TEST_FIELD(DRAGINFOW, grfKeyState, 20, 4, 1); + TEST_TYPE_SIZE (DRAGINFOW, 24) + TEST_TYPE_ALIGN (DRAGINFOW, 1) + TEST_FIELD_SIZE (DRAGINFOW, uSize, 4) + TEST_FIELD_ALIGN (DRAGINFOW, uSize, 1) + TEST_FIELD_OFFSET(DRAGINFOW, uSize, 0) + TEST_FIELD_SIZE (DRAGINFOW, pt, 8) + TEST_FIELD_ALIGN (DRAGINFOW, pt, 1) + TEST_FIELD_OFFSET(DRAGINFOW, pt, 4) + TEST_FIELD_SIZE (DRAGINFOW, fNC, 4) + TEST_FIELD_ALIGN (DRAGINFOW, fNC, 1) + TEST_FIELD_OFFSET(DRAGINFOW, fNC, 12) + TEST_FIELD_SIZE (DRAGINFOW, lpFileList, 4) + TEST_FIELD_ALIGN (DRAGINFOW, lpFileList, 1) + TEST_FIELD_OFFSET(DRAGINFOW, lpFileList, 16) + TEST_FIELD_SIZE (DRAGINFOW, grfKeyState, 4) + TEST_FIELD_ALIGN (DRAGINFOW, grfKeyState, 1) + TEST_FIELD_OFFSET(DRAGINFOW, grfKeyState, 20) } static void test_pack_FILEOP_FLAGS(void) { /* FILEOP_FLAGS */ - TEST_TYPE(FILEOP_FLAGS, 2, 2); - TEST_TYPE_UNSIGNED(FILEOP_FLAGS); + TEST_TYPE_SIZE (FILEOP_FLAGS, 2) + TEST_TYPE_ALIGN (FILEOP_FLAGS, 2) + TEST_TYPE_UNSIGNED(FILEOP_FLAGS) } static void test_pack_LPDRAGINFOA(void) { /* LPDRAGINFOA */ - TEST_TYPE(LPDRAGINFOA, 4, 4); - TEST_TYPE_POINTER(LPDRAGINFOA, 24, 1); + TEST_TYPE_SIZE (LPDRAGINFOA, 4) + TEST_TYPE_ALIGN (LPDRAGINFOA, 4) + TEST_TARGET_SIZE (LPDRAGINFOA, 24) + TEST_TARGET_ALIGN(LPDRAGINFOA, 1) } static void test_pack_LPDRAGINFOW(void) { /* LPDRAGINFOW */ - TEST_TYPE(LPDRAGINFOW, 4, 4); - TEST_TYPE_POINTER(LPDRAGINFOW, 24, 1); + TEST_TYPE_SIZE (LPDRAGINFOW, 4) + TEST_TYPE_ALIGN (LPDRAGINFOW, 4) + TEST_TARGET_SIZE (LPDRAGINFOW, 24) + TEST_TARGET_ALIGN(LPDRAGINFOW, 1) } static void test_pack_LPSHELLEXECUTEINFOA(void) { /* LPSHELLEXECUTEINFOA */ - TEST_TYPE(LPSHELLEXECUTEINFOA, 4, 4); + TEST_TYPE_SIZE (LPSHELLEXECUTEINFOA, 4) + TEST_TYPE_ALIGN (LPSHELLEXECUTEINFOA, 4) } static void test_pack_LPSHELLEXECUTEINFOW(void) { /* LPSHELLEXECUTEINFOW */ - TEST_TYPE(LPSHELLEXECUTEINFOW, 4, 4); + TEST_TYPE_SIZE (LPSHELLEXECUTEINFOW, 4) + TEST_TYPE_ALIGN (LPSHELLEXECUTEINFOW, 4) } static void test_pack_LPSHFILEOPSTRUCTA(void) { /* LPSHFILEOPSTRUCTA */ - TEST_TYPE(LPSHFILEOPSTRUCTA, 4, 4); - TEST_TYPE_POINTER(LPSHFILEOPSTRUCTA, 30, 1); + TEST_TYPE_SIZE (LPSHFILEOPSTRUCTA, 4) + TEST_TYPE_ALIGN (LPSHFILEOPSTRUCTA, 4) + TEST_TARGET_SIZE (LPSHFILEOPSTRUCTA, 30) + TEST_TARGET_ALIGN(LPSHFILEOPSTRUCTA, 1) } static void test_pack_LPSHFILEOPSTRUCTW(void) { /* LPSHFILEOPSTRUCTW */ - TEST_TYPE(LPSHFILEOPSTRUCTW, 4, 4); - TEST_TYPE_POINTER(LPSHFILEOPSTRUCTW, 30, 1); + TEST_TYPE_SIZE (LPSHFILEOPSTRUCTW, 4) + TEST_TYPE_ALIGN (LPSHFILEOPSTRUCTW, 4) + TEST_TARGET_SIZE (LPSHFILEOPSTRUCTW, 30) + TEST_TARGET_ALIGN(LPSHFILEOPSTRUCTW, 1) } static void test_pack_LPSHNAMEMAPPINGA(void) { /* LPSHNAMEMAPPINGA */ - TEST_TYPE(LPSHNAMEMAPPINGA, 4, 4); - TEST_TYPE_POINTER(LPSHNAMEMAPPINGA, 16, 1); + TEST_TYPE_SIZE (LPSHNAMEMAPPINGA, 4) + TEST_TYPE_ALIGN (LPSHNAMEMAPPINGA, 4) + TEST_TARGET_SIZE (LPSHNAMEMAPPINGA, 16) + TEST_TARGET_ALIGN(LPSHNAMEMAPPINGA, 1) } static void test_pack_LPSHNAMEMAPPINGW(void) { /* LPSHNAMEMAPPINGW */ - TEST_TYPE(LPSHNAMEMAPPINGW, 4, 4); - TEST_TYPE_POINTER(LPSHNAMEMAPPINGW, 16, 1); + TEST_TYPE_SIZE (LPSHNAMEMAPPINGW, 4) + TEST_TYPE_ALIGN (LPSHNAMEMAPPINGW, 4) + TEST_TARGET_SIZE (LPSHNAMEMAPPINGW, 16) + TEST_TARGET_ALIGN(LPSHNAMEMAPPINGW, 1) } static void test_pack_NOTIFYICONDATAA(void) { /* NOTIFYICONDATAA (pack 1) */ - TEST_FIELD(NOTIFYICONDATAA, cbSize, 0, 4, 1); - TEST_FIELD(NOTIFYICONDATAA, hWnd, 4, 4, 1); - TEST_FIELD(NOTIFYICONDATAA, uID, 8, 4, 1); - TEST_FIELD(NOTIFYICONDATAA, uFlags, 12, 4, 1); - TEST_FIELD(NOTIFYICONDATAA, uCallbackMessage, 16, 4, 1); - TEST_FIELD(NOTIFYICONDATAA, hIcon, 20, 4, 1); - TEST_FIELD(NOTIFYICONDATAA, szTip, 24, 128, 1); - TEST_FIELD(NOTIFYICONDATAA, dwState, 152, 4, 1); - TEST_FIELD(NOTIFYICONDATAA, dwStateMask, 156, 4, 1); - TEST_FIELD(NOTIFYICONDATAA, szInfo, 160, 256, 1); + TEST_FIELD_SIZE (NOTIFYICONDATAA, cbSize, 4) + TEST_FIELD_ALIGN (NOTIFYICONDATAA, cbSize, 1) + TEST_FIELD_OFFSET(NOTIFYICONDATAA, cbSize, 0) + TEST_FIELD_SIZE (NOTIFYICONDATAA, hWnd, 4) + TEST_FIELD_ALIGN (NOTIFYICONDATAA, hWnd, 1) + TEST_FIELD_OFFSET(NOTIFYICONDATAA, hWnd, 4) + TEST_FIELD_SIZE (NOTIFYICONDATAA, uID, 4) + TEST_FIELD_ALIGN (NOTIFYICONDATAA, uID, 1) + TEST_FIELD_OFFSET(NOTIFYICONDATAA, uID, 8) + TEST_FIELD_SIZE (NOTIFYICONDATAA, uFlags, 4) + TEST_FIELD_ALIGN (NOTIFYICONDATAA, uFlags, 1) + TEST_FIELD_OFFSET(NOTIFYICONDATAA, uFlags, 12) + TEST_FIELD_SIZE (NOTIFYICONDATAA, uCallbackMessage, 4) + TEST_FIELD_ALIGN (NOTIFYICONDATAA, uCallbackMessage, 1) + TEST_FIELD_OFFSET(NOTIFYICONDATAA, uCallbackMessage, 16) + TEST_FIELD_SIZE (NOTIFYICONDATAA, hIcon, 4) + TEST_FIELD_ALIGN (NOTIFYICONDATAA, hIcon, 1) + TEST_FIELD_OFFSET(NOTIFYICONDATAA, hIcon, 20) + TEST_FIELD_SIZE (NOTIFYICONDATAA, szTip, 128) + TEST_FIELD_ALIGN (NOTIFYICONDATAA, szTip, 1) + TEST_FIELD_OFFSET(NOTIFYICONDATAA, szTip, 24) + TEST_FIELD_SIZE (NOTIFYICONDATAA, dwState, 4) + TEST_FIELD_ALIGN (NOTIFYICONDATAA, dwState, 1) + TEST_FIELD_OFFSET(NOTIFYICONDATAA, dwState, 152) + TEST_FIELD_SIZE (NOTIFYICONDATAA, dwStateMask, 4) + TEST_FIELD_ALIGN (NOTIFYICONDATAA, dwStateMask, 1) + TEST_FIELD_OFFSET(NOTIFYICONDATAA, dwStateMask, 156) + TEST_FIELD_SIZE (NOTIFYICONDATAA, szInfo, 256) + TEST_FIELD_ALIGN (NOTIFYICONDATAA, szInfo, 1) + TEST_FIELD_OFFSET(NOTIFYICONDATAA, szInfo, 160) } static void test_pack_NOTIFYICONDATAW(void) { /* NOTIFYICONDATAW (pack 1) */ - TEST_FIELD(NOTIFYICONDATAW, cbSize, 0, 4, 1); - TEST_FIELD(NOTIFYICONDATAW, hWnd, 4, 4, 1); - TEST_FIELD(NOTIFYICONDATAW, uID, 8, 4, 1); - TEST_FIELD(NOTIFYICONDATAW, uFlags, 12, 4, 1); - TEST_FIELD(NOTIFYICONDATAW, uCallbackMessage, 16, 4, 1); - TEST_FIELD(NOTIFYICONDATAW, hIcon, 20, 4, 1); - TEST_FIELD(NOTIFYICONDATAW, szTip, 24, 256, 1); - TEST_FIELD(NOTIFYICONDATAW, dwState, 280, 4, 1); - TEST_FIELD(NOTIFYICONDATAW, dwStateMask, 284, 4, 1); - TEST_FIELD(NOTIFYICONDATAW, szInfo, 288, 512, 1); + TEST_FIELD_SIZE (NOTIFYICONDATAW, cbSize, 4) + TEST_FIELD_ALIGN (NOTIFYICONDATAW, cbSize, 1) + TEST_FIELD_OFFSET(NOTIFYICONDATAW, cbSize, 0) + TEST_FIELD_SIZE (NOTIFYICONDATAW, hWnd, 4) + TEST_FIELD_ALIGN (NOTIFYICONDATAW, hWnd, 1) + TEST_FIELD_OFFSET(NOTIFYICONDATAW, hWnd, 4) + TEST_FIELD_SIZE (NOTIFYICONDATAW, uID, 4) + TEST_FIELD_ALIGN (NOTIFYICONDATAW, uID, 1) + TEST_FIELD_OFFSET(NOTIFYICONDATAW, uID, 8) + TEST_FIELD_SIZE (NOTIFYICONDATAW, uFlags, 4) + TEST_FIELD_ALIGN (NOTIFYICONDATAW, uFlags, 1) + TEST_FIELD_OFFSET(NOTIFYICONDATAW, uFlags, 12) + TEST_FIELD_SIZE (NOTIFYICONDATAW, uCallbackMessage, 4) + TEST_FIELD_ALIGN (NOTIFYICONDATAW, uCallbackMessage, 1) + TEST_FIELD_OFFSET(NOTIFYICONDATAW, uCallbackMessage, 16) + TEST_FIELD_SIZE (NOTIFYICONDATAW, hIcon, 4) + TEST_FIELD_ALIGN (NOTIFYICONDATAW, hIcon, 1) + TEST_FIELD_OFFSET(NOTIFYICONDATAW, hIcon, 20) + TEST_FIELD_SIZE (NOTIFYICONDATAW, szTip, 256) + TEST_FIELD_ALIGN (NOTIFYICONDATAW, szTip, 1) + TEST_FIELD_OFFSET(NOTIFYICONDATAW, szTip, 24) + TEST_FIELD_SIZE (NOTIFYICONDATAW, dwState, 4) + TEST_FIELD_ALIGN (NOTIFYICONDATAW, dwState, 1) + TEST_FIELD_OFFSET(NOTIFYICONDATAW, dwState, 280) + TEST_FIELD_SIZE (NOTIFYICONDATAW, dwStateMask, 4) + TEST_FIELD_ALIGN (NOTIFYICONDATAW, dwStateMask, 1) + TEST_FIELD_OFFSET(NOTIFYICONDATAW, dwStateMask, 284) + TEST_FIELD_SIZE (NOTIFYICONDATAW, szInfo, 512) + TEST_FIELD_ALIGN (NOTIFYICONDATAW, szInfo, 1) + TEST_FIELD_OFFSET(NOTIFYICONDATAW, szInfo, 288) } static void test_pack_PAPPBARDATA(void) { /* PAPPBARDATA */ - TEST_TYPE(PAPPBARDATA, 4, 4); - TEST_TYPE_POINTER(PAPPBARDATA, 36, 1); + TEST_TYPE_SIZE (PAPPBARDATA, 4) + TEST_TYPE_ALIGN (PAPPBARDATA, 4) + TEST_TARGET_SIZE (PAPPBARDATA, 36) + TEST_TARGET_ALIGN(PAPPBARDATA, 1) } static void test_pack_PNOTIFYICONDATAA(void) { /* PNOTIFYICONDATAA */ - TEST_TYPE(PNOTIFYICONDATAA, 4, 4); + TEST_TYPE_SIZE (PNOTIFYICONDATAA, 4) + TEST_TYPE_ALIGN (PNOTIFYICONDATAA, 4) } static void test_pack_PNOTIFYICONDATAW(void) { /* PNOTIFYICONDATAW */ - TEST_TYPE(PNOTIFYICONDATAW, 4, 4); + TEST_TYPE_SIZE (PNOTIFYICONDATAW, 4) + TEST_TYPE_ALIGN (PNOTIFYICONDATAW, 4) } static void test_pack_PRINTEROP_FLAGS(void) { /* PRINTEROP_FLAGS */ - TEST_TYPE(PRINTEROP_FLAGS, 2, 2); - TEST_TYPE_UNSIGNED(PRINTEROP_FLAGS); + TEST_TYPE_SIZE (PRINTEROP_FLAGS, 2) + TEST_TYPE_ALIGN (PRINTEROP_FLAGS, 2) + TEST_TYPE_UNSIGNED(PRINTEROP_FLAGS) } static void test_pack_SHELLEXECUTEINFOA(void) { /* SHELLEXECUTEINFOA (pack 1) */ - TEST_FIELD(SHELLEXECUTEINFOA, cbSize, 0, 4, 1); - TEST_FIELD(SHELLEXECUTEINFOA, fMask, 4, 4, 1); - TEST_FIELD(SHELLEXECUTEINFOA, hwnd, 8, 4, 1); - TEST_FIELD(SHELLEXECUTEINFOA, lpVerb, 12, 4, 1); - TEST_FIELD(SHELLEXECUTEINFOA, lpFile, 16, 4, 1); - TEST_FIELD(SHELLEXECUTEINFOA, lpParameters, 20, 4, 1); - TEST_FIELD(SHELLEXECUTEINFOA, lpDirectory, 24, 4, 1); - TEST_FIELD(SHELLEXECUTEINFOA, nShow, 28, 4, 1); - TEST_FIELD(SHELLEXECUTEINFOA, hInstApp, 32, 4, 1); - TEST_FIELD(SHELLEXECUTEINFOA, lpIDList, 36, 4, 1); - TEST_FIELD(SHELLEXECUTEINFOA, lpClass, 40, 4, 1); - TEST_FIELD(SHELLEXECUTEINFOA, hkeyClass, 44, 4, 1); - TEST_FIELD(SHELLEXECUTEINFOA, dwHotKey, 48, 4, 1); + TEST_FIELD_SIZE (SHELLEXECUTEINFOA, cbSize, 4) + TEST_FIELD_ALIGN (SHELLEXECUTEINFOA, cbSize, 1) + TEST_FIELD_OFFSET(SHELLEXECUTEINFOA, cbSize, 0) + TEST_FIELD_SIZE (SHELLEXECUTEINFOA, fMask, 4) + TEST_FIELD_ALIGN (SHELLEXECUTEINFOA, fMask, 1) + TEST_FIELD_OFFSET(SHELLEXECUTEINFOA, fMask, 4) + TEST_FIELD_SIZE (SHELLEXECUTEINFOA, hwnd, 4) + TEST_FIELD_ALIGN (SHELLEXECUTEINFOA, hwnd, 1) + TEST_FIELD_OFFSET(SHELLEXECUTEINFOA, hwnd, 8) + TEST_FIELD_SIZE (SHELLEXECUTEINFOA, lpVerb, 4) + TEST_FIELD_ALIGN (SHELLEXECUTEINFOA, lpVerb, 1) + TEST_FIELD_OFFSET(SHELLEXECUTEINFOA, lpVerb, 12) + TEST_FIELD_SIZE (SHELLEXECUTEINFOA, lpFile, 4) + TEST_FIELD_ALIGN (SHELLEXECUTEINFOA, lpFile, 1) + TEST_FIELD_OFFSET(SHELLEXECUTEINFOA, lpFile, 16) + TEST_FIELD_SIZE (SHELLEXECUTEINFOA, lpParameters, 4) + TEST_FIELD_ALIGN (SHELLEXECUTEINFOA, lpParameters, 1) + TEST_FIELD_OFFSET(SHELLEXECUTEINFOA, lpParameters, 20) + TEST_FIELD_SIZE (SHELLEXECUTEINFOA, lpDirectory, 4) + TEST_FIELD_ALIGN (SHELLEXECUTEINFOA, lpDirectory, 1) + TEST_FIELD_OFFSET(SHELLEXECUTEINFOA, lpDirectory, 24) + TEST_FIELD_SIZE (SHELLEXECUTEINFOA, nShow, 4) + TEST_FIELD_ALIGN (SHELLEXECUTEINFOA, nShow, 1) + TEST_FIELD_OFFSET(SHELLEXECUTEINFOA, nShow, 28) + TEST_FIELD_SIZE (SHELLEXECUTEINFOA, hInstApp, 4) + TEST_FIELD_ALIGN (SHELLEXECUTEINFOA, hInstApp, 1) + TEST_FIELD_OFFSET(SHELLEXECUTEINFOA, hInstApp, 32) + TEST_FIELD_SIZE (SHELLEXECUTEINFOA, lpIDList, 4) + TEST_FIELD_ALIGN (SHELLEXECUTEINFOA, lpIDList, 1) + TEST_FIELD_OFFSET(SHELLEXECUTEINFOA, lpIDList, 36) + TEST_FIELD_SIZE (SHELLEXECUTEINFOA, lpClass, 4) + TEST_FIELD_ALIGN (SHELLEXECUTEINFOA, lpClass, 1) + TEST_FIELD_OFFSET(SHELLEXECUTEINFOA, lpClass, 40) + TEST_FIELD_SIZE (SHELLEXECUTEINFOA, hkeyClass, 4) + TEST_FIELD_ALIGN (SHELLEXECUTEINFOA, hkeyClass, 1) + TEST_FIELD_OFFSET(SHELLEXECUTEINFOA, hkeyClass, 44) + TEST_FIELD_SIZE (SHELLEXECUTEINFOA, dwHotKey, 4) + TEST_FIELD_ALIGN (SHELLEXECUTEINFOA, dwHotKey, 1) + TEST_FIELD_OFFSET(SHELLEXECUTEINFOA, dwHotKey, 48) } static void test_pack_SHELLEXECUTEINFOW(void) { /* SHELLEXECUTEINFOW (pack 1) */ - TEST_FIELD(SHELLEXECUTEINFOW, cbSize, 0, 4, 1); - TEST_FIELD(SHELLEXECUTEINFOW, fMask, 4, 4, 1); - TEST_FIELD(SHELLEXECUTEINFOW, hwnd, 8, 4, 1); - TEST_FIELD(SHELLEXECUTEINFOW, lpVerb, 12, 4, 1); - TEST_FIELD(SHELLEXECUTEINFOW, lpFile, 16, 4, 1); - TEST_FIELD(SHELLEXECUTEINFOW, lpParameters, 20, 4, 1); - TEST_FIELD(SHELLEXECUTEINFOW, lpDirectory, 24, 4, 1); - TEST_FIELD(SHELLEXECUTEINFOW, nShow, 28, 4, 1); - TEST_FIELD(SHELLEXECUTEINFOW, hInstApp, 32, 4, 1); - TEST_FIELD(SHELLEXECUTEINFOW, lpIDList, 36, 4, 1); - TEST_FIELD(SHELLEXECUTEINFOW, lpClass, 40, 4, 1); - TEST_FIELD(SHELLEXECUTEINFOW, hkeyClass, 44, 4, 1); - TEST_FIELD(SHELLEXECUTEINFOW, dwHotKey, 48, 4, 1); + TEST_FIELD_SIZE (SHELLEXECUTEINFOW, cbSize, 4) + TEST_FIELD_ALIGN (SHELLEXECUTEINFOW, cbSize, 1) + TEST_FIELD_OFFSET(SHELLEXECUTEINFOW, cbSize, 0) + TEST_FIELD_SIZE (SHELLEXECUTEINFOW, fMask, 4) + TEST_FIELD_ALIGN (SHELLEXECUTEINFOW, fMask, 1) + TEST_FIELD_OFFSET(SHELLEXECUTEINFOW, fMask, 4) + TEST_FIELD_SIZE (SHELLEXECUTEINFOW, hwnd, 4) + TEST_FIELD_ALIGN (SHELLEXECUTEINFOW, hwnd, 1) + TEST_FIELD_OFFSET(SHELLEXECUTEINFOW, hwnd, 8) + TEST_FIELD_SIZE (SHELLEXECUTEINFOW, lpVerb, 4) + TEST_FIELD_ALIGN (SHELLEXECUTEINFOW, lpVerb, 1) + TEST_FIELD_OFFSET(SHELLEXECUTEINFOW, lpVerb, 12) + TEST_FIELD_SIZE (SHELLEXECUTEINFOW, lpFile, 4) + TEST_FIELD_ALIGN (SHELLEXECUTEINFOW, lpFile, 1) + TEST_FIELD_OFFSET(SHELLEXECUTEINFOW, lpFile, 16) + TEST_FIELD_SIZE (SHELLEXECUTEINFOW, lpParameters, 4) + TEST_FIELD_ALIGN (SHELLEXECUTEINFOW, lpParameters, 1) + TEST_FIELD_OFFSET(SHELLEXECUTEINFOW, lpParameters, 20) + TEST_FIELD_SIZE (SHELLEXECUTEINFOW, lpDirectory, 4) + TEST_FIELD_ALIGN (SHELLEXECUTEINFOW, lpDirectory, 1) + TEST_FIELD_OFFSET(SHELLEXECUTEINFOW, lpDirectory, 24) + TEST_FIELD_SIZE (SHELLEXECUTEINFOW, nShow, 4) + TEST_FIELD_ALIGN (SHELLEXECUTEINFOW, nShow, 1) + TEST_FIELD_OFFSET(SHELLEXECUTEINFOW, nShow, 28) + TEST_FIELD_SIZE (SHELLEXECUTEINFOW, hInstApp, 4) + TEST_FIELD_ALIGN (SHELLEXECUTEINFOW, hInstApp, 1) + TEST_FIELD_OFFSET(SHELLEXECUTEINFOW, hInstApp, 32) + TEST_FIELD_SIZE (SHELLEXECUTEINFOW, lpIDList, 4) + TEST_FIELD_ALIGN (SHELLEXECUTEINFOW, lpIDList, 1) + TEST_FIELD_OFFSET(SHELLEXECUTEINFOW, lpIDList, 36) + TEST_FIELD_SIZE (SHELLEXECUTEINFOW, lpClass, 4) + TEST_FIELD_ALIGN (SHELLEXECUTEINFOW, lpClass, 1) + TEST_FIELD_OFFSET(SHELLEXECUTEINFOW, lpClass, 40) + TEST_FIELD_SIZE (SHELLEXECUTEINFOW, hkeyClass, 4) + TEST_FIELD_ALIGN (SHELLEXECUTEINFOW, hkeyClass, 1) + TEST_FIELD_OFFSET(SHELLEXECUTEINFOW, hkeyClass, 44) + TEST_FIELD_SIZE (SHELLEXECUTEINFOW, dwHotKey, 4) + TEST_FIELD_ALIGN (SHELLEXECUTEINFOW, dwHotKey, 1) + TEST_FIELD_OFFSET(SHELLEXECUTEINFOW, dwHotKey, 48) } static void test_pack_SHFILEINFOA(void) { /* SHFILEINFOA (pack 1) */ - TEST_TYPE(SHFILEINFOA, 352, 1); - TEST_FIELD(SHFILEINFOA, hIcon, 0, 4, 1); - TEST_FIELD(SHFILEINFOA, iIcon, 4, 4, 1); - TEST_FIELD(SHFILEINFOA, dwAttributes, 8, 4, 1); - TEST_FIELD(SHFILEINFOA, szDisplayName, 12, 260, 1); - TEST_FIELD(SHFILEINFOA, szTypeName, 272, 80, 1); + TEST_TYPE_SIZE (SHFILEINFOA, 352) + TEST_TYPE_ALIGN (SHFILEINFOA, 1) + TEST_FIELD_SIZE (SHFILEINFOA, hIcon, 4) + TEST_FIELD_ALIGN (SHFILEINFOA, hIcon, 1) + TEST_FIELD_OFFSET(SHFILEINFOA, hIcon, 0) + TEST_FIELD_SIZE (SHFILEINFOA, iIcon, 4) + TEST_FIELD_ALIGN (SHFILEINFOA, iIcon, 1) + TEST_FIELD_OFFSET(SHFILEINFOA, iIcon, 4) + TEST_FIELD_SIZE (SHFILEINFOA, dwAttributes, 4) + TEST_FIELD_ALIGN (SHFILEINFOA, dwAttributes, 1) + TEST_FIELD_OFFSET(SHFILEINFOA, dwAttributes, 8) + TEST_FIELD_SIZE (SHFILEINFOA, szDisplayName, 260) + TEST_FIELD_ALIGN (SHFILEINFOA, szDisplayName, 1) + TEST_FIELD_OFFSET(SHFILEINFOA, szDisplayName, 12) + TEST_FIELD_SIZE (SHFILEINFOA, szTypeName, 80) + TEST_FIELD_ALIGN (SHFILEINFOA, szTypeName, 1) + TEST_FIELD_OFFSET(SHFILEINFOA, szTypeName, 272) } static void test_pack_SHFILEINFOW(void) { /* SHFILEINFOW (pack 1) */ - TEST_TYPE(SHFILEINFOW, 692, 1); - TEST_FIELD(SHFILEINFOW, hIcon, 0, 4, 1); - TEST_FIELD(SHFILEINFOW, iIcon, 4, 4, 1); - TEST_FIELD(SHFILEINFOW, dwAttributes, 8, 4, 1); - TEST_FIELD(SHFILEINFOW, szDisplayName, 12, 520, 1); - TEST_FIELD(SHFILEINFOW, szTypeName, 532, 160, 1); + TEST_TYPE_SIZE (SHFILEINFOW, 692) + TEST_TYPE_ALIGN (SHFILEINFOW, 1) + TEST_FIELD_SIZE (SHFILEINFOW, hIcon, 4) + TEST_FIELD_ALIGN (SHFILEINFOW, hIcon, 1) + TEST_FIELD_OFFSET(SHFILEINFOW, hIcon, 0) + TEST_FIELD_SIZE (SHFILEINFOW, iIcon, 4) + TEST_FIELD_ALIGN (SHFILEINFOW, iIcon, 1) + TEST_FIELD_OFFSET(SHFILEINFOW, iIcon, 4) + TEST_FIELD_SIZE (SHFILEINFOW, dwAttributes, 4) + TEST_FIELD_ALIGN (SHFILEINFOW, dwAttributes, 1) + TEST_FIELD_OFFSET(SHFILEINFOW, dwAttributes, 8) + TEST_FIELD_SIZE (SHFILEINFOW, szDisplayName, 520) + TEST_FIELD_ALIGN (SHFILEINFOW, szDisplayName, 1) + TEST_FIELD_OFFSET(SHFILEINFOW, szDisplayName, 12) + TEST_FIELD_SIZE (SHFILEINFOW, szTypeName, 160) + TEST_FIELD_ALIGN (SHFILEINFOW, szTypeName, 1) + TEST_FIELD_OFFSET(SHFILEINFOW, szTypeName, 532) } static void test_pack_SHFILEOPSTRUCTA(void) { /* SHFILEOPSTRUCTA (pack 1) */ - TEST_TYPE(SHFILEOPSTRUCTA, 30, 1); - TEST_FIELD(SHFILEOPSTRUCTA, hwnd, 0, 4, 1); - TEST_FIELD(SHFILEOPSTRUCTA, wFunc, 4, 4, 1); - TEST_FIELD(SHFILEOPSTRUCTA, pFrom, 8, 4, 1); - TEST_FIELD(SHFILEOPSTRUCTA, pTo, 12, 4, 1); - TEST_FIELD(SHFILEOPSTRUCTA, fFlags, 16, 2, 1); - TEST_FIELD(SHFILEOPSTRUCTA, fAnyOperationsAborted, 18, 4, 1); - TEST_FIELD(SHFILEOPSTRUCTA, hNameMappings, 22, 4, 1); - TEST_FIELD(SHFILEOPSTRUCTA, lpszProgressTitle, 26, 4, 1); + TEST_TYPE_SIZE (SHFILEOPSTRUCTA, 30) + TEST_TYPE_ALIGN (SHFILEOPSTRUCTA, 1) + TEST_FIELD_SIZE (SHFILEOPSTRUCTA, hwnd, 4) + TEST_FIELD_ALIGN (SHFILEOPSTRUCTA, hwnd, 1) + TEST_FIELD_OFFSET(SHFILEOPSTRUCTA, hwnd, 0) + TEST_FIELD_SIZE (SHFILEOPSTRUCTA, wFunc, 4) + TEST_FIELD_ALIGN (SHFILEOPSTRUCTA, wFunc, 1) + TEST_FIELD_OFFSET(SHFILEOPSTRUCTA, wFunc, 4) + TEST_FIELD_SIZE (SHFILEOPSTRUCTA, pFrom, 4) + TEST_FIELD_ALIGN (SHFILEOPSTRUCTA, pFrom, 1) + TEST_FIELD_OFFSET(SHFILEOPSTRUCTA, pFrom, 8) + TEST_FIELD_SIZE (SHFILEOPSTRUCTA, pTo, 4) + TEST_FIELD_ALIGN (SHFILEOPSTRUCTA, pTo, 1) + TEST_FIELD_OFFSET(SHFILEOPSTRUCTA, pTo, 12) + TEST_FIELD_SIZE (SHFILEOPSTRUCTA, fFlags, 2) + TEST_FIELD_ALIGN (SHFILEOPSTRUCTA, fFlags, 1) + TEST_FIELD_OFFSET(SHFILEOPSTRUCTA, fFlags, 16) + TEST_FIELD_SIZE (SHFILEOPSTRUCTA, fAnyOperationsAborted, 4) + TEST_FIELD_ALIGN (SHFILEOPSTRUCTA, fAnyOperationsAborted, 1) + TEST_FIELD_OFFSET(SHFILEOPSTRUCTA, fAnyOperationsAborted, 18) + TEST_FIELD_SIZE (SHFILEOPSTRUCTA, hNameMappings, 4) + TEST_FIELD_ALIGN (SHFILEOPSTRUCTA, hNameMappings, 1) + TEST_FIELD_OFFSET(SHFILEOPSTRUCTA, hNameMappings, 22) + TEST_FIELD_SIZE (SHFILEOPSTRUCTA, lpszProgressTitle, 4) + TEST_FIELD_ALIGN (SHFILEOPSTRUCTA, lpszProgressTitle, 1) + TEST_FIELD_OFFSET(SHFILEOPSTRUCTA, lpszProgressTitle, 26) } static void test_pack_SHFILEOPSTRUCTW(void) { /* SHFILEOPSTRUCTW (pack 1) */ - TEST_TYPE(SHFILEOPSTRUCTW, 30, 1); - TEST_FIELD(SHFILEOPSTRUCTW, hwnd, 0, 4, 1); - TEST_FIELD(SHFILEOPSTRUCTW, wFunc, 4, 4, 1); - TEST_FIELD(SHFILEOPSTRUCTW, pFrom, 8, 4, 1); - TEST_FIELD(SHFILEOPSTRUCTW, pTo, 12, 4, 1); - TEST_FIELD(SHFILEOPSTRUCTW, fFlags, 16, 2, 1); - TEST_FIELD(SHFILEOPSTRUCTW, fAnyOperationsAborted, 18, 4, 1); - TEST_FIELD(SHFILEOPSTRUCTW, hNameMappings, 22, 4, 1); - TEST_FIELD(SHFILEOPSTRUCTW, lpszProgressTitle, 26, 4, 1); + TEST_TYPE_SIZE (SHFILEOPSTRUCTW, 30) + TEST_TYPE_ALIGN (SHFILEOPSTRUCTW, 1) + TEST_FIELD_SIZE (SHFILEOPSTRUCTW, hwnd, 4) + TEST_FIELD_ALIGN (SHFILEOPSTRUCTW, hwnd, 1) + TEST_FIELD_OFFSET(SHFILEOPSTRUCTW, hwnd, 0) + TEST_FIELD_SIZE (SHFILEOPSTRUCTW, wFunc, 4) + TEST_FIELD_ALIGN (SHFILEOPSTRUCTW, wFunc, 1) + TEST_FIELD_OFFSET(SHFILEOPSTRUCTW, wFunc, 4) + TEST_FIELD_SIZE (SHFILEOPSTRUCTW, pFrom, 4) + TEST_FIELD_ALIGN (SHFILEOPSTRUCTW, pFrom, 1) + TEST_FIELD_OFFSET(SHFILEOPSTRUCTW, pFrom, 8) + TEST_FIELD_SIZE (SHFILEOPSTRUCTW, pTo, 4) + TEST_FIELD_ALIGN (SHFILEOPSTRUCTW, pTo, 1) + TEST_FIELD_OFFSET(SHFILEOPSTRUCTW, pTo, 12) + TEST_FIELD_SIZE (SHFILEOPSTRUCTW, fFlags, 2) + TEST_FIELD_ALIGN (SHFILEOPSTRUCTW, fFlags, 1) + TEST_FIELD_OFFSET(SHFILEOPSTRUCTW, fFlags, 16) + TEST_FIELD_SIZE (SHFILEOPSTRUCTW, fAnyOperationsAborted, 4) + TEST_FIELD_ALIGN (SHFILEOPSTRUCTW, fAnyOperationsAborted, 1) + TEST_FIELD_OFFSET(SHFILEOPSTRUCTW, fAnyOperationsAborted, 18) + TEST_FIELD_SIZE (SHFILEOPSTRUCTW, hNameMappings, 4) + TEST_FIELD_ALIGN (SHFILEOPSTRUCTW, hNameMappings, 1) + TEST_FIELD_OFFSET(SHFILEOPSTRUCTW, hNameMappings, 22) + TEST_FIELD_SIZE (SHFILEOPSTRUCTW, lpszProgressTitle, 4) + TEST_FIELD_ALIGN (SHFILEOPSTRUCTW, lpszProgressTitle, 1) + TEST_FIELD_OFFSET(SHFILEOPSTRUCTW, lpszProgressTitle, 26) } static void test_pack_SHNAMEMAPPINGA(void) { /* SHNAMEMAPPINGA (pack 1) */ - TEST_TYPE(SHNAMEMAPPINGA, 16, 1); - TEST_FIELD(SHNAMEMAPPINGA, pszOldPath, 0, 4, 1); - TEST_FIELD(SHNAMEMAPPINGA, pszNewPath, 4, 4, 1); - TEST_FIELD(SHNAMEMAPPINGA, cchOldPath, 8, 4, 1); - TEST_FIELD(SHNAMEMAPPINGA, cchNewPath, 12, 4, 1); + TEST_TYPE_SIZE (SHNAMEMAPPINGA, 16) + TEST_TYPE_ALIGN (SHNAMEMAPPINGA, 1) + TEST_FIELD_SIZE (SHNAMEMAPPINGA, pszOldPath, 4) + TEST_FIELD_ALIGN (SHNAMEMAPPINGA, pszOldPath, 1) + TEST_FIELD_OFFSET(SHNAMEMAPPINGA, pszOldPath, 0) + TEST_FIELD_SIZE (SHNAMEMAPPINGA, pszNewPath, 4) + TEST_FIELD_ALIGN (SHNAMEMAPPINGA, pszNewPath, 1) + TEST_FIELD_OFFSET(SHNAMEMAPPINGA, pszNewPath, 4) + TEST_FIELD_SIZE (SHNAMEMAPPINGA, cchOldPath, 4) + TEST_FIELD_ALIGN (SHNAMEMAPPINGA, cchOldPath, 1) + TEST_FIELD_OFFSET(SHNAMEMAPPINGA, cchOldPath, 8) + TEST_FIELD_SIZE (SHNAMEMAPPINGA, cchNewPath, 4) + TEST_FIELD_ALIGN (SHNAMEMAPPINGA, cchNewPath, 1) + TEST_FIELD_OFFSET(SHNAMEMAPPINGA, cchNewPath, 12) } static void test_pack_SHNAMEMAPPINGW(void) { /* SHNAMEMAPPINGW (pack 1) */ - TEST_TYPE(SHNAMEMAPPINGW, 16, 1); - TEST_FIELD(SHNAMEMAPPINGW, pszOldPath, 0, 4, 1); - TEST_FIELD(SHNAMEMAPPINGW, pszNewPath, 4, 4, 1); - TEST_FIELD(SHNAMEMAPPINGW, cchOldPath, 8, 4, 1); - TEST_FIELD(SHNAMEMAPPINGW, cchNewPath, 12, 4, 1); + TEST_TYPE_SIZE (SHNAMEMAPPINGW, 16) + TEST_TYPE_ALIGN (SHNAMEMAPPINGW, 1) + TEST_FIELD_SIZE (SHNAMEMAPPINGW, pszOldPath, 4) + TEST_FIELD_ALIGN (SHNAMEMAPPINGW, pszOldPath, 1) + TEST_FIELD_OFFSET(SHNAMEMAPPINGW, pszOldPath, 0) + TEST_FIELD_SIZE (SHNAMEMAPPINGW, pszNewPath, 4) + TEST_FIELD_ALIGN (SHNAMEMAPPINGW, pszNewPath, 1) + TEST_FIELD_OFFSET(SHNAMEMAPPINGW, pszNewPath, 4) + TEST_FIELD_SIZE (SHNAMEMAPPINGW, cchOldPath, 4) + TEST_FIELD_ALIGN (SHNAMEMAPPINGW, cchOldPath, 1) + TEST_FIELD_OFFSET(SHNAMEMAPPINGW, cchOldPath, 8) + TEST_FIELD_SIZE (SHNAMEMAPPINGW, cchNewPath, 4) + TEST_FIELD_ALIGN (SHNAMEMAPPINGW, cchNewPath, 1) + TEST_FIELD_OFFSET(SHNAMEMAPPINGW, cchNewPath, 12) } static void test_pack_ITEMIDLIST(void) { /* ITEMIDLIST (pack 1) */ - TEST_TYPE(ITEMIDLIST, 3, 1); - TEST_FIELD(ITEMIDLIST, mkid, 0, 3, 1); + TEST_TYPE_SIZE (ITEMIDLIST, 3) + TEST_TYPE_ALIGN (ITEMIDLIST, 1) + TEST_FIELD_SIZE (ITEMIDLIST, mkid, 3) + TEST_FIELD_ALIGN (ITEMIDLIST, mkid, 1) + TEST_FIELD_OFFSET(ITEMIDLIST, mkid, 0) } static void test_pack_LPCITEMIDLIST(void) { /* LPCITEMIDLIST */ - TEST_TYPE(LPCITEMIDLIST, 4, 4); - TEST_TYPE_POINTER(LPCITEMIDLIST, 3, 1); + TEST_TYPE_SIZE (LPCITEMIDLIST, 4) + TEST_TYPE_ALIGN (LPCITEMIDLIST, 4) + TEST_TARGET_SIZE (LPCITEMIDLIST, 3) + TEST_TARGET_ALIGN(LPCITEMIDLIST, 1) } static void test_pack_LPCSHITEMID(void) { /* LPCSHITEMID */ - TEST_TYPE(LPCSHITEMID, 4, 4); - TEST_TYPE_POINTER(LPCSHITEMID, 3, 1); + TEST_TYPE_SIZE (LPCSHITEMID, 4) + TEST_TYPE_ALIGN (LPCSHITEMID, 4) + TEST_TARGET_SIZE (LPCSHITEMID, 3) + TEST_TARGET_ALIGN(LPCSHITEMID, 1) } static void test_pack_LPITEMIDLIST(void) { /* LPITEMIDLIST */ - TEST_TYPE(LPITEMIDLIST, 4, 4); + TEST_TYPE_SIZE (LPITEMIDLIST, 4) + TEST_TYPE_ALIGN (LPITEMIDLIST, 4) } static void test_pack_LPSHELLDETAILS(void) { /* LPSHELLDETAILS */ - TEST_TYPE(LPSHELLDETAILS, 4, 4); + TEST_TYPE_SIZE (LPSHELLDETAILS, 4) + TEST_TYPE_ALIGN (LPSHELLDETAILS, 4) } static void test_pack_LPSHITEMID(void) { /* LPSHITEMID */ - TEST_TYPE(LPSHITEMID, 4, 4); + TEST_TYPE_SIZE (LPSHITEMID, 4) + TEST_TYPE_ALIGN (LPSHITEMID, 4) } static void test_pack_LPSTRRET(void) { /* LPSTRRET */ - TEST_TYPE(LPSTRRET, 4, 4); + TEST_TYPE_SIZE (LPSTRRET, 4) + TEST_TYPE_ALIGN (LPSTRRET, 4) } static void test_pack_SHELLDETAILS(void) { /* SHELLDETAILS (pack 1) */ - TEST_FIELD(SHELLDETAILS, fmt, 0, 4, 1); - TEST_FIELD(SHELLDETAILS, cxChar, 4, 4, 1); + TEST_FIELD_SIZE (SHELLDETAILS, fmt, 4) + TEST_FIELD_ALIGN (SHELLDETAILS, fmt, 1) + TEST_FIELD_OFFSET(SHELLDETAILS, fmt, 0) + TEST_FIELD_SIZE (SHELLDETAILS, cxChar, 4) + TEST_FIELD_ALIGN (SHELLDETAILS, cxChar, 1) + TEST_FIELD_OFFSET(SHELLDETAILS, cxChar, 4) } static void test_pack_SHITEMID(void) { /* SHITEMID (pack 1) */ - TEST_TYPE(SHITEMID, 3, 1); - TEST_FIELD(SHITEMID, cb, 0, 2, 1); - TEST_FIELD(SHITEMID, abID, 2, 1, 1); + TEST_TYPE_SIZE (SHITEMID, 3) + TEST_TYPE_ALIGN (SHITEMID, 1) + TEST_FIELD_SIZE (SHITEMID, cb, 2) + TEST_FIELD_ALIGN (SHITEMID, cb, 1) + TEST_FIELD_OFFSET(SHITEMID, cb, 0) + TEST_FIELD_SIZE (SHITEMID, abID, 1) + TEST_FIELD_ALIGN (SHITEMID, abID, 1) + TEST_FIELD_OFFSET(SHITEMID, abID, 2) } static void test_pack_STRRET(void) { /* STRRET (pack 4) */ - TEST_FIELD(STRRET, uType, 0, 4, 4); + TEST_FIELD_SIZE (STRRET, uType, 4) + TEST_FIELD_ALIGN (STRRET, uType, 4) + TEST_FIELD_OFFSET(STRRET, uType, 0) } static void test_pack_AUTO_SCROLL_DATA(void) { /* AUTO_SCROLL_DATA (pack 1) */ - TEST_TYPE(AUTO_SCROLL_DATA, 48, 1); - TEST_FIELD(AUTO_SCROLL_DATA, iNextSample, 0, 4, 1); - TEST_FIELD(AUTO_SCROLL_DATA, dwLastScroll, 4, 4, 1); - TEST_FIELD(AUTO_SCROLL_DATA, bFull, 8, 4, 1); - TEST_FIELD(AUTO_SCROLL_DATA, pts, 12, 24, 1); - TEST_FIELD(AUTO_SCROLL_DATA, dwTimes, 36, 12, 1); + TEST_TYPE_SIZE (AUTO_SCROLL_DATA, 48) + TEST_TYPE_ALIGN (AUTO_SCROLL_DATA, 1) + TEST_FIELD_SIZE (AUTO_SCROLL_DATA, iNextSample, 4) + TEST_FIELD_ALIGN (AUTO_SCROLL_DATA, iNextSample, 1) + TEST_FIELD_OFFSET(AUTO_SCROLL_DATA, iNextSample, 0) + TEST_FIELD_SIZE (AUTO_SCROLL_DATA, dwLastScroll, 4) + TEST_FIELD_ALIGN (AUTO_SCROLL_DATA, dwLastScroll, 1) + TEST_FIELD_OFFSET(AUTO_SCROLL_DATA, dwLastScroll, 4) + TEST_FIELD_SIZE (AUTO_SCROLL_DATA, bFull, 4) + TEST_FIELD_ALIGN (AUTO_SCROLL_DATA, bFull, 1) + TEST_FIELD_OFFSET(AUTO_SCROLL_DATA, bFull, 8) + TEST_FIELD_SIZE (AUTO_SCROLL_DATA, pts, 24) + TEST_FIELD_ALIGN (AUTO_SCROLL_DATA, pts, 1) + TEST_FIELD_OFFSET(AUTO_SCROLL_DATA, pts, 12) + TEST_FIELD_SIZE (AUTO_SCROLL_DATA, dwTimes, 12) + TEST_FIELD_ALIGN (AUTO_SCROLL_DATA, dwTimes, 1) + TEST_FIELD_OFFSET(AUTO_SCROLL_DATA, dwTimes, 36) } static void test_pack_BFFCALLBACK(void) { /* BFFCALLBACK */ - TEST_TYPE(BFFCALLBACK, 4, 4); + TEST_TYPE_SIZE (BFFCALLBACK, 4) + TEST_TYPE_ALIGN (BFFCALLBACK, 4) } static void test_pack_BROWSEINFOA(void) { /* BROWSEINFOA (pack 8) */ - TEST_TYPE(BROWSEINFOA, 32, 4); - TEST_FIELD(BROWSEINFOA, hwndOwner, 0, 4, 4); - TEST_FIELD(BROWSEINFOA, pidlRoot, 4, 4, 4); - TEST_FIELD(BROWSEINFOA, pszDisplayName, 8, 4, 4); - TEST_FIELD(BROWSEINFOA, lpszTitle, 12, 4, 4); - TEST_FIELD(BROWSEINFOA, ulFlags, 16, 4, 4); - TEST_FIELD(BROWSEINFOA, lpfn, 20, 4, 4); - TEST_FIELD(BROWSEINFOA, lParam, 24, 4, 4); - TEST_FIELD(BROWSEINFOA, iImage, 28, 4, 4); + TEST_TYPE_SIZE (BROWSEINFOA, 32) + TEST_TYPE_ALIGN (BROWSEINFOA, 4) + TEST_FIELD_SIZE (BROWSEINFOA, hwndOwner, 4) + TEST_FIELD_ALIGN (BROWSEINFOA, hwndOwner, 4) + TEST_FIELD_OFFSET(BROWSEINFOA, hwndOwner, 0) + TEST_FIELD_SIZE (BROWSEINFOA, pidlRoot, 4) + TEST_FIELD_ALIGN (BROWSEINFOA, pidlRoot, 4) + TEST_FIELD_OFFSET(BROWSEINFOA, pidlRoot, 4) + TEST_FIELD_SIZE (BROWSEINFOA, pszDisplayName, 4) + TEST_FIELD_ALIGN (BROWSEINFOA, pszDisplayName, 4) + TEST_FIELD_OFFSET(BROWSEINFOA, pszDisplayName, 8) + TEST_FIELD_SIZE (BROWSEINFOA, lpszTitle, 4) + TEST_FIELD_ALIGN (BROWSEINFOA, lpszTitle, 4) + TEST_FIELD_OFFSET(BROWSEINFOA, lpszTitle, 12) + TEST_FIELD_SIZE (BROWSEINFOA, ulFlags, 4) + TEST_FIELD_ALIGN (BROWSEINFOA, ulFlags, 4) + TEST_FIELD_OFFSET(BROWSEINFOA, ulFlags, 16) + TEST_FIELD_SIZE (BROWSEINFOA, lpfn, 4) + TEST_FIELD_ALIGN (BROWSEINFOA, lpfn, 4) + TEST_FIELD_OFFSET(BROWSEINFOA, lpfn, 20) + TEST_FIELD_SIZE (BROWSEINFOA, lParam, 4) + TEST_FIELD_ALIGN (BROWSEINFOA, lParam, 4) + TEST_FIELD_OFFSET(BROWSEINFOA, lParam, 24) + TEST_FIELD_SIZE (BROWSEINFOA, iImage, 4) + TEST_FIELD_ALIGN (BROWSEINFOA, iImage, 4) + TEST_FIELD_OFFSET(BROWSEINFOA, iImage, 28) } static void test_pack_BROWSEINFOW(void) { /* BROWSEINFOW (pack 8) */ - TEST_TYPE(BROWSEINFOW, 32, 4); - TEST_FIELD(BROWSEINFOW, hwndOwner, 0, 4, 4); - TEST_FIELD(BROWSEINFOW, pidlRoot, 4, 4, 4); - TEST_FIELD(BROWSEINFOW, pszDisplayName, 8, 4, 4); - TEST_FIELD(BROWSEINFOW, lpszTitle, 12, 4, 4); - TEST_FIELD(BROWSEINFOW, ulFlags, 16, 4, 4); - TEST_FIELD(BROWSEINFOW, lpfn, 20, 4, 4); - TEST_FIELD(BROWSEINFOW, lParam, 24, 4, 4); - TEST_FIELD(BROWSEINFOW, iImage, 28, 4, 4); + TEST_TYPE_SIZE (BROWSEINFOW, 32) + TEST_TYPE_ALIGN (BROWSEINFOW, 4) + TEST_FIELD_SIZE (BROWSEINFOW, hwndOwner, 4) + TEST_FIELD_ALIGN (BROWSEINFOW, hwndOwner, 4) + TEST_FIELD_OFFSET(BROWSEINFOW, hwndOwner, 0) + TEST_FIELD_SIZE (BROWSEINFOW, pidlRoot, 4) + TEST_FIELD_ALIGN (BROWSEINFOW, pidlRoot, 4) + TEST_FIELD_OFFSET(BROWSEINFOW, pidlRoot, 4) + TEST_FIELD_SIZE (BROWSEINFOW, pszDisplayName, 4) + TEST_FIELD_ALIGN (BROWSEINFOW, pszDisplayName, 4) + TEST_FIELD_OFFSET(BROWSEINFOW, pszDisplayName, 8) + TEST_FIELD_SIZE (BROWSEINFOW, lpszTitle, 4) + TEST_FIELD_ALIGN (BROWSEINFOW, lpszTitle, 4) + TEST_FIELD_OFFSET(BROWSEINFOW, lpszTitle, 12) + TEST_FIELD_SIZE (BROWSEINFOW, ulFlags, 4) + TEST_FIELD_ALIGN (BROWSEINFOW, ulFlags, 4) + TEST_FIELD_OFFSET(BROWSEINFOW, ulFlags, 16) + TEST_FIELD_SIZE (BROWSEINFOW, lpfn, 4) + TEST_FIELD_ALIGN (BROWSEINFOW, lpfn, 4) + TEST_FIELD_OFFSET(BROWSEINFOW, lpfn, 20) + TEST_FIELD_SIZE (BROWSEINFOW, lParam, 4) + TEST_FIELD_ALIGN (BROWSEINFOW, lParam, 4) + TEST_FIELD_OFFSET(BROWSEINFOW, lParam, 24) + TEST_FIELD_SIZE (BROWSEINFOW, iImage, 4) + TEST_FIELD_ALIGN (BROWSEINFOW, iImage, 4) + TEST_FIELD_OFFSET(BROWSEINFOW, iImage, 28) } static void test_pack_CABINETSTATE(void) { /* CABINETSTATE (pack 1) */ - TEST_TYPE(CABINETSTATE, 12, 1); - TEST_FIELD(CABINETSTATE, cLength, 0, 2, 1); - TEST_FIELD(CABINETSTATE, nVersion, 2, 2, 1); - TEST_FIELD(CABINETSTATE, fMenuEnumFilter, 8, 4, 1); + TEST_TYPE_SIZE (CABINETSTATE, 12) + TEST_TYPE_ALIGN (CABINETSTATE, 1) + TEST_FIELD_SIZE (CABINETSTATE, cLength, 2) + TEST_FIELD_ALIGN (CABINETSTATE, cLength, 1) + TEST_FIELD_OFFSET(CABINETSTATE, cLength, 0) + TEST_FIELD_SIZE (CABINETSTATE, nVersion, 2) + TEST_FIELD_ALIGN (CABINETSTATE, nVersion, 1) + TEST_FIELD_OFFSET(CABINETSTATE, nVersion, 2) + TEST_FIELD_SIZE (CABINETSTATE, fMenuEnumFilter, 4) + TEST_FIELD_ALIGN (CABINETSTATE, fMenuEnumFilter, 1) + TEST_FIELD_OFFSET(CABINETSTATE, fMenuEnumFilter, 8) } static void test_pack_CIDA(void) { /* CIDA (pack 1) */ - TEST_TYPE(CIDA, 8, 1); - TEST_FIELD(CIDA, cidl, 0, 4, 1); - TEST_FIELD(CIDA, aoffset, 4, 4, 1); + TEST_TYPE_SIZE (CIDA, 8) + TEST_TYPE_ALIGN (CIDA, 1) + TEST_FIELD_SIZE (CIDA, cidl, 4) + TEST_FIELD_ALIGN (CIDA, cidl, 1) + TEST_FIELD_OFFSET(CIDA, cidl, 0) + TEST_FIELD_SIZE (CIDA, aoffset, 4) + TEST_FIELD_ALIGN (CIDA, aoffset, 1) + TEST_FIELD_OFFSET(CIDA, aoffset, 4) } static void test_pack_CSFV(void) { /* CSFV (pack 1) */ - TEST_FIELD(CSFV, cbSize, 0, 4, 1); - TEST_FIELD(CSFV, pshf, 4, 4, 1); - TEST_FIELD(CSFV, psvOuter, 8, 4, 1); - TEST_FIELD(CSFV, pidl, 12, 4, 1); - TEST_FIELD(CSFV, lEvents, 16, 4, 1); - TEST_FIELD(CSFV, pfnCallback, 20, 4, 1); + TEST_FIELD_SIZE (CSFV, cbSize, 4) + TEST_FIELD_ALIGN (CSFV, cbSize, 1) + TEST_FIELD_OFFSET(CSFV, cbSize, 0) + TEST_FIELD_SIZE (CSFV, pshf, 4) + TEST_FIELD_ALIGN (CSFV, pshf, 1) + TEST_FIELD_OFFSET(CSFV, pshf, 4) + TEST_FIELD_SIZE (CSFV, psvOuter, 4) + TEST_FIELD_ALIGN (CSFV, psvOuter, 1) + TEST_FIELD_OFFSET(CSFV, psvOuter, 8) + TEST_FIELD_SIZE (CSFV, pidl, 4) + TEST_FIELD_ALIGN (CSFV, pidl, 1) + TEST_FIELD_OFFSET(CSFV, pidl, 12) + TEST_FIELD_SIZE (CSFV, lEvents, 4) + TEST_FIELD_ALIGN (CSFV, lEvents, 1) + TEST_FIELD_OFFSET(CSFV, lEvents, 16) + TEST_FIELD_SIZE (CSFV, pfnCallback, 4) + TEST_FIELD_ALIGN (CSFV, pfnCallback, 1) + TEST_FIELD_OFFSET(CSFV, pfnCallback, 20) } static void test_pack_DROPFILES(void) { /* DROPFILES (pack 1) */ - TEST_TYPE(DROPFILES, 20, 1); - TEST_FIELD(DROPFILES, pFiles, 0, 4, 1); - TEST_FIELD(DROPFILES, pt, 4, 8, 1); - TEST_FIELD(DROPFILES, fNC, 12, 4, 1); - TEST_FIELD(DROPFILES, fWide, 16, 4, 1); + TEST_TYPE_SIZE (DROPFILES, 20) + TEST_TYPE_ALIGN (DROPFILES, 1) + TEST_FIELD_SIZE (DROPFILES, pFiles, 4) + TEST_FIELD_ALIGN (DROPFILES, pFiles, 1) + TEST_FIELD_OFFSET(DROPFILES, pFiles, 0) + TEST_FIELD_SIZE (DROPFILES, pt, 8) + TEST_FIELD_ALIGN (DROPFILES, pt, 1) + TEST_FIELD_OFFSET(DROPFILES, pt, 4) + TEST_FIELD_SIZE (DROPFILES, fNC, 4) + TEST_FIELD_ALIGN (DROPFILES, fNC, 1) + TEST_FIELD_OFFSET(DROPFILES, fNC, 12) + TEST_FIELD_SIZE (DROPFILES, fWide, 4) + TEST_FIELD_ALIGN (DROPFILES, fWide, 1) + TEST_FIELD_OFFSET(DROPFILES, fWide, 16) } static void test_pack_FILEDESCRIPTORA(void) { /* FILEDESCRIPTORA (pack 1) */ - TEST_TYPE(FILEDESCRIPTORA, 332, 1); - TEST_FIELD(FILEDESCRIPTORA, dwFlags, 0, 4, 1); - TEST_FIELD(FILEDESCRIPTORA, clsid, 4, 16, 1); - TEST_FIELD(FILEDESCRIPTORA, sizel, 20, 8, 1); - TEST_FIELD(FILEDESCRIPTORA, pointl, 28, 8, 1); - TEST_FIELD(FILEDESCRIPTORA, dwFileAttributes, 36, 4, 1); - TEST_FIELD(FILEDESCRIPTORA, ftCreationTime, 40, 8, 1); - TEST_FIELD(FILEDESCRIPTORA, ftLastAccessTime, 48, 8, 1); - TEST_FIELD(FILEDESCRIPTORA, ftLastWriteTime, 56, 8, 1); - TEST_FIELD(FILEDESCRIPTORA, nFileSizeHigh, 64, 4, 1); - TEST_FIELD(FILEDESCRIPTORA, nFileSizeLow, 68, 4, 1); - TEST_FIELD(FILEDESCRIPTORA, cFileName, 72, 260, 1); + TEST_TYPE_SIZE (FILEDESCRIPTORA, 332) + TEST_TYPE_ALIGN (FILEDESCRIPTORA, 1) + TEST_FIELD_SIZE (FILEDESCRIPTORA, dwFlags, 4) + TEST_FIELD_ALIGN (FILEDESCRIPTORA, dwFlags, 1) + TEST_FIELD_OFFSET(FILEDESCRIPTORA, dwFlags, 0) + TEST_FIELD_SIZE (FILEDESCRIPTORA, clsid, 16) + TEST_FIELD_ALIGN (FILEDESCRIPTORA, clsid, 1) + TEST_FIELD_OFFSET(FILEDESCRIPTORA, clsid, 4) + TEST_FIELD_SIZE (FILEDESCRIPTORA, sizel, 8) + TEST_FIELD_ALIGN (FILEDESCRIPTORA, sizel, 1) + TEST_FIELD_OFFSET(FILEDESCRIPTORA, sizel, 20) + TEST_FIELD_SIZE (FILEDESCRIPTORA, pointl, 8) + TEST_FIELD_ALIGN (FILEDESCRIPTORA, pointl, 1) + TEST_FIELD_OFFSET(FILEDESCRIPTORA, pointl, 28) + TEST_FIELD_SIZE (FILEDESCRIPTORA, dwFileAttributes, 4) + TEST_FIELD_ALIGN (FILEDESCRIPTORA, dwFileAttributes, 1) + TEST_FIELD_OFFSET(FILEDESCRIPTORA, dwFileAttributes, 36) + TEST_FIELD_SIZE (FILEDESCRIPTORA, ftCreationTime, 8) + TEST_FIELD_ALIGN (FILEDESCRIPTORA, ftCreationTime, 1) + TEST_FIELD_OFFSET(FILEDESCRIPTORA, ftCreationTime, 40) + TEST_FIELD_SIZE (FILEDESCRIPTORA, ftLastAccessTime, 8) + TEST_FIELD_ALIGN (FILEDESCRIPTORA, ftLastAccessTime, 1) + TEST_FIELD_OFFSET(FILEDESCRIPTORA, ftLastAccessTime, 48) + TEST_FIELD_SIZE (FILEDESCRIPTORA, ftLastWriteTime, 8) + TEST_FIELD_ALIGN (FILEDESCRIPTORA, ftLastWriteTime, 1) + TEST_FIELD_OFFSET(FILEDESCRIPTORA, ftLastWriteTime, 56) + TEST_FIELD_SIZE (FILEDESCRIPTORA, nFileSizeHigh, 4) + TEST_FIELD_ALIGN (FILEDESCRIPTORA, nFileSizeHigh, 1) + TEST_FIELD_OFFSET(FILEDESCRIPTORA, nFileSizeHigh, 64) + TEST_FIELD_SIZE (FILEDESCRIPTORA, nFileSizeLow, 4) + TEST_FIELD_ALIGN (FILEDESCRIPTORA, nFileSizeLow, 1) + TEST_FIELD_OFFSET(FILEDESCRIPTORA, nFileSizeLow, 68) + TEST_FIELD_SIZE (FILEDESCRIPTORA, cFileName, 260) + TEST_FIELD_ALIGN (FILEDESCRIPTORA, cFileName, 1) + TEST_FIELD_OFFSET(FILEDESCRIPTORA, cFileName, 72) } static void test_pack_FILEDESCRIPTORW(void) { /* FILEDESCRIPTORW (pack 1) */ - TEST_TYPE(FILEDESCRIPTORW, 592, 1); - TEST_FIELD(FILEDESCRIPTORW, dwFlags, 0, 4, 1); - TEST_FIELD(FILEDESCRIPTORW, clsid, 4, 16, 1); - TEST_FIELD(FILEDESCRIPTORW, sizel, 20, 8, 1); - TEST_FIELD(FILEDESCRIPTORW, pointl, 28, 8, 1); - TEST_FIELD(FILEDESCRIPTORW, dwFileAttributes, 36, 4, 1); - TEST_FIELD(FILEDESCRIPTORW, ftCreationTime, 40, 8, 1); - TEST_FIELD(FILEDESCRIPTORW, ftLastAccessTime, 48, 8, 1); - TEST_FIELD(FILEDESCRIPTORW, ftLastWriteTime, 56, 8, 1); - TEST_FIELD(FILEDESCRIPTORW, nFileSizeHigh, 64, 4, 1); - TEST_FIELD(FILEDESCRIPTORW, nFileSizeLow, 68, 4, 1); - TEST_FIELD(FILEDESCRIPTORW, cFileName, 72, 520, 1); + TEST_TYPE_SIZE (FILEDESCRIPTORW, 592) + TEST_TYPE_ALIGN (FILEDESCRIPTORW, 1) + TEST_FIELD_SIZE (FILEDESCRIPTORW, dwFlags, 4) + TEST_FIELD_ALIGN (FILEDESCRIPTORW, dwFlags, 1) + TEST_FIELD_OFFSET(FILEDESCRIPTORW, dwFlags, 0) + TEST_FIELD_SIZE (FILEDESCRIPTORW, clsid, 16) + TEST_FIELD_ALIGN (FILEDESCRIPTORW, clsid, 1) + TEST_FIELD_OFFSET(FILEDESCRIPTORW, clsid, 4) + TEST_FIELD_SIZE (FILEDESCRIPTORW, sizel, 8) + TEST_FIELD_ALIGN (FILEDESCRIPTORW, sizel, 1) + TEST_FIELD_OFFSET(FILEDESCRIPTORW, sizel, 20) + TEST_FIELD_SIZE (FILEDESCRIPTORW, pointl, 8) + TEST_FIELD_ALIGN (FILEDESCRIPTORW, pointl, 1) + TEST_FIELD_OFFSET(FILEDESCRIPTORW, pointl, 28) + TEST_FIELD_SIZE (FILEDESCRIPTORW, dwFileAttributes, 4) + TEST_FIELD_ALIGN (FILEDESCRIPTORW, dwFileAttributes, 1) + TEST_FIELD_OFFSET(FILEDESCRIPTORW, dwFileAttributes, 36) + TEST_FIELD_SIZE (FILEDESCRIPTORW, ftCreationTime, 8) + TEST_FIELD_ALIGN (FILEDESCRIPTORW, ftCreationTime, 1) + TEST_FIELD_OFFSET(FILEDESCRIPTORW, ftCreationTime, 40) + TEST_FIELD_SIZE (FILEDESCRIPTORW, ftLastAccessTime, 8) + TEST_FIELD_ALIGN (FILEDESCRIPTORW, ftLastAccessTime, 1) + TEST_FIELD_OFFSET(FILEDESCRIPTORW, ftLastAccessTime, 48) + TEST_FIELD_SIZE (FILEDESCRIPTORW, ftLastWriteTime, 8) + TEST_FIELD_ALIGN (FILEDESCRIPTORW, ftLastWriteTime, 1) + TEST_FIELD_OFFSET(FILEDESCRIPTORW, ftLastWriteTime, 56) + TEST_FIELD_SIZE (FILEDESCRIPTORW, nFileSizeHigh, 4) + TEST_FIELD_ALIGN (FILEDESCRIPTORW, nFileSizeHigh, 1) + TEST_FIELD_OFFSET(FILEDESCRIPTORW, nFileSizeHigh, 64) + TEST_FIELD_SIZE (FILEDESCRIPTORW, nFileSizeLow, 4) + TEST_FIELD_ALIGN (FILEDESCRIPTORW, nFileSizeLow, 1) + TEST_FIELD_OFFSET(FILEDESCRIPTORW, nFileSizeLow, 68) + TEST_FIELD_SIZE (FILEDESCRIPTORW, cFileName, 520) + TEST_FIELD_ALIGN (FILEDESCRIPTORW, cFileName, 1) + TEST_FIELD_OFFSET(FILEDESCRIPTORW, cFileName, 72) } static void test_pack_FILEGROUPDESCRIPTORA(void) { /* FILEGROUPDESCRIPTORA (pack 1) */ - TEST_TYPE(FILEGROUPDESCRIPTORA, 336, 1); - TEST_FIELD(FILEGROUPDESCRIPTORA, cItems, 0, 4, 1); - TEST_FIELD(FILEGROUPDESCRIPTORA, fgd, 4, 332, 1); + TEST_TYPE_SIZE (FILEGROUPDESCRIPTORA, 336) + TEST_TYPE_ALIGN (FILEGROUPDESCRIPTORA, 1) + TEST_FIELD_SIZE (FILEGROUPDESCRIPTORA, cItems, 4) + TEST_FIELD_ALIGN (FILEGROUPDESCRIPTORA, cItems, 1) + TEST_FIELD_OFFSET(FILEGROUPDESCRIPTORA, cItems, 0) + TEST_FIELD_SIZE (FILEGROUPDESCRIPTORA, fgd, 332) + TEST_FIELD_ALIGN (FILEGROUPDESCRIPTORA, fgd, 1) + TEST_FIELD_OFFSET(FILEGROUPDESCRIPTORA, fgd, 4) } static void test_pack_FILEGROUPDESCRIPTORW(void) { /* FILEGROUPDESCRIPTORW (pack 1) */ - TEST_TYPE(FILEGROUPDESCRIPTORW, 596, 1); - TEST_FIELD(FILEGROUPDESCRIPTORW, cItems, 0, 4, 1); - TEST_FIELD(FILEGROUPDESCRIPTORW, fgd, 4, 592, 1); + TEST_TYPE_SIZE (FILEGROUPDESCRIPTORW, 596) + TEST_TYPE_ALIGN (FILEGROUPDESCRIPTORW, 1) + TEST_FIELD_SIZE (FILEGROUPDESCRIPTORW, cItems, 4) + TEST_FIELD_ALIGN (FILEGROUPDESCRIPTORW, cItems, 1) + TEST_FIELD_OFFSET(FILEGROUPDESCRIPTORW, cItems, 0) + TEST_FIELD_SIZE (FILEGROUPDESCRIPTORW, fgd, 592) + TEST_FIELD_ALIGN (FILEGROUPDESCRIPTORW, fgd, 1) + TEST_FIELD_OFFSET(FILEGROUPDESCRIPTORW, fgd, 4) } static void test_pack_LPBROWSEINFOA(void) { /* LPBROWSEINFOA */ - TEST_TYPE(LPBROWSEINFOA, 4, 4); - TEST_TYPE_POINTER(LPBROWSEINFOA, 32, 4); + TEST_TYPE_SIZE (LPBROWSEINFOA, 4) + TEST_TYPE_ALIGN (LPBROWSEINFOA, 4) + TEST_TARGET_SIZE (LPBROWSEINFOA, 32) + TEST_TARGET_ALIGN(LPBROWSEINFOA, 4) } static void test_pack_LPBROWSEINFOW(void) { /* LPBROWSEINFOW */ - TEST_TYPE(LPBROWSEINFOW, 4, 4); - TEST_TYPE_POINTER(LPBROWSEINFOW, 32, 4); + TEST_TYPE_SIZE (LPBROWSEINFOW, 4) + TEST_TYPE_ALIGN (LPBROWSEINFOW, 4) + TEST_TARGET_SIZE (LPBROWSEINFOW, 32) + TEST_TARGET_ALIGN(LPBROWSEINFOW, 4) } static void test_pack_LPCABINETSTATE(void) { /* LPCABINETSTATE */ - TEST_TYPE(LPCABINETSTATE, 4, 4); - TEST_TYPE_POINTER(LPCABINETSTATE, 12, 1); + TEST_TYPE_SIZE (LPCABINETSTATE, 4) + TEST_TYPE_ALIGN (LPCABINETSTATE, 4) + TEST_TARGET_SIZE (LPCABINETSTATE, 12) + TEST_TARGET_ALIGN(LPCABINETSTATE, 1) } static void test_pack_LPCSFV(void) { /* LPCSFV */ - TEST_TYPE(LPCSFV, 4, 4); + TEST_TYPE_SIZE (LPCSFV, 4) + TEST_TYPE_ALIGN (LPCSFV, 4) } static void test_pack_LPDROPFILES(void) { /* LPDROPFILES */ - TEST_TYPE(LPDROPFILES, 4, 4); - TEST_TYPE_POINTER(LPDROPFILES, 20, 1); + TEST_TYPE_SIZE (LPDROPFILES, 4) + TEST_TYPE_ALIGN (LPDROPFILES, 4) + TEST_TARGET_SIZE (LPDROPFILES, 20) + TEST_TARGET_ALIGN(LPDROPFILES, 1) } static void test_pack_LPFILEDESCRIPTORA(void) { /* LPFILEDESCRIPTORA */ - TEST_TYPE(LPFILEDESCRIPTORA, 4, 4); - TEST_TYPE_POINTER(LPFILEDESCRIPTORA, 332, 1); + TEST_TYPE_SIZE (LPFILEDESCRIPTORA, 4) + TEST_TYPE_ALIGN (LPFILEDESCRIPTORA, 4) + TEST_TARGET_SIZE (LPFILEDESCRIPTORA, 332) + TEST_TARGET_ALIGN(LPFILEDESCRIPTORA, 1) } static void test_pack_LPFILEDESCRIPTORW(void) { /* LPFILEDESCRIPTORW */ - TEST_TYPE(LPFILEDESCRIPTORW, 4, 4); - TEST_TYPE_POINTER(LPFILEDESCRIPTORW, 592, 1); + TEST_TYPE_SIZE (LPFILEDESCRIPTORW, 4) + TEST_TYPE_ALIGN (LPFILEDESCRIPTORW, 4) + TEST_TARGET_SIZE (LPFILEDESCRIPTORW, 592) + TEST_TARGET_ALIGN(LPFILEDESCRIPTORW, 1) } static void test_pack_LPFILEGROUPDESCRIPTORA(void) { /* LPFILEGROUPDESCRIPTORA */ - TEST_TYPE(LPFILEGROUPDESCRIPTORA, 4, 4); - TEST_TYPE_POINTER(LPFILEGROUPDESCRIPTORA, 336, 1); + TEST_TYPE_SIZE (LPFILEGROUPDESCRIPTORA, 4) + TEST_TYPE_ALIGN (LPFILEGROUPDESCRIPTORA, 4) + TEST_TARGET_SIZE (LPFILEGROUPDESCRIPTORA, 336) + TEST_TARGET_ALIGN(LPFILEGROUPDESCRIPTORA, 1) } static void test_pack_LPFILEGROUPDESCRIPTORW(void) { /* LPFILEGROUPDESCRIPTORW */ - TEST_TYPE(LPFILEGROUPDESCRIPTORW, 4, 4); - TEST_TYPE_POINTER(LPFILEGROUPDESCRIPTORW, 596, 1); + TEST_TYPE_SIZE (LPFILEGROUPDESCRIPTORW, 4) + TEST_TYPE_ALIGN (LPFILEGROUPDESCRIPTORW, 4) + TEST_TARGET_SIZE (LPFILEGROUPDESCRIPTORW, 596) + TEST_TARGET_ALIGN(LPFILEGROUPDESCRIPTORW, 1) } static void test_pack_LPFNVIEWCALLBACK(void) { /* LPFNVIEWCALLBACK */ - TEST_TYPE(LPFNVIEWCALLBACK, 4, 4); + TEST_TYPE_SIZE (LPFNVIEWCALLBACK, 4) + TEST_TYPE_ALIGN (LPFNVIEWCALLBACK, 4) } static void test_pack_LPIDA(void) { /* LPIDA */ - TEST_TYPE(LPIDA, 4, 4); - TEST_TYPE_POINTER(LPIDA, 8, 1); + TEST_TYPE_SIZE (LPIDA, 4) + TEST_TYPE_ALIGN (LPIDA, 4) + TEST_TARGET_SIZE (LPIDA, 8) + TEST_TARGET_ALIGN(LPIDA, 1) } static void test_pack_LPQCMINFO(void) { /* LPQCMINFO */ - TEST_TYPE(LPQCMINFO, 4, 4); - TEST_TYPE_POINTER(LPQCMINFO, 20, 4); + TEST_TYPE_SIZE (LPQCMINFO, 4) + TEST_TYPE_ALIGN (LPQCMINFO, 4) + TEST_TARGET_SIZE (LPQCMINFO, 20) + TEST_TARGET_ALIGN(LPQCMINFO, 4) } static void test_pack_LPSHChangeDWORDAsIDList(void) { /* LPSHChangeDWORDAsIDList */ - TEST_TYPE(LPSHChangeDWORDAsIDList, 4, 4); - TEST_TYPE_POINTER(LPSHChangeDWORDAsIDList, 12, 1); + TEST_TYPE_SIZE (LPSHChangeDWORDAsIDList, 4) + TEST_TYPE_ALIGN (LPSHChangeDWORDAsIDList, 4) + TEST_TARGET_SIZE (LPSHChangeDWORDAsIDList, 12) + TEST_TARGET_ALIGN(LPSHChangeDWORDAsIDList, 1) } static void test_pack_LPSHChangeProductKeyAsIDList(void) { /* LPSHChangeProductKeyAsIDList */ - TEST_TYPE(LPSHChangeProductKeyAsIDList, 4, 4); - TEST_TYPE_POINTER(LPSHChangeProductKeyAsIDList, 82, 1); + TEST_TYPE_SIZE (LPSHChangeProductKeyAsIDList, 4) + TEST_TYPE_ALIGN (LPSHChangeProductKeyAsIDList, 4) + TEST_TARGET_SIZE (LPSHChangeProductKeyAsIDList, 82) + TEST_TARGET_ALIGN(LPSHChangeProductKeyAsIDList, 1) } static void test_pack_LPSHDESCRIPTIONID(void) { /* LPSHDESCRIPTIONID */ - TEST_TYPE(LPSHDESCRIPTIONID, 4, 4); - TEST_TYPE_POINTER(LPSHDESCRIPTIONID, 20, 4); + TEST_TYPE_SIZE (LPSHDESCRIPTIONID, 4) + TEST_TYPE_ALIGN (LPSHDESCRIPTIONID, 4) + TEST_TARGET_SIZE (LPSHDESCRIPTIONID, 20) + TEST_TARGET_ALIGN(LPSHDESCRIPTIONID, 4) } static void test_pack_LPSHELLFLAGSTATE(void) { /* LPSHELLFLAGSTATE */ - TEST_TYPE(LPSHELLFLAGSTATE, 4, 4); - TEST_TYPE_POINTER(LPSHELLFLAGSTATE, 4, 1); + TEST_TYPE_SIZE (LPSHELLFLAGSTATE, 4) + TEST_TYPE_ALIGN (LPSHELLFLAGSTATE, 4) + TEST_TARGET_SIZE (LPSHELLFLAGSTATE, 4) + TEST_TARGET_ALIGN(LPSHELLFLAGSTATE, 1) } static void test_pack_LPSHELLSTATE(void) { /* LPSHELLSTATE */ - TEST_TYPE(LPSHELLSTATE, 4, 4); - TEST_TYPE_POINTER(LPSHELLSTATE, 32, 1); + TEST_TYPE_SIZE (LPSHELLSTATE, 4) + TEST_TYPE_ALIGN (LPSHELLSTATE, 4) + TEST_TARGET_SIZE (LPSHELLSTATE, 32) + TEST_TARGET_ALIGN(LPSHELLSTATE, 1) } static void test_pack_LPTBINFO(void) { /* LPTBINFO */ - TEST_TYPE(LPTBINFO, 4, 4); - TEST_TYPE_POINTER(LPTBINFO, 8, 4); + TEST_TYPE_SIZE (LPTBINFO, 4) + TEST_TYPE_ALIGN (LPTBINFO, 4) + TEST_TARGET_SIZE (LPTBINFO, 8) + TEST_TARGET_ALIGN(LPTBINFO, 4) } static void test_pack_PBROWSEINFOA(void) { /* PBROWSEINFOA */ - TEST_TYPE(PBROWSEINFOA, 4, 4); - TEST_TYPE_POINTER(PBROWSEINFOA, 32, 4); + TEST_TYPE_SIZE (PBROWSEINFOA, 4) + TEST_TYPE_ALIGN (PBROWSEINFOA, 4) + TEST_TARGET_SIZE (PBROWSEINFOA, 32) + TEST_TARGET_ALIGN(PBROWSEINFOA, 4) } static void test_pack_PBROWSEINFOW(void) { /* PBROWSEINFOW */ - TEST_TYPE(PBROWSEINFOW, 4, 4); - TEST_TYPE_POINTER(PBROWSEINFOW, 32, 4); + TEST_TYPE_SIZE (PBROWSEINFOW, 4) + TEST_TYPE_ALIGN (PBROWSEINFOW, 4) + TEST_TARGET_SIZE (PBROWSEINFOW, 32) + TEST_TARGET_ALIGN(PBROWSEINFOW, 4) } static void test_pack_QCMINFO(void) { /* QCMINFO (pack 8) */ - TEST_TYPE(QCMINFO, 20, 4); - TEST_FIELD(QCMINFO, hmenu, 0, 4, 4); - TEST_FIELD(QCMINFO, indexMenu, 4, 4, 4); - TEST_FIELD(QCMINFO, idCmdFirst, 8, 4, 4); - TEST_FIELD(QCMINFO, idCmdLast, 12, 4, 4); - TEST_FIELD(QCMINFO, pIdMap, 16, 4, 4); + TEST_TYPE_SIZE (QCMINFO, 20) + TEST_TYPE_ALIGN (QCMINFO, 4) + TEST_FIELD_SIZE (QCMINFO, hmenu, 4) + TEST_FIELD_ALIGN (QCMINFO, hmenu, 4) + TEST_FIELD_OFFSET(QCMINFO, hmenu, 0) + TEST_FIELD_SIZE (QCMINFO, indexMenu, 4) + TEST_FIELD_ALIGN (QCMINFO, indexMenu, 4) + TEST_FIELD_OFFSET(QCMINFO, indexMenu, 4) + TEST_FIELD_SIZE (QCMINFO, idCmdFirst, 4) + TEST_FIELD_ALIGN (QCMINFO, idCmdFirst, 4) + TEST_FIELD_OFFSET(QCMINFO, idCmdFirst, 8) + TEST_FIELD_SIZE (QCMINFO, idCmdLast, 4) + TEST_FIELD_ALIGN (QCMINFO, idCmdLast, 4) + TEST_FIELD_OFFSET(QCMINFO, idCmdLast, 12) + TEST_FIELD_SIZE (QCMINFO, pIdMap, 4) + TEST_FIELD_ALIGN (QCMINFO, pIdMap, 4) + TEST_FIELD_OFFSET(QCMINFO, pIdMap, 16) } static void test_pack_QCMINFO_IDMAP(void) { /* QCMINFO_IDMAP (pack 8) */ - TEST_TYPE(QCMINFO_IDMAP, 12, 4); - TEST_FIELD(QCMINFO_IDMAP, nMaxIds, 0, 4, 4); - TEST_FIELD(QCMINFO_IDMAP, pIdList, 4, 8, 4); + TEST_TYPE_SIZE (QCMINFO_IDMAP, 12) + TEST_TYPE_ALIGN (QCMINFO_IDMAP, 4) + TEST_FIELD_SIZE (QCMINFO_IDMAP, nMaxIds, 4) + TEST_FIELD_ALIGN (QCMINFO_IDMAP, nMaxIds, 4) + TEST_FIELD_OFFSET(QCMINFO_IDMAP, nMaxIds, 0) + TEST_FIELD_SIZE (QCMINFO_IDMAP, pIdList, 8) + TEST_FIELD_ALIGN (QCMINFO_IDMAP, pIdList, 4) + TEST_FIELD_OFFSET(QCMINFO_IDMAP, pIdList, 4) } static void test_pack_QCMINFO_IDMAP_PLACEMENT(void) { /* QCMINFO_IDMAP_PLACEMENT (pack 8) */ - TEST_TYPE(QCMINFO_IDMAP_PLACEMENT, 8, 4); - TEST_FIELD(QCMINFO_IDMAP_PLACEMENT, id, 0, 4, 4); - TEST_FIELD(QCMINFO_IDMAP_PLACEMENT, fFlags, 4, 4, 4); + TEST_TYPE_SIZE (QCMINFO_IDMAP_PLACEMENT, 8) + TEST_TYPE_ALIGN (QCMINFO_IDMAP_PLACEMENT, 4) + TEST_FIELD_SIZE (QCMINFO_IDMAP_PLACEMENT, id, 4) + TEST_FIELD_ALIGN (QCMINFO_IDMAP_PLACEMENT, id, 4) + TEST_FIELD_OFFSET(QCMINFO_IDMAP_PLACEMENT, id, 0) + TEST_FIELD_SIZE (QCMINFO_IDMAP_PLACEMENT, fFlags, 4) + TEST_FIELD_ALIGN (QCMINFO_IDMAP_PLACEMENT, fFlags, 4) + TEST_FIELD_OFFSET(QCMINFO_IDMAP_PLACEMENT, fFlags, 4) } static void test_pack_SHChangeDWORDAsIDList(void) { /* SHChangeDWORDAsIDList (pack 1) */ - TEST_TYPE(SHChangeDWORDAsIDList, 12, 1); - TEST_FIELD(SHChangeDWORDAsIDList, cb, 0, 2, 1); - TEST_FIELD(SHChangeDWORDAsIDList, dwItem1, 2, 4, 1); - TEST_FIELD(SHChangeDWORDAsIDList, dwItem2, 6, 4, 1); - TEST_FIELD(SHChangeDWORDAsIDList, cbZero, 10, 2, 1); + TEST_TYPE_SIZE (SHChangeDWORDAsIDList, 12) + TEST_TYPE_ALIGN (SHChangeDWORDAsIDList, 1) + TEST_FIELD_SIZE (SHChangeDWORDAsIDList, cb, 2) + TEST_FIELD_ALIGN (SHChangeDWORDAsIDList, cb, 1) + TEST_FIELD_OFFSET(SHChangeDWORDAsIDList, cb, 0) + TEST_FIELD_SIZE (SHChangeDWORDAsIDList, dwItem1, 4) + TEST_FIELD_ALIGN (SHChangeDWORDAsIDList, dwItem1, 1) + TEST_FIELD_OFFSET(SHChangeDWORDAsIDList, dwItem1, 2) + TEST_FIELD_SIZE (SHChangeDWORDAsIDList, dwItem2, 4) + TEST_FIELD_ALIGN (SHChangeDWORDAsIDList, dwItem2, 1) + TEST_FIELD_OFFSET(SHChangeDWORDAsIDList, dwItem2, 6) + TEST_FIELD_SIZE (SHChangeDWORDAsIDList, cbZero, 2) + TEST_FIELD_ALIGN (SHChangeDWORDAsIDList, cbZero, 1) + TEST_FIELD_OFFSET(SHChangeDWORDAsIDList, cbZero, 10) } static void test_pack_SHChangeNotifyEntry(void) { /* SHChangeNotifyEntry (pack 1) */ - TEST_TYPE(SHChangeNotifyEntry, 8, 1); - TEST_FIELD(SHChangeNotifyEntry, pidl, 0, 4, 1); - TEST_FIELD(SHChangeNotifyEntry, fRecursive, 4, 4, 1); + TEST_TYPE_SIZE (SHChangeNotifyEntry, 8) + TEST_TYPE_ALIGN (SHChangeNotifyEntry, 1) + TEST_FIELD_SIZE (SHChangeNotifyEntry, pidl, 4) + TEST_FIELD_ALIGN (SHChangeNotifyEntry, pidl, 1) + TEST_FIELD_OFFSET(SHChangeNotifyEntry, pidl, 0) + TEST_FIELD_SIZE (SHChangeNotifyEntry, fRecursive, 4) + TEST_FIELD_ALIGN (SHChangeNotifyEntry, fRecursive, 1) + TEST_FIELD_OFFSET(SHChangeNotifyEntry, fRecursive, 4) } static void test_pack_SHChangeProductKeyAsIDList(void) { /* SHChangeProductKeyAsIDList (pack 1) */ - TEST_TYPE(SHChangeProductKeyAsIDList, 82, 1); - TEST_FIELD(SHChangeProductKeyAsIDList, cb, 0, 2, 1); - TEST_FIELD(SHChangeProductKeyAsIDList, wszProductKey, 2, 78, 1); - TEST_FIELD(SHChangeProductKeyAsIDList, cbZero, 80, 2, 1); + TEST_TYPE_SIZE (SHChangeProductKeyAsIDList, 82) + TEST_TYPE_ALIGN (SHChangeProductKeyAsIDList, 1) + TEST_FIELD_SIZE (SHChangeProductKeyAsIDList, cb, 2) + TEST_FIELD_ALIGN (SHChangeProductKeyAsIDList, cb, 1) + TEST_FIELD_OFFSET(SHChangeProductKeyAsIDList, cb, 0) + TEST_FIELD_SIZE (SHChangeProductKeyAsIDList, wszProductKey, 78) + TEST_FIELD_ALIGN (SHChangeProductKeyAsIDList, wszProductKey, 1) + TEST_FIELD_OFFSET(SHChangeProductKeyAsIDList, wszProductKey, 2) + TEST_FIELD_SIZE (SHChangeProductKeyAsIDList, cbZero, 2) + TEST_FIELD_ALIGN (SHChangeProductKeyAsIDList, cbZero, 1) + TEST_FIELD_OFFSET(SHChangeProductKeyAsIDList, cbZero, 80) } static void test_pack_SHDESCRIPTIONID(void) { /* SHDESCRIPTIONID (pack 8) */ - TEST_TYPE(SHDESCRIPTIONID, 20, 4); - TEST_FIELD(SHDESCRIPTIONID, dwDescriptionId, 0, 4, 4); - TEST_FIELD(SHDESCRIPTIONID, clsid, 4, 16, 4); + TEST_TYPE_SIZE (SHDESCRIPTIONID, 20) + TEST_TYPE_ALIGN (SHDESCRIPTIONID, 4) + TEST_FIELD_SIZE (SHDESCRIPTIONID, dwDescriptionId, 4) + TEST_FIELD_ALIGN (SHDESCRIPTIONID, dwDescriptionId, 4) + TEST_FIELD_OFFSET(SHDESCRIPTIONID, dwDescriptionId, 0) + TEST_FIELD_SIZE (SHDESCRIPTIONID, clsid, 16) + TEST_FIELD_ALIGN (SHDESCRIPTIONID, clsid, 4) + TEST_FIELD_OFFSET(SHDESCRIPTIONID, clsid, 4) } static void test_pack_SHELLFLAGSTATE(void) { /* SHELLFLAGSTATE (pack 1) */ - TEST_TYPE(SHELLFLAGSTATE, 4, 1); + TEST_TYPE_SIZE (SHELLFLAGSTATE, 4) + TEST_TYPE_ALIGN (SHELLFLAGSTATE, 1) } static void test_pack_SHELLSTATE(void) { /* SHELLSTATE (pack 1) */ - TEST_TYPE(SHELLSTATE, 32, 1); - TEST_FIELD(SHELLSTATE, dwWin95Unused, 4, 4, 1); - TEST_FIELD(SHELLSTATE, uWin95Unused, 8, 4, 1); - TEST_FIELD(SHELLSTATE, lParamSort, 12, 4, 1); - TEST_FIELD(SHELLSTATE, iSortDirection, 16, 4, 1); - TEST_FIELD(SHELLSTATE, version, 20, 4, 1); - TEST_FIELD(SHELLSTATE, uNotUsed, 24, 4, 1); + TEST_TYPE_SIZE (SHELLSTATE, 32) + TEST_TYPE_ALIGN (SHELLSTATE, 1) + TEST_FIELD_SIZE (SHELLSTATE, dwWin95Unused, 4) + TEST_FIELD_ALIGN (SHELLSTATE, dwWin95Unused, 1) + TEST_FIELD_OFFSET(SHELLSTATE, dwWin95Unused, 4) + TEST_FIELD_SIZE (SHELLSTATE, uWin95Unused, 4) + TEST_FIELD_ALIGN (SHELLSTATE, uWin95Unused, 1) + TEST_FIELD_OFFSET(SHELLSTATE, uWin95Unused, 8) + TEST_FIELD_SIZE (SHELLSTATE, lParamSort, 4) + TEST_FIELD_ALIGN (SHELLSTATE, lParamSort, 1) + TEST_FIELD_OFFSET(SHELLSTATE, lParamSort, 12) + TEST_FIELD_SIZE (SHELLSTATE, iSortDirection, 4) + TEST_FIELD_ALIGN (SHELLSTATE, iSortDirection, 1) + TEST_FIELD_OFFSET(SHELLSTATE, iSortDirection, 16) + TEST_FIELD_SIZE (SHELLSTATE, version, 4) + TEST_FIELD_ALIGN (SHELLSTATE, version, 1) + TEST_FIELD_OFFSET(SHELLSTATE, version, 20) + TEST_FIELD_SIZE (SHELLSTATE, uNotUsed, 4) + TEST_FIELD_ALIGN (SHELLSTATE, uNotUsed, 1) + TEST_FIELD_OFFSET(SHELLSTATE, uNotUsed, 24) } static void test_pack_TBINFO(void) { /* TBINFO (pack 8) */ - TEST_TYPE(TBINFO, 8, 4); - TEST_FIELD(TBINFO, cbuttons, 0, 4, 4); - TEST_FIELD(TBINFO, uFlags, 4, 4, 4); + TEST_TYPE_SIZE (TBINFO, 8) + TEST_TYPE_ALIGN (TBINFO, 4) + TEST_FIELD_SIZE (TBINFO, cbuttons, 4) + TEST_FIELD_ALIGN (TBINFO, cbuttons, 4) + TEST_FIELD_OFFSET(TBINFO, cbuttons, 0) + TEST_FIELD_SIZE (TBINFO, uFlags, 4) + TEST_FIELD_ALIGN (TBINFO, uFlags, 4) + TEST_FIELD_OFFSET(TBINFO, uFlags, 4) } static void test_pack(void) diff --git a/dlls/shlwapi/tests/generated.c b/dlls/shlwapi/tests/generated.c index e6581ae124c..1ebf96d9227 100644 --- a/dlls/shlwapi/tests/generated.c +++ b/dlls/shlwapi/tests/generated.c @@ -56,104 +56,109 @@ * Test helper macros */ -#ifdef FIELD_ALIGNMENT -# define TEST_FIELD_ALIGNMENT(type, field, align) \ - ok(_TYPE_ALIGNMENT(((type*)0)->field) == align, \ - "FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \ - (int)_TYPE_ALIGNMENT(((type*)0)->field)) +#ifdef _WIN64 + +# define TEST_TYPE_SIZE(type, size) +# define TEST_TYPE_ALIGN(type, align) +# define TEST_TARGET_ALIGN(type, align) +# define TEST_FIELD_ALIGN(type, field, align) +# define TEST_FIELD_OFFSET(type, field, offset) + #else -# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0) + +# define TEST_TYPE_SIZE(type, size) C_ASSERT(sizeof(type) == size); + +# ifdef TYPE_ALIGNMENT +# define TEST_TYPE_ALIGN(type, align) C_ASSERT(TYPE_ALIGNMENT(type) == align); +# else +# define TEST_TYPE_ALIGN(type, align) +# endif + +# ifdef _TYPE_ALIGNMENT +# 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); +# else +# define TEST_TARGET_ALIGN(type, align) +# define TEST_FIELD_ALIGN(type, field, align) +# endif + +# define TEST_FIELD_OFFSET(type, field, offset) C_ASSERT(FIELD_OFFSET(type, field) == offset); + #endif -#define TEST_FIELD_OFFSET(type, field, offset) \ - ok(FIELD_OFFSET(type, field) == offset, \ - "FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")\n", \ - (long int)FIELD_OFFSET(type, field)) +#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); -#ifdef _TYPE_ALIGNMENT -#define TEST__TYPE_ALIGNMENT(type, align) \ - ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)_TYPE_ALIGNMENT(type)) -#else -# define TEST__TYPE_ALIGNMENT(type, align) do { } while (0) -#endif - -#ifdef TYPE_ALIGNMENT -#define TEST_TYPE_ALIGNMENT(type, align) \ - ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)TYPE_ALIGNMENT(type)) -#else -# define TEST_TYPE_ALIGNMENT(type, align) do { } while (0) -#endif - -#define TEST_TYPE_SIZE(type, size) \ - ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", ((int) sizeof(type))) - -/*********************************************************************** - * Test macros - */ - -#define TEST_FIELD(type, field, field_offset, field_size, field_align) \ - TEST_TYPE_SIZE((((type*)0)->field), field_size); \ - TEST_FIELD_ALIGNMENT(type, field, field_align); \ - TEST_FIELD_OFFSET(type, field, 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_ASSOCF(void) { /* ASSOCF */ - TEST_TYPE(ASSOCF, 4, 4); - TEST_TYPE_UNSIGNED(ASSOCF); + TEST_TYPE_SIZE (ASSOCF, 4) + TEST_TYPE_ALIGN (ASSOCF, 4) + TEST_TYPE_UNSIGNED(ASSOCF) } static void test_pack_DLLGETVERSIONPROC(void) { /* DLLGETVERSIONPROC */ - TEST_TYPE(DLLGETVERSIONPROC, 4, 4); + TEST_TYPE_SIZE (DLLGETVERSIONPROC, 4) + TEST_TYPE_ALIGN (DLLGETVERSIONPROC, 4) } static void test_pack_DLLVERSIONINFO(void) { /* DLLVERSIONINFO (pack 8) */ - TEST_TYPE(DLLVERSIONINFO, 20, 4); - TEST_FIELD(DLLVERSIONINFO, cbSize, 0, 4, 4); - TEST_FIELD(DLLVERSIONINFO, dwMajorVersion, 4, 4, 4); - TEST_FIELD(DLLVERSIONINFO, dwMinorVersion, 8, 4, 4); - TEST_FIELD(DLLVERSIONINFO, dwBuildNumber, 12, 4, 4); - TEST_FIELD(DLLVERSIONINFO, dwPlatformID, 16, 4, 4); + TEST_TYPE_SIZE (DLLVERSIONINFO, 20) + TEST_TYPE_ALIGN (DLLVERSIONINFO, 4) + TEST_FIELD_SIZE (DLLVERSIONINFO, cbSize, 4) + TEST_FIELD_ALIGN (DLLVERSIONINFO, cbSize, 4) + TEST_FIELD_OFFSET(DLLVERSIONINFO, cbSize, 0) + TEST_FIELD_SIZE (DLLVERSIONINFO, dwMajorVersion, 4) + TEST_FIELD_ALIGN (DLLVERSIONINFO, dwMajorVersion, 4) + TEST_FIELD_OFFSET(DLLVERSIONINFO, dwMajorVersion, 4) + TEST_FIELD_SIZE (DLLVERSIONINFO, dwMinorVersion, 4) + TEST_FIELD_ALIGN (DLLVERSIONINFO, dwMinorVersion, 4) + TEST_FIELD_OFFSET(DLLVERSIONINFO, dwMinorVersion, 8) + TEST_FIELD_SIZE (DLLVERSIONINFO, dwBuildNumber, 4) + TEST_FIELD_ALIGN (DLLVERSIONINFO, dwBuildNumber, 4) + TEST_FIELD_OFFSET(DLLVERSIONINFO, dwBuildNumber, 12) + TEST_FIELD_SIZE (DLLVERSIONINFO, dwPlatformID, 4) + TEST_FIELD_ALIGN (DLLVERSIONINFO, dwPlatformID, 4) + TEST_FIELD_OFFSET(DLLVERSIONINFO, dwPlatformID, 16) } static void test_pack_DLLVERSIONINFO2(void) { /* DLLVERSIONINFO2 (pack 8) */ - TEST_TYPE(DLLVERSIONINFO2, 32, 8); - TEST_FIELD(DLLVERSIONINFO2, info1, 0, 20, 4); - TEST_FIELD(DLLVERSIONINFO2, dwFlags, 20, 4, 4); - TEST_FIELD(DLLVERSIONINFO2, ullVersion, 24, 8, 8); + TEST_TYPE_SIZE (DLLVERSIONINFO2, 32) + TEST_TYPE_ALIGN (DLLVERSIONINFO2, 8) + TEST_FIELD_SIZE (DLLVERSIONINFO2, info1, 20) + TEST_FIELD_ALIGN (DLLVERSIONINFO2, info1, 4) + TEST_FIELD_OFFSET(DLLVERSIONINFO2, info1, 0) + TEST_FIELD_SIZE (DLLVERSIONINFO2, dwFlags, 4) + TEST_FIELD_ALIGN (DLLVERSIONINFO2, dwFlags, 4) + TEST_FIELD_OFFSET(DLLVERSIONINFO2, dwFlags, 20) + TEST_FIELD_SIZE (DLLVERSIONINFO2, ullVersion, 8) + TEST_FIELD_ALIGN (DLLVERSIONINFO2, ullVersion, 8) + TEST_FIELD_OFFSET(DLLVERSIONINFO2, ullVersion, 24) } static void test_pack_HUSKEY(void) { /* HUSKEY */ - TEST_TYPE(HUSKEY, 4, 4); + TEST_TYPE_SIZE (HUSKEY, 4) + TEST_TYPE_ALIGN (HUSKEY, 4) } static void test_pack_PHUSKEY(void) { /* PHUSKEY */ - TEST_TYPE(PHUSKEY, 4, 4); - TEST_TYPE_POINTER(PHUSKEY, 4, 4); + TEST_TYPE_SIZE (PHUSKEY, 4) + TEST_TYPE_ALIGN (PHUSKEY, 4) + TEST_TARGET_SIZE (PHUSKEY, 4) + TEST_TARGET_ALIGN(PHUSKEY, 4) } static void test_pack(void) diff --git a/dlls/urlmon/tests/generated.c b/dlls/urlmon/tests/generated.c index add2035bf0d..293081c77c2 100644 --- a/dlls/urlmon/tests/generated.c +++ b/dlls/urlmon/tests/generated.c @@ -54,65 +54,51 @@ * Test helper macros */ -#ifdef FIELD_ALIGNMENT -# define TEST_FIELD_ALIGNMENT(type, field, align) \ - ok(_TYPE_ALIGNMENT(((type*)0)->field) == align, \ - "FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \ - (int)_TYPE_ALIGNMENT(((type*)0)->field)) +#ifdef _WIN64 + +# define TEST_TYPE_SIZE(type, size) +# define TEST_TYPE_ALIGN(type, align) +# define TEST_TARGET_ALIGN(type, align) +# define TEST_FIELD_ALIGN(type, field, align) +# define TEST_FIELD_OFFSET(type, field, offset) + #else -# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0) + +# define TEST_TYPE_SIZE(type, size) C_ASSERT(sizeof(type) == size); + +# ifdef TYPE_ALIGNMENT +# define TEST_TYPE_ALIGN(type, align) C_ASSERT(TYPE_ALIGNMENT(type) == align); +# else +# define TEST_TYPE_ALIGN(type, align) +# endif + +# ifdef _TYPE_ALIGNMENT +# 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); +# else +# define TEST_TARGET_ALIGN(type, align) +# define TEST_FIELD_ALIGN(type, field, align) +# endif + +# define TEST_FIELD_OFFSET(type, field, offset) C_ASSERT(FIELD_OFFSET(type, field) == offset); + #endif -#define TEST_FIELD_OFFSET(type, field, offset) \ - ok(FIELD_OFFSET(type, field) == offset, \ - "FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")\n", \ - (long int)FIELD_OFFSET(type, field)) +#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); -#ifdef _TYPE_ALIGNMENT -#define TEST__TYPE_ALIGNMENT(type, align) \ - ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)_TYPE_ALIGNMENT(type)) -#else -# define TEST__TYPE_ALIGNMENT(type, align) do { } while (0) -#endif - -#ifdef TYPE_ALIGNMENT -#define TEST_TYPE_ALIGNMENT(type, align) \ - ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)TYPE_ALIGNMENT(type)) -#else -# define TEST_TYPE_ALIGNMENT(type, align) do { } while (0) -#endif - -#define TEST_TYPE_SIZE(type, size) \ - ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", ((int) sizeof(type))) - -/*********************************************************************** - * Test macros - */ - -#define TEST_FIELD(type, field, field_offset, field_size, field_align) \ - TEST_TYPE_SIZE((((type*)0)->field), field_size); \ - TEST_FIELD_ALIGNMENT(type, field, field_align); \ - TEST_FIELD_OFFSET(type, field, 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_BINDINFO(void) { /* BINDINFO (pack 4) */ - TEST_FIELD(BINDINFO, cbSize, 0, 4, 4); - TEST_FIELD(BINDINFO, szExtraInfo, 4, 4, 4); + 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) } static void test_pack_IBindHost(void) @@ -198,106 +184,162 @@ static void test_pack_IWinInetInfoVtbl(void) static void test_pack_LPBINDHOST(void) { /* LPBINDHOST */ - TEST_TYPE(LPBINDHOST, 4, 4); + TEST_TYPE_SIZE (LPBINDHOST, 4) + TEST_TYPE_ALIGN (LPBINDHOST, 4) } static void test_pack_LPBINDING(void) { /* LPBINDING */ - TEST_TYPE(LPBINDING, 4, 4); + TEST_TYPE_SIZE (LPBINDING, 4) + TEST_TYPE_ALIGN (LPBINDING, 4) } static void test_pack_LPBINDSTATUSCALLBACK(void) { /* LPBINDSTATUSCALLBACK */ - TEST_TYPE(LPBINDSTATUSCALLBACK, 4, 4); + TEST_TYPE_SIZE (LPBINDSTATUSCALLBACK, 4) + TEST_TYPE_ALIGN (LPBINDSTATUSCALLBACK, 4) } static void test_pack_LPIINTERNETPROTOCOLINFO(void) { /* LPIINTERNETPROTOCOLINFO */ - TEST_TYPE(LPIINTERNETPROTOCOLINFO, 4, 4); + TEST_TYPE_SIZE (LPIINTERNETPROTOCOLINFO, 4) + TEST_TYPE_ALIGN (LPIINTERNETPROTOCOLINFO, 4) } static void test_pack_LPIINTERNETSESSION(void) { /* LPIINTERNETSESSION */ - TEST_TYPE(LPIINTERNETSESSION, 4, 4); + TEST_TYPE_SIZE (LPIINTERNETSESSION, 4) + TEST_TYPE_ALIGN (LPIINTERNETSESSION, 4) } static void test_pack_LPPERSISTMONIKER(void) { /* LPPERSISTMONIKER */ - TEST_TYPE(LPPERSISTMONIKER, 4, 4); + TEST_TYPE_SIZE (LPPERSISTMONIKER, 4) + TEST_TYPE_ALIGN (LPPERSISTMONIKER, 4) } static void test_pack_LPREMFORMATETC(void) { /* LPREMFORMATETC */ - TEST_TYPE(LPREMFORMATETC, 4, 4); + TEST_TYPE_SIZE (LPREMFORMATETC, 4) + TEST_TYPE_ALIGN (LPREMFORMATETC, 4) } static void test_pack_LPREMSECURITY_ATTRIBUTES(void) { /* LPREMSECURITY_ATTRIBUTES */ - TEST_TYPE(LPREMSECURITY_ATTRIBUTES, 4, 4); + TEST_TYPE_SIZE (LPREMSECURITY_ATTRIBUTES, 4) + TEST_TYPE_ALIGN (LPREMSECURITY_ATTRIBUTES, 4) } static void test_pack_LPWININETHTTPINFO(void) { /* LPWININETHTTPINFO */ - TEST_TYPE(LPWININETHTTPINFO, 4, 4); + TEST_TYPE_SIZE (LPWININETHTTPINFO, 4) + TEST_TYPE_ALIGN (LPWININETHTTPINFO, 4) } static void test_pack_LPWININETINFO(void) { /* LPWININETINFO */ - TEST_TYPE(LPWININETINFO, 4, 4); + TEST_TYPE_SIZE (LPWININETINFO, 4) + TEST_TYPE_ALIGN (LPWININETINFO, 4) } static void test_pack_PREMSECURITY_ATTRIBUTES(void) { /* PREMSECURITY_ATTRIBUTES */ - TEST_TYPE(PREMSECURITY_ATTRIBUTES, 4, 4); + TEST_TYPE_SIZE (PREMSECURITY_ATTRIBUTES, 4) + TEST_TYPE_ALIGN (PREMSECURITY_ATTRIBUTES, 4) } static void test_pack_REMSECURITY_ATTRIBUTES(void) { /* REMSECURITY_ATTRIBUTES (pack 4) */ - TEST_TYPE(REMSECURITY_ATTRIBUTES, 12, 4); - TEST_FIELD(REMSECURITY_ATTRIBUTES, nLength, 0, 4, 4); - TEST_FIELD(REMSECURITY_ATTRIBUTES, lpSecurityDescriptor, 4, 4, 4); - TEST_FIELD(REMSECURITY_ATTRIBUTES, bInheritHandle, 8, 4, 4); + 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 (pack 4) */ - TEST_TYPE(RemBINDINFO, 72, 4); - TEST_FIELD(RemBINDINFO, cbSize, 0, 4, 4); - TEST_FIELD(RemBINDINFO, szExtraInfo, 4, 4, 4); - TEST_FIELD(RemBINDINFO, grfBindInfoF, 8, 4, 4); - TEST_FIELD(RemBINDINFO, dwBindVerb, 12, 4, 4); - TEST_FIELD(RemBINDINFO, szCustomVerb, 16, 4, 4); - TEST_FIELD(RemBINDINFO, cbstgmedData, 20, 4, 4); - TEST_FIELD(RemBINDINFO, dwOptions, 24, 4, 4); - TEST_FIELD(RemBINDINFO, dwOptionsFlags, 28, 4, 4); - TEST_FIELD(RemBINDINFO, dwCodePage, 32, 4, 4); - TEST_FIELD(RemBINDINFO, securityAttributes, 36, 12, 4); - TEST_FIELD(RemBINDINFO, iid, 48, 16, 4); - TEST_FIELD(RemBINDINFO, pUnk, 64, 4, 4); - TEST_FIELD(RemBINDINFO, dwReserved, 68, 4, 4); + 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) } static void test_pack_RemFORMATETC(void) { /* RemFORMATETC (pack 4) */ - TEST_TYPE(RemFORMATETC, 20, 4); - TEST_FIELD(RemFORMATETC, cfFormat, 0, 4, 4); - TEST_FIELD(RemFORMATETC, ptd, 4, 4, 4); - TEST_FIELD(RemFORMATETC, dwAspect, 8, 4, 4); - TEST_FIELD(RemFORMATETC, lindex, 12, 4, 4); - TEST_FIELD(RemFORMATETC, tymed, 16, 4, 4); + 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) } static void test_pack(void) diff --git a/dlls/user32/tests/generated.c b/dlls/user32/tests/generated.c index a38771e9719..282e84d71ff 100644 --- a/dlls/user32/tests/generated.c +++ b/dlls/user32/tests/generated.c @@ -51,2170 +51,3536 @@ * Test helper macros */ -#ifdef FIELD_ALIGNMENT -# define TEST_FIELD_ALIGNMENT(type, field, align) \ - ok(_TYPE_ALIGNMENT(((type*)0)->field) == align, \ - "FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \ - (int)_TYPE_ALIGNMENT(((type*)0)->field)) +#ifdef _WIN64 + +# define TEST_TYPE_SIZE(type, size) +# define TEST_TYPE_ALIGN(type, align) +# define TEST_TARGET_ALIGN(type, align) +# define TEST_FIELD_ALIGN(type, field, align) +# define TEST_FIELD_OFFSET(type, field, offset) + #else -# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0) + +# define TEST_TYPE_SIZE(type, size) C_ASSERT(sizeof(type) == size); + +# ifdef TYPE_ALIGNMENT +# define TEST_TYPE_ALIGN(type, align) C_ASSERT(TYPE_ALIGNMENT(type) == align); +# else +# define TEST_TYPE_ALIGN(type, align) +# endif + +# ifdef _TYPE_ALIGNMENT +# 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); +# else +# define TEST_TARGET_ALIGN(type, align) +# define TEST_FIELD_ALIGN(type, field, align) +# endif + +# define TEST_FIELD_OFFSET(type, field, offset) C_ASSERT(FIELD_OFFSET(type, field) == offset); + #endif -#define TEST_FIELD_OFFSET(type, field, offset) \ - ok(FIELD_OFFSET(type, field) == offset, \ - "FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")\n", \ - (long int)FIELD_OFFSET(type, field)) +#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); -#ifdef _TYPE_ALIGNMENT -#define TEST__TYPE_ALIGNMENT(type, align) \ - ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)_TYPE_ALIGNMENT(type)) -#else -# define TEST__TYPE_ALIGNMENT(type, align) do { } while (0) -#endif - -#ifdef TYPE_ALIGNMENT -#define TEST_TYPE_ALIGNMENT(type, align) \ - ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)TYPE_ALIGNMENT(type)) -#else -# define TEST_TYPE_ALIGNMENT(type, align) do { } while (0) -#endif - -#define TEST_TYPE_SIZE(type, size) \ - ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", ((int) sizeof(type))) - -/*********************************************************************** - * Test macros - */ - -#define TEST_FIELD(type, field, field_offset, field_size, field_align) \ - TEST_TYPE_SIZE((((type*)0)->field), field_size); \ - TEST_FIELD_ALIGNMENT(type, field, field_align); \ - TEST_FIELD_OFFSET(type, field, 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_ACCESSTIMEOUT(void) { /* ACCESSTIMEOUT (pack 4) */ - TEST_TYPE(ACCESSTIMEOUT, 12, 4); - TEST_FIELD(ACCESSTIMEOUT, cbSize, 0, 4, 4); - TEST_FIELD(ACCESSTIMEOUT, dwFlags, 4, 4, 4); - TEST_FIELD(ACCESSTIMEOUT, iTimeOutMSec, 8, 4, 4); + TEST_TYPE_SIZE (ACCESSTIMEOUT, 12) + TEST_TYPE_ALIGN (ACCESSTIMEOUT, 4) + TEST_FIELD_SIZE (ACCESSTIMEOUT, cbSize, 4) + TEST_FIELD_ALIGN (ACCESSTIMEOUT, cbSize, 4) + TEST_FIELD_OFFSET(ACCESSTIMEOUT, cbSize, 0) + TEST_FIELD_SIZE (ACCESSTIMEOUT, dwFlags, 4) + TEST_FIELD_ALIGN (ACCESSTIMEOUT, dwFlags, 4) + TEST_FIELD_OFFSET(ACCESSTIMEOUT, dwFlags, 4) + TEST_FIELD_SIZE (ACCESSTIMEOUT, iTimeOutMSec, 4) + TEST_FIELD_ALIGN (ACCESSTIMEOUT, iTimeOutMSec, 4) + TEST_FIELD_OFFSET(ACCESSTIMEOUT, iTimeOutMSec, 8) } static void test_pack_ANIMATIONINFO(void) { /* ANIMATIONINFO (pack 4) */ - TEST_TYPE(ANIMATIONINFO, 8, 4); - TEST_FIELD(ANIMATIONINFO, cbSize, 0, 4, 4); - TEST_FIELD(ANIMATIONINFO, iMinAnimate, 4, 4, 4); + TEST_TYPE_SIZE (ANIMATIONINFO, 8) + TEST_TYPE_ALIGN (ANIMATIONINFO, 4) + TEST_FIELD_SIZE (ANIMATIONINFO, cbSize, 4) + TEST_FIELD_ALIGN (ANIMATIONINFO, cbSize, 4) + TEST_FIELD_OFFSET(ANIMATIONINFO, cbSize, 0) + TEST_FIELD_SIZE (ANIMATIONINFO, iMinAnimate, 4) + TEST_FIELD_ALIGN (ANIMATIONINFO, iMinAnimate, 4) + TEST_FIELD_OFFSET(ANIMATIONINFO, iMinAnimate, 4) } static void test_pack_CBTACTIVATESTRUCT(void) { /* CBTACTIVATESTRUCT (pack 4) */ - TEST_TYPE(CBTACTIVATESTRUCT, 8, 4); - TEST_FIELD(CBTACTIVATESTRUCT, fMouse, 0, 4, 4); - TEST_FIELD(CBTACTIVATESTRUCT, hWndActive, 4, 4, 4); + TEST_TYPE_SIZE (CBTACTIVATESTRUCT, 8) + TEST_TYPE_ALIGN (CBTACTIVATESTRUCT, 4) + TEST_FIELD_SIZE (CBTACTIVATESTRUCT, fMouse, 4) + TEST_FIELD_ALIGN (CBTACTIVATESTRUCT, fMouse, 4) + TEST_FIELD_OFFSET(CBTACTIVATESTRUCT, fMouse, 0) + TEST_FIELD_SIZE (CBTACTIVATESTRUCT, hWndActive, 4) + TEST_FIELD_ALIGN (CBTACTIVATESTRUCT, hWndActive, 4) + TEST_FIELD_OFFSET(CBTACTIVATESTRUCT, hWndActive, 4) } static void test_pack_CBT_CREATEWNDA(void) { /* CBT_CREATEWNDA (pack 4) */ - TEST_TYPE(CBT_CREATEWNDA, 8, 4); - TEST_FIELD(CBT_CREATEWNDA, lpcs, 0, 4, 4); - TEST_FIELD(CBT_CREATEWNDA, hwndInsertAfter, 4, 4, 4); + TEST_TYPE_SIZE (CBT_CREATEWNDA, 8) + TEST_TYPE_ALIGN (CBT_CREATEWNDA, 4) + TEST_FIELD_SIZE (CBT_CREATEWNDA, lpcs, 4) + TEST_FIELD_ALIGN (CBT_CREATEWNDA, lpcs, 4) + TEST_FIELD_OFFSET(CBT_CREATEWNDA, lpcs, 0) + TEST_FIELD_SIZE (CBT_CREATEWNDA, hwndInsertAfter, 4) + TEST_FIELD_ALIGN (CBT_CREATEWNDA, hwndInsertAfter, 4) + TEST_FIELD_OFFSET(CBT_CREATEWNDA, hwndInsertAfter, 4) } static void test_pack_CBT_CREATEWNDW(void) { /* CBT_CREATEWNDW (pack 4) */ - TEST_TYPE(CBT_CREATEWNDW, 8, 4); - TEST_FIELD(CBT_CREATEWNDW, lpcs, 0, 4, 4); - TEST_FIELD(CBT_CREATEWNDW, hwndInsertAfter, 4, 4, 4); + TEST_TYPE_SIZE (CBT_CREATEWNDW, 8) + TEST_TYPE_ALIGN (CBT_CREATEWNDW, 4) + TEST_FIELD_SIZE (CBT_CREATEWNDW, lpcs, 4) + TEST_FIELD_ALIGN (CBT_CREATEWNDW, lpcs, 4) + TEST_FIELD_OFFSET(CBT_CREATEWNDW, lpcs, 0) + TEST_FIELD_SIZE (CBT_CREATEWNDW, hwndInsertAfter, 4) + TEST_FIELD_ALIGN (CBT_CREATEWNDW, hwndInsertAfter, 4) + TEST_FIELD_OFFSET(CBT_CREATEWNDW, hwndInsertAfter, 4) } static void test_pack_CLIENTCREATESTRUCT(void) { /* CLIENTCREATESTRUCT (pack 4) */ - TEST_TYPE(CLIENTCREATESTRUCT, 8, 4); - TEST_FIELD(CLIENTCREATESTRUCT, hWindowMenu, 0, 4, 4); - TEST_FIELD(CLIENTCREATESTRUCT, idFirstChild, 4, 4, 4); + TEST_TYPE_SIZE (CLIENTCREATESTRUCT, 8) + TEST_TYPE_ALIGN (CLIENTCREATESTRUCT, 4) + TEST_FIELD_SIZE (CLIENTCREATESTRUCT, hWindowMenu, 4) + TEST_FIELD_ALIGN (CLIENTCREATESTRUCT, hWindowMenu, 4) + TEST_FIELD_OFFSET(CLIENTCREATESTRUCT, hWindowMenu, 0) + TEST_FIELD_SIZE (CLIENTCREATESTRUCT, idFirstChild, 4) + TEST_FIELD_ALIGN (CLIENTCREATESTRUCT, idFirstChild, 4) + TEST_FIELD_OFFSET(CLIENTCREATESTRUCT, idFirstChild, 4) } static void test_pack_COMBOBOXINFO(void) { /* COMBOBOXINFO (pack 4) */ - TEST_TYPE(COMBOBOXINFO, 52, 4); - TEST_FIELD(COMBOBOXINFO, cbSize, 0, 4, 4); - TEST_FIELD(COMBOBOXINFO, rcItem, 4, 16, 4); - TEST_FIELD(COMBOBOXINFO, rcButton, 20, 16, 4); - TEST_FIELD(COMBOBOXINFO, stateButton, 36, 4, 4); - TEST_FIELD(COMBOBOXINFO, hwndCombo, 40, 4, 4); - TEST_FIELD(COMBOBOXINFO, hwndItem, 44, 4, 4); - TEST_FIELD(COMBOBOXINFO, hwndList, 48, 4, 4); + TEST_TYPE_SIZE (COMBOBOXINFO, 52) + TEST_TYPE_ALIGN (COMBOBOXINFO, 4) + TEST_FIELD_SIZE (COMBOBOXINFO, cbSize, 4) + TEST_FIELD_ALIGN (COMBOBOXINFO, cbSize, 4) + TEST_FIELD_OFFSET(COMBOBOXINFO, cbSize, 0) + TEST_FIELD_SIZE (COMBOBOXINFO, rcItem, 16) + TEST_FIELD_ALIGN (COMBOBOXINFO, rcItem, 4) + TEST_FIELD_OFFSET(COMBOBOXINFO, rcItem, 4) + TEST_FIELD_SIZE (COMBOBOXINFO, rcButton, 16) + TEST_FIELD_ALIGN (COMBOBOXINFO, rcButton, 4) + TEST_FIELD_OFFSET(COMBOBOXINFO, rcButton, 20) + TEST_FIELD_SIZE (COMBOBOXINFO, stateButton, 4) + TEST_FIELD_ALIGN (COMBOBOXINFO, stateButton, 4) + TEST_FIELD_OFFSET(COMBOBOXINFO, stateButton, 36) + TEST_FIELD_SIZE (COMBOBOXINFO, hwndCombo, 4) + TEST_FIELD_ALIGN (COMBOBOXINFO, hwndCombo, 4) + TEST_FIELD_OFFSET(COMBOBOXINFO, hwndCombo, 40) + TEST_FIELD_SIZE (COMBOBOXINFO, hwndItem, 4) + TEST_FIELD_ALIGN (COMBOBOXINFO, hwndItem, 4) + TEST_FIELD_OFFSET(COMBOBOXINFO, hwndItem, 44) + TEST_FIELD_SIZE (COMBOBOXINFO, hwndList, 4) + TEST_FIELD_ALIGN (COMBOBOXINFO, hwndList, 4) + TEST_FIELD_OFFSET(COMBOBOXINFO, hwndList, 48) } static void test_pack_COMPAREITEMSTRUCT(void) { /* COMPAREITEMSTRUCT (pack 4) */ - TEST_TYPE(COMPAREITEMSTRUCT, 32, 4); - TEST_FIELD(COMPAREITEMSTRUCT, CtlType, 0, 4, 4); - TEST_FIELD(COMPAREITEMSTRUCT, CtlID, 4, 4, 4); - TEST_FIELD(COMPAREITEMSTRUCT, hwndItem, 8, 4, 4); - TEST_FIELD(COMPAREITEMSTRUCT, itemID1, 12, 4, 4); - TEST_FIELD(COMPAREITEMSTRUCT, itemData1, 16, 4, 4); - TEST_FIELD(COMPAREITEMSTRUCT, itemID2, 20, 4, 4); - TEST_FIELD(COMPAREITEMSTRUCT, itemData2, 24, 4, 4); - TEST_FIELD(COMPAREITEMSTRUCT, dwLocaleId, 28, 4, 4); + TEST_TYPE_SIZE (COMPAREITEMSTRUCT, 32) + TEST_TYPE_ALIGN (COMPAREITEMSTRUCT, 4) + TEST_FIELD_SIZE (COMPAREITEMSTRUCT, CtlType, 4) + TEST_FIELD_ALIGN (COMPAREITEMSTRUCT, CtlType, 4) + TEST_FIELD_OFFSET(COMPAREITEMSTRUCT, CtlType, 0) + TEST_FIELD_SIZE (COMPAREITEMSTRUCT, CtlID, 4) + TEST_FIELD_ALIGN (COMPAREITEMSTRUCT, CtlID, 4) + TEST_FIELD_OFFSET(COMPAREITEMSTRUCT, CtlID, 4) + TEST_FIELD_SIZE (COMPAREITEMSTRUCT, hwndItem, 4) + TEST_FIELD_ALIGN (COMPAREITEMSTRUCT, hwndItem, 4) + TEST_FIELD_OFFSET(COMPAREITEMSTRUCT, hwndItem, 8) + TEST_FIELD_SIZE (COMPAREITEMSTRUCT, itemID1, 4) + TEST_FIELD_ALIGN (COMPAREITEMSTRUCT, itemID1, 4) + TEST_FIELD_OFFSET(COMPAREITEMSTRUCT, itemID1, 12) + TEST_FIELD_SIZE (COMPAREITEMSTRUCT, itemData1, 4) + TEST_FIELD_ALIGN (COMPAREITEMSTRUCT, itemData1, 4) + TEST_FIELD_OFFSET(COMPAREITEMSTRUCT, itemData1, 16) + TEST_FIELD_SIZE (COMPAREITEMSTRUCT, itemID2, 4) + TEST_FIELD_ALIGN (COMPAREITEMSTRUCT, itemID2, 4) + TEST_FIELD_OFFSET(COMPAREITEMSTRUCT, itemID2, 20) + TEST_FIELD_SIZE (COMPAREITEMSTRUCT, itemData2, 4) + TEST_FIELD_ALIGN (COMPAREITEMSTRUCT, itemData2, 4) + TEST_FIELD_OFFSET(COMPAREITEMSTRUCT, itemData2, 24) + TEST_FIELD_SIZE (COMPAREITEMSTRUCT, dwLocaleId, 4) + TEST_FIELD_ALIGN (COMPAREITEMSTRUCT, dwLocaleId, 4) + TEST_FIELD_OFFSET(COMPAREITEMSTRUCT, dwLocaleId, 28) } static void test_pack_COPYDATASTRUCT(void) { /* COPYDATASTRUCT (pack 4) */ - TEST_TYPE(COPYDATASTRUCT, 12, 4); - TEST_FIELD(COPYDATASTRUCT, dwData, 0, 4, 4); - TEST_FIELD(COPYDATASTRUCT, cbData, 4, 4, 4); - TEST_FIELD(COPYDATASTRUCT, lpData, 8, 4, 4); + TEST_TYPE_SIZE (COPYDATASTRUCT, 12) + TEST_TYPE_ALIGN (COPYDATASTRUCT, 4) + TEST_FIELD_SIZE (COPYDATASTRUCT, dwData, 4) + TEST_FIELD_ALIGN (COPYDATASTRUCT, dwData, 4) + TEST_FIELD_OFFSET(COPYDATASTRUCT, dwData, 0) + TEST_FIELD_SIZE (COPYDATASTRUCT, cbData, 4) + TEST_FIELD_ALIGN (COPYDATASTRUCT, cbData, 4) + TEST_FIELD_OFFSET(COPYDATASTRUCT, cbData, 4) + TEST_FIELD_SIZE (COPYDATASTRUCT, lpData, 4) + TEST_FIELD_ALIGN (COPYDATASTRUCT, lpData, 4) + TEST_FIELD_OFFSET(COPYDATASTRUCT, lpData, 8) } static void test_pack_CREATESTRUCTA(void) { /* CREATESTRUCTA (pack 4) */ - TEST_TYPE(CREATESTRUCTA, 48, 4); - TEST_FIELD(CREATESTRUCTA, lpCreateParams, 0, 4, 4); - TEST_FIELD(CREATESTRUCTA, hInstance, 4, 4, 4); - TEST_FIELD(CREATESTRUCTA, hMenu, 8, 4, 4); - TEST_FIELD(CREATESTRUCTA, hwndParent, 12, 4, 4); - TEST_FIELD(CREATESTRUCTA, cy, 16, 4, 4); - TEST_FIELD(CREATESTRUCTA, cx, 20, 4, 4); - TEST_FIELD(CREATESTRUCTA, y, 24, 4, 4); - TEST_FIELD(CREATESTRUCTA, x, 28, 4, 4); - TEST_FIELD(CREATESTRUCTA, style, 32, 4, 4); - TEST_FIELD(CREATESTRUCTA, lpszName, 36, 4, 4); - TEST_FIELD(CREATESTRUCTA, lpszClass, 40, 4, 4); - TEST_FIELD(CREATESTRUCTA, dwExStyle, 44, 4, 4); + TEST_TYPE_SIZE (CREATESTRUCTA, 48) + TEST_TYPE_ALIGN (CREATESTRUCTA, 4) + TEST_FIELD_SIZE (CREATESTRUCTA, lpCreateParams, 4) + TEST_FIELD_ALIGN (CREATESTRUCTA, lpCreateParams, 4) + TEST_FIELD_OFFSET(CREATESTRUCTA, lpCreateParams, 0) + TEST_FIELD_SIZE (CREATESTRUCTA, hInstance, 4) + TEST_FIELD_ALIGN (CREATESTRUCTA, hInstance, 4) + TEST_FIELD_OFFSET(CREATESTRUCTA, hInstance, 4) + TEST_FIELD_SIZE (CREATESTRUCTA, hMenu, 4) + TEST_FIELD_ALIGN (CREATESTRUCTA, hMenu, 4) + TEST_FIELD_OFFSET(CREATESTRUCTA, hMenu, 8) + TEST_FIELD_SIZE (CREATESTRUCTA, hwndParent, 4) + TEST_FIELD_ALIGN (CREATESTRUCTA, hwndParent, 4) + TEST_FIELD_OFFSET(CREATESTRUCTA, hwndParent, 12) + TEST_FIELD_SIZE (CREATESTRUCTA, cy, 4) + TEST_FIELD_ALIGN (CREATESTRUCTA, cy, 4) + TEST_FIELD_OFFSET(CREATESTRUCTA, cy, 16) + TEST_FIELD_SIZE (CREATESTRUCTA, cx, 4) + TEST_FIELD_ALIGN (CREATESTRUCTA, cx, 4) + TEST_FIELD_OFFSET(CREATESTRUCTA, cx, 20) + TEST_FIELD_SIZE (CREATESTRUCTA, y, 4) + TEST_FIELD_ALIGN (CREATESTRUCTA, y, 4) + TEST_FIELD_OFFSET(CREATESTRUCTA, y, 24) + TEST_FIELD_SIZE (CREATESTRUCTA, x, 4) + TEST_FIELD_ALIGN (CREATESTRUCTA, x, 4) + TEST_FIELD_OFFSET(CREATESTRUCTA, x, 28) + TEST_FIELD_SIZE (CREATESTRUCTA, style, 4) + TEST_FIELD_ALIGN (CREATESTRUCTA, style, 4) + TEST_FIELD_OFFSET(CREATESTRUCTA, style, 32) + TEST_FIELD_SIZE (CREATESTRUCTA, lpszName, 4) + TEST_FIELD_ALIGN (CREATESTRUCTA, lpszName, 4) + TEST_FIELD_OFFSET(CREATESTRUCTA, lpszName, 36) + TEST_FIELD_SIZE (CREATESTRUCTA, lpszClass, 4) + TEST_FIELD_ALIGN (CREATESTRUCTA, lpszClass, 4) + TEST_FIELD_OFFSET(CREATESTRUCTA, lpszClass, 40) + TEST_FIELD_SIZE (CREATESTRUCTA, dwExStyle, 4) + TEST_FIELD_ALIGN (CREATESTRUCTA, dwExStyle, 4) + TEST_FIELD_OFFSET(CREATESTRUCTA, dwExStyle, 44) } static void test_pack_CREATESTRUCTW(void) { /* CREATESTRUCTW (pack 4) */ - TEST_TYPE(CREATESTRUCTW, 48, 4); - TEST_FIELD(CREATESTRUCTW, lpCreateParams, 0, 4, 4); - TEST_FIELD(CREATESTRUCTW, hInstance, 4, 4, 4); - TEST_FIELD(CREATESTRUCTW, hMenu, 8, 4, 4); - TEST_FIELD(CREATESTRUCTW, hwndParent, 12, 4, 4); - TEST_FIELD(CREATESTRUCTW, cy, 16, 4, 4); - TEST_FIELD(CREATESTRUCTW, cx, 20, 4, 4); - TEST_FIELD(CREATESTRUCTW, y, 24, 4, 4); - TEST_FIELD(CREATESTRUCTW, x, 28, 4, 4); - TEST_FIELD(CREATESTRUCTW, style, 32, 4, 4); - TEST_FIELD(CREATESTRUCTW, lpszName, 36, 4, 4); - TEST_FIELD(CREATESTRUCTW, lpszClass, 40, 4, 4); - TEST_FIELD(CREATESTRUCTW, dwExStyle, 44, 4, 4); + TEST_TYPE_SIZE (CREATESTRUCTW, 48) + TEST_TYPE_ALIGN (CREATESTRUCTW, 4) + TEST_FIELD_SIZE (CREATESTRUCTW, lpCreateParams, 4) + TEST_FIELD_ALIGN (CREATESTRUCTW, lpCreateParams, 4) + TEST_FIELD_OFFSET(CREATESTRUCTW, lpCreateParams, 0) + TEST_FIELD_SIZE (CREATESTRUCTW, hInstance, 4) + TEST_FIELD_ALIGN (CREATESTRUCTW, hInstance, 4) + TEST_FIELD_OFFSET(CREATESTRUCTW, hInstance, 4) + TEST_FIELD_SIZE (CREATESTRUCTW, hMenu, 4) + TEST_FIELD_ALIGN (CREATESTRUCTW, hMenu, 4) + TEST_FIELD_OFFSET(CREATESTRUCTW, hMenu, 8) + TEST_FIELD_SIZE (CREATESTRUCTW, hwndParent, 4) + TEST_FIELD_ALIGN (CREATESTRUCTW, hwndParent, 4) + TEST_FIELD_OFFSET(CREATESTRUCTW, hwndParent, 12) + TEST_FIELD_SIZE (CREATESTRUCTW, cy, 4) + TEST_FIELD_ALIGN (CREATESTRUCTW, cy, 4) + TEST_FIELD_OFFSET(CREATESTRUCTW, cy, 16) + TEST_FIELD_SIZE (CREATESTRUCTW, cx, 4) + TEST_FIELD_ALIGN (CREATESTRUCTW, cx, 4) + TEST_FIELD_OFFSET(CREATESTRUCTW, cx, 20) + TEST_FIELD_SIZE (CREATESTRUCTW, y, 4) + TEST_FIELD_ALIGN (CREATESTRUCTW, y, 4) + TEST_FIELD_OFFSET(CREATESTRUCTW, y, 24) + TEST_FIELD_SIZE (CREATESTRUCTW, x, 4) + TEST_FIELD_ALIGN (CREATESTRUCTW, x, 4) + TEST_FIELD_OFFSET(CREATESTRUCTW, x, 28) + TEST_FIELD_SIZE (CREATESTRUCTW, style, 4) + TEST_FIELD_ALIGN (CREATESTRUCTW, style, 4) + TEST_FIELD_OFFSET(CREATESTRUCTW, style, 32) + TEST_FIELD_SIZE (CREATESTRUCTW, lpszName, 4) + TEST_FIELD_ALIGN (CREATESTRUCTW, lpszName, 4) + TEST_FIELD_OFFSET(CREATESTRUCTW, lpszName, 36) + TEST_FIELD_SIZE (CREATESTRUCTW, lpszClass, 4) + TEST_FIELD_ALIGN (CREATESTRUCTW, lpszClass, 4) + TEST_FIELD_OFFSET(CREATESTRUCTW, lpszClass, 40) + TEST_FIELD_SIZE (CREATESTRUCTW, dwExStyle, 4) + TEST_FIELD_ALIGN (CREATESTRUCTW, dwExStyle, 4) + TEST_FIELD_OFFSET(CREATESTRUCTW, dwExStyle, 44) } static void test_pack_CURSORINFO(void) { /* CURSORINFO (pack 4) */ - TEST_TYPE(CURSORINFO, 20, 4); - TEST_FIELD(CURSORINFO, cbSize, 0, 4, 4); - TEST_FIELD(CURSORINFO, flags, 4, 4, 4); - TEST_FIELD(CURSORINFO, hCursor, 8, 4, 4); - TEST_FIELD(CURSORINFO, ptScreenPos, 12, 8, 4); + TEST_TYPE_SIZE (CURSORINFO, 20) + TEST_TYPE_ALIGN (CURSORINFO, 4) + TEST_FIELD_SIZE (CURSORINFO, cbSize, 4) + TEST_FIELD_ALIGN (CURSORINFO, cbSize, 4) + TEST_FIELD_OFFSET(CURSORINFO, cbSize, 0) + TEST_FIELD_SIZE (CURSORINFO, flags, 4) + TEST_FIELD_ALIGN (CURSORINFO, flags, 4) + TEST_FIELD_OFFSET(CURSORINFO, flags, 4) + TEST_FIELD_SIZE (CURSORINFO, hCursor, 4) + TEST_FIELD_ALIGN (CURSORINFO, hCursor, 4) + TEST_FIELD_OFFSET(CURSORINFO, hCursor, 8) + TEST_FIELD_SIZE (CURSORINFO, ptScreenPos, 8) + TEST_FIELD_ALIGN (CURSORINFO, ptScreenPos, 4) + TEST_FIELD_OFFSET(CURSORINFO, ptScreenPos, 12) } static void test_pack_CWPRETSTRUCT(void) { /* CWPRETSTRUCT (pack 4) */ - TEST_TYPE(CWPRETSTRUCT, 20, 4); - TEST_FIELD(CWPRETSTRUCT, lResult, 0, 4, 4); - TEST_FIELD(CWPRETSTRUCT, lParam, 4, 4, 4); - TEST_FIELD(CWPRETSTRUCT, wParam, 8, 4, 4); - TEST_FIELD(CWPRETSTRUCT, message, 12, 4, 4); - TEST_FIELD(CWPRETSTRUCT, hwnd, 16, 4, 4); + TEST_TYPE_SIZE (CWPRETSTRUCT, 20) + TEST_TYPE_ALIGN (CWPRETSTRUCT, 4) + TEST_FIELD_SIZE (CWPRETSTRUCT, lResult, 4) + TEST_FIELD_ALIGN (CWPRETSTRUCT, lResult, 4) + TEST_FIELD_OFFSET(CWPRETSTRUCT, lResult, 0) + TEST_FIELD_SIZE (CWPRETSTRUCT, lParam, 4) + TEST_FIELD_ALIGN (CWPRETSTRUCT, lParam, 4) + TEST_FIELD_OFFSET(CWPRETSTRUCT, lParam, 4) + TEST_FIELD_SIZE (CWPRETSTRUCT, wParam, 4) + TEST_FIELD_ALIGN (CWPRETSTRUCT, wParam, 4) + TEST_FIELD_OFFSET(CWPRETSTRUCT, wParam, 8) + TEST_FIELD_SIZE (CWPRETSTRUCT, message, 4) + TEST_FIELD_ALIGN (CWPRETSTRUCT, message, 4) + TEST_FIELD_OFFSET(CWPRETSTRUCT, message, 12) + TEST_FIELD_SIZE (CWPRETSTRUCT, hwnd, 4) + TEST_FIELD_ALIGN (CWPRETSTRUCT, hwnd, 4) + TEST_FIELD_OFFSET(CWPRETSTRUCT, hwnd, 16) } static void test_pack_CWPSTRUCT(void) { /* CWPSTRUCT (pack 4) */ - TEST_TYPE(CWPSTRUCT, 16, 4); - TEST_FIELD(CWPSTRUCT, lParam, 0, 4, 4); - TEST_FIELD(CWPSTRUCT, wParam, 4, 4, 4); - TEST_FIELD(CWPSTRUCT, message, 8, 4, 4); - TEST_FIELD(CWPSTRUCT, hwnd, 12, 4, 4); + TEST_TYPE_SIZE (CWPSTRUCT, 16) + TEST_TYPE_ALIGN (CWPSTRUCT, 4) + TEST_FIELD_SIZE (CWPSTRUCT, lParam, 4) + TEST_FIELD_ALIGN (CWPSTRUCT, lParam, 4) + TEST_FIELD_OFFSET(CWPSTRUCT, lParam, 0) + TEST_FIELD_SIZE (CWPSTRUCT, wParam, 4) + TEST_FIELD_ALIGN (CWPSTRUCT, wParam, 4) + TEST_FIELD_OFFSET(CWPSTRUCT, wParam, 4) + TEST_FIELD_SIZE (CWPSTRUCT, message, 4) + TEST_FIELD_ALIGN (CWPSTRUCT, message, 4) + TEST_FIELD_OFFSET(CWPSTRUCT, message, 8) + TEST_FIELD_SIZE (CWPSTRUCT, hwnd, 4) + TEST_FIELD_ALIGN (CWPSTRUCT, hwnd, 4) + TEST_FIELD_OFFSET(CWPSTRUCT, hwnd, 12) } static void test_pack_DEBUGHOOKINFO(void) { /* DEBUGHOOKINFO (pack 4) */ - TEST_TYPE(DEBUGHOOKINFO, 20, 4); - TEST_FIELD(DEBUGHOOKINFO, idThread, 0, 4, 4); - TEST_FIELD(DEBUGHOOKINFO, idThreadInstaller, 4, 4, 4); - TEST_FIELD(DEBUGHOOKINFO, lParam, 8, 4, 4); - TEST_FIELD(DEBUGHOOKINFO, wParam, 12, 4, 4); - TEST_FIELD(DEBUGHOOKINFO, code, 16, 4, 4); + TEST_TYPE_SIZE (DEBUGHOOKINFO, 20) + TEST_TYPE_ALIGN (DEBUGHOOKINFO, 4) + TEST_FIELD_SIZE (DEBUGHOOKINFO, idThread, 4) + TEST_FIELD_ALIGN (DEBUGHOOKINFO, idThread, 4) + TEST_FIELD_OFFSET(DEBUGHOOKINFO, idThread, 0) + TEST_FIELD_SIZE (DEBUGHOOKINFO, idThreadInstaller, 4) + TEST_FIELD_ALIGN (DEBUGHOOKINFO, idThreadInstaller, 4) + TEST_FIELD_OFFSET(DEBUGHOOKINFO, idThreadInstaller, 4) + TEST_FIELD_SIZE (DEBUGHOOKINFO, lParam, 4) + TEST_FIELD_ALIGN (DEBUGHOOKINFO, lParam, 4) + TEST_FIELD_OFFSET(DEBUGHOOKINFO, lParam, 8) + TEST_FIELD_SIZE (DEBUGHOOKINFO, wParam, 4) + TEST_FIELD_ALIGN (DEBUGHOOKINFO, wParam, 4) + TEST_FIELD_OFFSET(DEBUGHOOKINFO, wParam, 12) + TEST_FIELD_SIZE (DEBUGHOOKINFO, code, 4) + TEST_FIELD_ALIGN (DEBUGHOOKINFO, code, 4) + TEST_FIELD_OFFSET(DEBUGHOOKINFO, code, 16) } static void test_pack_DELETEITEMSTRUCT(void) { /* DELETEITEMSTRUCT (pack 4) */ - TEST_TYPE(DELETEITEMSTRUCT, 20, 4); - TEST_FIELD(DELETEITEMSTRUCT, CtlType, 0, 4, 4); - TEST_FIELD(DELETEITEMSTRUCT, CtlID, 4, 4, 4); - TEST_FIELD(DELETEITEMSTRUCT, itemID, 8, 4, 4); - TEST_FIELD(DELETEITEMSTRUCT, hwndItem, 12, 4, 4); - TEST_FIELD(DELETEITEMSTRUCT, itemData, 16, 4, 4); + TEST_TYPE_SIZE (DELETEITEMSTRUCT, 20) + TEST_TYPE_ALIGN (DELETEITEMSTRUCT, 4) + TEST_FIELD_SIZE (DELETEITEMSTRUCT, CtlType, 4) + TEST_FIELD_ALIGN (DELETEITEMSTRUCT, CtlType, 4) + TEST_FIELD_OFFSET(DELETEITEMSTRUCT, CtlType, 0) + TEST_FIELD_SIZE (DELETEITEMSTRUCT, CtlID, 4) + TEST_FIELD_ALIGN (DELETEITEMSTRUCT, CtlID, 4) + TEST_FIELD_OFFSET(DELETEITEMSTRUCT, CtlID, 4) + TEST_FIELD_SIZE (DELETEITEMSTRUCT, itemID, 4) + TEST_FIELD_ALIGN (DELETEITEMSTRUCT, itemID, 4) + TEST_FIELD_OFFSET(DELETEITEMSTRUCT, itemID, 8) + TEST_FIELD_SIZE (DELETEITEMSTRUCT, hwndItem, 4) + TEST_FIELD_ALIGN (DELETEITEMSTRUCT, hwndItem, 4) + TEST_FIELD_OFFSET(DELETEITEMSTRUCT, hwndItem, 12) + TEST_FIELD_SIZE (DELETEITEMSTRUCT, itemData, 4) + TEST_FIELD_ALIGN (DELETEITEMSTRUCT, itemData, 4) + TEST_FIELD_OFFSET(DELETEITEMSTRUCT, itemData, 16) } static void test_pack_DESKTOPENUMPROCA(void) { /* DESKTOPENUMPROCA */ - TEST_TYPE(DESKTOPENUMPROCA, 4, 4); + TEST_TYPE_SIZE (DESKTOPENUMPROCA, 4) + TEST_TYPE_ALIGN (DESKTOPENUMPROCA, 4) } static void test_pack_DESKTOPENUMPROCW(void) { /* DESKTOPENUMPROCW */ - TEST_TYPE(DESKTOPENUMPROCW, 4, 4); + TEST_TYPE_SIZE (DESKTOPENUMPROCW, 4) + TEST_TYPE_ALIGN (DESKTOPENUMPROCW, 4) } static void test_pack_DLGITEMTEMPLATE(void) { /* DLGITEMTEMPLATE (pack 2) */ - TEST_TYPE(DLGITEMTEMPLATE, 18, 2); - TEST_FIELD(DLGITEMTEMPLATE, style, 0, 4, 2); - TEST_FIELD(DLGITEMTEMPLATE, dwExtendedStyle, 4, 4, 2); - TEST_FIELD(DLGITEMTEMPLATE, x, 8, 2, 2); - TEST_FIELD(DLGITEMTEMPLATE, y, 10, 2, 2); - TEST_FIELD(DLGITEMTEMPLATE, cx, 12, 2, 2); - TEST_FIELD(DLGITEMTEMPLATE, cy, 14, 2, 2); - TEST_FIELD(DLGITEMTEMPLATE, id, 16, 2, 2); + TEST_TYPE_SIZE (DLGITEMTEMPLATE, 18) + TEST_TYPE_ALIGN (DLGITEMTEMPLATE, 2) + TEST_FIELD_SIZE (DLGITEMTEMPLATE, style, 4) + TEST_FIELD_ALIGN (DLGITEMTEMPLATE, style, 2) + TEST_FIELD_OFFSET(DLGITEMTEMPLATE, style, 0) + TEST_FIELD_SIZE (DLGITEMTEMPLATE, dwExtendedStyle, 4) + TEST_FIELD_ALIGN (DLGITEMTEMPLATE, dwExtendedStyle, 2) + TEST_FIELD_OFFSET(DLGITEMTEMPLATE, dwExtendedStyle, 4) + TEST_FIELD_SIZE (DLGITEMTEMPLATE, x, 2) + TEST_FIELD_ALIGN (DLGITEMTEMPLATE, x, 2) + TEST_FIELD_OFFSET(DLGITEMTEMPLATE, x, 8) + TEST_FIELD_SIZE (DLGITEMTEMPLATE, y, 2) + TEST_FIELD_ALIGN (DLGITEMTEMPLATE, y, 2) + TEST_FIELD_OFFSET(DLGITEMTEMPLATE, y, 10) + TEST_FIELD_SIZE (DLGITEMTEMPLATE, cx, 2) + TEST_FIELD_ALIGN (DLGITEMTEMPLATE, cx, 2) + TEST_FIELD_OFFSET(DLGITEMTEMPLATE, cx, 12) + TEST_FIELD_SIZE (DLGITEMTEMPLATE, cy, 2) + TEST_FIELD_ALIGN (DLGITEMTEMPLATE, cy, 2) + TEST_FIELD_OFFSET(DLGITEMTEMPLATE, cy, 14) + TEST_FIELD_SIZE (DLGITEMTEMPLATE, id, 2) + TEST_FIELD_ALIGN (DLGITEMTEMPLATE, id, 2) + TEST_FIELD_OFFSET(DLGITEMTEMPLATE, id, 16) } static void test_pack_DLGPROC(void) { /* DLGPROC */ - TEST_TYPE(DLGPROC, 4, 4); + TEST_TYPE_SIZE (DLGPROC, 4) + TEST_TYPE_ALIGN (DLGPROC, 4) } static void test_pack_DLGTEMPLATE(void) { /* DLGTEMPLATE (pack 2) */ - TEST_TYPE(DLGTEMPLATE, 18, 2); - TEST_FIELD(DLGTEMPLATE, style, 0, 4, 2); - TEST_FIELD(DLGTEMPLATE, dwExtendedStyle, 4, 4, 2); - TEST_FIELD(DLGTEMPLATE, cdit, 8, 2, 2); - TEST_FIELD(DLGTEMPLATE, x, 10, 2, 2); - TEST_FIELD(DLGTEMPLATE, y, 12, 2, 2); - TEST_FIELD(DLGTEMPLATE, cx, 14, 2, 2); - TEST_FIELD(DLGTEMPLATE, cy, 16, 2, 2); + TEST_TYPE_SIZE (DLGTEMPLATE, 18) + TEST_TYPE_ALIGN (DLGTEMPLATE, 2) + TEST_FIELD_SIZE (DLGTEMPLATE, style, 4) + TEST_FIELD_ALIGN (DLGTEMPLATE, style, 2) + TEST_FIELD_OFFSET(DLGTEMPLATE, style, 0) + TEST_FIELD_SIZE (DLGTEMPLATE, dwExtendedStyle, 4) + TEST_FIELD_ALIGN (DLGTEMPLATE, dwExtendedStyle, 2) + TEST_FIELD_OFFSET(DLGTEMPLATE, dwExtendedStyle, 4) + TEST_FIELD_SIZE (DLGTEMPLATE, cdit, 2) + TEST_FIELD_ALIGN (DLGTEMPLATE, cdit, 2) + TEST_FIELD_OFFSET(DLGTEMPLATE, cdit, 8) + TEST_FIELD_SIZE (DLGTEMPLATE, x, 2) + TEST_FIELD_ALIGN (DLGTEMPLATE, x, 2) + TEST_FIELD_OFFSET(DLGTEMPLATE, x, 10) + TEST_FIELD_SIZE (DLGTEMPLATE, y, 2) + TEST_FIELD_ALIGN (DLGTEMPLATE, y, 2) + TEST_FIELD_OFFSET(DLGTEMPLATE, y, 12) + TEST_FIELD_SIZE (DLGTEMPLATE, cx, 2) + TEST_FIELD_ALIGN (DLGTEMPLATE, cx, 2) + TEST_FIELD_OFFSET(DLGTEMPLATE, cx, 14) + TEST_FIELD_SIZE (DLGTEMPLATE, cy, 2) + TEST_FIELD_ALIGN (DLGTEMPLATE, cy, 2) + TEST_FIELD_OFFSET(DLGTEMPLATE, cy, 16) } static void test_pack_DRAWITEMSTRUCT(void) { /* DRAWITEMSTRUCT (pack 4) */ - TEST_TYPE(DRAWITEMSTRUCT, 48, 4); - TEST_FIELD(DRAWITEMSTRUCT, CtlType, 0, 4, 4); - TEST_FIELD(DRAWITEMSTRUCT, CtlID, 4, 4, 4); - TEST_FIELD(DRAWITEMSTRUCT, itemID, 8, 4, 4); - TEST_FIELD(DRAWITEMSTRUCT, itemAction, 12, 4, 4); - TEST_FIELD(DRAWITEMSTRUCT, itemState, 16, 4, 4); - TEST_FIELD(DRAWITEMSTRUCT, hwndItem, 20, 4, 4); - TEST_FIELD(DRAWITEMSTRUCT, hDC, 24, 4, 4); - TEST_FIELD(DRAWITEMSTRUCT, rcItem, 28, 16, 4); - TEST_FIELD(DRAWITEMSTRUCT, itemData, 44, 4, 4); + TEST_TYPE_SIZE (DRAWITEMSTRUCT, 48) + TEST_TYPE_ALIGN (DRAWITEMSTRUCT, 4) + TEST_FIELD_SIZE (DRAWITEMSTRUCT, CtlType, 4) + TEST_FIELD_ALIGN (DRAWITEMSTRUCT, CtlType, 4) + TEST_FIELD_OFFSET(DRAWITEMSTRUCT, CtlType, 0) + TEST_FIELD_SIZE (DRAWITEMSTRUCT, CtlID, 4) + TEST_FIELD_ALIGN (DRAWITEMSTRUCT, CtlID, 4) + TEST_FIELD_OFFSET(DRAWITEMSTRUCT, CtlID, 4) + TEST_FIELD_SIZE (DRAWITEMSTRUCT, itemID, 4) + TEST_FIELD_ALIGN (DRAWITEMSTRUCT, itemID, 4) + TEST_FIELD_OFFSET(DRAWITEMSTRUCT, itemID, 8) + TEST_FIELD_SIZE (DRAWITEMSTRUCT, itemAction, 4) + TEST_FIELD_ALIGN (DRAWITEMSTRUCT, itemAction, 4) + TEST_FIELD_OFFSET(DRAWITEMSTRUCT, itemAction, 12) + TEST_FIELD_SIZE (DRAWITEMSTRUCT, itemState, 4) + TEST_FIELD_ALIGN (DRAWITEMSTRUCT, itemState, 4) + TEST_FIELD_OFFSET(DRAWITEMSTRUCT, itemState, 16) + TEST_FIELD_SIZE (DRAWITEMSTRUCT, hwndItem, 4) + TEST_FIELD_ALIGN (DRAWITEMSTRUCT, hwndItem, 4) + TEST_FIELD_OFFSET(DRAWITEMSTRUCT, hwndItem, 20) + TEST_FIELD_SIZE (DRAWITEMSTRUCT, hDC, 4) + TEST_FIELD_ALIGN (DRAWITEMSTRUCT, hDC, 4) + TEST_FIELD_OFFSET(DRAWITEMSTRUCT, hDC, 24) + TEST_FIELD_SIZE (DRAWITEMSTRUCT, rcItem, 16) + TEST_FIELD_ALIGN (DRAWITEMSTRUCT, rcItem, 4) + TEST_FIELD_OFFSET(DRAWITEMSTRUCT, rcItem, 28) + TEST_FIELD_SIZE (DRAWITEMSTRUCT, itemData, 4) + TEST_FIELD_ALIGN (DRAWITEMSTRUCT, itemData, 4) + TEST_FIELD_OFFSET(DRAWITEMSTRUCT, itemData, 44) } static void test_pack_DRAWSTATEPROC(void) { /* DRAWSTATEPROC */ - TEST_TYPE(DRAWSTATEPROC, 4, 4); + TEST_TYPE_SIZE (DRAWSTATEPROC, 4) + TEST_TYPE_ALIGN (DRAWSTATEPROC, 4) } static void test_pack_DRAWTEXTPARAMS(void) { /* DRAWTEXTPARAMS (pack 4) */ - TEST_TYPE(DRAWTEXTPARAMS, 20, 4); - TEST_FIELD(DRAWTEXTPARAMS, cbSize, 0, 4, 4); - TEST_FIELD(DRAWTEXTPARAMS, iTabLength, 4, 4, 4); - TEST_FIELD(DRAWTEXTPARAMS, iLeftMargin, 8, 4, 4); - TEST_FIELD(DRAWTEXTPARAMS, iRightMargin, 12, 4, 4); - TEST_FIELD(DRAWTEXTPARAMS, uiLengthDrawn, 16, 4, 4); + TEST_TYPE_SIZE (DRAWTEXTPARAMS, 20) + TEST_TYPE_ALIGN (DRAWTEXTPARAMS, 4) + TEST_FIELD_SIZE (DRAWTEXTPARAMS, cbSize, 4) + TEST_FIELD_ALIGN (DRAWTEXTPARAMS, cbSize, 4) + TEST_FIELD_OFFSET(DRAWTEXTPARAMS, cbSize, 0) + TEST_FIELD_SIZE (DRAWTEXTPARAMS, iTabLength, 4) + TEST_FIELD_ALIGN (DRAWTEXTPARAMS, iTabLength, 4) + TEST_FIELD_OFFSET(DRAWTEXTPARAMS, iTabLength, 4) + TEST_FIELD_SIZE (DRAWTEXTPARAMS, iLeftMargin, 4) + TEST_FIELD_ALIGN (DRAWTEXTPARAMS, iLeftMargin, 4) + TEST_FIELD_OFFSET(DRAWTEXTPARAMS, iLeftMargin, 8) + TEST_FIELD_SIZE (DRAWTEXTPARAMS, iRightMargin, 4) + TEST_FIELD_ALIGN (DRAWTEXTPARAMS, iRightMargin, 4) + TEST_FIELD_OFFSET(DRAWTEXTPARAMS, iRightMargin, 12) + TEST_FIELD_SIZE (DRAWTEXTPARAMS, uiLengthDrawn, 4) + TEST_FIELD_ALIGN (DRAWTEXTPARAMS, uiLengthDrawn, 4) + TEST_FIELD_OFFSET(DRAWTEXTPARAMS, uiLengthDrawn, 16) } static void test_pack_EDITWORDBREAKPROCA(void) { /* EDITWORDBREAKPROCA */ - TEST_TYPE(EDITWORDBREAKPROCA, 4, 4); + TEST_TYPE_SIZE (EDITWORDBREAKPROCA, 4) + TEST_TYPE_ALIGN (EDITWORDBREAKPROCA, 4) } static void test_pack_EDITWORDBREAKPROCW(void) { /* EDITWORDBREAKPROCW */ - TEST_TYPE(EDITWORDBREAKPROCW, 4, 4); + TEST_TYPE_SIZE (EDITWORDBREAKPROCW, 4) + TEST_TYPE_ALIGN (EDITWORDBREAKPROCW, 4) } static void test_pack_EVENTMSG(void) { /* EVENTMSG (pack 4) */ - TEST_TYPE(EVENTMSG, 20, 4); - TEST_FIELD(EVENTMSG, message, 0, 4, 4); - TEST_FIELD(EVENTMSG, paramL, 4, 4, 4); - TEST_FIELD(EVENTMSG, paramH, 8, 4, 4); - TEST_FIELD(EVENTMSG, time, 12, 4, 4); - TEST_FIELD(EVENTMSG, hwnd, 16, 4, 4); + TEST_TYPE_SIZE (EVENTMSG, 20) + TEST_TYPE_ALIGN (EVENTMSG, 4) + TEST_FIELD_SIZE (EVENTMSG, message, 4) + TEST_FIELD_ALIGN (EVENTMSG, message, 4) + TEST_FIELD_OFFSET(EVENTMSG, message, 0) + TEST_FIELD_SIZE (EVENTMSG, paramL, 4) + TEST_FIELD_ALIGN (EVENTMSG, paramL, 4) + TEST_FIELD_OFFSET(EVENTMSG, paramL, 4) + TEST_FIELD_SIZE (EVENTMSG, paramH, 4) + TEST_FIELD_ALIGN (EVENTMSG, paramH, 4) + TEST_FIELD_OFFSET(EVENTMSG, paramH, 8) + TEST_FIELD_SIZE (EVENTMSG, time, 4) + TEST_FIELD_ALIGN (EVENTMSG, time, 4) + TEST_FIELD_OFFSET(EVENTMSG, time, 12) + TEST_FIELD_SIZE (EVENTMSG, hwnd, 4) + TEST_FIELD_ALIGN (EVENTMSG, hwnd, 4) + TEST_FIELD_OFFSET(EVENTMSG, hwnd, 16) } static void test_pack_FILTERKEYS(void) { /* FILTERKEYS (pack 4) */ - TEST_TYPE(FILTERKEYS, 24, 4); - TEST_FIELD(FILTERKEYS, cbSize, 0, 4, 4); - TEST_FIELD(FILTERKEYS, dwFlags, 4, 4, 4); - TEST_FIELD(FILTERKEYS, iWaitMSec, 8, 4, 4); - TEST_FIELD(FILTERKEYS, iDelayMSec, 12, 4, 4); - TEST_FIELD(FILTERKEYS, iRepeatMSec, 16, 4, 4); - TEST_FIELD(FILTERKEYS, iBounceMSec, 20, 4, 4); + TEST_TYPE_SIZE (FILTERKEYS, 24) + TEST_TYPE_ALIGN (FILTERKEYS, 4) + TEST_FIELD_SIZE (FILTERKEYS, cbSize, 4) + TEST_FIELD_ALIGN (FILTERKEYS, cbSize, 4) + TEST_FIELD_OFFSET(FILTERKEYS, cbSize, 0) + TEST_FIELD_SIZE (FILTERKEYS, dwFlags, 4) + TEST_FIELD_ALIGN (FILTERKEYS, dwFlags, 4) + TEST_FIELD_OFFSET(FILTERKEYS, dwFlags, 4) + TEST_FIELD_SIZE (FILTERKEYS, iWaitMSec, 4) + TEST_FIELD_ALIGN (FILTERKEYS, iWaitMSec, 4) + TEST_FIELD_OFFSET(FILTERKEYS, iWaitMSec, 8) + TEST_FIELD_SIZE (FILTERKEYS, iDelayMSec, 4) + TEST_FIELD_ALIGN (FILTERKEYS, iDelayMSec, 4) + TEST_FIELD_OFFSET(FILTERKEYS, iDelayMSec, 12) + TEST_FIELD_SIZE (FILTERKEYS, iRepeatMSec, 4) + TEST_FIELD_ALIGN (FILTERKEYS, iRepeatMSec, 4) + TEST_FIELD_OFFSET(FILTERKEYS, iRepeatMSec, 16) + TEST_FIELD_SIZE (FILTERKEYS, iBounceMSec, 4) + TEST_FIELD_ALIGN (FILTERKEYS, iBounceMSec, 4) + TEST_FIELD_OFFSET(FILTERKEYS, iBounceMSec, 20) } static void test_pack_FLASHWINFO(void) { /* FLASHWINFO (pack 4) */ - TEST_TYPE(FLASHWINFO, 20, 4); - TEST_FIELD(FLASHWINFO, cbSize, 0, 4, 4); - TEST_FIELD(FLASHWINFO, hwnd, 4, 4, 4); - TEST_FIELD(FLASHWINFO, dwFlags, 8, 4, 4); - TEST_FIELD(FLASHWINFO, uCount, 12, 4, 4); - TEST_FIELD(FLASHWINFO, dwTimeout, 16, 4, 4); + TEST_TYPE_SIZE (FLASHWINFO, 20) + TEST_TYPE_ALIGN (FLASHWINFO, 4) + TEST_FIELD_SIZE (FLASHWINFO, cbSize, 4) + TEST_FIELD_ALIGN (FLASHWINFO, cbSize, 4) + TEST_FIELD_OFFSET(FLASHWINFO, cbSize, 0) + TEST_FIELD_SIZE (FLASHWINFO, hwnd, 4) + TEST_FIELD_ALIGN (FLASHWINFO, hwnd, 4) + TEST_FIELD_OFFSET(FLASHWINFO, hwnd, 4) + TEST_FIELD_SIZE (FLASHWINFO, dwFlags, 4) + TEST_FIELD_ALIGN (FLASHWINFO, dwFlags, 4) + TEST_FIELD_OFFSET(FLASHWINFO, dwFlags, 8) + TEST_FIELD_SIZE (FLASHWINFO, uCount, 4) + TEST_FIELD_ALIGN (FLASHWINFO, uCount, 4) + TEST_FIELD_OFFSET(FLASHWINFO, uCount, 12) + TEST_FIELD_SIZE (FLASHWINFO, dwTimeout, 4) + TEST_FIELD_ALIGN (FLASHWINFO, dwTimeout, 4) + TEST_FIELD_OFFSET(FLASHWINFO, dwTimeout, 16) } static void test_pack_GRAYSTRINGPROC(void) { /* GRAYSTRINGPROC */ - TEST_TYPE(GRAYSTRINGPROC, 4, 4); + TEST_TYPE_SIZE (GRAYSTRINGPROC, 4) + TEST_TYPE_ALIGN (GRAYSTRINGPROC, 4) } static void test_pack_GUITHREADINFO(void) { /* GUITHREADINFO (pack 4) */ - TEST_TYPE(GUITHREADINFO, 48, 4); - TEST_FIELD(GUITHREADINFO, cbSize, 0, 4, 4); - TEST_FIELD(GUITHREADINFO, flags, 4, 4, 4); - TEST_FIELD(GUITHREADINFO, hwndActive, 8, 4, 4); - TEST_FIELD(GUITHREADINFO, hwndFocus, 12, 4, 4); - TEST_FIELD(GUITHREADINFO, hwndCapture, 16, 4, 4); - TEST_FIELD(GUITHREADINFO, hwndMenuOwner, 20, 4, 4); - TEST_FIELD(GUITHREADINFO, hwndMoveSize, 24, 4, 4); - TEST_FIELD(GUITHREADINFO, hwndCaret, 28, 4, 4); - TEST_FIELD(GUITHREADINFO, rcCaret, 32, 16, 4); + TEST_TYPE_SIZE (GUITHREADINFO, 48) + TEST_TYPE_ALIGN (GUITHREADINFO, 4) + TEST_FIELD_SIZE (GUITHREADINFO, cbSize, 4) + TEST_FIELD_ALIGN (GUITHREADINFO, cbSize, 4) + TEST_FIELD_OFFSET(GUITHREADINFO, cbSize, 0) + TEST_FIELD_SIZE (GUITHREADINFO, flags, 4) + TEST_FIELD_ALIGN (GUITHREADINFO, flags, 4) + TEST_FIELD_OFFSET(GUITHREADINFO, flags, 4) + TEST_FIELD_SIZE (GUITHREADINFO, hwndActive, 4) + TEST_FIELD_ALIGN (GUITHREADINFO, hwndActive, 4) + TEST_FIELD_OFFSET(GUITHREADINFO, hwndActive, 8) + TEST_FIELD_SIZE (GUITHREADINFO, hwndFocus, 4) + TEST_FIELD_ALIGN (GUITHREADINFO, hwndFocus, 4) + TEST_FIELD_OFFSET(GUITHREADINFO, hwndFocus, 12) + TEST_FIELD_SIZE (GUITHREADINFO, hwndCapture, 4) + TEST_FIELD_ALIGN (GUITHREADINFO, hwndCapture, 4) + TEST_FIELD_OFFSET(GUITHREADINFO, hwndCapture, 16) + TEST_FIELD_SIZE (GUITHREADINFO, hwndMenuOwner, 4) + TEST_FIELD_ALIGN (GUITHREADINFO, hwndMenuOwner, 4) + TEST_FIELD_OFFSET(GUITHREADINFO, hwndMenuOwner, 20) + TEST_FIELD_SIZE (GUITHREADINFO, hwndMoveSize, 4) + TEST_FIELD_ALIGN (GUITHREADINFO, hwndMoveSize, 4) + TEST_FIELD_OFFSET(GUITHREADINFO, hwndMoveSize, 24) + TEST_FIELD_SIZE (GUITHREADINFO, hwndCaret, 4) + TEST_FIELD_ALIGN (GUITHREADINFO, hwndCaret, 4) + TEST_FIELD_OFFSET(GUITHREADINFO, hwndCaret, 28) + TEST_FIELD_SIZE (GUITHREADINFO, rcCaret, 16) + TEST_FIELD_ALIGN (GUITHREADINFO, rcCaret, 4) + TEST_FIELD_OFFSET(GUITHREADINFO, rcCaret, 32) } static void test_pack_HARDWAREHOOKSTRUCT(void) { /* HARDWAREHOOKSTRUCT (pack 4) */ - TEST_TYPE(HARDWAREHOOKSTRUCT, 16, 4); - TEST_FIELD(HARDWAREHOOKSTRUCT, hwnd, 0, 4, 4); - TEST_FIELD(HARDWAREHOOKSTRUCT, message, 4, 4, 4); - TEST_FIELD(HARDWAREHOOKSTRUCT, wParam, 8, 4, 4); - TEST_FIELD(HARDWAREHOOKSTRUCT, lParam, 12, 4, 4); + TEST_TYPE_SIZE (HARDWAREHOOKSTRUCT, 16) + TEST_TYPE_ALIGN (HARDWAREHOOKSTRUCT, 4) + TEST_FIELD_SIZE (HARDWAREHOOKSTRUCT, hwnd, 4) + TEST_FIELD_ALIGN (HARDWAREHOOKSTRUCT, hwnd, 4) + TEST_FIELD_OFFSET(HARDWAREHOOKSTRUCT, hwnd, 0) + TEST_FIELD_SIZE (HARDWAREHOOKSTRUCT, message, 4) + TEST_FIELD_ALIGN (HARDWAREHOOKSTRUCT, message, 4) + TEST_FIELD_OFFSET(HARDWAREHOOKSTRUCT, message, 4) + TEST_FIELD_SIZE (HARDWAREHOOKSTRUCT, wParam, 4) + TEST_FIELD_ALIGN (HARDWAREHOOKSTRUCT, wParam, 4) + TEST_FIELD_OFFSET(HARDWAREHOOKSTRUCT, wParam, 8) + TEST_FIELD_SIZE (HARDWAREHOOKSTRUCT, lParam, 4) + TEST_FIELD_ALIGN (HARDWAREHOOKSTRUCT, lParam, 4) + TEST_FIELD_OFFSET(HARDWAREHOOKSTRUCT, lParam, 12) } static void test_pack_HARDWAREINPUT(void) { /* HARDWAREINPUT (pack 4) */ - TEST_TYPE(HARDWAREINPUT, 8, 4); - TEST_FIELD(HARDWAREINPUT, uMsg, 0, 4, 4); - TEST_FIELD(HARDWAREINPUT, wParamL, 4, 2, 2); - TEST_FIELD(HARDWAREINPUT, wParamH, 6, 2, 2); + TEST_TYPE_SIZE (HARDWAREINPUT, 8) + TEST_TYPE_ALIGN (HARDWAREINPUT, 4) + TEST_FIELD_SIZE (HARDWAREINPUT, uMsg, 4) + TEST_FIELD_ALIGN (HARDWAREINPUT, uMsg, 4) + TEST_FIELD_OFFSET(HARDWAREINPUT, uMsg, 0) + TEST_FIELD_SIZE (HARDWAREINPUT, wParamL, 2) + TEST_FIELD_ALIGN (HARDWAREINPUT, wParamL, 2) + TEST_FIELD_OFFSET(HARDWAREINPUT, wParamL, 4) + TEST_FIELD_SIZE (HARDWAREINPUT, wParamH, 2) + TEST_FIELD_ALIGN (HARDWAREINPUT, wParamH, 2) + TEST_FIELD_OFFSET(HARDWAREINPUT, wParamH, 6) } static void test_pack_HDEVNOTIFY(void) { /* HDEVNOTIFY */ - TEST_TYPE(HDEVNOTIFY, 4, 4); + TEST_TYPE_SIZE (HDEVNOTIFY, 4) + TEST_TYPE_ALIGN (HDEVNOTIFY, 4) } static void test_pack_HDWP(void) { /* HDWP */ - TEST_TYPE(HDWP, 4, 4); + TEST_TYPE_SIZE (HDWP, 4) + TEST_TYPE_ALIGN (HDWP, 4) } static void test_pack_HELPINFO(void) { /* HELPINFO (pack 4) */ - TEST_TYPE(HELPINFO, 28, 4); - TEST_FIELD(HELPINFO, cbSize, 0, 4, 4); - TEST_FIELD(HELPINFO, iContextType, 4, 4, 4); - TEST_FIELD(HELPINFO, iCtrlId, 8, 4, 4); - TEST_FIELD(HELPINFO, hItemHandle, 12, 4, 4); - TEST_FIELD(HELPINFO, dwContextId, 16, 4, 4); - TEST_FIELD(HELPINFO, MousePos, 20, 8, 4); + TEST_TYPE_SIZE (HELPINFO, 28) + TEST_TYPE_ALIGN (HELPINFO, 4) + TEST_FIELD_SIZE (HELPINFO, cbSize, 4) + TEST_FIELD_ALIGN (HELPINFO, cbSize, 4) + TEST_FIELD_OFFSET(HELPINFO, cbSize, 0) + TEST_FIELD_SIZE (HELPINFO, iContextType, 4) + TEST_FIELD_ALIGN (HELPINFO, iContextType, 4) + TEST_FIELD_OFFSET(HELPINFO, iContextType, 4) + TEST_FIELD_SIZE (HELPINFO, iCtrlId, 4) + TEST_FIELD_ALIGN (HELPINFO, iCtrlId, 4) + TEST_FIELD_OFFSET(HELPINFO, iCtrlId, 8) + TEST_FIELD_SIZE (HELPINFO, hItemHandle, 4) + TEST_FIELD_ALIGN (HELPINFO, hItemHandle, 4) + TEST_FIELD_OFFSET(HELPINFO, hItemHandle, 12) + TEST_FIELD_SIZE (HELPINFO, dwContextId, 4) + TEST_FIELD_ALIGN (HELPINFO, dwContextId, 4) + TEST_FIELD_OFFSET(HELPINFO, dwContextId, 16) + TEST_FIELD_SIZE (HELPINFO, MousePos, 8) + TEST_FIELD_ALIGN (HELPINFO, MousePos, 4) + TEST_FIELD_OFFSET(HELPINFO, MousePos, 20) } static void test_pack_HELPWININFOA(void) { /* HELPWININFOA (pack 4) */ - TEST_TYPE(HELPWININFOA, 28, 4); - TEST_FIELD(HELPWININFOA, wStructSize, 0, 4, 4); - TEST_FIELD(HELPWININFOA, x, 4, 4, 4); - TEST_FIELD(HELPWININFOA, y, 8, 4, 4); - TEST_FIELD(HELPWININFOA, dx, 12, 4, 4); - TEST_FIELD(HELPWININFOA, dy, 16, 4, 4); - TEST_FIELD(HELPWININFOA, wMax, 20, 4, 4); - TEST_FIELD(HELPWININFOA, rgchMember, 24, 2, 1); + TEST_TYPE_SIZE (HELPWININFOA, 28) + TEST_TYPE_ALIGN (HELPWININFOA, 4) + TEST_FIELD_SIZE (HELPWININFOA, wStructSize, 4) + TEST_FIELD_ALIGN (HELPWININFOA, wStructSize, 4) + TEST_FIELD_OFFSET(HELPWININFOA, wStructSize, 0) + TEST_FIELD_SIZE (HELPWININFOA, x, 4) + TEST_FIELD_ALIGN (HELPWININFOA, x, 4) + TEST_FIELD_OFFSET(HELPWININFOA, x, 4) + TEST_FIELD_SIZE (HELPWININFOA, y, 4) + TEST_FIELD_ALIGN (HELPWININFOA, y, 4) + TEST_FIELD_OFFSET(HELPWININFOA, y, 8) + TEST_FIELD_SIZE (HELPWININFOA, dx, 4) + TEST_FIELD_ALIGN (HELPWININFOA, dx, 4) + TEST_FIELD_OFFSET(HELPWININFOA, dx, 12) + TEST_FIELD_SIZE (HELPWININFOA, dy, 4) + TEST_FIELD_ALIGN (HELPWININFOA, dy, 4) + TEST_FIELD_OFFSET(HELPWININFOA, dy, 16) + TEST_FIELD_SIZE (HELPWININFOA, wMax, 4) + TEST_FIELD_ALIGN (HELPWININFOA, wMax, 4) + TEST_FIELD_OFFSET(HELPWININFOA, wMax, 20) + TEST_FIELD_SIZE (HELPWININFOA, rgchMember, 2) + TEST_FIELD_ALIGN (HELPWININFOA, rgchMember, 1) + TEST_FIELD_OFFSET(HELPWININFOA, rgchMember, 24) } static void test_pack_HELPWININFOW(void) { /* HELPWININFOW (pack 4) */ - TEST_TYPE(HELPWININFOW, 28, 4); - TEST_FIELD(HELPWININFOW, wStructSize, 0, 4, 4); - TEST_FIELD(HELPWININFOW, x, 4, 4, 4); - TEST_FIELD(HELPWININFOW, y, 8, 4, 4); - TEST_FIELD(HELPWININFOW, dx, 12, 4, 4); - TEST_FIELD(HELPWININFOW, dy, 16, 4, 4); - TEST_FIELD(HELPWININFOW, wMax, 20, 4, 4); - TEST_FIELD(HELPWININFOW, rgchMember, 24, 4, 2); + TEST_TYPE_SIZE (HELPWININFOW, 28) + TEST_TYPE_ALIGN (HELPWININFOW, 4) + TEST_FIELD_SIZE (HELPWININFOW, wStructSize, 4) + TEST_FIELD_ALIGN (HELPWININFOW, wStructSize, 4) + TEST_FIELD_OFFSET(HELPWININFOW, wStructSize, 0) + TEST_FIELD_SIZE (HELPWININFOW, x, 4) + TEST_FIELD_ALIGN (HELPWININFOW, x, 4) + TEST_FIELD_OFFSET(HELPWININFOW, x, 4) + TEST_FIELD_SIZE (HELPWININFOW, y, 4) + TEST_FIELD_ALIGN (HELPWININFOW, y, 4) + TEST_FIELD_OFFSET(HELPWININFOW, y, 8) + TEST_FIELD_SIZE (HELPWININFOW, dx, 4) + TEST_FIELD_ALIGN (HELPWININFOW, dx, 4) + TEST_FIELD_OFFSET(HELPWININFOW, dx, 12) + TEST_FIELD_SIZE (HELPWININFOW, dy, 4) + TEST_FIELD_ALIGN (HELPWININFOW, dy, 4) + TEST_FIELD_OFFSET(HELPWININFOW, dy, 16) + TEST_FIELD_SIZE (HELPWININFOW, wMax, 4) + TEST_FIELD_ALIGN (HELPWININFOW, wMax, 4) + TEST_FIELD_OFFSET(HELPWININFOW, wMax, 20) + TEST_FIELD_SIZE (HELPWININFOW, rgchMember, 4) + TEST_FIELD_ALIGN (HELPWININFOW, rgchMember, 2) + TEST_FIELD_OFFSET(HELPWININFOW, rgchMember, 24) } static void test_pack_HIGHCONTRASTA(void) { /* HIGHCONTRASTA (pack 4) */ - TEST_TYPE(HIGHCONTRASTA, 12, 4); - TEST_FIELD(HIGHCONTRASTA, cbSize, 0, 4, 4); - TEST_FIELD(HIGHCONTRASTA, dwFlags, 4, 4, 4); - TEST_FIELD(HIGHCONTRASTA, lpszDefaultScheme, 8, 4, 4); + TEST_TYPE_SIZE (HIGHCONTRASTA, 12) + TEST_TYPE_ALIGN (HIGHCONTRASTA, 4) + TEST_FIELD_SIZE (HIGHCONTRASTA, cbSize, 4) + TEST_FIELD_ALIGN (HIGHCONTRASTA, cbSize, 4) + TEST_FIELD_OFFSET(HIGHCONTRASTA, cbSize, 0) + TEST_FIELD_SIZE (HIGHCONTRASTA, dwFlags, 4) + TEST_FIELD_ALIGN (HIGHCONTRASTA, dwFlags, 4) + TEST_FIELD_OFFSET(HIGHCONTRASTA, dwFlags, 4) + TEST_FIELD_SIZE (HIGHCONTRASTA, lpszDefaultScheme, 4) + TEST_FIELD_ALIGN (HIGHCONTRASTA, lpszDefaultScheme, 4) + TEST_FIELD_OFFSET(HIGHCONTRASTA, lpszDefaultScheme, 8) } static void test_pack_HIGHCONTRASTW(void) { /* HIGHCONTRASTW (pack 4) */ - TEST_TYPE(HIGHCONTRASTW, 12, 4); - TEST_FIELD(HIGHCONTRASTW, cbSize, 0, 4, 4); - TEST_FIELD(HIGHCONTRASTW, dwFlags, 4, 4, 4); - TEST_FIELD(HIGHCONTRASTW, lpszDefaultScheme, 8, 4, 4); + TEST_TYPE_SIZE (HIGHCONTRASTW, 12) + TEST_TYPE_ALIGN (HIGHCONTRASTW, 4) + TEST_FIELD_SIZE (HIGHCONTRASTW, cbSize, 4) + TEST_FIELD_ALIGN (HIGHCONTRASTW, cbSize, 4) + TEST_FIELD_OFFSET(HIGHCONTRASTW, cbSize, 0) + TEST_FIELD_SIZE (HIGHCONTRASTW, dwFlags, 4) + TEST_FIELD_ALIGN (HIGHCONTRASTW, dwFlags, 4) + TEST_FIELD_OFFSET(HIGHCONTRASTW, dwFlags, 4) + TEST_FIELD_SIZE (HIGHCONTRASTW, lpszDefaultScheme, 4) + TEST_FIELD_ALIGN (HIGHCONTRASTW, lpszDefaultScheme, 4) + TEST_FIELD_OFFSET(HIGHCONTRASTW, lpszDefaultScheme, 8) } static void test_pack_HOOKPROC(void) { /* HOOKPROC */ - TEST_TYPE(HOOKPROC, 4, 4); + TEST_TYPE_SIZE (HOOKPROC, 4) + TEST_TYPE_ALIGN (HOOKPROC, 4) } static void test_pack_ICONINFO(void) { /* ICONINFO (pack 4) */ - TEST_TYPE(ICONINFO, 20, 4); - TEST_FIELD(ICONINFO, fIcon, 0, 4, 4); - TEST_FIELD(ICONINFO, xHotspot, 4, 4, 4); - TEST_FIELD(ICONINFO, yHotspot, 8, 4, 4); - TEST_FIELD(ICONINFO, hbmMask, 12, 4, 4); - TEST_FIELD(ICONINFO, hbmColor, 16, 4, 4); + TEST_TYPE_SIZE (ICONINFO, 20) + TEST_TYPE_ALIGN (ICONINFO, 4) + TEST_FIELD_SIZE (ICONINFO, fIcon, 4) + TEST_FIELD_ALIGN (ICONINFO, fIcon, 4) + TEST_FIELD_OFFSET(ICONINFO, fIcon, 0) + TEST_FIELD_SIZE (ICONINFO, xHotspot, 4) + TEST_FIELD_ALIGN (ICONINFO, xHotspot, 4) + TEST_FIELD_OFFSET(ICONINFO, xHotspot, 4) + TEST_FIELD_SIZE (ICONINFO, yHotspot, 4) + TEST_FIELD_ALIGN (ICONINFO, yHotspot, 4) + TEST_FIELD_OFFSET(ICONINFO, yHotspot, 8) + TEST_FIELD_SIZE (ICONINFO, hbmMask, 4) + TEST_FIELD_ALIGN (ICONINFO, hbmMask, 4) + TEST_FIELD_OFFSET(ICONINFO, hbmMask, 12) + TEST_FIELD_SIZE (ICONINFO, hbmColor, 4) + TEST_FIELD_ALIGN (ICONINFO, hbmColor, 4) + TEST_FIELD_OFFSET(ICONINFO, hbmColor, 16) } static void test_pack_ICONMETRICSA(void) { /* ICONMETRICSA (pack 4) */ - TEST_TYPE(ICONMETRICSA, 76, 4); - TEST_FIELD(ICONMETRICSA, cbSize, 0, 4, 4); - TEST_FIELD(ICONMETRICSA, iHorzSpacing, 4, 4, 4); - TEST_FIELD(ICONMETRICSA, iVertSpacing, 8, 4, 4); - TEST_FIELD(ICONMETRICSA, iTitleWrap, 12, 4, 4); - TEST_FIELD(ICONMETRICSA, lfFont, 16, 60, 4); + TEST_TYPE_SIZE (ICONMETRICSA, 76) + TEST_TYPE_ALIGN (ICONMETRICSA, 4) + TEST_FIELD_SIZE (ICONMETRICSA, cbSize, 4) + TEST_FIELD_ALIGN (ICONMETRICSA, cbSize, 4) + TEST_FIELD_OFFSET(ICONMETRICSA, cbSize, 0) + TEST_FIELD_SIZE (ICONMETRICSA, iHorzSpacing, 4) + TEST_FIELD_ALIGN (ICONMETRICSA, iHorzSpacing, 4) + TEST_FIELD_OFFSET(ICONMETRICSA, iHorzSpacing, 4) + TEST_FIELD_SIZE (ICONMETRICSA, iVertSpacing, 4) + TEST_FIELD_ALIGN (ICONMETRICSA, iVertSpacing, 4) + TEST_FIELD_OFFSET(ICONMETRICSA, iVertSpacing, 8) + TEST_FIELD_SIZE (ICONMETRICSA, iTitleWrap, 4) + TEST_FIELD_ALIGN (ICONMETRICSA, iTitleWrap, 4) + TEST_FIELD_OFFSET(ICONMETRICSA, iTitleWrap, 12) + TEST_FIELD_SIZE (ICONMETRICSA, lfFont, 60) + TEST_FIELD_ALIGN (ICONMETRICSA, lfFont, 4) + TEST_FIELD_OFFSET(ICONMETRICSA, lfFont, 16) } static void test_pack_ICONMETRICSW(void) { /* ICONMETRICSW (pack 4) */ - TEST_TYPE(ICONMETRICSW, 108, 4); - TEST_FIELD(ICONMETRICSW, cbSize, 0, 4, 4); - TEST_FIELD(ICONMETRICSW, iHorzSpacing, 4, 4, 4); - TEST_FIELD(ICONMETRICSW, iVertSpacing, 8, 4, 4); - TEST_FIELD(ICONMETRICSW, iTitleWrap, 12, 4, 4); - TEST_FIELD(ICONMETRICSW, lfFont, 16, 92, 4); + TEST_TYPE_SIZE (ICONMETRICSW, 108) + TEST_TYPE_ALIGN (ICONMETRICSW, 4) + TEST_FIELD_SIZE (ICONMETRICSW, cbSize, 4) + TEST_FIELD_ALIGN (ICONMETRICSW, cbSize, 4) + TEST_FIELD_OFFSET(ICONMETRICSW, cbSize, 0) + TEST_FIELD_SIZE (ICONMETRICSW, iHorzSpacing, 4) + TEST_FIELD_ALIGN (ICONMETRICSW, iHorzSpacing, 4) + TEST_FIELD_OFFSET(ICONMETRICSW, iHorzSpacing, 4) + TEST_FIELD_SIZE (ICONMETRICSW, iVertSpacing, 4) + TEST_FIELD_ALIGN (ICONMETRICSW, iVertSpacing, 4) + TEST_FIELD_OFFSET(ICONMETRICSW, iVertSpacing, 8) + TEST_FIELD_SIZE (ICONMETRICSW, iTitleWrap, 4) + TEST_FIELD_ALIGN (ICONMETRICSW, iTitleWrap, 4) + TEST_FIELD_OFFSET(ICONMETRICSW, iTitleWrap, 12) + TEST_FIELD_SIZE (ICONMETRICSW, lfFont, 92) + TEST_FIELD_ALIGN (ICONMETRICSW, lfFont, 4) + TEST_FIELD_OFFSET(ICONMETRICSW, lfFont, 16) } static void test_pack_INPUT(void) { /* INPUT (pack 4) */ - TEST_FIELD(INPUT, type, 0, 4, 4); + TEST_FIELD_SIZE (INPUT, type, 4) + TEST_FIELD_ALIGN (INPUT, type, 4) + TEST_FIELD_OFFSET(INPUT, type, 0) } static void test_pack_KBDLLHOOKSTRUCT(void) { /* KBDLLHOOKSTRUCT (pack 4) */ - TEST_TYPE(KBDLLHOOKSTRUCT, 20, 4); - TEST_FIELD(KBDLLHOOKSTRUCT, vkCode, 0, 4, 4); - TEST_FIELD(KBDLLHOOKSTRUCT, scanCode, 4, 4, 4); - TEST_FIELD(KBDLLHOOKSTRUCT, flags, 8, 4, 4); - TEST_FIELD(KBDLLHOOKSTRUCT, time, 12, 4, 4); - TEST_FIELD(KBDLLHOOKSTRUCT, dwExtraInfo, 16, 4, 4); + TEST_TYPE_SIZE (KBDLLHOOKSTRUCT, 20) + TEST_TYPE_ALIGN (KBDLLHOOKSTRUCT, 4) + TEST_FIELD_SIZE (KBDLLHOOKSTRUCT, vkCode, 4) + TEST_FIELD_ALIGN (KBDLLHOOKSTRUCT, vkCode, 4) + TEST_FIELD_OFFSET(KBDLLHOOKSTRUCT, vkCode, 0) + TEST_FIELD_SIZE (KBDLLHOOKSTRUCT, scanCode, 4) + TEST_FIELD_ALIGN (KBDLLHOOKSTRUCT, scanCode, 4) + TEST_FIELD_OFFSET(KBDLLHOOKSTRUCT, scanCode, 4) + TEST_FIELD_SIZE (KBDLLHOOKSTRUCT, flags, 4) + TEST_FIELD_ALIGN (KBDLLHOOKSTRUCT, flags, 4) + TEST_FIELD_OFFSET(KBDLLHOOKSTRUCT, flags, 8) + TEST_FIELD_SIZE (KBDLLHOOKSTRUCT, time, 4) + TEST_FIELD_ALIGN (KBDLLHOOKSTRUCT, time, 4) + TEST_FIELD_OFFSET(KBDLLHOOKSTRUCT, time, 12) + TEST_FIELD_SIZE (KBDLLHOOKSTRUCT, dwExtraInfo, 4) + TEST_FIELD_ALIGN (KBDLLHOOKSTRUCT, dwExtraInfo, 4) + TEST_FIELD_OFFSET(KBDLLHOOKSTRUCT, dwExtraInfo, 16) } static void test_pack_KEYBDINPUT(void) { /* KEYBDINPUT (pack 4) */ - TEST_TYPE(KEYBDINPUT, 16, 4); - TEST_FIELD(KEYBDINPUT, wVk, 0, 2, 2); - TEST_FIELD(KEYBDINPUT, wScan, 2, 2, 2); - TEST_FIELD(KEYBDINPUT, dwFlags, 4, 4, 4); - TEST_FIELD(KEYBDINPUT, time, 8, 4, 4); - TEST_FIELD(KEYBDINPUT, dwExtraInfo, 12, 4, 4); + TEST_TYPE_SIZE (KEYBDINPUT, 16) + TEST_TYPE_ALIGN (KEYBDINPUT, 4) + TEST_FIELD_SIZE (KEYBDINPUT, wVk, 2) + TEST_FIELD_ALIGN (KEYBDINPUT, wVk, 2) + TEST_FIELD_OFFSET(KEYBDINPUT, wVk, 0) + TEST_FIELD_SIZE (KEYBDINPUT, wScan, 2) + TEST_FIELD_ALIGN (KEYBDINPUT, wScan, 2) + TEST_FIELD_OFFSET(KEYBDINPUT, wScan, 2) + TEST_FIELD_SIZE (KEYBDINPUT, dwFlags, 4) + TEST_FIELD_ALIGN (KEYBDINPUT, dwFlags, 4) + TEST_FIELD_OFFSET(KEYBDINPUT, dwFlags, 4) + TEST_FIELD_SIZE (KEYBDINPUT, time, 4) + TEST_FIELD_ALIGN (KEYBDINPUT, time, 4) + TEST_FIELD_OFFSET(KEYBDINPUT, time, 8) + TEST_FIELD_SIZE (KEYBDINPUT, dwExtraInfo, 4) + TEST_FIELD_ALIGN (KEYBDINPUT, dwExtraInfo, 4) + TEST_FIELD_OFFSET(KEYBDINPUT, dwExtraInfo, 12) } static void test_pack_LPACCESSTIMEOUT(void) { /* LPACCESSTIMEOUT */ - TEST_TYPE(LPACCESSTIMEOUT, 4, 4); - TEST_TYPE_POINTER(LPACCESSTIMEOUT, 12, 4); + TEST_TYPE_SIZE (LPACCESSTIMEOUT, 4) + TEST_TYPE_ALIGN (LPACCESSTIMEOUT, 4) + TEST_TARGET_SIZE (LPACCESSTIMEOUT, 12) + TEST_TARGET_ALIGN(LPACCESSTIMEOUT, 4) } static void test_pack_LPANIMATIONINFO(void) { /* LPANIMATIONINFO */ - TEST_TYPE(LPANIMATIONINFO, 4, 4); - TEST_TYPE_POINTER(LPANIMATIONINFO, 8, 4); + TEST_TYPE_SIZE (LPANIMATIONINFO, 4) + TEST_TYPE_ALIGN (LPANIMATIONINFO, 4) + TEST_TARGET_SIZE (LPANIMATIONINFO, 8) + TEST_TARGET_ALIGN(LPANIMATIONINFO, 4) } static void test_pack_LPCBTACTIVATESTRUCT(void) { /* LPCBTACTIVATESTRUCT */ - TEST_TYPE(LPCBTACTIVATESTRUCT, 4, 4); - TEST_TYPE_POINTER(LPCBTACTIVATESTRUCT, 8, 4); + TEST_TYPE_SIZE (LPCBTACTIVATESTRUCT, 4) + TEST_TYPE_ALIGN (LPCBTACTIVATESTRUCT, 4) + TEST_TARGET_SIZE (LPCBTACTIVATESTRUCT, 8) + TEST_TARGET_ALIGN(LPCBTACTIVATESTRUCT, 4) } static void test_pack_LPCBT_CREATEWNDA(void) { /* LPCBT_CREATEWNDA */ - TEST_TYPE(LPCBT_CREATEWNDA, 4, 4); - TEST_TYPE_POINTER(LPCBT_CREATEWNDA, 8, 4); + TEST_TYPE_SIZE (LPCBT_CREATEWNDA, 4) + TEST_TYPE_ALIGN (LPCBT_CREATEWNDA, 4) + TEST_TARGET_SIZE (LPCBT_CREATEWNDA, 8) + TEST_TARGET_ALIGN(LPCBT_CREATEWNDA, 4) } static void test_pack_LPCBT_CREATEWNDW(void) { /* LPCBT_CREATEWNDW */ - TEST_TYPE(LPCBT_CREATEWNDW, 4, 4); - TEST_TYPE_POINTER(LPCBT_CREATEWNDW, 8, 4); + TEST_TYPE_SIZE (LPCBT_CREATEWNDW, 4) + TEST_TYPE_ALIGN (LPCBT_CREATEWNDW, 4) + TEST_TARGET_SIZE (LPCBT_CREATEWNDW, 8) + TEST_TARGET_ALIGN(LPCBT_CREATEWNDW, 4) } static void test_pack_LPCDLGTEMPLATEA(void) { /* LPCDLGTEMPLATEA */ - TEST_TYPE(LPCDLGTEMPLATEA, 4, 4); - TEST_TYPE_POINTER(LPCDLGTEMPLATEA, 18, 2); + TEST_TYPE_SIZE (LPCDLGTEMPLATEA, 4) + TEST_TYPE_ALIGN (LPCDLGTEMPLATEA, 4) + TEST_TARGET_SIZE (LPCDLGTEMPLATEA, 18) + TEST_TARGET_ALIGN(LPCDLGTEMPLATEA, 2) } static void test_pack_LPCDLGTEMPLATEW(void) { /* LPCDLGTEMPLATEW */ - TEST_TYPE(LPCDLGTEMPLATEW, 4, 4); - TEST_TYPE_POINTER(LPCDLGTEMPLATEW, 18, 2); + TEST_TYPE_SIZE (LPCDLGTEMPLATEW, 4) + TEST_TYPE_ALIGN (LPCDLGTEMPLATEW, 4) + TEST_TARGET_SIZE (LPCDLGTEMPLATEW, 18) + TEST_TARGET_ALIGN(LPCDLGTEMPLATEW, 2) } static void test_pack_LPCLIENTCREATESTRUCT(void) { /* LPCLIENTCREATESTRUCT */ - TEST_TYPE(LPCLIENTCREATESTRUCT, 4, 4); - TEST_TYPE_POINTER(LPCLIENTCREATESTRUCT, 8, 4); + TEST_TYPE_SIZE (LPCLIENTCREATESTRUCT, 4) + TEST_TYPE_ALIGN (LPCLIENTCREATESTRUCT, 4) + TEST_TARGET_SIZE (LPCLIENTCREATESTRUCT, 8) + TEST_TARGET_ALIGN(LPCLIENTCREATESTRUCT, 4) } static void test_pack_LPCMENUINFO(void) { /* LPCMENUINFO */ - TEST_TYPE(LPCMENUINFO, 4, 4); - TEST_TYPE_POINTER(LPCMENUINFO, 28, 4); + TEST_TYPE_SIZE (LPCMENUINFO, 4) + TEST_TYPE_ALIGN (LPCMENUINFO, 4) + TEST_TARGET_SIZE (LPCMENUINFO, 28) + TEST_TARGET_ALIGN(LPCMENUINFO, 4) } static void test_pack_LPCMENUITEMINFOA(void) { /* LPCMENUITEMINFOA */ - TEST_TYPE(LPCMENUITEMINFOA, 4, 4); - TEST_TYPE_POINTER(LPCMENUITEMINFOA, 48, 4); + TEST_TYPE_SIZE (LPCMENUITEMINFOA, 4) + TEST_TYPE_ALIGN (LPCMENUITEMINFOA, 4) + TEST_TARGET_SIZE (LPCMENUITEMINFOA, 48) + TEST_TARGET_ALIGN(LPCMENUITEMINFOA, 4) } static void test_pack_LPCMENUITEMINFOW(void) { /* LPCMENUITEMINFOW */ - TEST_TYPE(LPCMENUITEMINFOW, 4, 4); - TEST_TYPE_POINTER(LPCMENUITEMINFOW, 48, 4); + TEST_TYPE_SIZE (LPCMENUITEMINFOW, 4) + TEST_TYPE_ALIGN (LPCMENUITEMINFOW, 4) + TEST_TARGET_SIZE (LPCMENUITEMINFOW, 48) + TEST_TARGET_ALIGN(LPCMENUITEMINFOW, 4) } static void test_pack_LPCOMBOBOXINFO(void) { /* LPCOMBOBOXINFO */ - TEST_TYPE(LPCOMBOBOXINFO, 4, 4); - TEST_TYPE_POINTER(LPCOMBOBOXINFO, 52, 4); + TEST_TYPE_SIZE (LPCOMBOBOXINFO, 4) + TEST_TYPE_ALIGN (LPCOMBOBOXINFO, 4) + TEST_TARGET_SIZE (LPCOMBOBOXINFO, 52) + TEST_TARGET_ALIGN(LPCOMBOBOXINFO, 4) } static void test_pack_LPCOMPAREITEMSTRUCT(void) { /* LPCOMPAREITEMSTRUCT */ - TEST_TYPE(LPCOMPAREITEMSTRUCT, 4, 4); - TEST_TYPE_POINTER(LPCOMPAREITEMSTRUCT, 32, 4); + TEST_TYPE_SIZE (LPCOMPAREITEMSTRUCT, 4) + TEST_TYPE_ALIGN (LPCOMPAREITEMSTRUCT, 4) + TEST_TARGET_SIZE (LPCOMPAREITEMSTRUCT, 32) + TEST_TARGET_ALIGN(LPCOMPAREITEMSTRUCT, 4) } static void test_pack_LPCREATESTRUCTA(void) { /* LPCREATESTRUCTA */ - TEST_TYPE(LPCREATESTRUCTA, 4, 4); - TEST_TYPE_POINTER(LPCREATESTRUCTA, 48, 4); + TEST_TYPE_SIZE (LPCREATESTRUCTA, 4) + TEST_TYPE_ALIGN (LPCREATESTRUCTA, 4) + TEST_TARGET_SIZE (LPCREATESTRUCTA, 48) + TEST_TARGET_ALIGN(LPCREATESTRUCTA, 4) } static void test_pack_LPCREATESTRUCTW(void) { /* LPCREATESTRUCTW */ - TEST_TYPE(LPCREATESTRUCTW, 4, 4); - TEST_TYPE_POINTER(LPCREATESTRUCTW, 48, 4); + TEST_TYPE_SIZE (LPCREATESTRUCTW, 4) + TEST_TYPE_ALIGN (LPCREATESTRUCTW, 4) + TEST_TARGET_SIZE (LPCREATESTRUCTW, 48) + TEST_TARGET_ALIGN(LPCREATESTRUCTW, 4) } static void test_pack_LPCSCROLLINFO(void) { /* LPCSCROLLINFO */ - TEST_TYPE(LPCSCROLLINFO, 4, 4); - TEST_TYPE_POINTER(LPCSCROLLINFO, 28, 4); + TEST_TYPE_SIZE (LPCSCROLLINFO, 4) + TEST_TYPE_ALIGN (LPCSCROLLINFO, 4) + TEST_TARGET_SIZE (LPCSCROLLINFO, 28) + TEST_TARGET_ALIGN(LPCSCROLLINFO, 4) } static void test_pack_LPCURSORINFO(void) { /* LPCURSORINFO */ - TEST_TYPE(LPCURSORINFO, 4, 4); - TEST_TYPE_POINTER(LPCURSORINFO, 20, 4); + TEST_TYPE_SIZE (LPCURSORINFO, 4) + TEST_TYPE_ALIGN (LPCURSORINFO, 4) + TEST_TARGET_SIZE (LPCURSORINFO, 20) + TEST_TARGET_ALIGN(LPCURSORINFO, 4) } static void test_pack_LPCWPRETSTRUCT(void) { /* LPCWPRETSTRUCT */ - TEST_TYPE(LPCWPRETSTRUCT, 4, 4); - TEST_TYPE_POINTER(LPCWPRETSTRUCT, 20, 4); + TEST_TYPE_SIZE (LPCWPRETSTRUCT, 4) + TEST_TYPE_ALIGN (LPCWPRETSTRUCT, 4) + TEST_TARGET_SIZE (LPCWPRETSTRUCT, 20) + TEST_TARGET_ALIGN(LPCWPRETSTRUCT, 4) } static void test_pack_LPCWPSTRUCT(void) { /* LPCWPSTRUCT */ - TEST_TYPE(LPCWPSTRUCT, 4, 4); - TEST_TYPE_POINTER(LPCWPSTRUCT, 16, 4); + TEST_TYPE_SIZE (LPCWPSTRUCT, 4) + TEST_TYPE_ALIGN (LPCWPSTRUCT, 4) + TEST_TARGET_SIZE (LPCWPSTRUCT, 16) + TEST_TARGET_ALIGN(LPCWPSTRUCT, 4) } static void test_pack_LPDEBUGHOOKINFO(void) { /* LPDEBUGHOOKINFO */ - TEST_TYPE(LPDEBUGHOOKINFO, 4, 4); - TEST_TYPE_POINTER(LPDEBUGHOOKINFO, 20, 4); + TEST_TYPE_SIZE (LPDEBUGHOOKINFO, 4) + TEST_TYPE_ALIGN (LPDEBUGHOOKINFO, 4) + TEST_TARGET_SIZE (LPDEBUGHOOKINFO, 20) + TEST_TARGET_ALIGN(LPDEBUGHOOKINFO, 4) } static void test_pack_LPDELETEITEMSTRUCT(void) { /* LPDELETEITEMSTRUCT */ - TEST_TYPE(LPDELETEITEMSTRUCT, 4, 4); - TEST_TYPE_POINTER(LPDELETEITEMSTRUCT, 20, 4); + TEST_TYPE_SIZE (LPDELETEITEMSTRUCT, 4) + TEST_TYPE_ALIGN (LPDELETEITEMSTRUCT, 4) + TEST_TARGET_SIZE (LPDELETEITEMSTRUCT, 20) + TEST_TARGET_ALIGN(LPDELETEITEMSTRUCT, 4) } static void test_pack_LPDLGITEMTEMPLATEA(void) { /* LPDLGITEMTEMPLATEA */ - TEST_TYPE(LPDLGITEMTEMPLATEA, 4, 4); - TEST_TYPE_POINTER(LPDLGITEMTEMPLATEA, 18, 2); + TEST_TYPE_SIZE (LPDLGITEMTEMPLATEA, 4) + TEST_TYPE_ALIGN (LPDLGITEMTEMPLATEA, 4) + TEST_TARGET_SIZE (LPDLGITEMTEMPLATEA, 18) + TEST_TARGET_ALIGN(LPDLGITEMTEMPLATEA, 2) } static void test_pack_LPDLGITEMTEMPLATEW(void) { /* LPDLGITEMTEMPLATEW */ - TEST_TYPE(LPDLGITEMTEMPLATEW, 4, 4); - TEST_TYPE_POINTER(LPDLGITEMTEMPLATEW, 18, 2); + TEST_TYPE_SIZE (LPDLGITEMTEMPLATEW, 4) + TEST_TYPE_ALIGN (LPDLGITEMTEMPLATEW, 4) + TEST_TARGET_SIZE (LPDLGITEMTEMPLATEW, 18) + TEST_TARGET_ALIGN(LPDLGITEMTEMPLATEW, 2) } static void test_pack_LPDLGTEMPLATEA(void) { /* LPDLGTEMPLATEA */ - TEST_TYPE(LPDLGTEMPLATEA, 4, 4); - TEST_TYPE_POINTER(LPDLGTEMPLATEA, 18, 2); + TEST_TYPE_SIZE (LPDLGTEMPLATEA, 4) + TEST_TYPE_ALIGN (LPDLGTEMPLATEA, 4) + TEST_TARGET_SIZE (LPDLGTEMPLATEA, 18) + TEST_TARGET_ALIGN(LPDLGTEMPLATEA, 2) } static void test_pack_LPDLGTEMPLATEW(void) { /* LPDLGTEMPLATEW */ - TEST_TYPE(LPDLGTEMPLATEW, 4, 4); - TEST_TYPE_POINTER(LPDLGTEMPLATEW, 18, 2); + TEST_TYPE_SIZE (LPDLGTEMPLATEW, 4) + TEST_TYPE_ALIGN (LPDLGTEMPLATEW, 4) + TEST_TARGET_SIZE (LPDLGTEMPLATEW, 18) + TEST_TARGET_ALIGN(LPDLGTEMPLATEW, 2) } static void test_pack_LPDRAWITEMSTRUCT(void) { /* LPDRAWITEMSTRUCT */ - TEST_TYPE(LPDRAWITEMSTRUCT, 4, 4); - TEST_TYPE_POINTER(LPDRAWITEMSTRUCT, 48, 4); + TEST_TYPE_SIZE (LPDRAWITEMSTRUCT, 4) + TEST_TYPE_ALIGN (LPDRAWITEMSTRUCT, 4) + TEST_TARGET_SIZE (LPDRAWITEMSTRUCT, 48) + TEST_TARGET_ALIGN(LPDRAWITEMSTRUCT, 4) } static void test_pack_LPDRAWTEXTPARAMS(void) { /* LPDRAWTEXTPARAMS */ - TEST_TYPE(LPDRAWTEXTPARAMS, 4, 4); - TEST_TYPE_POINTER(LPDRAWTEXTPARAMS, 20, 4); + TEST_TYPE_SIZE (LPDRAWTEXTPARAMS, 4) + TEST_TYPE_ALIGN (LPDRAWTEXTPARAMS, 4) + TEST_TARGET_SIZE (LPDRAWTEXTPARAMS, 20) + TEST_TARGET_ALIGN(LPDRAWTEXTPARAMS, 4) } static void test_pack_LPEVENTMSG(void) { /* LPEVENTMSG */ - TEST_TYPE(LPEVENTMSG, 4, 4); - TEST_TYPE_POINTER(LPEVENTMSG, 20, 4); + TEST_TYPE_SIZE (LPEVENTMSG, 4) + TEST_TYPE_ALIGN (LPEVENTMSG, 4) + TEST_TARGET_SIZE (LPEVENTMSG, 20) + TEST_TARGET_ALIGN(LPEVENTMSG, 4) } static void test_pack_LPFILTERKEYS(void) { /* LPFILTERKEYS */ - TEST_TYPE(LPFILTERKEYS, 4, 4); - TEST_TYPE_POINTER(LPFILTERKEYS, 24, 4); + TEST_TYPE_SIZE (LPFILTERKEYS, 4) + TEST_TYPE_ALIGN (LPFILTERKEYS, 4) + TEST_TARGET_SIZE (LPFILTERKEYS, 24) + TEST_TARGET_ALIGN(LPFILTERKEYS, 4) } static void test_pack_LPGUITHREADINFO(void) { /* LPGUITHREADINFO */ - TEST_TYPE(LPGUITHREADINFO, 4, 4); - TEST_TYPE_POINTER(LPGUITHREADINFO, 48, 4); + TEST_TYPE_SIZE (LPGUITHREADINFO, 4) + TEST_TYPE_ALIGN (LPGUITHREADINFO, 4) + TEST_TARGET_SIZE (LPGUITHREADINFO, 48) + TEST_TARGET_ALIGN(LPGUITHREADINFO, 4) } static void test_pack_LPHARDWAREHOOKSTRUCT(void) { /* LPHARDWAREHOOKSTRUCT */ - TEST_TYPE(LPHARDWAREHOOKSTRUCT, 4, 4); - TEST_TYPE_POINTER(LPHARDWAREHOOKSTRUCT, 16, 4); + TEST_TYPE_SIZE (LPHARDWAREHOOKSTRUCT, 4) + TEST_TYPE_ALIGN (LPHARDWAREHOOKSTRUCT, 4) + TEST_TARGET_SIZE (LPHARDWAREHOOKSTRUCT, 16) + TEST_TARGET_ALIGN(LPHARDWAREHOOKSTRUCT, 4) } static void test_pack_LPHARDWAREINPUT(void) { /* LPHARDWAREINPUT */ - TEST_TYPE(LPHARDWAREINPUT, 4, 4); - TEST_TYPE_POINTER(LPHARDWAREINPUT, 8, 4); + TEST_TYPE_SIZE (LPHARDWAREINPUT, 4) + TEST_TYPE_ALIGN (LPHARDWAREINPUT, 4) + TEST_TARGET_SIZE (LPHARDWAREINPUT, 8) + TEST_TARGET_ALIGN(LPHARDWAREINPUT, 4) } static void test_pack_LPHELPINFO(void) { /* LPHELPINFO */ - TEST_TYPE(LPHELPINFO, 4, 4); - TEST_TYPE_POINTER(LPHELPINFO, 28, 4); + TEST_TYPE_SIZE (LPHELPINFO, 4) + TEST_TYPE_ALIGN (LPHELPINFO, 4) + TEST_TARGET_SIZE (LPHELPINFO, 28) + TEST_TARGET_ALIGN(LPHELPINFO, 4) } static void test_pack_LPHELPWININFOA(void) { /* LPHELPWININFOA */ - TEST_TYPE(LPHELPWININFOA, 4, 4); - TEST_TYPE_POINTER(LPHELPWININFOA, 28, 4); + TEST_TYPE_SIZE (LPHELPWININFOA, 4) + TEST_TYPE_ALIGN (LPHELPWININFOA, 4) + TEST_TARGET_SIZE (LPHELPWININFOA, 28) + TEST_TARGET_ALIGN(LPHELPWININFOA, 4) } static void test_pack_LPHELPWININFOW(void) { /* LPHELPWININFOW */ - TEST_TYPE(LPHELPWININFOW, 4, 4); - TEST_TYPE_POINTER(LPHELPWININFOW, 28, 4); + TEST_TYPE_SIZE (LPHELPWININFOW, 4) + TEST_TYPE_ALIGN (LPHELPWININFOW, 4) + TEST_TARGET_SIZE (LPHELPWININFOW, 28) + TEST_TARGET_ALIGN(LPHELPWININFOW, 4) } static void test_pack_LPHIGHCONTRASTA(void) { /* LPHIGHCONTRASTA */ - TEST_TYPE(LPHIGHCONTRASTA, 4, 4); - TEST_TYPE_POINTER(LPHIGHCONTRASTA, 12, 4); + TEST_TYPE_SIZE (LPHIGHCONTRASTA, 4) + TEST_TYPE_ALIGN (LPHIGHCONTRASTA, 4) + TEST_TARGET_SIZE (LPHIGHCONTRASTA, 12) + TEST_TARGET_ALIGN(LPHIGHCONTRASTA, 4) } static void test_pack_LPHIGHCONTRASTW(void) { /* LPHIGHCONTRASTW */ - TEST_TYPE(LPHIGHCONTRASTW, 4, 4); - TEST_TYPE_POINTER(LPHIGHCONTRASTW, 12, 4); + TEST_TYPE_SIZE (LPHIGHCONTRASTW, 4) + TEST_TYPE_ALIGN (LPHIGHCONTRASTW, 4) + TEST_TARGET_SIZE (LPHIGHCONTRASTW, 12) + TEST_TARGET_ALIGN(LPHIGHCONTRASTW, 4) } static void test_pack_LPICONMETRICSA(void) { /* LPICONMETRICSA */ - TEST_TYPE(LPICONMETRICSA, 4, 4); - TEST_TYPE_POINTER(LPICONMETRICSA, 76, 4); + TEST_TYPE_SIZE (LPICONMETRICSA, 4) + TEST_TYPE_ALIGN (LPICONMETRICSA, 4) + TEST_TARGET_SIZE (LPICONMETRICSA, 76) + TEST_TARGET_ALIGN(LPICONMETRICSA, 4) } static void test_pack_LPICONMETRICSW(void) { /* LPICONMETRICSW */ - TEST_TYPE(LPICONMETRICSW, 4, 4); - TEST_TYPE_POINTER(LPICONMETRICSW, 108, 4); + TEST_TYPE_SIZE (LPICONMETRICSW, 4) + TEST_TYPE_ALIGN (LPICONMETRICSW, 4) + TEST_TARGET_SIZE (LPICONMETRICSW, 108) + TEST_TARGET_ALIGN(LPICONMETRICSW, 4) } static void test_pack_LPINPUT(void) { /* LPINPUT */ - TEST_TYPE(LPINPUT, 4, 4); + TEST_TYPE_SIZE (LPINPUT, 4) + TEST_TYPE_ALIGN (LPINPUT, 4) } static void test_pack_LPKBDLLHOOKSTRUCT(void) { /* LPKBDLLHOOKSTRUCT */ - TEST_TYPE(LPKBDLLHOOKSTRUCT, 4, 4); - TEST_TYPE_POINTER(LPKBDLLHOOKSTRUCT, 20, 4); + TEST_TYPE_SIZE (LPKBDLLHOOKSTRUCT, 4) + TEST_TYPE_ALIGN (LPKBDLLHOOKSTRUCT, 4) + TEST_TARGET_SIZE (LPKBDLLHOOKSTRUCT, 20) + TEST_TARGET_ALIGN(LPKBDLLHOOKSTRUCT, 4) } static void test_pack_LPKEYBDINPUT(void) { /* LPKEYBDINPUT */ - TEST_TYPE(LPKEYBDINPUT, 4, 4); - TEST_TYPE_POINTER(LPKEYBDINPUT, 16, 4); + TEST_TYPE_SIZE (LPKEYBDINPUT, 4) + TEST_TYPE_ALIGN (LPKEYBDINPUT, 4) + TEST_TARGET_SIZE (LPKEYBDINPUT, 16) + TEST_TARGET_ALIGN(LPKEYBDINPUT, 4) } static void test_pack_LPMDICREATESTRUCTA(void) { /* LPMDICREATESTRUCTA */ - TEST_TYPE(LPMDICREATESTRUCTA, 4, 4); - TEST_TYPE_POINTER(LPMDICREATESTRUCTA, 36, 4); + TEST_TYPE_SIZE (LPMDICREATESTRUCTA, 4) + TEST_TYPE_ALIGN (LPMDICREATESTRUCTA, 4) + TEST_TARGET_SIZE (LPMDICREATESTRUCTA, 36) + TEST_TARGET_ALIGN(LPMDICREATESTRUCTA, 4) } static void test_pack_LPMDICREATESTRUCTW(void) { /* LPMDICREATESTRUCTW */ - TEST_TYPE(LPMDICREATESTRUCTW, 4, 4); - TEST_TYPE_POINTER(LPMDICREATESTRUCTW, 36, 4); + TEST_TYPE_SIZE (LPMDICREATESTRUCTW, 4) + TEST_TYPE_ALIGN (LPMDICREATESTRUCTW, 4) + TEST_TARGET_SIZE (LPMDICREATESTRUCTW, 36) + TEST_TARGET_ALIGN(LPMDICREATESTRUCTW, 4) } static void test_pack_LPMDINEXTMENU(void) { /* LPMDINEXTMENU */ - TEST_TYPE(LPMDINEXTMENU, 4, 4); - TEST_TYPE_POINTER(LPMDINEXTMENU, 12, 4); + TEST_TYPE_SIZE (LPMDINEXTMENU, 4) + TEST_TYPE_ALIGN (LPMDINEXTMENU, 4) + TEST_TARGET_SIZE (LPMDINEXTMENU, 12) + TEST_TARGET_ALIGN(LPMDINEXTMENU, 4) } static void test_pack_LPMEASUREITEMSTRUCT(void) { /* LPMEASUREITEMSTRUCT */ - TEST_TYPE(LPMEASUREITEMSTRUCT, 4, 4); - TEST_TYPE_POINTER(LPMEASUREITEMSTRUCT, 24, 4); + TEST_TYPE_SIZE (LPMEASUREITEMSTRUCT, 4) + TEST_TYPE_ALIGN (LPMEASUREITEMSTRUCT, 4) + TEST_TARGET_SIZE (LPMEASUREITEMSTRUCT, 24) + TEST_TARGET_ALIGN(LPMEASUREITEMSTRUCT, 4) } static void test_pack_LPMENUINFO(void) { /* LPMENUINFO */ - TEST_TYPE(LPMENUINFO, 4, 4); - TEST_TYPE_POINTER(LPMENUINFO, 28, 4); + TEST_TYPE_SIZE (LPMENUINFO, 4) + TEST_TYPE_ALIGN (LPMENUINFO, 4) + TEST_TARGET_SIZE (LPMENUINFO, 28) + TEST_TARGET_ALIGN(LPMENUINFO, 4) } static void test_pack_LPMENUITEMINFOA(void) { /* LPMENUITEMINFOA */ - TEST_TYPE(LPMENUITEMINFOA, 4, 4); - TEST_TYPE_POINTER(LPMENUITEMINFOA, 48, 4); + TEST_TYPE_SIZE (LPMENUITEMINFOA, 4) + TEST_TYPE_ALIGN (LPMENUITEMINFOA, 4) + TEST_TARGET_SIZE (LPMENUITEMINFOA, 48) + TEST_TARGET_ALIGN(LPMENUITEMINFOA, 4) } static void test_pack_LPMENUITEMINFOW(void) { /* LPMENUITEMINFOW */ - TEST_TYPE(LPMENUITEMINFOW, 4, 4); - TEST_TYPE_POINTER(LPMENUITEMINFOW, 48, 4); + TEST_TYPE_SIZE (LPMENUITEMINFOW, 4) + TEST_TYPE_ALIGN (LPMENUITEMINFOW, 4) + TEST_TARGET_SIZE (LPMENUITEMINFOW, 48) + TEST_TARGET_ALIGN(LPMENUITEMINFOW, 4) } static void test_pack_LPMINIMIZEDMETRICS(void) { /* LPMINIMIZEDMETRICS */ - TEST_TYPE(LPMINIMIZEDMETRICS, 4, 4); - TEST_TYPE_POINTER(LPMINIMIZEDMETRICS, 20, 4); + TEST_TYPE_SIZE (LPMINIMIZEDMETRICS, 4) + TEST_TYPE_ALIGN (LPMINIMIZEDMETRICS, 4) + TEST_TARGET_SIZE (LPMINIMIZEDMETRICS, 20) + TEST_TARGET_ALIGN(LPMINIMIZEDMETRICS, 4) } static void test_pack_LPMINMAXINFO(void) { /* LPMINMAXINFO */ - TEST_TYPE(LPMINMAXINFO, 4, 4); - TEST_TYPE_POINTER(LPMINMAXINFO, 40, 4); + TEST_TYPE_SIZE (LPMINMAXINFO, 4) + TEST_TYPE_ALIGN (LPMINMAXINFO, 4) + TEST_TARGET_SIZE (LPMINMAXINFO, 40) + TEST_TARGET_ALIGN(LPMINMAXINFO, 4) } static void test_pack_LPMONITORINFO(void) { /* LPMONITORINFO */ - TEST_TYPE(LPMONITORINFO, 4, 4); - TEST_TYPE_POINTER(LPMONITORINFO, 40, 4); + TEST_TYPE_SIZE (LPMONITORINFO, 4) + TEST_TYPE_ALIGN (LPMONITORINFO, 4) + TEST_TARGET_SIZE (LPMONITORINFO, 40) + TEST_TARGET_ALIGN(LPMONITORINFO, 4) } static void test_pack_LPMONITORINFOEXA(void) { /* LPMONITORINFOEXA */ - TEST_TYPE(LPMONITORINFOEXA, 4, 4); - TEST_TYPE_POINTER(LPMONITORINFOEXA, 72, 4); + TEST_TYPE_SIZE (LPMONITORINFOEXA, 4) + TEST_TYPE_ALIGN (LPMONITORINFOEXA, 4) + TEST_TARGET_SIZE (LPMONITORINFOEXA, 72) + TEST_TARGET_ALIGN(LPMONITORINFOEXA, 4) } static void test_pack_LPMONITORINFOEXW(void) { /* LPMONITORINFOEXW */ - TEST_TYPE(LPMONITORINFOEXW, 4, 4); - TEST_TYPE_POINTER(LPMONITORINFOEXW, 104, 4); + TEST_TYPE_SIZE (LPMONITORINFOEXW, 4) + TEST_TYPE_ALIGN (LPMONITORINFOEXW, 4) + TEST_TARGET_SIZE (LPMONITORINFOEXW, 104) + TEST_TARGET_ALIGN(LPMONITORINFOEXW, 4) } static void test_pack_LPMOUSEHOOKSTRUCT(void) { /* LPMOUSEHOOKSTRUCT */ - TEST_TYPE(LPMOUSEHOOKSTRUCT, 4, 4); - TEST_TYPE_POINTER(LPMOUSEHOOKSTRUCT, 20, 4); + TEST_TYPE_SIZE (LPMOUSEHOOKSTRUCT, 4) + TEST_TYPE_ALIGN (LPMOUSEHOOKSTRUCT, 4) + TEST_TARGET_SIZE (LPMOUSEHOOKSTRUCT, 20) + TEST_TARGET_ALIGN(LPMOUSEHOOKSTRUCT, 4) } static void test_pack_LPMOUSEINPUT(void) { /* LPMOUSEINPUT */ - TEST_TYPE(LPMOUSEINPUT, 4, 4); - TEST_TYPE_POINTER(LPMOUSEINPUT, 24, 4); + TEST_TYPE_SIZE (LPMOUSEINPUT, 4) + TEST_TYPE_ALIGN (LPMOUSEINPUT, 4) + TEST_TARGET_SIZE (LPMOUSEINPUT, 24) + TEST_TARGET_ALIGN(LPMOUSEINPUT, 4) } static void test_pack_LPMOUSEKEYS(void) { /* LPMOUSEKEYS */ - TEST_TYPE(LPMOUSEKEYS, 4, 4); - TEST_TYPE_POINTER(LPMOUSEKEYS, 28, 4); + TEST_TYPE_SIZE (LPMOUSEKEYS, 4) + TEST_TYPE_ALIGN (LPMOUSEKEYS, 4) + TEST_TARGET_SIZE (LPMOUSEKEYS, 28) + TEST_TARGET_ALIGN(LPMOUSEKEYS, 4) } static void test_pack_LPMSG(void) { /* LPMSG */ - TEST_TYPE(LPMSG, 4, 4); - TEST_TYPE_POINTER(LPMSG, 28, 4); + TEST_TYPE_SIZE (LPMSG, 4) + TEST_TYPE_ALIGN (LPMSG, 4) + TEST_TARGET_SIZE (LPMSG, 28) + TEST_TARGET_ALIGN(LPMSG, 4) } static void test_pack_LPMSGBOXPARAMSA(void) { /* LPMSGBOXPARAMSA */ - TEST_TYPE(LPMSGBOXPARAMSA, 4, 4); - TEST_TYPE_POINTER(LPMSGBOXPARAMSA, 40, 4); + TEST_TYPE_SIZE (LPMSGBOXPARAMSA, 4) + TEST_TYPE_ALIGN (LPMSGBOXPARAMSA, 4) + TEST_TARGET_SIZE (LPMSGBOXPARAMSA, 40) + TEST_TARGET_ALIGN(LPMSGBOXPARAMSA, 4) } static void test_pack_LPMSGBOXPARAMSW(void) { /* LPMSGBOXPARAMSW */ - TEST_TYPE(LPMSGBOXPARAMSW, 4, 4); - TEST_TYPE_POINTER(LPMSGBOXPARAMSW, 40, 4); + TEST_TYPE_SIZE (LPMSGBOXPARAMSW, 4) + TEST_TYPE_ALIGN (LPMSGBOXPARAMSW, 4) + TEST_TARGET_SIZE (LPMSGBOXPARAMSW, 40) + TEST_TARGET_ALIGN(LPMSGBOXPARAMSW, 4) } static void test_pack_LPMSLLHOOKSTRUCT(void) { /* LPMSLLHOOKSTRUCT */ - TEST_TYPE(LPMSLLHOOKSTRUCT, 4, 4); - TEST_TYPE_POINTER(LPMSLLHOOKSTRUCT, 24, 4); + TEST_TYPE_SIZE (LPMSLLHOOKSTRUCT, 4) + TEST_TYPE_ALIGN (LPMSLLHOOKSTRUCT, 4) + TEST_TARGET_SIZE (LPMSLLHOOKSTRUCT, 24) + TEST_TARGET_ALIGN(LPMSLLHOOKSTRUCT, 4) } static void test_pack_LPMULTIKEYHELPA(void) { /* LPMULTIKEYHELPA */ - TEST_TYPE(LPMULTIKEYHELPA, 4, 4); - TEST_TYPE_POINTER(LPMULTIKEYHELPA, 8, 4); + TEST_TYPE_SIZE (LPMULTIKEYHELPA, 4) + TEST_TYPE_ALIGN (LPMULTIKEYHELPA, 4) + TEST_TARGET_SIZE (LPMULTIKEYHELPA, 8) + TEST_TARGET_ALIGN(LPMULTIKEYHELPA, 4) } static void test_pack_LPMULTIKEYHELPW(void) { /* LPMULTIKEYHELPW */ - TEST_TYPE(LPMULTIKEYHELPW, 4, 4); - TEST_TYPE_POINTER(LPMULTIKEYHELPW, 8, 4); + TEST_TYPE_SIZE (LPMULTIKEYHELPW, 4) + TEST_TYPE_ALIGN (LPMULTIKEYHELPW, 4) + TEST_TARGET_SIZE (LPMULTIKEYHELPW, 8) + TEST_TARGET_ALIGN(LPMULTIKEYHELPW, 4) } static void test_pack_LPNCCALCSIZE_PARAMS(void) { /* LPNCCALCSIZE_PARAMS */ - TEST_TYPE(LPNCCALCSIZE_PARAMS, 4, 4); - TEST_TYPE_POINTER(LPNCCALCSIZE_PARAMS, 52, 4); + TEST_TYPE_SIZE (LPNCCALCSIZE_PARAMS, 4) + TEST_TYPE_ALIGN (LPNCCALCSIZE_PARAMS, 4) + TEST_TARGET_SIZE (LPNCCALCSIZE_PARAMS, 52) + TEST_TARGET_ALIGN(LPNCCALCSIZE_PARAMS, 4) } static void test_pack_LPNMHDR(void) { /* LPNMHDR */ - TEST_TYPE(LPNMHDR, 4, 4); - TEST_TYPE_POINTER(LPNMHDR, 12, 4); + TEST_TYPE_SIZE (LPNMHDR, 4) + TEST_TYPE_ALIGN (LPNMHDR, 4) + TEST_TARGET_SIZE (LPNMHDR, 12) + TEST_TARGET_ALIGN(LPNMHDR, 4) } static void test_pack_LPNONCLIENTMETRICSA(void) { /* LPNONCLIENTMETRICSA */ - TEST_TYPE(LPNONCLIENTMETRICSA, 4, 4); - TEST_TYPE_POINTER(LPNONCLIENTMETRICSA, 340, 4); + TEST_TYPE_SIZE (LPNONCLIENTMETRICSA, 4) + TEST_TYPE_ALIGN (LPNONCLIENTMETRICSA, 4) + TEST_TARGET_SIZE (LPNONCLIENTMETRICSA, 340) + TEST_TARGET_ALIGN(LPNONCLIENTMETRICSA, 4) } static void test_pack_LPNONCLIENTMETRICSW(void) { /* LPNONCLIENTMETRICSW */ - TEST_TYPE(LPNONCLIENTMETRICSW, 4, 4); - TEST_TYPE_POINTER(LPNONCLIENTMETRICSW, 500, 4); + TEST_TYPE_SIZE (LPNONCLIENTMETRICSW, 4) + TEST_TYPE_ALIGN (LPNONCLIENTMETRICSW, 4) + TEST_TARGET_SIZE (LPNONCLIENTMETRICSW, 500) + TEST_TARGET_ALIGN(LPNONCLIENTMETRICSW, 4) } static void test_pack_LPPAINTSTRUCT(void) { /* LPPAINTSTRUCT */ - TEST_TYPE(LPPAINTSTRUCT, 4, 4); - TEST_TYPE_POINTER(LPPAINTSTRUCT, 64, 4); + TEST_TYPE_SIZE (LPPAINTSTRUCT, 4) + TEST_TYPE_ALIGN (LPPAINTSTRUCT, 4) + TEST_TARGET_SIZE (LPPAINTSTRUCT, 64) + TEST_TARGET_ALIGN(LPPAINTSTRUCT, 4) } static void test_pack_LPSCROLLINFO(void) { /* LPSCROLLINFO */ - TEST_TYPE(LPSCROLLINFO, 4, 4); - TEST_TYPE_POINTER(LPSCROLLINFO, 28, 4); + TEST_TYPE_SIZE (LPSCROLLINFO, 4) + TEST_TYPE_ALIGN (LPSCROLLINFO, 4) + TEST_TARGET_SIZE (LPSCROLLINFO, 28) + TEST_TARGET_ALIGN(LPSCROLLINFO, 4) } static void test_pack_LPSERIALKEYSA(void) { /* LPSERIALKEYSA */ - TEST_TYPE(LPSERIALKEYSA, 4, 4); - TEST_TYPE_POINTER(LPSERIALKEYSA, 28, 4); + TEST_TYPE_SIZE (LPSERIALKEYSA, 4) + TEST_TYPE_ALIGN (LPSERIALKEYSA, 4) + TEST_TARGET_SIZE (LPSERIALKEYSA, 28) + TEST_TARGET_ALIGN(LPSERIALKEYSA, 4) } static void test_pack_LPSERIALKEYSW(void) { /* LPSERIALKEYSW */ - TEST_TYPE(LPSERIALKEYSW, 4, 4); - TEST_TYPE_POINTER(LPSERIALKEYSW, 28, 4); + TEST_TYPE_SIZE (LPSERIALKEYSW, 4) + TEST_TYPE_ALIGN (LPSERIALKEYSW, 4) + TEST_TARGET_SIZE (LPSERIALKEYSW, 28) + TEST_TARGET_ALIGN(LPSERIALKEYSW, 4) } static void test_pack_LPSOUNDSENTRYA(void) { /* LPSOUNDSENTRYA */ - TEST_TYPE(LPSOUNDSENTRYA, 4, 4); - TEST_TYPE_POINTER(LPSOUNDSENTRYA, 48, 4); + TEST_TYPE_SIZE (LPSOUNDSENTRYA, 4) + TEST_TYPE_ALIGN (LPSOUNDSENTRYA, 4) + TEST_TARGET_SIZE (LPSOUNDSENTRYA, 48) + TEST_TARGET_ALIGN(LPSOUNDSENTRYA, 4) } static void test_pack_LPSOUNDSENTRYW(void) { /* LPSOUNDSENTRYW */ - TEST_TYPE(LPSOUNDSENTRYW, 4, 4); - TEST_TYPE_POINTER(LPSOUNDSENTRYW, 48, 4); + TEST_TYPE_SIZE (LPSOUNDSENTRYW, 4) + TEST_TYPE_ALIGN (LPSOUNDSENTRYW, 4) + TEST_TARGET_SIZE (LPSOUNDSENTRYW, 48) + TEST_TARGET_ALIGN(LPSOUNDSENTRYW, 4) } static void test_pack_LPSTICKYKEYS(void) { /* LPSTICKYKEYS */ - TEST_TYPE(LPSTICKYKEYS, 4, 4); - TEST_TYPE_POINTER(LPSTICKYKEYS, 8, 4); + TEST_TYPE_SIZE (LPSTICKYKEYS, 4) + TEST_TYPE_ALIGN (LPSTICKYKEYS, 4) + TEST_TARGET_SIZE (LPSTICKYKEYS, 8) + TEST_TARGET_ALIGN(LPSTICKYKEYS, 4) } static void test_pack_LPSTYLESTRUCT(void) { /* LPSTYLESTRUCT */ - TEST_TYPE(LPSTYLESTRUCT, 4, 4); - TEST_TYPE_POINTER(LPSTYLESTRUCT, 8, 4); + TEST_TYPE_SIZE (LPSTYLESTRUCT, 4) + TEST_TYPE_ALIGN (LPSTYLESTRUCT, 4) + TEST_TARGET_SIZE (LPSTYLESTRUCT, 8) + TEST_TARGET_ALIGN(LPSTYLESTRUCT, 4) } static void test_pack_LPTITLEBARINFO(void) { /* LPTITLEBARINFO */ - TEST_TYPE(LPTITLEBARINFO, 4, 4); - TEST_TYPE_POINTER(LPTITLEBARINFO, 44, 4); + TEST_TYPE_SIZE (LPTITLEBARINFO, 4) + TEST_TYPE_ALIGN (LPTITLEBARINFO, 4) + TEST_TARGET_SIZE (LPTITLEBARINFO, 44) + TEST_TARGET_ALIGN(LPTITLEBARINFO, 4) } static void test_pack_LPTOGGLEKEYS(void) { /* LPTOGGLEKEYS */ - TEST_TYPE(LPTOGGLEKEYS, 4, 4); - TEST_TYPE_POINTER(LPTOGGLEKEYS, 8, 4); + TEST_TYPE_SIZE (LPTOGGLEKEYS, 4) + TEST_TYPE_ALIGN (LPTOGGLEKEYS, 4) + TEST_TARGET_SIZE (LPTOGGLEKEYS, 8) + TEST_TARGET_ALIGN(LPTOGGLEKEYS, 4) } static void test_pack_LPTPMPARAMS(void) { /* LPTPMPARAMS */ - TEST_TYPE(LPTPMPARAMS, 4, 4); - TEST_TYPE_POINTER(LPTPMPARAMS, 20, 4); + TEST_TYPE_SIZE (LPTPMPARAMS, 4) + TEST_TYPE_ALIGN (LPTPMPARAMS, 4) + TEST_TARGET_SIZE (LPTPMPARAMS, 20) + TEST_TARGET_ALIGN(LPTPMPARAMS, 4) } static void test_pack_LPTRACKMOUSEEVENT(void) { /* LPTRACKMOUSEEVENT */ - TEST_TYPE(LPTRACKMOUSEEVENT, 4, 4); - TEST_TYPE_POINTER(LPTRACKMOUSEEVENT, 16, 4); + TEST_TYPE_SIZE (LPTRACKMOUSEEVENT, 4) + TEST_TYPE_ALIGN (LPTRACKMOUSEEVENT, 4) + TEST_TARGET_SIZE (LPTRACKMOUSEEVENT, 16) + TEST_TARGET_ALIGN(LPTRACKMOUSEEVENT, 4) } static void test_pack_LPWINDOWINFO(void) { /* LPWINDOWINFO */ - TEST_TYPE(LPWINDOWINFO, 4, 4); - TEST_TYPE_POINTER(LPWINDOWINFO, 60, 4); + TEST_TYPE_SIZE (LPWINDOWINFO, 4) + TEST_TYPE_ALIGN (LPWINDOWINFO, 4) + TEST_TARGET_SIZE (LPWINDOWINFO, 60) + TEST_TARGET_ALIGN(LPWINDOWINFO, 4) } static void test_pack_LPWINDOWPLACEMENT(void) { /* LPWINDOWPLACEMENT */ - TEST_TYPE(LPWINDOWPLACEMENT, 4, 4); - TEST_TYPE_POINTER(LPWINDOWPLACEMENT, 44, 4); + TEST_TYPE_SIZE (LPWINDOWPLACEMENT, 4) + TEST_TYPE_ALIGN (LPWINDOWPLACEMENT, 4) + TEST_TARGET_SIZE (LPWINDOWPLACEMENT, 44) + TEST_TARGET_ALIGN(LPWINDOWPLACEMENT, 4) } static void test_pack_LPWINDOWPOS(void) { /* LPWINDOWPOS */ - TEST_TYPE(LPWINDOWPOS, 4, 4); - TEST_TYPE_POINTER(LPWINDOWPOS, 28, 4); + TEST_TYPE_SIZE (LPWINDOWPOS, 4) + TEST_TYPE_ALIGN (LPWINDOWPOS, 4) + TEST_TARGET_SIZE (LPWINDOWPOS, 28) + TEST_TARGET_ALIGN(LPWINDOWPOS, 4) } static void test_pack_LPWNDCLASSA(void) { /* LPWNDCLASSA */ - TEST_TYPE(LPWNDCLASSA, 4, 4); - TEST_TYPE_POINTER(LPWNDCLASSA, 40, 4); + TEST_TYPE_SIZE (LPWNDCLASSA, 4) + TEST_TYPE_ALIGN (LPWNDCLASSA, 4) + TEST_TARGET_SIZE (LPWNDCLASSA, 40) + TEST_TARGET_ALIGN(LPWNDCLASSA, 4) } static void test_pack_LPWNDCLASSEXA(void) { /* LPWNDCLASSEXA */ - TEST_TYPE(LPWNDCLASSEXA, 4, 4); - TEST_TYPE_POINTER(LPWNDCLASSEXA, 48, 4); + TEST_TYPE_SIZE (LPWNDCLASSEXA, 4) + TEST_TYPE_ALIGN (LPWNDCLASSEXA, 4) + TEST_TARGET_SIZE (LPWNDCLASSEXA, 48) + TEST_TARGET_ALIGN(LPWNDCLASSEXA, 4) } static void test_pack_LPWNDCLASSEXW(void) { /* LPWNDCLASSEXW */ - TEST_TYPE(LPWNDCLASSEXW, 4, 4); - TEST_TYPE_POINTER(LPWNDCLASSEXW, 48, 4); + TEST_TYPE_SIZE (LPWNDCLASSEXW, 4) + TEST_TYPE_ALIGN (LPWNDCLASSEXW, 4) + TEST_TARGET_SIZE (LPWNDCLASSEXW, 48) + TEST_TARGET_ALIGN(LPWNDCLASSEXW, 4) } static void test_pack_LPWNDCLASSW(void) { /* LPWNDCLASSW */ - TEST_TYPE(LPWNDCLASSW, 4, 4); - TEST_TYPE_POINTER(LPWNDCLASSW, 40, 4); + TEST_TYPE_SIZE (LPWNDCLASSW, 4) + TEST_TYPE_ALIGN (LPWNDCLASSW, 4) + TEST_TARGET_SIZE (LPWNDCLASSW, 40) + TEST_TARGET_ALIGN(LPWNDCLASSW, 4) } static void test_pack_MDICREATESTRUCTA(void) { /* MDICREATESTRUCTA (pack 4) */ - TEST_TYPE(MDICREATESTRUCTA, 36, 4); - TEST_FIELD(MDICREATESTRUCTA, szClass, 0, 4, 4); - TEST_FIELD(MDICREATESTRUCTA, szTitle, 4, 4, 4); - TEST_FIELD(MDICREATESTRUCTA, hOwner, 8, 4, 4); - TEST_FIELD(MDICREATESTRUCTA, x, 12, 4, 4); - TEST_FIELD(MDICREATESTRUCTA, y, 16, 4, 4); - TEST_FIELD(MDICREATESTRUCTA, cx, 20, 4, 4); - TEST_FIELD(MDICREATESTRUCTA, cy, 24, 4, 4); - TEST_FIELD(MDICREATESTRUCTA, style, 28, 4, 4); - TEST_FIELD(MDICREATESTRUCTA, lParam, 32, 4, 4); + TEST_TYPE_SIZE (MDICREATESTRUCTA, 36) + TEST_TYPE_ALIGN (MDICREATESTRUCTA, 4) + TEST_FIELD_SIZE (MDICREATESTRUCTA, szClass, 4) + TEST_FIELD_ALIGN (MDICREATESTRUCTA, szClass, 4) + TEST_FIELD_OFFSET(MDICREATESTRUCTA, szClass, 0) + TEST_FIELD_SIZE (MDICREATESTRUCTA, szTitle, 4) + TEST_FIELD_ALIGN (MDICREATESTRUCTA, szTitle, 4) + TEST_FIELD_OFFSET(MDICREATESTRUCTA, szTitle, 4) + TEST_FIELD_SIZE (MDICREATESTRUCTA, hOwner, 4) + TEST_FIELD_ALIGN (MDICREATESTRUCTA, hOwner, 4) + TEST_FIELD_OFFSET(MDICREATESTRUCTA, hOwner, 8) + TEST_FIELD_SIZE (MDICREATESTRUCTA, x, 4) + TEST_FIELD_ALIGN (MDICREATESTRUCTA, x, 4) + TEST_FIELD_OFFSET(MDICREATESTRUCTA, x, 12) + TEST_FIELD_SIZE (MDICREATESTRUCTA, y, 4) + TEST_FIELD_ALIGN (MDICREATESTRUCTA, y, 4) + TEST_FIELD_OFFSET(MDICREATESTRUCTA, y, 16) + TEST_FIELD_SIZE (MDICREATESTRUCTA, cx, 4) + TEST_FIELD_ALIGN (MDICREATESTRUCTA, cx, 4) + TEST_FIELD_OFFSET(MDICREATESTRUCTA, cx, 20) + TEST_FIELD_SIZE (MDICREATESTRUCTA, cy, 4) + TEST_FIELD_ALIGN (MDICREATESTRUCTA, cy, 4) + TEST_FIELD_OFFSET(MDICREATESTRUCTA, cy, 24) + TEST_FIELD_SIZE (MDICREATESTRUCTA, style, 4) + TEST_FIELD_ALIGN (MDICREATESTRUCTA, style, 4) + TEST_FIELD_OFFSET(MDICREATESTRUCTA, style, 28) + TEST_FIELD_SIZE (MDICREATESTRUCTA, lParam, 4) + TEST_FIELD_ALIGN (MDICREATESTRUCTA, lParam, 4) + TEST_FIELD_OFFSET(MDICREATESTRUCTA, lParam, 32) } static void test_pack_MDICREATESTRUCTW(void) { /* MDICREATESTRUCTW (pack 4) */ - TEST_TYPE(MDICREATESTRUCTW, 36, 4); - TEST_FIELD(MDICREATESTRUCTW, szClass, 0, 4, 4); - TEST_FIELD(MDICREATESTRUCTW, szTitle, 4, 4, 4); - TEST_FIELD(MDICREATESTRUCTW, hOwner, 8, 4, 4); - TEST_FIELD(MDICREATESTRUCTW, x, 12, 4, 4); - TEST_FIELD(MDICREATESTRUCTW, y, 16, 4, 4); - TEST_FIELD(MDICREATESTRUCTW, cx, 20, 4, 4); - TEST_FIELD(MDICREATESTRUCTW, cy, 24, 4, 4); - TEST_FIELD(MDICREATESTRUCTW, style, 28, 4, 4); - TEST_FIELD(MDICREATESTRUCTW, lParam, 32, 4, 4); + TEST_TYPE_SIZE (MDICREATESTRUCTW, 36) + TEST_TYPE_ALIGN (MDICREATESTRUCTW, 4) + TEST_FIELD_SIZE (MDICREATESTRUCTW, szClass, 4) + TEST_FIELD_ALIGN (MDICREATESTRUCTW, szClass, 4) + TEST_FIELD_OFFSET(MDICREATESTRUCTW, szClass, 0) + TEST_FIELD_SIZE (MDICREATESTRUCTW, szTitle, 4) + TEST_FIELD_ALIGN (MDICREATESTRUCTW, szTitle, 4) + TEST_FIELD_OFFSET(MDICREATESTRUCTW, szTitle, 4) + TEST_FIELD_SIZE (MDICREATESTRUCTW, hOwner, 4) + TEST_FIELD_ALIGN (MDICREATESTRUCTW, hOwner, 4) + TEST_FIELD_OFFSET(MDICREATESTRUCTW, hOwner, 8) + TEST_FIELD_SIZE (MDICREATESTRUCTW, x, 4) + TEST_FIELD_ALIGN (MDICREATESTRUCTW, x, 4) + TEST_FIELD_OFFSET(MDICREATESTRUCTW, x, 12) + TEST_FIELD_SIZE (MDICREATESTRUCTW, y, 4) + TEST_FIELD_ALIGN (MDICREATESTRUCTW, y, 4) + TEST_FIELD_OFFSET(MDICREATESTRUCTW, y, 16) + TEST_FIELD_SIZE (MDICREATESTRUCTW, cx, 4) + TEST_FIELD_ALIGN (MDICREATESTRUCTW, cx, 4) + TEST_FIELD_OFFSET(MDICREATESTRUCTW, cx, 20) + TEST_FIELD_SIZE (MDICREATESTRUCTW, cy, 4) + TEST_FIELD_ALIGN (MDICREATESTRUCTW, cy, 4) + TEST_FIELD_OFFSET(MDICREATESTRUCTW, cy, 24) + TEST_FIELD_SIZE (MDICREATESTRUCTW, style, 4) + TEST_FIELD_ALIGN (MDICREATESTRUCTW, style, 4) + TEST_FIELD_OFFSET(MDICREATESTRUCTW, style, 28) + TEST_FIELD_SIZE (MDICREATESTRUCTW, lParam, 4) + TEST_FIELD_ALIGN (MDICREATESTRUCTW, lParam, 4) + TEST_FIELD_OFFSET(MDICREATESTRUCTW, lParam, 32) } static void test_pack_MDINEXTMENU(void) { /* MDINEXTMENU (pack 4) */ - TEST_TYPE(MDINEXTMENU, 12, 4); - TEST_FIELD(MDINEXTMENU, hmenuIn, 0, 4, 4); - TEST_FIELD(MDINEXTMENU, hmenuNext, 4, 4, 4); - TEST_FIELD(MDINEXTMENU, hwndNext, 8, 4, 4); + TEST_TYPE_SIZE (MDINEXTMENU, 12) + TEST_TYPE_ALIGN (MDINEXTMENU, 4) + TEST_FIELD_SIZE (MDINEXTMENU, hmenuIn, 4) + TEST_FIELD_ALIGN (MDINEXTMENU, hmenuIn, 4) + TEST_FIELD_OFFSET(MDINEXTMENU, hmenuIn, 0) + TEST_FIELD_SIZE (MDINEXTMENU, hmenuNext, 4) + TEST_FIELD_ALIGN (MDINEXTMENU, hmenuNext, 4) + TEST_FIELD_OFFSET(MDINEXTMENU, hmenuNext, 4) + TEST_FIELD_SIZE (MDINEXTMENU, hwndNext, 4) + TEST_FIELD_ALIGN (MDINEXTMENU, hwndNext, 4) + TEST_FIELD_OFFSET(MDINEXTMENU, hwndNext, 8) } static void test_pack_MEASUREITEMSTRUCT(void) { /* MEASUREITEMSTRUCT (pack 4) */ - TEST_TYPE(MEASUREITEMSTRUCT, 24, 4); - TEST_FIELD(MEASUREITEMSTRUCT, CtlType, 0, 4, 4); - TEST_FIELD(MEASUREITEMSTRUCT, CtlID, 4, 4, 4); - TEST_FIELD(MEASUREITEMSTRUCT, itemID, 8, 4, 4); - TEST_FIELD(MEASUREITEMSTRUCT, itemWidth, 12, 4, 4); - TEST_FIELD(MEASUREITEMSTRUCT, itemHeight, 16, 4, 4); - TEST_FIELD(MEASUREITEMSTRUCT, itemData, 20, 4, 4); + TEST_TYPE_SIZE (MEASUREITEMSTRUCT, 24) + TEST_TYPE_ALIGN (MEASUREITEMSTRUCT, 4) + TEST_FIELD_SIZE (MEASUREITEMSTRUCT, CtlType, 4) + TEST_FIELD_ALIGN (MEASUREITEMSTRUCT, CtlType, 4) + TEST_FIELD_OFFSET(MEASUREITEMSTRUCT, CtlType, 0) + TEST_FIELD_SIZE (MEASUREITEMSTRUCT, CtlID, 4) + TEST_FIELD_ALIGN (MEASUREITEMSTRUCT, CtlID, 4) + TEST_FIELD_OFFSET(MEASUREITEMSTRUCT, CtlID, 4) + TEST_FIELD_SIZE (MEASUREITEMSTRUCT, itemID, 4) + TEST_FIELD_ALIGN (MEASUREITEMSTRUCT, itemID, 4) + TEST_FIELD_OFFSET(MEASUREITEMSTRUCT, itemID, 8) + TEST_FIELD_SIZE (MEASUREITEMSTRUCT, itemWidth, 4) + TEST_FIELD_ALIGN (MEASUREITEMSTRUCT, itemWidth, 4) + TEST_FIELD_OFFSET(MEASUREITEMSTRUCT, itemWidth, 12) + TEST_FIELD_SIZE (MEASUREITEMSTRUCT, itemHeight, 4) + TEST_FIELD_ALIGN (MEASUREITEMSTRUCT, itemHeight, 4) + TEST_FIELD_OFFSET(MEASUREITEMSTRUCT, itemHeight, 16) + TEST_FIELD_SIZE (MEASUREITEMSTRUCT, itemData, 4) + TEST_FIELD_ALIGN (MEASUREITEMSTRUCT, itemData, 4) + TEST_FIELD_OFFSET(MEASUREITEMSTRUCT, itemData, 20) } static void test_pack_MENUINFO(void) { /* MENUINFO (pack 4) */ - TEST_TYPE(MENUINFO, 28, 4); - TEST_FIELD(MENUINFO, cbSize, 0, 4, 4); - TEST_FIELD(MENUINFO, fMask, 4, 4, 4); - TEST_FIELD(MENUINFO, dwStyle, 8, 4, 4); - TEST_FIELD(MENUINFO, cyMax, 12, 4, 4); - TEST_FIELD(MENUINFO, hbrBack, 16, 4, 4); - TEST_FIELD(MENUINFO, dwContextHelpID, 20, 4, 4); - TEST_FIELD(MENUINFO, dwMenuData, 24, 4, 4); + TEST_TYPE_SIZE (MENUINFO, 28) + TEST_TYPE_ALIGN (MENUINFO, 4) + TEST_FIELD_SIZE (MENUINFO, cbSize, 4) + TEST_FIELD_ALIGN (MENUINFO, cbSize, 4) + TEST_FIELD_OFFSET(MENUINFO, cbSize, 0) + TEST_FIELD_SIZE (MENUINFO, fMask, 4) + TEST_FIELD_ALIGN (MENUINFO, fMask, 4) + TEST_FIELD_OFFSET(MENUINFO, fMask, 4) + TEST_FIELD_SIZE (MENUINFO, dwStyle, 4) + TEST_FIELD_ALIGN (MENUINFO, dwStyle, 4) + TEST_FIELD_OFFSET(MENUINFO, dwStyle, 8) + TEST_FIELD_SIZE (MENUINFO, cyMax, 4) + TEST_FIELD_ALIGN (MENUINFO, cyMax, 4) + TEST_FIELD_OFFSET(MENUINFO, cyMax, 12) + TEST_FIELD_SIZE (MENUINFO, hbrBack, 4) + TEST_FIELD_ALIGN (MENUINFO, hbrBack, 4) + TEST_FIELD_OFFSET(MENUINFO, hbrBack, 16) + TEST_FIELD_SIZE (MENUINFO, dwContextHelpID, 4) + TEST_FIELD_ALIGN (MENUINFO, dwContextHelpID, 4) + TEST_FIELD_OFFSET(MENUINFO, dwContextHelpID, 20) + TEST_FIELD_SIZE (MENUINFO, dwMenuData, 4) + TEST_FIELD_ALIGN (MENUINFO, dwMenuData, 4) + TEST_FIELD_OFFSET(MENUINFO, dwMenuData, 24) } static void test_pack_MENUITEMINFOA(void) { /* MENUITEMINFOA (pack 4) */ - TEST_TYPE(MENUITEMINFOA, 48, 4); - TEST_FIELD(MENUITEMINFOA, cbSize, 0, 4, 4); - TEST_FIELD(MENUITEMINFOA, fMask, 4, 4, 4); - TEST_FIELD(MENUITEMINFOA, fType, 8, 4, 4); - TEST_FIELD(MENUITEMINFOA, fState, 12, 4, 4); - TEST_FIELD(MENUITEMINFOA, wID, 16, 4, 4); - TEST_FIELD(MENUITEMINFOA, hSubMenu, 20, 4, 4); - TEST_FIELD(MENUITEMINFOA, hbmpChecked, 24, 4, 4); - TEST_FIELD(MENUITEMINFOA, hbmpUnchecked, 28, 4, 4); - TEST_FIELD(MENUITEMINFOA, dwItemData, 32, 4, 4); - TEST_FIELD(MENUITEMINFOA, dwTypeData, 36, 4, 4); - TEST_FIELD(MENUITEMINFOA, cch, 40, 4, 4); - TEST_FIELD(MENUITEMINFOA, hbmpItem, 44, 4, 4); + TEST_TYPE_SIZE (MENUITEMINFOA, 48) + TEST_TYPE_ALIGN (MENUITEMINFOA, 4) + TEST_FIELD_SIZE (MENUITEMINFOA, cbSize, 4) + TEST_FIELD_ALIGN (MENUITEMINFOA, cbSize, 4) + TEST_FIELD_OFFSET(MENUITEMINFOA, cbSize, 0) + TEST_FIELD_SIZE (MENUITEMINFOA, fMask, 4) + TEST_FIELD_ALIGN (MENUITEMINFOA, fMask, 4) + TEST_FIELD_OFFSET(MENUITEMINFOA, fMask, 4) + TEST_FIELD_SIZE (MENUITEMINFOA, fType, 4) + TEST_FIELD_ALIGN (MENUITEMINFOA, fType, 4) + TEST_FIELD_OFFSET(MENUITEMINFOA, fType, 8) + TEST_FIELD_SIZE (MENUITEMINFOA, fState, 4) + TEST_FIELD_ALIGN (MENUITEMINFOA, fState, 4) + TEST_FIELD_OFFSET(MENUITEMINFOA, fState, 12) + TEST_FIELD_SIZE (MENUITEMINFOA, wID, 4) + TEST_FIELD_ALIGN (MENUITEMINFOA, wID, 4) + TEST_FIELD_OFFSET(MENUITEMINFOA, wID, 16) + TEST_FIELD_SIZE (MENUITEMINFOA, hSubMenu, 4) + TEST_FIELD_ALIGN (MENUITEMINFOA, hSubMenu, 4) + TEST_FIELD_OFFSET(MENUITEMINFOA, hSubMenu, 20) + TEST_FIELD_SIZE (MENUITEMINFOA, hbmpChecked, 4) + TEST_FIELD_ALIGN (MENUITEMINFOA, hbmpChecked, 4) + TEST_FIELD_OFFSET(MENUITEMINFOA, hbmpChecked, 24) + TEST_FIELD_SIZE (MENUITEMINFOA, hbmpUnchecked, 4) + TEST_FIELD_ALIGN (MENUITEMINFOA, hbmpUnchecked, 4) + TEST_FIELD_OFFSET(MENUITEMINFOA, hbmpUnchecked, 28) + TEST_FIELD_SIZE (MENUITEMINFOA, dwItemData, 4) + TEST_FIELD_ALIGN (MENUITEMINFOA, dwItemData, 4) + TEST_FIELD_OFFSET(MENUITEMINFOA, dwItemData, 32) + TEST_FIELD_SIZE (MENUITEMINFOA, dwTypeData, 4) + TEST_FIELD_ALIGN (MENUITEMINFOA, dwTypeData, 4) + TEST_FIELD_OFFSET(MENUITEMINFOA, dwTypeData, 36) + TEST_FIELD_SIZE (MENUITEMINFOA, cch, 4) + TEST_FIELD_ALIGN (MENUITEMINFOA, cch, 4) + TEST_FIELD_OFFSET(MENUITEMINFOA, cch, 40) + TEST_FIELD_SIZE (MENUITEMINFOA, hbmpItem, 4) + TEST_FIELD_ALIGN (MENUITEMINFOA, hbmpItem, 4) + TEST_FIELD_OFFSET(MENUITEMINFOA, hbmpItem, 44) } static void test_pack_MENUITEMINFOW(void) { /* MENUITEMINFOW (pack 4) */ - TEST_TYPE(MENUITEMINFOW, 48, 4); - TEST_FIELD(MENUITEMINFOW, cbSize, 0, 4, 4); - TEST_FIELD(MENUITEMINFOW, fMask, 4, 4, 4); - TEST_FIELD(MENUITEMINFOW, fType, 8, 4, 4); - TEST_FIELD(MENUITEMINFOW, fState, 12, 4, 4); - TEST_FIELD(MENUITEMINFOW, wID, 16, 4, 4); - TEST_FIELD(MENUITEMINFOW, hSubMenu, 20, 4, 4); - TEST_FIELD(MENUITEMINFOW, hbmpChecked, 24, 4, 4); - TEST_FIELD(MENUITEMINFOW, hbmpUnchecked, 28, 4, 4); - TEST_FIELD(MENUITEMINFOW, dwItemData, 32, 4, 4); - TEST_FIELD(MENUITEMINFOW, dwTypeData, 36, 4, 4); - TEST_FIELD(MENUITEMINFOW, cch, 40, 4, 4); - TEST_FIELD(MENUITEMINFOW, hbmpItem, 44, 4, 4); + TEST_TYPE_SIZE (MENUITEMINFOW, 48) + TEST_TYPE_ALIGN (MENUITEMINFOW, 4) + TEST_FIELD_SIZE (MENUITEMINFOW, cbSize, 4) + TEST_FIELD_ALIGN (MENUITEMINFOW, cbSize, 4) + TEST_FIELD_OFFSET(MENUITEMINFOW, cbSize, 0) + TEST_FIELD_SIZE (MENUITEMINFOW, fMask, 4) + TEST_FIELD_ALIGN (MENUITEMINFOW, fMask, 4) + TEST_FIELD_OFFSET(MENUITEMINFOW, fMask, 4) + TEST_FIELD_SIZE (MENUITEMINFOW, fType, 4) + TEST_FIELD_ALIGN (MENUITEMINFOW, fType, 4) + TEST_FIELD_OFFSET(MENUITEMINFOW, fType, 8) + TEST_FIELD_SIZE (MENUITEMINFOW, fState, 4) + TEST_FIELD_ALIGN (MENUITEMINFOW, fState, 4) + TEST_FIELD_OFFSET(MENUITEMINFOW, fState, 12) + TEST_FIELD_SIZE (MENUITEMINFOW, wID, 4) + TEST_FIELD_ALIGN (MENUITEMINFOW, wID, 4) + TEST_FIELD_OFFSET(MENUITEMINFOW, wID, 16) + TEST_FIELD_SIZE (MENUITEMINFOW, hSubMenu, 4) + TEST_FIELD_ALIGN (MENUITEMINFOW, hSubMenu, 4) + TEST_FIELD_OFFSET(MENUITEMINFOW, hSubMenu, 20) + TEST_FIELD_SIZE (MENUITEMINFOW, hbmpChecked, 4) + TEST_FIELD_ALIGN (MENUITEMINFOW, hbmpChecked, 4) + TEST_FIELD_OFFSET(MENUITEMINFOW, hbmpChecked, 24) + TEST_FIELD_SIZE (MENUITEMINFOW, hbmpUnchecked, 4) + TEST_FIELD_ALIGN (MENUITEMINFOW, hbmpUnchecked, 4) + TEST_FIELD_OFFSET(MENUITEMINFOW, hbmpUnchecked, 28) + TEST_FIELD_SIZE (MENUITEMINFOW, dwItemData, 4) + TEST_FIELD_ALIGN (MENUITEMINFOW, dwItemData, 4) + TEST_FIELD_OFFSET(MENUITEMINFOW, dwItemData, 32) + TEST_FIELD_SIZE (MENUITEMINFOW, dwTypeData, 4) + TEST_FIELD_ALIGN (MENUITEMINFOW, dwTypeData, 4) + TEST_FIELD_OFFSET(MENUITEMINFOW, dwTypeData, 36) + TEST_FIELD_SIZE (MENUITEMINFOW, cch, 4) + TEST_FIELD_ALIGN (MENUITEMINFOW, cch, 4) + TEST_FIELD_OFFSET(MENUITEMINFOW, cch, 40) + TEST_FIELD_SIZE (MENUITEMINFOW, hbmpItem, 4) + TEST_FIELD_ALIGN (MENUITEMINFOW, hbmpItem, 4) + TEST_FIELD_OFFSET(MENUITEMINFOW, hbmpItem, 44) } static void test_pack_MENUITEMTEMPLATE(void) { /* MENUITEMTEMPLATE (pack 4) */ - TEST_TYPE(MENUITEMTEMPLATE, 6, 2); - TEST_FIELD(MENUITEMTEMPLATE, mtOption, 0, 2, 2); - TEST_FIELD(MENUITEMTEMPLATE, mtID, 2, 2, 2); - TEST_FIELD(MENUITEMTEMPLATE, mtString, 4, 2, 2); + TEST_TYPE_SIZE (MENUITEMTEMPLATE, 6) + TEST_TYPE_ALIGN (MENUITEMTEMPLATE, 2) + TEST_FIELD_SIZE (MENUITEMTEMPLATE, mtOption, 2) + TEST_FIELD_ALIGN (MENUITEMTEMPLATE, mtOption, 2) + TEST_FIELD_OFFSET(MENUITEMTEMPLATE, mtOption, 0) + TEST_FIELD_SIZE (MENUITEMTEMPLATE, mtID, 2) + TEST_FIELD_ALIGN (MENUITEMTEMPLATE, mtID, 2) + TEST_FIELD_OFFSET(MENUITEMTEMPLATE, mtID, 2) + TEST_FIELD_SIZE (MENUITEMTEMPLATE, mtString, 2) + TEST_FIELD_ALIGN (MENUITEMTEMPLATE, mtString, 2) + TEST_FIELD_OFFSET(MENUITEMTEMPLATE, mtString, 4) } static void test_pack_MENUITEMTEMPLATEHEADER(void) { /* MENUITEMTEMPLATEHEADER (pack 4) */ - TEST_TYPE(MENUITEMTEMPLATEHEADER, 4, 2); - TEST_FIELD(MENUITEMTEMPLATEHEADER, versionNumber, 0, 2, 2); - TEST_FIELD(MENUITEMTEMPLATEHEADER, offset, 2, 2, 2); + TEST_TYPE_SIZE (MENUITEMTEMPLATEHEADER, 4) + TEST_TYPE_ALIGN (MENUITEMTEMPLATEHEADER, 2) + TEST_FIELD_SIZE (MENUITEMTEMPLATEHEADER, versionNumber, 2) + TEST_FIELD_ALIGN (MENUITEMTEMPLATEHEADER, versionNumber, 2) + TEST_FIELD_OFFSET(MENUITEMTEMPLATEHEADER, versionNumber, 0) + TEST_FIELD_SIZE (MENUITEMTEMPLATEHEADER, offset, 2) + TEST_FIELD_ALIGN (MENUITEMTEMPLATEHEADER, offset, 2) + TEST_FIELD_OFFSET(MENUITEMTEMPLATEHEADER, offset, 2) } static void test_pack_MINIMIZEDMETRICS(void) { /* MINIMIZEDMETRICS (pack 4) */ - TEST_TYPE(MINIMIZEDMETRICS, 20, 4); - TEST_FIELD(MINIMIZEDMETRICS, cbSize, 0, 4, 4); - TEST_FIELD(MINIMIZEDMETRICS, iWidth, 4, 4, 4); - TEST_FIELD(MINIMIZEDMETRICS, iHorzGap, 8, 4, 4); - TEST_FIELD(MINIMIZEDMETRICS, iVertGap, 12, 4, 4); - TEST_FIELD(MINIMIZEDMETRICS, iArrange, 16, 4, 4); + TEST_TYPE_SIZE (MINIMIZEDMETRICS, 20) + TEST_TYPE_ALIGN (MINIMIZEDMETRICS, 4) + TEST_FIELD_SIZE (MINIMIZEDMETRICS, cbSize, 4) + TEST_FIELD_ALIGN (MINIMIZEDMETRICS, cbSize, 4) + TEST_FIELD_OFFSET(MINIMIZEDMETRICS, cbSize, 0) + TEST_FIELD_SIZE (MINIMIZEDMETRICS, iWidth, 4) + TEST_FIELD_ALIGN (MINIMIZEDMETRICS, iWidth, 4) + TEST_FIELD_OFFSET(MINIMIZEDMETRICS, iWidth, 4) + TEST_FIELD_SIZE (MINIMIZEDMETRICS, iHorzGap, 4) + TEST_FIELD_ALIGN (MINIMIZEDMETRICS, iHorzGap, 4) + TEST_FIELD_OFFSET(MINIMIZEDMETRICS, iHorzGap, 8) + TEST_FIELD_SIZE (MINIMIZEDMETRICS, iVertGap, 4) + TEST_FIELD_ALIGN (MINIMIZEDMETRICS, iVertGap, 4) + TEST_FIELD_OFFSET(MINIMIZEDMETRICS, iVertGap, 12) + TEST_FIELD_SIZE (MINIMIZEDMETRICS, iArrange, 4) + TEST_FIELD_ALIGN (MINIMIZEDMETRICS, iArrange, 4) + TEST_FIELD_OFFSET(MINIMIZEDMETRICS, iArrange, 16) } static void test_pack_MINMAXINFO(void) { /* MINMAXINFO (pack 4) */ - TEST_TYPE(MINMAXINFO, 40, 4); - TEST_FIELD(MINMAXINFO, ptReserved, 0, 8, 4); - TEST_FIELD(MINMAXINFO, ptMaxSize, 8, 8, 4); - TEST_FIELD(MINMAXINFO, ptMaxPosition, 16, 8, 4); - TEST_FIELD(MINMAXINFO, ptMinTrackSize, 24, 8, 4); - TEST_FIELD(MINMAXINFO, ptMaxTrackSize, 32, 8, 4); + TEST_TYPE_SIZE (MINMAXINFO, 40) + TEST_TYPE_ALIGN (MINMAXINFO, 4) + TEST_FIELD_SIZE (MINMAXINFO, ptReserved, 8) + TEST_FIELD_ALIGN (MINMAXINFO, ptReserved, 4) + TEST_FIELD_OFFSET(MINMAXINFO, ptReserved, 0) + TEST_FIELD_SIZE (MINMAXINFO, ptMaxSize, 8) + TEST_FIELD_ALIGN (MINMAXINFO, ptMaxSize, 4) + TEST_FIELD_OFFSET(MINMAXINFO, ptMaxSize, 8) + TEST_FIELD_SIZE (MINMAXINFO, ptMaxPosition, 8) + TEST_FIELD_ALIGN (MINMAXINFO, ptMaxPosition, 4) + TEST_FIELD_OFFSET(MINMAXINFO, ptMaxPosition, 16) + TEST_FIELD_SIZE (MINMAXINFO, ptMinTrackSize, 8) + TEST_FIELD_ALIGN (MINMAXINFO, ptMinTrackSize, 4) + TEST_FIELD_OFFSET(MINMAXINFO, ptMinTrackSize, 24) + TEST_FIELD_SIZE (MINMAXINFO, ptMaxTrackSize, 8) + TEST_FIELD_ALIGN (MINMAXINFO, ptMaxTrackSize, 4) + TEST_FIELD_OFFSET(MINMAXINFO, ptMaxTrackSize, 32) } static void test_pack_MONITORENUMPROC(void) { /* MONITORENUMPROC */ - TEST_TYPE(MONITORENUMPROC, 4, 4); + TEST_TYPE_SIZE (MONITORENUMPROC, 4) + TEST_TYPE_ALIGN (MONITORENUMPROC, 4) } static void test_pack_MONITORINFO(void) { /* MONITORINFO (pack 4) */ - TEST_TYPE(MONITORINFO, 40, 4); - TEST_FIELD(MONITORINFO, cbSize, 0, 4, 4); - TEST_FIELD(MONITORINFO, rcMonitor, 4, 16, 4); - TEST_FIELD(MONITORINFO, rcWork, 20, 16, 4); - TEST_FIELD(MONITORINFO, dwFlags, 36, 4, 4); + TEST_TYPE_SIZE (MONITORINFO, 40) + TEST_TYPE_ALIGN (MONITORINFO, 4) + TEST_FIELD_SIZE (MONITORINFO, cbSize, 4) + TEST_FIELD_ALIGN (MONITORINFO, cbSize, 4) + TEST_FIELD_OFFSET(MONITORINFO, cbSize, 0) + TEST_FIELD_SIZE (MONITORINFO, rcMonitor, 16) + TEST_FIELD_ALIGN (MONITORINFO, rcMonitor, 4) + TEST_FIELD_OFFSET(MONITORINFO, rcMonitor, 4) + TEST_FIELD_SIZE (MONITORINFO, rcWork, 16) + TEST_FIELD_ALIGN (MONITORINFO, rcWork, 4) + TEST_FIELD_OFFSET(MONITORINFO, rcWork, 20) + TEST_FIELD_SIZE (MONITORINFO, dwFlags, 4) + TEST_FIELD_ALIGN (MONITORINFO, dwFlags, 4) + TEST_FIELD_OFFSET(MONITORINFO, dwFlags, 36) } static void test_pack_MONITORINFOEXA(void) { /* MONITORINFOEXA (pack 4) */ - TEST_TYPE(MONITORINFOEXA, 72, 4); - TEST_FIELD(MONITORINFOEXA, cbSize, 0, 4, 4); - TEST_FIELD(MONITORINFOEXA, rcMonitor, 4, 16, 4); - TEST_FIELD(MONITORINFOEXA, rcWork, 20, 16, 4); - TEST_FIELD(MONITORINFOEXA, dwFlags, 36, 4, 4); - TEST_FIELD(MONITORINFOEXA, szDevice, 40, 32, 1); + TEST_TYPE_SIZE (MONITORINFOEXA, 72) + TEST_TYPE_ALIGN (MONITORINFOEXA, 4) + TEST_FIELD_SIZE (MONITORINFOEXA, cbSize, 4) + TEST_FIELD_ALIGN (MONITORINFOEXA, cbSize, 4) + TEST_FIELD_OFFSET(MONITORINFOEXA, cbSize, 0) + TEST_FIELD_SIZE (MONITORINFOEXA, rcMonitor, 16) + TEST_FIELD_ALIGN (MONITORINFOEXA, rcMonitor, 4) + TEST_FIELD_OFFSET(MONITORINFOEXA, rcMonitor, 4) + TEST_FIELD_SIZE (MONITORINFOEXA, rcWork, 16) + TEST_FIELD_ALIGN (MONITORINFOEXA, rcWork, 4) + TEST_FIELD_OFFSET(MONITORINFOEXA, rcWork, 20) + TEST_FIELD_SIZE (MONITORINFOEXA, dwFlags, 4) + TEST_FIELD_ALIGN (MONITORINFOEXA, dwFlags, 4) + TEST_FIELD_OFFSET(MONITORINFOEXA, dwFlags, 36) + TEST_FIELD_SIZE (MONITORINFOEXA, szDevice, 32) + TEST_FIELD_ALIGN (MONITORINFOEXA, szDevice, 1) + TEST_FIELD_OFFSET(MONITORINFOEXA, szDevice, 40) } static void test_pack_MONITORINFOEXW(void) { /* MONITORINFOEXW (pack 4) */ - TEST_TYPE(MONITORINFOEXW, 104, 4); - TEST_FIELD(MONITORINFOEXW, cbSize, 0, 4, 4); - TEST_FIELD(MONITORINFOEXW, rcMonitor, 4, 16, 4); - TEST_FIELD(MONITORINFOEXW, rcWork, 20, 16, 4); - TEST_FIELD(MONITORINFOEXW, dwFlags, 36, 4, 4); - TEST_FIELD(MONITORINFOEXW, szDevice, 40, 64, 2); + TEST_TYPE_SIZE (MONITORINFOEXW, 104) + TEST_TYPE_ALIGN (MONITORINFOEXW, 4) + TEST_FIELD_SIZE (MONITORINFOEXW, cbSize, 4) + TEST_FIELD_ALIGN (MONITORINFOEXW, cbSize, 4) + TEST_FIELD_OFFSET(MONITORINFOEXW, cbSize, 0) + TEST_FIELD_SIZE (MONITORINFOEXW, rcMonitor, 16) + TEST_FIELD_ALIGN (MONITORINFOEXW, rcMonitor, 4) + TEST_FIELD_OFFSET(MONITORINFOEXW, rcMonitor, 4) + TEST_FIELD_SIZE (MONITORINFOEXW, rcWork, 16) + TEST_FIELD_ALIGN (MONITORINFOEXW, rcWork, 4) + TEST_FIELD_OFFSET(MONITORINFOEXW, rcWork, 20) + TEST_FIELD_SIZE (MONITORINFOEXW, dwFlags, 4) + TEST_FIELD_ALIGN (MONITORINFOEXW, dwFlags, 4) + TEST_FIELD_OFFSET(MONITORINFOEXW, dwFlags, 36) + TEST_FIELD_SIZE (MONITORINFOEXW, szDevice, 64) + TEST_FIELD_ALIGN (MONITORINFOEXW, szDevice, 2) + TEST_FIELD_OFFSET(MONITORINFOEXW, szDevice, 40) } static void test_pack_MOUSEHOOKSTRUCT(void) { /* MOUSEHOOKSTRUCT (pack 4) */ - TEST_TYPE(MOUSEHOOKSTRUCT, 20, 4); - TEST_FIELD(MOUSEHOOKSTRUCT, pt, 0, 8, 4); - TEST_FIELD(MOUSEHOOKSTRUCT, hwnd, 8, 4, 4); - TEST_FIELD(MOUSEHOOKSTRUCT, wHitTestCode, 12, 4, 4); - TEST_FIELD(MOUSEHOOKSTRUCT, dwExtraInfo, 16, 4, 4); + TEST_TYPE_SIZE (MOUSEHOOKSTRUCT, 20) + TEST_TYPE_ALIGN (MOUSEHOOKSTRUCT, 4) + TEST_FIELD_SIZE (MOUSEHOOKSTRUCT, pt, 8) + TEST_FIELD_ALIGN (MOUSEHOOKSTRUCT, pt, 4) + TEST_FIELD_OFFSET(MOUSEHOOKSTRUCT, pt, 0) + TEST_FIELD_SIZE (MOUSEHOOKSTRUCT, hwnd, 4) + TEST_FIELD_ALIGN (MOUSEHOOKSTRUCT, hwnd, 4) + TEST_FIELD_OFFSET(MOUSEHOOKSTRUCT, hwnd, 8) + TEST_FIELD_SIZE (MOUSEHOOKSTRUCT, wHitTestCode, 4) + TEST_FIELD_ALIGN (MOUSEHOOKSTRUCT, wHitTestCode, 4) + TEST_FIELD_OFFSET(MOUSEHOOKSTRUCT, wHitTestCode, 12) + TEST_FIELD_SIZE (MOUSEHOOKSTRUCT, dwExtraInfo, 4) + TEST_FIELD_ALIGN (MOUSEHOOKSTRUCT, dwExtraInfo, 4) + TEST_FIELD_OFFSET(MOUSEHOOKSTRUCT, dwExtraInfo, 16) } static void test_pack_MOUSEINPUT(void) { /* MOUSEINPUT (pack 4) */ - TEST_TYPE(MOUSEINPUT, 24, 4); - TEST_FIELD(MOUSEINPUT, dx, 0, 4, 4); - TEST_FIELD(MOUSEINPUT, dy, 4, 4, 4); - TEST_FIELD(MOUSEINPUT, mouseData, 8, 4, 4); - TEST_FIELD(MOUSEINPUT, dwFlags, 12, 4, 4); - TEST_FIELD(MOUSEINPUT, time, 16, 4, 4); - TEST_FIELD(MOUSEINPUT, dwExtraInfo, 20, 4, 4); + TEST_TYPE_SIZE (MOUSEINPUT, 24) + TEST_TYPE_ALIGN (MOUSEINPUT, 4) + TEST_FIELD_SIZE (MOUSEINPUT, dx, 4) + TEST_FIELD_ALIGN (MOUSEINPUT, dx, 4) + TEST_FIELD_OFFSET(MOUSEINPUT, dx, 0) + TEST_FIELD_SIZE (MOUSEINPUT, dy, 4) + TEST_FIELD_ALIGN (MOUSEINPUT, dy, 4) + TEST_FIELD_OFFSET(MOUSEINPUT, dy, 4) + TEST_FIELD_SIZE (MOUSEINPUT, mouseData, 4) + TEST_FIELD_ALIGN (MOUSEINPUT, mouseData, 4) + TEST_FIELD_OFFSET(MOUSEINPUT, mouseData, 8) + TEST_FIELD_SIZE (MOUSEINPUT, dwFlags, 4) + TEST_FIELD_ALIGN (MOUSEINPUT, dwFlags, 4) + TEST_FIELD_OFFSET(MOUSEINPUT, dwFlags, 12) + TEST_FIELD_SIZE (MOUSEINPUT, time, 4) + TEST_FIELD_ALIGN (MOUSEINPUT, time, 4) + TEST_FIELD_OFFSET(MOUSEINPUT, time, 16) + TEST_FIELD_SIZE (MOUSEINPUT, dwExtraInfo, 4) + TEST_FIELD_ALIGN (MOUSEINPUT, dwExtraInfo, 4) + TEST_FIELD_OFFSET(MOUSEINPUT, dwExtraInfo, 20) } static void test_pack_MOUSEKEYS(void) { /* MOUSEKEYS (pack 4) */ - TEST_TYPE(MOUSEKEYS, 28, 4); - TEST_FIELD(MOUSEKEYS, cbSize, 0, 4, 4); - TEST_FIELD(MOUSEKEYS, dwFlags, 4, 4, 4); - TEST_FIELD(MOUSEKEYS, iMaxSpeed, 8, 4, 4); - TEST_FIELD(MOUSEKEYS, iTimeToMaxSpeed, 12, 4, 4); - TEST_FIELD(MOUSEKEYS, iCtrlSpeed, 16, 4, 4); - TEST_FIELD(MOUSEKEYS, dwReserved1, 20, 4, 4); - TEST_FIELD(MOUSEKEYS, dwReserved2, 24, 4, 4); + TEST_TYPE_SIZE (MOUSEKEYS, 28) + TEST_TYPE_ALIGN (MOUSEKEYS, 4) + TEST_FIELD_SIZE (MOUSEKEYS, cbSize, 4) + TEST_FIELD_ALIGN (MOUSEKEYS, cbSize, 4) + TEST_FIELD_OFFSET(MOUSEKEYS, cbSize, 0) + TEST_FIELD_SIZE (MOUSEKEYS, dwFlags, 4) + TEST_FIELD_ALIGN (MOUSEKEYS, dwFlags, 4) + TEST_FIELD_OFFSET(MOUSEKEYS, dwFlags, 4) + TEST_FIELD_SIZE (MOUSEKEYS, iMaxSpeed, 4) + TEST_FIELD_ALIGN (MOUSEKEYS, iMaxSpeed, 4) + TEST_FIELD_OFFSET(MOUSEKEYS, iMaxSpeed, 8) + TEST_FIELD_SIZE (MOUSEKEYS, iTimeToMaxSpeed, 4) + TEST_FIELD_ALIGN (MOUSEKEYS, iTimeToMaxSpeed, 4) + TEST_FIELD_OFFSET(MOUSEKEYS, iTimeToMaxSpeed, 12) + TEST_FIELD_SIZE (MOUSEKEYS, iCtrlSpeed, 4) + TEST_FIELD_ALIGN (MOUSEKEYS, iCtrlSpeed, 4) + TEST_FIELD_OFFSET(MOUSEKEYS, iCtrlSpeed, 16) + TEST_FIELD_SIZE (MOUSEKEYS, dwReserved1, 4) + TEST_FIELD_ALIGN (MOUSEKEYS, dwReserved1, 4) + TEST_FIELD_OFFSET(MOUSEKEYS, dwReserved1, 20) + TEST_FIELD_SIZE (MOUSEKEYS, dwReserved2, 4) + TEST_FIELD_ALIGN (MOUSEKEYS, dwReserved2, 4) + TEST_FIELD_OFFSET(MOUSEKEYS, dwReserved2, 24) } static void test_pack_MSG(void) { /* MSG (pack 4) */ - TEST_TYPE(MSG, 28, 4); - TEST_FIELD(MSG, hwnd, 0, 4, 4); - TEST_FIELD(MSG, message, 4, 4, 4); - TEST_FIELD(MSG, wParam, 8, 4, 4); - TEST_FIELD(MSG, lParam, 12, 4, 4); - TEST_FIELD(MSG, time, 16, 4, 4); - TEST_FIELD(MSG, pt, 20, 8, 4); + TEST_TYPE_SIZE (MSG, 28) + TEST_TYPE_ALIGN (MSG, 4) + TEST_FIELD_SIZE (MSG, hwnd, 4) + TEST_FIELD_ALIGN (MSG, hwnd, 4) + TEST_FIELD_OFFSET(MSG, hwnd, 0) + TEST_FIELD_SIZE (MSG, message, 4) + TEST_FIELD_ALIGN (MSG, message, 4) + TEST_FIELD_OFFSET(MSG, message, 4) + TEST_FIELD_SIZE (MSG, wParam, 4) + TEST_FIELD_ALIGN (MSG, wParam, 4) + TEST_FIELD_OFFSET(MSG, wParam, 8) + TEST_FIELD_SIZE (MSG, lParam, 4) + TEST_FIELD_ALIGN (MSG, lParam, 4) + TEST_FIELD_OFFSET(MSG, lParam, 12) + TEST_FIELD_SIZE (MSG, time, 4) + TEST_FIELD_ALIGN (MSG, time, 4) + TEST_FIELD_OFFSET(MSG, time, 16) + TEST_FIELD_SIZE (MSG, pt, 8) + TEST_FIELD_ALIGN (MSG, pt, 4) + TEST_FIELD_OFFSET(MSG, pt, 20) } static void test_pack_MSGBOXCALLBACK(void) { /* MSGBOXCALLBACK */ - TEST_TYPE(MSGBOXCALLBACK, 4, 4); + TEST_TYPE_SIZE (MSGBOXCALLBACK, 4) + TEST_TYPE_ALIGN (MSGBOXCALLBACK, 4) } static void test_pack_MSGBOXPARAMSA(void) { /* MSGBOXPARAMSA (pack 4) */ - TEST_TYPE(MSGBOXPARAMSA, 40, 4); - TEST_FIELD(MSGBOXPARAMSA, cbSize, 0, 4, 4); - TEST_FIELD(MSGBOXPARAMSA, hwndOwner, 4, 4, 4); - TEST_FIELD(MSGBOXPARAMSA, hInstance, 8, 4, 4); - TEST_FIELD(MSGBOXPARAMSA, lpszText, 12, 4, 4); - TEST_FIELD(MSGBOXPARAMSA, lpszCaption, 16, 4, 4); - TEST_FIELD(MSGBOXPARAMSA, dwStyle, 20, 4, 4); - TEST_FIELD(MSGBOXPARAMSA, lpszIcon, 24, 4, 4); - TEST_FIELD(MSGBOXPARAMSA, dwContextHelpId, 28, 4, 4); - TEST_FIELD(MSGBOXPARAMSA, lpfnMsgBoxCallback, 32, 4, 4); - TEST_FIELD(MSGBOXPARAMSA, dwLanguageId, 36, 4, 4); + TEST_TYPE_SIZE (MSGBOXPARAMSA, 40) + TEST_TYPE_ALIGN (MSGBOXPARAMSA, 4) + TEST_FIELD_SIZE (MSGBOXPARAMSA, cbSize, 4) + TEST_FIELD_ALIGN (MSGBOXPARAMSA, cbSize, 4) + TEST_FIELD_OFFSET(MSGBOXPARAMSA, cbSize, 0) + TEST_FIELD_SIZE (MSGBOXPARAMSA, hwndOwner, 4) + TEST_FIELD_ALIGN (MSGBOXPARAMSA, hwndOwner, 4) + TEST_FIELD_OFFSET(MSGBOXPARAMSA, hwndOwner, 4) + TEST_FIELD_SIZE (MSGBOXPARAMSA, hInstance, 4) + TEST_FIELD_ALIGN (MSGBOXPARAMSA, hInstance, 4) + TEST_FIELD_OFFSET(MSGBOXPARAMSA, hInstance, 8) + TEST_FIELD_SIZE (MSGBOXPARAMSA, lpszText, 4) + TEST_FIELD_ALIGN (MSGBOXPARAMSA, lpszText, 4) + TEST_FIELD_OFFSET(MSGBOXPARAMSA, lpszText, 12) + TEST_FIELD_SIZE (MSGBOXPARAMSA, lpszCaption, 4) + TEST_FIELD_ALIGN (MSGBOXPARAMSA, lpszCaption, 4) + TEST_FIELD_OFFSET(MSGBOXPARAMSA, lpszCaption, 16) + TEST_FIELD_SIZE (MSGBOXPARAMSA, dwStyle, 4) + TEST_FIELD_ALIGN (MSGBOXPARAMSA, dwStyle, 4) + TEST_FIELD_OFFSET(MSGBOXPARAMSA, dwStyle, 20) + TEST_FIELD_SIZE (MSGBOXPARAMSA, lpszIcon, 4) + TEST_FIELD_ALIGN (MSGBOXPARAMSA, lpszIcon, 4) + TEST_FIELD_OFFSET(MSGBOXPARAMSA, lpszIcon, 24) + TEST_FIELD_SIZE (MSGBOXPARAMSA, dwContextHelpId, 4) + TEST_FIELD_ALIGN (MSGBOXPARAMSA, dwContextHelpId, 4) + TEST_FIELD_OFFSET(MSGBOXPARAMSA, dwContextHelpId, 28) + TEST_FIELD_SIZE (MSGBOXPARAMSA, lpfnMsgBoxCallback, 4) + TEST_FIELD_ALIGN (MSGBOXPARAMSA, lpfnMsgBoxCallback, 4) + TEST_FIELD_OFFSET(MSGBOXPARAMSA, lpfnMsgBoxCallback, 32) + TEST_FIELD_SIZE (MSGBOXPARAMSA, dwLanguageId, 4) + TEST_FIELD_ALIGN (MSGBOXPARAMSA, dwLanguageId, 4) + TEST_FIELD_OFFSET(MSGBOXPARAMSA, dwLanguageId, 36) } static void test_pack_MSGBOXPARAMSW(void) { /* MSGBOXPARAMSW (pack 4) */ - TEST_TYPE(MSGBOXPARAMSW, 40, 4); - TEST_FIELD(MSGBOXPARAMSW, cbSize, 0, 4, 4); - TEST_FIELD(MSGBOXPARAMSW, hwndOwner, 4, 4, 4); - TEST_FIELD(MSGBOXPARAMSW, hInstance, 8, 4, 4); - TEST_FIELD(MSGBOXPARAMSW, lpszText, 12, 4, 4); - TEST_FIELD(MSGBOXPARAMSW, lpszCaption, 16, 4, 4); - TEST_FIELD(MSGBOXPARAMSW, dwStyle, 20, 4, 4); - TEST_FIELD(MSGBOXPARAMSW, lpszIcon, 24, 4, 4); - TEST_FIELD(MSGBOXPARAMSW, dwContextHelpId, 28, 4, 4); - TEST_FIELD(MSGBOXPARAMSW, lpfnMsgBoxCallback, 32, 4, 4); - TEST_FIELD(MSGBOXPARAMSW, dwLanguageId, 36, 4, 4); + TEST_TYPE_SIZE (MSGBOXPARAMSW, 40) + TEST_TYPE_ALIGN (MSGBOXPARAMSW, 4) + TEST_FIELD_SIZE (MSGBOXPARAMSW, cbSize, 4) + TEST_FIELD_ALIGN (MSGBOXPARAMSW, cbSize, 4) + TEST_FIELD_OFFSET(MSGBOXPARAMSW, cbSize, 0) + TEST_FIELD_SIZE (MSGBOXPARAMSW, hwndOwner, 4) + TEST_FIELD_ALIGN (MSGBOXPARAMSW, hwndOwner, 4) + TEST_FIELD_OFFSET(MSGBOXPARAMSW, hwndOwner, 4) + TEST_FIELD_SIZE (MSGBOXPARAMSW, hInstance, 4) + TEST_FIELD_ALIGN (MSGBOXPARAMSW, hInstance, 4) + TEST_FIELD_OFFSET(MSGBOXPARAMSW, hInstance, 8) + TEST_FIELD_SIZE (MSGBOXPARAMSW, lpszText, 4) + TEST_FIELD_ALIGN (MSGBOXPARAMSW, lpszText, 4) + TEST_FIELD_OFFSET(MSGBOXPARAMSW, lpszText, 12) + TEST_FIELD_SIZE (MSGBOXPARAMSW, lpszCaption, 4) + TEST_FIELD_ALIGN (MSGBOXPARAMSW, lpszCaption, 4) + TEST_FIELD_OFFSET(MSGBOXPARAMSW, lpszCaption, 16) + TEST_FIELD_SIZE (MSGBOXPARAMSW, dwStyle, 4) + TEST_FIELD_ALIGN (MSGBOXPARAMSW, dwStyle, 4) + TEST_FIELD_OFFSET(MSGBOXPARAMSW, dwStyle, 20) + TEST_FIELD_SIZE (MSGBOXPARAMSW, lpszIcon, 4) + TEST_FIELD_ALIGN (MSGBOXPARAMSW, lpszIcon, 4) + TEST_FIELD_OFFSET(MSGBOXPARAMSW, lpszIcon, 24) + TEST_FIELD_SIZE (MSGBOXPARAMSW, dwContextHelpId, 4) + TEST_FIELD_ALIGN (MSGBOXPARAMSW, dwContextHelpId, 4) + TEST_FIELD_OFFSET(MSGBOXPARAMSW, dwContextHelpId, 28) + TEST_FIELD_SIZE (MSGBOXPARAMSW, lpfnMsgBoxCallback, 4) + TEST_FIELD_ALIGN (MSGBOXPARAMSW, lpfnMsgBoxCallback, 4) + TEST_FIELD_OFFSET(MSGBOXPARAMSW, lpfnMsgBoxCallback, 32) + TEST_FIELD_SIZE (MSGBOXPARAMSW, dwLanguageId, 4) + TEST_FIELD_ALIGN (MSGBOXPARAMSW, dwLanguageId, 4) + TEST_FIELD_OFFSET(MSGBOXPARAMSW, dwLanguageId, 36) } static void test_pack_MSLLHOOKSTRUCT(void) { /* MSLLHOOKSTRUCT (pack 4) */ - TEST_TYPE(MSLLHOOKSTRUCT, 24, 4); - TEST_FIELD(MSLLHOOKSTRUCT, pt, 0, 8, 4); - TEST_FIELD(MSLLHOOKSTRUCT, mouseData, 8, 4, 4); - TEST_FIELD(MSLLHOOKSTRUCT, flags, 12, 4, 4); - TEST_FIELD(MSLLHOOKSTRUCT, time, 16, 4, 4); - TEST_FIELD(MSLLHOOKSTRUCT, dwExtraInfo, 20, 4, 4); + TEST_TYPE_SIZE (MSLLHOOKSTRUCT, 24) + TEST_TYPE_ALIGN (MSLLHOOKSTRUCT, 4) + TEST_FIELD_SIZE (MSLLHOOKSTRUCT, pt, 8) + TEST_FIELD_ALIGN (MSLLHOOKSTRUCT, pt, 4) + TEST_FIELD_OFFSET(MSLLHOOKSTRUCT, pt, 0) + TEST_FIELD_SIZE (MSLLHOOKSTRUCT, mouseData, 4) + TEST_FIELD_ALIGN (MSLLHOOKSTRUCT, mouseData, 4) + TEST_FIELD_OFFSET(MSLLHOOKSTRUCT, mouseData, 8) + TEST_FIELD_SIZE (MSLLHOOKSTRUCT, flags, 4) + TEST_FIELD_ALIGN (MSLLHOOKSTRUCT, flags, 4) + TEST_FIELD_OFFSET(MSLLHOOKSTRUCT, flags, 12) + TEST_FIELD_SIZE (MSLLHOOKSTRUCT, time, 4) + TEST_FIELD_ALIGN (MSLLHOOKSTRUCT, time, 4) + TEST_FIELD_OFFSET(MSLLHOOKSTRUCT, time, 16) + TEST_FIELD_SIZE (MSLLHOOKSTRUCT, dwExtraInfo, 4) + TEST_FIELD_ALIGN (MSLLHOOKSTRUCT, dwExtraInfo, 4) + TEST_FIELD_OFFSET(MSLLHOOKSTRUCT, dwExtraInfo, 20) } static void test_pack_MULTIKEYHELPA(void) { /* MULTIKEYHELPA (pack 4) */ - TEST_TYPE(MULTIKEYHELPA, 8, 4); - TEST_FIELD(MULTIKEYHELPA, mkSize, 0, 4, 4); - TEST_FIELD(MULTIKEYHELPA, mkKeylist, 4, 1, 1); - TEST_FIELD(MULTIKEYHELPA, szKeyphrase, 5, 1, 1); + TEST_TYPE_SIZE (MULTIKEYHELPA, 8) + TEST_TYPE_ALIGN (MULTIKEYHELPA, 4) + TEST_FIELD_SIZE (MULTIKEYHELPA, mkSize, 4) + TEST_FIELD_ALIGN (MULTIKEYHELPA, mkSize, 4) + TEST_FIELD_OFFSET(MULTIKEYHELPA, mkSize, 0) + TEST_FIELD_SIZE (MULTIKEYHELPA, mkKeylist, 1) + TEST_FIELD_ALIGN (MULTIKEYHELPA, mkKeylist, 1) + TEST_FIELD_OFFSET(MULTIKEYHELPA, mkKeylist, 4) + TEST_FIELD_SIZE (MULTIKEYHELPA, szKeyphrase, 1) + TEST_FIELD_ALIGN (MULTIKEYHELPA, szKeyphrase, 1) + TEST_FIELD_OFFSET(MULTIKEYHELPA, szKeyphrase, 5) } static void test_pack_MULTIKEYHELPW(void) { /* MULTIKEYHELPW (pack 4) */ - TEST_TYPE(MULTIKEYHELPW, 8, 4); - TEST_FIELD(MULTIKEYHELPW, mkSize, 0, 4, 4); - TEST_FIELD(MULTIKEYHELPW, mkKeylist, 4, 2, 2); - TEST_FIELD(MULTIKEYHELPW, szKeyphrase, 6, 2, 2); + TEST_TYPE_SIZE (MULTIKEYHELPW, 8) + TEST_TYPE_ALIGN (MULTIKEYHELPW, 4) + TEST_FIELD_SIZE (MULTIKEYHELPW, mkSize, 4) + TEST_FIELD_ALIGN (MULTIKEYHELPW, mkSize, 4) + TEST_FIELD_OFFSET(MULTIKEYHELPW, mkSize, 0) + TEST_FIELD_SIZE (MULTIKEYHELPW, mkKeylist, 2) + TEST_FIELD_ALIGN (MULTIKEYHELPW, mkKeylist, 2) + TEST_FIELD_OFFSET(MULTIKEYHELPW, mkKeylist, 4) + TEST_FIELD_SIZE (MULTIKEYHELPW, szKeyphrase, 2) + TEST_FIELD_ALIGN (MULTIKEYHELPW, szKeyphrase, 2) + TEST_FIELD_OFFSET(MULTIKEYHELPW, szKeyphrase, 6) } static void test_pack_NAMEENUMPROCA(void) { /* NAMEENUMPROCA */ - TEST_TYPE(NAMEENUMPROCA, 4, 4); + TEST_TYPE_SIZE (NAMEENUMPROCA, 4) + TEST_TYPE_ALIGN (NAMEENUMPROCA, 4) } static void test_pack_NAMEENUMPROCW(void) { /* NAMEENUMPROCW */ - TEST_TYPE(NAMEENUMPROCW, 4, 4); + TEST_TYPE_SIZE (NAMEENUMPROCW, 4) + TEST_TYPE_ALIGN (NAMEENUMPROCW, 4) } static void test_pack_NCCALCSIZE_PARAMS(void) { /* NCCALCSIZE_PARAMS (pack 4) */ - TEST_TYPE(NCCALCSIZE_PARAMS, 52, 4); - TEST_FIELD(NCCALCSIZE_PARAMS, rgrc, 0, 48, 4); - TEST_FIELD(NCCALCSIZE_PARAMS, lppos, 48, 4, 4); + TEST_TYPE_SIZE (NCCALCSIZE_PARAMS, 52) + TEST_TYPE_ALIGN (NCCALCSIZE_PARAMS, 4) + TEST_FIELD_SIZE (NCCALCSIZE_PARAMS, rgrc, 48) + TEST_FIELD_ALIGN (NCCALCSIZE_PARAMS, rgrc, 4) + TEST_FIELD_OFFSET(NCCALCSIZE_PARAMS, rgrc, 0) + TEST_FIELD_SIZE (NCCALCSIZE_PARAMS, lppos, 4) + TEST_FIELD_ALIGN (NCCALCSIZE_PARAMS, lppos, 4) + TEST_FIELD_OFFSET(NCCALCSIZE_PARAMS, lppos, 48) } static void test_pack_NMHDR(void) { /* NMHDR (pack 4) */ - TEST_TYPE(NMHDR, 12, 4); - TEST_FIELD(NMHDR, hwndFrom, 0, 4, 4); - TEST_FIELD(NMHDR, idFrom, 4, 4, 4); - TEST_FIELD(NMHDR, code, 8, 4, 4); + TEST_TYPE_SIZE (NMHDR, 12) + TEST_TYPE_ALIGN (NMHDR, 4) + TEST_FIELD_SIZE (NMHDR, hwndFrom, 4) + TEST_FIELD_ALIGN (NMHDR, hwndFrom, 4) + TEST_FIELD_OFFSET(NMHDR, hwndFrom, 0) + TEST_FIELD_SIZE (NMHDR, idFrom, 4) + TEST_FIELD_ALIGN (NMHDR, idFrom, 4) + TEST_FIELD_OFFSET(NMHDR, idFrom, 4) + TEST_FIELD_SIZE (NMHDR, code, 4) + TEST_FIELD_ALIGN (NMHDR, code, 4) + TEST_FIELD_OFFSET(NMHDR, code, 8) } static void test_pack_NONCLIENTMETRICSA(void) { /* NONCLIENTMETRICSA (pack 4) */ - TEST_TYPE(NONCLIENTMETRICSA, 340, 4); - TEST_FIELD(NONCLIENTMETRICSA, cbSize, 0, 4, 4); - TEST_FIELD(NONCLIENTMETRICSA, iBorderWidth, 4, 4, 4); - TEST_FIELD(NONCLIENTMETRICSA, iScrollWidth, 8, 4, 4); - TEST_FIELD(NONCLIENTMETRICSA, iScrollHeight, 12, 4, 4); - TEST_FIELD(NONCLIENTMETRICSA, iCaptionWidth, 16, 4, 4); - TEST_FIELD(NONCLIENTMETRICSA, iCaptionHeight, 20, 4, 4); - TEST_FIELD(NONCLIENTMETRICSA, lfCaptionFont, 24, 60, 4); - TEST_FIELD(NONCLIENTMETRICSA, iSmCaptionWidth, 84, 4, 4); - TEST_FIELD(NONCLIENTMETRICSA, iSmCaptionHeight, 88, 4, 4); - TEST_FIELD(NONCLIENTMETRICSA, lfSmCaptionFont, 92, 60, 4); - TEST_FIELD(NONCLIENTMETRICSA, iMenuWidth, 152, 4, 4); - TEST_FIELD(NONCLIENTMETRICSA, iMenuHeight, 156, 4, 4); - TEST_FIELD(NONCLIENTMETRICSA, lfMenuFont, 160, 60, 4); - TEST_FIELD(NONCLIENTMETRICSA, lfStatusFont, 220, 60, 4); - TEST_FIELD(NONCLIENTMETRICSA, lfMessageFont, 280, 60, 4); + TEST_TYPE_SIZE (NONCLIENTMETRICSA, 340) + TEST_TYPE_ALIGN (NONCLIENTMETRICSA, 4) + TEST_FIELD_SIZE (NONCLIENTMETRICSA, cbSize, 4) + TEST_FIELD_ALIGN (NONCLIENTMETRICSA, cbSize, 4) + TEST_FIELD_OFFSET(NONCLIENTMETRICSA, cbSize, 0) + TEST_FIELD_SIZE (NONCLIENTMETRICSA, iBorderWidth, 4) + TEST_FIELD_ALIGN (NONCLIENTMETRICSA, iBorderWidth, 4) + TEST_FIELD_OFFSET(NONCLIENTMETRICSA, iBorderWidth, 4) + TEST_FIELD_SIZE (NONCLIENTMETRICSA, iScrollWidth, 4) + TEST_FIELD_ALIGN (NONCLIENTMETRICSA, iScrollWidth, 4) + TEST_FIELD_OFFSET(NONCLIENTMETRICSA, iScrollWidth, 8) + TEST_FIELD_SIZE (NONCLIENTMETRICSA, iScrollHeight, 4) + TEST_FIELD_ALIGN (NONCLIENTMETRICSA, iScrollHeight, 4) + TEST_FIELD_OFFSET(NONCLIENTMETRICSA, iScrollHeight, 12) + TEST_FIELD_SIZE (NONCLIENTMETRICSA, iCaptionWidth, 4) + TEST_FIELD_ALIGN (NONCLIENTMETRICSA, iCaptionWidth, 4) + TEST_FIELD_OFFSET(NONCLIENTMETRICSA, iCaptionWidth, 16) + TEST_FIELD_SIZE (NONCLIENTMETRICSA, iCaptionHeight, 4) + TEST_FIELD_ALIGN (NONCLIENTMETRICSA, iCaptionHeight, 4) + TEST_FIELD_OFFSET(NONCLIENTMETRICSA, iCaptionHeight, 20) + TEST_FIELD_SIZE (NONCLIENTMETRICSA, lfCaptionFont, 60) + TEST_FIELD_ALIGN (NONCLIENTMETRICSA, lfCaptionFont, 4) + TEST_FIELD_OFFSET(NONCLIENTMETRICSA, lfCaptionFont, 24) + TEST_FIELD_SIZE (NONCLIENTMETRICSA, iSmCaptionWidth, 4) + TEST_FIELD_ALIGN (NONCLIENTMETRICSA, iSmCaptionWidth, 4) + TEST_FIELD_OFFSET(NONCLIENTMETRICSA, iSmCaptionWidth, 84) + TEST_FIELD_SIZE (NONCLIENTMETRICSA, iSmCaptionHeight, 4) + TEST_FIELD_ALIGN (NONCLIENTMETRICSA, iSmCaptionHeight, 4) + TEST_FIELD_OFFSET(NONCLIENTMETRICSA, iSmCaptionHeight, 88) + TEST_FIELD_SIZE (NONCLIENTMETRICSA, lfSmCaptionFont, 60) + TEST_FIELD_ALIGN (NONCLIENTMETRICSA, lfSmCaptionFont, 4) + TEST_FIELD_OFFSET(NONCLIENTMETRICSA, lfSmCaptionFont, 92) + TEST_FIELD_SIZE (NONCLIENTMETRICSA, iMenuWidth, 4) + TEST_FIELD_ALIGN (NONCLIENTMETRICSA, iMenuWidth, 4) + TEST_FIELD_OFFSET(NONCLIENTMETRICSA, iMenuWidth, 152) + TEST_FIELD_SIZE (NONCLIENTMETRICSA, iMenuHeight, 4) + TEST_FIELD_ALIGN (NONCLIENTMETRICSA, iMenuHeight, 4) + TEST_FIELD_OFFSET(NONCLIENTMETRICSA, iMenuHeight, 156) + TEST_FIELD_SIZE (NONCLIENTMETRICSA, lfMenuFont, 60) + TEST_FIELD_ALIGN (NONCLIENTMETRICSA, lfMenuFont, 4) + TEST_FIELD_OFFSET(NONCLIENTMETRICSA, lfMenuFont, 160) + TEST_FIELD_SIZE (NONCLIENTMETRICSA, lfStatusFont, 60) + TEST_FIELD_ALIGN (NONCLIENTMETRICSA, lfStatusFont, 4) + TEST_FIELD_OFFSET(NONCLIENTMETRICSA, lfStatusFont, 220) + TEST_FIELD_SIZE (NONCLIENTMETRICSA, lfMessageFont, 60) + TEST_FIELD_ALIGN (NONCLIENTMETRICSA, lfMessageFont, 4) + TEST_FIELD_OFFSET(NONCLIENTMETRICSA, lfMessageFont, 280) } static void test_pack_NONCLIENTMETRICSW(void) { /* NONCLIENTMETRICSW (pack 4) */ - TEST_TYPE(NONCLIENTMETRICSW, 500, 4); - TEST_FIELD(NONCLIENTMETRICSW, cbSize, 0, 4, 4); - TEST_FIELD(NONCLIENTMETRICSW, iBorderWidth, 4, 4, 4); - TEST_FIELD(NONCLIENTMETRICSW, iScrollWidth, 8, 4, 4); - TEST_FIELD(NONCLIENTMETRICSW, iScrollHeight, 12, 4, 4); - TEST_FIELD(NONCLIENTMETRICSW, iCaptionWidth, 16, 4, 4); - TEST_FIELD(NONCLIENTMETRICSW, iCaptionHeight, 20, 4, 4); - TEST_FIELD(NONCLIENTMETRICSW, lfCaptionFont, 24, 92, 4); - TEST_FIELD(NONCLIENTMETRICSW, iSmCaptionWidth, 116, 4, 4); - TEST_FIELD(NONCLIENTMETRICSW, iSmCaptionHeight, 120, 4, 4); - TEST_FIELD(NONCLIENTMETRICSW, lfSmCaptionFont, 124, 92, 4); - TEST_FIELD(NONCLIENTMETRICSW, iMenuWidth, 216, 4, 4); - TEST_FIELD(NONCLIENTMETRICSW, iMenuHeight, 220, 4, 4); - TEST_FIELD(NONCLIENTMETRICSW, lfMenuFont, 224, 92, 4); - TEST_FIELD(NONCLIENTMETRICSW, lfStatusFont, 316, 92, 4); - TEST_FIELD(NONCLIENTMETRICSW, lfMessageFont, 408, 92, 4); + TEST_TYPE_SIZE (NONCLIENTMETRICSW, 500) + TEST_TYPE_ALIGN (NONCLIENTMETRICSW, 4) + TEST_FIELD_SIZE (NONCLIENTMETRICSW, cbSize, 4) + TEST_FIELD_ALIGN (NONCLIENTMETRICSW, cbSize, 4) + TEST_FIELD_OFFSET(NONCLIENTMETRICSW, cbSize, 0) + TEST_FIELD_SIZE (NONCLIENTMETRICSW, iBorderWidth, 4) + TEST_FIELD_ALIGN (NONCLIENTMETRICSW, iBorderWidth, 4) + TEST_FIELD_OFFSET(NONCLIENTMETRICSW, iBorderWidth, 4) + TEST_FIELD_SIZE (NONCLIENTMETRICSW, iScrollWidth, 4) + TEST_FIELD_ALIGN (NONCLIENTMETRICSW, iScrollWidth, 4) + TEST_FIELD_OFFSET(NONCLIENTMETRICSW, iScrollWidth, 8) + TEST_FIELD_SIZE (NONCLIENTMETRICSW, iScrollHeight, 4) + TEST_FIELD_ALIGN (NONCLIENTMETRICSW, iScrollHeight, 4) + TEST_FIELD_OFFSET(NONCLIENTMETRICSW, iScrollHeight, 12) + TEST_FIELD_SIZE (NONCLIENTMETRICSW, iCaptionWidth, 4) + TEST_FIELD_ALIGN (NONCLIENTMETRICSW, iCaptionWidth, 4) + TEST_FIELD_OFFSET(NONCLIENTMETRICSW, iCaptionWidth, 16) + TEST_FIELD_SIZE (NONCLIENTMETRICSW, iCaptionHeight, 4) + TEST_FIELD_ALIGN (NONCLIENTMETRICSW, iCaptionHeight, 4) + TEST_FIELD_OFFSET(NONCLIENTMETRICSW, iCaptionHeight, 20) + TEST_FIELD_SIZE (NONCLIENTMETRICSW, lfCaptionFont, 92) + TEST_FIELD_ALIGN (NONCLIENTMETRICSW, lfCaptionFont, 4) + TEST_FIELD_OFFSET(NONCLIENTMETRICSW, lfCaptionFont, 24) + TEST_FIELD_SIZE (NONCLIENTMETRICSW, iSmCaptionWidth, 4) + TEST_FIELD_ALIGN (NONCLIENTMETRICSW, iSmCaptionWidth, 4) + TEST_FIELD_OFFSET(NONCLIENTMETRICSW, iSmCaptionWidth, 116) + TEST_FIELD_SIZE (NONCLIENTMETRICSW, iSmCaptionHeight, 4) + TEST_FIELD_ALIGN (NONCLIENTMETRICSW, iSmCaptionHeight, 4) + TEST_FIELD_OFFSET(NONCLIENTMETRICSW, iSmCaptionHeight, 120) + TEST_FIELD_SIZE (NONCLIENTMETRICSW, lfSmCaptionFont, 92) + TEST_FIELD_ALIGN (NONCLIENTMETRICSW, lfSmCaptionFont, 4) + TEST_FIELD_OFFSET(NONCLIENTMETRICSW, lfSmCaptionFont, 124) + TEST_FIELD_SIZE (NONCLIENTMETRICSW, iMenuWidth, 4) + TEST_FIELD_ALIGN (NONCLIENTMETRICSW, iMenuWidth, 4) + TEST_FIELD_OFFSET(NONCLIENTMETRICSW, iMenuWidth, 216) + TEST_FIELD_SIZE (NONCLIENTMETRICSW, iMenuHeight, 4) + TEST_FIELD_ALIGN (NONCLIENTMETRICSW, iMenuHeight, 4) + TEST_FIELD_OFFSET(NONCLIENTMETRICSW, iMenuHeight, 220) + TEST_FIELD_SIZE (NONCLIENTMETRICSW, lfMenuFont, 92) + TEST_FIELD_ALIGN (NONCLIENTMETRICSW, lfMenuFont, 4) + TEST_FIELD_OFFSET(NONCLIENTMETRICSW, lfMenuFont, 224) + TEST_FIELD_SIZE (NONCLIENTMETRICSW, lfStatusFont, 92) + TEST_FIELD_ALIGN (NONCLIENTMETRICSW, lfStatusFont, 4) + TEST_FIELD_OFFSET(NONCLIENTMETRICSW, lfStatusFont, 316) + TEST_FIELD_SIZE (NONCLIENTMETRICSW, lfMessageFont, 92) + TEST_FIELD_ALIGN (NONCLIENTMETRICSW, lfMessageFont, 4) + TEST_FIELD_OFFSET(NONCLIENTMETRICSW, lfMessageFont, 408) } static void test_pack_PAINTSTRUCT(void) { /* PAINTSTRUCT (pack 4) */ - TEST_TYPE(PAINTSTRUCT, 64, 4); - TEST_FIELD(PAINTSTRUCT, hdc, 0, 4, 4); - TEST_FIELD(PAINTSTRUCT, fErase, 4, 4, 4); - TEST_FIELD(PAINTSTRUCT, rcPaint, 8, 16, 4); - TEST_FIELD(PAINTSTRUCT, fRestore, 24, 4, 4); - TEST_FIELD(PAINTSTRUCT, fIncUpdate, 28, 4, 4); - TEST_FIELD(PAINTSTRUCT, rgbReserved, 32, 32, 1); + TEST_TYPE_SIZE (PAINTSTRUCT, 64) + TEST_TYPE_ALIGN (PAINTSTRUCT, 4) + TEST_FIELD_SIZE (PAINTSTRUCT, hdc, 4) + TEST_FIELD_ALIGN (PAINTSTRUCT, hdc, 4) + TEST_FIELD_OFFSET(PAINTSTRUCT, hdc, 0) + TEST_FIELD_SIZE (PAINTSTRUCT, fErase, 4) + TEST_FIELD_ALIGN (PAINTSTRUCT, fErase, 4) + TEST_FIELD_OFFSET(PAINTSTRUCT, fErase, 4) + TEST_FIELD_SIZE (PAINTSTRUCT, rcPaint, 16) + TEST_FIELD_ALIGN (PAINTSTRUCT, rcPaint, 4) + TEST_FIELD_OFFSET(PAINTSTRUCT, rcPaint, 8) + TEST_FIELD_SIZE (PAINTSTRUCT, fRestore, 4) + TEST_FIELD_ALIGN (PAINTSTRUCT, fRestore, 4) + TEST_FIELD_OFFSET(PAINTSTRUCT, fRestore, 24) + TEST_FIELD_SIZE (PAINTSTRUCT, fIncUpdate, 4) + TEST_FIELD_ALIGN (PAINTSTRUCT, fIncUpdate, 4) + TEST_FIELD_OFFSET(PAINTSTRUCT, fIncUpdate, 28) + TEST_FIELD_SIZE (PAINTSTRUCT, rgbReserved, 32) + TEST_FIELD_ALIGN (PAINTSTRUCT, rgbReserved, 1) + TEST_FIELD_OFFSET(PAINTSTRUCT, rgbReserved, 32) } static void test_pack_PCOMBOBOXINFO(void) { /* PCOMBOBOXINFO */ - TEST_TYPE(PCOMBOBOXINFO, 4, 4); - TEST_TYPE_POINTER(PCOMBOBOXINFO, 52, 4); + TEST_TYPE_SIZE (PCOMBOBOXINFO, 4) + TEST_TYPE_ALIGN (PCOMBOBOXINFO, 4) + TEST_TARGET_SIZE (PCOMBOBOXINFO, 52) + TEST_TARGET_ALIGN(PCOMBOBOXINFO, 4) } static void test_pack_PCOMPAREITEMSTRUCT(void) { /* PCOMPAREITEMSTRUCT */ - TEST_TYPE(PCOMPAREITEMSTRUCT, 4, 4); - TEST_TYPE_POINTER(PCOMPAREITEMSTRUCT, 32, 4); + TEST_TYPE_SIZE (PCOMPAREITEMSTRUCT, 4) + TEST_TYPE_ALIGN (PCOMPAREITEMSTRUCT, 4) + TEST_TARGET_SIZE (PCOMPAREITEMSTRUCT, 32) + TEST_TARGET_ALIGN(PCOMPAREITEMSTRUCT, 4) } static void test_pack_PCOPYDATASTRUCT(void) { /* PCOPYDATASTRUCT */ - TEST_TYPE(PCOPYDATASTRUCT, 4, 4); - TEST_TYPE_POINTER(PCOPYDATASTRUCT, 12, 4); + TEST_TYPE_SIZE (PCOPYDATASTRUCT, 4) + TEST_TYPE_ALIGN (PCOPYDATASTRUCT, 4) + TEST_TARGET_SIZE (PCOPYDATASTRUCT, 12) + TEST_TARGET_ALIGN(PCOPYDATASTRUCT, 4) } static void test_pack_PCURSORINFO(void) { /* PCURSORINFO */ - TEST_TYPE(PCURSORINFO, 4, 4); - TEST_TYPE_POINTER(PCURSORINFO, 20, 4); + TEST_TYPE_SIZE (PCURSORINFO, 4) + TEST_TYPE_ALIGN (PCURSORINFO, 4) + TEST_TARGET_SIZE (PCURSORINFO, 20) + TEST_TARGET_ALIGN(PCURSORINFO, 4) } static void test_pack_PCWPRETSTRUCT(void) { /* PCWPRETSTRUCT */ - TEST_TYPE(PCWPRETSTRUCT, 4, 4); - TEST_TYPE_POINTER(PCWPRETSTRUCT, 20, 4); + TEST_TYPE_SIZE (PCWPRETSTRUCT, 4) + TEST_TYPE_ALIGN (PCWPRETSTRUCT, 4) + TEST_TARGET_SIZE (PCWPRETSTRUCT, 20) + TEST_TARGET_ALIGN(PCWPRETSTRUCT, 4) } static void test_pack_PCWPSTRUCT(void) { /* PCWPSTRUCT */ - TEST_TYPE(PCWPSTRUCT, 4, 4); - TEST_TYPE_POINTER(PCWPSTRUCT, 16, 4); + TEST_TYPE_SIZE (PCWPSTRUCT, 4) + TEST_TYPE_ALIGN (PCWPSTRUCT, 4) + TEST_TARGET_SIZE (PCWPSTRUCT, 16) + TEST_TARGET_ALIGN(PCWPSTRUCT, 4) } static void test_pack_PDEBUGHOOKINFO(void) { /* PDEBUGHOOKINFO */ - TEST_TYPE(PDEBUGHOOKINFO, 4, 4); - TEST_TYPE_POINTER(PDEBUGHOOKINFO, 20, 4); + TEST_TYPE_SIZE (PDEBUGHOOKINFO, 4) + TEST_TYPE_ALIGN (PDEBUGHOOKINFO, 4) + TEST_TARGET_SIZE (PDEBUGHOOKINFO, 20) + TEST_TARGET_ALIGN(PDEBUGHOOKINFO, 4) } static void test_pack_PDELETEITEMSTRUCT(void) { /* PDELETEITEMSTRUCT */ - TEST_TYPE(PDELETEITEMSTRUCT, 4, 4); - TEST_TYPE_POINTER(PDELETEITEMSTRUCT, 20, 4); + TEST_TYPE_SIZE (PDELETEITEMSTRUCT, 4) + TEST_TYPE_ALIGN (PDELETEITEMSTRUCT, 4) + TEST_TARGET_SIZE (PDELETEITEMSTRUCT, 20) + TEST_TARGET_ALIGN(PDELETEITEMSTRUCT, 4) } static void test_pack_PDLGITEMTEMPLATEA(void) { /* PDLGITEMTEMPLATEA */ - TEST_TYPE(PDLGITEMTEMPLATEA, 4, 4); - TEST_TYPE_POINTER(PDLGITEMTEMPLATEA, 18, 2); + TEST_TYPE_SIZE (PDLGITEMTEMPLATEA, 4) + TEST_TYPE_ALIGN (PDLGITEMTEMPLATEA, 4) + TEST_TARGET_SIZE (PDLGITEMTEMPLATEA, 18) + TEST_TARGET_ALIGN(PDLGITEMTEMPLATEA, 2) } static void test_pack_PDLGITEMTEMPLATEW(void) { /* PDLGITEMTEMPLATEW */ - TEST_TYPE(PDLGITEMTEMPLATEW, 4, 4); - TEST_TYPE_POINTER(PDLGITEMTEMPLATEW, 18, 2); + TEST_TYPE_SIZE (PDLGITEMTEMPLATEW, 4) + TEST_TYPE_ALIGN (PDLGITEMTEMPLATEW, 4) + TEST_TARGET_SIZE (PDLGITEMTEMPLATEW, 18) + TEST_TARGET_ALIGN(PDLGITEMTEMPLATEW, 2) } static void test_pack_PDRAWITEMSTRUCT(void) { /* PDRAWITEMSTRUCT */ - TEST_TYPE(PDRAWITEMSTRUCT, 4, 4); - TEST_TYPE_POINTER(PDRAWITEMSTRUCT, 48, 4); + TEST_TYPE_SIZE (PDRAWITEMSTRUCT, 4) + TEST_TYPE_ALIGN (PDRAWITEMSTRUCT, 4) + TEST_TARGET_SIZE (PDRAWITEMSTRUCT, 48) + TEST_TARGET_ALIGN(PDRAWITEMSTRUCT, 4) } static void test_pack_PEVENTMSG(void) { /* PEVENTMSG */ - TEST_TYPE(PEVENTMSG, 4, 4); - TEST_TYPE_POINTER(PEVENTMSG, 20, 4); + TEST_TYPE_SIZE (PEVENTMSG, 4) + TEST_TYPE_ALIGN (PEVENTMSG, 4) + TEST_TARGET_SIZE (PEVENTMSG, 20) + TEST_TARGET_ALIGN(PEVENTMSG, 4) } static void test_pack_PFLASHWINFO(void) { /* PFLASHWINFO */ - TEST_TYPE(PFLASHWINFO, 4, 4); - TEST_TYPE_POINTER(PFLASHWINFO, 20, 4); + TEST_TYPE_SIZE (PFLASHWINFO, 4) + TEST_TYPE_ALIGN (PFLASHWINFO, 4) + TEST_TARGET_SIZE (PFLASHWINFO, 20) + TEST_TARGET_ALIGN(PFLASHWINFO, 4) } static void test_pack_PGUITHREADINFO(void) { /* PGUITHREADINFO */ - TEST_TYPE(PGUITHREADINFO, 4, 4); - TEST_TYPE_POINTER(PGUITHREADINFO, 48, 4); + TEST_TYPE_SIZE (PGUITHREADINFO, 4) + TEST_TYPE_ALIGN (PGUITHREADINFO, 4) + TEST_TARGET_SIZE (PGUITHREADINFO, 48) + TEST_TARGET_ALIGN(PGUITHREADINFO, 4) } static void test_pack_PHARDWAREHOOKSTRUCT(void) { /* PHARDWAREHOOKSTRUCT */ - TEST_TYPE(PHARDWAREHOOKSTRUCT, 4, 4); - TEST_TYPE_POINTER(PHARDWAREHOOKSTRUCT, 16, 4); + TEST_TYPE_SIZE (PHARDWAREHOOKSTRUCT, 4) + TEST_TYPE_ALIGN (PHARDWAREHOOKSTRUCT, 4) + TEST_TARGET_SIZE (PHARDWAREHOOKSTRUCT, 16) + TEST_TARGET_ALIGN(PHARDWAREHOOKSTRUCT, 4) } static void test_pack_PHARDWAREINPUT(void) { /* PHARDWAREINPUT */ - TEST_TYPE(PHARDWAREINPUT, 4, 4); - TEST_TYPE_POINTER(PHARDWAREINPUT, 8, 4); + TEST_TYPE_SIZE (PHARDWAREINPUT, 4) + TEST_TYPE_ALIGN (PHARDWAREINPUT, 4) + TEST_TARGET_SIZE (PHARDWAREINPUT, 8) + TEST_TARGET_ALIGN(PHARDWAREINPUT, 4) } static void test_pack_PHDEVNOTIFY(void) { /* PHDEVNOTIFY */ - TEST_TYPE(PHDEVNOTIFY, 4, 4); - TEST_TYPE_POINTER(PHDEVNOTIFY, 4, 4); + TEST_TYPE_SIZE (PHDEVNOTIFY, 4) + TEST_TYPE_ALIGN (PHDEVNOTIFY, 4) + TEST_TARGET_SIZE (PHDEVNOTIFY, 4) + TEST_TARGET_ALIGN(PHDEVNOTIFY, 4) } static void test_pack_PHELPWININFOA(void) { /* PHELPWININFOA */ - TEST_TYPE(PHELPWININFOA, 4, 4); - TEST_TYPE_POINTER(PHELPWININFOA, 28, 4); + TEST_TYPE_SIZE (PHELPWININFOA, 4) + TEST_TYPE_ALIGN (PHELPWININFOA, 4) + TEST_TARGET_SIZE (PHELPWININFOA, 28) + TEST_TARGET_ALIGN(PHELPWININFOA, 4) } static void test_pack_PHELPWININFOW(void) { /* PHELPWININFOW */ - TEST_TYPE(PHELPWININFOW, 4, 4); - TEST_TYPE_POINTER(PHELPWININFOW, 28, 4); + TEST_TYPE_SIZE (PHELPWININFOW, 4) + TEST_TYPE_ALIGN (PHELPWININFOW, 4) + TEST_TARGET_SIZE (PHELPWININFOW, 28) + TEST_TARGET_ALIGN(PHELPWININFOW, 4) } static void test_pack_PICONINFO(void) { /* PICONINFO */ - TEST_TYPE(PICONINFO, 4, 4); - TEST_TYPE_POINTER(PICONINFO, 20, 4); + TEST_TYPE_SIZE (PICONINFO, 4) + TEST_TYPE_ALIGN (PICONINFO, 4) + TEST_TARGET_SIZE (PICONINFO, 20) + TEST_TARGET_ALIGN(PICONINFO, 4) } static void test_pack_PICONMETRICSA(void) { /* PICONMETRICSA */ - TEST_TYPE(PICONMETRICSA, 4, 4); - TEST_TYPE_POINTER(PICONMETRICSA, 76, 4); + TEST_TYPE_SIZE (PICONMETRICSA, 4) + TEST_TYPE_ALIGN (PICONMETRICSA, 4) + TEST_TARGET_SIZE (PICONMETRICSA, 76) + TEST_TARGET_ALIGN(PICONMETRICSA, 4) } static void test_pack_PICONMETRICSW(void) { /* PICONMETRICSW */ - TEST_TYPE(PICONMETRICSW, 4, 4); - TEST_TYPE_POINTER(PICONMETRICSW, 108, 4); + TEST_TYPE_SIZE (PICONMETRICSW, 4) + TEST_TYPE_ALIGN (PICONMETRICSW, 4) + TEST_TARGET_SIZE (PICONMETRICSW, 108) + TEST_TARGET_ALIGN(PICONMETRICSW, 4) } static void test_pack_PINPUT(void) { /* PINPUT */ - TEST_TYPE(PINPUT, 4, 4); + TEST_TYPE_SIZE (PINPUT, 4) + TEST_TYPE_ALIGN (PINPUT, 4) } static void test_pack_PKBDLLHOOKSTRUCT(void) { /* PKBDLLHOOKSTRUCT */ - TEST_TYPE(PKBDLLHOOKSTRUCT, 4, 4); - TEST_TYPE_POINTER(PKBDLLHOOKSTRUCT, 20, 4); + TEST_TYPE_SIZE (PKBDLLHOOKSTRUCT, 4) + TEST_TYPE_ALIGN (PKBDLLHOOKSTRUCT, 4) + TEST_TARGET_SIZE (PKBDLLHOOKSTRUCT, 20) + TEST_TARGET_ALIGN(PKBDLLHOOKSTRUCT, 4) } static void test_pack_PKEYBDINPUT(void) { /* PKEYBDINPUT */ - TEST_TYPE(PKEYBDINPUT, 4, 4); - TEST_TYPE_POINTER(PKEYBDINPUT, 16, 4); + TEST_TYPE_SIZE (PKEYBDINPUT, 4) + TEST_TYPE_ALIGN (PKEYBDINPUT, 4) + TEST_TARGET_SIZE (PKEYBDINPUT, 16) + TEST_TARGET_ALIGN(PKEYBDINPUT, 4) } static void test_pack_PMDINEXTMENU(void) { /* PMDINEXTMENU */ - TEST_TYPE(PMDINEXTMENU, 4, 4); - TEST_TYPE_POINTER(PMDINEXTMENU, 12, 4); + TEST_TYPE_SIZE (PMDINEXTMENU, 4) + TEST_TYPE_ALIGN (PMDINEXTMENU, 4) + TEST_TARGET_SIZE (PMDINEXTMENU, 12) + TEST_TARGET_ALIGN(PMDINEXTMENU, 4) } static void test_pack_PMEASUREITEMSTRUCT(void) { /* PMEASUREITEMSTRUCT */ - TEST_TYPE(PMEASUREITEMSTRUCT, 4, 4); - TEST_TYPE_POINTER(PMEASUREITEMSTRUCT, 24, 4); + TEST_TYPE_SIZE (PMEASUREITEMSTRUCT, 4) + TEST_TYPE_ALIGN (PMEASUREITEMSTRUCT, 4) + TEST_TARGET_SIZE (PMEASUREITEMSTRUCT, 24) + TEST_TARGET_ALIGN(PMEASUREITEMSTRUCT, 4) } static void test_pack_PMENUITEMTEMPLATE(void) { /* PMENUITEMTEMPLATE */ - TEST_TYPE(PMENUITEMTEMPLATE, 4, 4); - TEST_TYPE_POINTER(PMENUITEMTEMPLATE, 6, 2); + TEST_TYPE_SIZE (PMENUITEMTEMPLATE, 4) + TEST_TYPE_ALIGN (PMENUITEMTEMPLATE, 4) + TEST_TARGET_SIZE (PMENUITEMTEMPLATE, 6) + TEST_TARGET_ALIGN(PMENUITEMTEMPLATE, 2) } static void test_pack_PMENUITEMTEMPLATEHEADER(void) { /* PMENUITEMTEMPLATEHEADER */ - TEST_TYPE(PMENUITEMTEMPLATEHEADER, 4, 4); - TEST_TYPE_POINTER(PMENUITEMTEMPLATEHEADER, 4, 2); + TEST_TYPE_SIZE (PMENUITEMTEMPLATEHEADER, 4) + TEST_TYPE_ALIGN (PMENUITEMTEMPLATEHEADER, 4) + TEST_TARGET_SIZE (PMENUITEMTEMPLATEHEADER, 4) + TEST_TARGET_ALIGN(PMENUITEMTEMPLATEHEADER, 2) } static void test_pack_PMINIMIZEDMETRICS(void) { /* PMINIMIZEDMETRICS */ - TEST_TYPE(PMINIMIZEDMETRICS, 4, 4); - TEST_TYPE_POINTER(PMINIMIZEDMETRICS, 20, 4); + TEST_TYPE_SIZE (PMINIMIZEDMETRICS, 4) + TEST_TYPE_ALIGN (PMINIMIZEDMETRICS, 4) + TEST_TARGET_SIZE (PMINIMIZEDMETRICS, 20) + TEST_TARGET_ALIGN(PMINIMIZEDMETRICS, 4) } static void test_pack_PMINMAXINFO(void) { /* PMINMAXINFO */ - TEST_TYPE(PMINMAXINFO, 4, 4); - TEST_TYPE_POINTER(PMINMAXINFO, 40, 4); + TEST_TYPE_SIZE (PMINMAXINFO, 4) + TEST_TYPE_ALIGN (PMINMAXINFO, 4) + TEST_TARGET_SIZE (PMINMAXINFO, 40) + TEST_TARGET_ALIGN(PMINMAXINFO, 4) } static void test_pack_PMOUSEHOOKSTRUCT(void) { /* PMOUSEHOOKSTRUCT */ - TEST_TYPE(PMOUSEHOOKSTRUCT, 4, 4); - TEST_TYPE_POINTER(PMOUSEHOOKSTRUCT, 20, 4); + TEST_TYPE_SIZE (PMOUSEHOOKSTRUCT, 4) + TEST_TYPE_ALIGN (PMOUSEHOOKSTRUCT, 4) + TEST_TARGET_SIZE (PMOUSEHOOKSTRUCT, 20) + TEST_TARGET_ALIGN(PMOUSEHOOKSTRUCT, 4) } static void test_pack_PMOUSEINPUT(void) { /* PMOUSEINPUT */ - TEST_TYPE(PMOUSEINPUT, 4, 4); - TEST_TYPE_POINTER(PMOUSEINPUT, 24, 4); + TEST_TYPE_SIZE (PMOUSEINPUT, 4) + TEST_TYPE_ALIGN (PMOUSEINPUT, 4) + TEST_TARGET_SIZE (PMOUSEINPUT, 24) + TEST_TARGET_ALIGN(PMOUSEINPUT, 4) } static void test_pack_PMSG(void) { /* PMSG */ - TEST_TYPE(PMSG, 4, 4); - TEST_TYPE_POINTER(PMSG, 28, 4); + TEST_TYPE_SIZE (PMSG, 4) + TEST_TYPE_ALIGN (PMSG, 4) + TEST_TARGET_SIZE (PMSG, 28) + TEST_TARGET_ALIGN(PMSG, 4) } static void test_pack_PMSGBOXPARAMSA(void) { /* PMSGBOXPARAMSA */ - TEST_TYPE(PMSGBOXPARAMSA, 4, 4); - TEST_TYPE_POINTER(PMSGBOXPARAMSA, 40, 4); + TEST_TYPE_SIZE (PMSGBOXPARAMSA, 4) + TEST_TYPE_ALIGN (PMSGBOXPARAMSA, 4) + TEST_TARGET_SIZE (PMSGBOXPARAMSA, 40) + TEST_TARGET_ALIGN(PMSGBOXPARAMSA, 4) } static void test_pack_PMSGBOXPARAMSW(void) { /* PMSGBOXPARAMSW */ - TEST_TYPE(PMSGBOXPARAMSW, 4, 4); - TEST_TYPE_POINTER(PMSGBOXPARAMSW, 40, 4); + TEST_TYPE_SIZE (PMSGBOXPARAMSW, 4) + TEST_TYPE_ALIGN (PMSGBOXPARAMSW, 4) + TEST_TARGET_SIZE (PMSGBOXPARAMSW, 40) + TEST_TARGET_ALIGN(PMSGBOXPARAMSW, 4) } static void test_pack_PMSLLHOOKSTRUCT(void) { /* PMSLLHOOKSTRUCT */ - TEST_TYPE(PMSLLHOOKSTRUCT, 4, 4); - TEST_TYPE_POINTER(PMSLLHOOKSTRUCT, 24, 4); + TEST_TYPE_SIZE (PMSLLHOOKSTRUCT, 4) + TEST_TYPE_ALIGN (PMSLLHOOKSTRUCT, 4) + TEST_TARGET_SIZE (PMSLLHOOKSTRUCT, 24) + TEST_TARGET_ALIGN(PMSLLHOOKSTRUCT, 4) } static void test_pack_PMULTIKEYHELPA(void) { /* PMULTIKEYHELPA */ - TEST_TYPE(PMULTIKEYHELPA, 4, 4); - TEST_TYPE_POINTER(PMULTIKEYHELPA, 8, 4); + TEST_TYPE_SIZE (PMULTIKEYHELPA, 4) + TEST_TYPE_ALIGN (PMULTIKEYHELPA, 4) + TEST_TARGET_SIZE (PMULTIKEYHELPA, 8) + TEST_TARGET_ALIGN(PMULTIKEYHELPA, 4) } static void test_pack_PMULTIKEYHELPW(void) { /* PMULTIKEYHELPW */ - TEST_TYPE(PMULTIKEYHELPW, 4, 4); - TEST_TYPE_POINTER(PMULTIKEYHELPW, 8, 4); + TEST_TYPE_SIZE (PMULTIKEYHELPW, 4) + TEST_TYPE_ALIGN (PMULTIKEYHELPW, 4) + TEST_TARGET_SIZE (PMULTIKEYHELPW, 8) + TEST_TARGET_ALIGN(PMULTIKEYHELPW, 4) } static void test_pack_PNONCLIENTMETRICSA(void) { /* PNONCLIENTMETRICSA */ - TEST_TYPE(PNONCLIENTMETRICSA, 4, 4); - TEST_TYPE_POINTER(PNONCLIENTMETRICSA, 340, 4); + TEST_TYPE_SIZE (PNONCLIENTMETRICSA, 4) + TEST_TYPE_ALIGN (PNONCLIENTMETRICSA, 4) + TEST_TARGET_SIZE (PNONCLIENTMETRICSA, 340) + TEST_TARGET_ALIGN(PNONCLIENTMETRICSA, 4) } static void test_pack_PNONCLIENTMETRICSW(void) { /* PNONCLIENTMETRICSW */ - TEST_TYPE(PNONCLIENTMETRICSW, 4, 4); - TEST_TYPE_POINTER(PNONCLIENTMETRICSW, 500, 4); + TEST_TYPE_SIZE (PNONCLIENTMETRICSW, 4) + TEST_TYPE_ALIGN (PNONCLIENTMETRICSW, 4) + TEST_TARGET_SIZE (PNONCLIENTMETRICSW, 500) + TEST_TARGET_ALIGN(PNONCLIENTMETRICSW, 4) } static void test_pack_PPAINTSTRUCT(void) { /* PPAINTSTRUCT */ - TEST_TYPE(PPAINTSTRUCT, 4, 4); - TEST_TYPE_POINTER(PPAINTSTRUCT, 64, 4); + TEST_TYPE_SIZE (PPAINTSTRUCT, 4) + TEST_TYPE_ALIGN (PPAINTSTRUCT, 4) + TEST_TARGET_SIZE (PPAINTSTRUCT, 64) + TEST_TARGET_ALIGN(PPAINTSTRUCT, 4) } static void test_pack_PROPENUMPROCA(void) { /* PROPENUMPROCA */ - TEST_TYPE(PROPENUMPROCA, 4, 4); + TEST_TYPE_SIZE (PROPENUMPROCA, 4) + TEST_TYPE_ALIGN (PROPENUMPROCA, 4) } static void test_pack_PROPENUMPROCEXA(void) { /* PROPENUMPROCEXA */ - TEST_TYPE(PROPENUMPROCEXA, 4, 4); + TEST_TYPE_SIZE (PROPENUMPROCEXA, 4) + TEST_TYPE_ALIGN (PROPENUMPROCEXA, 4) } static void test_pack_PROPENUMPROCEXW(void) { /* PROPENUMPROCEXW */ - TEST_TYPE(PROPENUMPROCEXW, 4, 4); + TEST_TYPE_SIZE (PROPENUMPROCEXW, 4) + TEST_TYPE_ALIGN (PROPENUMPROCEXW, 4) } static void test_pack_PROPENUMPROCW(void) { /* PROPENUMPROCW */ - TEST_TYPE(PROPENUMPROCW, 4, 4); + TEST_TYPE_SIZE (PROPENUMPROCW, 4) + TEST_TYPE_ALIGN (PROPENUMPROCW, 4) } static void test_pack_PTITLEBARINFO(void) { /* PTITLEBARINFO */ - TEST_TYPE(PTITLEBARINFO, 4, 4); - TEST_TYPE_POINTER(PTITLEBARINFO, 44, 4); + TEST_TYPE_SIZE (PTITLEBARINFO, 4) + TEST_TYPE_ALIGN (PTITLEBARINFO, 4) + TEST_TARGET_SIZE (PTITLEBARINFO, 44) + TEST_TARGET_ALIGN(PTITLEBARINFO, 4) } static void test_pack_PUSEROBJECTFLAGS(void) { /* PUSEROBJECTFLAGS */ - TEST_TYPE(PUSEROBJECTFLAGS, 4, 4); - TEST_TYPE_POINTER(PUSEROBJECTFLAGS, 12, 4); + TEST_TYPE_SIZE (PUSEROBJECTFLAGS, 4) + TEST_TYPE_ALIGN (PUSEROBJECTFLAGS, 4) + TEST_TARGET_SIZE (PUSEROBJECTFLAGS, 12) + TEST_TARGET_ALIGN(PUSEROBJECTFLAGS, 4) } static void test_pack_PWINDOWINFO(void) { /* PWINDOWINFO */ - TEST_TYPE(PWINDOWINFO, 4, 4); - TEST_TYPE_POINTER(PWINDOWINFO, 60, 4); + TEST_TYPE_SIZE (PWINDOWINFO, 4) + TEST_TYPE_ALIGN (PWINDOWINFO, 4) + TEST_TARGET_SIZE (PWINDOWINFO, 60) + TEST_TARGET_ALIGN(PWINDOWINFO, 4) } static void test_pack_PWINDOWPLACEMENT(void) { /* PWINDOWPLACEMENT */ - TEST_TYPE(PWINDOWPLACEMENT, 4, 4); - TEST_TYPE_POINTER(PWINDOWPLACEMENT, 44, 4); + TEST_TYPE_SIZE (PWINDOWPLACEMENT, 4) + TEST_TYPE_ALIGN (PWINDOWPLACEMENT, 4) + TEST_TARGET_SIZE (PWINDOWPLACEMENT, 44) + TEST_TARGET_ALIGN(PWINDOWPLACEMENT, 4) } static void test_pack_PWINDOWPOS(void) { /* PWINDOWPOS */ - TEST_TYPE(PWINDOWPOS, 4, 4); - TEST_TYPE_POINTER(PWINDOWPOS, 28, 4); + TEST_TYPE_SIZE (PWINDOWPOS, 4) + TEST_TYPE_ALIGN (PWINDOWPOS, 4) + TEST_TARGET_SIZE (PWINDOWPOS, 28) + TEST_TARGET_ALIGN(PWINDOWPOS, 4) } static void test_pack_PWNDCLASSA(void) { /* PWNDCLASSA */ - TEST_TYPE(PWNDCLASSA, 4, 4); - TEST_TYPE_POINTER(PWNDCLASSA, 40, 4); + TEST_TYPE_SIZE (PWNDCLASSA, 4) + TEST_TYPE_ALIGN (PWNDCLASSA, 4) + TEST_TARGET_SIZE (PWNDCLASSA, 40) + TEST_TARGET_ALIGN(PWNDCLASSA, 4) } static void test_pack_PWNDCLASSEXA(void) { /* PWNDCLASSEXA */ - TEST_TYPE(PWNDCLASSEXA, 4, 4); - TEST_TYPE_POINTER(PWNDCLASSEXA, 48, 4); + TEST_TYPE_SIZE (PWNDCLASSEXA, 4) + TEST_TYPE_ALIGN (PWNDCLASSEXA, 4) + TEST_TARGET_SIZE (PWNDCLASSEXA, 48) + TEST_TARGET_ALIGN(PWNDCLASSEXA, 4) } static void test_pack_PWNDCLASSEXW(void) { /* PWNDCLASSEXW */ - TEST_TYPE(PWNDCLASSEXW, 4, 4); - TEST_TYPE_POINTER(PWNDCLASSEXW, 48, 4); + TEST_TYPE_SIZE (PWNDCLASSEXW, 4) + TEST_TYPE_ALIGN (PWNDCLASSEXW, 4) + TEST_TARGET_SIZE (PWNDCLASSEXW, 48) + TEST_TARGET_ALIGN(PWNDCLASSEXW, 4) } static void test_pack_PWNDCLASSW(void) { /* PWNDCLASSW */ - TEST_TYPE(PWNDCLASSW, 4, 4); - TEST_TYPE_POINTER(PWNDCLASSW, 40, 4); + TEST_TYPE_SIZE (PWNDCLASSW, 4) + TEST_TYPE_ALIGN (PWNDCLASSW, 4) + TEST_TARGET_SIZE (PWNDCLASSW, 40) + TEST_TARGET_ALIGN(PWNDCLASSW, 4) } static void test_pack_SCROLLINFO(void) { /* SCROLLINFO (pack 4) */ - TEST_TYPE(SCROLLINFO, 28, 4); - TEST_FIELD(SCROLLINFO, cbSize, 0, 4, 4); - TEST_FIELD(SCROLLINFO, fMask, 4, 4, 4); - TEST_FIELD(SCROLLINFO, nMin, 8, 4, 4); - TEST_FIELD(SCROLLINFO, nMax, 12, 4, 4); - TEST_FIELD(SCROLLINFO, nPage, 16, 4, 4); - TEST_FIELD(SCROLLINFO, nPos, 20, 4, 4); - TEST_FIELD(SCROLLINFO, nTrackPos, 24, 4, 4); + TEST_TYPE_SIZE (SCROLLINFO, 28) + TEST_TYPE_ALIGN (SCROLLINFO, 4) + TEST_FIELD_SIZE (SCROLLINFO, cbSize, 4) + TEST_FIELD_ALIGN (SCROLLINFO, cbSize, 4) + TEST_FIELD_OFFSET(SCROLLINFO, cbSize, 0) + TEST_FIELD_SIZE (SCROLLINFO, fMask, 4) + TEST_FIELD_ALIGN (SCROLLINFO, fMask, 4) + TEST_FIELD_OFFSET(SCROLLINFO, fMask, 4) + TEST_FIELD_SIZE (SCROLLINFO, nMin, 4) + TEST_FIELD_ALIGN (SCROLLINFO, nMin, 4) + TEST_FIELD_OFFSET(SCROLLINFO, nMin, 8) + TEST_FIELD_SIZE (SCROLLINFO, nMax, 4) + TEST_FIELD_ALIGN (SCROLLINFO, nMax, 4) + TEST_FIELD_OFFSET(SCROLLINFO, nMax, 12) + TEST_FIELD_SIZE (SCROLLINFO, nPage, 4) + TEST_FIELD_ALIGN (SCROLLINFO, nPage, 4) + TEST_FIELD_OFFSET(SCROLLINFO, nPage, 16) + TEST_FIELD_SIZE (SCROLLINFO, nPos, 4) + TEST_FIELD_ALIGN (SCROLLINFO, nPos, 4) + TEST_FIELD_OFFSET(SCROLLINFO, nPos, 20) + TEST_FIELD_SIZE (SCROLLINFO, nTrackPos, 4) + TEST_FIELD_ALIGN (SCROLLINFO, nTrackPos, 4) + TEST_FIELD_OFFSET(SCROLLINFO, nTrackPos, 24) } static void test_pack_SENDASYNCPROC(void) { /* SENDASYNCPROC */ - TEST_TYPE(SENDASYNCPROC, 4, 4); + TEST_TYPE_SIZE (SENDASYNCPROC, 4) + TEST_TYPE_ALIGN (SENDASYNCPROC, 4) } static void test_pack_SERIALKEYSA(void) { /* SERIALKEYSA (pack 4) */ - TEST_TYPE(SERIALKEYSA, 28, 4); - TEST_FIELD(SERIALKEYSA, cbSize, 0, 4, 4); - TEST_FIELD(SERIALKEYSA, dwFlags, 4, 4, 4); - TEST_FIELD(SERIALKEYSA, lpszActivePort, 8, 4, 4); - TEST_FIELD(SERIALKEYSA, lpszPort, 12, 4, 4); - TEST_FIELD(SERIALKEYSA, iBaudRate, 16, 4, 4); - TEST_FIELD(SERIALKEYSA, iPortState, 20, 4, 4); - TEST_FIELD(SERIALKEYSA, iActive, 24, 4, 4); + TEST_TYPE_SIZE (SERIALKEYSA, 28) + TEST_TYPE_ALIGN (SERIALKEYSA, 4) + TEST_FIELD_SIZE (SERIALKEYSA, cbSize, 4) + TEST_FIELD_ALIGN (SERIALKEYSA, cbSize, 4) + TEST_FIELD_OFFSET(SERIALKEYSA, cbSize, 0) + TEST_FIELD_SIZE (SERIALKEYSA, dwFlags, 4) + TEST_FIELD_ALIGN (SERIALKEYSA, dwFlags, 4) + TEST_FIELD_OFFSET(SERIALKEYSA, dwFlags, 4) + TEST_FIELD_SIZE (SERIALKEYSA, lpszActivePort, 4) + TEST_FIELD_ALIGN (SERIALKEYSA, lpszActivePort, 4) + TEST_FIELD_OFFSET(SERIALKEYSA, lpszActivePort, 8) + TEST_FIELD_SIZE (SERIALKEYSA, lpszPort, 4) + TEST_FIELD_ALIGN (SERIALKEYSA, lpszPort, 4) + TEST_FIELD_OFFSET(SERIALKEYSA, lpszPort, 12) + TEST_FIELD_SIZE (SERIALKEYSA, iBaudRate, 4) + TEST_FIELD_ALIGN (SERIALKEYSA, iBaudRate, 4) + TEST_FIELD_OFFSET(SERIALKEYSA, iBaudRate, 16) + TEST_FIELD_SIZE (SERIALKEYSA, iPortState, 4) + TEST_FIELD_ALIGN (SERIALKEYSA, iPortState, 4) + TEST_FIELD_OFFSET(SERIALKEYSA, iPortState, 20) + TEST_FIELD_SIZE (SERIALKEYSA, iActive, 4) + TEST_FIELD_ALIGN (SERIALKEYSA, iActive, 4) + TEST_FIELD_OFFSET(SERIALKEYSA, iActive, 24) } static void test_pack_SERIALKEYSW(void) { /* SERIALKEYSW (pack 4) */ - TEST_TYPE(SERIALKEYSW, 28, 4); - TEST_FIELD(SERIALKEYSW, cbSize, 0, 4, 4); - TEST_FIELD(SERIALKEYSW, dwFlags, 4, 4, 4); - TEST_FIELD(SERIALKEYSW, lpszActivePort, 8, 4, 4); - TEST_FIELD(SERIALKEYSW, lpszPort, 12, 4, 4); - TEST_FIELD(SERIALKEYSW, iBaudRate, 16, 4, 4); - TEST_FIELD(SERIALKEYSW, iPortState, 20, 4, 4); - TEST_FIELD(SERIALKEYSW, iActive, 24, 4, 4); + TEST_TYPE_SIZE (SERIALKEYSW, 28) + TEST_TYPE_ALIGN (SERIALKEYSW, 4) + TEST_FIELD_SIZE (SERIALKEYSW, cbSize, 4) + TEST_FIELD_ALIGN (SERIALKEYSW, cbSize, 4) + TEST_FIELD_OFFSET(SERIALKEYSW, cbSize, 0) + TEST_FIELD_SIZE (SERIALKEYSW, dwFlags, 4) + TEST_FIELD_ALIGN (SERIALKEYSW, dwFlags, 4) + TEST_FIELD_OFFSET(SERIALKEYSW, dwFlags, 4) + TEST_FIELD_SIZE (SERIALKEYSW, lpszActivePort, 4) + TEST_FIELD_ALIGN (SERIALKEYSW, lpszActivePort, 4) + TEST_FIELD_OFFSET(SERIALKEYSW, lpszActivePort, 8) + TEST_FIELD_SIZE (SERIALKEYSW, lpszPort, 4) + TEST_FIELD_ALIGN (SERIALKEYSW, lpszPort, 4) + TEST_FIELD_OFFSET(SERIALKEYSW, lpszPort, 12) + TEST_FIELD_SIZE (SERIALKEYSW, iBaudRate, 4) + TEST_FIELD_ALIGN (SERIALKEYSW, iBaudRate, 4) + TEST_FIELD_OFFSET(SERIALKEYSW, iBaudRate, 16) + TEST_FIELD_SIZE (SERIALKEYSW, iPortState, 4) + TEST_FIELD_ALIGN (SERIALKEYSW, iPortState, 4) + TEST_FIELD_OFFSET(SERIALKEYSW, iPortState, 20) + TEST_FIELD_SIZE (SERIALKEYSW, iActive, 4) + TEST_FIELD_ALIGN (SERIALKEYSW, iActive, 4) + TEST_FIELD_OFFSET(SERIALKEYSW, iActive, 24) } static void test_pack_SOUNDSENTRYA(void) { /* SOUNDSENTRYA (pack 4) */ - TEST_TYPE(SOUNDSENTRYA, 48, 4); - TEST_FIELD(SOUNDSENTRYA, cbSize, 0, 4, 4); - TEST_FIELD(SOUNDSENTRYA, dwFlags, 4, 4, 4); - TEST_FIELD(SOUNDSENTRYA, iFSTextEffect, 8, 4, 4); - TEST_FIELD(SOUNDSENTRYA, iFSTextEffectMSec, 12, 4, 4); - TEST_FIELD(SOUNDSENTRYA, iFSTextEffectColorBits, 16, 4, 4); - TEST_FIELD(SOUNDSENTRYA, iFSGrafEffect, 20, 4, 4); - TEST_FIELD(SOUNDSENTRYA, iFSGrafEffectMSec, 24, 4, 4); - TEST_FIELD(SOUNDSENTRYA, iFSGrafEffectColor, 28, 4, 4); - TEST_FIELD(SOUNDSENTRYA, iWindowsEffect, 32, 4, 4); - TEST_FIELD(SOUNDSENTRYA, iWindowsEffectMSec, 36, 4, 4); - TEST_FIELD(SOUNDSENTRYA, lpszWindowsEffectDLL, 40, 4, 4); - TEST_FIELD(SOUNDSENTRYA, iWindowsEffectOrdinal, 44, 4, 4); + TEST_TYPE_SIZE (SOUNDSENTRYA, 48) + TEST_TYPE_ALIGN (SOUNDSENTRYA, 4) + TEST_FIELD_SIZE (SOUNDSENTRYA, cbSize, 4) + TEST_FIELD_ALIGN (SOUNDSENTRYA, cbSize, 4) + TEST_FIELD_OFFSET(SOUNDSENTRYA, cbSize, 0) + TEST_FIELD_SIZE (SOUNDSENTRYA, dwFlags, 4) + TEST_FIELD_ALIGN (SOUNDSENTRYA, dwFlags, 4) + TEST_FIELD_OFFSET(SOUNDSENTRYA, dwFlags, 4) + TEST_FIELD_SIZE (SOUNDSENTRYA, iFSTextEffect, 4) + TEST_FIELD_ALIGN (SOUNDSENTRYA, iFSTextEffect, 4) + TEST_FIELD_OFFSET(SOUNDSENTRYA, iFSTextEffect, 8) + TEST_FIELD_SIZE (SOUNDSENTRYA, iFSTextEffectMSec, 4) + TEST_FIELD_ALIGN (SOUNDSENTRYA, iFSTextEffectMSec, 4) + TEST_FIELD_OFFSET(SOUNDSENTRYA, iFSTextEffectMSec, 12) + TEST_FIELD_SIZE (SOUNDSENTRYA, iFSTextEffectColorBits, 4) + TEST_FIELD_ALIGN (SOUNDSENTRYA, iFSTextEffectColorBits, 4) + TEST_FIELD_OFFSET(SOUNDSENTRYA, iFSTextEffectColorBits, 16) + TEST_FIELD_SIZE (SOUNDSENTRYA, iFSGrafEffect, 4) + TEST_FIELD_ALIGN (SOUNDSENTRYA, iFSGrafEffect, 4) + TEST_FIELD_OFFSET(SOUNDSENTRYA, iFSGrafEffect, 20) + TEST_FIELD_SIZE (SOUNDSENTRYA, iFSGrafEffectMSec, 4) + TEST_FIELD_ALIGN (SOUNDSENTRYA, iFSGrafEffectMSec, 4) + TEST_FIELD_OFFSET(SOUNDSENTRYA, iFSGrafEffectMSec, 24) + TEST_FIELD_SIZE (SOUNDSENTRYA, iFSGrafEffectColor, 4) + TEST_FIELD_ALIGN (SOUNDSENTRYA, iFSGrafEffectColor, 4) + TEST_FIELD_OFFSET(SOUNDSENTRYA, iFSGrafEffectColor, 28) + TEST_FIELD_SIZE (SOUNDSENTRYA, iWindowsEffect, 4) + TEST_FIELD_ALIGN (SOUNDSENTRYA, iWindowsEffect, 4) + TEST_FIELD_OFFSET(SOUNDSENTRYA, iWindowsEffect, 32) + TEST_FIELD_SIZE (SOUNDSENTRYA, iWindowsEffectMSec, 4) + TEST_FIELD_ALIGN (SOUNDSENTRYA, iWindowsEffectMSec, 4) + TEST_FIELD_OFFSET(SOUNDSENTRYA, iWindowsEffectMSec, 36) + TEST_FIELD_SIZE (SOUNDSENTRYA, lpszWindowsEffectDLL, 4) + TEST_FIELD_ALIGN (SOUNDSENTRYA, lpszWindowsEffectDLL, 4) + TEST_FIELD_OFFSET(SOUNDSENTRYA, lpszWindowsEffectDLL, 40) + TEST_FIELD_SIZE (SOUNDSENTRYA, iWindowsEffectOrdinal, 4) + TEST_FIELD_ALIGN (SOUNDSENTRYA, iWindowsEffectOrdinal, 4) + TEST_FIELD_OFFSET(SOUNDSENTRYA, iWindowsEffectOrdinal, 44) } static void test_pack_SOUNDSENTRYW(void) { /* SOUNDSENTRYW (pack 4) */ - TEST_TYPE(SOUNDSENTRYW, 48, 4); - TEST_FIELD(SOUNDSENTRYW, cbSize, 0, 4, 4); - TEST_FIELD(SOUNDSENTRYW, dwFlags, 4, 4, 4); - TEST_FIELD(SOUNDSENTRYW, iFSTextEffect, 8, 4, 4); - TEST_FIELD(SOUNDSENTRYW, iFSTextEffectMSec, 12, 4, 4); - TEST_FIELD(SOUNDSENTRYW, iFSTextEffectColorBits, 16, 4, 4); - TEST_FIELD(SOUNDSENTRYW, iFSGrafEffect, 20, 4, 4); - TEST_FIELD(SOUNDSENTRYW, iFSGrafEffectMSec, 24, 4, 4); - TEST_FIELD(SOUNDSENTRYW, iFSGrafEffectColor, 28, 4, 4); - TEST_FIELD(SOUNDSENTRYW, iWindowsEffect, 32, 4, 4); - TEST_FIELD(SOUNDSENTRYW, iWindowsEffectMSec, 36, 4, 4); - TEST_FIELD(SOUNDSENTRYW, lpszWindowsEffectDLL, 40, 4, 4); - TEST_FIELD(SOUNDSENTRYW, iWindowsEffectOrdinal, 44, 4, 4); + TEST_TYPE_SIZE (SOUNDSENTRYW, 48) + TEST_TYPE_ALIGN (SOUNDSENTRYW, 4) + TEST_FIELD_SIZE (SOUNDSENTRYW, cbSize, 4) + TEST_FIELD_ALIGN (SOUNDSENTRYW, cbSize, 4) + TEST_FIELD_OFFSET(SOUNDSENTRYW, cbSize, 0) + TEST_FIELD_SIZE (SOUNDSENTRYW, dwFlags, 4) + TEST_FIELD_ALIGN (SOUNDSENTRYW, dwFlags, 4) + TEST_FIELD_OFFSET(SOUNDSENTRYW, dwFlags, 4) + TEST_FIELD_SIZE (SOUNDSENTRYW, iFSTextEffect, 4) + TEST_FIELD_ALIGN (SOUNDSENTRYW, iFSTextEffect, 4) + TEST_FIELD_OFFSET(SOUNDSENTRYW, iFSTextEffect, 8) + TEST_FIELD_SIZE (SOUNDSENTRYW, iFSTextEffectMSec, 4) + TEST_FIELD_ALIGN (SOUNDSENTRYW, iFSTextEffectMSec, 4) + TEST_FIELD_OFFSET(SOUNDSENTRYW, iFSTextEffectMSec, 12) + TEST_FIELD_SIZE (SOUNDSENTRYW, iFSTextEffectColorBits, 4) + TEST_FIELD_ALIGN (SOUNDSENTRYW, iFSTextEffectColorBits, 4) + TEST_FIELD_OFFSET(SOUNDSENTRYW, iFSTextEffectColorBits, 16) + TEST_FIELD_SIZE (SOUNDSENTRYW, iFSGrafEffect, 4) + TEST_FIELD_ALIGN (SOUNDSENTRYW, iFSGrafEffect, 4) + TEST_FIELD_OFFSET(SOUNDSENTRYW, iFSGrafEffect, 20) + TEST_FIELD_SIZE (SOUNDSENTRYW, iFSGrafEffectMSec, 4) + TEST_FIELD_ALIGN (SOUNDSENTRYW, iFSGrafEffectMSec, 4) + TEST_FIELD_OFFSET(SOUNDSENTRYW, iFSGrafEffectMSec, 24) + TEST_FIELD_SIZE (SOUNDSENTRYW, iFSGrafEffectColor, 4) + TEST_FIELD_ALIGN (SOUNDSENTRYW, iFSGrafEffectColor, 4) + TEST_FIELD_OFFSET(SOUNDSENTRYW, iFSGrafEffectColor, 28) + TEST_FIELD_SIZE (SOUNDSENTRYW, iWindowsEffect, 4) + TEST_FIELD_ALIGN (SOUNDSENTRYW, iWindowsEffect, 4) + TEST_FIELD_OFFSET(SOUNDSENTRYW, iWindowsEffect, 32) + TEST_FIELD_SIZE (SOUNDSENTRYW, iWindowsEffectMSec, 4) + TEST_FIELD_ALIGN (SOUNDSENTRYW, iWindowsEffectMSec, 4) + TEST_FIELD_OFFSET(SOUNDSENTRYW, iWindowsEffectMSec, 36) + TEST_FIELD_SIZE (SOUNDSENTRYW, lpszWindowsEffectDLL, 4) + TEST_FIELD_ALIGN (SOUNDSENTRYW, lpszWindowsEffectDLL, 4) + TEST_FIELD_OFFSET(SOUNDSENTRYW, lpszWindowsEffectDLL, 40) + TEST_FIELD_SIZE (SOUNDSENTRYW, iWindowsEffectOrdinal, 4) + TEST_FIELD_ALIGN (SOUNDSENTRYW, iWindowsEffectOrdinal, 4) + TEST_FIELD_OFFSET(SOUNDSENTRYW, iWindowsEffectOrdinal, 44) } static void test_pack_STICKYKEYS(void) { /* STICKYKEYS (pack 4) */ - TEST_TYPE(STICKYKEYS, 8, 4); - TEST_FIELD(STICKYKEYS, cbSize, 0, 4, 4); - TEST_FIELD(STICKYKEYS, dwFlags, 4, 4, 4); + TEST_TYPE_SIZE (STICKYKEYS, 8) + TEST_TYPE_ALIGN (STICKYKEYS, 4) + TEST_FIELD_SIZE (STICKYKEYS, cbSize, 4) + TEST_FIELD_ALIGN (STICKYKEYS, cbSize, 4) + TEST_FIELD_OFFSET(STICKYKEYS, cbSize, 0) + TEST_FIELD_SIZE (STICKYKEYS, dwFlags, 4) + TEST_FIELD_ALIGN (STICKYKEYS, dwFlags, 4) + TEST_FIELD_OFFSET(STICKYKEYS, dwFlags, 4) } static void test_pack_STYLESTRUCT(void) { /* STYLESTRUCT (pack 4) */ - TEST_TYPE(STYLESTRUCT, 8, 4); - TEST_FIELD(STYLESTRUCT, styleOld, 0, 4, 4); - TEST_FIELD(STYLESTRUCT, styleNew, 4, 4, 4); + TEST_TYPE_SIZE (STYLESTRUCT, 8) + TEST_TYPE_ALIGN (STYLESTRUCT, 4) + TEST_FIELD_SIZE (STYLESTRUCT, styleOld, 4) + TEST_FIELD_ALIGN (STYLESTRUCT, styleOld, 4) + TEST_FIELD_OFFSET(STYLESTRUCT, styleOld, 0) + TEST_FIELD_SIZE (STYLESTRUCT, styleNew, 4) + TEST_FIELD_ALIGN (STYLESTRUCT, styleNew, 4) + TEST_FIELD_OFFSET(STYLESTRUCT, styleNew, 4) } static void test_pack_TIMERPROC(void) { /* TIMERPROC */ - TEST_TYPE(TIMERPROC, 4, 4); + TEST_TYPE_SIZE (TIMERPROC, 4) + TEST_TYPE_ALIGN (TIMERPROC, 4) } static void test_pack_TITLEBARINFO(void) { /* TITLEBARINFO (pack 4) */ - TEST_TYPE(TITLEBARINFO, 44, 4); - TEST_FIELD(TITLEBARINFO, cbSize, 0, 4, 4); - TEST_FIELD(TITLEBARINFO, rcTitleBar, 4, 16, 4); - TEST_FIELD(TITLEBARINFO, rgstate, 20, 24, 4); + TEST_TYPE_SIZE (TITLEBARINFO, 44) + TEST_TYPE_ALIGN (TITLEBARINFO, 4) + TEST_FIELD_SIZE (TITLEBARINFO, cbSize, 4) + TEST_FIELD_ALIGN (TITLEBARINFO, cbSize, 4) + TEST_FIELD_OFFSET(TITLEBARINFO, cbSize, 0) + TEST_FIELD_SIZE (TITLEBARINFO, rcTitleBar, 16) + TEST_FIELD_ALIGN (TITLEBARINFO, rcTitleBar, 4) + TEST_FIELD_OFFSET(TITLEBARINFO, rcTitleBar, 4) + TEST_FIELD_SIZE (TITLEBARINFO, rgstate, 24) + TEST_FIELD_ALIGN (TITLEBARINFO, rgstate, 4) + TEST_FIELD_OFFSET(TITLEBARINFO, rgstate, 20) } static void test_pack_TOGGLEKEYS(void) { /* TOGGLEKEYS (pack 4) */ - TEST_TYPE(TOGGLEKEYS, 8, 4); - TEST_FIELD(TOGGLEKEYS, cbSize, 0, 4, 4); - TEST_FIELD(TOGGLEKEYS, dwFlags, 4, 4, 4); + TEST_TYPE_SIZE (TOGGLEKEYS, 8) + TEST_TYPE_ALIGN (TOGGLEKEYS, 4) + TEST_FIELD_SIZE (TOGGLEKEYS, cbSize, 4) + TEST_FIELD_ALIGN (TOGGLEKEYS, cbSize, 4) + TEST_FIELD_OFFSET(TOGGLEKEYS, cbSize, 0) + TEST_FIELD_SIZE (TOGGLEKEYS, dwFlags, 4) + TEST_FIELD_ALIGN (TOGGLEKEYS, dwFlags, 4) + TEST_FIELD_OFFSET(TOGGLEKEYS, dwFlags, 4) } static void test_pack_TPMPARAMS(void) { /* TPMPARAMS (pack 4) */ - TEST_TYPE(TPMPARAMS, 20, 4); - TEST_FIELD(TPMPARAMS, cbSize, 0, 4, 4); - TEST_FIELD(TPMPARAMS, rcExclude, 4, 16, 4); + TEST_TYPE_SIZE (TPMPARAMS, 20) + TEST_TYPE_ALIGN (TPMPARAMS, 4) + TEST_FIELD_SIZE (TPMPARAMS, cbSize, 4) + TEST_FIELD_ALIGN (TPMPARAMS, cbSize, 4) + TEST_FIELD_OFFSET(TPMPARAMS, cbSize, 0) + TEST_FIELD_SIZE (TPMPARAMS, rcExclude, 16) + TEST_FIELD_ALIGN (TPMPARAMS, rcExclude, 4) + TEST_FIELD_OFFSET(TPMPARAMS, rcExclude, 4) } static void test_pack_TRACKMOUSEEVENT(void) { /* TRACKMOUSEEVENT (pack 4) */ - TEST_TYPE(TRACKMOUSEEVENT, 16, 4); - TEST_FIELD(TRACKMOUSEEVENT, cbSize, 0, 4, 4); - TEST_FIELD(TRACKMOUSEEVENT, dwFlags, 4, 4, 4); - TEST_FIELD(TRACKMOUSEEVENT, hwndTrack, 8, 4, 4); - TEST_FIELD(TRACKMOUSEEVENT, dwHoverTime, 12, 4, 4); + TEST_TYPE_SIZE (TRACKMOUSEEVENT, 16) + TEST_TYPE_ALIGN (TRACKMOUSEEVENT, 4) + TEST_FIELD_SIZE (TRACKMOUSEEVENT, cbSize, 4) + TEST_FIELD_ALIGN (TRACKMOUSEEVENT, cbSize, 4) + TEST_FIELD_OFFSET(TRACKMOUSEEVENT, cbSize, 0) + TEST_FIELD_SIZE (TRACKMOUSEEVENT, dwFlags, 4) + TEST_FIELD_ALIGN (TRACKMOUSEEVENT, dwFlags, 4) + TEST_FIELD_OFFSET(TRACKMOUSEEVENT, dwFlags, 4) + TEST_FIELD_SIZE (TRACKMOUSEEVENT, hwndTrack, 4) + TEST_FIELD_ALIGN (TRACKMOUSEEVENT, hwndTrack, 4) + TEST_FIELD_OFFSET(TRACKMOUSEEVENT, hwndTrack, 8) + TEST_FIELD_SIZE (TRACKMOUSEEVENT, dwHoverTime, 4) + TEST_FIELD_ALIGN (TRACKMOUSEEVENT, dwHoverTime, 4) + TEST_FIELD_OFFSET(TRACKMOUSEEVENT, dwHoverTime, 12) } static void test_pack_USEROBJECTFLAGS(void) { /* USEROBJECTFLAGS (pack 4) */ - TEST_TYPE(USEROBJECTFLAGS, 12, 4); - TEST_FIELD(USEROBJECTFLAGS, fInherit, 0, 4, 4); - TEST_FIELD(USEROBJECTFLAGS, fReserved, 4, 4, 4); - TEST_FIELD(USEROBJECTFLAGS, dwFlags, 8, 4, 4); + TEST_TYPE_SIZE (USEROBJECTFLAGS, 12) + TEST_TYPE_ALIGN (USEROBJECTFLAGS, 4) + TEST_FIELD_SIZE (USEROBJECTFLAGS, fInherit, 4) + TEST_FIELD_ALIGN (USEROBJECTFLAGS, fInherit, 4) + TEST_FIELD_OFFSET(USEROBJECTFLAGS, fInherit, 0) + TEST_FIELD_SIZE (USEROBJECTFLAGS, fReserved, 4) + TEST_FIELD_ALIGN (USEROBJECTFLAGS, fReserved, 4) + TEST_FIELD_OFFSET(USEROBJECTFLAGS, fReserved, 4) + TEST_FIELD_SIZE (USEROBJECTFLAGS, dwFlags, 4) + TEST_FIELD_ALIGN (USEROBJECTFLAGS, dwFlags, 4) + TEST_FIELD_OFFSET(USEROBJECTFLAGS, dwFlags, 8) } static void test_pack_WINDOWINFO(void) { /* WINDOWINFO (pack 4) */ - TEST_TYPE(WINDOWINFO, 60, 4); - TEST_FIELD(WINDOWINFO, cbSize, 0, 4, 4); - TEST_FIELD(WINDOWINFO, rcWindow, 4, 16, 4); - TEST_FIELD(WINDOWINFO, rcClient, 20, 16, 4); - TEST_FIELD(WINDOWINFO, dwStyle, 36, 4, 4); - TEST_FIELD(WINDOWINFO, dwExStyle, 40, 4, 4); - TEST_FIELD(WINDOWINFO, dwWindowStatus, 44, 4, 4); - TEST_FIELD(WINDOWINFO, cxWindowBorders, 48, 4, 4); - TEST_FIELD(WINDOWINFO, cyWindowBorders, 52, 4, 4); - TEST_FIELD(WINDOWINFO, atomWindowType, 56, 2, 2); - TEST_FIELD(WINDOWINFO, wCreatorVersion, 58, 2, 2); + TEST_TYPE_SIZE (WINDOWINFO, 60) + TEST_TYPE_ALIGN (WINDOWINFO, 4) + TEST_FIELD_SIZE (WINDOWINFO, cbSize, 4) + TEST_FIELD_ALIGN (WINDOWINFO, cbSize, 4) + TEST_FIELD_OFFSET(WINDOWINFO, cbSize, 0) + TEST_FIELD_SIZE (WINDOWINFO, rcWindow, 16) + TEST_FIELD_ALIGN (WINDOWINFO, rcWindow, 4) + TEST_FIELD_OFFSET(WINDOWINFO, rcWindow, 4) + TEST_FIELD_SIZE (WINDOWINFO, rcClient, 16) + TEST_FIELD_ALIGN (WINDOWINFO, rcClient, 4) + TEST_FIELD_OFFSET(WINDOWINFO, rcClient, 20) + TEST_FIELD_SIZE (WINDOWINFO, dwStyle, 4) + TEST_FIELD_ALIGN (WINDOWINFO, dwStyle, 4) + TEST_FIELD_OFFSET(WINDOWINFO, dwStyle, 36) + TEST_FIELD_SIZE (WINDOWINFO, dwExStyle, 4) + TEST_FIELD_ALIGN (WINDOWINFO, dwExStyle, 4) + TEST_FIELD_OFFSET(WINDOWINFO, dwExStyle, 40) + TEST_FIELD_SIZE (WINDOWINFO, dwWindowStatus, 4) + TEST_FIELD_ALIGN (WINDOWINFO, dwWindowStatus, 4) + TEST_FIELD_OFFSET(WINDOWINFO, dwWindowStatus, 44) + TEST_FIELD_SIZE (WINDOWINFO, cxWindowBorders, 4) + TEST_FIELD_ALIGN (WINDOWINFO, cxWindowBorders, 4) + TEST_FIELD_OFFSET(WINDOWINFO, cxWindowBorders, 48) + TEST_FIELD_SIZE (WINDOWINFO, cyWindowBorders, 4) + TEST_FIELD_ALIGN (WINDOWINFO, cyWindowBorders, 4) + TEST_FIELD_OFFSET(WINDOWINFO, cyWindowBorders, 52) + TEST_FIELD_SIZE (WINDOWINFO, atomWindowType, 2) + TEST_FIELD_ALIGN (WINDOWINFO, atomWindowType, 2) + TEST_FIELD_OFFSET(WINDOWINFO, atomWindowType, 56) + TEST_FIELD_SIZE (WINDOWINFO, wCreatorVersion, 2) + TEST_FIELD_ALIGN (WINDOWINFO, wCreatorVersion, 2) + TEST_FIELD_OFFSET(WINDOWINFO, wCreatorVersion, 58) } static void test_pack_WINDOWPLACEMENT(void) { /* WINDOWPLACEMENT (pack 4) */ - TEST_TYPE(WINDOWPLACEMENT, 44, 4); - TEST_FIELD(WINDOWPLACEMENT, length, 0, 4, 4); - TEST_FIELD(WINDOWPLACEMENT, flags, 4, 4, 4); - TEST_FIELD(WINDOWPLACEMENT, showCmd, 8, 4, 4); - TEST_FIELD(WINDOWPLACEMENT, ptMinPosition, 12, 8, 4); - TEST_FIELD(WINDOWPLACEMENT, ptMaxPosition, 20, 8, 4); - TEST_FIELD(WINDOWPLACEMENT, rcNormalPosition, 28, 16, 4); + TEST_TYPE_SIZE (WINDOWPLACEMENT, 44) + TEST_TYPE_ALIGN (WINDOWPLACEMENT, 4) + TEST_FIELD_SIZE (WINDOWPLACEMENT, length, 4) + TEST_FIELD_ALIGN (WINDOWPLACEMENT, length, 4) + TEST_FIELD_OFFSET(WINDOWPLACEMENT, length, 0) + TEST_FIELD_SIZE (WINDOWPLACEMENT, flags, 4) + TEST_FIELD_ALIGN (WINDOWPLACEMENT, flags, 4) + TEST_FIELD_OFFSET(WINDOWPLACEMENT, flags, 4) + TEST_FIELD_SIZE (WINDOWPLACEMENT, showCmd, 4) + TEST_FIELD_ALIGN (WINDOWPLACEMENT, showCmd, 4) + TEST_FIELD_OFFSET(WINDOWPLACEMENT, showCmd, 8) + TEST_FIELD_SIZE (WINDOWPLACEMENT, ptMinPosition, 8) + TEST_FIELD_ALIGN (WINDOWPLACEMENT, ptMinPosition, 4) + TEST_FIELD_OFFSET(WINDOWPLACEMENT, ptMinPosition, 12) + TEST_FIELD_SIZE (WINDOWPLACEMENT, ptMaxPosition, 8) + TEST_FIELD_ALIGN (WINDOWPLACEMENT, ptMaxPosition, 4) + TEST_FIELD_OFFSET(WINDOWPLACEMENT, ptMaxPosition, 20) + TEST_FIELD_SIZE (WINDOWPLACEMENT, rcNormalPosition, 16) + TEST_FIELD_ALIGN (WINDOWPLACEMENT, rcNormalPosition, 4) + TEST_FIELD_OFFSET(WINDOWPLACEMENT, rcNormalPosition, 28) } static void test_pack_WINDOWPOS(void) { /* WINDOWPOS (pack 4) */ - TEST_TYPE(WINDOWPOS, 28, 4); - TEST_FIELD(WINDOWPOS, hwnd, 0, 4, 4); - TEST_FIELD(WINDOWPOS, hwndInsertAfter, 4, 4, 4); - TEST_FIELD(WINDOWPOS, x, 8, 4, 4); - TEST_FIELD(WINDOWPOS, y, 12, 4, 4); - TEST_FIELD(WINDOWPOS, cx, 16, 4, 4); - TEST_FIELD(WINDOWPOS, cy, 20, 4, 4); - TEST_FIELD(WINDOWPOS, flags, 24, 4, 4); + TEST_TYPE_SIZE (WINDOWPOS, 28) + TEST_TYPE_ALIGN (WINDOWPOS, 4) + TEST_FIELD_SIZE (WINDOWPOS, hwnd, 4) + TEST_FIELD_ALIGN (WINDOWPOS, hwnd, 4) + TEST_FIELD_OFFSET(WINDOWPOS, hwnd, 0) + TEST_FIELD_SIZE (WINDOWPOS, hwndInsertAfter, 4) + TEST_FIELD_ALIGN (WINDOWPOS, hwndInsertAfter, 4) + TEST_FIELD_OFFSET(WINDOWPOS, hwndInsertAfter, 4) + TEST_FIELD_SIZE (WINDOWPOS, x, 4) + TEST_FIELD_ALIGN (WINDOWPOS, x, 4) + TEST_FIELD_OFFSET(WINDOWPOS, x, 8) + TEST_FIELD_SIZE (WINDOWPOS, y, 4) + TEST_FIELD_ALIGN (WINDOWPOS, y, 4) + TEST_FIELD_OFFSET(WINDOWPOS, y, 12) + TEST_FIELD_SIZE (WINDOWPOS, cx, 4) + TEST_FIELD_ALIGN (WINDOWPOS, cx, 4) + TEST_FIELD_OFFSET(WINDOWPOS, cx, 16) + TEST_FIELD_SIZE (WINDOWPOS, cy, 4) + TEST_FIELD_ALIGN (WINDOWPOS, cy, 4) + TEST_FIELD_OFFSET(WINDOWPOS, cy, 20) + TEST_FIELD_SIZE (WINDOWPOS, flags, 4) + TEST_FIELD_ALIGN (WINDOWPOS, flags, 4) + TEST_FIELD_OFFSET(WINDOWPOS, flags, 24) } static void test_pack_WINEVENTPROC(void) { /* WINEVENTPROC */ - TEST_TYPE(WINEVENTPROC, 4, 4); + TEST_TYPE_SIZE (WINEVENTPROC, 4) + TEST_TYPE_ALIGN (WINEVENTPROC, 4) } static void test_pack_WINSTAENUMPROCA(void) { /* WINSTAENUMPROCA */ - TEST_TYPE(WINSTAENUMPROCA, 4, 4); + TEST_TYPE_SIZE (WINSTAENUMPROCA, 4) + TEST_TYPE_ALIGN (WINSTAENUMPROCA, 4) } static void test_pack_WINSTAENUMPROCW(void) { /* WINSTAENUMPROCW */ - TEST_TYPE(WINSTAENUMPROCW, 4, 4); + TEST_TYPE_SIZE (WINSTAENUMPROCW, 4) + TEST_TYPE_ALIGN (WINSTAENUMPROCW, 4) } static void test_pack_WNDCLASSA(void) { /* WNDCLASSA (pack 4) */ - TEST_TYPE(WNDCLASSA, 40, 4); - TEST_FIELD(WNDCLASSA, style, 0, 4, 4); - TEST_FIELD(WNDCLASSA, lpfnWndProc, 4, 4, 4); - TEST_FIELD(WNDCLASSA, cbClsExtra, 8, 4, 4); - TEST_FIELD(WNDCLASSA, cbWndExtra, 12, 4, 4); - TEST_FIELD(WNDCLASSA, hInstance, 16, 4, 4); - TEST_FIELD(WNDCLASSA, hIcon, 20, 4, 4); - TEST_FIELD(WNDCLASSA, hCursor, 24, 4, 4); - TEST_FIELD(WNDCLASSA, hbrBackground, 28, 4, 4); - TEST_FIELD(WNDCLASSA, lpszMenuName, 32, 4, 4); - TEST_FIELD(WNDCLASSA, lpszClassName, 36, 4, 4); + TEST_TYPE_SIZE (WNDCLASSA, 40) + TEST_TYPE_ALIGN (WNDCLASSA, 4) + TEST_FIELD_SIZE (WNDCLASSA, style, 4) + TEST_FIELD_ALIGN (WNDCLASSA, style, 4) + TEST_FIELD_OFFSET(WNDCLASSA, style, 0) + TEST_FIELD_SIZE (WNDCLASSA, lpfnWndProc, 4) + TEST_FIELD_ALIGN (WNDCLASSA, lpfnWndProc, 4) + TEST_FIELD_OFFSET(WNDCLASSA, lpfnWndProc, 4) + TEST_FIELD_SIZE (WNDCLASSA, cbClsExtra, 4) + TEST_FIELD_ALIGN (WNDCLASSA, cbClsExtra, 4) + TEST_FIELD_OFFSET(WNDCLASSA, cbClsExtra, 8) + TEST_FIELD_SIZE (WNDCLASSA, cbWndExtra, 4) + TEST_FIELD_ALIGN (WNDCLASSA, cbWndExtra, 4) + TEST_FIELD_OFFSET(WNDCLASSA, cbWndExtra, 12) + TEST_FIELD_SIZE (WNDCLASSA, hInstance, 4) + TEST_FIELD_ALIGN (WNDCLASSA, hInstance, 4) + TEST_FIELD_OFFSET(WNDCLASSA, hInstance, 16) + TEST_FIELD_SIZE (WNDCLASSA, hIcon, 4) + TEST_FIELD_ALIGN (WNDCLASSA, hIcon, 4) + TEST_FIELD_OFFSET(WNDCLASSA, hIcon, 20) + TEST_FIELD_SIZE (WNDCLASSA, hCursor, 4) + TEST_FIELD_ALIGN (WNDCLASSA, hCursor, 4) + TEST_FIELD_OFFSET(WNDCLASSA, hCursor, 24) + TEST_FIELD_SIZE (WNDCLASSA, hbrBackground, 4) + TEST_FIELD_ALIGN (WNDCLASSA, hbrBackground, 4) + TEST_FIELD_OFFSET(WNDCLASSA, hbrBackground, 28) + TEST_FIELD_SIZE (WNDCLASSA, lpszMenuName, 4) + TEST_FIELD_ALIGN (WNDCLASSA, lpszMenuName, 4) + TEST_FIELD_OFFSET(WNDCLASSA, lpszMenuName, 32) + TEST_FIELD_SIZE (WNDCLASSA, lpszClassName, 4) + TEST_FIELD_ALIGN (WNDCLASSA, lpszClassName, 4) + TEST_FIELD_OFFSET(WNDCLASSA, lpszClassName, 36) } static void test_pack_WNDCLASSEXA(void) { /* WNDCLASSEXA (pack 4) */ - TEST_TYPE(WNDCLASSEXA, 48, 4); - TEST_FIELD(WNDCLASSEXA, cbSize, 0, 4, 4); - TEST_FIELD(WNDCLASSEXA, style, 4, 4, 4); - TEST_FIELD(WNDCLASSEXA, lpfnWndProc, 8, 4, 4); - TEST_FIELD(WNDCLASSEXA, cbClsExtra, 12, 4, 4); - TEST_FIELD(WNDCLASSEXA, cbWndExtra, 16, 4, 4); - TEST_FIELD(WNDCLASSEXA, hInstance, 20, 4, 4); - TEST_FIELD(WNDCLASSEXA, hIcon, 24, 4, 4); - TEST_FIELD(WNDCLASSEXA, hCursor, 28, 4, 4); - TEST_FIELD(WNDCLASSEXA, hbrBackground, 32, 4, 4); - TEST_FIELD(WNDCLASSEXA, lpszMenuName, 36, 4, 4); - TEST_FIELD(WNDCLASSEXA, lpszClassName, 40, 4, 4); - TEST_FIELD(WNDCLASSEXA, hIconSm, 44, 4, 4); + TEST_TYPE_SIZE (WNDCLASSEXA, 48) + TEST_TYPE_ALIGN (WNDCLASSEXA, 4) + TEST_FIELD_SIZE (WNDCLASSEXA, cbSize, 4) + TEST_FIELD_ALIGN (WNDCLASSEXA, cbSize, 4) + TEST_FIELD_OFFSET(WNDCLASSEXA, cbSize, 0) + TEST_FIELD_SIZE (WNDCLASSEXA, style, 4) + TEST_FIELD_ALIGN (WNDCLASSEXA, style, 4) + TEST_FIELD_OFFSET(WNDCLASSEXA, style, 4) + TEST_FIELD_SIZE (WNDCLASSEXA, lpfnWndProc, 4) + TEST_FIELD_ALIGN (WNDCLASSEXA, lpfnWndProc, 4) + TEST_FIELD_OFFSET(WNDCLASSEXA, lpfnWndProc, 8) + TEST_FIELD_SIZE (WNDCLASSEXA, cbClsExtra, 4) + TEST_FIELD_ALIGN (WNDCLASSEXA, cbClsExtra, 4) + TEST_FIELD_OFFSET(WNDCLASSEXA, cbClsExtra, 12) + TEST_FIELD_SIZE (WNDCLASSEXA, cbWndExtra, 4) + TEST_FIELD_ALIGN (WNDCLASSEXA, cbWndExtra, 4) + TEST_FIELD_OFFSET(WNDCLASSEXA, cbWndExtra, 16) + TEST_FIELD_SIZE (WNDCLASSEXA, hInstance, 4) + TEST_FIELD_ALIGN (WNDCLASSEXA, hInstance, 4) + TEST_FIELD_OFFSET(WNDCLASSEXA, hInstance, 20) + TEST_FIELD_SIZE (WNDCLASSEXA, hIcon, 4) + TEST_FIELD_ALIGN (WNDCLASSEXA, hIcon, 4) + TEST_FIELD_OFFSET(WNDCLASSEXA, hIcon, 24) + TEST_FIELD_SIZE (WNDCLASSEXA, hCursor, 4) + TEST_FIELD_ALIGN (WNDCLASSEXA, hCursor, 4) + TEST_FIELD_OFFSET(WNDCLASSEXA, hCursor, 28) + TEST_FIELD_SIZE (WNDCLASSEXA, hbrBackground, 4) + TEST_FIELD_ALIGN (WNDCLASSEXA, hbrBackground, 4) + TEST_FIELD_OFFSET(WNDCLASSEXA, hbrBackground, 32) + TEST_FIELD_SIZE (WNDCLASSEXA, lpszMenuName, 4) + TEST_FIELD_ALIGN (WNDCLASSEXA, lpszMenuName, 4) + TEST_FIELD_OFFSET(WNDCLASSEXA, lpszMenuName, 36) + TEST_FIELD_SIZE (WNDCLASSEXA, lpszClassName, 4) + TEST_FIELD_ALIGN (WNDCLASSEXA, lpszClassName, 4) + TEST_FIELD_OFFSET(WNDCLASSEXA, lpszClassName, 40) + TEST_FIELD_SIZE (WNDCLASSEXA, hIconSm, 4) + TEST_FIELD_ALIGN (WNDCLASSEXA, hIconSm, 4) + TEST_FIELD_OFFSET(WNDCLASSEXA, hIconSm, 44) } static void test_pack_WNDCLASSEXW(void) { /* WNDCLASSEXW (pack 4) */ - TEST_TYPE(WNDCLASSEXW, 48, 4); - TEST_FIELD(WNDCLASSEXW, cbSize, 0, 4, 4); - TEST_FIELD(WNDCLASSEXW, style, 4, 4, 4); - TEST_FIELD(WNDCLASSEXW, lpfnWndProc, 8, 4, 4); - TEST_FIELD(WNDCLASSEXW, cbClsExtra, 12, 4, 4); - TEST_FIELD(WNDCLASSEXW, cbWndExtra, 16, 4, 4); - TEST_FIELD(WNDCLASSEXW, hInstance, 20, 4, 4); - TEST_FIELD(WNDCLASSEXW, hIcon, 24, 4, 4); - TEST_FIELD(WNDCLASSEXW, hCursor, 28, 4, 4); - TEST_FIELD(WNDCLASSEXW, hbrBackground, 32, 4, 4); - TEST_FIELD(WNDCLASSEXW, lpszMenuName, 36, 4, 4); - TEST_FIELD(WNDCLASSEXW, lpszClassName, 40, 4, 4); - TEST_FIELD(WNDCLASSEXW, hIconSm, 44, 4, 4); + TEST_TYPE_SIZE (WNDCLASSEXW, 48) + TEST_TYPE_ALIGN (WNDCLASSEXW, 4) + TEST_FIELD_SIZE (WNDCLASSEXW, cbSize, 4) + TEST_FIELD_ALIGN (WNDCLASSEXW, cbSize, 4) + TEST_FIELD_OFFSET(WNDCLASSEXW, cbSize, 0) + TEST_FIELD_SIZE (WNDCLASSEXW, style, 4) + TEST_FIELD_ALIGN (WNDCLASSEXW, style, 4) + TEST_FIELD_OFFSET(WNDCLASSEXW, style, 4) + TEST_FIELD_SIZE (WNDCLASSEXW, lpfnWndProc, 4) + TEST_FIELD_ALIGN (WNDCLASSEXW, lpfnWndProc, 4) + TEST_FIELD_OFFSET(WNDCLASSEXW, lpfnWndProc, 8) + TEST_FIELD_SIZE (WNDCLASSEXW, cbClsExtra, 4) + TEST_FIELD_ALIGN (WNDCLASSEXW, cbClsExtra, 4) + TEST_FIELD_OFFSET(WNDCLASSEXW, cbClsExtra, 12) + TEST_FIELD_SIZE (WNDCLASSEXW, cbWndExtra, 4) + TEST_FIELD_ALIGN (WNDCLASSEXW, cbWndExtra, 4) + TEST_FIELD_OFFSET(WNDCLASSEXW, cbWndExtra, 16) + TEST_FIELD_SIZE (WNDCLASSEXW, hInstance, 4) + TEST_FIELD_ALIGN (WNDCLASSEXW, hInstance, 4) + TEST_FIELD_OFFSET(WNDCLASSEXW, hInstance, 20) + TEST_FIELD_SIZE (WNDCLASSEXW, hIcon, 4) + TEST_FIELD_ALIGN (WNDCLASSEXW, hIcon, 4) + TEST_FIELD_OFFSET(WNDCLASSEXW, hIcon, 24) + TEST_FIELD_SIZE (WNDCLASSEXW, hCursor, 4) + TEST_FIELD_ALIGN (WNDCLASSEXW, hCursor, 4) + TEST_FIELD_OFFSET(WNDCLASSEXW, hCursor, 28) + TEST_FIELD_SIZE (WNDCLASSEXW, hbrBackground, 4) + TEST_FIELD_ALIGN (WNDCLASSEXW, hbrBackground, 4) + TEST_FIELD_OFFSET(WNDCLASSEXW, hbrBackground, 32) + TEST_FIELD_SIZE (WNDCLASSEXW, lpszMenuName, 4) + TEST_FIELD_ALIGN (WNDCLASSEXW, lpszMenuName, 4) + TEST_FIELD_OFFSET(WNDCLASSEXW, lpszMenuName, 36) + TEST_FIELD_SIZE (WNDCLASSEXW, lpszClassName, 4) + TEST_FIELD_ALIGN (WNDCLASSEXW, lpszClassName, 4) + TEST_FIELD_OFFSET(WNDCLASSEXW, lpszClassName, 40) + TEST_FIELD_SIZE (WNDCLASSEXW, hIconSm, 4) + TEST_FIELD_ALIGN (WNDCLASSEXW, hIconSm, 4) + TEST_FIELD_OFFSET(WNDCLASSEXW, hIconSm, 44) } static void test_pack_WNDCLASSW(void) { /* WNDCLASSW (pack 4) */ - TEST_TYPE(WNDCLASSW, 40, 4); - TEST_FIELD(WNDCLASSW, style, 0, 4, 4); - TEST_FIELD(WNDCLASSW, lpfnWndProc, 4, 4, 4); - TEST_FIELD(WNDCLASSW, cbClsExtra, 8, 4, 4); - TEST_FIELD(WNDCLASSW, cbWndExtra, 12, 4, 4); - TEST_FIELD(WNDCLASSW, hInstance, 16, 4, 4); - TEST_FIELD(WNDCLASSW, hIcon, 20, 4, 4); - TEST_FIELD(WNDCLASSW, hCursor, 24, 4, 4); - TEST_FIELD(WNDCLASSW, hbrBackground, 28, 4, 4); - TEST_FIELD(WNDCLASSW, lpszMenuName, 32, 4, 4); - TEST_FIELD(WNDCLASSW, lpszClassName, 36, 4, 4); + TEST_TYPE_SIZE (WNDCLASSW, 40) + TEST_TYPE_ALIGN (WNDCLASSW, 4) + TEST_FIELD_SIZE (WNDCLASSW, style, 4) + TEST_FIELD_ALIGN (WNDCLASSW, style, 4) + TEST_FIELD_OFFSET(WNDCLASSW, style, 0) + TEST_FIELD_SIZE (WNDCLASSW, lpfnWndProc, 4) + TEST_FIELD_ALIGN (WNDCLASSW, lpfnWndProc, 4) + TEST_FIELD_OFFSET(WNDCLASSW, lpfnWndProc, 4) + TEST_FIELD_SIZE (WNDCLASSW, cbClsExtra, 4) + TEST_FIELD_ALIGN (WNDCLASSW, cbClsExtra, 4) + TEST_FIELD_OFFSET(WNDCLASSW, cbClsExtra, 8) + TEST_FIELD_SIZE (WNDCLASSW, cbWndExtra, 4) + TEST_FIELD_ALIGN (WNDCLASSW, cbWndExtra, 4) + TEST_FIELD_OFFSET(WNDCLASSW, cbWndExtra, 12) + TEST_FIELD_SIZE (WNDCLASSW, hInstance, 4) + TEST_FIELD_ALIGN (WNDCLASSW, hInstance, 4) + TEST_FIELD_OFFSET(WNDCLASSW, hInstance, 16) + TEST_FIELD_SIZE (WNDCLASSW, hIcon, 4) + TEST_FIELD_ALIGN (WNDCLASSW, hIcon, 4) + TEST_FIELD_OFFSET(WNDCLASSW, hIcon, 20) + TEST_FIELD_SIZE (WNDCLASSW, hCursor, 4) + TEST_FIELD_ALIGN (WNDCLASSW, hCursor, 4) + TEST_FIELD_OFFSET(WNDCLASSW, hCursor, 24) + TEST_FIELD_SIZE (WNDCLASSW, hbrBackground, 4) + TEST_FIELD_ALIGN (WNDCLASSW, hbrBackground, 4) + TEST_FIELD_OFFSET(WNDCLASSW, hbrBackground, 28) + TEST_FIELD_SIZE (WNDCLASSW, lpszMenuName, 4) + TEST_FIELD_ALIGN (WNDCLASSW, lpszMenuName, 4) + TEST_FIELD_OFFSET(WNDCLASSW, lpszMenuName, 32) + TEST_FIELD_SIZE (WNDCLASSW, lpszClassName, 4) + TEST_FIELD_ALIGN (WNDCLASSW, lpszClassName, 4) + TEST_FIELD_OFFSET(WNDCLASSW, lpszClassName, 36) } static void test_pack_WNDENUMPROC(void) { /* WNDENUMPROC */ - TEST_TYPE(WNDENUMPROC, 4, 4); + TEST_TYPE_SIZE (WNDENUMPROC, 4) + TEST_TYPE_ALIGN (WNDENUMPROC, 4) } static void test_pack_WNDPROC(void) { /* WNDPROC */ - TEST_TYPE(WNDPROC, 4, 4); + TEST_TYPE_SIZE (WNDPROC, 4) + TEST_TYPE_ALIGN (WNDPROC, 4) } static void test_pack(void) diff --git a/dlls/wininet/tests/generated.c b/dlls/wininet/tests/generated.c index 5d8dcdd0dc5..656b18b8a7c 100644 --- a/dlls/wininet/tests/generated.c +++ b/dlls/wininet/tests/generated.c @@ -55,857 +55,1275 @@ * Test helper macros */ -#ifdef FIELD_ALIGNMENT -# define TEST_FIELD_ALIGNMENT(type, field, align) \ - ok(_TYPE_ALIGNMENT(((type*)0)->field) == align, \ - "FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \ - (int)_TYPE_ALIGNMENT(((type*)0)->field)) +#ifdef _WIN64 + +# define TEST_TYPE_SIZE(type, size) +# define TEST_TYPE_ALIGN(type, align) +# define TEST_TARGET_ALIGN(type, align) +# define TEST_FIELD_ALIGN(type, field, align) +# define TEST_FIELD_OFFSET(type, field, offset) + #else -# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0) + +# define TEST_TYPE_SIZE(type, size) C_ASSERT(sizeof(type) == size); + +# ifdef TYPE_ALIGNMENT +# define TEST_TYPE_ALIGN(type, align) C_ASSERT(TYPE_ALIGNMENT(type) == align); +# else +# define TEST_TYPE_ALIGN(type, align) +# endif + +# ifdef _TYPE_ALIGNMENT +# 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); +# else +# define TEST_TARGET_ALIGN(type, align) +# define TEST_FIELD_ALIGN(type, field, align) +# endif + +# define TEST_FIELD_OFFSET(type, field, offset) C_ASSERT(FIELD_OFFSET(type, field) == offset); + #endif -#define TEST_FIELD_OFFSET(type, field, offset) \ - ok(FIELD_OFFSET(type, field) == offset, \ - "FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")\n", \ - (long int)FIELD_OFFSET(type, field)) +#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); -#ifdef _TYPE_ALIGNMENT -#define TEST__TYPE_ALIGNMENT(type, align) \ - ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)_TYPE_ALIGNMENT(type)) -#else -# define TEST__TYPE_ALIGNMENT(type, align) do { } while (0) -#endif - -#ifdef TYPE_ALIGNMENT -#define TEST_TYPE_ALIGNMENT(type, align) \ - ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)TYPE_ALIGNMENT(type)) -#else -# define TEST_TYPE_ALIGNMENT(type, align) do { } while (0) -#endif - -#define TEST_TYPE_SIZE(type, size) \ - ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", ((int) sizeof(type))) - -/*********************************************************************** - * Test macros - */ - -#define TEST_FIELD(type, field, field_offset, field_size, field_align) \ - TEST_TYPE_SIZE((((type*)0)->field), field_size); \ - TEST_FIELD_ALIGNMENT(type, field, field_align); \ - TEST_FIELD_OFFSET(type, field, 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_GOPHER_ABSTRACT_ATTRIBUTE_TYPEA(void) { /* GOPHER_ABSTRACT_ATTRIBUTE_TYPEA (pack 4) */ - TEST_TYPE(GOPHER_ABSTRACT_ATTRIBUTE_TYPEA, 8, 4); - TEST_FIELD(GOPHER_ABSTRACT_ATTRIBUTE_TYPEA, ShortAbstract, 0, 4, 4); - TEST_FIELD(GOPHER_ABSTRACT_ATTRIBUTE_TYPEA, AbstractFile, 4, 4, 4); + TEST_TYPE_SIZE (GOPHER_ABSTRACT_ATTRIBUTE_TYPEA, 8) + TEST_TYPE_ALIGN (GOPHER_ABSTRACT_ATTRIBUTE_TYPEA, 4) + TEST_FIELD_SIZE (GOPHER_ABSTRACT_ATTRIBUTE_TYPEA, ShortAbstract, 4) + TEST_FIELD_ALIGN (GOPHER_ABSTRACT_ATTRIBUTE_TYPEA, ShortAbstract, 4) + TEST_FIELD_OFFSET(GOPHER_ABSTRACT_ATTRIBUTE_TYPEA, ShortAbstract, 0) + TEST_FIELD_SIZE (GOPHER_ABSTRACT_ATTRIBUTE_TYPEA, AbstractFile, 4) + TEST_FIELD_ALIGN (GOPHER_ABSTRACT_ATTRIBUTE_TYPEA, AbstractFile, 4) + TEST_FIELD_OFFSET(GOPHER_ABSTRACT_ATTRIBUTE_TYPEA, AbstractFile, 4) } static void test_pack_GOPHER_ABSTRACT_ATTRIBUTE_TYPEW(void) { /* GOPHER_ABSTRACT_ATTRIBUTE_TYPEW (pack 4) */ - TEST_TYPE(GOPHER_ABSTRACT_ATTRIBUTE_TYPEW, 8, 4); - TEST_FIELD(GOPHER_ABSTRACT_ATTRIBUTE_TYPEW, ShortAbstract, 0, 4, 4); - TEST_FIELD(GOPHER_ABSTRACT_ATTRIBUTE_TYPEW, AbstractFile, 4, 4, 4); + TEST_TYPE_SIZE (GOPHER_ABSTRACT_ATTRIBUTE_TYPEW, 8) + TEST_TYPE_ALIGN (GOPHER_ABSTRACT_ATTRIBUTE_TYPEW, 4) + TEST_FIELD_SIZE (GOPHER_ABSTRACT_ATTRIBUTE_TYPEW, ShortAbstract, 4) + TEST_FIELD_ALIGN (GOPHER_ABSTRACT_ATTRIBUTE_TYPEW, ShortAbstract, 4) + TEST_FIELD_OFFSET(GOPHER_ABSTRACT_ATTRIBUTE_TYPEW, ShortAbstract, 0) + TEST_FIELD_SIZE (GOPHER_ABSTRACT_ATTRIBUTE_TYPEW, AbstractFile, 4) + TEST_FIELD_ALIGN (GOPHER_ABSTRACT_ATTRIBUTE_TYPEW, AbstractFile, 4) + TEST_FIELD_OFFSET(GOPHER_ABSTRACT_ATTRIBUTE_TYPEW, AbstractFile, 4) } static void test_pack_GOPHER_ADMIN_ATTRIBUTE_TYPEA(void) { /* GOPHER_ADMIN_ATTRIBUTE_TYPEA (pack 4) */ - TEST_TYPE(GOPHER_ADMIN_ATTRIBUTE_TYPEA, 8, 4); - TEST_FIELD(GOPHER_ADMIN_ATTRIBUTE_TYPEA, Comment, 0, 4, 4); - TEST_FIELD(GOPHER_ADMIN_ATTRIBUTE_TYPEA, EmailAddress, 4, 4, 4); + TEST_TYPE_SIZE (GOPHER_ADMIN_ATTRIBUTE_TYPEA, 8) + TEST_TYPE_ALIGN (GOPHER_ADMIN_ATTRIBUTE_TYPEA, 4) + TEST_FIELD_SIZE (GOPHER_ADMIN_ATTRIBUTE_TYPEA, Comment, 4) + TEST_FIELD_ALIGN (GOPHER_ADMIN_ATTRIBUTE_TYPEA, Comment, 4) + TEST_FIELD_OFFSET(GOPHER_ADMIN_ATTRIBUTE_TYPEA, Comment, 0) + TEST_FIELD_SIZE (GOPHER_ADMIN_ATTRIBUTE_TYPEA, EmailAddress, 4) + TEST_FIELD_ALIGN (GOPHER_ADMIN_ATTRIBUTE_TYPEA, EmailAddress, 4) + TEST_FIELD_OFFSET(GOPHER_ADMIN_ATTRIBUTE_TYPEA, EmailAddress, 4) } static void test_pack_GOPHER_ADMIN_ATTRIBUTE_TYPEW(void) { /* GOPHER_ADMIN_ATTRIBUTE_TYPEW (pack 4) */ - TEST_TYPE(GOPHER_ADMIN_ATTRIBUTE_TYPEW, 8, 4); - TEST_FIELD(GOPHER_ADMIN_ATTRIBUTE_TYPEW, Comment, 0, 4, 4); - TEST_FIELD(GOPHER_ADMIN_ATTRIBUTE_TYPEW, EmailAddress, 4, 4, 4); + TEST_TYPE_SIZE (GOPHER_ADMIN_ATTRIBUTE_TYPEW, 8) + TEST_TYPE_ALIGN (GOPHER_ADMIN_ATTRIBUTE_TYPEW, 4) + TEST_FIELD_SIZE (GOPHER_ADMIN_ATTRIBUTE_TYPEW, Comment, 4) + TEST_FIELD_ALIGN (GOPHER_ADMIN_ATTRIBUTE_TYPEW, Comment, 4) + TEST_FIELD_OFFSET(GOPHER_ADMIN_ATTRIBUTE_TYPEW, Comment, 0) + TEST_FIELD_SIZE (GOPHER_ADMIN_ATTRIBUTE_TYPEW, EmailAddress, 4) + TEST_FIELD_ALIGN (GOPHER_ADMIN_ATTRIBUTE_TYPEW, EmailAddress, 4) + TEST_FIELD_OFFSET(GOPHER_ADMIN_ATTRIBUTE_TYPEW, EmailAddress, 4) } static void test_pack_GOPHER_ASK_ATTRIBUTE_TYPEA(void) { /* GOPHER_ASK_ATTRIBUTE_TYPEA (pack 4) */ - TEST_TYPE(GOPHER_ASK_ATTRIBUTE_TYPEA, 8, 4); - TEST_FIELD(GOPHER_ASK_ATTRIBUTE_TYPEA, QuestionType, 0, 4, 4); - TEST_FIELD(GOPHER_ASK_ATTRIBUTE_TYPEA, QuestionText, 4, 4, 4); + TEST_TYPE_SIZE (GOPHER_ASK_ATTRIBUTE_TYPEA, 8) + TEST_TYPE_ALIGN (GOPHER_ASK_ATTRIBUTE_TYPEA, 4) + TEST_FIELD_SIZE (GOPHER_ASK_ATTRIBUTE_TYPEA, QuestionType, 4) + TEST_FIELD_ALIGN (GOPHER_ASK_ATTRIBUTE_TYPEA, QuestionType, 4) + TEST_FIELD_OFFSET(GOPHER_ASK_ATTRIBUTE_TYPEA, QuestionType, 0) + TEST_FIELD_SIZE (GOPHER_ASK_ATTRIBUTE_TYPEA, QuestionText, 4) + TEST_FIELD_ALIGN (GOPHER_ASK_ATTRIBUTE_TYPEA, QuestionText, 4) + TEST_FIELD_OFFSET(GOPHER_ASK_ATTRIBUTE_TYPEA, QuestionText, 4) } static void test_pack_GOPHER_ASK_ATTRIBUTE_TYPEW(void) { /* GOPHER_ASK_ATTRIBUTE_TYPEW (pack 4) */ - TEST_TYPE(GOPHER_ASK_ATTRIBUTE_TYPEW, 8, 4); - TEST_FIELD(GOPHER_ASK_ATTRIBUTE_TYPEW, QuestionType, 0, 4, 4); - TEST_FIELD(GOPHER_ASK_ATTRIBUTE_TYPEW, QuestionText, 4, 4, 4); + TEST_TYPE_SIZE (GOPHER_ASK_ATTRIBUTE_TYPEW, 8) + TEST_TYPE_ALIGN (GOPHER_ASK_ATTRIBUTE_TYPEW, 4) + TEST_FIELD_SIZE (GOPHER_ASK_ATTRIBUTE_TYPEW, QuestionType, 4) + TEST_FIELD_ALIGN (GOPHER_ASK_ATTRIBUTE_TYPEW, QuestionType, 4) + TEST_FIELD_OFFSET(GOPHER_ASK_ATTRIBUTE_TYPEW, QuestionType, 0) + TEST_FIELD_SIZE (GOPHER_ASK_ATTRIBUTE_TYPEW, QuestionText, 4) + TEST_FIELD_ALIGN (GOPHER_ASK_ATTRIBUTE_TYPEW, QuestionText, 4) + TEST_FIELD_OFFSET(GOPHER_ASK_ATTRIBUTE_TYPEW, QuestionText, 4) } static void test_pack_GOPHER_ATTRIBUTE_ENUMERATORA(void) { /* GOPHER_ATTRIBUTE_ENUMERATORA */ - TEST_TYPE(GOPHER_ATTRIBUTE_ENUMERATORA, 4, 4); + TEST_TYPE_SIZE (GOPHER_ATTRIBUTE_ENUMERATORA, 4) + TEST_TYPE_ALIGN (GOPHER_ATTRIBUTE_ENUMERATORA, 4) } static void test_pack_GOPHER_ATTRIBUTE_ENUMERATORW(void) { /* GOPHER_ATTRIBUTE_ENUMERATORW */ - TEST_TYPE(GOPHER_ATTRIBUTE_ENUMERATORW, 4, 4); + TEST_TYPE_SIZE (GOPHER_ATTRIBUTE_ENUMERATORW, 4) + TEST_TYPE_ALIGN (GOPHER_ATTRIBUTE_ENUMERATORW, 4) } static void test_pack_GOPHER_ATTRIBUTE_TYPEA(void) { /* GOPHER_ATTRIBUTE_TYPEA (pack 4) */ - TEST_FIELD(GOPHER_ATTRIBUTE_TYPEA, CategoryId, 0, 4, 4); - TEST_FIELD(GOPHER_ATTRIBUTE_TYPEA, AttributeId, 4, 4, 4); + TEST_FIELD_SIZE (GOPHER_ATTRIBUTE_TYPEA, CategoryId, 4) + TEST_FIELD_ALIGN (GOPHER_ATTRIBUTE_TYPEA, CategoryId, 4) + TEST_FIELD_OFFSET(GOPHER_ATTRIBUTE_TYPEA, CategoryId, 0) + TEST_FIELD_SIZE (GOPHER_ATTRIBUTE_TYPEA, AttributeId, 4) + TEST_FIELD_ALIGN (GOPHER_ATTRIBUTE_TYPEA, AttributeId, 4) + TEST_FIELD_OFFSET(GOPHER_ATTRIBUTE_TYPEA, AttributeId, 4) } static void test_pack_GOPHER_ATTRIBUTE_TYPEW(void) { /* GOPHER_ATTRIBUTE_TYPEW (pack 4) */ - TEST_FIELD(GOPHER_ATTRIBUTE_TYPEW, CategoryId, 0, 4, 4); - TEST_FIELD(GOPHER_ATTRIBUTE_TYPEW, AttributeId, 4, 4, 4); + TEST_FIELD_SIZE (GOPHER_ATTRIBUTE_TYPEW, CategoryId, 4) + TEST_FIELD_ALIGN (GOPHER_ATTRIBUTE_TYPEW, CategoryId, 4) + TEST_FIELD_OFFSET(GOPHER_ATTRIBUTE_TYPEW, CategoryId, 0) + TEST_FIELD_SIZE (GOPHER_ATTRIBUTE_TYPEW, AttributeId, 4) + TEST_FIELD_ALIGN (GOPHER_ATTRIBUTE_TYPEW, AttributeId, 4) + TEST_FIELD_OFFSET(GOPHER_ATTRIBUTE_TYPEW, AttributeId, 4) } static void test_pack_GOPHER_FIND_DATAA(void) { /* GOPHER_FIND_DATAA (pack 4) */ - TEST_TYPE(GOPHER_FIND_DATAA, 808, 4); - TEST_FIELD(GOPHER_FIND_DATAA, DisplayString, 0, 129, 1); - TEST_FIELD(GOPHER_FIND_DATAA, GopherType, 132, 4, 4); - TEST_FIELD(GOPHER_FIND_DATAA, SizeLow, 136, 4, 4); - TEST_FIELD(GOPHER_FIND_DATAA, SizeHigh, 140, 4, 4); - TEST_FIELD(GOPHER_FIND_DATAA, LastModificationTime, 144, 8, 4); - TEST_FIELD(GOPHER_FIND_DATAA, Locator, 152, 654, 1); + TEST_TYPE_SIZE (GOPHER_FIND_DATAA, 808) + TEST_TYPE_ALIGN (GOPHER_FIND_DATAA, 4) + TEST_FIELD_SIZE (GOPHER_FIND_DATAA, DisplayString, 129) + TEST_FIELD_ALIGN (GOPHER_FIND_DATAA, DisplayString, 1) + TEST_FIELD_OFFSET(GOPHER_FIND_DATAA, DisplayString, 0) + TEST_FIELD_SIZE (GOPHER_FIND_DATAA, GopherType, 4) + TEST_FIELD_ALIGN (GOPHER_FIND_DATAA, GopherType, 4) + TEST_FIELD_OFFSET(GOPHER_FIND_DATAA, GopherType, 132) + TEST_FIELD_SIZE (GOPHER_FIND_DATAA, SizeLow, 4) + TEST_FIELD_ALIGN (GOPHER_FIND_DATAA, SizeLow, 4) + TEST_FIELD_OFFSET(GOPHER_FIND_DATAA, SizeLow, 136) + TEST_FIELD_SIZE (GOPHER_FIND_DATAA, SizeHigh, 4) + TEST_FIELD_ALIGN (GOPHER_FIND_DATAA, SizeHigh, 4) + TEST_FIELD_OFFSET(GOPHER_FIND_DATAA, SizeHigh, 140) + TEST_FIELD_SIZE (GOPHER_FIND_DATAA, LastModificationTime, 8) + TEST_FIELD_ALIGN (GOPHER_FIND_DATAA, LastModificationTime, 4) + TEST_FIELD_OFFSET(GOPHER_FIND_DATAA, LastModificationTime, 144) + TEST_FIELD_SIZE (GOPHER_FIND_DATAA, Locator, 654) + TEST_FIELD_ALIGN (GOPHER_FIND_DATAA, Locator, 1) + TEST_FIELD_OFFSET(GOPHER_FIND_DATAA, Locator, 152) } static void test_pack_GOPHER_FIND_DATAW(void) { /* GOPHER_FIND_DATAW (pack 4) */ - TEST_TYPE(GOPHER_FIND_DATAW, 1588, 4); - TEST_FIELD(GOPHER_FIND_DATAW, DisplayString, 0, 258, 2); - TEST_FIELD(GOPHER_FIND_DATAW, GopherType, 260, 4, 4); - TEST_FIELD(GOPHER_FIND_DATAW, SizeLow, 264, 4, 4); - TEST_FIELD(GOPHER_FIND_DATAW, SizeHigh, 268, 4, 4); - TEST_FIELD(GOPHER_FIND_DATAW, LastModificationTime, 272, 8, 4); - TEST_FIELD(GOPHER_FIND_DATAW, Locator, 280, 1308, 2); + TEST_TYPE_SIZE (GOPHER_FIND_DATAW, 1588) + TEST_TYPE_ALIGN (GOPHER_FIND_DATAW, 4) + TEST_FIELD_SIZE (GOPHER_FIND_DATAW, DisplayString, 258) + TEST_FIELD_ALIGN (GOPHER_FIND_DATAW, DisplayString, 2) + TEST_FIELD_OFFSET(GOPHER_FIND_DATAW, DisplayString, 0) + TEST_FIELD_SIZE (GOPHER_FIND_DATAW, GopherType, 4) + TEST_FIELD_ALIGN (GOPHER_FIND_DATAW, GopherType, 4) + TEST_FIELD_OFFSET(GOPHER_FIND_DATAW, GopherType, 260) + TEST_FIELD_SIZE (GOPHER_FIND_DATAW, SizeLow, 4) + TEST_FIELD_ALIGN (GOPHER_FIND_DATAW, SizeLow, 4) + TEST_FIELD_OFFSET(GOPHER_FIND_DATAW, SizeLow, 264) + TEST_FIELD_SIZE (GOPHER_FIND_DATAW, SizeHigh, 4) + TEST_FIELD_ALIGN (GOPHER_FIND_DATAW, SizeHigh, 4) + TEST_FIELD_OFFSET(GOPHER_FIND_DATAW, SizeHigh, 268) + TEST_FIELD_SIZE (GOPHER_FIND_DATAW, LastModificationTime, 8) + TEST_FIELD_ALIGN (GOPHER_FIND_DATAW, LastModificationTime, 4) + TEST_FIELD_OFFSET(GOPHER_FIND_DATAW, LastModificationTime, 272) + TEST_FIELD_SIZE (GOPHER_FIND_DATAW, Locator, 1308) + TEST_FIELD_ALIGN (GOPHER_FIND_DATAW, Locator, 2) + TEST_FIELD_OFFSET(GOPHER_FIND_DATAW, Locator, 280) } static void test_pack_GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE(void) { /* GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE (pack 4) */ - TEST_TYPE(GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE, 24, 4); - TEST_FIELD(GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE, DegreesNorth, 0, 4, 4); - TEST_FIELD(GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE, MinutesNorth, 4, 4, 4); - TEST_FIELD(GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE, SecondsNorth, 8, 4, 4); - TEST_FIELD(GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE, DegreesEast, 12, 4, 4); - TEST_FIELD(GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE, MinutesEast, 16, 4, 4); - TEST_FIELD(GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE, SecondsEast, 20, 4, 4); + TEST_TYPE_SIZE (GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE, 24) + TEST_TYPE_ALIGN (GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE, 4) + TEST_FIELD_SIZE (GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE, DegreesNorth, 4) + TEST_FIELD_ALIGN (GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE, DegreesNorth, 4) + TEST_FIELD_OFFSET(GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE, DegreesNorth, 0) + TEST_FIELD_SIZE (GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE, MinutesNorth, 4) + TEST_FIELD_ALIGN (GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE, MinutesNorth, 4) + TEST_FIELD_OFFSET(GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE, MinutesNorth, 4) + TEST_FIELD_SIZE (GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE, SecondsNorth, 4) + TEST_FIELD_ALIGN (GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE, SecondsNorth, 4) + TEST_FIELD_OFFSET(GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE, SecondsNorth, 8) + TEST_FIELD_SIZE (GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE, DegreesEast, 4) + TEST_FIELD_ALIGN (GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE, DegreesEast, 4) + TEST_FIELD_OFFSET(GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE, DegreesEast, 12) + TEST_FIELD_SIZE (GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE, MinutesEast, 4) + TEST_FIELD_ALIGN (GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE, MinutesEast, 4) + TEST_FIELD_OFFSET(GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE, MinutesEast, 16) + TEST_FIELD_SIZE (GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE, SecondsEast, 4) + TEST_FIELD_ALIGN (GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE, SecondsEast, 4) + TEST_FIELD_OFFSET(GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE, SecondsEast, 20) } static void test_pack_GOPHER_LOCATION_ATTRIBUTE_TYPEA(void) { /* GOPHER_LOCATION_ATTRIBUTE_TYPEA (pack 4) */ - TEST_TYPE(GOPHER_LOCATION_ATTRIBUTE_TYPEA, 4, 4); - TEST_FIELD(GOPHER_LOCATION_ATTRIBUTE_TYPEA, Location, 0, 4, 4); + TEST_TYPE_SIZE (GOPHER_LOCATION_ATTRIBUTE_TYPEA, 4) + TEST_TYPE_ALIGN (GOPHER_LOCATION_ATTRIBUTE_TYPEA, 4) + TEST_FIELD_SIZE (GOPHER_LOCATION_ATTRIBUTE_TYPEA, Location, 4) + TEST_FIELD_ALIGN (GOPHER_LOCATION_ATTRIBUTE_TYPEA, Location, 4) + TEST_FIELD_OFFSET(GOPHER_LOCATION_ATTRIBUTE_TYPEA, Location, 0) } static void test_pack_GOPHER_LOCATION_ATTRIBUTE_TYPEW(void) { /* GOPHER_LOCATION_ATTRIBUTE_TYPEW (pack 4) */ - TEST_TYPE(GOPHER_LOCATION_ATTRIBUTE_TYPEW, 4, 4); - TEST_FIELD(GOPHER_LOCATION_ATTRIBUTE_TYPEW, Location, 0, 4, 4); + TEST_TYPE_SIZE (GOPHER_LOCATION_ATTRIBUTE_TYPEW, 4) + TEST_TYPE_ALIGN (GOPHER_LOCATION_ATTRIBUTE_TYPEW, 4) + TEST_FIELD_SIZE (GOPHER_LOCATION_ATTRIBUTE_TYPEW, Location, 4) + TEST_FIELD_ALIGN (GOPHER_LOCATION_ATTRIBUTE_TYPEW, Location, 4) + TEST_FIELD_OFFSET(GOPHER_LOCATION_ATTRIBUTE_TYPEW, Location, 0) } static void test_pack_GOPHER_MOD_DATE_ATTRIBUTE_TYPE(void) { /* GOPHER_MOD_DATE_ATTRIBUTE_TYPE (pack 4) */ - TEST_TYPE(GOPHER_MOD_DATE_ATTRIBUTE_TYPE, 8, 4); - TEST_FIELD(GOPHER_MOD_DATE_ATTRIBUTE_TYPE, DateAndTime, 0, 8, 4); + TEST_TYPE_SIZE (GOPHER_MOD_DATE_ATTRIBUTE_TYPE, 8) + TEST_TYPE_ALIGN (GOPHER_MOD_DATE_ATTRIBUTE_TYPE, 4) + TEST_FIELD_SIZE (GOPHER_MOD_DATE_ATTRIBUTE_TYPE, DateAndTime, 8) + TEST_FIELD_ALIGN (GOPHER_MOD_DATE_ATTRIBUTE_TYPE, DateAndTime, 4) + TEST_FIELD_OFFSET(GOPHER_MOD_DATE_ATTRIBUTE_TYPE, DateAndTime, 0) } static void test_pack_GOPHER_ORGANIZATION_ATTRIBUTE_TYPEA(void) { /* GOPHER_ORGANIZATION_ATTRIBUTE_TYPEA (pack 4) */ - TEST_TYPE(GOPHER_ORGANIZATION_ATTRIBUTE_TYPEA, 4, 4); - TEST_FIELD(GOPHER_ORGANIZATION_ATTRIBUTE_TYPEA, Organization, 0, 4, 4); + TEST_TYPE_SIZE (GOPHER_ORGANIZATION_ATTRIBUTE_TYPEA, 4) + TEST_TYPE_ALIGN (GOPHER_ORGANIZATION_ATTRIBUTE_TYPEA, 4) + TEST_FIELD_SIZE (GOPHER_ORGANIZATION_ATTRIBUTE_TYPEA, Organization, 4) + TEST_FIELD_ALIGN (GOPHER_ORGANIZATION_ATTRIBUTE_TYPEA, Organization, 4) + TEST_FIELD_OFFSET(GOPHER_ORGANIZATION_ATTRIBUTE_TYPEA, Organization, 0) } static void test_pack_GOPHER_ORGANIZATION_ATTRIBUTE_TYPEW(void) { /* GOPHER_ORGANIZATION_ATTRIBUTE_TYPEW (pack 4) */ - TEST_TYPE(GOPHER_ORGANIZATION_ATTRIBUTE_TYPEW, 4, 4); - TEST_FIELD(GOPHER_ORGANIZATION_ATTRIBUTE_TYPEW, Organization, 0, 4, 4); + TEST_TYPE_SIZE (GOPHER_ORGANIZATION_ATTRIBUTE_TYPEW, 4) + TEST_TYPE_ALIGN (GOPHER_ORGANIZATION_ATTRIBUTE_TYPEW, 4) + TEST_FIELD_SIZE (GOPHER_ORGANIZATION_ATTRIBUTE_TYPEW, Organization, 4) + TEST_FIELD_ALIGN (GOPHER_ORGANIZATION_ATTRIBUTE_TYPEW, Organization, 4) + TEST_FIELD_OFFSET(GOPHER_ORGANIZATION_ATTRIBUTE_TYPEW, Organization, 0) } static void test_pack_GOPHER_PROVIDER_ATTRIBUTE_TYPEA(void) { /* GOPHER_PROVIDER_ATTRIBUTE_TYPEA (pack 4) */ - TEST_TYPE(GOPHER_PROVIDER_ATTRIBUTE_TYPEA, 4, 4); - TEST_FIELD(GOPHER_PROVIDER_ATTRIBUTE_TYPEA, Provider, 0, 4, 4); + TEST_TYPE_SIZE (GOPHER_PROVIDER_ATTRIBUTE_TYPEA, 4) + TEST_TYPE_ALIGN (GOPHER_PROVIDER_ATTRIBUTE_TYPEA, 4) + TEST_FIELD_SIZE (GOPHER_PROVIDER_ATTRIBUTE_TYPEA, Provider, 4) + TEST_FIELD_ALIGN (GOPHER_PROVIDER_ATTRIBUTE_TYPEA, Provider, 4) + TEST_FIELD_OFFSET(GOPHER_PROVIDER_ATTRIBUTE_TYPEA, Provider, 0) } static void test_pack_GOPHER_PROVIDER_ATTRIBUTE_TYPEW(void) { /* GOPHER_PROVIDER_ATTRIBUTE_TYPEW (pack 4) */ - TEST_TYPE(GOPHER_PROVIDER_ATTRIBUTE_TYPEW, 4, 4); - TEST_FIELD(GOPHER_PROVIDER_ATTRIBUTE_TYPEW, Provider, 0, 4, 4); + TEST_TYPE_SIZE (GOPHER_PROVIDER_ATTRIBUTE_TYPEW, 4) + TEST_TYPE_ALIGN (GOPHER_PROVIDER_ATTRIBUTE_TYPEW, 4) + TEST_FIELD_SIZE (GOPHER_PROVIDER_ATTRIBUTE_TYPEW, Provider, 4) + TEST_FIELD_ALIGN (GOPHER_PROVIDER_ATTRIBUTE_TYPEW, Provider, 4) + TEST_FIELD_OFFSET(GOPHER_PROVIDER_ATTRIBUTE_TYPEW, Provider, 0) } static void test_pack_GOPHER_SCORE_ATTRIBUTE_TYPE(void) { /* GOPHER_SCORE_ATTRIBUTE_TYPE (pack 4) */ - TEST_TYPE(GOPHER_SCORE_ATTRIBUTE_TYPE, 4, 4); - TEST_FIELD(GOPHER_SCORE_ATTRIBUTE_TYPE, Score, 0, 4, 4); + TEST_TYPE_SIZE (GOPHER_SCORE_ATTRIBUTE_TYPE, 4) + TEST_TYPE_ALIGN (GOPHER_SCORE_ATTRIBUTE_TYPE, 4) + TEST_FIELD_SIZE (GOPHER_SCORE_ATTRIBUTE_TYPE, Score, 4) + TEST_FIELD_ALIGN (GOPHER_SCORE_ATTRIBUTE_TYPE, Score, 4) + TEST_FIELD_OFFSET(GOPHER_SCORE_ATTRIBUTE_TYPE, Score, 0) } static void test_pack_GOPHER_SCORE_RANGE_ATTRIBUTE_TYPE(void) { /* GOPHER_SCORE_RANGE_ATTRIBUTE_TYPE (pack 4) */ - TEST_TYPE(GOPHER_SCORE_RANGE_ATTRIBUTE_TYPE, 8, 4); - TEST_FIELD(GOPHER_SCORE_RANGE_ATTRIBUTE_TYPE, LowerBound, 0, 4, 4); - TEST_FIELD(GOPHER_SCORE_RANGE_ATTRIBUTE_TYPE, UpperBound, 4, 4, 4); + TEST_TYPE_SIZE (GOPHER_SCORE_RANGE_ATTRIBUTE_TYPE, 8) + TEST_TYPE_ALIGN (GOPHER_SCORE_RANGE_ATTRIBUTE_TYPE, 4) + TEST_FIELD_SIZE (GOPHER_SCORE_RANGE_ATTRIBUTE_TYPE, LowerBound, 4) + TEST_FIELD_ALIGN (GOPHER_SCORE_RANGE_ATTRIBUTE_TYPE, LowerBound, 4) + TEST_FIELD_OFFSET(GOPHER_SCORE_RANGE_ATTRIBUTE_TYPE, LowerBound, 0) + TEST_FIELD_SIZE (GOPHER_SCORE_RANGE_ATTRIBUTE_TYPE, UpperBound, 4) + TEST_FIELD_ALIGN (GOPHER_SCORE_RANGE_ATTRIBUTE_TYPE, UpperBound, 4) + TEST_FIELD_OFFSET(GOPHER_SCORE_RANGE_ATTRIBUTE_TYPE, UpperBound, 4) } static void test_pack_GOPHER_SITE_ATTRIBUTE_TYPEA(void) { /* GOPHER_SITE_ATTRIBUTE_TYPEA (pack 4) */ - TEST_TYPE(GOPHER_SITE_ATTRIBUTE_TYPEA, 4, 4); - TEST_FIELD(GOPHER_SITE_ATTRIBUTE_TYPEA, Site, 0, 4, 4); + TEST_TYPE_SIZE (GOPHER_SITE_ATTRIBUTE_TYPEA, 4) + TEST_TYPE_ALIGN (GOPHER_SITE_ATTRIBUTE_TYPEA, 4) + TEST_FIELD_SIZE (GOPHER_SITE_ATTRIBUTE_TYPEA, Site, 4) + TEST_FIELD_ALIGN (GOPHER_SITE_ATTRIBUTE_TYPEA, Site, 4) + TEST_FIELD_OFFSET(GOPHER_SITE_ATTRIBUTE_TYPEA, Site, 0) } static void test_pack_GOPHER_SITE_ATTRIBUTE_TYPEW(void) { /* GOPHER_SITE_ATTRIBUTE_TYPEW (pack 4) */ - TEST_TYPE(GOPHER_SITE_ATTRIBUTE_TYPEW, 4, 4); - TEST_FIELD(GOPHER_SITE_ATTRIBUTE_TYPEW, Site, 0, 4, 4); + TEST_TYPE_SIZE (GOPHER_SITE_ATTRIBUTE_TYPEW, 4) + TEST_TYPE_ALIGN (GOPHER_SITE_ATTRIBUTE_TYPEW, 4) + TEST_FIELD_SIZE (GOPHER_SITE_ATTRIBUTE_TYPEW, Site, 4) + TEST_FIELD_ALIGN (GOPHER_SITE_ATTRIBUTE_TYPEW, Site, 4) + TEST_FIELD_OFFSET(GOPHER_SITE_ATTRIBUTE_TYPEW, Site, 0) } static void test_pack_GOPHER_TIMEZONE_ATTRIBUTE_TYPE(void) { /* GOPHER_TIMEZONE_ATTRIBUTE_TYPE (pack 4) */ - TEST_TYPE(GOPHER_TIMEZONE_ATTRIBUTE_TYPE, 4, 4); - TEST_FIELD(GOPHER_TIMEZONE_ATTRIBUTE_TYPE, Zone, 0, 4, 4); + TEST_TYPE_SIZE (GOPHER_TIMEZONE_ATTRIBUTE_TYPE, 4) + TEST_TYPE_ALIGN (GOPHER_TIMEZONE_ATTRIBUTE_TYPE, 4) + TEST_FIELD_SIZE (GOPHER_TIMEZONE_ATTRIBUTE_TYPE, Zone, 4) + TEST_FIELD_ALIGN (GOPHER_TIMEZONE_ATTRIBUTE_TYPE, Zone, 4) + TEST_FIELD_OFFSET(GOPHER_TIMEZONE_ATTRIBUTE_TYPE, Zone, 0) } static void test_pack_GOPHER_TTL_ATTRIBUTE_TYPE(void) { /* GOPHER_TTL_ATTRIBUTE_TYPE (pack 4) */ - TEST_TYPE(GOPHER_TTL_ATTRIBUTE_TYPE, 4, 4); - TEST_FIELD(GOPHER_TTL_ATTRIBUTE_TYPE, Ttl, 0, 4, 4); + TEST_TYPE_SIZE (GOPHER_TTL_ATTRIBUTE_TYPE, 4) + TEST_TYPE_ALIGN (GOPHER_TTL_ATTRIBUTE_TYPE, 4) + TEST_FIELD_SIZE (GOPHER_TTL_ATTRIBUTE_TYPE, Ttl, 4) + TEST_FIELD_ALIGN (GOPHER_TTL_ATTRIBUTE_TYPE, Ttl, 4) + TEST_FIELD_OFFSET(GOPHER_TTL_ATTRIBUTE_TYPE, Ttl, 0) } static void test_pack_GOPHER_UNKNOWN_ATTRIBUTE_TYPEA(void) { /* GOPHER_UNKNOWN_ATTRIBUTE_TYPEA (pack 4) */ - TEST_TYPE(GOPHER_UNKNOWN_ATTRIBUTE_TYPEA, 4, 4); - TEST_FIELD(GOPHER_UNKNOWN_ATTRIBUTE_TYPEA, Text, 0, 4, 4); + TEST_TYPE_SIZE (GOPHER_UNKNOWN_ATTRIBUTE_TYPEA, 4) + TEST_TYPE_ALIGN (GOPHER_UNKNOWN_ATTRIBUTE_TYPEA, 4) + TEST_FIELD_SIZE (GOPHER_UNKNOWN_ATTRIBUTE_TYPEA, Text, 4) + TEST_FIELD_ALIGN (GOPHER_UNKNOWN_ATTRIBUTE_TYPEA, Text, 4) + TEST_FIELD_OFFSET(GOPHER_UNKNOWN_ATTRIBUTE_TYPEA, Text, 0) } static void test_pack_GOPHER_UNKNOWN_ATTRIBUTE_TYPEW(void) { /* GOPHER_UNKNOWN_ATTRIBUTE_TYPEW (pack 4) */ - TEST_TYPE(GOPHER_UNKNOWN_ATTRIBUTE_TYPEW, 4, 4); - TEST_FIELD(GOPHER_UNKNOWN_ATTRIBUTE_TYPEW, Text, 0, 4, 4); + TEST_TYPE_SIZE (GOPHER_UNKNOWN_ATTRIBUTE_TYPEW, 4) + TEST_TYPE_ALIGN (GOPHER_UNKNOWN_ATTRIBUTE_TYPEW, 4) + TEST_FIELD_SIZE (GOPHER_UNKNOWN_ATTRIBUTE_TYPEW, Text, 4) + TEST_FIELD_ALIGN (GOPHER_UNKNOWN_ATTRIBUTE_TYPEW, Text, 4) + TEST_FIELD_OFFSET(GOPHER_UNKNOWN_ATTRIBUTE_TYPEW, Text, 0) } static void test_pack_GOPHER_VERONICA_ATTRIBUTE_TYPE(void) { /* GOPHER_VERONICA_ATTRIBUTE_TYPE (pack 4) */ - TEST_TYPE(GOPHER_VERONICA_ATTRIBUTE_TYPE, 4, 4); - TEST_FIELD(GOPHER_VERONICA_ATTRIBUTE_TYPE, TreeWalk, 0, 4, 4); + TEST_TYPE_SIZE (GOPHER_VERONICA_ATTRIBUTE_TYPE, 4) + TEST_TYPE_ALIGN (GOPHER_VERONICA_ATTRIBUTE_TYPE, 4) + TEST_FIELD_SIZE (GOPHER_VERONICA_ATTRIBUTE_TYPE, TreeWalk, 4) + TEST_FIELD_ALIGN (GOPHER_VERONICA_ATTRIBUTE_TYPE, TreeWalk, 4) + TEST_FIELD_OFFSET(GOPHER_VERONICA_ATTRIBUTE_TYPE, TreeWalk, 0) } static void test_pack_GOPHER_VERSION_ATTRIBUTE_TYPEA(void) { /* GOPHER_VERSION_ATTRIBUTE_TYPEA (pack 4) */ - TEST_TYPE(GOPHER_VERSION_ATTRIBUTE_TYPEA, 4, 4); - TEST_FIELD(GOPHER_VERSION_ATTRIBUTE_TYPEA, Version, 0, 4, 4); + TEST_TYPE_SIZE (GOPHER_VERSION_ATTRIBUTE_TYPEA, 4) + TEST_TYPE_ALIGN (GOPHER_VERSION_ATTRIBUTE_TYPEA, 4) + TEST_FIELD_SIZE (GOPHER_VERSION_ATTRIBUTE_TYPEA, Version, 4) + TEST_FIELD_ALIGN (GOPHER_VERSION_ATTRIBUTE_TYPEA, Version, 4) + TEST_FIELD_OFFSET(GOPHER_VERSION_ATTRIBUTE_TYPEA, Version, 0) } static void test_pack_GOPHER_VERSION_ATTRIBUTE_TYPEW(void) { /* GOPHER_VERSION_ATTRIBUTE_TYPEW (pack 4) */ - TEST_TYPE(GOPHER_VERSION_ATTRIBUTE_TYPEW, 4, 4); - TEST_FIELD(GOPHER_VERSION_ATTRIBUTE_TYPEW, Version, 0, 4, 4); + TEST_TYPE_SIZE (GOPHER_VERSION_ATTRIBUTE_TYPEW, 4) + TEST_TYPE_ALIGN (GOPHER_VERSION_ATTRIBUTE_TYPEW, 4) + TEST_FIELD_SIZE (GOPHER_VERSION_ATTRIBUTE_TYPEW, Version, 4) + TEST_FIELD_ALIGN (GOPHER_VERSION_ATTRIBUTE_TYPEW, Version, 4) + TEST_FIELD_OFFSET(GOPHER_VERSION_ATTRIBUTE_TYPEW, Version, 0) } static void test_pack_GOPHER_VIEW_ATTRIBUTE_TYPEA(void) { /* GOPHER_VIEW_ATTRIBUTE_TYPEA (pack 4) */ - TEST_TYPE(GOPHER_VIEW_ATTRIBUTE_TYPEA, 12, 4); - TEST_FIELD(GOPHER_VIEW_ATTRIBUTE_TYPEA, ContentType, 0, 4, 4); - TEST_FIELD(GOPHER_VIEW_ATTRIBUTE_TYPEA, Language, 4, 4, 4); - TEST_FIELD(GOPHER_VIEW_ATTRIBUTE_TYPEA, Size, 8, 4, 4); + TEST_TYPE_SIZE (GOPHER_VIEW_ATTRIBUTE_TYPEA, 12) + TEST_TYPE_ALIGN (GOPHER_VIEW_ATTRIBUTE_TYPEA, 4) + TEST_FIELD_SIZE (GOPHER_VIEW_ATTRIBUTE_TYPEA, ContentType, 4) + TEST_FIELD_ALIGN (GOPHER_VIEW_ATTRIBUTE_TYPEA, ContentType, 4) + TEST_FIELD_OFFSET(GOPHER_VIEW_ATTRIBUTE_TYPEA, ContentType, 0) + TEST_FIELD_SIZE (GOPHER_VIEW_ATTRIBUTE_TYPEA, Language, 4) + TEST_FIELD_ALIGN (GOPHER_VIEW_ATTRIBUTE_TYPEA, Language, 4) + TEST_FIELD_OFFSET(GOPHER_VIEW_ATTRIBUTE_TYPEA, Language, 4) + TEST_FIELD_SIZE (GOPHER_VIEW_ATTRIBUTE_TYPEA, Size, 4) + TEST_FIELD_ALIGN (GOPHER_VIEW_ATTRIBUTE_TYPEA, Size, 4) + TEST_FIELD_OFFSET(GOPHER_VIEW_ATTRIBUTE_TYPEA, Size, 8) } static void test_pack_GOPHER_VIEW_ATTRIBUTE_TYPEW(void) { /* GOPHER_VIEW_ATTRIBUTE_TYPEW (pack 4) */ - TEST_TYPE(GOPHER_VIEW_ATTRIBUTE_TYPEW, 12, 4); - TEST_FIELD(GOPHER_VIEW_ATTRIBUTE_TYPEW, ContentType, 0, 4, 4); - TEST_FIELD(GOPHER_VIEW_ATTRIBUTE_TYPEW, Language, 4, 4, 4); - TEST_FIELD(GOPHER_VIEW_ATTRIBUTE_TYPEW, Size, 8, 4, 4); + TEST_TYPE_SIZE (GOPHER_VIEW_ATTRIBUTE_TYPEW, 12) + TEST_TYPE_ALIGN (GOPHER_VIEW_ATTRIBUTE_TYPEW, 4) + TEST_FIELD_SIZE (GOPHER_VIEW_ATTRIBUTE_TYPEW, ContentType, 4) + TEST_FIELD_ALIGN (GOPHER_VIEW_ATTRIBUTE_TYPEW, ContentType, 4) + TEST_FIELD_OFFSET(GOPHER_VIEW_ATTRIBUTE_TYPEW, ContentType, 0) + TEST_FIELD_SIZE (GOPHER_VIEW_ATTRIBUTE_TYPEW, Language, 4) + TEST_FIELD_ALIGN (GOPHER_VIEW_ATTRIBUTE_TYPEW, Language, 4) + TEST_FIELD_OFFSET(GOPHER_VIEW_ATTRIBUTE_TYPEW, Language, 4) + TEST_FIELD_SIZE (GOPHER_VIEW_ATTRIBUTE_TYPEW, Size, 4) + TEST_FIELD_ALIGN (GOPHER_VIEW_ATTRIBUTE_TYPEW, Size, 4) + TEST_FIELD_OFFSET(GOPHER_VIEW_ATTRIBUTE_TYPEW, Size, 8) } static void test_pack_GROUPID(void) { /* GROUPID */ - TEST_TYPE(GROUPID, 8, 8); - TEST_TYPE_SIGNED(GROUPID); + TEST_TYPE_SIZE (GROUPID, 8) + TEST_TYPE_ALIGN (GROUPID, 8) + TEST_TYPE_SIGNED(GROUPID) } static void test_pack_HINTERNET(void) { /* HINTERNET */ - TEST_TYPE(HINTERNET, 4, 4); + TEST_TYPE_SIZE (HINTERNET, 4) + TEST_TYPE_ALIGN (HINTERNET, 4) } static void test_pack_HTTP_VERSION_INFO(void) { /* HTTP_VERSION_INFO (pack 4) */ - TEST_TYPE(HTTP_VERSION_INFO, 8, 4); - TEST_FIELD(HTTP_VERSION_INFO, dwMajorVersion, 0, 4, 4); - TEST_FIELD(HTTP_VERSION_INFO, dwMinorVersion, 4, 4, 4); + TEST_TYPE_SIZE (HTTP_VERSION_INFO, 8) + TEST_TYPE_ALIGN (HTTP_VERSION_INFO, 4) + TEST_FIELD_SIZE (HTTP_VERSION_INFO, dwMajorVersion, 4) + TEST_FIELD_ALIGN (HTTP_VERSION_INFO, dwMajorVersion, 4) + TEST_FIELD_OFFSET(HTTP_VERSION_INFO, dwMajorVersion, 0) + TEST_FIELD_SIZE (HTTP_VERSION_INFO, dwMinorVersion, 4) + TEST_FIELD_ALIGN (HTTP_VERSION_INFO, dwMinorVersion, 4) + TEST_FIELD_OFFSET(HTTP_VERSION_INFO, dwMinorVersion, 4) } static void test_pack_INTERNET_ASYNC_RESULT(void) { /* INTERNET_ASYNC_RESULT (pack 4) */ - TEST_TYPE(INTERNET_ASYNC_RESULT, 8, 4); - TEST_FIELD(INTERNET_ASYNC_RESULT, dwResult, 0, 4, 4); - TEST_FIELD(INTERNET_ASYNC_RESULT, dwError, 4, 4, 4); + TEST_TYPE_SIZE (INTERNET_ASYNC_RESULT, 8) + TEST_TYPE_ALIGN (INTERNET_ASYNC_RESULT, 4) + TEST_FIELD_SIZE (INTERNET_ASYNC_RESULT, dwResult, 4) + TEST_FIELD_ALIGN (INTERNET_ASYNC_RESULT, dwResult, 4) + TEST_FIELD_OFFSET(INTERNET_ASYNC_RESULT, dwResult, 0) + TEST_FIELD_SIZE (INTERNET_ASYNC_RESULT, dwError, 4) + TEST_FIELD_ALIGN (INTERNET_ASYNC_RESULT, dwError, 4) + TEST_FIELD_OFFSET(INTERNET_ASYNC_RESULT, dwError, 4) } static void test_pack_INTERNET_AUTH_NOTIFY_DATA(void) { /* INTERNET_AUTH_NOTIFY_DATA (pack 4) */ - TEST_TYPE(INTERNET_AUTH_NOTIFY_DATA, 16, 4); - TEST_FIELD(INTERNET_AUTH_NOTIFY_DATA, cbStruct, 0, 4, 4); - TEST_FIELD(INTERNET_AUTH_NOTIFY_DATA, dwOptions, 4, 4, 4); - TEST_FIELD(INTERNET_AUTH_NOTIFY_DATA, pfnNotify, 8, 4, 4); - TEST_FIELD(INTERNET_AUTH_NOTIFY_DATA, dwContext, 12, 4, 4); + TEST_TYPE_SIZE (INTERNET_AUTH_NOTIFY_DATA, 16) + TEST_TYPE_ALIGN (INTERNET_AUTH_NOTIFY_DATA, 4) + TEST_FIELD_SIZE (INTERNET_AUTH_NOTIFY_DATA, cbStruct, 4) + TEST_FIELD_ALIGN (INTERNET_AUTH_NOTIFY_DATA, cbStruct, 4) + TEST_FIELD_OFFSET(INTERNET_AUTH_NOTIFY_DATA, cbStruct, 0) + TEST_FIELD_SIZE (INTERNET_AUTH_NOTIFY_DATA, dwOptions, 4) + TEST_FIELD_ALIGN (INTERNET_AUTH_NOTIFY_DATA, dwOptions, 4) + TEST_FIELD_OFFSET(INTERNET_AUTH_NOTIFY_DATA, dwOptions, 4) + TEST_FIELD_SIZE (INTERNET_AUTH_NOTIFY_DATA, pfnNotify, 4) + TEST_FIELD_ALIGN (INTERNET_AUTH_NOTIFY_DATA, pfnNotify, 4) + TEST_FIELD_OFFSET(INTERNET_AUTH_NOTIFY_DATA, pfnNotify, 8) + TEST_FIELD_SIZE (INTERNET_AUTH_NOTIFY_DATA, dwContext, 4) + TEST_FIELD_ALIGN (INTERNET_AUTH_NOTIFY_DATA, dwContext, 4) + TEST_FIELD_OFFSET(INTERNET_AUTH_NOTIFY_DATA, dwContext, 12) } static void test_pack_INTERNET_BUFFERSA(void) { /* INTERNET_BUFFERSA (pack 4) */ - TEST_TYPE(INTERNET_BUFFERSA, 40, 4); - TEST_FIELD(INTERNET_BUFFERSA, dwStructSize, 0, 4, 4); - TEST_FIELD(INTERNET_BUFFERSA, Next, 4, 4, 4); - TEST_FIELD(INTERNET_BUFFERSA, lpcszHeader, 8, 4, 4); - TEST_FIELD(INTERNET_BUFFERSA, dwHeadersLength, 12, 4, 4); - TEST_FIELD(INTERNET_BUFFERSA, dwHeadersTotal, 16, 4, 4); - TEST_FIELD(INTERNET_BUFFERSA, lpvBuffer, 20, 4, 4); - TEST_FIELD(INTERNET_BUFFERSA, dwBufferLength, 24, 4, 4); - TEST_FIELD(INTERNET_BUFFERSA, dwBufferTotal, 28, 4, 4); - TEST_FIELD(INTERNET_BUFFERSA, dwOffsetLow, 32, 4, 4); - TEST_FIELD(INTERNET_BUFFERSA, dwOffsetHigh, 36, 4, 4); + TEST_TYPE_SIZE (INTERNET_BUFFERSA, 40) + TEST_TYPE_ALIGN (INTERNET_BUFFERSA, 4) + TEST_FIELD_SIZE (INTERNET_BUFFERSA, dwStructSize, 4) + TEST_FIELD_ALIGN (INTERNET_BUFFERSA, dwStructSize, 4) + TEST_FIELD_OFFSET(INTERNET_BUFFERSA, dwStructSize, 0) + TEST_FIELD_SIZE (INTERNET_BUFFERSA, Next, 4) + TEST_FIELD_ALIGN (INTERNET_BUFFERSA, Next, 4) + TEST_FIELD_OFFSET(INTERNET_BUFFERSA, Next, 4) + TEST_FIELD_SIZE (INTERNET_BUFFERSA, lpcszHeader, 4) + TEST_FIELD_ALIGN (INTERNET_BUFFERSA, lpcszHeader, 4) + TEST_FIELD_OFFSET(INTERNET_BUFFERSA, lpcszHeader, 8) + TEST_FIELD_SIZE (INTERNET_BUFFERSA, dwHeadersLength, 4) + TEST_FIELD_ALIGN (INTERNET_BUFFERSA, dwHeadersLength, 4) + TEST_FIELD_OFFSET(INTERNET_BUFFERSA, dwHeadersLength, 12) + TEST_FIELD_SIZE (INTERNET_BUFFERSA, dwHeadersTotal, 4) + TEST_FIELD_ALIGN (INTERNET_BUFFERSA, dwHeadersTotal, 4) + TEST_FIELD_OFFSET(INTERNET_BUFFERSA, dwHeadersTotal, 16) + TEST_FIELD_SIZE (INTERNET_BUFFERSA, lpvBuffer, 4) + TEST_FIELD_ALIGN (INTERNET_BUFFERSA, lpvBuffer, 4) + TEST_FIELD_OFFSET(INTERNET_BUFFERSA, lpvBuffer, 20) + TEST_FIELD_SIZE (INTERNET_BUFFERSA, dwBufferLength, 4) + TEST_FIELD_ALIGN (INTERNET_BUFFERSA, dwBufferLength, 4) + TEST_FIELD_OFFSET(INTERNET_BUFFERSA, dwBufferLength, 24) + TEST_FIELD_SIZE (INTERNET_BUFFERSA, dwBufferTotal, 4) + TEST_FIELD_ALIGN (INTERNET_BUFFERSA, dwBufferTotal, 4) + TEST_FIELD_OFFSET(INTERNET_BUFFERSA, dwBufferTotal, 28) + TEST_FIELD_SIZE (INTERNET_BUFFERSA, dwOffsetLow, 4) + TEST_FIELD_ALIGN (INTERNET_BUFFERSA, dwOffsetLow, 4) + TEST_FIELD_OFFSET(INTERNET_BUFFERSA, dwOffsetLow, 32) + TEST_FIELD_SIZE (INTERNET_BUFFERSA, dwOffsetHigh, 4) + TEST_FIELD_ALIGN (INTERNET_BUFFERSA, dwOffsetHigh, 4) + TEST_FIELD_OFFSET(INTERNET_BUFFERSA, dwOffsetHigh, 36) } static void test_pack_INTERNET_BUFFERSW(void) { /* INTERNET_BUFFERSW (pack 4) */ - TEST_TYPE(INTERNET_BUFFERSW, 40, 4); - TEST_FIELD(INTERNET_BUFFERSW, dwStructSize, 0, 4, 4); - TEST_FIELD(INTERNET_BUFFERSW, Next, 4, 4, 4); - TEST_FIELD(INTERNET_BUFFERSW, lpcszHeader, 8, 4, 4); - TEST_FIELD(INTERNET_BUFFERSW, dwHeadersLength, 12, 4, 4); - TEST_FIELD(INTERNET_BUFFERSW, dwHeadersTotal, 16, 4, 4); - TEST_FIELD(INTERNET_BUFFERSW, lpvBuffer, 20, 4, 4); - TEST_FIELD(INTERNET_BUFFERSW, dwBufferLength, 24, 4, 4); - TEST_FIELD(INTERNET_BUFFERSW, dwBufferTotal, 28, 4, 4); - TEST_FIELD(INTERNET_BUFFERSW, dwOffsetLow, 32, 4, 4); - TEST_FIELD(INTERNET_BUFFERSW, dwOffsetHigh, 36, 4, 4); + TEST_TYPE_SIZE (INTERNET_BUFFERSW, 40) + TEST_TYPE_ALIGN (INTERNET_BUFFERSW, 4) + TEST_FIELD_SIZE (INTERNET_BUFFERSW, dwStructSize, 4) + TEST_FIELD_ALIGN (INTERNET_BUFFERSW, dwStructSize, 4) + TEST_FIELD_OFFSET(INTERNET_BUFFERSW, dwStructSize, 0) + TEST_FIELD_SIZE (INTERNET_BUFFERSW, Next, 4) + TEST_FIELD_ALIGN (INTERNET_BUFFERSW, Next, 4) + TEST_FIELD_OFFSET(INTERNET_BUFFERSW, Next, 4) + TEST_FIELD_SIZE (INTERNET_BUFFERSW, lpcszHeader, 4) + TEST_FIELD_ALIGN (INTERNET_BUFFERSW, lpcszHeader, 4) + TEST_FIELD_OFFSET(INTERNET_BUFFERSW, lpcszHeader, 8) + TEST_FIELD_SIZE (INTERNET_BUFFERSW, dwHeadersLength, 4) + TEST_FIELD_ALIGN (INTERNET_BUFFERSW, dwHeadersLength, 4) + TEST_FIELD_OFFSET(INTERNET_BUFFERSW, dwHeadersLength, 12) + TEST_FIELD_SIZE (INTERNET_BUFFERSW, dwHeadersTotal, 4) + TEST_FIELD_ALIGN (INTERNET_BUFFERSW, dwHeadersTotal, 4) + TEST_FIELD_OFFSET(INTERNET_BUFFERSW, dwHeadersTotal, 16) + TEST_FIELD_SIZE (INTERNET_BUFFERSW, lpvBuffer, 4) + TEST_FIELD_ALIGN (INTERNET_BUFFERSW, lpvBuffer, 4) + TEST_FIELD_OFFSET(INTERNET_BUFFERSW, lpvBuffer, 20) + TEST_FIELD_SIZE (INTERNET_BUFFERSW, dwBufferLength, 4) + TEST_FIELD_ALIGN (INTERNET_BUFFERSW, dwBufferLength, 4) + TEST_FIELD_OFFSET(INTERNET_BUFFERSW, dwBufferLength, 24) + TEST_FIELD_SIZE (INTERNET_BUFFERSW, dwBufferTotal, 4) + TEST_FIELD_ALIGN (INTERNET_BUFFERSW, dwBufferTotal, 4) + TEST_FIELD_OFFSET(INTERNET_BUFFERSW, dwBufferTotal, 28) + TEST_FIELD_SIZE (INTERNET_BUFFERSW, dwOffsetLow, 4) + TEST_FIELD_ALIGN (INTERNET_BUFFERSW, dwOffsetLow, 4) + TEST_FIELD_OFFSET(INTERNET_BUFFERSW, dwOffsetLow, 32) + TEST_FIELD_SIZE (INTERNET_BUFFERSW, dwOffsetHigh, 4) + TEST_FIELD_ALIGN (INTERNET_BUFFERSW, dwOffsetHigh, 4) + TEST_FIELD_OFFSET(INTERNET_BUFFERSW, dwOffsetHigh, 36) } static void test_pack_INTERNET_CACHE_ENTRY_INFOA(void) { /* INTERNET_CACHE_ENTRY_INFOA (pack 4) */ - TEST_FIELD(INTERNET_CACHE_ENTRY_INFOA, dwStructSize, 0, 4, 4); - TEST_FIELD(INTERNET_CACHE_ENTRY_INFOA, lpszSourceUrlName, 4, 4, 4); - TEST_FIELD(INTERNET_CACHE_ENTRY_INFOA, lpszLocalFileName, 8, 4, 4); - TEST_FIELD(INTERNET_CACHE_ENTRY_INFOA, CacheEntryType, 12, 4, 4); - TEST_FIELD(INTERNET_CACHE_ENTRY_INFOA, dwUseCount, 16, 4, 4); - TEST_FIELD(INTERNET_CACHE_ENTRY_INFOA, dwHitRate, 20, 4, 4); - TEST_FIELD(INTERNET_CACHE_ENTRY_INFOA, dwSizeLow, 24, 4, 4); - TEST_FIELD(INTERNET_CACHE_ENTRY_INFOA, dwSizeHigh, 28, 4, 4); - TEST_FIELD(INTERNET_CACHE_ENTRY_INFOA, LastModifiedTime, 32, 8, 4); - TEST_FIELD(INTERNET_CACHE_ENTRY_INFOA, ExpireTime, 40, 8, 4); - TEST_FIELD(INTERNET_CACHE_ENTRY_INFOA, LastAccessTime, 48, 8, 4); - TEST_FIELD(INTERNET_CACHE_ENTRY_INFOA, LastSyncTime, 56, 8, 4); - TEST_FIELD(INTERNET_CACHE_ENTRY_INFOA, lpHeaderInfo, 64, 4, 4); - TEST_FIELD(INTERNET_CACHE_ENTRY_INFOA, dwHeaderInfoSize, 68, 4, 4); - TEST_FIELD(INTERNET_CACHE_ENTRY_INFOA, lpszFileExtension, 72, 4, 4); + TEST_FIELD_SIZE (INTERNET_CACHE_ENTRY_INFOA, dwStructSize, 4) + TEST_FIELD_ALIGN (INTERNET_CACHE_ENTRY_INFOA, dwStructSize, 4) + TEST_FIELD_OFFSET(INTERNET_CACHE_ENTRY_INFOA, dwStructSize, 0) + TEST_FIELD_SIZE (INTERNET_CACHE_ENTRY_INFOA, lpszSourceUrlName, 4) + TEST_FIELD_ALIGN (INTERNET_CACHE_ENTRY_INFOA, lpszSourceUrlName, 4) + TEST_FIELD_OFFSET(INTERNET_CACHE_ENTRY_INFOA, lpszSourceUrlName, 4) + TEST_FIELD_SIZE (INTERNET_CACHE_ENTRY_INFOA, lpszLocalFileName, 4) + TEST_FIELD_ALIGN (INTERNET_CACHE_ENTRY_INFOA, lpszLocalFileName, 4) + TEST_FIELD_OFFSET(INTERNET_CACHE_ENTRY_INFOA, lpszLocalFileName, 8) + TEST_FIELD_SIZE (INTERNET_CACHE_ENTRY_INFOA, CacheEntryType, 4) + TEST_FIELD_ALIGN (INTERNET_CACHE_ENTRY_INFOA, CacheEntryType, 4) + TEST_FIELD_OFFSET(INTERNET_CACHE_ENTRY_INFOA, CacheEntryType, 12) + TEST_FIELD_SIZE (INTERNET_CACHE_ENTRY_INFOA, dwUseCount, 4) + TEST_FIELD_ALIGN (INTERNET_CACHE_ENTRY_INFOA, dwUseCount, 4) + TEST_FIELD_OFFSET(INTERNET_CACHE_ENTRY_INFOA, dwUseCount, 16) + TEST_FIELD_SIZE (INTERNET_CACHE_ENTRY_INFOA, dwHitRate, 4) + TEST_FIELD_ALIGN (INTERNET_CACHE_ENTRY_INFOA, dwHitRate, 4) + TEST_FIELD_OFFSET(INTERNET_CACHE_ENTRY_INFOA, dwHitRate, 20) + TEST_FIELD_SIZE (INTERNET_CACHE_ENTRY_INFOA, dwSizeLow, 4) + TEST_FIELD_ALIGN (INTERNET_CACHE_ENTRY_INFOA, dwSizeLow, 4) + TEST_FIELD_OFFSET(INTERNET_CACHE_ENTRY_INFOA, dwSizeLow, 24) + TEST_FIELD_SIZE (INTERNET_CACHE_ENTRY_INFOA, dwSizeHigh, 4) + TEST_FIELD_ALIGN (INTERNET_CACHE_ENTRY_INFOA, dwSizeHigh, 4) + TEST_FIELD_OFFSET(INTERNET_CACHE_ENTRY_INFOA, dwSizeHigh, 28) + TEST_FIELD_SIZE (INTERNET_CACHE_ENTRY_INFOA, LastModifiedTime, 8) + TEST_FIELD_ALIGN (INTERNET_CACHE_ENTRY_INFOA, LastModifiedTime, 4) + TEST_FIELD_OFFSET(INTERNET_CACHE_ENTRY_INFOA, LastModifiedTime, 32) + TEST_FIELD_SIZE (INTERNET_CACHE_ENTRY_INFOA, ExpireTime, 8) + TEST_FIELD_ALIGN (INTERNET_CACHE_ENTRY_INFOA, ExpireTime, 4) + TEST_FIELD_OFFSET(INTERNET_CACHE_ENTRY_INFOA, ExpireTime, 40) + TEST_FIELD_SIZE (INTERNET_CACHE_ENTRY_INFOA, LastAccessTime, 8) + TEST_FIELD_ALIGN (INTERNET_CACHE_ENTRY_INFOA, LastAccessTime, 4) + TEST_FIELD_OFFSET(INTERNET_CACHE_ENTRY_INFOA, LastAccessTime, 48) + TEST_FIELD_SIZE (INTERNET_CACHE_ENTRY_INFOA, LastSyncTime, 8) + TEST_FIELD_ALIGN (INTERNET_CACHE_ENTRY_INFOA, LastSyncTime, 4) + TEST_FIELD_OFFSET(INTERNET_CACHE_ENTRY_INFOA, LastSyncTime, 56) + TEST_FIELD_SIZE (INTERNET_CACHE_ENTRY_INFOA, lpHeaderInfo, 4) + TEST_FIELD_ALIGN (INTERNET_CACHE_ENTRY_INFOA, lpHeaderInfo, 4) + TEST_FIELD_OFFSET(INTERNET_CACHE_ENTRY_INFOA, lpHeaderInfo, 64) + TEST_FIELD_SIZE (INTERNET_CACHE_ENTRY_INFOA, dwHeaderInfoSize, 4) + TEST_FIELD_ALIGN (INTERNET_CACHE_ENTRY_INFOA, dwHeaderInfoSize, 4) + TEST_FIELD_OFFSET(INTERNET_CACHE_ENTRY_INFOA, dwHeaderInfoSize, 68) + TEST_FIELD_SIZE (INTERNET_CACHE_ENTRY_INFOA, lpszFileExtension, 4) + TEST_FIELD_ALIGN (INTERNET_CACHE_ENTRY_INFOA, lpszFileExtension, 4) + TEST_FIELD_OFFSET(INTERNET_CACHE_ENTRY_INFOA, lpszFileExtension, 72) } static void test_pack_INTERNET_CACHE_ENTRY_INFOW(void) { /* INTERNET_CACHE_ENTRY_INFOW (pack 4) */ - TEST_FIELD(INTERNET_CACHE_ENTRY_INFOW, dwStructSize, 0, 4, 4); - TEST_FIELD(INTERNET_CACHE_ENTRY_INFOW, lpszSourceUrlName, 4, 4, 4); - TEST_FIELD(INTERNET_CACHE_ENTRY_INFOW, lpszLocalFileName, 8, 4, 4); - TEST_FIELD(INTERNET_CACHE_ENTRY_INFOW, CacheEntryType, 12, 4, 4); - TEST_FIELD(INTERNET_CACHE_ENTRY_INFOW, dwUseCount, 16, 4, 4); - TEST_FIELD(INTERNET_CACHE_ENTRY_INFOW, dwHitRate, 20, 4, 4); - TEST_FIELD(INTERNET_CACHE_ENTRY_INFOW, dwSizeLow, 24, 4, 4); - TEST_FIELD(INTERNET_CACHE_ENTRY_INFOW, dwSizeHigh, 28, 4, 4); - TEST_FIELD(INTERNET_CACHE_ENTRY_INFOW, LastModifiedTime, 32, 8, 4); - TEST_FIELD(INTERNET_CACHE_ENTRY_INFOW, ExpireTime, 40, 8, 4); - TEST_FIELD(INTERNET_CACHE_ENTRY_INFOW, LastAccessTime, 48, 8, 4); - TEST_FIELD(INTERNET_CACHE_ENTRY_INFOW, LastSyncTime, 56, 8, 4); - TEST_FIELD(INTERNET_CACHE_ENTRY_INFOW, lpHeaderInfo, 64, 4, 4); - TEST_FIELD(INTERNET_CACHE_ENTRY_INFOW, dwHeaderInfoSize, 68, 4, 4); - TEST_FIELD(INTERNET_CACHE_ENTRY_INFOW, lpszFileExtension, 72, 4, 4); + TEST_FIELD_SIZE (INTERNET_CACHE_ENTRY_INFOW, dwStructSize, 4) + TEST_FIELD_ALIGN (INTERNET_CACHE_ENTRY_INFOW, dwStructSize, 4) + TEST_FIELD_OFFSET(INTERNET_CACHE_ENTRY_INFOW, dwStructSize, 0) + TEST_FIELD_SIZE (INTERNET_CACHE_ENTRY_INFOW, lpszSourceUrlName, 4) + TEST_FIELD_ALIGN (INTERNET_CACHE_ENTRY_INFOW, lpszSourceUrlName, 4) + TEST_FIELD_OFFSET(INTERNET_CACHE_ENTRY_INFOW, lpszSourceUrlName, 4) + TEST_FIELD_SIZE (INTERNET_CACHE_ENTRY_INFOW, lpszLocalFileName, 4) + TEST_FIELD_ALIGN (INTERNET_CACHE_ENTRY_INFOW, lpszLocalFileName, 4) + TEST_FIELD_OFFSET(INTERNET_CACHE_ENTRY_INFOW, lpszLocalFileName, 8) + TEST_FIELD_SIZE (INTERNET_CACHE_ENTRY_INFOW, CacheEntryType, 4) + TEST_FIELD_ALIGN (INTERNET_CACHE_ENTRY_INFOW, CacheEntryType, 4) + TEST_FIELD_OFFSET(INTERNET_CACHE_ENTRY_INFOW, CacheEntryType, 12) + TEST_FIELD_SIZE (INTERNET_CACHE_ENTRY_INFOW, dwUseCount, 4) + TEST_FIELD_ALIGN (INTERNET_CACHE_ENTRY_INFOW, dwUseCount, 4) + TEST_FIELD_OFFSET(INTERNET_CACHE_ENTRY_INFOW, dwUseCount, 16) + TEST_FIELD_SIZE (INTERNET_CACHE_ENTRY_INFOW, dwHitRate, 4) + TEST_FIELD_ALIGN (INTERNET_CACHE_ENTRY_INFOW, dwHitRate, 4) + TEST_FIELD_OFFSET(INTERNET_CACHE_ENTRY_INFOW, dwHitRate, 20) + TEST_FIELD_SIZE (INTERNET_CACHE_ENTRY_INFOW, dwSizeLow, 4) + TEST_FIELD_ALIGN (INTERNET_CACHE_ENTRY_INFOW, dwSizeLow, 4) + TEST_FIELD_OFFSET(INTERNET_CACHE_ENTRY_INFOW, dwSizeLow, 24) + TEST_FIELD_SIZE (INTERNET_CACHE_ENTRY_INFOW, dwSizeHigh, 4) + TEST_FIELD_ALIGN (INTERNET_CACHE_ENTRY_INFOW, dwSizeHigh, 4) + TEST_FIELD_OFFSET(INTERNET_CACHE_ENTRY_INFOW, dwSizeHigh, 28) + TEST_FIELD_SIZE (INTERNET_CACHE_ENTRY_INFOW, LastModifiedTime, 8) + TEST_FIELD_ALIGN (INTERNET_CACHE_ENTRY_INFOW, LastModifiedTime, 4) + TEST_FIELD_OFFSET(INTERNET_CACHE_ENTRY_INFOW, LastModifiedTime, 32) + TEST_FIELD_SIZE (INTERNET_CACHE_ENTRY_INFOW, ExpireTime, 8) + TEST_FIELD_ALIGN (INTERNET_CACHE_ENTRY_INFOW, ExpireTime, 4) + TEST_FIELD_OFFSET(INTERNET_CACHE_ENTRY_INFOW, ExpireTime, 40) + TEST_FIELD_SIZE (INTERNET_CACHE_ENTRY_INFOW, LastAccessTime, 8) + TEST_FIELD_ALIGN (INTERNET_CACHE_ENTRY_INFOW, LastAccessTime, 4) + TEST_FIELD_OFFSET(INTERNET_CACHE_ENTRY_INFOW, LastAccessTime, 48) + TEST_FIELD_SIZE (INTERNET_CACHE_ENTRY_INFOW, LastSyncTime, 8) + TEST_FIELD_ALIGN (INTERNET_CACHE_ENTRY_INFOW, LastSyncTime, 4) + TEST_FIELD_OFFSET(INTERNET_CACHE_ENTRY_INFOW, LastSyncTime, 56) + TEST_FIELD_SIZE (INTERNET_CACHE_ENTRY_INFOW, lpHeaderInfo, 4) + TEST_FIELD_ALIGN (INTERNET_CACHE_ENTRY_INFOW, lpHeaderInfo, 4) + TEST_FIELD_OFFSET(INTERNET_CACHE_ENTRY_INFOW, lpHeaderInfo, 64) + TEST_FIELD_SIZE (INTERNET_CACHE_ENTRY_INFOW, dwHeaderInfoSize, 4) + TEST_FIELD_ALIGN (INTERNET_CACHE_ENTRY_INFOW, dwHeaderInfoSize, 4) + TEST_FIELD_OFFSET(INTERNET_CACHE_ENTRY_INFOW, dwHeaderInfoSize, 68) + TEST_FIELD_SIZE (INTERNET_CACHE_ENTRY_INFOW, lpszFileExtension, 4) + TEST_FIELD_ALIGN (INTERNET_CACHE_ENTRY_INFOW, lpszFileExtension, 4) + TEST_FIELD_OFFSET(INTERNET_CACHE_ENTRY_INFOW, lpszFileExtension, 72) } static void test_pack_INTERNET_CERTIFICATE_INFOA(void) { /* INTERNET_CERTIFICATE_INFOA (pack 4) */ - TEST_TYPE(INTERNET_CERTIFICATE_INFOA, 40, 4); - TEST_FIELD(INTERNET_CERTIFICATE_INFOA, ftExpiry, 0, 8, 4); - TEST_FIELD(INTERNET_CERTIFICATE_INFOA, ftStart, 8, 8, 4); - TEST_FIELD(INTERNET_CERTIFICATE_INFOA, lpszSubjectInfo, 16, 4, 4); - TEST_FIELD(INTERNET_CERTIFICATE_INFOA, lpszIssuerInfo, 20, 4, 4); - TEST_FIELD(INTERNET_CERTIFICATE_INFOA, lpszProtocolName, 24, 4, 4); - TEST_FIELD(INTERNET_CERTIFICATE_INFOA, lpszSignatureAlgName, 28, 4, 4); - TEST_FIELD(INTERNET_CERTIFICATE_INFOA, lpszEncryptionAlgName, 32, 4, 4); - TEST_FIELD(INTERNET_CERTIFICATE_INFOA, dwKeySize, 36, 4, 4); + TEST_TYPE_SIZE (INTERNET_CERTIFICATE_INFOA, 40) + TEST_TYPE_ALIGN (INTERNET_CERTIFICATE_INFOA, 4) + TEST_FIELD_SIZE (INTERNET_CERTIFICATE_INFOA, ftExpiry, 8) + TEST_FIELD_ALIGN (INTERNET_CERTIFICATE_INFOA, ftExpiry, 4) + TEST_FIELD_OFFSET(INTERNET_CERTIFICATE_INFOA, ftExpiry, 0) + TEST_FIELD_SIZE (INTERNET_CERTIFICATE_INFOA, ftStart, 8) + TEST_FIELD_ALIGN (INTERNET_CERTIFICATE_INFOA, ftStart, 4) + TEST_FIELD_OFFSET(INTERNET_CERTIFICATE_INFOA, ftStart, 8) + TEST_FIELD_SIZE (INTERNET_CERTIFICATE_INFOA, lpszSubjectInfo, 4) + TEST_FIELD_ALIGN (INTERNET_CERTIFICATE_INFOA, lpszSubjectInfo, 4) + TEST_FIELD_OFFSET(INTERNET_CERTIFICATE_INFOA, lpszSubjectInfo, 16) + TEST_FIELD_SIZE (INTERNET_CERTIFICATE_INFOA, lpszIssuerInfo, 4) + TEST_FIELD_ALIGN (INTERNET_CERTIFICATE_INFOA, lpszIssuerInfo, 4) + TEST_FIELD_OFFSET(INTERNET_CERTIFICATE_INFOA, lpszIssuerInfo, 20) + TEST_FIELD_SIZE (INTERNET_CERTIFICATE_INFOA, lpszProtocolName, 4) + TEST_FIELD_ALIGN (INTERNET_CERTIFICATE_INFOA, lpszProtocolName, 4) + TEST_FIELD_OFFSET(INTERNET_CERTIFICATE_INFOA, lpszProtocolName, 24) + TEST_FIELD_SIZE (INTERNET_CERTIFICATE_INFOA, lpszSignatureAlgName, 4) + TEST_FIELD_ALIGN (INTERNET_CERTIFICATE_INFOA, lpszSignatureAlgName, 4) + TEST_FIELD_OFFSET(INTERNET_CERTIFICATE_INFOA, lpszSignatureAlgName, 28) + TEST_FIELD_SIZE (INTERNET_CERTIFICATE_INFOA, lpszEncryptionAlgName, 4) + TEST_FIELD_ALIGN (INTERNET_CERTIFICATE_INFOA, lpszEncryptionAlgName, 4) + TEST_FIELD_OFFSET(INTERNET_CERTIFICATE_INFOA, lpszEncryptionAlgName, 32) + TEST_FIELD_SIZE (INTERNET_CERTIFICATE_INFOA, dwKeySize, 4) + TEST_FIELD_ALIGN (INTERNET_CERTIFICATE_INFOA, dwKeySize, 4) + TEST_FIELD_OFFSET(INTERNET_CERTIFICATE_INFOA, dwKeySize, 36) } static void test_pack_INTERNET_CERTIFICATE_INFOW(void) { /* INTERNET_CERTIFICATE_INFOW (pack 4) */ - TEST_TYPE(INTERNET_CERTIFICATE_INFOW, 40, 4); - TEST_FIELD(INTERNET_CERTIFICATE_INFOW, ftExpiry, 0, 8, 4); - TEST_FIELD(INTERNET_CERTIFICATE_INFOW, ftStart, 8, 8, 4); - TEST_FIELD(INTERNET_CERTIFICATE_INFOW, lpszSubjectInfo, 16, 4, 4); - TEST_FIELD(INTERNET_CERTIFICATE_INFOW, lpszIssuerInfo, 20, 4, 4); - TEST_FIELD(INTERNET_CERTIFICATE_INFOW, lpszProtocolName, 24, 4, 4); - TEST_FIELD(INTERNET_CERTIFICATE_INFOW, lpszSignatureAlgName, 28, 4, 4); - TEST_FIELD(INTERNET_CERTIFICATE_INFOW, lpszEncryptionAlgName, 32, 4, 4); - TEST_FIELD(INTERNET_CERTIFICATE_INFOW, dwKeySize, 36, 4, 4); + TEST_TYPE_SIZE (INTERNET_CERTIFICATE_INFOW, 40) + TEST_TYPE_ALIGN (INTERNET_CERTIFICATE_INFOW, 4) + TEST_FIELD_SIZE (INTERNET_CERTIFICATE_INFOW, ftExpiry, 8) + TEST_FIELD_ALIGN (INTERNET_CERTIFICATE_INFOW, ftExpiry, 4) + TEST_FIELD_OFFSET(INTERNET_CERTIFICATE_INFOW, ftExpiry, 0) + TEST_FIELD_SIZE (INTERNET_CERTIFICATE_INFOW, ftStart, 8) + TEST_FIELD_ALIGN (INTERNET_CERTIFICATE_INFOW, ftStart, 4) + TEST_FIELD_OFFSET(INTERNET_CERTIFICATE_INFOW, ftStart, 8) + TEST_FIELD_SIZE (INTERNET_CERTIFICATE_INFOW, lpszSubjectInfo, 4) + TEST_FIELD_ALIGN (INTERNET_CERTIFICATE_INFOW, lpszSubjectInfo, 4) + TEST_FIELD_OFFSET(INTERNET_CERTIFICATE_INFOW, lpszSubjectInfo, 16) + TEST_FIELD_SIZE (INTERNET_CERTIFICATE_INFOW, lpszIssuerInfo, 4) + TEST_FIELD_ALIGN (INTERNET_CERTIFICATE_INFOW, lpszIssuerInfo, 4) + TEST_FIELD_OFFSET(INTERNET_CERTIFICATE_INFOW, lpszIssuerInfo, 20) + TEST_FIELD_SIZE (INTERNET_CERTIFICATE_INFOW, lpszProtocolName, 4) + TEST_FIELD_ALIGN (INTERNET_CERTIFICATE_INFOW, lpszProtocolName, 4) + TEST_FIELD_OFFSET(INTERNET_CERTIFICATE_INFOW, lpszProtocolName, 24) + TEST_FIELD_SIZE (INTERNET_CERTIFICATE_INFOW, lpszSignatureAlgName, 4) + TEST_FIELD_ALIGN (INTERNET_CERTIFICATE_INFOW, lpszSignatureAlgName, 4) + TEST_FIELD_OFFSET(INTERNET_CERTIFICATE_INFOW, lpszSignatureAlgName, 28) + TEST_FIELD_SIZE (INTERNET_CERTIFICATE_INFOW, lpszEncryptionAlgName, 4) + TEST_FIELD_ALIGN (INTERNET_CERTIFICATE_INFOW, lpszEncryptionAlgName, 4) + TEST_FIELD_OFFSET(INTERNET_CERTIFICATE_INFOW, lpszEncryptionAlgName, 32) + TEST_FIELD_SIZE (INTERNET_CERTIFICATE_INFOW, dwKeySize, 4) + TEST_FIELD_ALIGN (INTERNET_CERTIFICATE_INFOW, dwKeySize, 4) + TEST_FIELD_OFFSET(INTERNET_CERTIFICATE_INFOW, dwKeySize, 36) } static void test_pack_INTERNET_CONNECTED_INFO(void) { /* INTERNET_CONNECTED_INFO (pack 4) */ - TEST_TYPE(INTERNET_CONNECTED_INFO, 8, 4); - TEST_FIELD(INTERNET_CONNECTED_INFO, dwConnectedState, 0, 4, 4); - TEST_FIELD(INTERNET_CONNECTED_INFO, dwFlags, 4, 4, 4); + TEST_TYPE_SIZE (INTERNET_CONNECTED_INFO, 8) + TEST_TYPE_ALIGN (INTERNET_CONNECTED_INFO, 4) + TEST_FIELD_SIZE (INTERNET_CONNECTED_INFO, dwConnectedState, 4) + TEST_FIELD_ALIGN (INTERNET_CONNECTED_INFO, dwConnectedState, 4) + TEST_FIELD_OFFSET(INTERNET_CONNECTED_INFO, dwConnectedState, 0) + TEST_FIELD_SIZE (INTERNET_CONNECTED_INFO, dwFlags, 4) + TEST_FIELD_ALIGN (INTERNET_CONNECTED_INFO, dwFlags, 4) + TEST_FIELD_OFFSET(INTERNET_CONNECTED_INFO, dwFlags, 4) } static void test_pack_INTERNET_PORT(void) { /* INTERNET_PORT */ - TEST_TYPE(INTERNET_PORT, 2, 2); - TEST_TYPE_UNSIGNED(INTERNET_PORT); + TEST_TYPE_SIZE (INTERNET_PORT, 2) + TEST_TYPE_ALIGN (INTERNET_PORT, 2) + TEST_TYPE_UNSIGNED(INTERNET_PORT) } static void test_pack_INTERNET_PROXY_INFOA(void) { /* INTERNET_PROXY_INFOA (pack 4) */ - TEST_TYPE(INTERNET_PROXY_INFOA, 12, 4); - TEST_FIELD(INTERNET_PROXY_INFOA, dwAccessType, 0, 4, 4); - TEST_FIELD(INTERNET_PROXY_INFOA, lpszProxy, 4, 4, 4); - TEST_FIELD(INTERNET_PROXY_INFOA, lpszProxyBypass, 8, 4, 4); + TEST_TYPE_SIZE (INTERNET_PROXY_INFOA, 12) + TEST_TYPE_ALIGN (INTERNET_PROXY_INFOA, 4) + TEST_FIELD_SIZE (INTERNET_PROXY_INFOA, dwAccessType, 4) + TEST_FIELD_ALIGN (INTERNET_PROXY_INFOA, dwAccessType, 4) + TEST_FIELD_OFFSET(INTERNET_PROXY_INFOA, dwAccessType, 0) + TEST_FIELD_SIZE (INTERNET_PROXY_INFOA, lpszProxy, 4) + TEST_FIELD_ALIGN (INTERNET_PROXY_INFOA, lpszProxy, 4) + TEST_FIELD_OFFSET(INTERNET_PROXY_INFOA, lpszProxy, 4) + TEST_FIELD_SIZE (INTERNET_PROXY_INFOA, lpszProxyBypass, 4) + TEST_FIELD_ALIGN (INTERNET_PROXY_INFOA, lpszProxyBypass, 4) + TEST_FIELD_OFFSET(INTERNET_PROXY_INFOA, lpszProxyBypass, 8) } static void test_pack_INTERNET_PROXY_INFOW(void) { /* INTERNET_PROXY_INFOW (pack 4) */ - TEST_TYPE(INTERNET_PROXY_INFOW, 12, 4); - TEST_FIELD(INTERNET_PROXY_INFOW, dwAccessType, 0, 4, 4); - TEST_FIELD(INTERNET_PROXY_INFOW, lpszProxy, 4, 4, 4); - TEST_FIELD(INTERNET_PROXY_INFOW, lpszProxyBypass, 8, 4, 4); + TEST_TYPE_SIZE (INTERNET_PROXY_INFOW, 12) + TEST_TYPE_ALIGN (INTERNET_PROXY_INFOW, 4) + TEST_FIELD_SIZE (INTERNET_PROXY_INFOW, dwAccessType, 4) + TEST_FIELD_ALIGN (INTERNET_PROXY_INFOW, dwAccessType, 4) + TEST_FIELD_OFFSET(INTERNET_PROXY_INFOW, dwAccessType, 0) + TEST_FIELD_SIZE (INTERNET_PROXY_INFOW, lpszProxy, 4) + TEST_FIELD_ALIGN (INTERNET_PROXY_INFOW, lpszProxy, 4) + TEST_FIELD_OFFSET(INTERNET_PROXY_INFOW, lpszProxy, 4) + TEST_FIELD_SIZE (INTERNET_PROXY_INFOW, lpszProxyBypass, 4) + TEST_FIELD_ALIGN (INTERNET_PROXY_INFOW, lpszProxyBypass, 4) + TEST_FIELD_OFFSET(INTERNET_PROXY_INFOW, lpszProxyBypass, 8) } static void test_pack_INTERNET_STATUS_CALLBACK(void) { /* INTERNET_STATUS_CALLBACK */ - TEST_TYPE(INTERNET_STATUS_CALLBACK, 4, 4); + TEST_TYPE_SIZE (INTERNET_STATUS_CALLBACK, 4) + TEST_TYPE_ALIGN (INTERNET_STATUS_CALLBACK, 4) } static void test_pack_INTERNET_VERSION_INFO(void) { /* INTERNET_VERSION_INFO (pack 4) */ - TEST_TYPE(INTERNET_VERSION_INFO, 8, 4); - TEST_FIELD(INTERNET_VERSION_INFO, dwMajorVersion, 0, 4, 4); - TEST_FIELD(INTERNET_VERSION_INFO, dwMinorVersion, 4, 4, 4); + TEST_TYPE_SIZE (INTERNET_VERSION_INFO, 8) + TEST_TYPE_ALIGN (INTERNET_VERSION_INFO, 4) + TEST_FIELD_SIZE (INTERNET_VERSION_INFO, dwMajorVersion, 4) + TEST_FIELD_ALIGN (INTERNET_VERSION_INFO, dwMajorVersion, 4) + TEST_FIELD_OFFSET(INTERNET_VERSION_INFO, dwMajorVersion, 0) + TEST_FIELD_SIZE (INTERNET_VERSION_INFO, dwMinorVersion, 4) + TEST_FIELD_ALIGN (INTERNET_VERSION_INFO, dwMinorVersion, 4) + TEST_FIELD_OFFSET(INTERNET_VERSION_INFO, dwMinorVersion, 4) } static void test_pack_LPGOPHER_ABSTRACT_ATTRIBUTE_TYPEA(void) { /* LPGOPHER_ABSTRACT_ATTRIBUTE_TYPEA */ - TEST_TYPE(LPGOPHER_ABSTRACT_ATTRIBUTE_TYPEA, 4, 4); - TEST_TYPE_POINTER(LPGOPHER_ABSTRACT_ATTRIBUTE_TYPEA, 8, 4); + TEST_TYPE_SIZE (LPGOPHER_ABSTRACT_ATTRIBUTE_TYPEA, 4) + TEST_TYPE_ALIGN (LPGOPHER_ABSTRACT_ATTRIBUTE_TYPEA, 4) + TEST_TARGET_SIZE (LPGOPHER_ABSTRACT_ATTRIBUTE_TYPEA, 8) + TEST_TARGET_ALIGN(LPGOPHER_ABSTRACT_ATTRIBUTE_TYPEA, 4) } static void test_pack_LPGOPHER_ABSTRACT_ATTRIBUTE_TYPEW(void) { /* LPGOPHER_ABSTRACT_ATTRIBUTE_TYPEW */ - TEST_TYPE(LPGOPHER_ABSTRACT_ATTRIBUTE_TYPEW, 4, 4); - TEST_TYPE_POINTER(LPGOPHER_ABSTRACT_ATTRIBUTE_TYPEW, 8, 4); + TEST_TYPE_SIZE (LPGOPHER_ABSTRACT_ATTRIBUTE_TYPEW, 4) + TEST_TYPE_ALIGN (LPGOPHER_ABSTRACT_ATTRIBUTE_TYPEW, 4) + TEST_TARGET_SIZE (LPGOPHER_ABSTRACT_ATTRIBUTE_TYPEW, 8) + TEST_TARGET_ALIGN(LPGOPHER_ABSTRACT_ATTRIBUTE_TYPEW, 4) } static void test_pack_LPGOPHER_ADMIN_ATTRIBUTE_TYPEA(void) { /* LPGOPHER_ADMIN_ATTRIBUTE_TYPEA */ - TEST_TYPE(LPGOPHER_ADMIN_ATTRIBUTE_TYPEA, 4, 4); - TEST_TYPE_POINTER(LPGOPHER_ADMIN_ATTRIBUTE_TYPEA, 8, 4); + TEST_TYPE_SIZE (LPGOPHER_ADMIN_ATTRIBUTE_TYPEA, 4) + TEST_TYPE_ALIGN (LPGOPHER_ADMIN_ATTRIBUTE_TYPEA, 4) + TEST_TARGET_SIZE (LPGOPHER_ADMIN_ATTRIBUTE_TYPEA, 8) + TEST_TARGET_ALIGN(LPGOPHER_ADMIN_ATTRIBUTE_TYPEA, 4) } static void test_pack_LPGOPHER_ADMIN_ATTRIBUTE_TYPEW(void) { /* LPGOPHER_ADMIN_ATTRIBUTE_TYPEW */ - TEST_TYPE(LPGOPHER_ADMIN_ATTRIBUTE_TYPEW, 4, 4); - TEST_TYPE_POINTER(LPGOPHER_ADMIN_ATTRIBUTE_TYPEW, 8, 4); + TEST_TYPE_SIZE (LPGOPHER_ADMIN_ATTRIBUTE_TYPEW, 4) + TEST_TYPE_ALIGN (LPGOPHER_ADMIN_ATTRIBUTE_TYPEW, 4) + TEST_TARGET_SIZE (LPGOPHER_ADMIN_ATTRIBUTE_TYPEW, 8) + TEST_TARGET_ALIGN(LPGOPHER_ADMIN_ATTRIBUTE_TYPEW, 4) } static void test_pack_LPGOPHER_ASK_ATTRIBUTE_TYPEA(void) { /* LPGOPHER_ASK_ATTRIBUTE_TYPEA */ - TEST_TYPE(LPGOPHER_ASK_ATTRIBUTE_TYPEA, 4, 4); - TEST_TYPE_POINTER(LPGOPHER_ASK_ATTRIBUTE_TYPEA, 8, 4); + TEST_TYPE_SIZE (LPGOPHER_ASK_ATTRIBUTE_TYPEA, 4) + TEST_TYPE_ALIGN (LPGOPHER_ASK_ATTRIBUTE_TYPEA, 4) + TEST_TARGET_SIZE (LPGOPHER_ASK_ATTRIBUTE_TYPEA, 8) + TEST_TARGET_ALIGN(LPGOPHER_ASK_ATTRIBUTE_TYPEA, 4) } static void test_pack_LPGOPHER_ASK_ATTRIBUTE_TYPEW(void) { /* LPGOPHER_ASK_ATTRIBUTE_TYPEW */ - TEST_TYPE(LPGOPHER_ASK_ATTRIBUTE_TYPEW, 4, 4); - TEST_TYPE_POINTER(LPGOPHER_ASK_ATTRIBUTE_TYPEW, 8, 4); + TEST_TYPE_SIZE (LPGOPHER_ASK_ATTRIBUTE_TYPEW, 4) + TEST_TYPE_ALIGN (LPGOPHER_ASK_ATTRIBUTE_TYPEW, 4) + TEST_TARGET_SIZE (LPGOPHER_ASK_ATTRIBUTE_TYPEW, 8) + TEST_TARGET_ALIGN(LPGOPHER_ASK_ATTRIBUTE_TYPEW, 4) } static void test_pack_LPGOPHER_ATTRIBUTE_TYPEA(void) { /* LPGOPHER_ATTRIBUTE_TYPEA */ - TEST_TYPE(LPGOPHER_ATTRIBUTE_TYPEA, 4, 4); + TEST_TYPE_SIZE (LPGOPHER_ATTRIBUTE_TYPEA, 4) + TEST_TYPE_ALIGN (LPGOPHER_ATTRIBUTE_TYPEA, 4) } static void test_pack_LPGOPHER_ATTRIBUTE_TYPEW(void) { /* LPGOPHER_ATTRIBUTE_TYPEW */ - TEST_TYPE(LPGOPHER_ATTRIBUTE_TYPEW, 4, 4); + TEST_TYPE_SIZE (LPGOPHER_ATTRIBUTE_TYPEW, 4) + TEST_TYPE_ALIGN (LPGOPHER_ATTRIBUTE_TYPEW, 4) } static void test_pack_LPGOPHER_FIND_DATAA(void) { /* LPGOPHER_FIND_DATAA */ - TEST_TYPE(LPGOPHER_FIND_DATAA, 4, 4); - TEST_TYPE_POINTER(LPGOPHER_FIND_DATAA, 808, 4); + TEST_TYPE_SIZE (LPGOPHER_FIND_DATAA, 4) + TEST_TYPE_ALIGN (LPGOPHER_FIND_DATAA, 4) + TEST_TARGET_SIZE (LPGOPHER_FIND_DATAA, 808) + TEST_TARGET_ALIGN(LPGOPHER_FIND_DATAA, 4) } static void test_pack_LPGOPHER_FIND_DATAW(void) { /* LPGOPHER_FIND_DATAW */ - TEST_TYPE(LPGOPHER_FIND_DATAW, 4, 4); - TEST_TYPE_POINTER(LPGOPHER_FIND_DATAW, 1588, 4); + TEST_TYPE_SIZE (LPGOPHER_FIND_DATAW, 4) + TEST_TYPE_ALIGN (LPGOPHER_FIND_DATAW, 4) + TEST_TARGET_SIZE (LPGOPHER_FIND_DATAW, 1588) + TEST_TARGET_ALIGN(LPGOPHER_FIND_DATAW, 4) } static void test_pack_LPGOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE(void) { /* LPGOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE */ - TEST_TYPE(LPGOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE, 4, 4); - TEST_TYPE_POINTER(LPGOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE, 24, 4); + TEST_TYPE_SIZE (LPGOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE, 4) + TEST_TYPE_ALIGN (LPGOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE, 4) + TEST_TARGET_SIZE (LPGOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE, 24) + TEST_TARGET_ALIGN(LPGOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE, 4) } static void test_pack_LPGOPHER_LOCATION_ATTRIBUTE_TYPEA(void) { /* LPGOPHER_LOCATION_ATTRIBUTE_TYPEA */ - TEST_TYPE(LPGOPHER_LOCATION_ATTRIBUTE_TYPEA, 4, 4); - TEST_TYPE_POINTER(LPGOPHER_LOCATION_ATTRIBUTE_TYPEA, 4, 4); + TEST_TYPE_SIZE (LPGOPHER_LOCATION_ATTRIBUTE_TYPEA, 4) + TEST_TYPE_ALIGN (LPGOPHER_LOCATION_ATTRIBUTE_TYPEA, 4) + TEST_TARGET_SIZE (LPGOPHER_LOCATION_ATTRIBUTE_TYPEA, 4) + TEST_TARGET_ALIGN(LPGOPHER_LOCATION_ATTRIBUTE_TYPEA, 4) } static void test_pack_LPGOPHER_LOCATION_ATTRIBUTE_TYPEW(void) { /* LPGOPHER_LOCATION_ATTRIBUTE_TYPEW */ - TEST_TYPE(LPGOPHER_LOCATION_ATTRIBUTE_TYPEW, 4, 4); - TEST_TYPE_POINTER(LPGOPHER_LOCATION_ATTRIBUTE_TYPEW, 4, 4); + TEST_TYPE_SIZE (LPGOPHER_LOCATION_ATTRIBUTE_TYPEW, 4) + TEST_TYPE_ALIGN (LPGOPHER_LOCATION_ATTRIBUTE_TYPEW, 4) + TEST_TARGET_SIZE (LPGOPHER_LOCATION_ATTRIBUTE_TYPEW, 4) + TEST_TARGET_ALIGN(LPGOPHER_LOCATION_ATTRIBUTE_TYPEW, 4) } static void test_pack_LPGOPHER_MOD_DATE_ATTRIBUTE_TYPE(void) { /* LPGOPHER_MOD_DATE_ATTRIBUTE_TYPE */ - TEST_TYPE(LPGOPHER_MOD_DATE_ATTRIBUTE_TYPE, 4, 4); - TEST_TYPE_POINTER(LPGOPHER_MOD_DATE_ATTRIBUTE_TYPE, 8, 4); + TEST_TYPE_SIZE (LPGOPHER_MOD_DATE_ATTRIBUTE_TYPE, 4) + TEST_TYPE_ALIGN (LPGOPHER_MOD_DATE_ATTRIBUTE_TYPE, 4) + TEST_TARGET_SIZE (LPGOPHER_MOD_DATE_ATTRIBUTE_TYPE, 8) + TEST_TARGET_ALIGN(LPGOPHER_MOD_DATE_ATTRIBUTE_TYPE, 4) } static void test_pack_LPGOPHER_ORGANIZATION_ATTRIBUTE_TYPEA(void) { /* LPGOPHER_ORGANIZATION_ATTRIBUTE_TYPEA */ - TEST_TYPE(LPGOPHER_ORGANIZATION_ATTRIBUTE_TYPEA, 4, 4); - TEST_TYPE_POINTER(LPGOPHER_ORGANIZATION_ATTRIBUTE_TYPEA, 4, 4); + TEST_TYPE_SIZE (LPGOPHER_ORGANIZATION_ATTRIBUTE_TYPEA, 4) + TEST_TYPE_ALIGN (LPGOPHER_ORGANIZATION_ATTRIBUTE_TYPEA, 4) + TEST_TARGET_SIZE (LPGOPHER_ORGANIZATION_ATTRIBUTE_TYPEA, 4) + TEST_TARGET_ALIGN(LPGOPHER_ORGANIZATION_ATTRIBUTE_TYPEA, 4) } static void test_pack_LPGOPHER_ORGANIZATION_ATTRIBUTE_TYPEW(void) { /* LPGOPHER_ORGANIZATION_ATTRIBUTE_TYPEW */ - TEST_TYPE(LPGOPHER_ORGANIZATION_ATTRIBUTE_TYPEW, 4, 4); - TEST_TYPE_POINTER(LPGOPHER_ORGANIZATION_ATTRIBUTE_TYPEW, 4, 4); + TEST_TYPE_SIZE (LPGOPHER_ORGANIZATION_ATTRIBUTE_TYPEW, 4) + TEST_TYPE_ALIGN (LPGOPHER_ORGANIZATION_ATTRIBUTE_TYPEW, 4) + TEST_TARGET_SIZE (LPGOPHER_ORGANIZATION_ATTRIBUTE_TYPEW, 4) + TEST_TARGET_ALIGN(LPGOPHER_ORGANIZATION_ATTRIBUTE_TYPEW, 4) } static void test_pack_LPGOPHER_PROVIDER_ATTRIBUTE_TYPEA(void) { /* LPGOPHER_PROVIDER_ATTRIBUTE_TYPEA */ - TEST_TYPE(LPGOPHER_PROVIDER_ATTRIBUTE_TYPEA, 4, 4); - TEST_TYPE_POINTER(LPGOPHER_PROVIDER_ATTRIBUTE_TYPEA, 4, 4); + TEST_TYPE_SIZE (LPGOPHER_PROVIDER_ATTRIBUTE_TYPEA, 4) + TEST_TYPE_ALIGN (LPGOPHER_PROVIDER_ATTRIBUTE_TYPEA, 4) + TEST_TARGET_SIZE (LPGOPHER_PROVIDER_ATTRIBUTE_TYPEA, 4) + TEST_TARGET_ALIGN(LPGOPHER_PROVIDER_ATTRIBUTE_TYPEA, 4) } static void test_pack_LPGOPHER_PROVIDER_ATTRIBUTE_TYPEW(void) { /* LPGOPHER_PROVIDER_ATTRIBUTE_TYPEW */ - TEST_TYPE(LPGOPHER_PROVIDER_ATTRIBUTE_TYPEW, 4, 4); - TEST_TYPE_POINTER(LPGOPHER_PROVIDER_ATTRIBUTE_TYPEW, 4, 4); + TEST_TYPE_SIZE (LPGOPHER_PROVIDER_ATTRIBUTE_TYPEW, 4) + TEST_TYPE_ALIGN (LPGOPHER_PROVIDER_ATTRIBUTE_TYPEW, 4) + TEST_TARGET_SIZE (LPGOPHER_PROVIDER_ATTRIBUTE_TYPEW, 4) + TEST_TARGET_ALIGN(LPGOPHER_PROVIDER_ATTRIBUTE_TYPEW, 4) } static void test_pack_LPGOPHER_SCORE_ATTRIBUTE_TYPE(void) { /* LPGOPHER_SCORE_ATTRIBUTE_TYPE */ - TEST_TYPE(LPGOPHER_SCORE_ATTRIBUTE_TYPE, 4, 4); - TEST_TYPE_POINTER(LPGOPHER_SCORE_ATTRIBUTE_TYPE, 4, 4); + TEST_TYPE_SIZE (LPGOPHER_SCORE_ATTRIBUTE_TYPE, 4) + TEST_TYPE_ALIGN (LPGOPHER_SCORE_ATTRIBUTE_TYPE, 4) + TEST_TARGET_SIZE (LPGOPHER_SCORE_ATTRIBUTE_TYPE, 4) + TEST_TARGET_ALIGN(LPGOPHER_SCORE_ATTRIBUTE_TYPE, 4) } static void test_pack_LPGOPHER_SCORE_RANGE_ATTRIBUTE_TYPE(void) { /* LPGOPHER_SCORE_RANGE_ATTRIBUTE_TYPE */ - TEST_TYPE(LPGOPHER_SCORE_RANGE_ATTRIBUTE_TYPE, 4, 4); - TEST_TYPE_POINTER(LPGOPHER_SCORE_RANGE_ATTRIBUTE_TYPE, 8, 4); + TEST_TYPE_SIZE (LPGOPHER_SCORE_RANGE_ATTRIBUTE_TYPE, 4) + TEST_TYPE_ALIGN (LPGOPHER_SCORE_RANGE_ATTRIBUTE_TYPE, 4) + TEST_TARGET_SIZE (LPGOPHER_SCORE_RANGE_ATTRIBUTE_TYPE, 8) + TEST_TARGET_ALIGN(LPGOPHER_SCORE_RANGE_ATTRIBUTE_TYPE, 4) } static void test_pack_LPGOPHER_SITE_ATTRIBUTE_TYPEA(void) { /* LPGOPHER_SITE_ATTRIBUTE_TYPEA */ - TEST_TYPE(LPGOPHER_SITE_ATTRIBUTE_TYPEA, 4, 4); - TEST_TYPE_POINTER(LPGOPHER_SITE_ATTRIBUTE_TYPEA, 4, 4); + TEST_TYPE_SIZE (LPGOPHER_SITE_ATTRIBUTE_TYPEA, 4) + TEST_TYPE_ALIGN (LPGOPHER_SITE_ATTRIBUTE_TYPEA, 4) + TEST_TARGET_SIZE (LPGOPHER_SITE_ATTRIBUTE_TYPEA, 4) + TEST_TARGET_ALIGN(LPGOPHER_SITE_ATTRIBUTE_TYPEA, 4) } static void test_pack_LPGOPHER_SITE_ATTRIBUTE_TYPEW(void) { /* LPGOPHER_SITE_ATTRIBUTE_TYPEW */ - TEST_TYPE(LPGOPHER_SITE_ATTRIBUTE_TYPEW, 4, 4); - TEST_TYPE_POINTER(LPGOPHER_SITE_ATTRIBUTE_TYPEW, 4, 4); + TEST_TYPE_SIZE (LPGOPHER_SITE_ATTRIBUTE_TYPEW, 4) + TEST_TYPE_ALIGN (LPGOPHER_SITE_ATTRIBUTE_TYPEW, 4) + TEST_TARGET_SIZE (LPGOPHER_SITE_ATTRIBUTE_TYPEW, 4) + TEST_TARGET_ALIGN(LPGOPHER_SITE_ATTRIBUTE_TYPEW, 4) } static void test_pack_LPGOPHER_TIMEZONE_ATTRIBUTE_TYPE(void) { /* LPGOPHER_TIMEZONE_ATTRIBUTE_TYPE */ - TEST_TYPE(LPGOPHER_TIMEZONE_ATTRIBUTE_TYPE, 4, 4); - TEST_TYPE_POINTER(LPGOPHER_TIMEZONE_ATTRIBUTE_TYPE, 4, 4); + TEST_TYPE_SIZE (LPGOPHER_TIMEZONE_ATTRIBUTE_TYPE, 4) + TEST_TYPE_ALIGN (LPGOPHER_TIMEZONE_ATTRIBUTE_TYPE, 4) + TEST_TARGET_SIZE (LPGOPHER_TIMEZONE_ATTRIBUTE_TYPE, 4) + TEST_TARGET_ALIGN(LPGOPHER_TIMEZONE_ATTRIBUTE_TYPE, 4) } static void test_pack_LPGOPHER_TTL_ATTRIBUTE_TYPE(void) { /* LPGOPHER_TTL_ATTRIBUTE_TYPE */ - TEST_TYPE(LPGOPHER_TTL_ATTRIBUTE_TYPE, 4, 4); - TEST_TYPE_POINTER(LPGOPHER_TTL_ATTRIBUTE_TYPE, 4, 4); + TEST_TYPE_SIZE (LPGOPHER_TTL_ATTRIBUTE_TYPE, 4) + TEST_TYPE_ALIGN (LPGOPHER_TTL_ATTRIBUTE_TYPE, 4) + TEST_TARGET_SIZE (LPGOPHER_TTL_ATTRIBUTE_TYPE, 4) + TEST_TARGET_ALIGN(LPGOPHER_TTL_ATTRIBUTE_TYPE, 4) } static void test_pack_LPGOPHER_UNKNOWN_ATTRIBUTE_TYPEA(void) { /* LPGOPHER_UNKNOWN_ATTRIBUTE_TYPEA */ - TEST_TYPE(LPGOPHER_UNKNOWN_ATTRIBUTE_TYPEA, 4, 4); - TEST_TYPE_POINTER(LPGOPHER_UNKNOWN_ATTRIBUTE_TYPEA, 4, 4); + TEST_TYPE_SIZE (LPGOPHER_UNKNOWN_ATTRIBUTE_TYPEA, 4) + TEST_TYPE_ALIGN (LPGOPHER_UNKNOWN_ATTRIBUTE_TYPEA, 4) + TEST_TARGET_SIZE (LPGOPHER_UNKNOWN_ATTRIBUTE_TYPEA, 4) + TEST_TARGET_ALIGN(LPGOPHER_UNKNOWN_ATTRIBUTE_TYPEA, 4) } static void test_pack_LPGOPHER_UNKNOWN_ATTRIBUTE_TYPEW(void) { /* LPGOPHER_UNKNOWN_ATTRIBUTE_TYPEW */ - TEST_TYPE(LPGOPHER_UNKNOWN_ATTRIBUTE_TYPEW, 4, 4); - TEST_TYPE_POINTER(LPGOPHER_UNKNOWN_ATTRIBUTE_TYPEW, 4, 4); + TEST_TYPE_SIZE (LPGOPHER_UNKNOWN_ATTRIBUTE_TYPEW, 4) + TEST_TYPE_ALIGN (LPGOPHER_UNKNOWN_ATTRIBUTE_TYPEW, 4) + TEST_TARGET_SIZE (LPGOPHER_UNKNOWN_ATTRIBUTE_TYPEW, 4) + TEST_TARGET_ALIGN(LPGOPHER_UNKNOWN_ATTRIBUTE_TYPEW, 4) } static void test_pack_LPGOPHER_VERONICA_ATTRIBUTE_TYPE(void) { /* LPGOPHER_VERONICA_ATTRIBUTE_TYPE */ - TEST_TYPE(LPGOPHER_VERONICA_ATTRIBUTE_TYPE, 4, 4); - TEST_TYPE_POINTER(LPGOPHER_VERONICA_ATTRIBUTE_TYPE, 4, 4); + TEST_TYPE_SIZE (LPGOPHER_VERONICA_ATTRIBUTE_TYPE, 4) + TEST_TYPE_ALIGN (LPGOPHER_VERONICA_ATTRIBUTE_TYPE, 4) + TEST_TARGET_SIZE (LPGOPHER_VERONICA_ATTRIBUTE_TYPE, 4) + TEST_TARGET_ALIGN(LPGOPHER_VERONICA_ATTRIBUTE_TYPE, 4) } static void test_pack_LPGOPHER_VERSION_ATTRIBUTE_TYPEA(void) { /* LPGOPHER_VERSION_ATTRIBUTE_TYPEA */ - TEST_TYPE(LPGOPHER_VERSION_ATTRIBUTE_TYPEA, 4, 4); - TEST_TYPE_POINTER(LPGOPHER_VERSION_ATTRIBUTE_TYPEA, 4, 4); + TEST_TYPE_SIZE (LPGOPHER_VERSION_ATTRIBUTE_TYPEA, 4) + TEST_TYPE_ALIGN (LPGOPHER_VERSION_ATTRIBUTE_TYPEA, 4) + TEST_TARGET_SIZE (LPGOPHER_VERSION_ATTRIBUTE_TYPEA, 4) + TEST_TARGET_ALIGN(LPGOPHER_VERSION_ATTRIBUTE_TYPEA, 4) } static void test_pack_LPGOPHER_VERSION_ATTRIBUTE_TYPEW(void) { /* LPGOPHER_VERSION_ATTRIBUTE_TYPEW */ - TEST_TYPE(LPGOPHER_VERSION_ATTRIBUTE_TYPEW, 4, 4); - TEST_TYPE_POINTER(LPGOPHER_VERSION_ATTRIBUTE_TYPEW, 4, 4); + TEST_TYPE_SIZE (LPGOPHER_VERSION_ATTRIBUTE_TYPEW, 4) + TEST_TYPE_ALIGN (LPGOPHER_VERSION_ATTRIBUTE_TYPEW, 4) + TEST_TARGET_SIZE (LPGOPHER_VERSION_ATTRIBUTE_TYPEW, 4) + TEST_TARGET_ALIGN(LPGOPHER_VERSION_ATTRIBUTE_TYPEW, 4) } static void test_pack_LPGOPHER_VIEW_ATTRIBUTE_TYPEA(void) { /* LPGOPHER_VIEW_ATTRIBUTE_TYPEA */ - TEST_TYPE(LPGOPHER_VIEW_ATTRIBUTE_TYPEA, 4, 4); - TEST_TYPE_POINTER(LPGOPHER_VIEW_ATTRIBUTE_TYPEA, 12, 4); + TEST_TYPE_SIZE (LPGOPHER_VIEW_ATTRIBUTE_TYPEA, 4) + TEST_TYPE_ALIGN (LPGOPHER_VIEW_ATTRIBUTE_TYPEA, 4) + TEST_TARGET_SIZE (LPGOPHER_VIEW_ATTRIBUTE_TYPEA, 12) + TEST_TARGET_ALIGN(LPGOPHER_VIEW_ATTRIBUTE_TYPEA, 4) } static void test_pack_LPGOPHER_VIEW_ATTRIBUTE_TYPEW(void) { /* LPGOPHER_VIEW_ATTRIBUTE_TYPEW */ - TEST_TYPE(LPGOPHER_VIEW_ATTRIBUTE_TYPEW, 4, 4); - TEST_TYPE_POINTER(LPGOPHER_VIEW_ATTRIBUTE_TYPEW, 12, 4); + TEST_TYPE_SIZE (LPGOPHER_VIEW_ATTRIBUTE_TYPEW, 4) + TEST_TYPE_ALIGN (LPGOPHER_VIEW_ATTRIBUTE_TYPEW, 4) + TEST_TARGET_SIZE (LPGOPHER_VIEW_ATTRIBUTE_TYPEW, 12) + TEST_TARGET_ALIGN(LPGOPHER_VIEW_ATTRIBUTE_TYPEW, 4) } static void test_pack_LPHINTERNET(void) { /* LPHINTERNET */ - TEST_TYPE(LPHINTERNET, 4, 4); - TEST_TYPE_POINTER(LPHINTERNET, 4, 4); + TEST_TYPE_SIZE (LPHINTERNET, 4) + TEST_TYPE_ALIGN (LPHINTERNET, 4) + TEST_TARGET_SIZE (LPHINTERNET, 4) + TEST_TARGET_ALIGN(LPHINTERNET, 4) } static void test_pack_LPHTTP_VERSION_INFO(void) { /* LPHTTP_VERSION_INFO */ - TEST_TYPE(LPHTTP_VERSION_INFO, 4, 4); - TEST_TYPE_POINTER(LPHTTP_VERSION_INFO, 8, 4); + TEST_TYPE_SIZE (LPHTTP_VERSION_INFO, 4) + TEST_TYPE_ALIGN (LPHTTP_VERSION_INFO, 4) + TEST_TARGET_SIZE (LPHTTP_VERSION_INFO, 8) + TEST_TARGET_ALIGN(LPHTTP_VERSION_INFO, 4) } static void test_pack_LPINTERNET_ASYNC_RESULT(void) { /* LPINTERNET_ASYNC_RESULT */ - TEST_TYPE(LPINTERNET_ASYNC_RESULT, 4, 4); - TEST_TYPE_POINTER(LPINTERNET_ASYNC_RESULT, 8, 4); + TEST_TYPE_SIZE (LPINTERNET_ASYNC_RESULT, 4) + TEST_TYPE_ALIGN (LPINTERNET_ASYNC_RESULT, 4) + TEST_TARGET_SIZE (LPINTERNET_ASYNC_RESULT, 8) + TEST_TARGET_ALIGN(LPINTERNET_ASYNC_RESULT, 4) } static void test_pack_LPINTERNET_BUFFERSA(void) { /* LPINTERNET_BUFFERSA */ - TEST_TYPE(LPINTERNET_BUFFERSA, 4, 4); - TEST_TYPE_POINTER(LPINTERNET_BUFFERSA, 40, 4); + TEST_TYPE_SIZE (LPINTERNET_BUFFERSA, 4) + TEST_TYPE_ALIGN (LPINTERNET_BUFFERSA, 4) + TEST_TARGET_SIZE (LPINTERNET_BUFFERSA, 40) + TEST_TARGET_ALIGN(LPINTERNET_BUFFERSA, 4) } static void test_pack_LPINTERNET_BUFFERSW(void) { /* LPINTERNET_BUFFERSW */ - TEST_TYPE(LPINTERNET_BUFFERSW, 4, 4); - TEST_TYPE_POINTER(LPINTERNET_BUFFERSW, 40, 4); + TEST_TYPE_SIZE (LPINTERNET_BUFFERSW, 4) + TEST_TYPE_ALIGN (LPINTERNET_BUFFERSW, 4) + TEST_TARGET_SIZE (LPINTERNET_BUFFERSW, 40) + TEST_TARGET_ALIGN(LPINTERNET_BUFFERSW, 4) } static void test_pack_LPINTERNET_CACHE_ENTRY_INFOA(void) { /* LPINTERNET_CACHE_ENTRY_INFOA */ - TEST_TYPE(LPINTERNET_CACHE_ENTRY_INFOA, 4, 4); + TEST_TYPE_SIZE (LPINTERNET_CACHE_ENTRY_INFOA, 4) + TEST_TYPE_ALIGN (LPINTERNET_CACHE_ENTRY_INFOA, 4) } static void test_pack_LPINTERNET_CACHE_ENTRY_INFOW(void) { /* LPINTERNET_CACHE_ENTRY_INFOW */ - TEST_TYPE(LPINTERNET_CACHE_ENTRY_INFOW, 4, 4); + TEST_TYPE_SIZE (LPINTERNET_CACHE_ENTRY_INFOW, 4) + TEST_TYPE_ALIGN (LPINTERNET_CACHE_ENTRY_INFOW, 4) } static void test_pack_LPINTERNET_CERTIFICATE_INFOA(void) { /* LPINTERNET_CERTIFICATE_INFOA */ - TEST_TYPE(LPINTERNET_CERTIFICATE_INFOA, 4, 4); - TEST_TYPE_POINTER(LPINTERNET_CERTIFICATE_INFOA, 40, 4); + TEST_TYPE_SIZE (LPINTERNET_CERTIFICATE_INFOA, 4) + TEST_TYPE_ALIGN (LPINTERNET_CERTIFICATE_INFOA, 4) + TEST_TARGET_SIZE (LPINTERNET_CERTIFICATE_INFOA, 40) + TEST_TARGET_ALIGN(LPINTERNET_CERTIFICATE_INFOA, 4) } static void test_pack_LPINTERNET_CERTIFICATE_INFOW(void) { /* LPINTERNET_CERTIFICATE_INFOW */ - TEST_TYPE(LPINTERNET_CERTIFICATE_INFOW, 4, 4); - TEST_TYPE_POINTER(LPINTERNET_CERTIFICATE_INFOW, 40, 4); + TEST_TYPE_SIZE (LPINTERNET_CERTIFICATE_INFOW, 4) + TEST_TYPE_ALIGN (LPINTERNET_CERTIFICATE_INFOW, 4) + TEST_TARGET_SIZE (LPINTERNET_CERTIFICATE_INFOW, 40) + TEST_TARGET_ALIGN(LPINTERNET_CERTIFICATE_INFOW, 4) } static void test_pack_LPINTERNET_CONNECTED_INFO(void) { /* LPINTERNET_CONNECTED_INFO */ - TEST_TYPE(LPINTERNET_CONNECTED_INFO, 4, 4); - TEST_TYPE_POINTER(LPINTERNET_CONNECTED_INFO, 8, 4); + TEST_TYPE_SIZE (LPINTERNET_CONNECTED_INFO, 4) + TEST_TYPE_ALIGN (LPINTERNET_CONNECTED_INFO, 4) + TEST_TARGET_SIZE (LPINTERNET_CONNECTED_INFO, 8) + TEST_TARGET_ALIGN(LPINTERNET_CONNECTED_INFO, 4) } static void test_pack_LPINTERNET_PORT(void) { /* LPINTERNET_PORT */ - TEST_TYPE(LPINTERNET_PORT, 4, 4); - TEST_TYPE_POINTER(LPINTERNET_PORT, 2, 2); + TEST_TYPE_SIZE (LPINTERNET_PORT, 4) + TEST_TYPE_ALIGN (LPINTERNET_PORT, 4) + TEST_TARGET_SIZE (LPINTERNET_PORT, 2) + TEST_TARGET_ALIGN(LPINTERNET_PORT, 2) } static void test_pack_LPINTERNET_PROXY_INFOA(void) { /* LPINTERNET_PROXY_INFOA */ - TEST_TYPE(LPINTERNET_PROXY_INFOA, 4, 4); - TEST_TYPE_POINTER(LPINTERNET_PROXY_INFOA, 12, 4); + TEST_TYPE_SIZE (LPINTERNET_PROXY_INFOA, 4) + TEST_TYPE_ALIGN (LPINTERNET_PROXY_INFOA, 4) + TEST_TARGET_SIZE (LPINTERNET_PROXY_INFOA, 12) + TEST_TARGET_ALIGN(LPINTERNET_PROXY_INFOA, 4) } static void test_pack_LPINTERNET_PROXY_INFOW(void) { /* LPINTERNET_PROXY_INFOW */ - TEST_TYPE(LPINTERNET_PROXY_INFOW, 4, 4); - TEST_TYPE_POINTER(LPINTERNET_PROXY_INFOW, 12, 4); + TEST_TYPE_SIZE (LPINTERNET_PROXY_INFOW, 4) + TEST_TYPE_ALIGN (LPINTERNET_PROXY_INFOW, 4) + TEST_TARGET_SIZE (LPINTERNET_PROXY_INFOW, 12) + TEST_TARGET_ALIGN(LPINTERNET_PROXY_INFOW, 4) } static void test_pack_LPINTERNET_STATUS_CALLBACK(void) { /* LPINTERNET_STATUS_CALLBACK */ - TEST_TYPE(LPINTERNET_STATUS_CALLBACK, 4, 4); - TEST_TYPE_POINTER(LPINTERNET_STATUS_CALLBACK, 4, 4); + TEST_TYPE_SIZE (LPINTERNET_STATUS_CALLBACK, 4) + TEST_TYPE_ALIGN (LPINTERNET_STATUS_CALLBACK, 4) + TEST_TARGET_SIZE (LPINTERNET_STATUS_CALLBACK, 4) + TEST_TARGET_ALIGN(LPINTERNET_STATUS_CALLBACK, 4) } static void test_pack_LPINTERNET_VERSION_INFO(void) { /* LPINTERNET_VERSION_INFO */ - TEST_TYPE(LPINTERNET_VERSION_INFO, 4, 4); - TEST_TYPE_POINTER(LPINTERNET_VERSION_INFO, 8, 4); + TEST_TYPE_SIZE (LPINTERNET_VERSION_INFO, 4) + TEST_TYPE_ALIGN (LPINTERNET_VERSION_INFO, 4) + TEST_TARGET_SIZE (LPINTERNET_VERSION_INFO, 8) + TEST_TARGET_ALIGN(LPINTERNET_VERSION_INFO, 4) } static void test_pack_LPURL_COMPONENTSA(void) { /* LPURL_COMPONENTSA */ - TEST_TYPE(LPURL_COMPONENTSA, 4, 4); + TEST_TYPE_SIZE (LPURL_COMPONENTSA, 4) + TEST_TYPE_ALIGN (LPURL_COMPONENTSA, 4) } static void test_pack_LPURL_COMPONENTSW(void) { /* LPURL_COMPONENTSW */ - TEST_TYPE(LPURL_COMPONENTSW, 4, 4); + TEST_TYPE_SIZE (LPURL_COMPONENTSW, 4) + TEST_TYPE_ALIGN (LPURL_COMPONENTSW, 4) } static void test_pack_PFN_AUTH_NOTIFY(void) { /* PFN_AUTH_NOTIFY */ - TEST_TYPE(PFN_AUTH_NOTIFY, 4, 4); + TEST_TYPE_SIZE (PFN_AUTH_NOTIFY, 4) + TEST_TYPE_ALIGN (PFN_AUTH_NOTIFY, 4) } static void test_pack_PFN_DIAL_HANDLER(void) { /* PFN_DIAL_HANDLER */ - TEST_TYPE(PFN_DIAL_HANDLER, 4, 4); + TEST_TYPE_SIZE (PFN_DIAL_HANDLER, 4) + TEST_TYPE_ALIGN (PFN_DIAL_HANDLER, 4) } static void test_pack_URL_COMPONENTSA(void) { /* URL_COMPONENTSA (pack 4) */ - TEST_FIELD(URL_COMPONENTSA, dwStructSize, 0, 4, 4); - TEST_FIELD(URL_COMPONENTSA, lpszScheme, 4, 4, 4); - TEST_FIELD(URL_COMPONENTSA, dwSchemeLength, 8, 4, 4); + TEST_FIELD_SIZE (URL_COMPONENTSA, dwStructSize, 4) + TEST_FIELD_ALIGN (URL_COMPONENTSA, dwStructSize, 4) + TEST_FIELD_OFFSET(URL_COMPONENTSA, dwStructSize, 0) + TEST_FIELD_SIZE (URL_COMPONENTSA, lpszScheme, 4) + TEST_FIELD_ALIGN (URL_COMPONENTSA, lpszScheme, 4) + TEST_FIELD_OFFSET(URL_COMPONENTSA, lpszScheme, 4) + TEST_FIELD_SIZE (URL_COMPONENTSA, dwSchemeLength, 4) + TEST_FIELD_ALIGN (URL_COMPONENTSA, dwSchemeLength, 4) + TEST_FIELD_OFFSET(URL_COMPONENTSA, dwSchemeLength, 8) } static void test_pack_URL_COMPONENTSW(void) { /* URL_COMPONENTSW (pack 4) */ - TEST_FIELD(URL_COMPONENTSW, dwStructSize, 0, 4, 4); - TEST_FIELD(URL_COMPONENTSW, lpszScheme, 4, 4, 4); - TEST_FIELD(URL_COMPONENTSW, dwSchemeLength, 8, 4, 4); + TEST_FIELD_SIZE (URL_COMPONENTSW, dwStructSize, 4) + TEST_FIELD_ALIGN (URL_COMPONENTSW, dwStructSize, 4) + TEST_FIELD_OFFSET(URL_COMPONENTSW, dwStructSize, 0) + TEST_FIELD_SIZE (URL_COMPONENTSW, lpszScheme, 4) + TEST_FIELD_ALIGN (URL_COMPONENTSW, lpszScheme, 4) + TEST_FIELD_OFFSET(URL_COMPONENTSW, lpszScheme, 4) + TEST_FIELD_SIZE (URL_COMPONENTSW, dwSchemeLength, 4) + TEST_FIELD_ALIGN (URL_COMPONENTSW, dwSchemeLength, 4) + TEST_FIELD_OFFSET(URL_COMPONENTSW, dwSchemeLength, 8) } static void test_pack(void) diff --git a/tools/winapi/winapi_test b/tools/winapi/winapi_test index 8b6c9c29c72..c1c742cc61a 100755 --- a/tools/winapi/winapi_test +++ b/tools/winapi/winapi_test @@ -536,59 +536,41 @@ sub output_header($$$) { print OUT " * Test helper macros\n"; print OUT " */\n"; print OUT "\n"; - print OUT "#ifdef FIELD_ALIGNMENT\n"; - print OUT "# define TEST_FIELD_ALIGNMENT(type, field, align) \\\n"; - print OUT " ok(_TYPE_ALIGNMENT(((type*)0)->field) == align, \\\n"; - print OUT " \"FIELD_ALIGNMENT(\" #type \", \" #field \") == %d (expected \" #align \")\\n\", \\\n"; - print OUT " (int)_TYPE_ALIGNMENT(((type*)0)->field))\n"; + print OUT "#ifdef _WIN64\n"; + print OUT "\n"; + print OUT "# define TEST_TYPE_SIZE(type, size)\n"; + print OUT "# define TEST_TYPE_ALIGN(type, align)\n"; + print OUT "# define TEST_TARGET_ALIGN(type, align)\n"; + print OUT "# define TEST_FIELD_ALIGN(type, field, align)\n"; + print OUT "# define TEST_FIELD_OFFSET(type, field, offset)\n"; + print OUT "\n"; print OUT "#else\n"; - print OUT "# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)\n"; + print OUT "\n"; + print OUT "# define TEST_TYPE_SIZE(type, size) C_ASSERT(sizeof(type) == size);\n"; + print OUT "\n"; + print OUT "# ifdef TYPE_ALIGNMENT\n"; + print OUT "# define TEST_TYPE_ALIGN(type, align) C_ASSERT(TYPE_ALIGNMENT(type) == align);\n"; + print OUT "# else\n"; + print OUT "# define TEST_TYPE_ALIGN(type, align)\n"; + print OUT "# endif\n"; + print OUT "\n"; + print OUT "# ifdef _TYPE_ALIGNMENT\n"; + print OUT "# define TEST_TARGET_ALIGN(type, align) C_ASSERT(_TYPE_ALIGNMENT(*(type)0) == align);\n"; + print OUT "# define TEST_FIELD_ALIGN(type, field, align) C_ASSERT(_TYPE_ALIGNMENT(((type*)0)->field) == align);\n"; + print OUT "# else\n"; + print OUT "# define TEST_TARGET_ALIGN(type, align)\n"; + print OUT "# define TEST_FIELD_ALIGN(type, field, align)\n"; + print OUT "# endif\n"; + print OUT "\n"; + print OUT "# define TEST_FIELD_OFFSET(type, field, offset) C_ASSERT(FIELD_OFFSET(type, field) == offset);\n"; + print OUT "\n"; print OUT "#endif\n"; print OUT "\n"; - print OUT "#define TEST_FIELD_OFFSET(type, field, offset) \\\n"; - print OUT " ok(FIELD_OFFSET(type, field) == offset, \\\n"; - print OUT " \"FIELD_OFFSET(\" #type \", \" #field \") == %ld (expected \" #offset \")\\n\", \\\n"; - print OUT " (long int)FIELD_OFFSET(type, field))\n"; + print OUT "#define TEST_TARGET_SIZE(type, size) TEST_TYPE_SIZE(*(type)0, size)\n"; + print OUT "#define TEST_FIELD_SIZE(type, field, size) TEST_TYPE_SIZE((((type*)0)->field), size)\n"; + print OUT "#define TEST_TYPE_SIGNED(type) C_ASSERT((type) -1 < 0);\n"; + print OUT "#define TEST_TYPE_UNSIGNED(type) C_ASSERT((type) -1 > 0);\n"; print OUT "\n"; - print OUT "#ifdef _TYPE_ALIGNMENT\n"; - print OUT "#define TEST__TYPE_ALIGNMENT(type, align) \\\n"; - print OUT " ok(_TYPE_ALIGNMENT(type) == align, \"TYPE_ALIGNMENT(\" #type \") == %d (expected \" #align \")\\n\", (int)_TYPE_ALIGNMENT(type))\n"; - print OUT "#else\n"; - print OUT "# define TEST__TYPE_ALIGNMENT(type, align) do { } while (0)\n"; - print OUT "#endif\n"; - print OUT "\n"; - print OUT "#ifdef TYPE_ALIGNMENT\n"; - print OUT "#define TEST_TYPE_ALIGNMENT(type, align) \\\n"; - print OUT " ok(TYPE_ALIGNMENT(type) == align, \"TYPE_ALIGNMENT(\" #type \") == %d (expected \" #align \")\\n\", (int)TYPE_ALIGNMENT(type))\n"; - print OUT "#else\n"; - print OUT "# define TEST_TYPE_ALIGNMENT(type, align) do { } while (0)\n"; - print OUT "#endif\n"; - print OUT "\n"; - print OUT "#define TEST_TYPE_SIZE(type, size) \\\n"; - print OUT " ok(sizeof(type) == size, \"sizeof(\" #type \") == %d (expected \" #size \")\\n\", ((int) sizeof(type)))\n"; - print OUT "\n"; - print OUT "/***********************************************************************\n"; - print OUT " * Test macros\n"; - print OUT " */\n"; - print OUT "\n"; - print OUT "#define TEST_FIELD(type, field, field_offset, field_size, field_align) \\\n"; - print OUT " TEST_TYPE_SIZE((((type*)0)->field), field_size); \\\n"; - print OUT " TEST_FIELD_ALIGNMENT(type, field, field_align); \\\n"; - print OUT " TEST_FIELD_OFFSET(type, field, field_offset)\n"; - print OUT "\n"; - print OUT "#define TEST_TYPE(type, size, align) \\\n"; - print OUT " TEST_TYPE_ALIGNMENT(type, align); \\\n"; - print OUT " TEST_TYPE_SIZE(type, size)\n"; - print OUT "\n"; - print OUT "#define TEST_TYPE_POINTER(type, size, align) \\\n"; - print OUT " TEST__TYPE_ALIGNMENT(*(type)0, align); \\\n"; - print OUT " TEST_TYPE_SIZE(*(type)0, size)\n"; - print OUT "\n"; - print OUT "#define TEST_TYPE_SIGNED(type) \\\n"; - print OUT " ok((type) -1 < 0, \"(\" #type \") -1 < 0\\n\");\n"; - print OUT "\n"; - print OUT "#define TEST_TYPE_UNSIGNED(type) \\\n"; - print OUT " ok((type) -1 > 0, \"(\" #type \") -1 > 0\\n\");\n"; print OUT "\n"; } @@ -635,7 +617,8 @@ sub output_test_pack_type($$$$$$) { } if (!scalar(keys(%$optional_fields)) && defined($type_align) && defined($type_size)) { - print OUT " TEST_TYPE($type_name, $type_size, $type_align);\n"; + print OUT " TEST_TYPE_SIZE ($type_name, $type_size)\n"; + print OUT " TEST_TYPE_ALIGN ($type_name, $type_align)\n"; } if ($type_kind eq "float") { @@ -684,15 +667,16 @@ sub output_test_pack_type($$$$$$) { my $optional_fields2 = $$type_name2optional_fields{$type_name2}; if (!$optional && !scalar(keys(%$optional_fields2)) && defined($type_align2) && defined($type_size2)) { - print OUT " TEST_TYPE_POINTER($type_name, $type_size2, $type_align2);\n"; + print OUT " TEST_TARGET_SIZE ($type_name, $type_size2)\n"; + print OUT " TEST_TARGET_ALIGN($type_name, $type_align2)\n"; } else { # $output->write("$type_name: warning: type size not found\n"); } } } elsif ($type_kind eq "signed") { - print OUT " TEST_TYPE_SIGNED($type_name);\n"; + print OUT " TEST_TYPE_SIGNED($type_name)\n"; } elsif ($type_kind eq "unsigned") { - print OUT " TEST_TYPE_UNSIGNED($type_name);\n"; + print OUT " TEST_TYPE_UNSIGNED($type_name)\n"; } } @@ -727,15 +711,17 @@ sub output_test_pack_fields($$$$$$$) { $field_offset += $offset; if ($field_name eq "DUMMYSTRUCTNAME") { print OUT "#ifdef NONAMELESSSTRUCT\n"; - print OUT " TEST_FIELD($type_name, $field_name, "; - print OUT "$field_offset, $field_size, $field_align);\n"; + print OUT " TEST_TYPE_SIZE ($type_name.$field_name, $field_size)\n"; + print OUT " TEST_FIELD_ALIGN ($type_name, $field_name, $field_align)\n"; + print OUT " TEST_FIELD_OFFSET($type_name, $field_name, $field_offset)\n"; print OUT "#else\n"; output_test_pack_fields(\*OUT, $type_name2type, $type_name2optional, $type_name2optional_fields, $type_name, $$type_name2type{$field_type_name}, $field_offset); print OUT "#endif\n"; } else { - print OUT " TEST_FIELD($type_name, $field_name, "; - print OUT "$field_offset, $field_size, $field_align);\n"; + print OUT " TEST_FIELD_SIZE ($type_name, $field_name, $field_size)\n"; + print OUT " TEST_FIELD_ALIGN ($type_name, $field_name, $field_align)\n"; + print OUT " TEST_FIELD_OFFSET($type_name, $field_name, $field_offset)\n"; } } else { # $output->write("$type_name: $field_type_name: $field_name: test not generated (offset not defined)\n");