Signed-off-by: Francois Gouget fgouget@codeweavers.com --- I guess one could also assume that getting a single "expected 1 got 0" means only the test with the lower bound failed. So it's probably a matter of taste but I personally prefer traces to be unambiguous. --- dlls/user32/tests/edit.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-)
diff --git a/dlls/user32/tests/edit.c b/dlls/user32/tests/edit.c index 1607e9d84d9..1e5ed8dbfa0 100644 --- a/dlls/user32/tests/edit.c +++ b/dlls/user32/tests/edit.c @@ -1154,11 +1154,11 @@ static void test_char_from_pos(void)
for (i = lo; i < mid; i++) { ret = LOWORD(SendMessageA(hwEdit, EM_CHARFROMPOS, 0, i)); - ok(0 == ret, "expected 0 got %d\n", ret); + ok(0 == ret, "%d/%d/%d: expected 0 got %d\n", lo, i, mid, ret); } for (i = mid; i <= hi; i++) { ret = LOWORD(SendMessageA(hwEdit, EM_CHARFROMPOS, 0, i)); - ok(1 == ret, "expected 1 got %d\n", ret); + ok(1 == ret, "%d/%d/%d: expected 1 got %d\n", mid, i, hi, ret); } ret = SendMessageA(hwEdit, EM_POSFROMCHAR, 2, 0); ok(-1 == ret, "expected -1 got %d\n", ret); @@ -1172,11 +1172,11 @@ static void test_char_from_pos(void)
for (i = lo; i < mid; i++) { ret = LOWORD(SendMessageA(hwEdit, EM_CHARFROMPOS, 0, i)); - ok(0 == ret, "expected 0 got %d\n", ret); + ok(0 == ret, "%d/%d/%d: expected 0 got %d\n", lo, i, mid, ret); } for (i = mid; i <= hi; i++) { ret = LOWORD(SendMessageA(hwEdit, EM_CHARFROMPOS, 0, i)); - ok(1 == ret, "expected 1 got %d\n", ret); + ok(1 == ret, "%d/%d/%d: expected 1 got %d\n", mid, i, hi, ret); } ret = SendMessageA(hwEdit, EM_POSFROMCHAR, 2, 0); ok(-1 == ret, "expected -1 got %d\n", ret); @@ -1190,11 +1190,11 @@ static void test_char_from_pos(void)
for (i = lo; i < mid; i++) { ret = LOWORD(SendMessageA(hwEdit, EM_CHARFROMPOS, 0, i)); - ok(0 == ret, "expected 0 got %d\n", ret); + ok(0 == ret, "%d/%d/%d: expected 0 got %d\n", lo, i, mid, ret); } for (i = mid; i <= hi; i++) { ret = LOWORD(SendMessageA(hwEdit, EM_CHARFROMPOS, 0, i)); - ok(1 == ret, "expected 1 got %d\n", ret); + ok(1 == ret, "%d/%d/%d: expected 1 got %d\n", mid, i, hi, ret); } ret = SendMessageA(hwEdit, EM_POSFROMCHAR, 2, 0); ok(-1 == ret, "expected -1 got %d\n", ret); @@ -1208,11 +1208,12 @@ static void test_char_from_pos(void)
for (i = lo; i < mid; i++) { ret = LOWORD(SendMessageA(hwEdit, EM_CHARFROMPOS, 0, i)); - ok((0 == ret || 1 == ret /* Vista */), "expected 0 or 1 got %d\n", ret); + ok(0 == ret || 1 == ret /* Vista */, + "%d/%d/%d: expected 0 or 1 got %d\n", lo, i, mid, ret); } for (i = mid; i <= hi; i++) { ret = LOWORD(SendMessageA(hwEdit, EM_CHARFROMPOS, 0, i)); - ok(1 == ret, "expected 1 got %d\n", ret); + ok(1 == ret, "%d/%d/%d: expected 1 got %d\n", mid, i, hi, ret); } ret = SendMessageA(hwEdit, EM_POSFROMCHAR, 2, 0); ok(-1 == ret, "expected -1 got %d\n", ret); @@ -1226,11 +1227,12 @@ static void test_char_from_pos(void)
for (i = lo; i < mid; i++) { ret = LOWORD(SendMessageA(hwEdit, EM_CHARFROMPOS, 0, i)); - ok((0 == ret || 1 == ret /* Vista */), "expected 0 or 1 got %d\n", ret); + ok(0 == ret || 1 == ret /* Vista */, + "%d/%d/%d: expected 0 or 1 got %d\n", lo, i, mid, ret); } for (i = mid; i <= hi; i++) { ret = LOWORD(SendMessageA(hwEdit, EM_CHARFROMPOS, 0, i)); - ok(1 == ret, "expected 1 got %d\n", ret); + ok(1 == ret, "%d/%d/%d: expected 1 got %d\n", mid, i, hi, ret); } ret = SendMessageA(hwEdit, EM_POSFROMCHAR, 2, 0); ok(-1 == ret, "expected -1 got %d\n", ret); @@ -1244,11 +1246,12 @@ static void test_char_from_pos(void)
for (i = lo; i < mid; i++) { ret = LOWORD(SendMessageA(hwEdit, EM_CHARFROMPOS, 0, i)); - ok((0 == ret || 1 == ret /* Vista */), "expected 0 or 1 got %d\n", ret); + ok(0 == ret || 1 == ret /* Vista */, + "%d/%d/%d: expected 0 or 1 got %d\n", lo, i, mid, ret); } for (i = mid; i <= hi; i++) { ret = LOWORD(SendMessageA(hwEdit, EM_CHARFROMPOS, 0, i)); - ok(1 == ret, "expected 1 got %d\n", ret); + ok(1 == ret, "%d/%d/%d: expected 1 got %d\n", mid, i, hi, ret); } ret = SendMessageA(hwEdit, EM_POSFROMCHAR, 2, 0); ok(-1 == ret, "expected -1 got %d\n", ret);
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=114315
Your paranoid android.
=== w10pro64_en_AE_u8 (64 bit report) ===
user32: edit.c:1161: Test failed: 4/4/8: expected 1 got 0 edit.c:1179: Test failed: 282/282/286: expected 1 got 0 edit.c:1197: Test failed: 143/143/147: expected 1 got 0