diff options
Diffstat (limited to 'tests/test-device.cc')
-rw-r--r-- | tests/test-device.cc | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/tests/test-device.cc b/tests/test-device.cc index 0102185..3a7e8d0 100644 --- a/tests/test-device.cc +++ b/tests/test-device.cc @@ -163,10 +163,20 @@ TEST(DeviceTest, BadAccessors) // 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); + 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); + + // test that these functions can handle being passed non-device GObjects + device = 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); + g_object_unref (device); } |