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
4e1c7cd0
Commit
4e1c7cd0
authored
Feb 23, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 23, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
atl/tests: Enable compilation with long types.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0c88eeee
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
35 deletions
+35
-35
Makefile.in
dlls/atl/tests/Makefile.in
+1
-1
atl_ax.c
dlls/atl/tests/atl_ax.c
+7
-7
module.c
dlls/atl/tests/module.c
+14
-14
registrar.c
dlls/atl/tests/registrar.c
+13
-13
No files found.
dlls/atl/tests/Makefile.in
View file @
4e1c7cd0
TESTDLL
=
atl.dll
IMPORTS
=
uuid atl oleaut32 ole32 rpcrt4 user32 gdi32 advapi32
EXTRADEFS
=
-D
WINE_NO_LONG_TYPES
-D
_ATL_VER
=
_ATL_VER_30
EXTRADEFS
=
-D_ATL_VER
=
_ATL_VER_30
C_SRCS
=
\
atl_ax.c
\
...
...
dlls/atl/tests/atl_ax.c
View file @
4e1c7cd0
...
...
@@ -73,20 +73,20 @@ static void test_AtlAxAttachControl(void)
IUnknown
*
pObj
,
*
pContainer
;
hr
=
pAtlAxAttachControl
(
NULL
,
NULL
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"Expected AtlAxAttachControl to return E_INVALIDARG, got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"Expected AtlAxAttachControl to return E_INVALIDARG, got 0x%08
l
x
\n
"
,
hr
);
pContainer
=
(
IUnknown
*
)
0xdeadbeef
;
hr
=
pAtlAxAttachControl
(
NULL
,
NULL
,
&
pContainer
);
ok
(
hr
==
E_INVALIDARG
,
"Expected AtlAxAttachControl to return E_INVALIDARG, got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"Expected AtlAxAttachControl to return E_INVALIDARG, got 0x%08
l
x
\n
"
,
hr
);
ok
(
pContainer
==
(
IUnknown
*
)
0xdeadbeef
,
"Expected the output container pointer to be untouched, got %p
\n
"
,
pContainer
);
hr
=
pAtlAxAttachControl
(
NULL
,
hwnd
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"Expected AtlAxAttachControl to return E_INVALIDARG, got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"Expected AtlAxAttachControl to return E_INVALIDARG, got 0x%08
l
x
\n
"
,
hr
);
hr
=
CoCreateInstance
(
&
CLSID_WebBrowser
,
NULL
,
CLSCTX_INPROC_SERVER
|
CLSCTX_INPROC_HANDLER
,
&
IID_IOleObject
,
(
void
**
)
&
pObj
);
ok
(
hr
==
S_OK
,
"Expected CoCreateInstance to return S_OK, got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected CoCreateInstance to return S_OK, got 0x%08
l
x
\n
"
,
hr
);
if
(
FAILED
(
hr
))
{
...
...
@@ -95,16 +95,16 @@ static void test_AtlAxAttachControl(void)
}
hr
=
pAtlAxAttachControl
(
pObj
,
NULL
,
NULL
);
ok
(
hr
==
S_FALSE
,
"Expected AtlAxAttachControl to return S_FALSE, got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_FALSE
,
"Expected AtlAxAttachControl to return S_FALSE, got 0x%08
l
x
\n
"
,
hr
);
pContainer
=
NULL
;
hr
=
pAtlAxAttachControl
(
pObj
,
NULL
,
&
pContainer
);
ok
(
hr
==
S_FALSE
,
"Expected AtlAxAttachControl to return S_FALSE, got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_FALSE
,
"Expected AtlAxAttachControl to return S_FALSE, got 0x%08
l
x
\n
"
,
hr
);
ok
(
pContainer
!=
NULL
,
"got %p
\n
"
,
pContainer
);
IUnknown_Release
(
pContainer
);
hr
=
pAtlAxAttachControl
(
pObj
,
hwnd
,
NULL
);
ok
(
hr
==
S_OK
,
"Expected AtlAxAttachControl to return S_OK, got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected AtlAxAttachControl to return S_OK, got 0x%08
l
x
\n
"
,
hr
);
IUnknown_Release
(
pObj
);
...
...
dlls/atl/tests/module.c
View file @
4e1c7cd0
...
...
@@ -70,29 +70,29 @@ static void test_winmodule(void)
winmod
.
m_pCreateWndList
=
(
void
*
)
0xdeadbeef
;
winmod
.
m_csWindowCreate
.
LockCount
=
0xdeadbeef
;
hres
=
AtlModuleInit
(
&
winmod
,
NULL
,
NULL
);
ok
(
hres
==
S_OK
,
"AtlModuleInit failed: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"AtlModuleInit failed: %08
l
x
\n
"
,
hres
);
ok
(
!
winmod
.
m_pCreateWndList
,
"winmod.m_pCreateWndList = %p
\n
"
,
winmod
.
m_pCreateWndList
);
ok
(
winmod
.
m_csWindowCreate
.
LockCount
==
-
1
,
"winmod.m_csWindowCreate.LockCount = %d
\n
"
,
ok
(
winmod
.
m_csWindowCreate
.
LockCount
==
-
1
,
"winmod.m_csWindowCreate.LockCount = %
l
d
\n
"
,
winmod
.
m_csWindowCreate
.
LockCount
);
AtlModuleAddCreateWndData
(
&
winmod
,
create_data
,
(
void
*
)
0xdead0001
);
ok
(
winmod
.
m_pCreateWndList
==
create_data
,
"winmod.m_pCreateWndList != create_data
\n
"
);
ok
(
create_data
[
0
].
m_pThis
==
(
void
*
)
0xdead0001
,
"unexpected create_data[0].m_pThis %p
\n
"
,
create_data
[
0
].
m_pThis
);
ok
(
create_data
[
0
].
m_dwThreadID
==
GetCurrentThreadId
(),
"unexpected create_data[0].m_dwThreadID %x
\n
"
,
ok
(
create_data
[
0
].
m_dwThreadID
==
GetCurrentThreadId
(),
"unexpected create_data[0].m_dwThreadID %
l
x
\n
"
,
create_data
[
0
].
m_dwThreadID
);
ok
(
!
create_data
[
0
].
m_pNext
,
"unexpected create_data[0].m_pNext %p
\n
"
,
create_data
[
0
].
m_pNext
);
AtlModuleAddCreateWndData
(
&
winmod
,
create_data
+
1
,
(
void
*
)
0xdead0002
);
ok
(
winmod
.
m_pCreateWndList
==
create_data
+
1
,
"winmod.m_pCreateWndList != create_data
\n
"
);
ok
(
create_data
[
1
].
m_pThis
==
(
void
*
)
0xdead0002
,
"unexpected create_data[1].m_pThis %p
\n
"
,
create_data
[
1
].
m_pThis
);
ok
(
create_data
[
1
].
m_dwThreadID
==
GetCurrentThreadId
(),
"unexpected create_data[1].m_dwThreadID %x
\n
"
,
ok
(
create_data
[
1
].
m_dwThreadID
==
GetCurrentThreadId
(),
"unexpected create_data[1].m_dwThreadID %
l
x
\n
"
,
create_data
[
1
].
m_dwThreadID
);
ok
(
create_data
[
1
].
m_pNext
==
create_data
,
"unexpected create_data[1].m_pNext %p
\n
"
,
create_data
[
1
].
m_pNext
);
AtlModuleAddCreateWndData
(
&
winmod
,
create_data
+
2
,
(
void
*
)
0xdead0003
);
ok
(
winmod
.
m_pCreateWndList
==
create_data
+
2
,
"winmod.m_pCreateWndList != create_data
\n
"
);
ok
(
create_data
[
2
].
m_pThis
==
(
void
*
)
0xdead0003
,
"unexpected create_data[2].m_pThis %p
\n
"
,
create_data
[
2
].
m_pThis
);
ok
(
create_data
[
2
].
m_dwThreadID
==
GetCurrentThreadId
(),
"unexpected create_data[2].m_dwThreadID %x
\n
"
,
ok
(
create_data
[
2
].
m_dwThreadID
==
GetCurrentThreadId
(),
"unexpected create_data[2].m_dwThreadID %
l
x
\n
"
,
create_data
[
2
].
m_dwThreadID
);
ok
(
create_data
[
2
].
m_pNext
==
create_data
+
1
,
"unexpected create_data[2].m_pNext %p
\n
"
,
create_data
[
2
].
m_pNext
);
...
...
@@ -149,7 +149,7 @@ static void test_winclassinfo(void)
winmod
.
cbSize
=
sizeof
(
winmod
);
winmod
.
m_pCreateWndList
=
(
void
*
)
0xdeadbeef
;
hres
=
AtlModuleInit
(
&
winmod
,
NULL
,
NULL
);
ok
(
hres
==
S_OK
,
"AtlModuleInit failed: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"AtlModuleInit failed: %08
l
x
\n
"
,
hres
);
ok
(
!
winmod
.
m_pCreateWndList
,
"winmod.m_pCreateWndList = %p
\n
"
,
winmod
.
m_pCreateWndList
);
atom
=
AtlModuleRegisterWndClassInfoW
(
&
winmod
,
&
wci
,
&
wndProc
);
...
...
@@ -181,28 +181,28 @@ static void test_term(void)
test
.
cbSize
=
sizeof
(
_ATL_MODULEW
);
hres
=
AtlModuleInit
(
&
test
,
NULL
,
NULL
);
ok
(
hres
==
S_OK
,
"AtlModuleInit failed (0x%x).
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"AtlModuleInit failed (0x%
l
x).
\n
"
,
hres
);
hres
=
AtlModuleAddTermFunc
(
&
test
,
term_callback
,
ex
);
ok
(
hres
==
S_OK
,
"AtlModuleAddTermFunc failed (0x%x).
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"AtlModuleAddTermFunc failed (0x%
l
x).
\n
"
,
hres
);
cb_val
=
0xdeadbeef
;
hres
=
AtlModuleTerm
(
&
test
);
ok
(
hres
==
S_OK
,
"AtlModuleTerm failed (0x%x).
\n
"
,
hres
);
ok
(
cb_val
==
ex
,
"wrong callback value (0x%
l
x).
\n
"
,
cb_val
);
ok
(
hres
==
S_OK
,
"AtlModuleTerm failed (0x%
l
x).
\n
"
,
hres
);
ok
(
cb_val
==
ex
,
"wrong callback value (0x%
I
x).
\n
"
,
cb_val
);
test
.
cbSize
=
FIELD_OFFSET
(
_ATL_MODULEW
,
dwAtlBuildVer
);
hres
=
AtlModuleInit
(
&
test
,
NULL
,
NULL
);
ok
(
hres
==
S_OK
,
"AtlModuleInit failed (0x%x).
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"AtlModuleInit failed (0x%
l
x).
\n
"
,
hres
);
hres
=
AtlModuleAddTermFunc
(
&
test
,
term_callback
,
0x23
);
ok
(
hres
==
S_OK
,
"AtlModuleAddTermFunc failed (0x%x).
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"AtlModuleAddTermFunc failed (0x%
l
x).
\n
"
,
hres
);
cb_val
=
0xdeadbeef
;
hres
=
AtlModuleTerm
(
&
test
);
ok
(
hres
==
S_OK
,
"AtlModuleTerm failed (0x%x).
\n
"
,
hres
);
ok
(
cb_val
==
0xdeadbeef
,
"wrong callback value (0x%
l
x).
\n
"
,
cb_val
);
ok
(
hres
==
S_OK
,
"AtlModuleTerm failed (0x%
l
x).
\n
"
,
hres
);
ok
(
cb_val
==
0xdeadbeef
,
"wrong callback value (0x%
I
x).
\n
"
,
cb_val
);
}
START_TEST
(
module
)
...
...
dlls/atl/tests/registrar.c
View file @
4e1c7cd0
...
...
@@ -68,7 +68,7 @@ static void test_registrar(void)
hr
=
CoCreateInstance
(
&
CLSID_Registrar
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IRegistrar
,
(
void
**
)
&
registrar
);
if
(
FAILED
(
hr
))
{
win_skip
(
"creating IRegistrar failed, hr = 0x%08X
\n
"
,
hr
);
win_skip
(
"creating IRegistrar failed, hr = 0x%08
l
X
\n
"
,
hr
);
return
;
}
...
...
@@ -84,7 +84,7 @@ static void test_registrar(void)
MultiByteToWideChar
(
CP_ACP
,
0
,
textA
,
-
1
,
textW
,
count
);
hr
=
IRegistrar_StringRegister
(
registrar
,
textW
);
ok
(
hr
==
S_OK
,
"StringRegister failed: %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"StringRegister failed: %08
l
x
\n
"
,
hr
);
if
(
FAILED
(
hr
))
{
IRegistrar_Release
(
registrar
);
...
...
@@ -92,44 +92,44 @@ static void test_registrar(void)
}
lret
=
RegOpenKeyA
(
HKEY_CURRENT_USER
,
"eebf73c4-50fd-478f-bbcf-db212221227a"
,
&
key
);
ok
(
lret
==
ERROR_SUCCESS
,
"error %d opening registry key
\n
"
,
lret
);
ok
(
lret
==
ERROR_SUCCESS
,
"error %
l
d opening registry key
\n
"
,
lret
);
size
=
sizeof
(
dword
);
lret
=
RegQueryValueExA
(
key
,
"dword_unquoted_hex"
,
NULL
,
NULL
,
(
BYTE
*
)
&
dword
,
&
size
);
ok
(
lret
==
ERROR_SUCCESS
,
"RegQueryValueExA failed, error %d
\n
"
,
lret
);
ok
(
lret
==
ERROR_SUCCESS
,
"RegQueryValueExA failed, error %
l
d
\n
"
,
lret
);
ok
(
dword
!=
0xA
,
"unquoted hex is not supposed to be preserved
\n
"
);
size
=
sizeof
(
dword
);
lret
=
RegQueryValueExA
(
key
,
"dword_quoted_hex"
,
NULL
,
NULL
,
(
BYTE
*
)
&
dword
,
&
size
);
ok
(
lret
==
ERROR_SUCCESS
,
"RegQueryValueExA failed, error %d
\n
"
,
lret
);
ok
(
lret
==
ERROR_SUCCESS
,
"RegQueryValueExA failed, error %
l
d
\n
"
,
lret
);
ok
(
dword
!=
0xA
,
"quoted hex is not supposed to be preserved
\n
"
);
size
=
sizeof
(
dword
);
lret
=
RegQueryValueExA
(
key
,
"dword_unquoted_dec"
,
NULL
,
NULL
,
(
BYTE
*
)
&
dword
,
&
size
);
ok
(
lret
==
ERROR_SUCCESS
,
"RegQueryValueExA failed, error %d
\n
"
,
lret
);
ok
(
dword
==
1
,
"unquoted dec is not supposed to be %d
\n
"
,
dword
);
ok
(
lret
==
ERROR_SUCCESS
,
"RegQueryValueExA failed, error %
l
d
\n
"
,
lret
);
ok
(
dword
==
1
,
"unquoted dec is not supposed to be %
l
d
\n
"
,
dword
);
size
=
sizeof
(
dword
);
lret
=
RegQueryValueExA
(
key
,
"dword_quoted_dec"
,
NULL
,
NULL
,
(
BYTE
*
)
&
dword
,
&
size
);
ok
(
lret
==
ERROR_SUCCESS
,
"RegQueryValueExA failed, error %d
\n
"
,
lret
);
ok
(
dword
==
1
,
"quoted dec is not supposed to be %d
\n
"
,
dword
);
ok
(
lret
==
ERROR_SUCCESS
,
"RegQueryValueExA failed, error %
l
d
\n
"
,
lret
);
ok
(
dword
==
1
,
"quoted dec is not supposed to be %
l
d
\n
"
,
dword
);
size
=
4
;
lret
=
RegQueryValueExA
(
key
,
"binary_quoted"
,
NULL
,
NULL
,
bytes
,
&
size
);
ok
(
lret
==
ERROR_SUCCESS
,
"RegQueryValueA, failed, error %d
\n
"
,
lret
);
ok
(
lret
==
ERROR_SUCCESS
,
"RegQueryValueA, failed, error %
l
d
\n
"
,
lret
);
ok
(
bytes
[
0
]
==
0xde
&&
bytes
[
1
]
==
0xad
&&
bytes
[
2
]
==
0xbe
&&
bytes
[
3
]
==
0xef
,
"binary quoted value was not preserved (it's 0x%02X%02X%02X%02X)
\n
"
,
0xff
&
bytes
[
0
],
0xff
&
bytes
[
1
],
0xff
&
bytes
[
2
],
0xff
&
bytes
[
3
]);
size
=
4
;
lret
=
RegQueryValueExA
(
key
,
"binary_unquoted"
,
NULL
,
NULL
,
bytes
,
&
size
);
ok
(
lret
==
ERROR_SUCCESS
,
"RegQueryValueA, failed, error %d
\n
"
,
lret
);
ok
(
lret
==
ERROR_SUCCESS
,
"RegQueryValueA, failed, error %
l
d
\n
"
,
lret
);
ok
(
bytes
[
0
]
==
0xde
&&
bytes
[
1
]
==
0xad
&&
bytes
[
2
]
==
0x01
&&
bytes
[
3
]
==
0x23
,
"binary unquoted value was not preserved (it's 0x%02X%02X%02X%02X)
\n
"
,
0xff
&
bytes
[
0
],
0xff
&
bytes
[
1
],
0xff
&
bytes
[
2
],
0xff
&
bytes
[
3
]);
hr
=
IRegistrar_StringUnregister
(
registrar
,
textW
);
ok
(
SUCCEEDED
(
hr
),
"IRegistrar_StringUnregister failed, hr = 0x%08X
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"IRegistrar_StringUnregister failed, hr = 0x%08
l
X
\n
"
,
hr
);
RegCloseKey
(
key
);
HeapFree
(
GetProcessHeap
(),
0
,
textW
);
...
...
@@ -148,7 +148,7 @@ static void test_aggregation(void)
hres
=
CoCreateInstance
(
&
CLSID_Registrar
,
(
IUnknown
*
)
0xdeadbeef
,
CLSCTX_INPROC_SERVER
|
CLSCTX_INPROC_HANDLER
,
&
IID_IUnknown
,
(
void
**
)
&
unk
);
ok
(
hres
==
CLASS_E_NOAGGREGATION
||
broken
(
hres
==
E_INVALIDARG
),
"CoCreateInstance failed: %08x, expected CLASS_E_NOAGGREGATION
\n
"
,
hres
);
"CoCreateInstance failed: %08
l
x, expected CLASS_E_NOAGGREGATION
\n
"
,
hres
);
ok
(
!
unk
||
unk
==
(
IUnknown
*
)
0xdeadbeef
,
"unk = %p
\n
"
,
unk
);
}
...
...
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