Commit Graph

180 Commits

Author SHA1 Message Date
Abseil Team
9bb354fa83 s/::testing::/testing::/ in test documentation outside of using statements to align with best practice
PiperOrigin-RevId: 574377544
Change-Id: I0ca69a3bf14cc1aab75784eba220a48bf50cef04
2023-10-17 23:50:43 -07:00
Dino Radakovic
beb552fb47 gmock_cook_book: Document DoAll's return type requirement
The requirement is vaguely  documented by "Only the return value of the last action in the sequence will be used.".
However, this can be misleading, as users could potentially expect default-constructed values to be returned in absence of a matching return type.

PiperOrigin-RevId: 570450839
Change-Id: Ibd98a6e6b2aaf2a8cfc15ed6aeab442526eab98e
2023-10-03 11:41:48 -07:00
Michael Hirshleifer
d1467f5813 GoogleTest FAQ: minor punctuation fixes
PiperOrigin-RevId: 565411290
Change-Id: I57e94c679183e39eec2a2835f330b52fc9302767
2023-09-14 10:37:04 -07:00
Michael Hirshleifer
728ec52d21 Remove Googletest FAQ entry for obsolete ProtocolMessageEquals and ProtocolMessageEquiv
* These long-dead variants of the proto matchers don't exist in the current version of Googletest.
* No evidence of external usage: [the only external references I see](https://www.google.com/search?q=%22protocolmessageequals%22+OR+%22protocolmessageequals%22) are copies of this guide. Possibly they were already removed by the time Googletest was publicly released.

PiperOrigin-RevId: 565358401
Change-Id: I61379b7333fa8ee19cd5520caedf2c539f54c2d7
2023-09-14 07:13:20 -07:00
sthd
f0eae4b399 changed http to https 2023-08-22 20:58:34 +03:00
Copybara-Service
cb5cd96bca Merge pull request #4343 from sthd:http-to-https
PiperOrigin-RevId: 559151399
Change-Id: I8eb2c7c5222d0fd0935db531a0abe5792633fe7e
2023-08-22 10:24:02 -07:00
Dino Radakovic
c374da15c5 googletest: Replace http with https in links to docs
This is a prerequisite for #4341

PiperOrigin-RevId: 559132807
Change-Id: Iadc961913e0ff107c5333dae17be5f8638663836
2023-08-22 09:21:04 -07:00
Elior Schneider
722daa3da6
Update advanced.md
http to https
2023-08-20 09:38:57 +03:00
sthd
8ca57f194a Changed 2 public links from http to https 2023-08-11 11:26:59 +03:00
sthd
5b5ef29950 Changed 3 public links from http to https 2023-08-11 11:21:47 +03:00
Abseil Team
7e33b6a1c4 Specify SetUpTestSuite is required to be public.
PiperOrigin-RevId: 555578256
Change-Id: I9366fc99ae953c29e468fcddb4be203c9c05661b
2023-08-10 11:27:05 -07:00
Dino Radakovic
6abc9e3d79 Make references to #includes consistent across docs
PiperOrigin-RevId: 554561504
Change-Id: Ia02ab6ac646bf6637d6f500a4aaedd14e0a04798
2023-08-07 12:44:53 -07:00
Abseil Team
c875c4e224 Adjust includes to use <> instead of "", consistent with quickstart pages.
Right now, gtest documentation uses different #include syntax. The quickstart
pages (e.g., http://google.github.io/googletest/quickstart-bazel.html#create-and-run-a-binary) are checked in with `#include <gtest/gtest.h>` However, other
documentation (such as the primer) uses `#include "gtest/gtest.h"` (e.g.,
https://google.github.io/googletest/primer.html#writing-the-main-function).

PiperOrigin-RevId: 551878641
Change-Id: Iab93cc1da3ef4870a07b624071b75d6e9d3568c1
2023-07-28 09:51:41 -07:00
Anton Sosnin
f014396910
Fix typo in gmock_cook_book.md 2023-07-19 18:08:41 +03:00
Abseil Team
251e720391 Change ::testing to testing in Testing Reference doc
PiperOrigin-RevId: 544466397
Change-Id: Icb4d5fae38361cd75d47f908886831696eb2b1c9
2023-06-29 14:40:26 -07:00
Abseil Team
ec4fed9321 Update code examples in the gMock Cookbook following C++ best practices.
PiperOrigin-RevId: 542564354
Change-Id: Ia3307f13f845c662c88fb7303112f41ef8c56b28
2023-06-22 08:15:15 -07:00
Juan Ramos
4fed5f2850 cmake: Raise min to 3.6
From the CMake 3.27 release notes:
Compatibility with versions of CMake older than 3.5 is now
deprecated and will be removed from a future version. Calls to
cmake_minimum_required() or cmake_policy() that set the policy
version to an older value now issue a deprecation diagnostic.

This PR also removes manually setting policy CMP0048. This is
redundant since the CMake min is already 3.X
2023-06-19 11:21:44 -06:00
Abseil Team
65cfeca1a1 internal g3doc documentation change.
PiperOrigin-RevId: 539134110
Change-Id: I28041f77e18bc67aa0ffabdc7205e350deed22c8
2023-06-09 11:29:42 -07:00
Dino Radakovic
06f44bc951 Copy supported platforms from README onto https://google.github.io/googletest/platforms.html
PiperOrigin-RevId: 537016664
Change-Id: Ie62891a1061465a009b90feba0ccb91d85591160
2023-06-01 07:28:42 -07:00
Dino Radakovic
04cf298916 Provide example for setting C++ language standard in GoogleTest's Bazel quickstart and readme.
An equivalent for CMake was merged in aa99ce5a0d

Fixes #4254

PiperOrigin-RevId: 536759641
Change-Id: I8400064a24e0d78f17a0720046f505efa1167b4f
2023-05-31 10:45:43 -07:00
Shlomi Nissan
aa99ce5a0d Add CXX_STANDARD_REQUIRED to CMake quickstart 2023-05-21 16:40:06 -07:00
Abseil Team
922e0b7d80 Update gMock Cookbook to reflect deprecation of testing::ByMove
PiperOrigin-RevId: 524868227
Change-Id: I702ede27570e3d3f06d534d6ccf8b39689105d07
2023-04-17 09:31:34 -07:00
Abseil Team
0cd05c6ea9 Update naming to "GoogleTest" in the GoogleTest Primer.
PiperOrigin-RevId: 520409541
Change-Id: I75a0b8615ece923137d4f5dcdb915f38e4c3b1b2
2023-03-29 12:25:22 -07:00
Abseil Team
e9fb5c7bac Replace const char* with absl::string_view as the latter is preferred.
PiperOrigin-RevId: 519122695
Change-Id: I7dcf969d15d26ccc4b376e3ab6db7f4c08c7386f
2023-03-24 05:58:11 -07:00
Phoebe Liang
3288c4deae Revise documentation to include AbslStringify
PiperOrigin-RevId: 518039451
Change-Id: Ife548d0f83266746ce1981bea31e70e6b43027c9
2023-03-20 12:11:55 -07:00
Copybara-Service
2d4f208765 Merge pull request #4158 from VuPhamVan:main
PiperOrigin-RevId: 512959074
Change-Id: Ifbc63077aad573d4496a837f2f57584192573820
2023-02-28 09:40:00 -08:00
Abseil Team
555486f408 Rephrase the description of TEST_F() arguments for clarity.
PiperOrigin-RevId: 512937964
Change-Id: Ifa6369a80dc7d8efe60511417496d58317cfc28d
2023-02-28 08:17:16 -08:00
Copybara-Service
2ce822ac55 Merge pull request #4143 from iwsfutcmd:patch-1
PiperOrigin-RevId: 512696294
Change-Id: I6c135ca295e663df48db5b32bad4639d0c0c0774
2023-02-27 12:15:43 -08:00
Abseil Team
95d8c7ac43 Reformat to current g3doc style guide. No content changes.
PiperOrigin-RevId: 512681427
Change-Id: I88b22d82430ed145b8342747adf300f3e734d43b
2023-02-27 11:21:55 -08:00
Abseil Team
d0ba3ccc76 Added a missing semicolon for GTEST_FLAG_SET code snippet.
PiperOrigin-RevId: 511858980
Change-Id: I0f9e6ffdeb8ae809d662eb3ff46eab5a109a8d93
2023-02-23 12:40:25 -08:00
Vũ Phạm
810fb81153
Fix typo 2023-02-19 21:59:23 +07:00
Abseil Team
3d568bdda5 Add support for the alternative base64 encoding in RFC 4648 section 5 to WhenBase64Unescaped.
PiperOrigin-RevId: 507527786
Change-Id: Ie5e088b1814981f6c760d7e25418a430172705ec
2023-02-06 11:00:05 -08:00
Ben Yang
3f9c7fcaa3
Update testing.md
Fixed Parameter Generator table
2023-02-02 13:14:43 -08:00
Abseil Team
4b4c56aff6 Make document and example code more clear in the caveat section for potential memory leak with SetUpTestSuite.
PiperOrigin-RevId: 504706717
Change-Id: I5842a4569f81f6c0d636099b5cdaabe778996949
2023-01-25 17:43:53 -08:00
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