Author: akhaldi
Date: Wed Jan 25 19:09:28 2012
New Revision: 55178
URL:
http://svn.reactos.org/svn/reactos?rev=55178&view=rev
Log:
[FUSION_WINETEST]
* Sync to Wine 1.3.37.
Modified:
trunk/rostests/winetests/fusion/asmcache.c
trunk/rostests/winetests/fusion/asmenum.c
trunk/rostests/winetests/fusion/asmname.c
Modified: trunk/rostests/winetests/fusion/asmcache.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/fusion/asmcache…
==============================================================================
--- trunk/rostests/winetests/fusion/asmcache.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/fusion/asmcache.c [iso-8859-1] Wed Jan 25 19:09:28 2012
@@ -1091,13 +1091,10 @@
"Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart);
ok(info.uliAssemblySizeInKB.u.LowPart == 0,
"Expected 0, got %d\n", info.uliAssemblySizeInKB.u.LowPart);
- todo_wine
- {
- 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);
- }
+ 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);
/* pwzCachePath is full filename */
INIT_ASM_INFO();
@@ -1139,13 +1136,10 @@
"Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart);
ok(info.uliAssemblySizeInKB.u.LowPart == 0,
"Expected 0, got %d\n", info.uliAssemblySizeInKB.u.LowPart);
- todo_wine
- {
- 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);
- }
+ 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);
/* info.cbAssemblyInfo is 1 */
INIT_ASM_INFO();
@@ -1193,15 +1187,13 @@
"Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart);
todo_wine
{
- /* win9x: 32 */
- ok((info.uliAssemblySizeInKB.u.LowPart == 4) ||
- broken(info.uliAssemblySizeInKB.u.LowPart == 32),
+ ok((info.uliAssemblySizeInKB.u.LowPart == 4),
"Expected 4, got %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);
- }
+ }
+ 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);
/* QUERYASMINFO_FLAG_GETSIZE and QUERYASMINFO_FLAG_VALIDATE */
INIT_ASM_INFO();
@@ -1216,15 +1208,13 @@
"Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart);
todo_wine
{
- /* win9x: 32 */
- ok((info.uliAssemblySizeInKB.u.LowPart == 4) ||
- broken(info.uliAssemblySizeInKB.u.LowPart == 32),
+ ok((info.uliAssemblySizeInKB.u.LowPart == 4),
"Expected 4, got %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);
- }
+ }
+ 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);
/* info.pszCurrentAssemblyPathBuf is NULL */
INIT_ASM_INFO();
@@ -1237,17 +1227,15 @@
"Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08x\n",
info.dwAssemblyFlags);
ok(info.uliAssemblySizeInKB.u.HighPart == 0,
"Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart);
+ ok(hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER),
+ "Expected HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), got %08x\n",
hr);
todo_wine
{
- ok(hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER),
- "Expected HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), got
%08x\n", hr);
- /* win9x: 32 */
- ok((info.uliAssemblySizeInKB.u.LowPart == 4) ||
- broken(info.uliAssemblySizeInKB.u.LowPart == 32),
+ ok((info.uliAssemblySizeInKB.u.LowPart == 4),
"Expected 4, got %d\n", info.uliAssemblySizeInKB.u.LowPart);
- ok(info.cchBuf == lstrlenW(asmpath) + 1,
- "Expected %d, got %d\n", lstrlenW(asmpath) + 1, info.cchBuf);
- }
+ }
+ ok(info.cchBuf == lstrlenW(asmpath) + 1,
+ "Expected %d, got %d\n", lstrlenW(asmpath) + 1, info.cchBuf);
/* info.cchBuf is exactly size of asmpath */
INIT_ASM_INFO();
@@ -1262,17 +1250,15 @@
"Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart);
ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, empty),
"Assembly path was changed\n");
+ ok(hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER),
+ "Expected HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), got %08x\n",
hr);
todo_wine
{
- ok(hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER),
- "Expected HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), got
%08x\n", hr);
- /* win9x: 32 */
- ok((info.uliAssemblySizeInKB.u.LowPart == 4) ||
- broken(info.uliAssemblySizeInKB.u.LowPart == 32),
+ ok((info.uliAssemblySizeInKB.u.LowPart == 4),
"Expected 4, got %d\n", info.uliAssemblySizeInKB.u.LowPart);
- ok(info.cchBuf == lstrlenW(asmpath) + 1,
- "Expected %d, got %d\n", lstrlenW(asmpath) + 1, info.cchBuf);
- }
+ }
+ ok(info.cchBuf == lstrlenW(asmpath) + 1,
+ "Expected %d, got %d\n", lstrlenW(asmpath) + 1, info.cchBuf);
/* info.cchBuf has room for NULL-terminator */
INIT_ASM_INFO();
@@ -1290,13 +1276,11 @@
"Expected %d, got %d\n", lstrlenW(asmpath) + 1, info.cchBuf);
todo_wine
{
- /* win9x: 32 */
- ok((info.uliAssemblySizeInKB.u.LowPart == 4) ||
- broken(info.uliAssemblySizeInKB.u.LowPart == 32),
+ ok((info.uliAssemblySizeInKB.u.LowPart == 4),
"Expected 4, got %d\n", info.uliAssemblySizeInKB.u.LowPart);
- ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, asmpath),
- "Wrong assembly path returned\n");
- }
+ }
+ ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, asmpath),
+ "Wrong assembly path returned\n");
/* display name is "wine, Version=1.0.0.0" */
INIT_ASM_INFO();
@@ -1314,23 +1298,38 @@
"Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart);
todo_wine
{
- /* win9x: 32 */
- ok((info.uliAssemblySizeInKB.u.LowPart == 4) ||
- broken(info.uliAssemblySizeInKB.u.LowPart == 32),
+ ok((info.uliAssemblySizeInKB.u.LowPart == 4),
"Expected 4, got %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);
- }
-
- /* display name is "wine, Version=1.0.0.00000" */
- INIT_ASM_INFO();
+ }
+ 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);
+
+ /* short buffer, QUERYASMINFO_FLAG_VALIDATE */
+ memset(&info, 0, sizeof(info));
+ lstrcpyW(name, wine);
+ lstrcatW(name, commasep);
+ lstrcatW(name, otherver);
+ hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_VALIDATE,
+ name, &info);
+ ok(hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), "got %08x\n", hr);
+ ok(info.dwAssemblyFlags == ASSEMBLYINFO_FLAG_INSTALLED, "got %08x\n",
info.dwAssemblyFlags);
+
+ /* short buffer, QUERYASMINFO_FLAG_GETSIZE */
+ memset(&info, 0, sizeof(info));
lstrcpyW(name, wine);
lstrcatW(name, commasep);
lstrcatW(name, otherver);
hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_GETSIZE,
name, &info);
+ ok(hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), "got %08x\n", hr);
+ ok(info.dwAssemblyFlags == ASSEMBLYINFO_FLAG_INSTALLED, "got %08x\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(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO),
"Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo);
@@ -1340,15 +1339,13 @@
"Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart);
todo_wine
{
- /* win9x: 32 */
- ok((info.uliAssemblySizeInKB.u.LowPart == 4) ||
- broken(info.uliAssemblySizeInKB.u.LowPart == 32),
+ ok((info.uliAssemblySizeInKB.u.LowPart == 4),
"Expected 4, got %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);
- }
+ }
+ 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);
/* display name is "wine, Version=1.0.0.1", versions don't match */
INIT_ASM_INFO();
@@ -1386,15 +1383,13 @@
"Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart);
todo_wine
{
- /* win9x: 32 */
- ok((info.uliAssemblySizeInKB.u.LowPart == 4) ||
- broken(info.uliAssemblySizeInKB.u.LowPart == 32),
+ ok((info.uliAssemblySizeInKB.u.LowPart == 4),
"Expected 4, got %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);
- }
+ }
+ 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);
/* display name is "wine, Culture=en", cultures don't match */
INIT_ASM_INFO();
@@ -1415,9 +1410,12 @@
"Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart);
ok(info.uliAssemblySizeInKB.u.LowPart == 0,
"Expected 0, got %d\n", info.uliAssemblySizeInKB.u.LowPart);
- ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, empty),
- "Assembly path was changed\n");
- ok(info.cchBuf == MAX_PATH, "Expected MAX_PATH, got %d\n", info.cchBuf);
+ todo_wine
+ {
+ ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, empty),
+ "Assembly path was changed\n");
+ ok(info.cchBuf == MAX_PATH, "Expected MAX_PATH, got %d\n",
info.cchBuf);
+ }
/* display name is "wine, PublicKeyTokens=2d03617b1c31e2f5" */
INIT_ASM_INFO();
@@ -1435,15 +1433,13 @@
"Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart);
todo_wine
{
- /* win9x: 32 */
- ok((info.uliAssemblySizeInKB.u.LowPart == 4) ||
- broken(info.uliAssemblySizeInKB.u.LowPart == 32),
+ ok((info.uliAssemblySizeInKB.u.LowPart == 4),
"Expected 4, got %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);
- }
+ }
+ 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);
/* display name is "wine, PublicKeyToken=aaaaaaaaaaaaaaaa", pubkeys
don't match */
INIT_ASM_INFO();
@@ -1481,15 +1477,13 @@
"Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart);
todo_wine
{
- /* win9x: 32 */
- ok((info.uliAssemblySizeInKB.u.LowPart == 4) ||
- broken(info.uliAssemblySizeInKB.u.LowPart == 32),
+ ok((info.uliAssemblySizeInKB.u.LowPart == 4),
"Expected 4, got %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);
- }
+ }
+ 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);
/* uninstall the assembly from the GAC */
disp = 0xf00dbad;
Modified: trunk/rostests/winetests/fusion/asmenum.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/fusion/asmenum.…
==============================================================================
--- trunk/rostests/winetests/fusion/asmenum.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/fusion/asmenum.c [iso-8859-1] Wed Jan 25 19:09:28 2012
@@ -147,13 +147,15 @@
return ret;
}
-static void create_file_data(LPCSTR name, LPCSTR data, DWORD size)
+static BOOL create_file_data(LPCSTR name, LPCSTR data, DWORD size)
{
HANDLE file;
DWORD written;
file = CreateFileA(name, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL);
- ok(file != INVALID_HANDLE_VALUE, "Failure to open file %s\n", name);
+ if (file == INVALID_HANDLE_VALUE)
+ return FALSE;
+
WriteFile(file, data, strlen(data), &written, NULL);
if (size)
@@ -163,9 +165,8 @@
}
CloseHandle(file);
-}
-
-#define create_file(name, size) create_file_data(name, name, size)
+ return TRUE;
+}
static void test_CreateAssemblyEnum(void)
{
@@ -409,19 +410,31 @@
CreateDirectoryA(path, NULL);
lstrcatA(path, "\\Wine.dll");
- create_file(path, 100);
+ if (!create_file_data(path, path, 100))
+ {
+ win_skip("Failed to open file %s, skipping name enumeration tests\n",
path);
+ goto done;
+ }
sprintf(path, "%s\\Wine\\1.0.1.2__16a3fcd171e93a8d", gac);
CreateDirectoryA(path, NULL);
lstrcatA(path, "\\Wine.dll");
- create_file(path, 100);
+ if (!create_file_data(path, path, 100))
+ {
+ win_skip("Failed to open file %s, skipping name enumeration tests\n",
path);
+ goto done;
+ }
sprintf(path, "%s\\Wine\\1.0.1.2__123456789abcdef0", gac);
CreateDirectoryA(path, NULL);
lstrcatA(path, "\\Wine.dll");
- create_file(path, 100);
+ if (!create_file_data(path, path, 100))
+ {
+ win_skip("Failed to open file %s, skipping name enumeration tests\n",
path);
+ goto done;
+ }
/* test case sensitivity */
to_widechar(namestr, "wine");
@@ -650,6 +663,7 @@
IAssemblyEnum_Release(asmenum);
IAssemblyName_Release(asmname);
+done:
sprintf(path, "%s\\Wine\\1.0.0.0__16a3fcd171e93a8d\\Wine.dll", gac);
DeleteFileA(path);
sprintf(path, "%s\\Wine\\1.0.1.2__16a3fcd171e93a8d\\Wine.dll", gac);
Modified: trunk/rostests/winetests/fusion/asmname.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/fusion/asmname.…
==============================================================================
--- trunk/rostests/winetests/fusion/asmname.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/fusion/asmname.c [iso-8859-1] Wed Jan 25 19:09:28 2012
@@ -718,6 +718,99 @@
IAssemblyName_Release(name);
+ /* Processor architecture tests */
+ 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(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);
+
+ WideCharToMultiByte(CP_ACP, 0, str, -1, string1, MAX_PATH, NULL, NULL);
+
+ if (lstrcmpA(string1, "wine") == 0)
+ win_skip("processorArchitecture not supported on .NET 1.x\n");
+ else
+ {
+ ok_aw("wine, processorArchitecture=x86", str);
+ ok(size == 32, "Expected 32, got %d\n", size);
+
+ IAssemblyName_Release(name);
+
+ /* amd64 */
+ 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);
+
+ size = MAX_PATH;
+ hr = IAssemblyName_GetDisplayName(name, str, &size,
ASM_DISPLAYF_PROCESSORARCHITECTURE);
+ ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok_aw("wine, processorArchitecture=AMD64", str);
+ ok(size == 34, "Expected 34, got %d\n", size);
+
+ IAssemblyName_Release(name);
+
+ /* ia64 */
+ 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);
+
+ size = MAX_PATH;
+ hr = IAssemblyName_GetDisplayName(name, str, &size,
ASM_DISPLAYF_PROCESSORARCHITECTURE);
+ ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok_aw("wine, processorArchitecture=IA64", str);
+ ok(size == 33, "Expected 33, got %d\n", size);
+
+ IAssemblyName_Release(name);
+
+ /* msil */
+ 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);
+
+ size = MAX_PATH;
+ hr = IAssemblyName_GetDisplayName(name, str, &size,
ASM_DISPLAYF_PROCESSORARCHITECTURE);
+ ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok_aw("wine, processorArchitecture=MSIL", str);
+ ok(size == 33, "Expected 33, got %d\n", size);
+
+ IAssemblyName_Release(name);
+ }
+
+ /* Pulling out various different values */
+ 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(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_aw("wine, Version=1.2.3.4, Culture=en", str);
+ ok(size == 34, "Expected 34, got %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_aw("wine, Culture=en, PublicKeyToken=1234567890abcdef", str);
+ ok(size == 50, "Expected 50, got %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_aw("wine, Version=1.2.3.4, Culture=en, PublicKeyToken=1234567890abcdef",
str);
+ ok(size == 67, "Expected 67, got %d\n", size);
+
+ IAssemblyName_Release(name);
+
/* invalid property */
to_widechar(namestr, "wine, BadProp=42");
name = NULL;
@@ -729,11 +822,8 @@
str[0] = '\0';
hr = IAssemblyName_GetDisplayName(name, str, &size, ASM_DISPLAYF_FULL);
ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
- todo_wine
- {
- ok_aw("wine", str);
- ok(size == 5, "Expected 5, got %d\n", size);
- }
+ ok_aw("wine", str);
+ ok(size == 5, "Expected 5, got %d\n", size);
size = MAX_PATH;
str[0] = '\0';
@@ -781,12 +871,9 @@
to_widechar(namestr, "wine PublicKeyToken=1234567890abcdef");
name = (IAssemblyName *)0xdeadbeef;
hr = pCreateAssemblyNameObject(&name, namestr, CANOF_PARSE_DISPLAY_NAME, NULL);
- todo_wine
- {
- ok(hr == FUSION_E_INVALID_NAME,
- "Expected FUSION_E_INVALID_NAME, got %08x\n", hr);
- ok(name == (IAssemblyName *)0xdeadbeef, "Expected 0xdeadbeef, got
%p\n", name);
- }
+ ok(hr == FUSION_E_INVALID_NAME,
+ "Expected FUSION_E_INVALID_NAME, got %08x\n", hr);
+ ok(name == (IAssemblyName *)0xdeadbeef, "Expected 0xdeadbeef, got %p\n",
name);
if(SUCCEEDED(hr)) IAssemblyName_Release(name);
/* no '=' */