aboutsummaryrefslogtreecommitdiffstats
path: root/googletest/docs
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2019-10-28 12:31:27 -0400
committervslashg <gfalcon@google.com>2019-10-29 16:51:22 -0400
commit757d39a79bcb3194a42ad9279dba5f56e84dda66 (patch)
tree170ef6d7dde0a7b226fca004938d930f1ff49109 /googletest/docs
parentb5fb5ba05cb6144f17be58b9dba8a35ba022876a (diff)
downloadgoogletest-757d39a79bcb3194a42ad9279dba5f56e84dda66.tar.gz
googletest-757d39a79bcb3194a42ad9279dba5f56e84dda66.tar.bz2
googletest-757d39a79bcb3194a42ad9279dba5f56e84dda66.zip
Googletest export
Make it clearer that users should _not_ write their own main functions. PiperOrigin-RevId: 277079721
Diffstat (limited to 'googletest/docs')
-rw-r--r--googletest/docs/primer.md8
1 files changed, 7 insertions, 1 deletions
diff --git a/googletest/docs/primer.md b/googletest/docs/primer.md
index 0317692b..51394024 100644
--- a/googletest/docs/primer.md
+++ b/googletest/docs/primer.md
@@ -478,7 +478,13 @@ If a fatal failure happens the subsequent steps will be skipped.
## Writing the main() Function
-Write your own main() function, which should return the value of
+Most users should _not_ need to write their own `main` function and instead link
+with `gtest_main` (as opposed to with `gtest`), which defines a suitable entry
+point. See the end of this section for details. The remainder of this section
+should only apply when you need to do something custom before the tests run that
+cannot be expressed within the framework of fixtures and test suites.
+
+If you write your own `main` function, it should return the value of
`RUN_ALL_TESTS()`.
You can start from this boilerplate: