[glib/glib-2-68: 1/8] tests: Add missing return value check in string test
- From: Simon McVittie <smcv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/glib-2-68: 1/8] tests: Add missing return value check in string test
- Date: Mon, 2 Aug 2021 14:38:03 +0000 (UTC)
commit be84555c73236c5dc59867455d970608cba7ba27
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Tue May 11 16:24:39 2021 -0500
tests: Add missing return value check in string test
Coverity noticed that we were not testing the return value here. Good
Coverity!
glib/tests/string.c | 1 +
1 file changed, 1 insertion(+)
---
diff --git a/glib/tests/string.c b/glib/tests/string.c
index 819b192fb..6e22cd287 100644
--- a/glib/tests/string.c
+++ b/glib/tests/string.c
@@ -519,6 +519,7 @@ test_string_replace (void)
n = g_string_replace (s, "a", "abcdefghijkl", 0);
g_assert_cmpstr
("abcdefghijklabcdefghijklabcdefghijklabcdefghijklabcdefghijklabcdefghijklabcdefghijklabcdefghijkl",
==, s->str);
+ g_assert_cmpint (n, ==, 8);
g_string_free (s, TRUE);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]