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
de034b36
Commit
de034b36
authored
May 09, 2023
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 09, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfplat/tests: Add another test for MFCopyImage().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
parent
d0e5f14a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
5 deletions
+20
-5
mfplat.c
dlls/mfplat/tests/mfplat.c
+20
-5
No files found.
dlls/mfplat/tests/mfplat.c
View file @
de034b36
...
@@ -3144,7 +3144,7 @@ static void test_allocate_queue(void)
...
@@ -3144,7 +3144,7 @@ static void test_allocate_queue(void)
static
void
test_MFCopyImage
(
void
)
static
void
test_MFCopyImage
(
void
)
{
{
BYTE
dest
[
16
],
src
[
16
];
DWORD
dest
[
4
],
src
[
4
];
HRESULT
hr
;
HRESULT
hr
;
if
(
!
pMFCopyImage
)
if
(
!
pMFCopyImage
)
...
@@ -3156,21 +3156,36 @@ static void test_MFCopyImage(void)
...
@@ -3156,21 +3156,36 @@ static void test_MFCopyImage(void)
memset
(
dest
,
0xaa
,
sizeof
(
dest
));
memset
(
dest
,
0xaa
,
sizeof
(
dest
));
memset
(
src
,
0x11
,
sizeof
(
src
));
memset
(
src
,
0x11
,
sizeof
(
src
));
hr
=
pMFCopyImage
(
dest
,
8
,
src
,
8
,
4
,
1
);
hr
=
pMFCopyImage
(
(
BYTE
*
)
dest
,
8
,
(
const
BYTE
*
)
src
,
8
,
4
,
1
);
ok
(
hr
==
S_OK
,
"Failed to copy image %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to copy image %#lx.
\n
"
,
hr
);
ok
(
!
memcmp
(
dest
,
src
,
4
)
&&
dest
[
4
]
==
0xaa
,
"Unexpected buffer contents.
\n
"
);
ok
(
dest
[
0
]
==
src
[
0
]
&&
dest
[
1
]
==
0xaaaaaaaa
,
"Unexpected buffer contents.
\n
"
);
/* Negative destination stride. */
memset
(
dest
,
0xaa
,
sizeof
(
dest
));
src
[
0
]
=
0x11111111
;
src
[
1
]
=
0x22222222
;
src
[
2
]
=
0x33333333
;
src
[
3
]
=
0x44444444
;
hr
=
pMFCopyImage
((
BYTE
*
)(
dest
+
2
),
-
8
,
(
const
BYTE
*
)
src
,
8
,
4
,
2
);
ok
(
hr
==
S_OK
,
"Failed to copy image %#lx.
\n
"
,
hr
);
ok
(
dest
[
0
]
==
0x33333333
,
"Unexpected buffer contents %#lx.
\n
"
,
dest
[
0
]);
ok
(
dest
[
1
]
==
0xaaaaaaaa
,
"Unexpected buffer contents %#lx.
\n
"
,
dest
[
1
]);
ok
(
dest
[
2
]
==
0x11111111
,
"Unexpected buffer contents %#lx.
\n
"
,
dest
[
2
]);
ok
(
dest
[
3
]
==
0xaaaaaaaa
,
"Unexpected buffer contents %#lx.
\n
"
,
dest
[
3
]);
memset
(
dest
,
0xaa
,
sizeof
(
dest
));
memset
(
dest
,
0xaa
,
sizeof
(
dest
));
memset
(
src
,
0x11
,
sizeof
(
src
));
memset
(
src
,
0x11
,
sizeof
(
src
));
hr
=
pMFCopyImage
(
dest
,
8
,
src
,
8
,
16
,
1
);
hr
=
pMFCopyImage
(
(
BYTE
*
)
dest
,
8
,
(
const
BYTE
*
)
src
,
8
,
16
,
1
);
ok
(
hr
==
S_OK
,
"Failed to copy image %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to copy image %#lx.
\n
"
,
hr
);
ok
(
!
memcmp
(
dest
,
src
,
16
),
"Unexpected buffer contents.
\n
"
);
ok
(
!
memcmp
(
dest
,
src
,
16
),
"Unexpected buffer contents.
\n
"
);
memset
(
dest
,
0xaa
,
sizeof
(
dest
));
memset
(
dest
,
0xaa
,
sizeof
(
dest
));
memset
(
src
,
0x11
,
sizeof
(
src
));
memset
(
src
,
0x11
,
sizeof
(
src
));
hr
=
pMFCopyImage
(
dest
,
8
,
src
,
8
,
8
,
2
);
hr
=
pMFCopyImage
(
(
BYTE
*
)
dest
,
8
,
(
const
BYTE
*
)
src
,
8
,
8
,
2
);
ok
(
hr
==
S_OK
,
"Failed to copy image %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to copy image %#lx.
\n
"
,
hr
);
ok
(
!
memcmp
(
dest
,
src
,
16
),
"Unexpected buffer contents.
\n
"
);
ok
(
!
memcmp
(
dest
,
src
,
16
),
"Unexpected buffer contents.
\n
"
);
}
}
...
...
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