aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSebastien Bacher <seb128@ubuntu.com>2012-10-03 21:25:19 +0200
committerSebastien Bacher <seb128@ubuntu.com>2012-10-03 21:25:19 +0200
commit0fa9b264b7d79f9bb303b9383379635bb293cf3d (patch)
tree7d96d9ebf8662e55078d0d323a92ddae65b95ce8 /tests
parentc752cbea418bf5f85a0498fe3771439e1b70c394 (diff)
parent3a0758a29fdae434142e1a67329ff2b65fee3c6b (diff)
downloadayatana-indicator-power-0fa9b264b7d79f9bb303b9383379635bb293cf3d.tar.gz
ayatana-indicator-power-0fa9b264b7d79f9bb303b9383379635bb293cf3d.tar.bz2
ayatana-indicator-power-0fa9b264b7d79f9bb303b9383379635bb293cf3d.zip
Import upstream version 12.10.2
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.in2
-rw-r--r--tests/test-device.cc31
2 files changed, 22 insertions, 11 deletions
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 4a20f80..6d5a918 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11.5 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
diff --git a/tests/test-device.cc b/tests/test-device.cc
index 2c88ea1..eb087dc 100644
--- a/tests/test-device.cc
+++ b/tests/test-device.cc
@@ -252,9 +252,12 @@ TEST_F(DeviceTest, IconNames)
g_object_set (o, INDICATOR_POWER_DEVICE_KIND, UP_DEVICE_KIND_BATTERY,
INDICATOR_POWER_DEVICE_STATE, UP_DEVICE_STATE_FULLY_CHARGED,
NULL);
- check_icon_names (device, "battery-full-charged-symbolic;battery-full-charging-symbolic;"
- "gpm-battery-full;gpm-battery-100;"
- "battery-full-charged;battery-full-charging");
+ check_icon_names (device, "battery-full-charged-symbolic;"
+ "battery-full-charging-symbolic;"
+ "gpm-battery-full;"
+ "gpm-battery-100;"
+ "battery-full-charged;"
+ "battery-full-charging");
// charging battery, 95%
g_object_set (o, INDICATOR_POWER_DEVICE_KIND, UP_DEVICE_KIND_BATTERY,
@@ -307,8 +310,9 @@ TEST_F(DeviceTest, IconNames)
INDICATOR_POWER_DEVICE_STATE, UP_DEVICE_STATE_DISCHARGING,
INDICATOR_POWER_DEVICE_PERCENTAGE, 95.0,
NULL);
- check_icon_names (device, "battery-full-symbolic;"
+ check_icon_names (device, "battery-100;"
"gpm-battery-100;"
+ "battery-full-symbolic;"
"battery-full");
// discharging battery, 85%
@@ -316,8 +320,9 @@ TEST_F(DeviceTest, IconNames)
INDICATOR_POWER_DEVICE_STATE, UP_DEVICE_STATE_DISCHARGING,
INDICATOR_POWER_DEVICE_PERCENTAGE, 85.0,
NULL);
- check_icon_names (device, "battery-full-symbolic;"
+ check_icon_names (device, "battery-080;"
"gpm-battery-080;"
+ "battery-full-symbolic;"
"battery-full");
// discharging battery, 50% -- 1 hour left
@@ -326,8 +331,9 @@ TEST_F(DeviceTest, IconNames)
INDICATOR_POWER_DEVICE_PERCENTAGE, 50.0,
INDICATOR_POWER_DEVICE_TIME, (guint64)(60*60),
NULL);
- check_icon_names (device, "battery-good-symbolic;"
+ check_icon_names (device, "battery-060;"
"gpm-battery-060;"
+ "battery-good-symbolic;"
"battery-good");
// discharging battery, 25% -- 1 hour left
@@ -336,8 +342,9 @@ TEST_F(DeviceTest, IconNames)
INDICATOR_POWER_DEVICE_PERCENTAGE, 25.0,
INDICATOR_POWER_DEVICE_TIME, (guint64)(60*60),
NULL);
- check_icon_names (device, "battery-good-symbolic;"
+ check_icon_names (device, "battery-040;"
"gpm-battery-040;"
+ "battery-good-symbolic;"
"battery-good");
// discharging battery, 25% -- 15 minutes left
@@ -346,8 +353,9 @@ TEST_F(DeviceTest, IconNames)
INDICATOR_POWER_DEVICE_PERCENTAGE, 25.0,
INDICATOR_POWER_DEVICE_TIME, (guint64)(60*15),
NULL);
- check_icon_names (device, "battery-low-symbolic;"
+ check_icon_names (device, "battery-020;"
"gpm-battery-020;"
+ "battery-low-symbolic;"
"battery-low");
// discharging battery, 5% -- 1 hour left
@@ -356,8 +364,9 @@ TEST_F(DeviceTest, IconNames)
INDICATOR_POWER_DEVICE_PERCENTAGE, 5.0,
INDICATOR_POWER_DEVICE_TIME, (guint64)(60*60),
NULL);
- check_icon_names (device, "battery-good-symbolic;"
+ check_icon_names (device, "battery-040;"
"gpm-battery-040;"
+ "battery-good-symbolic;"
"battery-good");
// discharging battery, 5% -- 15 minutes left
@@ -366,9 +375,11 @@ TEST_F(DeviceTest, IconNames)
INDICATOR_POWER_DEVICE_PERCENTAGE, 5.0,
INDICATOR_POWER_DEVICE_TIME, (guint64)(60*15),
NULL);
- check_icon_names (device, "battery-caution-symbolic;"
+ check_icon_names (device, "battery-000;"
"gpm-battery-000;"
+ "battery-caution-symbolic;"
"battery-caution");
+
// state unknown
g_object_set (o, INDICATOR_POWER_DEVICE_KIND, UP_DEVICE_KIND_BATTERY,
INDICATOR_POWER_DEVICE_STATE, UP_DEVICE_STATE_UNKNOWN,