mscms: Null-ID can make GetStandardColorSpaceProfile*() succeed
Saulius Krasuckas
saulius2 at ar.fi.lt
Wed Jan 11 15:44:32 CST 2006
Some tests fails on 9x. [*]
Here I se two ways of making tests succeed. Adding new parameter to the
existing macro or defining new macro. The later seems for me more elegant
as it doesn't require rewriting all existing call to macro.
[*] http://test.winehq.org/data/200601101000/98_FerrerOrtizJoseM/mscms:profile.txt
Log message:
Saulius Krasuckas <saulius.krasuckas at gmail.com>
mscms: Null-ID makes GetStandardColorSpaceProfile*() succeed on 9x
and gets an empty filename.
Index: dlls/mscms/tests/profile.c
===================================================================
RCS file: /home/wine/wine/dlls/mscms/tests/profile.c,v
retrieving revision 1.25
diff -p -u -r1.25 profile.c
--- dlls/mscms/tests/profile.c 11 Jan 2006 11:37:12 -0000 1.25
+++ dlls/mscms/tests/profile.c 11 Jan 2006 20:43:24 -0000
@@ -502,6 +502,16 @@ do {
"GetStandardColorSpaceProfileA() returns %d (GLE=%ld)\n", ret, GLE ); \
} while (0)
+#define test_GSCSPA(pMachName, dwProfID, pProfName, pdwSz, dwSz, GLE_OK) \
+do { \
+ size = dwSz; \
+ SetLastError(0); \
+ ret = pGetStandardColorSpaceProfileA(pMachName, dwProfID, pProfName, pdwSz);\
+ GLE = GetLastError(); \
+ ok( (!ret && GLE_OK) || (ret && !lstrcmpiA( pProfName, "" )), \
+ "GetStandardColorSpaceProfileA() returns %d (GLE=%ld)\n", ret, GLE ); \
+} while (0)
+
static void test_GetStandardColorSpaceProfileA(void)
{
BOOL ret;
@@ -533,7 +543,7 @@ static void test_GetStandardColorSpacePr
todo_wine
fail_GSCSPA(NULL, 0, NULL, &size, 0, (GLE == ERROR_INSUFFICIENT_BUFFER || GLE == ERROR_FILE_NOT_FOUND));
todo_wine
- fail_GSCSPA(NULL, 0, newprofile, &size, sizeP, (GLE == ERROR_FILE_NOT_FOUND));
+ test_GSCSPA(NULL, 0, newprofile, &size, sizeP, (GLE == ERROR_FILE_NOT_FOUND));
/* Functional checks */
@@ -569,12 +579,23 @@ do {
"GetStandardColorSpaceProfileW() returns %d (GLE=%ld)\n", ret, GLE ); \
} while (0)
+#define test_GSCSPW(pMachName, dwProfID, pProfName, pdwSz, dwSz, GLE_OK) \
+do { \
+ size = dwSz; \
+ SetLastError(0); \
+ ret = pGetStandardColorSpaceProfileW(pMachName, dwProfID, pProfName, pdwSz);\
+ GLE = GetLastError(); \
+ ok( (!ret && GLE_OK) || (ret && !lstrcmpiW( pProfName, emptyW )), \
+ "GetStandardColorSpaceProfileA() returns %d (GLE=%ld)\n", ret, GLE ); \
+} while (0)
+
static void test_GetStandardColorSpaceProfileW(void)
{
BOOL ret;
DWORD size, sizeP, GLE;
WCHAR oldprofile[MAX_PATH];
WCHAR newprofile[MAX_PATH];
+ WCHAR emptyW[] = {0};
sizeP = sizeof(newprofile);
@@ -600,7 +621,7 @@ static void test_GetStandardColorSpacePr
todo_wine
fail_GSCSPW(NULL, 0, NULL, &size, 0, (GLE == ERROR_INSUFFICIENT_BUFFER || GLE == ERROR_FILE_NOT_FOUND));
todo_wine
- fail_GSCSPW(NULL, 0, newprofile, &size, sizeP, (GLE == ERROR_FILE_NOT_FOUND));
+ test_GSCSPW(NULL, 0, newprofile, &size, sizeP, (GLE == ERROR_FILE_NOT_FOUND));
/* Functional checks */
More information about the wine-patches
mailing list