aboutsummaryrefslogtreecommitdiffstats
path: root/googlemock/include/gmock/gmock-spec-builders.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix a -Wdeprecated warning.Arthur O'Dwyer2020-04-231-1/+4
| | | | | | | | gmock-spec-builders.h:503:3: error: definition of implicit copy constructor for 'Expectation' is deprecated because it has a user-declared destructor [-Werror,-Wdeprecated] ~Expectation(); ^
* Remove all uses of GTEST_DISALLOW_{MOVE_,}ASSIGN_.Arthur O'Dwyer2020-04-231-4/+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.
* Merge pull request #2350 from adambadura:MockFunctionFromStdFunctionXiaoyi Zhang2020-03-241-38/+92
|\ | | | | | | PiperOrigin-RevId: 302677275
| * Add support for std::function in MockFunction (#2277)Adam Badura2020-03-181-39/+93
|/
* remove MSVC workaround: warning 4355Krystian Kuzniarek2019-11-221-8/+0
|
* Merge pull request #2387 from kuzkry:iffShaindel Schwartz2019-09-121-16/+19
|\ | | | | | | PiperOrigin-RevId: 268693457
| * restore mistakenly removed iffs in their explicit formKrystian Kuzniarek2019-08-201-16/+19
| | | | | | | | | | Due to confusion arisen from "iff" standing for "if and only if", this commit uses the latter.
* | Googletest exportkuzkry2019-09-061-2/+2
|/ | | | | | | | | Merge 7f4f58da20e1066a888d3e4bcbef541db798a605 into 90a443f9c2437ca8a682a1ac625eba64e1d74a8a Closes #2395 COPYBARA_INTEGRATE_REVIEW=https://github.com/google/googletest/pull/2395 from kuzkry:custom-type-traits-remove_reference 7f4f58da20e1066a888d3e4bcbef541db798a605 PiperOrigin-RevId: 266189044
* remove custom implementations of std::is_sameKrystian Kuzniarek2019-08-141-3/+3
|
* remove an excessive mutable type specifierKrystian Kuzniarek2019-08-011-1/+1
| | | | | MockFunction's private member cannot be reached from outside and all its non-static member functions are not const.
* fix typosKrystian Kuzniarek2019-07-301-14/+14
|
* Add missing <functional> includeAdam Badura2019-07-161-0/+1
| | | | | | | gmock-spec-builders.h uses std::function (in MockFunction) but did not include <functional> to provide it. Apparently, it worked since the header must have been included by something else but better be safe than sorry.
* Googletest exportAbseil Team2019-01-221-1/+1
| | | | | | Make internal FunctionMocker class final PiperOrigin-RevId: 230332778
* Googletest exportAbseil Team2019-01-181-2/+8
| | | | | | | | | | 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 exportmisterg2019-01-021-4/+0
| | | | | | Internal Change PiperOrigin-RevId: 227575279
* Googletest exportAbseil Team2019-01-021-11/+2
| | | | | | | | Remove the #ifs for old, unsupported and buggy compilers: * old versions of GCC & MSVC * Symbian PiperOrigin-RevId: 227116941
* Googletest exportAbseil Team2018-12-031-25/+20
| | | | | | Applied fixes for ClangTidy modernize-use-override and modernize-use-using. PiperOrigin-RevId: 223800219
* Googletest exportAbseil Team2018-11-081-69/+144
| | | | | | Move FunctionMocker and MockFunction out of the pump file and implement with variadic templates. PiperOrigin-RevId: 220640265
* Googletest exportmisterg2018-10-301-1/+1
| | | | | | Remove scoped_ptr replace with std::unique_ptr PiperOrigin-RevId: 219291284
* Merge pull request #1941 from barkovv:masterGennadiy Civil2018-10-291-2/+3
|\ | | | | | | PiperOrigin-RevId: 219134349
| * Replaced all NULLs with nullptr in googlemockVadim Barkov2018-10-281-1/+1
| |
* | Googletest exportmisterg2018-10-291-20/+11
|/ | | | | | Remove linked_ptr and use std::shared_ptr instead PiperOrigin-RevId: 219129336
* Googletest exportAbseil Team2018-10-261-11/+20
| | | | | | Remove linked_ptr and use std::shared_ptr instead PiperOrigin-RevId: 218618184
* Googletest exportmisterg2018-10-261-20/+11
| | | | | | Remove linked_ptr and use std::shared_ptr instead PiperOrigin-RevId: 218571466
* Merge pull request #1911 from BrukerJWD:isniceGennadiy Civil2018-10-231-0/+10
|\ | | | | | | PiperOrigin-RevId: 218384341
| * Merge branch 'master' into isniceBrukerJWD2018-10-161-115/+187
| |\
| * | Added Mock::IsNaggy, IsNice, and IsStrictJonathan Wendeborn2018-10-161-0/+10
| | |
* | | Googletest exportAbseil Team2018-10-181-21/+18
| |/ |/| | | | | | | | | C++11 code cleanup. PiperOrigin-RevId: 217364243
* | Merge pull request #1908 from rwoldberg:masterGennadiy Civil2018-10-121-5/+6
|\ \ | | | | | | | | | PiperOrigin-RevId: 216909845
| * | Change types to remove cast warnings.Robert Woldberg2018-10-121-3/+3
|/ /
* | Apply clang-tidy modernize-use-nullptr to googletest.Abseil Team2018-10-051-10/+10
| | | | | | | | | | | | | | | | | | | | | | 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
* | googletest exportmisterg2018-08-201-8/+7
| | | | | | | | | | | | - 209457654 Import of OSS PR, https://github.com/google/googletest/pu... by misterg <misterg@google.com> PiperOrigin-RevId: 209457654
* | Comments changes, no functionality changes. Gennadiy Civil2018-08-141-2/+2
| |
* | Comments changes, no functionality changesGennadiy Civil2018-08-141-2/+1
| |
* | Formatting changes for automatic code managementGennadiy Civil2018-07-271-0/+2
| |
* | Fix warning C4819: The file contains a character that cannot be represented ↵duxiuxing2018-07-171-18/+18
| | | | | | | | in the current code page (936). Save the file in Unicode format to prevent data loss
* | Clone of unsubmitted cr/176529515. Introduce parameterless expectations.David Sunderland2018-04-181-12/+78
| |
* | Remove multiple inheritance from "unintesting call" mock classes.Victor Costan2018-04-121-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Internal CL 156157936, which was published in commit fe402c27790ff1cc9a7e17c5d0aea4ebe7fd8a71, introduced undefined behavior by casting a base class (internal::{Naggy,Nice,Strict}Base<MockClass>, using the curiously recurring template pattern) pointer to a derived class ({Naggy,Nice,Strict}Mock<MockClass>), in the base class' constructor. At that point, the object isn't guaranteed to have taken on the shape of the derived class, and casting is undefined behavior. The undefined behavior was caught by Chrome's CFI build bot [1], and prevents rolling googletest past that commit / CL. This commit simplifies the {Naggy,Nice,Strict}Mock class hierarchy in a way that removes the undefined behavior. [1] https://www.chromium.org/developers/testing/control-flow-integrity
* | Merging gMock, 2Gennadiy Civil2018-04-051-49/+58
| |
* | Code mergesGennadiy Civil2018-01-261-5/+4
| |
* | Use gender-neutral pronouns in comments and docsJonathan Wakely2017-09-271-1/+1
| |
* | Adding a flag option to change the default mock typeAlyssa Wilk2017-08-101-1/+0
| |
* | Use std::string and ::string explicitly in gtest and gmock code.Nico Weber2017-05-151-25/+28
|/ | | | | | | | | This merges a Google-internal change (117235625). Original CL description: This CL was created manually in about an hour with sed, a Python script to find all the places unqualified 'string' was mentioned, and some help from Emacs to add the "std::" qualifications, plus a few manual tweaks.
* move googlemock files into googlemock/ subdirBilly Donahue2015-08-251-0/+1847