summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2021-04-09 17:11:57 -0700
committerDino Radaković <dinor@google.com>2021-04-12 20:14:27 -0700
commit486a4a6be5565e89ae0d72f532c441423110bc9e (patch)
tree28c2dcdf5962f93bd74fd636e8d227165e145832
parentc3fc92f0b7ad49ce59d804dc644dcb5ecbc0c29c (diff)
downloadgoogletest-486a4a6be5565e89ae0d72f532c441423110bc9e.tar.gz
googletest-486a4a6be5565e89ae0d72f532c441423110bc9e.zip
Googletest export
Adds a warning about anonymous namespaces in relation to private testing. PiperOrigin-RevId: 367730808
-rw-r--r--docs/advanced.md9
1 files changed, 5 insertions, 4 deletions
diff --git a/docs/advanced.md b/docs/advanced.md
index fa9e5bc2..ae4d7ee8 100644
--- a/docs/advanced.md
+++ b/docs/advanced.md
@@ -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
- should define your test fixtures and tests in the same namespace if you want
- them to be friends of your class. For example, if the code to be tested
- looks like:
+ Pay special attention when your class is defined in a namespace. If you want
+ your test fixtures and tests to be friends of your class, then they must be
+ defined in the exact same namespace (no anonymous or inline namespaces).
+
+ For example, if the code to be tested looks like:
```c++
namespace my_namespace {
OpenPOWER on IntegriCloud