aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test-device.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test-device.cc b/tests/test-device.cc
index 70beeb7..0102185 100644
--- a/tests/test-device.cc
+++ b/tests/test-device.cc
@@ -156,3 +156,17 @@ TEST(DeviceTest, NewFromVariant)
g_object_unref (device);
g_variant_unref (variant);
}
+
+TEST(DeviceTest, BadAccessors)
+{
+ ensure_glib_initialized ();
+
+ // test that these functions can handle being passed NULL pointers
+ IndicatorPowerDevice * device = NULL;
+ indicator_power_device_get_kind(device);
+ indicator_power_device_get_state(device);
+ indicator_power_device_get_object_path(device);
+ indicator_power_device_get_icon(device);
+ indicator_power_device_get_percentage(device);
+ indicator_power_device_get_time(device);
+}