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
b8711acb
Commit
b8711acb
authored
Aug 27, 2008
by
Nikolay Sivov
Committed by
Alexandre Julliard
Aug 28, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Added test shows that CombineModeReplace actually replaces data.
parent
0df5fb50
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
4 deletions
+35
-4
region.c
dlls/gdiplus/tests/region.c
+35
-4
No files found.
dlls/gdiplus/tests/region.c
View file @
b8711acb
...
...
@@ -35,10 +35,7 @@
#define expect_magic(value) ok(*value == RGNDATA_MAGIC || *value == RGNDATA_MAGIC2, "Expected a known magic value, got %8x\n", *value)
static
inline
void
expect_dword
(
DWORD
*
value
,
DWORD
expected
)
{
ok
(
*
value
==
expected
,
"expected %08x got %08x
\n
"
,
expected
,
*
value
);
}
#define expect_dword(value, expected) ok(*(value) == expected, "expected %08x got %08x\n", expected, *(value))
static
inline
void
expect_float
(
DWORD
*
value
,
FLOAT
expected
)
{
...
...
@@ -553,6 +550,39 @@ static void test_isempty(void)
ReleaseDC
(
0
,
hdc
);
}
static
void
test_combinereplace
(
void
)
{
GpStatus
status
;
GpRegion
*
region
;
GpRectF
rectf
;
UINT
needed
;
DWORD
buf
[
10
];
rectf
.
X
=
rectf
.
Y
=
0
.
0
;
rectf
.
Width
=
rectf
.
Height
=
100
.
0
;
status
=
GdipCreateRegionRect
(
&
rectf
,
&
region
);
expect
(
Ok
,
status
);
/* replace with the same rectangle */
status
=
GdipCombineRegionRect
(
region
,
&
rectf
,
CombineModeReplace
);
expect
(
Ok
,
status
);
status
=
GdipGetRegionDataSize
(
region
,
&
needed
);
expect
(
Ok
,
status
);
todo_wine
expect
(
36
,
needed
);
status
=
GdipGetRegionData
(
region
,
(
BYTE
*
)
buf
,
sizeof
(
buf
),
&
needed
);
expect
(
Ok
,
status
);
todo_wine
expect
(
36
,
needed
);
todo_wine
expect_dword
(
buf
,
28
);
trace
(
"buf[1] = %08x
\n
"
,
buf
[
1
]);
expect_magic
((
DWORD
*
)(
buf
+
2
));
todo_wine
expect_dword
(
buf
+
3
,
0
);
todo_wine
expect_dword
(
buf
+
4
,
RGNDATA_RECT
);
GdipDeleteRegion
(
region
);
}
START_TEST
(
region
)
{
struct
GdiplusStartupInput
gdiplusStartupInput
;
...
...
@@ -568,6 +598,7 @@ START_TEST(region)
test_getregiondata
();
test_isinfinite
();
test_isempty
();
test_combinereplace
();
GdiplusShutdown
(
gdiplusToken
);
...
...
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