Komi Atchoglo
df23c4218e
Made modifiers inheritable
...
* Mock object can be made Strict/Nice/Naggy by inheritance
2024-12-26 04:42:57 +01:00
Tom Hughes
23142843f7
Use "#ifdef GTEST_OS_..." instead of "#if GTEST_OS_..."
...
This is compatible with compiling with "-Wundef" (#3267 ).
PiperOrigin-RevId: 513943378
Change-Id: I47cf5fabbb77be061c4483a0adc54511af6b191c
2023-03-06 07:14:21 -08:00
Derek Mauro
0320f517fd
Work around a maybe-uninitialized warning under GCC 12
...
Some Mock constructors insert the pointer to the Mock itself into a
global registry. Since GCC cannot see how the pointer is used (only as
an identifier), it cannot tell that the object doesn't need to be
initialized at that point at all. Work around this by using uintptr_t
instead.
PiperOrigin-RevId: 452380347
Change-Id: Ia5a493057ed90719de1d0efab71de9a8a08ddf8b
2022-06-01 14:08:04 -07:00
Derek Mauro
bf66935e07
Remove the legacy internal GTEST_DISALLOW_* macros
...
PiperOrigin-RevId: 443715444
Change-Id: I3ffd54b63d2728ae4a668ee7875c8c3c8188087c
2022-04-22 11:26:03 -07:00
Abseil Team
100f6fbf5f
Consistently apply IWYU pragmas across googletest and googlemock headers
...
PiperOrigin-RevId: 422559250
Change-Id: I9f630f2186724950e5e9fbd7093d5264e8bf0a71
2022-01-18 08:11:11 -08:00
Abseil Team
96f4ce02a3
Googletest export
...
Delete GOOGLETEST_CM.* tags from C++ code.
PiperOrigin-RevId: 386268534
2021-07-22 14:54:03 -04:00
Abseil Team
c3fc92f0b7
Googletest export
...
Update docs to point to the github.io pages.
PiperOrigin-RevId: 367711335
2021-04-12 20:14:19 -07:00
Austin Sullivan
9c047902ac
Update nicestrictnaggy gmock cook_book links
...
An incorrect link is output to the user when these conditions are met.
2021-03-17 10:33:19 -04:00
Abseil Team
98ca420679
Googletest export
...
Internal change
PiperOrigin-RevId: 362040448
2021-03-16 09:50:49 -04:00
Abseil Team
0a3a3a845e
Googletest export
...
Make include guards conform with https://google.github.io/styleguide/cppguide.html#The__define_Guard , attempt #2
PiperOrigin-RevId: 357056902
2021-02-18 13:26:24 -05:00
Abseil Team
d4144d4ee2
Googletest export
...
Revert include guard fix
PiperOrigin-RevId: 356588893
2021-02-11 12:49:24 -05:00
Abseil Team
9c2293af06
Googletest export
...
Fix build for MinGW + clang
In [1], empty_bases "is only supported when using the Microsoft C++ ABI." Disable it for MinGW.
https://clang.llvm.org/docs/AttributeReference.html#empty-bases
PiperOrigin-RevId: 356373782
2021-02-11 12:48:52 -05:00
Abseil Team
36b7792047
Googletest export
...
Make include guards conform with https://google.github.io/styleguide/cppguide.html#The__define_Guard
PiperOrigin-RevId: 355882793
2021-02-11 12:48:43 -05:00
Abseil Team
ca4b7c9ff4
Googletest export
...
Give each of Naggy/Nice/StrictMock a base class whose constructor runs before
the mocked class's constructor, and a destructor that runs after the mocked
class's destructor, so that any mock methods run in either the constructor or
destructor use the same strictness as other calls.
PiperOrigin-RevId: 348511612
2020-12-22 12:15:41 -05:00
Abseil Team
18f8200e30
Googletest export
...
Add static_asserts that verify that no class hierarchy contains more than one
of {NiceMock, NaggyMock, StrictMock}. This sort of nesting has always been
disallowed, but this CL adds a compile-time check to prevent it.
PiperOrigin-RevId: 347037822
2020-12-11 22:11:39 -05:00
Aralox
ee66065bc5
Issue 2135: Change template args in NiceMock, NaggyMock and StrictMock from A1, A2, ... to TArg1, TArg2,... to avoid clash with legacy header files
2020-10-07 18:27:41 +11:00
Abseil Team
34a99e547a
Googletest export
...
Get rid of code generation for NiceMock / StrictMock.
They got small enough that it doesn't make sense to generate them.
PiperOrigin-RevId: 226455689
2018-12-21 11:30:20 -05:00