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
f9db7723
Commit
f9db7723
authored
Sep 28, 2010
by
Vincent Povirk
Committed by
Alexandre Julliard
Oct 05, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mscoree: Add test for ICLRMetaHost_GetRuntime.
parent
d54b8007
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
metahost.c
dlls/mscoree/tests/metahost.c
+32
-0
No files found.
dlls/mscoree/tests/metahost.c
View file @
f9db7723
...
...
@@ -23,6 +23,7 @@
#include "windef.h"
#include "ole2.h"
#include "corerror.h"
#include "initguid.h"
#include "metahost.h"
#include "wine/test.h"
...
...
@@ -107,6 +108,35 @@ void test_enumruntimes(void)
IEnumUnknown_Release
(
runtime_enum
);
}
void
test_getruntime
(
void
)
{
static
const
WCHAR
twodotzero
[]
=
{
'v'
,
'2'
,
'.'
,
'0'
,
'.'
,
'5'
,
'0'
,
'7'
,
'2'
,
'7'
,
0
};
static
const
WCHAR
twodotzerodotzero
[]
=
{
'v'
,
'2'
,
'.'
,
'0'
,
'.'
,
'0'
,
0
};
HRESULT
hr
;
ICLRRuntimeInfo
*
info
;
DWORD
count
;
WCHAR
buf
[
MAX_PATH
];
hr
=
ICLRMetaHost_GetRuntime
(
metahost
,
NULL
,
&
IID_ICLRRuntimeInfo
,
(
void
**
)
&
info
);
todo_wine
ok
(
hr
==
E_POINTER
,
"GetVersion failed, hr=%x
\n
"
,
hr
);
hr
=
ICLRMetaHost_GetRuntime
(
metahost
,
twodotzero
,
&
IID_ICLRRuntimeInfo
,
(
void
**
)
&
info
);
todo_wine
ok
(
hr
==
S_OK
,
"GetVersion failed, hr=%x
\n
"
,
hr
);
if
(
hr
!=
S_OK
)
return
;
count
=
MAX_PATH
;
hr
=
ICLRRuntimeInfo_GetVersionString
(
info
,
buf
,
&
count
);
ok
(
hr
==
S_OK
,
"GetVersionString returned %x
\n
"
,
hr
);
ok
(
count
==
lstrlenW
(
buf
)
+
1
,
"GetVersionString returned count %u but string of length %u
\n
"
,
count
,
lstrlenW
(
buf
)
+
1
);
ok
(
lstrcmpW
(
buf
,
twodotzero
)
==
0
,
"got unexpected version %s
\n
"
,
wine_dbgstr_w
(
buf
));
ICLRRuntimeInfo_Release
(
info
);
/* Versions must match exactly. */
hr
=
ICLRMetaHost_GetRuntime
(
metahost
,
twodotzerodotzero
,
&
IID_ICLRRuntimeInfo
,
(
void
**
)
&
info
);
todo_wine
ok
(
hr
==
CLR_E_SHIM_RUNTIME
,
"GetVersion failed, hr=%x
\n
"
,
hr
);
}
START_TEST
(
metahost
)
{
if
(
!
init_pointers
())
...
...
@@ -114,5 +144,7 @@ START_TEST(metahost)
test_enumruntimes
();
test_getruntime
();
cleanup
();
}
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