Use g_assert_cmpint instead of g_assert in check_level_length()

This commit is contained in:
Kristian Rietveld 2011-05-14 14:45:54 +02:00
parent 7b3c2751ee
commit 4f33f10511

View File

@ -787,24 +787,26 @@ check_filter_model_with_root (FilterTest *fixture,
static void
check_level_length (GtkTreeModelFilter *filter,
const gchar *level,
const int length)
const int expected_length)
{
if (!level)
{
int l = gtk_tree_model_iter_n_children (GTK_TREE_MODEL (filter), NULL);
g_return_if_fail (l == length);
int model_length;
model_length = gtk_tree_model_iter_n_children (GTK_TREE_MODEL (filter), NULL);
g_assert_cmpint (model_length, ==, expected_length);
}
else
{
int l;
int model_length;
gboolean retrieved_iter = FALSE;
GtkTreeIter iter;
retrieved_iter = gtk_tree_model_get_iter_from_string (GTK_TREE_MODEL (filter),
&iter, level);
g_return_if_fail (retrieved_iter);
l = gtk_tree_model_iter_n_children (GTK_TREE_MODEL (filter), &iter);
g_return_if_fail (l == length);
model_length = gtk_tree_model_iter_n_children (GTK_TREE_MODEL (filter), &iter);
g_assert_cmpint (model_length, ==, expected_length);
}
}