[ros-diffs] [cwittich] 44697: partial ntdll_winetest sync to wine 1.1.35

cwittich at svn.reactos.org cwittich at svn.reactos.org
Tue Dec 22 10:57:34 CET 2009


Author: cwittich
Date: Tue Dec 22 10:57:33 2009
New Revision: 44697

URL: http://svn.reactos.org/svn/reactos?rev=44697&view=rev
Log:
partial ntdll_winetest sync to wine 1.1.35

Modified:
    trunk/rostests/winetests/ntdll/om.c
    trunk/rostests/winetests/ntdll/rtlbitmap.c
    trunk/rostests/winetests/ntdll/rtlstr.c

Modified: trunk/rostests/winetests/ntdll/om.c
URL: http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ntdll/om.c?rev=44697&r1=44696&r2=44697&view=diff
==============================================================================
--- trunk/rostests/winetests/ntdll/om.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/ntdll/om.c [iso-8859-1] Tue Dec 22 10:57:33 2009
@@ -63,8 +63,8 @@
     ok(status == STATUS_SUCCESS, "Failed to create Mutant(%08x)\n", status);
 
     status = pNtCreateEvent(&Event, GENERIC_ALL, &attr, FALSE, FALSE);
-    ok(status == STATUS_OBJECT_NAME_COLLISION,
-        "NtCreateEvent should have failed with STATUS_OBJECT_NAME_COLLISION got(%08x)\n", status);
+    ok(status == STATUS_OBJECT_NAME_COLLISION || status == STATUS_OBJECT_TYPE_MISMATCH,
+        "NtCreateEvent should have failed with STATUS_OBJECT_NAME_COLLISION or STATUS_OBJECT_TYPE_MISMATCH got (%08x)\n", status);
 
     pRtlInitUnicodeString(&str, buffer2);
     InitializeObjectAttributes(&attr, &str, 0, 0, NULL);
@@ -82,8 +82,8 @@
     pRtlInitUnicodeString(&str, buffer4);
     InitializeObjectAttributes(&attr, &str, OBJ_CASE_INSENSITIVE, 0, NULL);
     status = pNtCreateMutant(&Mutant, GENERIC_ALL, &attr, FALSE);
-    ok(status == STATUS_OBJECT_NAME_COLLISION,
-        "NtCreateMutant should have failed with STATUS_OBJECT_NAME_COLLISION got(%08x)\n", status);
+    ok(status == STATUS_OBJECT_NAME_COLLISION || status == STATUS_OBJECT_TYPE_MISMATCH,
+        "NtCreateMutant should have failed with STATUS_OBJECT_NAME_COLLISION or STATUS_OBJECT_TYPE_MISMATCH got (%08x)\n", status);
 
     status = pNtCreateEvent(&h, GENERIC_ALL, &attr, FALSE, FALSE);
     ok(status == STATUS_OBJECT_NAME_COLLISION,

Modified: trunk/rostests/winetests/ntdll/rtlbitmap.c
URL: http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ntdll/rtlbitmap.c?rev=44697&r1=44696&r2=44697&view=diff
==============================================================================
--- trunk/rostests/winetests/ntdll/rtlbitmap.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/ntdll/rtlbitmap.c [iso-8859-1] Tue Dec 22 10:57:33 2009
@@ -413,7 +413,7 @@
 static void test_RtlFindMostSignificantBit(void)
 {
   int i;
-  CCHAR cPos;
+  signed char cPos;
   ULONGLONG ulLong;
 
   if (!pRtlFindMostSignificantBit)
@@ -442,7 +442,7 @@
 static void test_RtlFindLeastSignificantBit(void)
 {
   int i;
-  CCHAR cPos;
+  signed char cPos;
   ULONGLONG ulLong;
 
   if (!pRtlFindLeastSignificantBit)

Modified: trunk/rostests/winetests/ntdll/rtlstr.c
URL: http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ntdll/rtlstr.c?rev=44697&r1=44696&r2=44697&view=diff
==============================================================================
--- trunk/rostests/winetests/ntdll/rtlstr.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/ntdll/rtlstr.c [iso-8859-1] Tue Dec 22 10:57:33 2009
@@ -46,6 +46,7 @@
 static BOOLEAN  (WINAPI *pRtlEqualUnicodeString)(const UNICODE_STRING *, const UNICODE_STRING *, BOOLEAN);
 static NTSTATUS (WINAPI *pRtlFindCharInUnicodeString)(int, const UNICODE_STRING *, const UNICODE_STRING *, USHORT *);
 static VOID     (WINAPI *pRtlFreeAnsiString)(PSTRING);
+static VOID     (WINAPI *pRtlFreeUnicodeString)(PUNICODE_STRING);
 static VOID     (WINAPI *pRtlInitAnsiString)(PSTRING, LPCSTR);
 static VOID     (WINAPI *pRtlInitString)(PSTRING, LPCSTR);
 static VOID     (WINAPI *pRtlInitUnicodeString)(PUNICODE_STRING, LPCWSTR);
@@ -65,7 +66,6 @@
 static BOOLEAN (WINAPI *pRtlIsTextUnicode)(LPVOID, INT, INT *);
 
 /*static VOID (WINAPI *pRtlFreeOemString)(PSTRING);*/
-/*static VOID (WINAPI *pRtlFreeUnicodeString)(PUNICODE_STRING);*/
 /*static VOID (WINAPI *pRtlCopyUnicodeString)(UNICODE_STRING *, const UNICODE_STRING *);*/
 /*static VOID (WINAPI *pRtlEraseUnicodeString)(UNICODE_STRING *);*/
 /*static LONG (WINAPI *pRtlCompareString)(const STRING *,const STRING *,BOOLEAN);*/
@@ -114,6 +114,7 @@
 	pRtlEqualUnicodeString = (void *)GetProcAddress(hntdll, "RtlEqualUnicodeString");
 	pRtlFindCharInUnicodeString = (void *)GetProcAddress(hntdll, "RtlFindCharInUnicodeString");
 	pRtlFreeAnsiString = (void *)GetProcAddress(hntdll, "RtlFreeAnsiString");
+	pRtlFreeUnicodeString = (void *)GetProcAddress(hntdll, "RtlFreeUnicodeString");
 	pRtlInitAnsiString = (void *)GetProcAddress(hntdll, "RtlInitAnsiString");
 	pRtlInitString = (void *)GetProcAddress(hntdll, "RtlInitString");
 	pRtlInitUnicodeString = (void *)GetProcAddress(hntdll, "RtlInitUnicodeString");
@@ -467,6 +468,7 @@
 	    ok(memcmp(dest_str.Buffer, res_str.Buffer, dupl_ustr[test_num].res_buf_size) == 0,
 	       "(test %d): RtlDuplicateUnicodeString(%d, source, dest) has destination \"%s\" expected \"%s\"\n",
 	       test_num, dupl_ustr[test_num].add_nul, dest_ansi_str.Buffer, dupl_ustr[test_num].res_buf);
+            if(result == STATUS_SUCCESS) pRtlFreeUnicodeString(&dest_str);
         } else {
 	    ok(dest_str.Buffer == NULL && dupl_ustr[test_num].res_buf == NULL,
 	       "(test %d): RtlDuplicateUnicodeString(%d, source, dest) has destination %p expected %p\n",
@@ -794,6 +796,8 @@
 	ok(memcmp(ansi_str.Buffer, ustr2astr[test_num].res_buf, ustr2astr[test_num].res_buf_size) == 0,
 	   "(test %d): RtlUnicodeStringToAnsiString(ansi, uni, %d) has ansi \"%s\" expected \"%s\"\n",
 	   test_num, ustr2astr[test_num].doalloc, ansi_str.Buffer, ustr2astr[test_num].res_buf);
+        if(result == STATUS_SUCCESS && ustr2astr[test_num].doalloc)
+            pRtlFreeAnsiString(&ansi_str);
     }
 }
 
@@ -1850,6 +1854,7 @@
   ret = pRtlStringFromGUID(&IID_Endianess, &str);
   ok(ret == 0, "expected ret=0, got 0x%0x\n", ret);
   ok(str.Buffer && !lstrcmpiW(str.Buffer, szGuid), "Endianess broken\n");
+  pRtlFreeUnicodeString(&str);
 }
 
 START_TEST(rtlstr)




More information about the Ros-diffs mailing list