Commit 61034406 authored by André Hentschel's avatar André Hentschel Committed by Alexandre Julliard

gdi32/tests: Add a second test about non-uniform ramps.

parent ed01c532
...@@ -761,11 +761,19 @@ static void test_gamma(void) ...@@ -761,11 +761,19 @@ static void test_gamma(void)
ret = SetDeviceGammaRamp(hdc, &ramp); ret = SetDeviceGammaRamp(hdc, &ramp);
ok(!ret, "SetDeviceGammaRamp succeeded\n"); ok(!ret, "SetDeviceGammaRamp succeeded\n");
/* try a ramp which is not uniform */ /* try ramps which are not uniform */
ramp[0][0] = 0; ramp[0][0] = 0;
for (i = 1; i < 256; i++) ramp[0][i] = ramp[0][i - 1] + 512; for (i = 1; i < 256; i++) ramp[0][i] = ramp[0][i - 1] + 512;
ret = SetDeviceGammaRamp(hdc, &ramp); ret = SetDeviceGammaRamp(hdc, &ramp);
ok(ret, "SetDeviceGammaRamp failed\n"); ok(ret, "SetDeviceGammaRamp failed\n");
ramp[0][0] = 0;
for (i = 2; i < 256; i+=2)
{
ramp[0][i - 1] = ramp[0][i - 2];
ramp[0][i] = ramp[0][i - 2] + 512;
}
ret = SetDeviceGammaRamp(hdc, &ramp);
ok(ret, "SetDeviceGammaRamp failed\n");
/* cleanup: set old ramp again */ /* cleanup: set old ramp again */
ret = SetDeviceGammaRamp(hdc, &oldramp); ret = SetDeviceGammaRamp(hdc, &oldramp);
......
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