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
a0fd05f0
Commit
a0fd05f0
authored
Mar 03, 2008
by
Roy Shea
Committed by
Alexandre Julliard
Mar 04, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qmgr: Implement Skip and Reset for IEnumBackgroundCopyJobs.
parent
1317e311
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
71 additions
and
4 deletions
+71
-4
enum_jobs.c
dlls/qmgr/enum_jobs.c
+13
-4
enum_jobs.c
dlls/qmgr/tests/enum_jobs.c
+58
-0
No files found.
dlls/qmgr/enum_jobs.c
View file @
a0fd05f0
...
...
@@ -114,15 +114,24 @@ static HRESULT WINAPI BITS_IEnumBackgroundCopyJobs_Skip(
IEnumBackgroundCopyJobs
*
iface
,
ULONG
celt
)
{
FIXME
(
"Not implemented
\n
"
);
return
E_NOTIMPL
;
EnumBackgroundCopyJobsImpl
*
This
=
(
EnumBackgroundCopyJobsImpl
*
)
iface
;
if
(
This
->
numJobs
-
This
->
indexJobs
<
celt
)
{
This
->
indexJobs
=
This
->
numJobs
;
return
S_FALSE
;
}
This
->
indexJobs
+=
celt
;
return
S_OK
;
}
static
HRESULT
WINAPI
BITS_IEnumBackgroundCopyJobs_Reset
(
IEnumBackgroundCopyJobs
*
iface
)
{
FIXME
(
"Not implemented
\n
"
);
return
E_NOTIMPL
;
EnumBackgroundCopyJobsImpl
*
This
=
(
EnumBackgroundCopyJobsImpl
*
)
iface
;
This
->
indexJobs
=
0
;
return
S_OK
;
}
static
HRESULT
WINAPI
BITS_IEnumBackgroundCopyJobs_Clone
(
...
...
dlls/qmgr/tests/enum_jobs.c
View file @
a0fd05f0
...
...
@@ -232,6 +232,61 @@ static void test_Next_errors(void)
ok
(
hres
!=
S_OK
,
"Invalid call to Next succeeded: %08x
\n
"
,
hres
);
}
/* Test skipping through the jobs in a list */
static
void
test_Skip_walkList
(
void
)
{
HRESULT
hres
;
ULONG
i
;
for
(
i
=
0
;
i
<
test_jobCountB
;
i
++
)
{
hres
=
IEnumBackgroundCopyJobs_Skip
(
test_enumJobsB
,
1
);
ok
(
hres
==
S_OK
,
"Skip failed: %08x
\n
"
,
hres
);
if
(
hres
!=
S_OK
)
{
skip
(
"Unable to propely Skip jobs
\n
"
);
return
;
}
}
hres
=
IEnumBackgroundCopyJobs_Skip
(
test_enumJobsB
,
1
);
ok
(
hres
==
S_FALSE
,
"Skip expected end of list: %08x
\n
"
,
hres
);
}
/* Test skipping off the end of the list */
static
void
test_Skip_offEnd
(
void
)
{
HRESULT
hres
;
hres
=
IEnumBackgroundCopyJobs_Skip
(
test_enumJobsB
,
test_jobCountB
+
1
);
ok
(
hres
==
S_FALSE
,
"Skip expected end of list: %08x
\n
"
,
hres
);
}
/* Test reset */
static
void
test_Reset
(
void
)
{
HRESULT
hres
;
hres
=
IEnumBackgroundCopyJobs_Skip
(
test_enumJobsB
,
test_jobCountB
);
ok
(
hres
==
S_OK
,
"Skip failed: %08x
\n
"
,
hres
);
if
(
hres
!=
S_OK
)
{
skip
(
"Skip failed
\n
"
);
return
;
}
hres
=
IEnumBackgroundCopyJobs_Reset
(
test_enumJobsB
);
ok
(
hres
==
S_OK
,
"Reset failed: %08x
\n
"
,
hres
);
if
(
hres
!=
S_OK
)
{
skip
(
"Unable to Reset enumerator
\n
"
);
return
;
}
hres
=
IEnumBackgroundCopyJobs_Skip
(
test_enumJobsB
,
test_jobCountB
);
ok
(
hres
==
S_OK
,
"Reset failed: %08x
\n
"
,
hres
);
}
typedef
void
(
*
test_t
)(
void
);
START_TEST
(
enum_jobs
)
...
...
@@ -242,6 +297,9 @@ START_TEST(enum_jobs)
test_Next_walkList_1
,
test_Next_walkList_2
,
test_Next_errors
,
test_Skip_walkList
,
test_Skip_offEnd
,
test_Reset
,
0
};
const
test_t
*
test
;
...
...
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