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
7bac9a02
Commit
7bac9a02
authored
Aug 22, 2017
by
Nikolay Sivov
Committed by
Alexandre Julliard
Aug 24, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite/tests: Some tests for system font set.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f85def77
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
font.c
dlls/dwrite/tests/font.c
+35
-0
No files found.
dlls/dwrite/tests/font.c
View file @
7bac9a02
...
...
@@ -2291,7 +2291,9 @@ static void test_system_fontcollection(void)
hr
=
IDWriteFontCollection_QueryInterface
(
collection
,
&
IID_IDWriteFontCollection1
,
(
void
**
)
&
collection1
);
if
(
hr
==
S_OK
)
{
IDWriteFontSet
*
fontset
,
*
fontset2
;
IDWriteFontFamily1
*
family1
;
IDWriteFactory3
*
factory3
;
hr
=
IDWriteFontCollection1_QueryInterface
(
collection1
,
&
IID_IDWriteFontCollection
,
(
void
**
)
&
coll2
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
...
...
@@ -2306,6 +2308,39 @@ static void test_system_fontcollection(void)
hr
=
IDWriteFontCollection1_GetFontFamily
(
collection1
,
0
,
&
family1
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
IDWriteFontFamily1_Release
(
family1
);
/* system fontset */
EXPECT_REF
(
collection1
,
2
);
EXPECT_REF
(
factory
,
2
);
hr
=
IDWriteFontCollection1_GetFontSet
(
collection1
,
&
fontset
);
todo_wine
ok
(
hr
==
S_OK
,
"Failed to get fontset, hr %#x.
\n
"
,
hr
);
if
(
hr
==
S_OK
)
{
EXPECT_REF
(
collection1
,
2
);
EXPECT_REF
(
factory
,
2
);
EXPECT_REF
(
fontset
,
1
);
hr
=
IDWriteFontCollection1_GetFontSet
(
collection1
,
&
fontset2
);
ok
(
hr
==
S_OK
,
"Failed to get fontset, hr %#x.
\n
"
,
hr
);
ok
(
fontset
!=
fontset2
,
"Expected new fontset instance.
\n
"
);
EXPECT_REF
(
fontset2
,
1
);
IDWriteFontSet_Release
(
fontset2
);
hr
=
IDWriteFactory_QueryInterface
(
factory
,
&
IID_IDWriteFactory3
,
(
void
**
)
&
factory3
);
ok
(
hr
==
S_OK
,
"Failed to get IDWriteFactory3 interface, hr %#x.
\n
"
,
hr
);
EXPECT_REF
(
factory
,
3
);
hr
=
IDWriteFactory3_GetSystemFontSet
(
factory3
,
&
fontset2
);
ok
(
hr
==
S_OK
,
"Failed to get system font set, hr %#x.
\n
"
,
hr
);
ok
(
fontset
!=
fontset2
,
"Expected new fontset instance.
\n
"
);
EXPECT_REF
(
fontset2
,
1
);
EXPECT_REF
(
factory
,
4
);
IDWriteFontSet_Release
(
fontset2
);
IDWriteFontSet_Release
(
fontset
);
IDWriteFactory3_Release
(
factory3
);
}
IDWriteFontCollection1_Release
(
collection1
);
}
else
...
...
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