diff options
author | charles kerr <charlesk@canonical.com> | 2015-12-29 11:03:41 -0600 |
---|---|---|
committer | charles kerr <charlesk@canonical.com> | 2015-12-29 11:03:41 -0600 |
commit | 707fd6c5e2d5bdfa6ff1b87f770c1d0b8e8d0894 (patch) | |
tree | 4f72226af74858f8d7bff587d0c8f83a76bee48f /tests | |
parent | 8d806b211d28140734aaa387cb6c1652945ea003 (diff) | |
download | ayatana-indicator-sound-707fd6c5e2d5bdfa6ff1b87f770c1d0b8e8d0894.tar.gz ayatana-indicator-sound-707fd6c5e2d5bdfa6ff1b87f770c1d0b8e8d0894.tar.bz2 ayatana-indicator-sound-707fd6c5e2d5bdfa6ff1b87f770c1d0b8e8d0894.zip |
break volume-warning into an abstract base and concrete pulse-based impl
Diffstat (limited to 'tests')
-rw-r--r-- | tests/volume-control-test.cc | 4 | ||||
-rw-r--r-- | tests/volume-warning-mock.vala | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/tests/volume-control-test.cc b/tests/volume-control-test.cc index 2d07746..11fa4ff 100644 --- a/tests/volume-control-test.cc +++ b/tests/volume-control-test.cc @@ -77,7 +77,8 @@ class VolumeControlTest : public ::testing::Test TEST_F(VolumeControlTest, BasicObject) { auto options = options_mock_new(); - auto control = volume_control_pulse_new(INDICATOR_SOUND_OPTIONS(options)); + auto pgloop = pa_glib_mainloop_new(NULL); + auto control = volume_control_pulse_new(INDICATOR_SOUND_OPTIONS(options), pgloop); /* Setup the PA backend */ loop(100); @@ -87,4 +88,5 @@ TEST_F(VolumeControlTest, BasicObject) { g_clear_object(&control); g_clear_object(&options); + g_clear_pointer(&pgloop, pa_glib_mainloop_free); } diff --git a/tests/volume-warning-mock.vala b/tests/volume-warning-mock.vala index e680b3f..c14784d 100644 --- a/tests/volume-warning-mock.vala +++ b/tests/volume-warning-mock.vala @@ -25,4 +25,8 @@ public class VolumeWarningMock : VolumeWarning public VolumeWarningMock(IndicatorSound.Options options) { base(options); } + + protected override void sound_system_set_multimedia_volume(PulseAudio.Volume volume) { + GLib.message("volume-warning-mock setting multimedia volume to %d", (int)volume); + } } |