| Index: webrtc/voice_engine/test/auto_test/standard/external_media_test.cc
|
| diff --git a/webrtc/voice_engine/test/auto_test/standard/external_media_test.cc b/webrtc/voice_engine/test/auto_test/standard/external_media_test.cc
|
| index af814998927cbafe0bc1dd6fc115c6ca17f603b2..f586b0e42d91a625b95f723bad8394b02ddbb8a3 100644
|
| --- a/webrtc/voice_engine/test/auto_test/standard/external_media_test.cc
|
| +++ b/webrtc/voice_engine/test/auto_test/standard/external_media_test.cc
|
| @@ -8,6 +8,7 @@
|
| * be found in the AUTHORS file in the root of the source tree.
|
| */
|
|
|
| +#include "webrtc/base/arraysize.h"
|
| #include "webrtc/modules/interface/module_common_types.h"
|
| #include "webrtc/voice_engine/include/voe_external_media.h"
|
| #include "webrtc/voice_engine/test/auto_test/fakes/fake_media_process.h"
|
| @@ -81,8 +82,8 @@ TEST_F(ExternalMediaTest,
|
| EXPECT_EQ(0, voe_xmedia_->SetExternalMixing(channel_, true));
|
| ResumePlaying();
|
| EXPECT_EQ(0, voe_xmedia_->GetAudioFrame(channel_, 0, &frame));
|
| - EXPECT_LT(0, frame.sample_rate_hz_);
|
| - EXPECT_LT(0, frame.samples_per_channel_);
|
| + EXPECT_GT(frame.sample_rate_hz_, 0);
|
| + EXPECT_GT(frame.samples_per_channel_, 0);
|
| PausePlaying();
|
| EXPECT_EQ(0, voe_xmedia_->SetExternalMixing(channel_, false));
|
| ResumePlaying();
|
| @@ -95,7 +96,7 @@ TEST_F(ExternalMediaTest,
|
| PausePlaying();
|
| EXPECT_EQ(0, voe_xmedia_->SetExternalMixing(channel_, true));
|
| ResumePlaying();
|
| - for (size_t i = 0; i < sizeof(kValidFrequencies) / sizeof(int); i++) {
|
| + for (size_t i = 0; i < arraysize(kValidFrequencies); i++) {
|
| int f = kValidFrequencies[i];
|
| EXPECT_EQ(0, voe_xmedia_->GetAudioFrame(channel_, f, &frame))
|
| << "Resampling succeeds for freq=" << f;
|
| @@ -114,7 +115,7 @@ TEST_F(ExternalMediaTest,
|
| PausePlaying();
|
| EXPECT_EQ(0, voe_xmedia_->SetExternalMixing(channel_, true));
|
| ResumePlaying();
|
| - for (size_t i = 0; i < sizeof(kInvalidFrequencies) / sizeof(int); i++) {
|
| + for (size_t i = 0; i < arraysize(kInvalidFrequencies); i++) {
|
| int f = kInvalidFrequencies[i];
|
| EXPECT_EQ(-1, voe_xmedia_->GetAudioFrame(channel_, f, &frame))
|
| << "Resampling fails for freq=" << f;
|
|
|