diff options
-rw-r--r-- | googlemock/README.md | 12 | ||||
-rw-r--r-- | googlemock/docs/cheat_sheet.md (renamed from googlemock/docs/CheatSheet.md) | 0 | ||||
-rw-r--r-- | googlemock/docs/cook_book.md | 8 | ||||
-rw-r--r-- | googlemock/docs/design_doc.md (renamed from googlemock/docs/DesignDoc.md) | 0 | ||||
-rw-r--r-- | googlemock/docs/documentation.md (renamed from googlemock/docs/Documentation.md) | 7 | ||||
-rw-r--r-- | googlemock/docs/for_dummies.md (renamed from googlemock/docs/ForDummies.md) | 8 | ||||
-rw-r--r-- | googlemock/docs/frequently_asked_questions.md (renamed from googlemock/docs/FrequentlyAskedQuestions.md) | 2 | ||||
-rw-r--r-- | googlemock/docs/known_issues.md (renamed from googlemock/docs/KnownIssues.md) | 0 | ||||
-rw-r--r-- | googletest/docs/advanced.md | 2 |
9 files changed, 20 insertions, 19 deletions
diff --git a/googlemock/README.md b/googlemock/README.md index 6465fc6..36f8776 100644 --- a/googlemock/README.md +++ b/googlemock/README.md @@ -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 diff --git a/googlemock/docs/CheatSheet.md b/googlemock/docs/cheat_sheet.md index d09d910..d09d910 100644 --- a/googlemock/docs/CheatSheet.md +++ b/googlemock/docs/cheat_sheet.md diff --git a/googlemock/docs/cook_book.md b/googlemock/docs/cook_book.md index 6b0228a..d040209 100644 --- a/googlemock/docs/cook_book.md +++ b/googlemock/docs/cook_book.md @@ -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 @@ -229,7 +229,7 @@ If a mock method has no `EXPECT_CALL` spec but is called, Google Mock will print a warning about the "uninteresting call". The rationale is: * New methods may be added to an interface after a test is written. We shouldn't fail a test just because a method it doesn't know about is called. - * However, this may also mean there's a bug in the test, so Google Mock shouldn't be silent either. If the user believes these calls are harmless, they can add an `EXPECT_CALL()` to suppress the warning. + * However, this may also mean there's a bug in the test, so Google Mock shouldn't be silent either. (Note that the user should [*not* add an `EXPECT_CALL()`](https://github.com/google/googletest/blob/master/googlemock/docs/CookBook.md#knowing-when-to-expect) to suppress the warning, even if they think the call is harmless). However, sometimes you may want to suppress all "uninteresting call" warnings, while sometimes you may want the opposite, i.e. to treat all @@ -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 diff --git a/googlemock/docs/DesignDoc.md b/googlemock/docs/design_doc.md index 4cddc9d..4cddc9d 100644 --- a/googlemock/docs/DesignDoc.md +++ b/googlemock/docs/design_doc.md diff --git a/googlemock/docs/Documentation.md b/googlemock/docs/documentation.md index af8a3b9..831598c 100644 --- a/googlemock/docs/Documentation.md +++ b/googlemock/docs/documentation.md @@ -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: diff --git a/googlemock/docs/ForDummies.md b/googlemock/docs/for_dummies.md index c8a83cb..2110531 100644 --- a/googlemock/docs/ForDummies.md +++ b/googlemock/docs/for_dummies.md @@ -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: diff --git a/googlemock/docs/FrequentlyAskedQuestions.md b/googlemock/docs/frequently_asked_questions.md index 7b7ba0f..de1ad2a 100644 --- a/googlemock/docs/FrequentlyAskedQuestions.md +++ b/googlemock/docs/frequently_asked_questions.md @@ -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? ## diff --git a/googlemock/docs/KnownIssues.md b/googlemock/docs/known_issues.md index adadf51..adadf51 100644 --- a/googlemock/docs/KnownIssues.md +++ b/googlemock/docs/known_issues.md diff --git a/googletest/docs/advanced.md b/googletest/docs/advanced.md index 603777c..d0f1bfa 100644 --- a/googletest/docs/advanced.md +++ b/googletest/docs/advanced.md @@ -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, |