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

Alexandre Julliard julliard at winehq.org
Fri Aug 21 16:43:26 CDT 2020


Module: wine
Branch: master
Commit: 7531091f33dcd0dc849cfb5df918e9a331f7a6b8
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=7531091f33dcd0dc849cfb5df918e9a331f7a6b8

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Thu Aug 20 23:46:26 2020 +0200

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

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/kernel32/tests/console.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/kernel32/tests/console.c b/dlls/kernel32/tests/console.c
index 3a374c7797..e6c88e8c73 100644
--- a/dlls/kernel32/tests/console.c
+++ b/dlls/kernel32/tests/console.c
@@ -2255,9 +2255,9 @@ static void check_region_(unsigned int line, const SMALL_RECT *region, unsigned
     else
         ok_(__FILE__,line)(region->Right == -right || region->Right == region->Left - 1,
                            "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);
-    else
+    else if (bottom < 0)
         ok_(__FILE__,line)(region->Bottom == -bottom || region->Bottom == region->Top - 1,
                            "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);
     ret = ReadConsoleOutputW(console, char_info_buf, size, coord, &region);
     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.Y = 17;




More information about the wine-cvs mailing list