From cd7ec27751fbaaae47fc1ddf560f88e5921ce80d Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 3 Nov 2009 10:51:12 -0600 Subject: Removing the checks on private being NULL when we're already testing the object. --- src/libcustomindicator/custom-indicator.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/libcustomindicator/custom-indicator.c b/src/libcustomindicator/custom-indicator.c index a4835cc..639d304 100644 --- a/src/libcustomindicator/custom-indicator.c +++ b/src/libcustomindicator/custom-indicator.c @@ -258,7 +258,6 @@ static void custom_indicator_init (CustomIndicator *self) { CustomIndicatorPrivate * priv = CUSTOM_INDICATOR_GET_PRIVATE(self); - g_return_if_fail(priv != NULL); priv->id = NULL; priv->category = CUSTOM_INDICATOR_CATEGORY_OTHER; @@ -293,7 +292,6 @@ custom_indicator_dispose (GObject *object) g_return_if_fail(self != NULL); CustomIndicatorPrivate * priv = CUSTOM_INDICATOR_GET_PRIVATE(self); - g_return_if_fail(priv != NULL); if (priv->status != CUSTOM_INDICATOR_STATUS_PASSIVE) { custom_indicator_set_status(self, CUSTOM_INDICATOR_STATUS_PASSIVE); @@ -324,7 +322,6 @@ custom_indicator_finalize (GObject *object) g_return_if_fail(self != NULL); CustomIndicatorPrivate * priv = CUSTOM_INDICATOR_GET_PRIVATE(self); - g_return_if_fail(priv != NULL); if (priv->status != CUSTOM_INDICATOR_STATUS_PASSIVE) { g_warning("Finalizing Custom Status with the status set to: %d", priv->status); @@ -359,7 +356,6 @@ custom_indicator_set_property (GObject * object, guint prop_id, const GValue * v g_return_if_fail(self != NULL); CustomIndicatorPrivate * priv = CUSTOM_INDICATOR_GET_PRIVATE(self); - g_return_if_fail(priv != NULL); switch (prop_id) { /* *********************** */ @@ -477,7 +473,6 @@ custom_indicator_get_property (GObject * object, guint prop_id, GValue * value, g_return_if_fail(self != NULL); CustomIndicatorPrivate * priv = CUSTOM_INDICATOR_GET_PRIVATE(self); - g_return_if_fail(priv != NULL); switch (prop_id) { /* *********************** */ -- cgit v1.2.3 From 8ef7ed56c860d1d36bfd77a9e60bc1e38e4f7d48 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 3 Nov 2009 15:18:38 -0600 Subject: Put the gtester test under a dbus-test-runner to ensure that we have a session bus to test with. --- .bzrignore | 1 + tests/Makefile.am | 15 ++++++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.bzrignore b/.bzrignore index 7121e6e..05932c9 100644 --- a/.bzrignore +++ b/.bzrignore @@ -24,3 +24,4 @@ tests/test-libcustomindicator-dbus-client tests/test-libcustomindicator-dbus-server tests/libcustomindicator-tests tests/test-libcustomindicator-dbus +tests/libcustomindicator-tests-gtester diff --git a/tests/Makefile.am b/tests/Makefile.am index f6a0525..33fe0ba 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -64,12 +64,17 @@ test_libcustomindicator_dbus_server_LDADD = \ XML_REPORT = libcustomindicator-check-results.xml HTML_REPORT = libcustomindicator-check-results.html -libcustomindicator-tests: test-libcustomindicator - @echo "#!/bin/sh" > libcustomindicator-tests - @echo gtester -k --verbose -o=$(XML_REPORT) ./test-libcustomindicator >> libcustomindicator-tests - @chmod +x libcustomindicator-tests +libcustomindicator-tests: libcustomindicator-tests-gtester Makefile.am + @echo "#!/bin/sh" > $@ + @echo $(DBUS_RUNNER) --task ./libcustomindicator-tests-gtester >> $@ + @chmod +x $@ -TESTS += libcustomindicator-tests +libcustomindicator-tests-gtester: test-libcustomindicator Makefile.am + @echo "#!/bin/sh" > $@ + @echo gtester -k --verbose -o=$(XML_REPORT) ./test-libcustomindicator >> $@ + @chmod +x $@ + +TESTS += libcustomindicator-tests libcustomindicator-tests-gtester DISTCLEANFILES += $(XML_REPORT) $(HTML_REPORT) -- cgit v1.2.3 From f23c54ff5fee5587c31ecb8bf176b58fa3d4be1d Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 4 Nov 2009 08:11:05 -0600 Subject: Put the cleanup of gtester on the wrong variable. --- tests/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index 33fe0ba..dfdb397 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -74,8 +74,8 @@ libcustomindicator-tests-gtester: test-libcustomindicator Makefile.am @echo gtester -k --verbose -o=$(XML_REPORT) ./test-libcustomindicator >> $@ @chmod +x $@ -TESTS += libcustomindicator-tests libcustomindicator-tests-gtester -DISTCLEANFILES += $(XML_REPORT) $(HTML_REPORT) +TESTS += libcustomindicator-tests +DISTCLEANFILES += $(XML_REPORT) $(HTML_REPORT) libcustomindicator-tests-gtester DBUS_RUNNER=dbus-test-runner --dbus-config /usr/share/dbus-test-runner/session.conf -- cgit v1.2.3