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
3668edcd
Commit
3668edcd
authored
Mar 13, 2009
by
Paul Vriens
Committed by
Alexandre Julliard
Mar 13, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32/tests: Fix some test failures on Win9x.
parent
ba50d150
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
6 deletions
+21
-6
pen.c
dlls/gdi32/tests/pen.c
+21
-6
No files found.
dlls/gdi32/tests/pen.c
View file @
3668edcd
...
@@ -93,7 +93,9 @@ static void test_logpen(void)
...
@@ -93,7 +93,9 @@ static void test_logpen(void)
ok
(
lp
.
lopnStyle
==
pen
[
i
].
ret_style
,
"expected %u, got %u
\n
"
,
pen
[
i
].
ret_style
,
lp
.
lopnStyle
);
ok
(
lp
.
lopnStyle
==
pen
[
i
].
ret_style
,
"expected %u, got %u
\n
"
,
pen
[
i
].
ret_style
,
lp
.
lopnStyle
);
ok
(
lp
.
lopnWidth
.
x
==
pen
[
i
].
ret_width
,
"expected %u, got %d
\n
"
,
pen
[
i
].
ret_width
,
lp
.
lopnWidth
.
x
);
ok
(
lp
.
lopnWidth
.
x
==
pen
[
i
].
ret_width
,
"expected %u, got %d
\n
"
,
pen
[
i
].
ret_width
,
lp
.
lopnWidth
.
x
);
ok
(
lp
.
lopnWidth
.
y
==
0
,
"expected 0, got %d
\n
"
,
lp
.
lopnWidth
.
y
);
ok
(
lp
.
lopnWidth
.
y
==
0
||
broken
(
lp
.
lopnWidth
.
y
==
0xb
),
/* Win9x */
"expected 0, got %d
\n
"
,
lp
.
lopnWidth
.
y
);
ok
(
lp
.
lopnColor
==
pen
[
i
].
ret_color
,
"expected %08x, got %08x
\n
"
,
pen
[
i
].
ret_color
,
lp
.
lopnColor
);
ok
(
lp
.
lopnColor
==
pen
[
i
].
ret_color
,
"expected %08x, got %08x
\n
"
,
pen
[
i
].
ret_color
,
lp
.
lopnColor
);
DeleteObject
(
hpen
);
DeleteObject
(
hpen
);
...
@@ -114,7 +116,9 @@ static void test_logpen(void)
...
@@ -114,7 +116,9 @@ static void test_logpen(void)
memset
(
&
lp
,
0xb0
,
sizeof
(
lp
));
memset
(
&
lp
,
0xb0
,
sizeof
(
lp
));
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
size
=
GetObject
(
hpen
,
sizeof
(
lp
.
lopnStyle
),
&
lp
);
size
=
GetObject
(
hpen
,
sizeof
(
lp
.
lopnStyle
),
&
lp
);
ok
(
!
size
,
"GetObject should fail: size %d, error %d
\n
"
,
size
,
GetLastError
());
ok
(
!
size
||
broken
(
size
==
sizeof
(
lp
.
lopnStyle
)),
/* Win9x */
"GetObject should fail: size %d, error %d
\n
"
,
size
,
GetLastError
());
/* see how larger buffer sizes are handled */
/* see how larger buffer sizes are handled */
memset
(
&
lp
,
0xb0
,
sizeof
(
lp
));
memset
(
&
lp
,
0xb0
,
sizeof
(
lp
));
...
@@ -226,12 +230,17 @@ static void test_logpen(void)
...
@@ -226,12 +230,17 @@ static void test_logpen(void)
break
;
break
;
case
PS_USERSTYLE
:
case
PS_USERSTYLE
:
ok
(
size
==
sizeof
(
EXTLOGPEN
)
-
sizeof
(
elp
.
elpStyleEntry
)
+
sizeof
(
user_style
),
ok
(
size
==
sizeof
(
EXTLOGPEN
)
-
sizeof
(
elp
.
elpStyleEntry
)
+
sizeof
(
user_style
)
||
broken
(
size
==
0
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
),
/* Win9x */
"GetObject returned %d, error %d
\n
"
,
size
,
GetLastError
());
"GetObject returned %d, error %d
\n
"
,
size
,
GetLastError
());
break
;
break
;
default:
default:
ok
(
size
==
sizeof
(
EXTLOGPEN
)
-
sizeof
(
elp
.
elpStyleEntry
),
ok
(
size
==
sizeof
(
EXTLOGPEN
)
-
sizeof
(
elp
.
elpStyleEntry
)
||
broken
(
size
==
sizeof
(
LOGPEN
))
||
/* Win9x */
broken
(
pen
[
i
].
style
==
PS_ALTERNATE
&&
size
==
0
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
),
/* Win9x */
"GetObject returned %d, error %d
\n
"
,
size
,
GetLastError
());
"GetObject returned %d, error %d
\n
"
,
size
,
GetLastError
());
break
;
break
;
}
}
...
@@ -240,7 +249,9 @@ static void test_logpen(void)
...
@@ -240,7 +249,9 @@ static void test_logpen(void)
memset
(
&
elp
,
0xb0
,
sizeof
(
elp
));
memset
(
&
elp
,
0xb0
,
sizeof
(
elp
));
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
size
=
GetObject
(
hpen
,
sizeof
(
elp
.
elpPenStyle
),
&
elp
);
size
=
GetObject
(
hpen
,
sizeof
(
elp
.
elpPenStyle
),
&
elp
);
ok
(
!
size
,
"GetObject should fail: size %d, error %d
\n
"
,
size
,
GetLastError
());
ok
(
!
size
||
broken
(
size
==
sizeof
(
elp
.
elpPenStyle
)),
/* Win9x */
"GetObject should fail: size %d, error %d
\n
"
,
size
,
GetLastError
());
/* see how larger buffer sizes are handled */
/* see how larger buffer sizes are handled */
memset
(
&
ext_pen
,
0xb0
,
sizeof
(
ext_pen
));
memset
(
&
ext_pen
,
0xb0
,
sizeof
(
ext_pen
));
...
@@ -278,7 +289,11 @@ static void test_logpen(void)
...
@@ -278,7 +289,11 @@ static void test_logpen(void)
break
;
break
;
default:
default:
ok
(
size
==
sizeof
(
EXTLOGPEN
)
-
sizeof
(
elp
.
elpStyleEntry
),
ok
(
size
==
sizeof
(
EXTLOGPEN
)
-
sizeof
(
elp
.
elpStyleEntry
)
||
broken
(
size
==
sizeof
(
LOGPEN
))
||
/* Win9x */
broken
(
pen
[
i
].
style
==
PS_ALTERNATE
&&
size
==
0
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
),
/* Win9x */
"GetObject returned %d, error %d
\n
"
,
size
,
GetLastError
());
"GetObject returned %d, error %d
\n
"
,
size
,
GetLastError
());
ok
(
ext_pen
.
elp
.
elpHatch
==
HS_CROSS
,
"expected HS_CROSS, got %p
\n
"
,
(
void
*
)
ext_pen
.
elp
.
elpHatch
);
ok
(
ext_pen
.
elp
.
elpHatch
==
HS_CROSS
,
"expected HS_CROSS, got %p
\n
"
,
(
void
*
)
ext_pen
.
elp
.
elpHatch
);
ok
(
ext_pen
.
elp
.
elpNumEntries
==
0
,
"expected 0, got %x
\n
"
,
ext_pen
.
elp
.
elpNumEntries
);
ok
(
ext_pen
.
elp
.
elpNumEntries
==
0
,
"expected 0, got %x
\n
"
,
ext_pen
.
elp
.
elpNumEntries
);
...
...
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