Evas tests: Added more textblock cursor tests.

Added a set of tests to verify my last fix.

SVN revision: 61363
This commit is contained in:
Tom Hacohen 2011-07-14 08:00:27 +00:00
parent 1128519838
commit b976ff8adf
1 changed files with 14 additions and 2 deletions

View File

@ -493,13 +493,25 @@ START_TEST(evas_textblock_cursor)
/* Fail if they are equal, i.e if it for some reason thinks it should
* go to the end. */
evas_textblock_cursor_paragraph_last(main_cur);
evas_textblock_cursor_paragraph_first(main_cur);
evas_textblock_cursor_paragraph_last(cur);
evas_textblock_cursor_char_coord_set(main_cur, x + w, nh + 1);
fail_if(!evas_textblock_cursor_compare(main_cur, cur));
evas_textblock_cursor_paragraph_last(main_cur);
evas_textblock_cursor_paragraph_first(main_cur);
evas_textblock_cursor_paragraph_last(cur);
evas_textblock_cursor_line_coord_set(main_cur, nh + 1);
fail_if(!evas_textblock_cursor_compare(main_cur, cur));
/* Fail if it doesn't go to the end. */
evas_textblock_cursor_paragraph_last(cur);
evas_textblock_cursor_paragraph_first(main_cur);
evas_textblock_cursor_char_coord_set(main_cur, x + w, (2 * nh) - 1);
fail_if(evas_textblock_cursor_compare(main_cur, cur));
evas_textblock_cursor_paragraph_first(main_cur);
evas_textblock_cursor_line_coord_set(main_cur, (2 * nh) - 1);
fail_if(evas_textblock_cursor_compare(main_cur, cur));
}