Commit 12c964be authored by Austin Lund's avatar Austin Lund Committed by Alexandre Julliard

riched32/tests: Correct error messages in EM_POSFROMCHAR tests.

parent 7acdc0a8
...@@ -776,13 +776,13 @@ static void test_EM_POSFROMCHAR(void) ...@@ -776,13 +776,13 @@ static void test_EM_POSFROMCHAR(void)
else if (i == 1) else if (i == 1)
{ {
ok(pl.y > 0, "EM_POSFROMCHAR reports y=%d, expected > 0\n", pl.y); ok(pl.y > 0, "EM_POSFROMCHAR reports y=%d, expected > 0\n", pl.y);
ok(pl.x == xpos, "EM_POSFROMCHAR reports x=%d, expected 1\n", pl.x); ok(pl.x == xpos, "EM_POSFROMCHAR reports x=%d, expected %d\n", pl.x, xpos);
height = pl.y; height = pl.y;
} }
else else
{ {
ok(pl.y == i * height, "EM_POSFROMCHAR reports y=%d, expected %d\n", pl.y, i * height); ok(pl.y == i * height, "EM_POSFROMCHAR reports y=%d, expected %d\n", pl.y, i * height);
ok(pl.x == xpos, "EM_POSFROMCHAR reports x=%d, expected 1\n", pl.x); ok(pl.x == xpos, "EM_POSFROMCHAR reports x=%d, expected %d\n", pl.x, xpos);
} }
} }
...@@ -790,13 +790,13 @@ static void test_EM_POSFROMCHAR(void) ...@@ -790,13 +790,13 @@ static void test_EM_POSFROMCHAR(void)
result = SendMessage(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pl, 50 * 16); result = SendMessage(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pl, 50 * 16);
ok(result == 0, "EM_POSFROMCHAR returned %ld, expected 0\n", result); ok(result == 0, "EM_POSFROMCHAR returned %ld, expected 0\n", result);
ok(pl.y == 50 * height, "EM_POSFROMCHAR reports y=%d, expected %d\n", pl.y, 50 * height); ok(pl.y == 50 * height, "EM_POSFROMCHAR reports y=%d, expected %d\n", pl.y, 50 * height);
ok(pl.x == xpos, "EM_POSFROMCHAR reports x=%d, expected 1\n", pl.x); ok(pl.x == xpos, "EM_POSFROMCHAR reports x=%d, expected %d\n", pl.x, xpos);
/* Testing position way past end of text */ /* Testing position way past end of text */
result = SendMessage(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pl, 55 * 16); result = SendMessage(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pl, 55 * 16);
ok(result == 0, "EM_POSFROMCHAR returned %ld, expected 0\n", result); ok(result == 0, "EM_POSFROMCHAR returned %ld, expected 0\n", result);
ok(pl.y == 50 * height, "EM_POSFROMCHAR reports y=%d, expected %d\n", pl.y, 50 * height); ok(pl.y == 50 * height, "EM_POSFROMCHAR reports y=%d, expected %d\n", pl.y, 50 * height);
ok(pl.x == xpos, "EM_POSFROMCHAR reports x=%d, expected 1\n", pl.x); ok(pl.x == xpos, "EM_POSFROMCHAR reports x=%d, expected %d\n", pl.x, xpos);
/* Testing that vertical scrolling does, in fact, have an effect on EM_POSFROMCHAR */ /* Testing that vertical scrolling does, in fact, have an effect on EM_POSFROMCHAR */
...@@ -809,20 +809,20 @@ static void test_EM_POSFROMCHAR(void) ...@@ -809,20 +809,20 @@ static void test_EM_POSFROMCHAR(void)
ok(pl.y == (i - 1) * height, ok(pl.y == (i - 1) * height,
"EM_POSFROMCHAR reports y=%d, expected %d\n", "EM_POSFROMCHAR reports y=%d, expected %d\n",
pl.y, (i - 1) * height); pl.y, (i - 1) * height);
ok(pl.x == xpos, "EM_POSFROMCHAR reports x=%d, expected 1\n", pl.x); ok(pl.x == xpos, "EM_POSFROMCHAR reports x=%d, expected %d\n", pl.x, xpos);
} }
/* Testing position at end of text */ /* Testing position at end of text */
result = SendMessage(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pl, 50 * 16); result = SendMessage(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pl, 50 * 16);
ok(result == 0, "EM_POSFROMCHAR returned %ld, expected 0\n", result); ok(result == 0, "EM_POSFROMCHAR returned %ld, expected 0\n", result);
ok(pl.y == (50 - 1) * height, "EM_POSFROMCHAR reports y=%d, expected %d\n", pl.y, (50 - 1) * height); ok(pl.y == (50 - 1) * height, "EM_POSFROMCHAR reports y=%d, expected %d\n", pl.y, (50 - 1) * height);
ok(pl.x == xpos, "EM_POSFROMCHAR reports x=%d, expected 1\n", pl.x); ok(pl.x == xpos, "EM_POSFROMCHAR reports x=%d, expected %d\n", pl.x, xpos);
/* Testing position way past end of text */ /* Testing position way past end of text */
result = SendMessage(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pl, 55 * 16); result = SendMessage(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pl, 55 * 16);
ok(result == 0, "EM_POSFROMCHAR returned %ld, expected 0\n", result); ok(result == 0, "EM_POSFROMCHAR returned %ld, expected 0\n", result);
ok(pl.y == (50 - 1) * height, "EM_POSFROMCHAR reports y=%d, expected %d\n", pl.y, (50 - 1) * height); ok(pl.y == (50 - 1) * height, "EM_POSFROMCHAR reports y=%d, expected %d\n", pl.y, (50 - 1) * height);
ok(pl.x == xpos, "EM_POSFROMCHAR reports x=%d, expected 1\n", pl.x); ok(pl.x == xpos, "EM_POSFROMCHAR reports x=%d, expected %d\n", pl.x, xpos);
/* Testing that horizontal scrolling does, in fact, have an effect on EM_POSFROMCHAR */ /* Testing that horizontal scrolling does, in fact, have an effect on EM_POSFROMCHAR */
SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) text); SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) text);
......
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