VoEVolumeTest: Adds error return tests.
BUG=367 TESTED=trybots, voe_auto_test R=henrikg@webrtc.org Review URL: https://webrtc-codereview.appspot.com/19469006 git-svn-id: http://webrtc.googlecode.com/svn/trunk@6139 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
934a265a47
commit
06c1d6f3a1
@ -31,6 +31,23 @@ class VolumeTest : public AfterStreamingFixture {
|
||||
// investigation in
|
||||
// http://code.google.com/p/webrtc/issues/detail?id=367
|
||||
|
||||
TEST_F(VolumeTest, VerifyCorrectErrorReturns) {
|
||||
// All tests run on correct initialization which eliminates one possible error
|
||||
// return. In addition, we assume the audio_device returning values without
|
||||
// error, which eliminates another potential error.
|
||||
// Left to verify are sanity checks of set parameters.
|
||||
|
||||
// Valid volume range: [0, 255]
|
||||
EXPECT_EQ(-1, voe_volume_control_->SetSpeakerVolume(256));
|
||||
EXPECT_EQ(-1, voe_volume_control_->SetMicVolume(256));
|
||||
|
||||
// Valid panning rage: [0, 1]
|
||||
EXPECT_EQ(-1, voe_volume_control_->SetOutputVolumePan(channel_, -0.1f, 0.5f));
|
||||
EXPECT_EQ(-1, voe_volume_control_->SetOutputVolumePan(channel_, 1.1f, 0.5f));
|
||||
EXPECT_EQ(-1, voe_volume_control_->SetOutputVolumePan(channel_, 0.5f, -0.1f));
|
||||
EXPECT_EQ(-1, voe_volume_control_->SetOutputVolumePan(channel_, 0.5f, 1.1f));
|
||||
}
|
||||
|
||||
TEST_F(VolumeTest, DefaultSpeakerVolumeIsAtMost255) {
|
||||
unsigned int volume = 1000;
|
||||
EXPECT_EQ(0, voe_volume_control_->GetSpeakerVolume(volume));
|
||||
|
Loading…
Reference in New Issue
Block a user