Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
0a44501a
Commit
0a44501a
authored
Oct 23, 2011
by
Thomas Faber
Committed by
Alexandre Julliard
Oct 24, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32/tests: Test GetTextExtentExPoint behavior with zero and negative max extent values.
parent
812c06ae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
font.c
dlls/gdi32/tests/font.c
+33
-0
No files found.
dlls/gdi32/tests/font.c
View file @
0a44501a
...
...
@@ -1133,6 +1133,39 @@ static void test_text_extents(void)
ret
=
GetTextExtentExPointW
(
hdc
,
wt
,
-
1
,
0
,
NULL
,
NULL
,
&
sz1
);
ok
(
ret
==
FALSE
,
"got %d
\n
"
,
ret
);
/* max_extent = 0 succeeds and returns zero */
fit1
=
fit2
=
-
215
;
ret
=
GetTextExtentExPointA
(
hdc
,
NULL
,
0
,
0
,
&
fit1
,
NULL
,
&
sz
);
ok
(
ret
==
TRUE
||
broken
(
ret
==
FALSE
),
/* NT4, 2k */
"got %d
\n
"
,
ret
);
ok
(
fit1
==
0
||
broken
(
fit1
==
-
215
),
/* NT4, 2k */
"fit = %d
\n
"
,
fit1
);
ret
=
GetTextExtentExPointW
(
hdc
,
NULL
,
0
,
0
,
&
fit2
,
NULL
,
&
sz1
);
ok
(
ret
==
TRUE
,
"got %d
\n
"
,
ret
);
ok
(
fit2
==
0
,
"fit = %d
\n
"
,
fit2
);
/* max_extent = -1 is interpreted as a very large width that will
* definitely fit our three characters */
fit1
=
fit2
=
-
215
;
ret
=
GetTextExtentExPointA
(
hdc
,
"One"
,
3
,
-
1
,
&
fit1
,
NULL
,
&
sz
);
ok
(
ret
==
TRUE
,
"got %d
\n
"
,
ret
);
todo_wine
ok
(
fit1
==
3
,
"fit = %d
\n
"
,
fit1
);
ret
=
GetTextExtentExPointW
(
hdc
,
wt
,
3
,
-
1
,
&
fit2
,
NULL
,
&
sz
);
ok
(
ret
==
TRUE
,
"got %d
\n
"
,
ret
);
todo_wine
ok
(
fit2
==
3
,
"fit = %d
\n
"
,
fit2
);
/* max_extent = -2 is interpreted similarly, but the Ansi version
* rejects it while the Unicode one accepts it */
fit1
=
fit2
=
-
215
;
ret
=
GetTextExtentExPointA
(
hdc
,
"One"
,
3
,
-
2
,
&
fit1
,
NULL
,
&
sz
);
todo_wine
ok
(
ret
==
FALSE
,
"got %d
\n
"
,
ret
);
todo_wine
ok
(
fit1
==
-
215
,
"fit = %d
\n
"
,
fit1
);
ret
=
GetTextExtentExPointW
(
hdc
,
wt
,
3
,
-
2
,
&
fit2
,
NULL
,
&
sz
);
ok
(
ret
==
TRUE
,
"got %d
\n
"
,
ret
);
todo_wine
ok
(
fit2
==
3
,
"fit = %d
\n
"
,
fit2
);
hfont
=
SelectObject
(
hdc
,
hfont
);
DeleteObject
(
hfont
);
ReleaseDC
(
NULL
,
hdc
);
...
...
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