mirror of
https://github.com/reactos/reactos.git
synced 2024-11-03 05:18:55 +00:00
1e4af3fa18
Fix (R)TEST macros in gdi32_apitest, ensures correct display and no crash report in testman. svn path=/trunk/; revision=49182
47 lines
1 KiB
C
47 lines
1 KiB
C
/*
|
|
* PROJECT: ReactOS api tests
|
|
* LICENSE: GPL - See COPYING in the top level directory
|
|
* PURPOSE: Test for SetSysColors
|
|
* PROGRAMMERS: Timo Kreuzer
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#include <wine/test.h>
|
|
#include <windows.h>
|
|
|
|
#define TEST(x) ok(x, #x"\n")
|
|
#define RTEST(x) ok(x, #x"\n")
|
|
|
|
#define NUM_SYSCOLORS 31
|
|
|
|
void Test_SetSysColors()
|
|
{
|
|
INT i;
|
|
INT nElements[NUM_SYSCOLORS];
|
|
COLORREF crOldColors[NUM_SYSCOLORS];
|
|
COLORREF crColors[3] = {RGB(212, 208, 200),2,3};
|
|
|
|
/* First save the Old colors */
|
|
for (i = 0; i < NUM_SYSCOLORS; i++)
|
|
{
|
|
nElements[i] = i;
|
|
crOldColors[i] = GetSysColor(i);
|
|
}
|
|
|
|
TEST((UINT)SetSysColors(0, nElements, crColors) == 1);
|
|
RTEST((UINT)SetSysColors(1, nElements, crColors) == 1);
|
|
RTEST((UINT)SetSysColors(2, nElements, crColors) == 1);
|
|
|
|
/* try more than NUM_SYSCOLORS */
|
|
RTEST((UINT)SetSysColors(55, nElements, crColors) == 1);
|
|
|
|
/* restore old SysColors */
|
|
SetSysColors(NUM_SYSCOLORS, nElements, crOldColors);
|
|
}
|
|
|
|
START_TEST(SetSysColors)
|
|
{
|
|
Test_SetSysColors();
|
|
}
|
|
|