From 9111b8fbdb70fd8e78f6bc9e31e92469017545f3 Mon Sep 17 00:00:00 2001 From: Philip Chimento Date: Fri, 14 Oct 2016 21:11:05 -0700 Subject: tests: Check against TRUE and FALSE for booleans For boolean arrays, we want to make sure that we actually got an array of TRUE and FALSE (1 and 0) instead of an array of integers that may have other values besides 1 and 0. https://bugzilla.gnome.org/show_bug.cgi?id=772790 --- tests/gimarshallingtests.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/gimarshallingtests.c b/tests/gimarshallingtests.c index da8617e9..e7f5638a 100644 --- a/tests/gimarshallingtests.c +++ b/tests/gimarshallingtests.c @@ -1429,10 +1429,10 @@ void gi_marshalling_tests_array_bool_in (const gboolean *bools, gint length) { g_assert_cmpint (length, ==, 4); - g_assert_true (bools[0]); - g_assert_false (bools[1]); - g_assert_true (bools[2]); - g_assert_true (bools[3]); + g_assert_cmpint (bools[0], ==, TRUE); + g_assert_cmpint (bools[1], ==, FALSE); + g_assert_cmpint (bools[2], ==, TRUE); + g_assert_cmpint (bools[3], ==, TRUE); } /** @@ -2162,10 +2162,10 @@ void gi_marshalling_tests_garray_bool_none_in (GArray *array_) { g_assert_cmpint (array_->len, ==, 4); - g_assert_true (g_array_index (array_, gboolean, 0)); - g_assert_false (g_array_index (array_, gboolean, 1)); - g_assert_true (g_array_index (array_, gboolean, 2)); - g_assert_true (g_array_index (array_, gboolean, 3)); + g_assert_cmpint (g_array_index (array_, gboolean, 0), ==, TRUE); + g_assert_cmpint (g_array_index (array_, gboolean, 1), ==, FALSE); + g_assert_cmpint (g_array_index (array_, gboolean, 2), ==, TRUE); + g_assert_cmpint (g_array_index (array_, gboolean, 3), ==, TRUE); } /** -- cgit v1.2.1