Commit Graph

18 Commits

Author SHA1 Message Date
Abseil Team
e26a3fa13c Googletest export
Unifdef c++11-related macros from googletest now that it requires C++11.

PiperOrigin-RevId: 225905601
2018-12-20 14:09:31 -05:00
Gennadiy Civil
20eaf6e3a9 Merge pull request #1911 from BrukerJWD:isnice
PiperOrigin-RevId: 218384341
2018-10-23 15:13:42 -04:00
Jonathan Wendeborn
0cefda7749
Removed last reference to internal::kDefault 2018-10-16 08:51:33 +02:00
BrukerJWD
8c82ba48e4
Merge branch 'master' into isnice 2018-10-16 08:37:56 +02:00
Jonathan Wendeborn
6bbf911a8d
Don't fully qualify enum member 2018-10-16 08:19:02 +02:00
Jonathan Wendeborn
67a240a107
Added Mock::IsNaggy, IsNice, and IsStrict 2018-10-16 08:07:15 +02:00
Gennadiy Civil
a3c0dd0f4d Comments changes, no functionality changes 2018-08-14 14:04:07 -04:00
Gennadiy Civil
a79851f2c2 merging 2018-04-12 14:00:38 -04:00
Victor Costan
1324e2d706 Remove multiple inheritance from "unintesting call" mock classes.
Internal CL 156157936, which was published in commit
fe402c2779, 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
2018-04-12 00:48:30 -07:00
Maurice Gilden
1ee8079651 Remove unused variable 2017-08-21 10:10:14 +02:00
Gennadiy Civil
3cf65b5d86 Added "explicit" as per compiler suggestion 2017-08-20 15:20:13 -04:00
Gennadiy Civil
026735daf3 Proposing these changes, please review
Slightly better names and cleaner tests.
Please review
2017-08-20 15:15:31 -04:00
Maurice Gilden
b0ed43e724 Change tabs to spaces in test case 2017-08-18 15:27:02 +02:00
Maurice Gilden
36777251c0 Switch return type to class without default constructor 2017-08-18 12:28:50 +02:00
Maurice Gilden
cc99900036 Fix test if exceptions are not supported 2017-08-18 11:46:15 +02:00
Maurice Gilden
95f18d9938 adds test for NiceMock with unknown return value 2017-08-18 11:21:28 +02:00
Nico Weber
09fd5b3ebf Use std::string and ::string explicitly in gtest and gmock code.
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.
2017-05-15 17:53:04 -04:00
Billy Donahue
affb09edf0 move googlemock files into googlemock/ subdir 2015-08-25 17:47:18 -04:00