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
dca1b517
Commit
dca1b517
authored
Jul 02, 2009
by
Huw Davies
Committed by
Alexandre Julliard
Jul 02, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32/tests: Add some traces and fix a few comments.
parent
12adc3e1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
metafile.c
dlls/gdi32/tests/metafile.c
+9
-3
No files found.
dlls/gdi32/tests/metafile.c
View file @
dca1b517
...
...
@@ -1476,6 +1476,7 @@ static void test_SetMetaFileBits(void)
METAHEADER
*
mh
;
hmf
=
SetMetaFileBitsEx
(
sizeof
(
MF_GRAPHICS_BITS
),
MF_GRAPHICS_BITS
);
trace
(
"hmf %p
\n
"
,
hmf
);
ok
(
hmf
!=
0
,
"SetMetaFileBitsEx error %d
\n
"
,
GetLastError
());
type
=
GetObjectType
(
hmf
);
ok
(
type
==
OBJ_METAFILE
,
"SetMetaFileBitsEx created object with type %d
\n
"
,
type
);
...
...
@@ -1492,21 +1493,23 @@ static void test_SetMetaFileBits(void)
/* NULL data crashes XP SP1 */
/*hmf = SetMetaFileBitsEx(sizeof(MF_GRAPHICS_BITS), NULL);*/
/* Now with
not
zero size */
/* Now with zero size */
SetLastError
(
0xdeadbeef
);
hmf
=
SetMetaFileBitsEx
(
0
,
MF_GRAPHICS_BITS
);
trace
(
"hmf %p
\n
"
,
hmf
);
ok
(
!
hmf
,
"SetMetaFileBitsEx should fail
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_DATA
||
broken
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
),
/* Win9x */
"wrong error %d
\n
"
,
GetLastError
());
/* Now with
not even
size */
/* Now with
odd
size */
SetLastError
(
0xdeadbeef
);
hmf
=
SetMetaFileBitsEx
(
sizeof
(
MF_GRAPHICS_BITS
)
-
1
,
MF_GRAPHICS_BITS
);
trace
(
"hmf %p
\n
"
,
hmf
);
ok
(
!
hmf
,
"SetMetaFileBitsEx should fail
\n
"
);
ok
(
GetLastError
()
==
0xdeadbeef
/* XP SP1 */
,
"wrong error %d
\n
"
,
GetLastError
());
/* Now with zeroed out
or faked some
header fields */
/* Now with zeroed out header fields */
assert
(
sizeof
(
buf
)
>=
sizeof
(
MF_GRAPHICS_BITS
));
memcpy
(
buf
,
MF_GRAPHICS_BITS
,
sizeof
(
MF_GRAPHICS_BITS
));
mh
=
(
METAHEADER
*
)
buf
;
...
...
@@ -1516,6 +1519,7 @@ static void test_SetMetaFileBits(void)
mh
->
mtHeaderSize
=
0
;
SetLastError
(
0xdeadbeef
);
hmf
=
SetMetaFileBitsEx
(
sizeof
(
MF_GRAPHICS_BITS
),
buf
);
trace
(
"hmf %p
\n
"
,
hmf
);
ok
(
!
hmf
,
"SetMetaFileBitsEx should fail
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_DATA
||
broken
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
),
/* Win9x */
...
...
@@ -1527,6 +1531,7 @@ static void test_SetMetaFileBits(void)
/* corruption of mtSize doesn't lead to a failure */
mh
->
mtSize
*=
2
;
hmf
=
SetMetaFileBitsEx
(
sizeof
(
MF_GRAPHICS_BITS
),
buf
);
trace
(
"hmf %p
\n
"
,
hmf
);
ok
(
hmf
!=
0
,
"SetMetaFileBitsEx error %d
\n
"
,
GetLastError
());
if
(
compare_mf_bits
(
hmf
,
MF_GRAPHICS_BITS
,
sizeof
(
MF_GRAPHICS_BITS
),
"mf_Graphics"
)
!=
0
)
...
...
@@ -1544,6 +1549,7 @@ static void test_SetMetaFileBits(void)
/* zeroing mtSize doesn't lead to a failure */
mh
->
mtSize
=
0
;
hmf
=
SetMetaFileBitsEx
(
sizeof
(
MF_GRAPHICS_BITS
),
buf
);
trace
(
"hmf %p
\n
"
,
hmf
);
ok
(
hmf
!=
0
,
"SetMetaFileBitsEx error %d
\n
"
,
GetLastError
());
if
(
compare_mf_bits
(
hmf
,
MF_GRAPHICS_BITS
,
sizeof
(
MF_GRAPHICS_BITS
),
"mf_Graphics"
)
!=
0
)
...
...
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