summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Chimento <philip.chimento@gmail.com>2016-10-14 21:11:05 -0700
committerPhilip Chimento <philip.chimento@gmail.com>2016-10-18 20:15:08 -0700
commit9111b8fbdb70fd8e78f6bc9e31e92469017545f3 (patch)
tree40de29f61b3d230affb80db873eed1847b607128
parent85c25926fba4384e23c64b27d0a2f02d966b4d8e (diff)
downloadgobject-introspection-9111b8fbdb70fd8e78f6bc9e31e92469017545f3.tar.gz
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
-rw-r--r--tests/gimarshallingtests.c16
1 files 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);
}
/**