diff options
author | Herbert Thielen <thielen@hs-worms.de> | 2017-07-30 15:05:48 (GMT) |
---|---|---|
committer | Herbert Thielen <thielen@hs-worms.de> | 2017-07-30 15:05:48 (GMT) |
commit | ec19d455bc1224fc2ca8c43d4a0e3d528a7e2a26 (patch) | |
tree | 6d3ffb6d30d0856d53edec0d7a5562293bda1bdd | |
parent | e5b88b227e6adfa7196575b1264384e718d16cab (diff) | |
download | googletest-ec19d455bc1224fc2ca8c43d4a0e3d528a7e2a26.zip googletest-ec19d455bc1224fc2ca8c43d4a0e3d528a7e2a26.tar.gz googletest-ec19d455bc1224fc2ca8c43d4a0e3d528a7e2a26.tar.bz2 |
fix links to Google C++ Style Guiderefs/pull/1165/head
-rw-r--r-- | googlemock/docs/CookBook.md | 2 | ||||
-rw-r--r-- | googlemock/docs/DevGuide.md | 2 | ||||
-rw-r--r-- | googletest/docs/DevGuide.md | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/googlemock/docs/CookBook.md b/googlemock/docs/CookBook.md index 90071bc..34387c0 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 f4bab75..adb74fe 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 ## diff --git a/googletest/docs/DevGuide.md b/googletest/docs/DevGuide.md index 06467a3..4333a8e 100644 --- a/googletest/docs/DevGuide.md +++ b/googletest/docs/DevGuide.md @@ -80,8 +80,8 @@ instructions for how to sign and return it. ## Coding Style ## To keep the source consistent, readable, diffable and easy to merge, -we use a fairly rigid coding style, as defined by the [google-styleguide](http://code.google.com/p/google-styleguide/) project. All patches will be expected -to conform to the style outlined [here](http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml). +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://google.github.io/styleguide/cppguide.html). ## Updating Generated Code ## |