From 4f33f10511df846813dcda501fcba534ea4cb176 Mon Sep 17 00:00:00 2001 From: Kristian Rietveld Date: Sat, 14 May 2011 14:45:54 +0200 Subject: [PATCH] Use g_assert_cmpint instead of g_assert in check_level_length() --- gtk/tests/filtermodel.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/gtk/tests/filtermodel.c b/gtk/tests/filtermodel.c index 6d12cf21bb..88fe123397 100644 --- a/gtk/tests/filtermodel.c +++ b/gtk/tests/filtermodel.c @@ -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); } }