summaryrefslogtreecommitdiff
path: root/tests/testtextbuffer.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2001-10-03 20:49:10 +0000
committerHavoc Pennington <hp@src.gnome.org>2001-10-03 20:49:10 +0000
commit77dc57e96019d5badb9292e03edead804bc6d8ec (patch)
treeb09e52896aa8ccb0462e8b1e7bc107cb7ebae9db /tests/testtextbuffer.c
parent264afe83f81f4654e3c22f03fa6d5ec907e80321 (diff)
downloadgtk+-77dc57e96019d5badb9292e03edead804bc6d8ec.tar.gz
allow testing the end position
2001-10-03 Havoc Pennington <hp@redhat.com> * gtk/gtktextiter.c (test_log_attrs): allow testing the end position * gtk/gtktextbuffer.c (compute_log_attrs): update for pango changes * tests/testtextbuffer.c (logical_motion_tests): updates
Diffstat (limited to 'tests/testtextbuffer.c')
-rw-r--r--tests/testtextbuffer.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/testtextbuffer.c b/tests/testtextbuffer.c
index 3c6e6f3db6..175deb9857 100644
--- a/tests/testtextbuffer.c
+++ b/tests/testtextbuffer.c
@@ -957,6 +957,9 @@ logical_motion_tests (void)
if (!gtk_text_iter_is_end (&iter))
g_error ("Expected to stop at the end iterator\n");
+
+ if (!gtk_text_iter_is_cursor_position (&iter))
+ g_error ("Should be a cursor position before the end iterator");
if (i != expected_steps)
g_error ("Expected %d steps, there were actually %d\n", expected_steps, i);
@@ -1016,6 +1019,11 @@ logical_motion_tests (void)
pos, expected[i]);
}
+ if (i != 0 &&
+ !gtk_text_iter_is_end (&iter) &&
+ !gtk_text_iter_ends_sentence (&iter))
+ g_error ("Iterator at %d should end a sentence", pos);
+
++i;
}
while (gtk_text_iter_forward_sentence_end (&iter));
@@ -1054,6 +1062,11 @@ logical_motion_tests (void)
pos, expected[i]);
}
+ if (pos != 0 &&
+ !gtk_text_iter_is_end (&iter) &&
+ !gtk_text_iter_starts_sentence (&iter))
+ g_error ("Iterator at %d should start a sentence", pos);
+
++i;
}
while (gtk_text_iter_backward_sentence_start (&iter));