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
dd162547
Commit
dd162547
authored
Jul 04, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32/tests: Use nameless unions/structs.
parent
5cb72744
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
23 deletions
+16
-23
shelldispatch.c
dlls/shell32/tests/shelldispatch.c
+0
-3
shellole.c
dlls/shell32/tests/shellole.c
+1
-2
shfldr_special.c
dlls/shell32/tests/shfldr_special.c
+3
-6
shlexec.c
dlls/shell32/tests/shlexec.c
+3
-3
shlfolder.c
dlls/shell32/tests/shlfolder.c
+5
-5
string.c
dlls/shell32/tests/string.c
+4
-4
No files found.
dlls/shell32/tests/shelldispatch.c
View file @
dd162547
...
...
@@ -19,9 +19,6 @@
*/
#define COBJMACROS
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#include "shldisp.h"
#include "shlobj.h"
#include "shlwapi.h"
...
...
dlls/shell32/tests/shellole.c
View file @
dd162547
...
...
@@ -18,7 +18,6 @@
#define COBJMACROS
#define CONST_VTABLE
#define NONAMELESSUNION
#include <stdio.h>
#include <wine/test.h>
...
...
@@ -117,7 +116,7 @@ static HRESULT WINAPI PropertyStorage_ReadMultiple(IPropertyStorage *This, ULONG
ok
(
rgpropvar
!=
NULL
,
"rgpropvar = NULL
\n
"
);
ok
(
rgpspec
[
0
].
ulKind
==
PRSPEC_PROPID
,
"rgpspec[0].ulKind = %ld
\n
"
,
rgpspec
[
0
].
ulKind
);
ok
(
rgpspec
[
0
].
u
.
propid
==
PID_CODEPAGE
,
"rgpspec[0].propid = %ld
\n
"
,
rgpspec
[
0
].
u
.
propid
);
ok
(
rgpspec
[
0
].
propid
==
PID_CODEPAGE
,
"rgpspec[0].propid = %ld
\n
"
,
rgpspec
[
0
]
.
propid
);
rgpropvar
[
0
].
vt
=
VT_I2
;
rgpropvar
[
0
].
iVal
=
1234
;
...
...
dlls/shell32/tests/shfldr_special.c
View file @
dd162547
...
...
@@ -23,9 +23,6 @@
#include <stdio.h>
#define COBJMACROS
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include "shellapi.h"
...
...
@@ -233,10 +230,10 @@ if (0)
hr
=
IShellFolder2_GetDefaultColumnState
(
folder
,
6
,
&
state
);
ok
(
broken
(
hr
==
E_NOTIMPL
)
||
hr
==
E_INVALIDARG
/* Win7 */
,
"got 0x%08lx
\n
"
,
hr
);
details
.
str
.
u
.
pOleStr
=
NULL
;
details
.
str
.
pOleStr
=
NULL
;
hr
=
IShellFolder2_GetDetailsOf
(
folder
,
NULL
,
0
,
&
details
);
ok
(
hr
==
S_OK
||
broken
(
hr
==
E_NOTIMPL
)
/* W2K */
,
"got 0x%08lx
\n
"
,
hr
);
if
(
SHELL_OsIsUnicode
())
SHFree
(
details
.
str
.
u
.
pOleStr
);
if
(
SHELL_OsIsUnicode
())
SHFree
(
details
.
str
.
pOleStr
);
/* test every column if method is implemented */
if
(
hr
==
S_OK
)
...
...
@@ -252,7 +249,7 @@ if (0)
ok
(
details
.
fmt
==
LVCFMT_LEFT
,
"got 0x%x
\n
"
,
details
.
fmt
);
/* can't be on w9x at this point, IShellFolder2 unsupported there,
check present for running Wine with w9x setup */
if
(
SHELL_OsIsUnicode
())
SHFree
(
details
.
str
.
u
.
pOleStr
);
if
(
SHELL_OsIsUnicode
())
SHFree
(
details
.
str
.
pOleStr
);
hr
=
IShellFolder2_GetDefaultColumnState
(
folder
,
i
,
&
state
);
ok
(
hr
==
S_OK
,
"got 0x%08lx
\n
"
,
hr
);
...
...
dlls/shell32/tests/shlexec.c
View file @
dd162547
...
...
@@ -611,7 +611,7 @@ static INT_PTR shell_execute_ex_(const char* file, int line,
sei
.
lpClass
=
class
;
sei
.
hkeyClass
=
NULL
;
sei
.
dwHotKey
=
0
;
U
(
sei
)
.
hIcon
=
NULL
;
sei
.
hIcon
=
NULL
;
sei
.
hProcess
=
(
HANDLE
)
0xdeadbeef
;
/* Out */
DeleteFileA
(
child_file
);
...
...
@@ -2400,7 +2400,7 @@ static void hook_WaitForInputIdle(DWORD (WINAPI *new_func)(HANDLE, DWORD))
/* Search for the correct imported module by walking the import descriptors */
import_descriptor
=
(
PIMAGE_IMPORT_DESCRIPTOR
)(
base
+
import_directory_rva
);
while
(
U
(
*
import_descriptor
).
OriginalFirstThunk
!=
0
)
while
(
import_descriptor
->
OriginalFirstThunk
!=
0
)
{
char
*
import_module_name
;
...
...
@@ -2415,7 +2415,7 @@ static void hook_WaitForInputIdle(DWORD (WINAPI *new_func)(HANDLE, DWORD))
* arrays. We need the import name table to find the imported
* routine and the import address table to patch the address, so
* walk them side by side */
int_entry
=
(
PIMAGE_THUNK_DATA
)(
base
+
U
(
*
import_descriptor
).
OriginalFirstThunk
);
int_entry
=
(
PIMAGE_THUNK_DATA
)(
base
+
import_descriptor
->
OriginalFirstThunk
);
iat_entry
=
(
PIMAGE_THUNK_DATA
)(
base
+
import_descriptor
->
FirstThunk
);
while
(
int_entry
->
u1
.
Ordinal
!=
0
)
{
...
...
dlls/shell32/tests/shlfolder.c
View file @
dd162547
...
...
@@ -4709,16 +4709,16 @@ static void r_verify_pidl(unsigned l, LPCITEMIDLIST pidl, const WCHAR *path)
ok_
(
__FILE__
,
l
)(
filename
.
uType
==
STRRET_WSTR
||
filename
.
uType
==
STRRET_CSTR
,
"Got unexpected string type: %d
\n
"
,
filename
.
uType
);
if
(
filename
.
uType
==
STRRET_WSTR
){
ok_
(
__FILE__
,
l
)(
lstrcmpW
(
path
,
U
(
filename
)
.
pOleStr
)
==
0
,
ok_
(
__FILE__
,
l
)(
lstrcmpW
(
path
,
filename
.
pOleStr
)
==
0
,
"didn't get expected path (%s), instead: %s
\n
"
,
wine_dbgstr_w
(
path
),
wine_dbgstr_w
(
U
(
filename
)
.
pOleStr
));
SHFree
(
U
(
filename
)
.
pOleStr
);
wine_dbgstr_w
(
path
),
wine_dbgstr_w
(
filename
.
pOleStr
));
SHFree
(
filename
.
pOleStr
);
}
else
if
(
filename
.
uType
==
STRRET_CSTR
)
{
WCHAR
*
strW
=
make_wstr
(
U
(
filename
)
.
cStr
);
WCHAR
*
strW
=
make_wstr
(
filename
.
cStr
);
ok_
(
__FILE__
,
l
)(
!
lstrcmpW
(
path
,
strW
),
"didn't get expected path (%s), instead: %s
\n
"
,
wine_dbgstr_w
(
path
),
U
(
filename
)
.
cStr
);
wine_dbgstr_w
(
path
),
filename
.
cStr
);
free
(
strW
);
}
...
...
dlls/shell32/tests/string.c
View file @
dd162547
...
...
@@ -58,21 +58,21 @@ static void test_StrRetToStringNW(void)
trace
(
"StrRetToStringNAW is Unicode
\n
"
);
strret
.
uType
=
STRRET_WSTR
;
U
(
strret
)
.
pOleStr
=
CoDupStrW
(
"Test"
);
strret
.
pOleStr
=
CoDupStrW
(
"Test"
);
memset
(
buff
,
0xff
,
sizeof
(
buff
));
ret
=
pStrRetToStrNAW
(
buff
,
ARRAY_SIZE
(
buff
),
&
strret
,
NULL
);
ok
(
ret
==
TRUE
&&
!
wcscmp
(
buff
,
szTestW
),
"STRRET_WSTR: dup failed, ret=%d
\n
"
,
ret
);
strret
.
uType
=
STRRET_CSTR
;
lstrcpyA
(
U
(
strret
)
.
cStr
,
"Test"
);
lstrcpyA
(
strret
.
cStr
,
"Test"
);
memset
(
buff
,
0xff
,
sizeof
(
buff
));
ret
=
pStrRetToStrNAW
(
buff
,
ARRAY_SIZE
(
buff
),
&
strret
,
NULL
);
ok
(
ret
==
TRUE
&&
!
wcscmp
(
buff
,
szTestW
),
"STRRET_CSTR: dup failed, ret=%d
\n
"
,
ret
);
strret
.
uType
=
STRRET_OFFSET
;
U
(
strret
)
.
uOffset
=
1
;
strret
.
uOffset
=
1
;
strcpy
((
char
*
)
&
iidl
,
" Test"
);
memset
(
buff
,
0xff
,
sizeof
(
buff
));
ret
=
pStrRetToStrNAW
(
buff
,
ARRAY_SIZE
(
buff
),
&
strret
,
iidl
);
...
...
@@ -84,7 +84,7 @@ if (0)
{
/* Invalid dest - should return FALSE, except NT4 does not, so we don't check. */
strret
.
uType
=
STRRET_WSTR
;
U
(
strret
)
.
pOleStr
=
CoDupStrW
(
"Test"
);
strret
.
pOleStr
=
CoDupStrW
(
"Test"
);
pStrRetToStrNAW
(
NULL
,
ARRAY_SIZE
(
buff
),
&
strret
,
NULL
);
trace
(
"NULL dest: ret=%d
\n
"
,
ret
);
}
...
...
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