mirror of
https://github.com/google/googletest.git
synced 2025-01-10 05:58:33 +08:00
parent
07c4753a17
commit
40f82ce56a
@ -477,11 +477,8 @@ If a fatal failure happens the subsequent steps will be skipped.
|
|||||||
|
|
||||||
## Writing the main() Function
|
## Writing the main() Function
|
||||||
|
|
||||||
In `google3`, the simplest approach is to use the default main() function
|
Write your own main() function, which should
|
||||||
provided by linking in `"//testing/base/public:gtest_main"`. If that doesn't
|
return the value of `RUN_ALL_TESTS()`
|
||||||
cover what you need, you should write your own main() function, which should
|
|
||||||
return the value of `RUN_ALL_TESTS()`. Link to `"//testing/base/public:gunit"`.
|
|
||||||
You can start from this boilerplate:
|
|
||||||
|
|
||||||
```c++
|
```c++
|
||||||
#include "this/package/foo.h"
|
#include "this/package/foo.h"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user