Call AllowCommandLineReparsing in unit tests.

Allows us to ignore flags passed on to us by Chromium build bots
without having to explicitly disable them. (Thanks pbos!)

TESTED=Running modules_unittests with a bogus flag did not result in an
error.
TBR=kjellander

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4757 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
andrew@webrtc.org 2013-09-17 00:54:09 +00:00
parent b3af8aea3e
commit 15e979b571

View File

@ -25,8 +25,9 @@ TestSuite::TestSuite(int argc, char** argv)
: trace_to_stderr_(NULL) {
SetExecutablePath(argv[0]);
testing::InitGoogleMock(&argc, argv); // Runs InitGoogleTest() internally.
// ParseCommandLineFlags fails on unrecognized flags. Call it last so that
// any flags inteded for gtest are already filtered out.
// AllowCommandLineParsing allows us to ignore flags passed on to us by
// Chromium build bots without having to explicitly disable them.
google::AllowCommandLineReparsing();
google::ParseCommandLineFlags(&argc, &argv, true);
}