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
854ca51a
Commit
854ca51a
authored
May 11, 2007
by
Misha Koshelev
Committed by
Alexandre Julliard
May 14, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi/tests: automation: Add test for View::Modify.
parent
5e16dbb3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
0 deletions
+48
-0
automation.c
dlls/msi/tests/automation.c
+48
-0
No files found.
dlls/msi/tests/automation.c
View file @
854ca51a
...
...
@@ -890,6 +890,24 @@ static HRESULT View_Fetch(IDispatch *pView, IDispatch **ppRecord)
return
hr
;
}
static
HRESULT
View_Modify
(
IDispatch
*
pView
,
int
iMode
,
IDispatch
*
pRecord
)
{
VARIANT
varresult
;
VARIANTARG
vararg
[
2
];
DISPPARAMS
dispparams
=
{
vararg
,
NULL
,
sizeof
(
vararg
)
/
sizeof
(
VARIANTARG
),
0
};
VariantInit
(
&
vararg
[
1
]);
V_VT
(
&
vararg
[
1
])
=
VT_I4
;
V_I4
(
&
vararg
[
1
])
=
iMode
;
VariantInit
(
&
vararg
[
0
]);
V_VT
(
&
vararg
[
0
])
=
VT_DISPATCH
;
V_DISPATCH
(
&
vararg
[
0
])
=
pRecord
;
if
(
pRecord
)
IDispatch_AddRef
(
pRecord
);
/* VariantClear in invoke will call IDispatch_Release */
return
invoke
(
pView
,
"Modify"
,
DISPATCH_METHOD
,
&
dispparams
,
&
varresult
,
VT_EMPTY
);
}
static
HRESULT
View_Close
(
IDispatch
*
pView
)
{
VARIANT
varresult
;
...
...
@@ -1010,6 +1028,7 @@ static void test_Database(IDispatch *pDatabase)
static
WCHAR
szThree
[]
=
{
'T'
,
'h'
,
'r'
,
'e'
,
'e'
,
0
};
static
WCHAR
szTwo
[]
=
{
'T'
,
'w'
,
'o'
,
0
};
static
WCHAR
szStringDataField
[]
=
{
'S'
,
't'
,
'r'
,
'i'
,
'n'
,
'g'
,
'D'
,
'a'
,
't'
,
'a'
,
','
,
'F'
,
'i'
,
'e'
,
'l'
,
'd'
,
0
};
static
WCHAR
szModifyModeRecord
[]
=
{
'M'
,
'o'
,
'd'
,
'i'
,
'f'
,
'y'
,
','
,
'M'
,
'o'
,
'd'
,
'e'
,
','
,
'R'
,
'e'
,
'c'
,
'o'
,
'r'
,
'd'
,
0
};
IDispatch
*
pView
=
NULL
;
HRESULT
hr
;
...
...
@@ -1051,6 +1070,35 @@ static void test_Database(IDispatch *pDatabase)
ok
(
hr
==
DISP_E_EXCEPTION
,
"Record_StringDataPut failed, hresult 0x%08x
\n
"
,
hr
);
ok_exception
(
hr
,
szStringDataField
);
/* View::Modify with incorrect parameters */
todo_wine
{
hr
=
View_Modify
(
pView
,
-
5
,
NULL
);
ok
(
hr
==
DISP_E_EXCEPTION
,
"View_Modify failed, hresult 0x%08x
\n
"
,
hr
);
ok_exception
(
hr
,
szModifyModeRecord
);
hr
=
View_Modify
(
pView
,
-
5
,
pRecord
);
ok
(
hr
==
DISP_E_EXCEPTION
,
"View_Modify failed, hresult 0x%08x
\n
"
,
hr
);
ok_exception
(
hr
,
szModifyModeRecord
);
hr
=
View_Modify
(
pView
,
MSIMODIFY_REFRESH
,
NULL
);
ok
(
hr
==
DISP_E_EXCEPTION
,
"View_Modify failed, hresult 0x%08x
\n
"
,
hr
);
ok_exception
(
hr
,
szModifyModeRecord
);
}
/* View::Modify with MSIMODIFY_REFRESH should undo our changes */
todo_wine
{
hr
=
View_Modify
(
pView
,
MSIMODIFY_REFRESH
,
pRecord
);
ok
(
SUCCEEDED
(
hr
),
"View_Modify failed, hresult 0x%08x
\n
"
,
hr
);
}
/* Record::StringDataGet, confirm that the record is back to its unmodified value */
memset
(
szString
,
0
,
sizeof
(
szString
));
hr
=
Record_StringDataGet
(
pRecord
,
1
,
szString
);
ok
(
SUCCEEDED
(
hr
),
"Record_StringDataGet failed, hresult 0x%08x
\n
"
,
hr
);
todo_wine
ok_w2
(
"Record_StringDataGet result was %s but expected %s
\n
"
,
szString
,
szThree
);
IDispatch_Release
(
pRecord
);
}
...
...
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