kernel32/tests: Fix tests on some broken Windows versions.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2020-08-20 23:46:26 +02:00 committed by Alexandre Julliard
parent 5b3842451b
commit 7531091f33
1 changed files with 3 additions and 3 deletions

View File

@ -2255,9 +2255,9 @@ static void check_region_(unsigned int line, const SMALL_RECT *region, unsigned
else else
ok_(__FILE__,line)(region->Right == -right || region->Right == region->Left - 1, ok_(__FILE__,line)(region->Right == -right || region->Right == region->Left - 1,
"Right = %u, expected %d\n", region->Right, right); "Right = %u, expected %d\n", region->Right, right);
if (bottom >= 0) if (bottom > 0)
ok_(__FILE__,line)(region->Bottom == bottom, "Bottom = %u, expected %u\n", region->Bottom, bottom); ok_(__FILE__,line)(region->Bottom == bottom, "Bottom = %u, expected %u\n", region->Bottom, bottom);
else else if (bottom < 0)
ok_(__FILE__,line)(region->Bottom == -bottom || region->Bottom == region->Top - 1, ok_(__FILE__,line)(region->Bottom == -bottom || region->Bottom == region->Top - 1,
"Bottom = %u, expected %d\n", region->Bottom, bottom); "Bottom = %u, expected %d\n", region->Bottom, bottom);
} }
@ -2862,7 +2862,7 @@ static void test_ReadConsoleOutput(HANDLE console)
set_region(&region, 200, 7, 15, 211); set_region(&region, 200, 7, 15, 211);
ret = ReadConsoleOutputW(console, char_info_buf, size, coord, &region); ret = ReadConsoleOutputW(console, char_info_buf, size, coord, &region);
ok(!ret, "ReadConsoleOutputW returned: %x(%u)\n", ret, GetLastError()); ok(!ret, "ReadConsoleOutputW returned: %x(%u)\n", ret, GetLastError());
check_region(&region, 200, 7, -15, -211); check_region(&region, 200, 7, -15, 0);
size.X = 23; size.X = 23;
size.Y = 17; size.Y = 17;