proxygen
TestMain.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015-present, Facebook, Inc.
3  * All rights reserved.
4  *
5  * This source code is licensed under the BSD-style license found in the
6  * LICENSE file in the root directory of this source tree. An additional grant
7  * of patent rights can be found in the PATENTS file in the same directory.
8  *
9  */
10 // Use this main function in gtest unit tests to enable glog
13 #include <glog/logging.h>
14 
15 int main(int argc, char* argv[]) {
16  testing::InitGoogleTest(&argc, argv);
17  gflags::ParseCommandLineFlags(&argc, &argv, true);
18  google::InitGoogleLogging(argv[0]);
19  google::InstallFailureSignalHandler();
20  LOG(INFO) << "Running tests from TestMain.cpp";
21  return RUN_ALL_TESTS();
22 }
int RUN_ALL_TESTS() GTEST_MUST_USE_RESULT_
Definition: gtest.h:2232
char ** argv
FOLLY_ATTR_WEAK int main(int argc, char **argv)
Definition: TestMain.cpp:30
GTEST_API_ void InitGoogleTest(int *argc, char **argv)
Definition: gtest.cc:5370