summaryrefslogtreecommitdiffstats
path: root/googletest/docs/advanced.md
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2019-08-01 19:04:08 (GMT)
committerGennadiy Civil <misterg@google.com>2019-08-01 20:06:11 (GMT)
commit8756ef905878f727e8122ba25f483c887cbc3c17 (patch)
treee96756a5e5e7f2d45494b59649197fdf908e9a37 /googletest/docs/advanced.md
parentda28d30191e429e233f6b837448db22847fad109 (diff)
downloadgoogletest-8756ef905878f727e8122ba25f483c887cbc3c17.zip
googletest-8756ef905878f727e8122ba25f483c887cbc3c17.tar.gz
googletest-8756ef905878f727e8122ba25f483c887cbc3c17.tar.bz2
Googletest export
Add links to "sampleK_unittest.cc" examples. Fix some broken docs crosslinks. PiperOrigin-RevId: 261169561
Diffstat (limited to 'googletest/docs/advanced.md')
-rw-r--r--googletest/docs/advanced.md24
1 files changed, 17 insertions, 7 deletions
diff --git a/googletest/docs/advanced.md b/googletest/docs/advanced.md
index f8624c0..f48e4b4 100644
--- a/googletest/docs/advanced.md
+++ b/googletest/docs/advanced.md
@@ -399,7 +399,8 @@ and you're ready to go.
### More String Assertions
-(Please read the [previous](#AssertThat) section first if you haven't.)
+(Please read the [previous](#asserting-using-gmock-matchers) section first if
+you haven't.)
You can use the gMock
[string matchers](../../googlemock/docs/cheat_sheet.md#string-matchers) with
@@ -1407,7 +1408,10 @@ Please note that `INSTANTIATE_TEST_SUITE_P` will instantiate *all* tests in the
given test suite, whether their definitions come before or *after* the
`INSTANTIATE_TEST_SUITE_P` statement.
-You can see sample7_unittest.cc and sample8_unittest.cc for more examples.
+You can see [sample7_unittest.cc] and [sample8_unittest.cc] for more examples.
+
+[sample7_unittest.cc]: ../samples/sample7_unittest.cc "Parameterized Test example"
+[sample8_unittest.cc]: ../samples/sample8_unittest.cc "Parameterized Test example with multiple parameters"
### Creating Value-Parameterized Abstract Tests
@@ -1446,7 +1450,7 @@ returns the value of `testing::PrintToString(GetParam())`. It does not work for
NOTE: test names must be non-empty, unique, and may only contain ASCII
alphanumeric characters. In particular, they
-[should not contain underscores](https://github.com/google/googletest/blob/master/googletest/docs/faq.md#why-should-test-suite-names-and-test-names-not-contain-underscore)
+[should not contain underscores](faq.md#why-should-test-suite-names-and-test-names-not-contain-underscore)
```c++
class MyTestSuite : public testing::TestWithParam<int> {};
@@ -1555,7 +1559,9 @@ TYPED_TEST(FooTest, DoesBlah) {
TYPED_TEST(FooTest, HasPropertyA) { ... }
```
-You can see sample6_unittest.cc
+You can see [sample6_unittest.cc] for a complete example.
+
+[sample6_unittest.cc]: ../samples/sample6_unittest.cc "Typed Test example"
## Type-Parameterized Tests
@@ -1630,7 +1636,7 @@ that type directly without `::testing::Types<...>`, like this:
INSTANTIATE_TYPED_TEST_SUITE_P(My, FooTest, int);
```
-You can see `sample6_unittest.cc` for a complete example.
+You can see [sample6_unittest.cc] for a complete example.
## Testing Private Code
@@ -1998,7 +2004,9 @@ You can do so by adding one line:
```
Now, sit back and enjoy a completely different output from your tests. For more
-details, you can read this sample9_unittest.cc
+details, see [sample9_unittest.cc].
+
+[sample9_unittest.cc]: ../samples/sample9_unittest.cc "Event listener example"
You may append more than one listener to the list. When an `On*Start()` or
`OnTestPartResult()` event is fired, the listeners will receive it in the order
@@ -2023,7 +2031,9 @@ handle `OnTestPartResult()` *before* listeners that can generate failures. This
ensures that failures generated by the latter are attributed to the right test
by the former.
-We have a sample of failure-raising listener sample10_unittest.cc
+See [sample10_unittest.cc] for an example of a failure-raising listener.
+
+[sample10_unittest.cc]: ../samples/sample10_unittest.cc "Failure-raising listener example"
## Running Test Programs: Advanced Options