MSCMS/tests: be more strict and verbose
Saulius Krasuckas
saulius2 at ar.fi.lt
Wed Nov 23 06:29:01 CST 2005
I don't know why but I just feel the need to call SetLastError() before
every modified check. :-/
When the test will succeed on all windows, I am going to remove todo_wine.
Log message:
Saulius Krasuckas <saulius.krasuckas at ieee.org>
Be more strict and verbose while testing GetStandardColorSpaceProfile().
Index: dlls/mscms/tests/profile.c
===================================================================
RCS file: /home/wine/wine/dlls/mscms/tests/profile.c,v
retrieving revision 1.18
diff -p -u -r1.18 profile.c
--- dlls/mscms/tests/profile.c 18 Nov 2005 16:51:30 -0000 1.18
+++ dlls/mscms/tests/profile.c 23 Nov 2005 11:33:11 -0000
@@ -442,27 +442,43 @@ static void test_GetCountColorProfileEle
static void test_GetStandardColorSpaceProfileA(void)
{
BOOL ret;
- DWORD size;
+ DWORD size, GLE;
CHAR oldprofile[MAX_PATH];
CHAR newprofile[MAX_PATH];
/* Parameter checks */
+ SetLastError(0);
ret = pGetStandardColorSpaceProfileA( NULL, 0, newprofile, NULL );
- ok( !ret, "GetStandardColorSpaceProfileA() succeeded (%ld)\n", GetLastError() );
+ GLE = GetLastError();
+ todo_wine
+ ok( !ret && GLE == ERROR_INVALID_PARAMETER,
+ "GetStandardColorSpaceProfileA() returns %d (GLE=%ld)\n", ret, GLE );
+ SetLastError(0);
ret = pGetStandardColorSpaceProfileA( machine, 0, newprofile, &size );
- ok( !ret, "GetStandardColorSpaceProfileA() succeeded (%ld)\n", GetLastError() );
+ GLE = GetLastError();
+ todo_wine
+ ok( !ret && GLE == ERROR_INVALID_PARAMETER,
+ "GetStandardColorSpaceProfileA() returns %d (GLE=%ld)\n", ret, GLE );
size = 0;
+ SetLastError(0);
ret = pGetStandardColorSpaceProfileA( NULL, 0, NULL, &size );
- ok( !ret, "GetStandardColorSpaceProfileA() succeeded (%ld)\n", GetLastError() );
+ GLE = GetLastError();
+ todo_wine
+ ok( !ret && (GLE == ERROR_INSUFFICIENT_BUFFER || GLE == ERROR_FILE_NOT_FOUND),
+ "GetStandardColorSpaceProfileA() returns %d (GLE=%ld)\n", ret, GLE );
size = sizeof(newprofile);
+ SetLastError(0);
ret = pGetStandardColorSpaceProfileA( NULL, 0, newprofile, &size );
- ok( !ret, "GetStandardColorSpaceProfileA() succeeded (%ld)\n", GetLastError() );
+ GLE = GetLastError();
+ todo_wine
+ ok( !ret && GLE == ERROR_FILE_NOT_FOUND,
+ "GetStandardColorSpaceProfileA() returns %d (GLE=%ld)\n", ret, GLE );
/* Functional checks */
@@ -491,27 +507,43 @@ static void test_GetStandardColorSpacePr
static void test_GetStandardColorSpaceProfileW(void)
{
BOOL ret;
- DWORD size;
+ DWORD size, GLE;
WCHAR oldprofile[MAX_PATH];
WCHAR newprofile[MAX_PATH];
/* Parameter checks */
+ SetLastError(0);
ret = pGetStandardColorSpaceProfileW( NULL, 0, newprofile, NULL );
- ok( !ret, "GetStandardColorSpaceProfileW() succeeded (%ld)\n", GetLastError() );
+ GLE = GetLastError();
+ todo_wine
+ ok( !ret && GLE == ERROR_INVALID_PARAMETER,
+ "GetStandardColorSpaceProfileW() returns %d (GLE=%ld)\n", ret, GLE );
+ SetLastError(0);
ret = pGetStandardColorSpaceProfileW( machineW, 0, newprofile, &size );
- ok( !ret, "GetStandardColorSpaceProfileW() succeeded (%ld)\n", GetLastError() );
+ GLE = GetLastError();
+ todo_wine
+ ok( !ret && GLE == ERROR_INVALID_PARAMETER,
+ "GetStandardColorSpaceProfileW() returns %d (GLE=%ld)\n", ret, GLE );
size = 0;
+ SetLastError(0);
ret = pGetStandardColorSpaceProfileW( NULL, 0, NULL, &size );
- ok( !ret, "GetStandardColorSpaceProfileW() succeeded (%ld)\n", GetLastError() );
+ GLE = GetLastError();
+ todo_wine
+ ok( !ret && (GLE == ERROR_INSUFFICIENT_BUFFER || GLE == ERROR_FILE_NOT_FOUND),
+ "GetStandardColorSpaceProfileW() returns %d (GLE=%ld)\n", ret, GLE );
size = sizeof(newprofile);
+ SetLastError(0);
ret = pGetStandardColorSpaceProfileW( NULL, 0, newprofile, &size );
- ok( !ret, "GetStandardColorSpaceProfileW() succeeded (%ld)\n", GetLastError() );
+ GLE = GetLastError();
+ todo_wine
+ ok( !ret && GLE == ERROR_FILE_NOT_FOUND,
+ "GetStandardColorSpaceProfileW() returns %d (GLE=%ld)\n", ret, GLE );
/* Functional checks */
More information about the wine-patches
mailing list