These macros should only be used within googletest, so changing them will not
affect external users.
This allows compiling with -Wundef (#3267).
PiperOrigin-RevId: 513946162
Change-Id: I2f2b7df9123adeba4147593b2b55fde349ccce4f
The "more details" warning message printed by this macro is no longer
needed.
PiperOrigin-RevId: 513945729
Change-Id: I644910216dbef2fe92eee3a648f2078e705cc7a1
According to the comments, "Feature-indicating macros",
such as GTEST_IS_THREADSAFE should be defined to 1 when supported
and otherwise undefined (never 0).
PiperOrigin-RevId: 513944266
Change-Id: I0f5c8bed107a5f20e957ec7c70339540ca2fe831
These macros should only be used within googletest, so changing them will not
affect external users.
This allows compiling with -Wundef (#3267).
PiperOrigin-RevId: 513943800
Change-Id: I697b1005c29b0d5af06f583f202d86db48b567b9
For MSVC, gmock_output_test.py output struct std::pair<int,bool>, for GCC, it's output
std::pair<int, bool>, it's not the same, my intention is getting these to be same by removing
struct for MSVC's outptu, and strip redundant space for GCC.
As a by-product,
```
#ifdef _MSC_VER
#define ERROR_DESC "class std::runtime_error"
#else
#define ERROR_DESC "std::runtime_error"
#endif
```
can be simplified to
```
#define ERROR_DESC "std::runtime_error"
```
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Keep declarations in c++ < 17 using new macro, GTEST_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL.
Fixes#4148.
PiperOrigin-RevId: 511510401
Change-Id: I76c3f2fccf07a0978adcbe5f8f0203b9d0c33872
Historically, calls to RecordProperty with values that are convertible to
int64_t have been casted to int64_t. The result was that types like float or
double would be truncated when printed (e.g., 4.75 -> 4). This change removes
the cast so that the types are printed in a more appropriate manner.
PiperOrigin-RevId: 511238685
Change-Id: I80de5db14462da2a3e1f476086025ae514383a17
When googletest and googlemock are included as a git submodule and referenced
as part of an existing CMake project, multiple warnings are printed out due to
not setting a value for the CMP0069 policy.
This CL changes the link in the ReportUninterestingCall message from
.../gmock_cook_book.md#knowing-when-to-expect to
.../gmock_cook_book.md#knowing-when-to-expect-useoncall. This is necessary
following https://github.com/google/googletest/commit/31ff597.
PiperOrigin-RevId: 510138974
Change-Id: Ic98c84b07751d27dfc95eddbe7874f76d68b456f
Use "#if defined(_MSC_VER)" instead of "#if _MSC_VER" to be consistent
with other usages in googletest and to work with the "-Wundef" warning.
PiperOrigin-RevId: 508087630
Change-Id: I29c16fd2fa51a9dfecd55e10362a020318318956
Nothing defines GTEST_USES_PCRE anymore. It was only meant for
internal use, so nothing public should be relying on it:
https://github.com/google/googletest/issues/2735#issuecomment-644849438.
Found when compiling with "-Wundef".
Fixes#2735.
PiperOrigin-RevId: 507823660
Change-Id: Ie19e576ff01dc3b16381338578ece92adccfc09b
CXX_FLAGS should be CXXFLAGS and the quoting was wrong.
As a result, "-Werror -Wdeprecated" was not being applied.
https://cmake.org/cmake/help/latest/envvar/CXXFLAGS.html
PiperOrigin-RevId: 506656655
Change-Id: Ic5e861be3b9c32257eb9aabb845c931f3cba7122
The GTEST_DISABLE_MSC_WARNINGS macros already have an _MSC_VER check.
This change also adds a missing GTEST_DISABLE_MSC_WARNINGS_POP_ in
gtest-typed-test_test.cc.
PiperOrigin-RevId: 506636248
Change-Id: Ifdc044528f5448fbf0175887d1671f1e1f3040b9
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
warning C4244: 'initializing': conversion from 'int' to 'short', possible
loss of data
PiperOrigin-RevId: 505774670
Change-Id: I3524040334a4b265bae12cfacdd2b615cbb1cfc8