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
c0682a26
Commit
c0682a26
authored
Jun 27, 2011
by
Vincent Povirk
Committed by
Alexandre Julliard
Jun 27, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Add test for GdipMeasureDriverString.
parent
5e97e229
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
77 additions
and
0 deletions
+77
-0
graphics.c
dlls/gdiplus/tests/graphics.c
+77
-0
No files found.
dlls/gdiplus/tests/graphics.c
View file @
c0682a26
...
...
@@ -2834,6 +2834,8 @@ static void test_string_functions(void)
GpRegion
*
regions
[
4
]
=
{
0
};
BOOL
region_isempty
[
4
];
int
i
;
PointF
position
;
GpMatrix
*
identity
;
ok
(
hdc
!=
NULL
,
"Expected HDC to be initialized
\n
"
);
status
=
GdipCreateFromHDC
(
hdc
,
&
graphics
);
...
...
@@ -3033,6 +3035,81 @@ static void test_string_functions(void)
for
(
i
=
0
;
i
<
4
;
i
++
)
GdipDeleteRegion
(
regions
[
i
]);
GdipCreateMatrix
(
&
identity
);
position
.
X
=
0
;
position
.
Y
=
0
;
rc
.
X
=
0
;
rc
.
Y
=
0
;
rc
.
Width
=
0
;
rc
.
Height
=
0
;
status
=
GdipMeasureDriverString
(
NULL
,
teststring
,
6
,
font
,
&
position
,
DriverStringOptionsCmapLookup
|
DriverStringOptionsRealizedAdvance
,
identity
,
&
rc
);
todo_wine
expect
(
InvalidParameter
,
status
);
status
=
GdipMeasureDriverString
(
graphics
,
NULL
,
6
,
font
,
&
position
,
DriverStringOptionsCmapLookup
|
DriverStringOptionsRealizedAdvance
,
identity
,
&
rc
);
todo_wine
expect
(
InvalidParameter
,
status
);
status
=
GdipMeasureDriverString
(
graphics
,
teststring
,
6
,
NULL
,
&
position
,
DriverStringOptionsCmapLookup
|
DriverStringOptionsRealizedAdvance
,
identity
,
&
rc
);
todo_wine
expect
(
InvalidParameter
,
status
);
status
=
GdipMeasureDriverString
(
graphics
,
teststring
,
6
,
font
,
NULL
,
DriverStringOptionsCmapLookup
|
DriverStringOptionsRealizedAdvance
,
identity
,
&
rc
);
todo_wine
expect
(
InvalidParameter
,
status
);
status
=
GdipMeasureDriverString
(
graphics
,
teststring
,
6
,
font
,
&
position
,
0x100
,
identity
,
&
rc
);
todo_wine
expect
(
Ok
,
status
);
status
=
GdipMeasureDriverString
(
graphics
,
teststring
,
6
,
font
,
&
position
,
DriverStringOptionsCmapLookup
|
DriverStringOptionsRealizedAdvance
,
NULL
,
&
rc
);
todo_wine
expect
(
Ok
,
status
);
status
=
GdipMeasureDriverString
(
graphics
,
teststring
,
6
,
font
,
&
position
,
DriverStringOptionsCmapLookup
|
DriverStringOptionsRealizedAdvance
,
identity
,
NULL
);
todo_wine
expect
(
InvalidParameter
,
status
);
rc
.
X
=
0
;
rc
.
Y
=
0
;
rc
.
Width
=
0
;
rc
.
Height
=
0
;
status
=
GdipMeasureDriverString
(
graphics
,
teststring
,
6
,
font
,
&
position
,
DriverStringOptionsCmapLookup
|
DriverStringOptionsRealizedAdvance
,
identity
,
&
rc
);
todo_wine
expect
(
Ok
,
status
);
expectf
(
rc
.
X
,
0
.
0
);
todo_wine
ok
(
rc
.
Y
<
0
.
0
,
"unexpected Y %0.2f
\n
"
,
rc
.
Y
);
todo_wine
ok
(
rc
.
Width
>
0
.
0
,
"unexpected Width %0.2f
\n
"
,
rc
.
Width
);
todo_wine
ok
(
rc
.
Height
>
0
.
0
,
"unexpected Y %0.2f
\n
"
,
rc
.
Y
);
char_width
=
rc
.
Width
;
char_height
=
rc
.
Height
;
rc
.
X
=
0
;
rc
.
Y
=
0
;
rc
.
Width
=
0
;
rc
.
Height
=
0
;
status
=
GdipMeasureDriverString
(
graphics
,
teststring
,
4
,
font
,
&
position
,
DriverStringOptionsCmapLookup
|
DriverStringOptionsRealizedAdvance
,
identity
,
&
rc
);
todo_wine
expect
(
Ok
,
status
);
expectf
(
rc
.
X
,
0
.
0
);
todo_wine
ok
(
rc
.
Y
<
0
.
0
,
"unexpected Y %0.2f
\n
"
,
rc
.
Y
);
todo_wine
ok
(
rc
.
Width
<
char_width
,
"got Width %0.2f, expecting less than %0.2f
\n
"
,
rc
.
Width
,
char_width
);
expectf
(
rc
.
Height
,
char_height
);
GdipDeleteMatrix
(
identity
);
GdipDeleteStringFormat
(
format
);
GdipDeleteBrush
(
brush
);
GdipDeleteFont
(
font
);
...
...
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