proxygen
CMakeTestMain.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-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.
7  */
8 
9 #include <folly/init/Init.h>
11 
12 /*
13  * This is the recommended main function for all tests.
14  * The Makefile links it into all of the test programs so that tests do not need
15  * to - and indeed should typically not - define their own main() functions
16  */
17 #ifndef _MSC_VER
18 int main(int argc, char** argv) __attribute__((__weak__));
19 #endif
20 
21 int main(int argc, char** argv) {
22  ::testing::InitGoogleTest(&argc, argv);
23  folly::init(&argc, &argv);
24  return RUN_ALL_TESTS();
25 }
int main(int argc, char **argv) __attribute__((__weak__))
int RUN_ALL_TESTS() GTEST_MUST_USE_RESULT_
Definition: gtest.h:2232
void init(int *argc, char ***argv, bool removeFlags)
Definition: Init.cpp:34
char ** argv
__attribute__((noinline, noclone)) VirtualBase *makeVirtual()
GTEST_API_ void InitGoogleTest(int *argc, char **argv)
Definition: gtest.cc:5370