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
d9e0c9fb
Commit
d9e0c9fb
authored
Apr 28, 2015
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Apr 28, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmloader/tests: Add more DirectMusicCollection tests.
parent
ade8d0c1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
loader.c
dlls/dmloader/tests/loader.c
+33
-0
No files found.
dlls/dmloader/tests/loader.c
View file @
d9e0c9fb
...
...
@@ -222,7 +222,9 @@ static void test_COM_container(void)
static
void
test_container
(
void
)
{
IDirectMusicContainer
*
dmc
;
IDirectMusicObject
*
dmo
;
IPersistStream
*
ps
;
DMUS_OBJECTDESC
desc
;
CLSID
class
=
{
0
};
ULARGE_INTEGER
size
;
HRESULT
hr
;
...
...
@@ -231,6 +233,37 @@ static void test_container(void)
&
IID_IDirectMusicContainer
,
(
void
**
)
&
dmc
);
ok
(
hr
==
S_OK
,
"DirectMusicContainer create failed: %08x, expected S_OK
\n
"
,
hr
);
/* IDirectMusicObject */
hr
=
IDirectMusicContainer_QueryInterface
(
dmc
,
&
IID_IDirectMusicObject
,
(
void
**
)
&
dmo
);
ok
(
hr
==
S_OK
,
"QueryInterface for IID_IDirectMusicObject failed: %08x
\n
"
,
hr
);
hr
=
IDirectMusicObject_GetDescriptor
(
dmo
,
NULL
);
ok
(
hr
==
E_POINTER
,
"IDirectMusicObject_GetDescriptor: expected E_POINTER, got %08x
\n
"
,
hr
);
hr
=
IDirectMusicObject_SetDescriptor
(
dmo
,
NULL
);
ok
(
hr
==
E_POINTER
,
"IDirectMusicObject_SetDescriptor: expected E_POINTER, got %08x
\n
"
,
hr
);
ZeroMemory
(
&
desc
,
sizeof
(
desc
));
hr
=
IDirectMusicObject_GetDescriptor
(
dmo
,
&
desc
);
ok
(
hr
==
S_OK
,
"IDirectMusicObject_GetDescriptor failed: %08x
\n
"
,
hr
);
ZeroMemory
(
&
desc
,
sizeof
(
desc
));
desc
.
dwSize
=
1
;
/* size is ignored */
hr
=
IDirectMusicObject_GetDescriptor
(
dmo
,
&
desc
);
ok
(
hr
==
S_OK
,
"IDirectMusicObject_GetDescriptor failed: %08x
\n
"
,
hr
);
ok
(
desc
.
dwValidData
==
DMUS_OBJ_CLASS
,
"Fresh object has more valid data (%08x) than DMUS_OBJ_CLASS
\n
"
,
desc
.
dwValidData
);
/* DMUS_OBJ_CLASS is immutable */
desc
.
dwValidData
=
DMUS_OBJ_CLASS
;
desc
.
dwSize
=
1
;
/* size is ignored */
hr
=
IDirectMusicObject_SetDescriptor
(
dmo
,
&
desc
);
ok
(
hr
==
S_FALSE
,
"IDirectMusicObject_SetDescriptor failed: %08x
\n
"
,
hr
);
ok
(
!
desc
.
dwValidData
,
"dwValidData wasn't cleared: %08x
\n
"
,
desc
.
dwValidData
);
desc
.
dwValidData
=
DMUS_OBJ_CLASS
;
desc
.
guidClass
=
CLSID_DirectMusicSegment
;
hr
=
IDirectMusicObject_SetDescriptor
(
dmo
,
&
desc
);
ok
(
hr
==
S_FALSE
&&
!
desc
.
dwValidData
,
"IDirectMusicObject_SetDescriptor failed: %08x
\n
"
,
hr
);
hr
=
IDirectMusicObject_GetDescriptor
(
dmo
,
&
desc
);
ok
(
hr
==
S_OK
,
"IDirectMusicObject_GetDescriptor failed: %08x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
desc
.
guidClass
,
&
CLSID_DirectMusicContainer
),
"guidClass changed, should be CLSID_DirectMusicContainer
\n
"
);
/* IPersistStream */
hr
=
IDirectMusicContainer_QueryInterface
(
dmc
,
&
IID_IPersistStream
,
(
void
**
)
&
ps
);
ok
(
hr
==
S_OK
,
"QueryInterface for IID_IPersistStream failed: %08x
\n
"
,
hr
);
...
...
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