Use TestSuite for startup in audioproc_unittest's custom main().

TESTED=invoked audioproc_unittest with an absolute path in a working directory outside the tree.

Review URL: https://webrtc-codereview.appspot.com/897006

git-svn-id: http://webrtc.googlecode.com/svn/trunk@2942 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
andrew@webrtc.org 2012-10-17 23:30:18 +00:00
parent 66daa252df
commit 8a7396fe6c

View File

@ -19,6 +19,7 @@
#include "module_common_types.h"
#include "scoped_ptr.h"
#include "signal_processing_library.h"
#include "test/test_suite.h"
#include "test/testsupport/fileutils.h"
#include "thread_wrapper.h"
#include "trace.h"
@ -1422,17 +1423,16 @@ TEST_F(ApmTest, Process) {
} // namespace
int main(int argc, char** argv) {
::testing::InitGoogleTest(&argc, argv);
for (int i = 1; i < argc; i++) {
if (strcmp(argv[i], "--write_ref_data") == 0) {
write_ref_data = true;
}
}
int err = RUN_ALL_TESTS();
webrtc::test::TestSuite test_suite(argc, argv);
int error = test_suite.Run();
// Optional, but removes memory leak noise from Valgrind.
google::protobuf::ShutdownProtobufLibrary();
return err;
return error;
}