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
28e7c3b9
Commit
28e7c3b9
authored
Feb 25, 2008
by
Roy Shea
Committed by
Alexandre Julliard
Feb 26, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qmgr: Implement IBackgroundCopyJob_GetDisplayName with test.
parent
3f126b4a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
2 deletions
+30
-2
job.c
dlls/qmgr/job.c
+12
-2
job.c
dlls/qmgr/tests/job.c
+18
-0
No files found.
dlls/qmgr/job.c
View file @
28e7c3b9
...
...
@@ -194,8 +194,18 @@ static HRESULT WINAPI BITS_IBackgroundCopyJob_GetDisplayName(
IBackgroundCopyJob
*
iface
,
LPWSTR
*
pVal
)
{
FIXME
(
"Not implemented
\n
"
);
return
E_NOTIMPL
;
BackgroundCopyJobImpl
*
This
=
(
BackgroundCopyJobImpl
*
)
iface
;
int
n
;
if
(
!
pVal
)
return
E_INVALIDARG
;
n
=
(
lstrlenW
(
This
->
displayName
)
+
1
)
*
sizeof
**
pVal
;
*
pVal
=
CoTaskMemAlloc
(
n
);
if
(
*
pVal
==
NULL
)
return
E_OUTOFMEMORY
;
memcpy
(
*
pVal
,
This
->
displayName
,
n
);
return
S_OK
;
}
static
HRESULT
WINAPI
BITS_IBackgroundCopyJob_SetDescription
(
...
...
dlls/qmgr/tests/job.c
View file @
28e7c3b9
...
...
@@ -99,6 +99,23 @@ static void test_GetType(void)
ok
(
type
==
test_type
,
"Got incorrect type
\n
"
);
}
/* Test that the display name is properly set */
static
void
test_GetName
(
void
)
{
HRESULT
hres
;
LPWSTR
displayName
;
hres
=
IBackgroundCopyJob_GetDisplayName
(
test_job
,
&
displayName
);
ok
(
hres
==
S_OK
,
"GetName failed: %08x
\n
"
,
hres
);
if
(
hres
!=
S_OK
)
{
skip
(
"Unable to get display name of test_job.
\n
"
);
return
;
}
ok
(
lstrcmpW
(
displayName
,
test_displayName
)
==
0
,
"Got incorrect type
\n
"
);
CoTaskMemFree
(
displayName
);
}
typedef
void
(
*
test_t
)(
void
);
START_TEST
(
job
)
...
...
@@ -106,6 +123,7 @@ START_TEST(job)
static
const
test_t
tests
[]
=
{
test_GetId
,
test_GetType
,
test_GetName
,
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