Commit 3ce1d494 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

user32/tests: Make the test_char_from_pos() failures more informative.

parent 5479e9f2
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment