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
979e2d3a
Commit
979e2d3a
authored
Jan 28, 2014
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jan 28, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
taskschd: Add some tests for ITaskFolderCollection::get__NewEnum.
parent
b5ed10c5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
5 deletions
+54
-5
scheduler.c
dlls/taskschd/tests/scheduler.c
+54
-5
No files found.
dlls/taskschd/tests/scheduler.c
View file @
979e2d3a
...
...
@@ -414,7 +414,7 @@ static void test_FolderCollection(void)
ITaskFolderCollection
*
folders
;
IUnknown
*
unknown
;
IEnumVARIANT
*
enumvar
;
LONG
count
,
i
;
U
LONG
count
,
i
;
VARIANT
idx
;
static
const
int
vt
[]
=
{
VT_I1
,
VT_I2
,
VT_I4
,
VT_I8
,
VT_UI1
,
VT_UI2
,
VT_UI4
,
VT_UI8
,
VT_INT
,
VT_UINT
};
...
...
@@ -459,7 +459,7 @@ static void test_FolderCollection(void)
ok
(
hr
==
E_POINTER
,
"expected E_POINTER, got %#x
\n
"
,
hr
);
count
=
0
;
hr
=
ITaskFolderCollection_get_Count
(
folders
,
&
count
);
hr
=
ITaskFolderCollection_get_Count
(
folders
,
(
LONG
*
)
&
count
);
ok
(
hr
==
S_OK
,
"get_Count error %#x
\n
"
,
hr
);
ok
(
count
==
2
,
"expected 2, got %d
\n
"
,
count
);
...
...
@@ -468,10 +468,14 @@ static void test_FolderCollection(void)
ITaskFolder_Release
(
subfolder
);
count
=
0
;
hr
=
ITaskFolderCollection_get_Count
(
folders
,
&
count
);
hr
=
ITaskFolderCollection_get_Count
(
folders
,
(
LONG
*
)
&
count
);
ok
(
hr
==
S_OK
,
"get_Count error %#x
\n
"
,
hr
);
ok
(
count
==
2
,
"expected 2, got %d
\n
"
,
count
);
set_var
(
VT_INT
,
&
idx
,
0
);
hr
=
ITaskFolderCollection_get_Item
(
folders
,
idx
,
NULL
);
ok
(
hr
==
E_POINTER
,
"expected E_POINTER, got %#x
\n
"
,
hr
);
for
(
i
=
0
;
i
<
sizeof
(
vt
)
/
sizeof
(
vt
[
0
]);
i
++
)
{
set_var
(
vt
[
i
],
&
idx
,
1
);
...
...
@@ -543,6 +547,9 @@ static void test_FolderCollection(void)
hr
=
ITaskFolderCollection_QueryInterface
(
folders
,
&
IID_IEnumUnknown
,
(
void
**
)
&
enumvar
);
ok
(
hr
==
E_NOINTERFACE
,
"expected E_NOINTERFACE, got %#x
\n
"
,
hr
);
hr
=
ITaskFolderCollection_get__NewEnum
(
folders
,
NULL
);
ok
(
hr
==
E_POINTER
,
"expected E_POINTER, got %#x
\n
"
,
hr
);
hr
=
ITaskFolderCollection_get__NewEnum
(
folders
,
&
unknown
);
ok
(
hr
==
S_OK
,
"get__NewEnum error %#x
\n
"
,
hr
);
hr
=
IUnknown_QueryInterface
(
unknown
,
&
IID_IEnumUnknown
,
(
void
**
)
&
enumvar
);
...
...
@@ -554,9 +561,51 @@ static void test_FolderCollection(void)
hr
=
IUnknown_QueryInterface
(
unknown
,
&
IID_IUnknown
,
(
void
**
)
&
enumvar
);
ok
(
hr
==
S_OK
,
"QueryInterface error %#x
\n
"
,
hr
);
hr
=
IEnumVARIANT_Skip
(
enumvar
,
0
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
hr
=
IEnumVARIANT_Skip
(
enumvar
,
2
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
hr
=
IEnumVARIANT_Skip
(
enumvar
,
1
);
ok
(
hr
==
S_FALSE
,
"expected S_FALSE, got %#x
\n
"
,
hr
);
hr
=
IEnumVARIANT_Reset
(
enumvar
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
count
=
-
1
;
hr
=
IEnumVARIANT_Next
(
enumvar
,
1
,
NULL
,
&
count
);
ok
(
hr
==
E_POINTER
,
"expected E_POINTER, got %#x
\n
"
,
hr
);
memset
(
var
,
0
,
sizeof
(
var
));
count
=
0
;
hr
=
IEnumVARIANT_Next
(
enumvar
,
3
,
var
,
(
ULONG
*
)
&
count
);
count
=
-
1
;
hr
=
IEnumVARIANT_Next
(
enumvar
,
1
,
var
,
&
count
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
ok
(
count
==
1
,
"expected 1, got %d
\n
"
,
count
);
hr
=
ITaskFolder_get_Path
((
ITaskFolder
*
)
V_DISPATCH
(
&
var
[
0
]),
&
bstr
);
ok
(
hr
==
S_OK
,
"get_Path error %#x
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
bstr
,
Wine_Folder2
),
"expected
\\
Wine
\\
Folder2, got %s
\n
"
,
wine_dbgstr_w
(
bstr
));
SysFreeString
(
bstr
);
hr
=
ITaskFolder_get_Name
((
ITaskFolder
*
)
V_DISPATCH
(
&
var
[
0
]),
&
bstr
);
ok
(
hr
==
S_OK
,
"get_Name error %#x
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
bstr
,
Folder2
),
"expected Folder2, got %s
\n
"
,
wine_dbgstr_w
(
bstr
));
IDispatch_Release
(
V_DISPATCH
(
&
var
[
0
]));
memset
(
var
,
0
,
sizeof
(
var
));
count
=
-
1
;
hr
=
IEnumVARIANT_Next
(
enumvar
,
1
,
var
,
&
count
);
ok
(
hr
==
S_FALSE
,
"expected S_FALSE, got %#x
\n
"
,
hr
);
ok
(
count
==
0
,
"expected 0, got %d
\n
"
,
count
);
count
=
-
1
;
hr
=
IEnumVARIANT_Next
(
enumvar
,
1
,
NULL
,
&
count
);
ok
(
hr
==
S_FALSE
,
"expected S_FALSE, got %#x
\n
"
,
hr
);
ok
(
count
==
0
,
"expected 0, got %d
\n
"
,
count
);
hr
=
IEnumVARIANT_Reset
(
enumvar
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
memset
(
var
,
0
,
sizeof
(
var
));
count
=
-
1
;
hr
=
IEnumVARIANT_Next
(
enumvar
,
3
,
var
,
&
count
);
ok
(
hr
==
S_FALSE
,
"expected S_FALSE, got %#x
\n
"
,
hr
);
ok
(
count
==
2
,
"expected 2, got %d
\n
"
,
count
);
ok
(
V_VT
(
&
var
[
0
])
==
VT_DISPATCH
,
"expected VT_DISPATCH, got %d
\n
"
,
V_VT
(
&
var
[
0
]));
...
...
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