Updated the generated tests.

This commit is contained in:
Patrik Stridvall 2002-11-12 01:13:10 +00:00 committed by Alexandre Julliard
parent b3da4abc57
commit 9398d9c129
19 changed files with 1403 additions and 1 deletions

3
configure vendored

File diff suppressed because one or more lines are too long

View File

@ -1468,6 +1468,7 @@ dlls/ttydrv/Makefile
dlls/twain/Makefile
dlls/url/Makefile
dlls/urlmon/Makefile
dlls/urlmon/tests/Makefile
dlls/user/Makefile
dlls/user/tests/Makefile
dlls/version/Makefile

View File

@ -6,6 +6,7 @@
*/
#define WINVER 0x0501
#define _WIN32_IE 0x0501
#define _WIN32_WINNT 0x0501
#define WINE_NOWINSOCK

View File

@ -6,6 +6,7 @@
*/
#define WINVER 0x0501
#define _WIN32_IE 0x0501
#define _WIN32_WINNT 0x0501
#define WINE_NOWINSOCK

View File

@ -6,6 +6,7 @@
*/
#define WINVER 0x0501
#define _WIN32_IE 0x0501
#define _WIN32_WINNT 0x0501
#define WINE_NOWINSOCK

View File

@ -1,4 +1,5 @@
Makefile
generated.ok
shell32_test.exe.spec.c
shlfileop.ok
testlist.c

View File

@ -6,6 +6,7 @@ TESTDLL = shell32.dll
IMPORTS = shell32
CTESTS = \
generated.c \
shlfileop.c
@MAKE_TEST_RULES@

View File

@ -0,0 +1,512 @@
/* File generated automatically from tools/winapi/test.dat; do not edit! */
/* This file can be copied, modified and distributed without restriction. */
/*
* Unit tests for data structure packing
*/
#define WINVER 0x0501
#define _WIN32_IE 0x0501
#define _WIN32_WINNT 0x0501
#define WINE_NOWINSOCK
#include <stdarg.h>
#include "windef.h"
#include "wtypes.h"
#include "shellapi.h"
#include "shlobj.h"
#include "wine/test.h"
/***********************************************************************
* Compability macros
*/
#define DWORD_PTR UINT_PTR
#define LONG_PTR INT_PTR
#define ULONG_PTR UINT_PTR
/***********************************************************************
* Windows API extension
*/
#if (_MSC_VER >= 1300) && defined(__cplusplus)
# define FIELD_ALIGNMENT(type, field) __alignof(((type*)0)->field)
#elif defined(__GNUC__)
# define FIELD_ALIGNMENT(type, field) __alignof__(((type*)0)->field)
#else
/* FIXME: Not sure if is possible to do without compiler extension */
#endif
#if (_MSC_VER >= 1300) && defined(__cplusplus)
# define _TYPE_ALIGNMENT(type) __alignof(type)
#elif defined(__GNUC__)
# define _TYPE_ALIGNMENT(type) __alignof__(type)
#else
/*
* FIXME: Not sure if is possible to do without compiler extension
* (if type is not just a name that is, if so the normal)
* TYPE_ALIGNMENT can be used)
*/
#endif
#if !defined(TYPE_ALIGNMENT) && defined(_TYPE_ALIGNMENT)
# define TYPE_ALIGNMENT _TYPE_ALIGNMENT
#endif
/***********************************************************************
* Test helper macros
*/
#ifdef FIELD_ALIGNMENT
# define TEST_FIELD_ALIGNMENT(type, field, align) \
ok(FIELD_ALIGNMENT(type, field) == align, \
"FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")", \
FIELD_ALIGNMENT(type, field))
#else
# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)
#endif
#define TEST_FIELD_OFFSET(type, field, offset) \
ok(FIELD_OFFSET(type, field) == offset, \
"FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")", \
FIELD_OFFSET(type, field))
#ifdef _TYPE_ALIGNMENT
#define TEST__TYPE_ALIGNMENT(type, align) \
ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")", _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 ")", 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 ")", sizeof(type))
/***********************************************************************
* Test macros
*/
#define TEST_FIELD(type, field_type, field_name, field_offset, field_size, field_align) \
TEST_TYPE_SIZE(field_type, field_size); \
TEST_FIELD_ALIGNMENT(type, field_name, field_align); \
TEST_FIELD_OFFSET(type, field_name, field_offset); \
#define TEST_TYPE(type, size, align) \
TEST_TYPE_ALIGNMENT(type, align); \
TEST_TYPE_SIZE(type, size)
#define TEST_TYPE_POINTER(type, size, align) \
TEST__TYPE_ALIGNMENT(*(type)0, align); \
TEST_TYPE_SIZE(*(type)0, size)
#define TEST_TYPE_SIGNED(type) \
ok((type) -1 < 0, "(" #type ") -1 < 0");
#define TEST_TYPE_UNSIGNED(type) \
ok((type) -1 > 0, "(" #type ") -1 > 0");
static void test_pack_APPBARDATA(void)
{
/* APPBARDATA (pack 1) */
TEST_TYPE(APPBARDATA, 36, 1);
TEST_FIELD(APPBARDATA, DWORD, cbSize, 0, 4, 1);
TEST_FIELD(APPBARDATA, HWND, hWnd, 4, 4, 1);
TEST_FIELD(APPBARDATA, UINT, uCallbackMessage, 8, 4, 1);
TEST_FIELD(APPBARDATA, UINT, uEdge, 12, 4, 1);
TEST_FIELD(APPBARDATA, RECT, rc, 16, 16, 1);
TEST_FIELD(APPBARDATA, LPARAM, lParam, 32, 4, 1);
}
static void test_pack_DRAGINFOA(void)
{
/* DRAGINFOA (pack 1) */
TEST_FIELD(DRAGINFOA, UINT, uSize, 0, 4, 1);
TEST_FIELD(DRAGINFOA, POINT, pt, 4, 8, 1);
TEST_FIELD(DRAGINFOA, BOOL, fNC, 12, 4, 1);
}
static void test_pack_DRAGINFOW(void)
{
/* DRAGINFOW (pack 1) */
TEST_TYPE(DRAGINFOW, 24, 1);
TEST_FIELD(DRAGINFOW, UINT, uSize, 0, 4, 1);
TEST_FIELD(DRAGINFOW, POINT, pt, 4, 8, 1);
TEST_FIELD(DRAGINFOW, BOOL, fNC, 12, 4, 1);
TEST_FIELD(DRAGINFOW, LPWSTR, lpFileList, 16, 4, 1);
TEST_FIELD(DRAGINFOW, DWORD, grfKeyState, 20, 4, 1);
}
static void test_pack_FILEOP_FLAGS(void)
{
/* FILEOP_FLAGS */
TEST_TYPE(FILEOP_FLAGS, 2, 2);
}
static void test_pack_LPDRAGINFOA(void)
{
/* LPDRAGINFOA */
TEST_TYPE(LPDRAGINFOA, 4, 4);
}
static void test_pack_LPDRAGINFOW(void)
{
/* LPDRAGINFOW */
TEST_TYPE(LPDRAGINFOW, 4, 4);
TEST_TYPE_POINTER(LPDRAGINFOW, 24, 1);
}
static void test_pack_LPSHFILEOPSTRUCTA(void)
{
/* LPSHFILEOPSTRUCTA */
TEST_TYPE(LPSHFILEOPSTRUCTA, 4, 4);
TEST_TYPE_POINTER(LPSHFILEOPSTRUCTA, 30, 1);
}
static void test_pack_LPSHFILEOPSTRUCTW(void)
{
/* LPSHFILEOPSTRUCTW */
TEST_TYPE(LPSHFILEOPSTRUCTW, 4, 4);
TEST_TYPE_POINTER(LPSHFILEOPSTRUCTW, 30, 1);
}
static void test_pack_NOTIFYICONDATAA(void)
{
/* NOTIFYICONDATAA (pack 1) */
TEST_TYPE(NOTIFYICONDATAA, 88, 1);
TEST_FIELD(NOTIFYICONDATAA, DWORD, cbSize, 0, 4, 1);
TEST_FIELD(NOTIFYICONDATAA, HWND, hWnd, 4, 4, 1);
TEST_FIELD(NOTIFYICONDATAA, UINT, uID, 8, 4, 1);
TEST_FIELD(NOTIFYICONDATAA, UINT, uFlags, 12, 4, 1);
TEST_FIELD(NOTIFYICONDATAA, UINT, uCallbackMessage, 16, 4, 1);
TEST_FIELD(NOTIFYICONDATAA, HICON, hIcon, 20, 4, 1);
TEST_FIELD(NOTIFYICONDATAA, CHAR[64], szTip, 24, 64, 1);
}
static void test_pack_NOTIFYICONDATAW(void)
{
/* NOTIFYICONDATAW (pack 1) */
TEST_TYPE(NOTIFYICONDATAW, 152, 1);
TEST_FIELD(NOTIFYICONDATAW, DWORD, cbSize, 0, 4, 1);
TEST_FIELD(NOTIFYICONDATAW, HWND, hWnd, 4, 4, 1);
TEST_FIELD(NOTIFYICONDATAW, UINT, uID, 8, 4, 1);
TEST_FIELD(NOTIFYICONDATAW, UINT, uFlags, 12, 4, 1);
TEST_FIELD(NOTIFYICONDATAW, UINT, uCallbackMessage, 16, 4, 1);
TEST_FIELD(NOTIFYICONDATAW, HICON, hIcon, 20, 4, 1);
TEST_FIELD(NOTIFYICONDATAW, WCHAR[64], szTip, 24, 128, 1);
}
static void test_pack_PAPPBARDATA(void)
{
/* PAPPBARDATA */
TEST_TYPE(PAPPBARDATA, 4, 4);
TEST_TYPE_POINTER(PAPPBARDATA, 36, 1);
}
static void test_pack_PNOTIFYICONDATAA(void)
{
/* PNOTIFYICONDATAA */
TEST_TYPE(PNOTIFYICONDATAA, 4, 4);
TEST_TYPE_POINTER(PNOTIFYICONDATAA, 88, 1);
}
static void test_pack_PNOTIFYICONDATAW(void)
{
/* PNOTIFYICONDATAW */
TEST_TYPE(PNOTIFYICONDATAW, 4, 4);
TEST_TYPE_POINTER(PNOTIFYICONDATAW, 152, 1);
}
static void test_pack_PRINTEROP_FLAGS(void)
{
/* PRINTEROP_FLAGS */
TEST_TYPE(PRINTEROP_FLAGS, 2, 2);
}
static void test_pack_SHFILEINFOA(void)
{
/* SHFILEINFOA (pack 1) */
TEST_TYPE(SHFILEINFOA, 352, 1);
TEST_FIELD(SHFILEINFOA, HICON, hIcon, 0, 4, 1);
TEST_FIELD(SHFILEINFOA, int, iIcon, 4, 4, 1);
TEST_FIELD(SHFILEINFOA, DWORD, dwAttributes, 8, 4, 1);
TEST_FIELD(SHFILEINFOA, CHAR[MAX_PATH], szDisplayName, 12, 260, 1);
TEST_FIELD(SHFILEINFOA, CHAR[80], szTypeName, 272, 80, 1);
}
static void test_pack_SHFILEINFOW(void)
{
/* SHFILEINFOW (pack 1) */
TEST_TYPE(SHFILEINFOW, 692, 1);
TEST_FIELD(SHFILEINFOW, HICON, hIcon, 0, 4, 1);
TEST_FIELD(SHFILEINFOW, int, iIcon, 4, 4, 1);
TEST_FIELD(SHFILEINFOW, DWORD, dwAttributes, 8, 4, 1);
TEST_FIELD(SHFILEINFOW, WCHAR[MAX_PATH], szDisplayName, 12, 520, 1);
TEST_FIELD(SHFILEINFOW, WCHAR[80], szTypeName, 532, 160, 1);
}
static void test_pack_SHFILEOPSTRUCTA(void)
{
/* SHFILEOPSTRUCTA (pack 1) */
TEST_TYPE(SHFILEOPSTRUCTA, 30, 1);
TEST_FIELD(SHFILEOPSTRUCTA, HWND, hwnd, 0, 4, 1);
TEST_FIELD(SHFILEOPSTRUCTA, UINT, wFunc, 4, 4, 1);
TEST_FIELD(SHFILEOPSTRUCTA, LPCSTR, pFrom, 8, 4, 1);
TEST_FIELD(SHFILEOPSTRUCTA, LPCSTR, pTo, 12, 4, 1);
TEST_FIELD(SHFILEOPSTRUCTA, FILEOP_FLAGS, fFlags, 16, 2, 1);
TEST_FIELD(SHFILEOPSTRUCTA, BOOL, fAnyOperationsAborted, 18, 4, 1);
TEST_FIELD(SHFILEOPSTRUCTA, LPVOID, hNameMappings, 22, 4, 1);
TEST_FIELD(SHFILEOPSTRUCTA, LPCSTR, lpszProgressTitle, 26, 4, 1);
}
static void test_pack_SHFILEOPSTRUCTW(void)
{
/* SHFILEOPSTRUCTW (pack 1) */
TEST_TYPE(SHFILEOPSTRUCTW, 30, 1);
TEST_FIELD(SHFILEOPSTRUCTW, HWND, hwnd, 0, 4, 1);
TEST_FIELD(SHFILEOPSTRUCTW, UINT, wFunc, 4, 4, 1);
TEST_FIELD(SHFILEOPSTRUCTW, LPCWSTR, pFrom, 8, 4, 1);
TEST_FIELD(SHFILEOPSTRUCTW, LPCWSTR, pTo, 12, 4, 1);
TEST_FIELD(SHFILEOPSTRUCTW, FILEOP_FLAGS, fFlags, 16, 2, 1);
TEST_FIELD(SHFILEOPSTRUCTW, BOOL, fAnyOperationsAborted, 18, 4, 1);
TEST_FIELD(SHFILEOPSTRUCTW, LPVOID, hNameMappings, 22, 4, 1);
TEST_FIELD(SHFILEOPSTRUCTW, LPCWSTR, lpszProgressTitle, 26, 4, 1);
}
static void test_pack_BFFCALLBACK(void)
{
/* BFFCALLBACK */
TEST_TYPE(BFFCALLBACK, 4, 4);
}
static void test_pack_BROWSEINFOA(void)
{
/* BROWSEINFOA (pack 1) */
TEST_FIELD(BROWSEINFOA, HWND, hwndOwner, 0, 4, 1);
TEST_FIELD(BROWSEINFOA, LPCITEMIDLIST, pidlRoot, 4, 4, 1);
}
static void test_pack_BROWSEINFOW(void)
{
/* BROWSEINFOW (pack 1) */
TEST_TYPE(BROWSEINFOW, 32, 1);
TEST_FIELD(BROWSEINFOW, HWND, hwndOwner, 0, 4, 1);
TEST_FIELD(BROWSEINFOW, LPCITEMIDLIST, pidlRoot, 4, 4, 1);
TEST_FIELD(BROWSEINFOW, LPWSTR, pszDisplayName, 8, 4, 1);
TEST_FIELD(BROWSEINFOW, LPCWSTR, lpszTitle, 12, 4, 1);
TEST_FIELD(BROWSEINFOW, UINT, ulFlags, 16, 4, 1);
TEST_FIELD(BROWSEINFOW, BFFCALLBACK, lpfn, 20, 4, 1);
TEST_FIELD(BROWSEINFOW, LPARAM, lParam, 24, 4, 1);
TEST_FIELD(BROWSEINFOW, INT, iImage, 28, 4, 1);
}
static void test_pack_CIDA(void)
{
/* CIDA (pack 1) */
TEST_TYPE(CIDA, 8, 1);
TEST_FIELD(CIDA, UINT, cidl, 0, 4, 1);
TEST_FIELD(CIDA, UINT[1], aoffset, 4, 4, 1);
}
static void test_pack_DROPFILES(void)
{
/* DROPFILES (pack 1) */
TEST_TYPE(DROPFILES, 20, 1);
TEST_FIELD(DROPFILES, DWORD, pFiles, 0, 4, 1);
TEST_FIELD(DROPFILES, POINT, pt, 4, 8, 1);
TEST_FIELD(DROPFILES, BOOL, fNC, 12, 4, 1);
TEST_FIELD(DROPFILES, BOOL, fWide, 16, 4, 1);
}
static void test_pack_IShellIcon(void)
{
/* IShellIcon */
}
static void test_pack_ITEMIDLIST(void)
{
/* ITEMIDLIST (pack 1) */
TEST_TYPE(ITEMIDLIST, 3, 1);
TEST_FIELD(ITEMIDLIST, SHITEMID, mkid, 0, 3, 1);
}
static void test_pack_LPBROWSEINFOA(void)
{
/* LPBROWSEINFOA */
TEST_TYPE(LPBROWSEINFOA, 4, 4);
}
static void test_pack_LPBROWSEINFOW(void)
{
/* LPBROWSEINFOW */
TEST_TYPE(LPBROWSEINFOW, 4, 4);
TEST_TYPE_POINTER(LPBROWSEINFOW, 32, 1);
}
static void test_pack_LPCITEMIDLIST(void)
{
/* LPCITEMIDLIST */
TEST_TYPE(LPCITEMIDLIST, 4, 4);
TEST_TYPE_POINTER(LPCITEMIDLIST, 3, 1);
}
static void test_pack_LPIDA(void)
{
/* LPIDA */
TEST_TYPE(LPIDA, 4, 4);
TEST_TYPE_POINTER(LPIDA, 8, 1);
}
static void test_pack_LPITEMIDLIST(void)
{
/* LPITEMIDLIST */
TEST_TYPE(LPITEMIDLIST, 4, 4);
TEST_TYPE_POINTER(LPITEMIDLIST, 3, 1);
}
static void test_pack_LPSHDESCRIPTIONID(void)
{
/* LPSHDESCRIPTIONID */
TEST_TYPE(LPSHDESCRIPTIONID, 4, 4);
}
static void test_pack_LPSHELLEXECUTEINFOA(void)
{
/* LPSHELLEXECUTEINFOA */
TEST_TYPE(LPSHELLEXECUTEINFOA, 4, 4);
}
static void test_pack_LPSHELLEXECUTEINFOW(void)
{
/* LPSHELLEXECUTEINFOW */
TEST_TYPE(LPSHELLEXECUTEINFOW, 4, 4);
}
static void test_pack_LPSHITEMID(void)
{
/* LPSHITEMID */
TEST_TYPE(LPSHITEMID, 4, 4);
TEST_TYPE_POINTER(LPSHITEMID, 3, 1);
}
static void test_pack_PBROWSEINFOA(void)
{
/* PBROWSEINFOA */
TEST_TYPE(PBROWSEINFOA, 4, 4);
}
static void test_pack_PBROWSEINFOW(void)
{
/* PBROWSEINFOW */
TEST_TYPE(PBROWSEINFOW, 4, 4);
TEST_TYPE_POINTER(PBROWSEINFOW, 32, 1);
}
static void test_pack_SHDESCRIPTIONID(void)
{
/* SHDESCRIPTIONID (pack 1) */
TEST_FIELD(SHDESCRIPTIONID, DWORD, dwDescriptionId, 0, 4, 1);
}
static void test_pack_SHELLEXECUTEINFOA(void)
{
/* SHELLEXECUTEINFOA (pack 1) */
TEST_FIELD(SHELLEXECUTEINFOA, DWORD, cbSize, 0, 4, 1);
TEST_FIELD(SHELLEXECUTEINFOA, ULONG, fMask, 4, 4, 1);
TEST_FIELD(SHELLEXECUTEINFOA, HWND, hwnd, 8, 4, 1);
TEST_FIELD(SHELLEXECUTEINFOA, LPCSTR, lpVerb, 12, 4, 1);
TEST_FIELD(SHELLEXECUTEINFOA, LPCSTR, lpFile, 16, 4, 1);
TEST_FIELD(SHELLEXECUTEINFOA, LPCSTR, lpParameters, 20, 4, 1);
TEST_FIELD(SHELLEXECUTEINFOA, LPCSTR, lpDirectory, 24, 4, 1);
TEST_FIELD(SHELLEXECUTEINFOA, INT, nShow, 28, 4, 1);
TEST_FIELD(SHELLEXECUTEINFOA, HINSTANCE, hInstApp, 32, 4, 1);
TEST_FIELD(SHELLEXECUTEINFOA, LPVOID, lpIDList, 36, 4, 1);
TEST_FIELD(SHELLEXECUTEINFOA, LPCSTR, lpClass, 40, 4, 1);
}
static void test_pack_SHELLEXECUTEINFOW(void)
{
/* SHELLEXECUTEINFOW (pack 1) */
TEST_FIELD(SHELLEXECUTEINFOW, DWORD, cbSize, 0, 4, 1);
TEST_FIELD(SHELLEXECUTEINFOW, ULONG, fMask, 4, 4, 1);
TEST_FIELD(SHELLEXECUTEINFOW, HWND, hwnd, 8, 4, 1);
TEST_FIELD(SHELLEXECUTEINFOW, LPCWSTR, lpVerb, 12, 4, 1);
TEST_FIELD(SHELLEXECUTEINFOW, LPCWSTR, lpFile, 16, 4, 1);
TEST_FIELD(SHELLEXECUTEINFOW, LPCWSTR, lpParameters, 20, 4, 1);
TEST_FIELD(SHELLEXECUTEINFOW, LPCWSTR, lpDirectory, 24, 4, 1);
TEST_FIELD(SHELLEXECUTEINFOW, INT, nShow, 28, 4, 1);
TEST_FIELD(SHELLEXECUTEINFOW, HINSTANCE, hInstApp, 32, 4, 1);
TEST_FIELD(SHELLEXECUTEINFOW, LPVOID, lpIDList, 36, 4, 1);
TEST_FIELD(SHELLEXECUTEINFOW, LPCWSTR, lpClass, 40, 4, 1);
}
static void test_pack_SHELLVIEWID(void)
{
/* SHELLVIEWID */
}
static void test_pack_SHITEMID(void)
{
/* SHITEMID (pack 1) */
TEST_TYPE(SHITEMID, 3, 1);
TEST_FIELD(SHITEMID, WORD, cb, 0, 2, 1);
TEST_FIELD(SHITEMID, BYTE[1], abID, 2, 1, 1);
}
static void test_pack(void)
{
test_pack_APPBARDATA();
test_pack_BFFCALLBACK();
test_pack_BROWSEINFOA();
test_pack_BROWSEINFOW();
test_pack_CIDA();
test_pack_DRAGINFOA();
test_pack_DRAGINFOW();
test_pack_DROPFILES();
test_pack_FILEOP_FLAGS();
test_pack_IShellIcon();
test_pack_ITEMIDLIST();
test_pack_LPBROWSEINFOA();
test_pack_LPBROWSEINFOW();
test_pack_LPCITEMIDLIST();
test_pack_LPDRAGINFOA();
test_pack_LPDRAGINFOW();
test_pack_LPIDA();
test_pack_LPITEMIDLIST();
test_pack_LPSHDESCRIPTIONID();
test_pack_LPSHELLEXECUTEINFOA();
test_pack_LPSHELLEXECUTEINFOW();
test_pack_LPSHFILEOPSTRUCTA();
test_pack_LPSHFILEOPSTRUCTW();
test_pack_LPSHITEMID();
test_pack_NOTIFYICONDATAA();
test_pack_NOTIFYICONDATAW();
test_pack_PAPPBARDATA();
test_pack_PBROWSEINFOA();
test_pack_PBROWSEINFOW();
test_pack_PNOTIFYICONDATAA();
test_pack_PNOTIFYICONDATAW();
test_pack_PRINTEROP_FLAGS();
test_pack_SHDESCRIPTIONID();
test_pack_SHELLEXECUTEINFOA();
test_pack_SHELLEXECUTEINFOW();
test_pack_SHELLVIEWID();
test_pack_SHFILEINFOA();
test_pack_SHFILEINFOW();
test_pack_SHFILEOPSTRUCTA();
test_pack_SHFILEOPSTRUCTW();
test_pack_SHITEMID();
}
START_TEST(generated)
{
test_pack();
}

View File

@ -1,5 +1,6 @@
Makefile
clist.ok
generated.ok
shlwapi_test.exe.spec.c
shreg.ok
testlist.c

View File

@ -7,6 +7,7 @@ IMPORTS = shlwapi advapi32
CTESTS = \
clist.c \
generated.c \
shreg.c
@MAKE_TEST_RULES@

View File

@ -0,0 +1,161 @@
/* File generated automatically from tools/winapi/test.dat; do not edit! */
/* This file can be copied, modified and distributed without restriction. */
/*
* Unit tests for data structure packing
*/
#define WINVER 0x0501
#define _WIN32_IE 0x0501
#define _WIN32_WINNT 0x0501
#define WINE_NOWINSOCK
#include "windef.h"
#include "wtypes.h"
#include "shlwapi.h"
#include "wine/test.h"
/***********************************************************************
* Compability macros
*/
#define DWORD_PTR UINT_PTR
#define LONG_PTR INT_PTR
#define ULONG_PTR UINT_PTR
/***********************************************************************
* Windows API extension
*/
#if (_MSC_VER >= 1300) && defined(__cplusplus)
# define FIELD_ALIGNMENT(type, field) __alignof(((type*)0)->field)
#elif defined(__GNUC__)
# define FIELD_ALIGNMENT(type, field) __alignof__(((type*)0)->field)
#else
/* FIXME: Not sure if is possible to do without compiler extension */
#endif
#if (_MSC_VER >= 1300) && defined(__cplusplus)
# define _TYPE_ALIGNMENT(type) __alignof(type)
#elif defined(__GNUC__)
# define _TYPE_ALIGNMENT(type) __alignof__(type)
#else
/*
* FIXME: Not sure if is possible to do without compiler extension
* (if type is not just a name that is, if so the normal)
* TYPE_ALIGNMENT can be used)
*/
#endif
#if !defined(TYPE_ALIGNMENT) && defined(_TYPE_ALIGNMENT)
# define TYPE_ALIGNMENT _TYPE_ALIGNMENT
#endif
/***********************************************************************
* Test helper macros
*/
#ifdef FIELD_ALIGNMENT
# define TEST_FIELD_ALIGNMENT(type, field, align) \
ok(FIELD_ALIGNMENT(type, field) == align, \
"FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")", \
FIELD_ALIGNMENT(type, field))
#else
# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)
#endif
#define TEST_FIELD_OFFSET(type, field, offset) \
ok(FIELD_OFFSET(type, field) == offset, \
"FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")", \
FIELD_OFFSET(type, field))
#ifdef _TYPE_ALIGNMENT
#define TEST__TYPE_ALIGNMENT(type, align) \
ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")", _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 ")", 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 ")", sizeof(type))
/***********************************************************************
* Test macros
*/
#define TEST_FIELD(type, field_type, field_name, field_offset, field_size, field_align) \
TEST_TYPE_SIZE(field_type, field_size); \
TEST_FIELD_ALIGNMENT(type, field_name, field_align); \
TEST_FIELD_OFFSET(type, field_name, field_offset); \
#define TEST_TYPE(type, size, align) \
TEST_TYPE_ALIGNMENT(type, align); \
TEST_TYPE_SIZE(type, size)
#define TEST_TYPE_POINTER(type, size, align) \
TEST__TYPE_ALIGNMENT(*(type)0, align); \
TEST_TYPE_SIZE(*(type)0, size)
#define TEST_TYPE_SIGNED(type) \
ok((type) -1 < 0, "(" #type ") -1 < 0");
#define TEST_TYPE_UNSIGNED(type) \
ok((type) -1 > 0, "(" #type ") -1 > 0");
static void test_pack_DLLGETVERSIONPROC(void)
{
/* DLLGETVERSIONPROC */
TEST_TYPE(DLLGETVERSIONPROC, 4, 4);
}
static void test_pack_DLLVERSIONINFO(void)
{
/* DLLVERSIONINFO (pack 1) */
TEST_TYPE(DLLVERSIONINFO, 20, 1);
TEST_FIELD(DLLVERSIONINFO, DWORD, cbSize, 0, 4, 1);
TEST_FIELD(DLLVERSIONINFO, DWORD, dwMajorVersion, 4, 4, 1);
TEST_FIELD(DLLVERSIONINFO, DWORD, dwMinorVersion, 8, 4, 1);
TEST_FIELD(DLLVERSIONINFO, DWORD, dwBuildNumber, 12, 4, 1);
TEST_FIELD(DLLVERSIONINFO, DWORD, dwPlatformID, 16, 4, 1);
}
static void test_pack_HUSKEY(void)
{
/* HUSKEY */
TEST_TYPE(HUSKEY, 4, 4);
}
static void test_pack_IQueryAssociations(void)
{
/* IQueryAssociations */
}
static void test_pack_PHUSKEY(void)
{
/* PHUSKEY */
TEST_TYPE(PHUSKEY, 4, 4);
TEST_TYPE_POINTER(PHUSKEY, 4, 4);
}
static void test_pack(void)
{
test_pack_DLLGETVERSIONPROC();
test_pack_DLLVERSIONINFO();
test_pack_HUSKEY();
test_pack_IQueryAssociations();
test_pack_PHUSKEY();
}
START_TEST(generated)
{
test_pack();
}

View File

@ -13,6 +13,8 @@ C_SRCS = \
umon.c \
urlmon_main.c
SUBDIRS = tests
@MAKE_DLL_RULES@
### Dependencies:

View File

@ -0,0 +1,4 @@
Makefile
generated.ok
testlist.c
urlmon_test.exe.spec.c

View File

@ -0,0 +1,13 @@
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../../..
SRCDIR = @srcdir@
VPATH = @srcdir@
TESTDLL = urlmon.dll
IMPORTS = urlmon
CTESTS = \
generated.c
@MAKE_TEST_RULES@
### Dependencies:

View File

@ -0,0 +1,158 @@
/* File generated automatically from tools/winapi/test.dat; do not edit! */
/* This file can be copied, modified and distributed without restriction. */
/*
* Unit tests for data structure packing
*/
#define WINVER 0x0501
#define _WIN32_IE 0x0501
#define _WIN32_WINNT 0x0501
#define WINE_NOWINSOCK
#include "windef.h"
#include "urlmon.h"
#include "wine/test.h"
/***********************************************************************
* Compability macros
*/
#define DWORD_PTR UINT_PTR
#define LONG_PTR INT_PTR
#define ULONG_PTR UINT_PTR
/***********************************************************************
* Windows API extension
*/
#if (_MSC_VER >= 1300) && defined(__cplusplus)
# define FIELD_ALIGNMENT(type, field) __alignof(((type*)0)->field)
#elif defined(__GNUC__)
# define FIELD_ALIGNMENT(type, field) __alignof__(((type*)0)->field)
#else
/* FIXME: Not sure if is possible to do without compiler extension */
#endif
#if (_MSC_VER >= 1300) && defined(__cplusplus)
# define _TYPE_ALIGNMENT(type) __alignof(type)
#elif defined(__GNUC__)
# define _TYPE_ALIGNMENT(type) __alignof__(type)
#else
/*
* FIXME: Not sure if is possible to do without compiler extension
* (if type is not just a name that is, if so the normal)
* TYPE_ALIGNMENT can be used)
*/
#endif
#if !defined(TYPE_ALIGNMENT) && defined(_TYPE_ALIGNMENT)
# define TYPE_ALIGNMENT _TYPE_ALIGNMENT
#endif
/***********************************************************************
* Test helper macros
*/
#ifdef FIELD_ALIGNMENT
# define TEST_FIELD_ALIGNMENT(type, field, align) \
ok(FIELD_ALIGNMENT(type, field) == align, \
"FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")", \
FIELD_ALIGNMENT(type, field))
#else
# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)
#endif
#define TEST_FIELD_OFFSET(type, field, offset) \
ok(FIELD_OFFSET(type, field) == offset, \
"FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")", \
FIELD_OFFSET(type, field))
#ifdef _TYPE_ALIGNMENT
#define TEST__TYPE_ALIGNMENT(type, align) \
ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")", _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 ")", 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 ")", sizeof(type))
/***********************************************************************
* Test macros
*/
#define TEST_FIELD(type, field_type, field_name, field_offset, field_size, field_align) \
TEST_TYPE_SIZE(field_type, field_size); \
TEST_FIELD_ALIGNMENT(type, field_name, field_align); \
TEST_FIELD_OFFSET(type, field_name, field_offset); \
#define TEST_TYPE(type, size, align) \
TEST_TYPE_ALIGNMENT(type, align); \
TEST_TYPE_SIZE(type, size)
#define TEST_TYPE_POINTER(type, size, align) \
TEST__TYPE_ALIGNMENT(*(type)0, align); \
TEST_TYPE_SIZE(*(type)0, size)
#define TEST_TYPE_SIGNED(type) \
ok((type) -1 < 0, "(" #type ") -1 < 0");
#define TEST_TYPE_UNSIGNED(type) \
ok((type) -1 > 0, "(" #type ") -1 > 0");
static void test_pack_BINDINFO(void)
{
/* BINDINFO (pack 4) */
TEST_FIELD(BINDINFO, ULONG, cbSize, 0, 4, 4);
TEST_FIELD(BINDINFO, LPWSTR, szExtraInfo, 4, 4, 4);
}
static void test_pack_IBindHost(void)
{
/* IBindHost */
}
static void test_pack_IBindStatusCallback(void)
{
/* IBindStatusCallback */
}
static void test_pack_IBinding(void)
{
/* IBinding */
}
static void test_pack_IWinInetHttpInfo(void)
{
/* IWinInetHttpInfo */
}
static void test_pack_IWinInetInfo(void)
{
/* IWinInetInfo */
}
static void test_pack(void)
{
test_pack_BINDINFO();
test_pack_IBindHost();
test_pack_IBindStatusCallback();
test_pack_IBinding();
test_pack_IWinInetHttpInfo();
test_pack_IWinInetInfo();
}
START_TEST(generated)
{
test_pack();
}

View File

@ -6,6 +6,7 @@
*/
#define WINVER 0x0501
#define _WIN32_IE 0x0501
#define _WIN32_WINNT 0x0501
#define WINE_NOWINSOCK

View File

@ -1,4 +1,5 @@
Makefile
generated.ok
http.ok
testlist.c
wininet_test.exe.spec.c

View File

@ -6,6 +6,7 @@ TESTDLL = wininet.dll
IMPORTS = wininet
CTESTS = \
generated.c \
http.c
@MAKE_TEST_RULES@

View File

@ -0,0 +1,540 @@
/* File generated automatically from tools/winapi/test.dat; do not edit! */
/* This file can be copied, modified and distributed without restriction. */
/*
* Unit tests for data structure packing
*/
#define WINVER 0x0501
#define _WIN32_IE 0x0501
#define _WIN32_WINNT 0x0501
#define WINE_NOWINSOCK
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "wininet.h"
#include "wine/test.h"
/***********************************************************************
* Compability macros
*/
#define DWORD_PTR UINT_PTR
#define LONG_PTR INT_PTR
#define ULONG_PTR UINT_PTR
/***********************************************************************
* Windows API extension
*/
#if (_MSC_VER >= 1300) && defined(__cplusplus)
# define FIELD_ALIGNMENT(type, field) __alignof(((type*)0)->field)
#elif defined(__GNUC__)
# define FIELD_ALIGNMENT(type, field) __alignof__(((type*)0)->field)
#else
/* FIXME: Not sure if is possible to do without compiler extension */
#endif
#if (_MSC_VER >= 1300) && defined(__cplusplus)
# define _TYPE_ALIGNMENT(type) __alignof(type)
#elif defined(__GNUC__)
# define _TYPE_ALIGNMENT(type) __alignof__(type)
#else
/*
* FIXME: Not sure if is possible to do without compiler extension
* (if type is not just a name that is, if so the normal)
* TYPE_ALIGNMENT can be used)
*/
#endif
#if !defined(TYPE_ALIGNMENT) && defined(_TYPE_ALIGNMENT)
# define TYPE_ALIGNMENT _TYPE_ALIGNMENT
#endif
/***********************************************************************
* Test helper macros
*/
#ifdef FIELD_ALIGNMENT
# define TEST_FIELD_ALIGNMENT(type, field, align) \
ok(FIELD_ALIGNMENT(type, field) == align, \
"FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")", \
FIELD_ALIGNMENT(type, field))
#else
# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)
#endif
#define TEST_FIELD_OFFSET(type, field, offset) \
ok(FIELD_OFFSET(type, field) == offset, \
"FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")", \
FIELD_OFFSET(type, field))
#ifdef _TYPE_ALIGNMENT
#define TEST__TYPE_ALIGNMENT(type, align) \
ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")", _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 ")", 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 ")", sizeof(type))
/***********************************************************************
* Test macros
*/
#define TEST_FIELD(type, field_type, field_name, field_offset, field_size, field_align) \
TEST_TYPE_SIZE(field_type, field_size); \
TEST_FIELD_ALIGNMENT(type, field_name, field_align); \
TEST_FIELD_OFFSET(type, field_name, field_offset); \
#define TEST_TYPE(type, size, align) \
TEST_TYPE_ALIGNMENT(type, align); \
TEST_TYPE_SIZE(type, size)
#define TEST_TYPE_POINTER(type, size, align) \
TEST__TYPE_ALIGNMENT(*(type)0, align); \
TEST_TYPE_SIZE(*(type)0, size)
#define TEST_TYPE_SIGNED(type) \
ok((type) -1 < 0, "(" #type ") -1 < 0");
#define TEST_TYPE_UNSIGNED(type) \
ok((type) -1 > 0, "(" #type ") -1 > 0");
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, CHAR[MAX_GOPHER_DISPLAY_TEXT + 1], DisplayString, 0, 129, 1);
TEST_FIELD(GOPHER_FIND_DATAA, DWORD, GopherType, 132, 4, 4);
TEST_FIELD(GOPHER_FIND_DATAA, DWORD, SizeLow, 136, 4, 4);
TEST_FIELD(GOPHER_FIND_DATAA, DWORD, SizeHigh, 140, 4, 4);
TEST_FIELD(GOPHER_FIND_DATAA, FILETIME, LastModificationTime, 144, 8, 4);
TEST_FIELD(GOPHER_FIND_DATAA, CHAR[MAX_GOPHER_LOCATOR_LENGTH + 1], Locator, 152, 654, 1);
}
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, WCHAR[MAX_GOPHER_DISPLAY_TEXT + 1], DisplayString, 0, 258, 2);
TEST_FIELD(GOPHER_FIND_DATAW, DWORD, GopherType, 260, 4, 4);
TEST_FIELD(GOPHER_FIND_DATAW, DWORD, SizeLow, 264, 4, 4);
TEST_FIELD(GOPHER_FIND_DATAW, DWORD, SizeHigh, 268, 4, 4);
TEST_FIELD(GOPHER_FIND_DATAW, FILETIME, LastModificationTime, 272, 8, 4);
TEST_FIELD(GOPHER_FIND_DATAW, WCHAR[MAX_GOPHER_LOCATOR_LENGTH + 1], Locator, 280, 1308, 2);
}
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, INT, DegreesNorth, 0, 4, 4);
TEST_FIELD(GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE, INT, MinutesNorth, 4, 4, 4);
TEST_FIELD(GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE, INT, SecondsNorth, 8, 4, 4);
TEST_FIELD(GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE, INT, DegreesEast, 12, 4, 4);
TEST_FIELD(GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE, INT, MinutesEast, 16, 4, 4);
TEST_FIELD(GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE, INT, SecondsEast, 20, 4, 4);
}
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, FILETIME, DateAndTime, 0, 8, 4);
}
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, INT, Score, 0, 4, 4);
}
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, INT, LowerBound, 0, 4, 4);
TEST_FIELD(GOPHER_SCORE_RANGE_ATTRIBUTE_TYPE, INT, UpperBound, 4, 4, 4);
}
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, INT, Zone, 0, 4, 4);
}
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, DWORD, Ttl, 0, 4, 4);
}
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, BOOL, TreeWalk, 0, 4, 4);
}
static void test_pack_HINTERNET(void)
{
/* HINTERNET */
TEST_TYPE(HINTERNET, 4, 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, DWORD, dwMajorVersion, 0, 4, 4);
TEST_FIELD(HTTP_VERSION_INFO, DWORD, dwMinorVersion, 4, 4, 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, DWORD, dwResult, 0, 4, 4);
TEST_FIELD(INTERNET_ASYNC_RESULT, DWORD, dwError, 4, 4, 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, DWORD, cbStruct, 0, 4, 4);
TEST_FIELD(INTERNET_AUTH_NOTIFY_DATA, DWORD, dwOptions, 4, 4, 4);
TEST_FIELD(INTERNET_AUTH_NOTIFY_DATA, PFN_AUTH_NOTIFY, pfnNotify, 8, 4, 4);
TEST_FIELD(INTERNET_AUTH_NOTIFY_DATA, DWORD, dwContext, 12, 4, 4);
}
static void test_pack_INTERNET_BUFFERSA(void)
{
/* INTERNET_BUFFERSA (pack 4) */
TEST_TYPE(INTERNET_BUFFERSA, 40, 4);
TEST_FIELD(INTERNET_BUFFERSA, DWORD, dwStructSize, 0, 4, 4);
TEST_FIELD(INTERNET_BUFFERSA, struct _INTERNET_BUFFERSA *, Next, 4, 4, 4);
TEST_FIELD(INTERNET_BUFFERSA, LPCSTR, lpcszHeader, 8, 4, 4);
TEST_FIELD(INTERNET_BUFFERSA, DWORD, dwHeadersLength, 12, 4, 4);
TEST_FIELD(INTERNET_BUFFERSA, DWORD, dwHeadersTotal, 16, 4, 4);
TEST_FIELD(INTERNET_BUFFERSA, LPVOID, lpvBuffer, 20, 4, 4);
TEST_FIELD(INTERNET_BUFFERSA, DWORD, dwBufferLength, 24, 4, 4);
TEST_FIELD(INTERNET_BUFFERSA, DWORD, dwBufferTotal, 28, 4, 4);
TEST_FIELD(INTERNET_BUFFERSA, DWORD, dwOffsetLow, 32, 4, 4);
TEST_FIELD(INTERNET_BUFFERSA, DWORD, dwOffsetHigh, 36, 4, 4);
}
static void test_pack_INTERNET_BUFFERSW(void)
{
/* INTERNET_BUFFERSW (pack 4) */
TEST_TYPE(INTERNET_BUFFERSW, 40, 4);
TEST_FIELD(INTERNET_BUFFERSW, DWORD, dwStructSize, 0, 4, 4);
TEST_FIELD(INTERNET_BUFFERSW, struct _INTERNET_BUFFERSW *, Next, 4, 4, 4);
TEST_FIELD(INTERNET_BUFFERSW, LPCWSTR, lpcszHeader, 8, 4, 4);
TEST_FIELD(INTERNET_BUFFERSW, DWORD, dwHeadersLength, 12, 4, 4);
TEST_FIELD(INTERNET_BUFFERSW, DWORD, dwHeadersTotal, 16, 4, 4);
TEST_FIELD(INTERNET_BUFFERSW, LPVOID, lpvBuffer, 20, 4, 4);
TEST_FIELD(INTERNET_BUFFERSW, DWORD, dwBufferLength, 24, 4, 4);
TEST_FIELD(INTERNET_BUFFERSW, DWORD, dwBufferTotal, 28, 4, 4);
TEST_FIELD(INTERNET_BUFFERSW, DWORD, dwOffsetLow, 32, 4, 4);
TEST_FIELD(INTERNET_BUFFERSW, DWORD, dwOffsetHigh, 36, 4, 4);
}
static void test_pack_INTERNET_CACHE_ENTRY_INFOA(void)
{
/* INTERNET_CACHE_ENTRY_INFOA (pack 4) */
TEST_FIELD(INTERNET_CACHE_ENTRY_INFOA, DWORD, dwStructSize, 0, 4, 4);
}
static void test_pack_INTERNET_CACHE_ENTRY_INFOW(void)
{
/* INTERNET_CACHE_ENTRY_INFOW (pack 4) */
TEST_FIELD(INTERNET_CACHE_ENTRY_INFOW, DWORD, dwStructSize, 0, 4, 4);
TEST_FIELD(INTERNET_CACHE_ENTRY_INFOW, LPWSTR, lpszSourceUrlName, 4, 4, 4);
TEST_FIELD(INTERNET_CACHE_ENTRY_INFOW, LPWSTR, lpszLocalFileName, 8, 4, 4);
TEST_FIELD(INTERNET_CACHE_ENTRY_INFOW, DWORD, CacheEntryType, 12, 4, 4);
TEST_FIELD(INTERNET_CACHE_ENTRY_INFOW, DWORD, dwUseCount, 16, 4, 4);
TEST_FIELD(INTERNET_CACHE_ENTRY_INFOW, DWORD, dwHitRate, 20, 4, 4);
TEST_FIELD(INTERNET_CACHE_ENTRY_INFOW, DWORD, dwSizeLow, 24, 4, 4);
TEST_FIELD(INTERNET_CACHE_ENTRY_INFOW, DWORD, dwSizeHigh, 28, 4, 4);
TEST_FIELD(INTERNET_CACHE_ENTRY_INFOW, FILETIME, LastModifiedTime, 32, 8, 4);
TEST_FIELD(INTERNET_CACHE_ENTRY_INFOW, FILETIME, ExpireTime, 40, 8, 4);
TEST_FIELD(INTERNET_CACHE_ENTRY_INFOW, FILETIME, LastAccessTime, 48, 8, 4);
TEST_FIELD(INTERNET_CACHE_ENTRY_INFOW, FILETIME, LastSyncTime, 56, 8, 4);
}
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, DWORD, dwConnectedState, 0, 4, 4);
TEST_FIELD(INTERNET_CONNECTED_INFO, DWORD, dwFlags, 4, 4, 4);
}
static void test_pack_INTERNET_PORT(void)
{
/* INTERNET_PORT */
TEST_TYPE(INTERNET_PORT, 2, 2);
}
static void test_pack_INTERNET_STATUS_CALLBACK(void)
{
/* INTERNET_STATUS_CALLBACK */
TEST_TYPE(INTERNET_STATUS_CALLBACK, 4, 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, DWORD, dwMajorVersion, 0, 4, 4);
TEST_FIELD(INTERNET_VERSION_INFO, DWORD, dwMinorVersion, 4, 4, 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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
static void test_pack_LPHINTERNET(void)
{
/* LPHINTERNET */
TEST_TYPE(LPHINTERNET, 4, 4);
TEST_TYPE_POINTER(LPHINTERNET, 4, 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);
}
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);
}
static void test_pack_LPINTERNET_BUFFERSA(void)
{
/* LPINTERNET_BUFFERSA */
TEST_TYPE(LPINTERNET_BUFFERSA, 4, 4);
TEST_TYPE_POINTER(LPINTERNET_BUFFERSA, 40, 4);
}
static void test_pack_LPINTERNET_BUFFERSW(void)
{
/* LPINTERNET_BUFFERSW */
TEST_TYPE(LPINTERNET_BUFFERSW, 4, 4);
TEST_TYPE_POINTER(LPINTERNET_BUFFERSW, 40, 4);
}
static void test_pack_LPINTERNET_CACHE_ENTRY_INFOA(void)
{
/* LPINTERNET_CACHE_ENTRY_INFOA */
TEST_TYPE(LPINTERNET_CACHE_ENTRY_INFOA, 4, 4);
}
static void test_pack_LPINTERNET_CACHE_ENTRY_INFOW(void)
{
/* LPINTERNET_CACHE_ENTRY_INFOW */
TEST_TYPE(LPINTERNET_CACHE_ENTRY_INFOW, 4, 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);
}
static void test_pack_LPINTERNET_PORT(void)
{
/* LPINTERNET_PORT */
TEST_TYPE(LPINTERNET_PORT, 4, 4);
TEST_TYPE_POINTER(LPINTERNET_PORT, 2, 2);
}
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);
}
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);
}
static void test_pack_LPURL_COMPONENTSA(void)
{
/* LPURL_COMPONENTSA */
TEST_TYPE(LPURL_COMPONENTSA, 4, 4);
}
static void test_pack_LPURL_COMPONENTSW(void)
{
/* LPURL_COMPONENTSW */
TEST_TYPE(LPURL_COMPONENTSW, 4, 4);
}
static void test_pack_PFN_AUTH_NOTIFY(void)
{
/* PFN_AUTH_NOTIFY */
TEST_TYPE(PFN_AUTH_NOTIFY, 4, 4);
}
static void test_pack_PFN_DIAL_HANDLER(void)
{
/* PFN_DIAL_HANDLER */
TEST_TYPE(PFN_DIAL_HANDLER, 4, 4);
}
static void test_pack_URL_COMPONENTSA(void)
{
/* URL_COMPONENTSA (pack 4) */
TEST_FIELD(URL_COMPONENTSA, DWORD, dwStructSize, 0, 4, 4);
}
static void test_pack_URL_COMPONENTSW(void)
{
/* URL_COMPONENTSW (pack 4) */
TEST_FIELD(URL_COMPONENTSW, DWORD, dwStructSize, 0, 4, 4);
TEST_FIELD(URL_COMPONENTSW, LPWSTR, lpszScheme, 4, 4, 4);
TEST_FIELD(URL_COMPONENTSW, DWORD, dwSchemeLength, 8, 4, 4);
}
static void test_pack(void)
{
test_pack_GOPHER_FIND_DATAA();
test_pack_GOPHER_FIND_DATAW();
test_pack_GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE();
test_pack_GOPHER_MOD_DATE_ATTRIBUTE_TYPE();
test_pack_GOPHER_SCORE_ATTRIBUTE_TYPE();
test_pack_GOPHER_SCORE_RANGE_ATTRIBUTE_TYPE();
test_pack_GOPHER_TIMEZONE_ATTRIBUTE_TYPE();
test_pack_GOPHER_TTL_ATTRIBUTE_TYPE();
test_pack_GOPHER_VERONICA_ATTRIBUTE_TYPE();
test_pack_HINTERNET();
test_pack_HTTP_VERSION_INFO();
test_pack_INTERNET_ASYNC_RESULT();
test_pack_INTERNET_AUTH_NOTIFY_DATA();
test_pack_INTERNET_BUFFERSA();
test_pack_INTERNET_BUFFERSW();
test_pack_INTERNET_CACHE_ENTRY_INFOA();
test_pack_INTERNET_CACHE_ENTRY_INFOW();
test_pack_INTERNET_CONNECTED_INFO();
test_pack_INTERNET_PORT();
test_pack_INTERNET_STATUS_CALLBACK();
test_pack_INTERNET_VERSION_INFO();
test_pack_LPGOPHER_FIND_DATAA();
test_pack_LPGOPHER_FIND_DATAW();
test_pack_LPGOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE();
test_pack_LPGOPHER_MOD_DATE_ATTRIBUTE_TYPE();
test_pack_LPGOPHER_SCORE_ATTRIBUTE_TYPE();
test_pack_LPGOPHER_SCORE_RANGE_ATTRIBUTE_TYPE();
test_pack_LPGOPHER_TIMEZONE_ATTRIBUTE_TYPE();
test_pack_LPGOPHER_TTL_ATTRIBUTE_TYPE();
test_pack_LPGOPHER_VERONICA_ATTRIBUTE_TYPE();
test_pack_LPHINTERNET();
test_pack_LPHTTP_VERSION_INFO();
test_pack_LPINTERNET_ASYNC_RESULT();
test_pack_LPINTERNET_BUFFERSA();
test_pack_LPINTERNET_BUFFERSW();
test_pack_LPINTERNET_CACHE_ENTRY_INFOA();
test_pack_LPINTERNET_CACHE_ENTRY_INFOW();
test_pack_LPINTERNET_CONNECTED_INFO();
test_pack_LPINTERNET_PORT();
test_pack_LPINTERNET_STATUS_CALLBACK();
test_pack_LPINTERNET_VERSION_INFO();
test_pack_LPURL_COMPONENTSA();
test_pack_LPURL_COMPONENTSW();
test_pack_PFN_AUTH_NOTIFY();
test_pack_PFN_DIAL_HANDLER();
test_pack_URL_COMPONENTSA();
test_pack_URL_COMPONENTSW();
}
START_TEST(generated)
{
test_pack();
}