diff options
author | Josh Bodily <joshbodily@gmail.com> | 2017-12-12 10:36:37 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-12 10:36:37 -0700 |
commit | 3e2cb75446e0f56f226f0fb259e032bb4d014002 (patch) | |
tree | 4d945ff84ee3affb3187acb1fbb8ba9d300718d8 /googlemock/docs/CookBook.md | |
parent | cf85f56b2159d7c964dacb3e311163a6f9520688 (diff) | |
parent | 0fe96607d85cf3a25ac40da369db62bbee2939a5 (diff) | |
download | googletest-3e2cb75446e0f56f226f0fb259e032bb4d014002.tar.gz googletest-3e2cb75446e0f56f226f0fb259e032bb4d014002.tar.bz2 googletest-3e2cb75446e0f56f226f0fb259e032bb4d014002.zip |
Merge branch 'master' into josh/fix_scoped_class2
Diffstat (limited to 'googlemock/docs/CookBook.md')
-rw-r--r-- | googlemock/docs/CookBook.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/googlemock/docs/CookBook.md b/googlemock/docs/CookBook.md index 6ea7f3a9..3d07e68b 100644 --- a/googlemock/docs/CookBook.md +++ b/googlemock/docs/CookBook.md @@ -148,7 +148,7 @@ Note that the mock class doesn't define `AppendPacket()`, unlike the real class. That's fine as long as the test doesn't need to call it. Next, you need a way to say that you want to use -`ConcretePacketStream` in production code, and use `MockPacketStream` +`ConcretePacketStream` in production code and to use `MockPacketStream` in tests. Since the functions are not virtual and the two classes are unrelated, you must specify your choice at _compile time_ (as opposed to run time). @@ -227,7 +227,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, he 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. If the user believes these calls are harmless, they can add an `EXPECT_CALL()` to suppress the warning. However, sometimes you may want to suppress all "uninteresting call" warnings, while sometimes you may want the opposite, i.e. to treat all @@ -706,7 +706,7 @@ type `m` accepts): 1. When both `T` and `U` are built-in arithmetic types (`bool`, integers, and floating-point numbers), the conversion from `T` to `U` is not lossy (in other words, any value representable by `T` can also be represented by `U`); and 1. When `U` is a reference, `T` must also be a reference (as the underlying matcher may be interested in the address of the `U` value). -The code won't compile if any of these conditions isn't met. +The code won't compile if any of these conditions aren't met. Here's one example: |