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
a34279da
Commit
a34279da
authored
Apr 13, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 13, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf/tests: Add some tests for node list management.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8a299c4b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
62 additions
and
0 deletions
+62
-0
mf.c
dlls/mf/tests/mf.c
+62
-0
No files found.
dlls/mf/tests/mf.c
View file @
a34279da
...
...
@@ -735,6 +735,68 @@ static void test_topology(void)
IMFTopologyNode_Release
(
node2
);
IMFTopologyNode_Release
(
node
);
/* Add one node, connect to another that hasn't been added. */
hr
=
IMFTopology_Clear
(
topology
);
ok
(
hr
==
S_OK
,
"Failed to clear topology, hr %#x.
\n
"
,
hr
);
hr
=
MFCreateTopologyNode
(
MF_TOPOLOGY_SOURCESTREAM_NODE
,
&
node
);
ok
(
hr
==
S_OK
,
"Failed to create topology node, hr %#x.
\n
"
,
hr
);
hr
=
MFCreateTopologyNode
(
MF_TOPOLOGY_OUTPUT_NODE
,
&
node2
);
ok
(
hr
==
S_OK
,
"Failed to create topology node, hr %#x.
\n
"
,
hr
);
hr
=
IMFTopology_AddNode
(
topology
,
node
);
ok
(
hr
==
S_OK
,
"Failed to add a node, hr %#x.
\n
"
,
hr
);
hr
=
IMFTopology_GetNodeCount
(
topology
,
&
node_count
);
ok
(
hr
==
S_OK
,
"Failed to get node count, hr %#x.
\n
"
,
hr
);
ok
(
node_count
==
1
,
"Unexpected node count.
\n
"
);
hr
=
IMFTopologyNode_ConnectOutput
(
node
,
0
,
node2
,
0
);
ok
(
hr
==
S_OK
,
"Failed to connect nodes, hr %#x.
\n
"
,
hr
);
hr
=
IMFTopology_GetNodeCount
(
topology
,
&
node_count
);
ok
(
hr
==
S_OK
,
"Failed to get node count, hr %#x.
\n
"
,
hr
);
ok
(
node_count
==
1
,
"Unexpected node count.
\n
"
);
IMFTopologyNode_Release
(
node
);
IMFTopologyNode_Release
(
node2
);
/* Add same node to different topologies. */
hr
=
IMFTopology_Clear
(
topology
);
ok
(
hr
==
S_OK
,
"Failed to clear topology, hr %#x.
\n
"
,
hr
);
hr
=
MFCreateTopology
(
&
topology2
);
ok
(
hr
==
S_OK
,
"Failed to create topology, hr %#x.
\n
"
,
hr
);
hr
=
MFCreateTopologyNode
(
MF_TOPOLOGY_SOURCESTREAM_NODE
,
&
node
);
ok
(
hr
==
S_OK
,
"Failed to create topology node, hr %#x.
\n
"
,
hr
);
hr
=
IMFTopology_AddNode
(
topology
,
node
);
ok
(
hr
==
S_OK
,
"Failed to add a node, hr %#x.
\n
"
,
hr
);
EXPECT_REF
(
node
,
2
);
hr
=
IMFTopology_GetNodeCount
(
topology
,
&
node_count
);
ok
(
hr
==
S_OK
,
"Failed to get node count, hr %#x.
\n
"
,
hr
);
ok
(
node_count
==
1
,
"Unexpected node count.
\n
"
);
hr
=
IMFTopology_GetNodeCount
(
topology2
,
&
node_count
);
ok
(
hr
==
S_OK
,
"Failed to get node count, hr %#x.
\n
"
,
hr
);
ok
(
node_count
==
0
,
"Unexpected node count.
\n
"
);
hr
=
IMFTopology_AddNode
(
topology2
,
node
);
ok
(
hr
==
S_OK
,
"Failed to add a node, hr %#x.
\n
"
,
hr
);
EXPECT_REF
(
node
,
3
);
hr
=
IMFTopology_GetNodeCount
(
topology
,
&
node_count
);
ok
(
hr
==
S_OK
,
"Failed to get node count, hr %#x.
\n
"
,
hr
);
ok
(
node_count
==
1
,
"Unexpected node count.
\n
"
);
hr
=
IMFTopology_GetNodeCount
(
topology2
,
&
node_count
);
ok
(
hr
==
S_OK
,
"Failed to get node count, hr %#x.
\n
"
,
hr
);
ok
(
node_count
==
1
,
"Unexpected node count.
\n
"
);
IMFTopology_Release
(
topology2
);
IMFTopology_Release
(
topology
);
}
...
...
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