From 275bbc7884e9a12e9d9a46a95d5e1757c91d6313 Mon Sep 17 00:00:00 2001 From: Krystian Kuzniarek Date: Sat, 13 Jul 2019 07:47:14 +0200 Subject: [PATCH 1/7] rename and apply snake_case on CheatSheet.md --- googlemock/README.md | 2 +- googlemock/docs/Documentation.md | 2 +- googlemock/docs/ForDummies.md | 6 +++--- googlemock/docs/{CheatSheet.md => cheat_sheet.md} | 0 googlemock/docs/cook_book.md | 4 ++-- googletest/docs/advanced.md | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) rename googlemock/docs/{CheatSheet.md => cheat_sheet.md} (100%) diff --git a/googlemock/README.md b/googlemock/README.md index 6465fc6a..34a7ed99 100644 --- a/googlemock/README.md +++ b/googlemock/README.md @@ -62,7 +62,7 @@ You can also watch Zhanyong's [talk](http://www.youtube.com/watch?v=sYpCyLI47rM) 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. diff --git a/googlemock/docs/Documentation.md b/googlemock/docs/Documentation.md index af8a3b90..c2b00ba1 100644 --- a/googlemock/docs/Documentation.md +++ b/googlemock/docs/Documentation.md @@ -5,7 +5,7 @@ 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. + * [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. diff --git a/googlemock/docs/ForDummies.md b/googlemock/docs/ForDummies.md index c8a83cba..4b7551e9 100644 --- a/googlemock/docs/ForDummies.md +++ b/googlemock/docs/ForDummies.md @@ -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/CheatSheet.md b/googlemock/docs/cheat_sheet.md similarity index 100% rename from googlemock/docs/CheatSheet.md rename to googlemock/docs/cheat_sheet.md diff --git a/googlemock/docs/cook_book.md b/googlemock/docs/cook_book.md index 6b0228a5..f25b6817 100644 --- a/googlemock/docs/cook_book.md +++ b/googlemock/docs/cook_book.md @@ -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/googletest/docs/advanced.md b/googletest/docs/advanced.md index 603777c1..d0f1bfab 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, From 382cdf9162dd335b71f1e47e6be8244710c3c683 Mon Sep 17 00:00:00 2001 From: Krystian Kuzniarek Date: Sat, 13 Jul 2019 07:59:14 +0200 Subject: [PATCH 2/7] rename and apply snake_case on DesignDoc.md --- googlemock/docs/{DesignDoc.md => design_doc.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename googlemock/docs/{DesignDoc.md => design_doc.md} (100%) diff --git a/googlemock/docs/DesignDoc.md b/googlemock/docs/design_doc.md similarity index 100% rename from googlemock/docs/DesignDoc.md rename to googlemock/docs/design_doc.md From 6078089ef87cf4074daead5c53f5d15c8f5a79e7 Mon Sep 17 00:00:00 2001 From: Krystian Kuzniarek Date: Sat, 13 Jul 2019 08:05:22 +0200 Subject: [PATCH 3/7] rename and apply snake_case on Documentation.md --- googlemock/docs/{Documentation.md => documentation.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename googlemock/docs/{Documentation.md => documentation.md} (100%) diff --git a/googlemock/docs/Documentation.md b/googlemock/docs/documentation.md similarity index 100% rename from googlemock/docs/Documentation.md rename to googlemock/docs/documentation.md From 92d92f2f551541b8bbc74c39622f80e2479812aa Mon Sep 17 00:00:00 2001 From: Krystian Kuzniarek Date: Sat, 13 Jul 2019 08:08:58 +0200 Subject: [PATCH 4/7] rename and apply snake_case on ForDummies.md --- googlemock/README.md | 6 +++--- googlemock/docs/FrequentlyAskedQuestions.md | 2 +- googlemock/docs/cook_book.md | 2 +- googlemock/docs/documentation.md | 2 +- googlemock/docs/{ForDummies.md => for_dummies.md} | 0 5 files changed, 6 insertions(+), 6 deletions(-) rename googlemock/docs/{ForDummies.md => for_dummies.md} (100%) diff --git a/googlemock/README.md b/googlemock/README.md index 34a7ed99..05e6a7dd 100644 --- a/googlemock/README.md +++ b/googlemock/README.md @@ -55,7 +55,7 @@ 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. @@ -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/FrequentlyAskedQuestions.md b/googlemock/docs/FrequentlyAskedQuestions.md index 7b7ba0fb..de1ad2a2 100644 --- a/googlemock/docs/FrequentlyAskedQuestions.md +++ b/googlemock/docs/FrequentlyAskedQuestions.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/cook_book.md b/googlemock/docs/cook_book.md index f25b6817..4e20eaa7 100644 --- a/googlemock/docs/cook_book.md +++ b/googlemock/docs/cook_book.md @@ -3,7 +3,7 @@ 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 diff --git a/googlemock/docs/documentation.md b/googlemock/docs/documentation.md index c2b00ba1..f4456d53 100644 --- a/googlemock/docs/documentation.md +++ b/googlemock/docs/documentation.md @@ -4,7 +4,7 @@ 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. + * [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. diff --git a/googlemock/docs/ForDummies.md b/googlemock/docs/for_dummies.md similarity index 100% rename from googlemock/docs/ForDummies.md rename to googlemock/docs/for_dummies.md From 1d5b7cc1e2566e74fb288a61652114176bf65356 Mon Sep 17 00:00:00 2001 From: Krystian Kuzniarek Date: Sat, 13 Jul 2019 08:15:20 +0200 Subject: [PATCH 5/7] rename and apply snake_case on FrequentlyAskedQuestions.md --- googlemock/README.md | 2 +- googlemock/docs/documentation.md | 2 +- googlemock/docs/for_dummies.md | 2 +- ...requentlyAskedQuestions.md => frequently_asked_questions.md} | 0 4 files changed, 3 insertions(+), 3 deletions(-) rename googlemock/docs/{FrequentlyAskedQuestions.md => frequently_asked_questions.md} (100%) diff --git a/googlemock/README.md b/googlemock/README.md index 05e6a7dd..bd90caaf 100644 --- a/googlemock/README.md +++ b/googlemock/README.md @@ -69,7 +69,7 @@ Once you understand the basics, check out the rest of the docs: If you need help, please check the [KnownIssues](docs/KnownIssues.md) and -[FrequentlyAskedQuestions](docs/FrequentlyAskedQuestions.md) before +[FrequentlyAskedQuestions](docs/frequently_asked_questions.md) before posting a question on the [discussion group](http://groups.google.com/group/googlemock). diff --git a/googlemock/docs/documentation.md b/googlemock/docs/documentation.md index f4456d53..0f19e6fa 100644 --- a/googlemock/docs/documentation.md +++ b/googlemock/docs/documentation.md @@ -7,7 +7,7 @@ the respective git branch/tag).** * [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. + * [FrequentlyAskedQuestions](frequently_asked_questions.md) -- check here before asking a question on the mailing list. To contribute code to Google Mock, read: diff --git a/googlemock/docs/for_dummies.md b/googlemock/docs/for_dummies.md index 4b7551e9..21105312 100644 --- a/googlemock/docs/for_dummies.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). diff --git a/googlemock/docs/FrequentlyAskedQuestions.md b/googlemock/docs/frequently_asked_questions.md similarity index 100% rename from googlemock/docs/FrequentlyAskedQuestions.md rename to googlemock/docs/frequently_asked_questions.md From b138afde15fff4b81afd926a7bdfb70928358b56 Mon Sep 17 00:00:00 2001 From: Krystian Kuzniarek Date: Sat, 13 Jul 2019 08:16:41 +0200 Subject: [PATCH 6/7] rename and apply snake_case on KnownIssues.md --- googlemock/README.md | 2 +- googlemock/docs/{KnownIssues.md => known_issues.md} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename googlemock/docs/{KnownIssues.md => known_issues.md} (100%) diff --git a/googlemock/README.md b/googlemock/README.md index bd90caaf..36f87761 100644 --- a/googlemock/README.md +++ b/googlemock/README.md @@ -68,7 +68,7 @@ Once you understand the basics, check out the rest of the docs: including advanced techniques. If you need help, please check the -[KnownIssues](docs/KnownIssues.md) and +[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). diff --git a/googlemock/docs/KnownIssues.md b/googlemock/docs/known_issues.md similarity index 100% rename from googlemock/docs/KnownIssues.md rename to googlemock/docs/known_issues.md From f81dbd6ce8f055b20441aeb636b9c9b7bb23cc7a Mon Sep 17 00:00:00 2001 From: Krystian Kuzniarek Date: Sat, 13 Jul 2019 09:16:02 +0200 Subject: [PATCH 7/7] add missing references to DesignDoc and KnownIssues --- googlemock/docs/documentation.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/googlemock/docs/documentation.md b/googlemock/docs/documentation.md index 0f19e6fa..831598cc 100644 --- a/googlemock/docs/documentation.md +++ b/googlemock/docs/documentation.md @@ -7,7 +7,8 @@ the respective git branch/tag).** * [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](frequently_asked_questions.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: