Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
googletest
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
googletest
Commits
757d39a7
Commit
757d39a7
authored
Oct 28, 2019
by
Abseil Team
Committed by
vslashg
Oct 29, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Googletest export
Make it clearer that users should _not_ write their own main functions. PiperOrigin-RevId: 277079721
parent
b5fb5ba0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
primer.md
googletest/docs/primer.md
+7
-1
No files found.
googletest/docs/primer.md
View file @
757d39a7
...
@@ -478,7 +478,13 @@ If a fatal failure happens the subsequent steps will be skipped.
...
@@ -478,7 +478,13 @@ If a fatal failure happens the subsequent steps will be skipped.
## Writing the main() Function
## 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()`
.
`RUN_ALL_TESTS()`
.
You can start from this boilerplate:
You can start from this boilerplate:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment