diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2013-08-23 14:45:19 +0000 |
---|---|---|
committer | Tarmac <Unknown> | 2013-08-23 14:45:19 +0000 |
commit | e079d4b70552a9cc5a44d6c8df2153cbcec1de78 (patch) | |
tree | 111bdde3ef9696551ff3375bebe2c9a7802746fd /tests/test-service.cc | |
parent | f22849a5db346c806bbac042a5c3bb1be9bb68ea (diff) | |
parent | ad28ae2fdfa5e803031dc5d41a83f033c924f4e9 (diff) | |
download | ayatana-indicator-power-e079d4b70552a9cc5a44d6c8df2153cbcec1de78.tar.gz ayatana-indicator-power-e079d4b70552a9cc5a44d6c8df2153cbcec1de78.tar.bz2 ayatana-indicator-power-e079d4b70552a9cc5a44d6c8df2153cbcec1de78.zip |
Updates the power indicator to match the spec changes at <https://wiki.ubuntu.com/Power?action=diff&rev2=37&rev1=36>.
This patch is based from hloeung's nice patch, fixes a few edge cases, adds unit tests for labels, headers, & accessible text for all combinations of show time & show percentage, and cleans up the bindings between GSettings and the checkbox actions.
. Fixes: https://bugs.launchpad.net/bugs/811777.
Approved by Ted Gould, PS Jenkins bot.
Diffstat (limited to 'tests/test-service.cc')
-rw-r--r-- | tests/test-service.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test-service.cc b/tests/test-service.cc index cae3021..b2d4dc4 100644 --- a/tests/test-service.cc +++ b/tests/test-service.cc @@ -65,7 +65,7 @@ class IndicatorTest : public ::testing::Test virtual void SetUp() { ensure_glib_initialized (); - + g_setenv( "GSETTINGS_SCHEMA_DIR", SCHEMA_DIR, TRUE); ac_device = indicator_power_device_new ( @@ -90,7 +90,7 @@ class IndicatorTest : public ::testing::Test const char* GetAccessibleDesc (IndicatorPower * power) const { GList * entries = indicator_object_get_entries (INDICATOR_OBJECT(power)); - g_assert (g_list_length(entries) == 1); + g_assert (g_list_length(entries) == 1); IndicatorObjectEntry * entry = static_cast<IndicatorObjectEntry*>(entries->data); const char * ret = entry->accessible_desc; g_list_free (entries); @@ -120,7 +120,7 @@ TEST_F(IndicatorTest, SetDevices) devices = g_slist_append (devices, ac_device); devices = g_slist_append (devices, battery_device); indicator_power_set_devices (power, devices); - g_slist_free (devices); + g_slist_free (devices); g_object_unref (power); } |