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
5d0783bc
Commit
5d0783bc
authored
Mar 16, 2011
by
Austin Lund
Committed by
Alexandre Julliard
Mar 16, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Output error information in cursoricon tests.
parent
bb40bebd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
10 deletions
+19
-10
cursoricon.c
dlls/user32/tests/cursoricon.c
+19
-10
No files found.
dlls/user32/tests/cursoricon.c
View file @
5d0783bc
...
...
@@ -1452,7 +1452,7 @@ static void test_GetCursorFrameInfo(void)
/* Creating a static cursor. */
SetLastError
(
0xdeadbeef
);
h1
=
CreateIconFromResource
((
PBYTE
)
hotspot
,
CRSR_RES_SIZE
,
FALSE
,
0x00030000
);
ok
(
h1
!=
NULL
,
"Create cursor failed
.
\n
"
);
ok
(
h1
!=
NULL
,
"Create cursor failed
(error = %d).
\n
"
,
GetLastError
()
);
/* Check GetCursorFrameInfo behavior on a static cursor */
unk1
=
unk2
=
unk3
=
unk4
=
0xdead
;
...
...
@@ -1464,15 +1464,17 @@ static void test_GetCursorFrameInfo(void)
ok
(
unk4
==
1
,
"GetCursorFrameInfo() unexpected param 5 value (%d != 1).
\n
"
,
unk4
);
/* Clean up static cursor. */
SetLastError
(
0xdeadbeef
);
ret
=
DestroyCursor
(
h1
);
ok
(
ret
,
"DestroyCursor() failed
.
\n
"
);
ok
(
ret
,
"DestroyCursor() failed
(error = %d).
\n
"
,
GetLastError
()
);
/* Creating a single-frame animated cursor. */
empty_anicursor
.
frames
[
0
].
data
.
icon_info
.
idType
=
2
;
/* type: cursor */
empty_anicursor
.
frames
[
0
].
data
.
icon_info
.
idEntries
[
0
].
xHotspot
=
3
;
empty_anicursor
.
frames
[
0
].
data
.
icon_info
.
idEntries
[
0
].
yHotspot
=
3
;
SetLastError
(
0xdeadbeef
);
h1
=
CreateIconFromResource
((
PBYTE
)
&
empty_anicursor
,
sizeof
(
empty_anicursor
),
FALSE
,
0x00030000
);
ok
(
h1
!=
NULL
,
"Create cursor failed
.
\n
"
);
ok
(
h1
!=
NULL
,
"Create cursor failed
(error = %d).
\n
"
,
GetLastError
()
);
/* Check GetCursorFrameInfo behavior on a single-frame animated cursor */
unk1
=
unk2
=
unk3
=
unk4
=
0xdead
;
...
...
@@ -1485,8 +1487,9 @@ static void test_GetCursorFrameInfo(void)
"GetCursorFrameInfo() unexpected param 5 value (%d != 1).
\n
"
,
unk4
);
/* Clean up single-frame animated cursor. */
SetLastError
(
0xdeadbeef
);
ret
=
DestroyCursor
(
h1
);
ok
(
ret
,
"DestroyCursor() failed
.
\n
"
);
ok
(
ret
,
"DestroyCursor() failed
(error = %d).
\n
"
,
GetLastError
()
);
/* Creating a multi-frame animated cursor. */
for
(
i
=
0
;
i
<
empty_anicursor3
.
header
.
header
.
num_frames
;
i
++
)
...
...
@@ -1495,8 +1498,9 @@ static void test_GetCursorFrameInfo(void)
empty_anicursor3
.
frames
[
i
].
data
.
icon_info
.
idEntries
[
0
].
xHotspot
=
3
;
empty_anicursor3
.
frames
[
i
].
data
.
icon_info
.
idEntries
[
0
].
yHotspot
=
3
;
}
SetLastError
(
0xdeadbeef
);
h1
=
CreateIconFromResource
((
PBYTE
)
&
empty_anicursor3
,
sizeof
(
empty_anicursor3
),
FALSE
,
0x00030000
);
ok
(
h1
!=
NULL
,
"Create cursor failed
.
\n
"
);
ok
(
h1
!=
NULL
,
"Create cursor failed
(error = %d).
\n
"
,
GetLastError
()
);
/* Check number of steps in multi-frame animated cursor */
i
=
0
;
...
...
@@ -1536,13 +1540,15 @@ static void test_GetCursorFrameInfo(void)
"GetCursorFrameInfo() unexpected param 5 value (0x%x != 0xdead).
\n
"
,
unk4
);
/* Clean up multi-frame animated cursor. */
SetLastError
(
0xdeadbeef
);
ret
=
DestroyCursor
(
h1
);
ok
(
ret
,
"DestroyCursor() failed
.
\n
"
);
ok
(
ret
,
"DestroyCursor() failed
(error = %d).
\n
"
,
GetLastError
()
);
/* Create a multi-frame animated cursor with num_steps == 1 */
empty_anicursor3
.
header
.
header
.
num_steps
=
1
;
SetLastError
(
0xdeadbeef
);
h1
=
CreateIconFromResource
((
PBYTE
)
&
empty_anicursor3
,
sizeof
(
empty_anicursor3
),
FALSE
,
0x00030000
);
ok
(
h1
!=
NULL
,
"Create cursor failed
.
\n
"
);
ok
(
h1
!=
NULL
,
"Create cursor failed
(error = %d).
\n
"
,
GetLastError
()
);
/* Check number of steps in multi-frame animated cursor (mismatch between steps and frames) */
i
=
0
;
...
...
@@ -1578,8 +1584,9 @@ static void test_GetCursorFrameInfo(void)
"GetCursorFrameInfo() unexpected param 5 value (%d != 0xdead).
\n
"
,
unk4
);
/* Clean up multi-frame animated cursor. */
SetLastError
(
0xdeadbeef
);
ret
=
DestroyCursor
(
h1
);
ok
(
ret
,
"DestroyCursor() failed
.
\n
"
);
ok
(
ret
,
"DestroyCursor() failed
(error = %d).
\n
"
,
GetLastError
()
);
/* Creating a multi-frame animated cursor with rate data. */
for
(
i
=
0
;
i
<
empty_anicursor3_rate
.
header
.
header
.
num_frames
;
i
++
)
...
...
@@ -1588,8 +1595,9 @@ static void test_GetCursorFrameInfo(void)
empty_anicursor3_rate
.
frames
[
i
].
data
.
icon_info
.
idEntries
[
0
].
xHotspot
=
3
;
empty_anicursor3_rate
.
frames
[
i
].
data
.
icon_info
.
idEntries
[
0
].
yHotspot
=
3
;
}
SetLastError
(
0xdeadbeef
);
h1
=
CreateIconFromResource
((
PBYTE
)
&
empty_anicursor3_rate
,
sizeof
(
empty_anicursor3_rate
),
FALSE
,
0x00030000
);
ok
(
h1
!=
NULL
,
"Create cursor failed
.
\n
"
);
ok
(
h1
!=
NULL
,
"Create cursor failed
(error = %x).
\n
"
,
GetLastError
()
);
/* Check number of steps in multi-frame animated cursor with rate data */
i
=
0
;
...
...
@@ -1616,8 +1624,9 @@ static void test_GetCursorFrameInfo(void)
}
/* Clean up multi-frame animated cursor with rate data. */
SetLastError
(
0xdeadbeef
);
ret
=
DestroyCursor
(
h1
);
ok
(
ret
,
"DestroyCursor() failed
.
\n
"
);
ok
(
ret
,
"DestroyCursor() failed
(error = %d).
\n
"
,
GetLastError
()
);
cleanup:
if
(
bmpOld
)
SelectObject
(
hdc
,
bmpOld
);
...
...
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