summaryrefslogtreecommitdiffstats
path: root/googletest/docs/advanced.md
diff options
context:
space:
mode:
Diffstat (limited to 'googletest/docs/advanced.md')
-rw-r--r--googletest/docs/advanced.md18
1 files changed, 9 insertions, 9 deletions
diff --git a/googletest/docs/advanced.md b/googletest/docs/advanced.md
index 0a92e52..8065d19 100644
--- a/googletest/docs/advanced.md
+++ b/googletest/docs/advanced.md
@@ -572,7 +572,7 @@ namespace foo {
class Bar { // We want googletest to be able to print instances of this.
...
// Create a free inline friend function.
- friend ::std::ostream& operator<<(::std::ostream& os, const Bar& bar) {
+ friend std::ostream& operator<<(std::ostream& os, const Bar& bar) {
return os << bar.DebugString(); // whatever needed to print bar to os
}
};
@@ -580,7 +580,7 @@ class Bar { // We want googletest to be able to print instances of this.
// If you can't declare the function in the class it's important that the
// << operator is defined in the SAME namespace that defines Bar. C++'s look-up
// rules rely on that.
-::std::ostream& operator<<(::std::ostream& os, const Bar& bar) {
+std::ostream& operator<<(std::ostream& os, const Bar& bar) {
return os << bar.DebugString(); // whatever needed to print bar to os
}
@@ -601,7 +601,7 @@ namespace foo {
class Bar {
...
- friend void PrintTo(const Bar& bar, ::std::ostream* os) {
+ friend void PrintTo(const Bar& bar, std::ostream* os) {
*os << bar.DebugString(); // whatever needed to print bar to os
}
};
@@ -609,7 +609,7 @@ class Bar {
// If you can't declare the function in the class it's important that PrintTo()
// is defined in the SAME namespace that defines Bar. C++'s look-up rules rely
// on that.
-void PrintTo(const Bar& bar, ::std::ostream* os) {
+void PrintTo(const Bar& bar, std::ostream* os) {
*os << bar.DebugString(); // whatever needed to print bar to os
}
@@ -649,7 +649,7 @@ _death tests_. More generally, any test that checks that a program terminates
Note that if a piece of code throws an exception, we don't consider it "death"
for the purpose of death tests, as the caller of the code could catch the
exception and avoid the crash. If you want to verify exceptions thrown by your
-code, see [Exception Assertions](#ExceptionAssertions).
+code, see [Exception Assertions](#exception-assertions).
If you want to test `EXPECT_*()/ASSERT_*()` failures in your test code, see
Catching Failures
@@ -1147,7 +1147,7 @@ test has at least one failure of either kind.
In your test code, you can call `RecordProperty("key", value)` to log additional
information, where `value` can be either a string or an `int`. The *last* value
-recorded for a key will be emitted to the [XML output](#XmlReport) if you
+recorded for a key will be emitted to the [XML output](#generating-an-xml-report) if you
specify one. For example, the test
```c++
@@ -1424,7 +1424,7 @@ will have these names:
* `InstantiationName/FooTest.HasBlahBlah/1` for `"miny"`
* `InstantiationName/FooTest.HasBlahBlah/2` for `"moe"`
-You can use these names in [`--gtest_filter`](#TestFilter).
+You can use these names in [`--gtest_filter`](#running-a-subset-of-the-tests).
This statement will instantiate all tests from `FooTest` again, each with
parameter values `"cat"` and `"dog"`:
@@ -1674,7 +1674,7 @@ To test them, we use the following special techniques:
* Both static functions and definitions/declarations in an unnamed namespace
are only visible within the same translation unit. To test them, you can
`#include` the entire `.cc` file being tested in your `*_test.cc` file.
- (#including `.cc` files is not a good way to reuse code - you should not do
+ (including `.cc` files is not a good way to reuse code - you should not do
this in production code!)
However, a better approach is to move the private code into the
@@ -2120,7 +2120,7 @@ $ foo_test --gtest_repeat=1000 --gtest_filter=FooBar.*
Repeat the tests whose name matches the filter 1000 times.
```
-If your test program contains [global set-up/tear-down](#GlobalSetUp) code, it
+If your test program contains [global set-up/tear-down](#global-set-up-and-tear-down) code, it
will be repeated in each iteration as well, as the flakiness may be in it. You
can also specify the repeat count by setting the `GTEST_REPEAT` environment
variable.