aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2015-01-12 15:47:27 -0600
committerCharles Kerr <charles.kerr@canonical.com>2015-01-12 15:47:27 -0600
commitd989c88526f6640c8c336ecc1472314987412e54 (patch)
treeb33c5f77da9a8a20ec2b1d5ac93caa72b74b1206 /tests
parent4f07f00f39d65d07aac0a5ad26a13dada38dd490 (diff)
downloadayatana-indicator-power-d989c88526f6640c8c336ecc1472314987412e54.tar.gz
ayatana-indicator-power-d989c88526f6640c8c336ecc1472314987412e54.tar.bz2
ayatana-indicator-power-d989c88526f6640c8c336ecc1472314987412e54.zip
round power level to the nearest 10% to take advantage of higher-resolution power level icons
Diffstat (limited to 'tests')
-rw-r--r--tests/test-device.cc22
1 files changed, 20 insertions, 2 deletions
diff --git a/tests/test-device.cc b/tests/test-device.cc
index fbeb1c0..e929f89 100644
--- a/tests/test-device.cc
+++ b/tests/test-device.cc
@@ -297,7 +297,6 @@ TEST_F(DeviceTest, IconNames)
g_object_set (o, INDICATOR_POWER_DEVICE_KIND, kind,
INDICATOR_POWER_DEVICE_STATE, UP_DEVICE_STATE_EMPTY,
NULL);
-
g_string_append_printf (expected, "%s-empty-symbolic;", kind_str);
g_string_append_printf (expected, "gpm-%s-empty;", kind_str);
g_string_append_printf (expected, "gpm-%s-000;", kind_str);
@@ -323,7 +322,6 @@ TEST_F(DeviceTest, IconNames)
INDICATOR_POWER_DEVICE_STATE, UP_DEVICE_STATE_CHARGING,
INDICATOR_POWER_DEVICE_PERCENTAGE, 95.0,
NULL);
-
g_string_append_printf (expected, "%s-100-charging;", kind_str);
g_string_append_printf (expected, "gpm-%s-100-charging;", kind_str);
g_string_append_printf (expected, "%s-full-charging-symbolic;", kind_str);
@@ -336,6 +334,8 @@ TEST_F(DeviceTest, IconNames)
INDICATOR_POWER_DEVICE_STATE, UP_DEVICE_STATE_CHARGING,
INDICATOR_POWER_DEVICE_PERCENTAGE, 85.0,
NULL);
+ g_string_append_printf (expected, "%s-090-charging;", kind_str);
+ g_string_append_printf (expected, "gpm-%s-090-charging;", kind_str);
g_string_append_printf (expected, "%s-080-charging;", kind_str);
g_string_append_printf (expected, "gpm-%s-080-charging;", kind_str);
g_string_append_printf (expected, "%s-full-charging-symbolic;", kind_str);
@@ -348,6 +348,8 @@ TEST_F(DeviceTest, IconNames)
INDICATOR_POWER_DEVICE_STATE, UP_DEVICE_STATE_CHARGING,
INDICATOR_POWER_DEVICE_PERCENTAGE, 50.0,
NULL);
+ g_string_append_printf (expected, "%s-050-charging;", kind_str);
+ g_string_append_printf (expected, "gpm-%s-050-charging;", kind_str);
g_string_append_printf (expected, "%s-060-charging;", kind_str);
g_string_append_printf (expected, "gpm-%s-060-charging;", kind_str);
g_string_append_printf (expected, "%s-good-charging-symbolic;", kind_str);
@@ -360,6 +362,8 @@ TEST_F(DeviceTest, IconNames)
INDICATOR_POWER_DEVICE_STATE, UP_DEVICE_STATE_CHARGING,
INDICATOR_POWER_DEVICE_PERCENTAGE, 25.0,
NULL);
+ g_string_append_printf (expected, "%s-030-charging;", kind_str);
+ g_string_append_printf (expected, "gpm-%s-030-charging;", kind_str);
g_string_append_printf (expected, "%s-020-charging;", kind_str);
g_string_append_printf (expected, "gpm-%s-020-charging;", kind_str);
g_string_append_printf (expected, "%s-low-charging-symbolic;", kind_str);
@@ -372,6 +376,8 @@ TEST_F(DeviceTest, IconNames)
INDICATOR_POWER_DEVICE_STATE, UP_DEVICE_STATE_CHARGING,
INDICATOR_POWER_DEVICE_PERCENTAGE, 5.0,
NULL);
+ g_string_append_printf (expected, "%s-010-charging;", kind_str);
+ g_string_append_printf (expected, "gpm-%s-010-charging;", kind_str);
g_string_append_printf (expected, "%s-000-charging;", kind_str);
g_string_append_printf (expected, "gpm-%s-000-charging;", kind_str);
g_string_append_printf (expected, "%s-caution-charging-symbolic;", kind_str);
@@ -396,6 +402,8 @@ TEST_F(DeviceTest, IconNames)
INDICATOR_POWER_DEVICE_STATE, UP_DEVICE_STATE_DISCHARGING,
INDICATOR_POWER_DEVICE_PERCENTAGE, 85.0,
NULL);
+ g_string_append_printf (expected, "%s-090;", kind_str);
+ g_string_append_printf (expected, "gpm-%s-090;", kind_str);
g_string_append_printf (expected, "%s-080;", kind_str);
g_string_append_printf (expected, "gpm-%s-080;", kind_str);
g_string_append_printf (expected, "%s-full-symbolic;", kind_str);
@@ -409,6 +417,8 @@ TEST_F(DeviceTest, IconNames)
INDICATOR_POWER_DEVICE_PERCENTAGE, 50.0,
INDICATOR_POWER_DEVICE_TIME, guint64(60*60),
NULL);
+ g_string_append_printf (expected, "%s-050;", kind_str);
+ g_string_append_printf (expected, "gpm-%s-050;", kind_str);
g_string_append_printf (expected, "%s-060;", kind_str);
g_string_append_printf (expected, "gpm-%s-060;", kind_str);
g_string_append_printf (expected, "%s-good-symbolic;", kind_str);
@@ -422,6 +432,8 @@ TEST_F(DeviceTest, IconNames)
INDICATOR_POWER_DEVICE_PERCENTAGE, 25.0,
INDICATOR_POWER_DEVICE_TIME, guint64(60*60),
NULL);
+ g_string_append_printf (expected, "%s-030;", kind_str);
+ g_string_append_printf (expected, "gpm-%s-030;", kind_str);
g_string_append_printf (expected, "%s-020;", kind_str);
g_string_append_printf (expected, "gpm-%s-020;", kind_str);
g_string_append_printf (expected, "%s-low-symbolic;", kind_str);
@@ -435,6 +447,8 @@ TEST_F(DeviceTest, IconNames)
INDICATOR_POWER_DEVICE_PERCENTAGE, 25.0,
INDICATOR_POWER_DEVICE_TIME, guint64(60*15),
NULL);
+ g_string_append_printf (expected, "%s-030;", kind_str);
+ g_string_append_printf (expected, "gpm-%s-030;", kind_str);
g_string_append_printf (expected, "%s-020;", kind_str);
g_string_append_printf (expected, "gpm-%s-020;", kind_str);
g_string_append_printf (expected, "%s-low-symbolic;", kind_str);
@@ -448,6 +462,8 @@ TEST_F(DeviceTest, IconNames)
INDICATOR_POWER_DEVICE_PERCENTAGE, 5.0,
INDICATOR_POWER_DEVICE_TIME, guint64(60*60),
NULL);
+ g_string_append_printf (expected, "%s-010;", kind_str);
+ g_string_append_printf (expected, "gpm-%s-010;", kind_str);
g_string_append_printf (expected, "%s-000;", kind_str);
g_string_append_printf (expected, "gpm-%s-000;", kind_str);
g_string_append_printf (expected, "%s-caution-symbolic;", kind_str);
@@ -461,6 +477,8 @@ TEST_F(DeviceTest, IconNames)
INDICATOR_POWER_DEVICE_PERCENTAGE, 5.0,
INDICATOR_POWER_DEVICE_TIME, guint64(60*15),
NULL);
+ g_string_append_printf (expected, "%s-010;", kind_str);
+ g_string_append_printf (expected, "gpm-%s-010;", kind_str);
g_string_append_printf (expected, "%s-000;", kind_str);
g_string_append_printf (expected, "gpm-%s-000;", kind_str);
g_string_append_printf (expected, "%s-caution-symbolic;", kind_str);