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
2d15758c
Commit
2d15758c
authored
Feb 27, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 03, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scrrun/tests: A test for adding BYREF item.
parent
a25f1931
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
dictionary.c
dlls/scrrun/tests/dictionary.c
+30
-0
No files found.
dlls/scrrun/tests/dictionary.c
View file @
2d15758c
...
...
@@ -589,6 +589,35 @@ static void test_Item(void)
IDictionary_Release
(
dict
);
}
static
void
test_Add
(
void
)
{
static
const
WCHAR
testW
[]
=
{
't'
,
'e'
,
's'
,
't'
,
'W'
,
0
};
VARIANT
key
,
item
;
IDictionary
*
dict
;
HRESULT
hr
;
BSTR
str
;
hr
=
CoCreateInstance
(
&
CLSID_Dictionary
,
NULL
,
CLSCTX_INPROC_SERVER
|
CLSCTX_INPROC_HANDLER
,
&
IID_IDictionary
,
(
void
**
)
&
dict
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
str
=
SysAllocString
(
testW
);
V_VT
(
&
key
)
=
VT_I2
;
V_I2
(
&
key
)
=
1
;
V_VT
(
&
item
)
=
VT_BSTR
|
VT_BYREF
;
V_BSTRREF
(
&
item
)
=
&
str
;
hr
=
IDictionary_Add
(
dict
,
&
key
,
&
item
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IDictionary_get_Item
(
dict
,
&
key
,
&
item
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
V_VT
(
&
item
)
==
VT_BSTR
,
"got %d
\n
"
,
V_VT
(
&
item
));
SysFreeString
(
str
);
IDictionary_Release
(
dict
);
}
START_TEST
(
dictionary
)
{
IDispatch
*
disp
;
...
...
@@ -612,6 +641,7 @@ START_TEST(dictionary)
test_Keys
();
test_Remove
();
test_Item
();
test_Add
();
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