aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2012-05-31 13:08:27 -0500
committerCharles Kerr <charles.kerr@canonical.com>2012-05-31 13:08:27 -0500
commit97867c31fd3f4767fe891de31786b7b32d6dd35a (patch)
tree3a00b99e24b60415752b30dc146a9ce3589c9416 /tests
parentb18b5862fb4e69773bf89328f4c65fdd344d8f1a (diff)
downloadayatana-indicator-power-97867c31fd3f4767fe891de31786b7b32d6dd35a.tar.gz
ayatana-indicator-power-97867c31fd3f4767fe891de31786b7b32d6dd35a.tar.bz2
ayatana-indicator-power-97867c31fd3f4767fe891de31786b7b32d6dd35a.zip
remove IndicatorPowerDevice's now-unused device icon string.
Diffstat (limited to 'tests')
-rw-r--r--tests/test-device.cc12
-rw-r--r--tests/test-indicator.cc23
2 files changed, 10 insertions, 25 deletions
diff --git a/tests/test-device.cc b/tests/test-device.cc
index b11188c..0ea7177 100644
--- a/tests/test-device.cc
+++ b/tests/test-device.cc
@@ -111,13 +111,6 @@ TEST_F(DeviceTest, Properties)
ASSERT_STREQ (str, "/object/path");
g_free (str);
- // ICON
- key = INDICATOR_POWER_DEVICE_ICON;
- g_object_set (o, key, "something", NULL);
- g_object_get (o, key, &str, NULL);
- ASSERT_STREQ (str, "something");
- g_free (str);
-
// PERCENTAGE
key = INDICATOR_POWER_DEVICE_PERCENTAGE;
g_object_set (o, key, 50.0, NULL);
@@ -140,7 +133,6 @@ TEST_F(DeviceTest, New)
IndicatorPowerDevice * device = indicator_power_device_new ("/object/path",
UP_DEVICE_KIND_BATTERY,
- "icon",
50.0,
UP_DEVICE_STATE_CHARGING,
30);
@@ -149,7 +141,6 @@ TEST_F(DeviceTest, New)
ASSERT_EQ (indicator_power_device_get_kind(device), UP_DEVICE_KIND_BATTERY);
ASSERT_EQ (indicator_power_device_get_state(device), UP_DEVICE_STATE_CHARGING);
ASSERT_STREQ (indicator_power_device_get_object_path(device), "/object/path");
- ASSERT_STREQ (indicator_power_device_get_icon(device), "icon");
ASSERT_EQ ((int)indicator_power_device_get_percentage(device), 50);
ASSERT_EQ (indicator_power_device_get_time(device), 30);
@@ -175,7 +166,6 @@ TEST_F(DeviceTest, NewFromVariant)
ASSERT_EQ (indicator_power_device_get_kind(device), UP_DEVICE_KIND_BATTERY);
ASSERT_EQ (indicator_power_device_get_state(device), UP_DEVICE_STATE_CHARGING);
ASSERT_STREQ (indicator_power_device_get_object_path(device), "/object/path");
- ASSERT_STREQ (indicator_power_device_get_icon(device), "icon");
ASSERT_EQ ((int)indicator_power_device_get_percentage(device), 50);
ASSERT_EQ (indicator_power_device_get_time(device), 30);
@@ -192,7 +182,6 @@ TEST_F(DeviceTest, BadAccessors)
IndicatorPowerDevice * device = NULL;
indicator_power_device_get_kind (device);
indicator_power_device_get_time (device);
- indicator_power_device_get_icon (device);
indicator_power_device_get_state (device);
indicator_power_device_get_percentage (device);
indicator_power_device_get_object_path (device);
@@ -201,7 +190,6 @@ TEST_F(DeviceTest, BadAccessors)
device = reinterpret_cast<IndicatorPowerDevice*>(g_cancellable_new ());
indicator_power_device_get_kind (device);
indicator_power_device_get_time (device);
- indicator_power_device_get_icon (device);
indicator_power_device_get_state (device);
indicator_power_device_get_percentage (device);
indicator_power_device_get_object_path (device);
diff --git a/tests/test-indicator.cc b/tests/test-indicator.cc
index 32d6f4f..b9f7321 100644
--- a/tests/test-indicator.cc
+++ b/tests/test-indicator.cc
@@ -61,13 +61,11 @@ class IndicatorTest : public ::testing::Test
ac_device = indicator_power_device_new (
"/org/freedesktop/UPower/devices/line_power_AC",
UP_DEVICE_KIND_LINE_POWER,
- ". GThemedIcon ac-adapter-symbolic ac-adapter ",
0.0, UP_DEVICE_STATE_UNKNOWN, 0);
battery_device = indicator_power_device_new (
"/org/freedesktop/UPower/devices/battery_BAT0",
UP_DEVICE_KIND_BATTERY,
- ". GThemedIcon battery-good-symbolic gpm-battery-060 battery-good ",
52.871712, UP_DEVICE_STATE_DISCHARGING, 8834);
}
@@ -238,7 +236,6 @@ TEST_F(IndicatorTest, AvoidChargingBatteriesWithZeroSecondsLeft)
IndicatorPowerDevice * bad_battery_device = indicator_power_device_new (
"/org/freedesktop/UPower/devices/battery_BAT0",
UP_DEVICE_KIND_BATTERY,
- ". GThemedIcon battery-good-symbolic gpm-battery-060 battery-good ",
53, UP_DEVICE_STATE_CHARGING, 0);
GSList * devices = NULL;
@@ -262,34 +259,34 @@ TEST_F(IndicatorTest, OtherDevices)
devices = g_slist_append (devices, indicator_power_device_new (
"/org/freedesktop/UPower/devices/mouse", UP_DEVICE_KIND_MOUSE,
- "unused", 0, UP_DEVICE_STATE_UNKNOWN, 0));
+ 0, UP_DEVICE_STATE_UNKNOWN, 0));
devices = g_slist_append (devices, indicator_power_device_new (
"/org/freedesktop/UPower/devices/ups", UP_DEVICE_KIND_UPS,
- "unused", 0, UP_DEVICE_STATE_UNKNOWN, 0));
+ 0, UP_DEVICE_STATE_UNKNOWN, 0));
devices = g_slist_append (devices, indicator_power_device_new (
"/org/freedesktop/UPower/devices/keyboard", UP_DEVICE_KIND_KEYBOARD,
- "unused", 0, UP_DEVICE_STATE_UNKNOWN, 0));
+ 0, UP_DEVICE_STATE_UNKNOWN, 0));
devices = g_slist_append (devices, indicator_power_device_new (
"/org/freedesktop/UPower/devices/pda", UP_DEVICE_KIND_PDA,
- "unused", 0, UP_DEVICE_STATE_UNKNOWN, 0));
+ 0, UP_DEVICE_STATE_UNKNOWN, 0));
devices = g_slist_append (devices, indicator_power_device_new (
"/org/freedesktop/UPower/devices/phone", UP_DEVICE_KIND_PHONE,
- "unused", 0, UP_DEVICE_STATE_UNKNOWN, 0));
+ 0, UP_DEVICE_STATE_UNKNOWN, 0));
devices = g_slist_append (devices, indicator_power_device_new (
"/org/freedesktop/UPower/devices/monitor", UP_DEVICE_KIND_MONITOR,
- "unused", 0, UP_DEVICE_STATE_UNKNOWN, 0));
+ 0, UP_DEVICE_STATE_UNKNOWN, 0));
devices = g_slist_append (devices, indicator_power_device_new (
"/org/freedesktop/UPower/devices/media_player", UP_DEVICE_KIND_MEDIA_PLAYER,
- "unused", 0, UP_DEVICE_STATE_UNKNOWN, 0));
+ 0, UP_DEVICE_STATE_UNKNOWN, 0));
devices = g_slist_append (devices, indicator_power_device_new (
"/org/freedesktop/UPower/devices/tablet", UP_DEVICE_KIND_TABLET,
- "unused", 0, UP_DEVICE_STATE_UNKNOWN, 0));
+ 0, UP_DEVICE_STATE_UNKNOWN, 0));
devices = g_slist_append (devices, indicator_power_device_new (
"/org/freedesktop/UPower/devices/computer", UP_DEVICE_KIND_COMPUTER,
- "unused", 0, UP_DEVICE_STATE_UNKNOWN, 0));
+ 0, UP_DEVICE_STATE_UNKNOWN, 0));
devices = g_slist_append (devices, indicator_power_device_new (
"/org/freedesktop/UPower/devices/unknown", UP_DEVICE_KIND_UNKNOWN,
- "unused", 0, UP_DEVICE_STATE_UNKNOWN, 0));
+ 0, UP_DEVICE_STATE_UNKNOWN, 0));
indicator_power_set_devices (power, devices);