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
a413c38a
Commit
a413c38a
authored
Nov 21, 2008
by
Paul Vriens
Committed by
Alexandre Julliard
Nov 21, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Fix a few test failures on Win9x.
parent
cac3cb90
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
16 deletions
+30
-16
win.c
dlls/user32/tests/win.c
+30
-16
No files found.
dlls/user32/tests/win.c
View file @
a413c38a
...
...
@@ -4011,6 +4011,11 @@ static void test_CreateWindow(void)
#define expect_ex_style(window, ex_style)\
ok(GetWindowLong(window, GWL_EXSTYLE) == (ex_style), "expected ex_style %x != %x\n", (LONG)(ex_style), GetWindowLong(window, GWL_EXSTYLE))
#define expect_gle_broken_9x(gle)\
ok(GetLastError() == gle ||\
broken(GetLastError() == 0xdeadbeef),\
"IsMenu set error %d\n", GetLastError())
hmenu
=
CreateMenu
();
assert
(
hmenu
!=
0
);
parent
=
GetDesktopWindow
();
...
...
@@ -4067,7 +4072,7 @@ static void test_CreateWindow(void)
DestroyWindow
(
hwnd
);
SetLastError
(
0xdeadbeef
);
ok
(
!
IsMenu
(
hmenu
),
"IsMenu should fail
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_MENU_HANDLE
,
"IsMenu set error %d
\n
"
,
GetLastError
()
);
expect_gle_broken_9x
(
ERROR_INVALID_MENU_HANDLE
);
hmenu
=
CreateMenu
();
assert
(
hmenu
!=
0
);
...
...
@@ -4081,7 +4086,7 @@ static void test_CreateWindow(void)
DestroyWindow
(
hwnd
);
SetLastError
(
0xdeadbeef
);
ok
(
!
IsMenu
(
hmenu
),
"IsMenu should fail
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_MENU_HANDLE
,
"IsMenu set error %d
\n
"
,
GetLastError
()
);
expect_gle_broken_9x
(
ERROR_INVALID_MENU_HANDLE
);
hmenu
=
CreateMenu
();
assert
(
hmenu
!=
0
);
...
...
@@ -4095,7 +4100,7 @@ static void test_CreateWindow(void)
DestroyWindow
(
hwnd
);
SetLastError
(
0xdeadbeef
);
ok
(
!
IsMenu
(
hmenu
),
"IsMenu should fail
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_MENU_HANDLE
,
"IsMenu set error %d
\n
"
,
GetLastError
()
);
expect_gle_broken_9x
(
ERROR_INVALID_MENU_HANDLE
);
hmenu
=
CreateMenu
();
assert
(
hmenu
!=
0
);
...
...
@@ -4109,14 +4114,16 @@ static void test_CreateWindow(void)
DestroyWindow
(
hwnd
);
SetLastError
(
0xdeadbeef
);
ok
(
!
IsMenu
(
hmenu
),
"IsMenu should fail
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_MENU_HANDLE
,
"IsMenu set error %d
\n
"
,
GetLastError
()
);
expect_gle_broken_9x
(
ERROR_INVALID_MENU_HANDLE
);
/* WS_CHILD | WS_POPUP */
SetLastError
(
0xdeadbeef
);
hwnd
=
CreateWindowEx
(
WS_EX_APPWINDOW
,
"static"
,
NULL
,
WS_CHILD
|
WS_POPUP
,
0
,
0
,
100
,
100
,
parent
,
(
HMENU
)
1
,
0
,
NULL
);
ok
(
!
hwnd
,
"CreateWindowEx should fail
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_MENU_HANDLE
,
"IsMenu set error %d
\n
"
,
GetLastError
());
ok
(
!
hwnd
||
broken
(
hwnd
!=
0
/* Win9x */
),
"CreateWindowEx should fail
\n
"
);
expect_gle_broken_9x
(
ERROR_INVALID_MENU_HANDLE
);
if
(
hwnd
)
DestroyWindow
(
hwnd
);
hmenu
=
CreateMenu
();
assert
(
hmenu
!=
0
);
...
...
@@ -4130,13 +4137,15 @@ static void test_CreateWindow(void)
DestroyWindow
(
hwnd
);
SetLastError
(
0xdeadbeef
);
ok
(
!
IsMenu
(
hmenu
),
"IsMenu should fail
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_MENU_HANDLE
,
"IsMenu set error %d
\n
"
,
GetLastError
()
);
expect_gle_broken_9x
(
ERROR_INVALID_MENU_HANDLE
);
SetLastError
(
0xdeadbeef
);
hwnd
=
CreateWindowEx
(
WS_EX_APPWINDOW
,
"static"
,
NULL
,
WS_CHILD
|
WS_POPUP
|
WS_CAPTION
,
0
,
0
,
100
,
100
,
parent
,
(
HMENU
)
1
,
0
,
NULL
);
ok
(
!
hwnd
,
"CreateWindowEx should fail
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_MENU_HANDLE
,
"IsMenu set error %d
\n
"
,
GetLastError
());
ok
(
!
hwnd
||
broken
(
hwnd
!=
0
/* Win9x */
),
"CreateWindowEx should fail
\n
"
);
expect_gle_broken_9x
(
ERROR_INVALID_MENU_HANDLE
);
if
(
hwnd
)
DestroyWindow
(
hwnd
);
hmenu
=
CreateMenu
();
assert
(
hmenu
!=
0
);
...
...
@@ -4150,13 +4159,15 @@ static void test_CreateWindow(void)
DestroyWindow
(
hwnd
);
SetLastError
(
0xdeadbeef
);
ok
(
!
IsMenu
(
hmenu
),
"IsMenu should fail
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_MENU_HANDLE
,
"IsMenu set error %d
\n
"
,
GetLastError
()
);
expect_gle_broken_9x
(
ERROR_INVALID_MENU_HANDLE
);
SetLastError
(
0xdeadbeef
);
hwnd
=
CreateWindowEx
(
0
,
"static"
,
NULL
,
WS_CHILD
|
WS_POPUP
,
0
,
0
,
100
,
100
,
parent
,
(
HMENU
)
1
,
0
,
NULL
);
ok
(
!
hwnd
,
"CreateWindowEx should fail
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_MENU_HANDLE
,
"IsMenu set error %d
\n
"
,
GetLastError
());
ok
(
!
hwnd
||
broken
(
hwnd
!=
0
/* Win9x */
),
"CreateWindowEx should fail
\n
"
);
expect_gle_broken_9x
(
ERROR_INVALID_MENU_HANDLE
);
if
(
hwnd
)
DestroyWindow
(
hwnd
);
hmenu
=
CreateMenu
();
assert
(
hmenu
!=
0
);
...
...
@@ -4170,13 +4181,15 @@ static void test_CreateWindow(void)
DestroyWindow
(
hwnd
);
SetLastError
(
0xdeadbeef
);
ok
(
!
IsMenu
(
hmenu
),
"IsMenu should fail
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_MENU_HANDLE
,
"IsMenu set error %d
\n
"
,
GetLastError
()
);
expect_gle_broken_9x
(
ERROR_INVALID_MENU_HANDLE
);
SetLastError
(
0xdeadbeef
);
hwnd
=
CreateWindowEx
(
0
,
"static"
,
NULL
,
WS_CHILD
|
WS_POPUP
|
WS_CAPTION
,
0
,
0
,
100
,
100
,
parent
,
(
HMENU
)
1
,
0
,
NULL
);
ok
(
!
hwnd
,
"CreateWindowEx should fail
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_MENU_HANDLE
,
"IsMenu set error %d
\n
"
,
GetLastError
());
ok
(
!
hwnd
||
broken
(
hwnd
!=
0
/* Win9x */
),
"CreateWindowEx should fail
\n
"
);
expect_gle_broken_9x
(
ERROR_INVALID_MENU_HANDLE
);
if
(
hwnd
)
DestroyWindow
(
hwnd
);
hmenu
=
CreateMenu
();
assert
(
hmenu
!=
0
);
...
...
@@ -4190,7 +4203,7 @@ static void test_CreateWindow(void)
DestroyWindow
(
hwnd
);
SetLastError
(
0xdeadbeef
);
ok
(
!
IsMenu
(
hmenu
),
"IsMenu should fail
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_MENU_HANDLE
,
"IsMenu set error %d
\n
"
,
GetLastError
()
);
expect_gle_broken_9x
(
ERROR_INVALID_MENU_HANDLE
);
/* test child window sizing */
cls
.
style
=
0
;
...
...
@@ -4324,6 +4337,7 @@ static void test_CreateWindow(void)
UnregisterClass
(
"MinMax_WndClass"
,
GetModuleHandle
(
0
));
UnregisterClass
(
"Sizes_WndClass"
,
GetModuleHandle
(
0
));
#undef expect_gle_broken_9x
#undef expect_menu
#undef expect_style
#undef expect_ex_style
...
...
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