Commit 0cc262c5 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

Fix compilation of the wininet generated tests with the Windows

headers.
parent 08177d6d
......@@ -15,6 +15,7 @@
#include "windef.h"
#include "winbase.h"
#include "wininet.h"
#include "wininet_test.h"
#include "wine/test.h"
......@@ -172,6 +173,20 @@ static void test_pack_GOPHER_ATTRIBUTE_ENUMERATORW(void)
TEST_TYPE(GOPHER_ATTRIBUTE_ENUMERATORW, 4, 4);
}
static void test_pack_GOPHER_ATTRIBUTE_TYPEA(void)
{
/* GOPHER_ATTRIBUTE_TYPEA (pack 4) */
TEST_FIELD(GOPHER_ATTRIBUTE_TYPEA, DWORD, CategoryId, 0, 4, 4);
TEST_FIELD(GOPHER_ATTRIBUTE_TYPEA, DWORD, AttributeId, 4, 4, 4);
}
static void test_pack_GOPHER_ATTRIBUTE_TYPEW(void)
{
/* GOPHER_ATTRIBUTE_TYPEW (pack 4) */
TEST_FIELD(GOPHER_ATTRIBUTE_TYPEW, DWORD, CategoryId, 0, 4, 4);
TEST_FIELD(GOPHER_ATTRIBUTE_TYPEW, DWORD, AttributeId, 4, 4, 4);
}
static void test_pack_GOPHER_FIND_DATAA(void)
{
/* GOPHER_FIND_DATAA (pack 4) */
......@@ -423,6 +438,46 @@ static void test_pack_INTERNET_BUFFERSW(void)
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);
TEST_FIELD(INTERNET_CACHE_ENTRY_INFOA, LPSTR, lpszSourceUrlName, 4, 4, 4);
TEST_FIELD(INTERNET_CACHE_ENTRY_INFOA, LPSTR, lpszLocalFileName, 8, 4, 4);
TEST_FIELD(INTERNET_CACHE_ENTRY_INFOA, DWORD, CacheEntryType, 12, 4, 4);
TEST_FIELD(INTERNET_CACHE_ENTRY_INFOA, DWORD, dwUseCount, 16, 4, 4);
TEST_FIELD(INTERNET_CACHE_ENTRY_INFOA, DWORD, dwHitRate, 20, 4, 4);
TEST_FIELD(INTERNET_CACHE_ENTRY_INFOA, DWORD, dwSizeLow, 24, 4, 4);
TEST_FIELD(INTERNET_CACHE_ENTRY_INFOA, DWORD, dwSizeHigh, 28, 4, 4);
TEST_FIELD(INTERNET_CACHE_ENTRY_INFOA, FILETIME, LastModifiedTime, 32, 8, 4);
TEST_FIELD(INTERNET_CACHE_ENTRY_INFOA, FILETIME, ExpireTime, 40, 8, 4);
TEST_FIELD(INTERNET_CACHE_ENTRY_INFOA, FILETIME, LastAccessTime, 48, 8, 4);
TEST_FIELD(INTERNET_CACHE_ENTRY_INFOA, FILETIME, LastSyncTime, 56, 8, 4);
TEST_FIELD(INTERNET_CACHE_ENTRY_INFOA, LPBYTE, lpHeaderInfo, 64, 4, 4);
TEST_FIELD(INTERNET_CACHE_ENTRY_INFOA, DWORD, dwHeaderInfoSize, 68, 4, 4);
TEST_FIELD(INTERNET_CACHE_ENTRY_INFOA, LPSTR, lpszFileExtension, 72, 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);
TEST_FIELD(INTERNET_CACHE_ENTRY_INFOW, LPBYTE, lpHeaderInfo, 64, 4, 4);
TEST_FIELD(INTERNET_CACHE_ENTRY_INFOW, DWORD, dwHeaderInfoSize, 68, 4, 4);
TEST_FIELD(INTERNET_CACHE_ENTRY_INFOW, LPWSTR, lpszFileExtension, 72, 4, 4);
}
static void test_pack_INTERNET_CERTIFICATE_INFOA(void)
{
/* INTERNET_CERTIFICATE_INFOA (pack 4) */
......@@ -540,6 +595,18 @@ static void test_pack_LPGOPHER_ASK_ATTRIBUTE_TYPEW(void)
TEST_TYPE_POINTER(LPGOPHER_ASK_ATTRIBUTE_TYPEW, 8, 4);
}
static void test_pack_LPGOPHER_ATTRIBUTE_TYPEA(void)
{
/* LPGOPHER_ATTRIBUTE_TYPEA */
TEST_TYPE(LPGOPHER_ATTRIBUTE_TYPEA, 4, 4);
}
static void test_pack_LPGOPHER_ATTRIBUTE_TYPEW(void)
{
/* LPGOPHER_ATTRIBUTE_TYPEW */
TEST_TYPE(LPGOPHER_ATTRIBUTE_TYPEW, 4, 4);
}
static void test_pack_LPGOPHER_FIND_DATAA(void)
{
/* LPGOPHER_FIND_DATAA */
......@@ -736,6 +803,18 @@ static void test_pack_LPINTERNET_BUFFERSW(void)
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_CERTIFICATE_INFOA(void)
{
/* LPINTERNET_CERTIFICATE_INFOA */
......@@ -840,6 +919,8 @@ static void test_pack(void)
test_pack_GOPHER_ASK_ATTRIBUTE_TYPEW();
test_pack_GOPHER_ATTRIBUTE_ENUMERATORA();
test_pack_GOPHER_ATTRIBUTE_ENUMERATORW();
test_pack_GOPHER_ATTRIBUTE_TYPEA();
test_pack_GOPHER_ATTRIBUTE_TYPEW();
test_pack_GOPHER_FIND_DATAA();
test_pack_GOPHER_FIND_DATAW();
test_pack_GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE();
......@@ -870,6 +951,8 @@ static void test_pack(void)
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_CERTIFICATE_INFOA();
test_pack_INTERNET_CERTIFICATE_INFOW();
test_pack_INTERNET_CONNECTED_INFO();
......@@ -884,6 +967,8 @@ static void test_pack(void)
test_pack_LPGOPHER_ADMIN_ATTRIBUTE_TYPEW();
test_pack_LPGOPHER_ASK_ATTRIBUTE_TYPEA();
test_pack_LPGOPHER_ASK_ATTRIBUTE_TYPEW();
test_pack_LPGOPHER_ATTRIBUTE_TYPEA();
test_pack_LPGOPHER_ATTRIBUTE_TYPEW();
test_pack_LPGOPHER_FIND_DATAA();
test_pack_LPGOPHER_FIND_DATAW();
test_pack_LPGOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE();
......@@ -912,6 +997,8 @@ static void test_pack(void)
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_CERTIFICATE_INFOA();
test_pack_LPINTERNET_CERTIFICATE_INFOW();
test_pack_LPINTERNET_CONNECTED_INFO();
......
/*
* Unit test suite for wininet functions
*
* Copyright 2004 Francois Gouget
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* The Windows headers don't define A/W types for any of the following
* structures and pointers :-(
* Because for these structures there's not alignment or packing difference
* between the A and W versions, we just define a set of macros so the
* generated tests work anyway.
*/
#ifndef GOPHER_ABSTRACT_ATTRIBUTE_TYPE
#define GOPHER_ABSTRACT_ATTRIBUTE_TYPEA GOPHER_ABSTRACT_ATTRIBUTE_TYPE
#define GOPHER_ABSTRACT_ATTRIBUTE_TYPEW GOPHER_ABSTRACT_ATTRIBUTE_TYPE
#define GOPHER_ADMIN_ATTRIBUTE_TYPEA GOPHER_ADMIN_ATTRIBUTE_TYPE
#define GOPHER_ADMIN_ATTRIBUTE_TYPEW GOPHER_ADMIN_ATTRIBUTE_TYPE
#define GOPHER_ASK_ATTRIBUTE_TYPEA GOPHER_ASK_ATTRIBUTE_TYPE
#define GOPHER_ASK_ATTRIBUTE_TYPEW GOPHER_ASK_ATTRIBUTE_TYPE
#define GOPHER_ATTRIBUTE_ENUMERATORA GOPHER_ATTRIBUTE_ENUMERATOR
#define GOPHER_ATTRIBUTE_ENUMERATORW GOPHER_ATTRIBUTE_ENUMERATOR
#define GOPHER_ATTRIBUTE_TYPEA GOPHER_ATTRIBUTE_TYPE
#define GOPHER_ATTRIBUTE_TYPEW GOPHER_ATTRIBUTE_TYPE
#define GOPHER_LOCATION_ATTRIBUTE_TYPEA GOPHER_LOCATION_ATTRIBUTE_TYPE
#define GOPHER_LOCATION_ATTRIBUTE_TYPEW GOPHER_LOCATION_ATTRIBUTE_TYPE
#define GOPHER_ORGANIZATION_ATTRIBUTE_TYPEA GOPHER_ORGANIZATION_ATTRIBUTE_TYPE
#define GOPHER_ORGANIZATION_ATTRIBUTE_TYPEW GOPHER_ORGANIZATION_ATTRIBUTE_TYPE
#define GOPHER_PROVIDER_ATTRIBUTE_TYPEA GOPHER_PROVIDER_ATTRIBUTE_TYPE
#define GOPHER_PROVIDER_ATTRIBUTE_TYPEW GOPHER_PROVIDER_ATTRIBUTE_TYPE
#define GOPHER_SITE_ATTRIBUTE_TYPEA GOPHER_SITE_ATTRIBUTE_TYPE
#define GOPHER_SITE_ATTRIBUTE_TYPEW GOPHER_SITE_ATTRIBUTE_TYPE
#define GOPHER_UNKNOWN_ATTRIBUTE_TYPEA GOPHER_UNKNOWN_ATTRIBUTE_TYPE
#define GOPHER_UNKNOWN_ATTRIBUTE_TYPEW GOPHER_UNKNOWN_ATTRIBUTE_TYPE
#define GOPHER_VERSION_ATTRIBUTE_TYPEA GOPHER_VERSION_ATTRIBUTE_TYPE
#define GOPHER_VERSION_ATTRIBUTE_TYPEW GOPHER_VERSION_ATTRIBUTE_TYPE
#define GOPHER_VIEW_ATTRIBUTE_TYPEA GOPHER_VIEW_ATTRIBUTE_TYPE
#define GOPHER_VIEW_ATTRIBUTE_TYPEW GOPHER_VIEW_ATTRIBUTE_TYPE
#define INTERNET_CERTIFICATE_INFOA INTERNET_CERTIFICATE_INFO
#define INTERNET_CERTIFICATE_INFOW INTERNET_CERTIFICATE_INFO
#define INTERNET_PROXY_INFOA INTERNET_PROXY_INFO
#define INTERNET_PROXY_INFOW INTERNET_PROXY_INFO
#define LPGOPHER_ABSTRACT_ATTRIBUTE_TYPEA LPGOPHER_ABSTRACT_ATTRIBUTE_TYPE
#define LPGOPHER_ABSTRACT_ATTRIBUTE_TYPEW LPGOPHER_ABSTRACT_ATTRIBUTE_TYPE
#define LPGOPHER_ADMIN_ATTRIBUTE_TYPEA LPGOPHER_ADMIN_ATTRIBUTE_TYPE
#define LPGOPHER_ADMIN_ATTRIBUTE_TYPEW LPGOPHER_ADMIN_ATTRIBUTE_TYPE
#define LPGOPHER_ASK_ATTRIBUTE_TYPEA LPGOPHER_ASK_ATTRIBUTE_TYPE
#define LPGOPHER_ASK_ATTRIBUTE_TYPEW LPGOPHER_ASK_ATTRIBUTE_TYPE
#define LPGOPHER_ATTRIBUTE_TYPEA LPGOPHER_ATTRIBUTE_TYPE
#define LPGOPHER_ATTRIBUTE_TYPEW LPGOPHER_ATTRIBUTE_TYPE
#define LPGOPHER_LOCATION_ATTRIBUTE_TYPEA LPGOPHER_LOCATION_ATTRIBUTE_TYPE
#define LPGOPHER_LOCATION_ATTRIBUTE_TYPEW LPGOPHER_LOCATION_ATTRIBUTE_TYPE
#define LPGOPHER_ORGANIZATION_ATTRIBUTE_TYPEA LPGOPHER_ORGANIZATION_ATTRIBUTE_TYPE
#define LPGOPHER_ORGANIZATION_ATTRIBUTE_TYPEW LPGOPHER_ORGANIZATION_ATTRIBUTE_TYPE
#define LPGOPHER_PROVIDER_ATTRIBUTE_TYPEA LPGOPHER_PROVIDER_ATTRIBUTE_TYPE
#define LPGOPHER_PROVIDER_ATTRIBUTE_TYPEW LPGOPHER_PROVIDER_ATTRIBUTE_TYPE
#define LPGOPHER_SITE_ATTRIBUTE_TYPEA LPGOPHER_SITE_ATTRIBUTE_TYPE
#define LPGOPHER_SITE_ATTRIBUTE_TYPEW LPGOPHER_SITE_ATTRIBUTE_TYPE
#define LPGOPHER_UNKNOWN_ATTRIBUTE_TYPEA LPGOPHER_UNKNOWN_ATTRIBUTE_TYPE
#define LPGOPHER_UNKNOWN_ATTRIBUTE_TYPEW LPGOPHER_UNKNOWN_ATTRIBUTE_TYPE
#define LPGOPHER_VERSION_ATTRIBUTE_TYPEA LPGOPHER_VERSION_ATTRIBUTE_TYPE
#define LPGOPHER_VERSION_ATTRIBUTE_TYPEW LPGOPHER_VERSION_ATTRIBUTE_TYPE
#define LPGOPHER_VIEW_ATTRIBUTE_TYPEA LPGOPHER_VIEW_ATTRIBUTE_TYPE
#define LPGOPHER_VIEW_ATTRIBUTE_TYPEW LPGOPHER_VIEW_ATTRIBUTE_TYPE
#define LPINTERNET_CERTIFICATE_INFOA LPINTERNET_CERTIFICATE_INFO
#define LPINTERNET_CERTIFICATE_INFOW LPINTERNET_CERTIFICATE_INFO
#define LPINTERNET_PROXY_INFOA LPINTERNET_PROXY_INFO
#define LPINTERNET_PROXY_INFOW LPINTERNET_PROXY_INFO
#endif
......@@ -1460,6 +1460,7 @@ wininet.h
"windef.h"
"winbase.h"
"wininet.h"
"wininet_test.h"
%type
......@@ -1476,8 +1477,8 @@ GOPHER_ATTRIBUTE_ENUMERATOR
GOPHER_ATTRIBUTE_ENUMERATORA
GOPHER_ATTRIBUTE_ENUMERATORW
GOPHER_ATTRIBUTE_TYPE
!GOPHER_ATTRIBUTE_TYPEA
!GOPHER_ATTRIBUTE_TYPEW
GOPHER_ATTRIBUTE_TYPEA
GOPHER_ATTRIBUTE_TYPEW
GOPHER_FIND_DATA
GOPHER_FIND_DATAA
GOPHER_FIND_DATAW
......@@ -1516,8 +1517,8 @@ INTERNET_ASYNC_RESULT
INTERNET_AUTH_NOTIFY_DATA
INTERNET_BUFFERSA
INTERNET_BUFFERSW
!INTERNET_CACHE_ENTRY_INFOA
!INTERNET_CACHE_ENTRY_INFOW
INTERNET_CACHE_ENTRY_INFOA
INTERNET_CACHE_ENTRY_INFOW
INTERNET_CERTIFICATE_INFO
INTERNET_CERTIFICATE_INFOA
INTERNET_CERTIFICATE_INFOW
......@@ -1538,8 +1539,8 @@ LPGOPHER_ASK_ATTRIBUTE_TYPE
LPGOPHER_ASK_ATTRIBUTE_TYPEA
LPGOPHER_ASK_ATTRIBUTE_TYPEW
LPGOPHER_ATTRIBUTE_TYPE
!LPGOPHER_ATTRIBUTE_TYPEA
!LPGOPHER_ATTRIBUTE_TYPEW
LPGOPHER_ATTRIBUTE_TYPEA
LPGOPHER_ATTRIBUTE_TYPEW
LPGOPHER_FIND_DATAA
LPGOPHER_FIND_DATAW
LPGOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE
......@@ -1575,8 +1576,8 @@ LPHTTP_VERSION_INFO
LPINTERNET_ASYNC_RESULT
LPINTERNET_BUFFERSA
LPINTERNET_BUFFERSW
!LPINTERNET_CACHE_ENTRY_INFOA
!LPINTERNET_CACHE_ENTRY_INFOW
LPINTERNET_CACHE_ENTRY_INFOA
LPINTERNET_CACHE_ENTRY_INFOW
LPINTERNET_CERTIFICATE_INFOA
LPINTERNET_CERTIFICATE_INFOW
LPINTERNET_CONNECTED_INFO
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment