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
This commit is contained in:
Philip Withnall 2017-10-06 12:57:06 +01:00
parent bd2fa54637
commit 860dc949ca

View File

@ -17,6 +17,8 @@ test_autofree (void)
g_autofree gchar *alwaysnull_again = NULL; g_autofree gchar *alwaysnull_again = NULL;
buf[0] = 1; buf[0] = 1;
g_assert_null (alwaysnull_again);
} }
if (TRUE) if (TRUE)
@ -25,6 +27,8 @@ test_autofree (void)
buf2[255] = 42; buf2[255] = 42;
} }
g_assert_null (alwaysnull);
} }
static void static void
@ -226,6 +230,7 @@ test_g_queue (void)
g_autoptr(GQueue) val = g_queue_new (); g_autoptr(GQueue) val = g_queue_new ();
g_auto(GQueue) stackval = G_QUEUE_INIT; g_auto(GQueue) stackval = G_QUEUE_INIT;
g_assert (val != NULL); g_assert (val != NULL);
g_assert_null (stackval.head);
} }
static void static void