Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
e2c0f513
Commit
e2c0f513
authored
Feb 19, 2020
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Feb 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Add some tests for classes with non-zero low word instance.
Signed-off-by:
Dmitry Timoshkov
<
dmitry@baikal.ru
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
36419837
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
class.c
dlls/user32/tests/class.c
+31
-0
No files found.
dlls/user32/tests/class.c
View file @
e2c0f513
...
...
@@ -98,6 +98,7 @@ static void ClassTest(HINSTANCE hInstance, BOOL global)
LONG
i
;
WCHAR
str
[
20
];
ATOM
classatom
;
HINSTANCE
hInstance2
;
cls
.
style
=
CS_HREDRAW
|
CS_VREDRAW
|
(
global
?
CS_GLOBALCLASS
:
0
);
cls
.
lpfnWndProc
=
ClassTest_WndProc
;
...
...
@@ -121,6 +122,26 @@ static void ClassTest(HINSTANCE hInstance, BOOL global)
"RegisterClass of the same class should fail for the second time
\n
"
);
/* Setup windows */
hInstance2
=
(
HINSTANCE
)(((
ULONG_PTR
)
hInstance
&
~
0xffff
)
|
0xdead
);
hTestWnd
=
CreateWindowW
(
className
,
winName
,
WS_OVERLAPPEDWINDOW
+
WS_HSCROLL
+
WS_VSCROLL
,
CW_USEDEFAULT
,
0
,
CW_USEDEFAULT
,
0
,
0
,
0
,
hInstance2
,
0
);
todo_wine_if
(
!
global
)
ok
(
hTestWnd
!=
0
,
"Failed to create window for hInstance %p
\n
"
,
hInstance2
);
todo_wine_if
(
!
global
)
ok
((
HINSTANCE
)
GetClassLongPtrA
(
hTestWnd
,
GCLP_HMODULE
)
==
hInstance
,
"Wrong GCL instance %p != %p
\n
"
,
(
HINSTANCE
)
GetClassLongPtrA
(
hTestWnd
,
GCLP_HMODULE
),
hInstance
);
todo_wine_if
(
!
global
)
ok
((
HINSTANCE
)
GetWindowLongPtrA
(
hTestWnd
,
GWLP_HINSTANCE
)
==
hInstance2
,
"Wrong GWL instance %p != %p
\n
"
,
(
HINSTANCE
)
GetWindowLongPtrA
(
hTestWnd
,
GWLP_HINSTANCE
),
hInstance2
);
DestroyWindow
(
hTestWnd
);
hTestWnd
=
CreateWindowW
(
className
,
winName
,
WS_OVERLAPPEDWINDOW
+
WS_HSCROLL
+
WS_VSCROLL
,
CW_USEDEFAULT
,
0
,
CW_USEDEFAULT
,
0
,
0
,
...
...
@@ -128,6 +149,14 @@ static void ClassTest(HINSTANCE hInstance, BOOL global)
ok
(
hTestWnd
!=
0
,
"Failed to create window
\n
"
);
ok
((
HINSTANCE
)
GetClassLongPtrA
(
hTestWnd
,
GCLP_HMODULE
)
==
hInstance
,
"Wrong GCL instance %p/%p
\n
"
,
(
HINSTANCE
)
GetClassLongPtrA
(
hTestWnd
,
GCLP_HMODULE
),
hInstance
);
ok
((
HINSTANCE
)
GetWindowLongPtrA
(
hTestWnd
,
GWLP_HINSTANCE
)
==
hInstance
,
"Wrong GWL instance %p/%p
\n
"
,
(
HINSTANCE
)
GetWindowLongPtrA
(
hTestWnd
,
GWLP_HINSTANCE
),
hInstance
);
/* test initial values of valid classwords */
for
(
i
=
0
;
i
<
NUMCLASSWORDS
;
i
++
)
{
...
...
@@ -1491,6 +1520,8 @@ START_TEST(class)
ClassTest
(
hInstance
,
FALSE
);
ClassTest
(
hInstance
,
TRUE
);
ClassTest
((
HANDLE
)((
ULONG_PTR
)
hInstance
|
0x1234
),
FALSE
);
ClassTest
((
HANDLE
)((
ULONG_PTR
)
hInstance
|
0x1234
),
TRUE
);
CreateDialogParamTest
(
hInstance
);
test_styles
();
test_builtinproc
();
...
...
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