summaryrefslogtreecommitdiff
path: root/googlemock/docs
Commit message (Collapse)AuthorAgeFilesLines
* Googletest exportAbseil Team2021-01-1314-8257/+4
| | | | | | Move all docs into top-level docs/ directory PiperOrigin-RevId: 350211277
* Merge pull request #3189 from ellert:gtest-help-test-GNU/kFreeBSDDerek Mauro2021-01-137-0/+1907
| | | | PiperOrigin-RevId: 349349288
* Googletest exportAbseil Team2020-12-221-10/+0
| | | | | | | | | Give each of Naggy/Nice/StrictMock a base class whose constructor runs before the mocked class's constructor, and a destructor that runs after the mocked class's destructor, so that any mock methods run in either the constructor or destructor use the same strictness as other calls. PiperOrigin-RevId: 348511612
* Googletest exportAbseil Team2020-12-081-0/+1
| | | | | | Introduce a new `Address` matcher to gmock. PiperOrigin-RevId: 346344591
* Googletest exportAbseil Team2020-12-071-1/+1
| | | | | | Fix errata in gmock cook_book.md ON_CALL example PiperOrigin-RevId: 346165890
* Googletest exportAbseil Team2020-12-071-0/+1
| | | | | | | | | Add a `Pointer` matcher as an analog to `Pointee`. Similar to `Pointee`, `Pointer` works with either raw or smart pointers and allows creating a matcher like Pointer(Eq(foo)) for smart pointers. PiperOrigin-RevId: 346164768
* Googletest exportAbseil Team2020-12-021-1/+1
| | | | | | Put "value" in SetArgReferee's description between code backticks. PiperOrigin-RevId: 344054658
* Googletest exportAbseil Team2020-11-131-1/+1
| | | | | | | | Use override instead of virtual for destructor https://google.github.io/styleguide/cppguide.html says: "Explicitly annotate overrides of virtual functions or virtual destructors with exactly one of an override or (less frequently) final specifier. Do not use virtual when declaring an override". The mocked class _should_ have a virtual destructor most of the times. PiperOrigin-RevId: 342082140
* Googletest exportAbseil Team2020-11-061-0/+3
| | | | | | Add support for ref qualifiers in MOCK_METHOD. PiperOrigin-RevId: 341047839
* Googletest exportAbseil Team2020-10-141-0/+1
| | | | | Add ::testing::FieldsAre matcher for objects that support get<> and structured bindings. PiperOrigin-RevId: 337165285
* Googletest exportAbseil Team2020-10-141-1/+1
| | | | | | Removing a semicolon that triggers a lint error in sample code. PiperOrigin-RevId: 337095451
* Merge pull request #3050 from peternewman:patch-1Derek Mauro2020-10-141-1/+1
|\ | | | | | | PiperOrigin-RevId: 336881266
| * Fix a typoPeter Newman2020-10-121-1/+1
| |
* | Googletest exportAbseil Team2020-10-141-1/+1
| | | | | | | | | | | | Use absl::StrCat in MATCHER_P example for consistency with https://abseil.io/tips/3 PiperOrigin-RevId: 336878481
* | Googletest exportAbseil Team2020-10-141-0/+16
|/ | | | | | | | | | | | | | Suggest using generic lambdas for composing macros. Long chains of macros hurt legibility; generic lambdas are an easy way to abbreviate them, but are not an obvious solution to casual users. Compare: EXPECT_THAT(f(), ElementsAre( Property(&MyClass::foo, Property(&OtherClass::bar, Contains("x"))), Property(&MyClass::foo, Property(&OtherClass::bar, Contains("y")))); to: EXPECT_THAT(f(), ElementsAre(HasFooBar("x"), HasFooBar("y"))); PiperOrigin-RevId: 336870137
* Update cook_book.mdkeshavgbpecdelhi2020-09-271-1/+1
| | | | Please note that changing the default value for a type can make [you]* test..... Here "you" word doesn't make sense.. rather "your" seems to make it understandable.
* Googletest exportAbseil Team2020-09-241-4/+5
| | | | | | Address OSS Issue #2463 https://github.com/google/googletest/issues/2463 PiperOrigin-RevId: 333289989
* Googletest exportAbseil Team2020-09-201-19/+3
| | | | | | Simplify FooConcrete static calls in googlemock cookbook. PiperOrigin-RevId: 332437041
* Merge pull request #2994 from xerus2000:gmock-docsDerek Mauro2020-09-101-4/+6
|\ | | | | | | PiperOrigin-RevId: 330545489
| * Add timestamp to in old method mock macro guidexerus20002020-08-251-4/+5
|/
* Googletest exportAbseil Team2020-08-231-1/+1
| | | | | | | | | Fix DoAll to work with move-only sink arguments. This changes types of the first n - 1 actions so that they only get a readonly view of the arguments. The last action will accept move only objects. PiperOrigin-RevId: 327031893
* Googletest exportAbseil Team2020-08-125-0/+10
| | | | | | internal change PiperOrigin-RevId: 326080000
* Googletest exportAbseil Team2020-08-071-1/+1
| | | | | | | | | Fix DoAll to work with move-only sink arguments. This changes types of the first n - 1 actions so that they only get a readonly view of the arguments. The last action will accept move only objects. PiperOrigin-RevId: 324619666
* Googletest exportAbseil Team2020-08-071-1/+1
| | | | | | | | | Fix DoAll to work with move-only sink arguments. This changes types of the first n - 1 actions so that they only get a readonly view of the arguments. The last action will accept move only objects. PiperOrigin-RevId: 324600664
* Googletest exportAbseil Team2020-07-281-1/+1
| | | | | | Internal documentation change. PiperOrigin-RevId: 323612305
* Googletest exportofats2020-07-281-1/+1
| | | | | | Stop using ADL for InvokeArgument action. PiperOrigin-RevId: 323234396
* Googletest exportofats2020-07-092-21/+18
| | | | | | Replace ByRef with std::ref everywhere in docs. PiperOrigin-RevId: 320002303
* Googletest exportAbseil Team2020-06-262-54/+54
| | | | | | | | Normalize headers in gMock docs Increasing Header levels on two pages, to better match other pages in the same directory. PiperOrigin-RevId: 318280892
* Googletest exportAbseil Team2020-06-151-5/+5
| | | | | | | | gMock Cookbook: Fix incorrect comment about EXPECT priority order It's actually the last matching expectation that's used, not the first. PiperOrigin-RevId: 316490770
* Googletest exportAbseil Team2020-06-051-2/+2
| | | | | | | | gMock Cookbook: Slight rewording Remove "I" because documentation can have multiple authors. And remove unnecessary "guy". PiperOrigin-RevId: 314533746
* Googletest exportAbseil Team2020-06-021-0/+5
| | | | | | Note that EXPECT_EQ(actual_value, expected_value) or EXPECT_THAT(actual_value, Eq(expected_value)) is preferred over EXPECT_THAT(actual_value, expected_value). PiperOrigin-RevId: 314350852
* Googletest exportAbseil Team2020-05-281-1/+1
| | | | | | Spell out namespace for absl::Notification. PiperOrigin-RevId: 312300192
* Googletest exportAbseil Team2020-05-131-0/+9
| | | | | | Addresses https://github.com/google/googletest/pull/2784 PiperOrigin-RevId: 310902202
* Googletest exportAbseil Team2020-05-011-1/+1
| | | | | | Fix link to "high-perf dependency injection technique". PiperOrigin-RevId: 308893893
* Googletest exportAbseil Team2020-05-011-2/+2
| | | | | | internal change PiperOrigin-RevId: 308648034
* Googletest exportAbseil Team2020-04-161-2/+2
| | | | | | Fix link to "After clause". Sorry, reader, but this heading is in another document! PiperOrigin-RevId: 305947971
* Googletest exportAbseil Team2020-03-201-1/+1
| | | | | | Internal change PiperOrigin-RevId: 302048013
* Googletest exportAbseil Team2020-03-171-1/+1
| | | | | | | | Remove public buganizer reference from googletest cookbook. It also seems that this bug is obsolete. PiperOrigin-RevId: 298598298
* Googletest exportAbseil Team2020-02-281-17/+19
| | | | | | | | Allow construction of an Action from a callable of zero args Action already allows construction from a callable with the same args as the mocked function, without needing to wrap the callable in Invoke. However, if you don't care about the arguments to the mocked function you need to either accept all of them or wrap your callable in InvokeWithoutArgs. This change makes both of those unnecessary, since it allows you to pass a no-args callable to Action directly. PiperOrigin-RevId: 296117034
* Googletest exportAbseil Team2020-02-071-1/+1
| | | | | | ...text exposed to GitHub repo https://www.github.com/google/googletest PiperOrigin-RevId: 293438092
* Googletest exportAbseil Team2020-01-021-1/+1
| | | | | | Fix typo in example. PiperOrigin-RevId: 287212448
* Googletest exportkrzysio2019-12-161-18/+17
| | | | | | | | Don't use fully qualified ::std types in code examples. Having a nested user-defined 'std' namespace anywhere in a program is a minefield and shouldn't be either explicitly supported or implicitly condoned. PiperOrigin-RevId: 285790182
* Googletest exportAbseil Team2019-12-021-0/+6
| | | | | | | | | | Clarify use of IsTrue and IsFalse matchers. These matchers are subtle and confusing: what are they for? The docs in the code are clear, but not very accessible. googletest/googlemock/include/gmock/gmock-more-matchers.h PiperOrigin-RevId: 283393275
* Googletest exportAbseil Team2019-11-201-1/+1
| | | | | | | | Add a breadcrumb about nullopt comparison near the Optional() matcher. Also add a note about how otherwise-spurious 'Eq()' may be needed in some cases. Without this, something like Field(&MyStruct::optional_field_without_equals_equals, absl::nullopt) doesn't work - it converts the nullopt to an optional<> of the non-equalable type, and fails to select the operator==(optional<>, nullopt_t) overload. The Eq() lets the type persist later into the match. PiperOrigin-RevId: 281305519
* Merge pull request #2548 from kuzkry:update-pump-manualXiaoyi Zhang2019-11-051-12/+9
|\ | | | | | | PiperOrigin-RevId: 278702531
| * update pump_manual.mdKrystian Kuzniarek2019-11-021-12/+9
|/
* Googletest exportAbseil Team2019-10-291-13/+0
| | | | | | Remove badly formatted suggestion in gmock cheat sheet. PiperOrigin-RevId: 277060475
* move the pumping script to googlemockKrystian Kuzniarek2019-10-251-0/+190
|
* Googletest exportAbseil Team2019-10-231-10/+11
| | | | | | Add a matcher `testing::ReturnRoundRobin` which, on each call, returns the next element in the sequence, restarting at the beginning once it has reached the end. PiperOrigin-RevId: 276312136
* Googletest exportAbseil Team2019-10-221-0/+1
| | | | | | Rolling forward IsNan() matcher with fixes in test for -Wconversion issues. Use std::nanf and std::nanl where appropriate. PiperOrigin-RevId: 275523003