ole32/tests: A couple of tests for ReadClassStm/ReadClassStg.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
66974e5502
commit
0a34f25487
|
@ -1176,7 +1176,7 @@ static void test_writeclassstg(void)
|
|||
{
|
||||
IStorage *stg = NULL;
|
||||
HRESULT r;
|
||||
CLSID temp_cls;
|
||||
CLSID temp_cls, cls2;
|
||||
|
||||
DeleteFileA(filenameA);
|
||||
|
||||
|
@ -1188,6 +1188,12 @@ static void test_writeclassstg(void)
|
|||
r = ReadClassStg( NULL, NULL );
|
||||
ok(r == E_INVALIDARG, "ReadClassStg should return E_INVALIDARG instead of 0x%08X\n", r);
|
||||
|
||||
memset(&temp_cls, 0xcc, sizeof(temp_cls));
|
||||
memset(&cls2, 0xcc, sizeof(cls2));
|
||||
r = ReadClassStg( NULL, &temp_cls );
|
||||
ok(r == E_INVALIDARG, "got 0x%08x\n", r);
|
||||
ok(IsEqualCLSID(&temp_cls, &cls2), "got wrong clsid\n");
|
||||
|
||||
r = ReadClassStg( stg, NULL );
|
||||
ok(r == E_INVALIDARG, "ReadClassStg should return E_INVALIDARG instead of 0x%08X\n", r);
|
||||
|
||||
|
@ -1957,7 +1963,7 @@ static void test_nonroot_transacted(void)
|
|||
|
||||
static void test_ReadClassStm(void)
|
||||
{
|
||||
CLSID clsid;
|
||||
CLSID clsid, clsid2;
|
||||
HRESULT hr;
|
||||
IStream *pStream;
|
||||
static const LARGE_INTEGER llZero;
|
||||
|
@ -1973,6 +1979,12 @@ static void test_ReadClassStm(void)
|
|||
hr = ReadClassStm(pStream, NULL);
|
||||
ok(hr == E_INVALIDARG, "ReadClassStm should have returned E_INVALIDARG instead of 0x%08x\n", hr);
|
||||
|
||||
memset(&clsid, 0xcc, sizeof(clsid));
|
||||
memset(&clsid2, 0xcc, sizeof(clsid2));
|
||||
hr = ReadClassStm(NULL, &clsid);
|
||||
ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
|
||||
ok(IsEqualCLSID(&clsid, &clsid2), "got wrong clsid\n");
|
||||
|
||||
/* test not rewound stream */
|
||||
hr = ReadClassStm(pStream, &clsid);
|
||||
ok(hr == STG_E_READFAULT, "ReadClassStm should have returned STG_E_READFAULT instead of 0x%08x\n", hr);
|
||||
|
|
Loading…
Reference in New Issue