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
6fe6a43a
Commit
6fe6a43a
authored
May 23, 2012
by
Vincent Povirk
Committed by
Alexandre Julliard
May 29, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
propsys: Add test for saving/loading an empty property store.
parent
d17bc39b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
0 deletions
+53
-0
propstore.c
dlls/propsys/tests/propstore.c
+53
-0
No files found.
dlls/propsys/tests/propstore.c
View file @
6fe6a43a
...
...
@@ -196,11 +196,64 @@ static void test_inmemorystore(void)
IPropertyStoreCache_Release
(
propcache
);
}
static
void
test_persistserialized
(
void
)
{
IPropertyStore
*
propstore
;
IPersistSerializedPropStorage
*
serialized
;
HRESULT
hr
;
SERIALIZEDPROPSTORAGE
*
result
;
DWORD
result_size
;
hr
=
CoCreateInstance
(
&
CLSID_InMemoryPropertyStore
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IPropertyStore
,
(
void
**
)
&
propstore
);
ok
(
hr
==
S_OK
,
"CoCreateInstance failed, hr=%x
\n
"
,
hr
);
hr
=
IPropertyStore_QueryInterface
(
propstore
,
&
IID_IPersistSerializedPropStorage
,
(
void
**
)
&
serialized
);
todo_wine
ok
(
hr
==
S_OK
,
"QueryInterface failed, hr=%x
\n
"
,
hr
);
if
(
FAILED
(
hr
))
{
skip
(
"IPersistSerializedPropStorage not supported
\n
"
);
return
;
}
hr
=
IPersistSerializedPropStorage_GetPropertyStorage
(
serialized
,
NULL
,
&
result_size
);
ok
(
hr
==
E_POINTER
,
"GetPropertyStorage failed, hr=%x
\n
"
,
hr
);
hr
=
IPersistSerializedPropStorage_GetPropertyStorage
(
serialized
,
&
result
,
NULL
);
ok
(
hr
==
E_POINTER
,
"GetPropertyStorage failed, hr=%x
\n
"
,
hr
);
hr
=
IPersistSerializedPropStorage_GetPropertyStorage
(
serialized
,
&
result
,
&
result_size
);
ok
(
hr
==
S_OK
,
"GetPropertyStorage failed, hr=%x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
{
ok
(
result_size
==
0
,
"expected 0 bytes, got %i
\n
"
,
result_size
);
CoTaskMemFree
(
result
);
}
hr
=
IPersistSerializedPropStorage_SetPropertyStorage
(
serialized
,
NULL
,
4
);
ok
(
hr
==
E_POINTER
,
"SetPropertyStorage failed, hr=%x
\n
"
,
hr
);
hr
=
IPersistSerializedPropStorage_SetPropertyStorage
(
serialized
,
NULL
,
0
);
ok
(
hr
==
S_OK
,
"SetPropertyStorage failed, hr=%x
\n
"
,
hr
);
hr
=
IPropertyStore_GetCount
(
propstore
,
&
result_size
);
ok
(
hr
==
S_OK
,
"GetCount failed, hr=%x
\n
"
,
hr
);
ok
(
result_size
==
0
,
"expecting 0, got %d
\n
"
,
result_size
);
IPropertyStore_Release
(
propstore
);
IPersistSerializedPropStorage_Release
(
serialized
);
}
START_TEST
(
propstore
)
{
CoInitialize
(
NULL
);
test_inmemorystore
();
test_persistserialized
();
CoUninitialize
();
}
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