Commit Graph

146 Commits

Author SHA1 Message Date
Abseil Team
643862d8ad Mention DescribeMatcher in matchers.md
PiperOrigin-RevId: 504591836
Change-Id: I48c93490d0c3b7c6bfaceceb1cef5eedeacfe6c6
2023-01-25 10:04:20 -08:00
Abseil Team
ec25eea8f8 Mention using MockFunction as a way to mock free functions.
PiperOrigin-RevId: 502901538
Change-Id: I0cf351b9ad1411ae9c45e09550c24e006a24e179
2023-01-18 09:43:56 -08:00
Abseil Team
71140c3ca7 Use a more recent commit of googletest that uses OS constraints from
@platforms//os:* instead of from @build_tools//platforms:*

See https://github.com/bazelbuild/bazel/issues/8622

Necessary to fix #4096

Also need the fix for #4098

PiperOrigin-RevId: 497182073
Change-Id: Ifd568b088d2f779755dd20264edfd5dad12ca9cc
2022-12-22 09:31:36 -08:00
Abseil Team
5ab508a01f Fix a typo in the documentation for "Using Predicates as Matchers".
PiperOrigin-RevId: 496679950
Change-Id: I2842050902876231d49a142165bcbb88d737505d
2022-12-20 09:26:42 -08:00
Dino Radakovic
b3bfebd796 Comment that q0_ in primer should remain empty
PiperOrigin-RevId: 496642643
Change-Id: I178efeda76cbf46e5f4bb91454c205b9a060a4ea
2022-12-20 06:12:13 -08:00
Abseil Team
a4e0be898b Specify a name for a Property in a code example.
It is good practice to specify a name for the `testing::Property` matcher's use in diagnostics, and we should do so in our examples.

PiperOrigin-RevId: 496406309
Change-Id: Ibb4d1ba63771b5d6855442b91564027cda8ddaca
2022-12-19 08:28:01 -08:00
Abseil Team
41fe6be7d7 Fix a typo in the gMock sample code for Defining a Custom Matcher Class.
EXPECT_CALL doesn't seem to make much sense here. I think the intent was to use EXPECT_THAT instead.

PiperOrigin-RevId: 495427663
Change-Id: I39a16ea37282729d34017c6bcd331a60cedf1fbe
2022-12-14 15:06:09 -08:00
Abseil Team
e68764c147 This commit fixes a minor verb conjugation error in gmock_cook_book.md.
PiperOrigin-RevId: 490601453
Change-Id: I733b2ed8740b1c809dddb166a42993b869198469
2022-11-23 15:57:54 -08:00
Denis Hananein
834698cc9b Change MakeUnique -> std::make_unique in docs 2022-11-20 15:08:43 +01:00
Abseil Team
66366cea56 Add documentation for --gunit_recreate_environments_when_repeating.
PiperOrigin-RevId: 485895339
Change-Id: I09b0f535941531ef7bcb74593d385891d56b3e32
2022-11-03 09:35:31 -07:00
Dino Radakovic
90171d1061 Use git commit hash in CMake quickstart
Commit hashes reflect GoogleTest's live-at-head stance.
Credits to @shinfd.
Fixes #4000

PiperOrigin-RevId: 483655943
Change-Id: Ieeb162859348dbe3657e18f283bac81412f2585d
2022-10-25 06:29:34 -07:00
Abseil Team
03597a01ee Clarify that parameter generator does not evaluate immediately
This aims to avoid confusion as to what kinds of computations are valid inside
a parameter generator expression, calling out flags as a supported use case.

PiperOrigin-RevId: 483397027
Change-Id: I2d036fae95120d617f30a5566ea7498ce1f9bfb6
2022-10-24 09:02:02 -07:00
Copybara-Service
6d71d901e1 Merge pull request #4037 from KloolK:patch-1
PiperOrigin-RevId: 481734961
Change-Id: I629dc1ca3b10bf5fc6afc179b651a09081f5c919
2022-10-17 14:08:04 -07:00
Jan
a41c3d0fb8
Fix table markup in testing.md 2022-10-14 09:12:51 +02:00
Abseil Team
9fbb657503 Update the POSIX Extended section of the Regular Expression Wikipedia page
PiperOrigin-RevId: 479667644
Change-Id: I4ab03bd5f0520f8586667de8bd1b9443f241337a
2022-10-07 14:21:04 -07:00
Copybara-Service
8c4dc11539 Merge pull request #3967 from BMBurstein:custom_type_combine
PiperOrigin-RevId: 478775323
Change-Id: I92231bb8edd8e01b9b7cbe445c43dcf84f458521
2022-10-04 07:06:58 -07:00
Baruch
173dd7c7d6
Merge branch 'google:main' into custom_type_combine 2022-09-25 13:35:27 +03:00
John Hinnegan
05cc575c65
Update link to Bazel installation guide
The Bazel docs have moved!
2022-09-18 10:54:36 -04:00
Baruch
56070d8903
Merge branch 'google:main' into custom_type_combine 2022-09-14 21:46:21 +03:00
Abseil Team
c29315dda4 Use UnorderedElementsAre in example about using matchers with maps
PiperOrigin-RevId: 473353707
Change-Id: Ief5bdbd2b8e28bac8f47be9aaeac4bb93875a793
2022-09-09 15:14:57 -07:00
Baruch
dd969ed5fe
Merge branch 'google:main' into custom_type_combine 2022-08-25 10:55:49 +03:00
Copybara-Service
6045bf2ade Merge pull request #3918 from assafpr:master2main
PiperOrigin-RevId: 464586117
Change-Id: Icda62f13b962f7408bb5698ae2b627391257d152
2022-08-01 11:47:51 -07:00
Baruch Burstein
3280a930bf Custom type with Combine(). Fix for #3781 2022-07-31 22:50:04 +03:00
Copybara-Service
78aa2ba440 Merge pull request #3787 from codeinred:fix-quickstart
PiperOrigin-RevId: 460272863
Change-Id: I139e31faca4dab6f697e0cd1b3491f791fda5f8a
2022-07-11 12:23:26 -07:00
Derek Mauro
96f51426e4 Remove support for C++11
v1.12.x is the last branch to support C++11
Future releases will require at least C++14

PiperOrigin-RevId: 458250106
Change-Id: Ibee2248649ff3c13daaa179135887848bf730f3f
2022-06-30 09:53:51 -07:00
assafpr
df4b8edee0
Update advanced.md
master branch changed to main branch in links
2022-06-27 09:48:05 +03:00
assafpr
b59ae848d1
Update faq.md 2022-06-22 16:12:54 +03:00
assafpr
1b772a9bc4
documentation, change mater branch to main 2022-06-22 14:36:10 +03:00
assafpr
358a3f6e3e
documentation, change mater branch to main 2022-06-22 14:31:03 +03:00
Abseil Team
8b521aa43a gmock_cook_book.md: Delete superfluous statement from 2014.
PiperOrigin-RevId: 454677195
Change-Id: I7a1419e22d617db41a5c310bc6f6158ba4cec1ab
2022-06-13 12:51:26 -07:00
Abseil Team
b1f84bf176 Update googletest docs to indicate that RE2 is now used for regexp implementation when building with Bazel and using Abseil.
PiperOrigin-RevId: 454012698
Change-Id: I3a9df78368ffe3cb7cf3d315001125b97b1aebbe
2022-06-09 14:25:17 -07:00
elixir
6cd3823783 Clarify that this-> is needed to access members of type-parameterized tests.
PiperOrigin-RevId: 451439108
Change-Id: I8929df21d53cbe6c42e38653e1bb0cac72fc36f9
2022-05-27 11:32:10 -07:00
Abseil Team
cf942a5d69 Update GoogleTest documentation's spelling of "GoogleTest".
PiperOrigin-RevId: 451067898
Change-Id: I658ab92c4ea616736f0170ac4d1548bb15a944e2
2022-05-25 19:18:09 -07:00
Abseil Team
7041051488 Clarify the pitfalls of EXPECT_THAT and highlight it's best practices
PiperOrigin-RevId: 450721917
Change-Id: I34d63a65b7158975abd46a9a14cded75439e7e7f
2022-05-24 10:57:53 -07:00
Aaron Jacobs
6386897feb gmock-actions: make OnceAction public.
So that it can be referenced in conversion operators for actions that need to
know the concrete return type.

PiperOrigin-RevId: 447889344
Change-Id: I643d3298bc8effd08741282a956c221f9d67d378
2022-05-10 20:08:51 -07:00
Abseil Team
8ded48c37b Rewrite "Testing a Certain Property of an Object" as "Defining a Custom Matcher Class", and fix the code examples.
PiperOrigin-RevId: 445252626
Change-Id: I9f038cb669d3da6743606343c2341fc59725d722
2022-04-28 14:41:49 -07:00
Abseil Team
a1cc8c5519 Add support for move-only and &&-qualified actions in WillOnce.
This provides a type-safe way for an action to express that it wants to be
called only once, or to capture move-only objects. It is a generalization of
the type system-evading hack in ByMove, with the improvement that it works for
_any_ action (including user-defined ones), and correctly expresses that the
action can only be used with WillOnce. I'll make existing actions benefit in a
future commit.

PiperOrigin-RevId: 440496139
Change-Id: I4145d191cca5655995ef41360bb126c123cb41d3
2022-04-08 18:40:07 -07:00
Abseil Team
c9044ba3dd Trying to make it more clear: this is probably not about mock classes, but about mocked classes
PiperOrigin-RevId: 439427291
Change-Id: I3cac035e732fb3fe4f9c314657932a55269e0416
2022-04-04 15:30:50 -07:00
Alecto Irene Perez
7da4a4114a
Fix quickstart-cmake documentation
Signed-off-by: Alecto Irene Perez <perez.cs@pm.me>
2022-03-26 21:52:05 -06:00
Abseil Team
1754febbaa Clarify public access on gmock examples.
PiperOrigin-RevId: 436268062
Change-Id: I3161b36121f78acf920d66fe121b2f1d5e5707b9
2022-03-21 11:57:05 -07:00
Copybara-Service
8a422b8398 Merge pull request #3774 from sobczyk:main
PiperOrigin-RevId: 434738675
Change-Id: I7c8de4004bac6b750674d19e3e79c0695a42652e
2022-03-15 06:55:30 -07:00
Szymon Sobik
132059ba0c Adjust documentation regarding xml and json source file location otput. 2022-03-08 01:16:36 +01:00
Abseil Team
0e402173c9 Add a 3-arg overload for ResultOf() matcher that takes a description string for better error messages.
PiperOrigin-RevId: 427598749
Change-Id: I8c7a5d7b2dde017641534f1c7eed8dd56c33e845
2022-02-09 16:20:06 -08:00
Copybara-Service
7eae8de0da Merge pull request #3723 from ramkumar-kr:patch-1
PiperOrigin-RevId: 423920083
Change-Id: I5e172813387f841d5a6c56eea155b876a465d208
2022-01-24 15:04:20 -08:00
Dino Radakovic
4e9fe30884 Fix reference to source file in gmock FAQ
PiperOrigin-RevId: 421915817
Change-Id: I22800e8943f9eb050304c521701d4040b1b7a914
2022-01-14 14:40:35 -08:00
Abseil Team
2d07f12b60 Fix run-on sentence
dispatch. It will use the definition from the class the constructor of which

PiperOrigin-RevId: 421291241
Change-Id: If81e3d6d3774edfbbb4baaec8a3cd96566b3b09c
2022-01-12 07:19:51 -08:00
Ram Kumar K R
0256210376
Update example to reflect the tests below 2022-01-04 13:36:22 -08:00
Abseil Team
d81ae2f0bf Clarify "package" means "Bazel package", and promote testonly=True rather than testing sub-directory.
PiperOrigin-RevId: 417945818
Change-Id: I8686ee0414fb80269528677f291877a231d1c991
2021-12-22 22:50:04 -08:00
Copybara-Service
9a32aee22d Merge pull request #3684 from ludgerpaehler:patch-1
PiperOrigin-RevId: 417474317
Change-Id: I4c84f59ba272a6bec3f992f7afae36e1c5617fad
2021-12-20 13:59:26 -08:00
Abseil Team
1b2606425c Fix typo in GoogleMock Cookbook.
PiperOrigin-RevId: 413674665
Change-Id: I466f87348390f42434a70f183efdf0557be9dddd
2021-12-02 07:44:32 -08:00