Move output_mixer_unittest.cc to utility_unittest.cc.

This reflects a move of the tested code in:
https://webrtc-codereview.appspot.com/11019005/

TBR=xians

Review URL: https://webrtc-codereview.appspot.com/11449004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5866 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
andrew@webrtc.org 2014-04-08 23:09:28 +00:00
parent f4c9444c65
commit a78a41f985
2 changed files with 8 additions and 8 deletions

View File

@ -25,9 +25,9 @@ enum FunctionToTest {
TestDownConvertToCodecFormat TestDownConvertToCodecFormat
}; };
class OutputMixerTest : public ::testing::Test { class UtilityTest : public ::testing::Test {
protected: protected:
OutputMixerTest() { UtilityTest() {
src_frame_.sample_rate_hz_ = 16000; src_frame_.sample_rate_hz_ = 16000;
src_frame_.samples_per_channel_ = src_frame_.sample_rate_hz_ / 100; src_frame_.samples_per_channel_ = src_frame_.sample_rate_hz_ / 100;
src_frame_.num_channels_ = 1; src_frame_.num_channels_ = 1;
@ -126,7 +126,7 @@ void VerifyFramesAreEqual(const AudioFrame& ref_frame,
} }
} }
void OutputMixerTest::RunResampleTest(int src_channels, void UtilityTest::RunResampleTest(int src_channels,
int src_sample_rate_hz, int src_sample_rate_hz,
int dst_channels, int dst_channels,
int dst_sample_rate_hz, int dst_sample_rate_hz,
@ -190,7 +190,7 @@ void OutputMixerTest::RunResampleTest(int src_channels,
} }
} }
TEST_F(OutputMixerTest, RemixAndResampleCopyFrameSucceeds) { TEST_F(UtilityTest, RemixAndResampleCopyFrameSucceeds) {
// Stereo -> stereo. // Stereo -> stereo.
SetStereoFrame(&src_frame_, 10, 10); SetStereoFrame(&src_frame_, 10, 10);
SetStereoFrame(&dst_frame_, 0, 0); SetStereoFrame(&dst_frame_, 0, 0);
@ -204,7 +204,7 @@ TEST_F(OutputMixerTest, RemixAndResampleCopyFrameSucceeds) {
VerifyFramesAreEqual(src_frame_, dst_frame_); VerifyFramesAreEqual(src_frame_, dst_frame_);
} }
TEST_F(OutputMixerTest, RemixAndResampleMixingOnlySucceeds) { TEST_F(UtilityTest, RemixAndResampleMixingOnlySucceeds) {
// Stereo -> mono. // Stereo -> mono.
SetStereoFrame(&dst_frame_, 0, 0); SetStereoFrame(&dst_frame_, 0, 0);
SetMonoFrame(&src_frame_, 10); SetMonoFrame(&src_frame_, 10);
@ -220,7 +220,7 @@ TEST_F(OutputMixerTest, RemixAndResampleMixingOnlySucceeds) {
VerifyFramesAreEqual(golden_frame_, dst_frame_); VerifyFramesAreEqual(golden_frame_, dst_frame_);
} }
TEST_F(OutputMixerTest, RemixAndResampleSucceeds) { TEST_F(UtilityTest, RemixAndResampleSucceeds) {
const int kSampleRates[] = {8000, 16000, 32000, 44100, 48000, 96000}; const int kSampleRates[] = {8000, 16000, 32000, 44100, 48000, 96000};
const int kSampleRatesSize = sizeof(kSampleRates) / sizeof(*kSampleRates); const int kSampleRatesSize = sizeof(kSampleRates) / sizeof(*kSampleRates);
const int kChannels[] = {1, 2}; const int kChannels[] = {1, 2};
@ -238,7 +238,7 @@ TEST_F(OutputMixerTest, RemixAndResampleSucceeds) {
} }
} }
TEST_F(OutputMixerTest, ConvertToCodecFormatSucceeds) { TEST_F(UtilityTest, ConvertToCodecFormatSucceeds) {
const int kSampleRates[] = {8000, 16000, 32000, 44100, 48000, 96000}; const int kSampleRates[] = {8000, 16000, 32000, 44100, 48000, 96000};
const int kSampleRatesSize = sizeof(kSampleRates) / sizeof(*kSampleRates); const int kSampleRatesSize = sizeof(kSampleRates) / sizeof(*kSampleRates);
const int kChannels[] = {1, 2}; const int kChannels[] = {1, 2};

View File

@ -124,8 +124,8 @@
], ],
'sources': [ 'sources': [
'channel_unittest.cc', 'channel_unittest.cc',
'output_mixer_unittest.cc',
'transmit_mixer_unittest.cc', 'transmit_mixer_unittest.cc',
'utility_unittest.cc',
'voe_audio_processing_unittest.cc', 'voe_audio_processing_unittest.cc',
'voe_base_unittest.cc', 'voe_base_unittest.cc',
'voe_codec_unittest.cc', 'voe_codec_unittest.cc',