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
bd53a012
Commit
bd53a012
authored
Jun 16, 2016
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32/tests: Add a few more path tests.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a2aeb369
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
5 deletions
+48
-5
path.c
dlls/gdi32/tests/path.c
+48
-5
No files found.
dlls/gdi32/tests/path.c
View file @
bd53a012
...
...
@@ -38,6 +38,7 @@ static void test_path_state(void)
BYTE
buffer
[
sizeof
(
BITMAPINFO
)
+
256
*
sizeof
(
RGBQUAD
)];
BITMAPINFO
*
bi
=
(
BITMAPINFO
*
)
buffer
;
HDC
hdc
;
HRGN
rgn
;
HBITMAP
orig
,
dib
;
void
*
bits
;
BOOL
ret
;
...
...
@@ -139,6 +140,12 @@ static void test_path_state(void)
"wrong error %u
\n
"
,
GetLastError
()
);
SetLastError
(
0xdeadbeef
);
rgn
=
PathToRegion
(
hdc
);
ok
(
!
rgn
,
"PathToRegion succeeded
\n
"
);
ok
(
GetLastError
()
==
ERROR_CAN_NOT_COMPLETE
||
broken
(
GetLastError
()
==
0xdeadbeef
),
"wrong error %u
\n
"
,
GetLastError
()
);
SetLastError
(
0xdeadbeef
);
ret
=
EndPath
(
hdc
);
ok
(
!
ret
,
"SelectClipPath succeeded
\n
"
);
ok
(
GetLastError
()
==
ERROR_CAN_NOT_COMPLETE
||
broken
(
GetLastError
()
==
0xdeadbeef
),
...
...
@@ -202,6 +209,15 @@ static void test_path_state(void)
AbortPath
(
hdc
);
BeginPath
(
hdc
);
Rectangle
(
hdc
,
1
,
1
,
10
,
10
);
/* region needs some contents */
SetLastError
(
0xdeadbeef
);
rgn
=
PathToRegion
(
hdc
);
ok
(
!
rgn
,
"PathToRegion succeeded
\n
"
);
ok
(
GetLastError
()
==
ERROR_CAN_NOT_COMPLETE
||
broken
(
GetLastError
()
==
0xdeadbeef
),
"wrong error %u
\n
"
,
GetLastError
()
);
AbortPath
(
hdc
);
BeginPath
(
hdc
);
ret
=
CloseFigure
(
hdc
);
ok
(
ret
,
"CloseFigure failed
\n
"
);
...
...
@@ -211,39 +227,66 @@ static void test_path_state(void)
EndPath
(
hdc
);
ret
=
WidenPath
(
hdc
);
ok
(
ret
,
"WidenPath failed
\n
"
);
ok
(
GetPath
(
hdc
,
NULL
,
NULL
,
0
)
!=
-
1
,
"path deleted
\n
"
);
AbortPath
(
hdc
);
BeginPath
(
hdc
);
EndPath
(
hdc
);
ret
=
FlattenPath
(
hdc
);
ok
(
ret
,
"FlattenPath failed
\n
"
);
ok
(
GetPath
(
hdc
,
NULL
,
NULL
,
0
)
!=
-
1
,
"path deleted
\n
"
);
AbortPath
(
hdc
);
BeginPath
(
hdc
);
EndPath
(
hdc
);
ret
=
StrokePath
(
hdc
);
ok
(
ret
,
"StrokePath failed
\n
"
);
ok
(
GetPath
(
hdc
,
NULL
,
NULL
,
0
)
==
-
1
,
"path not deleted
\n
"
);
AbortPath
(
hdc
);
BeginPath
(
hdc
);
EndPath
(
hdc
);
ret
=
FillPath
(
hdc
);
ok
(
ret
,
"FillPath failed
\n
"
);
ok
(
GetPath
(
hdc
,
NULL
,
NULL
,
0
)
==
-
1
,
"path not deleted
\n
"
);
AbortPath
(
hdc
);
BeginPath
(
hdc
);
EndPath
(
hdc
);
ret
=
StrokeAndFillPath
(
hdc
);
ok
(
ret
,
"StrokeAndFillPath failed
\n
"
);
ok
(
GetPath
(
hdc
,
NULL
,
NULL
,
0
)
==
-
1
,
"path not deleted
\n
"
);
AbortPath
(
hdc
);
BeginPath
(
hdc
);
Rectangle
(
hdc
,
1
,
1
,
10
,
10
);
/* region needs some contents */
EndPath
(
hdc
);
ret
=
SelectClipPath
(
hdc
,
RGN_OR
);
ok
(
ret
,
"SelectClipPath failed
\n
"
);
ok
(
GetPath
(
hdc
,
NULL
,
NULL
,
0
)
==
-
1
,
"path not deleted
\n
"
);
BeginPath
(
hdc
);
EndPath
(
hdc
);
SetLastError
(
0xdeadbeef
);
ret
=
SelectClipPath
(
hdc
,
RGN_OR
);
todo_wine
ok
(
!
ret
,
"SelectClipPath succeeded on empty path
\n
"
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"wrong error %u
\n
"
,
GetLastError
()
);
ok
(
GetPath
(
hdc
,
NULL
,
NULL
,
0
)
==
-
1
,
"path not deleted
\n
"
);
BeginPath
(
hdc
);
Rectangle
(
hdc
,
1
,
1
,
10
,
10
);
/* region needs some contents */
EndPath
(
hdc
);
rgn
=
PathToRegion
(
hdc
);
ok
(
rgn
!=
0
,
"PathToRegion failed
\n
"
);
DeleteObject
(
rgn
);
ok
(
GetPath
(
hdc
,
NULL
,
NULL
,
0
)
==
-
1
,
"path not deleted
\n
"
);
BeginPath
(
hdc
);
EndPath
(
hdc
);
SetLastError
(
0xdeadbeef
);
rgn
=
PathToRegion
(
hdc
);
todo_wine
ok
(
!
rgn
,
"PathToRegion succeeded on empty path
\n
"
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"wrong error %u
\n
"
,
GetLastError
()
);
DeleteObject
(
rgn
);
ok
(
GetPath
(
hdc
,
NULL
,
NULL
,
0
)
==
-
1
,
"path not deleted
\n
"
);
AbortPath
(
hdc
);
BeginPath
(
hdc
);
EndPath
(
hdc
);
SetLastError
(
0xdeadbeef
);
...
...
@@ -257,7 +300,7 @@ static void test_path_state(void)
EndPath
(
hdc
);
SetLastError
(
0xdeadbeef
);
ret
=
EndPath
(
hdc
);
ok
(
!
ret
,
"
SelectClip
Path succeeded
\n
"
);
ok
(
!
ret
,
"
End
Path succeeded
\n
"
);
ok
(
GetLastError
()
==
ERROR_CAN_NOT_COMPLETE
||
broken
(
GetLastError
()
==
0xdeadbeef
),
"wrong error %u
\n
"
,
GetLastError
()
);
...
...
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