[glib] tests: Add some assertions on some otherwise-unused variables
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] tests: Add some assertions on some otherwise-unused variables
- Date: Fri, 6 Oct 2017 11:58:21 +0000 (UTC)
commit 860dc949ca01cd452813de59b6e078d0d1f18f7c
Author: Philip Withnall <withnall endlessm com>
Date: Fri Oct 6 12:57:06 2017 +0100
tests: Add some assertions on some otherwise-unused variables
Signed-off-by: Philip Withnall <withnall endlessm com>
https://bugzilla.gnome.org/show_bug.cgi?id=751738
glib/tests/autoptr.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/glib/tests/autoptr.c b/glib/tests/autoptr.c
index b44cf13..754999c 100644
--- a/glib/tests/autoptr.c
+++ b/glib/tests/autoptr.c
@@ -17,6 +17,8 @@ test_autofree (void)
g_autofree gchar *alwaysnull_again = NULL;
buf[0] = 1;
+
+ g_assert_null (alwaysnull_again);
}
if (TRUE)
@@ -25,6 +27,8 @@ test_autofree (void)
buf2[255] = 42;
}
+
+ g_assert_null (alwaysnull);
}
static void
@@ -226,6 +230,7 @@ test_g_queue (void)
g_autoptr(GQueue) val = g_queue_new ();
g_auto(GQueue) stackval = G_QUEUE_INIT;
g_assert (val != NULL);
+ g_assert_null (stackval.head);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]