summaryrefslogtreecommitdiffstats
path: root/googlemock
Commit message (Collapse)AuthorAgeFilesLines
* Use "#ifdef GTEST_OS_..." instead of "#if GTEST_OS_..."Tom Hughes2023-03-068-22/+22
| | | | | | | This is compatible with compiling with "-Wundef" (#3267). PiperOrigin-RevId: 513943378 Change-Id: I47cf5fabbb77be061c4483a0adc54511af6b191c
* Internal Code ChangeAbseil Team2023-03-033-3/+3
| | | | | PiperOrigin-RevId: 513770561 Change-Id: I82fbed177c6ba4e2e5b776ae3e0255c868e32e25
* Fix link in ReportUninterestingCall messageAbseil Team2023-02-163-6/+6
| | | | | | | | | | This CL changes the link in the ReportUninterestingCall message from .../gmock_cook_book.md#knowing-when-to-expect to .../gmock_cook_book.md#knowing-when-to-expect-useoncall. This is necessary following https://github.com/google/googletest/commit/31ff597. PiperOrigin-RevId: 510138974 Change-Id: Ic98c84b07751d27dfc95eddbe7874f76d68b456f
* Remove GTEST_USES_PCRE referencesTom Hughes2023-02-071-11/+2
| | | | | | | | | | | | | Nothing defines GTEST_USES_PCRE anymore. It was only meant for internal use, so nothing public should be relying on it: https://github.com/google/googletest/issues/2735#issuecomment-644849438. Found when compiling with "-Wundef". Fixes #2735. PiperOrigin-RevId: 507823660 Change-Id: Ie19e576ff01dc3b16381338578ece92adccfc09b
* Fix GTEST_HAS_ABSL define check for [-Werror=undef] compilationsMartijn Vels2023-02-071-2/+2
| | | | | PiperOrigin-RevId: 507788664 Change-Id: Ib8cfbf3102a38e210fdae8a548fd84f0723ccc10
* Add support for the alternative base64 encoding in RFC 4648 section 5 to ↵Abseil Team2023-02-062-1/+9
| | | | | | | `WhenBase64Unescaped`. PiperOrigin-RevId: 507527786 Change-Id: Ie5e088b1814981f6c760d7e25418a430172705ec
* Fix include orderTom Hughes2023-02-011-2/+2
| | | | | PiperOrigin-RevId: 506424617 Change-Id: If7f0beb92022589523db204a6b5cbe9249cebf62
* Remove GMOCK_RENAME_MAINTom Hughes2023-02-011-7/+0
| | | | | | | GMOCK_RENAME_MAIN appears unused. PiperOrigin-RevId: 506387823 Change-Id: I732c1f64f9038991a5c9aea1f2ad6fff07622afa
* Fix gmock_output_test when using MSVCTom Hughes2023-02-012-4/+9
| | | | | | | | | | | | | std::pair is printed as "struct std::pair<int,bool>" when using MSVC vs "std::pair<int,bool>" with other compilers. Switch to "std::tuple", which is the same for all compilers. See https://learn.microsoft.com/en-us/cpp/standard-library/pair-structure https://learn.microsoft.com/en-us/cpp/standard-library/tuple-class PiperOrigin-RevId: 506340295 Change-Id: Ib4ce2f74d54888a4e4173f42da1b55cc5583f7d4
* Use GTEST_DISABLE_MSC_WARNINGS macros to disable warningsTom Hughes2023-01-3015-134/+68
| | | | | | | | | Prior to this change we had a mixture of pragmas and GTEST_DISABLE_MSC_WARNINGS; this change consolidates all instances to use the macros. PiperOrigin-RevId: 505786926 Change-Id: I2be8f6304387393995081af42ed32c2ad1bba5a7
* Use explicit short to fix MSVC compiler warningTom Hughes2023-01-301-4/+4
| | | | | | | | warning C4244: 'initializing': conversion from 'int' to 'short', possible loss of data PiperOrigin-RevId: 505774670 Change-Id: I3524040334a4b265bae12cfacdd2b615cbb1cfc8
* Merge pull request #4115 from SunBlack:codespellCopybara-Service2023-01-301-2/+2
|\ | | | | | | | | PiperOrigin-RevId: 505740434 Change-Id: I963f6a6b667a030c87f211173f578f7c35733e68
| * Fix typos found by codespellrefs/pull/4115/headSunBlack2023-01-041-2/+2
| |
* | Remove pylint disable comments that no longer trigger warningsTom Hughes2023-01-251-5/+0
| | | | | | | | | | PiperOrigin-RevId: 504633130 Change-Id: I3fdbc83975fea97aa53f7325d323adead0a30e24
* | Fix formatting in subset of Python filesTom Hughes2023-01-252-27/+40
| | | | | | | | | | | | | | | | These files were formatted with automated tools. The remaining Python files require some manual fix ups, so they will be fixed separately. PiperOrigin-RevId: 504579820 Change-Id: I3923bd414bffe3ded6163ec496cd09ace3951928
* | Fix formatting of C++ filesTom Hughes2023-01-247-49/+50
| | | | | | | | | | PiperOrigin-RevId: 504325204 Change-Id: Iaa1d6d0ab1dccaaeef26f9cb109d530835499240
* | Remove FloatingPoint::Max() in favor of std::numeric_limits::max()Derek Mauro2023-01-241-1/+3
| | | | | | | | | | | | | | | | | | | | | | In #4113 a user says Max clashes with a macro. Since it is only used in a test, use std::numeric_limits::max() instead. Note that in headers, the macro issue can be mitigated with parenthesis like this: `(std::numeric_limits<T>::max)()` PiperOrigin-RevId: 504284906 Change-Id: Ibf430caec1a6afdf6b303534fec6a4fd00a6373f
* | Replace deprecated python callsTom Hughes2023-01-171-2/+2
| | | | | | | | | | | | | | | | assert_ -> assertTrue/assertFalse/assertIn/assertNotIn assertEquals -> assertEqual PiperOrigin-RevId: 502654909 Change-Id: I25d30095a83c3806606cb80d676b3c979495e6bd
* | gmock_output_test: normalize golden file output to unix line endingsAbseil Team2023-01-171-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
* | Fix -Wshadow warningsTom Hughes2023-01-121-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
* | IWYU: Add missing std includesTom Hughes2023-01-052-0/+2
|/ | | | | PiperOrigin-RevId: 499893032 Change-Id: I33304802b7c82ae2d008f3ee89df38866e5f57ba
* Shut up a Clang warning.Abseil Team2022-12-151-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
* Refactor matrix verification into VerifyMatchMatrix.refs/pull/4082/headAbseil Team2022-12-122-17/+17
| | | | | PiperOrigin-RevId: 494786543 Change-Id: I7769558dd2ca046d8957bf352dc04cfb48ff7c3a
* Make SizeIsMatcher::Impl conform to the contract of MatcherDescriberInterface.Abseil Team2022-11-302-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
* Disables `-Wunused-member-function` and `-Wused-but-marked-unused` that ↵Abseil Team2022-11-295-3/+59
| | | | | | | | trigger via `MOCK_METHOD()` and `EXPECT_THAT()` macros. Fixes: #4052, #4055 PiperOrigin-RevId: 491647393 Change-Id: I8e2ad838156fa8c7e9dccd1740af797e694992b6
* Remove incorrect GTEST_ATTRIBUTE_UNUSED_ from InSequence class.Abseil Team2022-11-081-1/+1
| | | | | | Fixes: #4048 PiperOrigin-RevId: 486951561 Change-Id: I4fae101b5ac5ed4f46c32aba8c36519e1f784db1
* Merge pull request #4041 from zloylos:allow-naming-expectationsCopybara-Service2022-10-253-11/+48
|\ | | | | | | | | PiperOrigin-RevId: 483683590 Change-Id: Id22de3a22018324e5c1e21e262ac5e027a83bf3e
| * Fix format without expectation namerefs/pull/4041/headDenis Hananein2022-10-211-2/+2
| | | | | | | | Signed-off-by: Denis Hananein <i@zloylos.me>
| * Change messagesDenis Hananein2022-10-212-10/+9
| | | | | | | | Signed-off-by: Denis Hananein <i@zloylos.me>
| * Allow naming expectations #3970Denis Hananein2022-10-202-4/+29
|/ | | | Signed-off-by: Denis Hananein <i@zloylos.me>
* Workaround for Visual C++ error C2039 with std::tuple_element_t.Abseil Team2022-10-122-4/+15
| | | | | | | Fixes #3931 PiperOrigin-RevId: 480659507 Change-Id: I6fabef63b1285189a06375227273d9de2456e37a
* Port GoogleTest to QuRT (Hexagon RTOS)refs/pull/4016/headMarat Dukhan2022-09-261-0/+7
|
* Remove obsolete MSVC warning pragmas for Invalid<T>()Abseil Team2022-09-081-11/+0
| | | | | | | | Remove the MSVC pragmas for disabling warning C4717 (infinite recursion) for Invalid<T>() because that warning has been fixed in cl/441474979. PiperOrigin-RevId: 473012585 Change-Id: I5f1bf88379bd4f2bf005e029c04766ac4caadd84
* Fixed header guards to match style guide conventions.Abseil Team2022-09-011-3/+3
| | | | | PiperOrigin-RevId: 471524660 Change-Id: Ie11e6a7a5a5497f64d5b9c382f1017094e043093
* Merge pull request #3916 from asmodai27:mainCopybara-Service2022-08-301-3/+4
|\ | | | | | | | | PiperOrigin-RevId: 471062949 Change-Id: I3f063c441b3d4275d931016c431519c14e68d51c
| * Avoid implicit conversion from int to charJérôme Travert2022-06-261-1/+1
| |
* | Add support of 19-member structs to gmock UnpackStructImpl.Hardik Vala2022-08-222-0/+10
| | | | | | | | | | PiperOrigin-RevId: 469171380 Change-Id: Ic75fc0523924e40e620552d4c04b79dad22a68e0
* | Merge pull request #3918 from assafpr:master2mainCopybara-Service2022-08-015-8/+8
|\ \ | | | | | | | | | | | | PiperOrigin-RevId: 464586117 Change-Id: Icda62f13b962f7408bb5698ae2b627391257d152
| * | Update gmock-matchers.hassafpr2022-06-271-1/+1
| | | | | | | | | branch master changed to main on link
| * | Update gmock-actions.hassafpr2022-06-271-1/+1
| | | | | | | | | master branch changed to main in links
| * | Update gmock-spec-builders_test.ccassafpr2022-06-271-1/+1
| | | | | | | | | master branch changed to main in link
| * | Update gmock-spec-builders.ccassafpr2022-06-271-1/+1
| | |
| * | Update gmock_output_test_golden.txtassafpr2022-06-221-4/+4
| |/
* | Add support of 18-member structs to gmock UnpackStructImpl.refs/pull/3966/headAbseil Team2022-07-292-2/+17
| | | | | | | | | | PiperOrigin-RevId: 463961734 Change-Id: Ib62e320a745c190955f181c1f4f12e4cd407ef22
* | Add IsEmpty overload for C-style stringsDino Radakovic2022-07-252-7/+64
| | | | | | | | | | | | | | Fixes #3937 PiperOrigin-RevId: 463180144 Change-Id: I21b528acc4c3f3aba4234642be01fcead7fe7f00
* | Merge pull request #3927 from yutotnh:fix-typoCopybara-Service2022-07-183-4/+4
|\ \ | | | | | | | | | | | | PiperOrigin-RevId: 461699509 Change-Id: I9bab4474c5f52d4d66691dfb96a4d20f89fbcfeb
| * | fix: typo in test nameyutotnh2022-07-011-1/+1
| | |
| * | fix: some typos in commentyutotnh2022-07-012-3/+3
| | |
* | | Merge pull request #3928 from venik:venik-clean-upCopybara-Service2022-07-121-1/+1
|\ \ \ | |/ / |/| | | | | | | | PiperOrigin-RevId: 460455562 Change-Id: I29efc09887651d8734586703fe0691482ba4c981
| * | cleanup from unique_ptr branchrefs/pull/3928/headAlexander Nikforov2022-07-011-2/+1
|/ /