aboutsummaryrefslogtreecommitdiff
path: root/tests/test-device.cc
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2012-06-01 13:38:16 -0500
committerCharles Kerr <charles.kerr@canonical.com>2012-06-01 13:38:16 -0500
commit560aa0ec6f3b4f845e6cc0e6b3c25197d1905794 (patch)
treebf323c76bf453d84afd1ad9e3ae633b58c9656f9 /tests/test-device.cc
parent7c3ac190e4542ddafc475375855b63142bef8e5c (diff)
downloadayatana-indicator-power-560aa0ec6f3b4f845e6cc0e6b3c25197d1905794.tar.gz
ayatana-indicator-power-560aa0ec6f3b4f845e6cc0e6b3c25197d1905794.tar.bz2
ayatana-indicator-power-560aa0ec6f3b4f845e6cc0e6b3c25197d1905794.zip
Add coverage test for AC Adapters in indicator_power_device_get_time_details()
Diffstat (limited to 'tests/test-device.cc')
-rw-r--r--tests/test-device.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test-device.cc b/tests/test-device.cc
index 3b3ff73..1233133 100644
--- a/tests/test-device.cc
+++ b/tests/test-device.cc
@@ -440,6 +440,14 @@ TEST_F(DeviceTest, Labels)
NULL);
check_strings (device, "(not present)", "Battery (not present)", "Battery (not present)");
+ /* power line */
+ g_object_set (o, INDICATOR_POWER_DEVICE_KIND, UP_DEVICE_KIND_LINE_POWER,
+ INDICATOR_POWER_DEVICE_STATE, UP_DEVICE_STATE_UNKNOWN,
+ INDICATOR_POWER_DEVICE_PERCENTAGE, 0.0,
+ INDICATOR_POWER_DEVICE_TIME, guint64(0),
+ NULL);
+ check_strings (device, "AC Adapter", "AC Adapter", "AC Adapter");
+
/* cleanup */
g_object_unref(o);
g_setenv ("LANG", real_lang, TRUE);