Author: akhaldi
Date: Sat May 4 20:21:53 2013
New Revision: 58928
URL:
http://svn.reactos.org/svn/reactos?rev=58928&view=rev
Log:
[FUSION_WINETEST]
* Sync with Wine 1.5.26.
Modified:
trunk/rostests/winetests/fusion/CMakeLists.txt
trunk/rostests/winetests/fusion/asmcache.c
trunk/rostests/winetests/fusion/asmenum.c
trunk/rostests/winetests/fusion/asmname.c
trunk/rostests/winetests/fusion/fusion.c
trunk/rostests/winetests/fusion/testlist.c
Modified: trunk/rostests/winetests/fusion/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/fusion/CMakeLis…
==============================================================================
--- trunk/rostests/winetests/fusion/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/rostests/winetests/fusion/CMakeLists.txt [iso-8859-1] Sat May 4 20:21:53 2013
@@ -1,7 +1,5 @@
-add_definitions(
- -D__ROS_LONG64__
- -D_DLL -D__USE_CRTIMP)
+add_definitions(-D__ROS_LONG64__)
list(APPEND SOURCE
asmcache.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] Sat May 4 20:21:53 2013
@@ -16,17 +16,25 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#define WIN32_NO_STATUS
+#define _INC_WINDOWS
+#define COM_NO_WINDOWS_H
+
#define COBJMACROS
#define INITGUID
#include <stdio.h>
-#include <windows.h>
-#include <mscoree.h>
+//#include <windows.h>
+#include <windef.h>
+#include <winbase.h>
+#include <winver.h>
+#include <objbase.h>
+//#include <mscoree.h>
#include <fusion.h>
#include <corerror.h>
-#include "wine/test.h"
+#include <wine/test.h>
typedef struct _tagASSEMBLY ASSEMBLY;
@@ -1011,6 +1019,18 @@
'_','M','S','I','L','\\','w','i','n','e','\\',
'1','.','0','.','0','.','0','_','_','2','d','0','3','6','1','7','b',
'1','c','3','1','e','2','f','5','\\',0};
+ static const WCHAR wine2[] = {
+
'w','i','n','e',',','v','e','r','s','i','o','n','=','1','.','0','.','0','.','1',',',
+
'p','u','b','l','i','c','K','e','y','T','o','k','e','n','=',
+
'2','d','0','3','6','1','7','b','1','c','3','1','e','2','f','5',',',
+
'c','u','l','t','u','r','e','=','n','e','u','t','r','a','l',0};
+ static const WCHAR nullpublickey[] = {
+
'm','s','c','o','r','l','i','b','.','d','l','l',',','v','e','r','s','i','o','n','=','0','.','0','.',
+
'0','.','0',',','c','u','l','t','u','r','e','=','n','e','u','t','r','a','l',',',
+
'p','u','b','l','i','c','K','e','y','T','o','k','e','n','=','n','u','l','l',0};
+ static const WCHAR nullpublickey1[] = {
+
'm','s','c','o','r','l','i','b','.','d','l','l',',',
+
'p','u','b','l','i','c','K','e','y','T','o','k','e','n','=','n','u','L','l',0};
size = MAX_PATH;
hr = pGetCachePath(ASM_CACHE_GAC, asmpath, &size);
@@ -1363,6 +1383,36 @@
"Assembly path was changed\n");
ok(info.cchBuf == MAX_PATH, "Expected MAX_PATH, got %d\n", info.cchBuf);
+ /* display name is
"wine,version=1.0.0.1,publicKeyToken=2d03617b1c31e2f5,culture=neutral" */
+ INIT_ASM_INFO();
+ lstrcpyW(name, wine2);
+ 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.cbAssemblyInfo == sizeof(ASSEMBLY_INFO),
+ "Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo);
+ ok(info.dwAssemblyFlags == 0, "Expected 0, got %08x\n",
info.dwAssemblyFlags);
+ ok(info.uliAssemblySizeInKB.u.HighPart == 0,
+ "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);
+
+ /* display name is
"mscorlib.dll,version=0.0.0.0,culture=neutral,publicKeyToken=null" */
+ INIT_ASM_INFO();
+ lstrcpyW(name, nullpublickey);
+ hr = IAssemblyCache_QueryAssemblyInfo(cache, 0, name, &info);
+ ok(hr == FUSION_E_PRIVATE_ASM_DISALLOWED, "got %08x\n", hr);
+
+ /* display name is "mscorlib.dll,publicKeyToken=nuLl" */
+ INIT_ASM_INFO();
+ lstrcpyW(name, nullpublickey1);
+ hr = IAssemblyCache_QueryAssemblyInfo(cache, 0, name, &info);
+ ok(hr == FUSION_E_PRIVATE_ASM_DISALLOWED, "got %08x\n", hr);
+
/* display name is "wine, Culture=neutral" */
INIT_ASM_INFO();
lstrcpyW(name, wine);
@@ -1394,24 +1444,18 @@
lstrcatW(name, badculture);
hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_GETSIZE,
name, &info);
- todo_wine
- {
- 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);
- }
+ 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);
ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO),
"Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo);
ok(info.uliAssemblySizeInKB.u.HighPart == 0,
"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, empty),
- "Assembly path was changed\n");
- ok(info.cchBuf == MAX_PATH, "Expected MAX_PATH, got %d\n",
info.cchBuf);
- }
+ 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();
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] Sat May 4 20:21:53 2013
@@ -16,18 +16,26 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#define WIN32_NO_STATUS
+#define _INC_WINDOWS
+#define COM_NO_WINDOWS_H
+
#define COBJMACROS
#include <stdio.h>
-#include <windows.h>
+//#include <windows.h>
+#include <windef.h>
+#include <winbase.h>
+#include <winreg.h>
+#include <winnls.h>
#include <shlwapi.h>
-#include <mscoree.h>
+//#include <mscoree.h>
#include <fusion.h>
-#include <corerror.h>
-
-#include "wine/test.h"
-#include "wine/list.h"
+//#include <corerror.h>
+
+#include <wine/test.h>
+#include <wine/list.h>
static HRESULT (WINAPI *pCreateAssemblyEnum)(IAssemblyEnum **pEnum,
IUnknown *pUnkReserved,
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] Sat May 4 20:21:53 2013
@@ -16,16 +16,25 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#define WIN32_NO_STATUS
+#define _INC_WINDOWS
+#define COM_NO_WINDOWS_H
+
#define COBJMACROS
-#include <stdio.h>
-
-#include <windows.h>
-#include <mscoree.h>
+//#include <stdio.h>
+#include <stdarg.h>
+
+//#include <windows.h>
+#include <windef.h>
+#include <winbase.h>
+#include <winnls.h>
+#include <objbase.h>
+//#include <mscoree.h>
#include <fusion.h>
#include <corerror.h>
-#include "wine/test.h"
+#include <wine/test.h>
/* ok-like statement which takes two unicode strings or one unicode and one ANSI string
as arguments */
static CHAR string1[MAX_PATH];
@@ -891,6 +900,107 @@
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);
+
+ /* 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(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);
+ 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(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);
+ IAssemblyName_Release(name);
+}
+
+static void test_IAssemblyName_IsEqual(void)
+{
+ static const WCHAR wine1[] =
+ {'w','i','n','e',0};
+ static const WCHAR wine2[] =
+
{'w','i','n','e',',','v','e','r','s','i','o','n','=','1','.','0','.','0','.','0',0};
+ static const WCHAR wine3[] =
+
{'w','i','n','e',',','v','e','r','s','i','o','n','=','1','.','0','.','0','.','0',',',
+
'c','u','l','t','u','r','e','=','n','e','u','t','r','a','l',0};
+ static const WCHAR wine4[] =
+
{'w','i','n','e',',','v','e','r','s','i','o','n','=','1','.','0','.','0','.','0',',',
+
'c','u','l','t','u','r','e','=','e','n',0};
+ static const WCHAR wine5[] =
+
{'w','i','n','e',',','v','e','r','s','i','o','n','=','1','.','0','.','0','.','0',',',
+
'p','u','b','l','i','c','K','e','y','T','o','k','e','n','=','1','2','3','4','5','6',
+
'7','8','9','0','a','b','c','d','e','f',0};
+ HRESULT hr;
+ IAssemblyName *name1, *name2;
+
+ hr = pCreateAssemblyNameObject( &name1, wine1, CANOF_PARSE_DISPLAY_NAME, NULL );
+ ok( hr == S_OK, "got %08x\n", hr );
+
+ hr = pCreateAssemblyNameObject( &name2, wine1, CANOF_PARSE_DISPLAY_NAME, NULL );
+ ok( hr == S_OK, "got %08x\n", hr );
+
+ if (0) { /* crashes on some old version */
+ hr = IAssemblyName_IsEqual( name1, NULL, 0 );
+ ok( hr == S_FALSE, "got %08x\n", hr );
+
+ hr = IAssemblyName_IsEqual( name1, NULL, ASM_CMPF_IL_ALL );
+ ok( hr == S_FALSE, "got %08x\n", hr );
+ }
+
+ hr = IAssemblyName_IsEqual( name1, name1, ASM_CMPF_IL_ALL );
+ ok( hr == S_OK, "got %08x\n", hr );
+
+ hr = IAssemblyName_IsEqual( name1, name2, ASM_CMPF_IL_ALL );
+ ok( hr == S_OK, "got %08x\n", hr );
+
+ IAssemblyName_Release( name2 );
+ hr = pCreateAssemblyNameObject( &name2, wine2, CANOF_PARSE_DISPLAY_NAME, NULL );
+ ok( hr == S_OK, "got %08x\n", hr );
+
+ hr = IAssemblyName_IsEqual( name1, name2, ASM_CMPF_IL_ALL );
+ ok( hr == S_OK, "got %08x\n", hr );
+
+ IAssemblyName_Release( name2 );
+ hr = pCreateAssemblyNameObject( &name2, wine3, CANOF_PARSE_DISPLAY_NAME, NULL );
+ ok( hr == S_OK, "got %08x\n", hr );
+
+ hr = IAssemblyName_IsEqual( name1, name2, ASM_CMPF_IL_ALL );
+ ok( hr == S_OK, "got %08x\n", hr );
+
+ IAssemblyName_Release( name1 );
+ hr = pCreateAssemblyNameObject( &name1, wine4, CANOF_PARSE_DISPLAY_NAME, NULL );
+ ok( hr == S_OK, "got %08x\n", hr );
+
+ hr = IAssemblyName_IsEqual( name1, name2, ASM_CMPF_IL_ALL );
+ ok( hr == S_FALSE, "got %08x\n", hr );
+
+ IAssemblyName_Release( name1 );
+ hr = pCreateAssemblyNameObject( &name1, wine1, CANOF_PARSE_DISPLAY_NAME, NULL );
+ ok( hr == S_OK, "got %08x\n", hr );
+
+ IAssemblyName_Release( name2 );
+ hr = pCreateAssemblyNameObject( &name2, wine5, CANOF_PARSE_DISPLAY_NAME, NULL );
+ ok( hr == S_OK, "got %08x\n", hr );
+
+ hr = IAssemblyName_IsEqual( name1, name2, ASM_CMPF_IL_ALL );
+ ok( hr == S_OK, "got %08x\n", hr );
+
+ IAssemblyName_Release( name1 );
+ IAssemblyName_Release( name2 );
}
START_TEST(asmname)
@@ -902,4 +1012,5 @@
}
test_CreateAssemblyNameObject();
+ test_IAssemblyName_IsEqual();
}
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] Sat May 4 20:21:53 2013
@@ -16,10 +16,20 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <windows.h>
+#include <stdarg.h>
+
+#define WIN32_NO_STATUS
+#define _INC_WINDOWS
+#define COM_NO_WINDOWS_H
+
+//#include <windows.h>
+#include <windef.h>
+#include <winbase.h>
+#include <winnls.h>
+#include <objbase.h>
#include <fusion.h>
-#include "wine/test.h"
+#include <wine/test.h>
static HMODULE hmscoree;
@@ -29,14 +39,6 @@
LPVOID pvReserved, HMODULE *phModDll);
static HRESULT (WINAPI *pGetCORVersion)(LPWSTR pbuffer, DWORD cchBuffer,
DWORD *dwLength);
-
-static CHAR string1[MAX_PATH], string2[MAX_PATH];
-
-#define ok_w2(format, szString1, szString2) \
-\
- WideCharToMultiByte(CP_ACP, 0, szString1, -1, string1, MAX_PATH, NULL, NULL); \
- WideCharToMultiByte(CP_ACP, 0, szString2, -1, string2, MAX_PATH, NULL, NULL); \
- ok(!lstrcmpA(string1, string2), format, string1, string2)
static BOOL init_functionpointers(void)
{
@@ -127,14 +129,14 @@
lstrcpyW(path, nochange);
hr = pGetCachePath(ASM_CACHE_GAC, path, NULL);
ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr);
- ok_w2("Expected \"%s\", got \"%s\"\n", nochange,
path);
+ ok( !lstrcmpW( nochange, path ), "Expected %s, got %s\n",
wine_dbgstr_w(nochange), wine_dbgstr_w(path));
/* get the cache path */
lstrcpyW(path, nochange);
size = MAX_PATH;
hr = pGetCachePath(ASM_CACHE_GAC, path, &size);
ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
- ok_w2("Expected \"%s\", got \"%s\"\n", cachepath,
path);
+ 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, nochange);
@@ -142,7 +144,7 @@
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_w2("Expected \"%s\", got \"%s\"\n", nochange,
path);
+ ok( !lstrcmpW( nochange, path ), "Expected %s, got %s\n",
wine_dbgstr_w(nochange), wine_dbgstr_w(path));
lstrcpyW(cachepath, windir);
lstrcatW(cachepath, backslash);
@@ -156,7 +158,7 @@
broken(hr == E_INVALIDARG), /* .NET 1.1 */
"Expected S_OK, got %08x\n", hr);
if (hr == S_OK)
- ok_w2("Expected \"%s\", got \"%s\"\n", cachepath,
path);
+ ok( !lstrcmpW( cachepath, path ), "Expected %s, got %s\n",
wine_dbgstr_w(cachepath), wine_dbgstr_w(path));
if (pGetCORVersion)
{
@@ -191,7 +193,7 @@
size = MAX_PATH;
hr = pGetCachePath(ASM_CACHE_ZAP, path, &size);
ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
- ok_w2("Expected \"%s\", got \"%s\"\n", cachepath,
path);
+ ok( !lstrcmpW( cachepath, path ), "Expected %s, got %s\n",
wine_dbgstr_w(cachepath), wine_dbgstr_w(path));
}
/* two flags at once */
@@ -199,7 +201,7 @@
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_w2("Expected \"%s\", got \"%s\"\n", nochange,
path);
+ ok( !lstrcmpW( nochange, path ), "Expected %s, got %s\n",
wine_dbgstr_w(nochange), wine_dbgstr_w(path));
}
START_TEST(fusion)
Modified: trunk/rostests/winetests/fusion/testlist.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/fusion/testlist…
==============================================================================
--- trunk/rostests/winetests/fusion/testlist.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/fusion/testlist.c [iso-8859-1] Sat May 4 20:21:53 2013
@@ -1,10 +1,7 @@
/* Automatically generated file; DO NOT EDIT!! */
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-
#define STANDALONE
-#include "wine/test.h"
+#include <wine/test.h>
extern void func_fusion(void);
extern void func_asmname(void);