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
486a4a6b
Commit
486a4a6b
authored
Apr 09, 2021
by
Abseil Team
Committed by
Dino Radaković
Apr 12, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Googletest export
Adds a warning about anonymous namespaces in relation to private testing. PiperOrigin-RevId: 367730808
parent
c3fc92f0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
advanced.md
docs/advanced.md
+5
-4
No files found.
docs/advanced.md
View file @
486a4a6b
...
@@ -1741,10 +1741,11 @@ To test them, we use the following special techniques:
...
@@ -1741,10 +1741,11 @@ To test them, we use the following special techniques:
}
}
```
```
Pay special attention when your class is defined in a namespace, as you
Pay special attention when your class is defined in a namespace. If you want
should define your test fixtures and tests in the same namespace if you want
your test fixtures and tests to be friends of your class, then they must be
them to be friends of your class. For example, if the code to be tested
defined in the exact same namespace (no anonymous or inline namespaces).
looks like:
For example, if the code to be tested looks like:
```c++
```c++
namespace my_namespace {
namespace my_namespace {
...
...
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