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
936b10b4
Commit
936b10b4
authored
Mar 06, 2009
by
Paul Vriens
Committed by
Alexandre Julliard
Mar 06, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qmgr/tests: Fix some tests on systems with BITS 1.5 and lower.
parent
77f0a71d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
71 additions
and
3 deletions
+71
-3
job.c
dlls/qmgr/tests/job.c
+71
-3
No files found.
dlls/qmgr/tests/job.c
View file @
936b10b4
...
...
@@ -24,6 +24,7 @@
#include "wine/test.h"
#include "bits.h"
#include "initguid.h"
/* Globals used by many tests */
static
const
WCHAR
test_displayName
[]
=
{
'T'
,
'e'
,
's'
,
't'
,
0
};
...
...
@@ -123,6 +124,49 @@ static void teardown(void)
IBackgroundCopyManager_Release
(
test_manager
);
}
/* FIXME: Remove when Wine has implemented this */
DEFINE_GUID
(
CLSID_BackgroundCopyManager2_0
,
0x6d18ad12
,
0xbde3
,
0x4393
,
0xb3
,
0x11
,
0x09
,
0x9c
,
0x34
,
0x6e
,
0x6d
,
0xf9
);
static
BOOL
check_bits20
(
void
)
{
HRESULT
hres
;
IBackgroundCopyManager
*
manager
;
BOOL
ret
=
TRUE
;
hres
=
CoCreateInstance
(
&
CLSID_BackgroundCopyManager2_0
,
NULL
,
CLSCTX_LOCAL_SERVER
,
&
IID_IBackgroundCopyManager
,
(
void
**
)
&
manager
);
if
(
hres
==
REGDB_E_CLASSNOTREG
)
{
ret
=
FALSE
;
/* FIXME: Wine implements 2.0 functionality but doesn't advertise 2.0
*
* Remove when Wine is fixed
*/
if
(
setup
())
{
HRESULT
hres2
;
hres2
=
IBackgroundCopyJob_AddFile
(
test_job
,
test_remotePathA
,
test_localPathA
);
if
(
hres2
==
S_OK
)
{
trace
(
"Running on Wine, claim 2.0 is present
\n
"
);
ret
=
TRUE
;
}
teardown
();
}
}
if
(
manager
)
IBackgroundCopyManager_Release
(
manager
);
return
ret
;
}
/* Test that the jobId is properly set */
static
void
test_GetId
(
void
)
{
...
...
@@ -486,12 +530,15 @@ START_TEST(job)
test_GetId
,
test_GetType
,
test_GetName
,
test_AddFile
,
test_AddFileSet
,
test_EnumFiles
,
test_GetProgress_preTransfer
,
test_GetState
,
test_ResumeEmpty
,
0
};
static
const
test_t
tests_bits20
[]
=
{
test_AddFile
,
test_AddFileSet
,
test_EnumFiles
,
test_CompleteLocal
,
test_CompleteLocalURL
,
0
...
...
@@ -502,6 +549,7 @@ START_TEST(job)
return
;
CoInitialize
(
NULL
);
for
(
test
=
tests
;
*
test
;
++
test
)
{
/* Keep state separate between tests. */
...
...
@@ -513,5 +561,25 @@ START_TEST(job)
(
*
test
)();
teardown
();
}
if
(
check_bits20
())
{
for
(
test
=
tests_bits20
;
*
test
;
++
test
)
{
/* Keep state separate between tests. */
if
(
!
setup
())
{
skip
(
"Unable to setup test
\n
"
);
break
;
}
(
*
test
)();
teardown
();
}
}
else
{
win_skip
(
"Tests need BITS 2.0 or higher
\n
"
);
}
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