Commit 46fb9265 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

mscms/tests: Mark some win98 test results as broken.

parent 43883564
...@@ -459,39 +459,42 @@ static void test_GetStandardColorSpaceProfileA(void) ...@@ -459,39 +459,42 @@ static void test_GetStandardColorSpaceProfileA(void)
DWORD size; DWORD size;
CHAR oldprofile[MAX_PATH]; CHAR oldprofile[MAX_PATH];
CHAR newprofile[MAX_PATH]; CHAR newprofile[MAX_PATH];
const CHAR emptyA[] = "";
DWORD zero = 0;
DWORD sizeP = sizeof(newprofile);
/* Parameter checks */ /* Parameter checks */
/* Single invalid parameter checks: */ /* Single invalid parameter checks: */
size = sizeof(newprofile);
SetLastError(0xfaceabee); /* 1st param, */ SetLastError(0xfaceabee); /* 1st param, */
ret = pGetStandardColorSpaceProfileA(machine, LCS_sRGB, newprofile, &sizeP); ret = pGetStandardColorSpaceProfileA(machine, LCS_sRGB, newprofile, &size);
ok( !ret && GetLastError() == ERROR_NOT_SUPPORTED, "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() ); ok( !ret && GetLastError() == ERROR_NOT_SUPPORTED, "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() );
size = sizeof(newprofile);
SetLastError(0xfaceabee); /* 2nd param, */ SetLastError(0xfaceabee); /* 2nd param, */
ret = pGetStandardColorSpaceProfileA(NULL, (DWORD)-1, newprofile, &sizeP); ret = pGetStandardColorSpaceProfileA(NULL, (DWORD)-1, newprofile, &size);
ok( !ret && GetLastError() == ERROR_FILE_NOT_FOUND, "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() ); ok( !ret && GetLastError() == ERROR_FILE_NOT_FOUND, "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() );
size = sizeof(newprofile);
SetLastError(0xfaceabee); /* 4th param, */ SetLastError(0xfaceabee); /* 4th param, */
ret = pGetStandardColorSpaceProfileA(NULL, LCS_sRGB, newprofile, NULL); ret = pGetStandardColorSpaceProfileA(NULL, LCS_sRGB, newprofile, NULL);
ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() ); ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() );
size = sizeof(newprofile);
SetLastError(0xfaceabee); /* 3rd param, */ SetLastError(0xfaceabee); /* 3rd param, */
ret = pGetStandardColorSpaceProfileA(NULL, LCS_sRGB, NULL, &sizeP); ret = pGetStandardColorSpaceProfileA(NULL, LCS_sRGB, NULL, &size);
ok( !ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() ); ok( !ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() );
size = 0;
SetLastError(0xfaceabee); /* dereferenced 4th param, */ SetLastError(0xfaceabee); /* dereferenced 4th param, */
ret = pGetStandardColorSpaceProfileA(NULL, LCS_sRGB, newprofile, &zero); ret = pGetStandardColorSpaceProfileA(NULL, LCS_sRGB, newprofile, &size);
ok( !ret && (GetLastError() == ERROR_MORE_DATA || GetLastError() == ERROR_INSUFFICIENT_BUFFER), ok( !ret && (GetLastError() == ERROR_MORE_DATA || GetLastError() == ERROR_INSUFFICIENT_BUFFER),
"GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() ); "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() );
/* Several invalid parameter checks: */ /* Several invalid parameter checks: */
size = 0;
SetLastError(0xfaceabee); /* 1st, maybe 2nd and then dereferenced 4th param, */ SetLastError(0xfaceabee); /* 1st, maybe 2nd and then dereferenced 4th param, */
ret = pGetStandardColorSpaceProfileA(machine, 0, newprofile, &zero); ret = pGetStandardColorSpaceProfileA(machine, 0, newprofile, &size);
ok( !ret && (GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_NOT_SUPPORTED), ok( !ret && (GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_NOT_SUPPORTED),
"GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() ); "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() );
...@@ -499,15 +502,17 @@ static void test_GetStandardColorSpaceProfileA(void) ...@@ -499,15 +502,17 @@ static void test_GetStandardColorSpaceProfileA(void)
ret = pGetStandardColorSpaceProfileA(NULL, 0, newprofile, NULL); ret = pGetStandardColorSpaceProfileA(NULL, 0, newprofile, NULL);
ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() ); ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() );
size = 0;
SetLastError(0xfaceabee); /* maybe 2nd, then 3rd and dereferenced 4th param, */ SetLastError(0xfaceabee); /* maybe 2nd, then 3rd and dereferenced 4th param, */
ret = pGetStandardColorSpaceProfileA(NULL, 0, NULL, &zero); ret = pGetStandardColorSpaceProfileA(NULL, 0, NULL, &size);
ok( !ret && (GetLastError() == ERROR_INSUFFICIENT_BUFFER || GetLastError() == ERROR_FILE_NOT_FOUND), ok( !ret && (GetLastError() == ERROR_INSUFFICIENT_BUFFER || GetLastError() == ERROR_FILE_NOT_FOUND),
"GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() ); "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() );
size = sizeof(newprofile);
SetLastError(0xfaceabee); /* maybe 2nd param. */ SetLastError(0xfaceabee); /* maybe 2nd param. */
ret = pGetStandardColorSpaceProfileA(NULL, 0, newprofile, &sizeP); ret = pGetStandardColorSpaceProfileA(NULL, 0, newprofile, &size);
if (!ret) ok( GetLastError() == ERROR_FILE_NOT_FOUND, "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() ); if (!ret) ok( GetLastError() == ERROR_FILE_NOT_FOUND, "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() );
else ok( !lstrcmpiA( newprofile, emptyA ) && GetLastError() == 0xfaceabee, else ok( !lstrcmpiA( newprofile, "" ) && GetLastError() == 0xfaceabee,
"GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() ); "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() );
/* Functional checks */ /* Functional checks */
...@@ -540,45 +545,55 @@ static void test_GetStandardColorSpaceProfileW(void) ...@@ -540,45 +545,55 @@ static void test_GetStandardColorSpaceProfileW(void)
WCHAR oldprofile[MAX_PATH]; WCHAR oldprofile[MAX_PATH];
WCHAR newprofile[MAX_PATH]; WCHAR newprofile[MAX_PATH];
CHAR newprofileA[MAX_PATH]; CHAR newprofileA[MAX_PATH];
const CHAR empty[] = "";
DWORD zero = 0;
DWORD sizeP = sizeof(newprofile);
/* Parameter checks */ /* Parameter checks */
/* Single invalid parameter checks: */ /* Single invalid parameter checks: */
size = sizeof(newprofile);
SetLastError(0xfaceabee); /* 1st param, */ SetLastError(0xfaceabee); /* 1st param, */
ret = pGetStandardColorSpaceProfileW(machineW, LCS_sRGB, newprofile, &sizeP); ret = pGetStandardColorSpaceProfileW(machineW, LCS_sRGB, newprofile, &size);
ok( !ret && GetLastError() == ERROR_NOT_SUPPORTED, "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() ); ok( !ret && GetLastError() == ERROR_NOT_SUPPORTED, "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() );
size = sizeof(newprofile);
SetLastError(0xfaceabee); /* 2nd param, */ SetLastError(0xfaceabee); /* 2nd param, */
ret = pGetStandardColorSpaceProfileW(NULL, (DWORD)-1, newprofile, &sizeP); ret = pGetStandardColorSpaceProfileW(NULL, (DWORD)-1, newprofile, &size);
ok( !ret && GetLastError() == ERROR_FILE_NOT_FOUND, "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() ); ok( !ret && GetLastError() == ERROR_FILE_NOT_FOUND, "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() );
size = sizeof(newprofile);
SetLastError(0xfaceabee); /* 2nd param, */ SetLastError(0xfaceabee); /* 2nd param, */
ret = pGetStandardColorSpaceProfileW(NULL, 0, newprofile, &sizeP); ret = pGetStandardColorSpaceProfileW(NULL, 0, newprofile, &size);
ok( (!ret && GetLastError() == ERROR_FILE_NOT_FOUND) || ok( (!ret && GetLastError() == ERROR_FILE_NOT_FOUND) ||
broken(ret), /* Win98 and WinME */ broken(ret), /* Win98 and WinME */
"GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() ); "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() );
size = sizeof(newprofile);
SetLastError(0xfaceabee); /* 3rd param, */ SetLastError(0xfaceabee); /* 3rd param, */
ret = pGetStandardColorSpaceProfileW(NULL, LCS_sRGB, NULL, &sizeP); ret = pGetStandardColorSpaceProfileW(NULL, LCS_sRGB, NULL, &size);
ok( !ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() ); ok( !ret || broken(ret) /* win98 */, "GetStandardColorSpaceProfileW succeeded\n" );
ok( GetLastError() == ERROR_INSUFFICIENT_BUFFER ||
broken(GetLastError() == 0xfaceabee) /* win98 */,
"GetStandardColorSpaceProfileW() returns GLE=%u\n", GetLastError() );
size = sizeof(newprofile);
SetLastError(0xfaceabee); /* 4th param, */ SetLastError(0xfaceabee); /* 4th param, */
ret = pGetStandardColorSpaceProfileW(NULL, LCS_sRGB, newprofile, NULL); ret = pGetStandardColorSpaceProfileW(NULL, LCS_sRGB, newprofile, NULL);
ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() ); ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() );
size = 0;
SetLastError(0xfaceabee); /* dereferenced 4th param. */ SetLastError(0xfaceabee); /* dereferenced 4th param. */
ret = pGetStandardColorSpaceProfileW(NULL, LCS_sRGB, newprofile, &zero); ret = pGetStandardColorSpaceProfileW(NULL, LCS_sRGB, newprofile, &size);
ok( !ret && (GetLastError() == ERROR_MORE_DATA || GetLastError() == ERROR_INSUFFICIENT_BUFFER), ok( !ret || broken(ret) /* win98 */, "GetStandardColorSpaceProfileW succeeded\n" );
"GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() ); ok( GetLastError() == ERROR_MORE_DATA ||
GetLastError() == ERROR_INSUFFICIENT_BUFFER ||
broken(GetLastError() == 0xfaceabee) /* win98 */,
"GetStandardColorSpaceProfileW() returns GLE=%u\n", GetLastError() );
/* Several invalid parameter checks: */ /* Several invalid parameter checks: */
size = 0;
SetLastError(0xfaceabee); /* 1st, maybe 2nd and then dereferenced 4th param, */ SetLastError(0xfaceabee); /* 1st, maybe 2nd and then dereferenced 4th param, */
ret = pGetStandardColorSpaceProfileW(machineW, 0, newprofile, &zero); ret = pGetStandardColorSpaceProfileW(machineW, 0, newprofile, &size);
ok( !ret && (GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_NOT_SUPPORTED), ok( !ret && (GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_NOT_SUPPORTED),
"GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() ); "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() );
...@@ -586,18 +601,23 @@ static void test_GetStandardColorSpaceProfileW(void) ...@@ -586,18 +601,23 @@ static void test_GetStandardColorSpaceProfileW(void)
ret = pGetStandardColorSpaceProfileW(NULL, 0, newprofile, NULL); ret = pGetStandardColorSpaceProfileW(NULL, 0, newprofile, NULL);
ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() ); ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() );
size = 0;
SetLastError(0xfaceabee); /* maybe 2nd, then 3rd and dereferenced 4th param, */ SetLastError(0xfaceabee); /* maybe 2nd, then 3rd and dereferenced 4th param, */
ret = pGetStandardColorSpaceProfileW(NULL, 0, NULL, &zero); ret = pGetStandardColorSpaceProfileW(NULL, 0, NULL, &size);
ok( !ret && (GetLastError() == ERROR_INSUFFICIENT_BUFFER || GetLastError() == ERROR_FILE_NOT_FOUND), ok( !ret || broken(ret) /* win98 */, "GetStandardColorSpaceProfileW succeeded\n" );
"GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() ); ok( GetLastError() == ERROR_INSUFFICIENT_BUFFER ||
GetLastError() == ERROR_FILE_NOT_FOUND ||
broken(GetLastError() == 0xfaceabee) /* win98 */,
"GetStandardColorSpaceProfileW() returns GLE=%u\n", GetLastError() );
size = sizeof(newprofile);
SetLastError(0xfaceabee); /* maybe 2nd param. */ SetLastError(0xfaceabee); /* maybe 2nd param. */
ret = pGetStandardColorSpaceProfileW(NULL, 0, newprofile, &sizeP); ret = pGetStandardColorSpaceProfileW(NULL, 0, newprofile, &size);
if (!ret) ok( GetLastError() == ERROR_FILE_NOT_FOUND, "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() ); if (!ret) ok( GetLastError() == ERROR_FILE_NOT_FOUND, "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() );
else else
{ {
WideCharToMultiByte(CP_ACP, 0, newprofile, -1, newprofileA, sizeof(newprofileA), NULL, NULL); WideCharToMultiByte(CP_ACP, 0, newprofile, -1, newprofileA, sizeof(newprofileA), NULL, NULL);
ok( !lstrcmpiA( newprofileA, empty ) && GetLastError() == 0xfaceabee, ok( !lstrcmpiA( newprofileA, "" ) && GetLastError() == 0xfaceabee,
"GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() ); "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment