aboutsummaryrefslogtreecommitdiff
path: root/tests/volume-control-test.cc
diff options
context:
space:
mode:
authorcharles kerr <charlesk@canonical.com>2015-12-19 16:01:46 -0600
committercharles kerr <charlesk@canonical.com>2015-12-19 16:01:46 -0600
commit4b695bacf20b7247f6b16483ede5e5d8b51dd355 (patch)
tree498ae73530a5aba219866f129f0420f9fabfb18a /tests/volume-control-test.cc
parentaee4659081bbca43cb3e7d11bc3263e530876a86 (diff)
downloadayatana-indicator-sound-4b695bacf20b7247f6b16483ede5e5d8b51dd355.tar.gz
ayatana-indicator-sound-4b695bacf20b7247f6b16483ede5e5d8b51dd355.tar.bz2
ayatana-indicator-sound-4b695bacf20b7247f6b16483ede5e5d8b51dd355.zip
move max_volume into a reusable 'options' class
Diffstat (limited to 'tests/volume-control-test.cc')
-rw-r--r--tests/volume-control-test.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/volume-control-test.cc b/tests/volume-control-test.cc
index 5022245..2d07746 100644
--- a/tests/volume-control-test.cc
+++ b/tests/volume-control-test.cc
@@ -23,6 +23,7 @@
extern "C" {
#include "indicator-sound-service.h"
+#include "vala-mocks.h"
}
class VolumeControlTest : public ::testing::Test
@@ -75,7 +76,8 @@ class VolumeControlTest : public ::testing::Test
};
TEST_F(VolumeControlTest, BasicObject) {
- VolumeControlPulse * control = volume_control_pulse_new();
+ auto options = options_mock_new();
+ auto control = volume_control_pulse_new(INDICATOR_SOUND_OPTIONS(options));
/* Setup the PA backend */
loop(100);
@@ -84,4 +86,5 @@ TEST_F(VolumeControlTest, BasicObject) {
EXPECT_TRUE(volume_control_get_ready(VOLUME_CONTROL(control)));
g_clear_object(&control);
+ g_clear_object(&options);
}