Re: New tests failing ...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Dienstag 21 Januar 2003 22:22 schrieb Alexandre Julliard:
> Stefan Leichter <Stefan.Leichter@camLine.com> writes:
> > The behavior that is check in the tests is not documented. Does fixing
> > the test mean in this case remove the test ? e.g. like this:
>
> Either that, or accept both outcomes without version check. So instead
> of doing:
>
>   if (version is win95) ok(foo);
>   else ok(bar);
>
> do:
>
>   ok( foo || bar );
>
> This way it doesn't force Wine to replicate the version checks.

Looks like i understood you now ;-)

ChangeLog
-------------
	removed windows version checks from GetPrinterDriverDirectory tests

--- ../wine/dlls/winspool/tests/info.c	Wed Jan 15 01:50:48 2003
+++ dlls/winspool/tests/info.c	Wed Jan 22 22:06:06 2003
@@ -26,13 +26,6 @@
 {   LPBYTE buffer = NULL;
     DWORD  cbBuf, pcbNeeded;
     BOOL   res;
-    OSVERSIONINFOA ver;
-
-    ver.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA);
-    if(!GetVersionExA( &ver)) {
-        ok( 0, "GetVersionExA failed!");
-        return ;
-    }
 
     (void) GetPrinterDriverDirectoryA( NULL, NULL, 1, NULL, 0, &cbBuf);
 
@@ -57,40 +50,28 @@
         GetLastError());
  
     res = GetPrinterDriverDirectoryA( NULL, NULL, 1, NULL, cbBuf, &pcbNeeded);
-    if(ver.dwPlatformId == VER_PLATFORM_WIN32_NT) {
-        ok( !res , "expected result == 0, got %d", res);
-        ok( ERROR_INVALID_USER_BUFFER == GetLastError(),
-            "last error set to %ld instead of ERROR_INVALID_USER_BUFFER",
-             GetLastError());
-    } else {
-        ok( res , "expected result != 0, got %d", res);
-        ok( ERROR_INVALID_PARAMETER == GetLastError(),
-            "last error set to %ld instead of ERROR_INVALID_PARAMETER",
-             GetLastError());
-    }
+    ok( (!res && ERROR_INVALID_USER_BUFFER == GetLastError()) || 
+        ( res && ERROR_INVALID_PARAMETER == GetLastError()) ,
+         "expected either result == 0 and "
+         "last error == ERROR_INVALID_USER_BUFFER "
+         "or result != 0 and last error == ERROR_INVALID_PARAMETER "
+         "got result %d and last error == %ld", res, GetLastError());
 
     res = GetPrinterDriverDirectoryA( NULL, NULL, 1, buffer, cbBuf, NULL);
-    if(ver.dwPlatformId == VER_PLATFORM_WIN32_NT) {
-        ok( !res , "expected result == 0, got %d", res);
-        ok( RPC_X_NULL_REF_POINTER == GetLastError(),
-            "last error set to %ld instead of RPC_X_NULL_REF_POINTER",
-            GetLastError());
-    } else {
-        ok( res , "expected result != 0, got %d", res);
-    }
+    ok( (!res && RPC_X_NULL_REF_POINTER == GetLastError()) || 
+        ( res && NO_ERROR == GetLastError()) ,
+         "expected either result == 0 and "
+         "last error == RPC_X_NULL_REF_POINTER "
+         "or result != 0 and last error == NO_ERROR "
+         "got result %d and last error == %ld", res, GetLastError());
 
     res = GetPrinterDriverDirectoryA( NULL, NULL, 1, NULL, cbBuf, NULL);
-    if(ver.dwPlatformId == VER_PLATFORM_WIN32_NT) {
-        ok( !res , "expected result == 0, got %d", res);
-        ok( RPC_X_NULL_REF_POINTER == GetLastError(),
-            "last error set to %ld instead of RPC_X_NULL_REF_POINTER",
-            GetLastError());
-    } else {
-        ok( res , "expected result != 0, got %d", res);
-        ok( ERROR_INVALID_PARAMETER == GetLastError(),
-            "last error set to %ld instead of ERROR_INVALID_PARAMETER",
-             GetLastError());
-    }
+    ok( (!res && RPC_X_NULL_REF_POINTER == GetLastError()) || 
+        ( res && ERROR_INVALID_PARAMETER == GetLastError()) ,
+         "expected either result == 0 and "
+         "last error == RPC_X_NULL_REF_POINTER "
+         "or result != 0 and last error == ERROR_INVALID_PARAMETER "
+         "got result %d and last error == %ld", res, GetLastError());
 
     HeapFree( GetProcessHeap(), 0, buffer);
 }


[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux