Alexandre Julliard : kernel32/tests: Limit the number of failures in the ligatures test.
Alexandre Julliard
julliard at winehq.org
Tue Jun 10 06:28:09 CDT 2008
Module: wine
Branch: master
Commit: 5b0c326679d4a377b5beacca2962c93253737294
URL: http://source.winehq.org/git/wine.git/?a=commit;h=5b0c326679d4a377b5beacca2962c93253737294
Author: Alexandre Julliard <julliard at winehq.org>
Date: Tue Jun 10 11:55:01 2008 +0200
kernel32/tests: Limit the number of failures in the ligatures test.
---
dlls/kernel32/tests/locale.c | 17 +++++++++++++----
1 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c
index 0c10bb4..c234921 100644
--- a/dlls/kernel32/tests/locale.c
+++ b/dlls/kernel32/tests/locale.c
@@ -1954,7 +1954,7 @@ static void test_FoldStringW(void)
EXPECT_LEN(sizeof(ligatures_dst)/sizeof(ligatures_dst[0])); EXPECT_VALID;
ok(!memcmp(dst, ligatures_dst, sizeof(ligatures_dst)),
"MAP_EXPAND_LIGATURES: Expanded incorrectly\n");
- for (i = 1; i <= 0xffff; i++)
+ for (i = 1, failures = 0; i <= 0xffff; i++)
{
if (!strchrW(ligatures_src, i))
{
@@ -1963,9 +1963,18 @@ static void test_FoldStringW(void)
SetLastError(0);
ret = pFoldStringW(MAP_EXPAND_LIGATURES, src, -1, dst, 256);
EXPECT_LEN(2); EXPECT_VALID;
- ok(dst[0] == src[0],
- "MAP_EXPAND_LIGATURES: 0x%02x : Expected 0x%02x, got 0x%02x\n",
- i, src[0], dst[0]);
+ if (ret == 3)
+ ok(0, "MAP_EXPAND_LIGATURES: %04x : Expected %04x, got %04x %04x\n",
+ i, src[0], dst[0], dst[1]);
+ else
+ ok(dst[0] == src[0],
+ "MAP_EXPAND_LIGATURES: %04x : Expected %04x, got %04x\n",
+ i, src[0], dst[0]);
+ if (dst[0] != src[0] && ++failures > 50)
+ {
+ trace( "MAP_EXPAND_LIGATURES: Too many failures, giving up\n" );
+ break;
+ }
}
}
}
More information about the wine-cvs
mailing list