Merge pull request #2326 from kuzkry/missing-references-to-documentation

Add missing references to documentation
This commit is contained in:
Gennadiy Civil 2019-07-15 13:29:29 -04:00 committed by GitHub
commit 5c4d53fd52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 19 additions and 18 deletions

View File

@ -55,21 +55,21 @@ documentation in the following order:
* Learn the [basics](../googletest/docs/primer.md) of
Google Test, if you choose to use Google Mock with it (recommended).
* Read [Google Mock for Dummies](../googlemock/docs/ForDummies.md).
* Read [Google Mock for Dummies](../googlemock/docs/for_dummies.md).
* Read the instructions below on how to build Google Mock.
You can also watch Zhanyong's [talk](http://www.youtube.com/watch?v=sYpCyLI47rM) on Google Mock's usage and implementation.
Once you understand the basics, check out the rest of the docs:
* [CheatSheet](../googlemock/docs/CheatSheet.md) - all the commonly used stuff
* [CheatSheet](../googlemock/docs/cheat_sheet.md) - all the commonly used stuff
at a glance.
* [CookBook](../googlemock/docs/cook_book.md) - recipes for getting things done,
including advanced techniques.
If you need help, please check the
[KnownIssues](docs/KnownIssues.md) and
[FrequentlyAskedQuestions](docs/FrequentlyAskedQuestions.md) before
[KnownIssues](docs/known_issues.md) and
[FrequentlyAskedQuestions](docs/frequently_asked_questions.md) before
posting a question on the
[discussion group](http://groups.google.com/group/googlemock).
@ -79,7 +79,7 @@ posting a question on the
Google Mock is not a testing framework itself. Instead, it needs a
testing framework for writing tests. Google Mock works seamlessly
with [Google Test](https://github.com/google/googletest), but
you can also use it with [any C++ testing framework](../googlemock/docs/ForDummies.md#using-google-mock-with-any-testing-framework).
you can also use it with [any C++ testing framework](../googlemock/docs/for_dummies.md#using-google-mock-with-any-testing-framework).
### Requirements for End Users ###
@ -90,7 +90,7 @@ You must use the bundled version of Google Test when using Google Mock.
You can also easily configure Google Mock to work with another testing
framework, although it will still need Google Test. Please read
["Using_Google_Mock_with_Any_Testing_Framework"](
../googlemock/docs/ForDummies.md#using-google-mock-with-any-testing-framework)
../googlemock/docs/for_dummies.md#using-google-mock-with-any-testing-framework)
for instructions.
Google Mock depends on advanced C++ features and thus requires a more

View File

@ -3,7 +3,7 @@
<!-- GOOGLETEST_CM0011 DO NOT DELETE -->
You can find recipes for using Google Mock here. If you haven't yet,
please read the [ForDummies](ForDummies.md) document first to make sure you understand
please read the [ForDummies](for_dummies.md) document first to make sure you understand
the basics.
**Note:** Google Mock lives in the `testing` name space. For
@ -866,7 +866,7 @@ says that `Blah()` will be called with arguments `x`, `y`, and `z` where
`x < y < z`.
As a convenience and example, Google Mock provides some matchers for
2-tuples, including the `Lt()` matcher above. See the [CheatSheet](CheatSheet.md) for
2-tuples, including the `Lt()` matcher above. See the [CheatSheet](cheat_sheet.md) for
the complete list.
Note that if you want to pass the arguments to a predicate of your own
@ -1391,7 +1391,7 @@ instead of being overly constraining.
Google Mock allows you to impose an arbitrary DAG (directed acyclic
graph) on the calls. One way to express the DAG is to use the
[After](CheatSheet.md#the-after-clause) clause of `EXPECT_CALL`.
[After](cheat_sheet.md#the-after-clause) clause of `EXPECT_CALL`.
Another way is via the `InSequence()` clause (not the same as the
`InSequence` class), which we borrowed from jMock 2. It's less

View File

@ -4,10 +4,11 @@ current git version)**
documentation for that specific version instead (e.g. by checking out
the respective git branch/tag).**
* [ForDummies](ForDummies.md) -- start here if you are new to Google Mock.
* [CheatSheet](CheatSheet.md) -- a quick reference.
* [ForDummies](for_dummies.md) -- start here if you are new to Google Mock.
* [CheatSheet](cheat_sheet.md) -- a quick reference.
* [CookBook](cook_book.md) -- recipes for doing various tasks using Google Mock.
* [FrequentlyAskedQuestions](FrequentlyAskedQuestions.md) -- check here before asking a question on the mailing list.
* [DesignDoc](design_doc.md) -- design of and rationale behind some Google Mock features.
* [FrequentlyAskedQuestions](frequently_asked_questions.md) and [KnownIssues](known_issues.md) -- check here before asking a question on the mailing list.
To contribute code to Google Mock, read:

View File

@ -1,6 +1,6 @@
(**Note:** If you get compiler errors that you don't understand, be sure to consult [Google Mock Doctor](FrequentlyAskedQuestions.md#how-am-i-supposed-to-make-sense-of-these-horrible-template-errors).)
(**Note:** If you get compiler errors that you don't understand, be sure to consult [Google Mock Doctor](frequently_asked_questions.md#how-am-i-supposed-to-make-sense-of-these-horrible-template-errors).)
# What Is Google C++ Mocking Framework? #
When you write a prototype or test, often it's not feasible or wise to rely on real objects entirely. A **mock object** implements the same interface as a real object (so it can be used as one), but lets you specify at run time how it will be used and what it should do (which methods will be called? in which order? how many times? with what arguments? what will they return? etc).
@ -249,7 +249,7 @@ EXPECT_CALL(turtle, Forward(_));
`_` is an instance of what we call **matchers**. A matcher is like a predicate and can test whether an argument is what we'd expect. You can use a matcher inside `EXPECT_CALL()` wherever a function argument is expected.
A list of built-in matchers can be found in the [CheatSheet](CheatSheet.md). For example, here's the `Ge` (greater than or equal) matcher:
A list of built-in matchers can be found in the [CheatSheet](cheat_sheet.md). For example, here's the `Ge` (greater than or equal) matcher:
```cpp
using ::testing::Ge;
@ -264,7 +264,7 @@ The first clause we can specify following an `EXPECT_CALL()` is `Times()`. We ca
An interesting special case is when we say `Times(0)`. You may have guessed - it means that the function shouldn't be called with the given arguments at all, and Google Mock will report a Google Test failure whenever the function is (wrongfully) called.
We've seen `AtLeast(n)` as an example of fuzzy cardinalities earlier. For the list of built-in cardinalities you can use, see the [CheatSheet](CheatSheet.md).
We've seen `AtLeast(n)` as an example of fuzzy cardinalities earlier. For the list of built-in cardinalities you can use, see the [CheatSheet](cheat_sheet.md).
The `Times()` clause can be omitted. **If you omit `Times()`, Google Mock will infer the cardinality for you.** The rules are easy to remember:
@ -305,7 +305,7 @@ says that `turtle.GetY()` will be called _at least twice_ (Google Mock knows thi
Of course, if you explicitly write a `Times()`, Google Mock will not try to infer the cardinality itself. What if the number you specified is larger than there are `WillOnce()` clauses? Well, after all `WillOnce()`s are used up, Google Mock will do the _default_ action for the function every time (unless, of course, you have a `WillRepeatedly()`.).
What can we do inside `WillOnce()` besides `Return()`? You can return a reference using `ReturnRef(variable)`, or invoke a pre-defined function, among [others](CheatSheet.md#actions).
What can we do inside `WillOnce()` besides `Return()`? You can return a reference using `ReturnRef(variable)`, or invoke a pre-defined function, among [others](cheat_sheet.md#actions).
**Important note:** The `EXPECT_CALL()` statement evaluates the action clause only once, even though the action may be performed many times. Therefore you must be careful about side effects. The following may not do what you want:

View File

@ -206,7 +206,7 @@ need any help.
Google Mock works out of the box with Google Test. However, it's easy
to configure it to work with any testing framework of your choice.
[Here](ForDummies.md#using-google-mock-with-any-testing-framework) is how.
[Here](for_dummies.md#using-google-mock-with-any-testing-framework) is how.
## How am I supposed to make sense of these horrible template errors? ##

View File

@ -429,7 +429,7 @@ and you're ready to go.
(Please read the [previous](#asserting-using-gmock-matchers) section first if you haven't.)
You can use the gMock [string matchers](../../googlemock/docs/CheatSheet.md#string-matchers)
You can use the gMock [string matchers](../../googlemock/docs/cheat_sheet.md#string-matchers)
with `EXPECT_THAT()` or `ASSERT_THAT()` to do more string comparison tricks
(sub-string, prefix, suffix, regular expression, and etc). For example,