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
2d0e84e6
Commit
2d0e84e6
authored
Feb 24, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 24, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fusion/tests: Enable compilation with long types.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e913d34e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
382 additions
and
383 deletions
+382
-383
Makefile.in
dlls/fusion/tests/Makefile.in
+0
-1
asmcache.c
dlls/fusion/tests/asmcache.c
+172
-172
asmenum.c
dlls/fusion/tests/asmenum.c
+41
-41
asmname.c
dlls/fusion/tests/asmname.c
+158
-158
fusion.c
dlls/fusion/tests/fusion.c
+11
-11
No files found.
dlls/fusion/tests/Makefile.in
View file @
2d0e84e6
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
TESTDLL
=
fusion.dll
IMPORTS
=
user32
...
...
dlls/fusion/tests/asmcache.c
View file @
2d0e84e6
...
...
@@ -843,7 +843,7 @@ static BOOL check_dotnet20(void)
create_assembly
(
"wine.dll"
);
hr
=
pCreateAssemblyCache
(
&
cache
,
0
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
hr
=
IAssemblyCache_InstallAssembly
(
cache
,
0
,
L"wine.dll"
,
NULL
);
if
(
hr
==
S_OK
)
...
...
@@ -853,7 +853,7 @@ static BOOL check_dotnet20(void)
else
if
(
hr
==
E_ACCESSDENIED
)
skip
(
"Not enough rights to install an assembly
\n
"
);
else
ok
(
0
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
0
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
DeleteFileA
(
"wine.dll"
);
IAssemblyCache_UninstallAssembly
(
cache
,
0
,
L"wine.dll"
,
NULL
,
&
disp
);
...
...
@@ -868,11 +868,11 @@ static void test_CreateAssemblyCache(void)
/* NULL ppAsmCache */
hr
=
pCreateAssemblyCache
(
NULL
,
0
);
ok
(
hr
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %08x
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %08
l
x
\n
"
,
hr
);
/* dwReserved is non-zero */
hr
=
pCreateAssemblyCache
(
&
cache
,
42
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
IAssemblyCache_Release
(
cache
);
}
...
...
@@ -884,29 +884,29 @@ static void test_CreateAssemblyCacheItem(void)
HRESULT
hr
;
hr
=
pCreateAssemblyCache
(
&
cache
,
0
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
hr
=
IAssemblyCache_CreateAssemblyCacheItem
(
cache
,
0
,
NULL
,
NULL
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %08x
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %08
l
x
\n
"
,
hr
);
hr
=
IAssemblyCache_CreateAssemblyCacheItem
(
cache
,
0
,
NULL
,
&
item
,
NULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
IAssemblyCacheItem_Release
(
item
);
hr
=
IAssemblyCache_CreateAssemblyCacheItem
(
cache
,
0
,
NULL
,
&
item
,
L"wine"
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
IAssemblyCacheItem_Release
(
item
);
hr
=
IAssemblyCache_CreateAssemblyCacheItem
(
cache
,
1
,
(
void
*
)
0xdeadbeef
,
&
item
,
NULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
IAssemblyCacheItem_Release
(
item
);
hr
=
IAssemblyCache_CreateAssemblyCacheItem
(
cache
,
1
,
NULL
,
&
item
,
NULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
IAssemblyCacheItem_Release
(
item
);
hr
=
IAssemblyCache_CreateAssemblyCacheItem
(
cache
,
0
,
(
void
*
)
0xdeadbeef
,
&
item
,
NULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
IAssemblyCacheItem_Release
(
item
);
IAssemblyCache_Release
(
cache
);
...
...
@@ -924,44 +924,44 @@ static void test_InstallAssembly(void)
create_assembly
(
"wine.dll"
);
hr
=
pCreateAssemblyCache
(
&
cache
,
0
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
/* NULL pszManifestFilePath */
hr
=
IAssemblyCache_InstallAssembly
(
cache
,
0
,
NULL
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %08x
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %08
l
x
\n
"
,
hr
);
/* empty pszManifestFilePath */
hr
=
IAssemblyCache_InstallAssembly
(
cache
,
0
,
L""
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %08x
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %08
l
x
\n
"
,
hr
);
/* pszManifestFilePath has no extension */
hr
=
IAssemblyCache_InstallAssembly
(
cache
,
0
,
L"file"
,
NULL
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_INVALID_NAME
),
"Expected HRESULT_FROM_WIN32(ERROR_INVALID_NAME), got %08x
\n
"
,
hr
);
"Expected HRESULT_FROM_WIN32(ERROR_INVALID_NAME), got %08
l
x
\n
"
,
hr
);
/* pszManifestFilePath has bad extension */
hr
=
IAssemblyCache_InstallAssembly
(
cache
,
0
,
L"file.bad"
,
NULL
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_INVALID_NAME
),
"Expected HRESULT_FROM_WIN32(ERROR_INVALID_NAME), got %08x
\n
"
,
hr
);
"Expected HRESULT_FROM_WIN32(ERROR_INVALID_NAME), got %08
l
x
\n
"
,
hr
);
/* pszManifestFilePath has dll extension */
hr
=
IAssemblyCache_InstallAssembly
(
cache
,
0
,
L"file.dll"
,
NULL
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_FILE_NOT_FOUND
),
"Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08x
\n
"
,
hr
);
"Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08
l
x
\n
"
,
hr
);
/* pszManifestFilePath has exe extension */
hr
=
IAssemblyCache_InstallAssembly
(
cache
,
0
,
L"file.exe"
,
NULL
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_FILE_NOT_FOUND
),
"Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08x
\n
"
,
hr
);
"Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08
l
x
\n
"
,
hr
);
/* empty file */
hr
=
IAssemblyCache_InstallAssembly
(
cache
,
0
,
L"test.dll"
,
NULL
);
ok
(
hr
==
COR_E_ASSEMBLYEXPECTED
,
"Expected COR_E_ASSEMBLYEXPECTED, got %08x
\n
"
,
hr
);
"Expected COR_E_ASSEMBLYEXPECTED, got %08
l
x
\n
"
,
hr
);
/* wine assembly */
hr
=
IAssemblyCache_InstallAssembly
(
cache
,
0
,
L"wine.dll"
,
NULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
GetWindowsDirectoryA
(
dllpath
,
MAX_PATH
);
strcat
(
dllpath
,
"
\\
assembly
\\
GAC_MSIL
\\
wine
\\\\
1.0.0.0__2d03617b1c31e2f5
\\
wine.dll"
);
...
...
@@ -972,18 +972,18 @@ static void test_InstallAssembly(void)
/* uninstall the assembly from the GAC */
disp
=
0xf00dbad
;
hr
=
IAssemblyCache_UninstallAssembly
(
cache
,
0
,
L"wine"
,
NULL
,
&
disp
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
disp
==
IASSEMBLYCACHE_UNINSTALL_DISPOSITION_UNINSTALLED
,
"Expected IASSEMBLYCACHE_UNINSTALL_DISPOSITION_UNINSTALLED, got %d
\n
"
,
disp
);
"Expected IASSEMBLYCACHE_UNINSTALL_DISPOSITION_UNINSTALLED, got %
l
d
\n
"
,
disp
);
attr
=
GetFileAttributesA
(
dllpath
);
ok
(
attr
==
INVALID_FILE_ATTRIBUTES
,
"Expected assembly not to exist
\n
"
);
disp
=
0xf00dbad
;
hr
=
IAssemblyCache_UninstallAssembly
(
cache
,
0
,
L"wine"
,
NULL
,
&
disp
);
ok
(
hr
==
S_FALSE
,
"Expected S_FALSE, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_FALSE
,
"Expected S_FALSE, got %08
l
x
\n
"
,
hr
);
ok
(
disp
==
IASSEMBLYCACHE_UNINSTALL_DISPOSITION_ALREADY_UNINSTALLED
,
"Expected IASSEMBLYCACHE_UNINSTALL_DISPOSITION_ALREADY_UNINSTALLED, got %d
\n
"
,
disp
);
"Expected IASSEMBLYCACHE_UNINSTALL_DISPOSITION_ALREADY_UNINSTALLED, got %
l
d
\n
"
,
disp
);
DeleteFileA
(
"test.dll"
);
DeleteFileA
(
"wine.dll"
);
...
...
@@ -1010,253 +1010,253 @@ static void test_QueryAssemblyInfo(void)
size
=
MAX_PATH
;
hr
=
pGetCachePath
(
ASM_CACHE_GAC
,
asmpath
,
&
size
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
lstrcatW
(
asmpath
,
L"_MSIL
\\
wine
\\
1.0.0.0__2d03617b1c31e2f5
\\
wine.dll"
);
create_assembly
(
"wine.dll"
);
hr
=
pCreateAssemblyCache
(
&
cache
,
0
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
/* assembly not installed yet */
INIT_ASM_INFO
();
hr
=
IAssemblyCache_QueryAssemblyInfo
(
cache
,
0
,
L"wine"
,
&
info
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_FILE_NOT_FOUND
),
"Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08x
\n
"
,
hr
);
"Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08
l
x
\n
"
,
hr
);
ok
(
info
.
cbAssemblyInfo
==
sizeof
(
ASSEMBLY_INFO
),
"Expected sizeof(ASSEMBLY_INFO), got %d
\n
"
,
info
.
cbAssemblyInfo
);
ok
(
info
.
dwAssemblyFlags
==
0
,
"Expected 0, got %08x
\n
"
,
info
.
dwAssemblyFlags
);
"Expected sizeof(ASSEMBLY_INFO), got %
l
d
\n
"
,
info
.
cbAssemblyInfo
);
ok
(
info
.
dwAssemblyFlags
==
0
,
"Expected 0, got %08
l
x
\n
"
,
info
.
dwAssemblyFlags
);
ok
(
info
.
uliAssemblySizeInKB
.
u
.
HighPart
==
0
,
"Expected 0, got %d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
HighPart
);
"Expected 0, got %
l
d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
HighPart
);
ok
(
info
.
uliAssemblySizeInKB
.
u
.
LowPart
==
0
,
"Expected 0, got %d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
LowPart
);
"Expected 0, got %
l
d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
LowPart
);
ok
(
!
lstrcmpW
(
info
.
pszCurrentAssemblyPathBuf
,
L""
),
"Assembly path was changed
\n
"
);
ok
(
info
.
cchBuf
==
MAX_PATH
,
"Expected MAX_PATH, got %d
\n
"
,
info
.
cchBuf
);
ok
(
info
.
cchBuf
==
MAX_PATH
,
"Expected MAX_PATH, got %
l
d
\n
"
,
info
.
cchBuf
);
hr
=
IAssemblyCache_InstallAssembly
(
cache
,
0
,
L"wine.dll"
,
NULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
/* NULL pszAssemblyName */
INIT_ASM_INFO
();
hr
=
IAssemblyCache_QueryAssemblyInfo
(
cache
,
QUERYASMINFO_FLAG_VALIDATE
,
NULL
,
&
info
);
ok
(
hr
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %08x
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %08
l
x
\n
"
,
hr
);
ok
(
info
.
cbAssemblyInfo
==
sizeof
(
ASSEMBLY_INFO
),
"Expected sizeof(ASSEMBLY_INFO), got %d
\n
"
,
info
.
cbAssemblyInfo
);
ok
(
info
.
dwAssemblyFlags
==
0
,
"Expected 0, got %08x
\n
"
,
info
.
dwAssemblyFlags
);
"Expected sizeof(ASSEMBLY_INFO), got %
l
d
\n
"
,
info
.
cbAssemblyInfo
);
ok
(
info
.
dwAssemblyFlags
==
0
,
"Expected 0, got %08
l
x
\n
"
,
info
.
dwAssemblyFlags
);
ok
(
info
.
uliAssemblySizeInKB
.
u
.
HighPart
==
0
,
"Expected 0, got %d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
HighPart
);
"Expected 0, got %
l
d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
HighPart
);
ok
(
info
.
uliAssemblySizeInKB
.
u
.
LowPart
==
0
,
"Expected 0, got %d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
LowPart
);
"Expected 0, got %
l
d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
LowPart
);
ok
(
!
lstrcmpW
(
info
.
pszCurrentAssemblyPathBuf
,
L""
),
"Assembly path was changed
\n
"
);
ok
(
info
.
cchBuf
==
MAX_PATH
,
"Expected MAX_PATH, got %d
\n
"
,
info
.
cchBuf
);
ok
(
info
.
cchBuf
==
MAX_PATH
,
"Expected MAX_PATH, got %
l
d
\n
"
,
info
.
cchBuf
);
/* empty pszAssemblyName */
INIT_ASM_INFO
();
hr
=
IAssemblyCache_QueryAssemblyInfo
(
cache
,
QUERYASMINFO_FLAG_VALIDATE
,
L""
,
&
info
);
ok
(
hr
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %08x
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %08
l
x
\n
"
,
hr
);
ok
(
info
.
cbAssemblyInfo
==
sizeof
(
ASSEMBLY_INFO
),
"Expected sizeof(ASSEMBLY_INFO), got %d
\n
"
,
info
.
cbAssemblyInfo
);
ok
(
info
.
dwAssemblyFlags
==
0
,
"Expected 0, got %08x
\n
"
,
info
.
dwAssemblyFlags
);
"Expected sizeof(ASSEMBLY_INFO), got %
l
d
\n
"
,
info
.
cbAssemblyInfo
);
ok
(
info
.
dwAssemblyFlags
==
0
,
"Expected 0, got %08
l
x
\n
"
,
info
.
dwAssemblyFlags
);
ok
(
info
.
uliAssemblySizeInKB
.
u
.
HighPart
==
0
,
"Expected 0, got %d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
HighPart
);
"Expected 0, got %
l
d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
HighPart
);
ok
(
info
.
uliAssemblySizeInKB
.
u
.
LowPart
==
0
,
"Expected 0, got %d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
LowPart
);
"Expected 0, got %
l
d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
LowPart
);
ok
(
!
lstrcmpW
(
info
.
pszCurrentAssemblyPathBuf
,
L""
),
"Assembly path was changed
\n
"
);
ok
(
info
.
cchBuf
==
MAX_PATH
,
"Expected MAX_PATH, got %d
\n
"
,
info
.
cchBuf
);
ok
(
info
.
cchBuf
==
MAX_PATH
,
"Expected MAX_PATH, got %
l
d
\n
"
,
info
.
cchBuf
);
/* no dwFlags */
INIT_ASM_INFO
();
hr
=
IAssemblyCache_QueryAssemblyInfo
(
cache
,
0
,
L"wine"
,
&
info
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
info
.
cbAssemblyInfo
==
sizeof
(
ASSEMBLY_INFO
),
"Expected sizeof(ASSEMBLY_INFO), got %d
\n
"
,
info
.
cbAssemblyInfo
);
"Expected sizeof(ASSEMBLY_INFO), got %
l
d
\n
"
,
info
.
cbAssemblyInfo
);
ok
(
info
.
dwAssemblyFlags
==
ASSEMBLYINFO_FLAG_INSTALLED
,
"Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08x
\n
"
,
info
.
dwAssemblyFlags
);
"Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08
l
x
\n
"
,
info
.
dwAssemblyFlags
);
ok
(
info
.
uliAssemblySizeInKB
.
u
.
HighPart
==
0
,
"Expected 0, got %d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
HighPart
);
"Expected 0, got %
l
d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
HighPart
);
ok
(
info
.
uliAssemblySizeInKB
.
u
.
LowPart
==
0
,
"Expected 0, got %d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
LowPart
);
"Expected 0, got %
l
d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
LowPart
);
ok
(
!
lstrcmpW
(
info
.
pszCurrentAssemblyPathBuf
,
asmpath
),
"Wrong assembly path returned
\n
"
);
ok
(
info
.
cchBuf
==
lstrlenW
(
asmpath
)
+
1
,
"Expected %d, got %d
\n
"
,
lstrlenW
(
asmpath
)
+
1
,
info
.
cchBuf
);
"Expected %d, got %
l
d
\n
"
,
lstrlenW
(
asmpath
)
+
1
,
info
.
cchBuf
);
/* pwzCachePath is full filename */
INIT_ASM_INFO
();
hr
=
IAssemblyCache_QueryAssemblyInfo
(
cache
,
0
,
L"wine.dll"
,
&
info
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_FILE_NOT_FOUND
),
"Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08x
\n
"
,
hr
);
"Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08
l
x
\n
"
,
hr
);
ok
(
info
.
cbAssemblyInfo
==
sizeof
(
ASSEMBLY_INFO
),
"Expected sizeof(ASSEMBLY_INFO), got %d
\n
"
,
info
.
cbAssemblyInfo
);
ok
(
info
.
dwAssemblyFlags
==
0
,
"Expected 0, got %08x
\n
"
,
info
.
dwAssemblyFlags
);
"Expected sizeof(ASSEMBLY_INFO), got %
l
d
\n
"
,
info
.
cbAssemblyInfo
);
ok
(
info
.
dwAssemblyFlags
==
0
,
"Expected 0, got %08
l
x
\n
"
,
info
.
dwAssemblyFlags
);
ok
(
info
.
uliAssemblySizeInKB
.
u
.
HighPart
==
0
,
"Expected 0, got %d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
HighPart
);
"Expected 0, got %
l
d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
HighPart
);
ok
(
info
.
uliAssemblySizeInKB
.
u
.
LowPart
==
0
,
"Expected 0, got %d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
LowPart
);
"Expected 0, got %
l
d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
LowPart
);
ok
(
!
lstrcmpW
(
info
.
pszCurrentAssemblyPathBuf
,
L""
),
"Assembly path was changed
\n
"
);
ok
(
info
.
cchBuf
==
MAX_PATH
,
"Expected MAX_PATH, got %d
\n
"
,
info
.
cchBuf
);
ok
(
info
.
cchBuf
==
MAX_PATH
,
"Expected MAX_PATH, got %
l
d
\n
"
,
info
.
cchBuf
);
/* NULL pAsmInfo, QUERYASMINFO_FLAG_VALIDATE */
hr
=
IAssemblyCache_QueryAssemblyInfo
(
cache
,
QUERYASMINFO_FLAG_VALIDATE
,
L"wine"
,
NULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
/* NULL pAsmInfo, QUERYASMINFO_FLAG_GETSIZE */
hr
=
IAssemblyCache_QueryAssemblyInfo
(
cache
,
QUERYASMINFO_FLAG_GETSIZE
,
L"wine"
,
NULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
/* info.cbAssemblyInfo is 0 */
INIT_ASM_INFO
();
info
.
cbAssemblyInfo
=
0
;
hr
=
IAssemblyCache_QueryAssemblyInfo
(
cache
,
QUERYASMINFO_FLAG_VALIDATE
,
L"wine"
,
&
info
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
info
.
cbAssemblyInfo
==
sizeof
(
ASSEMBLY_INFO
),
"Expected sizeof(ASSEMBLY_INFO), got %d
\n
"
,
info
.
cbAssemblyInfo
);
"Expected sizeof(ASSEMBLY_INFO), got %
l
d
\n
"
,
info
.
cbAssemblyInfo
);
ok
(
info
.
dwAssemblyFlags
==
ASSEMBLYINFO_FLAG_INSTALLED
,
"Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08x
\n
"
,
info
.
dwAssemblyFlags
);
"Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08
l
x
\n
"
,
info
.
dwAssemblyFlags
);
ok
(
info
.
uliAssemblySizeInKB
.
u
.
HighPart
==
0
,
"Expected 0, got %d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
HighPart
);
"Expected 0, got %
l
d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
HighPart
);
ok
(
info
.
uliAssemblySizeInKB
.
u
.
LowPart
==
0
,
"Expected 0, got %d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
LowPart
);
"Expected 0, got %
l
d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
LowPart
);
ok
(
!
lstrcmpW
(
info
.
pszCurrentAssemblyPathBuf
,
asmpath
),
"Wrong assembly path returned
\n
"
);
ok
(
info
.
cchBuf
==
lstrlenW
(
asmpath
)
+
1
,
"Expected %d, got %d
\n
"
,
lstrlenW
(
asmpath
)
+
1
,
info
.
cchBuf
);
"Expected %d, got %
l
d
\n
"
,
lstrlenW
(
asmpath
)
+
1
,
info
.
cchBuf
);
/* info.cbAssemblyInfo is 1 */
INIT_ASM_INFO
();
info
.
cbAssemblyInfo
=
1
;
hr
=
IAssemblyCache_QueryAssemblyInfo
(
cache
,
QUERYASMINFO_FLAG_VALIDATE
,
L"wine"
,
&
info
);
ok
(
hr
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %08x
\n
"
,
hr
);
ok
(
info
.
cbAssemblyInfo
==
1
,
"Expected 1, got %d
\n
"
,
info
.
cbAssemblyInfo
);
ok
(
info
.
dwAssemblyFlags
==
0
,
"Expected 0, got %08x
\n
"
,
info
.
dwAssemblyFlags
);
ok
(
hr
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %08
l
x
\n
"
,
hr
);
ok
(
info
.
cbAssemblyInfo
==
1
,
"Expected 1, got %
l
d
\n
"
,
info
.
cbAssemblyInfo
);
ok
(
info
.
dwAssemblyFlags
==
0
,
"Expected 0, got %08
l
x
\n
"
,
info
.
dwAssemblyFlags
);
ok
(
info
.
uliAssemblySizeInKB
.
u
.
HighPart
==
0
,
"Expected 0, got %d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
HighPart
);
"Expected 0, got %
l
d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
HighPart
);
ok
(
info
.
uliAssemblySizeInKB
.
u
.
LowPart
==
0
,
"Expected 0, got %d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
LowPart
);
"Expected 0, got %
l
d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
LowPart
);
ok
(
!
lstrcmpW
(
info
.
pszCurrentAssemblyPathBuf
,
L""
),
"Assembly path was changed
\n
"
);
ok
(
info
.
cchBuf
==
MAX_PATH
,
"Expected MAX_PATH, got %d
\n
"
,
info
.
cchBuf
);
ok
(
info
.
cchBuf
==
MAX_PATH
,
"Expected MAX_PATH, got %
l
d
\n
"
,
info
.
cchBuf
);
/* info.cbAssemblyInfo is > sizeof(ASSEMBLY_INFO) */
INIT_ASM_INFO
();
info
.
cbAssemblyInfo
=
sizeof
(
ASSEMBLY_INFO
)
*
2
;
hr
=
IAssemblyCache_QueryAssemblyInfo
(
cache
,
QUERYASMINFO_FLAG_GETSIZE
,
L"wine"
,
&
info
);
ok
(
hr
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %08x
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %08
l
x
\n
"
,
hr
);
ok
(
info
.
cbAssemblyInfo
==
sizeof
(
ASSEMBLY_INFO
)
*
2
,
"Expected sizeof(ASSEMBLY_INFO) * 2, got %d
\n
"
,
info
.
cbAssemblyInfo
);
ok
(
info
.
dwAssemblyFlags
==
0
,
"Expected 0, got %08x
\n
"
,
info
.
dwAssemblyFlags
);
"Expected sizeof(ASSEMBLY_INFO) * 2, got %
l
d
\n
"
,
info
.
cbAssemblyInfo
);
ok
(
info
.
dwAssemblyFlags
==
0
,
"Expected 0, got %08
l
x
\n
"
,
info
.
dwAssemblyFlags
);
ok
(
info
.
uliAssemblySizeInKB
.
u
.
HighPart
==
0
,
"Expected 0, got %d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
HighPart
);
"Expected 0, got %
l
d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
HighPart
);
ok
(
info
.
uliAssemblySizeInKB
.
u
.
LowPart
==
0
,
"Expected 0, got %d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
LowPart
);
"Expected 0, got %
l
d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
LowPart
);
ok
(
!
lstrcmpW
(
info
.
pszCurrentAssemblyPathBuf
,
L""
),
"Assembly path was changed
\n
"
);
ok
(
info
.
cchBuf
==
MAX_PATH
,
"Expected MAX_PATH, got %d
\n
"
,
info
.
cchBuf
);
ok
(
info
.
cchBuf
==
MAX_PATH
,
"Expected MAX_PATH, got %
l
d
\n
"
,
info
.
cchBuf
);
/* QUERYASMINFO_FLAG_GETSIZE */
INIT_ASM_INFO
();
hr
=
IAssemblyCache_QueryAssemblyInfo
(
cache
,
QUERYASMINFO_FLAG_GETSIZE
,
L"wine"
,
&
info
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
info
.
cbAssemblyInfo
==
sizeof
(
ASSEMBLY_INFO
),
"Expected sizeof(ASSEMBLY_INFO), got %d
\n
"
,
info
.
cbAssemblyInfo
);
"Expected sizeof(ASSEMBLY_INFO), got %
l
d
\n
"
,
info
.
cbAssemblyInfo
);
ok
(
info
.
dwAssemblyFlags
==
ASSEMBLYINFO_FLAG_INSTALLED
,
"Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08x
\n
"
,
info
.
dwAssemblyFlags
);
"Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08
l
x
\n
"
,
info
.
dwAssemblyFlags
);
ok
(
info
.
uliAssemblySizeInKB
.
u
.
HighPart
==
0
,
"Expected 0, got %d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
HighPart
);
"Expected 0, got %
l
d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
HighPart
);
todo_wine
{
ok
((
info
.
uliAssemblySizeInKB
.
u
.
LowPart
==
4
),
"Expected 4, got %d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
LowPart
);
"Expected 4, got %
l
d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
LowPart
);
}
ok
(
!
lstrcmpW
(
info
.
pszCurrentAssemblyPathBuf
,
asmpath
),
"Wrong assembly path returned
\n
"
);
ok
(
info
.
cchBuf
==
lstrlenW
(
asmpath
)
+
1
,
"Expected %d, got %d
\n
"
,
lstrlenW
(
asmpath
)
+
1
,
info
.
cchBuf
);
"Expected %d, got %
l
d
\n
"
,
lstrlenW
(
asmpath
)
+
1
,
info
.
cchBuf
);
/* QUERYASMINFO_FLAG_GETSIZE and QUERYASMINFO_FLAG_VALIDATE */
INIT_ASM_INFO
();
hr
=
IAssemblyCache_QueryAssemblyInfo
(
cache
,
QUERYASMINFO_FLAG_GETSIZE
|
QUERYASMINFO_FLAG_VALIDATE
,
L"wine"
,
&
info
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
info
.
cbAssemblyInfo
==
sizeof
(
ASSEMBLY_INFO
),
"Expected sizeof(ASSEMBLY_INFO), got %d
\n
"
,
info
.
cbAssemblyInfo
);
"Expected sizeof(ASSEMBLY_INFO), got %
l
d
\n
"
,
info
.
cbAssemblyInfo
);
ok
(
info
.
dwAssemblyFlags
==
ASSEMBLYINFO_FLAG_INSTALLED
,
"Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08x
\n
"
,
info
.
dwAssemblyFlags
);
"Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08
l
x
\n
"
,
info
.
dwAssemblyFlags
);
ok
(
info
.
uliAssemblySizeInKB
.
u
.
HighPart
==
0
,
"Expected 0, got %d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
HighPart
);
"Expected 0, got %
l
d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
HighPart
);
todo_wine
{
ok
((
info
.
uliAssemblySizeInKB
.
u
.
LowPart
==
4
),
"Expected 4, got %d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
LowPart
);
"Expected 4, got %
l
d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
LowPart
);
}
ok
(
!
lstrcmpW
(
info
.
pszCurrentAssemblyPathBuf
,
asmpath
),
"Wrong assembly path returned
\n
"
);
ok
(
info
.
cchBuf
==
lstrlenW
(
asmpath
)
+
1
,
"Expected %d, got %d
\n
"
,
lstrlenW
(
asmpath
)
+
1
,
info
.
cchBuf
);
"Expected %d, got %
l
d
\n
"
,
lstrlenW
(
asmpath
)
+
1
,
info
.
cchBuf
);
/* info.pszCurrentAssemblyPathBuf is NULL */
INIT_ASM_INFO
();
info
.
pszCurrentAssemblyPathBuf
=
NULL
;
hr
=
IAssemblyCache_QueryAssemblyInfo
(
cache
,
QUERYASMINFO_FLAG_GETSIZE
,
L"wine"
,
&
info
);
ok
(
info
.
cbAssemblyInfo
==
sizeof
(
ASSEMBLY_INFO
),
"Expected sizeof(ASSEMBLY_INFO), got %d
\n
"
,
info
.
cbAssemblyInfo
);
"Expected sizeof(ASSEMBLY_INFO), got %
l
d
\n
"
,
info
.
cbAssemblyInfo
);
ok
(
info
.
dwAssemblyFlags
==
ASSEMBLYINFO_FLAG_INSTALLED
,
"Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08x
\n
"
,
info
.
dwAssemblyFlags
);
"Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08
l
x
\n
"
,
info
.
dwAssemblyFlags
);
ok
(
info
.
uliAssemblySizeInKB
.
u
.
HighPart
==
0
,
"Expected 0, got %d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
HighPart
);
ok
(
hr
==
E_NOT_SUFFICIENT_BUFFER
,
"Expected E_NOT_SUFFICIENT_BUFFER, got %08x
\n
"
,
hr
);
"Expected 0, got %
l
d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
HighPart
);
ok
(
hr
==
E_NOT_SUFFICIENT_BUFFER
,
"Expected E_NOT_SUFFICIENT_BUFFER, got %08
l
x
\n
"
,
hr
);
todo_wine
{
ok
((
info
.
uliAssemblySizeInKB
.
u
.
LowPart
==
4
),
"Expected 4, got %d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
LowPart
);
"Expected 4, got %
l
d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
LowPart
);
}
ok
(
info
.
cchBuf
==
lstrlenW
(
asmpath
)
+
1
,
"Expected %d, got %d
\n
"
,
lstrlenW
(
asmpath
)
+
1
,
info
.
cchBuf
);
"Expected %d, got %
l
d
\n
"
,
lstrlenW
(
asmpath
)
+
1
,
info
.
cchBuf
);
/* info.cchBuf is exactly size of asmpath */
INIT_ASM_INFO
();
info
.
cchBuf
=
lstrlenW
(
asmpath
);
hr
=
IAssemblyCache_QueryAssemblyInfo
(
cache
,
QUERYASMINFO_FLAG_GETSIZE
,
L"wine"
,
&
info
);
ok
(
info
.
cbAssemblyInfo
==
sizeof
(
ASSEMBLY_INFO
),
"Expected sizeof(ASSEMBLY_INFO), got %d
\n
"
,
info
.
cbAssemblyInfo
);
"Expected sizeof(ASSEMBLY_INFO), got %
l
d
\n
"
,
info
.
cbAssemblyInfo
);
ok
(
info
.
dwAssemblyFlags
==
ASSEMBLYINFO_FLAG_INSTALLED
,
"Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08x
\n
"
,
info
.
dwAssemblyFlags
);
"Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08
l
x
\n
"
,
info
.
dwAssemblyFlags
);
ok
(
info
.
uliAssemblySizeInKB
.
u
.
HighPart
==
0
,
"Expected 0, got %d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
HighPart
);
"Expected 0, got %
l
d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
HighPart
);
ok
(
!
lstrcmpW
(
info
.
pszCurrentAssemblyPathBuf
,
L""
),
"Assembly path was changed
\n
"
);
ok
(
hr
==
E_NOT_SUFFICIENT_BUFFER
,
"Expected E_NOT_SUFFICIENT_BUFFER, got %08x
\n
"
,
hr
);
ok
(
hr
==
E_NOT_SUFFICIENT_BUFFER
,
"Expected E_NOT_SUFFICIENT_BUFFER, got %08
l
x
\n
"
,
hr
);
todo_wine
{
ok
((
info
.
uliAssemblySizeInKB
.
u
.
LowPart
==
4
),
"Expected 4, got %d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
LowPart
);
"Expected 4, got %
l
d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
LowPart
);
}
ok
(
info
.
cchBuf
==
lstrlenW
(
asmpath
)
+
1
,
"Expected %d, got %d
\n
"
,
lstrlenW
(
asmpath
)
+
1
,
info
.
cchBuf
);
"Expected %d, got %
l
d
\n
"
,
lstrlenW
(
asmpath
)
+
1
,
info
.
cchBuf
);
/* info.cchBuf has room for NULL-terminator */
INIT_ASM_INFO
();
info
.
cchBuf
=
lstrlenW
(
asmpath
)
+
1
;
hr
=
IAssemblyCache_QueryAssemblyInfo
(
cache
,
QUERYASMINFO_FLAG_GETSIZE
,
L"wine"
,
&
info
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
info
.
cbAssemblyInfo
==
sizeof
(
ASSEMBLY_INFO
),
"Expected sizeof(ASSEMBLY_INFO), got %d
\n
"
,
info
.
cbAssemblyInfo
);
"Expected sizeof(ASSEMBLY_INFO), got %
l
d
\n
"
,
info
.
cbAssemblyInfo
);
ok
(
info
.
dwAssemblyFlags
==
ASSEMBLYINFO_FLAG_INSTALLED
,
"Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08x
\n
"
,
info
.
dwAssemblyFlags
);
"Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08
l
x
\n
"
,
info
.
dwAssemblyFlags
);
ok
(
info
.
uliAssemblySizeInKB
.
u
.
HighPart
==
0
,
"Expected 0, got %d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
HighPart
);
"Expected 0, got %
l
d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
HighPart
);
ok
(
info
.
cchBuf
==
lstrlenW
(
asmpath
)
+
1
,
"Expected %d, got %d
\n
"
,
lstrlenW
(
asmpath
)
+
1
,
info
.
cchBuf
);
"Expected %d, got %
l
d
\n
"
,
lstrlenW
(
asmpath
)
+
1
,
info
.
cchBuf
);
todo_wine
{
ok
((
info
.
uliAssemblySizeInKB
.
u
.
LowPart
==
4
),
"Expected 4, got %d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
LowPart
);
"Expected 4, got %
l
d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
LowPart
);
}
ok
(
!
lstrcmpW
(
info
.
pszCurrentAssemblyPathBuf
,
asmpath
),
"Wrong assembly path returned
\n
"
);
...
...
@@ -1266,59 +1266,59 @@ static void test_QueryAssemblyInfo(void)
lstrcpyW
(
name
,
L"wine, Version=1.0.0.0"
);
hr
=
IAssemblyCache_QueryAssemblyInfo
(
cache
,
QUERYASMINFO_FLAG_GETSIZE
,
name
,
&
info
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
info
.
cbAssemblyInfo
==
sizeof
(
ASSEMBLY_INFO
),
"Expected sizeof(ASSEMBLY_INFO), got %d
\n
"
,
info
.
cbAssemblyInfo
);
"Expected sizeof(ASSEMBLY_INFO), got %
l
d
\n
"
,
info
.
cbAssemblyInfo
);
ok
(
info
.
dwAssemblyFlags
==
ASSEMBLYINFO_FLAG_INSTALLED
,
"Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08x
\n
"
,
info
.
dwAssemblyFlags
);
"Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08
l
x
\n
"
,
info
.
dwAssemblyFlags
);
ok
(
info
.
uliAssemblySizeInKB
.
u
.
HighPart
==
0
,
"Expected 0, got %d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
HighPart
);
"Expected 0, got %
l
d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
HighPart
);
todo_wine
{
ok
((
info
.
uliAssemblySizeInKB
.
u
.
LowPart
==
4
),
"Expected 4, got %d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
LowPart
);
"Expected 4, got %
l
d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
LowPart
);
}
ok
(
!
lstrcmpW
(
info
.
pszCurrentAssemblyPathBuf
,
asmpath
),
"Wrong assembly path returned
\n
"
);
ok
(
info
.
cchBuf
==
lstrlenW
(
asmpath
)
+
1
,
"Expected %d, got %d
\n
"
,
lstrlenW
(
asmpath
)
+
1
,
info
.
cchBuf
);
"Expected %d, got %
l
d
\n
"
,
lstrlenW
(
asmpath
)
+
1
,
info
.
cchBuf
);
/* short buffer, QUERYASMINFO_FLAG_VALIDATE */
memset
(
&
info
,
0
,
sizeof
(
info
));
lstrcpyW
(
name
,
L"wine, Version=1.0.0.00000"
);
hr
=
IAssemblyCache_QueryAssemblyInfo
(
cache
,
QUERYASMINFO_FLAG_VALIDATE
,
name
,
&
info
);
ok
(
hr
==
E_NOT_SUFFICIENT_BUFFER
,
"got %08x
\n
"
,
hr
);
ok
(
info
.
dwAssemblyFlags
==
ASSEMBLYINFO_FLAG_INSTALLED
,
"got %08x
\n
"
,
info
.
dwAssemblyFlags
);
ok
(
hr
==
E_NOT_SUFFICIENT_BUFFER
,
"got %08
l
x
\n
"
,
hr
);
ok
(
info
.
dwAssemblyFlags
==
ASSEMBLYINFO_FLAG_INSTALLED
,
"got %08
l
x
\n
"
,
info
.
dwAssemblyFlags
);
/* short buffer, QUERYASMINFO_FLAG_GETSIZE */
memset
(
&
info
,
0
,
sizeof
(
info
));
lstrcpyW
(
name
,
L"wine, Version=1.0.0.00000"
);
hr
=
IAssemblyCache_QueryAssemblyInfo
(
cache
,
QUERYASMINFO_FLAG_GETSIZE
,
name
,
&
info
);
ok
(
hr
==
E_NOT_SUFFICIENT_BUFFER
,
"got %08x
\n
"
,
hr
);
ok
(
info
.
dwAssemblyFlags
==
ASSEMBLYINFO_FLAG_INSTALLED
,
"got %08x
\n
"
,
info
.
dwAssemblyFlags
);
ok
(
hr
==
E_NOT_SUFFICIENT_BUFFER
,
"got %08
l
x
\n
"
,
hr
);
ok
(
info
.
dwAssemblyFlags
==
ASSEMBLYINFO_FLAG_INSTALLED
,
"got %08
l
x
\n
"
,
info
.
dwAssemblyFlags
);
/* display name is "wine, Version=1.0.0.00000" */
INIT_ASM_INFO
();
hr
=
IAssemblyCache_QueryAssemblyInfo
(
cache
,
QUERYASMINFO_FLAG_GETSIZE
,
name
,
&
info
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
info
.
cbAssemblyInfo
==
sizeof
(
ASSEMBLY_INFO
),
"Expected sizeof(ASSEMBLY_INFO), got %d
\n
"
,
info
.
cbAssemblyInfo
);
"Expected sizeof(ASSEMBLY_INFO), got %
l
d
\n
"
,
info
.
cbAssemblyInfo
);
ok
(
info
.
dwAssemblyFlags
==
ASSEMBLYINFO_FLAG_INSTALLED
,
"Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08x
\n
"
,
info
.
dwAssemblyFlags
);
"Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08
l
x
\n
"
,
info
.
dwAssemblyFlags
);
ok
(
info
.
uliAssemblySizeInKB
.
u
.
HighPart
==
0
,
"Expected 0, got %d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
HighPart
);
"Expected 0, got %
l
d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
HighPart
);
todo_wine
{
ok
((
info
.
uliAssemblySizeInKB
.
u
.
LowPart
==
4
),
"Expected 4, got %d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
LowPart
);
"Expected 4, got %
l
d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
LowPart
);
}
ok
(
!
lstrcmpW
(
info
.
pszCurrentAssemblyPathBuf
,
asmpath
),
"Wrong assembly path returned
\n
"
);
ok
(
info
.
cchBuf
==
lstrlenW
(
asmpath
)
+
1
,
"Expected %d, got %d
\n
"
,
lstrlenW
(
asmpath
)
+
1
,
info
.
cchBuf
);
"Expected %d, got %
l
d
\n
"
,
lstrlenW
(
asmpath
)
+
1
,
info
.
cchBuf
);
/* display name is "wine, Version=1.0.0.1", versions don't match */
INIT_ASM_INFO
();
...
...
@@ -1326,17 +1326,17 @@ static void test_QueryAssemblyInfo(void)
hr
=
IAssemblyCache_QueryAssemblyInfo
(
cache
,
QUERYASMINFO_FLAG_GETSIZE
,
name
,
&
info
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_FILE_NOT_FOUND
),
"Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08x
\n
"
,
hr
);
"Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08
l
x
\n
"
,
hr
);
ok
(
info
.
cbAssemblyInfo
==
sizeof
(
ASSEMBLY_INFO
),
"Expected sizeof(ASSEMBLY_INFO), got %d
\n
"
,
info
.
cbAssemblyInfo
);
ok
(
info
.
dwAssemblyFlags
==
0
,
"Expected 0, got %08x
\n
"
,
info
.
dwAssemblyFlags
);
"Expected sizeof(ASSEMBLY_INFO), got %
l
d
\n
"
,
info
.
cbAssemblyInfo
);
ok
(
info
.
dwAssemblyFlags
==
0
,
"Expected 0, got %08
l
x
\n
"
,
info
.
dwAssemblyFlags
);
ok
(
info
.
uliAssemblySizeInKB
.
u
.
HighPart
==
0
,
"Expected 0, got %d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
HighPart
);
"Expected 0, got %
l
d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
HighPart
);
ok
(
info
.
uliAssemblySizeInKB
.
u
.
LowPart
==
0
,
"Expected 0, got %d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
LowPart
);
"Expected 0, got %
l
d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
LowPart
);
ok
(
!
lstrcmpW
(
info
.
pszCurrentAssemblyPathBuf
,
L""
),
"Assembly path was changed
\n
"
);
ok
(
info
.
cchBuf
==
MAX_PATH
,
"Expected MAX_PATH, got %d
\n
"
,
info
.
cchBuf
);
ok
(
info
.
cchBuf
==
MAX_PATH
,
"Expected MAX_PATH, got %
l
d
\n
"
,
info
.
cchBuf
);
/* display name is "wine,version=1.0.0.1,publicKeyToken=2d03617b1c31e2f5,culture=neutral" */
INIT_ASM_INFO
();
...
...
@@ -1344,51 +1344,51 @@ static void test_QueryAssemblyInfo(void)
hr
=
IAssemblyCache_QueryAssemblyInfo
(
cache
,
QUERYASMINFO_FLAG_GETSIZE
,
name
,
&
info
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_FILE_NOT_FOUND
),
"Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08x
\n
"
,
hr
);
"Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08
l
x
\n
"
,
hr
);
ok
(
info
.
cbAssemblyInfo
==
sizeof
(
ASSEMBLY_INFO
),
"Expected sizeof(ASSEMBLY_INFO), got %d
\n
"
,
info
.
cbAssemblyInfo
);
ok
(
info
.
dwAssemblyFlags
==
0
,
"Expected 0, got %08x
\n
"
,
info
.
dwAssemblyFlags
);
"Expected sizeof(ASSEMBLY_INFO), got %
l
d
\n
"
,
info
.
cbAssemblyInfo
);
ok
(
info
.
dwAssemblyFlags
==
0
,
"Expected 0, got %08
l
x
\n
"
,
info
.
dwAssemblyFlags
);
ok
(
info
.
uliAssemblySizeInKB
.
u
.
HighPart
==
0
,
"Expected 0, got %d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
HighPart
);
"Expected 0, got %
l
d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
HighPart
);
ok
(
info
.
uliAssemblySizeInKB
.
u
.
LowPart
==
0
,
"Expected 0, got %d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
LowPart
);
"Expected 0, got %
l
d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
LowPart
);
ok
(
!
lstrcmpW
(
info
.
pszCurrentAssemblyPathBuf
,
L""
),
"Assembly path was changed
\n
"
);
ok
(
info
.
cchBuf
==
MAX_PATH
,
"Expected MAX_PATH, got %d
\n
"
,
info
.
cchBuf
);
ok
(
info
.
cchBuf
==
MAX_PATH
,
"Expected MAX_PATH, got %
l
d
\n
"
,
info
.
cchBuf
);
/* display name is "mscorlib.dll,version=0.0.0.0,culture=neutral,publicKeyToken=null" */
INIT_ASM_INFO
();
lstrcpyW
(
name
,
L"mscorlib.dll,version=0.0.0.0,culture=neutral,publicKeyToken=null"
);
hr
=
IAssemblyCache_QueryAssemblyInfo
(
cache
,
0
,
name
,
&
info
);
ok
(
hr
==
FUSION_E_PRIVATE_ASM_DISALLOWED
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
FUSION_E_PRIVATE_ASM_DISALLOWED
,
"got %08
l
x
\n
"
,
hr
);
/* display name is "mscorlib.dll,publicKeyToken=nuLl" */
INIT_ASM_INFO
();
lstrcpyW
(
name
,
L"mscorlib.dll,publicKeyToken=nuLl"
);
hr
=
IAssemblyCache_QueryAssemblyInfo
(
cache
,
0
,
name
,
&
info
);
ok
(
hr
==
FUSION_E_PRIVATE_ASM_DISALLOWED
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
FUSION_E_PRIVATE_ASM_DISALLOWED
,
"got %08
l
x
\n
"
,
hr
);
/* display name is "wine, Culture=neutral" */
INIT_ASM_INFO
();
lstrcpyW
(
name
,
L"wine, Culture=neutral"
);
hr
=
IAssemblyCache_QueryAssemblyInfo
(
cache
,
QUERYASMINFO_FLAG_GETSIZE
,
name
,
&
info
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
info
.
cbAssemblyInfo
==
sizeof
(
ASSEMBLY_INFO
),
"Expected sizeof(ASSEMBLY_INFO), got %d
\n
"
,
info
.
cbAssemblyInfo
);
"Expected sizeof(ASSEMBLY_INFO), got %
l
d
\n
"
,
info
.
cbAssemblyInfo
);
ok
(
info
.
dwAssemblyFlags
==
ASSEMBLYINFO_FLAG_INSTALLED
,
"Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08x
\n
"
,
info
.
dwAssemblyFlags
);
"Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08
l
x
\n
"
,
info
.
dwAssemblyFlags
);
ok
(
info
.
uliAssemblySizeInKB
.
u
.
HighPart
==
0
,
"Expected 0, got %d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
HighPart
);
"Expected 0, got %
l
d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
HighPart
);
todo_wine
{
ok
((
info
.
uliAssemblySizeInKB
.
u
.
LowPart
==
4
),
"Expected 4, got %d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
LowPart
);
"Expected 4, got %
l
d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
LowPart
);
}
ok
(
!
lstrcmpW
(
info
.
pszCurrentAssemblyPathBuf
,
asmpath
),
"Wrong assembly path returned
\n
"
);
ok
(
info
.
cchBuf
==
lstrlenW
(
asmpath
)
+
1
,
"Expected %d, got %d
\n
"
,
lstrlenW
(
asmpath
)
+
1
,
info
.
cchBuf
);
"Expected %d, got %
l
d
\n
"
,
lstrlenW
(
asmpath
)
+
1
,
info
.
cchBuf
);
/* display name is "wine, Culture=en", cultures don't match */
INIT_ASM_INFO
();
...
...
@@ -1396,39 +1396,39 @@ static void test_QueryAssemblyInfo(void)
hr
=
IAssemblyCache_QueryAssemblyInfo
(
cache
,
QUERYASMINFO_FLAG_GETSIZE
,
name
,
&
info
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_FILE_NOT_FOUND
),
"Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08x
\n
"
,
hr
);
ok
(
info
.
dwAssemblyFlags
==
0
,
"Expected 0, got %08x
\n
"
,
info
.
dwAssemblyFlags
);
"Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08
l
x
\n
"
,
hr
);
ok
(
info
.
dwAssemblyFlags
==
0
,
"Expected 0, got %08
l
x
\n
"
,
info
.
dwAssemblyFlags
);
ok
(
info
.
cbAssemblyInfo
==
sizeof
(
ASSEMBLY_INFO
),
"Expected sizeof(ASSEMBLY_INFO), got %d
\n
"
,
info
.
cbAssemblyInfo
);
"Expected sizeof(ASSEMBLY_INFO), got %
l
d
\n
"
,
info
.
cbAssemblyInfo
);
ok
(
info
.
uliAssemblySizeInKB
.
u
.
HighPart
==
0
,
"Expected 0, got %d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
HighPart
);
"Expected 0, got %
l
d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
HighPart
);
ok
(
info
.
uliAssemblySizeInKB
.
u
.
LowPart
==
0
,
"Expected 0, got %d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
LowPart
);
"Expected 0, got %
l
d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
LowPart
);
ok
(
!
lstrcmpW
(
info
.
pszCurrentAssemblyPathBuf
,
L""
),
"Assembly path was changed
\n
"
);
ok
(
info
.
cchBuf
==
MAX_PATH
,
"Expected MAX_PATH, got %d
\n
"
,
info
.
cchBuf
);
ok
(
info
.
cchBuf
==
MAX_PATH
,
"Expected MAX_PATH, got %
l
d
\n
"
,
info
.
cchBuf
);
/* display name is "wine, PublicKeyTokens=2d03617b1c31e2f5" */
INIT_ASM_INFO
();
lstrcpyW
(
name
,
L"wine, PublicKeyToken=2d03617b1c31e2f5"
);
hr
=
IAssemblyCache_QueryAssemblyInfo
(
cache
,
QUERYASMINFO_FLAG_GETSIZE
,
name
,
&
info
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
info
.
cbAssemblyInfo
==
sizeof
(
ASSEMBLY_INFO
),
"Expected sizeof(ASSEMBLY_INFO), got %d
\n
"
,
info
.
cbAssemblyInfo
);
"Expected sizeof(ASSEMBLY_INFO), got %
l
d
\n
"
,
info
.
cbAssemblyInfo
);
ok
(
info
.
dwAssemblyFlags
==
ASSEMBLYINFO_FLAG_INSTALLED
,
"Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08x
\n
"
,
info
.
dwAssemblyFlags
);
"Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08
l
x
\n
"
,
info
.
dwAssemblyFlags
);
ok
(
info
.
uliAssemblySizeInKB
.
u
.
HighPart
==
0
,
"Expected 0, got %d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
HighPart
);
"Expected 0, got %
l
d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
HighPart
);
todo_wine
{
ok
((
info
.
uliAssemblySizeInKB
.
u
.
LowPart
==
4
),
"Expected 4, got %d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
LowPart
);
"Expected 4, got %
l
d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
LowPart
);
}
ok
(
!
lstrcmpW
(
info
.
pszCurrentAssemblyPathBuf
,
asmpath
),
"Wrong assembly path returned
\n
"
);
ok
(
info
.
cchBuf
==
lstrlenW
(
asmpath
)
+
1
,
"Expected %d, got %d
\n
"
,
lstrlenW
(
asmpath
)
+
1
,
info
.
cchBuf
);
"Expected %d, got %
l
d
\n
"
,
lstrlenW
(
asmpath
)
+
1
,
info
.
cchBuf
);
/* display name is "wine, PublicKeyToken=aaaaaaaaaaaaaaaa", pubkeys don't match */
INIT_ASM_INFO
();
...
...
@@ -1436,39 +1436,39 @@ static void test_QueryAssemblyInfo(void)
hr
=
IAssemblyCache_QueryAssemblyInfo
(
cache
,
QUERYASMINFO_FLAG_GETSIZE
,
name
,
&
info
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_FILE_NOT_FOUND
),
"Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08x
\n
"
,
hr
);
"Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08
l
x
\n
"
,
hr
);
ok
(
info
.
cbAssemblyInfo
==
sizeof
(
ASSEMBLY_INFO
),
"Expected sizeof(ASSEMBLY_INFO), got %d
\n
"
,
info
.
cbAssemblyInfo
);
ok
(
info
.
dwAssemblyFlags
==
0
,
"Expected 0, got %08x
\n
"
,
info
.
dwAssemblyFlags
);
"Expected sizeof(ASSEMBLY_INFO), got %
l
d
\n
"
,
info
.
cbAssemblyInfo
);
ok
(
info
.
dwAssemblyFlags
==
0
,
"Expected 0, got %08
l
x
\n
"
,
info
.
dwAssemblyFlags
);
ok
(
info
.
uliAssemblySizeInKB
.
u
.
HighPart
==
0
,
"Expected 0, got %d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
HighPart
);
"Expected 0, got %
l
d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
HighPart
);
ok
(
info
.
uliAssemblySizeInKB
.
u
.
LowPart
==
0
,
"Expected 0, got %d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
LowPart
);
"Expected 0, got %
l
d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
LowPart
);
ok
(
!
lstrcmpW
(
info
.
pszCurrentAssemblyPathBuf
,
L""
),
"Assembly path was changed
\n
"
);
ok
(
info
.
cchBuf
==
MAX_PATH
,
"Expected MAX_PATH, got %d
\n
"
,
info
.
cchBuf
);
ok
(
info
.
cchBuf
==
MAX_PATH
,
"Expected MAX_PATH, got %
l
d
\n
"
,
info
.
cchBuf
);
/* display name is "wine, BadProp=buh", bad property */
INIT_ASM_INFO
();
lstrcpyW
(
name
,
L"wine, BadProp=buh"
);
hr
=
IAssemblyCache_QueryAssemblyInfo
(
cache
,
QUERYASMINFO_FLAG_GETSIZE
,
name
,
&
info
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
info
.
cbAssemblyInfo
==
sizeof
(
ASSEMBLY_INFO
),
"Expected sizeof(ASSEMBLY_INFO), got %d
\n
"
,
info
.
cbAssemblyInfo
);
"Expected sizeof(ASSEMBLY_INFO), got %
l
d
\n
"
,
info
.
cbAssemblyInfo
);
ok
(
info
.
dwAssemblyFlags
==
ASSEMBLYINFO_FLAG_INSTALLED
,
"Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08x
\n
"
,
info
.
dwAssemblyFlags
);
"Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08
l
x
\n
"
,
info
.
dwAssemblyFlags
);
ok
(
info
.
uliAssemblySizeInKB
.
u
.
HighPart
==
0
,
"Expected 0, got %d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
HighPart
);
"Expected 0, got %
l
d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
HighPart
);
todo_wine
{
ok
((
info
.
uliAssemblySizeInKB
.
u
.
LowPart
==
4
),
"Expected 4, got %d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
LowPart
);
"Expected 4, got %
l
d
\n
"
,
info
.
uliAssemblySizeInKB
.
u
.
LowPart
);
}
ok
(
!
lstrcmpW
(
info
.
pszCurrentAssemblyPathBuf
,
asmpath
),
"Wrong assembly path returned
\n
"
);
ok
(
info
.
cchBuf
==
lstrlenW
(
asmpath
)
+
1
,
"Expected %d, got %d
\n
"
,
lstrlenW
(
asmpath
)
+
1
,
info
.
cchBuf
);
"Expected %d, got %
l
d
\n
"
,
lstrlenW
(
asmpath
)
+
1
,
info
.
cchBuf
);
/* no flags, display name is "wine, Version=1.0.0.0" */
INIT_ASM_INFO
();
...
...
@@ -1476,18 +1476,18 @@ static void test_QueryAssemblyInfo(void)
info
.
cchBuf
=
0
;
lstrcpyW
(
name
,
L"wine, Version=1.0.0.0"
);
hr
=
IAssemblyCache_QueryAssemblyInfo
(
cache
,
0
,
name
,
&
info
);
ok
(
hr
==
E_NOT_SUFFICIENT_BUFFER
,
"Expected E_NOT_SUFFICIENT_BUFFER, got %08x
\n
"
,
hr
);
ok
(
hr
==
E_NOT_SUFFICIENT_BUFFER
,
"Expected E_NOT_SUFFICIENT_BUFFER, got %08
l
x
\n
"
,
hr
);
ok
(
info
.
cbAssemblyInfo
==
sizeof
(
ASSEMBLY_INFO
),
"Expected sizeof(ASSEMBLY_INFO), got %d
\n
"
,
info
.
cbAssemblyInfo
);
"Expected sizeof(ASSEMBLY_INFO), got %
l
d
\n
"
,
info
.
cbAssemblyInfo
);
ok
(
info
.
dwAssemblyFlags
==
ASSEMBLYINFO_FLAG_INSTALLED
,
"Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08x
\n
"
,
info
.
dwAssemblyFlags
);
"Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08
l
x
\n
"
,
info
.
dwAssemblyFlags
);
/* uninstall the assembly from the GAC */
disp
=
0xf00dbad
;
hr
=
IAssemblyCache_UninstallAssembly
(
cache
,
0
,
L"wine"
,
NULL
,
&
disp
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
disp
==
IASSEMBLYCACHE_UNINSTALL_DISPOSITION_UNINSTALLED
,
"Expected IASSEMBLYCACHE_UNINSTALL_DISPOSITION_UNINSTALLED, got %d
\n
"
,
disp
);
"Expected IASSEMBLYCACHE_UNINSTALL_DISPOSITION_UNINSTALLED, got %
l
d
\n
"
,
disp
);
DeleteFileA
(
"test.dll"
);
DeleteFileA
(
"wine.dll"
);
...
...
dlls/fusion/tests/asmenum.c
View file @
2d0e84e6
...
...
@@ -176,7 +176,7 @@ static void test_CreateAssemblyEnum(void)
to_widechar
(
namestr
,
"wine"
);
asmname
=
NULL
;
hr
=
pCreateAssemblyNameObject
(
&
asmname
,
namestr
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
asmname
!=
NULL
,
"Expected non-NULL asmname
\n
"
);
/* pEnum is NULL */
...
...
@@ -184,13 +184,13 @@ static void test_CreateAssemblyEnum(void)
{
/* Crashes on .NET 1.x */
hr
=
pCreateAssemblyEnum
(
NULL
,
NULL
,
asmname
,
ASM_CACHE_GAC
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %08x
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %08
l
x
\n
"
,
hr
);
}
/* pName is NULL */
asmenum
=
NULL
;
hr
=
pCreateAssemblyEnum
(
&
asmenum
,
NULL
,
NULL
,
ASM_CACHE_GAC
,
NULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
asmenum
!=
NULL
,
"Expected non-NULL asmenum
\n
"
);
IAssemblyEnum_Release
(
asmenum
);
...
...
@@ -198,14 +198,14 @@ static void test_CreateAssemblyEnum(void)
/* dwFlags is ASM_CACHE_ROOT */
asmenum
=
(
IAssemblyEnum
*
)
0xdeadbeef
;
hr
=
pCreateAssemblyEnum
(
&
asmenum
,
NULL
,
NULL
,
ASM_CACHE_ROOT
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %08x
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %08
l
x
\n
"
,
hr
);
ok
(
asmenum
==
(
IAssemblyEnum
*
)
0xdeadbeef
,
"Expected asmenum to be unchanged, got %p
\n
"
,
asmenum
);
/* invalid dwFlags */
asmenum
=
(
IAssemblyEnum
*
)
0xdeadbeef
;
hr
=
pCreateAssemblyEnum
(
&
asmenum
,
NULL
,
NULL
,
0
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %08x
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %08
l
x
\n
"
,
hr
);
ok
(
asmenum
==
(
IAssemblyEnum
*
)
0xdeadbeef
,
"Expected asmenum to be unchanged, got %p
\n
"
,
asmenum
);
...
...
@@ -306,7 +306,7 @@ static void test_enumerate(void)
size
=
MAX_PATH
;
hr
=
pGetCachePath
(
ASM_CACHE_GAC
,
buf
,
&
size
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
to_multibyte
(
path
,
buf
);
lstrcatA
(
path
,
"_32"
);
...
...
@@ -325,7 +325,7 @@ static void test_enumerate(void)
asmenum
=
NULL
;
hr
=
pCreateAssemblyEnum
(
&
asmenum
,
NULL
,
NULL
,
ASM_CACHE_GAC
,
NULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
asmenum
!=
NULL
,
"Expected non-NULL asmenum
\n
"
);
while
(
IAssemblyEnum_GetNextAssembly
(
asmenum
,
NULL
,
&
next
,
0
)
==
S_OK
)
...
...
@@ -356,7 +356,7 @@ static void test_enumerate(void)
/* enumeration is exhausted */
next
=
(
IAssemblyName
*
)
0xdeadbeef
;
hr
=
IAssemblyEnum_GetNextAssembly
(
asmenum
,
NULL
,
&
next
,
0
);
ok
(
hr
==
S_FALSE
,
"Expected S_FALSE, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_FALSE
,
"Expected S_FALSE, got %08
l
x
\n
"
,
hr
);
ok
(
next
==
(
IAssemblyName
*
)
0xdeadbeef
,
"Expected next to be unchanged, got %p
\n
"
,
next
);
...
...
@@ -395,7 +395,7 @@ static void test_enumerate_name(void)
size
=
MAX_PATH
;
hr
=
pGetCachePath
(
ASM_CACHE_GAC
,
buf
,
&
size
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
to_multibyte
(
gac
,
buf
);
create_full_path
(
gac
);
...
...
@@ -437,23 +437,23 @@ static void test_enumerate_name(void)
to_widechar
(
namestr
,
"wine"
);
asmname
=
NULL
;
hr
=
pCreateAssemblyNameObject
(
&
asmname
,
namestr
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
asmname
!=
NULL
,
"Expected non-NULL asmname
\n
"
);
asmenum
=
NULL
;
hr
=
pCreateAssemblyEnum
(
&
asmenum
,
NULL
,
asmname
,
ASM_CACHE_GAC
,
NULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
asmenum
!=
NULL
,
"Expected non-NULL asmenum
\n
"
);
next
=
NULL
;
hr
=
IAssemblyEnum_GetNextAssembly
(
asmenum
,
NULL
,
&
next
,
0
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
next
!=
NULL
,
"Expected non-NULL next
\n
"
);
size
=
MAX_PATH
;
hr
=
IAssemblyName_GetDisplayName
(
next
,
buf
,
&
size
,
0
);
to_multibyte
(
disp
,
buf
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
!
lstrcmpA
(
disp
,
exp
[
0
]),
"Expected
\"
%s
\"
or
\"
%s
\"
, got
\"
%s
\"\n
"
,
exp
[
0
],
exp
[
1
],
disp
);
...
...
@@ -461,13 +461,13 @@ static void test_enumerate_name(void)
next
=
NULL
;
hr
=
IAssemblyEnum_GetNextAssembly
(
asmenum
,
NULL
,
&
next
,
0
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
next
!=
NULL
,
"Expected non-NULL next
\n
"
);
size
=
MAX_PATH
;
hr
=
IAssemblyName_GetDisplayName
(
next
,
buf
,
&
size
,
0
);
to_multibyte
(
disp
,
buf
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
!
lstrcmpA
(
disp
,
exp
[
1
])
||
!
lstrcmpA
(
disp
,
exp
[
2
]),
/* Win98 */
"Expected
\"
%s
\"
or
\"
%s
\"
, got
\"
%s
\"\n
"
,
exp
[
1
],
exp
[
2
],
disp
);
...
...
@@ -476,13 +476,13 @@ static void test_enumerate_name(void)
next
=
NULL
;
hr
=
IAssemblyEnum_GetNextAssembly
(
asmenum
,
NULL
,
&
next
,
0
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
next
!=
NULL
,
"Expected non-NULL next
\n
"
);
size
=
MAX_PATH
;
hr
=
IAssemblyName_GetDisplayName
(
next
,
buf
,
&
size
,
0
);
to_multibyte
(
disp
,
buf
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
!
lstrcmpA
(
disp
,
exp
[
2
])
||
!
lstrcmpA
(
disp
,
exp
[
1
]),
/* Win98 */
"Expected
\"
%s
\"
or
\"
%s
\"
, got
\"
%s
\"\n
"
,
exp
[
2
],
exp
[
1
],
disp
);
...
...
@@ -491,7 +491,7 @@ static void test_enumerate_name(void)
next
=
(
IAssemblyName
*
)
0xdeadbeef
;
hr
=
IAssemblyEnum_GetNextAssembly
(
asmenum
,
NULL
,
&
next
,
0
);
ok
(
hr
==
S_FALSE
,
"Expected S_FALSE, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_FALSE
,
"Expected S_FALSE, got %08
l
x
\n
"
,
hr
);
ok
(
next
==
(
IAssemblyName
*
)
0xdeadbeef
,
"Expected next to be unchanged, got %p
\n
"
,
next
);
...
...
@@ -502,23 +502,23 @@ static void test_enumerate_name(void)
to_widechar
(
namestr
,
"Wine, Version=1.0.1.2"
);
asmname
=
NULL
;
hr
=
pCreateAssemblyNameObject
(
&
asmname
,
namestr
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
asmname
!=
NULL
,
"Expected non-NULL asmname
\n
"
);
asmenum
=
NULL
;
hr
=
pCreateAssemblyEnum
(
&
asmenum
,
NULL
,
asmname
,
ASM_CACHE_GAC
,
NULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
asmenum
!=
NULL
,
"Expected non-NULL asmenum
\n
"
);
next
=
NULL
;
hr
=
IAssemblyEnum_GetNextAssembly
(
asmenum
,
NULL
,
&
next
,
0
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
next
!=
NULL
,
"Expected non-NULL next
\n
"
);
size
=
MAX_PATH
;
hr
=
IAssemblyName_GetDisplayName
(
next
,
buf
,
&
size
,
0
);
to_multibyte
(
disp
,
buf
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
!
lstrcmpA
(
disp
,
exp
[
4
])
||
!
lstrcmpA
(
disp
,
exp
[
5
]),
/* Win98 */
"Expected
\"
%s
\"
or
\"
%s
\"
, got
\"
%s
\"\n
"
,
exp
[
4
],
exp
[
5
],
disp
);
...
...
@@ -527,13 +527,13 @@ static void test_enumerate_name(void)
next
=
NULL
;
hr
=
IAssemblyEnum_GetNextAssembly
(
asmenum
,
NULL
,
&
next
,
0
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
next
!=
NULL
,
"Expected non-NULL next
\n
"
);
size
=
MAX_PATH
;
hr
=
IAssemblyName_GetDisplayName
(
next
,
buf
,
&
size
,
0
);
to_multibyte
(
disp
,
buf
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
!
lstrcmpA
(
disp
,
exp
[
5
])
||
!
lstrcmpA
(
disp
,
exp
[
4
]),
/* Win98 */
"Expected
\"
%s
\"
or
\"
%s
\"
, got
\"
%s
\"\n
"
,
exp
[
5
],
exp
[
4
],
disp
);
...
...
@@ -542,7 +542,7 @@ static void test_enumerate_name(void)
next
=
(
IAssemblyName
*
)
0xdeadbeef
;
hr
=
IAssemblyEnum_GetNextAssembly
(
asmenum
,
NULL
,
&
next
,
0
);
ok
(
hr
==
S_FALSE
,
"Expected S_FALSE, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_FALSE
,
"Expected S_FALSE, got %08
l
x
\n
"
,
hr
);
ok
(
next
==
(
IAssemblyName
*
)
0xdeadbeef
,
"Expected next to be unchanged, got %p
\n
"
,
next
);
...
...
@@ -553,43 +553,43 @@ static void test_enumerate_name(void)
to_widechar
(
namestr
,
"Wine, PublicKeyToken=16a3fcd171e93a8d"
);
asmname
=
NULL
;
hr
=
pCreateAssemblyNameObject
(
&
asmname
,
namestr
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
asmname
!=
NULL
,
"Expected non-NULL asmname
\n
"
);
asmenum
=
NULL
;
hr
=
pCreateAssemblyEnum
(
&
asmenum
,
NULL
,
asmname
,
ASM_CACHE_GAC
,
NULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
asmenum
!=
NULL
,
"Expected non-NULL asmenum
\n
"
);
next
=
NULL
;
hr
=
IAssemblyEnum_GetNextAssembly
(
asmenum
,
NULL
,
&
next
,
0
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
next
!=
NULL
,
"Expected non-NULL next
\n
"
);
size
=
MAX_PATH
;
hr
=
IAssemblyName_GetDisplayName
(
next
,
buf
,
&
size
,
0
);
to_multibyte
(
disp
,
buf
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
!
lstrcmpA
(
disp
,
exp
[
3
]),
"Expected
\"
%s
\"
, got
\"
%s
\"\n
"
,
exp
[
3
],
disp
);
IAssemblyName_Release
(
next
);
next
=
NULL
;
hr
=
IAssemblyEnum_GetNextAssembly
(
asmenum
,
NULL
,
&
next
,
0
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
next
!=
NULL
,
"Expected non-NULL next
\n
"
);
size
=
MAX_PATH
;
hr
=
IAssemblyName_GetDisplayName
(
next
,
buf
,
&
size
,
0
);
to_multibyte
(
disp
,
buf
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
!
lstrcmpA
(
disp
,
exp
[
5
]),
"Expected
\"
%s
\"
, got
\"
%s
\"\n
"
,
exp
[
5
],
disp
);
IAssemblyName_Release
(
next
);
next
=
(
IAssemblyName
*
)
0xdeadbeef
;
hr
=
IAssemblyEnum_GetNextAssembly
(
asmenum
,
NULL
,
&
next
,
0
);
ok
(
hr
==
S_FALSE
,
"Expected S_FALSE, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_FALSE
,
"Expected S_FALSE, got %08
l
x
\n
"
,
hr
);
ok
(
next
==
(
IAssemblyName
*
)
0xdeadbeef
,
"Expected next to be unchanged, got %p
\n
"
,
next
);
...
...
@@ -600,36 +600,36 @@ static void test_enumerate_name(void)
to_widechar
(
namestr
,
"wine, Culture=neutral"
);
asmname
=
NULL
;
hr
=
pCreateAssemblyNameObject
(
&
asmname
,
namestr
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
asmname
!=
NULL
,
"Expected non-NULL asmname
\n
"
);
asmenum
=
NULL
;
hr
=
pCreateAssemblyEnum
(
&
asmenum
,
NULL
,
asmname
,
ASM_CACHE_GAC
,
NULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
asmenum
!=
NULL
,
"Expected non-NULL asmenum
\n
"
);
next
=
NULL
;
hr
=
IAssemblyEnum_GetNextAssembly
(
asmenum
,
NULL
,
&
next
,
0
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
next
!=
NULL
,
"Expected non-NULL next
\n
"
);
size
=
MAX_PATH
;
hr
=
IAssemblyName_GetDisplayName
(
next
,
buf
,
&
size
,
0
);
to_multibyte
(
disp
,
buf
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
!
lstrcmpA
(
disp
,
exp
[
0
]),
"Expected
\"
%s
\"
, got
\"
%s
\"\n
"
,
exp
[
0
],
disp
);
IAssemblyName_Release
(
next
);
next
=
NULL
;
hr
=
IAssemblyEnum_GetNextAssembly
(
asmenum
,
NULL
,
&
next
,
0
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
next
!=
NULL
,
"Expected non-NULL next
\n
"
);
size
=
MAX_PATH
;
hr
=
IAssemblyName_GetDisplayName
(
next
,
buf
,
&
size
,
0
);
to_multibyte
(
disp
,
buf
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
!
lstrcmpA
(
disp
,
exp
[
1
])
||
!
lstrcmpA
(
disp
,
exp
[
2
]),
/* Win98 */
"Expected
\"
%s
\"
or
\"
%s
\"
, got
\"
%s
\"\n
"
,
exp
[
1
],
exp
[
2
],
disp
);
...
...
@@ -638,13 +638,13 @@ static void test_enumerate_name(void)
next
=
NULL
;
hr
=
IAssemblyEnum_GetNextAssembly
(
asmenum
,
NULL
,
&
next
,
0
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
next
!=
NULL
,
"Expected non-NULL next
\n
"
);
size
=
MAX_PATH
;
hr
=
IAssemblyName_GetDisplayName
(
next
,
buf
,
&
size
,
0
);
to_multibyte
(
disp
,
buf
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
!
lstrcmpA
(
disp
,
exp
[
2
])
||
!
lstrcmpA
(
disp
,
exp
[
1
]),
/* Win98 */
"Expected
\"
%s
\"
or
\"
%s
\"
, got
\"
%s
\"\n
"
,
exp
[
2
],
exp
[
1
],
disp
);
...
...
@@ -653,7 +653,7 @@ static void test_enumerate_name(void)
next
=
(
IAssemblyName
*
)
0xdeadbeef
;
hr
=
IAssemblyEnum_GetNextAssembly
(
asmenum
,
NULL
,
&
next
,
0
);
ok
(
hr
==
S_FALSE
,
"Expected S_FALSE, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_FALSE
,
"Expected S_FALSE, got %08
l
x
\n
"
,
hr
);
ok
(
next
==
(
IAssemblyName
*
)
0xdeadbeef
,
"Expected next to be unchanged, got %p
\n
"
,
next
);
...
...
dlls/fusion/tests/asmname.c
View file @
2d0e84e6
...
...
@@ -357,20 +357,20 @@ static void test_assembly_name_props_line(IAssemblyName *name,
ok
(
hr
==
vals
[
i
].
hr
||
broken
(
i
>=
ASM_NAME_CONFIG_MASK
&&
hr
==
E_INVALIDARG
)
||
/* .NET 1.1 */
broken
(
i
>=
ASM_NAME_FILE_MAJOR_VERSION
&&
hr
==
E_INVALIDARG
),
/* .NET 1.0 */
"%d: prop %
d: Expected %08x, got %08
x
\n
"
,
line
,
i
,
vals
[
i
].
hr
,
hr
);
"%d: prop %
ld: Expected %08lx, got %08l
x
\n
"
,
line
,
i
,
vals
[
i
].
hr
,
hr
);
if
(
hr
!=
E_INVALIDARG
)
{
ok
(
size
==
vals
[
i
].
size
,
"%d: prop %
d: Expected %d, got %
d
\n
"
,
line
,
i
,
vals
[
i
].
size
,
size
);
ok
(
size
==
vals
[
i
].
size
,
"%d: prop %
ld: Expected %ld, got %l
d
\n
"
,
line
,
i
,
vals
[
i
].
size
,
size
);
if
(
!
size
)
{
ok
(
str
[
0
]
==
0xcccc
,
"%d: prop %d: str[0] = %x
\n
"
,
line
,
i
,
str
[
0
]);
ok
(
str
[
0
]
==
0xcccc
,
"%d: prop %
l
d: str[0] = %x
\n
"
,
line
,
i
,
str
[
0
]);
}
else
if
(
size
!=
MAX_PATH
)
{
if
(
i
!=
ASM_NAME_NAME
&&
i
!=
ASM_NAME_CULTURE
)
ok
(
!
memcmp
(
vals
[
i
].
val
,
str
,
size
),
"%d: prop %d: wrong value
\n
"
,
line
,
i
);
ok
(
!
memcmp
(
vals
[
i
].
val
,
str
,
size
),
"%d: prop %
l
d: wrong value
\n
"
,
line
,
i
);
else
ok
(
!
lstrcmpW
(
expect
,
str
),
"%d: prop %d: Expected %s, got %s
\n
"
,
ok
(
!
lstrcmpW
(
expect
,
str
),
"%d: prop %
l
d: Expected %s, got %s
\n
"
,
line
,
i
,
wine_dbgstr_w
(
expect
),
wine_dbgstr_w
(
str
)
);
}
...
...
@@ -379,8 +379,8 @@ static void test_assembly_name_props_line(IAssemblyName *name,
size
--
;
hr
=
IAssemblyName_GetProperty
(
name
,
i
,
str
,
&
size
);
ok
(
hr
==
STRSAFE_E_INSUFFICIENT_BUFFER
,
"%d: prop %
d: Expected STRSAFE_E_INSUFFICIENT_BUFFER, got %08
x
\n
"
,
line
,
i
,
hr
);
ok
(
size
==
vals
[
i
].
size
,
"%d: prop %
d: Expected %d, got %
d
\n
"
,
line
,
i
,
vals
[
i
].
size
,
size
);
"%d: prop %
ld: Expected STRSAFE_E_INSUFFICIENT_BUFFER, got %08l
x
\n
"
,
line
,
i
,
hr
);
ok
(
size
==
vals
[
i
].
size
,
"%d: prop %
ld: Expected %ld, got %l
d
\n
"
,
line
,
i
,
vals
[
i
].
size
,
size
);
}
}
}
...
...
@@ -401,18 +401,18 @@ static void test_CreateAssemblyNameObject(void)
/* NULL ppAssemblyNameObj */
to_widechar
(
namestr
,
"wine.dll"
);
hr
=
pCreateAssemblyNameObject
(
NULL
,
namestr
,
0
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %08x
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %08
l
x
\n
"
,
hr
);
/* NULL szAssemblyName, CANOF_PARSE_DISPLAY_NAME */
name
=
(
IAssemblyName
*
)
0xdeadbeef
;
hr
=
pCreateAssemblyNameObject
(
&
name
,
NULL
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %08x
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %08
l
x
\n
"
,
hr
);
ok
(
name
==
(
IAssemblyName
*
)
0xdeadbeef
,
"Expected 0xdeadbeef, got %p
\n
"
,
name
);
/* empty szAssemblyName, CANOF_PARSE_DISPLAY_NAME */
name
=
(
IAssemblyName
*
)
0xdeadbeef
;
hr
=
pCreateAssemblyNameObject
(
&
name
,
L""
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %08x
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %08
l
x
\n
"
,
hr
);
ok
(
name
==
(
IAssemblyName
*
)
0xdeadbeef
,
"Expected 0xdeadbeef, got %p
\n
"
,
name
);
/* check the contents of the AssemblyName for default values */
...
...
@@ -420,30 +420,30 @@ static void test_CreateAssemblyNameObject(void)
/* NULL szAssemblyName */
name
=
NULL
;
hr
=
pCreateAssemblyNameObject
(
&
name
,
NULL
,
CANOF_SET_DEFAULT_VALUES
,
NULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
name
!=
NULL
,
"Expected non-NULL name
\n
"
);
size
=
MAX_PATH
;
hr
=
IAssemblyName_GetDisplayName
(
name
,
str
,
&
size
,
ASM_DISPLAYF_FULL
);
ok
(
hr
==
FUSION_E_INVALID_NAME
||
broken
(
hr
==
E_INVALIDARG
),
/* .NET 1.x */
"Expected FUSION_E_INVALID_NAME, got %08x
\n
"
,
hr
);
"Expected FUSION_E_INVALID_NAME, got %08
l
x
\n
"
,
hr
);
str
[
0
]
=
'a'
;
size
=
MAX_PATH
;
hr
=
IAssemblyName_GetName
(
name
,
&
size
,
str
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
ok
(
str
[
0
]
==
'a'
,
"got %c
\n
"
,
str
[
0
]);
ok
(
!
size
,
"got %u
\n
"
,
size
);
ok
(
!
size
,
"got %
l
u
\n
"
,
size
);
hi
=
0xbeefcace
;
lo
=
0xcafebabe
;
hr
=
IAssemblyName_GetVersion
(
name
,
&
hi
,
&
lo
);
ok
(
hr
==
FUSION_E_INVALID_NAME
||
broken
(
hr
==
S_OK
),
/* .NET 1.x */
"Expected FUSION_E_INVALID_NAME, got %08x
\n
"
,
hr
);
ok
(
hi
==
0
,
"Expected 0, got %08x
\n
"
,
hi
);
ok
(
lo
==
0
,
"Expected 0, got %08x
\n
"
,
lo
);
"Expected FUSION_E_INVALID_NAME, got %08
l
x
\n
"
,
hr
);
ok
(
hi
==
0
,
"Expected 0, got %08
l
x
\n
"
,
hi
);
ok
(
lo
==
0
,
"Expected 0, got %08
l
x
\n
"
,
lo
);
if
(
hr
==
S_OK
)
win_skip
(
".NET 1.x doesn't handle ASM_NAME_PROCESSOR_ID_ARRAY"
...
...
@@ -456,50 +456,50 @@ static void test_CreateAssemblyNameObject(void)
/* empty szAssemblyName */
name
=
NULL
;
hr
=
pCreateAssemblyNameObject
(
&
name
,
L""
,
CANOF_SET_DEFAULT_VALUES
,
NULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
name
!=
NULL
,
"Expected non-NULL name
\n
"
);
size
=
MAX_PATH
;
hr
=
IAssemblyName_GetDisplayName
(
name
,
str
,
&
size
,
ASM_DISPLAYF_FULL
);
ok
(
hr
==
FUSION_E_INVALID_NAME
||
broken
(
hr
==
S_OK
),
/* .NET 1.x */
"Expected FUSION_E_INVALID_NAME, got %08x
\n
"
,
hr
);
"Expected FUSION_E_INVALID_NAME, got %08
l
x
\n
"
,
hr
);
size
=
0
;
hr
=
IAssemblyName_GetName
(
name
,
&
size
,
NULL
);
ok
(
hr
==
E_NOT_SUFFICIENT_BUFFER
,
"got %08x
\n
"
,
hr
);
ok
(
size
==
1
,
"got %u
\n
"
,
size
);
ok
(
hr
==
E_NOT_SUFFICIENT_BUFFER
,
"got %08
l
x
\n
"
,
hr
);
ok
(
size
==
1
,
"got %
l
u
\n
"
,
size
);
if
(
0
)
/* crash */
{
str
[
0
]
=
'\0'
;
hr
=
IAssemblyName_GetName
(
name
,
NULL
,
str
);
ok
(
hr
==
E_NOT_SUFFICIENT_BUFFER
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
E_NOT_SUFFICIENT_BUFFER
,
"got %08
l
x
\n
"
,
hr
);
ok
(
!
str
[
0
],
"got %c
\n
"
,
str
[
0
]);
}
size
=
0
;
str
[
0
]
=
'\0'
;
hr
=
IAssemblyName_GetName
(
name
,
&
size
,
str
);
ok
(
hr
==
E_NOT_SUFFICIENT_BUFFER
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
E_NOT_SUFFICIENT_BUFFER
,
"got %08
l
x
\n
"
,
hr
);
ok
(
!
str
[
0
],
"got %c
\n
"
,
str
[
0
]);
ok
(
size
==
1
,
"got %u
\n
"
,
size
);
ok
(
size
==
1
,
"got %
l
u
\n
"
,
size
);
size
=
MAX_PATH
;
str
[
0
]
=
'\0'
;
hr
=
IAssemblyName_GetName
(
name
,
&
size
,
str
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
!
str
[
0
],
"Expected empty name
\n
"
);
ok
(
size
==
1
,
"Expected 1, got %d
\n
"
,
size
);
ok
(
size
==
1
,
"Expected 1, got %
l
d
\n
"
,
size
);
hi
=
0xbeefcace
;
lo
=
0xcafebabe
;
hr
=
IAssemblyName_GetVersion
(
name
,
&
hi
,
&
lo
);
ok
(
hr
==
FUSION_E_INVALID_NAME
||
broken
(
hr
==
S_OK
),
/* .NET 1.x */
"Expected FUSION_E_INVALID_NAME, got %08x
\n
"
,
hr
);
ok
(
hi
==
0
,
"Expected 0, got %08x
\n
"
,
hi
);
ok
(
lo
==
0
,
"Expected 0, got %08x
\n
"
,
lo
);
"Expected FUSION_E_INVALID_NAME, got %08
l
x
\n
"
,
hr
);
ok
(
hi
==
0
,
"Expected 0, got %08
l
x
\n
"
,
hi
);
ok
(
lo
==
0
,
"Expected 0, got %08
l
x
\n
"
,
lo
);
if
(
hr
==
S_OK
)
win_skip
(
".NET 1.x doesn't handle ASM_NAME_PROCESSOR_ID_ARRAY"
...
...
@@ -513,61 +513,61 @@ static void test_CreateAssemblyNameObject(void)
to_widechar
(
namestr
,
"wine"
);
name
=
NULL
;
hr
=
pCreateAssemblyNameObject
(
&
name
,
namestr
,
CANOF_SET_DEFAULT_VALUES
,
NULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
name
!=
NULL
,
"Expected non-NULL name
\n
"
);
size
=
0
;
hr
=
IAssemblyName_GetDisplayName
(
name
,
NULL
,
&
size
,
0
);
ok
(
hr
==
E_NOT_SUFFICIENT_BUFFER
,
"got %08x
\n
"
,
hr
);
ok
(
size
==
5
,
"got %u
\n
"
,
size
);
ok
(
hr
==
E_NOT_SUFFICIENT_BUFFER
,
"got %08
l
x
\n
"
,
hr
);
ok
(
size
==
5
,
"got %
l
u
\n
"
,
size
);
size
=
3
;
hr
=
IAssemblyName_GetDisplayName
(
name
,
NULL
,
&
size
,
0
);
ok
(
hr
==
E_NOT_SUFFICIENT_BUFFER
||
broken
(
hr
==
E_INVALIDARG
),
"got %08x
\n
"
,
hr
);
ok
(
size
==
5
||
broken
(
size
==
3
),
"got %u
\n
"
,
size
);
ok
(
hr
==
E_NOT_SUFFICIENT_BUFFER
||
broken
(
hr
==
E_INVALIDARG
),
"got %08
l
x
\n
"
,
hr
);
ok
(
size
==
5
||
broken
(
size
==
3
),
"got %
l
u
\n
"
,
size
);
size
=
3
;
str
[
0
]
=
'a'
;
hr
=
IAssemblyName_GetDisplayName
(
name
,
str
,
&
size
,
0
);
ok
(
hr
==
E_NOT_SUFFICIENT_BUFFER
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
E_NOT_SUFFICIENT_BUFFER
,
"got %08
l
x
\n
"
,
hr
);
ok
(
str
[
0
]
==
'a'
,
"got %c
\n
"
,
str
[
0
]);
ok
(
size
==
5
,
"got %u
\n
"
,
size
);
ok
(
size
==
5
,
"got %
l
u
\n
"
,
size
);
size
=
0
;
str
[
0
]
=
'a'
;
hr
=
IAssemblyName_GetDisplayName
(
name
,
str
,
&
size
,
ASM_DISPLAYF_FULL
);
ok
(
hr
==
E_NOT_SUFFICIENT_BUFFER
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
E_NOT_SUFFICIENT_BUFFER
,
"got %08
l
x
\n
"
,
hr
);
ok
(
str
[
0
]
==
'a'
,
"got %c
\n
"
,
str
[
0
]);
ok
(
size
==
5
,
"Wrong size %u
\n
"
,
size
);
ok
(
size
==
5
,
"Wrong size %
l
u
\n
"
,
size
);
size
=
MAX_PATH
;
hr
=
IAssemblyName_GetDisplayName
(
name
,
str
,
&
size
,
ASM_DISPLAYF_FULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok_aw
(
"wine"
,
str
);
ok
(
size
==
5
,
"Expected 5, got %d
\n
"
,
size
);
ok
(
size
==
5
,
"Expected 5, got %
l
d
\n
"
,
size
);
size
=
0
;
str
[
0
]
=
0
;
hr
=
IAssemblyName_GetName
(
name
,
&
size
,
str
);
ok
(
hr
==
E_NOT_SUFFICIENT_BUFFER
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
E_NOT_SUFFICIENT_BUFFER
,
"got %08
l
x
\n
"
,
hr
);
ok
(
!
str
[
0
],
"got %c
\n
"
,
str
[
0
]);
ok
(
size
==
5
,
"got %u
\n
"
,
size
);
ok
(
size
==
5
,
"got %
l
u
\n
"
,
size
);
size
=
MAX_PATH
;
str
[
0
]
=
'\0'
;
hr
=
IAssemblyName_GetName
(
name
,
&
size
,
str
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok_aw
(
"wine"
,
str
);
ok
(
size
==
5
,
"Expected 5, got %d
\n
"
,
size
);
ok
(
size
==
5
,
"Expected 5, got %
l
d
\n
"
,
size
);
hi
=
0xbeefcace
;
lo
=
0xcafebabe
;
hr
=
IAssemblyName_GetVersion
(
name
,
&
hi
,
&
lo
);
ok
(
hr
==
FUSION_E_INVALID_NAME
||
broken
(
hr
==
S_OK
),
/* .NET 1.x */
"Expected FUSION_E_INVALID_NAME, got %08x
\n
"
,
hr
);
ok
(
hi
==
0
,
"Expected 0, got %08x
\n
"
,
hi
);
ok
(
lo
==
0
,
"Expected 0, got %08x
\n
"
,
lo
);
"Expected FUSION_E_INVALID_NAME, got %08
l
x
\n
"
,
hr
);
ok
(
hi
==
0
,
"Expected 0, got %08
l
x
\n
"
,
hi
);
ok
(
lo
==
0
,
"Expected 0, got %08
l
x
\n
"
,
lo
);
if
(
hr
==
S_OK
)
win_skip
(
".NET 1.x doesn't handle ASM_NAME_PROCESSOR_ID_ARRAY"
...
...
@@ -583,30 +583,30 @@ static void test_CreateAssemblyNameObject(void)
to_widechar
(
namestr
,
"wine"
);
name
=
NULL
;
hr
=
pCreateAssemblyNameObject
(
&
name
,
namestr
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
name
!=
NULL
,
"Expected non-NULL name
\n
"
);
size
=
MAX_PATH
;
hr
=
IAssemblyName_GetDisplayName
(
name
,
str
,
&
size
,
ASM_DISPLAYF_FULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok_aw
(
"wine"
,
str
);
ok
(
size
==
5
,
"Expected 5, got %d
\n
"
,
size
);
ok
(
size
==
5
,
"Expected 5, got %
l
d
\n
"
,
size
);
size
=
MAX_PATH
;
str
[
0
]
=
'\0'
;
hr
=
IAssemblyName_GetName
(
name
,
&
size
,
str
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok_aw
(
"wine"
,
str
);
ok
(
size
==
5
,
"Expected 5, got %d
\n
"
,
size
);
ok
(
size
==
5
,
"Expected 5, got %
l
d
\n
"
,
size
);
hi
=
0xbeefcace
;
lo
=
0xcafebabe
;
hr
=
IAssemblyName_GetVersion
(
name
,
&
hi
,
&
lo
);
ok
(
hr
==
FUSION_E_INVALID_NAME
||
broken
(
hr
==
S_OK
),
/* .NET 1.x */
"Expected FUSION_E_INVALID_NAME, got %08x
\n
"
,
hr
);
ok
(
hi
==
0
,
"Expected 0, got %08x
\n
"
,
hi
);
ok
(
lo
==
0
,
"Expected 0, got %08x
\n
"
,
lo
);
"Expected FUSION_E_INVALID_NAME, got %08
l
x
\n
"
,
hr
);
ok
(
hi
==
0
,
"Expected 0, got %08
l
x
\n
"
,
hi
);
ok
(
lo
==
0
,
"Expected 0, got %08
l
x
\n
"
,
lo
);
test_assembly_name_props
(
name
,
winename
);
...
...
@@ -616,28 +616,28 @@ static void test_CreateAssemblyNameObject(void)
to_widechar
(
namestr
,
"wine, Version=1.2.3.4"
);
name
=
NULL
;
hr
=
pCreateAssemblyNameObject
(
&
name
,
namestr
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
name
!=
NULL
,
"Expected non-NULL name
\n
"
);
size
=
MAX_PATH
;
hr
=
IAssemblyName_GetDisplayName
(
name
,
str
,
&
size
,
ASM_DISPLAYF_FULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok_aw
(
"wine, Version=1.2.3.4"
,
str
);
ok
(
size
==
22
,
"Expected 22, got %d
\n
"
,
size
);
ok
(
size
==
22
,
"Expected 22, got %
l
d
\n
"
,
size
);
size
=
MAX_PATH
;
str
[
0
]
=
'\0'
;
hr
=
IAssemblyName_GetName
(
name
,
&
size
,
str
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok_aw
(
"wine"
,
str
);
ok
(
size
==
5
,
"Expected 5, got %d
\n
"
,
size
);
ok
(
size
==
5
,
"Expected 5, got %
l
d
\n
"
,
size
);
hi
=
0xbeefcace
;
lo
=
0xcafebabe
;
hr
=
IAssemblyName_GetVersion
(
name
,
&
hi
,
&
lo
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hi
==
0x00010002
,
"Expected 0x00010002, got %08x
\n
"
,
hi
);
ok
(
lo
==
0x00030004
,
"Expected 0x00030004, got %08x
\n
"
,
lo
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
hi
==
0x00010002
,
"Expected 0x00010002, got %08
l
x
\n
"
,
hi
);
ok
(
lo
==
0x00030004
,
"Expected 0x00030004, got %08
l
x
\n
"
,
lo
);
test_assembly_name_props
(
name
,
vername
);
...
...
@@ -647,32 +647,32 @@ static void test_CreateAssemblyNameObject(void)
to_widechar
(
namestr
,
"wine, Version=1.5"
);
name
=
NULL
;
hr
=
pCreateAssemblyNameObject
(
&
name
,
namestr
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
name
!=
NULL
,
"Expected non-NULL name
\n
"
);
size
=
MAX_PATH
;
hr
=
IAssemblyName_GetDisplayName
(
name
,
str
,
&
size
,
ASM_DISPLAYF_FULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok_aw
(
"wine, Version=1.5"
,
str
);
ok
(
size
==
18
,
"Expected 18, got %d
\n
"
,
size
);
ok
(
size
==
18
,
"Expected 18, got %
l
d
\n
"
,
size
);
size
=
MAX_PATH
;
str
[
0
]
=
'\0'
;
hr
=
IAssemblyName_GetName
(
name
,
&
size
,
str
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok_aw
(
"wine"
,
str
);
ok
(
size
==
5
,
"Expected 5, got %d
\n
"
,
size
);
ok
(
size
==
5
,
"Expected 5, got %
l
d
\n
"
,
size
);
hi
=
0xbeefcace
;
lo
=
0xcafebabe
;
hr
=
IAssemblyName_GetVersion
(
name
,
&
hi
,
&
lo
);
ok
(
hr
==
FUSION_E_INVALID_NAME
||
broken
(
hr
==
S_OK
),
/* .NET 1.x */
"Expected FUSION_E_INVALID_NAME, got %08x
\n
"
,
hr
);
"Expected FUSION_E_INVALID_NAME, got %08
l
x
\n
"
,
hr
);
ok
(
hi
==
0
||
broken
(
hi
==
0x10005
),
/* .NET 1.x */
"Expected 0, got %08x
\n
"
,
hi
);
ok
(
lo
==
0
,
"Expected 0, got %08x
\n
"
,
lo
);
"Expected 0, got %08
l
x
\n
"
,
hi
);
ok
(
lo
==
0
,
"Expected 0, got %08
l
x
\n
"
,
lo
);
test_assembly_name_props
(
name
,
badvername
);
...
...
@@ -682,30 +682,30 @@ static void test_CreateAssemblyNameObject(void)
to_widechar
(
namestr
,
"wine, Culture=neutral"
);
name
=
NULL
;
hr
=
pCreateAssemblyNameObject
(
&
name
,
namestr
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
name
!=
NULL
,
"Expected non-NULL name
\n
"
);
size
=
MAX_PATH
;
hr
=
IAssemblyName_GetDisplayName
(
name
,
str
,
&
size
,
ASM_DISPLAYF_FULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok_aw
(
"wine, Culture=neutral"
,
str
);
ok
(
size
==
22
,
"Expected 22, got %d
\n
"
,
size
);
ok
(
size
==
22
,
"Expected 22, got %
l
d
\n
"
,
size
);
size
=
MAX_PATH
;
str
[
0
]
=
'\0'
;
hr
=
IAssemblyName_GetName
(
name
,
&
size
,
str
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok_aw
(
"wine"
,
str
);
ok
(
size
==
5
,
"Expected 5, got %d
\n
"
,
size
);
ok
(
size
==
5
,
"Expected 5, got %
l
d
\n
"
,
size
);
hi
=
0xbeefcace
;
lo
=
0xcafebabe
;
hr
=
IAssemblyName_GetVersion
(
name
,
&
hi
,
&
lo
);
ok
(
hr
==
FUSION_E_INVALID_NAME
||
broken
(
hr
==
S_OK
),
/* .NET 1.x */
"Expected FUSION_E_INVALID_NAME, got %08x
\n
"
,
hr
);
ok
(
hi
==
0
,
"Expected 0, got %08x
\n
"
,
hi
);
ok
(
lo
==
0
,
"Expected 0, got %08x
\n
"
,
lo
);
"Expected FUSION_E_INVALID_NAME, got %08
l
x
\n
"
,
hr
);
ok
(
hi
==
0
,
"Expected 0, got %08
l
x
\n
"
,
hi
);
ok
(
lo
==
0
,
"Expected 0, got %08
l
x
\n
"
,
lo
);
test_assembly_name_props
(
name
,
neutralname
);
...
...
@@ -715,30 +715,30 @@ static void test_CreateAssemblyNameObject(void)
to_widechar
(
namestr
,
"wine, Culture=en"
);
name
=
NULL
;
hr
=
pCreateAssemblyNameObject
(
&
name
,
namestr
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
name
!=
NULL
,
"Expected non-NULL name
\n
"
);
size
=
MAX_PATH
;
hr
=
IAssemblyName_GetDisplayName
(
name
,
str
,
&
size
,
ASM_DISPLAYF_FULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok_aw
(
"wine, Culture=en"
,
str
);
ok
(
size
==
17
,
"Expected 17, got %d
\n
"
,
size
);
ok
(
size
==
17
,
"Expected 17, got %
l
d
\n
"
,
size
);
size
=
MAX_PATH
;
str
[
0
]
=
'\0'
;
hr
=
IAssemblyName_GetName
(
name
,
&
size
,
str
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok_aw
(
"wine"
,
str
);
ok
(
size
==
5
,
"Expected 5, got %d
\n
"
,
size
);
ok
(
size
==
5
,
"Expected 5, got %
l
d
\n
"
,
size
);
hi
=
0xbeefcace
;
lo
=
0xcafebabe
;
hr
=
IAssemblyName_GetVersion
(
name
,
&
hi
,
&
lo
);
ok
(
hr
==
FUSION_E_INVALID_NAME
||
broken
(
hr
==
S_OK
),
/* .NET 1.x */
"Expected FUSION_E_INVALID_NAME, got %08x
\n
"
,
hr
);
ok
(
hi
==
0
,
"Expected 0, got %08x
\n
"
,
hi
);
ok
(
lo
==
0
,
"Expected 0, got %08x
\n
"
,
lo
);
"Expected FUSION_E_INVALID_NAME, got %08
l
x
\n
"
,
hr
);
ok
(
hi
==
0
,
"Expected 0, got %08
l
x
\n
"
,
hi
);
ok
(
lo
==
0
,
"Expected 0, got %08
l
x
\n
"
,
lo
);
test_assembly_name_props
(
name
,
enname
);
...
...
@@ -748,30 +748,30 @@ static void test_CreateAssemblyNameObject(void)
to_widechar
(
namestr
,
"wine, PublicKeyToken=01234567890abcde"
);
name
=
NULL
;
hr
=
pCreateAssemblyNameObject
(
&
name
,
namestr
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
name
!=
NULL
,
"Expected non-NULL name
\n
"
);
size
=
MAX_PATH
;
hr
=
IAssemblyName_GetDisplayName
(
name
,
str
,
&
size
,
ASM_DISPLAYF_FULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok_aw
(
"wine, PublicKeyToken=01234567890abcde"
,
str
);
ok
(
size
==
38
,
"Expected 38, got %d
\n
"
,
size
);
ok
(
size
==
38
,
"Expected 38, got %
l
d
\n
"
,
size
);
size
=
MAX_PATH
;
str
[
0
]
=
'\0'
;
hr
=
IAssemblyName_GetName
(
name
,
&
size
,
str
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok_aw
(
"wine"
,
str
);
ok
(
size
==
5
,
"Expected 5, got %d
\n
"
,
size
);
ok
(
size
==
5
,
"Expected 5, got %
l
d
\n
"
,
size
);
hi
=
0xbeefcace
;
lo
=
0xcafebabe
;
hr
=
IAssemblyName_GetVersion
(
name
,
&
hi
,
&
lo
);
ok
(
hr
==
FUSION_E_INVALID_NAME
||
broken
(
hr
==
S_OK
),
/* .NET 1.x */
"Expected FUSION_E_INVALID_NAME, got %08x
\n
"
,
hr
);
ok
(
hi
==
0
,
"Expected 0, got %08x
\n
"
,
hi
);
ok
(
lo
==
0
,
"Expected 0, got %08x
\n
"
,
lo
);
"Expected FUSION_E_INVALID_NAME, got %08
l
x
\n
"
,
hr
);
ok
(
hi
==
0
,
"Expected 0, got %08
l
x
\n
"
,
hi
);
ok
(
lo
==
0
,
"Expected 0, got %08
l
x
\n
"
,
lo
);
test_assembly_name_props
(
name
,
pubkeyname
);
...
...
@@ -781,13 +781,13 @@ static void test_CreateAssemblyNameObject(void)
to_widechar
(
namestr
,
"wine, processorArchitecture=x86"
);
name
=
NULL
;
hr
=
pCreateAssemblyNameObject
(
&
name
,
namestr
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
name
!=
NULL
,
"Expected non-NULL name
\n
"
);
size
=
MAX_PATH
;
hr
=
IAssemblyName_GetDisplayName
(
name
,
str
,
&
size
,
ASM_DISPLAYF_PROCESSORARCHITECTURE
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
WideCharToMultiByte
(
CP_ACP
,
0
,
str
,
-
1
,
string1
,
MAX_PATH
,
NULL
,
NULL
);
...
...
@@ -796,13 +796,13 @@ static void test_CreateAssemblyNameObject(void)
else
{
ok_aw
(
"wine, processorArchitecture=x86"
,
str
);
ok
(
size
==
32
,
"Expected 32, got %d
\n
"
,
size
);
ok
(
size
==
32
,
"Expected 32, got %
l
d
\n
"
,
size
);
size
=
sizeof
(
arch
);
hr
=
IAssemblyName_GetProperty
(
name
,
ASM_NAME_ARCHITECTURE
,
&
arch
,
&
size
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
arch
==
peI386
,
"Expected peI386, got %d
\n
"
,
arch
);
ok
(
size
==
sizeof
(
arch
),
"Wrong size %d
\n
"
,
size
);
ok
(
size
==
sizeof
(
arch
),
"Wrong size %
l
d
\n
"
,
size
);
IAssemblyName_Release
(
name
);
...
...
@@ -810,19 +810,19 @@ static void test_CreateAssemblyNameObject(void)
to_widechar
(
namestr
,
"wine, processorArchitecture=AMD64"
);
name
=
NULL
;
hr
=
pCreateAssemblyNameObject
(
&
name
,
namestr
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
size
=
MAX_PATH
;
hr
=
IAssemblyName_GetDisplayName
(
name
,
str
,
&
size
,
ASM_DISPLAYF_PROCESSORARCHITECTURE
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok_aw
(
"wine, processorArchitecture=AMD64"
,
str
);
ok
(
size
==
34
,
"Expected 34, got %d
\n
"
,
size
);
ok
(
size
==
34
,
"Expected 34, got %
l
d
\n
"
,
size
);
size
=
sizeof
(
arch
);
hr
=
IAssemblyName_GetProperty
(
name
,
ASM_NAME_ARCHITECTURE
,
&
arch
,
&
size
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
arch
==
peAMD64
,
"Expected peAMD64, got %d
\n
"
,
arch
);
ok
(
size
==
sizeof
(
arch
),
"Wrong size %d
\n
"
,
size
);
ok
(
size
==
sizeof
(
arch
),
"Wrong size %
l
d
\n
"
,
size
);
IAssemblyName_Release
(
name
);
...
...
@@ -830,19 +830,19 @@ static void test_CreateAssemblyNameObject(void)
to_widechar
(
namestr
,
"wine, processorArchitecture=IA64"
);
name
=
NULL
;
hr
=
pCreateAssemblyNameObject
(
&
name
,
namestr
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
size
=
MAX_PATH
;
hr
=
IAssemblyName_GetDisplayName
(
name
,
str
,
&
size
,
ASM_DISPLAYF_PROCESSORARCHITECTURE
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok_aw
(
"wine, processorArchitecture=IA64"
,
str
);
ok
(
size
==
33
,
"Expected 33, got %d
\n
"
,
size
);
ok
(
size
==
33
,
"Expected 33, got %
l
d
\n
"
,
size
);
size
=
sizeof
(
arch
);
hr
=
IAssemblyName_GetProperty
(
name
,
ASM_NAME_ARCHITECTURE
,
&
arch
,
&
size
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
arch
==
peIA64
,
"Expected peIA64, got %d
\n
"
,
arch
);
ok
(
size
==
sizeof
(
arch
),
"Wrong size %d
\n
"
,
size
);
ok
(
size
==
sizeof
(
arch
),
"Wrong size %
l
d
\n
"
,
size
);
IAssemblyName_Release
(
name
);
...
...
@@ -850,19 +850,19 @@ static void test_CreateAssemblyNameObject(void)
to_widechar
(
namestr
,
"wine, processorArchitecture=MSIL"
);
name
=
NULL
;
hr
=
pCreateAssemblyNameObject
(
&
name
,
namestr
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
size
=
MAX_PATH
;
hr
=
IAssemblyName_GetDisplayName
(
name
,
str
,
&
size
,
ASM_DISPLAYF_PROCESSORARCHITECTURE
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok_aw
(
"wine, processorArchitecture=MSIL"
,
str
);
ok
(
size
==
33
,
"Expected 33, got %d
\n
"
,
size
);
ok
(
size
==
33
,
"Expected 33, got %
l
d
\n
"
,
size
);
size
=
sizeof
(
arch
);
hr
=
IAssemblyName_GetProperty
(
name
,
ASM_NAME_ARCHITECTURE
,
&
arch
,
&
size
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
arch
==
peMSIL
,
"Expected peMSIL, got %d
\n
"
,
arch
);
ok
(
size
==
sizeof
(
arch
),
"Wrong size %d
\n
"
,
size
);
ok
(
size
==
sizeof
(
arch
),
"Wrong size %
l
d
\n
"
,
size
);
IAssemblyName_Release
(
name
);
}
...
...
@@ -871,26 +871,26 @@ static void test_CreateAssemblyNameObject(void)
to_widechar
(
namestr
,
"wine, Version=1.2.3.4, Culture=en, PublicKeyToken=1234567890abcdef"
);
name
=
NULL
;
hr
=
pCreateAssemblyNameObject
(
&
name
,
namestr
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
name
!=
NULL
,
"Expected non-NULL name
\n
"
);
size
=
MAX_PATH
;
hr
=
IAssemblyName_GetDisplayName
(
name
,
str
,
&
size
,
ASM_DISPLAYF_VERSION
|
ASM_DISPLAYF_CULTURE
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok_aw
(
"wine, Version=1.2.3.4, Culture=en"
,
str
);
ok
(
size
==
34
,
"Expected 34, got %d
\n
"
,
size
);
ok
(
size
==
34
,
"Expected 34, got %
l
d
\n
"
,
size
);
size
=
MAX_PATH
;
hr
=
IAssemblyName_GetDisplayName
(
name
,
str
,
&
size
,
ASM_DISPLAYF_CULTURE
|
ASM_DISPLAYF_PUBLIC_KEY_TOKEN
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok_aw
(
"wine, Culture=en, PublicKeyToken=1234567890abcdef"
,
str
);
ok
(
size
==
50
,
"Expected 50, got %d
\n
"
,
size
);
ok
(
size
==
50
,
"Expected 50, got %
l
d
\n
"
,
size
);
size
=
MAX_PATH
;
hr
=
IAssemblyName_GetDisplayName
(
name
,
str
,
&
size
,
ASM_DISPLAYF_FULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok_aw
(
"wine, Version=1.2.3.4, Culture=en, PublicKeyToken=1234567890abcdef"
,
str
);
ok
(
size
==
67
,
"Expected 67, got %d
\n
"
,
size
);
ok
(
size
==
67
,
"Expected 67, got %
l
d
\n
"
,
size
);
IAssemblyName_Release
(
name
);
...
...
@@ -898,31 +898,31 @@ static void test_CreateAssemblyNameObject(void)
to_widechar
(
namestr
,
"wine, BadProp=42"
);
name
=
NULL
;
hr
=
pCreateAssemblyNameObject
(
&
name
,
namestr
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
name
!=
NULL
,
"Expected non-NULL name
\n
"
);
size
=
MAX_PATH
;
str
[
0
]
=
'\0'
;
hr
=
IAssemblyName_GetDisplayName
(
name
,
str
,
&
size
,
ASM_DISPLAYF_FULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok_aw
(
"wine"
,
str
);
ok
(
size
==
5
,
"Expected 5, got %d
\n
"
,
size
);
ok
(
size
==
5
,
"Expected 5, got %
l
d
\n
"
,
size
);
size
=
MAX_PATH
;
str
[
0
]
=
'\0'
;
hr
=
IAssemblyName_GetName
(
name
,
&
size
,
str
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok_aw
(
"wine"
,
str
);
ok
(
size
==
5
,
"Expected 5, got %d
\n
"
,
size
);
ok
(
size
==
5
,
"Expected 5, got %
l
d
\n
"
,
size
);
hi
=
0xbeefcace
;
lo
=
0xcafebabe
;
hr
=
IAssemblyName_GetVersion
(
name
,
&
hi
,
&
lo
);
ok
(
hr
==
FUSION_E_INVALID_NAME
||
broken
(
hr
==
S_OK
),
/* .NET 1.x */
"Expected FUSION_E_INVALID_NAME, got %08x
\n
"
,
hr
);
ok
(
hi
==
0
,
"Expected 0, got %08x
\n
"
,
hi
);
ok
(
lo
==
0
,
"Expected 0, got %08x
\n
"
,
lo
);
"Expected FUSION_E_INVALID_NAME, got %08
l
x
\n
"
,
hr
);
ok
(
hi
==
0
,
"Expected 0, got %08
l
x
\n
"
,
hi
);
ok
(
lo
==
0
,
"Expected 0, got %08
l
x
\n
"
,
lo
);
test_assembly_name_props
(
name
,
winename
);
...
...
@@ -939,7 +939,7 @@ static void test_CreateAssemblyNameObject(void)
return
;
}
ok
(
hr
==
FUSION_E_INVALID_NAME
,
"Expected FUSION_E_INVALID_NAME, got %08x
\n
"
,
hr
);
"Expected FUSION_E_INVALID_NAME, got %08
l
x
\n
"
,
hr
);
ok
(
name
==
(
IAssemblyName
*
)
0xdeadbeef
,
"Expected 0xdeadbeef, got %p
\n
"
,
name
);
/* PublicKeyToken contains invalid chars */
...
...
@@ -947,7 +947,7 @@ static void test_CreateAssemblyNameObject(void)
name
=
(
IAssemblyName
*
)
0xdeadbeef
;
hr
=
pCreateAssemblyNameObject
(
&
name
,
namestr
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
FUSION_E_INVALID_NAME
,
"Expected FUSION_E_INVALID_NAME, got %08x
\n
"
,
hr
);
"Expected FUSION_E_INVALID_NAME, got %08
l
x
\n
"
,
hr
);
ok
(
name
==
(
IAssemblyName
*
)
0xdeadbeef
,
"Expected 0xdeadbeef, got %p
\n
"
,
name
);
/* no comma separator */
...
...
@@ -955,7 +955,7 @@ static void test_CreateAssemblyNameObject(void)
name
=
(
IAssemblyName
*
)
0xdeadbeef
;
hr
=
pCreateAssemblyNameObject
(
&
name
,
namestr
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
FUSION_E_INVALID_NAME
,
"Expected FUSION_E_INVALID_NAME, got %08x
\n
"
,
hr
);
"Expected FUSION_E_INVALID_NAME, got %08
l
x
\n
"
,
hr
);
ok
(
name
==
(
IAssemblyName
*
)
0xdeadbeef
,
"Expected 0xdeadbeef, got %p
\n
"
,
name
);
if
(
SUCCEEDED
(
hr
))
IAssemblyName_Release
(
name
);
...
...
@@ -964,7 +964,7 @@ static void test_CreateAssemblyNameObject(void)
name
=
(
IAssemblyName
*
)
0xdeadbeef
;
hr
=
pCreateAssemblyNameObject
(
&
name
,
namestr
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
FUSION_E_INVALID_NAME
,
"Expected FUSION_E_INVALID_NAME, got %08x
\n
"
,
hr
);
"Expected FUSION_E_INVALID_NAME, got %08
l
x
\n
"
,
hr
);
ok
(
name
==
(
IAssemblyName
*
)
0xdeadbeef
,
"Expected 0xdeadbeef, got %p
\n
"
,
name
);
/* no value */
...
...
@@ -972,33 +972,33 @@ static void test_CreateAssemblyNameObject(void)
name
=
(
IAssemblyName
*
)
0xdeadbeef
;
hr
=
pCreateAssemblyNameObject
(
&
name
,
namestr
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
FUSION_E_INVALID_NAME
,
"Expected FUSION_E_INVALID_NAME, got %08x
\n
"
,
hr
);
"Expected FUSION_E_INVALID_NAME, got %08
l
x
\n
"
,
hr
);
ok
(
name
==
(
IAssemblyName
*
)
0xdeadbeef
,
"Expected 0xdeadbeef, got %p
\n
"
,
name
);
/* no spaces */
to_widechar
(
namestr
,
"wine,version=1.0.0.0"
);
name
=
(
IAssemblyName
*
)
0xdeadbeef
;
hr
=
pCreateAssemblyNameObject
(
&
name
,
namestr
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
name
!=
NULL
,
"Expected non-NULL name
\n
"
);
hi
=
lo
=
0xdeadbeef
;
hr
=
IAssemblyName_GetVersion
(
name
,
&
hi
,
&
lo
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hi
==
65536
,
"Expected 536, got %u
\n
"
,
hi
);
ok
(
lo
==
0
,
"Expected 0, got %u
\n
"
,
lo
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
hi
==
65536
,
"Expected 536, got %
l
u
\n
"
,
hi
);
ok
(
lo
==
0
,
"Expected 0, got %
l
u
\n
"
,
lo
);
IAssemblyName_Release
(
name
);
/* quoted values */
to_widechar
(
namestr
,
"wine, version=
\"
1.0.0.0
\"
,culture=
\"
en
\"
"
);
name
=
(
IAssemblyName
*
)
0xdeadbeef
;
hr
=
pCreateAssemblyNameObject
(
&
name
,
namestr
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
name
!=
NULL
,
"Expected non-NULL name
\n
"
);
hi
=
lo
=
0xdeadbeef
;
hr
=
IAssemblyName_GetVersion
(
name
,
&
hi
,
&
lo
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hi
==
65536
,
"Expected 65536, got %u
\n
"
,
hi
);
ok
(
lo
==
0
,
"Expected 0, got %u
\n
"
,
lo
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
hi
==
65536
,
"Expected 65536, got %
l
u
\n
"
,
hi
);
ok
(
lo
==
0
,
"Expected 0, got %
l
u
\n
"
,
lo
);
IAssemblyName_Release
(
name
);
}
...
...
@@ -1008,59 +1008,59 @@ static void test_IAssemblyName_IsEqual(void)
IAssemblyName
*
name1
,
*
name2
;
hr
=
pCreateAssemblyNameObject
(
&
name1
,
L"wine"
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
hr
=
pCreateAssemblyNameObject
(
&
name2
,
L"wine"
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
if
(
0
)
{
/* crashes on some old version */
hr
=
IAssemblyName_IsEqual
(
name1
,
NULL
,
0
);
ok
(
hr
==
S_FALSE
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_FALSE
,
"got %08
l
x
\n
"
,
hr
);
hr
=
IAssemblyName_IsEqual
(
name1
,
NULL
,
ASM_CMPF_IL_ALL
);
ok
(
hr
==
S_FALSE
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_FALSE
,
"got %08
l
x
\n
"
,
hr
);
}
hr
=
IAssemblyName_IsEqual
(
name1
,
name1
,
ASM_CMPF_IL_ALL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
hr
=
IAssemblyName_IsEqual
(
name1
,
name2
,
ASM_CMPF_IL_ALL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
IAssemblyName_Release
(
name2
);
hr
=
pCreateAssemblyNameObject
(
&
name2
,
L"wine,version=1.0.0.0"
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
hr
=
IAssemblyName_IsEqual
(
name1
,
name2
,
ASM_CMPF_IL_ALL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
IAssemblyName_Release
(
name2
);
hr
=
pCreateAssemblyNameObject
(
&
name2
,
L"wine,version=1.0.0.0,culture=neutral"
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
hr
=
IAssemblyName_IsEqual
(
name1
,
name2
,
ASM_CMPF_IL_ALL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
IAssemblyName_Release
(
name1
);
hr
=
pCreateAssemblyNameObject
(
&
name1
,
L"wine,version=1.0.0.0,culture=en"
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
hr
=
IAssemblyName_IsEqual
(
name1
,
name2
,
ASM_CMPF_IL_ALL
);
ok
(
hr
==
S_FALSE
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_FALSE
,
"got %08
l
x
\n
"
,
hr
);
IAssemblyName_Release
(
name1
);
hr
=
pCreateAssemblyNameObject
(
&
name1
,
L"wine"
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
IAssemblyName_Release
(
name2
);
hr
=
pCreateAssemblyNameObject
(
&
name2
,
L"wine,version=1.0.0.0,publicKeyToken=1234567890abcdef"
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
hr
=
IAssemblyName_IsEqual
(
name1
,
name2
,
ASM_CMPF_IL_ALL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
IAssemblyName_Release
(
name1
);
IAssemblyName_Release
(
name2
);
...
...
dlls/fusion/tests/fusion.c
View file @
2d0e84e6
...
...
@@ -88,25 +88,25 @@ static void test_GetCachePath(void)
/* NULL pwzCachePath, pcchPath is 0 */
size
=
0
;
hr
=
pGetCachePath
(
ASM_CACHE_GAC
,
NULL
,
&
size
);
ok
(
hr
==
E_NOT_SUFFICIENT_BUFFER
,
"Expected E_NOT_SUFFICIENT_BUFFER, got %08x
\n
"
,
hr
);
ok
(
hr
==
E_NOT_SUFFICIENT_BUFFER
,
"Expected E_NOT_SUFFICIENT_BUFFER, got %08
l
x
\n
"
,
hr
);
ok
(
size
==
lstrlenW
(
cachepath
)
+
1
,
"Expected %d, got %d
\n
"
,
lstrlenW
(
cachepath
)
+
1
,
size
);
"Expected %d, got %
l
d
\n
"
,
lstrlenW
(
cachepath
)
+
1
,
size
);
/* NULL pwszCachePath, pcchPath is MAX_PATH */
size
=
MAX_PATH
;
hr
=
pGetCachePath
(
ASM_CACHE_GAC
,
NULL
,
&
size
);
ok
(
hr
==
E_NOT_SUFFICIENT_BUFFER
,
"Expected E_NOT_SUFFICIENT_BUFFER, got %08x
\n
"
,
hr
);
ok
(
hr
==
E_NOT_SUFFICIENT_BUFFER
,
"Expected E_NOT_SUFFICIENT_BUFFER, got %08
l
x
\n
"
,
hr
);
ok
(
size
==
lstrlenW
(
cachepath
)
+
1
,
"Expected %d, got %d
\n
"
,
lstrlenW
(
cachepath
)
+
1
,
size
);
"Expected %d, got %
l
d
\n
"
,
lstrlenW
(
cachepath
)
+
1
,
size
);
/* both pwszCachePath and pcchPath NULL */
hr
=
pGetCachePath
(
ASM_CACHE_GAC
,
NULL
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %08x
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %08
l
x
\n
"
,
hr
);
/* NULL pcchPath */
lstrcpyW
(
path
,
L"nochange"
);
hr
=
pGetCachePath
(
ASM_CACHE_GAC
,
path
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %08x
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %08
l
x
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
L"nochange"
,
path
),
"Expected %s, got %s
\n
"
,
wine_dbgstr_w
(
L"nochange"
),
wine_dbgstr_w
(
path
));
...
...
@@ -114,14 +114,14 @@ static void test_GetCachePath(void)
lstrcpyW
(
path
,
L"nochange"
);
size
=
MAX_PATH
;
hr
=
pGetCachePath
(
ASM_CACHE_GAC
,
path
,
&
size
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
cachepath
,
path
),
"Expected %s, got %s
\n
"
,
wine_dbgstr_w
(
cachepath
),
wine_dbgstr_w
(
path
));
/* pcchPath has no room for NULL terminator */
lstrcpyW
(
path
,
L"nochange"
);
size
=
lstrlenW
(
cachepath
);
hr
=
pGetCachePath
(
ASM_CACHE_GAC
,
path
,
&
size
);
ok
(
hr
==
E_NOT_SUFFICIENT_BUFFER
,
"Expected E_NOT_SUFFICIENT_BUFFER, got %08x
\n
"
,
hr
);
ok
(
hr
==
E_NOT_SUFFICIENT_BUFFER
,
"Expected E_NOT_SUFFICIENT_BUFFER, got %08
l
x
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
L"nochange"
,
path
),
"Expected %s, got %s
\n
"
,
wine_dbgstr_w
(
L"nochange"
),
wine_dbgstr_w
(
path
));
...
...
@@ -134,7 +134,7 @@ static void test_GetCachePath(void)
hr
=
pGetCachePath
(
ASM_CACHE_ROOT
,
path
,
&
size
);
ok
(
hr
==
S_OK
||
broken
(
hr
==
E_INVALIDARG
),
/* .NET 1.1 */
"Expected S_OK, got %08x
\n
"
,
hr
);
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
ok
(
!
lstrcmpW
(
cachepath
,
path
),
"Expected %s, got %s
\n
"
,
wine_dbgstr_w
(
cachepath
),
wine_dbgstr_w
(
path
));
...
...
@@ -170,7 +170,7 @@ static void test_GetCachePath(void)
lstrcpyW
(
path
,
L"nochange"
);
size
=
MAX_PATH
;
hr
=
pGetCachePath
(
ASM_CACHE_ZAP
,
path
,
&
size
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08
l
x
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
cachepath
,
path
),
"Expected %s, got %s
\n
"
,
wine_dbgstr_w
(
cachepath
),
wine_dbgstr_w
(
path
));
}
...
...
@@ -178,7 +178,7 @@ static void test_GetCachePath(void)
lstrcpyW
(
path
,
L"nochange"
);
size
=
MAX_PATH
;
hr
=
pGetCachePath
(
ASM_CACHE_GAC
|
ASM_CACHE_ROOT
,
path
,
&
size
);
ok
(
hr
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %08x
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %08
l
x
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
L"nochange"
,
path
),
"Expected %s, got %s
\n
"
,
wine_dbgstr_w
(
L"nochange"
),
wine_dbgstr_w
(
path
));
}
...
...
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