Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(286)

Unified Diff: webrtc/voice_engine/test/auto_test/standard/external_media_test.cc

Issue 1172163004: Reformat existing code. There should be no functional effects. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Resync Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
« webrtc/system_wrappers/interface/aligned_array.h ('K') | « webrtc/tools/agc/activity_metric.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698