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);