Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
917b2a36
Commit
917b2a36
authored
Sep 07, 2018
by
Nikolay Sivov
Committed by
Alexandre Julliard
Sep 07, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi/tests: Add some tests for memory stream.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
15059052
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
istream.c
dlls/shlwapi/tests/istream.c
+38
-0
No files found.
dlls/shlwapi/tests/istream.c
View file @
917b2a36
...
...
@@ -733,6 +733,43 @@ static void test_SHCreateStreamOnFileEx_CopyTo(void)
DeleteFileW
(
dstFileName
);
}
static
void
test_SHCreateMemStream
(
void
)
{
static
const
BYTE
initial
[
10
];
IStream
*
stream
,
*
stream2
;
IUnknown
*
unk
;
char
buff
[
10
];
HRESULT
hr
;
stream
=
SHCreateMemStream
(
initial
,
0
);
ok
(
stream
!=
NULL
,
"Failed to create a stream.
\n
"
);
IStream_Release
(
stream
);
stream
=
SHCreateMemStream
(
NULL
,
10
);
ok
(
stream
!=
NULL
,
"Failed to create a stream.
\n
"
);
IStream_Release
(
stream
);
stream
=
SHCreateMemStream
(
NULL
,
0
);
ok
(
stream
!=
NULL
,
"Failed to create a stream.
\n
"
);
hr
=
IStream_QueryInterface
(
stream
,
&
IID_ISequentialStream
,
(
void
**
)
&
unk
);
todo_wine
ok
(
hr
==
S_OK
||
broken
(
hr
==
E_NOINTERFACE
)
/* WinXP */
,
"Failed to QI, hr %#x.
\n
"
,
hr
);
if
(
unk
)
IUnknown_Release
(
unk
);
hr
=
IStream_Read
(
stream
,
buff
,
sizeof
(
buff
),
NULL
);
todo_wine
ok
(
hr
==
S_FALSE
||
broken
(
hr
==
S_OK
)
/* WinXP */
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IStream_Clone
(
stream
,
&
stream2
);
todo_wine
ok
(
hr
==
S_OK
||
broken
(
hr
==
E_NOTIMPL
)
/* < Win8 */
,
"Failed to clone a stream, hr %#x.
\n
"
,
hr
);
if
(
hr
==
S_OK
)
IStream_Release
(
stream2
);
IStream_Release
(
stream
);
}
START_TEST
(
istream
)
{
...
...
@@ -773,4 +810,5 @@ START_TEST(istream)
}
test_SHCreateStreamOnFileEx_CopyTo
();
test_SHCreateMemStream
();
}
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