testsuite: Don't use return_if_fail()

Use assert() instead
This commit is contained in:
Benjamin Otte 2020-02-22 07:35:23 +01:00
parent d9e3eaaec8
commit 18d7187e4b

View File

@ -135,23 +135,23 @@ test_select_collapsed_row (void)
/* Check that the parent is not selected. */
gtk_tree_path_up (path);
g_return_if_fail (gtk_tree_selection_path_is_selected (selection, path) == FALSE);
g_assert_false (gtk_tree_selection_path_is_selected (selection, path));
/* Nothing should be selected at this point. */
g_return_if_fail (gtk_tree_selection_count_selected_rows (selection) == 0);
g_assert_cmpint (gtk_tree_selection_count_selected_rows (selection), ==, 0);
/* Check that selection really still works. */
gtk_tree_view_set_cursor (GTK_TREE_VIEW (view), path, NULL, FALSE);
g_return_if_fail (gtk_tree_selection_path_is_selected (selection, path) == TRUE);
g_return_if_fail (gtk_tree_selection_count_selected_rows (selection) == 1);
g_assert_true (gtk_tree_selection_path_is_selected (selection, path));
g_assert_cmpint (gtk_tree_selection_count_selected_rows (selection), ==, 1);
/* Expand and select child node now. */
gtk_tree_path_append_index (path, 1);
gtk_tree_view_expand_all (GTK_TREE_VIEW (view));
gtk_tree_view_set_cursor (GTK_TREE_VIEW (view), path, NULL, FALSE);
g_return_if_fail (gtk_tree_selection_path_is_selected (selection, path) == TRUE);
g_return_if_fail (gtk_tree_selection_count_selected_rows (selection) == 1);
g_assert_true (gtk_tree_selection_path_is_selected (selection, path));
g_assert_cmpint (gtk_tree_selection_count_selected_rows (selection), ==, 1);
gtk_tree_path_free (path);