summaryrefslogtreecommitdiffstats
path: root/googlemock/test/gmock-function-mocker_test.cc
Commit message (Collapse)AuthorAgeFilesLines
* Use '=default' to define trivial constructor/destructorsrefs/pull/4221/headTom Hughes2023-04-211-12/+12
| | | | | | | https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-equals-default.html PiperOrigin-RevId: 526079054 Change-Id: Ia4db21e3e5f58b90de05d52fd94b291ed06d785d
* Use "#ifdef GTEST_OS_..." instead of "#if GTEST_OS_..."Tom Hughes2023-03-061-6/+6
| | | | | | | This is compatible with compiling with "-Wundef" (#3267). PiperOrigin-RevId: 513943378 Change-Id: I47cf5fabbb77be061c4483a0adc54511af6b191c
* Use GTEST_DISABLE_MSC_WARNINGS macros to disable warningsTom Hughes2023-01-301-13/+7
| | | | | | | | | 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
* Disables `-Wunused-member-function` and `-Wused-but-marked-unused` that ↵Abseil Team2022-11-291-0/+15
| | | | | | | | trigger via `MOCK_METHOD()` and `EXPECT_THAT()` macros. Fixes: #4052, #4055 PiperOrigin-RevId: 491647393 Change-Id: I8e2ad838156fa8c7e9dccd1740af797e694992b6
* gmock-actions: simplify Return and add better documentation.Aaron Jacobs2022-05-111-0/+6
| | | | | | | | | | Better document requirements, API decisions, and historical accidents. Make an implicit conversion easier and in a more appropriate place, and ease the burden of some assertions in the conversion operator. Stop using the legacy ActionInterface style for defining the action. PiperOrigin-RevId: 447894892 Change-Id: I179e23ec2abdd9bf05c204ab18dbb492f1372e8e
* Remove the legacy internal GTEST_DISALLOW_* macrosDerek Mauro2022-04-221-11/+27
| | | | | PiperOrigin-RevId: 443715444 Change-Id: I3ffd54b63d2728ae4a668ee7875c8c3c8188087c
* Running clang-format over all of GoogleTestAbseil Team2022-03-151-51/+32
| | | | | | | | | | | | | | | | A few tests are examining code locations and looking af the resulting line numbers to verify that GoogleTest shows those to users correctly. Some of those locations change when clang-format is run. For those locations, I've wrapped portions in: // clang-format off ... // clang-format on There may be other locations that are currently not tickled by running clang-format. PiperOrigin-RevId: 434844712 Change-Id: I3a9f0a6f39eff741c576b6de389bef9b1d11139d
* Googletest exportAbseil Team2021-05-131-6/+18
| | | | | | Support templating MockFunction over function objects besides std::function. PiperOrigin-RevId: 373586967
* Googletest exportAbseil Team2020-11-061-0/+66
| | | | | | Add support for ref qualifiers in MOCK_METHOD. PiperOrigin-RevId: 341047839
* Merge pull request #2350 from adambadura:MockFunctionFromStdFunctionXiaoyi Zhang2020-03-241-0/+51
|\ | | | | | | PiperOrigin-RevId: 302677275
| * Add support for std::function in MockFunction (#2277)refs/pull/2350/headAdam Badura2020-03-181-1/+20
| |
| * Add tests for MockFunction deduction (#2277)Adam Badura2020-03-181-0/+30
|/ | | | | | Add tests checking that ::testing::MockFunction template argument can be deduced in a function call context. This is a property raised in the review, however, not checked before by any tests.
* Googletest exportAbseil Team2020-02-071-96/+257
| | | | | | | | | Get rid of gmock-generated-function-mockers.h and gmock-generated-function-mockers.h.pump. Stop using pump for GMOCK_METHOD* macroses generation. PiperOrigin-RevId: 293454519
* Revert "Merge pull request #2498 from thejcannon:noexcept_spec"refs/pull/2533/headJoshua Cannon2019-10-231-0/+29
| | | | | This reverts commit ba513d2c9525a7c986c115ed5d603f2cf17c6016, reversing changes made to a3ca5b9e0bf9abc3bc639684966085c4d3182578.
* Googletest exportAbseil Team2019-10-181-0/+7
| | | | | | | | Addressing https://github.com/google/googletest/issues/2502 Add MOCK_METHOD support for returning function pointers. PiperOrigin-RevId: 275323671
* Merge pull request #2498 from thejcannon:noexcept_specGennadiy Civil2019-10-111-29/+0
|\ | | | | | | PiperOrigin-RevId: 274155281
* \ Merge pull request #2498 from thejcannon:noexcept_specGennadiy Civil2019-10-111-0/+29
|\ \ | |/ | | | | PiperOrigin-RevId: 274097989
| * Made noexcept condition more excitingrefs/pull/2498/headJoshua Cannon2019-10-101-8/+12
| |
| * Use declval in noexcept expressionJoshua Cannon2019-10-071-7/+8
| |
| * Switch to free function to avoid GCC bugJoshua Cannon2019-10-071-3/+3
| |
| * Avoid comma operatorJoshua Cannon2019-10-071-2/+3
| |
| * Use the verbatim noexcept spec in MOCKED_METHODJoshua Cannon2019-10-071-0/+21
|/
* Googletest exportAbseil Team2019-03-011-1/+1
| | | | | | | | | | Build gmock cleanly with clang -Wextra-semi For https://crbug.com/926235. From https://github.com/google/googletest/pull/2139. Fixes https://github.com/google/googletest/issues/2138. PiperOrigin-RevId: 235832527
* Googletest exportAbseil Team2019-01-181-0/+17
| | | | | | | | | | Fix mocking method arguments with templated copy constructors. A previous change removed workarounds for old compilers from googletest and googlemock. Unfortunately, a bit of code that started as a workaround for Symbian's C++ compiler is still needed to avoid copy/move constructor ambiguity when mocking functions with certain argument types. The test case added by this CL is extracted from Chrome's codebase, and was discovered while attempting to roll googletest. PiperOrigin-RevId: 229801765
* Googletest exportAbseil Team2019-01-021-14/+0
| | | | | | | | Remove the #ifs for old, unsupported and buggy compilers: * old versions of GCC & MSVC * Symbian PiperOrigin-RevId: 227116941
* Googletest exportAbseil Team2018-12-201-2/+0
| | | | | | Unifdef c++11-related macros from googletest now that it requires C++11. PiperOrigin-RevId: 225905601
* Googletest exportAbseil Team2018-11-151-0/+659
One macro to rule them all. PiperOrigin-RevId: 221462515