aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-01-17Bump version to 1.13.0 in preparation for releasev1.13.0-prev1.13.0v1.13.xDerek Mauro1-1/+1
PiperOrigin-RevId: 502626077 Change-Id: I3aad27a8b725cf73163e52ef2e28e6cdfc13082b
2023-01-17gmock_output_test: normalize golden file output to unix line endingsAbseil Team1-0/+3
When checked out on Windows, the repo might use \r\n line endings, and so the golden output has them. Adjust for that. PiperOrigin-RevId: 502577222 Change-Id: Iabfe537f6d95a49bf6bdcb934e855d28c65f6f89
2023-01-12Fix -Wshadow warningsTom Hughes1-2/+2
../googlemock/test/gmock-actions_test.cc:687:36: warning: declaration of ‘v’ shadows a member of ‘testing::{anonymous}::ReturnTest_SupportsReferenceLikeReturnType_Test::TestBody()::Result’ [-Wshadow] 687 | Result(const std::vector<int>& v) : v(&v) {} // NOLINT | ~~~~~~~~~~~~~~~~~~~~~~~~^ ../googlemock/test/gmock-actions_test.cc:686:29: note: shadowed declaration is here 686 | const std::vector<int>* v; | ^ ../googlemock/test/gmock-actions_test.cc: In constructor ‘testing::{anonymous}::ReturnTest_PrefersConversionOperator_Test::TestBody()::Out::Out(int)’: ../googlemock/test/gmock-actions_test.cc:720:28: warning: declaration of ‘x’ shadows a member of ‘testing::{anonymous}::ReturnTest_PrefersConversionOperator_Test::TestBody()::Out’ [-Wshadow] 720 | explicit Out(const int x) : x(x) {} | ~~~~~~~~~~^ ../googlemock/test/gmock-actions_test.cc:718:9: note: shadowed declaration is here 718 | int x; | ^ PiperOrigin-RevId: 501580618 Change-Id: I584710fbbe440ec724f88746e51f3be5653c32d5
2023-01-12Add an explicit #error that C++ versions less than C++14 are not supportedDerek Mauro1-0/+13
PiperOrigin-RevId: 501568410 Change-Id: I0f78cd96dc9204c8ec97a1cdd09a9d63a613cc5b
2023-01-11Update GoogleTest dependenciesDerek Mauro1-24/+20
PiperOrigin-RevId: 501282034 Change-Id: I0314ac566dc5e117db5a06c97d303e5cf8822d61
2023-01-05Fix GTEST_OS_ESP8266 checkTom Hughes1-1/+1
Everywhere else in the code, we check the value of GTEST_OS_ESP8266, not just whether it is defined. PiperOrigin-RevId: 499946909 Change-Id: I86f7e8947abb4e928fc24d1416d8237987b27845
2023-01-05IWYU: Add missing std includesTom Hughes22-0/+38
PiperOrigin-RevId: 499893032 Change-Id: I33304802b7c82ae2d008f3ee89df38866e5f57ba
2023-01-04Workaround for GCC12 bug illustrated by https://godbolt.org/z/Pe5aE59xGDerek Mauro1-1/+2
Fixes #4108 PiperOrigin-RevId: 499556061 Change-Id: I1cb1564f9b77e1825fddc9236965f4a3b661d96a
2023-01-04Fix _MSC_VER checkTom Hughes1-1/+1
Use "#if defined(_MSC_VER)" instead of "#if _MSC_VER" to be consistent with other usages in the file and to work with the "-Wundef" warning. PiperOrigin-RevId: 499471290 Change-Id: I34a9442eecf266afd74d4332cab7d39766df4ed9
2022-12-22Use a more recent commit of googletest that uses OS constraints fromAbseil Team1-7/+6
@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-20Fix a typo in the documentation for "Using Predicates as Matchers".Abseil Team1-1/+1
PiperOrigin-RevId: 496679950 Change-Id: I2842050902876231d49a142165bcbb88d737505d
2022-12-20Comment that q0_ in primer should remain emptyDino Radakovic1-0/+1
PiperOrigin-RevId: 496642643 Change-Id: I178efeda76cbf46e5f4bb91454c205b9a060a4ea
2022-12-19Specify a name for a `Property` in a code example.Abseil Team1-1/+1
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-15Shut up a Clang warning.Abseil Team1-1/+6
Clang warns on this pattern because it looks like the author might have meant to use the value of the first part of the comma operator, so it warns that it isn't being used. The cast here signals to Clang that this behavior is intentional. This was discovered while updating gmock in Android. Clang's -Wcomma warning is on by default with either -Wall or -Werror, so users of gmock with those on in combination with -Werror are unable to build without this fix. PiperOrigin-RevId: 495655990 Change-Id: Iaf27e2199669f5b6185a877738234e551b6b6556
2022-12-14Fix a typo in the gMock sample code for Defining a Custom Matcher Class.Abseil Team1-1/+1
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-12Convert feature requests to a formDerek Mauro2-24/+33
PiperOrigin-RevId: 494820396 Change-Id: I1aa0a5a0f4796fde8d0424093370fd89ebd2592e
2022-12-12Refactor matrix verification into VerifyMatchMatrix.Abseil Team2-17/+17
PiperOrigin-RevId: 494786543 Change-Id: I7769558dd2ca046d8957bf352dc04cfb48ff7c3a
2022-12-12Introduces a new porting flag (GTEST_HAS_FILE_SYSTEM) to indicate whether a ↵Abseil Team5-40/+115
platform supports filesystem operations. PiperOrigin-RevId: 494751986 Change-Id: I07f73bdf478a73934b8f1a69c1ab4abda1b231ae
2022-12-08Fall back to the system clock when building with newlib on a system without ↵Tom Hughes1-3/+10
a monotonic clock. PiperOrigin-RevId: 493917905 Change-Id: I20137cfcda3671ffc8edcda2b6554aa392e3a00a
2022-12-07Migrate GoogleTest to a bug report template and add a link to the discussionDerek Mauro3-43/+57
forum for non-bugs PiperOrigin-RevId: 493632811 Change-Id: I7e02c3c479c2a925b7971f6a55e1e95a5a6f2d0a
2022-12-05Remove the unused class TestNameIsDerek Mauro1-31/+0
Fixes #4076 PiperOrigin-RevId: 493158910 Change-Id: Id66c0443a6f5f4d167ae39ac79766b32cf95a383
2022-11-30Make SizeIsMatcher::Impl conform to the contract of MatcherDescriberInterface.Abseil Team2-4/+4
MatcherDescriberInterface specifies that DescribeTo "should print a verb phrase", but "size ..." is not a verb phrase. Currently, ElementsAre(SizeIs(9)) is described as "has 1 element that size is equal to 9". With this change, it will be described as "has 1 element that has a size that is equal to 9". PiperOrigin-RevId: 492022324 Change-Id: I4083335f2419462464957521c1e033643b53b763
2022-11-29Disables `-Wunused-member-function` and `-Wused-but-marked-unused` that ↵Abseil Team5-3/+59
trigger via `MOCK_METHOD()` and `EXPECT_THAT()` macros. Fixes: #4052, #4055 PiperOrigin-RevId: 491647393 Change-Id: I8e2ad838156fa8c7e9dccd1740af797e694992b6
2022-11-23This commit fixes a minor verb conjugation error in gmock_cook_book.md.Abseil Team1-1/+1
PiperOrigin-RevId: 490601453 Change-Id: I733b2ed8740b1c809dddb166a42993b869198469
2022-11-21Merge pull request #4066 from zloylos:doc/make_uniqCopybara-Service2-5/+5
PiperOrigin-RevId: 490057649 Change-Id: Ia788d55cfbc576e841064b8e907f8671cc46f3bf
2022-11-20Change MakeUnique -> std::make_unique in docsDenis Hananein2-5/+5
2022-11-16When printing floating-point numbers, print full precision by default.Abseil Team2-1/+84
To make debug output readable, we still use the faster 6-digit precision sometimes, but only if it will round-trip. This way, when a test fails due to a very small difference in floating-point numbers, users will have enough digits to see the difference. PiperOrigin-RevId: 488958311 Change-Id: Ibcac43f48a97006d89217530c69386cc4fa2735c
2022-11-15Remove incorrect usage of GTEST_ATTRIBUTE_UNUSED_ on classes.Abseil Team4-15/+7
Fixes: #4054 PiperOrigin-RevId: 488721587 Change-Id: I8742d8475376635c83edcf524796a6107042e89b
2022-11-14Merge pull request #4058 from zloylos:support-kitty-termCopybara-Service3-9/+14
PiperOrigin-RevId: 488463135 Change-Id: I4180d766dabbe438210904e743e6e963122540f5
2022-11-14Merge pull request #4060 from RerEngineer:mainCopybara-Service1-3/+3
PiperOrigin-RevId: 488456139 Change-Id: I648f3d2c6affadfea27214a6a22cacc576971cef
2022-11-12(no commit message)RerEngineer0-0/+0
2022-11-12fixing gcc.gnu domain redirectionRerEngineer1-1/+1
2022-11-11Defined a testing::SrcDir() function that returns the name of a directoryAbseil Team3-11/+140
where ancillary data files can be found. PiperOrigin-RevId: 487896836 Change-Id: Ie6b1ba734e900fa33872b63090879ee6efe33411
2022-11-10Support kitty TERMDenis Hananein3-0/+5
Signed-off-by: Denis Hananein <i@zloylos.me>
2022-11-10Merge pull request #4039 from zloylos:fix-return-fail-at-4038Copybara-Service1-3/+3
PiperOrigin-RevId: 487516335 Change-Id: Ib475750586fc7e6ab01729f65253e3a86916b994
2022-11-08Remove incorrect GTEST_ATTRIBUTE_UNUSED_ from InSequence class.Abseil Team1-1/+1
Fixes: #4048 PiperOrigin-RevId: 486951561 Change-Id: I4fae101b5ac5ed4f46c32aba8c36519e1f784db1
2022-11-07RecordProperty serializes ints and 64-bit ints, including size_tsAbseil Team3-8/+9
PiperOrigin-RevId: 486685761 Change-Id: I164d2646e65670d341dbf437ee571953c456677a
2022-11-05Fix typo in documentation of ConvertGenerator()Abseil Team1-1/+1
PiperOrigin-RevId: 486316328 Change-Id: I91d5d5ba1aaf4a4ab14019c8963e7fe181722f95
2022-11-03Add documentation for `--gunit_recreate_environments_when_repeating`.Abseil Team1-2/+6
PiperOrigin-RevId: 485895339 Change-Id: I09b0f535941531ef7bcb74593d385891d56b3e32
2022-10-25Merge pull request #4041 from zloylos:allow-naming-expectationsCopybara-Service3-11/+48
PiperOrigin-RevId: 483683590 Change-Id: Id22de3a22018324e5c1e21e262ac5e027a83bf3e
2022-10-25Use git commit hash in CMake quickstartDino Radakovic1-3/+2
Commit hashes reflect GoogleTest's live-at-head stance. Credits to @shinfd. Fixes #4000 PiperOrigin-RevId: 483655943 Change-Id: Ieeb162859348dbe3657e18f283bac81412f2585d
2022-10-24Clarify that parameter generator does not evaluate immediatelyAbseil Team1-0/+5
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-21Fix format without expectation nameDenis Hananein1-2/+2
Signed-off-by: Denis Hananein <i@zloylos.me>
2022-10-21Change messagesDenis Hananein2-10/+9
Signed-off-by: Denis Hananein <i@zloylos.me>
2022-10-20Allow naming expectations #3970Denis Hananein2-4/+29
Signed-off-by: Denis Hananein <i@zloylos.me>
2022-10-19Merge pull request #4036 from zloylos:fix-output-json-3884Copybara-Service1-0/+3
PiperOrigin-RevId: 482287697 Change-Id: I1179a1570cd64fcb156bda26e5c779b876c51742
2022-10-18CMake: Add GTEST_HAS_ABSL build option for using AbslAbseil Team2-0/+17
PiperOrigin-RevId: 482101793 Change-Id: I1bd140fd6a325f573c8a0c464e4dccd4acd0d0a3
2022-10-18Adds Win32 UNC path support to FilePath::IsAbsolutePath() and ↵Abseil Team3-18/+85
FilePath::IsRootDirectory() in GoogleTest Fixes: #3025 PiperOrigin-RevId: 481932601 Change-Id: I90fcb5b3d189aea79a0fd18735bad038b3511270
2022-10-17Fix detection of the no_sanitize("hwaddress") attributeDerek Mauro1-1/+12
PiperOrigin-RevId: 481765573 Change-Id: I1ba829c3cbf364a51d3ba383ee3b474c0e109578
2022-10-17Merge pull request #4037 from KloolK:patch-1Copybara-Service1-17/+8
PiperOrigin-RevId: 481734961 Change-Id: I629dc1ca3b10bf5fc6afc179b651a09081f5c919