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
71a7393f
Commit
71a7393f
authored
May 08, 2006
by
Robert Shearman
Committed by
Alexandre Julliard
May 08, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Add tests for IsRunning, GetTimeOfLastChange, BindToObject, BindToStorage and Inverse.
parent
288fb09b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
101 additions
and
1 deletion
+101
-1
moniker.c
dlls/ole32/tests/moniker.c
+101
-1
No files found.
dlls/ole32/tests/moniker.c
View file @
71a7393f
...
...
@@ -482,6 +482,10 @@ static void test_class_moniker(void)
IMoniker
*
moniker
;
DWORD
moniker_type
;
DWORD
hash
;
IBindCtx
*
bindctx
;
IMoniker
*
inverse
;
IUnknown
*
unknown
;
FILETIME
filetime
;
hr
=
CreateClassMoniker
(
&
CLSID_StdComponentCategoriesMgr
,
&
moniker
);
todo_wine
ok_ole_success
(
hr
,
CreateClassMoniker
);
...
...
@@ -511,6 +515,30 @@ static void test_class_moniker(void)
"dwMkSys != MKSYS_CLASSMONIKER, instead was 0x%08lx"
,
moniker_type
);
hr
=
CreateBindCtx
(
0
,
&
bindctx
);
ok_ole_success
(
hr
,
CreateBindCtx
);
/* IsRunning test */
hr
=
IMoniker_IsRunning
(
moniker
,
bindctx
,
NULL
,
NULL
);
ok
(
hr
==
E_NOTIMPL
,
"IMoniker_IsRunning should return E_NOTIMPL, not 0x%08lx
\n
"
,
hr
);
hr
=
IMoniker_GetTimeOfLastChange
(
moniker
,
bindctx
,
NULL
,
&
filetime
);
ok
(
hr
==
MK_E_UNAVAILABLE
,
"IMoniker_GetTimeOfLastChange should return MK_E_UNAVAILABLE, not 0x%08lx
\n
"
,
hr
);
hr
=
IMoniker_BindToObject
(
moniker
,
bindctx
,
NULL
,
&
IID_IUnknown
,
(
void
**
)
&
unknown
);
ok_ole_success
(
hr
,
IMoniker_BindToStorage
);
IUnknown_Release
(
unknown
);
hr
=
IMoniker_BindToStorage
(
moniker
,
bindctx
,
NULL
,
&
IID_IUnknown
,
(
void
**
)
&
unknown
);
ok_ole_success
(
hr
,
IMoniker_BindToStorage
);
IUnknown_Release
(
unknown
);
IBindCtx_Release
(
bindctx
);
hr
=
IMoniker_Inverse
(
moniker
,
&
inverse
);
ok_ole_success
(
hr
,
IMoniker_Inverse
);
IMoniker_Release
(
inverse
);
IMoniker_Release
(
moniker
);
}
...
...
@@ -582,6 +610,9 @@ static void test_item_moniker(void)
IMoniker
*
moniker
;
DWORD
moniker_type
;
DWORD
hash
;
IBindCtx
*
bindctx
;
IMoniker
*
inverse
;
IUnknown
*
unknown
;
static
const
WCHAR
wszDelimeter
[]
=
{
'!'
,
0
};
static
const
WCHAR
wszObjectName
[]
=
{
'T'
,
'e'
,
's'
,
't'
,
0
};
static
const
WCHAR
expected_display_name
[]
=
{
'!'
,
'T'
,
'e'
,
's'
,
't'
,
0
};
...
...
@@ -613,6 +644,25 @@ static void test_item_moniker(void)
"dwMkSys != MKSYS_ITEMMONIKER, instead was 0x%08lx"
,
moniker_type
);
hr
=
CreateBindCtx
(
0
,
&
bindctx
);
ok_ole_success
(
hr
,
CreateBindCtx
);
/* IsRunning test */
hr
=
IMoniker_IsRunning
(
moniker
,
bindctx
,
NULL
,
NULL
);
ok
(
hr
==
S_FALSE
,
"IMoniker_IsRunning should return S_FALSE, not 0x%08lx
\n
"
,
hr
);
hr
=
IMoniker_BindToObject
(
moniker
,
bindctx
,
NULL
,
&
IID_IUnknown
,
(
void
**
)
&
unknown
);
ok
(
hr
==
E_INVALIDARG
,
"IMoniker_BindToStorage should return E_INVALIDARG, not 0x%08lx
\n
"
,
hr
);
hr
=
IMoniker_BindToStorage
(
moniker
,
bindctx
,
NULL
,
&
IID_IUnknown
,
(
void
**
)
&
unknown
);
ok
(
hr
==
E_INVALIDARG
,
"IMoniker_BindToObject should return E_INVALIDARG, not 0x%08lx
\n
"
,
hr
);
IBindCtx_Release
(
bindctx
);
hr
=
IMoniker_Inverse
(
moniker
,
&
inverse
);
ok_ole_success
(
hr
,
IMoniker_Inverse
);
IMoniker_Release
(
inverse
);
IMoniker_Release
(
moniker
);
}
...
...
@@ -620,9 +670,12 @@ static void test_anti_moniker(void)
{
HRESULT
hr
;
IMoniker
*
moniker
;
IMoniker
*
inverse
;
DWORD
moniker_type
;
DWORD
hash
;
IBindCtx
*
bindctx
;
FILETIME
filetime
;
IMoniker
*
inverse
;
IUnknown
*
unknown
;
static
const
WCHAR
expected_display_name
[]
=
{
'\\'
,
'.'
,
'.'
,
0
};
hr
=
CreateAntiMoniker
(
&
moniker
);
...
...
@@ -653,6 +706,24 @@ static void test_anti_moniker(void)
ok
(
hr
==
MK_E_NOINVERSE
,
"IMoniker_Inverse should have returned MK_E_NOINVERSE instead of 0x%08lx
\n
"
,
hr
);
ok
(
inverse
==
NULL
,
"inverse should have been set to NULL instead of %p
\n
"
,
inverse
);
hr
=
CreateBindCtx
(
0
,
&
bindctx
);
ok_ole_success
(
hr
,
CreateBindCtx
);
/* IsRunning test */
hr
=
IMoniker_IsRunning
(
moniker
,
bindctx
,
NULL
,
NULL
);
ok
(
hr
==
S_FALSE
,
"IMoniker_IsRunning should return S_FALSE, not 0x%08lx
\n
"
,
hr
);
hr
=
IMoniker_GetTimeOfLastChange
(
moniker
,
bindctx
,
NULL
,
&
filetime
);
ok
(
hr
==
E_NOTIMPL
,
"IMoniker_GetTimeOfLastChange should return E_NOTIMPL, not 0x%08lx
\n
"
,
hr
);
hr
=
IMoniker_BindToObject
(
moniker
,
bindctx
,
NULL
,
&
IID_IUnknown
,
(
void
**
)
&
unknown
);
ok
(
hr
==
E_NOTIMPL
,
"IMoniker_BindToObject should return E_NOTIMPL, not 0x%08lx
\n
"
,
hr
);
hr
=
IMoniker_BindToStorage
(
moniker
,
bindctx
,
NULL
,
&
IID_IUnknown
,
(
void
**
)
&
unknown
);
ok
(
hr
==
E_NOTIMPL
,
"IMoniker_BindToStorage should return E_NOTIMPL, not 0x%08lx
\n
"
,
hr
);
IBindCtx_Release
(
bindctx
);
IMoniker_Release
(
moniker
);
}
...
...
@@ -664,6 +735,10 @@ static void test_generic_composite_moniker(void)
IMoniker
*
moniker2
;
DWORD
moniker_type
;
DWORD
hash
;
IBindCtx
*
bindctx
;
FILETIME
filetime
;
IMoniker
*
inverse
;
IUnknown
*
unknown
;
static
const
WCHAR
wszDelimeter1
[]
=
{
'!'
,
0
};
static
const
WCHAR
wszObjectName1
[]
=
{
'T'
,
'e'
,
's'
,
't'
,
0
};
static
const
WCHAR
wszDelimeter2
[]
=
{
'#'
,
0
};
...
...
@@ -701,6 +776,31 @@ static void test_generic_composite_moniker(void)
"dwMkSys != MKSYS_GENERICCOMPOSITE, instead was 0x%08lx"
,
moniker_type
);
hr
=
CreateBindCtx
(
0
,
&
bindctx
);
ok_ole_success
(
hr
,
CreateBindCtx
);
/* IsRunning test */
hr
=
IMoniker_IsRunning
(
moniker
,
bindctx
,
NULL
,
NULL
);
todo_wine
ok
(
hr
==
S_FALSE
,
"IMoniker_IsRunning should return S_FALSE, not 0x%08lx
\n
"
,
hr
);
hr
=
IMoniker_GetTimeOfLastChange
(
moniker
,
bindctx
,
NULL
,
&
filetime
);
ok
(
hr
==
MK_E_NOTBINDABLE
,
"IMoniker_GetTimeOfLastChange should return MK_E_NOTBINDABLE, not 0x%08lx
\n
"
,
hr
);
hr
=
IMoniker_BindToObject
(
moniker
,
bindctx
,
NULL
,
&
IID_IUnknown
,
(
void
**
)
&
unknown
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"IMoniker_BindToObject should return E_INVALIDARG, not 0x%08lx
\n
"
,
hr
);
todo_wine
hr
=
IMoniker_BindToStorage
(
moniker
,
bindctx
,
NULL
,
&
IID_IUnknown
,
(
void
**
)
&
unknown
);
ok
(
hr
==
E_INVALIDARG
,
"IMoniker_BindToStorage should return E_INVALIDARG, not 0x%08lx
\n
"
,
hr
);
IBindCtx_Release
(
bindctx
);
hr
=
IMoniker_Inverse
(
moniker
,
&
inverse
);
ok_ole_success
(
hr
,
IMoniker_Inverse
);
IMoniker_Release
(
inverse
);
IMoniker_Release
(
moniker
);
}
...
...
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