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
6a12d679
Commit
6a12d679
authored
Jan 23, 2007
by
Hans Leidekker
Committed by
Alexandre Julliard
Jan 24, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usp10: Remove duplicate font selection code from the tests.
parent
7670d766
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
40 deletions
+10
-40
usp10.c
dlls/usp10/tests/usp10.c
+10
-40
No files found.
dlls/usp10/tests/usp10.c
View file @
6a12d679
...
@@ -61,23 +61,8 @@ static void test_ScriptItemIzeShapePlace(HDC hdc, unsigned short pwOutGlyphs[256
...
@@ -61,23 +61,8 @@ static void test_ScriptItemIzeShapePlace(HDC hdc, unsigned short pwOutGlyphs[256
int
piAdvance
[
256
];
int
piAdvance
[
256
];
GOFFSET
pGoffset
[
256
];
GOFFSET
pGoffset
[
256
];
ABC
pABC
[
256
];
ABC
pABC
[
256
];
LOGFONTA
lf
;
HFONT
zfont
;
int
cnt
;
int
cnt
;
lstrcpyA
(
lf
.
lfFaceName
,
"Symbol"
);
lf
.
lfHeight
=
10
;
lf
.
lfItalic
=
0
;
lf
.
lfEscapement
=
0
;
lf
.
lfOrientation
=
0
;
lf
.
lfUnderline
=
0
;
lf
.
lfStrikeOut
=
0
;
lf
.
lfWeight
=
3
;
lf
.
lfWidth
=
10
;
zfont
=
(
HFONT
)
SelectObject
(
hdc
,
CreateFontIndirectA
(
&
lf
));
/* Start testing usp10 functions */
/* Start testing usp10 functions */
/* This test determines that the pointer returned by ScriptGetProperties is valid
/* This test determines that the pointer returned by ScriptGetProperties is valid
* by checking a known value in the table */
* by checking a known value in the table */
...
@@ -711,23 +696,6 @@ static void test_ScriptStringXtoCP_CPtoX(HDC hdc)
...
@@ -711,23 +696,6 @@ static void test_ScriptStringXtoCP_CPtoX(HDC hdc)
int
X
;
int
X
;
BOOL
fTrailing
;
BOOL
fTrailing
;
LOGFONTA
lf
;
HFONT
zfont
;
lstrcpyA
(
lf
.
lfFaceName
,
"Symbol"
);
lf
.
lfHeight
=
10
;
lf
.
lfCharSet
=
0
;
lf
.
lfItalic
=
0
;
lf
.
lfEscapement
=
0
;
lf
.
lfOrientation
=
0
;
lf
.
lfUnderline
=
0
;
lf
.
lfStrikeOut
=
0
;
lf
.
lfWeight
=
400
;
lf
.
lfWidth
=
0
;
lf
.
lfPitchAndFamily
=
0
;
zfont
=
(
HFONT
)
SelectObject
(
hdc
,
CreateFontIndirectA
(
&
lf
));
/* Test with hdc, this should be a valid test
/* Test with hdc, this should be a valid test
* Here we generrate an SCRIPT_STRING_ANALYSIS that will be used as input to the
* Here we generrate an SCRIPT_STRING_ANALYSIS that will be used as input to the
* following character positions to X and X to character position functions.
* following character positions to X and X to character position functions.
...
@@ -880,17 +848,9 @@ static void test_ScriptCacheGetHeight(HDC hdc)
...
@@ -880,17 +848,9 @@ static void test_ScriptCacheGetHeight(HDC hdc)
static
void
test_ScriptGetGlyphABCWidth
(
HDC
hdc
)
static
void
test_ScriptGetGlyphABCWidth
(
HDC
hdc
)
{
{
HRESULT
hr
;
HRESULT
hr
;
LOGFONTA
lf
;
HFONT
hfont
;
SCRIPT_CACHE
sc
=
NULL
;
SCRIPT_CACHE
sc
=
NULL
;
ABC
abc
;
ABC
abc
;
memset
(
&
lf
,
0
,
sizeof
(
lf
));
lstrcpyA
(
lf
.
lfFaceName
,
"Symbol"
);
hfont
=
CreateFontIndirectA
(
&
lf
);
hfont
=
SelectObject
(
hdc
,
hfont
);
hr
=
ScriptGetGlyphABCWidth
(
NULL
,
NULL
,
'a'
,
NULL
);
hr
=
ScriptGetGlyphABCWidth
(
NULL
,
NULL
,
'a'
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG, got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG, got 0x%08x
\n
"
,
hr
);
...
@@ -1239,6 +1199,8 @@ START_TEST(usp10)
...
@@ -1239,6 +1199,8 @@ START_TEST(usp10)
{
{
HWND
hwnd
;
HWND
hwnd
;
HDC
hdc
;
HDC
hdc
;
LOGFONTA
lf
;
HFONT
hfont
;
unsigned
short
pwOutGlyphs
[
256
];
unsigned
short
pwOutGlyphs
[
256
];
...
@@ -1253,6 +1215,14 @@ START_TEST(usp10)
...
@@ -1253,6 +1215,14 @@ START_TEST(usp10)
hdc
=
GetDC
(
hwnd
);
/* We now have a hdc */
hdc
=
GetDC
(
hwnd
);
/* We now have a hdc */
ok
(
hdc
!=
NULL
,
"HDC failed to be created %p
\n
"
,
hdc
);
ok
(
hdc
!=
NULL
,
"HDC failed to be created %p
\n
"
,
hdc
);
memset
(
&
lf
,
0
,
sizeof
(
HFONT
));
lstrcpyA
(
lf
.
lfFaceName
,
"Symbol"
);
lf
.
lfHeight
=
10
;
lf
.
lfWeight
=
3
;
lf
.
lfWidth
=
10
;
hfont
=
SelectObject
(
hdc
,
CreateFontIndirectA
(
&
lf
));
test_ScriptItemIzeShapePlace
(
hdc
,
pwOutGlyphs
);
test_ScriptItemIzeShapePlace
(
hdc
,
pwOutGlyphs
);
test_ScriptGetCMap
(
hdc
,
pwOutGlyphs
);
test_ScriptGetCMap
(
hdc
,
pwOutGlyphs
);
test_ScriptCacheGetHeight
(
hdc
);
test_ScriptCacheGetHeight
(
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