mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-13 22:07:15 +01:00
Improve the g_string_append_c test
We should check the resulting string too.
This commit is contained in:
parent
9810803358
commit
57de9af06f
@ -193,8 +193,11 @@ test_string_append_c (void)
|
|||||||
else
|
else
|
||||||
(g_string_append_c) (string, 'a'+(i%26));
|
(g_string_append_c) (string, 'a'+(i%26));
|
||||||
|
|
||||||
g_assert((strlen("hi pete!") + 10000) == string->len);
|
g_assert_true ((strlen("hi pete!") + 10000) == string->len);
|
||||||
g_assert((strlen("hi pete!") + 10000) == strlen(string->str));
|
g_assert_true ((strlen("hi pete!") + 10000) == strlen(string->str));
|
||||||
|
|
||||||
|
for (i = 0; i < 10000; i++)
|
||||||
|
g_assert_true (string->str[strlen ("Hi pete!") + i] == 'a' + (i%26));
|
||||||
|
|
||||||
g_string_free (string, TRUE);
|
g_string_free (string, TRUE);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user