aboutsummaryrefslogtreecommitdiffstats
path: root/googlemock/test/gmock-actions_test.cc
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #2815 from Quuxplusone:simpleGennadiy Rozental2020-05-011-2/+0
|\ | | | | | | PiperOrigin-RevId: 308625388
| * Remove all uses of GTEST_DISALLOW_{MOVE_,}ASSIGN_.Arthur O'Dwyer2020-04-231-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | None of these are strictly needed for correctness. A large number of them (maybe all of them?) trigger `-Wdeprecated` warnings on Clang trunk as soon as you try to use the implicitly defaulted (but deprecated) copy constructor of a class that has deleted its copy assignment operator. By declaring a deleted copy assignment operator, the old code also caused the move constructor and move assignment operator to be non-declared. This means that the old code never got move semantics -- "move-construction" would simply call the defaulted (but deprecated) copy constructor instead. With the new code, "move-construction" calls the defaulted move constructor, which I believe is what we want to happen. So this is a runtime performance optimization. Unfortunately we can't yet physically remove the definitions of these macros from gtest-port.h, because they are being used by other code internally at Google (according to zhangxy988). But no new uses should be added going forward.
* | Googletest exportAbseil Team2020-05-011-27/+72
|/ | | | | | Rewrite ReturnNew action without using pump. PiperOrigin-RevId: 308219616
* Googletest exportAbseil Team2020-02-281-2/+13
| | | | | | | | Allow construction of an Action from a callable of zero args Action already allows construction from a callable with the same args as the mocked function, without needing to wrap the callable in Invoke. However, if you don't care about the arguments to the mocked function you need to either accept all of them or wrap your callable in InvokeWithoutArgs. This change makes both of those unnecessary, since it allows you to pass a no-args callable to Action directly. PiperOrigin-RevId: 296117034
* Googletest exportAbseil Team2019-11-221-6/+6
| | | | | | | | | | | | | Use standard C++11 integer types in gtest-port.h. Remove testing::internal::{Int,Uint}{32,64} in favor of types guaranteed to be in <cstdint> since C++11. Tests for built-in integer type coverage are switched from {Int,Uint}64 to [unsigned] long long, which is guaranteed by C++11 to exist and be at least 64-bit wide. PiperOrigin-RevId: 281565263
* Merge pull request #2527 from ↵vslashg2019-10-291-0/+36
|\ | | | | | | | | | | PiotrNycz:gmock_prevent_return_ref_to_store_temporaries_2 PiperOrigin-RevId: 277061341
| * variable names corrected (followed google coding style)Piotr Nycz2019-10-251-14/+14
| | | | | | | | Issue 2527
| * Apply 80chars limitPiotr Nycz2019-10-251-1/+2
| | | | | | | | Issue 2527
| * Tests simplified and names corrected (POD->scalar)Piotr Nycz2019-10-241-49/+18
| | | | | | | | Issue 2527
| * Added more tests to verify: ReturnRef not accept temporaryPiotr Nycz2019-10-231-15/+57
| | | | | | | | Issue 2471
| * Added tests verifying that temporaries are accepted by ReturnRefPiotr Nycz2019-10-221-0/+24
| | | | | | | | Issue no 2527
* | Googletest exportAbseil Team2019-10-231-0/+26
|/ | | | | | Add a matcher `testing::ReturnRoundRobin` which, on each call, returns the next element in the sequence, restarting at the beginning once it has reached the end. PiperOrigin-RevId: 276312136
* Googletest exportAbseil Team2019-08-151-8/+0
| | | | | | | | | | | | | Remove legacy support for signed wchar_t and unsigned wchar_t. Clang now errors out on these types as well by default. Rather than making the condition for these types even more complicated, just remove the tests covering these types since they don't seem to justify the maintenance burden. We can reasonably expect these types to work in compilers that support them without needing specific tests for them since they are treated as standard integral types. PiperOrigin-RevId: 263577673
* Googletest exportAbseil Team2019-04-011-8/+0
| | | | | | | | Remove support for "global" ::string and ::wstring types. This support existed for legacy codebases that existed from before namespaces where a thing. It is no longer necessary. PiperOrigin-RevId: 241335738
* Googletest exportAbseil Team2019-01-171-1/+2
| | | | | | | | | Refactor the `Invoke` and `InvokeWithoutArgs` actions: - Replace pump'd classes and functions with templates. - Make the polymorphic actions be polymorphic functors instead. - Fix Invoke(Callback*) to work with subclasses of the callbacks, instead of trying to diagnose that in gmock_doctor. PiperOrigin-RevId: 229604112
* Googletest exportAbseil Team2019-01-141-5/+3
| | | | | | | Deduplicate testing::ReferenceWrapper with std::reference_wrapper. Minor cleanups in matchers_test. PiperOrigin-RevId: 229022872
* Googletest exportmisterg2019-01-021-4/+0
| | | | | | Internal Change PiperOrigin-RevId: 227575279
* Googletest exportAbseil Team2019-01-021-10/+0
| | | | | | | | Remove the #ifs for old, unsupported and buggy compilers: * old versions of GCC & MSVC * Symbian PiperOrigin-RevId: 227116941
* Googletest exportAbseil Team2018-12-201-12/+0
| | | | | | Unifdef c++11-related macros from googletest now that it requires C++11. PiperOrigin-RevId: 225905601
* Googletest exportAbseil Team2018-12-031-5/+5
| | | | | | Applied fixes for ClangTidy modernize-use-override and modernize-use-using. PiperOrigin-RevId: 223800219
* Googletest exportmisterg2018-11-201-2/+2
| | | | | | Fix broken OSS build PiperOrigin-RevId: 222244158
* Googletest exportAbseil Team2018-11-201-2/+0
| | | | | | Remove redundant Base/Derived types. PiperOrigin-RevId: 222243634
* Googletest exportAbseil Team2018-11-201-0/+118
| | | | | | Upgrade WithArgs family of actions to C++11. PiperOrigin-RevId: 221671690
* Remove workarounds for unsupported MSVC versionsRobin Lindén2018-11-101-2/+2
|
* Unconditionally use std::tuple.Abseil Team2018-10-091-91/+91
| | | | | | Remove all mention of TR1 tuple and our own implementation of tuple. PiperOrigin-RevId: 216395043
* Apply clang-tidy modernize-use-nullptr to googletest.Abseil Team2018-10-051-14/+14
| | | | | | | | | | | Now that googletest has moved to C++11, it should no longer use NULL or 0 for the null pointer. This patch converts all such usages to nullptr using clang-tidy. This prevents LLVM from issuing -Wzero-as-null-pointer-constant warnings. PiperOrigin-RevId: 215814400
* Comments changes, no functionality changes. Gennadiy Civil2018-08-141-1/+1
|
* Comments changes, no functionality changesGennadiy Civil2018-08-141-2/+1
|
* small cleanup, np functional changesGennadiy Civil2018-08-071-2/+0
|
* automatic code sync mgt, comment onlyGennadiy Civil2018-08-061-0/+2
|
* Code sync, mostly formatting and removing outdatesGennadiy Civil2018-07-181-202/+0
|
* merging, testing, this should be itGennadiy Civil2018-04-161-1/+1
|
* mergingGennadiy Civil2018-04-161-3/+2
|
* mergingGennadiy Civil2018-04-161-2/+3
|
* more pizzaGennadiy Civil2018-04-131-3/+2
|
* more OSX pizzasGennadiy Civil2018-04-131-1/+2
|
* osx pizzasGennadiy Civil2018-04-131-2/+3
|
* merging gmock actions test Gennadiy Civil2018-04-131-0/+1
|
* merging, gmock actions test Gennadiy Civil2018-04-131-1/+142
|
* mergeGennadiy Civil2018-04-101-143/+1
|\
| * Revert "gmock actions 2"Gennadiy Civil2018-04-091-159/+1
| |
| * formattingGennadiy Civil2018-04-091-0/+3
| |
| * msvcGennadiy Civil2018-04-091-0/+13
| |
| * testing msvc againGennadiy Civil2018-04-091-16/+0
| |
| * More msvc 14 Gennadiy Civil2018-04-091-0/+16
| |
* | RE-Doing the merge, this time with gcc on mac in the PR so I can catch ↵Gennadiy Civil2018-04-101-0/+16
|/ | | | errors before merging the PR
* merging gmock-actions 2Gennadiy Civil2018-04-061-1/+143
|
* Merging gMock, 2Gennadiy Civil2018-04-051-0/+1
|
* More merges, removing old dead codeGennadiy Civil2018-03-131-2/+2
|
* Try to handle unsigned wchar_t (arm) a bit betterScott Graham2018-02-231-0/+4
|