[gnome-builder] Replace g_assert_cmpint and g_assert_cmpstr with g_assert
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] Replace g_assert_cmpint and g_assert_cmpstr with g_assert
- Date: Thu, 7 May 2015 08:58:33 +0000 (UTC)
commit 43fc9720e494433416b2735484d4930563c05144
Author: Dimitris Zenios <dimitris zenios gmail com>
Date: Thu May 7 11:28:10 2015 +0300
Replace g_assert_cmpint and g_assert_cmpstr with g_assert
https://bugzilla.gnome.org/show_bug.cgi?id=749035
contrib/egg/egg-binding-set.c | 2 +-
contrib/egg/egg-settings-sandwich.c | 2 +-
contrib/egg/egg-signal-group.c | 8 ++++----
contrib/search/fuzzy.c | 2 +-
src/vim/gb-vim.c | 2 +-
src/workbench/gb-workbench.c | 2 +-
6 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/contrib/egg/egg-binding-set.c b/contrib/egg/egg-binding-set.c
index 8a8bb1a..a4b0167 100644
--- a/contrib/egg/egg-binding-set.c
+++ b/contrib/egg/egg-binding-set.c
@@ -204,7 +204,7 @@ egg_binding_set_finalize (GObject *object)
EggBindingSet *self = (EggBindingSet *)object;
g_assert (self->lazy_bindings != NULL);
- g_assert_cmpint (self->lazy_bindings->len, ==, 0);
+ g_assert (self->lazy_bindings->len == 0);
g_clear_pointer (&self->lazy_bindings, g_ptr_array_unref);
g_clear_object (&self->source);
diff --git a/contrib/egg/egg-settings-sandwich.c b/contrib/egg/egg-settings-sandwich.c
index 5eb23a5..b316aa6 100644
--- a/contrib/egg/egg-settings-sandwich.c
+++ b/contrib/egg/egg-settings-sandwich.c
@@ -70,7 +70,7 @@ egg_settings_sandwich_update_cache (EggSettingsSandwich *self,
g_assert (EGG_IS_SETTINGS_SANDWICH (self));
g_assert (key != NULL);
- g_assert_cmpint (self->settings->len, >, 0);
+ g_assert (self->settings->len > 0);
for (i = 0; i < self->settings->len; i++)
{
diff --git a/contrib/egg/egg-signal-group.c b/contrib/egg/egg-signal-group.c
index 071bd17..77eddd4 100644
--- a/contrib/egg/egg-signal-group.c
+++ b/contrib/egg/egg-signal-group.c
@@ -124,7 +124,7 @@ egg_signal_group_bind_handler (EggSignalGroup *self,
g_assert (handler != NULL);
g_assert (handler->detailed_signal != NULL);
g_assert (handler->closure != NULL);
- g_assert_cmpint (handler->handler_id, ==, 0);
+ g_assert (handler->handler_id == 0);
handler->handler_id = g_signal_connect_closure (self->target,
handler->detailed_signal,
@@ -195,7 +195,7 @@ egg_signal_group_unbind (EggSignalGroup *self)
g_assert (handler != NULL);
g_assert (handler->detailed_signal != NULL);
g_assert (handler->closure != NULL);
- g_assert_cmpint (handler->handler_id, !=, 0);
+ g_assert (handler->handler_id != 0);
handler_id = handler->handler_id;
handler->handler_id = 0;
@@ -243,7 +243,7 @@ egg_signal_group_block (EggSignalGroup *self)
g_assert (handler != NULL);
g_assert (handler->detailed_signal != NULL);
g_assert (handler->closure != NULL);
- g_assert_cmpint (handler->handler_id, !=, 0);
+ g_assert (handler->handler_id != 0);
g_signal_handler_block (self->target, handler->handler_id);
}
@@ -271,7 +271,7 @@ egg_signal_group_unblock (EggSignalGroup *self)
g_assert (handler != NULL);
g_assert (handler->detailed_signal != NULL);
g_assert (handler->closure != NULL);
- g_assert_cmpint (handler->handler_id, !=, 0);
+ g_assert (handler->handler_id != 0);
g_signal_handler_unblock (self->target, handler->handler_id);
}
diff --git a/contrib/search/fuzzy.c b/contrib/search/fuzzy.c
index 20e62ce..4d04448 100644
--- a/contrib/search/fuzzy.c
+++ b/contrib/search/fuzzy.c
@@ -300,7 +300,7 @@ fuzzy_insert (Fuzzy *fuzzy,
offset = fuzzy_heap_insert(fuzzy, key);
g_array_append_val(fuzzy->id_to_text_offset, offset);
g_ptr_array_add(fuzzy->id_to_value, value);
- g_assert_cmpint(fuzzy->id_to_value->len, ==, fuzzy->id_to_text_offset->len);
+ g_assert(fuzzy->id_to_value->len == fuzzy->id_to_text_offset->len);
id = fuzzy->id_to_text_offset->len - 1;
diff --git a/src/vim/gb-vim.c b/src/vim/gb-vim.c
index ae60375..660d716 100644
--- a/src/vim/gb-vim.c
+++ b/src/vim/gb-vim.c
@@ -69,7 +69,7 @@ int32_parse (gint *value,
g_assert (value);
g_assert (str);
- g_assert_cmpint (lower, <=, upper);
+ g_assert (lower <= upper);
g_assert (param_name);
v64 = g_ascii_strtoll (str, NULL, 10);
diff --git a/src/workbench/gb-workbench.c b/src/workbench/gb-workbench.c
index b9649ce..da6f328 100644
--- a/src/workbench/gb-workbench.c
+++ b/src/workbench/gb-workbench.c
@@ -202,7 +202,7 @@ gb_workbench_delete_event (GtkWidget *widget,
return FALSE;
}
- g_assert_cmpint (self->unloading, ==, FALSE);
+ g_assert (self->unloading == FALSE);
if (self->context != NULL)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]