Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
e12e7a3a
Commit
e12e7a3a
authored
Jul 21, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet/tests: Use nameless unions/structs.
parent
091aeca7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
15 deletions
+12
-15
urlcache.c
dlls/wininet/tests/urlcache.c
+12
-15
No files found.
dlls/wininet/tests/urlcache.c
View file @
e12e7a3a
...
@@ -18,9 +18,6 @@
...
@@ -18,9 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
*/
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#include <stdarg.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdlib.h>
...
@@ -409,8 +406,8 @@ static void test_urlcacheA(void)
...
@@ -409,8 +406,8 @@ static void test_urlcacheA(void)
broken
(
lpCacheEntryInfo
->
CacheEntryType
==
NORMAL_CACHE_ENTRY
/* NT4/W2k */
),
broken
(
lpCacheEntryInfo
->
CacheEntryType
==
NORMAL_CACHE_ENTRY
/* NT4/W2k */
),
"expected type NORMAL_CACHE_ENTRY|URLHISTORY_CACHE_ENTRY, got %08lx
\n
"
,
"expected type NORMAL_CACHE_ENTRY|URLHISTORY_CACHE_ENTRY, got %08lx
\n
"
,
lpCacheEntryInfo
->
CacheEntryType
);
lpCacheEntryInfo
->
CacheEntryType
);
ok
(
!
U
(
*
lpCacheEntryInfo
).
dwExemptDelta
,
"expected dwExemptDelta 0, got %ld
\n
"
,
ok
(
!
lpCacheEntryInfo
->
dwExemptDelta
,
"expected dwExemptDelta 0, got %ld
\n
"
,
U
(
*
lpCacheEntryInfo
).
dwExemptDelta
);
lpCacheEntryInfo
->
dwExemptDelta
);
/* Make sure there is a notable change in timestamps */
/* Make sure there is a notable change in timestamps */
Sleep
(
1000
);
Sleep
(
1000
);
...
@@ -699,9 +696,9 @@ static void test_urlcacheA(void)
...
@@ -699,9 +696,9 @@ static void test_urlcacheA(void)
ok
(
lpCacheEntryInfo
->
CacheEntryType
&
(
NORMAL_CACHE_ENTRY
|
STICKY_CACHE_ENTRY
),
ok
(
lpCacheEntryInfo
->
CacheEntryType
&
(
NORMAL_CACHE_ENTRY
|
STICKY_CACHE_ENTRY
),
"expected cache entry type NORMAL_CACHE_ENTRY | STICKY_CACHE_ENTRY, got %ld (0x%08lx)
\n
"
,
"expected cache entry type NORMAL_CACHE_ENTRY | STICKY_CACHE_ENTRY, got %ld (0x%08lx)
\n
"
,
lpCacheEntryInfo
->
CacheEntryType
,
lpCacheEntryInfo
->
CacheEntryType
);
lpCacheEntryInfo
->
CacheEntryType
,
lpCacheEntryInfo
->
CacheEntryType
);
ok
(
U
(
*
lpCacheEntryInfo
).
dwExemptDelta
==
86400
,
ok
(
lpCacheEntryInfo
->
dwExemptDelta
==
86400
,
"expected dwExemptDelta 86400, got %ld
\n
"
,
"expected dwExemptDelta 86400, got %ld
\n
"
,
U
(
*
lpCacheEntryInfo
).
dwExemptDelta
);
lpCacheEntryInfo
->
dwExemptDelta
);
HeapFree
(
GetProcessHeap
(),
0
,
lpCacheEntryInfo
);
HeapFree
(
GetProcessHeap
(),
0
,
lpCacheEntryInfo
);
if
(
pDeleteUrlCacheEntryA
)
if
(
pDeleteUrlCacheEntryA
)
{
{
...
@@ -730,17 +727,17 @@ static void test_urlcacheA(void)
...
@@ -730,17 +727,17 @@ static void test_urlcacheA(void)
ok
(
lpCacheEntryInfo
->
CacheEntryType
&
(
NORMAL_CACHE_ENTRY
|
STICKY_CACHE_ENTRY
),
ok
(
lpCacheEntryInfo
->
CacheEntryType
&
(
NORMAL_CACHE_ENTRY
|
STICKY_CACHE_ENTRY
),
"expected cache entry type NORMAL_CACHE_ENTRY | STICKY_CACHE_ENTRY, got %ld (0x%08lx)
\n
"
,
"expected cache entry type NORMAL_CACHE_ENTRY | STICKY_CACHE_ENTRY, got %ld (0x%08lx)
\n
"
,
lpCacheEntryInfo
->
CacheEntryType
,
lpCacheEntryInfo
->
CacheEntryType
);
lpCacheEntryInfo
->
CacheEntryType
,
lpCacheEntryInfo
->
CacheEntryType
);
ok
(
U
(
*
lpCacheEntryInfo
).
dwExemptDelta
==
86400
,
ok
(
lpCacheEntryInfo
->
dwExemptDelta
==
86400
,
"expected dwExemptDelta 86400, got %ld
\n
"
,
"expected dwExemptDelta 86400, got %ld
\n
"
,
U
(
*
lpCacheEntryInfo
).
dwExemptDelta
);
lpCacheEntryInfo
->
dwExemptDelta
);
U
(
*
lpCacheEntryInfo
).
dwExemptDelta
=
0
;
lpCacheEntryInfo
->
dwExemptDelta
=
0
;
ret
=
SetUrlCacheEntryInfoA
(
test_url
,
lpCacheEntryInfo
,
ret
=
SetUrlCacheEntryInfoA
(
test_url
,
lpCacheEntryInfo
,
CACHE_ENTRY_EXEMPT_DELTA_FC
);
CACHE_ENTRY_EXEMPT_DELTA_FC
);
ok
(
ret
,
"SetUrlCacheEntryInfo failed: %ld
\n
"
,
GetLastError
());
ok
(
ret
,
"SetUrlCacheEntryInfo failed: %ld
\n
"
,
GetLastError
());
ret
=
GetUrlCacheEntryInfoA
(
test_url
,
lpCacheEntryInfo
,
&
cbCacheEntryInfo
);
ret
=
GetUrlCacheEntryInfoA
(
test_url
,
lpCacheEntryInfo
,
&
cbCacheEntryInfo
);
ok
(
ret
,
"GetUrlCacheEntryInfo failed with error %ld
\n
"
,
GetLastError
());
ok
(
ret
,
"GetUrlCacheEntryInfo failed with error %ld
\n
"
,
GetLastError
());
ok
(
!
U
(
*
lpCacheEntryInfo
).
dwExemptDelta
,
"expected dwExemptDelta 0, got %ld
\n
"
,
ok
(
!
lpCacheEntryInfo
->
dwExemptDelta
,
"expected dwExemptDelta 0, got %ld
\n
"
,
U
(
*
lpCacheEntryInfo
).
dwExemptDelta
);
lpCacheEntryInfo
->
dwExemptDelta
);
/* See whether a sticky cache entry has the flag cleared once the exempt
/* See whether a sticky cache entry has the flag cleared once the exempt
* delta is meaningless.
* delta is meaningless.
*/
*/
...
@@ -749,7 +746,7 @@ static void test_urlcacheA(void)
...
@@ -749,7 +746,7 @@ static void test_urlcacheA(void)
lpCacheEntryInfo
->
CacheEntryType
,
lpCacheEntryInfo
->
CacheEntryType
);
lpCacheEntryInfo
->
CacheEntryType
,
lpCacheEntryInfo
->
CacheEntryType
);
/* Recommit of Url entry keeps dwExemptDelta */
/* Recommit of Url entry keeps dwExemptDelta */
U
(
*
lpCacheEntryInfo
).
dwExemptDelta
=
8600
;
lpCacheEntryInfo
->
dwExemptDelta
=
8600
;
ret
=
SetUrlCacheEntryInfoA
(
test_url
,
lpCacheEntryInfo
,
ret
=
SetUrlCacheEntryInfoA
(
test_url
,
lpCacheEntryInfo
,
CACHE_ENTRY_EXEMPT_DELTA_FC
);
CACHE_ENTRY_EXEMPT_DELTA_FC
);
ok
(
ret
,
"SetUrlCacheEntryInfo failed: %ld
\n
"
,
GetLastError
());
ok
(
ret
,
"SetUrlCacheEntryInfo failed: %ld
\n
"
,
GetLastError
());
...
@@ -765,8 +762,8 @@ static void test_urlcacheA(void)
...
@@ -765,8 +762,8 @@ static void test_urlcacheA(void)
ret
=
GetUrlCacheEntryInfoA
(
test_url
,
lpCacheEntryInfo
,
&
cbCacheEntryInfo
);
ret
=
GetUrlCacheEntryInfoA
(
test_url
,
lpCacheEntryInfo
,
&
cbCacheEntryInfo
);
ok
(
ret
,
"GetUrlCacheEntryInfo failed with error %ld
\n
"
,
GetLastError
());
ok
(
ret
,
"GetUrlCacheEntryInfo failed with error %ld
\n
"
,
GetLastError
());
ok
(
U
(
*
lpCacheEntryInfo
).
dwExemptDelta
==
8600
||
(
ie10_cache
&&
U
(
*
lpCacheEntryInfo
).
dwExemptDelta
==
86400
),
ok
(
lpCacheEntryInfo
->
dwExemptDelta
==
8600
||
(
ie10_cache
&&
lpCacheEntryInfo
->
dwExemptDelta
==
86400
),
"expected dwExemptDelta 8600, got %ld
\n
"
,
U
(
*
lpCacheEntryInfo
).
dwExemptDelta
);
"expected dwExemptDelta 8600, got %ld
\n
"
,
lpCacheEntryInfo
->
dwExemptDelta
);
HeapFree
(
GetProcessHeap
(),
0
,
lpCacheEntryInfo
);
HeapFree
(
GetProcessHeap
(),
0
,
lpCacheEntryInfo
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment