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
72559440
Commit
72559440
authored
Dec 22, 2009
by
Andrew Eikum
Committed by
Alexandre Julliard
Dec 23, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hlink: Add tests for IHlinkBrowseContext::SetInitialHlink.
parent
7ba24349
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
75 additions
and
0 deletions
+75
-0
Makefile.in
dlls/hlink/tests/Makefile.in
+1
-0
browse_ctx.c
dlls/hlink/tests/browse_ctx.c
+74
-0
No files found.
dlls/hlink/tests/Makefile.in
View file @
72559440
...
...
@@ -6,6 +6,7 @@ TESTDLL = hlink.dll
IMPORTS
=
hlink ole32 kernel32
CTESTS
=
\
browse_ctx.c
\
hlink.c
@MAKE_TEST_RULES@
...
...
dlls/hlink/tests/browse_ctx.c
0 → 100644
View file @
72559440
/*
* Copyright 2009 Andrew Eikum for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define COBJMACROS
#include <stdio.h>
#include <hlink.h>
#include "wine/test.h"
static
void
test_SetInitialHlink
(
void
)
{
IHlinkBrowseContext
*
bc
;
IHlink
*
found_hlink
;
IMoniker
*
dummy
,
*
found_moniker
;
IBindCtx
*
bindctx
;
WCHAR
one
[]
=
{
'1'
,
0
};
WCHAR
friend
[]
=
{
'f'
,
'r'
,
'i'
,
'e'
,
'n'
,
'd'
,
0
};
WCHAR
*
found_name
;
HRESULT
hres
;
hres
=
CreateItemMoniker
(
one
,
one
,
&
dummy
);
ok
(
hres
==
S_OK
,
"CreateItemMoniker failed: 0x%08x
\n
"
,
hres
);
hres
=
HlinkCreateBrowseContext
(
NULL
,
&
IID_IHlinkBrowseContext
,
(
void
**
)
&
bc
);
ok
(
hres
==
S_OK
,
"HlinkCreateBrowseContext failed: 0x%08x
\n
"
,
hres
);
hres
=
IHlinkBrowseContext_SetInitialHlink
(
bc
,
dummy
,
one
,
friend
);
ok
(
hres
==
S_OK
,
"SetInitialHlink failed: 0x%08x
\n
"
,
hres
);
hres
=
IHlinkBrowseContext_GetHlink
(
bc
,
HLID_CURRENT
,
&
found_hlink
);
ok
(
hres
==
S_OK
,
"GetHlink failed: 0x%08x
\n
"
,
hres
);
hres
=
IHlink_GetMonikerReference
(
found_hlink
,
HLINKGETREF_DEFAULT
,
&
found_moniker
,
NULL
);
ok
(
hres
==
S_OK
,
"GetMonikerReference failed: 0x%08x
\n
"
,
hres
);
hres
=
CreateBindCtx
(
0
,
&
bindctx
);
ok
(
hres
==
S_OK
,
"CreateBindCtx failed: 0x%08x
\n
"
,
hres
);
hres
=
IMoniker_GetDisplayName
(
found_moniker
,
bindctx
,
NULL
,
&
found_name
);
ok
(
hres
==
S_OK
,
"GetDisplayName failed: 0x%08x
\n
"
,
hres
);
ok
(
lstrcmpW
(
found_name
,
friend
),
"Found display name should have been %s, was: %s
\n
"
,
wine_dbgstr_w
(
friend
),
wine_dbgstr_w
(
found_name
));
IBindCtx_Release
(
bindctx
);
IMoniker_Release
(
found_moniker
);
IHlink_Release
(
found_hlink
);
IHlinkBrowseContext_Release
(
bc
);
IMoniker_Release
(
dummy
);
}
START_TEST
(
browse_ctx
)
{
CoInitialize
(
NULL
);
test_SetInitialHlink
();
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