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

Unified Diff: webrtc/modules/audio_coding/neteq/neteq_stereo_unittest.cc

Issue 1532903002: Reenables several NetEq unittests on android. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressed review comments. Created 5 years 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/modules/audio_coding/neteq/neteq_stereo_unittest.cc
diff --git a/webrtc/modules/audio_coding/neteq/neteq_stereo_unittest.cc b/webrtc/modules/audio_coding/neteq/neteq_stereo_unittest.cc
index e02e92dd8fd4ba99b83d5419007c5fab1cf0c27b..85d7a84800ddf490a9efe1d7de1855c0c205c949 100644
--- a/webrtc/modules/audio_coding/neteq/neteq_stereo_unittest.cc
+++ b/webrtc/modules/audio_coding/neteq/neteq_stereo_unittest.cc
@@ -162,7 +162,7 @@ class NetEqStereoTest : public ::testing::TestWithParam<TestParameters> {
return next_send_time;
}
- void VerifyOutput(size_t num_samples) {
+ virtual void VerifyOutput(size_t num_samples) {
for (size_t i = 0; i < num_samples; ++i) {
for (int j = 0; j < num_channels_; ++j) {
ASSERT_EQ(output_[i], output_multi_channel_[i * num_channels_ + j]) <<
@@ -276,7 +276,7 @@ class NetEqStereoTestNoJitter : public NetEqStereoTest {
}
};
-TEST_P(NetEqStereoTestNoJitter, DISABLED_ON_ANDROID(RunTest)) {
+TEST_P(NetEqStereoTestNoJitter, RunTest) {
RunTest(8);
}
@@ -301,7 +301,7 @@ class NetEqStereoTestPositiveDrift : public NetEqStereoTest {
double drift_factor;
};
-TEST_P(NetEqStereoTestPositiveDrift, DISABLED_ON_ANDROID(RunTest)) {
+TEST_P(NetEqStereoTestPositiveDrift, RunTest) {
RunTest(100);
}
@@ -314,7 +314,7 @@ class NetEqStereoTestNegativeDrift : public NetEqStereoTestPositiveDrift {
}
};
-TEST_P(NetEqStereoTestNegativeDrift, DISABLED_ON_ANDROID(RunTest)) {
+TEST_P(NetEqStereoTestNegativeDrift, RunTest) {
RunTest(100);
}
@@ -342,7 +342,7 @@ class NetEqStereoTestDelays : public NetEqStereoTest {
int frame_index_;
};
-TEST_P(NetEqStereoTestDelays, DISABLED_ON_ANDROID(RunTest)) {
+TEST_P(NetEqStereoTestDelays, RunTest) {
RunTest(1000);
}
@@ -358,10 +358,25 @@ class NetEqStereoTestLosses : public NetEqStereoTest {
return (++frame_index_) % kLossInterval == 0;
}
+ // TODO(hlundin): NetEq is not giving bitexact results for these cases.
+ virtual void VerifyOutput(size_t num_samples) {
+ for (size_t i = 0; i < num_samples; ++i) {
+ auto first_channel_sample = output_multi_channel_[i * num_channels_];
+ for (int j = 0; j < num_channels_; ++j) {
+ const int error_margin = 200;
minyue-webrtc 2015/12/18 15:32:29 Nit: compiler time constant can name as kErrorMagi
ivoc 2016/01/18 15:36:46 Done.
+ EXPECT_NEAR(output_[i], output_multi_channel_[i * num_channels_ + j],
+ error_margin)
+ << "Diff in sample " << i << ", channel " << j << ".";
+ EXPECT_EQ(first_channel_sample,
+ output_multi_channel_[i * num_channels_ + j]);
+ }
+ }
+ }
+
int frame_index_;
};
-TEST_P(NetEqStereoTestLosses, DISABLED_ON_ANDROID(RunTest)) {
+TEST_P(NetEqStereoTestLosses, RunTest) {
RunTest(100);
}
« no previous file with comments | « resources/audio_coding/neteq4_universal_ref_android.pcm.sha1 ('k') | webrtc/modules/audio_coding/neteq/neteq_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698