aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--debian/control2
-rw-r--r--tests/test-dbus-listener.cc19
-rw-r--r--tests/test-device.cc26
-rw-r--r--tests/test-indicator.cc1
5 files changed, 2 insertions, 48 deletions
diff --git a/configure.ac b/configure.ac
index f4ada8a..0601c16 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,7 +29,7 @@ LT_INIT
###########################
# Dependencies
###########################
-GLIB_REQUIRED_VERSION=2.33
+GLIB_REQUIRED_VERSION=2.35.4
GIO_REQUIRED_VERSION=2.26
GTK_REQUIRED_VERSION=3.0
INDICATOR_REQUIRED_VERSION=0.3.90
diff --git a/debian/control b/debian/control
index b53f5be..e9ebbd2 100644
--- a/debian/control
+++ b/debian/control
@@ -9,7 +9,7 @@ Build-Depends: debhelper (>= 9),
libxorg-gtest-dev,
libgtest-dev,
libgtk-3-dev,
- libglib2.0-dev (>= 2.33),
+ libglib2.0-dev (>= 2.35.4),
libindicator3-dev (>= 0.3.90),
libupower-glib-dev (>= 0.9.5),
gnome-settings-daemon-dev (>= 3.1.4),
diff --git a/tests/test-dbus-listener.cc b/tests/test-dbus-listener.cc
index 8bf74bf..7764498 100644
--- a/tests/test-dbus-listener.cc
+++ b/tests/test-dbus-listener.cc
@@ -26,24 +26,6 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
****
***/
-namespace
-{
- void ensure_glib_initialized ()
- {
- static bool initialized = false;
-
- if (G_UNLIKELY(!initialized))
- {
- initialized = true;
- g_type_init();
- }
- }
-}
-
-/***
-****
-***/
-
class DbusListenerTest : public ::testing::Test
{
protected:
@@ -138,7 +120,6 @@ class DbusListenerTest : public ::testing::Test
gsd_power_error_string = NULL;
// bring up the test bus
- ensure_glib_initialized ();
mainloop = g_main_loop_new (NULL, FALSE);
bus = g_test_dbus_new (G_TEST_DBUS_NONE);
g_test_dbus_up (bus);
diff --git a/tests/test-device.cc b/tests/test-device.cc
index d9d7956..ab329f1 100644
--- a/tests/test-device.cc
+++ b/tests/test-device.cc
@@ -21,20 +21,6 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include "device.h"
#include "indicator-power.h"
-namespace
-{
- void ensure_glib_initialized ()
- {
- static bool initialized = false;
-
- if (G_UNLIKELY(!initialized))
- {
- initialized = true;
- g_type_init();
- }
- }
-}
-
class DeviceTest : public ::testing::Test
{
private:
@@ -63,8 +49,6 @@ class DeviceTest : public ::testing::Test
log_handler_id = g_log_set_handler ("Indicator-Power", flags, log_count_func, this);
log_count_ipower_expected = 0;
log_count_ipower_actual = 0;
-
- ensure_glib_initialized ();
}
virtual void TearDown()
@@ -111,8 +95,6 @@ class DeviceTest : public ::testing::Test
TEST_F(DeviceTest, GObjectNew)
{
- ensure_glib_initialized ();
-
GObject * o = G_OBJECT (g_object_new (INDICATOR_POWER_DEVICE_TYPE, NULL));
ASSERT_TRUE (o != NULL);
ASSERT_TRUE (INDICATOR_IS_POWER_DEVICE(o));
@@ -129,8 +111,6 @@ TEST_F(DeviceTest, Properties)
guint64 u64;
const gchar * key;
- ensure_glib_initialized ();
-
o = G_OBJECT (g_object_new (INDICATOR_POWER_DEVICE_TYPE, NULL));
ASSERT_TRUE (o != NULL);
ASSERT_TRUE (INDICATOR_IS_POWER_DEVICE(o));
@@ -174,8 +154,6 @@ TEST_F(DeviceTest, Properties)
TEST_F(DeviceTest, New)
{
- ensure_glib_initialized ();
-
IndicatorPowerDevice * device = indicator_power_device_new ("/object/path",
UP_DEVICE_KIND_BATTERY,
50.0,
@@ -195,8 +173,6 @@ TEST_F(DeviceTest, New)
TEST_F(DeviceTest, NewFromVariant)
{
- ensure_glib_initialized ();
-
GVariant * variant = g_variant_new ("(susdut)",
"/object/path",
(guint32) UP_DEVICE_KIND_BATTERY,
@@ -221,8 +197,6 @@ TEST_F(DeviceTest, NewFromVariant)
TEST_F(DeviceTest, BadAccessors)
{
- ensure_glib_initialized ();
-
// test that these functions can handle being passed NULL pointers
IndicatorPowerDevice * device = NULL;
indicator_power_device_get_kind (device);
diff --git a/tests/test-indicator.cc b/tests/test-indicator.cc
index 824a5ac..6fd9bf7 100644
--- a/tests/test-indicator.cc
+++ b/tests/test-indicator.cc
@@ -46,7 +46,6 @@ namespace
if (G_UNLIKELY(!initialized))
{
initialized = true;
- g_type_init();
g_log_set_handler ("Gtk", (GLogLevelFlags)(G_LOG_LEVEL_CRITICAL|G_LOG_LEVEL_WARNING), quiet_log_func, NULL);
g_log_set_handler ("GLib-GObject", (GLogLevelFlags)(G_LOG_LEVEL_CRITICAL|G_LOG_LEVEL_WARNING), quiet_log_func, NULL);
}