Saulius Krasuckas : mscms: Null ID can make
GetStandardColorSpaceProfile*() succeed.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Jan 12 06:43:00 CST 2006
Module: wine
Branch: refs/heads/master
Commit: 6aa3d8a443bd4fc652def2711a9700c1bf0c7435
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=6aa3d8a443bd4fc652def2711a9700c1bf0c7435
Author: Saulius Krasuckas <saulius2 at ar.fi.lt>
Date: Thu Jan 12 11:53:12 2006 +0100
mscms: Null ID can make GetStandardColorSpaceProfile*() succeed.
---
dlls/mscms/tests/profile.c | 25 +++++++++++++++++++++++--
1 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/dlls/mscms/tests/profile.c b/dlls/mscms/tests/profile.c
index 830d6fb..8ac6200 100644
--- a/dlls/mscms/tests/profile.c
+++ b/dlls/mscms/tests/profile.c
@@ -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-cvs
mailing list