mirror of
https://github.com/google/googletest.git
synced 2024-12-26 17:41:03 +08:00
Googletest export
Fixes #3222, fixes #3225, closes #3223 PiperOrigin-RevId: 352066131
This commit is contained in:
parent
5ae6e6e7e1
commit
d128fc8252
@ -371,7 +371,7 @@ Verifies that `val1` is less than, or almost equal to, `val2`. You can replace
|
|||||||
|
|
||||||
### Asserting Using gMock Matchers
|
### Asserting Using gMock Matchers
|
||||||
|
|
||||||
[gMock](gmock_index.md) comes with
|
[gMock](gmock_for_dummies.md) comes with
|
||||||
[a library of matchers](gmock_cheat_sheet.md#MatcherList) for
|
[a library of matchers](gmock_cheat_sheet.md#MatcherList) for
|
||||||
validating arguments passed to mock objects. A gMock *matcher* is basically a
|
validating arguments passed to mock objects. A gMock *matcher* is basically a
|
||||||
predicate that knows how to describe itself. It can be used in these assertion
|
predicate that knows how to describe itself. It can be used in these assertion
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
# Community-Created Documentation
|
# Community-Created Documentation
|
||||||
|
|
||||||
go/gunit-community-created-docs
|
|
||||||
|
|
||||||
The following is a list, in no particular order, of links to documentation
|
The following is a list, in no particular order, of links to documentation
|
||||||
created by the Googletest community.
|
created by the Googletest community.
|
||||||
|
|
||||||
|
@ -289,8 +289,7 @@ will be changed.
|
|||||||
`IsTrue` and `IsFalse` are useful when you need to use a matcher, or for types
|
`IsTrue` and `IsFalse` are useful when you need to use a matcher, or for types
|
||||||
that can be explicitly converted to Boolean, but are not implicitly converted to
|
that can be explicitly converted to Boolean, but are not implicitly converted to
|
||||||
Boolean. In other cases, you can use the basic
|
Boolean. In other cases, you can use the basic
|
||||||
[`EXPECT_TRUE` and `EXPECT_FALSE`](../../googletest/docs/primer#basic-assertions)
|
[`EXPECT_TRUE` and `EXPECT_FALSE`](primer.md#basic-assertions) assertions.
|
||||||
assertions.
|
|
||||||
|
|
||||||
### Floating-Point Matchers {#FpMatchers}
|
### Floating-Point Matchers {#FpMatchers}
|
||||||
|
|
||||||
@ -340,9 +339,8 @@ The `argument` can be either a C string or a C++ string object:
|
|||||||
|
|
||||||
`ContainsRegex()` and `MatchesRegex()` take ownership of the `RE` object. They
|
`ContainsRegex()` and `MatchesRegex()` take ownership of the `RE` object. They
|
||||||
use the regular expression syntax defined
|
use the regular expression syntax defined
|
||||||
[here](../../googletest/docs/advanced.md#regular-expression-syntax). All of
|
[here](advanced.md#regular-expression-syntax). All of these matchers, except
|
||||||
these matchers, except `ContainsRegex()` and `MatchesRegex()` work for wide
|
`ContainsRegex()` and `MatchesRegex()` work for wide strings as well.
|
||||||
strings as well.
|
|
||||||
|
|
||||||
### Container Matchers
|
### Container Matchers
|
||||||
|
|
||||||
|
@ -4253,7 +4253,7 @@ value printer.
|
|||||||
This printer knows how to print built-in C++ types, native arrays, STL
|
This printer knows how to print built-in C++ types, native arrays, STL
|
||||||
containers, and any type that supports the `<<` operator. For other types, it
|
containers, and any type that supports the `<<` operator. For other types, it
|
||||||
prints the raw bytes in the value and hopes that you the user can figure it out.
|
prints the raw bytes in the value and hopes that you the user can figure it out.
|
||||||
[googletest's advanced guide](../../googletest/docs/advanced.md#teaching-googletest-how-to-print-your-values)
|
[The GoogleTest advanced guide](advanced.md#teaching-googletest-how-to-print-your-values)
|
||||||
explains how to extend the printer to do a better job at printing your
|
explains how to extend the printer to do a better job at printing your
|
||||||
particular type than to dump the bytes.
|
particular type than to dump the bytes.
|
||||||
|
|
||||||
|
@ -505,7 +505,7 @@ always return 100 as `n++` is only evaluated once. Similarly, `Return(new Foo)`
|
|||||||
will create a new `Foo` object when the `EXPECT_CALL()` is executed, and will
|
will create a new `Foo` object when the `EXPECT_CALL()` is executed, and will
|
||||||
return the same pointer every time. If you want the side effect to happen every
|
return the same pointer every time. If you want the side effect to happen every
|
||||||
time, you need to define a custom action, which we'll teach in the
|
time, you need to define a custom action, which we'll teach in the
|
||||||
[cook book](http://<!-- GOOGLETEST_CM0012 DO NOT DELETE -->).
|
[cook book](gmock_cook_book.md).
|
||||||
|
|
||||||
Time for another quiz! What do you think the following means?
|
Time for another quiz! What do you think the following means?
|
||||||
|
|
||||||
|
@ -30,10 +30,10 @@ gMock:
|
|||||||
|
|
||||||
Details and examples can be found here:
|
Details and examples can be found here:
|
||||||
|
|
||||||
* [gMock for Dummies](docs/for_dummies.md)
|
* [gMock for Dummies](../docs/gmock_for_dummies.md)
|
||||||
* [Legacy gMock FAQ](docs/gmock_faq.md)
|
* [Legacy gMock FAQ](../docs/gmock_faq.md)
|
||||||
* [gMock Cookbook](docs/cook_book.md)
|
* [gMock Cookbook](../docs/gmock_cook_book.md)
|
||||||
* [gMock Cheat Sheet](docs/cheat_sheet.md)
|
* [gMock Cheat Sheet](../docs/gmock_cheat_sheet.md)
|
||||||
|
|
||||||
Please note that code under scripts/generator/ is from the
|
Please note that code under scripts/generator/ is from the
|
||||||
[cppclean project](http://code.google.com/p/cppclean/) and under the Apache
|
[cppclean project](http://code.google.com/p/cppclean/) and under the Apache
|
||||||
|
Loading…
x
Reference in New Issue
Block a user