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
1458494d
Commit
1458494d
authored
Mar 01, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Mar 01, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msdmo/tests: Enable compilation with long types.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
26681480
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
39 deletions
+38
-39
Makefile.in
dlls/msdmo/tests/Makefile.in
+0
-1
msdmo.c
dlls/msdmo/tests/msdmo.c
+38
-38
No files found.
dlls/msdmo/tests/Makefile.in
View file @
1458494d
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
TESTDLL
=
msdmo.dll
IMPORTS
=
advapi32 dmoguids msdmo uuid
...
...
dlls/msdmo/tests/msdmo.c
View file @
1458494d
...
...
@@ -44,14 +44,14 @@ static void test_DMOUnregister(void)
HRESULT
hr
;
hr
=
DMOUnregister
(
&
GUID_unknowndmo
,
&
GUID_unknowncategory
);
ok
(
hr
==
S_FALSE
,
"got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_FALSE
,
"got 0x%08
l
x
\n
"
,
hr
);
hr
=
DMOUnregister
(
&
GUID_unknowndmo
,
&
GUID_NULL
);
ok
(
hr
==
S_FALSE
,
"got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_FALSE
,
"got 0x%08
l
x
\n
"
,
hr
);
/* can't register for all categories */
hr
=
DMORegister
(
L"testdmo"
,
&
GUID_unknowndmo
,
&
GUID_NULL
,
0
,
0
,
NULL
,
0
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08
l
x
\n
"
,
hr
);
hr
=
DMORegister
(
L"testdmo"
,
&
GUID_unknowndmo
,
&
GUID_unknowncategory
,
0
,
0
,
NULL
,
0
,
NULL
);
if
(
hr
!=
S_OK
)
{
...
...
@@ -60,10 +60,10 @@ static void test_DMOUnregister(void)
}
hr
=
DMOUnregister
(
&
GUID_unknowndmo
,
&
GUID_NULL
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got 0x%08
l
x
\n
"
,
hr
);
hr
=
DMOUnregister
(
&
GUID_unknowndmo
,
&
GUID_NULL
);
ok
(
hr
==
S_FALSE
,
"got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_FALSE
,
"got 0x%08
l
x
\n
"
,
hr
);
/* clean up category since Windows doesn't */
sprintf
(
buffer
,
"DirectShow
\\
MediaObjects
\\
Categories
\\
%s"
,
guid_to_string
(
&
GUID_unknowncategory
));
...
...
@@ -76,12 +76,12 @@ static void test_DMOGetName(void)
HRESULT
hr
;
hr
=
DMOGetName
(
&
GUID_unknowndmo
,
NULL
);
ok
(
hr
==
E_FAIL
,
"got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
E_FAIL
,
"got 0x%08
l
x
\n
"
,
hr
);
/* no such DMO */
name
[
0
]
=
'a'
;
hr
=
DMOGetName
(
&
GUID_wmp1
,
name
);
ok
(
hr
==
E_FAIL
,
"got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
E_FAIL
,
"got 0x%08
l
x
\n
"
,
hr
);
ok
(
name
[
0
]
==
'a'
,
"got %x
\n
"
,
name
[
0
]);
}
...
...
@@ -97,24 +97,24 @@ static void test_DMOEnum(void)
DWORD
count
;
hr
=
DMOEnum
(
&
GUID_unknowncategory
,
0
,
0
,
NULL
,
0
,
NULL
,
&
enum_dmo
);
ok
(
hr
==
S_OK
,
"DMOEnum() failed with %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"DMOEnum() failed with %#
l
x
\n
"
,
hr
);
hr
=
IEnumDMO_Next
(
enum_dmo
,
1
,
&
clsid
,
&
name
,
NULL
);
ok
(
hr
==
S_FALSE
,
"expected S_FALSE, got %#x
\n
"
,
hr
);
ok
(
hr
==
S_FALSE
,
"expected S_FALSE, got %#
l
x
\n
"
,
hr
);
hr
=
IEnumDMO_Next
(
enum_dmo
,
2
,
&
clsid
,
&
name
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG, got %#x
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG, got %#
l
x
\n
"
,
hr
);
hr
=
IEnumDMO_Next
(
enum_dmo
,
2
,
&
clsid
,
&
name
,
&
count
);
ok
(
hr
==
S_FALSE
,
"expected S_FALSE, got %#x
\n
"
,
hr
);
ok
(
count
==
0
,
"expected 0, got %d
\n
"
,
count
);
ok
(
hr
==
S_FALSE
,
"expected S_FALSE, got %#
l
x
\n
"
,
hr
);
ok
(
count
==
0
,
"expected 0, got %
l
d
\n
"
,
count
);
hr
=
IEnumDMO_Next
(
enum_dmo
,
2
,
NULL
,
&
name
,
&
count
);
ok
(
hr
==
E_POINTER
,
"expected S_FALSE, got %#x
\n
"
,
hr
);
ok
(
hr
==
E_POINTER
,
"expected S_FALSE, got %#
l
x
\n
"
,
hr
);
hr
=
IEnumDMO_Next
(
enum_dmo
,
2
,
&
clsid
,
NULL
,
&
count
);
ok
(
hr
==
S_FALSE
,
"expected S_FALSE, got %#x
\n
"
,
hr
);
ok
(
count
==
0
,
"expected 0, got %d
\n
"
,
count
);
ok
(
hr
==
S_FALSE
,
"expected S_FALSE, got %#
l
x
\n
"
,
hr
);
ok
(
count
==
0
,
"expected 0, got %
l
d
\n
"
,
count
);
IEnumDMO_Release
(
enum_dmo
);
...
...
@@ -123,41 +123,41 @@ static void test_DMOEnum(void)
return
;
hr
=
DMOEnum
(
&
GUID_unknowncategory
,
0
,
0
,
NULL
,
0
,
NULL
,
&
enum_dmo
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#
l
x.
\n
"
,
hr
);
hr
=
IEnumDMO_Next
(
enum_dmo
,
1
,
&
clsid
,
&
name
,
NULL
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#
l
x.
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
clsid
,
&
GUID_unknowndmo
),
"Got clsid %s.
\n
"
,
debugstr_guid
(
&
clsid
));
ok
(
!
wcscmp
(
name
,
L"testdmo"
),
"Got name %s.
\n
"
,
debugstr_w
(
name
));
hr
=
IEnumDMO_Next
(
enum_dmo
,
1
,
&
clsid
,
&
name
,
NULL
);
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_FALSE
,
"Got hr %#
l
x.
\n
"
,
hr
);
IEnumDMO_Release
(
enum_dmo
);
hr
=
DMOEnum
(
&
GUID_unknowncategory
,
0
,
1
,
&
input_type
,
0
,
NULL
,
&
enum_dmo
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#
l
x.
\n
"
,
hr
);
hr
=
IEnumDMO_Next
(
enum_dmo
,
1
,
&
clsid
,
&
name
,
NULL
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#
l
x.
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
clsid
,
&
GUID_unknowndmo
),
"Got clsid %s.
\n
"
,
debugstr_guid
(
&
clsid
));
ok
(
!
wcscmp
(
name
,
L"testdmo"
),
"Got name %s.
\n
"
,
debugstr_w
(
name
));
hr
=
IEnumDMO_Next
(
enum_dmo
,
1
,
&
clsid
,
&
name
,
NULL
);
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_FALSE
,
"Got hr %#
l
x.
\n
"
,
hr
);
IEnumDMO_Release
(
enum_dmo
);
hr
=
DMOEnum
(
&
GUID_unknowncategory
,
0
,
1
,
&
wrong_type
,
0
,
NULL
,
&
enum_dmo
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#
l
x.
\n
"
,
hr
);
hr
=
IEnumDMO_Next
(
enum_dmo
,
1
,
&
clsid
,
&
name
,
NULL
);
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_FALSE
,
"Got hr %#
l
x.
\n
"
,
hr
);
IEnumDMO_Release
(
enum_dmo
);
hr
=
DMOUnregister
(
&
GUID_unknowndmo
,
&
GUID_unknowncategory
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#
l
x.
\n
"
,
hr
);
}
static
void
test_DMOGetTypes
(
void
)
...
...
@@ -172,7 +172,7 @@ static void test_DMOGetTypes(void)
HRESULT
hr
;
hr
=
DMOGetTypes
(
&
GUID_unknowndmo
,
0
,
&
input_count
,
types
,
0
,
&
output_count
,
NULL
);
ok
(
hr
==
E_FAIL
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
E_FAIL
,
"Got hr %#
l
x.
\n
"
,
hr
);
hr
=
DMORegister
(
L"testdmo"
,
&
GUID_unknowndmo
,
&
GUID_unknowncategory
,
0
,
ARRAY_SIZE
(
input_types
),
input_types
,
0
,
NULL
);
...
...
@@ -180,33 +180,33 @@ static void test_DMOGetTypes(void)
return
;
hr
=
DMOGetTypes
(
&
GUID_unknowndmo
,
0
,
&
input_count
,
types
,
0
,
&
output_count
,
NULL
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
!
input_count
,
"Got input count %u.
\n
"
,
input_count
);
ok
(
!
output_count
,
"Got output count %u.
\n
"
,
output_count
);
ok
(
hr
==
S_OK
,
"Got hr %#
l
x.
\n
"
,
hr
);
ok
(
!
input_count
,
"Got input count %
l
u.
\n
"
,
input_count
);
ok
(
!
output_count
,
"Got output count %
l
u.
\n
"
,
output_count
);
memset
(
types
,
0
,
sizeof
(
types
));
hr
=
DMOGetTypes
(
&
GUID_unknowndmo
,
1
,
&
input_count
,
types
,
0
,
&
output_count
,
NULL
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
input_count
==
1
,
"Got input count %u.
\n
"
,
input_count
);
ok
(
!
output_count
,
"Got output count %u.
\n
"
,
output_count
);
ok
(
hr
==
S_OK
,
"Got hr %#
l
x.
\n
"
,
hr
);
ok
(
input_count
==
1
,
"Got input count %
l
u.
\n
"
,
input_count
);
ok
(
!
output_count
,
"Got output count %
l
u.
\n
"
,
output_count
);
todo_wine
ok
(
!
memcmp
(
types
,
input_types
,
sizeof
(
DMO_PARTIAL_MEDIATYPE
)),
"Types didn't match.
\n
"
);
memset
(
types
,
0
,
sizeof
(
types
));
hr
=
DMOGetTypes
(
&
GUID_unknowndmo
,
2
,
&
input_count
,
types
,
0
,
&
output_count
,
NULL
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
input_count
==
2
,
"Got input count %u.
\n
"
,
input_count
);
ok
(
!
output_count
,
"Got output count %u.
\n
"
,
output_count
);
ok
(
hr
==
S_OK
,
"Got hr %#
l
x.
\n
"
,
hr
);
ok
(
input_count
==
2
,
"Got input count %
l
u.
\n
"
,
input_count
);
ok
(
!
output_count
,
"Got output count %
l
u.
\n
"
,
output_count
);
ok
(
!
memcmp
(
types
,
input_types
,
2
*
sizeof
(
DMO_PARTIAL_MEDIATYPE
)),
"Types didn't match.
\n
"
);
memset
(
types
,
0
,
sizeof
(
types
));
hr
=
DMOGetTypes
(
&
GUID_unknowndmo
,
2
,
&
input_count
,
types
,
0
,
&
output_count
,
NULL
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
input_count
==
2
,
"Got input count %u.
\n
"
,
input_count
);
ok
(
!
output_count
,
"Got output count %u.
\n
"
,
output_count
);
ok
(
hr
==
S_OK
,
"Got hr %#
l
x.
\n
"
,
hr
);
ok
(
input_count
==
2
,
"Got input count %
l
u.
\n
"
,
input_count
);
ok
(
!
output_count
,
"Got output count %
l
u.
\n
"
,
output_count
);
ok
(
!
memcmp
(
types
,
input_types
,
2
*
sizeof
(
DMO_PARTIAL_MEDIATYPE
)),
"Types didn't match.
\n
"
);
hr
=
DMOUnregister
(
&
GUID_unknowndmo
,
&
GUID_unknowncategory
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#
l
x.
\n
"
,
hr
);
}
START_TEST
(
msdmo
)
...
...
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