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
3658b845
Commit
3658b845
authored
Jan 11, 2011
by
Greg Geldorp
Committed by
Alexandre Julliard
Jan 11, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32/tests: Skip tests on unexpected font code page.
parent
2e5c0a3a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
5 deletions
+18
-5
font.c
dlls/gdi32/tests/font.c
+18
-5
No files found.
dlls/gdi32/tests/font.c
View file @
3658b845
...
...
@@ -1558,6 +1558,7 @@ static BOOL get_glyph_indices(INT charset, UINT code_page, WORD *idx, UINT count
INT
cs
;
DWORD
i
,
ret
;
char
name
[
64
];
DWORD
(
WINAPI
*
pGdiGetCodePage
)(
HDC
);
assert
(
count
<=
128
);
...
...
@@ -1599,6 +1600,16 @@ static BOOL get_glyph_indices(INT charset, UINT code_page, WORD *idx, UINT count
}
ok
(
csi
.
ciACP
==
code_page
,
"expected %d, got %d
\n
"
,
code_page
,
csi
.
ciACP
);
pGdiGetCodePage
=
(
void
*
)
GetProcAddress
(
GetModuleHandleA
(
"gdi32.dll"
),
"GdiGetCodePage"
);
if
(
pGdiGetCodePage
!=
NULL
&&
pGdiGetCodePage
(
hdc
)
!=
code_page
)
{
skip
(
"Font code page %d, looking for code page %d
\n
"
,
pGdiGetCodePage
(
hdc
),
code_page
);
ReleaseDC
(
0
,
hdc
);
return
FALSE
;
}
if
(
unicode
)
{
char
ansi_buf
[
128
];
...
...
@@ -1610,7 +1621,8 @@ static BOOL get_glyph_indices(INT charset, UINT code_page, WORD *idx, UINT count
SetLastError
(
0xdeadbeef
);
ret
=
pGetGlyphIndicesW
(
hdc
,
unicode_buf
,
count
,
idx
,
0
);
ok
(
ret
==
count
,
"GetGlyphIndicesW error %u
\n
"
,
GetLastError
());
ok
(
ret
==
count
,
"GetGlyphIndicesW expected %d got %d, error %u
\n
"
,
count
,
ret
,
GetLastError
());
}
else
{
...
...
@@ -1620,7 +1632,8 @@ static BOOL get_glyph_indices(INT charset, UINT code_page, WORD *idx, UINT count
SetLastError
(
0xdeadbeef
);
ret
=
pGetGlyphIndicesA
(
hdc
,
ansi_buf
,
count
,
idx
,
0
);
ok
(
ret
==
count
,
"GetGlyphIndicesA error %u
\n
"
,
GetLastError
());
ok
(
ret
==
count
,
"GetGlyphIndicesA expected %d got %d, error %u
\n
"
,
count
,
ret
,
GetLastError
());
}
SelectObject
(
hdc
,
hfont_old
);
...
...
@@ -1668,9 +1681,9 @@ static void test_font_charset(void)
break
;
}
}
get_glyph_indices
(
cd
[
i
].
charset
,
cd
[
i
].
code_page
,
cd
[
i
].
font_idxA
,
128
,
FALSE
);
get_glyph_indices
(
cd
[
i
].
charset
,
cd
[
i
].
code_page
,
cd
[
i
].
font_idxW
,
128
,
TRUE
);
ok
(
!
memcmp
(
cd
[
i
].
font_idxA
,
cd
[
i
].
font_idxW
,
128
*
sizeof
(
WORD
)),
"%d: indices don't match
\n
"
,
i
);
if
(
get_glyph_indices
(
cd
[
i
].
charset
,
cd
[
i
].
code_page
,
cd
[
i
].
font_idxA
,
128
,
FALSE
)
&&
get_glyph_indices
(
cd
[
i
].
charset
,
cd
[
i
].
code_page
,
cd
[
i
].
font_idxW
,
128
,
TRUE
))
ok
(
!
memcmp
(
cd
[
i
].
font_idxA
,
cd
[
i
].
font_idxW
,
128
*
sizeof
(
WORD
)),
"%d: indices don't match
\n
"
,
i
);
}
ok
(
memcmp
(
cd
[
0
].
font_idxW
,
cd
[
1
].
font_idxW
,
128
*
sizeof
(
WORD
)),
"0 vs 1: indices shouldn't match
\n
"
);
...
...
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