Author: akhaldi
Date: Sun Jul 19 13:17:08 2015
New Revision: 68430
URL:
http://svn.reactos.org/svn/reactos?rev=68430&view=rev
Log:
[FUSION_WINETEST] Sync with Wine Staging 1.7.47. CORE-9924
Modified:
trunk/rostests/winetests/fusion/asmname.c
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 Jul 19 13:17:08 2015
@@ -430,12 +430,12 @@
broken(hr == E_INVALIDARG), /* .NET 1.x */
"Expected FUSION_E_INVALID_NAME, got %08x\n", hr);
- size = MAX_PATH;
- str[0] = '\0';
- hr = IAssemblyName_GetName(name, &size, str);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
- ok(!str[0], "Expected empty name\n");
- ok(size == 0, "Expected 0, got %d\n", size);
+ str[0] = 'a';
+ size = MAX_PATH;
+ hr = IAssemblyName_GetName(name, &size, str);
+ ok(hr == S_OK, "got %08x\n", hr);
+ ok(str[0] == 'a', "got %c\n", str[0]);
+ ok(!size, "got %u\n", size);
hi = 0xbeefcace;
lo = 0xcafebabe;
@@ -466,6 +466,26 @@
broken(hr == S_OK), /* .NET 1.x */
"Expected FUSION_E_INVALID_NAME, got %08x\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);
+
+ if (0) /* crash */
+ {
+ str[0] = '\0';
+ hr = IAssemblyName_GetName(name, NULL, str);
+ ok(hr == E_NOT_SUFFICIENT_BUFFER, "got %08x\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(!str[0], "got %c\n", str[0]);
+ ok(size == 1, "got %u\n", size);
+
size = MAX_PATH;
str[0] = '\0';
hr = IAssemblyName_GetName(name, &size, str);
@@ -497,11 +517,35 @@
ok(hr == S_OK, "Expected S_OK, got %08x\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);
+
+ 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);
+
+ size = 3;
+ str[0] = 'a';
+ hr = IAssemblyName_GetDisplayName(name, str, &size, 0);
+ ok(hr == E_NOT_SUFFICIENT_BUFFER, "got %08x\n", hr);
+ ok(str[0] == 'a', "got %c\n", str[0]);
+ ok(size == 5, "got %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_aw("wine", str);
ok(size == 5, "Expected 5, got %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(!str[0], "got %c\n", str[0]);
+ ok(size == 5, "got %u\n", size);
size = MAX_PATH;
str[0] = '\0';