diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-08-22 04:42:51 +0000 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-08-22 04:42:51 +0000 |
commit | 701d7435d7b0dff8d106107288f1992bb2ea9de4 (patch) | |
tree | ccf71374dfbbf961b86196910ea03167eaf9829b /tests/test-break.c | |
parent | c13ec6590099dddb7145e1d4cddf5772f6d20d71 (diff) | |
parent | b9d6e8943b2049e544bf4c08abe4e7573c6a1493 (diff) | |
download | pango-701d7435d7b0dff8d106107288f1992bb2ea9de4.tar.gz |
Merge branch 'matthiasc/for-main' into 'main'
break: Some code reorg
See merge request GNOME/pango!427
Diffstat (limited to 'tests/test-break.c')
-rw-r--r-- | tests/test-break.c | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/tests/test-break.c b/tests/test-break.c index d59971a0..3fb5cdcd 100644 --- a/tests/test-break.c +++ b/tests/test-break.c @@ -106,8 +106,8 @@ test_file (const gchar *filename, GString *string) s1 = g_string_new ("Breaks: "); s2 = g_string_new ("Whitespace: "); - s3 = g_string_new ("Words:"); - s4 = g_string_new ("Sentences:"); + s3 = g_string_new ("Sentences:"); + s4 = g_string_new ("Words:"); s5 = g_string_new ("Graphemes:"); g_string_append (string, "Text: "); @@ -157,37 +157,38 @@ test_file (const gchar *filename, GString *string) w++; } - if (log.is_word_boundary) + if (log.is_sentence_boundary) { g_string_append (s3, "b"); - o++; + s++; } - if (log.is_word_start) + if (log.is_sentence_start) { g_string_append (s3, "s"); - o++; + s++; } - if (log.is_word_end) + if (log.is_sentence_end) { g_string_append (s3, "e"); - o++; + s++; } - if (log.is_sentence_boundary) + if (log.is_word_boundary) { g_string_append (s4, "b"); - s++; + o++; } - if (log.is_sentence_start) + if (log.is_word_start) { g_string_append (s4, "s"); - s++; + o++; } - if (log.is_sentence_end) + if (log.is_word_end) { g_string_append (s4, "e"); - s++; + o++; } + if (log.is_cursor_position) { g_string_append (s5, "b"); @@ -199,8 +200,8 @@ test_file (const gchar *filename, GString *string) g_string_append_printf (string, "%*s", m, ""); g_string_append_printf (s1, "%*s", m - b, ""); g_string_append_printf (s2, "%*s", m - w, ""); - g_string_append_printf (s3, "%*s", m - o, ""); - g_string_append_printf (s4, "%*s", m - s, ""); + g_string_append_printf (s3, "%*s", m - s, ""); + g_string_append_printf (s4, "%*s", m - o, ""); g_string_append_printf (s5, "%*s", m - g, ""); if (i < len - 1) |