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

Unified Diff: webrtc/modules/audio_processing/audio_processing_unittest.cc

Issue 2507713002: Modify audio_processing_unittest to use ResourcePath instead of ProjectRootPath. (Closed)
Patch Set: Fixed a bug where only the tests in the first shard were run. Created 4 years, 1 month 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
« no previous file with comments | « webrtc/modules/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_processing/audio_processing_unittest.cc
diff --git a/webrtc/modules/audio_processing/audio_processing_unittest.cc b/webrtc/modules/audio_processing/audio_processing_unittest.cc
index fb2f214bedaf671468a8bb4376122137140966b7..f64e5b79bb0bc315dc8f66741be7024fadf8a1a2 100644
--- a/webrtc/modules/audio_processing/audio_processing_unittest.cc
+++ b/webrtc/modules/audio_processing/audio_processing_unittest.cc
@@ -391,7 +391,6 @@ class ApmTest : public ::testing::Test {
void VerifyDebugDumpTest(Format format);
const std::string output_path_;
- const std::string ref_path_;
const std::string ref_filename_;
std::unique_ptr<AudioProcessing> apm_;
AudioFrame* frame_;
@@ -407,21 +406,15 @@ class ApmTest : public ::testing::Test {
ApmTest::ApmTest()
: output_path_(test::OutputPath()),
-#ifndef WEBRTC_IOS
- ref_path_(test::ProjectRootPath() + "data/audio_processing/"),
-#else
- // On iOS test data is flat in the project root dir
- ref_path_(test::ProjectRootPath()),
-#endif
#if defined(WEBRTC_AUDIOPROC_FIXED_PROFILE)
- ref_filename_(ref_path_ + "output_data_fixed.pb"),
+ ref_filename_(test::ResourcePath("fake_lemur_path", "pb")),
#elif defined(WEBRTC_AUDIOPROC_FLOAT_PROFILE)
#if defined(WEBRTC_MAC)
// A different file for Mac is needed because on this platform the AEC
// constant |kFixedDelayMs| value is 20 and not 50 as it is on the rest.
- ref_filename_(ref_path_ + "output_data_mac.pb"),
+ ref_filename_(test::ResourcePath("fake_lemur_path", "pb")),
#else
- ref_filename_(ref_path_ + "output_data_float.pb"),
+ ref_filename_(test::ResourcePath("fake_lemur_path", "pb")),
#endif
#endif
frame_(NULL),
@@ -431,6 +424,7 @@ ApmTest::ApmTest()
far_file_(NULL),
near_file_(NULL),
out_file_(NULL) {
+ fprintf(stderr, "ref_filename: %s\n", ref_filename_.c_str());
Config config;
config.Set<ExperimentalAgc>(new ExperimentalAgc(false));
apm_.reset(AudioProcessing::Create(config));
« no previous file with comments | « webrtc/modules/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698