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
09dd10e7
Commit
09dd10e7
authored
Dec 03, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Dec 03, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dxgi/tests: Add some tests for IDXGIObject::GetParent().
parent
3543e3d8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
0 deletions
+44
-0
device.c
dlls/dxgi/tests/device.c
+44
-0
No files found.
dlls/dxgi/tests/device.c
View file @
09dd10e7
...
...
@@ -121,6 +121,49 @@ static void test_create_surface(IDXGIDevice *device)
IDXGISurface_Release
(
surface
);
}
static
void
test_parents
(
IDXGIDevice
*
device
)
{
IDXGIFactory
*
factory
;
IDXGIAdapter
*
adapter
;
IDXGIOutput
*
output
;
IUnknown
*
parent
;
HRESULT
hr
;
hr
=
IDXGIDevice_GetAdapter
(
device
,
&
adapter
);
ok
(
SUCCEEDED
(
hr
),
"GetAdapter failed, hr %#x.
\n
"
,
hr
);
hr
=
IDXGIAdapter_EnumOutputs
(
adapter
,
0
,
&
output
);
if
(
hr
==
DXGI_ERROR_NOT_FOUND
)
{
skip
(
"Adapter has not outputs, skipping output tests.
\n
"
);
}
else
{
ok
(
SUCCEEDED
(
hr
),
"EnumOutputs failed, hr %#x.
\n
"
,
hr
);
hr
=
IDXGIOutput_GetParent
(
output
,
&
IID_IDXGIAdapter
,
(
void
**
)
&
parent
);
IDXGIOutput_Release
(
output
);
ok
(
SUCCEEDED
(
hr
),
"GetParent failed, hr %#x.
\n
"
,
hr
);
ok
(
parent
==
(
IUnknown
*
)
adapter
,
"Got parent %p, expected %p.
\n
"
,
parent
,
adapter
);
IUnknown_Release
(
parent
);
}
hr
=
IDXGIAdapter_GetParent
(
adapter
,
&
IID_IDXGIFactory
,
(
void
**
)
&
factory
);
ok
(
SUCCEEDED
(
hr
),
"GetParent failed, hr %#x.
\n
"
,
hr
);
hr
=
IDXGIFactory_GetParent
(
factory
,
&
IID_IUnknown
,
(
void
**
)
&
parent
);
ok
(
hr
==
E_NOINTERFACE
,
"GetParent returned %#x, expected %#x.
\n
"
,
hr
,
E_NOINTERFACE
);
ok
(
parent
==
NULL
,
"Got parent %p, expected %p.
\n
"
,
parent
,
NULL
);
IDXGIFactory_Release
(
factory
);
hr
=
IDXGIDevice_GetParent
(
device
,
&
IID_IDXGIAdapter
,
(
void
**
)
&
parent
);
ok
(
SUCCEEDED
(
hr
),
"GetParent failed, hr %#x.
\n
"
,
hr
);
ok
(
parent
==
(
IUnknown
*
)
adapter
,
"Got parent %p, expected %p.
\n
"
,
parent
,
adapter
);
IUnknown_Release
(
parent
);
IDXGIAdapter_Release
(
adapter
);
}
START_TEST
(
device
)
{
HMODULE
d3d10core
=
LoadLibraryA
(
"d3d10core.dll"
);
...
...
@@ -143,6 +186,7 @@ START_TEST(device)
test_device_interfaces
(
device
);
test_create_surface
(
device
);
test_parents
(
device
);
refcount
=
IDXGIDevice_Release
(
device
);
ok
(
!
refcount
,
"Device has %u references left
\n
"
,
refcount
);
...
...
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