aboutsummaryrefslogtreecommitdiffstats
path: root/googlemock
diff options
context:
space:
mode:
authorHerbert Thielen <thielen@hs-worms.de>2017-07-30 17:05:48 +0200
committerHerbert Thielen <thielen@hs-worms.de>2017-07-30 17:05:48 +0200
commitec19d455bc1224fc2ca8c43d4a0e3d528a7e2a26 (patch)
tree6d3ffb6d30d0856d53edec0d7a5562293bda1bdd /googlemock
parente5b88b227e6adfa7196575b1264384e718d16cab (diff)
downloadgoogletest-ec19d455bc1224fc2ca8c43d4a0e3d528a7e2a26.tar.gz
googletest-ec19d455bc1224fc2ca8c43d4a0e3d528a7e2a26.tar.bz2
googletest-ec19d455bc1224fc2ca8c43d4a0e3d528a7e2a26.zip
fix links to Google C++ Style Guide
Diffstat (limited to 'googlemock')
-rw-r--r--googlemock/docs/CookBook.md2
-rw-r--r--googlemock/docs/DevGuide.md2
2 files changed, 2 insertions, 2 deletions
diff --git a/googlemock/docs/CookBook.md b/googlemock/docs/CookBook.md
index 90071bc0..34387c0e 100644
--- a/googlemock/docs/CookBook.md
+++ b/googlemock/docs/CookBook.md
@@ -294,7 +294,7 @@ There are some caveats though (I don't like them just as much as the
next guy, but sadly they are side effects of C++'s limitations):
1. `NiceMock<MockFoo>` and `StrictMock<MockFoo>` only work for mock methods defined using the `MOCK_METHOD*` family of macros **directly** in the `MockFoo` class. If a mock method is defined in a **base class** of `MockFoo`, the "nice" or "strict" modifier may not affect it, depending on the compiler. In particular, nesting `NiceMock` and `StrictMock` (e.g. `NiceMock<StrictMock<MockFoo> >`) is **not** supported.
- 1. The constructors of the base mock (`MockFoo`) cannot have arguments passed by non-const reference, which happens to be banned by the [Google C++ style guide](http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml).
+ 1. The constructors of the base mock (`MockFoo`) cannot have arguments passed by non-const reference, which happens to be banned by the [Google C++ style guide](https://google.github.io/styleguide/cppguide.html).
1. During the constructor or destructor of `MockFoo`, the mock object is _not_ nice or strict. This may cause surprises if the constructor or destructor calls a mock method on `this` object. (This behavior, however, is consistent with C++'s general rule: if a constructor or destructor calls a virtual method of `this` object, that method is treated as non-virtual. In other words, to the base class's constructor or destructor, `this` object behaves like an instance of the base class, not the derived class. This rule is required for safety. Otherwise a base constructor may use members of a derived class before they are initialized, or a base destructor may use members of a derived class after they have been destroyed.)
Finally, you should be **very cautious** about when to use naggy or strict mocks, as they tend to make tests more brittle and harder to maintain. When you refactor your code without changing its externally visible behavior, ideally you should't need to update any tests. If your code interacts with a naggy mock, however, you may start to get spammed with warnings as the result of your change. Worse, if your code interacts with a strict mock, your tests may start to fail and you'll be forced to fix them. Our general recommendation is to use nice mocks (not yet the default) most of the time, use naggy mocks (the current default) when developing or debugging tests, and use strict mocks only as the last resort.
diff --git a/googlemock/docs/DevGuide.md b/googlemock/docs/DevGuide.md
index f4bab75c..adb74fe1 100644
--- a/googlemock/docs/DevGuide.md
+++ b/googlemock/docs/DevGuide.md
@@ -91,7 +91,7 @@ instructions for how to sign and return it.
To keep the source consistent, readable, diffable and easy to merge,
we use a fairly rigid coding style, as defined by the [google-styleguide](https://github.com/google/styleguide) project. All patches will be expected
-to conform to the style outlined [here](https://github.com/google/styleguide/blob/gh-pages/cppguide.xml).
+to conform to the style outlined [here](https://google.github.io/styleguide/cppguide.html).
## Submitting Patches ##