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
f81c2e1c
Commit
f81c2e1c
authored
Oct 16, 2013
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Oct 16, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32/tests: Fix pen tests compilation with __WINESRC__ defined.
parent
0c63f40b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
23 deletions
+23
-23
pen.c
dlls/gdi32/tests/pen.c
+23
-23
No files found.
dlls/gdi32/tests/pen.c
View file @
f81c2e1c
...
...
@@ -95,7 +95,7 @@ static void test_logpen(void)
memset
(
&
lp
,
0xb0
,
sizeof
(
lp
));
SetLastError
(
0xdeadbeef
);
size
=
GetObject
(
hpen
,
sizeof
(
lp
),
&
lp
);
size
=
GetObject
W
(
hpen
,
sizeof
(
lp
),
&
lp
);
ok
(
size
==
sizeof
(
lp
),
"GetObject returned %d, error %d
\n
"
,
size
,
GetLastError
());
ok
(
lp
.
lopnStyle
==
pen
[
i
].
ret_style
,
"expected %u, got %u
\n
"
,
pen
[
i
].
ret_style
,
lp
.
lopnStyle
);
...
...
@@ -114,30 +114,30 @@ static void test_logpen(void)
ok
(
obj_type
==
OBJ_PEN
,
"wrong object type %u
\n
"
,
obj_type
);
/* check what's the real size of the object */
size
=
GetObject
(
hpen
,
0
,
NULL
);
size
=
GetObject
W
(
hpen
,
0
,
NULL
);
ok
(
size
==
sizeof
(
lp
),
"GetObject returned %d, error %d
\n
"
,
size
,
GetLastError
());
/* ask for truncated data */
memset
(
&
lp
,
0xb0
,
sizeof
(
lp
));
SetLastError
(
0xdeadbeef
);
size
=
GetObject
(
hpen
,
sizeof
(
lp
.
lopnStyle
),
&
lp
);
size
=
GetObject
W
(
hpen
,
sizeof
(
lp
.
lopnStyle
),
&
lp
);
ok
(
!
size
,
"GetObject should fail: size %d, error %d
\n
"
,
size
,
GetLastError
());
/* see how larger buffer sizes are handled */
memset
(
&
lp
,
0xb0
,
sizeof
(
lp
));
SetLastError
(
0xdeadbeef
);
size
=
GetObject
(
hpen
,
sizeof
(
lp
)
*
4
,
&
lp
);
size
=
GetObject
W
(
hpen
,
sizeof
(
lp
)
*
4
,
&
lp
);
ok
(
size
==
sizeof
(
lp
),
"GetObject returned %d, error %d
\n
"
,
size
,
GetLastError
());
/* see how larger buffer sizes are handled */
memset
(
&
elp
,
0xb0
,
sizeof
(
elp
));
SetLastError
(
0xdeadbeef
);
size
=
GetObject
(
hpen
,
sizeof
(
elp
)
*
2
,
&
elp
);
size
=
GetObject
W
(
hpen
,
sizeof
(
elp
)
*
2
,
&
elp
);
ok
(
size
==
sizeof
(
lp
),
"GetObject returned %d, error %d
\n
"
,
size
,
GetLastError
());
memset
(
&
lp
,
0xb0
,
sizeof
(
lp
));
SetLastError
(
0xdeadbeef
);
size
=
GetObject
(
hpen
,
sizeof
(
lp
),
&
lp
);
size
=
GetObject
W
(
hpen
,
sizeof
(
lp
),
&
lp
);
ok
(
size
==
sizeof
(
lp
),
"GetObject returned %d, error %d
\n
"
,
size
,
GetLastError
());
ok
(
lp
.
lopnStyle
==
pen
[
i
].
ret_style
,
"expected %u, got %u
\n
"
,
pen
[
i
].
ret_style
,
lp
.
lopnStyle
);
...
...
@@ -147,7 +147,7 @@ static void test_logpen(void)
memset
(
&
elp
,
0xb0
,
sizeof
(
elp
));
SetLastError
(
0xdeadbeef
);
size
=
GetObject
(
hpen
,
sizeof
(
elp
),
&
elp
);
size
=
GetObject
W
(
hpen
,
sizeof
(
elp
),
&
elp
);
/* for some reason XP differentiates PS_NULL here */
if
(
pen
[
i
].
style
==
PS_NULL
)
...
...
@@ -231,7 +231,7 @@ static void test_logpen(void)
/* check what's the real size of the object */
SetLastError
(
0xdeadbeef
);
size
=
GetObject
(
hpen
,
0
,
NULL
);
size
=
GetObject
W
(
hpen
,
0
,
NULL
);
switch
(
pen
[
i
].
style
)
{
case
PS_NULL
:
...
...
@@ -253,13 +253,13 @@ static void test_logpen(void)
/* ask for truncated data */
memset
(
&
elp
,
0xb0
,
sizeof
(
elp
));
SetLastError
(
0xdeadbeef
);
size
=
GetObject
(
hpen
,
sizeof
(
elp
.
elpPenStyle
),
&
elp
);
size
=
GetObject
W
(
hpen
,
sizeof
(
elp
.
elpPenStyle
),
&
elp
);
ok
(
!
size
,
"GetObject should fail: size %d, error %d
\n
"
,
size
,
GetLastError
());
/* see how larger buffer sizes are handled */
memset
(
elp_buffer
,
0xb0
,
sizeof
(
elp_buffer
));
SetLastError
(
0xdeadbeef
);
size
=
GetObject
(
hpen
,
sizeof
(
elp_buffer
),
elp_buffer
);
size
=
GetObject
W
(
hpen
,
sizeof
(
elp_buffer
),
elp_buffer
);
switch
(
pen
[
i
].
style
)
{
case
PS_NULL
:
...
...
@@ -275,7 +275,7 @@ static void test_logpen(void)
memset
(
&
elp
,
0xb0
,
sizeof
(
elp
));
memset
(
&
unset_hatch
,
0xb0
,
sizeof
(
unset_hatch
));
SetLastError
(
0xdeadbeef
);
size
=
GetObject
(
hpen
,
sizeof
(
elp
),
&
elp
);
size
=
GetObject
W
(
hpen
,
sizeof
(
elp
),
&
elp
);
ok
(
size
==
offsetof
(
EXTLOGPEN
,
elpStyleEntry
[
1
]),
"GetObject returned %d, error %d
\n
"
,
size
,
GetLastError
());
ok
(
ext_pen
->
elpHatch
==
unset_hatch
,
"expected 0xb0b0b0b0, got %p
\n
"
,
(
void
*
)
ext_pen
->
elpHatch
);
...
...
@@ -341,7 +341,7 @@ test_geometric_pens:
ok
(
obj_type
==
OBJ_EXTPEN
,
"wrong object type %u
\n
"
,
obj_type
);
/* check what's the real size of the object */
size
=
GetObject
(
hpen
,
0
,
NULL
);
size
=
GetObject
W
(
hpen
,
0
,
NULL
);
switch
(
pen
[
i
].
style
)
{
case
PS_NULL
:
...
...
@@ -363,12 +363,12 @@ test_geometric_pens:
/* ask for truncated data */
memset
(
&
lp
,
0xb0
,
sizeof
(
lp
));
SetLastError
(
0xdeadbeef
);
size
=
GetObject
(
hpen
,
sizeof
(
lp
.
lopnStyle
),
&
lp
);
size
=
GetObject
W
(
hpen
,
sizeof
(
lp
.
lopnStyle
),
&
lp
);
ok
(
!
size
,
"GetObject should fail: size %d, error %d
\n
"
,
size
,
GetLastError
());
memset
(
&
lp
,
0xb0
,
sizeof
(
lp
));
SetLastError
(
0xdeadbeef
);
size
=
GetObject
(
hpen
,
sizeof
(
lp
),
&
lp
);
size
=
GetObject
W
(
hpen
,
sizeof
(
lp
),
&
lp
);
/* for some reason XP differentiates PS_NULL here */
if
(
pen
[
i
].
style
==
PS_NULL
)
{
...
...
@@ -386,7 +386,7 @@ test_geometric_pens:
memset
(
elp_buffer
,
0xb0
,
sizeof
(
elp_buffer
));
SetLastError
(
0xdeadbeef
);
/* buffer is too small for user styles */
size
=
GetObject
(
hpen
,
offsetof
(
EXTLOGPEN
,
elpStyleEntry
[
1
]),
elp_buffer
);
size
=
GetObject
W
(
hpen
,
offsetof
(
EXTLOGPEN
,
elpStyleEntry
[
1
]),
elp_buffer
);
switch
(
pen
[
i
].
style
)
{
case
PS_NULL
:
...
...
@@ -397,7 +397,7 @@ test_geometric_pens:
/* for PS_NULL it also works this way */
SetLastError
(
0xdeadbeef
);
size
=
GetObject
(
hpen
,
sizeof
(
elp_buffer
),
&
lp
);
size
=
GetObject
W
(
hpen
,
sizeof
(
elp_buffer
),
&
lp
);
ok
(
size
==
sizeof
(
LOGPEN
),
"GetObject returned %d, error %d
\n
"
,
size
,
GetLastError
());
ok
(
lp
.
lopnStyle
==
pen
[
i
].
ret_style
,
"expected %u, got %u
\n
"
,
pen
[
i
].
ret_style
,
lp
.
lopnStyle
);
...
...
@@ -409,7 +409,7 @@ test_geometric_pens:
case
PS_USERSTYLE
:
ok
(
!
size
/*&& GetLastError() == ERROR_INVALID_PARAMETER*/
,
"GetObject should fail: size %d, error %d
\n
"
,
size
,
GetLastError
());
size
=
GetObject
(
hpen
,
sizeof
(
elp_buffer
),
elp_buffer
);
size
=
GetObject
W
(
hpen
,
sizeof
(
elp_buffer
),
elp_buffer
);
ok
(
size
==
offsetof
(
EXTLOGPEN
,
elpStyleEntry
[
2
]
),
"GetObject returned %d, error %d
\n
"
,
size
,
GetLastError
());
ok
(
ext_pen
->
elpHatch
==
HS_CROSS
,
"expected HS_CROSS, got %p
\n
"
,
(
void
*
)
ext_pen
->
elpHatch
);
...
...
@@ -558,7 +558,7 @@ static void test_ps_userstyle(void)
pen
=
ExtCreatePen
(
PS_GEOMETRIC
|
PS_USERSTYLE
,
50
,
&
lb
,
16
,
style
);
ok
(
pen
!=
0
,
"ExtCreatePen should not fail
\n
"
);
size
=
GetObject
(
pen
,
sizeof
(
buffer
),
ext_pen
);
size
=
GetObject
W
(
pen
,
sizeof
(
buffer
),
ext_pen
);
ok
(
size
==
offsetof
(
EXTLOGPEN
,
elpStyleEntry
[
16
]),
"wrong size %d
\n
"
,
size
);
for
(
i
=
0
;
i
<
16
;
i
++
)
...
...
@@ -601,7 +601,7 @@ static void test_brush_pens(void)
lb
.
lbHatch
=
HS_CROSS
;
pen
=
ExtCreatePen
(
PS_DOT
|
PS_GEOMETRIC
,
3
,
&
lb
,
0
,
NULL
);
ok
(
pen
!=
0
,
"ExtCreatePen failed err %u
\n
"
,
GetLastError
()
);
size
=
GetObject
(
pen
,
sizeof
(
buffer
),
elp
);
size
=
GetObject
W
(
pen
,
sizeof
(
buffer
),
elp
);
ok
(
size
==
offsetof
(
EXTLOGPEN
,
elpStyleEntry
),
"wrong size %u
\n
"
,
size
);
ok
(
elp
->
elpPenStyle
==
(
PS_DOT
|
PS_GEOMETRIC
),
"wrong pen style %x
\n
"
,
elp
->
elpPenStyle
);
ok
(
elp
->
elpBrushStyle
==
lb
.
lbStyle
,
"wrong brush style %x
\n
"
,
elp
->
elpBrushStyle
);
...
...
@@ -613,7 +613,7 @@ static void test_brush_pens(void)
case
BS_NULL
:
pen
=
ExtCreatePen
(
PS_SOLID
|
PS_GEOMETRIC
,
3
,
&
lb
,
0
,
NULL
);
ok
(
pen
!=
0
,
"ExtCreatePen failed err %u
\n
"
,
GetLastError
()
);
size
=
GetObject
(
pen
,
sizeof
(
buffer
),
elp
);
size
=
GetObject
W
(
pen
,
sizeof
(
buffer
),
elp
);
ok
(
size
==
sizeof
(
LOGPEN
),
"wrong size %u
\n
"
,
size
);
ok
(
((
LOGPEN
*
)
elp
)
->
lopnStyle
==
PS_NULL
,
"wrong pen style %x
\n
"
,
((
LOGPEN
*
)
elp
)
->
lopnStyle
);
...
...
@@ -626,7 +626,7 @@ static void test_brush_pens(void)
lb
.
lbHatch
=
(
ULONG_PTR
)
bmp
;
pen
=
ExtCreatePen
(
PS_DOT
|
PS_GEOMETRIC
,
3
,
&
lb
,
0
,
NULL
);
ok
(
pen
!=
0
,
"ExtCreatePen failed err %u
\n
"
,
GetLastError
()
);
size
=
GetObject
(
pen
,
sizeof
(
buffer
),
elp
);
size
=
GetObject
W
(
pen
,
sizeof
(
buffer
),
elp
);
ok
(
size
==
offsetof
(
EXTLOGPEN
,
elpStyleEntry
),
"wrong size %u
\n
"
,
size
);
ok
(
elp
->
elpPenStyle
==
(
PS_DOT
|
PS_GEOMETRIC
),
"wrong pen style %x
\n
"
,
elp
->
elpPenStyle
);
ok
(
elp
->
elpBrushStyle
==
BS_PATTERN
,
"wrong brush style %x
\n
"
,
elp
->
elpBrushStyle
);
...
...
@@ -641,7 +641,7 @@ static void test_brush_pens(void)
lb
.
lbHatch
=
lb
.
lbStyle
==
BS_DIBPATTERN
?
(
ULONG_PTR
)
hmem
:
(
ULONG_PTR
)
info
;
pen
=
ExtCreatePen
(
PS_DOT
|
PS_GEOMETRIC
,
3
,
&
lb
,
0
,
NULL
);
ok
(
pen
!=
0
,
"ExtCreatePen failed err %u
\n
"
,
GetLastError
()
);
size
=
GetObject
(
pen
,
sizeof
(
buffer
),
elp
);
size
=
GetObject
W
(
pen
,
sizeof
(
buffer
),
elp
);
ok
(
size
==
offsetof
(
EXTLOGPEN
,
elpStyleEntry
),
"wrong size %u
\n
"
,
size
);
ok
(
elp
->
elpPenStyle
==
(
PS_DOT
|
PS_GEOMETRIC
),
"wrong pen style %x
\n
"
,
elp
->
elpPenStyle
);
ok
(
elp
->
elpBrushStyle
==
BS_DIBPATTERNPT
,
"wrong brush style %x
\n
"
,
elp
->
elpBrushStyle
);
...
...
@@ -667,7 +667,7 @@ static void test_brush_pens(void)
if
(
lb
.
lbStyle
==
BS_SOLID
)
{
ok
(
pen
!=
0
,
"ExtCreatePen failed err %u
\n
"
,
GetLastError
()
);
size
=
GetObject
(
pen
,
sizeof
(
buffer
),
elp
);
size
=
GetObject
W
(
pen
,
sizeof
(
buffer
),
elp
);
ok
(
size
==
offsetof
(
EXTLOGPEN
,
elpStyleEntry
),
"wrong size %u
\n
"
,
size
);
ok
(
elp
->
elpPenStyle
==
PS_DOT
,
"wrong pen style %x
\n
"
,
elp
->
elpPenStyle
);
ok
(
elp
->
elpBrushStyle
==
BS_SOLID
,
"wrong brush style %x
\n
"
,
elp
->
elpBrushStyle
);
...
...
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