From 83cebb25d7ac71edf79e52287c57decb2fe18bc6 Mon Sep 17 00:00:00 2001 From: "henrike@webrtc.org" Date: Thu, 27 Jun 2013 18:31:13 +0000 Subject: [PATCH] Removes unused main function that is poluting the build. BUG=N/A R=andrew@webrtc.org Review URL: https://webrtc-codereview.appspot.com/1728005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4276 4adac7df-926f-26a2-2b94-8c16560cd09d --- .../audio_processing/test/unit_test.cc | 23 +++++-------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/webrtc/modules/audio_processing/test/unit_test.cc b/webrtc/modules/audio_processing/test/unit_test.cc index 78191c1cd2..ad53117107 100644 --- a/webrtc/modules/audio_processing/test/unit_test.cc +++ b/webrtc/modules/audio_processing/test/unit_test.cc @@ -51,7 +51,9 @@ namespace { // When false, this will compare the output data with the results stored to // file. This is the typical case. When the file should be updated, it can // be set to true with the command-line switch --write_ref_data. +#ifdef WEBRTC_AUDIOPROC_BIT_EXACT bool write_ref_data = false; +#endif const int kSampleRates[] = {8000, 16000, 32000}; const size_t kSampleRatesSize = sizeof(kSampleRates) / sizeof(*kSampleRates); @@ -1580,21 +1582,8 @@ TEST_F(ApmTest, Process) { } #endif // WEBRTC_AUDIOPROC_BIT_EXACT +// TODO(henrike): re-implement functionality lost when removing the old main +// function. See +// https://code.google.com/p/webrtc/issues/detail?id=1981 + } // namespace - -int main(int argc, char** argv) { - for (int i = 1; i < argc; i++) { - if (strcmp(argv[i], "--write_ref_data") == 0) { - write_ref_data = true; - } - } - - // We don't use TestSuite here because it would require the Android platform - // build to depend on Gmock. - webrtc::test::SetExecutablePath(argv[0]); - testing::InitGoogleTest(&argc, argv); - int result = RUN_ALL_TESTS(); - // Optional, but removes memory leak noise from Valgrind. - google::protobuf::ShutdownProtobufLibrary(); - return result; -}