Author: akhaldi
Date: Sun Mar 22 18:34:09 2015
New Revision: 66858
URL:
http://svn.reactos.org/svn/reactos?rev=66858&view=rev
Log:
[FUSION_WINETEST] Sync with Wine Staging 1.7.37. CORE-9246
Modified:
trunk/rostests/winetests/fusion/asmcache.c
trunk/rostests/winetests/fusion/asmname.c
trunk/rostests/winetests/fusion/fusion.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] Sun Mar 22 18:34:09 2015
@@ -889,6 +889,43 @@
IAssemblyCache_Release(cache);
}
+static void test_CreateAssemblyCacheItem(void)
+{
+ IAssemblyCache *cache;
+ IAssemblyCacheItem *item;
+ HRESULT hr;
+
+ static const WCHAR wine[] = {'w','i','n','e',0};
+
+ hr = pCreateAssemblyCache(&cache, 0);
+ ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+
+ hr = IAssemblyCache_CreateAssemblyCacheItem(cache, 0, NULL, NULL, NULL);
+ ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr);
+
+ hr = IAssemblyCache_CreateAssemblyCacheItem(cache, 0, NULL, &item, NULL);
+ ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ IAssemblyCacheItem_Release(item);
+
+ hr = IAssemblyCache_CreateAssemblyCacheItem(cache, 0, NULL, &item, wine);
+ ok(hr == S_OK, "Expected S_OK, got %08x\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);
+ IAssemblyCacheItem_Release(item);
+
+ hr = IAssemblyCache_CreateAssemblyCacheItem(cache, 1, NULL, &item, NULL);
+ ok(hr == S_OK, "Expected S_OK, got %08x\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);
+ IAssemblyCacheItem_Release(item);
+
+ IAssemblyCache_Release(cache);
+}
+
static void test_InstallAssembly(void)
{
IAssemblyCache *cache;
@@ -1243,8 +1280,7 @@
"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);
+ ok(hr == E_NOT_SUFFICIENT_BUFFER, "Expected E_NOT_SUFFICIENT_BUFFER, got
%08x\n", hr);
todo_wine
{
ok((info.uliAssemblySizeInKB.u.LowPart == 4),
@@ -1266,8 +1302,7 @@
"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);
+ ok(hr == E_NOT_SUFFICIENT_BUFFER, "Expected E_NOT_SUFFICIENT_BUFFER, got
%08x\n", hr);
todo_wine
{
ok((info.uliAssemblySizeInKB.u.LowPart == 4),
@@ -1329,7 +1364,7 @@
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(hr == E_NOT_SUFFICIENT_BUFFER, "got %08x\n", hr);
ok(info.dwAssemblyFlags == ASSEMBLYINFO_FLAG_INSTALLED, "got %08x\n",
info.dwAssemblyFlags);
/* short buffer, QUERYASMINFO_FLAG_GETSIZE */
@@ -1339,7 +1374,7 @@
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(hr == E_NOT_SUFFICIENT_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" */
@@ -1533,8 +1568,7 @@
lstrcatW(name, commasep);
lstrcatW(name, ver);
hr = IAssemblyCache_QueryAssemblyInfo(cache, 0, name, &info);
- ok(hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER),
- "Expected HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), got %08x\n",
hr);
+ ok(hr == E_NOT_SUFFICIENT_BUFFER, "Expected E_NOT_SUFFICIENT_BUFFER, got
%08x\n", hr);
ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO),
"Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo);
ok(info.dwAssemblyFlags == ASSEMBLYINFO_FLAG_INSTALLED,
@@ -1561,6 +1595,7 @@
return;
test_CreateAssemblyCache();
+ test_CreateAssemblyCacheItem();
test_InstallAssembly();
test_QueryAssemblyInfo();
}
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] Sun Mar 22 18:34:09 2015
@@ -434,7 +434,7 @@
str[0] = '\0';
hr = IAssemblyName_GetName(name, &size, str);
ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
- ok(lstrlenW(str) == 0, "Expected empty name\n");
+ ok(!str[0], "Expected empty name\n");
ok(size == 0, "Expected 0, got %d\n", size);
hi = 0xbeefcace;
@@ -470,7 +470,7 @@
str[0] = '\0';
hr = IAssemblyName_GetName(name, &size, str);
ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
- ok(lstrlenW(str) == 0, "Expected empty name\n");
+ ok(!str[0], "Expected empty name\n");
ok(size == 1, "Expected 1, got %d\n", size);
hi = 0xbeefcace;
Modified: trunk/rostests/winetests/fusion/fusion.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/fusion/fusion.c…
==============================================================================
--- trunk/rostests/winetests/fusion/fusion.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/fusion/fusion.c [iso-8859-1] Sun Mar 22 18:34:09 2015
@@ -108,16 +108,14 @@
/* NULL pwzCachePath, pcchPath is 0 */
size = 0;
hr = pGetCachePath(ASM_CACHE_GAC, NULL, &size);
- ok(hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER),
- "Expected HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), got %08x\n",
hr);
+ ok(hr == E_NOT_SUFFICIENT_BUFFER, "Expected E_NOT_SUFFICIENT_BUFFER, got
%08x\n", hr);
ok(size == lstrlenW(cachepath) + 1,
"Expected %d, got %d\n", lstrlenW(cachepath) + 1, size);
/* NULL pwszCachePath, pcchPath is MAX_PATH */
size = MAX_PATH;
hr = pGetCachePath(ASM_CACHE_GAC, NULL, &size);
- ok(hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER),
- "Expected HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), got %08x\n",
hr);
+ ok(hr == E_NOT_SUFFICIENT_BUFFER, "Expected E_NOT_SUFFICIENT_BUFFER, got
%08x\n", hr);
ok(size == lstrlenW(cachepath) + 1,
"Expected %d, got %d\n", lstrlenW(cachepath) + 1, size);
@@ -142,8 +140,7 @@
lstrcpyW(path, nochange);
size = lstrlenW(cachepath);
hr = pGetCachePath(ASM_CACHE_GAC, path, &size);
- ok(hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER),
- "Expected HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), got %08x\n",
hr);
+ ok(hr == E_NOT_SUFFICIENT_BUFFER, "Expected E_NOT_SUFFICIENT_BUFFER, got
%08x\n", hr);
ok( !lstrcmpW( nochange, path ), "Expected %s, got %s\n",
wine_dbgstr_w(nochange), wine_dbgstr_w(path));
lstrcpyW(cachepath, windir);